@supersoniks/concorde 1.1.49 → 2.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (230) hide show
  1. package/README.md +0 -0
  2. package/cli.js +0 -0
  3. package/components.d.ts +0 -0
  4. package/components.js +0 -0
  5. package/concorde-core.bundle.js +3288 -36
  6. package/concorde-core.es.js +13149 -9458
  7. package/core/_types/types.d.ts +0 -0
  8. package/core/_types/types.js +0 -0
  9. package/core/components/functional/date/date.d.ts +0 -0
  10. package/core/components/functional/date/date.js +0 -0
  11. package/core/components/functional/example/example.d.ts +0 -0
  12. package/core/components/functional/example/example.js +0 -0
  13. package/core/components/functional/fetch/fetch.d.ts +2 -0
  14. package/core/components/functional/fetch/fetch.js +0 -0
  15. package/core/components/functional/functional.d.ts +0 -0
  16. package/core/components/functional/functional.js +0 -0
  17. package/core/components/functional/if/if.d.ts +0 -0
  18. package/core/components/functional/if/if.js +0 -0
  19. package/core/components/functional/if/if.test.d.ts +0 -0
  20. package/core/components/functional/if/if.test.js +12 -21
  21. package/core/components/functional/list/list.d.ts +4 -0
  22. package/core/components/functional/list/list.js +24 -11
  23. package/core/components/functional/mix/mix.d.ts +0 -0
  24. package/core/components/functional/mix/mix.js +0 -0
  25. package/core/components/functional/queue/queue.d.ts +0 -0
  26. package/core/components/functional/queue/queue.js +38 -70
  27. package/core/components/functional/router/redirect.d.ts +0 -0
  28. package/core/components/functional/router/redirect.js +0 -0
  29. package/core/components/functional/router/router.d.ts +0 -0
  30. package/core/components/functional/router/router.js +1 -2
  31. package/core/components/functional/sdui/SDUIDescriptorTransformer.d.ts +0 -0
  32. package/core/components/functional/sdui/SDUIDescriptorTransformer.js +28 -43
  33. package/core/components/functional/sdui/default-library.json +0 -0
  34. package/core/components/functional/sdui/sdui-utils.d.ts +0 -0
  35. package/core/components/functional/sdui/sdui-utils.js +0 -0
  36. package/core/components/functional/sdui/sdui.d.ts +2 -0
  37. package/core/components/functional/sdui/sdui.js +24 -40
  38. package/core/components/functional/sdui/types.d.ts +0 -0
  39. package/core/components/functional/sdui/types.js +0 -0
  40. package/core/components/functional/sonic-scope/sonic-scope.d.ts +1 -1
  41. package/core/components/functional/sonic-scope/sonic-scope.js +0 -0
  42. package/core/components/functional/states/states.d.ts +0 -0
  43. package/core/components/functional/states/states.js +2 -4
  44. package/core/components/functional/submit/submit.d.ts +0 -0
  45. package/core/components/functional/submit/submit.js +106 -121
  46. package/core/components/functional/subscriber/subscriber.d.ts +0 -0
  47. package/core/components/functional/subscriber/subscriber.js +0 -0
  48. package/core/components/functional/value/value.d.ts +0 -0
  49. package/core/components/functional/value/value.js +0 -0
  50. package/core/components/ui/_css/scroll.d.ts +0 -0
  51. package/core/components/ui/_css/scroll.js +0 -0
  52. package/core/components/ui/_css/size.d.ts +0 -0
  53. package/core/components/ui/_css/size.js +0 -0
  54. package/core/components/ui/_css/type.d.ts +0 -0
  55. package/core/components/ui/_css/type.js +0 -0
  56. package/core/components/ui/alert/alert.d.ts +0 -0
  57. package/core/components/ui/alert/alert.js +0 -0
  58. package/core/components/ui/badge/badge.d.ts +0 -0
  59. package/core/components/ui/badge/badge.js +0 -0
  60. package/core/components/ui/button/button.d.ts +2 -2
  61. package/core/components/ui/button/button.js +24 -41
  62. package/core/components/ui/captcha/captcha.d.ts +0 -0
  63. package/core/components/ui/captcha/captcha.js +3 -5
  64. package/core/components/ui/card/card-footer.d.ts +0 -0
  65. package/core/components/ui/card/card-footer.js +0 -0
  66. package/core/components/ui/card/card-header-descripton.d.ts +0 -0
  67. package/core/components/ui/card/card-header-descripton.js +0 -0
  68. package/core/components/ui/card/card-header.d.ts +0 -0
  69. package/core/components/ui/card/card-header.js +0 -0
  70. package/core/components/ui/card/card-main.d.ts +0 -0
  71. package/core/components/ui/card/card-main.js +0 -0
  72. package/core/components/ui/card/card.d.ts +0 -0
  73. package/core/components/ui/card/card.js +0 -0
  74. package/core/components/ui/divider/divider.d.ts +1 -1
  75. package/core/components/ui/divider/divider.js +6 -6
  76. package/core/components/ui/form/checkbox/checkbox.d.ts +3 -23
  77. package/core/components/ui/form/checkbox/checkbox.js +7 -12
  78. package/core/components/ui/form/css/form-control.d.ts +0 -0
  79. package/core/components/ui/form/css/form-control.js +0 -0
  80. package/core/components/ui/form/fieldset/fieldset.d.ts +0 -0
  81. package/core/components/ui/form/fieldset/fieldset.js +0 -0
  82. package/core/components/ui/form/fieldset/legend-description.d.ts +0 -0
  83. package/core/components/ui/form/fieldset/legend-description.js +0 -0
  84. package/core/components/ui/form/fieldset/legend.d.ts +0 -0
  85. package/core/components/ui/form/fieldset/legend.js +0 -0
  86. package/core/components/ui/form/form-actions/form-actions.d.ts +0 -0
  87. package/core/components/ui/form/form-actions/form-actions.js +0 -0
  88. package/core/components/ui/form/form-layout/form-layout.d.ts +1 -1
  89. package/core/components/ui/form/form-layout/form-layout.js +1 -1
  90. package/core/components/ui/form/input/input.d.ts +4 -6
  91. package/core/components/ui/form/input/input.js +12 -18
  92. package/core/components/ui/form/input/password-helper.d.ts +0 -0
  93. package/core/components/ui/form/input/password-helper.js +0 -0
  94. package/core/components/ui/form/input/same-value-helper.d.ts +0 -0
  95. package/core/components/ui/form/input/same-value-helper.js +0 -0
  96. package/core/components/ui/form/input-autocomplete/input-autocomplete.d.ts +5 -20
  97. package/core/components/ui/form/input-autocomplete/input-autocomplete.js +27 -93
  98. package/core/components/ui/form/radio/radio.d.ts +0 -0
  99. package/core/components/ui/form/radio/radio.js +0 -0
  100. package/core/components/ui/form/select/select.d.ts +1 -1
  101. package/core/components/ui/form/select/select.js +15 -25
  102. package/core/components/ui/form/textarea/textarea.d.ts +3 -3
  103. package/core/components/ui/form/textarea/textarea.js +8 -17
  104. package/core/components/ui/group/group.d.ts +0 -0
  105. package/core/components/ui/group/group.js +7 -15
  106. package/core/components/ui/icon/icon.d.ts +6 -12
  107. package/core/components/ui/icon/icon.js +20 -53
  108. package/core/components/ui/icon/icons.d.ts +0 -0
  109. package/core/components/ui/icon/icons.js +28 -22
  110. package/core/components/ui/icon/icons.json +0 -0
  111. package/core/components/ui/image/image.d.ts +1 -1
  112. package/core/components/ui/image/image.js +3 -3
  113. package/core/components/ui/link/link.d.ts +0 -0
  114. package/core/components/ui/link/link.js +0 -0
  115. package/core/components/ui/loader/loader.d.ts +0 -0
  116. package/core/components/ui/loader/loader.js +0 -0
  117. package/core/components/ui/loader/styles/fixed.d.ts +0 -0
  118. package/core/components/ui/loader/styles/fixed.js +0 -0
  119. package/core/components/ui/loader/styles/inline.d.ts +0 -0
  120. package/core/components/ui/loader/styles/inline.js +0 -0
  121. package/core/components/ui/menu/menu-item.d.ts +0 -0
  122. package/core/components/ui/menu/menu-item.js +0 -0
  123. package/core/components/ui/menu/menu.d.ts +0 -0
  124. package/core/components/ui/menu/menu.js +2 -4
  125. package/core/components/ui/modal/modal-actions.d.ts +1 -1
  126. package/core/components/ui/modal/modal-actions.js +4 -4
  127. package/core/components/ui/modal/modal-close.d.ts +0 -0
  128. package/core/components/ui/modal/modal-close.js +0 -0
  129. package/core/components/ui/modal/modal-content.d.ts +0 -0
  130. package/core/components/ui/modal/modal-content.js +0 -0
  131. package/core/components/ui/modal/modal-subtitle.d.ts +0 -0
  132. package/core/components/ui/modal/modal-subtitle.js +0 -0
  133. package/core/components/ui/modal/modal-title.d.ts +0 -0
  134. package/core/components/ui/modal/modal-title.js +0 -0
  135. package/core/components/ui/modal/modal.d.ts +0 -0
  136. package/core/components/ui/modal/modal.js +10 -12
  137. package/core/components/ui/pop/pop.d.ts +0 -0
  138. package/core/components/ui/pop/pop.js +3 -4
  139. package/core/components/ui/progress/progress.d.ts +0 -0
  140. package/core/components/ui/progress/progress.js +0 -0
  141. package/core/components/ui/table/table-caption.d.ts +0 -0
  142. package/core/components/ui/table/table-caption.js +0 -0
  143. package/core/components/ui/table/table-tbody.d.ts +0 -0
  144. package/core/components/ui/table/table-tbody.js +0 -0
  145. package/core/components/ui/table/table-td.d.ts +0 -0
  146. package/core/components/ui/table/table-td.js +5 -6
  147. package/core/components/ui/table/table-tfoot.d.ts +0 -0
  148. package/core/components/ui/table/table-tfoot.js +0 -0
  149. package/core/components/ui/table/table-th.d.ts +0 -0
  150. package/core/components/ui/table/table-th.js +5 -6
  151. package/core/components/ui/table/table-thead.d.ts +0 -0
  152. package/core/components/ui/table/table-thead.js +0 -0
  153. package/core/components/ui/table/table-tr.d.ts +0 -0
  154. package/core/components/ui/table/table-tr.js +8 -1
  155. package/core/components/ui/table/table.d.ts +1 -0
  156. package/core/components/ui/table/table.js +9 -1
  157. package/core/components/ui/theme/css/tailwind.css +0 -0
  158. package/core/components/ui/theme/css/tailwind.d.ts +0 -0
  159. package/core/components/ui/theme/theme-collection/core-variables.d.ts +0 -0
  160. package/core/components/ui/theme/theme-collection/core-variables.js +0 -0
  161. package/core/components/ui/theme/theme-collection/dark.d.ts +0 -0
  162. package/core/components/ui/theme/theme-collection/dark.js +0 -0
  163. package/core/components/ui/theme/theme-collection/light.d.ts +0 -0
  164. package/core/components/ui/theme/theme-collection/light.js +0 -0
  165. package/core/components/ui/theme/theme.d.ts +0 -0
  166. package/core/components/ui/theme/theme.js +5 -6
  167. package/core/components/ui/toast/message-subscriber.d.ts +0 -0
  168. package/core/components/ui/toast/message-subscriber.js +6 -8
  169. package/core/components/ui/toast/toast-item.d.ts +0 -0
  170. package/core/components/ui/toast/toast-item.js +0 -0
  171. package/core/components/ui/toast/toast.d.ts +0 -0
  172. package/core/components/ui/toast/toast.js +15 -6
  173. package/core/components/ui/toast/types.d.ts +0 -0
  174. package/core/components/ui/toast/types.js +0 -0
  175. package/core/components/ui/tooltip/tooltip.d.ts +1 -1
  176. package/core/components/ui/tooltip/tooltip.js +0 -0
  177. package/core/components/ui/ui.d.ts +0 -0
  178. package/core/components/ui/ui.js +0 -0
  179. package/core/core.d.ts +0 -0
  180. package/core/core.js +9 -0
  181. package/core/decorators/Subscriber.d.ts +0 -0
  182. package/core/decorators/Subscriber.js +0 -0
  183. package/core/directives/DataProvider.d.ts +0 -14
  184. package/core/directives/DataProvider.js +1 -16
  185. package/core/mixins/Fetcher.d.ts +2 -0
  186. package/core/mixins/Fetcher.js +67 -79
  187. package/core/mixins/FormCheckable.d.ts +0 -0
  188. package/core/mixins/FormCheckable.js +2 -3
  189. package/core/mixins/FormElement.d.ts +0 -0
  190. package/core/mixins/FormElement.js +5 -7
  191. package/core/mixins/FormInput.d.ts +1 -1
  192. package/core/mixins/FormInput.js +1 -2
  193. package/core/mixins/Subscriber.d.ts +0 -0
  194. package/core/mixins/Subscriber.js +39 -54
  195. package/core/mixins/TemplatesContainer.d.ts +0 -0
  196. package/core/mixins/TemplatesContainer.js +0 -0
  197. package/core/mixins/mixins.d.ts +0 -0
  198. package/core/mixins/mixins.js +0 -0
  199. package/core/utils/Arrays.d.ts +0 -0
  200. package/core/utils/Arrays.js +2 -1
  201. package/core/utils/DataBindObserver.d.ts +0 -0
  202. package/core/utils/DataBindObserver.js +5 -6
  203. package/core/utils/Electron.d.ts +0 -0
  204. package/core/utils/Electron.js +1 -1
  205. package/core/utils/Format.d.ts +0 -0
  206. package/core/utils/Format.js +0 -0
  207. package/core/utils/HTML.d.ts +0 -0
  208. package/core/utils/HTML.js +18 -31
  209. package/core/utils/LocationHandler.d.ts +0 -0
  210. package/core/utils/LocationHandler.js +8 -13
  211. package/core/utils/Objects.d.ts +0 -0
  212. package/core/utils/Objects.js +0 -0
  213. package/core/utils/PublisherProxy.d.ts +0 -0
  214. package/core/utils/PublisherProxy.js +108 -132
  215. package/core/utils/Utils.d.ts +0 -0
  216. package/core/utils/Utils.js +3 -14
  217. package/core/utils/api.d.ts +0 -0
  218. package/core/utils/api.js +137 -165
  219. package/img/concorde-logo.svg +0 -0
  220. package/img/concorde.png +0 -0
  221. package/img/concorde_def.png +0 -0
  222. package/mixins.d.ts +5 -3
  223. package/mixins.js +0 -0
  224. package/package.json +13 -12
  225. package/svg/regular/plane.svg +0 -0
  226. package/svg/solid/plane.svg +0 -0
  227. package/test-utils/TestUtils.d.ts +0 -0
  228. package/test-utils/TestUtils.js +0 -0
  229. package/utils.d.ts +0 -0
  230. package/utils.js +0 -0
@@ -1,117 +1,3369 @@
1
- !function(t){"function"==typeof define&&define.amd?define(t):t()}((function(){var t;class e{static getLanguage(){return document.getElementsByTagName("html")[0].getAttribute("lang")}static getCookies(){return document.cookie.split(";").reduce(((t,e)=>{const s=e.indexOf("=");return t[e.substring(0,s).trim()]=e.substring(s+1),t}),{})}static getAncestorAttributeValue(t,e){if(!t)return null;for(;!("hasAttribute"in t)||!t.hasAttribute(e);){if(!(t.parentNode||t.host))break;t=t.parentNode||t.host}return"hasAttribute"in t?t.getAttribute(e):null}static getClosestForm(t){for(;!t.nodeName||"form"!==t.nodeName.toLowerCase();){if(!(t.parentNode||t.host))break;t=t.parentNode||t.host}return t.nodeName?t:null}static async loadJS(t){return new Promise((async e=>{const s=document.createElement("script");s.src=t,s.onload=()=>e(!0),s.onerror=()=>e(!0),document.head.appendChild(s)}))}static async loadCSS(t){return new Promise((async e=>{const s=document.createElement("link");s.type="text/css",s.rel="stylesheet",s.href=t,s.onload=()=>e(!0),s.onerror=()=>e(!0),document.head.appendChild(s)}))}}class s{static shallowEqual(t,e,s=!0){const i=Object.keys(t),r=Object.keys(e);if(i.length!==r.length&&s)return!1;for(const o of i){const i=t[o],r=e[o];if(s?i!==r:i!=r)return!1}return!0}static deepEqual(t,e,i=!0){const r=Object.keys(t),o=Object.keys(e);if(r.length!==o.length&&i)return!1;for(const n of r){const r=t[n],o=e[n],a=s.isObject(r)&&s.isObject(o),l=i?r!==o:r!=o;if(a&&!s.deepEqual(r,o)||!a&&l)return!1}return!0}static isObject(t){return null!=t&&"object"==typeof t}static isUndefindOrNull(t){return null==t}static traverse(t,e,i=!1){for(const r of e){const e=t[r];if(void 0===e)return;t=i&&s.isObject(e)?Object.assign(Array.isArray(e)?[]:{},t,e):t[r]}return t}static getURLSearchArray(t,e=""){let i=[];for(let r in t){const o=t[r];e&&(r=e+"["+r+"]"),s.isObject(o)?i=[...i,...this.getURLSearchArray(o,r)]:i.push(`${r}=${o}`)}return i}static getURLSearchString(t){return s.getURLSearchArray(t,"").join("&")}}const i=class{constructor(t){this.addHTTPResponse=!1,this.cache="default",this.serviceURL=t.serviceURL,this.serviceURL||(this.serviceURL=document.location.origin),this.userName=t.userName,this.password=t.password,t.token&&(this.token=t.token),this.tokenProvider=t.tokenProvider,this.authToken=t.authToken,this.addHTTPResponse=t.addHTTPResponse||!1,this.credentials=t.credentials,this.cache=t.cache||"default"}set token(t){this._token=t,t?i.invalidTokens.includes(t)||i.tokens.set(this.serviceURL,t):i.tokens.delete(this.serviceURL)}get token(){return i.invalidTokens.includes(this._token)?i.tokens.get(this.serviceURL):this._token}handleInvalidToken(t){t&&(i.invalidTokens.includes(t)||(i.invalidTokens.push(t),this.token=null))}async handleResult(t,e){var r;this.lastResult=t;const o=null==(r=t.headers.get("content-type"))?void 0:r.toLowerCase(),n=t.status;let a={};if(o&&0!=o.indexOf("text/"))try{a=await t.json()}catch(l){a={}}else{a={text:await t.text()}}return this.addHTTPResponse&&s.isObject(a)&&(a._sonic_http_response_=t),498!==n||i.failledTokenUpdates.has(this.serviceURL)||(this.handleInvalidToken(this.token),a="get"===e.apiMethod?await this[e.apiMethod](e.path,e.additionalHeaders):await this[e.apiMethod](e.path,e.data,e.method,e.additionalHeaders)),a}async auth(){if(this.token)return;if(i.tokens.has(this.serviceURL))return void(this.token=i.tokens.get(this.serviceURL));if(!this.tokenProvider)return;let t={};this.userName&&this.password?t={Authorization:"Basic "+window.btoa(unescape(encodeURIComponent(this.userName+":"+this.password)))}:this.authToken&&(t={Authorization:"Bearer "+this.authToken});const e=new URL(this.serviceURL),s=e.protocol+"//"+e.host,r=await fetch(this.computeURL(this.tokenProvider,{serviceHost:s}),{headers:t,credentials:this.credentials});try{const t=await r.json();t.token?this.token=t.token:i.failledTokenUpdates.set(this.serviceURL,!0)}catch(o){i.failledTokenUpdates.set(this.serviceURL,!0)}}async get(t,e){const s={apiMethod:"get",path:t,additionalHeaders:e},r=await this.createHeaders(e),o=this.computeURL(t),n=JSON.stringify({url:o,headers:r});if(!i.loadingGetPromises.has(n)){const t=new Promise((async t=>{const e=await fetch(o,{headers:r,credentials:this.credentials,cache:this.cache});t(await this.handleResult(e,s))}));i.loadingGetPromises.set(n,t)}const a=await i.loadingGetPromises.get(n);return i.loadingGetPromises.delete(n),a}async createHeaders(t){await this.auth();const s={};return this.token&&(s.Authorization="Bearer "+this.token),s["Accept-Language"]=e.getLanguage(),t&&Object.assign(s,t),s}computeURL(t,e={}){let s="";s=t.startsWith("http")?t:this.serviceURL+"/"+t,s.startsWith("http")||(s=window.location.origin+s);const i=new URL(s);for(const r in e)i.searchParams.set(r,e[r]);return i.toString().replace(/([^(https?:)])\/{2,}/g,"$1/")}async send(t,e,s="POST",i){const r={apiMethod:"send",path:t,additionalHeaders:i,method:s,data:e},o=await this.createHeaders(i);o.Accept="application/json",o["Content-Type"]="application/json";const n=await fetch(this.computeURL(t),{headers:o,credentials:this.credentials,method:s,body:JSON.stringify(e)});return await this.handleResult(n,r)}async submitFormData(t,e,s="POST",i){const r={apiMethod:"submitFormData",path:t,additionalHeaders:i,method:s,data:e},o=await this.createHeaders(i);o.Accept="application/json";const n=new FormData,a=e;for(const c in a)n.set(c,a[c]);const l=await fetch(this.computeURL(t),{headers:o,credentials:this.credentials,method:s,body:n});return await this.handleResult(l,r)}async put(t,e,s){return this.send(t,e,"PUT",s)}async post(t,e,s){return this.send(t,e,"POST",s)}async delete(t,e,s){return this.send(t,e,"delete",s)}};let r=i;r.loadingGetPromises=new Map,r.tokens=new Map,r.invalidTokens=[],r.failledTokenUpdates=new Map;class o{static ucFirst(t){return"string"!=typeof t?t:t.charAt(0).toUpperCase()+t.substring(1)}static js(t){try{return Function("return "+t)()}catch(e){return""}}}function n(t){return"object"==typeof t&&null!=t}const a=class{constructor(t,e){for(this._proxies_=new Map,this._is_savable_=!1,this._invalidateListeners_=new Set,this._assignListeners_=new Set,this._mutationListeners_=new Set,this._fillListeners_=new Set,this._templateFillListeners_=new Set,this._lockInternalMutationPublishing_=!1,this._instanceCounter_=0,this._value_=t,this.parent=e||null,this.root=this,this._instanceCounter_=0;this.root.parent;)this.root=this.root.parent}delete(){for(const t of this._proxies_.values())t.delete();this._invalidateListeners_.clear(),this._assignListeners_.clear(),this._mutationListeners_.clear(),this._fillListeners_.clear(),this._templateFillListeners_.clear(),this._proxies_.clear(),a.instances.delete(this._instanceCounter_)}hasListener(){return this._templateFillListeners_.size>0||this._assignListeners_.size>0||this._invalidateListeners_.size>0||this._mutationListeners_.size>0||this._fillListeners_.size>0}_publishInternalMutation_(t=!1){if(this._mutationListeners_.forEach((t=>t())),!t){if(!h.changed&&this._is_savable_){h.changed=!0,h.saveId++;const t=h.saveId;setTimeout((()=>h.getInstance().saveToLocalStorage(t)),1e3)}this.parent&&this.parent._publishInternalMutation_()}}_publishAssignement_(t=!1){this._assignListeners_.forEach((t=>t(this.get()))),this._publishInternalMutation_(t)}_publishInvalidation_(){this._invalidateListeners_.forEach((t=>t()))}_publishDynamicFilling_(t,e){this._fillListeners_.forEach((s=>{s[t]!==e&&(s[t]=e)})),this._publishTemplateFilling_(t,e)}_publishTemplateFilling_(t,e){this._templateFillListeners_.forEach((s=>{const i=Object.getOwnPropertyDescriptor(s,t);(!i||i.set||i.writable)&&(s.propertyMap&&s.propertyMap[t]&&(t=s.propertyMap[t]),void 0!==s[t]&&s[t]!==e&&(s[t]=e))}))}onAssign(t,e=!0){"function"==typeof t&&(this._assignListeners_.add(t),e&&t(this.get()))}offAssign(t){this._assignListeners_.delete(t)}onInvalidate(t){"function"==typeof t&&this._invalidateListeners_.add(t)}offInvalidate(t){"function"==typeof t&&this._invalidateListeners_.delete(t)}invalidate(){this._publishInvalidation_()}onInternalMutation(t){"function"==typeof t&&(this._mutationListeners_.add(t),t())}offInternalMutation(t){"function"==typeof t&&this._mutationListeners_.delete(t)}startTemplateFilling(t){if(this._templateFillListeners_.add(t),"object"==typeof this._value_)for(const e in this._value_){let s=e;const i=this._value_[e];t.propertyMap&&t.propertyMap[e]&&(s=t.propertyMap[e]),void 0!==t[e]&&t[e]!==i&&(t[s]=i)}}stopTemplateFilling(t){this._templateFillListeners_.delete(t)}startDynamicFilling(t){this._fillListeners_.add(t);for(const e in this._value_){const s=this._value_[e];t[e]!==s&&(t[e]=s)}}stopDynamicFilling(t){this._fillListeners_.delete(t)}set(t,e=!1){var s;if(this._value_===t)return!0;if(this._value_&&Object.prototype.hasOwnProperty.call(this._value_,"__value")&&Object.prototype.hasOwnProperty.call(t,"__value")&&this._value_.__value===t.__value)return!0;const i=this._value_;this._value_=n(t)?t:{__value:t};if(Object.prototype.hasOwnProperty.call(this._value_,"__value"))return this._publishAssignement_(e),!0;for(const r in this._value_)void 0===this._value_[r]&&delete this._value_[r];if(Array.from(this._proxies_.keys()).forEach((t=>{if(void 0===this._value_[t]&&this._proxies_.has(t)){const e=this._proxies_.get(t);(null==e?void 0:e.hasListener())?"_parent_"!=t&&i[t]&&(this._value_[t]=null):this._proxies_.delete(t)}})),this._publishAssignement_(),n(this._value_))for(const r in this._value_){const e=t[r],i=n(e)?e:{__value:e};if(!this._proxies_.has(r)){const t=new d({},this);this._proxies_.set(r,t),t._proxies_.set("_parent_",this)}null==(s=this._proxies_.get(r))||s.set(i,!0),this._publishDynamicFilling_(r,e)}return!0}get(){if(h.modifiedCollectore.length>0&&h.modifiedCollectore[0].add(this),Object.prototype.hasOwnProperty.call(this._value_,"__value")){const t=this._value_.__value;return null!=t?t:null}return this._value_}get $tag(){this._instanceCounter_||(a.instancesCounter++,this._instanceCounter_=a.instancesCounter),a.instances.set(this._instanceCounter_,this);return'<reactive-publisher-proxy publisher="'+this._instanceCounter_+'"></reactive-publisher-proxy>'}};let l=a;l.instances=new Map,l.instancesCounter=0;const c=class{constructor(){if(this.enabledLocaStorageProxies=[],this.publishers=new Map,this.localStorageData={},this.isLocalStrorageReady=null,this.initialisedData=[],null!=c.instance)throw"Singleton / use getInstance";c.instance=this,this.isLocalStrorageReady=this.cleanStorageData()}async cleanStorageData(){return new Promise((t=>{(async()=>{try{let s=localStorage.getItem("publisher-proxies-data"),i=null;if(s&&(i=await this.decompress(s,"gzip")),i)try{this.localStorageData=JSON.parse(i)}catch(e){this.localStorageData={}}else s=await this.compress("{}","gzip"),localStorage.setItem("publisher-proxies-data",s),this.localStorageData={};const r=(new Date).getTime()-432e5;for(const t in this.localStorageData){this.localStorageData[t].lastModifiationMS<r&&delete this.localStorageData[t]}t(!0)}catch(e){window.requestAnimationFrame((()=>{t(!1)})),console.log("no publisher cache in this browser")}})()}))}static getInstance(){return null==c.instance?new c:c.instance}static get(t,e){return c.getInstance().get(t,e)}static collectModifiedPublisher(){c.modifiedCollectore.unshift(new Set)}static getModifiedPublishers(){return c.modifiedCollectore.shift()}static delete(t){return c.getInstance().delete(t)}async setLocalData(t,e){var s;await this.isLocalStrorageReady,t.set((null==(s=this.localStorageData[e+"¤page:>"+document.location.pathname])?void 0:s.data)||t.get())}get(t,e){const s="enabled"===(null==e?void 0:e.localStorageMode);if(!this.publishers.has(t)){const e=new d({});this.set(t,e)}const i=this.publishers.get(t);return s&&-1===this.initialisedData.indexOf(t)&&(i._is_savable_=!0,this.initialisedData.push(t),this.setLocalData(i,t)),this.publishers.get(t)}set(t,e){this.publishers.set(t,e)}delete(t){return!!this.publishers.has(t)&&(this.publishers.delete(t),!0)}async saveToLocalStorage(t=0){if(t===c.saveId||t%10==0)try{if(!c.changed||c.saving)return;c.saving=!0,c.changed=!1;const t=Array.from(this.publishers.keys());let e=!1;for(const s of t){const t=this.publishers.get(s);if(!(null==t?void 0:t._is_savable_))continue;const i=null==t?void 0:t.get();i&&(this.localStorageData[s+"¤page:>"+document.location.pathname]={lastModifiationMS:(new Date).getTime(),data:i},e=!0)}if(e){const t=await this.compress(JSON.stringify(this.localStorageData),"gzip");localStorage.setItem("publisher-proxies-data",t)}if(c.saving=!1,c.changed){c.saveId++;const t=c.saveId;setTimeout((()=>this.saveToLocalStorage(t)),1e3)}}catch(e){c.saving=!1}}async compress(t,e){const s=(new TextEncoder).encode(t),i=new window.CompressionStream(e),r=i.writable.getWriter();r.write(s),r.close();const o=await new Response(i.readable).arrayBuffer(),n=new Uint8Array(o);let a="";for(let l=0;l<n.length;l++)a+=String.fromCharCode(n[l]);return btoa(a)}async decompress(t,e){const s=atob(t),i=Uint8Array.from(s,(t=>t.charCodeAt(0))).buffer,r=new window.DecompressionStream(e),o=r.writable.getWriter();o.write(i),o.close();const n=await new Response(r.readable).arrayBuffer();return(new TextDecoder).decode(n)}};let h=c;h.changed=!1,h.saving=!1,h.saveId=0,h.instance=null,h.modifiedCollectore=[];class d extends l{constructor(t,e=null){super(t,e);const s=new Proxy(this,{get:function(t,e){if(e==Symbol.toPrimitive)return()=>s.get();if(["invalidate","onInvalidate","offInvalidate","onAssign","offAssign","startDynamicFilling","stopDynamicFilling","startTemplateFilling","stopTemplateFilling","onInternalMutation","offInternalMutation","set","get","$tag","_templateFillListeners_","_fillListeners_","_assignListeners_","_invalidateListeners_","_publishInternalMutation_","hasListener","delete","_mutationListeners_","_publishDynamicFilling_","_publishInvalidation_","_publishTemplateFilling_","_publishAssignement_","_proxies_","parent","_value_","_is_savable_","_lockInternalMutationPublishing_","_instanceCounter_"].includes(e))return t[e];if(!t._proxies_.has(e)){const i=t._value_[e],r=new d(n(i)?i:{__value:i},t);r._proxies_.set("_parent_",s),t._proxies_.set(e,r)}return t._proxies_.get(e)},set:function(t,e,i){var r;if("_value_"==e)return t._value_=i,!0;if("_is_savable_"==e)return t._is_savable_=i,!0;if("_instanceCounter_"==e)return t._instanceCounter_=i,!0;if(!t._proxies_.has(e)){const i=new d({},t);i._proxies_.set("_parent_",s),t._proxies_.set(e,i)}return t._value_[e]!==i&&(t._value_[e]=i,t._publishDynamicFilling_(e,i),null==(r=t._proxies_.get(e))||r.set(n(i)?i:{__value:i})),!0},deleteProperty:function(t,e){return t._publishDynamicFilling_(e,null),t._proxies_.delete(e),delete t._value_[e]},has:function(t,e){return e in t._value_&&"_lockInternalMutationPublishing_"!=e},defineProperty:function(t,e,s){return s&&"value"in s&&(t._value_[e]=s.value),!0},getOwnPropertyDescriptor:function(t,e){return{enumerable:!0,configurable:!0}},ownKeys:function(t){return t._value_.__value?Object.keys(t._value_.__value):Object.keys(t._value_)}});return s}toString(){return"hey"}valueOf(){return 2}getProperty(t,e){return t[e]}}"undefined"!=typeof module&&(module.exports={Publisher:d,PublisherManager:h});class p extends HTMLElement{constructor(){super(),this.publisherId="",this.onAssign=t=>{this.innerHTML=t.toString()}}connectedCallback(){var t;this.publisherId=this.getAttribute("publisher")||"",this.publisher=l.instances.get(parseInt(this.publisherId)),null==(t=this.publisher)||t.onAssign(this.onAssign)}disconnectedCallback(){var t;null==(t=this.publisher)||t.offAssign(this.onAssign)}}customElements.define("reactive-publisher-proxy",p);const u=class{static disable(){this.enabled&&(this.enabled=!1,Array.from(u.observedElements.keys()).forEach((t=>u.unObserve(t))))}static observe(t){if(!t)return;if(!u.enabled)return;if(u.observedElements.has(t))return;const e=new MutationObserver(u.onMutation),s={childList:!0,subtree:!0,attributes:!0,attributeFilter:["data-bind"]};e.observe(t,s),t.querySelectorAll("[data-bind]").forEach((t=>u.addPublisherListeners(t))),u.observedElements.set(t,e)}static unObserve(t){if(!t)return;const e=this.observedElements.get(t);e&&(e.disconnect(),t.querySelectorAll("[data-bind]").forEach((t=>u.removePublisherListeners(t))))}static onAdded(t){t.hasAttribute&&t.hasAttribute("data-bind")&&u.addPublisherListeners(t),t.querySelectorAll?t.querySelectorAll("[data-bind]").forEach((t=>u.addPublisherListeners(t))):t.childNodes.forEach((t=>u.onAdded(t)))}static onRemoved(t){t.hasAttribute&&t.hasAttribute("data-bind")&&u.removePublisherListeners(t),t.querySelectorAll?t.querySelectorAll("[data-bind]").forEach((t=>u.removePublisherListeners(t))):t.childNodes.forEach((t=>u.onRemoved(t)))}static onMutation(t){for(const e of t)switch(e.type){case"attributes":u.addPublisherListeners(e.target);break;case"childList":e.addedNodes.forEach((t=>{u.onAdded(t)})),e.removedNodes.forEach((t=>{u.onRemoved(t)}))}}static removePublisherListeners(t){const e=u.publisherListeners.get(t);e&&(u.publisherListeners.delete(t),e.forEach((t=>{var e;null==(e=t.publisher)||e.offAssign(t.onAssign)})))}static getVariablesDescriptor(t){let e=t.match(/(\$(?:\w+\\?\.?)+)/g);return e=e?e.map((t=>t.replace("$",""))):[t],e=e.filter((t=>t.length>0)),{expression:t.replace("\\",""),variables:e.map((t=>t.split(/\b\.\b/).map((t=>t.replace("\\","")))))}}static getDataBindItems(t){return"attributes"in t?Array.from(t.attributes).filter((t=>0==t.name.indexOf("::"))).map((t=>({propertyToUpdate:t.name.substring(2).replace(/-((html)|\w)/g,(t=>t.substring(1).toUpperCase())),bindedVariablesDescriptor:u.getVariablesDescriptor(t.value)}))):[]}static getSubPublisher(t,e){if(!e)return t;for(const s of e)if("_self_"!=s){if(!t)return null;t=t[s]}return t}static addPublisherListeners(t){u.removePublisherListeners(t);const s=e.getAncestorAttributeValue(t.parentNode||t.host||t,"dataProvider");if(!s)return;const i=h.getInstance().get(s),r=u.getDataBindItems(t),n=[];r.forEach((e=>{const s=e.bindedVariablesDescriptor,r=e.propertyToUpdate;for(const a of s.variables){const e=a;let l=i;l=u.getSubPublisher(i,e);const c=t,h={publisher:l,onAssign:()=>{const t=s.variables.map((t=>{var e;return null==(e=u.getSubPublisher(i,t))?void 0:e.get()}));let e=s.expression,n=!1;if(1==t.length&&s.variables[0].join(".")==e.substring(1)){let e=t[0];return null===e&&(e=""),void(c[r]=e)}for(let i=0;i<t.length;i++){let r=t[i];const o=s.variables[i];null===r&&(n=!0,r=void 0),e=e.replace("$"+o.join("."),r)}if(-1!=e.indexOf("|")){const t=e.indexOf("|");if(0==t)e=o.js(e.substring(1));else{const s=e.substring(0,t),i=e.substring(t+1),r=o[s];e=n?"":r?r(i):e}}else e=n?"":e;c[r]=e}};null==l||l.onAssign(h.onAssign),n.push(h)}})),u.publisherListeners.set(t,n)}};let g=u;g.observedElements=new Map,g.enabled=!0,g.publisherListeners=new Map,g.observe(document.documentElement),window.SonicDataBindObserver||(window.SonicDataBindObserver=g)
1
+ !function(t){"function"==typeof define&&define.amd?define(t):t()}((function(){var t,e;let s=class{static getLanguage(){return document.getElementsByTagName("html")[0].getAttribute("lang")}static getCookies(){return document.cookie.split(";").reduce(((t,e)=>{const s=e.indexOf("=");return t[e.substring(0,s).trim()]=e.substring(s+1),t}),{})}static getAncestorAttributeValue(t,e){if(!t)return null;for(;!("hasAttribute"in t)||!t.hasAttribute(e);){if(!(t.parentNode||t.host))break;t=t.parentNode||t.host}return"hasAttribute"in t?t.getAttribute(e):null}static getClosestForm(t){for(;!t.nodeName||"form"!==t.nodeName.toLowerCase();){if(!(t.parentNode||t.host))break;t=t.parentNode||t.host}return t.nodeName?t:null}static async loadJS(t){return new Promise((async e=>{const s=document.createElement("script");s.src=t,s.onload=()=>e(!0),s.onerror=()=>e(!0),document.head.appendChild(s)}))}static async loadCSS(t){return new Promise((async e=>{const s=document.createElement("link");s.type="text/css",s.rel="stylesheet",s.href=t,s.onload=()=>e(!0),s.onerror=()=>e(!0),document.head.appendChild(s)}))}},i=class t{static shallowEqual(t,e,s=!0){const i=Object.keys(t),r=Object.keys(e);if(i.length!==r.length&&s)return!1;for(const o of i){const i=t[o],r=e[o];if(s?i!==r:i!=r)return!1}return!0}static deepEqual(e,s,i=!0){const r=Object.keys(e),o=Object.keys(s);if(r.length!==o.length&&i)return!1;for(const n of r){const r=e[n],o=s[n],a=t.isObject(r)&&t.isObject(o),l=i?r!==o:r!=o;if(a&&!t.deepEqual(r,o)||!a&&l)return!1}return!0}static isObject(t){return null!=t&&"object"==typeof t}static isUndefindOrNull(t){return null==t}static traverse(e,s,i=!1){for(const r of s){const s=e[r];if(void 0===s)return;e=i&&t.isObject(s)?Object.assign(Array.isArray(s)?[]:{},e,s):e[r]}return e}static getURLSearchArray(e,s=""){let i=[];for(let r in e){const o=e[r];s&&(r=s+"["+r+"]"),t.isObject(o)?i=[...i,...this.getURLSearchArray(o,r)]:i.push(`${r}=${o}`)}return i}static getURLSearchString(e){return t.getURLSearchArray(e,"").join("&")}};const r=class t{constructor(t){this.addHTTPResponse=!1,this.cache="default",this.serviceURL=t.serviceURL,this.serviceURL||(this.serviceURL=document.location.origin),this.userName=t.userName,this.password=t.password,t.token&&(this.token=t.token),this.tokenProvider=t.tokenProvider,this.authToken=t.authToken,this.addHTTPResponse=t.addHTTPResponse||!1,this.credentials=t.credentials,this.cache=t.cache||"default"}set token(e){this._token=e,e?t.invalidTokens.includes(e)||t.tokens.set(this.serviceURL,e):t.tokens.delete(this.serviceURL)}get token(){return t.invalidTokens.includes(this._token)?t.tokens.get(this.serviceURL):this._token}handleInvalidToken(e){e&&(t.invalidTokens.includes(e)||(t.invalidTokens.push(e),this.token=null))}async handleResult(e,s){var r;this.lastResult=e;const o=null==(r=e.headers.get("content-type"))?void 0:r.toLowerCase(),n=e.status;let a={};if(o&&0!=o.indexOf("text/"))try{a=await e.json()}catch(l){a={}}else{a={text:await e.text()}}return this.addHTTPResponse&&i.isObject(a)&&(a._sonic_http_response_=e),498!==n||t.failledTokenUpdates.has(this.serviceURL)||(this.handleInvalidToken(this.token),a="get"===s.apiMethod?await this[s.apiMethod](s.path,s.additionalHeaders):await this[s.apiMethod](s.path,s.data,s.method,s.additionalHeaders)),a}async auth(){if(this.token)return;if(t.tokens.has(this.serviceURL))return void(this.token=t.tokens.get(this.serviceURL));if(!this.tokenProvider)return;let e={};this.userName&&this.password?e={Authorization:"Basic "+window.btoa(unescape(encodeURIComponent(this.userName+":"+this.password)))}:this.authToken&&(e={Authorization:"Bearer "+this.authToken});const s=new URL(this.serviceURL),i=s.protocol+"//"+s.host,r=await fetch(this.computeURL(this.tokenProvider,{serviceHost:i}),{headers:e,credentials:this.credentials});try{const e=await r.json();e.token?this.token=e.token:t.failledTokenUpdates.set(this.serviceURL,!0)}catch(o){t.failledTokenUpdates.set(this.serviceURL,!0)}}async get(e,s){const i={apiMethod:"get",path:e,additionalHeaders:s},r=await this.createHeaders(s),o=this.computeURL(e),n=JSON.stringify({url:o,headers:r});if(!t.loadingGetPromises.has(n)){const e=new Promise((async t=>{const e=await fetch(o,{headers:r,credentials:this.credentials,cache:this.cache});t(await this.handleResult(e,i))}));t.loadingGetPromises.set(n,e)}const a=await t.loadingGetPromises.get(n);return t.loadingGetPromises.delete(n),a}async createHeaders(t){await this.auth();const e={};return this.token&&(e.Authorization="Bearer "+this.token),e["Accept-Language"]=s.getLanguage(),t&&Object.assign(e,t),e}computeURL(t,e={}){let s="";s=t.startsWith("http")?t:this.serviceURL+"/"+t,s.startsWith("http")||(s=window.location.origin+s);const i=new URL(s);for(const r in e)i.searchParams.set(r,e[r]);return i.toString().replace(/([^(https?:)])\/{2,}/g,"$1/")}async send(t,e,s="POST",i){const r={apiMethod:"send",path:t,additionalHeaders:i,method:s,data:e},o=await this.createHeaders(i);o.Accept="application/json",o["Content-Type"]="application/json";const n=await fetch(this.computeURL(t),{headers:o,credentials:this.credentials,method:s,body:JSON.stringify(e)});return await this.handleResult(n,r)}async submitFormData(t,e,s="POST",i){const r={apiMethod:"submitFormData",path:t,additionalHeaders:i,method:s,data:e},o=await this.createHeaders(i);o.Accept="application/json";const n=new FormData,a=e;for(const c in a)n.set(c,a[c]);const l=await fetch(this.computeURL(t),{headers:o,credentials:this.credentials,method:s,body:n});return await this.handleResult(l,r)}async put(t,e,s){return this.send(t,e,"PUT",s)}async post(t,e,s){return this.send(t,e,"POST",s)}async delete(t,e,s){return this.send(t,e,"delete",s)}};r.loadingGetPromises=new Map,r.tokens=new Map,r.invalidTokens=[],r.failledTokenUpdates=new Map;let o=r,n=class{static ucFirst(t){return"string"!=typeof t?t:t.charAt(0).toUpperCase()+t.substring(1)}static js(t){try{return Function("return "+t)()}catch(e){return""}}};function a(t){return"object"==typeof t&&null!=t}const l=class t{constructor(t,e){for(this._proxies_=new Map,this._is_savable_=!1,this._invalidateListeners_=new Set,this._assignListeners_=new Set,this._mutationListeners_=new Set,this._fillListeners_=new Set,this._templateFillListeners_=new Set,this._lockInternalMutationPublishing_=!1,this._instanceCounter_=0,this._value_=t,this.parent=e||null,this.root=this,this._instanceCounter_=0;this.root.parent;)this.root=this.root.parent}delete(){for(const t of this._proxies_.values())t.delete();this._invalidateListeners_.clear(),this._assignListeners_.clear(),this._mutationListeners_.clear(),this._fillListeners_.clear(),this._templateFillListeners_.clear(),this._proxies_.clear(),t.instances.delete(this._instanceCounter_)}hasListener(){return this._templateFillListeners_.size>0||this._assignListeners_.size>0||this._invalidateListeners_.size>0||this._mutationListeners_.size>0||this._fillListeners_.size>0}_publishInternalMutation_(t=!1){if(this._mutationListeners_.forEach((t=>t())),!t){if(!d.changed&&this._is_savable_){d.changed=!0,d.saveId++;const t=d.saveId;setTimeout((()=>d.getInstance().saveToLocalStorage(t)),1e3)}this.parent&&this.parent._publishInternalMutation_()}}_publishAssignement_(t=!1){this._assignListeners_.forEach((t=>t(this.get()))),this._publishInternalMutation_(t)}_publishInvalidation_(){this._invalidateListeners_.forEach((t=>t()))}_publishDynamicFilling_(t,e){this._fillListeners_.forEach((s=>{s[t]!==e&&(s[t]=e)})),this._publishTemplateFilling_(t,e)}_publishTemplateFilling_(t,e){this._templateFillListeners_.forEach((s=>{const i=Object.getOwnPropertyDescriptor(s,t);(!i||i.set||i.writable)&&(s.propertyMap&&s.propertyMap[t]&&(t=s.propertyMap[t]),void 0!==s[t]&&s[t]!==e&&(s[t]=e))}))}onAssign(t,e=!0){"function"==typeof t&&(this._assignListeners_.add(t),e&&t(this.get()))}offAssign(t){this._assignListeners_.delete(t)}onInvalidate(t){"function"==typeof t&&this._invalidateListeners_.add(t)}offInvalidate(t){"function"==typeof t&&this._invalidateListeners_.delete(t)}invalidate(){this._publishInvalidation_()}onInternalMutation(t){"function"==typeof t&&(this._mutationListeners_.add(t),t())}offInternalMutation(t){"function"==typeof t&&this._mutationListeners_.delete(t)}startTemplateFilling(t){if(this._templateFillListeners_.add(t),"object"==typeof this._value_)for(const e in this._value_){let s=e;const i=this._value_[e];t.propertyMap&&t.propertyMap[e]&&(s=t.propertyMap[e]),void 0!==t[e]&&t[e]!==i&&(t[s]=i)}}stopTemplateFilling(t){this._templateFillListeners_.delete(t)}startDynamicFilling(t){this._fillListeners_.add(t);for(const e in this._value_){const s=this._value_[e];t[e]!==s&&(t[e]=s)}}stopDynamicFilling(t){this._fillListeners_.delete(t)}set(t,e=!1){var s;if(this._value_===t)return!0;if(this._value_&&Object.prototype.hasOwnProperty.call(this._value_,"__value")&&Object.prototype.hasOwnProperty.call(t,"__value")&&this._value_.__value===t.__value)return!0;const i=this._value_;this._value_=a(t)?t:{__value:t};if(Object.prototype.hasOwnProperty.call(this._value_,"__value"))return this._publishAssignement_(e),!0;for(const r in this._value_)void 0===this._value_[r]&&delete this._value_[r];if(Array.from(this._proxies_.keys()).forEach((t=>{if(void 0===this._value_[t]&&this._proxies_.has(t)){const e=this._proxies_.get(t);(null==e?void 0:e.hasListener())?"_parent_"!=t&&i[t]&&(this._value_[t]=null):this._proxies_.delete(t)}})),this._publishAssignement_(),a(this._value_))for(const r in this._value_){const e=t[r],i=a(e)?e:{__value:e};if(!this._proxies_.has(r)){const t=new p({},this);this._proxies_.set(r,t),t._proxies_.set("_parent_",this)}null==(s=this._proxies_.get(r))||s.set(i,!0),this._publishDynamicFilling_(r,e)}return!0}get(){if(d.modifiedCollectore.length>0&&d.modifiedCollectore[0].add(this),Object.prototype.hasOwnProperty.call(this._value_,"__value")){const t=this._value_.__value;return null!=t?t:null}return this._value_}get $tag(){this._instanceCounter_||(t.instancesCounter++,this._instanceCounter_=t.instancesCounter),t.instances.set(this._instanceCounter_,this);return'<reactive-publisher-proxy publisher="'+this._instanceCounter_+'"></reactive-publisher-proxy>'}};l.instances=new Map,l.instancesCounter=0;let c=l;const h=class t{constructor(){if(this.enabledLocaStorageProxies=[],this.publishers=new Map,this.localStorageData={},this.isLocalStrorageReady=null,this.initialisedData=[],null!=t.instance)throw"Singleton / use getInstance";t.instance=this,this.isLocalStrorageReady=this.cleanStorageData()}async cleanStorageData(){return new Promise((t=>{(async()=>{try{let s=localStorage.getItem("publisher-proxies-data"),i=null;if(s&&(i=await this.decompress(s,"gzip")),i)try{this.localStorageData=JSON.parse(i)}catch(e){this.localStorageData={}}else s=await this.compress("{}","gzip"),localStorage.setItem("publisher-proxies-data",s),this.localStorageData={};const r=(new Date).getTime()-432e5;for(const t in this.localStorageData){this.localStorageData[t].lastModifiationMS<r&&delete this.localStorageData[t]}t(!0)}catch(e){window.requestAnimationFrame((()=>{t(!1)})),console.log("no publisher cache in this browser")}})()}))}static getInstance(){return null==t.instance?new t:t.instance}static get(e,s){return t.getInstance().get(e,s)}static collectModifiedPublisher(){t.modifiedCollectore.unshift(new Set)}static getModifiedPublishers(){return t.modifiedCollectore.shift()}static delete(e){return t.getInstance().delete(e)}async setLocalData(t,e){var s;await this.isLocalStrorageReady,t.set((null==(s=this.localStorageData[e+"¤page:>"+document.location.pathname])?void 0:s.data)||t.get())}get(t,e){const s="enabled"===(null==e?void 0:e.localStorageMode);if(!this.publishers.has(t)){const e=new p({});this.set(t,e)}const i=this.publishers.get(t);return s&&-1===this.initialisedData.indexOf(t)&&(i._is_savable_=!0,this.initialisedData.push(t),this.setLocalData(i,t)),this.publishers.get(t)}set(t,e){this.publishers.set(t,e)}delete(t){return!!this.publishers.has(t)&&(this.publishers.delete(t),!0)}async saveToLocalStorage(e=0){if(e===t.saveId||e%10==0)try{if(!t.changed||t.saving)return;t.saving=!0,t.changed=!1;const e=Array.from(this.publishers.keys());let s=!1;for(const t of e){const e=this.publishers.get(t);if(!(null==e?void 0:e._is_savable_))continue;const i=null==e?void 0:e.get();i&&(this.localStorageData[t+"¤page:>"+document.location.pathname]={lastModifiationMS:(new Date).getTime(),data:i},s=!0)}if(s){const t=await this.compress(JSON.stringify(this.localStorageData),"gzip");localStorage.setItem("publisher-proxies-data",t)}if(t.saving=!1,t.changed){t.saveId++;const e=t.saveId;setTimeout((()=>this.saveToLocalStorage(e)),1e3)}}catch(s){t.saving=!1}}async compress(t,e){const s=(new TextEncoder).encode(t),i=new window.CompressionStream(e),r=i.writable.getWriter();r.write(s),r.close();const o=await new Response(i.readable).arrayBuffer(),n=new Uint8Array(o);let a="";for(let l=0;l<n.length;l++)a+=String.fromCharCode(n[l]);return btoa(a)}async decompress(t,e){const s=atob(t),i=Uint8Array.from(s,(t=>t.charCodeAt(0))).buffer,r=new window.DecompressionStream(e),o=r.writable.getWriter();o.write(i),o.close();const n=await new Response(r.readable).arrayBuffer();return(new TextDecoder).decode(n)}};h.changed=!1,h.saving=!1,h.saveId=0,h.instance=null,h.modifiedCollectore=[];let d=h;class p extends c{constructor(t,e=null){super(t,e);const s=new Proxy(this,{get:function(t,e){if(e==Symbol.toPrimitive)return()=>s.get();if(["invalidate","onInvalidate","offInvalidate","onAssign","offAssign","startDynamicFilling","stopDynamicFilling","startTemplateFilling","stopTemplateFilling","onInternalMutation","offInternalMutation","set","get","$tag","_templateFillListeners_","_fillListeners_","_assignListeners_","_invalidateListeners_","_publishInternalMutation_","hasListener","delete","_mutationListeners_","_publishDynamicFilling_","_publishInvalidation_","_publishTemplateFilling_","_publishAssignement_","_proxies_","parent","_value_","_is_savable_","_lockInternalMutationPublishing_","_instanceCounter_"].includes(e))return t[e];if(!t._proxies_.has(e)){const i=t._value_[e],r=new p(a(i)?i:{__value:i},t);r._proxies_.set("_parent_",s),t._proxies_.set(e,r)}return t._proxies_.get(e)},set:function(t,e,i){var r;if("_value_"==e)return t._value_=i,!0;if("_is_savable_"==e)return t._is_savable_=i,!0;if("_instanceCounter_"==e)return t._instanceCounter_=i,!0;if(!t._proxies_.has(e)){const i=new p({},t);i._proxies_.set("_parent_",s),t._proxies_.set(e,i)}return t._value_[e]!==i&&(t._value_[e]=i,t._publishDynamicFilling_(e,i),null==(r=t._proxies_.get(e))||r.set(a(i)?i:{__value:i})),!0},deleteProperty:function(t,e){return t._publishDynamicFilling_(e,null),t._proxies_.delete(e),delete t._value_[e]},has:function(t,e){return e in t._value_&&"_lockInternalMutationPublishing_"!=e},defineProperty:function(t,e,s){return s&&"value"in s&&(t._value_[e]=s.value),!0},getOwnPropertyDescriptor:function(t,e){return{enumerable:!0,configurable:!0}},ownKeys:function(t){return t._value_.__value?Object.keys(t._value_.__value):Object.keys(t._value_)}});return s}toString(){return"hey"}valueOf(){return 2}getProperty(t,e){return t[e]}}"undefined"!=typeof module&&(module.exports={Publisher:p,PublisherManager:d});class u extends HTMLElement{constructor(){super(),this.publisherId="",this.onAssign=t=>{this.innerHTML=t.toString()}}connectedCallback(){var t;this.publisherId=this.getAttribute("publisher")||"",this.publisher=c.instances.get(parseInt(this.publisherId)),null==(t=this.publisher)||t.onAssign(this.onAssign)}disconnectedCallback(){var t;null==(t=this.publisher)||t.offAssign(this.onAssign)}}customElements.define("reactive-publisher-proxy",u);const g=class t{static disable(){this.enabled&&(this.enabled=!1,Array.from(t.observedElements.keys()).forEach((e=>t.unObserve(e))))}static observe(e){if(!e)return;if(!t.enabled)return;if(t.observedElements.has(e))return;const s=new MutationObserver(t.onMutation),i={childList:!0,subtree:!0,attributes:!0,attributeFilter:["data-bind"]};s.observe(e,i),e.querySelectorAll("[data-bind]").forEach((e=>t.addPublisherListeners(e))),t.observedElements.set(e,s)}static unObserve(e){if(!e)return;const s=this.observedElements.get(e);s&&(s.disconnect(),e.querySelectorAll("[data-bind]").forEach((e=>t.removePublisherListeners(e))))}static onAdded(e){e.hasAttribute&&e.hasAttribute("data-bind")&&t.addPublisherListeners(e),e.querySelectorAll?e.querySelectorAll("[data-bind]").forEach((e=>t.addPublisherListeners(e))):e.childNodes.forEach((e=>t.onAdded(e)))}static onRemoved(e){e.hasAttribute&&e.hasAttribute("data-bind")&&t.removePublisherListeners(e),e.querySelectorAll?e.querySelectorAll("[data-bind]").forEach((e=>t.removePublisherListeners(e))):e.childNodes.forEach((e=>t.onRemoved(e)))}static onMutation(e){for(const s of e)switch(s.type){case"attributes":t.addPublisherListeners(s.target);break;case"childList":s.addedNodes.forEach((e=>{t.onAdded(e)})),s.removedNodes.forEach((e=>{t.onRemoved(e)}))}}static removePublisherListeners(e){const s=t.publisherListeners.get(e);s&&(t.publisherListeners.delete(e),s.forEach((t=>{var e;null==(e=t.publisher)||e.offAssign(t.onAssign)})))}static getVariablesDescriptor(t){let e=t.match(/(\$(?:\w+\\?\.?)+)/g);return e=e?e.map((t=>t.replace("$",""))):[t],e=e.filter((t=>t.length>0)),{expression:t.replace("\\",""),variables:e.map((t=>t.split(/\b\.\b/).map((t=>t.replace("\\","")))))}}static getDataBindItems(e){return"attributes"in e?Array.from(e.attributes).filter((t=>0==t.name.indexOf("::"))).map((e=>({propertyToUpdate:e.name.substring(2).replace(/-((html)|\w)/g,(t=>t.substring(1).toUpperCase())),bindedVariablesDescriptor:t.getVariablesDescriptor(e.value)}))):[]}static getSubPublisher(t,e){if(!e)return t;for(const s of e)if("_self_"!=s){if(!t)return null;t=t[s]}return t}static addPublisherListeners(e){t.removePublisherListeners(e);const i=s.getAncestorAttributeValue(e.parentNode||e.host||e,"dataProvider");if(!i)return;const r=d.getInstance().get(i),o=t.getDataBindItems(e),a=[];o.forEach((s=>{const i=s.bindedVariablesDescriptor,o=s.propertyToUpdate;for(const l of i.variables){const s=l;let c=r;c=t.getSubPublisher(r,s);const h=e,d={publisher:c,onAssign:()=>{const e=i.variables.map((e=>{var s;return null==(s=t.getSubPublisher(r,e))?void 0:s.get()}));let s=i.expression,a=!1;if(1==e.length&&i.variables[0].join(".")==s.substring(1)){let t=e[0];return null===t&&(t=""),void(h[o]=t)}for(let t=0;t<e.length;t++){let r=e[t];const o=i.variables[t];null===r&&(a=!0,r=void 0),s=s.replace("$"+o.join("."),r)}if(-1!=s.indexOf("|")){const t=s.indexOf("|");if(0==t)s=n.js(s.substring(1));else{const e=s.substring(0,t),i=s.substring(t+1),r=n[e];s=a?"":r?r(i):s}}else s=a?"":s;h[o]=s}};null==c||c.onAssign(d.onAssign),a.push(d)}})),t.publisherListeners.set(e,a)}};g.observedElements=new Map,g.enabled=!0,g.publisherListeners=new Map;let b=g;b.observe(document.documentElement),window.SonicDataBindObserver||(window.SonicDataBindObserver=b)
2
2
  /**
3
3
  * @license
4
4
  * Copyright 2017 Google LLC
5
5
  * SPDX-License-Identifier: BSD-3-Clause
6
- */;const m=t=>e=>{return"function"==typeof e?(s=t,i=e,customElements.define(s,i),i):((t,e)=>{const{kind:s,elements:i}=e;return{kind:s,elements:i,finisher(e){customElements.define(t,e)}}})(t,e);
6
+ */;const m=t=>(e,s)=>{void 0!==s?s.addInitializer((()=>{customElements.define(t,e)})):customElements.define(t,e)}
7
7
  /**
8
8
  * @license
9
- * Copyright 2017 Google LLC
9
+ * Copyright 2019 Google LLC
10
10
  * SPDX-License-Identifier: BSD-3-Clause
11
- */var s,i},b=(t,e)=>"method"===e.kind&&e.descriptor&&!("value"in e.descriptor)?{...e,finisher(s){s.createProperty(e.key,t)}}:{kind:"field",key:Symbol(),placement:"own",descriptor:{},originalKey:e.key,initializer(){"function"==typeof e.initializer&&(this[e.key]=e.initializer.call(this))},finisher(s){s.createProperty(e.key,t)}};function f(t){return(e,s)=>{return void 0!==s?(i=t,r=s,void e.constructor.createProperty(r,i)):b(t,e);var i,r}}
11
+ */,f=globalThis,v=f.ShadowRoot&&(void 0===f.ShadyCSS||f.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,y=Symbol(),w=new WeakMap;let x=class{constructor(t,e,s){if(this._$cssResult$=!0,s!==y)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=t,this.t=e}get styleSheet(){let t=this.o;const e=this.t;if(v&&void 0===t){const s=void 0!==e&&1===e.length;s&&(t=w.get(e)),void 0===t&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),s&&w.set(e,t))}return t}toString(){return this.cssText}};const _=(t,...e)=>{const s=1===t.length?t[0]:e.reduce(((e,s,i)=>e+(t=>{if(!0===t._$cssResult$)return t.cssText;if("number"==typeof t)return t;throw Error("Value passed to 'css' function must be a 'css' function result: "+t+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(s)+t[i+1]),t[0]);return new x(s,t,y)},k=v?t=>t:t=>t instanceof CSSStyleSheet?(t=>{let e="";for(const s of t.cssRules)e+=s.cssText;return(t=>new x("string"==typeof t?t:t+"",void 0,y))(e)})(t):t
12
12
  /**
13
13
  * @license
14
14
  * Copyright 2017 Google LLC
15
15
  * SPDX-License-Identifier: BSD-3-Clause
16
- */function v(t){return f({...t,state:!0})}
16
+ */,{is:A,defineProperty:P,getOwnPropertyDescriptor:C,getOwnPropertyNames:S,getOwnPropertySymbols:$,getPrototypeOf:O}=Object,D=globalThis,L=D.trustedTypes,E=L?L.emptyScript:"",j=D.reactiveElementPolyfillSupport,M=(t,e)=>t,N={toAttribute(t,e){switch(e){case Boolean:t=t?E:null;break;case Object:case Array:t=null==t?t:JSON.stringify(t)}return t},fromAttribute(t,e){let s=t;switch(e){case Boolean:s=null!==t;break;case Number:s=null===t?null:Number(t);break;case Object:case Array:try{s=JSON.parse(t)}catch(i){s=null}}return s}},z=(t,e)=>!A(t,e),I={attribute:!0,type:String,converter:N,reflect:!1,hasChanged:z};Symbol.metadata??(Symbol.metadata=Symbol("metadata")),D.litPropertyMetadata??(D.litPropertyMetadata=new WeakMap);let T=class extends HTMLElement{static addInitializer(t){this._$Ei(),(this.l??(this.l=[])).push(t)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(t,e=I){if(e.state&&(e.attribute=!1),this._$Ei(),this.elementProperties.set(t,e),!e.noAccessor){const s=Symbol(),i=this.getPropertyDescriptor(t,s,e);void 0!==i&&P(this.prototype,t,i)}}static getPropertyDescriptor(t,e,s){const{get:i,set:r}=C(this.prototype,t)??{get(){return this[e]},set(t){this[e]=t}};return{get(){return null==i?void 0:i.call(this)},set(e){const o=null==i?void 0:i.call(this);r.call(this,e),this.requestUpdate(t,o,s)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){return this.elementProperties.get(t)??I}static _$Ei(){if(this.hasOwnProperty(M("elementProperties")))return;const t=O(this);t.finalize(),void 0!==t.l&&(this.l=[...t.l]),this.elementProperties=new Map(t.elementProperties)}static finalize(){if(this.hasOwnProperty(M("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(M("properties"))){const t=this.properties,e=[...S(t),...$(t)];for(const s of e)this.createProperty(s,t[s])}const t=this[Symbol.metadata];if(null!==t){const e=litPropertyMetadata.get(t);if(void 0!==e)for(const[t,s]of e)this.elementProperties.set(t,s)}this._$Eh=new Map;for(const[e,s]of this.elementProperties){const t=this._$Eu(e,s);void 0!==t&&this._$Eh.set(t,e)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(t){const e=[];if(Array.isArray(t)){const s=new Set(t.flat(1/0).reverse());for(const t of s)e.unshift(k(t))}else void 0!==t&&e.push(k(t));return e}static _$Eu(t,e){const s=e.attribute;return!1===s?void 0:"string"==typeof s?s:"string"==typeof t?t.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Em=null,this._$Ev()}_$Ev(){var t;this._$Eg=new Promise((t=>this.enableUpdating=t)),this._$AL=new Map,this._$E_(),this.requestUpdate(),null==(t=this.constructor.l)||t.forEach((t=>t(this)))}addController(t){var e;(this._$ES??(this._$ES=[])).push(t),void 0!==this.renderRoot&&this.isConnected&&(null==(e=t.hostConnected)||e.call(t))}removeController(t){var e;null==(e=this._$ES)||e.splice(this._$ES.indexOf(t)>>>0,1)}_$E_(){const t=new Map,e=this.constructor.elementProperties;for(const s of e.keys())this.hasOwnProperty(s)&&(t.set(s,this[s]),delete this[s]);t.size>0&&(this._$Ep=t)}createRenderRoot(){const t=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return((t,e)=>{if(v)t.adoptedStyleSheets=e.map((t=>t instanceof CSSStyleSheet?t:t.styleSheet));else for(const s of e){const e=document.createElement("style"),i=f.litNonce;void 0!==i&&e.setAttribute("nonce",i),e.textContent=s.cssText,t.appendChild(e)}})(t,this.constructor.elementStyles),t}connectedCallback(){var t;this.renderRoot??(this.renderRoot=this.createRenderRoot()),this.enableUpdating(!0),null==(t=this._$ES)||t.forEach((t=>{var e;return null==(e=t.hostConnected)?void 0:e.call(t)}))}enableUpdating(t){}disconnectedCallback(){var t;null==(t=this._$ES)||t.forEach((t=>{var e;return null==(e=t.hostDisconnected)?void 0:e.call(t)}))}attributeChangedCallback(t,e,s){this._$AK(t,s)}_$EO(t,e){var s;const i=this.constructor.elementProperties.get(t),r=this.constructor._$Eu(t,i);if(void 0!==r&&!0===i.reflect){const o=(void 0!==(null==(s=i.converter)?void 0:s.toAttribute)?i.converter:N).toAttribute(e,i.type);this._$Em=t,null==o?this.removeAttribute(r):this.setAttribute(r,o),this._$Em=null}}_$AK(t,e){var s;const i=this.constructor,r=i._$Eh.get(t);if(void 0!==r&&this._$Em!==r){const t=i.getPropertyOptions(r),o="function"==typeof t.converter?{fromAttribute:t.converter}:void 0!==(null==(s=t.converter)?void 0:s.fromAttribute)?t.converter:N;this._$Em=r,this[r]=o.fromAttribute(e,t.type),this._$Em=null}}requestUpdate(t,e,s,i=!1,r){if(void 0!==t){if(s??(s=this.constructor.getPropertyOptions(t)),!(s.hasChanged??z)(i?r:this[t],e))return;this.C(t,e,s)}!1===this.isUpdatePending&&(this._$Eg=this._$EP())}C(t,e,s){this._$AL.has(t)||this._$AL.set(t,e),!0===s.reflect&&this._$Em!==t&&(this._$Ej??(this._$Ej=new Set)).add(t)}async _$EP(){this.isUpdatePending=!0;try{await this._$Eg}catch(e){Promise.reject(e)}const t=this.scheduleUpdate();return null!=t&&await t,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){var t;if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this._$Ep){for(const[t,e]of this._$Ep)this[t]=e;this._$Ep=void 0}const t=this.constructor.elementProperties;if(t.size>0)for(const[e,s]of t)!0!==s.wrapped||this._$AL.has(e)||void 0===this[e]||this.C(e,this[e],s)}let e=!1;const s=this._$AL;try{e=this.shouldUpdate(s),e?(this.willUpdate(s),null==(t=this._$ES)||t.forEach((t=>{var e;return null==(e=t.hostUpdate)?void 0:e.call(t)})),this.update(s)):this._$ET()}catch(i){throw e=!1,this._$ET(),i}e&&this._$AE(s)}willUpdate(t){}_$AE(t){var e;null==(e=this._$ES)||e.forEach((t=>{var e;return null==(e=t.hostUpdated)?void 0:e.call(t)})),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(t)),this.updated(t)}_$ET(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$Eg}shouldUpdate(t){return!0}update(t){this._$Ej&&(this._$Ej=this._$Ej.forEach((t=>this._$EO(t,this[t])))),this._$ET()}updated(t){}firstUpdated(t){}};T.elementStyles=[],T.shadowRootOptions={mode:"open"},T[M("elementProperties")]=new Map,T[M("finalized")]=new Map,null==j||j({ReactiveElement:T}),(D.reactiveElementVersions??(D.reactiveElementVersions=[])).push("2.0.0");
17
17
  /**
18
18
  * @license
19
19
  * Copyright 2017 Google LLC
20
20
  * SPDX-License-Identifier: BSD-3-Clause
21
- */const y=({finisher:t,descriptor:e})=>(s,i)=>{var r;if(void 0===i){const i=null!==(r=s.originalKey)&&void 0!==r?r:s.key,o=null!=e?{kind:"method",placement:"prototype",key:i,descriptor:e(s.key)}:{...s,key:i};return null!=t&&(o.finisher=function(e){t(e,i)}),o}{const r=s.constructor;void 0!==e&&Object.defineProperty(s,i,e(i)),null==t||t(r,i)}}
21
+ */
22
+ const F={attribute:!0,type:String,converter:N,reflect:!1,hasChanged:z},R=(t=F,e,s)=>{const{kind:i,metadata:r}=s;let o=globalThis.litPropertyMetadata.get(r);if(void 0===o&&globalThis.litPropertyMetadata.set(r,o=new Map),o.set(s.name,t),"accessor"===i){const{name:i}=s;return{set(s){const r=e.get.call(this);e.set.call(this,s),this.requestUpdate(i,r,t)},init(e){return void 0!==e&&this.C(i,void 0,t),e}}}if("setter"===i){const{name:i}=s;return function(s){const r=this[i];e.call(this,s),this.requestUpdate(i,r,t)}}throw Error("Unsupported decorator location: "+i)};function U(t){return(e,s)=>"object"==typeof s?R(t,e,s):((t,e,s)=>{const i=e.hasOwnProperty(s);return e.constructor.createProperty(s,i?{...t,wrapped:!0}:t),i?Object.getOwnPropertyDescriptor(e,s):void 0})(t,e,s)}
22
23
  /**
23
24
  * @license
24
25
  * Copyright 2017 Google LLC
25
26
  * SPDX-License-Identifier: BSD-3-Clause
26
- */;function w(t,e){return y({descriptor:s=>{const i={get(){var e,s;return null!==(s=null===(e=this.renderRoot)||void 0===e?void 0:e.querySelector(t))&&void 0!==s?s:null},enumerable:!0,configurable:!0};if(e){const e="symbol"==typeof s?Symbol():"__"+s;i.get=function(){var s,i;return void 0===this[e]&&(this[e]=null!==(i=null===(s=this.renderRoot)||void 0===s?void 0:s.querySelector(t))&&void 0!==i?i:null),this[e]}}return i}})}
27
- /**
28
- * @license
29
- * Copyright 2021 Google LLC
30
- * SPDX-License-Identifier: BSD-3-Clause
31
- */var x;const _=null!=(null===(x=window.HTMLSlotElement)||void 0===x?void 0:x.prototype.assignedElements)?(t,e)=>t.assignedElements(e):(t,e)=>t.assignedNodes(e).filter((t=>t.nodeType===Node.ELEMENT_NODE));function k(t){const{slot:e,selector:s}=null!=t?t:{};return y({descriptor:i=>({get(){var i;const r="slot"+(e?`[name=${e}]`:":not([name])"),o=null===(i=this.renderRoot)||void 0===i?void 0:i.querySelector(r),n=null!=o?_(o,t):[];return s?n.filter((t=>t.matches(s))):n},enumerable:!0,configurable:!0})})}
27
+ */function V(t){return U({...t,state:!0,attribute:!1})}
32
28
  /**
33
29
  * @license
34
30
  * Copyright 2017 Google LLC
35
31
  * SPDX-License-Identifier: BSD-3-Clause
36
- */function A(t,e,s){let i,r=t;return"object"==typeof t?(r=t.slot,i=t):i={flatten:e},s?k({slot:r,flatten:e,selector:s}):y({descriptor:t=>({get(){var t,e;const s="slot"+(r?`[name=${r}]`:":not([name])"),o=null===(t=this.renderRoot)||void 0===t?void 0:t.querySelector(s);return null!==(e=null==o?void 0:o.assignedNodes(i))&&void 0!==e?e:[]},enumerable:!0,configurable:!0})})}var P=Object.defineProperty,C=Object.getOwnPropertyDescriptor,S=(t,e,s,i)=>{for(var r,o=i>1?void 0:i?C(e,s):e,n=t.length-1;n>=0;n--)(r=t[n])&&(o=(i?r(e,s,o):r(o))||o);return i&&o&&P(e,s,o),o};let $=!1,O=new Set;const D=(t,i)=>{const o=class extends t{constructor(...t){super(),this.collectDependenciesVersion=0,this.displayContents=!1,this.noAutoFill=!1,this.forceAutoFill=!1,this.renderOnPropsInternalChange=!1,this.noShadowDom=null,this.propertyMap=null,this.title="",this.dataProvider=null,this.bindPublisher=null,this._props=null,this.defferedDebug=null,this.debug=null,this.onAssign=t=>{this.props=t}}onConnected(t){this.connectedCallbackCalls||(this.connectedCallbackCalls=new Set),this.connectedCallbackCalls.add(t)}onDisconnected(t){this.disconnectedCallbackCalls||(this.disconnectedCallbackCalls=new Set),this.disconnectedCallbackCalls.add(t)}offConnected(t){this.connectedCallbackCalls||(this.connectedCallbackCalls=new Set),this.connectedCallbackCalls.delete(t)}offDisconnected(t){this.disconnectedCallbackCalls||(this.disconnectedCallbackCalls=new Set),this.disconnectedCallbackCalls.delete(t)}hasAncestorAttribute(t){return null!=this.getAncestorAttributeValue(t)}getAncestorAttributeValue(t){return e.getAncestorAttributeValue(this,t)}get props(){return null===this._props&&this.publisher?this.publisher.get():this._props}set props(t){"string"==typeof t&&["{","["].includes(t.trim().charAt(0))&&(t=JSON.parse(t)),t!=this._props&&(this._props=t,this.publisher&&this.publisher.get()!=t&&this.publisher.set(t),this.requestUpdate())}updated(t){super.updated(t);const e=[...(this.shadowRoot||this).children].filter((t=>"STYLE"!=t.tagName)),s=this.displayContents?"contents":0==e.length?"none":null;s?this.style.display=s:this.style.removeProperty("display")}connectedCallback(){var t;if(o.instanceCounter++,this.hasAttribute("lazyRendering")){const t={root:null,rootMargin:Math.max(window.innerWidth,window.innerHeight)+"px"};let e=!0;const s=new IntersectionObserver((t=>{for(const i of t)if(e&&i.isIntersecting){this.addDebugger(),e=!1,this.initWording(),this.initPublisher(),s.disconnect();break}}),t);s.observe(this)}else this.initWording(),this.initPublisher(),this.addDebugger();super.connectedCallback(),null==(t=this.connectedCallbackCalls)||t.forEach((t=>t(this)))}disconnectedCallback(){var t,e;null==(t=this.disconnectedCallbackCalls)||t.forEach((t=>t(this))),this.removeDebugger(),super.disconnectedCallback(),this.publisher&&(this.publisher.stopTemplateFilling(this),this.publisher.offInternalMutation(this.requestUpdate)),this.wordingPublisher&&this.wordingPublisher.stopTemplateFilling(this),this.onAssign&&(null==(e=this.publisher)||e.offAssign(this.onAssign))}addDebugger(){var t;if(this.hasAttribute("debug")&&!this.defferedDebug){if(!this.debug){this.debug=document.createElement("div");const t=this.debug.style;t.position="fixed",t.top="0",t.right="0",t.margin="auto",t.borderRadius=".7rem",t.backgroundColor="#0f1729",t.color="#c5d4f9",t.padding="16px 16px",t.margin="16px 16px",t.boxShadow="0 10px 30px -18px rgba(0,0,0,.3)",t.overflowY="auto",t.zIndex="99999999",t.maxHeight="calc(100vh - 32px)",t.fontFamily="Consolas, monospace",t.maxWidth="min(50vw,25rem)",t.fontSize="12px",t.minWidth="300px",t.overflowWrap="break-word",t.resize="vertical"}this.addEventListener("click",(t=>{t.ctrlKey&&(t.preventDefault(),$=!$)})),this.dataProvider&&(window[this.dataProvider]=this.publisher),this.addEventListener("mouseover",(()=>{$||this.removeDebugger(),document.body.appendChild(this.debug),O.add(this.debug)})),this.addEventListener("mouseout",(()=>{$||this.removeDebugger()})),null==(t=this.publisher)||t.onInternalMutation((()=>{var t;this.debug.innerHTML=`🤖 DataProvider : "<b style="font-weight:700;color:#fff">${this.dataProvider}</b>"<br><div style="font-size:10px;border-top:1px dashed;margin-top:5px;padding-left:23px;opacity:.6;padding-top:5px">Variable disponible dans la console<br>ctrl + Clique : épingler / désépingler</div><pre style="margin-top:10px;background:0 0;padding:0;font-size:inherit;color:inherit">${JSON.stringify(null==(t=this.publisher)?void 0:t.get(),null," ")}</pre>`}))}}removeDebugger(){O.forEach((t=>{document.body.contains(t)&&document.body.removeChild(t)})),O=new Set}getApiConfiguration(){const t=this.getAncestorAttributeValue("token"),e=null!=this.getAncestorAttributeValue("addHTTPResponse"),s=this.getAncestorAttributeValue("serviceURL");let i=null,r=null;const o=this.getAncestorAttributeValue("tokenProvider"),n=this.getAncestorAttributeValue("eventsApiToken");t||(i=this.getAncestorAttributeValue("userName"),r=this.getAncestorAttributeValue("password"));return{serviceURL:s,token:t,userName:i,password:r,authToken:n,tokenProvider:o,addHTTPResponse:e,credentials:this.getAncestorAttributeValue("credentials")||void 0,cache:this.getAttribute("cache")||void 0}}async initWording(){let t=!1;const e=Object.getOwnPropertyNames(this.constructor.prototype);for(const r of e)if(0==r.indexOf("wording_")){t=!0;break}if(!t)return;const s=h.get("sonic-wording",{localStorageMode:"enabled"});await h.getInstance().isLocalStrorageReady;const i=this.getAncestorAttributeValue("wordingProvider"),o=new r(this.getApiConfiguration());if(i){const t=[],r=s.get();for(const i of e)if(0==i.indexOf("wording_")){const e=i.substring(8);r[i]||(s[i]="...",t.push(e))}if(t.length>0){const e=i+"?labels[]="+t.join("&labels[]="),r=await o.get(e);for(const t in r)s["wording_"+t]=r[t]}s.startTemplateFilling(this),this.wordingPublisher=s}}createRenderRoot(){if(""===this.noShadowDom||""===this.getAttribute("noShadowDom"))return this;const t=super.createRenderRoot();return g.observe(t),t}initPublisher(){if(!document)return;this.publisher&&(this.publisher.stopTemplateFilling(this),this.publisher.offInternalMutation(this.requestUpdate),this.onAssign&&this.publisher.offAssign(this.onAssign));const t=h.getInstance();this.dataProvider||(this.dataProvider=this.getAncestorAttributeValue("dataProvider"));let e=this.dataProvider;if(!e&&this._props&&(this.dataProvider=e="__subscriber__"+o.instanceCounter),e){this.bindPublisher&&t.set(e,this.bindPublisher());let i=t.get(e,{localStorageMode:this.getAttribute("localStorage")||"disabled"});if(this.dataProvider=e,this.hasAttribute("subDataProvider")){const r=this.getAttribute("subDataProvider");this.dataProvider=e+"/"+r,i=s.traverse(i,r.split(".")),t.set(this.dataProvider,i),this.publisher=i}this.publisher=i}this.publisher&&(this._props&&this.publisher.set(this._props),this.noAutoFill||this.publisher.startTemplateFilling(this),this.renderOnPropsInternalChange&&this.publisher.onInternalMutation(this.requestUpdate),this.publisher.onAssign(this.onAssign))}};let n=o;return n.instanceCounter=0,S([f({type:Number})],n.prototype,"collectDependenciesVersion",2),S([f({type:Boolean})],n.prototype,"displayContents",2),S([f({type:Boolean})],n.prototype,"noAutoFill",2),S([f({type:Boolean})],n.prototype,"forceAutoFill",2),S([f({type:Object})],n.prototype,"propertyMap",2),S([f({type:String,attribute:"data-title"})],n.prototype,"title",2),S([f({reflect:!0})],n.prototype,"dataProvider",2),S([f()],n.prototype,"bindPublisher",2),S([f()],n.prototype,"props",1),n};window.SonicPublisherManager||(window.SonicPublisherManager=h);var L=Object.defineProperty,E=Object.getOwnPropertyDescriptor;const j=t=>{class e extends t{constructor(){super(...arguments),this.templates=null,this.templateValueAttribute="data-value",this.templateList=[],this.templateParts={},this.templatePartsList=[]}connectedCallback(){const t=this.templates||[...this.querySelectorAll("template")];for(const e of t)e.hasAttribute(this.templateValueAttribute)&&(this.templateParts[e.getAttribute(this.templateValueAttribute)]=e,this.templatePartsList.push(e));this.templateList=t.filter((t=>!t.getAttribute("data-value"))),0==this.templateList.length&&(this.templateList=t),super.connectedCallback()}}return((t,e,s,i)=>{for(var r,o=i>1?void 0:i?E(e,s):e,n=t.length-1;n>=0;n--)(r=t[n])&&(o=(i?r(e,s,o):r(o))||o);i&&o&&L(e,s,o)})([f({type:Array})],e.prototype,"templates",2),e},M=window,N=M.ShadowRoot&&(void 0===M.ShadyCSS||M.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,z=Symbol(),I=new WeakMap;
32
+ */const B=(t,e,s)=>(s.configurable=!0,s.enumerable=!0,Reflect.decorate&&"object"!=typeof e&&Object.defineProperty(t,e,s),s)
37
33
  /**
38
34
  * @license
39
- * Copyright 2019 Google LLC
35
+ * Copyright 2017 Google LLC
40
36
  * SPDX-License-Identifier: BSD-3-Clause
41
- */class F{constructor(t,e,s){if(this._$cssResult$=!0,s!==z)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=t,this.t=e}get styleSheet(){let t=this.o;const e=this.t;if(N&&void 0===t){const s=void 0!==e&&1===e.length;s&&(t=I.get(e)),void 0===t&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),s&&I.set(e,t))}return t}toString(){return this.cssText}}const T=(t,...e)=>{const s=1===t.length?t[0]:e.reduce(((e,s,i)=>e+(t=>{if(!0===t._$cssResult$)return t.cssText;if("number"==typeof t)return t;throw Error("Value passed to 'css' function must be a 'css' function result: "+t+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(s)+t[i+1]),t[0]);return new F(s,t,z)},R=N?t=>t:t=>t instanceof CSSStyleSheet?(t=>{let e="";for(const s of t.cssRules)e+=s.cssText;return(t=>new F("string"==typeof t?t:t+"",void 0,z))(e)})(t):t
37
+ */;function q(t,e){return(s,i,r)=>{const o=e=>{var s;return(null==(s=e.renderRoot)?void 0:s.querySelector(t))??null};if(e){const{get:t,set:n}="object"==typeof i?s:r??(()=>{const t=Symbol();return{get(){return this[t]},set(e){this[t]=e}}})();return B(s,i,{get(){if(e){let e=t.call(this);return void 0===e&&(e=o(this),n.call(this,e)),e}return o(this)}})}return B(s,i,{get(){return o(this)}})}}
42
38
  /**
43
39
  * @license
44
- * Copyright 2017 Google LLC
40
+ * Copyright 2021 Google LLC
45
41
  * SPDX-License-Identifier: BSD-3-Clause
46
- */;var V;const U=window,q=U.trustedTypes,B=q?q.emptyScript:"",H=U.reactiveElementPolyfillSupport,W={toAttribute(t,e){switch(e){case Boolean:t=t?B:null;break;case Object:case Array:t=null==t?t:JSON.stringify(t)}return t},fromAttribute(t,e){let s=t;switch(e){case Boolean:s=null!==t;break;case Number:s=null===t?null:Number(t);break;case Object:case Array:try{s=JSON.parse(t)}catch(i){s=null}}return s}},K=(t,e)=>e!==t&&(e==e||t==t),Z={attribute:!0,type:String,converter:W,reflect:!1,hasChanged:K};class Q extends HTMLElement{constructor(){super(),this._$Ei=new Map,this.isUpdatePending=!1,this.hasUpdated=!1,this._$El=null,this.u()}static addInitializer(t){var e;this.finalize(),(null!==(e=this.h)&&void 0!==e?e:this.h=[]).push(t)}static get observedAttributes(){this.finalize();const t=[];return this.elementProperties.forEach(((e,s)=>{const i=this._$Ep(s,e);void 0!==i&&(this._$Ev.set(i,s),t.push(i))})),t}static createProperty(t,e=Z){if(e.state&&(e.attribute=!1),this.finalize(),this.elementProperties.set(t,e),!e.noAccessor&&!this.prototype.hasOwnProperty(t)){const s="symbol"==typeof t?Symbol():"__"+t,i=this.getPropertyDescriptor(t,s,e);void 0!==i&&Object.defineProperty(this.prototype,t,i)}}static getPropertyDescriptor(t,e,s){return{get(){return this[e]},set(i){const r=this[t];this[e]=i,this.requestUpdate(t,r,s)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){return this.elementProperties.get(t)||Z}static finalize(){if(this.hasOwnProperty("finalized"))return!1;this.finalized=!0;const t=Object.getPrototypeOf(this);if(t.finalize(),void 0!==t.h&&(this.h=[...t.h]),this.elementProperties=new Map(t.elementProperties),this._$Ev=new Map,this.hasOwnProperty("properties")){const t=this.properties,e=[...Object.getOwnPropertyNames(t),...Object.getOwnPropertySymbols(t)];for(const s of e)this.createProperty(s,t[s])}return this.elementStyles=this.finalizeStyles(this.styles),!0}static finalizeStyles(t){const e=[];if(Array.isArray(t)){const s=new Set(t.flat(1/0).reverse());for(const t of s)e.unshift(R(t))}else void 0!==t&&e.push(R(t));return e}static _$Ep(t,e){const s=e.attribute;return!1===s?void 0:"string"==typeof s?s:"string"==typeof t?t.toLowerCase():void 0}u(){var t;this._$E_=new Promise((t=>this.enableUpdating=t)),this._$AL=new Map,this._$Eg(),this.requestUpdate(),null===(t=this.constructor.h)||void 0===t||t.forEach((t=>t(this)))}addController(t){var e,s;(null!==(e=this._$ES)&&void 0!==e?e:this._$ES=[]).push(t),void 0!==this.renderRoot&&this.isConnected&&(null===(s=t.hostConnected)||void 0===s||s.call(t))}removeController(t){var e;null===(e=this._$ES)||void 0===e||e.splice(this._$ES.indexOf(t)>>>0,1)}_$Eg(){this.constructor.elementProperties.forEach(((t,e)=>{this.hasOwnProperty(e)&&(this._$Ei.set(e,this[e]),delete this[e])}))}createRenderRoot(){var t;const e=null!==(t=this.shadowRoot)&&void 0!==t?t:this.attachShadow(this.constructor.shadowRootOptions);return((t,e)=>{N?t.adoptedStyleSheets=e.map((t=>t instanceof CSSStyleSheet?t:t.styleSheet)):e.forEach((e=>{const s=document.createElement("style"),i=M.litNonce;void 0!==i&&s.setAttribute("nonce",i),s.textContent=e.cssText,t.appendChild(s)}))})(e,this.constructor.elementStyles),e}connectedCallback(){var t;void 0===this.renderRoot&&(this.renderRoot=this.createRenderRoot()),this.enableUpdating(!0),null===(t=this._$ES)||void 0===t||t.forEach((t=>{var e;return null===(e=t.hostConnected)||void 0===e?void 0:e.call(t)}))}enableUpdating(t){}disconnectedCallback(){var t;null===(t=this._$ES)||void 0===t||t.forEach((t=>{var e;return null===(e=t.hostDisconnected)||void 0===e?void 0:e.call(t)}))}attributeChangedCallback(t,e,s){this._$AK(t,s)}_$EO(t,e,s=Z){var i;const r=this.constructor._$Ep(t,s);if(void 0!==r&&!0===s.reflect){const o=(void 0!==(null===(i=s.converter)||void 0===i?void 0:i.toAttribute)?s.converter:W).toAttribute(e,s.type);this._$El=t,null==o?this.removeAttribute(r):this.setAttribute(r,o),this._$El=null}}_$AK(t,e){var s;const i=this.constructor,r=i._$Ev.get(t);if(void 0!==r&&this._$El!==r){const t=i.getPropertyOptions(r),o="function"==typeof t.converter?{fromAttribute:t.converter}:void 0!==(null===(s=t.converter)||void 0===s?void 0:s.fromAttribute)?t.converter:W;this._$El=r,this[r]=o.fromAttribute(e,t.type),this._$El=null}}requestUpdate(t,e,s){let i=!0;void 0!==t&&(((s=s||this.constructor.getPropertyOptions(t)).hasChanged||K)(this[t],e)?(this._$AL.has(t)||this._$AL.set(t,e),!0===s.reflect&&this._$El!==t&&(void 0===this._$EC&&(this._$EC=new Map),this._$EC.set(t,s))):i=!1),!this.isUpdatePending&&i&&(this._$E_=this._$Ej())}async _$Ej(){this.isUpdatePending=!0;try{await this._$E_}catch(e){Promise.reject(e)}const t=this.scheduleUpdate();return null!=t&&await t,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){var t;if(!this.isUpdatePending)return;this.hasUpdated,this._$Ei&&(this._$Ei.forEach(((t,e)=>this[e]=t)),this._$Ei=void 0);let e=!1;const s=this._$AL;try{e=this.shouldUpdate(s),e?(this.willUpdate(s),null===(t=this._$ES)||void 0===t||t.forEach((t=>{var e;return null===(e=t.hostUpdate)||void 0===e?void 0:e.call(t)})),this.update(s)):this._$Ek()}catch(i){throw e=!1,this._$Ek(),i}e&&this._$AE(s)}willUpdate(t){}_$AE(t){var e;null===(e=this._$ES)||void 0===e||e.forEach((t=>{var e;return null===(e=t.hostUpdated)||void 0===e?void 0:e.call(t)})),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(t)),this.updated(t)}_$Ek(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$E_}shouldUpdate(t){return!0}update(t){void 0!==this._$EC&&(this._$EC.forEach(((t,e)=>this._$EO(e,this[e],t))),this._$EC=void 0),this._$Ek()}updated(t){}firstUpdated(t){}}
42
+ */function H(t){return(e,s)=>{const{slot:i,selector:r}=t??{},o="slot"+(i?`[name=${i}]`:":not([name])");return B(e,s,{get(){var e;const s=null==(e=this.renderRoot)?void 0:e.querySelector(o),i=(null==s?void 0:s.assignedElements(t))??[];return void 0===r?i:i.filter((t=>t.matches(r)))}})}}var W=Object.defineProperty,K=Object.getOwnPropertyDescriptor,Z=(t,e,s,i)=>{for(var r,o=i>1?void 0:i?K(e,s):e,n=t.length-1;n>=0;n--)(r=t[n])&&(o=(i?r(e,s,o):r(o))||o);return i&&o&&W(e,s,o),o};let Y=!1,Q=new Set;const G=(t,e)=>{const r=class e extends t{constructor(...t){super(),this.collectDependenciesVersion=0,this.displayContents=!1,this.noAutoFill=!1,this.forceAutoFill=!1,this.renderOnPropsInternalChange=!1,this.noShadowDom=null,this.propertyMap=null,this.title="",this.dataProvider=null,this.bindPublisher=null,this._props=null,this.defferedDebug=null,this.debug=null,this.onAssign=t=>{this.props=t}}onConnected(t){this.connectedCallbackCalls||(this.connectedCallbackCalls=new Set),this.connectedCallbackCalls.add(t)}onDisconnected(t){this.disconnectedCallbackCalls||(this.disconnectedCallbackCalls=new Set),this.disconnectedCallbackCalls.add(t)}offConnected(t){this.connectedCallbackCalls||(this.connectedCallbackCalls=new Set),this.connectedCallbackCalls.delete(t)}offDisconnected(t){this.disconnectedCallbackCalls||(this.disconnectedCallbackCalls=new Set),this.disconnectedCallbackCalls.delete(t)}hasAncestorAttribute(t){return null!=this.getAncestorAttributeValue(t)}getAncestorAttributeValue(t){return s.getAncestorAttributeValue(this,t)}get props(){return null===this._props&&this.publisher?this.publisher.get():this._props}set props(t){"string"==typeof t&&["{","["].includes(t.trim().charAt(0))&&(t=JSON.parse(t)),t!=this._props&&(this._props=t,this.publisher&&this.publisher.get()!=t&&this.publisher.set(t),this.requestUpdate())}updated(t){super.updated(t);const e=[...(this.shadowRoot||this).children].filter((t=>"STYLE"!=t.tagName)),s=this.displayContents?"contents":0==e.length?"none":null;s?this.style.display=s:this.style.removeProperty("display")}connectedCallback(){var t;if(e.instanceCounter++,this.hasAttribute("lazyRendering")){const t={root:null,rootMargin:Math.max(window.innerWidth,window.innerHeight)+"px"};let e=!0;const s=new IntersectionObserver((t=>{for(const i of t)if(e&&i.isIntersecting){this.addDebugger(),e=!1,this.initWording(),this.initPublisher(),s.disconnect();break}}),t);s.observe(this)}else this.initWording(),this.initPublisher(),this.addDebugger();super.connectedCallback(),null==(t=this.connectedCallbackCalls)||t.forEach((t=>t(this)))}disconnectedCallback(){var t,e;null==(t=this.disconnectedCallbackCalls)||t.forEach((t=>t(this))),this.removeDebugger(),super.disconnectedCallback(),this.publisher&&(this.publisher.stopTemplateFilling(this),this.publisher.offInternalMutation(this.requestUpdate)),this.wordingPublisher&&this.wordingPublisher.stopTemplateFilling(this),this.onAssign&&(null==(e=this.publisher)||e.offAssign(this.onAssign))}addDebugger(){var t;if(this.hasAttribute("debug")&&!this.defferedDebug){if(!this.debug){this.debug=document.createElement("div");const t=this.debug.style;t.position="fixed",t.top="0",t.right="0",t.margin="auto",t.borderRadius=".7rem",t.backgroundColor="#0f1729",t.color="#c5d4f9",t.padding="16px 16px",t.margin="16px 16px",t.boxShadow="0 10px 30px -18px rgba(0,0,0,.3)",t.overflowY="auto",t.zIndex="99999999",t.maxHeight="calc(100vh - 32px)",t.fontFamily="Consolas, monospace",t.maxWidth="min(50vw,25rem)",t.fontSize="12px",t.minWidth="300px",t.overflowWrap="break-word",t.resize="vertical"}this.addEventListener("click",(t=>{t.ctrlKey&&(t.preventDefault(),Y=!Y)})),this.dataProvider&&(window[this.dataProvider]=this.publisher),this.addEventListener("mouseover",(()=>{Y||this.removeDebugger(),document.body.appendChild(this.debug),Q.add(this.debug)})),this.addEventListener("mouseout",(()=>{Y||this.removeDebugger()})),null==(t=this.publisher)||t.onInternalMutation((()=>{var t;this.debug.innerHTML=`🤖 DataProvider : "<b style="font-weight:bold;color:#fff;">${this.dataProvider}</b>"<br>\n <div style="font-size:10px;border-top:1px dashed;margin-top:5px;padding-left:23px;opacity:.6;padding-top:5px;">\n Variable disponible dans la console<br>\n ctrl + Clique : épingler / désépingler\n </div>\n <pre style="margin-top:10px;background:transparent;padding:0;font-size:inherit;color:inherit;">${JSON.stringify(null==(t=this.publisher)?void 0:t.get(),null," ")}</pre>`}))}}removeDebugger(){Q.forEach((t=>{document.body.contains(t)&&document.body.removeChild(t)})),Q=new Set}getApiConfiguration(){const t=this.getAncestorAttributeValue("token"),e=null!=this.getAncestorAttributeValue("addHTTPResponse"),s=this.getAncestorAttributeValue("serviceURL");let i=null,r=null;const o=this.getAncestorAttributeValue("tokenProvider"),n=this.getAncestorAttributeValue("eventsApiToken");t||(i=this.getAncestorAttributeValue("userName"),r=this.getAncestorAttributeValue("password"));return{serviceURL:s,token:t,userName:i,password:r,authToken:n,tokenProvider:o,addHTTPResponse:e,credentials:this.getAncestorAttributeValue("credentials")||void 0,cache:this.getAttribute("cache")||void 0}}async initWording(){let t=!1;const e=Object.getOwnPropertyNames(this.constructor.prototype);for(const o of e)if(0==o.indexOf("wording_")){t=!0;break}if(!t)return;const s=d.get("sonic-wording",{localStorageMode:"enabled"});await d.getInstance().isLocalStrorageReady;const i=this.getAncestorAttributeValue("wordingProvider"),r=new o(this.getApiConfiguration());if(i){const t=[],o=s.get();for(const i of e)if(0==i.indexOf("wording_")){const e=i.substring(8);o[i]||(s[i]="...",t.push(e))}if(t.length>0){const e=i+"?labels[]="+t.join("&labels[]="),o=await r.get(e);for(const t in o)s["wording_"+t]=o[t]}s.startTemplateFilling(this),this.wordingPublisher=s}}createRenderRoot(){if(""===this.noShadowDom||""===this.getAttribute("noShadowDom"))return this;const t=super.createRenderRoot();return b.observe(t),t}initPublisher(){if(!document)return;this.publisher&&(this.publisher.stopTemplateFilling(this),this.publisher.offInternalMutation(this.requestUpdate),this.onAssign&&this.publisher.offAssign(this.onAssign));const t=d.getInstance();this.dataProvider||(this.dataProvider=this.getAncestorAttributeValue("dataProvider"));let s=this.dataProvider;if(!s&&this._props&&(this.dataProvider=s="__subscriber__"+e.instanceCounter),s){this.bindPublisher&&t.set(s,this.bindPublisher());let e=t.get(s,{localStorageMode:this.getAttribute("localStorage")||"disabled"});if(this.dataProvider=s,this.hasAttribute("subDataProvider")){const r=this.getAttribute("subDataProvider");this.dataProvider=s+"/"+r,e=i.traverse(e,r.split(".")),t.set(this.dataProvider,e),this.publisher=e}this.publisher=e}this.publisher&&(this._props&&this.publisher.set(this._props),this.noAutoFill||this.publisher.startTemplateFilling(this),this.renderOnPropsInternalChange&&this.publisher.onInternalMutation(this.requestUpdate),this.publisher.onAssign(this.onAssign))}};return r.instanceCounter=0,Z([U({type:Number})],r.prototype,"collectDependenciesVersion",2),Z([U({type:Boolean})],r.prototype,"displayContents",2),Z([U({type:Boolean})],r.prototype,"noAutoFill",2),Z([U({type:Boolean})],r.prototype,"forceAutoFill",2),Z([U({type:Object})],r.prototype,"propertyMap",2),Z([U({type:String,attribute:"data-title"})],r.prototype,"title",2),Z([U({reflect:!0})],r.prototype,"dataProvider",2),Z([U()],r.prototype,"bindPublisher",2),Z([U()],r.prototype,"props",1),r};window.SonicPublisherManager||(window.SonicPublisherManager=d);var J=Object.defineProperty,X=Object.getOwnPropertyDescriptor;const tt=t=>{class e extends t{constructor(){super(...arguments),this.templates=null,this.templateValueAttribute="data-value",this.templateList=[],this.templateParts={},this.templatePartsList=[]}connectedCallback(){const t=this.templates||[...this.querySelectorAll("template")];for(const e of t)e.hasAttribute(this.templateValueAttribute)&&(this.templateParts[e.getAttribute(this.templateValueAttribute)]=e,this.templatePartsList.push(e));this.templateList=t.filter((t=>!t.getAttribute("data-value"))),0==this.templateList.length&&(this.templateList=t),super.connectedCallback()}}return((t,e,s,i)=>{for(var r,o=i>1?void 0:i?X(e,s):e,n=t.length-1;n>=0;n--)(r=t[n])&&(o=(i?r(e,s,o):r(o))||o);i&&o&&J(e,s,o)})([U({type:Array})],e.prototype,"templates",2),e},et=globalThis,st=et.trustedTypes,it=st?st.createPolicy("lit-html",{createHTML:t=>t}):void 0,rt="$lit$",ot=`lit$${(Math.random()+"").slice(9)}$`,nt="?"+ot,at=`<${nt}>`,lt=document,ct=()=>lt.createComment(""),ht=t=>null===t||"object"!=typeof t&&"function"!=typeof t,dt=Array.isArray,pt=t=>dt(t)||"function"==typeof(null==t?void 0:t[Symbol.iterator]),ut="[ \t\n\f\r]",gt=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,bt=/-->/g,mt=/>/g,ft=RegExp(`>|${ut}(?:([^\\s"'>=/]+)(${ut}*=${ut}*(?:[^ \t\n\f\r"'\`<>=]|("|')|))|$)`,"g"),vt=/'/g,yt=/"/g,wt=/^(?:script|style|textarea|title)$/i,xt=(Ct=1,(t,...e)=>({_$litType$:Ct,strings:t,values:e})),_t=Symbol.for("lit-noChange"),kt=Symbol.for("lit-nothing"),At=new WeakMap,Pt=lt.createTreeWalker(lt,129);
47
43
  /**
48
44
  * @license
49
45
  * Copyright 2017 Google LLC
50
46
  * SPDX-License-Identifier: BSD-3-Clause
51
- */
52
- var Y;Q.finalized=!0,Q.elementProperties=new Map,Q.elementStyles=[],Q.shadowRootOptions={mode:"open"},null==H||H({ReactiveElement:Q}),(null!==(V=U.reactiveElementVersions)&&void 0!==V?V:U.reactiveElementVersions=[]).push("1.6.1");const G=window,J=G.trustedTypes,X=J?J.createPolicy("lit-html",{createHTML:t=>t}):void 0,tt=`lit$${(Math.random()+"").slice(9)}$`,et="?"+tt,st=`<${et}>`,it=document,rt=(t="")=>it.createComment(t),ot=t=>null===t||"object"!=typeof t&&"function"!=typeof t,nt=Array.isArray,at=t=>nt(t)||"function"==typeof(null==t?void 0:t[Symbol.iterator]),lt=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,ct=/-->/g,ht=/>/g,dt=RegExp(">|[ \t\n\f\r](?:([^\\s\"'>=/]+)([ \t\n\f\r]*=[ \t\n\f\r]*(?:[^ \t\n\f\r\"'`<>=]|(\"|')|))|$)","g"),pt=/'/g,ut=/"/g,gt=/^(?:script|style|textarea|title)$/i,mt=(xt=1,(t,...e)=>({_$litType$:xt,strings:t,values:e})),bt=Symbol.for("lit-noChange"),ft=Symbol.for("lit-nothing"),vt=new WeakMap,yt=it.createTreeWalker(it,129,null,!1),wt=(t,e)=>{const s=t.length-1,i=[];let r,o=2===e?"<svg>":"",n=lt;for(let l=0;l<s;l++){const e=t[l];let s,a,c=-1,h=0;for(;h<e.length&&(n.lastIndex=h,a=n.exec(e),null!==a);)h=n.lastIndex,n===lt?"!--"===a[1]?n=ct:void 0!==a[1]?n=ht:void 0!==a[2]?(gt.test(a[2])&&(r=RegExp("</"+a[2],"g")),n=dt):void 0!==a[3]&&(n=dt):n===dt?">"===a[0]?(n=null!=r?r:lt,c=-1):void 0===a[1]?c=-2:(c=n.lastIndex-a[2].length,s=a[1],n=void 0===a[3]?dt:'"'===a[3]?ut:pt):n===ut||n===pt?n=dt:n===ct||n===ht?n=lt:(n=dt,r=void 0);const d=n===dt&&t[l+1].startsWith("/>")?" ":"";o+=n===lt?e+st:c>=0?(i.push(s),e.slice(0,c)+"$lit$"+e.slice(c)+tt+d):e+tt+(-2===c?(i.push(void 0),l):d)}const a=o+(t[s]||"<?>")+(2===e?"</svg>":"");if(!Array.isArray(t)||!t.hasOwnProperty("raw"))throw Error("invalid template strings array");return[void 0!==X?X.createHTML(a):a,i]};var xt;class _t{constructor({strings:t,_$litType$:e},s){let i;this.parts=[];let r=0,o=0;const n=t.length-1,a=this.parts,[l,c]=wt(t,e);if(this.el=_t.createElement(l,s),yt.currentNode=this.el.content,2===e){const t=this.el.content,e=t.firstChild;e.remove(),t.append(...e.childNodes)}for(;null!==(i=yt.nextNode())&&a.length<n;){if(1===i.nodeType){if(i.hasAttributes()){const t=[];for(const e of i.getAttributeNames())if(e.endsWith("$lit$")||e.startsWith(tt)){const s=c[o++];if(t.push(e),void 0!==s){const t=i.getAttribute(s.toLowerCase()+"$lit$").split(tt),e=/([.?@])?(.*)/.exec(s);a.push({type:1,index:r,name:e[2],strings:t,ctor:"."===e[1]?St:"?"===e[1]?Ot:"@"===e[1]?Dt:Ct})}else a.push({type:6,index:r})}for(const e of t)i.removeAttribute(e)}if(gt.test(i.tagName)){const t=i.textContent.split(tt),e=t.length-1;if(e>0){i.textContent=J?J.emptyScript:"";for(let s=0;s<e;s++)i.append(t[s],rt()),yt.nextNode(),a.push({type:2,index:++r});i.append(t[e],rt())}}}else if(8===i.nodeType)if(i.data===et)a.push({type:2,index:r});else{let t=-1;for(;-1!==(t=i.data.indexOf(tt,t+1));)a.push({type:7,index:r}),t+=tt.length-1}r++}}static createElement(t,e){const s=it.createElement("template");return s.innerHTML=t,s}}function kt(t,e,s=t,i){var r,o,n,a;if(e===bt)return e;let l=void 0!==i?null===(r=s._$Co)||void 0===r?void 0:r[i]:s._$Cl;const c=ot(e)?void 0:e._$litDirective$;return(null==l?void 0:l.constructor)!==c&&(null===(o=null==l?void 0:l._$AO)||void 0===o||o.call(l,!1),void 0===c?l=void 0:(l=new c(t),l._$AT(t,s,i)),void 0!==i?(null!==(n=(a=s)._$Co)&&void 0!==n?n:a._$Co=[])[i]=l:s._$Cl=l),void 0!==l&&(e=kt(t,l._$AS(t,e.values),l,i)),e}class At{constructor(t,e){this.u=[],this._$AN=void 0,this._$AD=t,this._$AM=e}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}v(t){var e;const{el:{content:s},parts:i}=this._$AD,r=(null!==(e=null==t?void 0:t.creationScope)&&void 0!==e?e:it).importNode(s,!0);yt.currentNode=r;let o=yt.nextNode(),n=0,a=0,l=i[0];for(;void 0!==l;){if(n===l.index){let e;2===l.type?e=new Pt(o,o.nextSibling,this,t):1===l.type?e=new l.ctor(o,l.name,l.strings,this,t):6===l.type&&(e=new Lt(o,this,t)),this.u.push(e),l=i[++a]}n!==(null==l?void 0:l.index)&&(o=yt.nextNode(),n++)}return r}p(t){let e=0;for(const s of this.u)void 0!==s&&(void 0!==s.strings?(s._$AI(t,s,e),e+=s.strings.length-2):s._$AI(t[e])),e++}}class Pt{constructor(t,e,s,i){var r;this.type=2,this._$AH=ft,this._$AN=void 0,this._$AA=t,this._$AB=e,this._$AM=s,this.options=i,this._$Cm=null===(r=null==i?void 0:i.isConnected)||void 0===r||r}get _$AU(){var t,e;return null!==(e=null===(t=this._$AM)||void 0===t?void 0:t._$AU)&&void 0!==e?e:this._$Cm}get parentNode(){let t=this._$AA.parentNode;const e=this._$AM;return void 0!==e&&11===t.nodeType&&(t=e.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,e=this){t=kt(this,t,e),ot(t)?t===ft||null==t||""===t?(this._$AH!==ft&&this._$AR(),this._$AH=ft):t!==this._$AH&&t!==bt&&this.g(t):void 0!==t._$litType$?this.$(t):void 0!==t.nodeType?this.T(t):at(t)?this.k(t):this.g(t)}O(t,e=this._$AB){return this._$AA.parentNode.insertBefore(t,e)}T(t){this._$AH!==t&&(this._$AR(),this._$AH=this.O(t))}g(t){this._$AH!==ft&&ot(this._$AH)?this._$AA.nextSibling.data=t:this.T(it.createTextNode(t)),this._$AH=t}$(t){var e;const{values:s,_$litType$:i}=t,r="number"==typeof i?this._$AC(t):(void 0===i.el&&(i.el=_t.createElement(i.h,this.options)),i);if((null===(e=this._$AH)||void 0===e?void 0:e._$AD)===r)this._$AH.p(s);else{const t=new At(r,this),e=t.v(this.options);t.p(s),this.T(e),this._$AH=t}}_$AC(t){let e=vt.get(t.strings);return void 0===e&&vt.set(t.strings,e=new _t(t)),e}k(t){nt(this._$AH)||(this._$AH=[],this._$AR());const e=this._$AH;let s,i=0;for(const r of t)i===e.length?e.push(s=new Pt(this.O(rt()),this.O(rt()),this,this.options)):s=e[i],s._$AI(r),i++;i<e.length&&(this._$AR(s&&s._$AB.nextSibling,i),e.length=i)}_$AR(t=this._$AA.nextSibling,e){var s;for(null===(s=this._$AP)||void 0===s||s.call(this,!1,!0,e);t&&t!==this._$AB;){const e=t.nextSibling;t.remove(),t=e}}setConnected(t){var e;void 0===this._$AM&&(this._$Cm=t,null===(e=this._$AP)||void 0===e||e.call(this,t))}}class Ct{constructor(t,e,s,i,r){this.type=1,this._$AH=ft,this._$AN=void 0,this.element=t,this.name=e,this._$AM=i,this.options=r,s.length>2||""!==s[0]||""!==s[1]?(this._$AH=Array(s.length-1).fill(new String),this.strings=s):this._$AH=ft}get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}_$AI(t,e=this,s,i){const r=this.strings;let o=!1;if(void 0===r)t=kt(this,t,e,0),o=!ot(t)||t!==this._$AH&&t!==bt,o&&(this._$AH=t);else{const i=t;let n,a;for(t=r[0],n=0;n<r.length-1;n++)a=kt(this,i[s+n],e,n),a===bt&&(a=this._$AH[n]),o||(o=!ot(a)||a!==this._$AH[n]),a===ft?t=ft:t!==ft&&(t+=(null!=a?a:"")+r[n+1]),this._$AH[n]=a}o&&!i&&this.j(t)}j(t){t===ft?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,null!=t?t:"")}}class St extends Ct{constructor(){super(...arguments),this.type=3}j(t){this.element[this.name]=t===ft?void 0:t}}const $t=J?J.emptyScript:"";class Ot extends Ct{constructor(){super(...arguments),this.type=4}j(t){t&&t!==ft?this.element.setAttribute(this.name,$t):this.element.removeAttribute(this.name)}}class Dt extends Ct{constructor(t,e,s,i,r){super(t,e,s,i,r),this.type=5}_$AI(t,e=this){var s;if((t=null!==(s=kt(this,t,e,0))&&void 0!==s?s:ft)===bt)return;const i=this._$AH,r=t===ft&&i!==ft||t.capture!==i.capture||t.once!==i.once||t.passive!==i.passive,o=t!==ft&&(i===ft||r);r&&this.element.removeEventListener(this.name,this,i),o&&this.element.addEventListener(this.name,this,t),this._$AH=t}handleEvent(t){var e,s;"function"==typeof this._$AH?this._$AH.call(null!==(s=null===(e=this.options)||void 0===e?void 0:e.host)&&void 0!==s?s:this.element,t):this._$AH.handleEvent(t)}}class Lt{constructor(t,e,s){this.element=t,this.type=6,this._$AN=void 0,this._$AM=e,this.options=s}get _$AU(){return this._$AM._$AU}_$AI(t){kt(this,t)}}const Et={P:"$lit$",A:tt,M:et,C:1,L:wt,R:At,D:at,V:kt,I:Pt,H:Ct,N:Ot,U:Dt,B:St,F:Lt},jt=G.litHtmlPolyfillSupport;null==jt||jt(_t,Pt),(null!==(Y=G.litHtmlVersions)&&void 0!==Y?Y:G.litHtmlVersions=[]).push("2.6.1");
47
+ */var Ct;function St(t,e){if(!Array.isArray(t)||!t.hasOwnProperty("raw"))throw Error("invalid template strings array");return void 0!==it?it.createHTML(e):e}const $t=(t,e)=>{const s=t.length-1,i=[];let r,o=2===e?"<svg>":"",n=gt;for(let a=0;a<s;a++){const e=t[a];let s,l,c=-1,h=0;for(;h<e.length&&(n.lastIndex=h,l=n.exec(e),null!==l);)h=n.lastIndex,n===gt?"!--"===l[1]?n=bt:void 0!==l[1]?n=mt:void 0!==l[2]?(wt.test(l[2])&&(r=RegExp("</"+l[2],"g")),n=ft):void 0!==l[3]&&(n=ft):n===ft?">"===l[0]?(n=r??gt,c=-1):void 0===l[1]?c=-2:(c=n.lastIndex-l[2].length,s=l[1],n=void 0===l[3]?ft:'"'===l[3]?yt:vt):n===yt||n===vt?n=ft:n===bt||n===mt?n=gt:(n=ft,r=void 0);const d=n===ft&&t[a+1].startsWith("/>")?" ":"";o+=n===gt?e+at:c>=0?(i.push(s),e.slice(0,c)+rt+e.slice(c)+ot+d):e+ot+(-2===c?a:d)}return[St(t,o+(t[s]||"<?>")+(2===e?"</svg>":"")),i]};class Ot{constructor({strings:t,_$litType$:e},s){let i;this.parts=[];let r=0,o=0;const n=t.length-1,a=this.parts,[l,c]=$t(t,e);if(this.el=Ot.createElement(l,s),Pt.currentNode=this.el.content,2===e){const t=this.el.content.firstChild;t.replaceWith(...t.childNodes)}for(;null!==(i=Pt.nextNode())&&a.length<n;){if(1===i.nodeType){if(i.hasAttributes())for(const t of i.getAttributeNames())if(t.endsWith(rt)){const e=c[o++],s=i.getAttribute(t).split(ot),n=/([.?@])?(.*)/.exec(e);a.push({type:1,index:r,name:n[2],strings:s,ctor:"."===n[1]?Mt:"?"===n[1]?Nt:"@"===n[1]?zt:jt}),i.removeAttribute(t)}else t.startsWith(ot)&&(a.push({type:6,index:r}),i.removeAttribute(t));if(wt.test(i.tagName)){const t=i.textContent.split(ot),e=t.length-1;if(e>0){i.textContent=st?st.emptyScript:"";for(let s=0;s<e;s++)i.append(t[s],ct()),Pt.nextNode(),a.push({type:2,index:++r});i.append(t[e],ct())}}}else if(8===i.nodeType)if(i.data===nt)a.push({type:2,index:r});else{let t=-1;for(;-1!==(t=i.data.indexOf(ot,t+1));)a.push({type:7,index:r}),t+=ot.length-1}r++}}static createElement(t,e){const s=lt.createElement("template");return s.innerHTML=t,s}}function Dt(t,e,s=t,i){var r,o;if(e===_t)return e;let n=void 0!==i?null==(r=s._$Co)?void 0:r[i]:s._$Cl;const a=ht(e)?void 0:e._$litDirective$;return(null==n?void 0:n.constructor)!==a&&(null==(o=null==n?void 0:n._$AO)||o.call(n,!1),void 0===a?n=void 0:(n=new a(t),n._$AT(t,s,i)),void 0!==i?(s._$Co??(s._$Co=[]))[i]=n:s._$Cl=n),void 0!==n&&(e=Dt(t,n._$AS(t,e.values),n,i)),e}class Lt{constructor(t,e){this._$AV=[],this._$AN=void 0,this._$AD=t,this._$AM=e}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(t){const{el:{content:e},parts:s}=this._$AD,i=((null==t?void 0:t.creationScope)??lt).importNode(e,!0);Pt.currentNode=i;let r=Pt.nextNode(),o=0,n=0,a=s[0];for(;void 0!==a;){if(o===a.index){let e;2===a.type?e=new Et(r,r.nextSibling,this,t):1===a.type?e=new a.ctor(r,a.name,a.strings,this,t):6===a.type&&(e=new It(r,this,t)),this._$AV.push(e),a=s[++n]}o!==(null==a?void 0:a.index)&&(r=Pt.nextNode(),o++)}return Pt.currentNode=lt,i}p(t){let e=0;for(const s of this._$AV)void 0!==s&&(void 0!==s.strings?(s._$AI(t,s,e),e+=s.strings.length-2):s._$AI(t[e])),e++}}class Et{get _$AU(){var t;return(null==(t=this._$AM)?void 0:t._$AU)??this._$Cv}constructor(t,e,s,i){this.type=2,this._$AH=kt,this._$AN=void 0,this._$AA=t,this._$AB=e,this._$AM=s,this.options=i,this._$Cv=(null==i?void 0:i.isConnected)??!0}get parentNode(){let t=this._$AA.parentNode;const e=this._$AM;return void 0!==e&&11===(null==t?void 0:t.nodeType)&&(t=e.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,e=this){t=Dt(this,t,e),ht(t)?t===kt||null==t||""===t?(this._$AH!==kt&&this._$AR(),this._$AH=kt):t!==this._$AH&&t!==_t&&this._(t):void 0!==t._$litType$?this.g(t):void 0!==t.nodeType?this.$(t):pt(t)?this.T(t):this._(t)}k(t){return this._$AA.parentNode.insertBefore(t,this._$AB)}$(t){this._$AH!==t&&(this._$AR(),this._$AH=this.k(t))}_(t){this._$AH!==kt&&ht(this._$AH)?this._$AA.nextSibling.data=t:this.$(lt.createTextNode(t)),this._$AH=t}g(t){var e;const{values:s,_$litType$:i}=t,r="number"==typeof i?this._$AC(t):(void 0===i.el&&(i.el=Ot.createElement(St(i.h,i.h[0]),this.options)),i);if((null==(e=this._$AH)?void 0:e._$AD)===r)this._$AH.p(s);else{const t=new Lt(r,this),e=t.u(this.options);t.p(s),this.$(e),this._$AH=t}}_$AC(t){let e=At.get(t.strings);return void 0===e&&At.set(t.strings,e=new Ot(t)),e}T(t){dt(this._$AH)||(this._$AH=[],this._$AR());const e=this._$AH;let s,i=0;for(const r of t)i===e.length?e.push(s=new Et(this.k(ct()),this.k(ct()),this,this.options)):s=e[i],s._$AI(r),i++;i<e.length&&(this._$AR(s&&s._$AB.nextSibling,i),e.length=i)}_$AR(t=this._$AA.nextSibling,e){var s;for(null==(s=this._$AP)||s.call(this,!1,!0,e);t&&t!==this._$AB;){const e=t.nextSibling;t.remove(),t=e}}setConnected(t){var e;void 0===this._$AM&&(this._$Cv=t,null==(e=this._$AP)||e.call(this,t))}}class jt{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(t,e,s,i,r){this.type=1,this._$AH=kt,this._$AN=void 0,this.element=t,this.name=e,this._$AM=i,this.options=r,s.length>2||""!==s[0]||""!==s[1]?(this._$AH=Array(s.length-1).fill(new String),this.strings=s):this._$AH=kt}_$AI(t,e=this,s,i){const r=this.strings;let o=!1;if(void 0===r)t=Dt(this,t,e,0),o=!ht(t)||t!==this._$AH&&t!==_t,o&&(this._$AH=t);else{const i=t;let n,a;for(t=r[0],n=0;n<r.length-1;n++)a=Dt(this,i[s+n],e,n),a===_t&&(a=this._$AH[n]),o||(o=!ht(a)||a!==this._$AH[n]),a===kt?t=kt:t!==kt&&(t+=(a??"")+r[n+1]),this._$AH[n]=a}o&&!i&&this.j(t)}j(t){t===kt?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,t??"")}}class Mt extends jt{constructor(){super(...arguments),this.type=3}j(t){this.element[this.name]=t===kt?void 0:t}}class Nt extends jt{constructor(){super(...arguments),this.type=4}j(t){this.element.toggleAttribute(this.name,!!t&&t!==kt)}}class zt extends jt{constructor(t,e,s,i,r){super(t,e,s,i,r),this.type=5}_$AI(t,e=this){if((t=Dt(this,t,e,0)??kt)===_t)return;const s=this._$AH,i=t===kt&&s!==kt||t.capture!==s.capture||t.once!==s.once||t.passive!==s.passive,r=t!==kt&&(s===kt||i);i&&this.element.removeEventListener(this.name,this,s),r&&this.element.addEventListener(this.name,this,t),this._$AH=t}handleEvent(t){var e;"function"==typeof this._$AH?this._$AH.call((null==(e=this.options)?void 0:e.host)??this.element,t):this._$AH.handleEvent(t)}}class It{constructor(t,e,s){this.element=t,this.type=6,this._$AN=void 0,this._$AM=e,this.options=s}get _$AU(){return this._$AM._$AU}_$AI(t){Dt(this,t)}}const Tt={S:rt,A:ot,P:nt,C:1,M:$t,L:Lt,R:pt,V:Dt,D:Et,I:jt,H:Nt,N:zt,U:Mt,B:It},Ft=et.litHtmlPolyfillSupport;null==Ft||Ft(Ot,Et),(et.litHtmlVersions??(et.litHtmlVersions=[])).push("3.0.0");
53
48
  /**
54
49
  * @license
55
50
  * Copyright 2017 Google LLC
56
51
  * SPDX-License-Identifier: BSD-3-Clause
57
52
  */
58
- var Mt,Nt;class zt extends Q{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){var t,e;const s=super.createRenderRoot();return null!==(t=(e=this.renderOptions).renderBefore)&&void 0!==t||(e.renderBefore=s.firstChild),s}update(t){const e=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(t),this._$Do=((t,e,s)=>{var i,r;const o=null!==(i=null==s?void 0:s.renderBefore)&&void 0!==i?i:e;let n=o._$litPart$;if(void 0===n){const t=null!==(r=null==s?void 0:s.renderBefore)&&void 0!==r?r:null;o._$litPart$=n=new Pt(e.insertBefore(rt(),t),t,void 0,null!=s?s:{})}return n._$AI(t),n})(e,this.renderRoot,this.renderOptions)}connectedCallback(){var t;super.connectedCallback(),null===(t=this._$Do)||void 0===t||t.setConnected(!0)}disconnectedCallback(){var t;super.disconnectedCallback(),null===(t=this._$Do)||void 0===t||t.setConnected(!1)}render(){return bt}}zt.finalized=!0,zt._$litElement$=!0,null===(Mt=globalThis.litElementHydrateSupport)||void 0===Mt||Mt.call(globalThis,{LitElement:zt});const It=globalThis.litElementPolyfillSupport;null==It||It({LitElement:zt}),(null!==(Nt=globalThis.litElementVersions)&&void 0!==Nt?Nt:globalThis.litElementVersions=[]).push("3.2.2");var Ft=Object.defineProperty,Tt=Object.getOwnPropertyDescriptor,Rt=(t,e,s,i)=>{for(var r,o=i>1?void 0:i?Tt(e,s):e,n=t.length-1;n>=0;n--)(r=t[n])&&(o=(i?r(e,s,o):r(o))||o);return i&&o&&Ft(e,s,o),o};let Vt=class extends(D(j(zt))){constructor(){super(...arguments),this.pageLanguage="fr",this.duAu=[],this._wording_billet_periode_validite="",this.designMode=null,this.time_zone=null,this.date=null,this.date_string=null,this.start_date_string=null,this.end_date_string=null,this.start_date=0,this.end_date=0,this.era="",this.year="numeric",this.month="short",this.day="2-digit",this.weekday="short",this.hour="2-digit",this.minute="2-digit",this.language="",this.renderIf=!0,this.now=!1,this.startDateObject=new Date,this.endDateObject=new Date}get wording_billet_periode_validite(){return this._wording_billet_periode_validite}set wording_billet_periode_validite(t){this._wording_billet_periode_validite=t,this.duAu=this.wording_billet_periode_validite.split("%s").map((t=>t.trim())),this.duAu.pop(),this.requestUpdate()}connectedCallback(){this.hasAttribute("wording_billet_periode_validite")||(this.wording_billet_periode_validite="Du %s au %s"),this.pageLanguage=e.getLanguage(),super.connectedCallback()}getDatesParts(t,e,s){const i=this.startDateObject;i.setTime(1e3*t);let r=[];if(e>0){const t=this.endDateObject;t.setTime(1e3*e);const o=i.toDateString()==t.toDateString();o||(delete s.hour,delete s.minute);if(r=new Intl.DateTimeFormat(this.language||this.pageLanguage,s).formatRangeToParts(i,t),!o){const t=r.find((t=>"literal"==t.type&&"shared"==t.source&&t.value.trim().length>0));t&&(t.value=" "+this.duAu[1]+" ",t.type="to"),this.designMode||r.unshift({type:"from",value:this.duAu[0]+" ",source:"shared"})}}else{r=new Intl.DateTimeFormat(this.language||this.pageLanguage,s).formatToParts(i)}return this.designMode&&r.forEach((t=>t.hidden=","==t.value.trim())),r[0].value=o.ucFirst(r[0].value),r.filter((t=>!0!==t.hidden))}dateStringToSeconds(t){return new Date(t).getTime()/1e3}render(){if(!this.renderIf)return ft;if(this.date_string&&(this.date=this.dateStringToSeconds(this.date_string)),this.date&&(this.start_date=this.date),this.start_date_string&&(this.start_date=this.dateStringToSeconds(this.start_date_string)),this.end_date_string&&(this.end_date=this.dateStringToSeconds(this.end_date_string)),!this.start_date&&!this.now&&!this.end_date)return ft;if(this.start_date||(this.start_date=Date.now()/1e3),this.end_date>0&&this.end_date<this.start_date){const t=this.start_date;this.start_date=this.end_date,this.end_date=t}const t={year:this.year,month:this.month,day:this.day};"hidden"!==this.weekday&&(t.weekday=this.weekday),"hidden"!==this.hour&&(t.hour=this.hour),"hidden"!==this.minute&&(t.minute=this.minute),this.era&&(t.era=this.era),this.time_zone&&(t.timeZone=this.time_zone);const e=this.getDatesParts(this.start_date,this.end_date,t);return mt`${e.map((t=>{const e=this.templateParts[t.type];if(e){const s=document.importNode(e.content,!0),i=s.children[0];return""==i.innerText.trim()&&(i.innerText=t.value),s}return mt`<span class="${t.type}">${t.value}</span>`}))}`}};Rt([f()],Vt.prototype,"wording_billet_periode_validite",1),Rt([f({type:Boolean})],Vt.prototype,"designMode",2),Rt([f({type:String})],Vt.prototype,"time_zone",2),Rt([f({type:Number})],Vt.prototype,"date",2),Rt([f({type:String})],Vt.prototype,"date_string",2),Rt([f({type:String})],Vt.prototype,"start_date_string",2),Rt([f({type:String})],Vt.prototype,"end_date_string",2),Rt([f({type:Number})],Vt.prototype,"start_date",2),Rt([f({type:Number})],Vt.prototype,"end_date",2),Rt([f({type:String})],Vt.prototype,"era",2),Rt([f({type:String})],Vt.prototype,"year",2),Rt([f({type:String})],Vt.prototype,"month",2),Rt([f({type:String})],Vt.prototype,"day",2),Rt([f({type:String})],Vt.prototype,"weekday",2),Rt([f({type:String})],Vt.prototype,"hour",2),Rt([f({type:String})],Vt.prototype,"minute",2),Rt([f({type:String})],Vt.prototype,"language",2),Rt([f({type:Boolean})],Vt.prototype,"renderIf",2),Rt([f({type:Boolean})],Vt.prototype,"now",2),Vt=Rt([m("sonic-date")],Vt);const Ut=class{static listen(){var t;if(!Ut.listening)return;const e=null==(t=document.location)?void 0:t.href.replace(document.location.origin,"");Ut.prevURL&&Ut.prevURL!=e&&(Ut.prevURL=e,Ut.listeners.forEach((t=>{t.location=e}))),window.requestAnimationFrame(Ut.listen)}static offChange(t){const e=Ut.listeners.indexOf(t);-1!=e&&(Ut.listeners.splice(e,1),0==Ut.listeners.length&&(Ut.listening=!1))}static onChange(t){Ut.listening||(Ut.listening=!0,Ut.listen()),Ut.listeners.push(t),t.location=this.prevURL}static changeFromComponent(t){const e=t.goBack,s=document.referrer;if(null!=e){const t=document.location.origin,i=e||t,r=!!(0==s.indexOf("http"))&&new URL(s).origin!=t,o=""==s,n=history.length<3,a=o&&n,l=i!=document.location.href;if(r&&l||a){const t=history.state||{};t.concorde=t.concorde||{},t.concorde.hasDoneHistoryBack=!0,history.pushState(t,document.title),history.back(),document.location.replace(i)}else history.back();return}let i=t.getAttribute("to")||"";if(i||(i=t.href||""),!i)return;if(0==i.indexOf("#"))return void(document.location.hash=i.substring(1));const r=new URL(i,document.location.href),o=r.pathname.split("/"),n=[];let a="";for(const l of o)l!=a&&n.push(l),a=l;i="/"+n.join("/")+r.search+(r.hash?+r.hash:""),t.hasAttribute("pushState")?history.pushState(null,"",i):t.hasAttribute("replaceState")?history.replaceState(null,"",i):document.location.href=i}static updateComponentActiveState(t){if("disabled"!=t.autoActive&&t.href&&0!=t.href.indexOf("http")){const e=new URL(t.href,document.location.href),s=new URL(t.location||"",document.location.origin);let i=!1;i="strict"==t.autoActive?e.pathname==s.pathname&&e.hash==s.hash&&e.search==s.search:0==s.href.indexOf(e.href),i?t.setAttribute("active","true"):t.removeAttribute("active")}}};let qt=Ut;qt.listeners=[],qt.listening=!1,qt.prevURL=null==(t=document.location)?void 0:t.href.replace(document.location.origin,"");
53
+ let Rt=class extends T{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){var t;const e=super.createRenderRoot();return(t=this.renderOptions).renderBefore??(t.renderBefore=e.firstChild),e}update(t){const e=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(t),this._$Do=((t,e,s)=>{const i=(null==s?void 0:s.renderBefore)??e;let r=i._$litPart$;if(void 0===r){const t=(null==s?void 0:s.renderBefore)??null;i._$litPart$=r=new Et(e.insertBefore(ct(),t),t,void 0,s??{})}return r._$AI(t),r})(e,this.renderRoot,this.renderOptions)}connectedCallback(){var t;super.connectedCallback(),null==(t=this._$Do)||t.setConnected(!0)}disconnectedCallback(){var t;super.disconnectedCallback(),null==(t=this._$Do)||t.setConnected(!1)}render(){return _t}};Rt._$litElement$=!0,Rt.finalized=!0,null==(t=globalThis.litElementHydrateSupport)||t.call(globalThis,{LitElement:Rt});const Ut=globalThis.litElementPolyfillSupport;null==Ut||Ut({LitElement:Rt}),(globalThis.litElementVersions??(globalThis.litElementVersions=[])).push("4.0.0");var Vt=Object.defineProperty,Bt=Object.getOwnPropertyDescriptor,qt=(t,e,s,i)=>{for(var r,o=i>1?void 0:i?Bt(e,s):e,n=t.length-1;n>=0;n--)(r=t[n])&&(o=(i?r(e,s,o):r(o))||o);return i&&o&&Vt(e,s,o),o};let Ht=class extends(G(tt(Rt))){constructor(){super(...arguments),this.pageLanguage="fr",this.duAu=[],this._wording_billet_periode_validite="",this.designMode=null,this.time_zone=null,this.date=null,this.date_string=null,this.start_date_string=null,this.end_date_string=null,this.start_date=0,this.end_date=0,this.era="",this.year="numeric",this.month="short",this.day="2-digit",this.weekday="short",this.hour="2-digit",this.minute="2-digit",this.language="",this.renderIf=!0,this.now=!1,this.startDateObject=new Date,this.endDateObject=new Date}get wording_billet_periode_validite(){return this._wording_billet_periode_validite}set wording_billet_periode_validite(t){this._wording_billet_periode_validite=t,this.duAu=this.wording_billet_periode_validite.split("%s").map((t=>t.trim())),this.duAu.pop(),this.requestUpdate()}connectedCallback(){this.hasAttribute("wording_billet_periode_validite")||(this.wording_billet_periode_validite="Du %s au %s"),this.pageLanguage=s.getLanguage(),super.connectedCallback()}getDatesParts(t,e,s){const i=this.startDateObject;i.setTime(1e3*t);let r=[];if(e>0){const t=this.endDateObject;t.setTime(1e3*e);const o=i.toDateString()==t.toDateString();o||(delete s.hour,delete s.minute);if(r=new Intl.DateTimeFormat(this.language||this.pageLanguage,s).formatRangeToParts(i,t),!o){const t=r.find((t=>"literal"==t.type&&"shared"==t.source&&t.value.trim().length>0));t&&(t.value=" "+this.duAu[1]+" ",t.type="to"),this.designMode||r.unshift({type:"from",value:this.duAu[0]+" ",source:"shared"})}}else{r=new Intl.DateTimeFormat(this.language||this.pageLanguage,s).formatToParts(i)}return this.designMode&&r.forEach((t=>t.hidden=","==t.value.trim())),r[0].value=n.ucFirst(r[0].value),r.filter((t=>!0!==t.hidden))}dateStringToSeconds(t){return new Date(t).getTime()/1e3}render(){if(!this.renderIf)return kt;if(this.date_string&&(this.date=this.dateStringToSeconds(this.date_string)),this.date&&(this.start_date=this.date),this.start_date_string&&(this.start_date=this.dateStringToSeconds(this.start_date_string)),this.end_date_string&&(this.end_date=this.dateStringToSeconds(this.end_date_string)),!this.start_date&&!this.now&&!this.end_date)return kt;if(this.start_date||(this.start_date=Date.now()/1e3),this.end_date>0&&this.end_date<this.start_date){const t=this.start_date;this.start_date=this.end_date,this.end_date=t}const t={year:this.year,month:this.month,day:this.day};"hidden"!==this.weekday&&(t.weekday=this.weekday),"hidden"!==this.hour&&(t.hour=this.hour),"hidden"!==this.minute&&(t.minute=this.minute),this.era&&(t.era=this.era),this.time_zone&&(t.timeZone=this.time_zone);const e=this.getDatesParts(this.start_date,this.end_date,t);return xt`${e.map((t=>{const e=this.templateParts[t.type];if(e){const s=document.importNode(e.content,!0),i=s.children[0];return""==i.innerText.trim()&&(i.innerText=t.value),s}return xt`<span class="${t.type}">${t.value}</span>`}))}`}};qt([U()],Ht.prototype,"wording_billet_periode_validite",1),qt([U({type:Boolean})],Ht.prototype,"designMode",2),qt([U({type:String})],Ht.prototype,"time_zone",2),qt([U({type:Number})],Ht.prototype,"date",2),qt([U({type:String})],Ht.prototype,"date_string",2),qt([U({type:String})],Ht.prototype,"start_date_string",2),qt([U({type:String})],Ht.prototype,"end_date_string",2),qt([U({type:Number})],Ht.prototype,"start_date",2),qt([U({type:Number})],Ht.prototype,"end_date",2),qt([U({type:String})],Ht.prototype,"era",2),qt([U({type:String})],Ht.prototype,"year",2),qt([U({type:String})],Ht.prototype,"month",2),qt([U({type:String})],Ht.prototype,"day",2),qt([U({type:String})],Ht.prototype,"weekday",2),qt([U({type:String})],Ht.prototype,"hour",2),qt([U({type:String})],Ht.prototype,"minute",2),qt([U({type:String})],Ht.prototype,"language",2),qt([U({type:Boolean})],Ht.prototype,"renderIf",2),qt([U({type:Boolean})],Ht.prototype,"now",2),Ht=qt([m("sonic-date")],Ht);const Wt=class t{static listen(){var e;if(!t.listening)return;const s=null==(e=document.location)?void 0:e.href.replace(document.location.origin,"");t.prevURL&&t.prevURL!=s&&(t.prevURL=s,t.listeners.forEach((t=>{t.location=s}))),window.requestAnimationFrame(t.listen)}static offChange(e){const s=t.listeners.indexOf(e);-1!=s&&(t.listeners.splice(s,1),0==t.listeners.length&&(t.listening=!1))}static onChange(e){t.listening||(t.listening=!0,t.listen()),t.listeners.push(e),e.location=this.prevURL}static changeFromComponent(t){const e=t.goBack,s=document.referrer;if(null!=e){const t=document.location.origin,i=e||t,r=!!(0==s.indexOf("http"))&&new URL(s).origin!=t,o=""==s,n=history.length<3,a=o&&n,l=i!=document.location.href;if(r&&l||a){const t=history.state||{};t.concorde=t.concorde||{},t.concorde.hasDoneHistoryBack=!0,history.pushState(t,document.title),history.back(),document.location.replace(i)}else history.back();return}let i=t.getAttribute("to")||"";if(i||(i=t.href||""),!i)return;if(0==i.indexOf("#"))return void(document.location.hash=i.substring(1));const r=new URL(i,document.location.href),o=r.pathname.split("/"),n=[];let a="";for(const l of o)l!=a&&n.push(l),a=l;i="/"+n.join("/")+r.search+(r.hash?+r.hash:""),t.hasAttribute("pushState")?history.pushState(null,"",i):t.hasAttribute("replaceState")?history.replaceState(null,"",i):document.location.href=i}static updateComponentActiveState(t){if("disabled"!=t.autoActive&&t.href&&0!=t.href.indexOf("http")){const e=new URL(t.href,document.location.href),s=new URL(t.location||"",document.location.origin);let i=!1;i="strict"==t.autoActive?e.pathname==s.pathname&&e.hash==s.hash&&e.search==s.search:0==s.href.indexOf(e.href),i?t.setAttribute("active","true"):t.removeAttribute("active")}}};Wt.listeners=[],Wt.listening=!1,Wt.prevURL=null==(e=document.location)?void 0:e.href.replace(document.location.origin,"");let Kt=Wt;
59
54
  /**
60
55
  * @license
61
56
  * Copyright 2017 Google LLC
62
57
  * SPDX-License-Identifier: BSD-3-Clause
63
- */
64
- const Bt=1,Ht=2,Wt=t=>(...e)=>({_$litDirective$:t,values:e});class Kt{constructor(t){}get _$AU(){return this._$AM._$AU}_$AT(t,e,s){this._$Ct=t,this._$AM=e,this._$Ci=s}_$AS(t,e){return this.update(t,e)}update(t,e){return this.render(...e)}}
58
+ */const Zt=1,Yt=2,Qt=t=>(...e)=>({_$litDirective$:t,values:e});let Gt=class{constructor(t){}get _$AU(){return this._$AM._$AU}_$AT(t,e,s){this._$Ct=t,this._$AM=e,this._$Ci=s}_$AS(t,e){return this.update(t,e)}update(t,e){return this.render(...e)}};
65
59
  /**
66
60
  * @license
67
61
  * Copyright 2018 Google LLC
68
62
  * SPDX-License-Identifier: BSD-3-Clause
69
- */const Zt=Wt(class extends Kt{constructor(t){var e;if(super(t),t.type!==Bt||"style"!==t.name||(null===(e=t.strings)||void 0===e?void 0:e.length)>2)throw Error("The `styleMap` directive must be used in the `style` attribute and must be the only part in the attribute.")}render(t){return Object.keys(t).reduce(((e,s)=>{const i=t[s];return null==i?e:e+`${s=s.replace(/(?:^(webkit|moz|ms|o)|)(?=[A-Z])/g,"-$&").toLowerCase()}:${i};`}),"")}update(t,[e]){const{style:s}=t.element;if(void 0===this.vt){this.vt=new Set;for(const t in e)this.vt.add(t);return this.render(e)}this.vt.forEach((t=>{null==e[t]&&(this.vt.delete(t),t.includes("-")?s.removeProperty(t):s[t]="")}));for(const i in e){const t=e[i];null!=t&&(this.vt.add(i),i.includes("-")?s.setProperty(i,t):s[i]=t)}return bt}});var Qt=Object.defineProperty,Yt=Object.getOwnPropertyDescriptor,Gt=(t,e,s,i)=>{for(var r,o=i>1?void 0:i?Yt(e,s):e,n=t.length-1;n>=0;n--)(r=t[n])&&(o=(i?r(e,s,o):r(o))||o);return i&&o&&Qt(e,s,o),o};const Jt=new Map,Xt=t=>{class e extends t{constructor(...t){super(),this.touched=!1,this.error=!1,this.autofocus=!1,this.required=!1,this.forceAutoFill=!1,this.disabled=null,this.formDataProvider="",this._name="",this._value="",this.onValueAssign=t=>{this.setValueFromPublisher(t)},this.onFormValueAssign=t=>{this.setFormValueFromPublisher(t)},this.onFormDataInValidate=()=>{const t=this.getFormPublisher();t&&t.isFormValid.get()&&this.validateFormElement()}}get name(){return this._name}set name(t){this.hasAttribute("name")&&!this.forceAutoFill&&(t=this.getAttribute("name")),this._name=t,this.requestUpdate()}validateFormElement(){}updateDataValue(){const t=this.getAttribute("name");if(t){const e=this.getFormPublisher();e&&(e[t]=this.getValueForFormPublisher(),this.setFormValueFromPublisher(e[t].get()))}}getFormPublisher(){return this.formDataProvider||(this.formDataProvider=this.getAncestorAttributeValue("formDataProvider")),this.formDataProvider?h.get(this.formDataProvider):null}getValueForFormPublisher(){return this.value}setValueFromPublisher(t){this.value=t}setFormValueFromPublisher(t){this.value=t}get value(){return this._value}set value(t){null==t&&(t=""),s.isObject(t)&&Object.prototype.hasOwnProperty.call(t,"__value")&&null==t._value&&(t=""),this._value!=t&&(this._value=t,this.updateDataValue(),this.requestUpdate())}initPublisher(){let t=this.getFormPublisher();const e=this.hasAncestorAttribute("initFromPublisher")&&this._name&&t[this._name].get()?t[this._name].get():this.getAttribute("value");this._name&&this.publisher&&this.publisher[this._name].offAssign(this.onValueAssign),this._name&&t&&t[this._name].offAssign(this.onFormValueAssign),super.initPublisher(),this.name||(this._name=this.getAttribute("name")),this.value||(this._value=this.getAttribute("value")),this.publisher&&this._name&&this.publisher[this._name].onAssign(this.onValueAssign),t=this.getFormPublisher(),this._name&&t&&(t[this._name].onAssign(this.onFormValueAssign),t.onInvalidate(this.onFormDataInValidate)),this.updateDataValue(),e&&(this.value=e)}handleBlur(){this.touched=!0}handleChange(t){this.value=t.target.value;const e=new Event("change");this.dispatchEvent(e)}addKeyboardNavigation(){const t=this.getAncestorAttributeValue("data-keyboard-nav");if(!t)return;const e=t.split(" "),s=e[0];if(!s)return;for(const r of e){Jt.has(r)||Jt.set(r,[]);const t=Jt.get(r);-1==(null==t?void 0:t.indexOf(this))&&t.push(this)}const i=Jt.get(s);this.addEventListener("keydown",(t=>{var e;const s=t;if(!["ArrowDown","ArrowUp"].includes(s.key))return;const r="input:not([disabled]), button:not([disabled]), select:not([disabled]), textarea:not([disabled])",o=null==i?void 0:i.filter((t=>{var e;const s=null==(e=t.shadowRoot)?void 0:e.querySelector(r);if(!s)return!1;const i=window.getComputedStyle(s);return"none"!==i.display&&""!==i.display&&"none"!=i.pointerEvents&&"hidden"!==i.visibility&&s.getBoundingClientRect().width>0}));let n=null;if("ArrowDown"==s.key&&o){const t=o.indexOf(this);n=t==o.length-1?o[0]:o[t+1]}else if("ArrowUp"==s.key&&o){const t=o.indexOf(this);n=0==t?o[o.length-1]:o[t-1]}const a=null==(e=null==n?void 0:n.shadowRoot)?void 0:e.querySelector(r);a&&a.focus&&(a.focus(),t.preventDefault(),t.stopPropagation())}))}connectedCallback(){this.formDataProvider=this.getAncestorAttributeValue("formDataProvider"),super.connectedCallback(),this.addKeyboardNavigation()}disconnectedCallback(){super.disconnectedCallback(),this._name&&this.publisher&&this.publisher[this._name].offAssign(this.onValueAssign);const t=this.getFormPublisher();this._name&&t&&(t[this._name].offAssign(this.onFormValueAssign),t.offInvalidate(this.onFormDataInValidate))}}return Gt([f({type:Boolean,reflect:!0})],e.prototype,"touched",2),Gt([f({type:Boolean})],e.prototype,"error",2),Gt([f({type:Boolean})],e.prototype,"autofocus",2),Gt([f({type:Boolean})],e.prototype,"required",2),Gt([f()],e.prototype,"forceAutoFill",2),Gt([f({type:Boolean})],e.prototype,"disabled",2),Gt([f({type:String,attribute:"data-aria-label"})],e.prototype,"ariaLabel",2),Gt([f({type:String,attribute:"data-aria-labelledby"})],e.prototype,"ariaLabelledby",2),Gt([f()],e.prototype,"name",1),Gt([f()],e.prototype,"value",1),e};class te{static areEqual(t,e){return t.length===e.length&&t.every(((t,s)=>t===e[s]))}static from2d(t){return{to1D:()=>{let e=[];return t.forEach((t=>e=e.concat(t))),this.from(e)}}}static from(t){return{get:()=>t||[],everyItem:()=>({has:()=>({same:()=>({value:()=>({forKey:e=>{if(t.length<1)return!0;const s=(t[0]||{})[e];return t.every((t=>(t||{})[e]==s))}})})}),value:()=>({forKey:e=>te.from(t.map((t=>t[e])))}),copy:()=>({fromKey:e=>({toKey:s=>{t.forEach((t=>{t[s]=Array.isArray(t[e])?[...t[e]]:"object"==typeof t[e]&&null!=t[e]?{...t[e]}:t[e]}))}})})}),map:e=>te.from(t.map(e)),filter:e=>te.from(t.filter(e)),find:e=>t.find(e),some:e=>t.some(e),every:e=>t.every(e),group:()=>({byKey:e=>{const s=[],i=new Map;for(const r of t){const t=r[e];if(!i.has(t)){const r=s.length;i.set(t,r);const o={items:[]};o[e]=t,s.push(o)}s[i.get(t)].items.push(r)}return te.from(s)}}),without:()=>({duplicates:()=>({forKey:e=>{const s=[...new Set(t.map((t=>t[e])))];return te.from(s.map((s=>t.find((t=>t[e]==s)))))}}),itemsIn:e=>({havingSameValue:()=>({forKey:s=>te.from(t.filter((t=>{return e.every((i=t,r=s,t=>i[r]!=t[r]));var i,r})))})})})}}}const ee=class{static async delayPromise(t){return new Promise((e=>{setTimeout(e,t)}))}},se=te,ie=g,re=o,oe=e,ne=qt,ae=s,le=d,ce=h,he=r;window["concorde-utils"]=window["concorde-utils"]||{},window["concorde-utils"]={Utils:ee,Arrays:se,DataBindObserver:ie,Format:re,HTML:oe,LocationHandler:ne,Objects:ae,PublisherProxy:le,PublisherManager:ce,api:he};var de=Object.defineProperty,pe=Object.getOwnPropertyDescriptor,ue=(t,e,s,i)=>{for(var r,o=i>1?void 0:i?pe(e,s):e,n=t.length-1;n>=0;n--)(r=t[n])&&(o=(i?r(e,s,o):r(o))||o);return i&&o&&de(e,s,o),o};const ge=t=>{class e extends t{constructor(){super(...arguments),this._value="",this.forceAutoFill=!1,this.unique=null,this.radio=null,this.unCheckOnDisconnect=!1,this._checked=null,this.updateAllChecked=()=>{const t=this.getAttribute("name"),e=this.getCheckAllPublisher(),s=this.getFormPublisher();if((null==e?void 0:e.hasCheckAll.get())&&!this.checksAll()&&e&&s&&t){if(!s[this.name].get().length)return void(e.checkMode="noneChecked");null===this.checked?e.checkMode="someUnchecked":"noneChecked"!=e.checkMode.get()&&null!=e.checkMode.get()||(e.checkMode="someUnchecked");const i=s[t].get(),r=e.values.get();if(r&&r.length){let t=r.length;for(const e of r)-1==i.indexOf(e)&&(t-=1);t==r.length&&(e.checkMode="allChecked"),0==t&&(e.checkMode="noneChecked")}-1==r.indexOf(this.value)&&(this.checked=null)}},this.onChecksAllRequest=t=>{this.removeAttribute("allChecked"),this.removeAttribute("indeterminate"),"allChecked"==t&&(this.checked=!0,this.setAttribute("allChecked","")),"noneChecked"==t&&(this.checked=null),"someUnchecked"==t&&(this.checksAll()&&(this.checked="indeterminate"),this.setAttribute("indeterminate",""))}}get value(){return this._value}set value(t){if(this.value==t)return;if(this.hasAttribute("value")&&!this.forceAutoFill&&(t=this.getAttribute("value")),this._value==t)return;if(null==t)return;if(this._value=t,!this.value)return;const e=this.getFormPublisher();if(e&&this.name){let s=e[this.name].get();(this.radio||this.unique)&&(this.checked=s==t||null),Array.isArray(s)||(s=[]),-1!=s.indexOf(t)&&(this.checked=!0)}1==this.checked&&this.updateDataValue(),this.requestUpdate()}get checked(){return this._checked}set checked(t){if(this.setCheckedValue(t),this.checksAll()){const t=this.getCheckAllPublisher();if(t)if(!0===this.checked)t.checkMode="allChecked";else if(null===this.checked){t.checkMode="noneChecked";const e=this.getFormPublisher();e&&(e[this.name]=[])}}this.requestUpdate()}validateFormElement(){var t;const e=null==(t=this.shadowRoot)?void 0:t.querySelector("input");if(!e||e.checkValidity())return;const s=this.getFormPublisher();if(s){const t=s[this.name].get();if((this.unique||this.radio)&&null!==t&&t.toString().length>0)return;s.isFormValid=!1,e.reportValidity()}}checksAll(){return this.hasAttribute("checksAll")}setCheckedValue(t){this._checked!=t&&(this._checked=t,this.updateDataValue(),this.requestUpdate(),setTimeout((()=>this.updateAllChecked()),1))}handleChange(){const t=!0!==this.checked||(!!this.radio||null);this.checked=t;const e=new Event("change");this.dispatchEvent(e)}getValueForFormPublisher(){const t=this.getFormPublisher();if(!t)return null;let e=t[this.name].get();if(this.radio)return!0===this.checked&&null!=this.value?this.value:e;if(this.unique)return!0===this.checked&&null!=this.value?this.value:null;Array.isArray(e)||(e=[]),e=e.slice(0);const s=e.indexOf(this.value);return!0!==this.checked||-1!==s||this.checksAll()||e.push(this.value),null===this.checked&&-1!==s&&e.splice(s,1),e}setFormValueFromPublisher(t){this.unique||this.radio?this.checked=this.value==t||null:(Array.isArray(t)||(t=[]),this.checksAll()||(this.checked=-1!==t.indexOf(this.value)||null))}getCheckAllPublisher(){this.formDataProvider||(this.formDataProvider=this.getAncestorAttributeValue("formDataProvider"));const t=this.formDataProvider,e=this.getAttribute("name");return t&&e?ce.get(t+"/"+e+"/_available_values_"):null}disconnectedCallback(){super.disconnectedCallback();const t=this.getCheckAllPublisher();if(t&&(t.checkMode.offAssign(this.onChecksAllRequest),!this.checksAll())){const e=t.values.get().slice(0),s=e.indexOf(this.value);-1!=s&&(e.splice(s,1),t.values=e)}setTimeout((()=>this.updateAllChecked()),1)}connectedCallback(){super.connectedCallback();const t=this.getFormPublisher();if(t&&this.name){const e=t[this.name].get();e&&Array.isArray(e)&&-1!==e.indexOf(this.value)&&(this.checked=!0)}const e=this.getCheckAllPublisher();e&&(e.checkMode.onAssign(this.onChecksAllRequest),this.checksAll()&&(e.hasCheckAll=!0),e.values.get()||(e.values=[]),this.checksAll()||(e.values=[...e.values.get(),this.value])),this.hasAttribute("checked")&&(this.publisher&&!1===this.publisher.get().checked||setTimeout((()=>this.checked=!0),1))}}return ue([f()],e.prototype,"value",1),ue([f()],e.prototype,"forceAutoFill",2),ue([f({type:Boolean})],e.prototype,"unique",2),ue([f({type:Boolean})],e.prototype,"radio",2),ue([f({type:Boolean})],e.prototype,"unCheckOnDisconnect",2),ue([f()],e.prototype,"checked",1),e},me=t=>null!=t?t:ft,be=T`:host{--sc-fs:1rem;--sc-lh:1.2;font-size:var(--sc-fs);line-height:var(--sc-lh)}:host([size="2xs"]){--sc-fs:0.625rem}:host([size=xs]){--sc-fs:0.75rem}:host([size=sm]){--sc-fs:0.875rem}:host([size=lg]){--sc-fs:1.125rem}:host([size=xl]){--sc-fs:1.25rem}:host([size="2xl"]){--sc-fs:1.5rem}`;
63
+ */const Jt="important",Xt=" !"+Jt,te=Qt(class extends Gt{constructor(t){var e;if(super(t),t.type!==Zt||"style"!==t.name||(null==(e=t.strings)?void 0:e.length)>2)throw Error("The `styleMap` directive must be used in the `style` attribute and must be the only part in the attribute.")}render(t){return Object.keys(t).reduce(((e,s)=>{const i=t[s];return null==i?e:e+`${s=s.includes("-")?s:s.replace(/(?:^(webkit|moz|ms|o)|)(?=[A-Z])/g,"-$&").toLowerCase()}:${i};`}),"")}update(t,[e]){const{style:s}=t.element;if(void 0===this.ut)return this.ut=new Set(Object.keys(e)),this.render(e);for(const i of this.ut)null==e[i]&&(this.ut.delete(i),i.includes("-")?s.removeProperty(i):s[i]=null);for(const i in e){const t=e[i];if(null!=t){this.ut.add(i);const e="string"==typeof t&&t.endsWith(Xt);i.includes("-")||e?s.setProperty(i,e?t.slice(0,-11):t,e?Jt:""):s[i]=t}}return _t}});var ee=Object.defineProperty,se=Object.getOwnPropertyDescriptor,ie=(t,e,s,i)=>{for(var r,o=i>1?void 0:i?se(e,s):e,n=t.length-1;n>=0;n--)(r=t[n])&&(o=(i?r(e,s,o):r(o))||o);return i&&o&&ee(e,s,o),o};const re=new Map,oe=t=>{class e extends t{constructor(...t){super(),this.touched=!1,this.error=!1,this.autofocus=!1,this.required=!1,this.forceAutoFill=!1,this.disabled=null,this.formDataProvider="",this._name="",this._value="",this.onValueAssign=t=>{this.setValueFromPublisher(t)},this.onFormValueAssign=t=>{this.setFormValueFromPublisher(t)},this.onFormDataInValidate=()=>{const t=this.getFormPublisher();t&&t.isFormValid.get()&&this.validateFormElement()}}get name(){return this._name}set name(t){this.hasAttribute("name")&&!this.forceAutoFill&&(t=this.getAttribute("name")),this._name=t,this.requestUpdate()}validateFormElement(){}updateDataValue(){const t=this.getAttribute("name");if(t){const e=this.getFormPublisher();e&&(e[t]=this.getValueForFormPublisher(),this.setFormValueFromPublisher(e[t].get()))}}getFormPublisher(){return this.formDataProvider||(this.formDataProvider=this.getAncestorAttributeValue("formDataProvider")),this.formDataProvider?d.get(this.formDataProvider):null}getValueForFormPublisher(){return this.value}setValueFromPublisher(t){this.value=t}setFormValueFromPublisher(t){this.value=t}get value(){return this._value}set value(t){null==t&&(t=""),i.isObject(t)&&Object.prototype.hasOwnProperty.call(t,"__value")&&null==t._value&&(t=""),this._value!=t&&(this._value=t,this.updateDataValue(),this.requestUpdate())}initPublisher(){let t=this.getFormPublisher();const e=this.hasAncestorAttribute("initFromPublisher")&&this._name&&t[this._name].get()?t[this._name].get():this.getAttribute("value");this._name&&this.publisher&&this.publisher[this._name].offAssign(this.onValueAssign),this._name&&t&&t[this._name].offAssign(this.onFormValueAssign),super.initPublisher(),this.name||(this._name=this.getAttribute("name")),this.value||(this._value=this.getAttribute("value")),this.publisher&&this._name&&this.publisher[this._name].onAssign(this.onValueAssign),t=this.getFormPublisher(),this._name&&t&&(t[this._name].onAssign(this.onFormValueAssign),t.onInvalidate(this.onFormDataInValidate)),this.updateDataValue(),e&&(this.value=e)}handleBlur(){this.touched=!0}handleChange(t){this.value=t.target.value;const e=new Event("change");this.dispatchEvent(e)}addKeyboardNavigation(){const t=this.getAncestorAttributeValue("data-keyboard-nav");if(!t)return;const e=t.split(" "),s=e[0];if(!s)return;for(const r of e){re.has(r)||re.set(r,[]);const t=re.get(r);-1==(null==t?void 0:t.indexOf(this))&&t.push(this)}const i=re.get(s);this.addEventListener("keydown",(t=>{var e;const s=t;if(!["ArrowDown","ArrowUp"].includes(s.key))return;const r="input:not([disabled]), button:not([disabled]), select:not([disabled]), textarea:not([disabled])",o=null==i?void 0:i.filter((t=>{var e;const s=null==(e=t.shadowRoot)?void 0:e.querySelector(r);if(!s)return!1;const i=window.getComputedStyle(s);return"none"!==i.display&&""!==i.display&&"none"!=i.pointerEvents&&"hidden"!==i.visibility&&s.getBoundingClientRect().width>0}));let n=null;if("ArrowDown"==s.key&&o){const t=o.indexOf(this);n=t==o.length-1?o[0]:o[t+1]}else if("ArrowUp"==s.key&&o){const t=o.indexOf(this);n=0==t?o[o.length-1]:o[t-1]}const a=null==(e=null==n?void 0:n.shadowRoot)?void 0:e.querySelector(r);a&&a.focus&&(a.focus(),t.preventDefault(),t.stopPropagation())}))}connectedCallback(){this.formDataProvider=this.getAncestorAttributeValue("formDataProvider"),super.connectedCallback(),this.addKeyboardNavigation()}disconnectedCallback(){super.disconnectedCallback(),this._name&&this.publisher&&this.publisher[this._name].offAssign(this.onValueAssign);const t=this.getFormPublisher();this._name&&t&&(t[this._name].offAssign(this.onFormValueAssign),t.offInvalidate(this.onFormDataInValidate))}}return ie([U({type:Boolean,reflect:!0})],e.prototype,"touched",2),ie([U({type:Boolean})],e.prototype,"error",2),ie([U({type:Boolean})],e.prototype,"autofocus",2),ie([U({type:Boolean})],e.prototype,"required",2),ie([U({type:Boolean})],e.prototype,"forceAutoFill",2),ie([U({type:Boolean})],e.prototype,"disabled",2),ie([U({type:String,attribute:"data-aria-label"})],e.prototype,"ariaLabel",2),ie([U({type:String,attribute:"data-aria-labelledby"})],e.prototype,"ariaLabelledby",2),ie([U()],e.prototype,"name",1),ie([U()],e.prototype,"value",1),e};const ne=class{static async delayPromise(t){return new Promise((e=>{setTimeout(e,t)}))}},ae=class t{static areEqual(t,e){return t.length===e.length&&t.every(((t,s)=>t===e[s]))}static from2d(t){return{to1D:()=>{let e=[];return t.forEach((t=>e=e.concat(t))),this.from(e)}}}static from(e){return{get:()=>e||[],everyItem:()=>({has:()=>({same:()=>({value:()=>({forKey:t=>{if(e.length<1)return!0;const s=(e[0]||{})[t];return e.every((e=>(e||{})[t]==s))}})})}),value:()=>({forKey:s=>t.from(e.map((t=>t[s])))}),copy:()=>({fromKey:t=>({toKey:s=>{e.forEach((e=>{e[s]=Array.isArray(e[t])?[...e[t]]:"object"==typeof e[t]&&null!=e[t]?{...e[t]}:e[t]}))}})})}),map:s=>t.from(e.map(s)),filter:s=>t.from(e.filter(s)),find:t=>e.find(t),some:t=>e.some(t),every:t=>e.every(t),group:()=>({byKey:s=>{const i=[],r=new Map;for(const t of e){const e=t[s];if(!r.has(e)){const t=i.length;r.set(e,t);const o={items:[]};o[s]=e,i.push(o)}i[r.get(e)].items.push(t)}return t.from(i)}}),without:()=>({duplicates:()=>({forKey:s=>{const i=[...new Set(e.map((t=>t[s])))];return t.from(i.map((t=>e.find((e=>e[s]==t)))))}}),itemsIn:s=>({havingSameValue:()=>({forKey:i=>t.from(e.filter((t=>{return s.every((e=t,r=i,t=>e[r]!=t[r]));var e,r})))})})})}}},le=b,ce=n,he=s,de=Kt,pe=i,ue=p,ge=d,be=o;window["concorde-utils"]=window["concorde-utils"]||{},window["concorde-utils"]={Utils:ne,Arrays:ae,DataBindObserver:le,Format:ce,HTML:he,LocationHandler:de,Objects:pe,PublisherProxy:ue,PublisherManager:ge,api:be};var me=Object.defineProperty,fe=Object.getOwnPropertyDescriptor,ve=(t,e,s,i)=>{for(var r,o=i>1?void 0:i?fe(e,s):e,n=t.length-1;n>=0;n--)(r=t[n])&&(o=(i?r(e,s,o):r(o))||o);return i&&o&&me(e,s,o),o};const ye=t=>{class e extends t{constructor(){super(...arguments),this._value="",this.forceAutoFill=!1,this.unique=null,this.radio=null,this.unCheckOnDisconnect=!1,this._checked=null,this.updateAllChecked=()=>{const t=this.getAttribute("name"),e=this.getCheckAllPublisher(),s=this.getFormPublisher();if((null==e?void 0:e.hasCheckAll.get())&&!this.checksAll()&&e&&s&&t){if(!s[this.name].get().length)return void(e.checkMode="noneChecked");null===this.checked?e.checkMode="someUnchecked":"noneChecked"!=e.checkMode.get()&&null!=e.checkMode.get()||(e.checkMode="someUnchecked");const i=s[t].get(),r=e.values.get();if(r&&r.length){let t=r.length;for(const e of r)-1==i.indexOf(e)&&(t-=1);t==r.length&&(e.checkMode="allChecked"),0==t&&(e.checkMode="noneChecked")}-1==r.indexOf(this.value)&&(this.checked=null)}},this.onChecksAllRequest=t=>{this.removeAttribute("allChecked"),this.removeAttribute("indeterminate"),"allChecked"==t&&(this.checked=!0,this.setAttribute("allChecked","")),"noneChecked"==t&&(this.checked=null),"someUnchecked"==t&&(this.checksAll()&&(this.checked="indeterminate"),this.setAttribute("indeterminate",""))}}get value(){return this._value}set value(t){if(this.value==t)return;if(this.hasAttribute("value")&&!this.forceAutoFill&&(t=this.getAttribute("value")),this._value==t)return;if(null==t)return;if(this._value=t,!this.value)return;const e=this.getFormPublisher();if(e&&this.name){let s=e[this.name].get();(this.radio||this.unique)&&(this.checked=s==t||null),Array.isArray(s)||(s=[]),-1!=s.indexOf(t)&&(this.checked=!0)}1==this.checked&&this.updateDataValue(),this.requestUpdate()}get checked(){return this._checked}set checked(t){if(this.setCheckedValue(t),this.checksAll()){const t=this.getCheckAllPublisher();if(t)if(!0===this.checked)t.checkMode="allChecked";else if(null===this.checked){t.checkMode="noneChecked";const e=this.getFormPublisher();e&&(e[this.name]=[])}}this.requestUpdate()}validateFormElement(){var t;const e=null==(t=this.shadowRoot)?void 0:t.querySelector("input");if(!e||e.checkValidity())return;const s=this.getFormPublisher();if(s){const t=s[this.name].get();if((this.unique||this.radio)&&null!==t&&t.toString().length>0)return;s.isFormValid=!1,e.reportValidity()}}checksAll(){return this.hasAttribute("checksAll")}setCheckedValue(t){this._checked!=t&&(this._checked=t,this.updateDataValue(),this.requestUpdate(),setTimeout((()=>this.updateAllChecked()),1))}handleChange(){const t=!0!==this.checked||(!!this.radio||null);this.checked=t;const e=new Event("change");this.dispatchEvent(e)}getValueForFormPublisher(){const t=this.getFormPublisher();if(!t)return null;let e=t[this.name].get();if(this.radio)return!0===this.checked&&null!=this.value?this.value:e;if(this.unique)return!0===this.checked&&null!=this.value?this.value:null;Array.isArray(e)||(e=[]),e=e.slice(0);const s=e.indexOf(this.value);return!0!==this.checked||-1!==s||this.checksAll()||e.push(this.value),null===this.checked&&-1!==s&&e.splice(s,1),e}setFormValueFromPublisher(t){this.unique||this.radio?this.checked=this.value==t||null:(Array.isArray(t)||(t=[]),this.checksAll()||(this.checked=-1!==t.indexOf(this.value)||null))}getCheckAllPublisher(){this.formDataProvider||(this.formDataProvider=this.getAncestorAttributeValue("formDataProvider"));const t=this.formDataProvider,e=this.getAttribute("name");return t&&e?ge.get(t+"/"+e+"/_available_values_"):null}disconnectedCallback(){super.disconnectedCallback();const t=this.getCheckAllPublisher();if(t&&(t.checkMode.offAssign(this.onChecksAllRequest),!this.checksAll())){const e=t.values.get().slice(0),s=e.indexOf(this.value);-1!=s&&(e.splice(s,1),t.values=e)}setTimeout((()=>this.updateAllChecked()),1)}connectedCallback(){super.connectedCallback();const t=this.getFormPublisher();if(t&&this.name){const e=t[this.name].get();e&&Array.isArray(e)&&-1!==e.indexOf(this.value)&&(this.checked=!0)}const e=this.getCheckAllPublisher();e&&(e.checkMode.onAssign(this.onChecksAllRequest),this.checksAll()&&(e.hasCheckAll=!0),e.values.get()||(e.values=[]),this.checksAll()||(e.values=[...e.values.get(),this.value])),this.hasAttribute("checked")&&(this.publisher&&!1===this.publisher.get().checked||setTimeout((()=>this.checked=!0),1))}}return ve([U()],e.prototype,"value",1),ve([U()],e.prototype,"forceAutoFill",2),ve([U({type:Boolean})],e.prototype,"unique",2),ve([U({type:Boolean})],e.prototype,"radio",2),ve([U({type:Boolean})],e.prototype,"unCheckOnDisconnect",2),ve([U()],e.prototype,"checked",1),e},we=t=>t??kt,xe=_`
64
+ /*SIZES*/
65
+ :host {
66
+ --sc-fs: 1rem;
67
+ --sc-lh: 1.2;
68
+ font-size: var(--sc-fs);
69
+ line-height: var(--sc-lh);
70
+ }
71
+ :host([size="2xs"]) {
72
+ --sc-fs: 0.625rem;
73
+ }
74
+ :host([size="xs"]) {
75
+ --sc-fs: 0.75rem;
76
+ }
77
+ :host([size="sm"]) {
78
+ --sc-fs: 0.875rem;
79
+ }
80
+ :host([size="lg"]) {
81
+ --sc-fs: 1.125rem;
82
+ }
83
+ :host([size="xl"]) {
84
+ --sc-fs: 1.25rem;
85
+ }
86
+ :host([size="2xl"]) {
87
+ --sc-fs: 1.5rem;
88
+ }
89
+ `;
70
90
  /**
71
91
  * @license
72
92
  * Copyright 2018 Google LLC
73
93
  * SPDX-License-Identifier: BSD-3-Clause
74
- */var fe=Object.defineProperty,ve=Object.getOwnPropertyDescriptor,ye=(t,e,s,i)=>{for(var r,o=i>1?void 0:i?ve(e,s):e,n=t.length-1;n>=0;n--)(r=t[n])&&(o=(i?r(e,s,o):r(o))||o);return i&&o&&fe(e,s,o),o};let we=class extends(ge(Xt(D(zt)))){constructor(){super(...arguments),this.type="default",this.variant="default",this.shape="default",this.direction="row",this.alignItems="center",this.justify="center",this.minWidth="0",this.icon=!1,this.autoActive="partial",this.loading=!1,this.hasPrefix=!1,this.hasSuffix=!1,this._href="",this.goBack=null,this.pushState=!1,this.active=!1,this._location=""}set href(t){this._href=t,this.href&&0!=this.href.indexOf("http")?qt.onChange(this):qt.offChange(this),this.requestUpdate()}get href(){return this._href}handleNavigation(t){t.preventDefault(),qt.changeFromComponent(this)}handleChange(t){if(super.handleChange(),(this.pushState||null!==this.goBack)&&(null==t||t.preventDefault(),null==t||t.stopPropagation(),qt.changeFromComponent(this)),this.hasAttribute("reset")){const t=this.getAttribute("reset"),e=t?ce.get(t):this.getFormPublisher();e&&e.set({})}}connectedCallback(){super.connectedCallback()}setCheckedValue(t){if(this.name){if(t?this.setAttribute("active","true"):this.removeAttribute("active"),t==this._checked)return;super.setCheckedValue(t)}}disconnectedCallback(){qt.offChange(this),super.disconnectedCallback()}get location(){return this._location}set location(t){this._location=t,this.requestUpdate()}updated(t){(t.has("location")||t.has("href")||t.has("autoActive"))&&qt.updateComponentActiveState(this)}render(){const t={flexDirection:this.direction,alignItems:this.alignItems,justifyContent:this.justify,align:this.align,minWidth:this.minWidth},e=mt`<button part="button" class="${this.hasPrefix||this.hasSuffix?"has-prefix-or-suffix":""}" style="${Zt(t)}" aria-label="${me(this.ariaLabel)}" aria-labelledby="${me(this.ariaLabelledby)}" @click="${this.handleChange}"><slot @slotchange="${this.onSlotChange}" part="prefix" name="prefix"></slot><slot part="main" class="main-slot"></slot><slot @slotchange="${this.onSlotChange}" part="suffix" name="suffix"></slot>${1==this.loading?mt`<sonic-icon name="loader" class="loader"></sonic-icon>`:""}</button>`;return this.href?mt`<a href="${this.href}" target="${me(this.target)}" aria-label="${me(this.ariaLabel)}" aria-labelledby="${me(this.ariaLabelledby)}" @click="${this.pushState||null!==this.goBack?this.handleNavigation:null}">${e}</a>`:mt`${e}`}onSlotChange(){var t,e;this.hasPrefix=!!(null==(t=this.prefixes)?void 0:t.length),this.hasSuffix=!!(null==(e=this.suffixes)?void 0:e.length)}};we.styles=[be,T`*{box-sizing:border-box}:host{--sc-btn-gap:0.35em;--sc-btn-py:0.25em;--sc-btn-px:1.1em;--sc-btn-fs:var(--sc-fs, 1rem);--sc-btn-fw:var(--sc-btn-font-weight);--sc-btn-ff:var(--sc-btn-font-family);--sc-btn-height:var(--sc-form-height);--btn-color:var(--sc-btn-color, var(--sc-base-content));--btn-bg:var(--sc-btn-bg, var(--sc-base-100));--sc-btn-border-style:solid;--sc-btn-border-width:var(--sc-form-border-width);--sc-btn-border-color:transparent;--btn-outline-bg-hover:var(
75
- --sc-btn-outline-bg-hover,
76
- var(--sc-base-100)
77
- );--sc-btn-ghost-bg-hover:var(--sc-base-100);--sc-btn-active-color:var(--sc-base);--sc-btn-hover-filter:brightness(0.98);--sc-btn-active-filter:brightness(0.97);--sc-btn-active-bg:var(--sc-base-content);--sc-item-rounded-tr:var(--sc-btn-rounded);--sc-item-rounded-tl:var(--sc-btn-rounded);--sc-item-rounded-bl:var(--sc-btn-rounded);--sc-item-rounded-br:var(--sc-btn-rounded);display:inline-flex;vertical-align:middle;box-sizing:border-box;-webkit-print-color-adjust:exact}:host a{display:contents;color:unset}:host button{display:flex;flex:1;box-sizing:border-box;align-items:center;justify-content:center;font-family:var(--sc-btn-ff);font-weight:var(--sc-btn-fw);font-size:var(--sc-btn-fs);cursor:pointer;text-align:center;line-height:1.1;border-radius:var(--sc-item-rounded-tl) var(--sc-item-rounded-tr) var(--sc-item-rounded-br) var(--sc-item-rounded-bl);background:var(--btn-bg);color:var(--btn-color);padding-top:var(--sc-btn-py);padding-bottom:var(--sc-btn-py);padding-left:var(--sc-btn-px);padding-right:var(--sc-btn-px);border:var(--sc-btn-border-width) var(--sc-btn-border-style) var(--sc-btn-border-color);min-height:var(--sc-btn-height)}:host button.has-prefix-or-suffix{gap:var(--sc-btn-gap)}:host button:focus,:host button:hover{filter:var(--sc-btn-hover-filter)}:host button:active{filter:var(--sc-btn-active-filter)}:host([type=default]) button{--btn-color:var(--sc-base-content);--btn-bg:var(--sc-base-100)}:host([type=primary]) button{--btn-color:var(--sc-primary-content);--btn-bg:var(--sc-primary)}:host([type=warning]) button{--btn-color:var(--sc-warning-content);--btn-bg:var(--sc-warning)}:host([type=danger]) button{--btn-color:var(--sc-danger-content);--btn-bg:var(--sc-danger)}:host([type=info]) button{--btn-color:var(--sc-info-content);--btn-bg:var(--sc-info)}:host([type=success]) button{--btn-color:var(--sc-success-content);--btn-bg:var(--sc-success)}:host([type=neutral]) button{--btn-color:var(--sc-base);--btn-bg:var(--sc-base-600)}:host([type=custom]) button{--btn-color:var(--sc-btn-custom-color);--btn-bg:var(--sc-btn-custom-bg)}:host([variant=unstyled]){display:inline-block}:host([variant=unstyled]) button{all:unset;display:contents;cursor:pointer;--sc-btn-height:auto;--sc-btn-width:auto}:host(:not([disabled])) button:focus{box-shadow:0 0 0 .18rem var(--sc-base-300);border-color:var(--sc-base-300)!important;outline:0}:host([variant=ghost][type]) button{color:var(--btn-bg);background:0 0}:host([variant=ghost][type=default]) button{color:var(--btn-color);background:0 0}:host([variant=ghost]) button:hover{background:var(--sc-btn-ghost-bg-hover);filter:none}:host([active][variant=ghost]) button{background:var(--sc-btn-ghost-bg-hover);filter:none}:host([active][variant=ghost]) button:hover{filter:var(--sc-btn-hover-filter)}:host([variant=outline][type]) button{border-color:var(--btn-bg);color:var(--btn-bg);background:0 0}:host([variant=outline][type=default]) button{border-color:var(--sc-base-400);color:var(--sc-base-500);background:0 0}:host([variant=outline]) button:hover{background:var(--btn-outline-bg-hover)}:host([variant=link]:not([size])){vertical-align:baseline;margin-left:.25em;margin-right:.25em}:host([variant=link]:not([size])){font-size:inherit}:host([variant=link]) button{text-decoration:underline;padding:0;background:0 0;border:none;font-size:inherit;min-height:0;color:inherit}:host([variant=link][type]) button{color:var(--btn-bg)}:host([variant=link][type=default]) button{color:inherit}:host([variant=link]) button:focus,:host([variant=link]) button:hover{text-decoration:none}:host([shape=circle]) button{border-radius:50%}:host([shape=circle]) button,:host([shape=square]) button{width:var(--sc-btn-height);height:var(--sc-btn-height);padding:0;align-items:center;justify-content:0;text-align:center!important}:host([shape=block]),:host([shape=block]) button{width:100%}:host([disabled]){opacity:.3;pointer-events:none;user-select:none}:host([active]:not([variant=ghost]):not([variant=unstyled])) button{background:var(--sc-btn-active-bg);color:var(--sc-btn-active-color);border-color:var(--sc-btn-active-bg)}:host([align=left]) button{text-align:left}:host([align=right]) button{text-align:right}.main-slot{flex-grow:1;display:block}:host([minWidth]) .main-slot{flex-grow:0}slot[name=prefix],slot[name=suffix]{flex-shrink:0}::slotted(sonic-icon){min-width:1em;text-align:center}:host([icon]) ::slotted(sonic-icon){font-size:1.2em;vertical-align:middle}sonic-tooltip{display:contents}:host(:not([active])) ::slotted([swap=on]){display:none!important}:host([active]) ::slotted([swap=off]){display:none!important}:host([loading]){pointer-events:none;position:relative}:host([loading]) slot{opacity:0!important;pointer-events:none}:host([loading]) .loader{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);display:flex;align-items:center;justify-content:center;line-height:0;height:var(--sc-btn-ff);width:var(--sc-btn-ff);animation:rotation 2s infinite linear}@keyframes rotation{from{transform-origin:50% 50%;transform:translate(-50%,-50%) rotate(0)}to{transform-origin:50% 50%;transform:translate(-50%,-50%) rotate(359deg)}}`],ye([f({type:String,reflect:!0})],we.prototype,"type",2),ye([f({type:String,reflect:!0})],we.prototype,"variant",2),ye([f({type:String,reflect:!0})],we.prototype,"size",2),ye([f({type:String,reflect:!0})],we.prototype,"shape",2),ye([f({type:String})],we.prototype,"direction",2),ye([f({type:String,reflect:!0})],we.prototype,"alignItems",2),ye([f({type:String})],we.prototype,"justify",2),ye([f({type:String,reflect:!0})],we.prototype,"align",2),ye([f({type:String})],we.prototype,"minWidth",2),ye([f({type:Boolean,reflect:!0})],we.prototype,"icon",2),ye([f({type:String})],we.prototype,"autoActive",2),ye([f({type:Boolean,reflect:!0})],we.prototype,"loading",2),ye([v()],we.prototype,"hasPrefix",2),ye([v()],we.prototype,"hasSuffix",2),ye([k({flatten:!0,slot:"prefix"})],we.prototype,"prefixes",2),ye([k({flatten:!0,slot:"suffix"})],we.prototype,"suffixes",2),ye([f({type:String})],we.prototype,"target",2),ye([f({type:String})],we.prototype,"href",1),ye([f({type:String})],we.prototype,"goBack",2),ye([f({type:Boolean})],we.prototype,"pushState",2),ye([f({type:Boolean,reflect:!0})],we.prototype,"active",2),we=ye([m("sonic-button")],we);const xe=T`:host([align=left]) .sonic-loader--inline{margin-left:0}:host([align=right]) .sonic-loader--inline{margin-left:auto;margin-right:0}.sonic-loader--inline{display:block;position:relative;width:80px;height:80px;margin:auto;z-index:20}.sonic-loader--inline div{position:absolute;top:33px;width:13px;height:13px;border-radius:50%;background:var(--sc-loader-bg);animation-timing-function:cubic-bezier(0,1,1,0)}.sonic-loader--inline div:nth-child(1){left:8px;animation:lds-ellipsis1 .6s infinite}.sonic-loader--inline div:nth-child(2){left:8px;animation:lds-ellipsis2 .6s infinite}.sonic-loader--inline div:nth-child(3){left:32px;animation:lds-ellipsis2 .6s infinite}.sonic-loader--inline div:nth-child(4){left:56px;animation:lds-ellipsis3 .6s infinite}@keyframes lds-ellipsis1{0%{transform:scale(0)}100%{transform:scale(1)}}@keyframes lds-ellipsis3{0%{transform:scale(1)}100%{transform:scale(0)}}@keyframes lds-ellipsis2{0%{transform:translate(0,0)}100%{transform:translate(24px,0)}}`,_e=T`@keyframes sonic-loader--fixed{0%{transform:scale(0);opacity:0}5%{opacity:1}70%{opacity:90%}100%{transform:scale(1);opacity:0}}.sonic-loader--fixed{position:fixed;top:50%;left:50%;transform:transateY(-50%) translateX(-50%);z-index:999}.sonic-loader--fixed>div:nth-child(2){animation-delay:-.5s}.sonic-loader--fixed>div:nth-child(3){animation-delay:-.2s}.sonic-loader--fixed>div:nth-child(4){display:none!important}.sonic-loader--fixed>div{background-color:var(--sc-loader-bg);width:5rem;height:5rem;border-radius:100%;margin:2px;animation-fill-mode:both;position:absolute;top:0;opacity:0;margin:0;top:-2.5rem;left:-2.5rem;width:5rem;height:5rem;animation:sonic-loader--fixed 1s 0s linear infinite}`;var ke=Object.defineProperty,Ae=Object.getOwnPropertyDescriptor,Pe=(t,e,s,i)=>{for(var r,o=i>1?void 0:i?Ae(e,s):e,n=t.length-1;n>=0;n--)(r=t[n])&&(o=(i?r(e,s,o):r(o))||o);return i&&o&&ke(e,s,o),o};let Ce=class extends zt{constructor(){super(...arguments),this.mode="fixed"}static show(t){Ce.loader||(Ce.loader=document.createElement("sonic-loader"));const e=Ce.loader;t||(t={}),t.mode&&e.setAttribute("mode",t.mode),t.container||(t.container=document.querySelector("sonic-theme")||document.body,t.mode="fixed"),t.container.appendChild(e),Ce.callCounter++}static hide(){Ce.callCounter--,Ce.callCounter>0||Ce.loader&&Ce.loader.remove()}render(){return mt`<div class="sonic-loader sonic-loader--${this.mode}"><div></div><div></div><div></div><div></div></div>`}};Ce.styles=[xe,_e,T`:host{--sc-loader-bg:var(--sc-primary, currentColor);pointer-events:none}.sonic-loader{opacity:0;animation:showLoader .5s .5s forwards}.sonic-loader--inline{animation-delay:0s}@keyframes showLoader{0%{opacity:0}100%{opacity:1}}`],Ce.callCounter=0,Pe([f({type:String})],Ce.prototype,"mode",2),Ce=Pe([m("sonic-loader")],Ce);
94
+ */var _e=Object.defineProperty,ke=Object.getOwnPropertyDescriptor,Ae=(t,e,s,i)=>{for(var r,o=i>1?void 0:i?ke(e,s):e,n=t.length-1;n>=0;n--)(r=t[n])&&(o=(i?r(e,s,o):r(o))||o);return i&&o&&_e(e,s,o),o};let Pe=class extends(ye(oe(G(Rt)))){constructor(){super(...arguments),this.type="default",this.variant="default",this.shape="default",this.direction="row",this.alignItems="center",this.justify="center",this.minWidth="0",this.icon=!1,this.autoActive="partial",this.loading=!1,this.hasPrefix=!1,this.hasSuffix=!1,this._href="",this.goBack=null,this.pushState=!1,this.active=!1,this._location=""}set href(t){this._href=t,this.href&&0!=this.href.indexOf("http")?Kt.onChange(this):Kt.offChange(this),this.requestUpdate()}get href(){return this._href}handleNavigation(t){t.preventDefault(),Kt.changeFromComponent(this)}handleChange(t){if(super.handleChange(),(this.pushState||null!==this.goBack)&&(null==t||t.preventDefault(),null==t||t.stopPropagation(),Kt.changeFromComponent(this)),this.hasAttribute("reset")){const t=this.getAttribute("reset"),e=t?ge.get(t):this.getFormPublisher();e&&e.set({})}}connectedCallback(){super.connectedCallback()}setCheckedValue(t){if(this.name){if(t?this.setAttribute("active","true"):this.removeAttribute("active"),t==this._checked)return;super.setCheckedValue(t)}}disconnectedCallback(){Kt.offChange(this),super.disconnectedCallback()}set location(t){"string"==typeof t&&(this._location=t,Kt.updateComponentActiveState(this))}get location(){return this._location}willUpdate(t){(t.has("href")||t.has("autoActive"))&&Kt.updateComponentActiveState(this)}render(){const t={flexDirection:this.direction,alignItems:this.alignItems,justifyContent:this.justify,align:this.align,minWidth:this.minWidth},e=xt`
95
+ <button
96
+ part="button"
97
+ class=${this.hasPrefix||this.hasSuffix?"has-prefix-or-suffix":""}
98
+ style=${te(t)}
99
+ aria-label=${we(this.ariaLabel)}
100
+ aria-labelledby=${we(this.ariaLabelledby)}
101
+ @click=${this.handleChange}
102
+ >
103
+ <slot @slotchange=${this.onSlotChange} part="prefix" name="prefix"></slot>
104
+ <slot part="main" class="main-slot"></slot>
105
+ <slot @slotchange=${this.onSlotChange} part="suffix" name="suffix"></slot>
106
+ ${1==this.loading?xt`<sonic-icon name="loader" class="loader"></sonic-icon>`:""}
107
+ </button>
108
+ `;return this.href?xt`<a
109
+ href="${this.href}"
110
+ target=${we(this.target)}
111
+ aria-label=${we(this.ariaLabel)}
112
+ aria-labelledby=${we(this.ariaLabelledby)}
113
+ @click=${this.pushState||null!==this.goBack?this.handleNavigation:null}
114
+ >${e}</a
115
+ >`:xt`${e}`}onSlotChange(){var t,e;this.hasPrefix=!!(null==(t=this.prefixes)?void 0:t.length),this.hasSuffix=!!(null==(e=this.suffixes)?void 0:e.length)}};Pe.styles=[xe,_`
116
+ * {
117
+ box-sizing: border-box;
118
+ }
119
+ :host {
120
+ --sc-btn-gap: 0.35em;
121
+ --sc-btn-py: 0.25em;
122
+ --sc-btn-px: 1.1em;
123
+ --sc-btn-fs: var(--sc-fs, 1rem);
124
+ --sc-btn-fw: var(--sc-btn-font-weight);
125
+ --sc-btn-ff: var(--sc-btn-font-family);
126
+
127
+ --sc-btn-height: var(--sc-form-height);
128
+ --btn-color: var(--sc-btn-color, var(--sc-base-content));
129
+ --btn-bg: var(--sc-btn-bg, var(--sc-base-100));
130
+
131
+ --sc-btn-border-style: solid;
132
+ --sc-btn-border-width: var(--sc-form-border-width);
133
+ --sc-btn-border-color: transparent;
134
+
135
+ --btn-outline-bg-hover: var(--sc-btn-outline-bg-hover, var(--sc-base-100));
136
+ --sc-btn-ghost-bg-hover: var(--sc-base-100);
137
+
138
+ --sc-btn-active-color: var(--sc-base);
139
+ --sc-btn-hover-filter: brightness(0.98);
140
+ --sc-btn-active-filter: brightness(0.97);
141
+ --sc-btn-active-bg: var(--sc-base-content);
142
+
143
+ --sc-item-rounded-tr: var(--sc-btn-rounded);
144
+ --sc-item-rounded-tl: var(--sc-btn-rounded);
145
+ --sc-item-rounded-bl: var(--sc-btn-rounded);
146
+ --sc-item-rounded-br: var(--sc-btn-rounded);
147
+
148
+ display: inline-flex;
149
+ vertical-align: middle;
150
+ box-sizing: border-box;
151
+ -webkit-print-color-adjust: exact;
152
+ }
153
+
154
+ :host a {
155
+ display: contents;
156
+ color: unset;
157
+ }
158
+
159
+ :host button {
160
+ display: flex;
161
+ flex: 1;
162
+ box-sizing: border-box;
163
+ align-items: center;
164
+ justify-content: center;
165
+
166
+ font-family: var(--sc-btn-ff);
167
+ font-weight: var(--sc-btn-fw);
168
+ font-size: var(--sc-btn-fs);
169
+
170
+ cursor: pointer;
171
+ text-align: center;
172
+ line-height: 1.1;
173
+ border-radius: var(--sc-item-rounded-tl) var(--sc-item-rounded-tr) var(--sc-item-rounded-br) var(--sc-item-rounded-bl);
174
+
175
+ background: var(--btn-bg);
176
+ color: var(--btn-color);
177
+
178
+ padding-top: var(--sc-btn-py);
179
+ padding-bottom: var(--sc-btn-py);
180
+ padding-left: var(--sc-btn-px);
181
+ padding-right: var(--sc-btn-px);
182
+
183
+ border: var(--sc-btn-border-width) var(--sc-btn-border-style) var(--sc-btn-border-color);
184
+ min-height: var(--sc-btn-height);
185
+ }
186
+
187
+ :host button.has-prefix-or-suffix {
188
+ gap: var(--sc-btn-gap);
189
+ }
190
+
191
+ :host button:focus,
192
+ :host button:hover {
193
+ filter: var(--sc-btn-hover-filter);
194
+ }
195
+
196
+ :host button:active {
197
+ filter: var(--sc-btn-active-filter);
198
+ }
199
+
200
+ /*TYPES*/
201
+ :host([type="default"]) button {
202
+ --btn-color: var(--sc-base-content);
203
+ --btn-bg: var(--sc-base-100);
204
+ }
205
+
206
+ :host([type="primary"]) button {
207
+ --btn-color: var(--sc-primary-content);
208
+ --btn-bg: var(--sc-primary);
209
+ }
210
+ :host([type="warning"]) button {
211
+ --btn-color: var(--sc-warning-content);
212
+ --btn-bg: var(--sc-warning);
213
+ }
214
+ :host([type="danger"]) button {
215
+ --btn-color: var(--sc-danger-content);
216
+ --btn-bg: var(--sc-danger);
217
+ }
218
+ :host([type="info"]) button {
219
+ --btn-color: var(--sc-info-content);
220
+ --btn-bg: var(--sc-info);
221
+ }
222
+ :host([type="success"]) button {
223
+ --btn-color: var(--sc-success-content);
224
+ --btn-bg: var(--sc-success);
225
+ }
226
+ :host([type="neutral"]) button {
227
+ --btn-color: var(--sc-base);
228
+ --btn-bg: var(--sc-base-600);
229
+ }
230
+ :host([type="custom"]) button {
231
+ --btn-color: var(--sc-btn-custom-color);
232
+ --btn-bg: var(--sc-btn-custom-bg);
233
+ }
234
+
235
+ /*UNSTYLED*/
236
+ :host([variant="unstyled"]) {
237
+ display: inline-block;
238
+ }
239
+
240
+ :host([variant="unstyled"]) button {
241
+ all: unset;
242
+ display: contents;
243
+ cursor: pointer;
244
+ --sc-btn-height: auto;
245
+ --sc-btn-width: auto;
246
+ }
247
+
248
+ /*GESTION DU FOCUS*/
249
+ :host(:not([disabled])) button:focus {
250
+ box-shadow: 0 0 0 0.18rem var(--sc-base-300);
251
+ border-color: var(--sc-base-300) !important;
252
+ outline: none;
253
+ }
254
+
255
+ /*GHOST*/
256
+ :host([variant="ghost"][type]) button {
257
+ color: var(--btn-bg);
258
+ background: transparent;
259
+ }
260
+
261
+ :host([variant="ghost"][type="default"]) button {
262
+ color: var(--btn-color);
263
+ background: transparent;
264
+ }
265
+
266
+ /*:host([variant="ghost"]) button:focus,*/
267
+ :host([variant="ghost"]) button:hover {
268
+ background: var(--sc-btn-ghost-bg-hover);
269
+ filter: none;
270
+ }
271
+
272
+ :host([active][variant="ghost"]) button {
273
+ background: var(--sc-btn-ghost-bg-hover);
274
+ filter: none;
275
+ }
276
+
277
+ :host([active][variant="ghost"]) button:hover {
278
+ filter: var(--sc-btn-hover-filter);
279
+ }
280
+
281
+ /*OUTLINE*/
282
+ :host([variant="outline"][type]) button {
283
+ border-color: var(--btn-bg);
284
+ color: var(--btn-bg);
285
+ background: transparent;
286
+ }
287
+
288
+ :host([variant="outline"][type="default"]) button {
289
+ border-color: var(--sc-base-400);
290
+ color: var(--sc-base-500);
291
+ background: transparent;
292
+ }
293
+
294
+ /*:host([variant="outline"]) button:focus,*/
295
+ :host([variant="outline"]) button:hover {
296
+ background: var(--btn-outline-bg-hover);
297
+ }
298
+
299
+ /*OUTLINE*/
300
+ :host([variant="link"]:not([size])) {
301
+ vertical-align: baseline;
302
+ margin-left: 0.25em;
303
+ margin-right: 0.25em;
304
+ }
305
+
306
+ :host([variant="link"]:not([size])) {
307
+ font-size: inherit;
308
+ }
309
+
310
+ :host([variant="link"]) button {
311
+ text-decoration: underline;
312
+ padding: 0;
313
+ background: none;
314
+ border: none;
315
+ font-size: inherit;
316
+ min-height: 0;
317
+ color: inherit;
318
+ }
319
+
320
+ :host([variant="link"][type]) button {
321
+ color: var(--btn-bg);
322
+ }
323
+ :host([variant="link"][type="default"]) button {
324
+ color: inherit;
325
+ }
326
+
327
+ :host([variant="link"]) button:focus,
328
+ :host([variant="link"]) button:hover {
329
+ text-decoration: none;
330
+ }
331
+
332
+ /*SHAPE*/
333
+ :host([shape="circle"]) button {
334
+ border-radius: 50%;
335
+ }
336
+
337
+ :host([shape="circle"]) button,
338
+ :host([shape="square"]) button {
339
+ width: var(--sc-btn-height);
340
+ height: var(--sc-btn-height);
341
+ /*overflow: hidden;*/ /* fix bug #42622 */
342
+ padding: 0;
343
+ align-items: center;
344
+ justify-content: 0;
345
+ text-align: center !important;
346
+ }
347
+
348
+ :host([shape="block"]),
349
+ :host([shape="block"]) button {
350
+ width: 100%;
351
+ }
352
+
353
+ :host([disabled]) {
354
+ opacity: 0.3;
355
+ pointer-events: none;
356
+ user-select: none;
357
+ }
358
+
359
+ /*ACTIVE*/
360
+
361
+ :host([active]:not([variant="ghost"]):not([variant="unstyled"])) button {
362
+ background: var(--sc-btn-active-bg);
363
+ color: var(--sc-btn-active-color);
364
+ border-color: var(--sc-btn-active-bg);
365
+ }
366
+
367
+ :host([align="left"]) button {
368
+ text-align: left;
369
+ }
370
+
371
+ :host([align="right"]) button {
372
+ text-align: right;
373
+ }
374
+
375
+ .main-slot {
376
+ flex-grow: 1;
377
+ display: block;
378
+ }
379
+
380
+ :host([minWidth]) .main-slot {
381
+ flex-grow: 0;
382
+ }
383
+
384
+ slot[name="suffix"],
385
+ slot[name="prefix"] {
386
+ flex-shrink: 0;
387
+ }
388
+
389
+ /*ALIGNEMENT DES ICONES
390
+ permet de tous les avoir alignés dans un menu
391
+ */
392
+ ::slotted(sonic-icon) {
393
+ min-width: 1em;
394
+ text-align: center;
395
+ }
396
+
397
+ /*BOUTON Avec icone seulement*/
398
+ :host([icon]) ::slotted(sonic-icon) {
399
+ font-size: 1.2em;
400
+ vertical-align: middle;
401
+ }
402
+
403
+ /*Tooltip ne joue pas sur le layout*/
404
+ sonic-tooltip {
405
+ display: contents;
406
+ }
407
+
408
+ /*OUTLINE*/
409
+ :host(:not([active])) ::slotted([swap="on"]) {
410
+ display: none !important;
411
+ }
412
+
413
+ :host([active]) ::slotted([swap="off"]) {
414
+ display: none !important;
415
+ }
416
+
417
+ /*Loading*/
418
+ :host([loading]) {
419
+ pointer-events: none;
420
+ position: relative;
421
+ }
422
+
423
+ :host([loading]) slot {
424
+ opacity: 0 !important;
425
+ pointer-events: none;
426
+ }
427
+ /*Loading*/
428
+ :host([loading]) .loader {
429
+ position: absolute;
430
+ top: 50%;
431
+ left: 50%;
432
+ transform: translate(-50%, -50%);
433
+ display: flex;
434
+ align-items: center;
435
+ justify-content: center;
436
+ line-height: 0;
437
+ height: var(--sc-btn-ff);
438
+ width: var(--sc-btn-ff);
439
+ animation: rotation 2s infinite linear;
440
+ }
441
+
442
+ @keyframes rotation {
443
+ from {
444
+ transform-origin: 50% 50%;
445
+ transform: translate(-50%, -50%) rotate(0deg);
446
+ }
447
+ to {
448
+ transform-origin: 50% 50%;
449
+ transform: translate(-50%, -50%) rotate(359deg);
450
+ }
451
+ }
452
+ `],Ae([U({type:String,reflect:!0})],Pe.prototype,"type",2),Ae([U({type:String,reflect:!0})],Pe.prototype,"variant",2),Ae([U({type:String,reflect:!0})],Pe.prototype,"size",2),Ae([U({type:String,reflect:!0})],Pe.prototype,"shape",2),Ae([U({type:String})],Pe.prototype,"direction",2),Ae([U({type:String,reflect:!0})],Pe.prototype,"alignItems",2),Ae([U({type:String})],Pe.prototype,"justify",2),Ae([U({type:String,reflect:!0})],Pe.prototype,"align",2),Ae([U({type:String})],Pe.prototype,"minWidth",2),Ae([U({type:Boolean,reflect:!0})],Pe.prototype,"icon",2),Ae([U({type:String})],Pe.prototype,"autoActive",2),Ae([U({type:Boolean,reflect:!0})],Pe.prototype,"loading",2),Ae([V()],Pe.prototype,"hasPrefix",2),Ae([V()],Pe.prototype,"hasSuffix",2),Ae([H({flatten:!0,slot:"prefix"})],Pe.prototype,"prefixes",2),Ae([H({flatten:!0,slot:"suffix"})],Pe.prototype,"suffixes",2),Ae([U({type:String})],Pe.prototype,"target",2),Ae([U({type:String})],Pe.prototype,"href",1),Ae([U({type:String})],Pe.prototype,"goBack",2),Ae([U({type:Boolean})],Pe.prototype,"pushState",2),Ae([U({type:Boolean,reflect:!0})],Pe.prototype,"active",2),Ae([V()],Pe.prototype,"location",1),Pe=Ae([m("sonic-button")],Pe);const Ce=_`
453
+
454
+ :host([align="left"]) .sonic-loader--inline {
455
+ margin-left:0;
456
+ }
457
+
458
+ :host([align="right"]) .sonic-loader--inline {
459
+ margin-left:auto;
460
+ margin-right:0;
461
+ }
462
+ .sonic-loader--inline {
463
+ display:block;
464
+ position: relative;
465
+ width: 80px;
466
+ height: 80px;
467
+ margin:auto;
468
+ z-index:20;
469
+ }
470
+ .sonic-loader--inline div {
471
+ position: absolute;
472
+ top: 33px;
473
+ width: 13px;
474
+ height: 13px;
475
+ border-radius: 50%;
476
+ background:var(--sc-loader-bg);
477
+ animation-timing-function: cubic-bezier(0, 1, 1, 0);
478
+ }
479
+ .sonic-loader--inline div:nth-child(1) {
480
+ left: 8px;
481
+ animation: lds-ellipsis1 0.6s infinite;
482
+ }
483
+ .sonic-loader--inline div:nth-child(2) {
484
+ left: 8px;
485
+ animation: lds-ellipsis2 0.6s infinite;
486
+ }
487
+ .sonic-loader--inline div:nth-child(3) {
488
+ left: 32px;
489
+ animation: lds-ellipsis2 0.6s infinite;
490
+ }
491
+ .sonic-loader--inline div:nth-child(4) {
492
+ left: 56px;
493
+ animation: lds-ellipsis3 0.6s infinite;
494
+ }
495
+
496
+ @keyframes lds-ellipsis1 {
497
+ 0% {
498
+ transform: scale(0);
499
+ }
500
+ 100% {
501
+ transform: scale(1);
502
+ }
503
+ }
504
+ @keyframes lds-ellipsis3 {
505
+ 0% {
506
+ transform: scale(1);
507
+ }
508
+ 100% {
509
+ transform: scale(0);
510
+ }
511
+ }
512
+ @keyframes lds-ellipsis2 {
513
+ 0% {
514
+ transform: translate(0, 0);
515
+ }
516
+ 100% {
517
+ transform: translate(24px, 0);
518
+ }
519
+ }
520
+
521
+ `,Se=_`
522
+
523
+ @keyframes sonic-loader--fixed {
524
+ 0% {
525
+ transform: scale(0);
526
+ opacity: 0;
527
+ }
528
+ 5% {
529
+ opacity: 1;
530
+ }
531
+ 70% {
532
+ opacity:90%;
533
+ }
534
+ 100% {
535
+ transform: scale(1);
536
+ opacity: 0;
537
+ }
538
+ }
539
+
540
+ .sonic-loader--fixed {
541
+ position: fixed;
542
+ top:50%;
543
+ left:50%;
544
+ transform:transateY(-50%) translateX(-50%);
545
+ z-index:999;
546
+ }
547
+
548
+ .sonic-loader--fixed > div:nth-child(2) {
549
+ animation-delay: -0.5s;
550
+ }
551
+ .sonic-loader--fixed > div:nth-child(3) {
552
+ animation-delay: -0.2s;
553
+ }
554
+
555
+ .sonic-loader--fixed > div:nth-child(4) {
556
+ display:none !important;
557
+ }
558
+ .sonic-loader--fixed > div {
559
+ background-color: var(--sc-loader-bg);
560
+ width: 5rem;
561
+ height: 5rem;
562
+ border-radius: 100%;
563
+ margin: 2px;
564
+ animation-fill-mode: both;
565
+ position: absolute;
566
+ top: 0px;
567
+ opacity: 0;
568
+ margin: 0;
569
+ top: -2.5rem;
570
+ left: -2.5rem;
571
+ width: 5rem;
572
+ height: 5rem;
573
+ animation: sonic-loader--fixed 1s 0s linear infinite;
574
+ }
575
+
576
+ `;var $e=Object.defineProperty,Oe=Object.getOwnPropertyDescriptor,De=(t,e,s,i)=>{for(var r,o=i>1?void 0:i?Oe(e,s):e,n=t.length-1;n>=0;n--)(r=t[n])&&(o=(i?r(e,s,o):r(o))||o);return i&&o&&$e(e,s,o),o};let Le=class extends Rt{constructor(){super(...arguments),this.mode="fixed"}static show(t){Le.loader||(Le.loader=document.createElement("sonic-loader"));const e=Le.loader;t||(t={}),t.mode&&e.setAttribute("mode",t.mode),t.container||(t.container=document.querySelector("sonic-theme")||document.body,t.mode="fixed"),t.container.appendChild(e),Le.callCounter++}static hide(){Le.callCounter--,Le.callCounter>0||Le.loader&&Le.loader.remove()}render(){return xt`<div class="sonic-loader sonic-loader--${this.mode} ">
577
+ <div></div>
578
+ <div></div>
579
+ <div></div>
580
+ <div></div>
581
+ </div>`}};Le.styles=[Ce,Se,_`
582
+ :host {
583
+ --sc-loader-bg: var(--sc-primary, currentColor);
584
+ pointer-events: none;
585
+ }
586
+
587
+ .sonic-loader {
588
+ opacity: 0;
589
+ animation: showLoader 0.5s 0.5s forwards;
590
+ }
591
+ .sonic-loader--inline {
592
+ animation-delay: 0s;
593
+ }
594
+
595
+ @keyframes showLoader {
596
+ 0% {
597
+ opacity: 0;
598
+ }
599
+
600
+ 100% {
601
+ opacity: 1;
602
+ }
603
+ }
604
+ `],Le.callCounter=0,De([U({type:String})],Le.prototype,"mode",2),Le=De([m("sonic-loader")],Le);
78
605
  /**
79
606
  * @license
80
607
  * Copyright 2020 Google LLC
81
608
  * SPDX-License-Identifier: BSD-3-Clause
82
609
  */
83
- const{I:Se}=Et,$e=()=>document.createComment(""),Oe=(t,e,s)=>{var i;const r=t._$AA.parentNode,o=void 0===e?t._$AB:e._$AA;if(void 0===s){const e=r.insertBefore($e(),o),i=r.insertBefore($e(),o);s=new Se(e,i,t,t.options)}else{const e=s._$AB.nextSibling,n=s._$AM,a=n!==t;if(a){let e;null===(i=s._$AQ)||void 0===i||i.call(s,t),s._$AM=t,void 0!==s._$AP&&(e=t._$AU)!==n._$AU&&s._$AP(e)}if(e!==o||a){let t=s._$AA;for(;t!==e;){const e=t.nextSibling;r.insertBefore(t,o),t=e}}}return s},De=(t,e,s=t)=>(t._$AI(e,s),t),Le={},Ee=t=>{var e;null===(e=t._$AP)||void 0===e||e.call(t,!1,!0);let s=t._$AA;const i=t._$AB.nextSibling;for(;s!==i;){const t=s.nextSibling;s.remove(),s=t}},je=(t,e,s)=>{const i=new Map;for(let r=e;r<=s;r++)i.set(t[r],r);return i},Me=Wt(class extends Kt{constructor(t){if(super(t),t.type!==Ht)throw Error("repeat() can only be used in text expressions")}ht(t,e,s){let i;void 0===s?s=e:void 0!==e&&(i=e);const r=[],o=[];let n=0;for(const a of t)r[n]=i?i(a,n):n,o[n]=s(a,n),n++;return{values:o,keys:r}}render(t,e,s){return this.ht(t,e,s).values}update(t,[e,s,i]){var r;const o=t._$AH,{values:n,keys:a}=this.ht(e,s,i);if(!Array.isArray(o))return this.ut=a,n;const l=null!==(r=this.ut)&&void 0!==r?r:this.ut=[],c=[];let h,d,p=0,u=o.length-1,g=0,m=n.length-1;for(;p<=u&&g<=m;)if(null===o[p])p++;else if(null===o[u])u--;else if(l[p]===a[g])c[g]=De(o[p],n[g]),p++,g++;else if(l[u]===a[m])c[m]=De(o[u],n[m]),u--,m--;else if(l[p]===a[m])c[m]=De(o[p],n[m]),Oe(t,c[m+1],o[p]),p++,m--;else if(l[u]===a[g])c[g]=De(o[u],n[g]),Oe(t,o[p],o[u]),u--,g++;else if(void 0===h&&(h=je(a,g,m),d=je(l,p,u)),h.has(l[p]))if(h.has(l[u])){const e=d.get(a[g]),s=void 0!==e?o[e]:null;if(null===s){const e=Oe(t,o[p]);De(e,n[g]),c[g]=e}else c[g]=De(s,n[g]),Oe(t,o[p],s),o[e]=null;g++}else Ee(o[u]),u--;else Ee(o[p]),p++;for(;g<=m;){const e=Oe(t,c[m+1]);De(e,n[g]),c[g++]=e}for(;p<=u;){const t=o[p++];null!==t&&Ee(t)}return this.ut=a,((t,e=Le)=>{t._$AH=e})(t,c),bt}}),Ne=(t,e)=>{var s,i;const r=t._$AN;if(void 0===r)return!1;for(const o of r)null===(i=(s=o)._$AO)||void 0===i||i.call(s,e,!1),Ne(o,e);return!0},ze=t=>{let e,s;do{if(void 0===(e=t._$AM))break;s=e._$AN,s.delete(t),t=e}while(0===(null==s?void 0:s.size))},Ie=t=>{for(let e;e=t._$AM;t=e){let s=e._$AN;if(void 0===s)e._$AN=s=new Set;else if(s.has(t))break;s.add(t),Re(e)}};
610
+ const{D:Ee}=Tt,je=()=>document.createComment(""),Me=(t,e,s)=>{var i;const r=t._$AA.parentNode,o=void 0===e?t._$AB:e._$AA;if(void 0===s){const e=r.insertBefore(je(),o),i=r.insertBefore(je(),o);s=new Ee(e,i,t,t.options)}else{const e=s._$AB.nextSibling,n=s._$AM,a=n!==t;if(a){let e;null==(i=s._$AQ)||i.call(s,t),s._$AM=t,void 0!==s._$AP&&(e=t._$AU)!==n._$AU&&s._$AP(e)}if(e!==o||a){let t=s._$AA;for(;t!==e;){const e=t.nextSibling;r.insertBefore(t,o),t=e}}}return s},Ne=(t,e,s=t)=>(t._$AI(e,s),t),ze={},Ie=t=>{var e;null==(e=t._$AP)||e.call(t,!1,!0);let s=t._$AA;const i=t._$AB.nextSibling;for(;s!==i;){const t=s.nextSibling;s.remove(),s=t}},Te=(t,e,s)=>{const i=new Map;for(let r=e;r<=s;r++)i.set(t[r],r);return i},Fe=Qt(class extends Gt{constructor(t){if(super(t),t.type!==Yt)throw Error("repeat() can only be used in text expressions")}ht(t,e,s){let i;void 0===s?s=e:void 0!==e&&(i=e);const r=[],o=[];let n=0;for(const a of t)r[n]=i?i(a,n):n,o[n]=s(a,n),n++;return{values:o,keys:r}}render(t,e,s){return this.ht(t,e,s).values}update(t,[e,s,i]){const r=t._$AH,{values:o,keys:n}=this.ht(e,s,i);if(!Array.isArray(r))return this.dt=n,o;const a=this.dt??(this.dt=[]),l=[];let c,h,d=0,p=r.length-1,u=0,g=o.length-1;for(;d<=p&&u<=g;)if(null===r[d])d++;else if(null===r[p])p--;else if(a[d]===n[u])l[u]=Ne(r[d],o[u]),d++,u++;else if(a[p]===n[g])l[g]=Ne(r[p],o[g]),p--,g--;else if(a[d]===n[g])l[g]=Ne(r[d],o[g]),Me(t,l[g+1],r[d]),d++,g--;else if(a[p]===n[u])l[u]=Ne(r[p],o[u]),Me(t,r[d],r[p]),p--,u++;else if(void 0===c&&(c=Te(n,u,g),h=Te(a,d,p)),c.has(a[d]))if(c.has(a[p])){const e=h.get(n[u]),s=void 0!==e?r[e]:null;if(null===s){const e=Me(t,r[d]);Ne(e,o[u]),l[u]=e}else l[u]=Ne(s,o[u]),Me(t,r[d],s),r[e]=null;u++}else Ie(r[p]),p--;else Ie(r[d]),d++;for(;u<=g;){const e=Me(t,l[g+1]);Ne(e,o[u]),l[u++]=e}for(;d<=p;){const t=r[d++];null!==t&&Ie(t)}return this.dt=n,((t,e=ze)=>{t._$AH=e})(t,l),_t}}),Re=(t,e)=>{var s;const i=t._$AN;if(void 0===i)return!1;for(const r of i)null==(s=r._$AO)||s.call(r,e,!1),Re(r,e);return!0},Ue=t=>{let e,s;do{if(void 0===(e=t._$AM))break;s=e._$AN,s.delete(t),t=e}while(0===(null==s?void 0:s.size))},Ve=t=>{for(let e;e=t._$AM;t=e){let s=e._$AN;if(void 0===s)e._$AN=s=new Set;else if(s.has(t))break;s.add(t),He(e)}};
84
611
  /**
85
612
  * @license
86
613
  * Copyright 2017 Google LLC
87
614
  * SPDX-License-Identifier: BSD-3-Clause
88
- */function Fe(t){void 0!==this._$AN?(ze(this),this._$AM=t,Ie(this)):this._$AM=t}function Te(t,e=!1,s=0){const i=this._$AH,r=this._$AN;if(void 0!==r&&0!==r.size)if(e)if(Array.isArray(i))for(let o=s;o<i.length;o++)Ne(i[o],!1),ze(i[o]);else null!=i&&(Ne(i,!1),ze(i));else Ne(this,t)}const Re=t=>{var e,s,i,r;t.type==Ht&&(null!==(e=(i=t)._$AP)&&void 0!==e||(i._$AP=Te),null!==(s=(r=t)._$AQ)&&void 0!==s||(r._$AQ=Fe))};class Ve extends Kt{constructor(){super(...arguments),this._$AN=void 0}_$AT(t,e,s){super._$AT(t,e,s),Ie(this),this.isConnected=t._$AU}_$AO(t,e=!0){var s,i;t!==this.isConnected&&(this.isConnected=t,t?null===(s=this.reconnected)||void 0===s||s.call(this):null===(i=this.disconnected)||void 0===i||i.call(this)),e&&(Ne(this,t),ze(this))}setValue(t){if(void 0===this._$Ct.strings)this._$Ct._$AI(t,this);else{const e=[...this._$Ct._$AH];e[this._$Ci]=t,this._$Ct._$AI(e,this,0)}}disconnected(){}reconnected(){}}const Ue=new WeakMap;let qe=0;const Be=new Map,He=new WeakSet,We=()=>new Promise((t=>requestAnimationFrame(t))),Ke=[{opacity:0}],Ze=[{opacity:0},{opacity:1}],Qe=(t,e)=>{const s=t-e;return 0===s?void 0:s},Ye=(t,e)=>{const s=t/e;return 1===s?void 0:s},Ge={left:(t,e)=>{const s=Qe(t,e);return{value:s,transform:s&&`translateX(${s}px)`}},top:(t,e)=>{const s=Qe(t,e);return{value:s,transform:s&&`translateY(${s}px)`}},width:(t,e)=>{const s=Ye(t,e);return{value:s,transform:s&&`scaleX(${s})`}},height:(t,e)=>{const s=Ye(t,e);return{value:s,transform:s&&`scaleY(${s})`}}},Je={duration:333,easing:"ease-in-out"},Xe=["left","top","width","height","opacity","color","background"],ts=new WeakMap;const es=Wt(class extends Ve{constructor(t){if(super(t),this.t=null,this.i=null,this.o=!0,this.shouldLog=!1,t.type===Ht)throw Error("The `animate` directive must be used in attribute position.");this.createFinished()}createFinished(){var t;null===(t=this.resolveFinished)||void 0===t||t.call(this),this.finished=new Promise((t=>{this.h=t}))}async resolveFinished(){var t;null===(t=this.h)||void 0===t||t.call(this),this.h=void 0}render(t){return ft}getController(){return Ue.get(this.l)}isDisabled(){var t;return this.options.disabled||(null===(t=this.getController())||void 0===t?void 0:t.disabled)}update(t,[e]){var s;const i=void 0===this.l;return i&&(this.l=null===(s=t.options)||void 0===s?void 0:s.host,this.l.addController(this),this.element=t.element,ts.set(this.element,this)),this.optionsOrCallback=e,(i||"function"!=typeof e)&&this.u(e),this.render(e)}u(t){var e,s;t=null!=t?t:{};const i=this.getController();void 0!==i&&((t={...i.defaultOptions,...t}).keyframeOptions={...i.defaultOptions.keyframeOptions,...t.keyframeOptions}),null!==(e=(s=t).properties)&&void 0!==e||(s.properties=Xe),this.options=t}v(){const t={},e=this.element.getBoundingClientRect(),s=getComputedStyle(this.element);return this.options.properties.forEach((i=>{var r;const o=null!==(r=e[i])&&void 0!==r?r:Ge[i]?void 0:s[i],n=Number(o);t[i]=isNaN(n)?o+"":n})),t}p(){let t,e=!0;return this.options.guard&&(t=this.options.guard(),e=((t,e)=>{if(Array.isArray(t)){if(Array.isArray(e)&&e.length===t.length&&t.every(((t,s)=>t===e[s])))return!1}else if(e===t)return!1;return!0})(t,this.m)),this.o=this.l.hasUpdated&&!this.isDisabled()&&!this.isAnimating()&&e&&this.element.isConnected,this.o&&(this.m=Array.isArray(t)?Array.from(t):t),this.o}hostUpdate(){var t;"function"==typeof this.optionsOrCallback&&this.u(this.optionsOrCallback()),this.p()&&(this.g=this.v(),this.t=null!==(t=this.t)&&void 0!==t?t:this.element.parentNode,this.i=this.element.nextSibling)}async hostUpdated(){if(!this.o||!this.element.isConnected||this.options.skipInitial&&!this.isHostRendered)return;let t;this.prepare(),await We;const e=this._(),s=this.A(this.options.keyframeOptions,e),i=this.v();if(void 0!==this.g){const{from:s,to:r}=this.O(this.g,i,e);this.log("measured",[this.g,i,s,r]),t=this.calculateKeyframes(s,r)}else{const s=Be.get(this.options.inId);if(s){Be.delete(this.options.inId);const{from:r,to:o}=this.O(s,i,e);t=this.calculateKeyframes(r,o),t=this.options.in?[{...this.options.in[0],...t[0]},...this.options.in.slice(1),t[1]]:t,qe++,t.forEach((t=>t.zIndex=qe))}else this.options.in&&(t=[...this.options.in,{}])}this.animate(t,s)}resetStyles(){var t;void 0!==this.P&&(this.element.setAttribute("style",null!==(t=this.P)&&void 0!==t?t:""),this.P=void 0)}commitStyles(){var t,e;this.P=this.element.getAttribute("style"),null===(t=this.webAnimation)||void 0===t||t.commitStyles(),null===(e=this.webAnimation)||void 0===e||e.cancel()}reconnected(){}async disconnected(){var t;if(!this.o)return;if(void 0!==this.options.id&&Be.set(this.options.id,this.g),void 0===this.options.out)return;if(this.prepare(),await We(),null===(t=this.t)||void 0===t?void 0:t.isConnected){const t=this.i&&this.i.parentNode===this.t?this.i:null;if(this.t.insertBefore(this.element,t),this.options.stabilizeOut){const t=this.v();this.log("stabilizing out");const e=this.g.left-t.left,s=this.g.top-t.top;!("static"===getComputedStyle(this.element).position)||0===e&&0===s||(this.element.style.position="relative"),0!==e&&(this.element.style.left=e+"px"),0!==s&&(this.element.style.top=s+"px")}}const e=this.A(this.options.keyframeOptions);await this.animate(this.options.out,e),this.element.remove()}prepare(){this.createFinished()}start(){var t,e;null===(e=(t=this.options).onStart)||void 0===e||e.call(t,this)}didFinish(t){var e,s;t&&(null===(s=(e=this.options).onComplete)||void 0===s||s.call(e,this)),this.g=void 0,this.animatingProperties=void 0,this.frames=void 0,this.resolveFinished()}_(){const t=[];for(let e=this.element.parentNode;e;e=null==e?void 0:e.parentNode){const s=ts.get(e);s&&!s.isDisabled()&&s&&t.push(s)}return t}get isHostRendered(){const t=He.has(this.l);return t||this.l.updateComplete.then((()=>{He.add(this.l)})),t}A(t,e=this._()){const s={...Je};return e.forEach((t=>Object.assign(s,t.options.keyframeOptions))),Object.assign(s,t),s}O(t,e,s){t={...t},e={...e};const i=s.map((t=>t.animatingProperties)).filter((t=>void 0!==t));let r=1,o=1;return void 0!==i&&(i.forEach((t=>{t.width&&(r/=t.width),t.height&&(o/=t.height)})),void 0!==t.left&&void 0!==e.left&&(t.left=r*t.left,e.left=r*e.left),void 0!==t.top&&void 0!==e.top&&(t.top=o*t.top,e.top=o*e.top)),{from:t,to:e}}calculateKeyframes(t,e,s=!1){var i;const r={},o={};let n=!1;const a={};for(const l in e){const s=t[l],c=e[l];if(l in Ge){const t=Ge[l];if(void 0===s||void 0===c)continue;const e=t(s,c);void 0!==e.transform&&(a[l]=e.value,n=!0,r.transform=`${null!==(i=r.transform)&&void 0!==i?i:""} ${e.transform}`)}else s!==c&&void 0!==s&&void 0!==c&&(n=!0,r[l]=s,o[l]=c)}return r.transformOrigin=o.transformOrigin=s?"center center":"top left",this.animatingProperties=a,n?[r,o]:void 0}async animate(t,e=this.options.keyframeOptions){this.start(),this.frames=t;let s=!1;if(!this.isAnimating()&&!this.isDisabled()&&(this.options.onFrames&&(this.frames=t=this.options.onFrames(this),this.log("modified frames",t)),void 0!==t)){this.log("animate",[t,e]),s=!0,this.webAnimation=this.element.animate(t,e);const r=this.getController();null==r||r.add(this);try{await this.webAnimation.finished}catch(i){}null==r||r.remove(this)}return this.didFinish(s),s}isAnimating(){var t,e;return"running"===(null===(t=this.webAnimation)||void 0===t?void 0:t.playState)||(null===(e=this.webAnimation)||void 0===e?void 0:e.pending)}log(t,e){this.shouldLog&&!this.isDisabled()&&console.log(t,this.options.id,e)}});var ss={core:{cancel:'<svg width="24" height="24" stroke-width="1.5" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">\n<path d="M6.75827 17.2426L12.0009 12M17.2435 6.75736L12.0009 12M12.0009 12L6.75827 6.75736M12.0009 12L17.2435 17.2426" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"/>\n</svg>\n',"check-circled-outline":'<svg width="24" height="24" stroke-width="1.5" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">\n<path d="M7 12.5L10 15.5L17 8.5" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"/>\n<path d="M12 22C17.5228 22 22 17.5228 22 12C22 6.47715 17.5228 2 12 2C6.47715 2 2 6.47715 2 12C2 17.5228 6.47715 22 12 22Z" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"/>\n</svg>\n',check:'<svg width="24" height="24" stroke-width="1.5" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">\n<path d="M5 13L9 17L19 7" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"/>\n</svg>\n',"emoji-puzzled":'<svg width="24px" height="24px" stroke-width="1.5" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg" ><path d="M2 12c0 5.523 4.477 10 10 10s10-4.477 10-10S17.523 2 12 2" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path><path d="M11.5 15.5s1.5-2 4.5-2 4.5 2 4.5 2M3 4c0-2.754 4-2.754 4 0 0 1.967-2 1.64-2 4M5 11.01l.01-.011" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path><path d="M17.5 9a.5.5 0 110-1 .5.5 0 010 1zM10.5 9a.5.5 0 110-1 .5.5 0 010 1z" fill="#000" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path></svg>',"info-empty":'<svg width="24" height="24" stroke-width="1.5" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">\n<path d="M12 11.5V16.5" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"/>\n<path d="M12 7.51L12.01 7.49889" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"/>\n<path d="M12 22C17.5228 22 22 17.5228 22 12C22 6.47715 17.5228 2 12 2C6.47715 2 2 6.47715 2 12C2 17.5228 6.47715 22 12 22Z" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"/>\n</svg>\n',loader:'<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-loader"><line x1="12" y1="2" x2="12" y2="6"></line><line x1="12" y1="18" x2="12" y2="22"></line><line x1="4.93" y1="4.93" x2="7.76" y2="7.76"></line><line x1="16.24" y1="16.24" x2="19.07" y2="19.07"></line><line x1="2" y1="12" x2="6" y2="12"></line><line x1="18" y1="12" x2="22" y2="12"></line><line x1="4.93" y1="19.07" x2="7.76" y2="16.24"></line><line x1="16.24" y1="7.76" x2="19.07" y2="4.93"></line></svg>',"minus-small":'<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" class="w-6 h-6">\n <path stroke-linecap="round" stroke-linejoin="round" d="M18 12H6" />\n</svg>\n',"more-horiz":'<svg width="24" height="24" stroke-width="1.5" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">\n<path d="M18 12.5C18.2761 12.5 18.5 12.2761 18.5 12C18.5 11.7239 18.2761 11.5 18 11.5C17.7239 11.5 17.5 11.7239 17.5 12C17.5 12.2761 17.7239 12.5 18 12.5Z" fill="currentColor" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"/>\n<path d="M12 12.5C12.2761 12.5 12.5 12.2761 12.5 12C12.5 11.7239 12.2761 11.5 12 11.5C11.7239 11.5 11.5 11.7239 11.5 12C11.5 12.2761 11.7239 12.5 12 12.5Z" fill="currentColor" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"/>\n<path d="M6 12.5C6.27614 12.5 6.5 12.2761 6.5 12C6.5 11.7239 6.27614 11.5 6 11.5C5.72386 11.5 5.5 11.7239 5.5 12C5.5 12.2761 5.72386 12.5 6 12.5Z" fill="currentColor" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"/>\n</svg>\n',"more-vert":'<svg width="24" height="24" stroke-width="1.5" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">\n<path d="M12 12.5C12.2761 12.5 12.5 12.2761 12.5 12C12.5 11.7239 12.2761 11.5 12 11.5C11.7239 11.5 11.5 11.7239 11.5 12C11.5 12.2761 11.7239 12.5 12 12.5Z" fill="currentColor" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"/>\n<path d="M12 18.5C12.2761 18.5 12.5 18.2761 12.5 18C12.5 17.7239 12.2761 17.5 12 17.5C11.7239 17.5 11.5 17.7239 11.5 18C11.5 18.2761 11.7239 18.5 12 18.5Z" fill="currentColor" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"/>\n<path d="M12 6.5C12.2761 6.5 12.5 6.27614 12.5 6C12.5 5.72386 12.2761 5.5 12 5.5C11.7239 5.5 11.5 5.72386 11.5 6C11.5 6.27614 11.7239 6.5 12 6.5Z" fill="currentColor" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"/>\n</svg>\n',"nav-arrow-down":'<svg width="24" height="24" stroke-width="1.5" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">\n<path d="M6 9L12 15L18 9" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"/>\n</svg>\n',"warning-circled-outline":'<svg width="24" height="24" stroke-width="1.5" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">\n<path d="M12 7L12 13" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"/>\n<path d="M12 17.01L12.01 16.9989" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"/>\n<path d="M12 22C17.5228 22 22 17.5228 22 12C22 6.47715 17.5228 2 12 2C6.47715 2 2 6.47715 2 12C2 17.5228 6.47715 22 12 22Z" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"/>\n</svg>\n'}};
615
+ */function Be(t){void 0!==this._$AN?(Ue(this),this._$AM=t,Ve(this)):this._$AM=t}function qe(t,e=!1,s=0){const i=this._$AH,r=this._$AN;if(void 0!==r&&0!==r.size)if(e)if(Array.isArray(i))for(let o=s;o<i.length;o++)Re(i[o],!1),Ue(i[o]);else null!=i&&(Re(i,!1),Ue(i));else Re(this,t)}const He=t=>{t.type==Yt&&(t._$AP??(t._$AP=qe),t._$AQ??(t._$AQ=Be))};let We=class extends Gt{constructor(){super(...arguments),this._$AN=void 0}_$AT(t,e,s){super._$AT(t,e,s),Ve(this),this.isConnected=t._$AU}_$AO(t,e=!0){var s,i;t!==this.isConnected&&(this.isConnected=t,t?null==(s=this.reconnected)||s.call(this):null==(i=this.disconnected)||i.call(this)),e&&(Re(this,t),Ue(this))}setValue(t){if(void 0===this._$Ct.strings)this._$Ct._$AI(t,this);else{const e=[...this._$Ct._$AH];e[this._$Ci]=t,this._$Ct._$AI(e,this,0)}}disconnected(){}reconnected(){}};const Ke=new WeakMap;let Ze=0;const Ye=new Map,Qe=new WeakSet,Ge=()=>new Promise((t=>requestAnimationFrame(t))),Je=[{opacity:0}],Xe=[{opacity:0},{opacity:1}],ts=(t,e)=>{const s=t-e;return 0===s?void 0:s},es=(t,e)=>{const s=t/e;return 1===s?void 0:s},ss={left:(t,e)=>{const s=ts(t,e);return{value:s,transform:null==s||isNaN(s)?void 0:`translateX(${s}px)`}},top:(t,e)=>{const s=ts(t,e);return{value:s,transform:null==s||isNaN(s)?void 0:`translateY(${s}px)`}},width:(t,e)=>{let s;0===e&&(e=1,s={width:"1px"});const i=es(t,e);return{value:i,overrideFrom:s,transform:null==i||isNaN(i)?void 0:`scaleX(${i})`}},height:(t,e)=>{let s;0===e&&(e=1,s={height:"1px"});const i=es(t,e);return{value:i,overrideFrom:s,transform:null==i||isNaN(i)?void 0:`scaleY(${i})`}}},is={duration:333,easing:"ease-in-out"},rs=["left","top","width","height","opacity","color","background"],os=new WeakMap;const ns=Qt(class extends We{constructor(t){if(super(t),this.t=null,this.i=null,this.o=!0,this.shouldLog=!1,t.type===Yt)throw Error("The `animate` directive must be used in attribute position.");this.createFinished()}createFinished(){var t;null==(t=this.resolveFinished)||t.call(this),this.finished=new Promise((t=>{this.h=t}))}async resolveFinished(){var t;null==(t=this.h)||t.call(this),this.h=void 0}render(t){return kt}getController(){return Ke.get(this.l)}isDisabled(){var t;return this.options.disabled||(null==(t=this.getController())?void 0:t.disabled)}update(t,[e]){var s;const i=void 0===this.l;return i&&(this.l=null==(s=t.options)?void 0:s.host,this.l.addController(this),this.element=t.element,os.set(this.element,this)),this.optionsOrCallback=e,(i||"function"!=typeof e)&&this.u(e),this.render(e)}u(t){t=t??{};const e=this.getController();void 0!==e&&((t={...e.defaultOptions,...t}).keyframeOptions={...e.defaultOptions.keyframeOptions,...t.keyframeOptions}),t.properties??(t.properties=rs),this.options=t}p(){const t={},e=this.element.getBoundingClientRect(),s=getComputedStyle(this.element);return this.options.properties.forEach((i=>{const r=e[i]??(ss[i]?void 0:s[i]),o=Number(r);t[i]=isNaN(o)?r+"":o})),t}m(){let t,e=!0;return this.options.guard&&(t=this.options.guard(),e=((t,e)=>{if(Array.isArray(t)){if(Array.isArray(e)&&e.length===t.length&&t.every(((t,s)=>t===e[s])))return!1}else if(e===t)return!1;return!0})(t,this.v)),this.o=this.l.hasUpdated&&!this.isDisabled()&&!this.isAnimating()&&e&&this.element.isConnected,this.o&&(this.v=Array.isArray(t)?Array.from(t):t),this.o}hostUpdate(){"function"==typeof this.optionsOrCallback&&this.u(this.optionsOrCallback()),this.m()&&(this.g=this.p(),this.t=this.t??this.element.parentNode,this.i=this.element.nextSibling)}async hostUpdated(){if(!this.o||!this.element.isConnected||this.options.skipInitial&&!this.isHostRendered)return;let t;this.prepare(),await Ge;const e=this._(),s=this.A(this.options.keyframeOptions,e),i=this.p();if(void 0!==this.g){const{from:s,to:r}=this.O(this.g,i,e);this.log("measured",[this.g,i,s,r]),t=this.calculateKeyframes(s,r)}else{const s=Ye.get(this.options.inId);if(s){Ye.delete(this.options.inId);const{from:r,to:o}=this.O(s,i,e);t=this.calculateKeyframes(r,o),t=this.options.in?[{...this.options.in[0],...t[0]},...this.options.in.slice(1),t[1]]:t,Ze++,t.forEach((t=>t.zIndex=Ze))}else this.options.in&&(t=[...this.options.in,{}])}this.animate(t,s)}resetStyles(){void 0!==this.j&&(this.element.setAttribute("style",this.j??""),this.j=void 0)}commitStyles(){var t,e;this.j=this.element.getAttribute("style"),null==(t=this.webAnimation)||t.commitStyles(),null==(e=this.webAnimation)||e.cancel()}reconnected(){}async disconnected(){var t;if(!this.o)return;if(void 0!==this.options.id&&Ye.set(this.options.id,this.g),void 0===this.options.out)return;if(this.prepare(),await Ge(),null==(t=this.t)?void 0:t.isConnected){const t=this.i&&this.i.parentNode===this.t?this.i:null;if(this.t.insertBefore(this.element,t),this.options.stabilizeOut){const t=this.p();this.log("stabilizing out");const e=this.g.left-t.left,s=this.g.top-t.top;!("static"===getComputedStyle(this.element).position)||0===e&&0===s||(this.element.style.position="relative"),0!==e&&(this.element.style.left=e+"px"),0!==s&&(this.element.style.top=s+"px")}}const e=this.A(this.options.keyframeOptions);await this.animate(this.options.out,e),this.element.remove()}prepare(){this.createFinished()}start(){var t,e;null==(e=(t=this.options).onStart)||e.call(t,this)}didFinish(t){var e,s;t&&(null==(s=(e=this.options).onComplete)||s.call(e,this)),this.g=void 0,this.animatingProperties=void 0,this.frames=void 0,this.resolveFinished()}_(){const t=[];for(let e=this.element.parentNode;e;e=null==e?void 0:e.parentNode){const s=os.get(e);s&&!s.isDisabled()&&s&&t.push(s)}return t}get isHostRendered(){const t=Qe.has(this.l);return t||this.l.updateComplete.then((()=>{Qe.add(this.l)})),t}A(t,e=this._()){const s={...is};return e.forEach((t=>Object.assign(s,t.options.keyframeOptions))),Object.assign(s,t),s}O(t,e,s){t={...t},e={...e};const i=s.map((t=>t.animatingProperties)).filter((t=>void 0!==t));let r=1,o=1;return void 0!==i&&(i.forEach((t=>{t.width&&(r/=t.width),t.height&&(o/=t.height)})),void 0!==t.left&&void 0!==e.left&&(t.left=r*t.left,e.left=r*e.left),void 0!==t.top&&void 0!==e.top&&(t.top=o*t.top,e.top=o*e.top)),{from:t,to:e}}calculateKeyframes(t,e,s=!1){const i={},r={};let o=!1;const n={};for(const a in e){const s=t[a],l=e[a];if(a in ss){const t=ss[a];if(void 0===s||void 0===l)continue;const e=t(s,l);void 0!==e.transform&&(n[a]=e.value,o=!0,i.transform=`${i.transform??""} ${e.transform}`,void 0!==e.overrideFrom&&Object.assign(i,e.overrideFrom))}else s!==l&&void 0!==s&&void 0!==l&&(o=!0,i[a]=s,r[a]=l)}return i.transformOrigin=r.transformOrigin=s?"center center":"top left",this.animatingProperties=n,o?[i,r]:void 0}async animate(t,e=this.options.keyframeOptions){this.start(),this.frames=t;let s=!1;if(!this.isAnimating()&&!this.isDisabled()&&(this.options.onFrames&&(this.frames=t=this.options.onFrames(this),this.log("modified frames",t)),void 0!==t)){this.log("animate",[t,e]),s=!0,this.webAnimation=this.element.animate(t,e);const r=this.getController();null==r||r.add(this);try{await this.webAnimation.finished}catch(i){}null==r||r.remove(this)}return this.didFinish(s),s}isAnimating(){var t,e;return"running"===(null==(t=this.webAnimation)?void 0:t.playState)||(null==(e=this.webAnimation)?void 0:e.pending)}log(t,e){this.shouldLog&&!this.isDisabled()&&console.log(t,this.options.id,e)}}),as={core:{cancel:'<svg width="24" height="24" stroke-width="1.5" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">\n<path d="M6.75827 17.2426L12.0009 12M17.2435 6.75736L12.0009 12M12.0009 12L6.75827 6.75736M12.0009 12L17.2435 17.2426" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"/>\n</svg>\n',"check-circled-outline":'<svg width="24" height="24" stroke-width="1.5" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">\n<path d="M7 12.5L10 15.5L17 8.5" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"/>\n<path d="M12 22C17.5228 22 22 17.5228 22 12C22 6.47715 17.5228 2 12 2C6.47715 2 2 6.47715 2 12C2 17.5228 6.47715 22 12 22Z" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"/>\n</svg>\n',check:'<svg width="24" height="24" stroke-width="1.5" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">\n<path d="M5 13L9 17L19 7" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"/>\n</svg>\n',"emoji-puzzled":'<svg width="24px" height="24px" stroke-width="1.5" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg" ><path d="M2 12c0 5.523 4.477 10 10 10s10-4.477 10-10S17.523 2 12 2" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path><path d="M11.5 15.5s1.5-2 4.5-2 4.5 2 4.5 2M3 4c0-2.754 4-2.754 4 0 0 1.967-2 1.64-2 4M5 11.01l.01-.011" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path><path d="M17.5 9a.5.5 0 110-1 .5.5 0 010 1zM10.5 9a.5.5 0 110-1 .5.5 0 010 1z" fill="#000" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path></svg>',"info-empty":'<svg width="24" height="24" stroke-width="1.5" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">\n<path d="M12 11.5V16.5" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"/>\n<path d="M12 7.51L12.01 7.49889" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"/>\n<path d="M12 22C17.5228 22 22 17.5228 22 12C22 6.47715 17.5228 2 12 2C6.47715 2 2 6.47715 2 12C2 17.5228 6.47715 22 12 22Z" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"/>\n</svg>\n',loader:'<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-loader"><line x1="12" y1="2" x2="12" y2="6"></line><line x1="12" y1="18" x2="12" y2="22"></line><line x1="4.93" y1="4.93" x2="7.76" y2="7.76"></line><line x1="16.24" y1="16.24" x2="19.07" y2="19.07"></line><line x1="2" y1="12" x2="6" y2="12"></line><line x1="18" y1="12" x2="22" y2="12"></line><line x1="4.93" y1="19.07" x2="7.76" y2="16.24"></line><line x1="16.24" y1="7.76" x2="19.07" y2="4.93"></line></svg>',"minus-small":'<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" class="w-6 h-6">\n <path stroke-linecap="round" stroke-linejoin="round" d="M18 12H6" />\n</svg>\n',"more-horiz":'<svg width="24" height="24" stroke-width="1.5" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">\n<path d="M18 12.5C18.2761 12.5 18.5 12.2761 18.5 12C18.5 11.7239 18.2761 11.5 18 11.5C17.7239 11.5 17.5 11.7239 17.5 12C17.5 12.2761 17.7239 12.5 18 12.5Z" fill="currentColor" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"/>\n<path d="M12 12.5C12.2761 12.5 12.5 12.2761 12.5 12C12.5 11.7239 12.2761 11.5 12 11.5C11.7239 11.5 11.5 11.7239 11.5 12C11.5 12.2761 11.7239 12.5 12 12.5Z" fill="currentColor" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"/>\n<path d="M6 12.5C6.27614 12.5 6.5 12.2761 6.5 12C6.5 11.7239 6.27614 11.5 6 11.5C5.72386 11.5 5.5 11.7239 5.5 12C5.5 12.2761 5.72386 12.5 6 12.5Z" fill="currentColor" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"/>\n</svg>\n',"more-vert":'<svg width="24" height="24" stroke-width="1.5" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">\n<path d="M12 12.5C12.2761 12.5 12.5 12.2761 12.5 12C12.5 11.7239 12.2761 11.5 12 11.5C11.7239 11.5 11.5 11.7239 11.5 12C11.5 12.2761 11.7239 12.5 12 12.5Z" fill="currentColor" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"/>\n<path d="M12 18.5C12.2761 18.5 12.5 18.2761 12.5 18C12.5 17.7239 12.2761 17.5 12 17.5C11.7239 17.5 11.5 17.7239 11.5 18C11.5 18.2761 11.7239 18.5 12 18.5Z" fill="currentColor" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"/>\n<path d="M12 6.5C12.2761 6.5 12.5 6.27614 12.5 6C12.5 5.72386 12.2761 5.5 12 5.5C11.7239 5.5 11.5 5.72386 11.5 6C11.5 6.27614 11.7239 6.5 12 6.5Z" fill="currentColor" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"/>\n</svg>\n',"nav-arrow-down":'<svg width="24" height="24" stroke-width="1.5" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">\n<path d="M6 9L12 15L18 9" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"/>\n</svg>\n',"warning-circled-outline":'<svg width="24" height="24" stroke-width="1.5" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">\n<path d="M12 7L12 13" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"/>\n<path d="M12 17.01L12.01 16.9989" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"/>\n<path d="M12 22C17.5228 22 22 17.5228 22 12C22 6.47715 17.5228 2 12 2C6.47715 2 2 6.47715 2 12C2 17.5228 6.47715 22 12 22Z" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"/>\n</svg>\n'}};
89
616
  /**
90
617
  * @license
91
618
  * Copyright 2017 Google LLC
92
619
  * SPDX-License-Identifier: BSD-3-Clause
93
- */class is extends Kt{constructor(t){if(super(t),this.it=ft,t.type!==Ht)throw Error(this.constructor.directiveName+"() can only be used in child bindings")}render(t){if(t===ft||null==t)return this._t=void 0,this.it=t;if(t===bt)return t;if("string"!=typeof t)throw Error(this.constructor.directiveName+"() called with a non-string value");if(t===this.it)return this._t;this.it=t;const e=[t];return e.raw=e,this._t={_$litType$:this.constructor.resultType,strings:e,values:[]}}}is.directiveName="unsafeHTML",is.resultType=1;const rs=Wt(is),os=new Map,ns={heroicons:{url:"https://cdn.jsdelivr.net/npm/heroicons@2.0.4/24/$prefix/$name.svg",defaultPrefix:"outline"},iconoir:{url:"https://cdnjs.cloudflare.com/ajax/libs/iconoir/5.1.4/icons/$name.svg"},feathers:{url:"https://cdn.jsdelivr.net/npm/feather-icons@4.29.0/dist/icons/$name.svg"},lucide:{url:"https://cdn.jsdelivr.net/npm/lucide-static@0.16.29/icons/$name.svg"},material:{url:"https://cdn.jsdelivr.net/npm/@material-icons/svg@1.0.5/svg/$name/$prefix.svg",defaultPrefix:"regular"},fontAwesome:{url:"https://cdn.jsdelivr.net/npm/@fortawesome/fontawesome-free@5.15.1/svgs/$prefix/$name.svg",defaultPrefix:"regular"},custom:{url:"",defaultPrefix:""}};let as=!1;const ls=class{static registerIcons(t){const e=ss;for(const s in t){const i=t[s],r=e[s]||{};for(const t in i)r[t]=i[t];e[s]=r}}};let cs=ls;cs.fontAwesomeNext={get:async t=>{const e=t.library,s=t.name||"",i=ss;var r,o;if("custom"==e&&(as||(as=!0,ns.custom.url=(null==(r=document.querySelector("[customIconLibraryPath]"))?void 0:r.getAttribute("customIconLibraryPath"))||"",ns.custom.defaultPrefix=(null==(o=document.querySelector("[customIconDefaultPrefix]"))?void 0:o.getAttribute("customIconDefaultPrefix"))||"")),e&&ns[e]){const r=ns[e],o=t.prefix||r.defaultPrefix||"",n=i[e]||{};i[e]=n;const a=o+"-"+s;if(n[a])return rs(n[a]);const l=r.url.replace("$prefix",o).replace("$name",s);if(!os.has(l)){const t=new Promise((async t=>{const e=await fetch(l);if(e.ok)try{t(await e.text())}catch(s){t(null)}else t(`<b title="Erreur ${e.status}">😶</b>`)}));os.set(l,t)}const c=await os.get(l);return os.delete(l),n[a]=c||"",rs(c)}return rs(i.core[t.name]||"")}},cs.default=ls.fontAwesomeNext;var hs=Object.defineProperty,ds=Object.getOwnPropertyDescriptor,ps=(t,e,s,i)=>{for(var r,o=i>1?void 0:i?ds(e,s):e,n=t.length-1;n>=0;n--)(r=t[n])&&(o=(i?r(e,s,o):r(o))||o);return i&&o&&hs(e,s,o),o};let us=class extends zt{constructor(){super(...arguments),this.renderId=0,this.iconText="",this._name="",this._prefix="",this._library=""}updateIcon(){if(!this.name)return;this.renderId++;const t=this.renderId;(window.queueMicrotask||window.requestAnimationFrame)((async()=>{t==this.renderId&&(this.iconText=await cs.default.get({name:this.name,prefix:this.prefix,library:this.library}),this.requestUpdate())}))}get name(){return this._name}set name(t){this._name=t,this.updateIcon()}get prefix(){return this._prefix}set prefix(t){this._prefix=t,this.updateIcon()}get library(){return this._library}set library(t){this._library=t,this.updateIcon()}render(){return this.name?(this.style.removeProperty("display"),this.iconText):(this.style.display="none",ft)}};us.styles=T`:host{line-height:0;width:fit-content;height:fit-content;vertical-align:-.125em}svg{height:var(--sc-icon-size,1em);width:var(--sc-icon-size,1em)}svg:not([fill=none]){fill:currentColor}svg[fill=none]{stroke-width:2}:host([size="2xs"]) svg{--sc-icon-size:0.625em}:host([size=xs]) svg{--sc-icon-size:0.75em}:host([size=sm]) svg{--sc-icon-size:0.875em}:host([size=lg]) svg{--sc-icon-size:1.25em}:host([size=xl]) svg{--sc-icon-size:1.5em}:host([size="2xl"]) svg{--sc-icon-size:2em}:host([size="3xl"]) svg{--sc-icon-size:2.8em}`,ps([f({type:String})],us.prototype,"name",1),ps([f({type:String})],us.prototype,"prefix",1),ps([f({type:String})],us.prototype,"library",1),us=ps([m("sonic-icon")],us);const gs=T`.custom-scroll{overflow:auto!important;overflow-y:overlay!important}.custom-scroll::-webkit-scrollbar{width:.5rem;height:.5rem;border:solid .15rem transparent;border-radius:var(--sc-rounded);background:0 0}.custom-scroll::-webkit-scrollbar-thumb{box-shadow:inset 0 0 2rem 2rem var(--sc-scrollbar-bg);border-radius:var(--sc-rounded);border:solid .15rem transparent}`;var ms=Object.defineProperty,bs=Object.getOwnPropertyDescriptor,fs=(t,e,s,i)=>{for(var r,o=i>1?void 0:i?bs(e,s):e,n=t.length-1;n>=0;n--)(r=t[n])&&(o=(i?r(e,s,o):r(o))||o);return i&&o&&ms(e,s,o),o};const vs={warning:"warning-circled-outline",success:"check-circled-outline",error:"warning-circled-outline",info:"info-empty"};let ys=class extends zt{constructor(){super(...arguments),this.title="",this.id="",this.text="",this.status="",this.ghost=!1,this.preserve=!1,this.dismissForever=!1,this.maxHeight="10rem",this.visible=!0}render(){if(this.dismissForever){const t=localStorage.getItem("sonic-toast-dismissed")||"{}";if(JSON.parse(t)[this.id])return ft}return this.visible?mt`<div class="sonic-toast ${this.status} ${this.ghost?"ghost":""}"><button aria-label="Close" class="sonic-toast-close" @click="${()=>this.hide()}"><sonic-icon name="cancel" size="lg"></sonic-icon></button><div class="sonic-toast-content custom-scroll" style="max-height:${this.maxHeight}">${this.status&&mt`<sonic-icon name="${vs[this.status]}" class="sonic-toast-icon" size="2xl"></sonic-icon>`}<div class="sonic-toast-text">${this.title?mt`<div class="sonic-toast-title">${this.title}</div>`:""} ${this.text?rs(this.text):""}<slot></slot></div>${this.preserve?"":this.autoHide()}</div></div>`:ft}hide(){if(this.closest("sonic-toast")||(this.visible=!1),this.dismissForever){const t=localStorage.getItem("sonic-toast-dismissed")||"{}",e=JSON.parse(t);e[this.id]=!0,localStorage.setItem("sonic-toast-dismissed",JSON.stringify(e))}this.dispatchEvent(new CustomEvent("hide",{bubbles:!0}))}show(){this.visible=!0}autoHide(){setTimeout((()=>{this.hide()}),4200)}};ys.styles=[gs,T`*{box-sizing:border-box}:host{display:block;pointer-events:auto;position:relative;--sc-toast-status-color:transparent;--sc-toast-color:var(--sc-base-content);--sc-toast-bg:var(--sc-base);--sc-toast-rounded:var(--sc-rounded-md);--sc-toast-shadow:var(--sc-shadow-lg)}.fixed-area{position:fixed;bottom:1.25rem;right:1.25rem;z-index:10000;display:flex;flex-direction:column-reverse}.sonic-toast{position:relative;pointer-events:auto;overflow:hidden;line-height:1.25;color:var(--sc-toast-color);box-shadow:var(--sc-toast-shadow);border-radius:var(--sc-toast-rounded);background:var(--sc-toast-bg)}.sonic-toast-content{padding:1em 2.5rem 1em 1em;display:flex;gap:.5rem;overflow:auto;position:relative}.sonic-toast-text{align-self:center;margin-top:auto;margin-bottom:auto;max-width:70ch;line-height:1.2}.sonic-toast-text a,::slotted(a:not(.btn)){color:inherit!important;text-decoration:underline!important;text-underline-offset:.15rem}.sonic-toast-text :is(p, ul, ol, hr, h1, h2, h3, h4, h5, h6),::slotted(:is(p,ul,ol,hr,h1,h2,h3,h4,h5,h6)){margin:0 0 .3em!important}.sonic-toast-text li,::slotted(li){margin-bottom:.15em!important}.sonic-toast-text>:is(p,ul,ol,hr,h1,h2,h3,h4,h5,h6):last-child,::slotted(:is(p,ul,ol,hr,h1,h2,h3,h4,h5,h6):last-child){margin-bottom:0!important}.sonic-toast-close{all:unset;position:absolute;z-index:4;pointer-events:initial;right:.5em;top:.5em;width:1.5rem;height:1.5rem;cursor:pointer;display:inline-flex;align-items:center;justify-content:center;border-radius:50%;text-align:center;opacity:.5;background:rgba(0,0,0,0)}.sonic-toast-close:focus,.sonic-toast-close:hover{opacity:1;background:rgba(0,0,0,.075)}.sonic-toast-close svg{width:1rem;height:1rem;object-fit:contain;object-position:center center}.sonic-toast-title{font-weight:700;font-size:1.15rem;margin:.15em 0 .25em;line-height:1.2}.success{--sc-toast-status-color:var(--sc-success);--sc-toast-title-color:var(--sc-toast-status-color)}.error{--sc-toast-status-color:var(--sc-danger);--sc-toast-title-color:var(--sc-toast-status-color)}.warning{--sc-toast-status-color:var(--sc-warning);--sc-toast-title-color:var(--sc-toast-status-color)}.info{--sc-toast-status-color:var(--sc-info);--sc-toast-title-color:var(--sc-toast-status-color)}.error,.info,.success,.warning{border-top:3px solid var(--sc-toast-status-color,currentColor)}.sonic-toast:before{content:"";display:block;position:absolute;left:0;top:0;right:0;bottom:0;opacity:.05;pointer-events:none;transition:.2s;border-radius:var(--sc-toast-rounded);background-color:var(--sc-toast-status-color)}.sonic-toast:hover:before{opacity:.025}.error .sonic-toast-icon,.info .sonic-toast-icon,.success .sonic-toast-icon,.warning .sonic-toast-icon{color:var(--sc-toast-status-color,currentColor)}.sonic-toast-icon{position:sticky;top:0}.ghost{opacity:.85;pointer-events:none}`],fs([f({type:String})],ys.prototype,"title",2),fs([f({type:String})],ys.prototype,"id",2),fs([f({type:String})],ys.prototype,"text",2),fs([f({type:String})],ys.prototype,"status",2),fs([f({type:Boolean})],ys.prototype,"ghost",2),fs([f({type:Boolean})],ys.prototype,"preserve",2),fs([f({type:Boolean})],ys.prototype,"dismissForever",2),fs([f({type:String})],ys.prototype,"maxHeight",2),fs([v()],ys.prototype,"visible",2),ys=fs([m("sonic-toast-item")],ys);var ws=Object.defineProperty,xs=Object.getOwnPropertyDescriptor,_s=(t,e,s,i)=>{for(var r,o=i>1?void 0:i?xs(e,s):e,n=t.length-1;n>=0;n--)(r=t[n])&&(o=(i?r(e,s,o):r(o))||o);return i&&o&&ws(e,s,o),o};let ks=class extends zt{constructor(){super(...arguments),this.toasts=[]}createRenderRoot(){return this}render(){const t=!(window.parent==window);let e={pointerEvents:"none",gap:"1rem",display:"flex",margin:"1rem"};return t||(e={...e,margin:"0",width:"calc(100% - 2.5rem)",position:"fixed",bottom:"1.25rem",right:"1.25rem",zIndex:"10000",maxWidth:"64ch",flexDirection:"column-reverse"}),this.toasts?mt`<div aria-live="polite" style="${Zt(e)}">${Me(this.toasts,(t=>t.id),(e=>mt`<sonic-toast-item maxHeight="${t?"none":"10rem"}" status="${me(e.status)}" title="${me(e.title)}" ?ghost="${e.ghost}" ?dismissForever="${e.dismissForever}" ?preserve="${e.preserve}" id="${me(e.id)}" @hide="${()=>this.removeItem(e)}" ${es({keyframeOptions:{duration:250,easing:"cubic-bezier(0.250, 0.250, 0.420, 1.225)"},in:[{transform:"translateY(0) scale(1.25)",boxShadow:"0 0 0 rgba(0,0,0,0)",opacity:0}],out:[{transform:"scale(.90) ",opacity:0,duration:3e3,easing:"ease-in-out"}],stabilizeOut:!0})}>${e.text?rs(e.text):""}</sonic-toast-item>`))}</div>`:ft}static removeAll(){const t=document.querySelector("sonic-toast");t&&(t.toasts=t.toasts.filter((t=>t.ghost)))}static add(t){var e;if(!document.querySelector("sonic-toast")){const t=document.createElement("sonic-toast");(document.querySelector("sonic-theme")||document.body).prepend(t)}const i=document.querySelector("sonic-toast"),r=null!=(e=t.id)?e:(new Date).valueOf(),o=new RegExp("</a>|</.*?button>|</.*?input>|</.*?textarea>|</.*?select>").test(t.text),n={id:r,text:t.text,title:t.title,status:t.status,preserve:!!o||t.preserve,ghost:t.ghost,dismissForever:t.dismissForever};if(t.dismissForever&&t.id){const e=localStorage.getItem("sonic-toast-dismissed")||"{}";if(JSON.parse(e)[t.id])return null}if(i.toasts.length>0){const t={...n};for(const e of i.toasts){const i={...e};if(t.id=i.id=0,s.shallowEqual(t,i))return null}}return i.toasts=[...i.toasts,n],n}static removeItem(t){const e=document.querySelector("sonic-toast");e&&e.removeItem(t)}removeItem(t){t&&(this.toasts=this.toasts.filter((e=>(delete(e={...e}).id,!s.shallowEqual(e,t,!1)))))}};_s([f({type:Array})],ks.prototype,"toasts",2),ks=_s([m("sonic-toast")],ks),"undefined"!=typeof window&&(window.SonicToast=ks);var As=Object.defineProperty,Ps=Object.getOwnPropertyDescriptor,Cs=(t,e,s,i)=>{for(var r,o=i>1?void 0:i?Ps(e,s):e,n=t.length-1;n>=0;n--)(r=t[n])&&(o=(i?r(e,s,o):r(o))||o);return i&&o&&As(e,s,o),o};const Ss=(t,e)=>{class i extends t{constructor(...t){super(),this.api=null,this.key="",this.isFirstLoad=!0,this.isLoading=!1,this.iObserver=null,this.isDefaultLoaderEnabled=!0,this.isFetchEnabled=!0,this._endPoint="",this.requestId=0,this.refetchEveryMs=0,this.dataProvider=""}get props(){return super.props}set props(t){super.props=t}set endPoint(t){this._endPoint=t,this.isConnected&&this._fetchData()}get endPoint(){return this._endPoint}async _fetchData(){if(!this.isFetchEnabled)return;if(this.api=new r(this.getApiConfiguration()),!this.api)return;if(this.dispatchEvent(new CustomEvent("loading",{detail:this})),"enabled"===this.getAttribute("localStorage")&&await ce.getInstance().isLocalStrorageReady,!this.isConnected)return;const t=this.isDefaultLoaderEnabled&&!this.hasAttribute("noLoader");t&&Ce.show();const e=ce.getInstance().get(this.getAncestorAttributeValue("headersDataProvider")).get();this.isLoading=!0,s.isObject(this.props)&&Object.keys(this.props||{}).length>0&&this.isFirstLoad&&(this.dispatchEvent(new CustomEvent("load",{detail:this})),this.isFirstLoad=!1,this.isLoading=!1);let i=await this.api.get(this.endPoint||this.dataProvider||"",e);if(this.isConnected){if(!i)return ks.add({text:"Network Error",status:"error"}),this.isLoading=!1,void(t&&Ce.hide());if(i._sonic_http_response_&&!i._sonic_http_response_.ok&&1===Object.keys(i).length&&ks.add({text:"Network Error",status:"error"}),t&&Ce.hide(),this.key){const t=i._sonic_http_response_;i=s.traverse(i,this.key.split("."),this.hasAttribute("preserveOtherKeys")),i&&s.isObject(i)&&t&&(i._sonic_http_response_=t)}this.props=i,this.dispatchEvent(new CustomEvent("load",{detail:this})),this.isFirstLoad=!1,this.isLoading=!1,this.refetchEveryMs&&this.isConnected&&(this.refetchTimeOutId=setTimeout((()=>this._fetchData()),this.refetchEveryMs))}else t&&Ce.hide()}disconnectedCallback(){var t;super.disconnectedCallback(),null==(t=this.publisher)||t.offInvalidate(this.onInvalidate),clearTimeout(this.refetchTimeOutId),this.isFirstLoad=!1}connectedCallback(){var t;if(super.connectedCallback(),!this.isFetchEnabled)return;this.key=this.getAttribute("key"),this.props&&this.publisher.set(this.props),this.onInvalidate=()=>this._fetchData(),null==(t=this.publisher)||t.onInvalidate(this.onInvalidate);null===this.getAttribute("lazyload")?this._fetchData():this.handleLazyLoad()}handleLazyLoad(){if(null===this.getAttribute("lazyload"))return;const t=this.getBoundingClientRect();if(t.x<window.innerWidth&&t.right>0&&t.y<window.innerHeight&&t.right>0)return void this._fetchData();const e=parseFloat(this.getAttribute("lazyBoundsRatio")||"1"),s={root:null,rootMargin:Math.max(window.innerWidth*e,window.innerHeight*e)+"px"};this.iObserver=new IntersectionObserver((t=>this.onIntersection(t)),s);let i=this.shadowRoot?this.shadowRoot.children[0]:this.children[0];if("slot"==(null==i?void 0:i.nodeName.toLocaleLowerCase())&&(i=i.children[0]),!i||"template"==i.nodeName.toLocaleLowerCase()){i=document.createElement("span");i.style.pointerEvents="none",this.lazyLoadSpan=i,this.appendChild(i)}i?this.iObserver.observe(i):this.isFirstLoad&&this._fetchData()}onIntersection(t){var e,s;for(const i of t)if(i.isIntersecting&&this.isFirstLoad){this._fetchData(),null==(e=this.lazyLoadSpan)||e.remove(),this.lazyLoadSpan=void 0,null==(s=this.iObserver)||s.disconnect();break}}}return Cs([f()],i.prototype,"props",1),Cs([f({type:String})],i.prototype,"endPoint",1),Cs([f()],i.prototype,"requestId",2),Cs([f({type:Number})],i.prototype,"refetchEveryMs",2),i};var $s=Object.defineProperty,Os=Object.getOwnPropertyDescriptor;let Ds=class extends(Ss(D(zt))){render(){return mt`<slot></slot>`}};Ds.styles=[T`:host{display:contents}`],Ds=((t,e,s,i)=>{for(var r,o=i>1?void 0:i?Os(e,s):e,n=t.length-1;n>=0;n--)(r=t[n])&&(o=(i?r(e,s,o):r(o))||o);return i&&o&&$s(e,s,o),o})([m("sonic-fetch")],Ds);var Ls=Object.defineProperty,Es=Object.getOwnPropertyDescriptor,js=(t,e,s,i)=>{for(var r,o=i>1?void 0:i?Es(e,s):e,n=t.length-1;n>=0;n--)(r=t[n])&&(o=(i?r(e,s,o):r(o))||o);return i&&o&&Ls(e,s,o),o};let Ms=class extends zt{constructor(){super(...arguments),this.condition=!1}render(){return this.condition?mt`<slot></slot>`:ft}};Ms.styles=T`:host{display:contents}`,js([f({type:Boolean})],Ms.prototype,"condition",2),Ms=js([m("sonic-if")],Ms);
620
+ */
621
+ let ls=class extends Gt{constructor(t){if(super(t),this.et=kt,t.type!==Yt)throw Error(this.constructor.directiveName+"() can only be used in child bindings")}render(t){if(t===kt||null==t)return this.vt=void 0,this.et=t;if(t===_t)return t;if("string"!=typeof t)throw Error(this.constructor.directiveName+"() called with a non-string value");if(t===this.et)return this.vt;this.et=t;const e=[t];return e.raw=e,this.vt={_$litType$:this.constructor.resultType,strings:e,values:[]}}};ls.directiveName="unsafeHTML",ls.resultType=1;const cs=Qt(ls),hs=new Map,ds={heroicons:{url:"https://cdn.jsdelivr.net/npm/heroicons@2.0.4/24/$prefix/$name.svg",defaultPrefix:"outline"},iconoir:{url:"https://cdnjs.cloudflare.com/ajax/libs/iconoir/5.1.4/icons/$name.svg"},feathers:{url:"https://cdn.jsdelivr.net/npm/feather-icons@4.29.0/dist/icons/$name.svg"},lucide:{url:"https://cdn.jsdelivr.net/npm/lucide-static@0.16.29/icons/$name.svg"},material:{url:"https://cdn.jsdelivr.net/npm/@material-icons/svg@1.0.5/svg/$name/$prefix.svg",defaultPrefix:"regular"},fontAwesome:{url:"https://cdn.jsdelivr.net/npm/@fortawesome/fontawesome-free@5.15.1/svgs/$prefix/$name.svg",defaultPrefix:"regular"},custom:{url:"",defaultPrefix:""}};let ps=!1;const us=sessionStorage.getItem("sonicIconsCache"),gs=us?JSON.parse(us):{icons:{},names:[]},bs=class{static registerIcons(t){const e=as;for(const s in t){const i=t[s],r=e[s]||{};for(const t in i)r[t]=i[t];e[s]=r}}};bs.fontAwesomeNext={get:async t=>{const e=t.library,s=t.name||"",i=as;var r,o;if("custom"==e&&(ps||(ps=!0,ds.custom.url=(null==(r=document.querySelector("[customIconLibraryPath]"))?void 0:r.getAttribute("customIconLibraryPath"))||"",ds.custom.defaultPrefix=(null==(o=document.querySelector("[customIconDefaultPrefix]"))?void 0:o.getAttribute("customIconDefaultPrefix"))||"")),e&&ds[e]){const r=ds[e],o=t.prefix||r.defaultPrefix||"",n=i[e]||{};i[e]=n;const a=o+"-"+s;if(n[a])return cs(n[a]);const l=r.url.replace("$prefix",o).replace("$name",s);if(gs.icons[l])return n[a]=gs.icons[l],cs(gs.icons[l]);if(!hs.has(l)){const t=new Promise((async t=>{const e=await fetch(l);if(e.ok)try{t(await e.text())}catch(s){t(null)}else t(`<b title="Erreur ${e.status}">😶</b>`)}));hs.set(l,t)}const c=await hs.get(l);if(hs.delete(l),n[a]=c||"",gs.icons[l]=c||"",gs.names.length>100){const t=gs.names.shift();delete gs.icons[t]}return sessionStorage.setItem("sonicIconsCache",JSON.stringify(gs)),cs(c)}return cs(i.core[t.name]||"")}},bs.default=bs.fontAwesomeNext;let ms=bs;var fs=Object.defineProperty,vs=Object.getOwnPropertyDescriptor,ys=(t,e,s,i)=>{for(var r,o=i>1?void 0:i?vs(e,s):e,n=t.length-1;n>=0;n--)(r=t[n])&&(o=(i?r(e,s,o):r(o))||o);return i&&o&&fs(e,s,o),o};let ws=class extends Rt{constructor(){super(...arguments),this.iconText="",this.name="",this.prefix="",this.library=""}async updateIcon(){this.iconText=await ms.default.get({name:this.name,prefix:this.prefix,library:this.library})}willUpdate(t){(t.has("name")||t.has("prefix")||t.has("library"))&&this.updateIcon(),super.willUpdate(t)}render(){return this.iconText?this.iconText:kt}};ws.styles=_`
622
+ :host {
623
+ line-height: 0.1em;
624
+ width: fit-content;
625
+ height: fit-content;
626
+ vertical-align: -0.125em;
627
+ }
628
+ svg {
629
+ height: var(--sc-icon-size, 1em);
630
+ width: var(--sc-icon-size, 1em);
631
+ overflow: visible;
632
+ }
633
+
634
+ svg:not([fill="none"]) {
635
+ fill: currentColor;
636
+ }
637
+
638
+ svg[fill="none"] {
639
+ stroke-width: 2;
640
+ }
641
+
642
+ :host([size="2xs"]) svg {
643
+ --sc-icon-size: 0.625em;
644
+ }
645
+
646
+ :host([size="xs"]) svg {
647
+ --sc-icon-size: 0.75em;
648
+ }
649
+
650
+ :host([size="sm"]) svg {
651
+ --sc-icon-size: 0.875em;
652
+ }
653
+
654
+ :host([size="lg"]) svg {
655
+ --sc-icon-size: 1.25em;
656
+ }
657
+
658
+ :host([size="xl"]) svg {
659
+ --sc-icon-size: 1.5em;
660
+ }
661
+
662
+ :host([size="2xl"]) svg {
663
+ --sc-icon-size: 2em;
664
+ }
665
+
666
+ :host([size="3xl"]) svg {
667
+ --sc-icon-size: 2.8em;
668
+ }
669
+ `,ys([V()],ws.prototype,"iconText",2),ys([U({type:String})],ws.prototype,"name",2),ys([U({type:String})],ws.prototype,"prefix",2),ys([U({type:String})],ws.prototype,"library",2),ws=ys([m("sonic-icon")],ws);const xs=_`
670
+ .custom-scroll {
671
+ overflow: auto !important;
672
+ overflow-y: overlay !important;
673
+ }
674
+
675
+ .custom-scroll::-webkit-scrollbar {
676
+ width: 0.5rem;
677
+ height: 0.5rem;
678
+ border: solid 0.15rem transparent;
679
+ border-radius: var(--sc-rounded);
680
+ background: transparent;
681
+ }
682
+
683
+ .custom-scroll::-webkit-scrollbar-thumb {
684
+ box-shadow: inset 0 0 2rem 2rem var(--sc-scrollbar-bg);
685
+ border-radius: var(--sc-rounded);
686
+ border: solid 0.15rem transparent;
687
+ }
688
+ `;var _s=Object.defineProperty,ks=Object.getOwnPropertyDescriptor,As=(t,e,s,i)=>{for(var r,o=i>1?void 0:i?ks(e,s):e,n=t.length-1;n>=0;n--)(r=t[n])&&(o=(i?r(e,s,o):r(o))||o);return i&&o&&_s(e,s,o),o};const Ps={warning:"warning-circled-outline",success:"check-circled-outline",error:"warning-circled-outline",info:"info-empty"};let Cs=class extends Rt{constructor(){super(...arguments),this.title="",this.id="",this.text="",this.status="",this.ghost=!1,this.preserve=!1,this.dismissForever=!1,this.maxHeight="10rem",this.visible=!0}render(){if(this.dismissForever){const t=localStorage.getItem("sonic-toast-dismissed")||"{}";if(JSON.parse(t)[this.id])return kt}return this.visible?xt`<div
689
+ class="sonic-toast ${this.status} ${this.ghost?"ghost":""}"
690
+ >
691
+
692
+ <button aria-label="Close" class="sonic-toast-close" @click=${()=>this.hide()}>
693
+ <sonic-icon name="cancel" size="lg"></sonic-icon>
694
+ </button>
695
+ <div class="sonic-toast-content custom-scroll" style="max-height: ${this.maxHeight} ;">
696
+
697
+ ${this.status&&xt`<sonic-icon name=${Ps[this.status]} class="sonic-toast-icon" size="2xl"></sonic-icon>`}
698
+
699
+
700
+ <div class="sonic-toast-text">
701
+ ${this.title?xt`<div class="sonic-toast-title">${this.title}</div>`:""}
702
+ ${this.text?cs(this.text):""}
703
+ <slot></slot>
704
+ </div>
705
+
706
+ ${this.preserve?"":this.autoHide()}
707
+ </div>
708
+ </div>`:kt}hide(){if(this.closest("sonic-toast")||(this.visible=!1),this.dismissForever){const t=localStorage.getItem("sonic-toast-dismissed")||"{}",e=JSON.parse(t);e[this.id]=!0,localStorage.setItem("sonic-toast-dismissed",JSON.stringify(e))}this.dispatchEvent(new CustomEvent("hide",{bubbles:!0}))}show(){this.visible=!0}autoHide(){setTimeout((()=>{this.hide()}),4200)}};Cs.styles=[xs,_`
709
+ * {
710
+ box-sizing: border-box;
711
+ }
712
+ :host {
713
+ display: block;
714
+ pointer-events: auto;
715
+ position: relative;
716
+ --sc-toast-status-color: transparent;
717
+ --sc-toast-color: var(--sc-base-content);
718
+ --sc-toast-bg: var(--sc-base);
719
+ --sc-toast-rounded: var(--sc-rounded-md);
720
+ --sc-toast-shadow: var(--sc-shadow-lg);
721
+ }
722
+
723
+ .fixed-area {
724
+ position: fixed;
725
+ bottom: 1.25rem;
726
+ right: 1.25rem;
727
+ z-index: 10000;
728
+ display: flex;
729
+ flex-direction: column-reverse;
730
+ }
731
+
732
+ .sonic-toast {
733
+ position: relative;
734
+ pointer-events: auto;
735
+ overflow:hidden;
736
+ line-height: 1.25;
737
+ color: var(--sc-toast-color);
738
+ box-shadow: var(--sc-toast-shadow);
739
+ border-radius: var(--sc-toast-rounded);
740
+ background: var(--sc-toast-bg);
741
+ }
742
+
743
+ .sonic-toast-content {
744
+ padding: 1em 2.5rem 1em 1em;
745
+ display: flex;
746
+ gap: 0.5rem;
747
+ overflow: auto;
748
+ position:relative;
749
+ }
750
+
751
+ .sonic-toast-text {
752
+ align-self: center;
753
+ margin-top: auto;
754
+ margin-bottom: auto;
755
+ max-width:70ch;
756
+ line-height: 1.2;
757
+ }
758
+
759
+ ::slotted(a:not(.btn)),
760
+ .sonic-toast-text a {
761
+ color: inherit !important;
762
+ text-decoration: underline !important;
763
+ text-underline-offset: 0.15rem;
764
+ }
765
+
766
+ ::slotted(:is(p, ul, ol, hr, h1, h2, h3, h4, h5, h6)),
767
+ .sonic-toast-text :is(p, ul, ol, hr, h1, h2, h3, h4, h5, h6) {
768
+ margin: 0 0 0.3em !important;
769
+ }
770
+
771
+ ::slotted(li),
772
+ .sonic-toast-text li {
773
+ margin-bottom: .15em !important;
774
+ }
775
+
776
+ ::slotted( :is(p, ul, ol, hr, h1, h2, h3, h4, h5, h6):last-child),
777
+ .sonic-toast-text > :is(p, ul, ol, hr, h1, h2, h3, h4, h5, h6):last-child {
778
+ margin-bottom: 0 !important;
779
+ }
780
+
781
+
782
+ /*BUTTON CLOSE*/
783
+ .sonic-toast-close {
784
+ all: unset;
785
+ position: absolute;
786
+ z-index:4;
787
+ pointer-events: initial;
788
+ right: 0.5em;
789
+ top: 0.5em;
790
+ width: 1.5rem;
791
+ height: 1.5rem;
792
+ cursor: pointer;
793
+ display: inline-flex;
794
+ align-items: center;
795
+ justify-content: center;
796
+ border-radius: 50%;
797
+ text-align: center;
798
+ opacity: 0.5;
799
+ background: rgba(0, 0, 0, 0);
800
+ }
801
+
802
+ .sonic-toast-close:focus,
803
+ .sonic-toast-close:hover {
804
+ opacity: 1;
805
+ background: rgba(0, 0, 0, 0.075);
806
+ }
807
+
808
+ .sonic-toast-close svg {
809
+ width: 1rem;
810
+ height: 1rem;
811
+ object-fit: contain;
812
+ object-position: center center;
813
+ }
814
+
815
+ /*Title*/
816
+ .sonic-toast-title {
817
+ font-weight: bold;
818
+ font-size: 1.15rem;
819
+ margin: 0.15em 0 0.25em;
820
+ line-height: 1.2;
821
+ }
822
+
823
+ /*STATUS*/
824
+ .success {
825
+ --sc-toast-status-color: var(--sc-success);
826
+ --sc-toast-title-color: var(--sc-toast-status-color);
827
+ }
828
+
829
+ .error {
830
+ --sc-toast-status-color: var(--sc-danger);
831
+ --sc-toast-title-color: var(--sc-toast-status-color);
832
+ }
833
+
834
+ .warning {
835
+ --sc-toast-status-color: var(--sc-warning);
836
+ --sc-toast-title-color: var(--sc-toast-status-color);
837
+ }
838
+
839
+ .info {
840
+ --sc-toast-status-color: var(--sc-info);
841
+ --sc-toast-title-color: var(--sc-toast-status-color);
842
+ }
843
+
844
+ .success,
845
+ .error,
846
+ .info,
847
+ .warning {
848
+ border-top: 3px solid var(--sc-toast-status-color, currentColor);
849
+ }
850
+
851
+ .sonic-toast:before {
852
+ content: "";
853
+ display: block;
854
+ position: absolute;
855
+ left: 0;
856
+ top: 0;
857
+ right: 0;
858
+ bottom: 0;
859
+ opacity: 0.05;
860
+ pointer-events: none;
861
+ transition: 0.2s;
862
+ border-radius: var(--sc-toast-rounded);
863
+ background-color: var(--sc-toast-status-color);
864
+ }
865
+
866
+ .sonic-toast:hover:before {
867
+ opacity: 0.025;
868
+ }
869
+
870
+ .info .sonic-toast-icon,
871
+ .error .sonic-toast-icon,
872
+ .success .sonic-toast-icon,
873
+ .warning .sonic-toast-icon {
874
+ color: var(--sc-toast-status-color, currentColor);
875
+ }
876
+
877
+ .sonic-toast-icon {
878
+ position:sticky;
879
+ top:0;
880
+ }
881
+
882
+ .ghost {
883
+ opacity: 0.85;
884
+ pointer-events: none;
885
+ }
886
+
887
+
888
+
889
+ `],As([U({type:String})],Cs.prototype,"title",2),As([U({type:String})],Cs.prototype,"id",2),As([U({type:String})],Cs.prototype,"text",2),As([U({type:String})],Cs.prototype,"status",2),As([U({type:Boolean})],Cs.prototype,"ghost",2),As([U({type:Boolean})],Cs.prototype,"preserve",2),As([U({type:Boolean})],Cs.prototype,"dismissForever",2),As([U({type:String})],Cs.prototype,"maxHeight",2),As([V()],Cs.prototype,"visible",2),Cs=As([m("sonic-toast-item")],Cs);var Ss=Object.defineProperty,$s=Object.getOwnPropertyDescriptor,Os=(t,e,s,i)=>{for(var r,o=i>1?void 0:i?$s(e,s):e,n=t.length-1;n>=0;n--)(r=t[n])&&(o=(i?r(e,s,o):r(o))||o);return i&&o&&Ss(e,s,o),o};let Ds=class extends Rt{constructor(){super(...arguments),this.toasts=[]}createRenderRoot(){return this}render(){const t=!(window.parent==window);let e={pointerEvents:"none",gap:"1rem",display:"flex",margin:"1rem"};return t||(e={...e,margin:"0",width:"calc(100% - 2.5rem)",position:"fixed",bottom:"1.25rem",right:"1.25rem",zIndex:"10000",maxWidth:"64ch",flexDirection:"column-reverse"}),this.toasts?xt`<div aria-live="polite" style=${te(e)}>
890
+ ${Fe(this.toasts,(t=>t.id),(e=>xt`
891
+ <sonic-toast-item
892
+ maxHeight=${t?"none":"10rem"}
893
+ status=${we(e.status)}
894
+ title=${we(e.title)}
895
+ ?ghost=${e.ghost}
896
+ ?dismissForever=${e.dismissForever}
897
+ ?preserve=${e.preserve}
898
+ id=${we(e.id)}
899
+ @hide=${()=>this.removeItem(e)}
900
+ ${ns({keyframeOptions:{duration:250,easing:"cubic-bezier(0.250, 0.250, 0.420, 1.225)"},in:[{transform:"translateY(0) scale(1.25)",boxShadow:"0 0 0 rgba(0,0,0,0)",opacity:0}],out:[{transform:"scale(.90) ",opacity:0,duration:3e3,easing:"ease-in-out"}],stabilizeOut:!0})}
901
+ >
902
+ <!-- Le texte est passé dans le slot et non pas en propriété pour contrer des problèmatiques de shadow-dom et d'appel exterieur (exemple: fancybox) -->
903
+ ${e.text?cs(e.text):""}
904
+ </sonic-toast-item>
905
+ `))}
906
+ </div>`:kt}static removeAll(){const t=document.querySelector("sonic-toast");t&&(t.toasts=t.toasts.filter((t=>t.ghost)))}static add(t){if(!document.querySelector("sonic-toast")){const t=document.createElement("sonic-toast");(document.querySelector("sonic-theme")||document.body).prepend(t)}const e=document.querySelector("sonic-toast"),s=t.id??(new Date).valueOf(),r=new RegExp("</a>|</.*?button>|</.*?input>|</.*?textarea>|</.*?select>").test(t.text),o={id:s,text:t.text,title:t.title,status:t.status,preserve:!!r||t.preserve,ghost:t.ghost,dismissForever:t.dismissForever};if(t.dismissForever&&t.id){const e=localStorage.getItem("sonic-toast-dismissed")||"{}";if(JSON.parse(e)[t.id])return null}if(e.toasts.length>0){const t={...o};for(const s of e.toasts){const e={...s};if(t.id=e.id=0,
907
+ /*!currentToast.preserve && */
908
+ i.shallowEqual(t,e))return null}}return e.toasts=[...e.toasts,o],o}static removeItem(t){const e=document.querySelector("sonic-toast");e&&e.removeItem(t)}removeItem(t){t&&(this.toasts=this.toasts.filter((e=>(delete(e={...e}).id,!i.shallowEqual(e,t,!1)))))}};Os([U({type:Array})],Ds.prototype,"toasts",2),Ds=Os([m("sonic-toast")],Ds),"undefined"!=typeof window&&(window.SonicToast=Ds);var Ls=Object.defineProperty,Es=Object.getOwnPropertyDescriptor,js=(t,e,s,i)=>{for(var r,o=i>1?void 0:i?Es(e,s):e,n=t.length-1;n>=0;n--)(r=t[n])&&(o=(i?r(e,s,o):r(o))||o);return i&&o&&Ls(e,s,o),o};const Ms=(t,e)=>{class s extends t{constructor(...t){super(),this.api=null,this.key="",this.isFirstLoad=!0,this.isLoading=!1,this.iObserver=null,this.isDefaultLoaderEnabled=!0,this.isFetchEnabled=!0,this._endPoint="",this.requestId=0,this.refetchEveryMs=0,this.dataProvider=""}get props(){return super.props}set props(t){super.props=t}set endPoint(t){this._endPoint=t,this.isConnected&&this._fetchData()}get endPoint(){return this._endPoint}async _fetchData(){if(!this.isFetchEnabled)return;if(this.api=new o(this.getApiConfiguration()),!this.api)return;if(this.dispatchEvent(new CustomEvent("loading",{detail:this})),"enabled"===this.getAttribute("localStorage")&&await ge.getInstance().isLocalStrorageReady,!this.isConnected)return;const t=this.isDefaultLoaderEnabled&&!this.noLoader;t&&Le.show();const e=ge.getInstance().get(this.getAncestorAttributeValue("headersDataProvider")).get();this.isLoading=!0,i.isObject(this.props)&&Object.keys(this.props||{}).length>0&&this.isFirstLoad&&window.requestAnimationFrame((()=>{this.dispatchEvent(new CustomEvent("load",{detail:this})),this.isFirstLoad=!1,this.isLoading=!1}));let s=await this.api.get(this.endPoint||this.dataProvider||"",e);if(this.isConnected){if(!s)return Ds.add({text:"Network Error",status:"error"}),this.isLoading=!1,void(t&&Le.hide());if(s._sonic_http_response_&&!s._sonic_http_response_.ok&&1===Object.keys(s).length&&Ds.add({text:"Network Error",status:"error"}),t&&Le.hide(),this.key){const t=s._sonic_http_response_;s=i.traverse(s,this.key.split("."),this.hasAttribute("preserveOtherKeys")),s&&i.isObject(s)&&t&&(s._sonic_http_response_=t)}this.props=s,this.dispatchEvent(new CustomEvent("load",{detail:this})),this.isFirstLoad=!1,this.isLoading=!1,this.refetchEveryMs&&this.isConnected&&(this.refetchTimeOutId=setTimeout((()=>this._fetchData()),this.refetchEveryMs))}else t&&Le.hide()}disconnectedCallback(){var t;super.disconnectedCallback(),null==(t=this.publisher)||t.offInvalidate(this.onInvalidate),clearTimeout(this.refetchTimeOutId),this.isFirstLoad=!1}connectedCallback(){var t;this.lazyLoad=void 0!==this.lazyLoad?this.lazyLoad:this.hasAttribute("lazyload"),this.noLoader=void 0!==this.noLoader?this.noLoader:this.hasAttribute("noloader"),super.connectedCallback(),this.isFetchEnabled&&(this.key=this.getAttribute("key"),this.props&&this.publisher.set(this.props),this.onInvalidate=()=>this._fetchData(),null==(t=this.publisher)||t.onInvalidate(this.onInvalidate),this.lazyLoad?this.handleLazyLoad():this._fetchData())}handleLazyLoad(){if(!this.lazyLoad)return;const t=this.getBoundingClientRect();if(t.x<window.innerWidth&&t.right>0&&t.y<window.innerHeight&&t.right>0)return void this._fetchData();const e=parseFloat(this.getAttribute("lazyBoundsRatio")||"1"),s={root:null,rootMargin:Math.max(window.innerWidth*e,window.innerHeight*e)+"px"};this.iObserver=new IntersectionObserver((t=>this.onIntersection(t)),s);let i=this.shadowRoot?this.shadowRoot.children[0]:this.children[0];if("slot"==(null==i?void 0:i.nodeName.toLocaleLowerCase())&&(i=i.children[0]),!i||"template"==i.nodeName.toLocaleLowerCase()){i=document.createElement("span");i.style.pointerEvents="none",this.lazyLoadSpan=i,this.appendChild(i)}i?this.iObserver.observe(i):this.isFirstLoad&&this._fetchData()}onIntersection(t){var e,s;for(const i of t)if(i.isIntersecting&&this.isFirstLoad){this._fetchData(),null==(e=this.lazyLoadSpan)||e.remove(),this.lazyLoadSpan=void 0,null==(s=this.iObserver)||s.disconnect();break}}}return js([U()],s.prototype,"props",1),js([U({type:String})],s.prototype,"endPoint",1),js([U()],s.prototype,"requestId",2),js([U({type:Number})],s.prototype,"refetchEveryMs",2),s};var Ns=Object.defineProperty,zs=Object.getOwnPropertyDescriptor;let Is=class extends(Ms(G(Rt))){render(){return xt`<slot></slot>`}};Is.styles=[_`
909
+ :host {
910
+ display: contents;
911
+ }
912
+ `],Is=((t,e,s,i)=>{for(var r,o=i>1?void 0:i?zs(e,s):e,n=t.length-1;n>=0;n--)(r=t[n])&&(o=(i?r(e,s,o):r(o))||o);return i&&o&&Ns(e,s,o),o})([m("sonic-fetch")],Is);var Ts=Object.defineProperty,Fs=Object.getOwnPropertyDescriptor,Rs=(t,e,s,i)=>{for(var r,o=i>1?void 0:i?Fs(e,s):e,n=t.length-1;n>=0;n--)(r=t[n])&&(o=(i?r(e,s,o):r(o))||o);return i&&o&&Ts(e,s,o),o};let Us=class extends Rt{constructor(){super(...arguments),this.condition=!1}render(){return this.condition?xt` <slot></slot> `:kt}};Us.styles=_`
913
+ :host {
914
+ display: contents;
915
+ }
916
+ `,Rs([U({type:Boolean})],Us.prototype,"condition",2),Us=Rs([m("sonic-if")],Us);
94
917
  /**
95
918
  * @license
96
919
  * Copyright 2020 Google LLC
97
920
  * SPDX-License-Identifier: BSD-3-Clause
98
921
  */
99
- const Ns=Wt(class extends Kt{constructor(t){if(super(t),t.type!==Ht)throw Error("templateContent can only be used in child bindings")}render(t){return this.ft===t?bt:(this.ft=t,document.importNode(t.content,!0))}});var zs=Object.defineProperty,Is=Object.getOwnPropertyDescriptor;let Fs=class extends(D(zt)){constructor(){super(...arguments),this.noAutofill=!0}connectedCallback(){this.noShadowDom="",super.connectedCallback()}updated(t){super.updated(t),0==this.children.length?this.style.display="none":this.style.display="contents"}render(){return mt`<slot></slot>`}};Fs=((t,e,s,i)=>{for(var r,o=i>1?void 0:i?Is(e,s):e,n=t.length-1;n>=0;n--)(r=t[n])&&(o=(i?r(e,s,o):r(o))||o);return i&&o&&zs(e,s,o),o})([m("sonic-subscriber")],Fs);var Ts=Object.defineProperty,Rs=Object.getOwnPropertyDescriptor,Vs=(t,e,s,i)=>{for(var r,o=i>1?void 0:i?Rs(e,s):e,n=t.length-1;n>=0;n--)(r=t[n])&&(o=(i?r(e,s,o):r(o))||o);return i&&o&&Ts(e,s,o),o};let Us=class extends(Ss(D(j(zt)))){constructor(){super(...arguments),this.templateKey="template",this.idKey="id"}connectedCallback(){this.noShadowDom="",this.defferedDebug=this.hasAttribute("debug")||null,this.isDefaultLoaderEnabled=!1,this.isFetchEnabled=this.hasAttribute("fetch"),this.isFetchEnabled&&(this.isLoading=!0),super.connectedCallback()}disconnectedCallback(){super.disconnectedCallback()}renderLoadingState(){return this.templateParts.skeleton?Ns(this.templateParts.skeleton):mt`<sonic-loader mode="inline"></sonic-loader>`}renderNoResultState(){return mt`<div style="color:var(--sc-base-400);font-size:1.5em;margin:4rem 0;display:flex;gap:.5rem"><sonic-icon name="emoji-puzzled" size="lg"></sonic-icon><span class="sonic-no-result-text">${"string"==typeof this.props&&""==this.props?"Aucun résultat":this.props}</span></div>`}formatProps(){let t=this.props;if(null==t)return null;const e=t._sonic_http_response_,i=this.hasAttribute("extractValues");return Array.isArray(t)||(t=i?Object.entries(t).map((([t,e])=>({key:t,value:e}))):s.isObject(t)&&Object.keys(t).length>0&&(!e||e.ok)?[t]:[]),t=t.filter((t=>null!=t)),e&&(t._sonic_http_response_=e),t}render(){if(this.isLoading&&!Array.isArray(this.props))return this.renderLoadingState();if("string"==typeof this.props)return this.renderNoResultState();if(!s.isObject(this.props))return mt`<div></div>`;const t=this.formatProps();if(0==((null==t?void 0:t.length)||0)&&this.templateParts["no-item"])return Ns(this.templateParts["no-item"]);const e=this.templateList.length;let i=-1;const r=this.hasAttribute("extractValues"),o=this.templateParts.separator,n=(null==t?void 0:t.length)||0;return mt`${null==t?void 0:t.map(((t,s)=>{if(null==t)return ft;let a=null,l=s;if("object"==typeof t&&!Array.isArray(t)){const e=t[this.templateKey];e&&"string"==typeof e&&(a=this.templateParts[e]),r&&(l=null==t?void 0:t.key)}if("_sonic_http_response_"==l)return ft;if("string"!=typeof l&&"number"!=typeof l)return ft;const c=s>=n-1,h=s%2,d=this.publisher[l];return d._key_=l+"",d._metadata_={...d._metadata_.get(),key:l,even:0==h,odd:1==h,onlyChild:1==n,firstChild:0==s,lastChild:c},i++,a&&(i=-1),t&&mt`<sonic-subscriber ?debug="${!0===this.defferedDebug}" .bindPublisher="${function(){return d}}" .propertyMap?="${this.itemPropertyMap}" dataProvider="${this.dataProvider}/list-item/${l}">${Ns(a||this.templateList[i%e])}</sonic-subscriber>${o&&!c?Ns(o):ft}`}))}`}};Vs([f({type:Object})],Us.prototype,"itemPropertyMap",2),Vs([f({type:String})],Us.prototype,"templateKey",2),Vs([f({type:String})],Us.prototype,"idKey",2),Us=Vs([m("sonic-list")],Us);var qs=Object.defineProperty,Bs=Object.getOwnPropertyDescriptor,Hs=(t,e,s,i)=>{for(var r,o=i>1?void 0:i?Bs(e,s):e,n=t.length-1;n>=0;n--)(r=t[n])&&(o=(i?r(e,s,o):r(o))||o);return i&&o&&qs(e,s,o),o};let Ws=class extends(D(zt)){constructor(){super(...arguments),this.templates=null,this.lastRequestTime=0,this.key="",this.itemPropertyMap=null,this.cache="default",this.targetRequestDuration=500,this.limit=5,this.lazyBoundsRatio=1,this.offset=0,this.resultCount=0,this.noLazyload=!1,this.filteredFields="",this.instanceId=0,this.localStorage="disabled",this.filterPublisher=null,this.searchHash="",this.requestId=0,this.isFirstRequest=!0,this.dataProviderExpression="",this.idKey="id",this.currentScrollPosition=void 0,this.listDataProviders=[],this.nextHadEvent=!1}disconnectedCallback(){for(const t of this.listDataProviders)h.delete(t);super.disconnectedCallback()}async connectedCallback(){this.instanceId=Ws.instanceCounter++,this.localStorage=this.getAttribute("localStorage")||this.localStorage,this.removeAttribute("localStorage"),this.noShadowDom="",this.defferedDebug=this.hasAttribute("debug")||null,this.dataProvider||(this.dataProvider=this.dataProviderExpression||"sonic-queue-"+this.instanceId+"-"+Math.random().toString(36).substring(7)),this.dataProviderExpression||(this.dataProviderExpression=oe.getAncestorAttributeValue(this.parentElement,"dataProvider")||""),super.connectedCallback(),this.key=this.getAttribute("key"),this.templates||(this.templates=Array.from(this.querySelectorAll("template"))),this.lastRequestTime=(new Date).getTime(),await h.getInstance().isLocalStrorageReady,this.configFilter()}configFilter(){var t;const e=this.getAncestorAttributeValue("dataFilterProvider");e?(this.filterPublisher=h.getInstance().get(e),null==(t=this.filterPublisher)||t.onInternalMutation((()=>{this.updateFilteredContent()}))):this.next()}updateFilteredContent(){var t;const e=this.dataProviderExpression.split("?");e.shift();const s=new URLSearchParams(e.join("?")),i=null==(t=this.filterPublisher)?void 0:t.get(),r=this.filteredFields.split(" ");for(const n in i){let t=i[n];Array.isArray(t)&&(t=t.filter((t=>null!==t))),this.filteredFields&&!r.includes(n)||null==t||""===t.toString()||s.set(n,i[n].toString())}const o=s.toString();if(o!=this.searchHash||this.isFirstRequest){this.searchHash=o;for(const t of this.listDataProviders)h.delete(t);this.listDataProviders=[],clearTimeout(this.filterTimeoutId),this.filterTimeoutId=setTimeout((async()=>{const t=this.resultCount;this.props=null,this.requestId++,this.resultCount=t,await h.getInstance().isLocalStrorageReady,window.requestAnimationFrame((()=>this.next()))}),this.isFirstRequest?0:400),this.isFirstRequest=!1}}resetDuration(){this.lastRequestTime=(new Date).getTime()}next(t){var e;let s=this.offset;const i=(new Date).getTime()-this.lastRequestTime;if(!this.nextHadEvent&&t&&(this.publisher.resultCount=0,this.resultCount=0),this.nextHadEvent=!!t,t){if(t.detail.requestId<this.requestId)return;if(this.resultCount+=t.detail.props.length,!t.detail.isFirstLoad||!t.detail.props.length||-1==this.dataProviderExpression.indexOf("$offset"))return void(this.publisher.resultCount=this.resultCount)}if(Array.isArray(this.props)){const t=this.props,e=t[t.length-1];s=parseInt(e.offset.toString())+parseInt(e.limit.toString())}else{const t=[];t.resultCount=this.resultCount,this.props=t}i>0&&t&&!this.localStorage&&(this.limit=Math.round(this.limit/i*this.targetRequestDuration)),this.limit<1&&(this.limit=1),this.limit>15&&(this.limit=15);let r=this.dataProviderExpression.replace("$offset",s+"").replace("$limit",this.limit+"");const o=r.split("?"),n=o.shift(),a=new URLSearchParams(o.join("?")),l=null==(e=this.filterPublisher)?void 0:e.get(),c=this.filteredFields.split(" ");for(const d in l)this.filteredFields&&c.includes(d)||null==l[d]||""==l[d]||a.set(d,l[d]);this.searchHash||(this.searchHash=a.toString()),r=n+"?"+a.toString(),this.listDataProviders.push(r);const h=[...this.props,{id:a.toString()+"/"+this.props.length,dataProvider:r+"_item_from_queue_"+this.instanceId,endPoint:r,offset:s,limit:this.limit}];h.resultCount=this.resultCount,this.props=h,this.lastRequestTime=(new Date).getTime()}render(){if(!Array.isArray(this.props))return ft;let t=!this.noLazyload;return 1==this.props.length&&(t=!1),mt`${
922
+ const Vs=Qt(class extends Gt{constructor(t){if(super(t),t.type!==Yt)throw Error("templateContent can only be used in child bindings")}render(t){return this.ft===t?_t:(this.ft=t,document.importNode(t.content,!0))}});var Bs=Object.defineProperty,qs=Object.getOwnPropertyDescriptor;let Hs=class extends(G(Rt)){constructor(){super(...arguments),this.noAutofill=!0}connectedCallback(){this.noShadowDom="",super.connectedCallback()}updated(t){super.updated(t),0==this.children.length?this.style.display="none":this.style.display="contents"}render(){return xt`<slot></slot> `}};Hs=((t,e,s,i)=>{for(var r,o=i>1?void 0:i?qs(e,s):e,n=t.length-1;n>=0;n--)(r=t[n])&&(o=(i?r(e,s,o):r(o))||o);return i&&o&&Bs(e,s,o),o})([m("sonic-subscriber")],Hs);var Ws=Object.defineProperty,Ks=Object.getOwnPropertyDescriptor,Zs=(t,e,s,i)=>{for(var r,o=i>1?void 0:i?Ks(e,s):e,n=t.length-1;n>=0;n--)(r=t[n])&&(o=(i?r(e,s,o):r(o))||o);return i&&o&&Ws(e,s,o),o};let Ys=class extends(Ms(G(tt(Rt)))){constructor(){super(...arguments),this.templateKey="template",this.idKey="id",this.limit=Number.POSITIVE_INFINITY,this.offset=0}connectedCallback(){this.noShadowDom="",this.defferedDebug=this.hasAttribute("debug")||null,this.isDefaultLoaderEnabled=!1,this.isFetchEnabled=this.hasAttribute("fetch"),this.isFetchEnabled&&(this.isLoading=!0),super.connectedCallback()}disconnectedCallback(){super.disconnectedCallback()}renderLoadingState(){return this.templateParts.skeleton?Vs(this.templateParts.skeleton):xt`<sonic-loader mode="inline"></sonic-loader>`}renderNoResultState(){return xt` <div
923
+ style="color: var(--sc-base-400);
924
+ font-size: 1.5em;
925
+ margin: 4rem 0;
926
+ display: flex;
927
+ gap: 0.5rem;"
928
+ >
929
+ <sonic-icon name="emoji-puzzled" size="lg"></sonic-icon
930
+ ><span class="sonic-no-result-text">${"string"==typeof this.props&&""==this.props?"Aucun résultat":this.props}</span>
931
+ </div>`}formatProps(){let t=this.props;if(null==t)return null;const e=t._sonic_http_response_,s=this.hasAttribute("extractValues");return Array.isArray(t)||(t=s?Object.entries(t).map((([t,e])=>({key:t,value:e}))):i.isObject(t)&&Object.keys(t).length>0&&(!e||e.ok)?[t]:[]),t=t.filter((t=>null!=t)),e&&(t._sonic_http_response_=e),t}render(){if(this.isLoading&&!Array.isArray(this.props))return this.renderLoadingState();if("string"==typeof this.props)return this.renderNoResultState();if(!i.isObject(this.props))return xt`<div></div>`;const t=this.formatProps();if(0==((null==t?void 0:t.length)||0)&&this.templateParts["no-item"])return Vs(this.templateParts["no-item"]);const e=this.templateList.length;let s=-1;const r=this.hasAttribute("extractValues"),o=this.templateParts.separator,n=(null==t?void 0:t.length)||0,a=null==t?void 0:t.slice(this.offset,this.offset+this.limit);return xt`
932
+ ${null==a?void 0:a.map(((t,i)=>{if(null==t)return kt;let a=null,l=i;if("object"==typeof t&&!Array.isArray(t)){const e=t[this.templateKey];e&&"string"==typeof e&&(a=this.templateParts[e]),r&&(l=null==t?void 0:t.key)}if("_sonic_http_response_"==l)return kt;if("string"!=typeof l&&"number"!=typeof l)return kt;const c=i>=n-1,h=i%2,d=this.publisher[l];return d._key_=l+"",d._metadata_={...d._metadata_.get(),key:l,even:0==h,odd:1==h,onlyChild:1==n,firstChild:0==i,lastChild:c},s++,a&&(s=-1),t&&xt`
933
+ <sonic-subscriber
934
+ ?debug=${!0===this.defferedDebug}
935
+ .bindPublisher=${function(){return d}}
936
+ .propertyMap?=${this.itemPropertyMap}
937
+ dataProvider="${this.dataProvider}/list-item/${l}"
938
+ >
939
+ ${Vs(a||this.templateList[s%e])}
940
+ </sonic-subscriber>
941
+ ${o&&!c?Vs(o):kt}
942
+ `}))}
943
+ `}};Zs([U({type:Object})],Ys.prototype,"itemPropertyMap",2),Zs([U({type:String})],Ys.prototype,"templateKey",2),Zs([U({type:String})],Ys.prototype,"idKey",2),Zs([U()],Ys.prototype,"limit",2),Zs([U()],Ys.prototype,"offset",2),Ys=Zs([m("sonic-list")],Ys);var Qs=Object.defineProperty,Gs=Object.getOwnPropertyDescriptor,Js=(t,e,s,i)=>{for(var r,o=i>1?void 0:i?Gs(e,s):e,n=t.length-1;n>=0;n--)(r=t[n])&&(o=(i?r(e,s,o):r(o))||o);return i&&o&&Qs(e,s,o),o};let Xs=class extends(G(Rt)){constructor(){super(...arguments),this.templates=null,this.lastRequestTime=0,this.key="",this.itemPropertyMap=null,this.cache="default",this.targetRequestDuration=500,this.limit=5,this.lazyBoundsRatio=1,this.offset=0,this.resultCount=0,this.noLazyload=!1,this.filteredFields="",this.instanceId=0,this.localStorage="disabled",this.filterPublisher=null,this.searchHash="",this.requestId=0,this.isFirstRequest=!0,this.dataProviderExpression="",this.idKey="id",this.currentScrollPosition=void 0,this.listDataProviders=[],this.nextHadEvent=!1}disconnectedCallback(){for(const t of this.listDataProviders)d.delete(t);super.disconnectedCallback()}async connectedCallback(){this.instanceId=Xs.instanceCounter++,this.localStorage=this.getAttribute("localStorage")||this.localStorage,this.removeAttribute("localStorage"),this.noShadowDom="",this.defferedDebug=this.hasAttribute("debug")||null,this.dataProvider||(this.dataProvider=this.dataProviderExpression||"sonic-queue-"+this.instanceId+"-"+Math.random().toString(36).substring(7)),this.dataProviderExpression||(this.dataProviderExpression=he.getAncestorAttributeValue(this.parentElement,"dataProvider")||""),super.connectedCallback(),this.key=this.getAttribute("key"),this.templates||(this.templates=Array.from(this.querySelectorAll("template"))),this.lastRequestTime=(new Date).getTime(),await d.getInstance().isLocalStrorageReady,this.configFilter()}configFilter(){var t;const e=this.getAncestorAttributeValue("dataFilterProvider");e?(this.filterPublisher=d.getInstance().get(e),null==(t=this.filterPublisher)||t.onInternalMutation((()=>{this.updateFilteredContent()}))):this.next()}updateFilteredContent(){var t;const e=this.dataProviderExpression.split("?");e.shift();const s=new URLSearchParams(e.join("?")),i=null==(t=this.filterPublisher)?void 0:t.get(),r=this.filteredFields.split(" ");for(const n in i){let t=i[n];Array.isArray(t)&&(t=t.filter((t=>null!==t))),this.filteredFields&&!r.includes(n)||null==t||""===t.toString()||s.set(n,i[n].toString())}const o=s.toString();if(o!=this.searchHash||this.isFirstRequest){this.searchHash=o;for(const t of this.listDataProviders)d.delete(t);this.listDataProviders=[],clearTimeout(this.filterTimeoutId),this.filterTimeoutId=setTimeout((async()=>{const t=this.resultCount;this.props=null,this.requestId++,this.resultCount=t,await d.getInstance().isLocalStrorageReady,window.requestAnimationFrame((()=>this.next()))}),this.isFirstRequest?0:400),this.isFirstRequest=!1}}resetDuration(){this.lastRequestTime=(new Date).getTime()}next(t){var e;console.log("next",t);let s=this.offset;const i=(new Date).getTime()-this.lastRequestTime;if(!this.nextHadEvent&&t&&(this.publisher.resultCount=0,this.resultCount=0),this.nextHadEvent=!!t,t){if(t.detail.requestId<this.requestId)return;if(console.log("next 2"),this.resultCount+=t.detail.props.length,!t.detail.isFirstLoad||!t.detail.props.length||-1==this.dataProviderExpression.indexOf("$offset"))return void(this.publisher.resultCount=this.resultCount);console.log("next 3")}if(console.log("next 4"),Array.isArray(this.props)){const t=this.props,e=t[t.length-1];s=parseInt(e.offset.toString())+parseInt(e.limit.toString())}else{const t=[];t.resultCount=this.resultCount,this.props=t}i>0&&t&&!this.localStorage&&(this.limit=Math.round(this.limit/i*this.targetRequestDuration)),this.limit<1&&(this.limit=1),this.limit>15&&(this.limit=15);let r=this.dataProviderExpression.replace("$offset",s+"").replace("$limit",this.limit+"");const o=r.split("?"),n=o.shift(),a=new URLSearchParams(o.join("?")),l=null==(e=this.filterPublisher)?void 0:e.get(),c=this.filteredFields.split(" ");for(const d in l)this.filteredFields&&c.includes(d)||null==l[d]||""==l[d]||a.set(d,l[d]);this.searchHash||(this.searchHash=a.toString()),r=n+"?"+a.toString(),this.listDataProviders.push(r);const h=[...this.props,{id:a.toString()+"/"+this.props.length,dataProvider:r+"_item_from_queue_"+this.instanceId,endPoint:r,offset:s,limit:this.limit}];h.resultCount=this.resultCount,this.props=h,this.lastRequestTime=(new Date).getTime()}render(){if(!Array.isArray(this.props))return kt;let t=!this.noLazyload;return 1==this.props.length&&(t=!1),xt`
944
+ ${
100
945
  /**
101
946
  * @license
102
947
  * Copyright 2021 Google LLC
103
948
  * SPDX-License-Identifier: BSD-3-Clause
104
949
  */
105
- function*(t,e){if(void 0!==t){let s=0;for(const i of t)yield e(i,s++)}}(this.props,((e,s)=>{var i;const r=0==s?this.templates:null==(i=this.templates)?void 0:i.filter((t=>"no-item"!=t.getAttribute("data-value")));return mt`<sonic-list fetch cache="${this.cache}" displayContents lazyBoundsRatio="${this.lazyBoundsRatio}" ?lazyload="${t}" localStorage="${this.localStorage}" requestId="${this.requestId}" .itemPropertyMap="${this.itemPropertyMap}" ?debug="${!0===this.defferedDebug}" @load="${this.next}" key="${this.key}" @loading="${this.resetDuration}" dataProvider="${e.dataProvider}" endPoint="${e.endPoint}" idKey="${this.idKey}" .templates="${r}"></sonic-list>`}))}`}};Ws.instanceCounter=0,Hs([f({type:Array})],Ws.prototype,"templates",2),Hs([f({type:Object})],Ws.prototype,"itemPropertyMap",2),Hs([f()],Ws.prototype,"cache",2),Hs([f()],Ws.prototype,"targetRequestDuration",2),Hs([f()],Ws.prototype,"limit",2),Hs([f()],Ws.prototype,"lazyBoundsRatio",2),Hs([f()],Ws.prototype,"offset",2),Hs([f()],Ws.prototype,"resultCount",2),Hs([f({type:Boolean})],Ws.prototype,"noLazyload",2),Hs([f()],Ws.prototype,"filteredFields",2),Hs([f({type:String})],Ws.prototype,"dataProviderExpression",2),Hs([f({type:String})],Ws.prototype,"idKey",2),Ws=Hs([m("sonic-queue")],Ws);var Ks=Object.defineProperty,Zs=Object.getOwnPropertyDescriptor,Qs=(t,e,s,i)=>{for(var r,o=i>1?void 0:i?Zs(e,s):e,n=t.length-1;n>=0;n--)(r=t[n])&&(o=(i?r(e,s,o):r(o))||o);return i&&o&&Ks(e,s,o),o};let Ys=class extends(D(zt)){constructor(){super(...arguments),this.submitResultKey=null,this.disabled=!1,this.endPoint=null,this.name="",this.value="",this.api=null}connectedCallback(){this.hasAttribute("onClick")&&this.addEventListener("click",(()=>this.submit())),this.hasAttribute("onEnterKey")&&this.addEventListener("keydown",(t=>{"Enter"===t.key&&this.submit()})),super.connectedCallback(),this.api=new r(this.getApiConfiguration())}submitNativeForm(){const t=oe.getClosestForm(this);if(!t)return;const e=this.getAncestorAttributeValue("formDataProvider"),s=h.get(e).get();for(const r in s){if("isFormValid"==r)continue;let e=t.querySelector('input[name="'+r+'"], select[name="'+r+'"], textarea[name="'+r+'"]');e||(e=document.createElement("input"),e.type="hidden",e.name=r,t.appendChild(e));let i=s[r];Array.isArray(i)&&(i=i.join(",")),"checkbox"===e.type||"radio"===e.type?i&&(e.checked=!0):e.value=i}const i=document.createElement("input");i.name=this.name,i.style.display="none",i.value=this.value,i.type="submit",t.appendChild(i),i&&i.click()}async submit(){var t,e,i;const r=h.getInstance().get(this.getAncestorAttributeValue("formDataProvider"));if(r.isFormValid=!0,r.invalidate(),!r.isFormValid.get())return;this.publisher&&(this.publisher.disabled=!0),r.isFormValid;if(this.hasAttribute("native"))return void this.submitNativeForm();const o=(null==(t=this.getAttribute("method"))?void 0:t.toLocaleLowerCase())||"post",n=this.hasAttribute("sendAsFormData"),a=r.get();delete a.isFormValid;const l=this.getAncestorAttributeValue("headersDataProvider"),c=l?h.getInstance().get(l):null;let d={};c&&(d=c.get());let p=null;const u=this.getAncestorAttributeValue("dataProvider"),g=this.endPoint||u;Ce.show();const m=async()=>{var t,e,i,r,l,c,u;if(n)p=await(null==(t=this.api)?void 0:t.submitFormData(g,a,o,d));else switch(o){case"put":p=await(null==(e=this.api)?void 0:e.put(g,a,d));break;case"delete":p=await(null==(i=this.api)?void 0:i.delete(g,a,d));break;case"get":p=await(null==(r=this.api)?void 0:r.get(g,d));break;default:p=await(null==(l=this.api)?void 0:l.post(g,a,d))}Ce.hide(),p?p._sonic_http_response_&&!p._sonic_http_response_.ok&&1===Object.keys(p).length&&(p.messages=[{content:"Network Error",status:"error"}]):p={messages:[{content:"Network Error",status:"error"}]};const m=this.getAncestorAttributeValue("clearedDataOnSuccess");m&&m.split(" ").forEach((t=>h.get(t).set({})));const b=this.hasAttribute("usernameKey")?this.getAttribute("usernameKey"):"username",f=this.hasAttribute("passwordKey")?this.getAttribute("passwordKey"):"password";(null==(u=null==(c=this.api)?void 0:c.lastResult)?void 0:u.ok)&&a[b]&&a[f]&&this.saveCredentials(a[b],a[f]),this.submitResultKey&&(p=s.traverse(p,this.submitResultKey.split("."),!0));const v=this.getAncestorAttributeValue("submitResultDataProvider");v&&h.get(v).set(p),this.publisher&&(this.publisher.disabled=null)},b=(null==c?void 0:c.needsCaptchaValidation.get())?c:r.needsCaptchaValidation.get()?r:null;if(b){b.captchaMethod=o,b.captchaAction=null!=(i=null!=(e=null==u?void 0:u.split("?")[0])?e:this.getAncestorAttributeValue("formDataProvider"))?i:"submit",b.captchaToken="request_token";const t=e=>{"request_token"!=e&&(m(),b.captchaToken.offAssign(t))};b.captchaToken.onAssign(t)}else m()}async saveCredentials(t,e){if("PasswordCredential"in window){const s=new window.PasswordCredential({id:t,password:e});await navigator.credentials.store(s)}}render(){return mt`<div ?data-disabled="${this.disabled}"><slot></slot></div>`}};Ys.styles=T`[data-disabled]{opacity:.3;pointer-events:none;user-select:none}`,Qs([f({type:String})],Ys.prototype,"submitResultKey",2),Qs([f({type:Boolean})],Ys.prototype,"disabled",2),Qs([f({type:String})],Ys.prototype,"endPoint",2),Qs([f()],Ys.prototype,"name",2),Qs([f()],Ys.prototype,"value",2),Ys=Qs([m("sonic-submit")],Ys);var Gs,Js,Xs,ti,ei="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},si={exports:{}};Gs=si,ti=[].slice,Js=ei,Xs=function(){var t,e,s,i,r,o,n,a,l,c,h,d,p,u,g;return l=function(t){return t.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")},n=function(t,e){var s,i,r;for(r=[],s=-1,i=t.length;++s<i;)r=r.concat(e(t[s]));return r},u=function(t,e){var s,i,r;for(r="",s=-1,i=t.length;++s<i;)r+=e(t[s]);return r},p=function(t){return new RegExp(t.toString()+"|").exec("").length-1},h=function(t,e){var s,i,r,o,n;for(o={},s=-1,r=t.length;++s<r;)i=t[s],null!=(n=e[s])&&(null!=o[i]?(Array.isArray(o[i])||(o[i]=[o[i]]),o[i].push(n)):o[i]=n);return o},(t={}).Result=function(t,e){this.value=t,this.rest=e},t.Tagged=function(t,e){this.tag=t,this.value=e},t.tag=function(e,s){return function(i){var r,o;if(null!=(r=s(i)))return o=new t.Tagged(e,r.value),new t.Result(o,r.rest)}},t.regex=function(e){return function(s){var i,r;if(null!=(i=e.exec(s)))return r=i[0],new t.Result(r,s.slice(r.length))}},t.sequence=function(){var e;return e=1<=arguments.length?ti.call(arguments,0):[],function(s){var i,r,o,n,a;for(i=-1,r=e.length,a=[],o=s;++i<r;){if(null==(n=(0,e[i])(o)))return;a.push(n.value),o=n.rest}return new t.Result(a,o)}},t.pick=function(){var e,s;return e=arguments[0],s=2<=arguments.length?ti.call(arguments,1):[],function(i){var r,o;if(null!=(o=t.sequence.apply(t,s)(i)))return r=o.value,o.value=r[e],o}},t.string=function(e){var s;return s=e.length,function(i){if(i.slice(0,s)===e)return new t.Result(e,i.slice(s))}},t.lazy=function(t){var e;return e=null,function(s){return null==e&&(e=t()),e(s)}},t.baseMany=function(e,s,i,r,o){var n,a,l;for(a=o,l=i?"":[];(null==s||null==s(a))&&null!=(n=e(a));)i?l+=n.value:l.push(n.value),a=n.rest;if(!r||0!==l.length)return new t.Result(l,a)},t.many1=function(e){return function(s){return t.baseMany(e,null,!1,!0,s)}},t.concatMany1Till=function(e,s){return function(i){return t.baseMany(e,s,!0,!0,i)}},t.firstChoice=function(){var t;return t=1<=arguments.length?ti.call(arguments,0):[],function(e){var s,i,r;for(s=-1,i=t.length;++s<i;)if(null!=(r=(0,t[s])(e)))return r}},d=function(e){var s;return(s={}).wildcard=t.tag("wildcard",t.string(e.wildcardChar)),s.optional=t.tag("optional",t.pick(1,t.string(e.optionalSegmentStartChar),t.lazy((function(){return s.pattern})),t.string(e.optionalSegmentEndChar))),s.name=t.regex(new RegExp("^["+e.segmentNameCharset+"]+")),s.named=t.tag("named",t.pick(1,t.string(e.segmentNameStartChar),t.lazy((function(){return s.name})))),s.escapedChar=t.pick(1,t.string(e.escapeChar),t.regex(/^./)),s.static=t.tag("static",t.concatMany1Till(t.firstChoice(t.lazy((function(){return s.escapedChar})),t.regex(/^./)),t.firstChoice(t.string(e.segmentNameStartChar),t.string(e.optionalSegmentStartChar),t.string(e.optionalSegmentEndChar),s.wildcard))),s.token=t.lazy((function(){return t.firstChoice(s.wildcard,s.optional,s.named,s.static)})),s.pattern=t.many1(t.lazy((function(){return s.token}))),s},a={escapeChar:"\\",segmentNameStartChar:":",segmentValueCharset:"a-zA-Z0-9-_~ %",segmentNameCharset:"a-zA-Z0-9",optionalSegmentStartChar:"(",optionalSegmentEndChar:")",wildcardChar:"*"},o=function(t,e){if(Array.isArray(t))return u(t,(function(t){return o(t,e)}));switch(t.tag){case"wildcard":return"(.*?)";case"named":return"(["+e+"]+)";case"static":return l(t.value);case"optional":return"(?:"+o(t.value,e)+")?"}},r=function(t,e){return null==e&&(e=a.segmentValueCharset),"^"+o(t,e)+"$"},i=function(t){if(Array.isArray(t))return n(t,i);switch(t.tag){case"wildcard":return["_"];case"named":return[t.value];case"static":return[];case"optional":return i(t.value)}},c=function(t,e,s,i){var r,o,n;if(null==i&&(i=!1),null!=(n=t[e])){if(!((r=s[e]||0)>(Array.isArray(n)?n.length-1:0)))return o=Array.isArray(n)?n[r]:n,i&&(s[e]=r+1),o;if(i)throw new Error("too few values provided for key `"+e+"`")}else if(i)throw new Error("no values provided for key `"+e+"`")},s=function(t,e,i){var r,o;if(Array.isArray(t)){for(r=-1,o=t.length;++r<o;)if(s(t[r],e,i))return!0;return!1}switch(t.tag){case"wildcard":return null!=c(e,"_",i,!1);case"named":return null!=c(e,t.value,i,!1);case"static":return!1;case"optional":return s(t.value,e,i)}},g=function(t,e,i){if(Array.isArray(t))return u(t,(function(t){return g(t,e,i)}));switch(t.tag){case"wildcard":return c(e,"_",i,!0);case"named":return c(e,t.value,i,!0);case"static":return t.value;case"optional":return s(t.value,e,i)?g(t.value,e,i):""}},(e=function(t,s){var o,n,l;if(t instanceof e)return this.isRegex=t.isRegex,this.regex=t.regex,this.ast=t.ast,void(this.names=t.names);if(this.isRegex=t instanceof RegExp,"string"!=typeof t&&!this.isRegex)throw new TypeError("argument must be a regex or a string");if(this.isRegex){if(this.regex=t,null!=s){if(!Array.isArray(s))throw new Error("if first argument is a regex the second argument may be an array of group names but you provided something else");if(o=p(this.regex),s.length!==o)throw new Error("regex contains "+o+" groups but array of group names contains "+s.length);this.names=s}}else{if(""===t)throw new Error("argument must not be the empty string");if(t.replace(/\s+/g,"")!==t)throw new Error("argument must not contain whitespace");if(n={escapeChar:(null!=s?s.escapeChar:void 0)||a.escapeChar,segmentNameStartChar:(null!=s?s.segmentNameStartChar:void 0)||a.segmentNameStartChar,segmentNameCharset:(null!=s?s.segmentNameCharset:void 0)||a.segmentNameCharset,segmentValueCharset:(null!=s?s.segmentValueCharset:void 0)||a.segmentValueCharset,optionalSegmentStartChar:(null!=s?s.optionalSegmentStartChar:void 0)||a.optionalSegmentStartChar,optionalSegmentEndChar:(null!=s?s.optionalSegmentEndChar:void 0)||a.optionalSegmentEndChar,wildcardChar:(null!=s?s.wildcardChar:void 0)||a.wildcardChar},null==(l=d(n).pattern(t)))throw new Error("couldn't parse pattern");if(""!==l.rest)throw new Error("could only partially parse pattern");this.ast=l.value,this.regex=new RegExp(r(this.ast,n.segmentValueCharset)),this.names=i(this.ast)}}).prototype.match=function(t){var e,s;return null==(s=this.regex.exec(t))?null:(e=s.slice(1),this.names?h(this.names,e):e)},e.prototype.stringify=function(t){if(null==t&&(t={}),this.isRegex)throw new Error("can't stringify patterns generated from a regex");if(t!==Object(t))throw new Error("argument must be an object or undefined");return g(this.ast,t,{})},e.escapeForRegex=l,e.concatMap=n,e.stringConcatMap=u,e.regexGroupCount=p,e.keysAndValuesToObject=h,e.P=t,e.newParser=d,e.defaultOptions=a,e.astNodeToRegexString=r,e.astNodeToNames=i,e.getParam=c,e.astNodeContainsSegmentsForProvidedParams=s,e.stringify=g,e},null!==si.exports?Gs.exports=Xs():Js.UrlPattern=Xs();var ii=si.exports,ri=Object.defineProperty,oi=Object.getOwnPropertyDescriptor,ni=(t,e,s,i)=>{for(var r,o=i>1?void 0:i?oi(e,s):e,n=t.length-1;n>=0;n--)(r=t[n])&&(o=(i?r(e,s,o):r(o))||o);return i&&o&&ri(e,s,o),o};let ai=class extends(D(j(zt))){constructor(){super(...arguments),this.templateValueAttribute="data-route",this._location=document.location.href.replace(document.location.origin,"")}connectedCallback(){this.noShadowDom="",qt.onChange(this),super.connectedCallback()}disconnectedCallback(){qt.offChange(this),super.disconnectedCallback()}set location(t){this._location=t,this.requestUpdate()}get location(){return this._location}render(){const t=[];for(const s of this.templatePartsList){const i=s.getAttribute(this.templateValueAttribute)||"";if(new RegExp(i).test(this.location))t.push(s);else try{new ii(i).match(this.location)&&(s.setAttribute("mode","patternMatching"),t.push(s))}catch(e){-1!=this.location.indexOf(i.replace(document.location.origin,""))&&t.push(s)}}return mt`${Me(t,((t,e)=>e+(new Date).getTime()),(t=>{var e;if(t.title&&(document.title=t.title),t.hasAttribute("dataProviderExpression")){let s="";const i=t.getAttribute("dataProviderExpression")||"";if("patternMatching"==t.getAttribute("mode")){const e=new ii(t.getAttribute(this.templateValueAttribute)||"");s=new ii(i).stringify(e.match(this.location))}else{const r=new RegExp(t.getAttribute(this.templateValueAttribute)||""),o=(this.location+"").match(r);o&&(s=(null==(e=o.shift())?void 0:e.replace(r,i))||"")}return mt`<div style="display:contents" dataProvider="${s}">${Ns(t)}</div>`}return Ns(t)}))}`}};ni([f()],ai.prototype,"location",1),ai=ni([m("sonic-router")],ai);var li=Object.defineProperty,ci=Object.getOwnPropertyDescriptor;let hi=class extends(D(zt)){connectedCallback(){this.noShadowDom="",this.style.display="none",super.connectedCallback(),this.udpateCallBack=()=>this.update(),this.publisher&&this.publisher.onInternalMutation(this.udpateCallBack)}disconnectedCallback(){this.publisher&&this.publisher.offInternalMutation(this.udpateCallBack),super.disconnectedCallback()}update(){if(this.hasAttribute("onAdded"))return void qt.changeFromComponent(this);if(!this.props)return;const t=this.getAttribute("onData").split("."),e=s.traverse(this.props,t);!e||s.isObject(e)&&e||qt.changeFromComponent(this)}};hi=((t,e,s,i)=>{for(var r,o=i>1?void 0:i?ci(e,s):e,n=t.length-1;n>=0;n--)(r=t[n])&&(o=(i?r(e,s,o):r(o))||o);return i&&o&&li(e,s,o),o})([m("sonic-redirect")],hi);var di=Object.defineProperty,pi=Object.getOwnPropertyDescriptor,ui=(t,e,s,i)=>{for(var r,o=i>1?void 0:i?pi(e,s):e,n=t.length-1;n>=0;n--)(r=t[n])&&(o=(i?r(e,s,o):r(o))||o);return i&&o&&di(e,s,o),o};let gi=class extends(D(j(zt))){constructor(){super(...arguments),this.state="",this.inverted=!1,this.statePath="",this.onAssign=t=>{this.state=t,this.requestUpdate()}}connectedCallback(){if(this.noShadowDom="",super.connectedCallback(),this.hasAttribute("data-path")&&(this.statePath=this.getAttribute("data-path")),this.statePath){this.statePublisher=this.publisher;const t=this.statePath.split(".");for(const e of t)this.statePublisher=this.statePublisher[e];this.statePublisher.onAssign(this.onAssign)}}disconnectedCallback(){var t;this.statePath&&(null==(t=this.statePublisher)||t.offAssign(this.onAssign)),super.disconnectedCallback()}render(){const t=[];let e=this.state;(!Array.isArray(e)&&s.isObject(e)||void 0===e)&&(e="");for(const s of this.templatePartsList){let i=s.getAttribute(this.templateValueAttribute),r=e;this.inverted&&(r=i,i=e),""==i&&(i=this.inverted?".*?":"^$");if(new RegExp(i).test(r))t.push(s),s.removeAttribute("mode");else{const e=new ii(i);e.names.length>0&&e.match(r)&&(s.setAttribute("mode","patternMatching"),t.push(s))}}return mt`${Me(t,((t,e)=>e+(new Date).getTime()),(t=>{var s;if(t.title&&(document.title=t.title),t.hasAttribute("dataProviderExpression")){const i=t.getAttribute("dataProviderExpression");let r="",o=e,n=t.getAttribute(this.templateValueAttribute);if(this.inverted&&(o=n,n=e),""==n&&(n=this.inverted?"*":"^$"),"patternMatching"==t.getAttribute("mode")){const t=new ii(n);r=new ii(i).stringify(t.match(o))}else{const t=new RegExp(n),e=(o+"").match(t);e&&(r=null==(s=e.shift())?void 0:s.replace(t,i))}return mt`<div style="display:contents" dataProvider="${r}">${Ns(t)}</div>`}return Ns(t)}))}`}};ui([f()],gi.prototype,"state",2),ui([f({type:Boolean,reflect:!0})],gi.prototype,"inverted",2),gi=ui([m("sonic-states")],gi);var mi=Object.defineProperty,bi=Object.getOwnPropertyDescriptor;let fi=class extends zt{createRenderRoot(){return this}render(){return mt`<slot></slot>`}};fi=((t,e,s,i)=>{for(var r,o=i>1?void 0:i?bi(e,s):e,n=t.length-1;n>=0;n--)(r=t[n])&&(o=(i?r(e,s,o):r(o))||o);return i&&o&&mi(e,s,o),o})([m("sonic-scope")],fi);var vi=Object.defineProperty,yi=Object.getOwnPropertyDescriptor,wi=(t,e,s,i)=>{for(var r,o=i>1?void 0:i?yi(e,s):e,n=t.length-1;n>=0;n--)(r=t[n])&&(o=(i?r(e,s,o):r(o))||o);return i&&o&&vi(e,s,o),o};let xi=class extends(D(zt)){constructor(){super(...arguments),this.text="Example"}render(){return mt`<div>${this.text}</div>`}};wi([f()],xi.prototype,"text",2),xi=wi([m("sonic-example")],xi);var _i={checkbox:{tagName:"sonic-checkbox"},date:{tagName:"sonic-input",attributes:{type:"date"}},fieldset:{tagName:"sonic-fieldset",nodes:[{libraryKey:"formLayout"}],contentElementSelector:"sonic-form-layout"},managed_file:{tagName:"sonic-input",attributes:{variant:"ghost",type:"file"}},password:{tagName:"sonic-input",attributes:{type:"password"}},radio:{tagName:"sonic-radio"},select:{tagName:"sonic-select"},textarea:{tagName:"sonic-textarea"},textfield:{tagName:"sonic-input",attributes:{type:"text"}},hidden:{tagName:"sonic-input",attributes:{type:"hidden"}},button:{tagName:"sonic-button"},form:{tagName:"sonic-submit",attributes:{onEnterKey:!0}},submit:{tagName:"sonic-submit",attributes:{onClick:!0},contentElementSelector:"sonic-button",nodes:[{libraryKey:"button",attributes:{type:"success"},nodes:[{tagName:"sonic-icon",attributes:{name:"check",slot:"prefix"}}]}]},email:{tagName:"sonic-input",attributes:{type:"email"}},formItemContainer:{tagName:"div",attributes:{class:"form-item-container"}},formLayout:{tagName:"sonic-form-layout"},formActions:{tagName:"sonic-form-actions"},passwordHelper:{tagName:"sonic-password-helper"},sameValueHelper:{tagName:"sonic-same-value-helper"},divider:{tagName:"sonic-divider"}};class ki{async transform(t,e){if(this.sduiDescriptor=t,this.sduiDescriptor.library)for(const s in e.library)this.sduiDescriptor.library[s]=e.library[s];for(const s of e.transforms)this.transformAction(s)}transformAction(t){const e=this.getNodesMatchingPatterns(t.patterns,this.sduiDescriptor);this[t.action](t,e)}getNodesMatchingPatterns(t,e){if(!t)return[];if(!e)return[];const s=e.nodes;if(!s)return[];let i=[],r=0;for(const o of t)for(const t of s)this.nodeMatchesPattern(o,t)&&i.push({parent:e,child:t,index:r}),i=i.concat(this.getNodesMatchingPatterns([o],t)),r++;return i}stringMatchesExpression(t,e){return!e||t&&t.match(e)}nodeMatchesPattern(t,e){const s=t,i=e,r=["libraryKey","innerHTML","prefix","suffix","markup"];for(const a of r)if(!this.stringMatchesExpression(i[a],s[a]))return!1;const o=t.attributes,n=e.attributes;if(o&&!n)return!1;if(o)for(const a in o)if(!n||!this.stringMatchesExpression(n[a],o[a]))return!1;return!0}unwrap(t,e){var s,i;for(const r of e)null==(s=r.parent.nodes)||s.splice(r.parent.nodes.indexOf(r.child),1),r.child.nodes&&(null==(i=r.parent.nodes)||i.splice(r.parent.nodes.indexOf(r.child),0,...r.child.nodes))}wrap(t,e){var s,i,r,o,n,a;const l={...t.ui};l.nodes||(l.nodes=[]);let c=0;for(const d of e)null==(s=l.nodes)||s.push(d.child),c>0&&(null==(i=d.parent.nodes)||i.splice(d.parent.nodes.indexOf(d.child),1)),c++;const h=null==(o=null==(r=e[0])?void 0:r.parent.nodes)?void 0:o.indexOf(e[0].child);h&&(null==(n=e[0].parent.nodes)||n.splice(h,1),null==(a=e[0].parent.nodes)||a.splice(h,0,l))}move(t,e){var s,i;for(const r of e){null==(s=r.parent.nodes)||s.splice(r.parent.nodes.indexOf(r.child),1);let e=[];t.after&&(e=this.getNodesMatchingPatterns([t.after],this.sduiDescriptor)),t.before&&(e=this.getNodesMatchingPatterns([t.before],this.sduiDescriptor));const o=e[0];o&&(null==(i=o.parent.nodes)||i.splice(o.parent.nodes.indexOf(o.child)+(t.after?1:0),0,r.child))}}remap(t,e){var s,i,r;for(const o of e){const e={...t.ui};e.attributes||(e.attributes={});const n=o.child.attributes;if(n)for(const t in n)Object.prototype.hasOwnProperty.call(e.attributes,"key")||(e.attributes[t]=n[t]);const a=["libraryKey","innerHTML","prefix","suffix","markup"],l=o.child,c=e;for(const t of a)!Object.prototype.hasOwnProperty.call(e,t)&&l[t]&&(c[t]=l[t]);e.nodes||(e.nodes=[]);const h=o.child.nodes;if(h)for(const t of h)e.nodes.push(t);const d=(null==(s=o.parent.nodes)?void 0:s.indexOf(o.child))||-1;-1!=d&&(null==(i=o.parent.nodes)||i.splice(d,1),null==(r=o.parent.nodes)||r.splice(d,0,e))}}delete(t,e){var s;for(const i of e)null==(s=i.parent.nodes)||s.splice(i.parent.nodes.indexOf(i.child),1)}insert(t,e){var s;const i=t.after?"after":t.before?"before":"in";e=[],t.after?e=this.getNodesMatchingPatterns([t.after],this.sduiDescriptor):t.before?e=this.getNodesMatchingPatterns([t.before],this.sduiDescriptor):t.in&&(e=this.getNodesMatchingPatterns([t.in],this.sduiDescriptor));const r=e[0];r&&("in"==i?(r.child.nodes||(r.child.nodes=[]),r.child.nodes.push({...t.ui})):null==(s=r.parent.nodes)||s.splice(r.parent.nodes.indexOf(r.child)+("after"==i?1:0),0,{...t.ui}))}}var Ai=Object.defineProperty,Pi=Object.getOwnPropertyDescriptor,Ci=(t,e,s,i)=>{for(var r,o=i>1?void 0:i?Pi(e,s):e,n=t.length-1;n>=0;n--)(r=t[n])&&(o=(i?r(e,s,o):r(o))||o);return i&&o&&Ai(e,s,o),o};const Si=t=>{class e extends t{constructor(...t){super(),this.forceAutoFill=!1,this._type="text"}validateFormElement(){var t;const e=null==(t=this.shadowRoot)?void 0:t.querySelector("input");if(!e||e.checkValidity())return;const s=this.getFormPublisher();s&&(s.isFormValid=!1),e.reportValidity()}set type(t){this.hasAttribute("type")&&!this.forceAutoFill&&(t=this.getAttribute("type")),this._type=t,this.requestUpdate()}get type(){return this._type}get description(){return this._description}set description(t){this.hasAttribute("description")&&!this.forceAutoFill&&(t=this.getAttribute("description")),this._description=t,this.requestUpdate()}get label(){return this._label}set label(t){this.hasAttribute("label")&&!this.forceAutoFill&&(t=this.getAttribute("label")),this._label=t,this.requestUpdate()}}return Ci([f()],e.prototype,"forceAutoFill",2),Ci([f({type:String})],e.prototype,"type",1),Ci([f()],e.prototype,"description",1),Ci([f()],e.prototype,"label",1),Ci([f({type:Number})],e.prototype,"tabindex",2),Ci([f({type:String})],e.prototype,"autocomplete",2),e},$i=Ss,Oi=ge,Di=Xt,Li=Si,Ei=D,ji=j;window["concorde-mixins"]=window["concorde-mixins"]||{},window["concorde-mixins"]={Fetcher:$i,FormCheckable:Oi,FormElement:Di,FormInput:Li,Subscriber:Ei,TemplatesContainer:ji};var Mi=Object.defineProperty,Ni=Object.getOwnPropertyDescriptor,zi=(t,e,s,i)=>{for(var r,o=i>1?void 0:i?Ni(e,s):e,n=t.length-1;n>=0;n--)(r=t[n])&&(o=(i?r(e,s,o):r(o))||o);return i&&o&&Mi(e,s,o),o};let Ii=class extends($i(Ei(zt))){constructor(){super(...arguments),this.sduiDescriptor={}}connectedCallback(){this.noShadowDom="",this.displayContents=!0,this.isFetchEnabled=this.hasAttribute("fetch"),super.connectedCallback()}willUpdate(t){null==this.props&&(this.sduiDescriptor={});{const t=this.sduiKey?this.props[this.sduiKey]:this.props;if(this.sduiDescriptor==t)return;this.sduiDescriptor=t,this.updateContents()}super.willUpdate(t)}async updateContents(){if(!this.sduiDescriptor)return;const t={};Object.assign(t,_i,this.sduiDescriptor.library),this.sduiDescriptor.library=t,this.loadAssets(),await this.loadLibrary(),await this.transformSDUIDescriptor(),this.parseRootNodes()}removeChildren(){for(;[...this.children].filter((t=>"SLOT"!=t.nodeName)).length>0;)this.removeChild(this.children[0])}loadAssets(){if(this.sduiDescriptor){if(this.sduiDescriptor.js)for(const t of this.sduiDescriptor.js)oe.loadJS(t);if(this.sduiDescriptor.css)for(const t of this.sduiDescriptor.css)oe.loadCSS(t)}}async transformSDUIDescriptor(){if(!this.hasAttribute("transformation"))return;const t=await fetch(this.getAttribute("transformation")),e=await t.json(),s=new ki;await s.transform(this.sduiDescriptor,e)}async loadLibrary(){if(!this.hasAttribute("library"))return;const t=await fetch(this.getAttribute("library")),e=await t.json();this.sduiDescriptor.library=e}parseRootNodes(){if(this.removeChildren(),!this.sduiDescriptor)return;let t=this.sduiDescriptor.nodes;t||(t=[]);const e={tagName:"sonic-toast-message-subscriber",attributes:{}};this.messagesKey&&(e.attributes={subDataProvider:this.messagesKey}),t.push(e),t.forEach((t=>this.appendChild(this.parseChild(t))))}parseChild(t){const e=t.tagName||"div";let{element:s,contentElement:i}=this.handleLibrary(t,e);if(this.handleAttributes(t,s),s=this.handleMarkup(t,s),i||(i=s),this.handleChildNodes(t,i,s),this.handleInnerHTML(t,i),t.prefix||t.suffix){return this.handlePrefixSuffix(t,s)}return s}handlePrefixSuffix(t,e){const s=document.createElement("div");return s.innerHTML=(t.prefix||"")+e.outerHTML+(t.suffix||""),s.style.display="contents",s}handleChildNodes(t,e,s){if(t.nodes){const i=t.nodes;for(const t of i){const i=this.parseChild(t);let r=e;if(t.parentElementSelector&&(r=s.querySelector(t.parentElementSelector)||e),r.shadowRoot)r.shadowRoot.appendChild(i);else if("template"==r.tagName.toLocaleLowerCase()){r.content.appendChild(i)}else r.appendChild(i)}}}handleLibrary(t,e){let s,i;if(t.libraryKey&&this.sduiDescriptor.library){s=this.parseChild(this.sduiDescriptor.library[t.libraryKey]||{tagName:"div"});const e=(this.sduiDescriptor.library[t.libraryKey]||{}).contentElementSelector;e&&(i=s.querySelector(e))}else s=document.createElement(e);return{element:s,contentElement:i}}handleAttributes(t,e){const s=t.attributes;for(const i in s){const t=s[i],r=ae.isObject(t)?JSON.stringify(t):t;e.setAttribute(i,r)}}handleMarkup(t,e){return t.markup&&((e=document.createElement("div")).style.display="contents",e.innerHTML=t.markup),e}handleInnerHTML(t,e){var s;if(t.innerHTML)if(-1!=t.innerHTML.indexOf("wording_")){const i=this.getAncestorAttributeValue("wordingProvider");null==(s=this.api)||s.post(i,{labels:[t.innerHTML.substring(8)]}).then((t=>{e&&(e.innerHTML+=t)}))}else e&&(e.innerHTML+=t.innerHTML)}};zi([f()],Ii.prototype,"sduiKey",2),zi([f()],Ii.prototype,"messagesKey",2),Ii=zi([m("sonic-sdui")],Ii);var Fi=Object.defineProperty,Ti=Object.getOwnPropertyDescriptor,Ri=(t,e,s,i)=>{for(var r,o=i>1?void 0:i?Ti(e,s):e,n=t.length-1;n>=0;n--)(r=t[n])&&(o=(i?r(e,s,o):r(o))||o);return i&&o&&Fi(e,s,o),o};let Vi=class extends(Ei(zt)){constructor(){super(...arguments),this._composition={},this.listeners=[]}get composition(){return this._composition}set composition(t){this._composition=t,this.updateComposition()}connectedCallback(){super.connectedCallback(),this.updateComposition()}disconnectedCallback(){this.removePublisherListeners(),super.disconnectedCallback()}updateComposition(){this.removePublisherListeners(),this.publisher&&(this.publisher.set({}),this.parseComposition(this.composition,this.publisher))}removePublisherListeners(){const t=this.listeners;this.listeners=[],t.forEach((t=>{this.publisher.offAssign(t.subscriber)}))}parseComposition(t,e){if(t)for(const s in t){const i=t[s];if("string"==typeof i){const t=i.split("."),r=t.shift();if(!r)continue;let o=ce.get(r);o=ae.traverse(o,t);const n={publisher:o,subscriber:t=>{e[s]=t}};this.listeners.push(n),o.onAssign(n.subscriber),e._proxies_.set(s,o)}else{this.publisher[s]={};const t=new l({},e);e._proxies_.set(s,t);const r={publisher:t,subscriber:t=>{e[s]=t}};this.listeners.push(r),t.onAssign(r.subscriber),this.parseComposition(i,t)}}}render(){return mt`<slot></slot>`}};Vi.styles=[T`:host{display:contents}`],Ri([f({type:Object})],Vi.prototype,"composition",1),Vi=Ri([m("sonic-mix")],Vi);var Ui=Object.defineProperty,qi=Object.getOwnPropertyDescriptor;let Bi=class extends(Ei(zt)){connectedCallback(){this.setAttribute("subDataProvider",this.getAttribute("key")),super.connectedCallback()}render(){return"object"==typeof this.props||void 0===this.props?mt`<slot name="prefix"></slot><slot></slot><slot name="suffix"></slot>`:mt`${rs(this.props.toString())}<slot name="prefix"></slot><slot></slot><slot name="suffix"></slot>`}};Bi=((t,e,s,i)=>{for(var r,o=i>1?void 0:i?qi(e,s):e,n=t.length-1;n>=0;n--)(r=t[n])&&(o=(i?r(e,s,o):r(o))||o);return i&&o&&Ui(e,s,o),o})([m("sonic-value")],Bi);const Hi=T`:host{--sc-font-family-base:"Inter var","Inter",-apple-system,system-ui,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif;--sc-font-weight-base:400;--sc-font-style-base:normal;--sc-headings-font-family:var(--sc-font-family-base),sans-serif;--sc-headings-font-style:var(--sc-font-style-base);--sc-headings-line-height:1.1;--sc-headings-font-weight:700;--sc-headings-text-transform:none;--sc-btn-font-weight:var(--sc-font-weight-base);--sc-btn-font-family:var(--sc-font-family-base);--sc-btn-font-style:var(--sc-font-style-base);--sc-rounded-sm:calc(var(--sc-rounded) * 0.5);--sc-rounded:0.375rem;--sc-rounded-md:calc(var(--sc-rounded) * 1.8);--sc-rounded-lg:calc(var(--sc-rounded) * 3);--sc-rounded-xl:calc(var(--sc-rounded) * 7);--sc-rounded-size-intensity:calc((1em - 1rem) * 0.4);--sc-btn-rounded-intensity:1.4;--sc-btn-font-weight:500;--sc-btn-rounded:calc(
950
+ function*(t,e){if(void 0!==t){let s=0;for(const i of t)yield e(i,s++)}}(this.props,((e,s)=>{var i;const r=0==s?this.templates:null==(i=this.templates)?void 0:i.filter((t=>"no-item"!=t.getAttribute("data-value")));return xt`
951
+ <sonic-list
952
+ fetch
953
+ cache=${this.cache}
954
+ displayContents
955
+ lazyBoundsRatio=${this.lazyBoundsRatio}
956
+ ?lazyload=${t}
957
+ localStorage=${this.localStorage}
958
+ requestId=${this.requestId}
959
+ .itemPropertyMap=${this.itemPropertyMap}
960
+ ?debug=${!0===this.defferedDebug}
961
+ @load=${this.next}
962
+ key=${this.key}
963
+ @loading=${this.resetDuration}
964
+ dataProvider="${e.dataProvider}"
965
+ endPoint="${e.endPoint}"
966
+ idKey=${this.idKey}
967
+ .templates=${r}
968
+ >
969
+ </sonic-list>
970
+ `}))}
971
+ `}};Xs.instanceCounter=0,Js([U({type:Array})],Xs.prototype,"templates",2),Js([U({type:Object})],Xs.prototype,"itemPropertyMap",2),Js([U()],Xs.prototype,"cache",2),Js([U()],Xs.prototype,"targetRequestDuration",2),Js([U()],Xs.prototype,"limit",2),Js([U()],Xs.prototype,"lazyBoundsRatio",2),Js([U()],Xs.prototype,"offset",2),Js([U()],Xs.prototype,"resultCount",2),Js([U({type:Boolean})],Xs.prototype,"noLazyload",2),Js([U()],Xs.prototype,"filteredFields",2),Js([U({type:String})],Xs.prototype,"dataProviderExpression",2),Js([U({type:String})],Xs.prototype,"idKey",2),Xs=Js([m("sonic-queue")],Xs);var ti=Object.defineProperty,ei=Object.getOwnPropertyDescriptor,si=(t,e,s,i)=>{for(var r,o=i>1?void 0:i?ei(e,s):e,n=t.length-1;n>=0;n--)(r=t[n])&&(o=(i?r(e,s,o):r(o))||o);return i&&o&&ti(e,s,o),o};let ii=class extends(G(Rt)){constructor(){super(...arguments),this.submitResultKey=null,this.disabled=!1,this.endPoint=null,this.name="",this.value="",this.api=null}connectedCallback(){this.hasAttribute("onClick")&&this.addEventListener("click",(()=>this.submit())),this.hasAttribute("onEnterKey")&&this.addEventListener("keydown",(t=>{"Enter"===t.key&&this.submit()})),super.connectedCallback(),this.api=new o(this.getApiConfiguration())}submitNativeForm(){const t=he.getClosestForm(this);if(!t)return;const e=this.getAncestorAttributeValue("formDataProvider"),s=d.get(e).get();for(const r in s){if("isFormValid"==r)continue;let e=t.querySelector('input[name="'+r+'"], select[name="'+r+'"], textarea[name="'+r+'"]');e||(e=document.createElement("input"),e.type="hidden",e.name=r,t.appendChild(e));let i=s[r];Array.isArray(i)&&(i=i.join(",")),"checkbox"===e.type||"radio"===e.type?i&&(e.checked=!0):e.value=i}const i=document.createElement("input");i.name=this.name,i.style.display="none",i.value=this.value,i.type="submit",t.appendChild(i),i&&i.click()}async submit(){var t;const e=d.getInstance().get(this.getAncestorAttributeValue("formDataProvider"));if(e.isFormValid=!0,e.invalidate(),!e.isFormValid.get())return;this.publisher&&(this.publisher.disabled=!0),e.isFormValid;if(this.hasAttribute("native"))return void this.submitNativeForm();const s=(null==(t=this.getAttribute("method"))?void 0:t.toLocaleLowerCase())||"post",r=this.hasAttribute("sendAsFormData"),o=e.get();delete o.isFormValid;const n=this.getAncestorAttributeValue("headersDataProvider"),a=n?d.getInstance().get(n):null;let l={};a&&(l=a.get());let c=null;const h=this.getAncestorAttributeValue("dataProvider"),p=this.endPoint||h;Le.show();const u=async()=>{var t,e,n,a,h,u,g;if(r)c=await(null==(t=this.api)?void 0:t.submitFormData(p,o,s,l));else switch(s){case"put":c=await(null==(e=this.api)?void 0:e.put(p,o,l));break;case"delete":c=await(null==(n=this.api)?void 0:n.delete(p,o,l));break;case"get":c=await(null==(a=this.api)?void 0:a.get(p,l));break;default:c=await(null==(h=this.api)?void 0:h.post(p,o,l))}Le.hide(),c?c._sonic_http_response_&&!c._sonic_http_response_.ok&&1===Object.keys(c).length&&(c.messages=[{content:"Network Error",status:"error"}]):c={messages:[{content:"Network Error",status:"error"}]};const b=this.getAncestorAttributeValue("clearedDataOnSuccess");b&&b.split(" ").forEach((t=>d.get(t).set({})));const m=this.hasAttribute("usernameKey")?this.getAttribute("usernameKey"):"username",f=this.hasAttribute("passwordKey")?this.getAttribute("passwordKey"):"password";(null==(g=null==(u=this.api)?void 0:u.lastResult)?void 0:g.ok)&&o[m]&&o[f]&&this.saveCredentials(o[m],o[f]),this.submitResultKey&&(c=i.traverse(c,this.submitResultKey.split("."),!0));const v=this.getAncestorAttributeValue("submitResultDataProvider");v&&d.get(v).set(c),this.publisher&&(this.publisher.disabled=null)},g=(null==a?void 0:a.needsCaptchaValidation.get())?a:e.needsCaptchaValidation.get()?e:null;if(g){g.captchaMethod=s,g.captchaAction=(null==h?void 0:h.split("?")[0])??this.getAncestorAttributeValue("formDataProvider")??"submit",g.captchaToken="request_token";const t=e=>{"request_token"!=e&&(u(),g.captchaToken.offAssign(t))};g.captchaToken.onAssign(t)}else u()}async saveCredentials(t,e){if("PasswordCredential"in window){const s=new window.PasswordCredential({id:t,password:e});await navigator.credentials.store(s)}}render(){return xt`<div ?data-disabled=${this.disabled}><slot></slot></div>`}};ii.styles=_`
972
+ [data-disabled] {
973
+ opacity: 0.3;
974
+ pointer-events: none;
975
+ user-select: none;
976
+ }
977
+ `,si([U({type:String})],ii.prototype,"submitResultKey",2),si([U({type:Boolean})],ii.prototype,"disabled",2),si([U({type:String})],ii.prototype,"endPoint",2),si([U()],ii.prototype,"name",2),si([U()],ii.prototype,"value",2),ii=si([m("sonic-submit")],ii);var ri="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function oi(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var ni,ai,li,ci,hi={exports:{}};ni=hi,ci=[].slice,ai=ri,li=function(){var t,e,s,i,r,o,n,a,l,c,h,d,p,u,g;return l=function(t){return t.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")},n=function(t,e){var s,i,r;for(r=[],s=-1,i=t.length;++s<i;)r=r.concat(e(t[s]));return r},u=function(t,e){var s,i,r;for(r="",s=-1,i=t.length;++s<i;)r+=e(t[s]);return r},p=function(t){return new RegExp(t.toString()+"|").exec("").length-1},h=function(t,e){var s,i,r,o,n;for(o={},s=-1,r=t.length;++s<r;)i=t[s],null!=(n=e[s])&&(null!=o[i]?(Array.isArray(o[i])||(o[i]=[o[i]]),o[i].push(n)):o[i]=n);return o},(t={}).Result=function(t,e){this.value=t,this.rest=e},t.Tagged=function(t,e){this.tag=t,this.value=e},t.tag=function(e,s){return function(i){var r,o;if(null!=(r=s(i)))return o=new t.Tagged(e,r.value),new t.Result(o,r.rest)}},t.regex=function(e){return function(s){var i,r;if(null!=(i=e.exec(s)))return r=i[0],new t.Result(r,s.slice(r.length))}},t.sequence=function(){var e;return e=1<=arguments.length?ci.call(arguments,0):[],function(s){var i,r,o,n,a;for(i=-1,r=e.length,a=[],o=s;++i<r;){if(null==(n=(0,e[i])(o)))return;a.push(n.value),o=n.rest}return new t.Result(a,o)}},t.pick=function(){var e,s;return e=arguments[0],s=2<=arguments.length?ci.call(arguments,1):[],function(i){var r,o;if(null!=(o=t.sequence.apply(t,s)(i)))return r=o.value,o.value=r[e],o}},t.string=function(e){var s;return s=e.length,function(i){if(i.slice(0,s)===e)return new t.Result(e,i.slice(s))}},t.lazy=function(t){var e;return e=null,function(s){return null==e&&(e=t()),e(s)}},t.baseMany=function(e,s,i,r,o){var n,a,l;for(a=o,l=i?"":[];(null==s||null==s(a))&&null!=(n=e(a));)i?l+=n.value:l.push(n.value),a=n.rest;if(!r||0!==l.length)return new t.Result(l,a)},t.many1=function(e){return function(s){return t.baseMany(e,null,!1,!0,s)}},t.concatMany1Till=function(e,s){return function(i){return t.baseMany(e,s,!0,!0,i)}},t.firstChoice=function(){var t;return t=1<=arguments.length?ci.call(arguments,0):[],function(e){var s,i,r;for(s=-1,i=t.length;++s<i;)if(null!=(r=(0,t[s])(e)))return r}},d=function(e){var s;return(s={}).wildcard=t.tag("wildcard",t.string(e.wildcardChar)),s.optional=t.tag("optional",t.pick(1,t.string(e.optionalSegmentStartChar),t.lazy((function(){return s.pattern})),t.string(e.optionalSegmentEndChar))),s.name=t.regex(new RegExp("^["+e.segmentNameCharset+"]+")),s.named=t.tag("named",t.pick(1,t.string(e.segmentNameStartChar),t.lazy((function(){return s.name})))),s.escapedChar=t.pick(1,t.string(e.escapeChar),t.regex(/^./)),s.static=t.tag("static",t.concatMany1Till(t.firstChoice(t.lazy((function(){return s.escapedChar})),t.regex(/^./)),t.firstChoice(t.string(e.segmentNameStartChar),t.string(e.optionalSegmentStartChar),t.string(e.optionalSegmentEndChar),s.wildcard))),s.token=t.lazy((function(){return t.firstChoice(s.wildcard,s.optional,s.named,s.static)})),s.pattern=t.many1(t.lazy((function(){return s.token}))),s},a={escapeChar:"\\",segmentNameStartChar:":",segmentValueCharset:"a-zA-Z0-9-_~ %",segmentNameCharset:"a-zA-Z0-9",optionalSegmentStartChar:"(",optionalSegmentEndChar:")",wildcardChar:"*"},o=function(t,e){if(Array.isArray(t))return u(t,(function(t){return o(t,e)}));switch(t.tag){case"wildcard":return"(.*?)";case"named":return"(["+e+"]+)";case"static":return l(t.value);case"optional":return"(?:"+o(t.value,e)+")?"}},r=function(t,e){return null==e&&(e=a.segmentValueCharset),"^"+o(t,e)+"$"},i=function(t){if(Array.isArray(t))return n(t,i);switch(t.tag){case"wildcard":return["_"];case"named":return[t.value];case"static":return[];case"optional":return i(t.value)}},c=function(t,e,s,i){var r,o,n;if(null==i&&(i=!1),null!=(n=t[e])){if(!((r=s[e]||0)>(Array.isArray(n)?n.length-1:0)))return o=Array.isArray(n)?n[r]:n,i&&(s[e]=r+1),o;if(i)throw new Error("too few values provided for key `"+e+"`")}else if(i)throw new Error("no values provided for key `"+e+"`")},s=function(t,e,i){var r,o;if(Array.isArray(t)){for(r=-1,o=t.length;++r<o;)if(s(t[r],e,i))return!0;return!1}switch(t.tag){case"wildcard":return null!=c(e,"_",i,!1);case"named":return null!=c(e,t.value,i,!1);case"static":return!1;case"optional":return s(t.value,e,i)}},g=function(t,e,i){if(Array.isArray(t))return u(t,(function(t){return g(t,e,i)}));switch(t.tag){case"wildcard":return c(e,"_",i,!0);case"named":return c(e,t.value,i,!0);case"static":return t.value;case"optional":return s(t.value,e,i)?g(t.value,e,i):""}},(e=function(t,s){var o,n,l;if(t instanceof e)return this.isRegex=t.isRegex,this.regex=t.regex,this.ast=t.ast,void(this.names=t.names);if(this.isRegex=t instanceof RegExp,"string"!=typeof t&&!this.isRegex)throw new TypeError("argument must be a regex or a string");if(this.isRegex){if(this.regex=t,null!=s){if(!Array.isArray(s))throw new Error("if first argument is a regex the second argument may be an array of group names but you provided something else");if(o=p(this.regex),s.length!==o)throw new Error("regex contains "+o+" groups but array of group names contains "+s.length);this.names=s}}else{if(""===t)throw new Error("argument must not be the empty string");if(t.replace(/\s+/g,"")!==t)throw new Error("argument must not contain whitespace");if(n={escapeChar:(null!=s?s.escapeChar:void 0)||a.escapeChar,segmentNameStartChar:(null!=s?s.segmentNameStartChar:void 0)||a.segmentNameStartChar,segmentNameCharset:(null!=s?s.segmentNameCharset:void 0)||a.segmentNameCharset,segmentValueCharset:(null!=s?s.segmentValueCharset:void 0)||a.segmentValueCharset,optionalSegmentStartChar:(null!=s?s.optionalSegmentStartChar:void 0)||a.optionalSegmentStartChar,optionalSegmentEndChar:(null!=s?s.optionalSegmentEndChar:void 0)||a.optionalSegmentEndChar,wildcardChar:(null!=s?s.wildcardChar:void 0)||a.wildcardChar},null==(l=d(n).pattern(t)))throw new Error("couldn't parse pattern");if(""!==l.rest)throw new Error("could only partially parse pattern");this.ast=l.value,this.regex=new RegExp(r(this.ast,n.segmentValueCharset)),this.names=i(this.ast)}}).prototype.match=function(t){var e,s;return null==(s=this.regex.exec(t))?null:(e=s.slice(1),this.names?h(this.names,e):e)},e.prototype.stringify=function(t){if(null==t&&(t={}),this.isRegex)throw new Error("can't stringify patterns generated from a regex");if(t!==Object(t))throw new Error("argument must be an object or undefined");return g(this.ast,t,{})},e.escapeForRegex=l,e.concatMap=n,e.stringConcatMap=u,e.regexGroupCount=p,e.keysAndValuesToObject=h,e.P=t,e.newParser=d,e.defaultOptions=a,e.astNodeToRegexString=r,e.astNodeToNames=i,e.getParam=c,e.astNodeContainsSegmentsForProvidedParams=s,e.stringify=g,e},null!==hi.exports?ni.exports=li():ai.UrlPattern=li();const di=oi(hi.exports);var pi=Object.defineProperty,ui=Object.getOwnPropertyDescriptor,gi=(t,e,s,i)=>{for(var r,o=i>1?void 0:i?ui(e,s):e,n=t.length-1;n>=0;n--)(r=t[n])&&(o=(i?r(e,s,o):r(o))||o);return i&&o&&pi(e,s,o),o};let bi=class extends(G(tt(Rt))){constructor(){super(...arguments),this.templateValueAttribute="data-route",this._location=document.location.href.replace(document.location.origin,"")}connectedCallback(){this.noShadowDom="",Kt.onChange(this),super.connectedCallback()}disconnectedCallback(){Kt.offChange(this),super.disconnectedCallback()}set location(t){this._location=t,this.requestUpdate()}get location(){return this._location}render(){const t=[];for(const s of this.templatePartsList){const i=s.getAttribute(this.templateValueAttribute)||"";if(new RegExp(i).test(this.location))t.push(s);else try{new di(i).match(this.location)&&(s.setAttribute("mode","patternMatching"),t.push(s))}catch(e){-1!=this.location.indexOf(i.replace(document.location.origin,""))&&t.push(s)}}return xt`${Fe(t,((t,e)=>e+(new Date).getTime()),(t=>{var e;if(t.title&&(document.title=t.title),t.hasAttribute("dataProviderExpression")){let s="";const i=t.getAttribute("dataProviderExpression")||"";if("patternMatching"==t.getAttribute("mode")){const e=new di(t.getAttribute(this.templateValueAttribute)||"");s=new di(i).stringify(e.match(this.location))}else{const r=new RegExp(t.getAttribute(this.templateValueAttribute)||""),o=(this.location+"").match(r);o&&(s=(null==(e=o.shift())?void 0:e.replace(r,i))||"")}return xt`<div style="display:contents" dataProvider="${s}">${Vs(t)}</div>`}return Vs(t)}))}`}};gi([U()],bi.prototype,"location",1),bi=gi([m("sonic-router")],bi);var mi=Object.defineProperty,fi=Object.getOwnPropertyDescriptor;let vi=class extends(G(Rt)){connectedCallback(){this.noShadowDom="",this.style.display="none",super.connectedCallback(),this.udpateCallBack=()=>this.update(),this.publisher&&this.publisher.onInternalMutation(this.udpateCallBack)}disconnectedCallback(){this.publisher&&this.publisher.offInternalMutation(this.udpateCallBack),super.disconnectedCallback()}update(){if(this.hasAttribute("onAdded"))return void Kt.changeFromComponent(this);if(!this.props)return;const t=this.getAttribute("onData").split("."),e=i.traverse(this.props,t);!e||i.isObject(e)&&e||Kt.changeFromComponent(this)}};vi=((t,e,s,i)=>{for(var r,o=i>1?void 0:i?fi(e,s):e,n=t.length-1;n>=0;n--)(r=t[n])&&(o=(i?r(e,s,o):r(o))||o);return i&&o&&mi(e,s,o),o})([m("sonic-redirect")],vi);var yi=Object.defineProperty,wi=Object.getOwnPropertyDescriptor,xi=(t,e,s,i)=>{for(var r,o=i>1?void 0:i?wi(e,s):e,n=t.length-1;n>=0;n--)(r=t[n])&&(o=(i?r(e,s,o):r(o))||o);return i&&o&&yi(e,s,o),o};let _i=class extends(G(tt(Rt))){constructor(){super(...arguments),this.state="",this.inverted=!1,this.statePath="",this.onAssign=t=>{this.state=t,this.requestUpdate()}}connectedCallback(){if(this.noShadowDom="",super.connectedCallback(),this.hasAttribute("data-path")&&(this.statePath=this.getAttribute("data-path")),this.statePath){this.statePublisher=this.publisher;const t=this.statePath.split(".");for(const e of t)this.statePublisher=this.statePublisher[e];this.statePublisher.onAssign(this.onAssign)}}disconnectedCallback(){var t;this.statePath&&(null==(t=this.statePublisher)||t.offAssign(this.onAssign)),super.disconnectedCallback()}render(){const t=[];let e=this.state;(!Array.isArray(e)&&i.isObject(e)||void 0===e)&&(e="");for(const s of this.templatePartsList){let i=s.getAttribute(this.templateValueAttribute),r=e;this.inverted&&(r=i,i=e),""==i&&(i=this.inverted?".*?":"^$");if(new RegExp(i).test(r))t.push(s),s.removeAttribute("mode");else{const e=new di(i);e.names.length>0&&e.match(r)&&(s.setAttribute("mode","patternMatching"),t.push(s))}}return xt`${Fe(t,((t,e)=>e+(new Date).getTime()),(t=>{var s;if(t.title&&(document.title=t.title),t.hasAttribute("dataProviderExpression")){const i=t.getAttribute("dataProviderExpression");let r="",o=e,n=t.getAttribute(this.templateValueAttribute);if(this.inverted&&(o=n,n=e),""==n&&(n=this.inverted?"*":"^$"),"patternMatching"==t.getAttribute("mode")){const t=new di(n);r=new di(i).stringify(t.match(o))}else{const t=new RegExp(n),e=(o+"").match(t);e&&(r=null==(s=e.shift())?void 0:s.replace(t,i))}return xt`<div style="display:contents" dataProvider="${r}">${Vs(t)}</div>`}return Vs(t)}))}`}};xi([U()],_i.prototype,"state",2),xi([U({type:Boolean,reflect:!0})],_i.prototype,"inverted",2),_i=xi([m("sonic-states")],_i);var ki=Object.defineProperty,Ai=Object.getOwnPropertyDescriptor;let Pi=class extends Rt{createRenderRoot(){return this}render(){return xt`<slot></slot>`}};Pi=((t,e,s,i)=>{for(var r,o=i>1?void 0:i?Ai(e,s):e,n=t.length-1;n>=0;n--)(r=t[n])&&(o=(i?r(e,s,o):r(o))||o);return i&&o&&ki(e,s,o),o})([m("sonic-scope")],Pi);var Ci=Object.defineProperty,Si=Object.getOwnPropertyDescriptor,$i=(t,e,s,i)=>{for(var r,o=i>1?void 0:i?Si(e,s):e,n=t.length-1;n>=0;n--)(r=t[n])&&(o=(i?r(e,s,o):r(o))||o);return i&&o&&Ci(e,s,o),o};let Oi=class extends(G(Rt)){constructor(){super(...arguments),this.text="Example"}render(){return xt`<div>${this.text}</div>`}};$i([U()],Oi.prototype,"text",2),Oi=$i([m("sonic-example")],Oi);const Di={checkbox:{tagName:"sonic-checkbox"},date:{tagName:"sonic-input",attributes:{type:"date"}},fieldset:{tagName:"sonic-fieldset",nodes:[{libraryKey:"formLayout"}],contentElementSelector:"sonic-form-layout"},managed_file:{tagName:"sonic-input",attributes:{variant:"ghost",type:"file"}},password:{tagName:"sonic-input",attributes:{type:"password"}},radio:{tagName:"sonic-radio"},select:{tagName:"sonic-select"},textarea:{tagName:"sonic-textarea"},textfield:{tagName:"sonic-input",attributes:{type:"text"}},hidden:{tagName:"sonic-input",attributes:{type:"hidden"}},button:{tagName:"sonic-button"},form:{tagName:"sonic-submit",attributes:{onEnterKey:!0}},submit:{tagName:"sonic-submit",attributes:{onClick:!0},contentElementSelector:"sonic-button",nodes:[{libraryKey:"button",attributes:{type:"success"},nodes:[{tagName:"sonic-icon",attributes:{name:"check",slot:"prefix"}}]}]},email:{tagName:"sonic-input",attributes:{type:"email"}},formItemContainer:{tagName:"div",attributes:{class:"form-item-container"}},formLayout:{tagName:"sonic-form-layout"},formActions:{tagName:"sonic-form-actions"},passwordHelper:{tagName:"sonic-password-helper"},sameValueHelper:{tagName:"sonic-same-value-helper"},divider:{tagName:"sonic-divider"}};class Li{async transform(t,e){if(this.sduiDescriptor=t,this.sduiDescriptor.library)for(const s in e.library)this.sduiDescriptor.library[s]=e.library[s];for(const s of e.transforms)this.transformAction(s)}transformAction(t){const e=this.getNodesMatchingPatterns(t.patterns,this.sduiDescriptor);this[t.action](t,e)}getNodesMatchingPatterns(t,e){if(!t)return[];if(!e)return[];const s=e.nodes;if(!s)return[];let i=[],r=0;for(const o of t)for(const t of s)this.nodeMatchesPattern(o,t)&&i.push({parent:e,child:t,index:r}),i=i.concat(this.getNodesMatchingPatterns([o],t)),r++;return i}stringMatchesExpression(t,e){return!e||t&&t.match(e)}nodeMatchesPattern(t,e){const s=t,i=e,r=["libraryKey","innerHTML","prefix","suffix","markup"];for(const a of r)if(!this.stringMatchesExpression(i[a],s[a]))return!1;const o=t.attributes,n=e.attributes;if(o&&!n)return!1;if(o)for(const a in o)if(!n||!this.stringMatchesExpression(n[a],o[a]))return!1;return!0}unwrap(t,e){var s,i;for(const r of e)null==(s=r.parent.nodes)||s.splice(r.parent.nodes.indexOf(r.child),1),r.child.nodes&&(null==(i=r.parent.nodes)||i.splice(r.parent.nodes.indexOf(r.child),0,...r.child.nodes))}wrap(t,e){var s,i,r,o,n,a;const l={...t.ui};l.nodes||(l.nodes=[]);let c=0;for(const d of e)null==(s=l.nodes)||s.push(d.child),c>0&&(null==(i=d.parent.nodes)||i.splice(d.parent.nodes.indexOf(d.child),1)),c++;const h=null==(o=null==(r=e[0])?void 0:r.parent.nodes)?void 0:o.indexOf(e[0].child);h&&(null==(n=e[0].parent.nodes)||n.splice(h,1),null==(a=e[0].parent.nodes)||a.splice(h,0,l))}move(t,e){var s,i;for(const r of e){null==(s=r.parent.nodes)||s.splice(r.parent.nodes.indexOf(r.child),1);let e=[];t.after&&(e=this.getNodesMatchingPatterns([t.after],this.sduiDescriptor)),t.before&&(e=this.getNodesMatchingPatterns([t.before],this.sduiDescriptor));const o=e[0];o&&(null==(i=o.parent.nodes)||i.splice(o.parent.nodes.indexOf(o.child)+(t.after?1:0),0,r.child))}}remap(t,e){var s,i,r;for(const o of e){const e={...t.ui};e.attributes||(e.attributes={});const n=o.child.attributes;if(n)for(const t in n)Object.prototype.hasOwnProperty.call(e.attributes,"key")||(e.attributes[t]=n[t]);const a=["libraryKey","innerHTML","prefix","suffix","markup"],l=o.child,c=e;for(const t of a)!Object.prototype.hasOwnProperty.call(e,t)&&l[t]&&(c[t]=l[t]);e.nodes||(e.nodes=[]);const h=o.child.nodes;if(h)for(const t of h)e.nodes.push(t);const d=(null==(s=o.parent.nodes)?void 0:s.indexOf(o.child))||-1;-1!=d&&(null==(i=o.parent.nodes)||i.splice(d,1),null==(r=o.parent.nodes)||r.splice(d,0,e))}}delete(t,e){var s;for(const i of e)null==(s=i.parent.nodes)||s.splice(i.parent.nodes.indexOf(i.child),1)}insert(t,e){var s;const i=t.after?"after":t.before?"before":"in";e=[],t.after?e=this.getNodesMatchingPatterns([t.after],this.sduiDescriptor):t.before?e=this.getNodesMatchingPatterns([t.before],this.sduiDescriptor):t.in&&(e=this.getNodesMatchingPatterns([t.in],this.sduiDescriptor));const r=e[0];r&&("in"==i?(r.child.nodes||(r.child.nodes=[]),r.child.nodes.push({...t.ui})):null==(s=r.parent.nodes)||s.splice(r.parent.nodes.indexOf(r.child)+("after"==i?1:0),0,{...t.ui}))}}var Ei=Object.defineProperty,ji=Object.getOwnPropertyDescriptor,Mi=(t,e,s,i)=>{for(var r,o=i>1?void 0:i?ji(e,s):e,n=t.length-1;n>=0;n--)(r=t[n])&&(o=(i?r(e,s,o):r(o))||o);return i&&o&&Ei(e,s,o),o};const Ni=t=>{class e extends t{constructor(...t){super(),this.forceAutoFill=!1,this._type="text"}validateFormElement(){var t;const e=null==(t=this.shadowRoot)?void 0:t.querySelector("input");if(!e||e.checkValidity())return;const s=this.getFormPublisher();s&&(s.isFormValid=!1),e.reportValidity()}set type(t){this.hasAttribute("type")&&!this.forceAutoFill&&(t=this.getAttribute("type")),this._type=t,this.requestUpdate()}get type(){return this._type}get description(){return this._description}set description(t){this.hasAttribute("description")&&!this.forceAutoFill&&(t=this.getAttribute("description")),this._description=t,this.requestUpdate()}get label(){return this._label}set label(t){this.hasAttribute("label")&&!this.forceAutoFill&&(t=this.getAttribute("label")),this._label=t,this.requestUpdate()}}return Mi([U()],e.prototype,"forceAutoFill",2),Mi([U({type:String})],e.prototype,"type",1),Mi([U()],e.prototype,"description",1),Mi([U()],e.prototype,"label",1),Mi([U({type:Number})],e.prototype,"tabindex",2),Mi([U({type:String})],e.prototype,"autocomplete",2),e},zi=Ms,Ii=ye,Ti=oe,Fi=Ni,Ri=G,Ui=tt;window["concorde-mixins"]=window["concorde-mixins"]||{},window["concorde-mixins"]={Fetcher:zi,FormCheckable:Ii,FormElement:Ti,FormInput:Fi,Subscriber:Ri,TemplatesContainer:Ui};var Vi=Object.defineProperty,Bi=Object.getOwnPropertyDescriptor,qi=(t,e,s,i)=>{for(var r,o=i>1?void 0:i?Bi(e,s):e,n=t.length-1;n>=0;n--)(r=t[n])&&(o=(i?r(e,s,o):r(o))||o);return i&&o&&Vi(e,s,o),o};let Hi=class extends(zi(Ri(Rt))){constructor(){super(...arguments),this.sduiDescriptor={}}connectedCallback(){this.noShadowDom="",this.displayContents=!0,this.isFetchEnabled=this.hasAttribute("fetch"),super.connectedCallback()}willUpdate(t){null==this.props&&(this.sduiDescriptor={});{const t=this.sduiKey?this.props[this.sduiKey]:this.props;if(this.sduiDescriptor==t)return;this.sduiDescriptor=t,this.updateContents()}super.willUpdate(t)}async updateContents(){if(!this.sduiDescriptor)return;const t={};Object.assign(t,Di,this.sduiDescriptor.library),this.sduiDescriptor.library=t,this.loadAssets(),await this.loadLibrary(),await this.transformSDUIDescriptor(),this.parseRootNodes()}removeChildren(){for(;[...this.children].filter((t=>"SLOT"!=t.nodeName)).length>0;)this.removeChild(this.children[0])}loadAssets(){if(this.sduiDescriptor){if(this.sduiDescriptor.js)for(const t of this.sduiDescriptor.js)he.loadJS(t);if(this.sduiDescriptor.css)for(const t of this.sduiDescriptor.css)he.loadCSS(t)}}async transformSDUIDescriptor(){if(!this.hasAttribute("transformation"))return;const t=await fetch(this.getAttribute("transformation")),e=await t.json(),s=new Li;await s.transform(this.sduiDescriptor,e)}async loadLibrary(){if(!this.hasAttribute("library"))return;const t=await fetch(this.getAttribute("library")),e=await t.json();this.sduiDescriptor.library=e}parseRootNodes(){if(this.removeChildren(),!this.sduiDescriptor)return;let t=this.sduiDescriptor.nodes;t||(t=[]);const e={tagName:"sonic-toast-message-subscriber",attributes:{}};this.messagesKey&&(e.attributes={subDataProvider:this.messagesKey}),t.push(e),t.forEach((t=>this.appendChild(this.parseChild(t))))}parseChild(t){const e=t.tagName||"div";let{element:s,contentElement:i}=this.handleLibrary(t,e);if(this.handleAttributes(t,s),s=this.handleMarkup(t,s),i||(i=s),this.handleChildNodes(t,i,s),this.handleInnerHTML(t,i),t.prefix||t.suffix){return this.handlePrefixSuffix(t,s)}return s}handlePrefixSuffix(t,e){const s=document.createElement("div");return s.innerHTML=(t.prefix||"")+e.outerHTML+(t.suffix||""),s.style.display="contents",s}handleChildNodes(t,e,s){if(t.nodes){const i=t.nodes;for(const t of i){const i=this.parseChild(t);let r=e;if(t.parentElementSelector&&(r=s.querySelector(t.parentElementSelector)||e),r.shadowRoot)r.shadowRoot.appendChild(i);else if("template"==r.tagName.toLocaleLowerCase()){r.content.appendChild(i)}else r.appendChild(i)}}}handleLibrary(t,e){let s,i;if(t.libraryKey&&this.sduiDescriptor.library){s=this.parseChild(this.sduiDescriptor.library[t.libraryKey]||{tagName:"div"});const e=(this.sduiDescriptor.library[t.libraryKey]||{}).contentElementSelector;e&&(i=s.querySelector(e))}else s=document.createElement(e);return{element:s,contentElement:i}}handleAttributes(t,e){const s=t.attributes;for(const i in s){const t=s[i],r=pe.isObject(t)?JSON.stringify(t):t;e.setAttribute(i,r)}}handleMarkup(t,e){return t.markup&&((e=document.createElement("div")).style.display="contents",e.innerHTML=t.markup),e}handleInnerHTML(t,e){var s;if(t.innerHTML)if(-1!=t.innerHTML.indexOf("wording_")){const i=this.getAncestorAttributeValue("wordingProvider");null==(s=this.api)||s.post(i,{labels:[t.innerHTML.substring(8)]}).then((t=>{e&&(e.innerHTML+=t)}))}else e&&(e.innerHTML+=t.innerHTML)}};qi([U()],Hi.prototype,"sduiKey",2),qi([U()],Hi.prototype,"messagesKey",2),Hi=qi([m("sonic-sdui")],Hi);var Wi=Object.defineProperty,Ki=Object.getOwnPropertyDescriptor,Zi=(t,e,s,i)=>{for(var r,o=i>1?void 0:i?Ki(e,s):e,n=t.length-1;n>=0;n--)(r=t[n])&&(o=(i?r(e,s,o):r(o))||o);return i&&o&&Wi(e,s,o),o};let Yi=class extends(Ri(Rt)){constructor(){super(...arguments),this._composition={},this.listeners=[]}get composition(){return this._composition}set composition(t){this._composition=t,this.updateComposition()}connectedCallback(){super.connectedCallback(),this.updateComposition()}disconnectedCallback(){this.removePublisherListeners(),super.disconnectedCallback()}updateComposition(){this.removePublisherListeners(),this.publisher&&(this.publisher.set({}),this.parseComposition(this.composition,this.publisher))}removePublisherListeners(){const t=this.listeners;this.listeners=[],t.forEach((t=>{this.publisher.offAssign(t.subscriber)}))}parseComposition(t,e){if(t)for(const s in t){const i=t[s];if("string"==typeof i){const t=i.split("."),r=t.shift();if(!r)continue;let o=ge.get(r);o=pe.traverse(o,t);const n={publisher:o,subscriber:t=>{e[s]=t}};this.listeners.push(n),o.onAssign(n.subscriber),e._proxies_.set(s,o)}else{this.publisher[s]={};const t=new c({},e);e._proxies_.set(s,t);const r={publisher:t,subscriber:t=>{e[s]=t}};this.listeners.push(r),t.onAssign(r.subscriber),this.parseComposition(i,t)}}}render(){return xt`<slot></slot>`}};Yi.styles=[_`
978
+ :host {
979
+ display: contents;
980
+ }
981
+ `],Zi([U({type:Object})],Yi.prototype,"composition",1),Yi=Zi([m("sonic-mix")],Yi);var Qi=Object.defineProperty,Gi=Object.getOwnPropertyDescriptor;let Ji=class extends(Ri(Rt)){connectedCallback(){this.setAttribute("subDataProvider",this.getAttribute("key")),super.connectedCallback()}render(){return"object"==typeof this.props||void 0===this.props?xt`<slot name="prefix"></slot><slot></slot><slot name="suffix"></slot>`:xt`${cs(this.props.toString())}<slot name="prefix"></slot><slot></slot
982
+ ><slot name="suffix"></slot>`}};Ji=((t,e,s,i)=>{for(var r,o=i>1?void 0:i?Gi(e,s):e,n=t.length-1;n>=0;n--)(r=t[n])&&(o=(i?r(e,s,o):r(o))||o);return i&&o&&Qi(e,s,o),o})([m("sonic-value")],Ji);const Xi=_`
983
+ :host {
984
+ /* polices*/
985
+ --sc-font-family-base: "Inter var", "Inter", -apple-system, system-ui,
986
+ BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial,
987
+ sans-serif;
988
+ --sc-font-weight-base: 400;
989
+ --sc-font-style-base: normal;
990
+
991
+ --sc-headings-font-family: var(--sc-font-family-base), sans-serif;
992
+ --sc-headings-font-style: var(--sc-font-style-base);
993
+ --sc-headings-line-height: 1.1;
994
+ --sc-headings-font-weight: 700;
995
+ --sc-headings-text-transform: none;
996
+
997
+ /* Button*/
998
+ --sc-btn-font-weight: var(--sc-font-weight-base);
999
+ --sc-btn-font-family: var(--sc-font-family-base);
1000
+ --sc-btn-font-style: var(--sc-font-style-base);
1001
+
1002
+ /* ROUNDED*/
1003
+ --sc-rounded-sm: calc(var(--sc-rounded) * 0.5);
1004
+ --sc-rounded: 0.375rem;
1005
+ --sc-rounded-md: calc(var(--sc-rounded) * 1.8);
1006
+ --sc-rounded-lg: calc(var(--sc-rounded) * 3);
1007
+ --sc-rounded-xl: calc(var(--sc-rounded) * 7);
1008
+ --sc-rounded-size-intensity: calc((1em - 1rem) * 0.4);
1009
+
1010
+ /* 4 for rounded full*/
1011
+ --sc-btn-rounded-intensity: 1.4;
1012
+ --sc-btn-font-weight: 500;
1013
+ --sc-btn-rounded: calc(
106
1014
  (var(--sc-rounded) + var(--sc-rounded-size-intensity)) *
107
1015
  var(--sc-btn-rounded-intensity)
108
- );--sc-placeholder-bg:rgba(17, 24, 39, 0.05);--sc-shadow-sm:0 1px 3px 0 rgb(0 0 0 / 0.1),0 1px 2px -1px rgb(0 0 0 / 0.1);--sc-shadow:0 4px 6px -1px rgb(0 0 0 / 0.1),0 2px 4px -2px rgb(0 0 0 / 0.1);--sc-shadow-lg:0 10px 15px 0px rgb(0 0 0 / 0.1),0 4px 6px -4px rgb(0 0 0 / 0.1);--sc-shadow-xl:0 20px 25px -5px rgb(0 0 0 / 0.1),0 8px 10px -6px rgb(0 0 0 / 0.1);--sc-shadow-2xl:0 25px 50px -12px rgb(0 0 0 / 0.25);--sc-border-width:max(1px, 0.12rem);--sc-border-color:var(--sc-base-200);--sc-form-height:2.5em;--sc-form-border-width:var(--sc-border-width);--sc-input-bg:var(--sc-base-100);--sc-input-border-color:var(--sc-input-bg);--sc-input-rounded-intensity:1.4;--sc-input-rounded:calc(
1016
+ );
1017
+
1018
+ /* Placeholder */
1019
+ --sc-placeholder-bg: rgba(17, 24, 39, 0.05);
1020
+
1021
+ /* OMBRES */
1022
+ --sc-shadow-sm: 0 1px 3px 0 rgb(0 0 0 / 0.1),
1023
+ 0 1px 2px -1px rgb(0 0 0 / 0.1);
1024
+ --sc-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1),
1025
+ 0 2px 4px -2px rgb(0 0 0 / 0.1);
1026
+ --sc-shadow-lg: 0 10px 15px 0px rgb(0 0 0 / 0.1),
1027
+ 0 4px 6px -4px rgb(0 0 0 / 0.1);
1028
+ --sc-shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1),
1029
+ 0 8px 10px -6px rgb(0 0 0 / 0.1);
1030
+ --sc-shadow-2xl: 0 25px 50px -12px rgb(0 0 0 / 0.25);
1031
+
1032
+ /* Forms */
1033
+ --sc-border-width: max(1px, 0.12rem);
1034
+ --sc-border-color: var(--sc-base-200);
1035
+ --sc-form-height: 2.5em;
1036
+ --sc-form-border-width: var(--sc-border-width);
1037
+ --sc-input-bg: var(--sc-base-100);
1038
+ --sc-input-border-color: var(--sc-input-bg);
1039
+ --sc-input-rounded-intensity: 1.4;
1040
+ --sc-input-rounded: calc(
109
1041
  (var(--sc-rounded) + var(--sc-rounded-size-intensity)) *
110
1042
  var(--sc-input-rounded-intensity)
111
- );--sc-label-font-weight:500;--sc-contrast-content:#fff;--sc-contrast:#11151f;--sc-scrollbar-bg:var(--sc-base-400);--sc-body-bg:var(--sc-base)}`,Wi=T`:host{--sc-primary:var(--sc-base-800);--sc-info:#2563eb;--sc-danger:#f43f5e;--sc-warning:#f97316;--sc-success:#14b8a6;--sc-primary-content:var(--sc-base);--sc-info-content:var(--sc-base);--sc-danger-content:var(--sc-base);--sc-warning-content:var(--sc-base);--sc-success-content:var(--sc-base);--sc-base:#fff;--sc-base-50:#f8fafc;--sc-base-100:#f1f5f9;--sc-base-200:#e2e8f0;--sc-base-300:#cbd5e1;--sc-base-400:#94a3b8;--sc-base-500:#64748b;--sc-base-600:#475569;--sc-base-700:#334155;--sc-base-800:#1e293b;--sc-base-900:#0f172a;--sc-base-content:var(--sc-base-700);--sc-input-bg:var(--sc-base-100);--sc-input-color:var(--sc-base-content)}`,Ki=T``,Zi=T`:host([theme=dark]){${Ki}}@media (prefers-color-scheme:dark){:host([theme=auto]){${Ki}}}`;var Qi=Object.defineProperty,Yi=Object.getOwnPropertyDescriptor,Gi=(t,e,s,i)=>{for(var r,o=i>1?void 0:i?Yi(e,s):e,n=t.length-1;n>=0;n--)(r=t[n])&&(o=(i?r(e,s,o):r(o))||o);return i&&o&&Qi(e,s,o),o};let Ji=class extends zt{constructor(){super(...arguments),this.theme="light",this.background=!1,this.color=!1,this.font=!1}connectedCallback(){super.connectedCallback(),window.addEventListener("message",(t=>this.receiveMessage(t)),!1),this.postCSSVars()}postCSSVars(){var t;const e=document.styleSheets,s=e.length,i=[];for(let o=0;o<s;o++){const t=e[o];t.href&&(t.href.includes("googleapis")||t.href.includes("typekit.net"))&&i.push(t.href)}const r={variables:this.getCssVariables(),fonts:i};null==(t=ce.get("sonic-theme"))||t.set(r),document.querySelectorAll("iframe").forEach((t=>{var e;return null==(e=t.contentWindow)?void 0:e.postMessage({type:"SonicTheme",...r},"*")}))}receiveMessage(t){const e=t.data;e.type&&"GetSonicTheme"==e.type&&this.postCSSVars()}getCssVariables(){const t=[],e=[...Ji.styles.map((t=>t.styleSheet)),...Array.from(document.styleSheets)];for(const o of e)try{if(!o)continue;const e=o.cssRules;for(const s of e){if(!("style"in s))continue;const e=s.style;for(const s of e)t.includes(s)||0!==s.indexOf("--sc")||t.push(s)}}catch(r){console.log("Erreur lors de la récupération des variables CSS")}const s=window.getComputedStyle(this),i={};return t.forEach((t=>i[t]=s.getPropertyValue(t))),i}render(){return mt`<slot></slot>`}};Ji.styles=[Wi,Zi,Hi,T`:host([background]){display:block!important;background:var(--sc-body-bg)!important;min-height:100vh}:host([color]){color:var(--sc-base-content)}:host([font]){font-family:var(--sc-font-family-base),sans-serif;font-weight:var(--sc-font-weight-base);font-style:var(--sc-font-style-base)}`],Gi([f({type:String,reflect:!0})],Ji.prototype,"theme",2),Gi([f({type:Boolean,reflect:!0})],Ji.prototype,"background",2),Gi([f({type:Boolean,reflect:!0})],Ji.prototype,"color",2),Gi([f({type:Boolean,reflect:!0})],Ji.prototype,"font",2),Ji=Gi([m("sonic-theme")],Ji);var Xi=Object.defineProperty,tr=Object.getOwnPropertyDescriptor,er=(t,e,s,i)=>{for(var r,o=i>1?void 0:i?tr(e,s):e,n=t.length-1;n>=0;n--)(r=t[n])&&(o=(i?r(e,s,o):r(o))||o);return i&&o&&Xi(e,s,o),o};let sr=class extends zt{constructor(){super(...arguments),this.type="default",this.variant="default",this.ellipsis=!1}render(){return mt`<slot name="prefix"></slot><slot></slot><slot name="suffix"></slot>`}};sr.styles=[be,T`:host{--sc-badge-gap:0.3em;--sc-badge-py:0.17em;--sc-badge-px:0.66em;--sc-fs:1rem;--sc-badge-color:var(--sc-base-content, #1f2937);--sc-badge-bg:var(--sc-base-100, #e5e7eb);--sc-badge-border-with:var(--sc-form-border-width, 0.1rem);--sc-badge-border-color:transparent;--sc-badge-border:var(--sc-badge-border-with) solid var(--sc-badge-border-color);--sc-badge-rounded:0.85em;--sc-badge-fw:var(--sc-font-weight-base);display:inline-flex;align-items:center;box-sizing:border-box;line-height:var(--sc-lh);border-radius:var(--sc-badge-rounded);background:var(--sc-badge-bg);color:var(--sc-badge-color);font-family:var(--sc-badge-ff,var(--sc-font-family-base,inherit));font-weight:var(--sc-badge-fw);padding-top:var(--sc-badge-py);padding-bottom:var(--sc-badge-py);padding-left:var(--sc-badge-px);padding-right:var(--sc-badge-px);min-height:calc(var(--sc-badge-px) * 2);border:var(--sc-badge-border);-webkit-print-color-adjust:exact}:host([type=primary]){--sc-badge-color:var(--sc-primary-content);--sc-badge-bg:var(--sc-primary)}:host([type=warning]){--sc-badge-color:var(--sc-warning-content);--sc-badge-bg:var(--sc-warning)}:host([type=danger]){--sc-badge-color:var(--sc-danger-content);--sc-badge-bg:var(--sc-danger)}:host([type=info]){--sc-badge-color:var(--sc-info-content);--sc-badge-bg:var(--sc-info)}:host([type=success]){--sc-badge-color:var(--sc-success-content);--sc-badge-bg:var(--sc-success)}:host([type=neutral]){--sc-badge-color:var(--sc-base);--sc-badge-bg:var(--sc-base-content)}:host{font-size:var(--sc-fs);gap:var(--sc-badge-gap)}:host([size="2xs"]){--sc-badge-gap:0.35em}:host([size=xs]){--sc-badge-gap:0.35em}:host([size=sm]){--sc-badge-gap:0.35em}:host([size=lg]){--sc-lh:1.2;--sc-badge-gap:0.5em}:host([size=xl]){--sc-lh:1.2;--sc-badge-gap:0.5em}:host([contrast]){--sc-badge-color:var(--sc-contrast-content);--sc-badge-bg:var(--sc-contrast)}:host([variant=outline][type]){border-width:var(--sc-badge-border-with)!important;border-color:var(--sc-badge-bg);color:var(--sc-badge-bg);background:0 0}:host([variant=outline][type=default]){border-color:var(--sc-base-400);color:var(--sc-base-500);background:0 0}:host([variant=ghost][type]){color:var(--sc-badge-bg);background:0 0;padding:0}:host([variant=ghost][type=default]){color:var(--sc-badge-color);background:0 0}:host([ellipsis]){flex-wrap:nowrap;white-space:nowrap;max-width:100%}:host([ellipsis]) slot{overflow:hidden;display:block;text-overflow:ellipsis;white-space:nowrap;max-width:100%}slot[name=prefix],slot[name=suffix]{flex-shrink:0}`],er([f({type:String,reflect:!0})],sr.prototype,"type",2),er([f({type:String,reflect:!0})],sr.prototype,"variant",2),er([f({type:String,reflect:!0})],sr.prototype,"size",2),er([f({type:Boolean,reflect:!0})],sr.prototype,"ellipsis",2),sr=er([m("sonic-badge")],sr);var ir=Object.defineProperty,rr=Object.getOwnPropertyDescriptor,or=(t,e,s,i)=>{for(var r,o=i>1?void 0:i?rr(e,s):e,n=t.length-1;n>=0;n--)(r=t[n])&&(o=(i?r(e,s,o):r(o))||o);return i&&o&&ir(e,s,o),o};let nr=class extends zt{constructor(){super(...arguments),this.href="",this._location="",this.autoActive="partial",this._target=null,this.pushState=null}get location(){return this._location}set location(t){this._location=t,qt.updateComponentActiveState(this)}connectedCallback(){this.href&&0!=this.href.indexOf("http")&&(qt.onChange(this),this.location=document.location.href.replace(document.location.origin,"")),super.connectedCallback()}disconnectedCallback(){qt.offChange(this),super.disconnectedCallback()}set target(t){this._target=t,class{static fixBlankLink(t){const e="undefined"==typeof require?null:require("electron");"_blank"==t.target&&t.addEventListener("click",(()=>{null==e||e.shell.openExternal(t.href)}))}}.fixBlankLink(this),this.requestUpdate()}get target(){return this._target}handlePushState(t){t.preventDefault(),qt.changeFromComponent(this)}render(){return this.href?mt`<a href="${this.href}" target="${me(this.target)}" @click="${this.pushState?this.handlePushState:null}"><slot></slot></a>`:mt`<slot></slot>`}};nr.styles=[T`a{color:inherit;text-decoration:none;display:contents}`],or([f({type:String})],nr.prototype,"href",2),or([f({type:String})],nr.prototype,"autoActive",2),or([f({type:String})],nr.prototype,"target",1),or([f({type:Boolean})],nr.prototype,"pushState",2),nr=or([m("sonic-link")],nr);var ar=Object.defineProperty,lr=Object.getOwnPropertyDescriptor,cr=(t,e,s,i)=>{for(var r,o=i>1?void 0:i?lr(e,s):e,n=t.length-1;n>=0;n--)(r=t[n])&&(o=(i?r(e,s,o):r(o))||o);return i&&o&&ar(e,s,o),o};let hr=class extends zt{constructor(){super(...arguments),this.max=100,this.invert=!1,this.type="default",this.size="md"}render(){return mt`<progress value="${me(this.value)}" max="${this.max}"></progress><div class="slot-container"><slot></slot><slot name="remaining"></slot></div>`}};hr.styles=[be,T`:host{--sc-progress-bg:var(--sc-input-bg, var(--sc-base-100, #f5f5f5));--sc-progress-color:var(--sc-base-content, #1f2937);--sc-progress-height:0.6em;--sc-progress-fs:var(--sc-fs, 1rem);--sc-progress-fw:500;--sc-progress-rounded:var(--sc-rounded-lg);display:block;line-height:1.2;font-weight:var(--sc-progress-fw);font-size:var(--sc-progress-fs)}progress{position:relative;width:100%;-webkit-appearance:none;appearance:none;overflow:hidden;border:none;height:var(--sc-progress-height);border-radius:var(--sc-progress-rounded);background-color:var(--sc-progress-bg);color:var(--sc-progress-color)}progress::-moz-progress-bar{background-color:var(--sc-progress-color);border-radius:var(--sc-progress-rounded)}progress:not([value])::-moz-progress-bar{background-color:var(--sc-progress-bg)}progress::-webkit-progress-bar{background-color:var(--sc-progress-bg)}progress::-webkit-progress-value{background-color:var(--sc-progress-color);border-radius:var(--sc-progress-rounded)}progress:indeterminate:after{background-color:var(--sc-progress-color);content:"";position:absolute;top:0;bottom:0;left:-40%;width:33.333333%;border-radius:var(--sc-progress-rounded);animation:progress-loading 3s infinite ease-in-out}@keyframes progress-loading{50%{left:107%}}:host([type=warning]){--sc-progress-color:var(--sc-warning)}:host([type=danger]){--sc-progress-color:var(--sc-danger)}:host([type=info]){--sc-progress-color:var(--sc-info)}:host([type=success]){--sc-progress-color:var(--sc-success)}:host([invert]){--sc-progress-bg:rgba(200, 200, 200, 0.1)}:host([type=default][invert]){--sc-progress-color:var(--sc-base)}slot[name=remaining]{font-weight:var(--sc-font-weight-base);font-size:.85em;margin-top:.5em}slot[name=remaining]::slotted(*){margin-left:auto}slot:not([name]){color:var(--sc-progress-color)}.slot-container{display:flex;justify-content:space-between;gap:.5em;margin-top:.15em}`],cr([f({type:Number})],hr.prototype,"value",2),cr([f({type:Number})],hr.prototype,"max",2),cr([f({type:Boolean})],hr.prototype,"invert",2),cr([f({type:String,reflect:!0})],hr.prototype,"type",2),cr([f({type:String,reflect:!0})],hr.prototype,"size",2),hr=cr([m("sonic-progress")],hr);const dr=T`.password-toggle{color:var(--sc-input-c);font-size:var(--sc-input-fs);cursor:pointer;margin-right:calc(-.5 * var(--sc-input-px))}:host([inlineContent]) .has-suffix .password-toggle{margin-right:0}`,pr=T`:host{--sc-label-fs:var(--sc-fs, 1rem);--sc-label-fw:var(--sc-label-font-weight)}label{font-size:var(--sc-label-fs);font-weight:var(--sc-label-fw);line-height:1.2}.form-label{margin-bottom:.22em;display:block}`,ur=T`.form-description{color:var(--sc-base-400);font-size:.85em;margin-top:.2em;display:block}`,gr=T`*{box-sizing:border-box}:host{--sc-input-height:var(--sc-form-height);--sc-input-c:var(--sc-input-color, var(--sc-base-content));--sc-input-b-width:var(--sc-form-border-width);--sc-input-b-color:var(--sc-input-border-color);--sc-item-rounded-tr:var(--sc-input-rounded);--sc-item-rounded-tl:var(--sc-input-rounded);--sc-item-rounded-bl:var(--sc-input-rounded);--sc-item-rounded-br:var(--sc-input-rounded);--sc-input-fs:var(--sc-fs, 1rem);--sc-input-ff:inherit;--sc-input-py:0.55em;--sc-input-px:clamp(0.3em, 8%, 1.1em);--sc-input-background:var(--sc-input-bg);--sc-input-addon-c:var(--sc-input-addon-color, var(--sc-base));--sc-input-addon-bg:var(--sc-input-c)}.form-element{display:block;flex-grow:1;width:100%;line-height:1.1;color:var(--sc-input-c);border-radius:var(--sc-item-rounded-tl) var(--sc-item-rounded-tr) var(--sc-item-rounded-br) var(--sc-item-rounded-bl);font-family:var(--sc-input-ff);background-color:var(--sc-input-background);border:var(--sc-input-b-width) solid var(--sc-input-b-color,var(--sc-base-300,#aaa));width:100%;font-size:var(--sc-input-fs);padding-top:var(--sc-input-py);padding-bottom:var(--sc-input-py);padding-left:var(--sc-input-px);padding-right:var(--sc-input-px);min-height:var(--sc-input-height)}.form-control{display:flex;width:100%}:host(:not([inlineContent])) .has-prefix slot[name=prefix],:host(:not([inlineContent])) .has-suffix slot[name=suffix]{min-width:var(--sc-input-height);box-sizing:border-box;display:flex;align-items:center;justify-content:center;line-height:1.1;flex-shrink:0;padding-left:clamp(.25em,3%,calc(.33 * var(--sc-input-px)));padding-right:clamp(.25em,3%,calc(.33 * var(--sc-input-px)))}:host(:not([inlineContent])) slot[name=prefix]{border-radius:var(--sc-item-rounded-tl) 0 0 var(--sc-item-rounded-bl);background-color:var(--sc-input-addon-bg);color:var(--sc-input-addon-c)}:host(:not([inlineContent])) slot[name=suffix]{border-radius:0 var(--sc-item-rounded-tr) var(--sc-item-rounded-br) 0;background-color:var(--sc-input-addon-bg);color:var(--sc-input-addon-c)}:host(:not([inlineContent])) .has-prefix .form-element{border-top-left-radius:0;border-bottom-left-radius:0}:host(:not([inlineContent])) .has-suffix .form-element{border-top-right-radius:0;border-bottom-right-radius:0}slot[name=prefix]::slotted(sonic-icon),slot[name=suffix]::slotted(sonic-icon){font-size:1.2em}.form-element .form-element,.form-element>slot{all:unset}:host([inlineContent]) .form-element{display:flex;align-items:center;gap:.35em;min-height:var(--sc-form-height)}:host([inlineContent]) .form-element .form-element{appearance:none;background:0 0;border:none;padding:0;display:block;width:50%;min-width:0;flex:1 1 auto;height:auto;min-height:auto;border-radius:0}:host([inlineContent]) slot[name=prefix]::slotted(*),:host([inlineContent]) slot[name=suffix]::slotted(*){display:block;flex:0 0 auto;max-width:100%;max-width:100%;white-space:nowrap}:host([inlineContent]) .has-suffix slot[name=suffix]{margin-right:calc(-.5 * var(--sc-input-px))}:host([inlineContent]) .has-prefix slot[name=prefix]{margin-left:calc(-.5 * var(--sc-input-px))}:host([inlineContent]) slot[name=suffix]::slotted(*){margin-left:auto}:host([inlineContent]) .no-prefix slot[name=prefix],:host([inlineContent]) .no-suffix slot[name=suffix]{display:none}:host([disabled]) .form-control{cursor:not-allowed}:host([variant=ghost]) .form-element{--sc-input-bg:transparent}:host([disabled]) .form-element{pointer-events:none;opacity:.5}:host([disabled]) .select-chevron{display:none}::placeholder{color:inherit;opacity:.45}:host([placehoderAsLabel]) ::placeholder{opacity:1}:focus::placeholder{opacity:0!important}.form-element:focus,.form-element:focus-visible,:host(:not([disabled])) .form-element:hover{filter:brightness(.97);outline:0}.form-label{margin-bottom:.22em;display:block}.form-description{color:var(--sc-base-400);font-size:.85em;margin-top:.2em;display:block}.hidden{display:none}.contents{display:contents}:host([error]){--sc-input-b-color:var(--sc-danger)}:host input:visited{display:none}:host([touched][required]) :not(:focus):invalid{--sc-input-b-color:var(--sc-danger);--sc-input-c:var(--sc-danger)}:host([touched][required]) :not(:focus):invalid+.select-chevron{--sc-input-c:var(--sc-danger)}:host([touched][required]) :not([value=""]):not(:focus):valid{--sc-input-b-color:var(--sc-success);--sc-input-c:var(--sc-success)}:host([touched][required]) :not(:focus):valid+.select-chevron{--sc-input-c:var(--sc-success)}:host([type=color]) .form-element{padding:0;border:0;min-width:var(--sc-input-height)}input[type=color]::-webkit-color-swatch-wrapper{padding:0}input[type=color]::-webkit-color-swatch{border:none;border-radius:var(--sc-item-rounded-tl) var(--sc-item-rounded-tr) var(--sc-item-rounded-br) var(--sc-item-rounded-bl)}:host([type=image]) .form-element{padding:0;border:none}input[type=reset],input[type=submit]{cursor:pointer}:host([type=search]){appearance:none!important}input[type=search]::-webkit-search-cancel-button{appearance:none;cursor:pointer;height:.65em;width:.65em;background-image:url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iaXNvLTg4NTktMSI/Pg0KPCEtLSBHZW5lcmF0b3I6IEFkb2JlIElsbHVzdHJhdG9yIDE2LjAuMCwgU1ZHIEV4cG9ydCBQbHVnLUluIC4gU1ZHIFZlcnNpb246IDYuMDAgQnVpbGQgMCkgIC0tPg0KPCFET0NUWVBFIHN2ZyBQVUJMSUMgIi0vL1czQy8vRFREIFNWRyAxLjEvL0VOIiAiaHR0cDovL3d3dy53My5vcmcvR3JhcGhpY3MvU1ZHLzEuMS9EVEQvc3ZnMTEuZHRkIj4NCjxzdmcgdmVyc2lvbj0iMS4xIiBpZD0iQ2FwYV8xIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB4PSIwcHgiIHk9IjBweCINCgkgd2lkdGg9IjEyMy4wNXB4IiBoZWlnaHQ9IjEyMy4wNXB4IiB2aWV3Qm94PSIwIDAgMTIzLjA1IDEyMy4wNSIgc3R5bGU9ImVuYWJsZS1iYWNrZ3JvdW5kOm5ldyAwIDAgMTIzLjA1IDEyMy4wNTsiDQoJIHhtbDpzcGFjZT0icHJlc2VydmUiPg0KPGc+DQoJPHBhdGggZD0iTTEyMS4zMjUsMTAuOTI1bC04LjUtOC4zOTljLTIuMy0yLjMtNi4xLTIuMy04LjUsMGwtNDIuNCw0Mi4zOTlMMTguNzI2LDEuNzI2Yy0yLjMwMS0yLjMwMS02LjEwMS0yLjMwMS04LjUsMGwtOC41LDguNQ0KCQljLTIuMzAxLDIuMy0yLjMwMSw2LjEsMCw4LjVsNDMuMSw0My4xbC00Mi4zLDQyLjVjLTIuMywyLjMtMi4zLDYuMSwwLDguNWw4LjUsOC41YzIuMywyLjMsNi4xLDIuMyw4LjUsMGw0Mi4zOTktNDIuNGw0Mi40LDQyLjQNCgkJYzIuMywyLjMsNi4xLDIuMyw4LjUsMGw4LjUtOC41YzIuMy0yLjMsMi4zLTYuMSwwLTguNWwtNDIuNS00Mi40bDQyLjQtNDIuMzk5QzEyMy42MjUsMTcuMTI1LDEyMy42MjUsMTMuMzI1LDEyMS4zMjUsMTAuOTI1eiIvPg0KPC9nPg0KPGc+DQo8L2c+DQo8Zz4NCjwvZz4NCjxnPg0KPC9nPg0KPGc+DQo8L2c+DQo8Zz4NCjwvZz4NCjxnPg0KPC9nPg0KPGc+DQo8L2c+DQo8Zz4NCjwvZz4NCjxnPg0KPC9nPg0KPGc+DQo8L2c+DQo8Zz4NCjwvZz4NCjxnPg0KPC9nPg0KPGc+DQo8L2c+DQo8Zz4NCjwvZz4NCjxnPg0KPC9nPg0KPC9zdmc+DQo=);background-size:contain;background-repeat:no-repeat}:host([align=center]) .form-element{text-align:center}:host([align=left]) .form-element{text-align:left}:host([align=right]) .form-element{text-align:right}:host([noAppearance]) input[type=number]::-webkit-inner-spin-button,:host([noAppearance]) input[type=number]::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}:host([noAppearance]) input[type=number]{-moz-appearance:textfield!important}`
1043
+ );
1044
+ --sc-label-font-weight: 500;
1045
+
1046
+ /* Contrast -- ex : Text on images */
1047
+ --sc-contrast-content: #fff;
1048
+ --sc-contrast: #11151f;
1049
+
1050
+ /*Scrollbar*/
1051
+ --sc-scrollbar-bg: var(--sc-base-400);
1052
+
1053
+ /*Body*/
1054
+ --sc-body-bg: var(--sc-base);
1055
+ }
1056
+ `,tr=_`
1057
+ :host {
1058
+ /*Boutons*/
1059
+ --sc-primary: var(--sc-base-800);
1060
+ --sc-info: #2563eb;
1061
+ --sc-danger: #f43f5e;
1062
+ --sc-warning: #f97316;
1063
+ --sc-success: #14b8a6;
1064
+
1065
+ --sc-primary-content: var(--sc-base);
1066
+ --sc-info-content: var(--sc-base);
1067
+ --sc-danger-content: var(--sc-base);
1068
+ --sc-warning-content: var(--sc-base);
1069
+ --sc-success-content: var(--sc-base);
1070
+
1071
+ /*Bases*/
1072
+ --sc-base: #fff;
1073
+ --sc-base-50: #f8fafc;
1074
+ --sc-base-100: #f1f5f9;
1075
+ --sc-base-200: #e2e8f0;
1076
+ --sc-base-300: #cbd5e1;
1077
+ --sc-base-400: #94a3b8;
1078
+ --sc-base-500: #64748b;
1079
+ --sc-base-600: #475569;
1080
+ --sc-base-700: #334155;
1081
+ --sc-base-800: #1e293b;
1082
+ --sc-base-900: #0f172a;
1083
+ --sc-base-content: var(--sc-base-700);
1084
+
1085
+ /*formulaires*/
1086
+ --sc-input-bg: var(--sc-base-100);
1087
+ --sc-input-color: var(--sc-base-content);
1088
+ }
1089
+ `,er=_`
1090
+ --sc-primary: var(--sc-dark-primary, var(--sc-base-700));
1091
+ --sc-info: var(--sc-dark-info, #3abff8);
1092
+ --sc-danger: var(--sc-dark-danger, #f87272);
1093
+ --sc-warning: var(--sc-dark-warning, #fbbd23);
1094
+ --sc-success: var(--sc-dark-success, #36d399);
1095
+
1096
+ --sc-primary-content: var(--sc-dark-primary-content, #002b3d);
1097
+ --sc-info-content: var(--sc-dark-info-content, #002b3d);
1098
+ --sc-danger-content: var(--sc-dark-danger-content, #382800);
1099
+ --sc-warning-content: var(--sc-dark-warning-content, #382800);
1100
+ --sc-success-content: var(--sc-dark-success-content, #003320);
1101
+
1102
+ --sc-base: var(--sc-dark-base, #1d2634);
1103
+ --sc-base-50: var(--sc-dark-base-50, #1f2937);
1104
+ --sc-base-100: var(--sc-dark-base-100, #252c36);
1105
+ --sc-base-200: var(--sc-dark-base-200, #2c3543);
1106
+ --sc-base-300: var(--sc-dark-base-300, #38414e);
1107
+ --sc-base-400: var(--sc-dark-base-400, #515964);
1108
+ --sc-base-500: var(--sc-dark-base-500, #828891);
1109
+ --sc-base-600: var(--sc-dark-base-600, #b4b8be);
1110
+ --sc-base-700: var(--sc-dark-base-700, #cdd0d5);
1111
+ --sc-base-800: var(--sc-dark-base-800, #d9dce0);
1112
+ --sc-base-900: var(--sc-dark-base-900, #e5e7eb);
1113
+ --sc-base-content: var(--sc-dark-base-content, #e5e7eb);
1114
+ `,sr=_`
1115
+ :host([theme="dark"]) {
1116
+ ${er}
1117
+ }
1118
+
1119
+ @media (prefers-color-scheme: dark) {
1120
+ :host([theme="auto"]) {
1121
+ ${er}
1122
+ }
1123
+ }
1124
+ `;var ir=Object.defineProperty,rr=Object.getOwnPropertyDescriptor,or=(t,e,s,i)=>{for(var r,o=i>1?void 0:i?rr(e,s):e,n=t.length-1;n>=0;n--)(r=t[n])&&(o=(i?r(e,s,o):r(o))||o);return i&&o&&ir(e,s,o),o};let nr=class extends Rt{constructor(){super(...arguments),this.theme="light",this.background=!1,this.color=!1,this.font=!1}connectedCallback(){super.connectedCallback(),window.addEventListener("message",(t=>this.receiveMessage(t)),!1),this.postCSSVars()}postCSSVars(){var t;const e=document.styleSheets,s=e.length,i=[];for(let o=0;o<s;o++){const t=e[o];t.href&&(t.href.includes("googleapis")||t.href.includes("typekit.net"))&&i.push(t.href)}const r={variables:this.getCssVariables(),fonts:i};null==(t=ge.get("sonic-theme"))||t.set(r),document.querySelectorAll("iframe").forEach((t=>{var e;return null==(e=t.contentWindow)?void 0:e.postMessage({type:"SonicTheme",...r},"*")}))}receiveMessage(t){const e=t.data;e.type&&"GetSonicTheme"==e.type&&this.postCSSVars()}getCssVariables(){const t=[],e=[...nr.styles.map((t=>t.styleSheet)),...Array.from(document.styleSheets)];for(const o of e)try{if(!o)continue;const e=o.cssRules;for(const s of e){if(!("style"in s))continue;const e=s.style;for(const s of e)t.includes(s)||0!==s.indexOf("--sc")||t.push(s)}}catch(r){console.log("Erreur lors de la récupération des variables CSS")}const s=window.getComputedStyle(this),i={};return t.forEach((t=>i[t]=s.getPropertyValue(t))),i}render(){return xt`<slot></slot>`}};nr.styles=[tr,sr,Xi,_`
1125
+ :host([background]) {
1126
+ display: block !important;
1127
+ background: var(--sc-body-bg) !important;
1128
+ min-height: 100vh;
1129
+ }
1130
+
1131
+ :host([color]) {
1132
+ color: var(--sc-base-content);
1133
+ }
1134
+
1135
+ :host([font]) {
1136
+ font-family: var(--sc-font-family-base), sans-serif;
1137
+ font-weight: var(--sc-font-weight-base);
1138
+ font-style: var(--sc-font-style-base);
1139
+ }
1140
+ `],or([U({type:String,reflect:!0})],nr.prototype,"theme",2),or([U({type:Boolean,reflect:!0})],nr.prototype,"background",2),or([U({type:Boolean,reflect:!0})],nr.prototype,"color",2),or([U({type:Boolean,reflect:!0})],nr.prototype,"font",2),nr=or([m("sonic-theme")],nr);var ar=Object.defineProperty,lr=Object.getOwnPropertyDescriptor,cr=(t,e,s,i)=>{for(var r,o=i>1?void 0:i?lr(e,s):e,n=t.length-1;n>=0;n--)(r=t[n])&&(o=(i?r(e,s,o):r(o))||o);return i&&o&&ar(e,s,o),o};let hr=class extends Rt{constructor(){super(...arguments),this.type="default",this.variant="default",this.ellipsis=!1}render(){return xt`
1141
+ <slot name="prefix"></slot>
1142
+ <slot></slot>
1143
+ <slot name="suffix"></slot>
1144
+ `}};hr.styles=[xe,_`
1145
+ :host {
1146
+ --sc-badge-gap: 0.3em;
1147
+ --sc-badge-py: 0.17em;
1148
+ --sc-badge-px: 0.66em;
1149
+ --sc-fs: 1rem;
1150
+
1151
+ --sc-badge-color: var(--sc-base-content, #1f2937);
1152
+ --sc-badge-bg: var(--sc-base-100, #e5e7eb);
1153
+
1154
+ --sc-badge-border-with: var(--sc-form-border-width, 0.1rem);
1155
+ --sc-badge-border-color: transparent;
1156
+ --sc-badge-border: var(--sc-badge-border-with) solid var(--sc-badge-border-color);
1157
+
1158
+ --sc-badge-rounded: 0.85em;
1159
+ --sc-badge-fw: var(--sc-font-weight-base);
1160
+
1161
+ display: inline-flex;
1162
+ align-items: center;
1163
+ box-sizing: border-box;
1164
+ line-height: var(--sc-lh);
1165
+ border-radius: var(--sc-badge-rounded);
1166
+
1167
+ background: var(--sc-badge-bg);
1168
+ color: var(--sc-badge-color);
1169
+
1170
+ font-family: var(--sc-badge-ff, var(--sc-font-family-base, inherit));
1171
+ font-weight: var(--sc-badge-fw);
1172
+
1173
+ padding-top: var(--sc-badge-py);
1174
+ padding-bottom: var(--sc-badge-py);
1175
+ padding-left: var(--sc-badge-px);
1176
+ padding-right: var(--sc-badge-px);
1177
+ min-height: calc(var(--sc-badge-px) * 2);
1178
+ border: var(--sc-badge-border);
1179
+ -webkit-print-color-adjust: exact;
1180
+ }
1181
+
1182
+ /*TYPES*/
1183
+ :host([type="primary"]) {
1184
+ --sc-badge-color: var(--sc-primary-content);
1185
+ --sc-badge-bg: var(--sc-primary);
1186
+ }
1187
+ :host([type="warning"]) {
1188
+ --sc-badge-color: var(--sc-warning-content);
1189
+ --sc-badge-bg: var(--sc-warning);
1190
+ }
1191
+ :host([type="danger"]) {
1192
+ --sc-badge-color: var(--sc-danger-content);
1193
+ --sc-badge-bg: var(--sc-danger);
1194
+ }
1195
+ :host([type="info"]) {
1196
+ --sc-badge-color: var(--sc-info-content);
1197
+ --sc-badge-bg: var(--sc-info);
1198
+ }
1199
+ :host([type="success"]) {
1200
+ --sc-badge-color: var(--sc-success-content);
1201
+ --sc-badge-bg: var(--sc-success);
1202
+ }
1203
+ :host([type="neutral"]) {
1204
+ --sc-badge-color: var(--sc-base);
1205
+ --sc-badge-bg: var(--sc-base-content);
1206
+ }
1207
+
1208
+ /*SIZE*/
1209
+ :host {
1210
+ font-size: var(--sc-fs);
1211
+ gap: var(--sc-badge-gap);
1212
+ }
1213
+
1214
+ :host([size="2xs"]) {
1215
+ --sc-badge-gap: 0.35em;
1216
+ }
1217
+ :host([size="xs"]) {
1218
+ --sc-badge-gap: 0.35em;
1219
+ }
1220
+
1221
+ :host([size="sm"]) {
1222
+ --sc-badge-gap: 0.35em;
1223
+ }
1224
+
1225
+ :host([size="lg"]) {
1226
+ --sc-lh: 1.2;
1227
+ --sc-badge-gap: 0.5em;
1228
+ }
1229
+
1230
+ :host([size="xl"]) {
1231
+ --sc-lh: 1.2;
1232
+ --sc-badge-gap: 0.5em;
1233
+ }
1234
+
1235
+ :host([contrast]) {
1236
+ --sc-badge-color: var(--sc-contrast-content);
1237
+ --sc-badge-bg: var(--sc-contrast);
1238
+ }
1239
+
1240
+ /*OUTLINE*/
1241
+ :host([variant="outline"][type]) {
1242
+ border-width: var(--sc-badge-border-with) !important;
1243
+ border-color: var(--sc-badge-bg);
1244
+ color: var(--sc-badge-bg);
1245
+ background: transparent;
1246
+ }
1247
+
1248
+ :host([variant="outline"][type="default"]) {
1249
+ border-color: var(--sc-base-400);
1250
+ color: var(--sc-base-500);
1251
+ background: transparent;
1252
+ }
1253
+
1254
+ /*GHOST*/
1255
+ :host([variant="ghost"][type]) {
1256
+ color: var(--sc-badge-bg);
1257
+ background: transparent;
1258
+ padding: 0;
1259
+ }
1260
+
1261
+ :host([variant="ghost"][type="default"]) {
1262
+ color: var(--sc-badge-color);
1263
+ background: transparent;
1264
+ }
1265
+
1266
+ :host([ellipsis]) {
1267
+ flex-wrap: nowrap;
1268
+ white-space: nowrap;
1269
+ max-width: 100%;
1270
+ }
1271
+ :host([ellipsis]) slot {
1272
+ overflow: hidden;
1273
+ display: block;
1274
+ text-overflow: ellipsis;
1275
+ white-space: nowrap;
1276
+ max-width: 100%;
1277
+ }
1278
+
1279
+ slot[name="suffix"],
1280
+ slot[name="prefix"] {
1281
+ flex-shrink: 0;
1282
+ }
1283
+ `],cr([U({type:String,reflect:!0})],hr.prototype,"type",2),cr([U({type:String,reflect:!0})],hr.prototype,"variant",2),cr([U({type:String,reflect:!0})],hr.prototype,"size",2),cr([U({type:Boolean,reflect:!0})],hr.prototype,"ellipsis",2),hr=cr([m("sonic-badge")],hr);class dr{static fixBlankLink(t){const e="undefined"==typeof require?null:require("electron");"_blank"==t.target&&t.addEventListener("click",(()=>{null==e||e.shell.openExternal(t.href)}))}}var pr=Object.defineProperty,ur=Object.getOwnPropertyDescriptor,gr=(t,e,s,i)=>{for(var r,o=i>1?void 0:i?ur(e,s):e,n=t.length-1;n>=0;n--)(r=t[n])&&(o=(i?r(e,s,o):r(o))||o);return i&&o&&pr(e,s,o),o};let br=class extends Rt{constructor(){super(...arguments),this.href="",this._location="",this.autoActive="partial",this._target=null,this.pushState=null}get location(){return this._location}set location(t){this._location=t,Kt.updateComponentActiveState(this)}connectedCallback(){this.href&&0!=this.href.indexOf("http")&&(Kt.onChange(this),this.location=document.location.href.replace(document.location.origin,"")),super.connectedCallback()}disconnectedCallback(){Kt.offChange(this),super.disconnectedCallback()}set target(t){this._target=t,dr.fixBlankLink(this),this.requestUpdate()}get target(){return this._target}handlePushState(t){t.preventDefault(),Kt.changeFromComponent(this)}render(){return this.href?xt`
1284
+ <a href="${this.href}" target=${we(this.target)} @click=${this.pushState?this.handlePushState:null}>
1285
+ <slot></slot>
1286
+ </a>
1287
+ `:xt`<slot></slot>`}};br.styles=[_`
1288
+ a {
1289
+ color: inherit;
1290
+ text-decoration: none;
1291
+ display: contents;
1292
+ }
1293
+ `],gr([U({type:String})],br.prototype,"href",2),gr([U({type:String})],br.prototype,"autoActive",2),gr([U({type:String})],br.prototype,"target",1),gr([U({type:Boolean})],br.prototype,"pushState",2),br=gr([m("sonic-link")],br);var mr=Object.defineProperty,fr=Object.getOwnPropertyDescriptor,vr=(t,e,s,i)=>{for(var r,o=i>1?void 0:i?fr(e,s):e,n=t.length-1;n>=0;n--)(r=t[n])&&(o=(i?r(e,s,o):r(o))||o);return i&&o&&mr(e,s,o),o};let yr=class extends Rt{constructor(){super(...arguments),this.max=100,this.invert=!1,this.type="default",this.size="md"}render(){return xt`
1294
+ <progress value=${we(this.value)} max=${this.max}></progress>
1295
+ <div class="slot-container">
1296
+ <slot></slot>
1297
+ <slot name="remaining"></slot>
1298
+ </div>
1299
+ `}};yr.styles=[xe,_`
1300
+ :host {
1301
+ --sc-progress-bg: var(--sc-input-bg, var(--sc-base-100, #f5f5f5));
1302
+ --sc-progress-color: var(--sc-base-content, #1f2937);
1303
+ --sc-progress-height: 0.6em;
1304
+ --sc-progress-fs: var(--sc-fs, 1rem);
1305
+ --sc-progress-fw: 500;
1306
+ --sc-progress-rounded: var(--sc-rounded-lg);
1307
+ display: block;
1308
+ line-height: 1.2;
1309
+ font-weight: var(--sc-progress-fw);
1310
+ font-size: var(--sc-progress-fs);
1311
+ }
1312
+
1313
+ progress {
1314
+ position: relative;
1315
+ width: 100%;
1316
+ -webkit-appearance: none;
1317
+ appearance: none;
1318
+ overflow: hidden;
1319
+ border: none;
1320
+ height: var(--sc-progress-height);
1321
+ border-radius: var(--sc-progress-rounded);
1322
+ background-color: var(--sc-progress-bg);
1323
+ color: var(--sc-progress-color);
1324
+ }
1325
+ progress::-moz-progress-bar {
1326
+ background-color: var(--sc-progress-color);
1327
+ border-radius: var(--sc-progress-rounded);
1328
+ }
1329
+
1330
+ progress:not([value])::-moz-progress-bar {
1331
+ background-color: var(--sc-progress-bg);
1332
+ }
1333
+
1334
+ progress::-webkit-progress-bar {
1335
+ background-color: var(--sc-progress-bg);
1336
+ }
1337
+ progress::-webkit-progress-value {
1338
+ background-color: var(--sc-progress-color);
1339
+ border-radius: var(--sc-progress-rounded);
1340
+ }
1341
+
1342
+ /* Indeterminate */
1343
+ progress:indeterminate:after {
1344
+ background-color: var(--sc-progress-color);
1345
+ content: "";
1346
+ position: absolute;
1347
+ top: 0;
1348
+ bottom: 0;
1349
+ left: -40%;
1350
+ width: 33.333333%;
1351
+ border-radius: var(--sc-progress-rounded);
1352
+ animation: progress-loading 3s infinite ease-in-out;
1353
+ }
1354
+
1355
+ @keyframes progress-loading {
1356
+ 50% {
1357
+ left: 107%;
1358
+ }
1359
+ }
1360
+
1361
+ /* COLOR TYPES */
1362
+ :host([type="warning"]) {
1363
+ --sc-progress-color: var(--sc-warning);
1364
+ }
1365
+ :host([type="danger"]) {
1366
+ --sc-progress-color: var(--sc-danger);
1367
+ }
1368
+ :host([type="info"]) {
1369
+ --sc-progress-color: var(--sc-info);
1370
+ }
1371
+ :host([type="success"]) {
1372
+ --sc-progress-color: var(--sc-success);
1373
+ }
1374
+
1375
+ :host([invert]) {
1376
+ --sc-progress-bg: rgba(200, 200, 200, 0.1);
1377
+ }
1378
+
1379
+ :host([type="default"][invert]) {
1380
+ --sc-progress-color: var(--sc-base);
1381
+ }
1382
+
1383
+ slot[name="remaining"] {
1384
+ font-weight: var(--sc-font-weight-base);
1385
+ font-size: 0.85em;
1386
+ margin-top: 0.5em;
1387
+ }
1388
+ slot[name="remaining"]::slotted(*) {
1389
+ margin-left: auto;
1390
+ }
1391
+
1392
+ slot:not([name]) {
1393
+ color: var(--sc-progress-color);
1394
+ }
1395
+
1396
+ .slot-container {
1397
+ display: flex;
1398
+ justify-content: space-between;
1399
+ gap: 0.5em;
1400
+ margin-top: 0.15em;
1401
+ }
1402
+ `],vr([U({type:Number})],yr.prototype,"value",2),vr([U({type:Number})],yr.prototype,"max",2),vr([U({type:Boolean})],yr.prototype,"invert",2),vr([U({type:String,reflect:!0})],yr.prototype,"type",2),vr([U({type:String,reflect:!0})],yr.prototype,"size",2),yr=vr([m("sonic-progress")],yr);const wr=_`
1403
+ .password-toggle {
1404
+ color: var(--sc-input-c);
1405
+ font-size: var(--sc-input-fs);
1406
+ cursor: pointer;
1407
+ margin-right: calc(-0.5 * var(--sc-input-px));
1408
+ }
1409
+
1410
+ :host([inlineContent]) .has-suffix .password-toggle {
1411
+ margin-right: 0;
1412
+ }
1413
+ `,xr=_`
1414
+ :host {
1415
+ --sc-label-fs: var(--sc-fs, 1rem);
1416
+ --sc-label-fw: var(--sc-label-font-weight);
1417
+ }
1418
+ label {
1419
+ font-size: var(--sc-label-fs);
1420
+ font-weight: var(--sc-label-fw);
1421
+ line-height: 1.2;
1422
+ }
1423
+ .form-label {
1424
+ margin-bottom: 0.22em;
1425
+ display: block;
1426
+ }
1427
+ `,_r=_`
1428
+ .form-description {
1429
+ color: var(--sc-base-400);
1430
+ font-size: 0.85em;
1431
+ margin-top: 0.2em;
1432
+ display: block;
1433
+ }
1434
+ `,kr=_`
1435
+ * {
1436
+ box-sizing: border-box;
1437
+ }
1438
+
1439
+ :host {
1440
+ --sc-input-height: var(--sc-form-height);
1441
+ --sc-input-c: var(--sc-input-color, var(--sc-base-content));
1442
+ --sc-input-b-width: var(--sc-form-border-width);
1443
+ --sc-input-b-color: var(--sc-input-border-color);
1444
+
1445
+ --sc-item-rounded-tr: var(--sc-input-rounded);
1446
+ --sc-item-rounded-tl: var(--sc-input-rounded);
1447
+ --sc-item-rounded-bl: var(--sc-input-rounded);
1448
+ --sc-item-rounded-br: var(--sc-input-rounded);
1449
+
1450
+ --sc-input-fs: var(--sc-fs, 1rem);
1451
+ --sc-input-ff: inherit;
1452
+ --sc-input-py: 0.55em;
1453
+ --sc-input-px: clamp(0.3em, 8%, 1.1em);
1454
+
1455
+ --sc-input-background: var(--sc-input-bg);
1456
+ --sc-input-addon-c: var(--sc-input-addon-color, var(--sc-base));
1457
+ --sc-input-addon-bg: var(--sc-input-c);
1458
+ }
1459
+
1460
+ .form-element {
1461
+ display: block;
1462
+ flex-grow: 1;
1463
+ width: 100%;
1464
+
1465
+ line-height: 1.1;
1466
+ color: var(--sc-input-c);
1467
+ border-radius: var(--sc-item-rounded-tl) var(--sc-item-rounded-tr)
1468
+ var(--sc-item-rounded-br) var(--sc-item-rounded-bl);
1469
+
1470
+ font-family: var(--sc-input-ff);
1471
+ background-color: var(--sc-input-background);
1472
+ border: var(--sc-input-b-width) solid
1473
+ var(--sc-input-b-color, var(--sc-base-300, #aaa));
1474
+ width: 100%;
1475
+ font-size: var(--sc-input-fs);
1476
+
1477
+ padding-top: var(--sc-input-py);
1478
+ padding-bottom: var(--sc-input-py);
1479
+ padding-left: var(--sc-input-px);
1480
+ padding-right: var(--sc-input-px);
1481
+
1482
+ min-height: var(--sc-input-height);
1483
+ }
1484
+
1485
+ .form-control {
1486
+ display: flex;
1487
+ width: 100%;
1488
+ }
1489
+
1490
+ /*Suffix*/
1491
+ :host(:not([inlineContent])) .has-suffix slot[name="suffix"],
1492
+ :host(:not([inlineContent])) .has-prefix slot[name="prefix"] {
1493
+ min-width: var(--sc-input-height);
1494
+ box-sizing: border-box;
1495
+ display: flex;
1496
+ align-items: center;
1497
+ justify-content: center;
1498
+ line-height: 1.1;
1499
+ flex-shrink: 0;
1500
+ padding-left: clamp(0.25em, 3%, calc(0.33 * var(--sc-input-px)));
1501
+ padding-right: clamp(0.25em, 3%, calc(0.33 * var(--sc-input-px)));
1502
+ }
1503
+
1504
+ :host(:not([inlineContent])) slot[name="prefix"] {
1505
+ border-radius: var(--sc-item-rounded-tl) 0 0 var(--sc-item-rounded-bl);
1506
+ background-color: var(--sc-input-addon-bg);
1507
+ color: var(--sc-input-addon-c);
1508
+ /*margin-right: calc(-1 * var(--sc-input-b-width));
1509
+ border: none;*/
1510
+ }
1511
+
1512
+ :host(:not([inlineContent])) slot[name="suffix"] {
1513
+ border-radius: 0 var(--sc-item-rounded-tr) var(--sc-item-rounded-br) 0;
1514
+ background-color: var(--sc-input-addon-bg);
1515
+ color: var(--sc-input-addon-c);
1516
+ /*margin-left: calc(-1 * var(--sc-input-b-width));
1517
+ border: none;*/
1518
+ }
1519
+
1520
+ :host(:not([inlineContent])) .has-prefix .form-element {
1521
+ border-top-left-radius: 0;
1522
+ border-bottom-left-radius: 0;
1523
+ }
1524
+
1525
+ :host(:not([inlineContent])) .has-suffix .form-element {
1526
+ border-top-right-radius: 0;
1527
+ border-bottom-right-radius: 0;
1528
+ }
1529
+
1530
+ slot[name="suffix"]::slotted(sonic-icon),
1531
+ slot[name="prefix"]::slotted(sonic-icon) {
1532
+ font-size: 1.2em;
1533
+ }
1534
+
1535
+ /*InlineCONTENT */
1536
+
1537
+ .form-element > slot,
1538
+ .form-element .form-element {
1539
+ all: unset;
1540
+ }
1541
+
1542
+ :host([inlineContent]) .form-element {
1543
+ display: flex;
1544
+ align-items: center;
1545
+ gap: 0.35em;
1546
+ min-height: var(--sc-form-height);
1547
+ }
1548
+
1549
+ :host([inlineContent]) .form-element .form-element {
1550
+ appearance: none;
1551
+ background: transparent;
1552
+ border: none;
1553
+ padding: 0;
1554
+ display: block;
1555
+ width: 50%;
1556
+ min-width: 0;
1557
+ flex: 1 1 auto;
1558
+ height: auto;
1559
+ min-height: auto;
1560
+ border-radius: 0;
1561
+ }
1562
+ :host([inlineContent]) slot[name="prefix"]::slotted(*),
1563
+ :host([inlineContent]) slot[name="suffix"]::slotted(*) {
1564
+ display: block;
1565
+ flex: 0 0 auto;
1566
+ max-width: 100%;
1567
+ max-width: 100%;
1568
+ white-space: nowrap;
1569
+ }
1570
+
1571
+ :host([inlineContent]) .has-suffix slot[name="suffix"] {
1572
+ margin-right: calc(-0.5 * var(--sc-input-px));
1573
+ }
1574
+ :host([inlineContent]) .has-prefix slot[name="prefix"] {
1575
+ margin-left: calc(-0.5 * var(--sc-input-px));
1576
+ }
1577
+
1578
+ :host([inlineContent]) slot[name="suffix"]::slotted(*) {
1579
+ margin-left: auto;
1580
+ }
1581
+
1582
+ :host([inlineContent]) .no-suffix slot[name="suffix"],
1583
+ :host([inlineContent]) .no-prefix slot[name="prefix"] {
1584
+ display: none;
1585
+ }
1586
+
1587
+ /* :host([inlineContent]) .input {
1588
+
1589
+ }*/
1590
+ /*Disabled */
1591
+ :host([disabled]) .form-control {
1592
+ cursor: not-allowed;
1593
+ }
1594
+
1595
+ :host([variant="ghost"]) .form-element {
1596
+ --sc-input-bg: transparent;
1597
+ }
1598
+
1599
+ /*Disbaled*/
1600
+ :host([disabled]) .form-element {
1601
+ pointer-events: none;
1602
+ opacity: 0.5;
1603
+ /* border-color: transparent;*/
1604
+ }
1605
+ :host([disabled]) .select-chevron {
1606
+ display: none;
1607
+ /* border-color: transparent;*/
1608
+ }
1609
+
1610
+ /*PLACEHOLDER*/
1611
+ ::placeholder {
1612
+ color: inherit;
1613
+ opacity: 0.45;
1614
+ }
1615
+
1616
+ :host([placehoderAsLabel]) ::placeholder {
1617
+ opacity: 1;
1618
+ }
1619
+
1620
+ :focus::placeholder {
1621
+ opacity: 0 !important;
1622
+ }
1623
+
1624
+ /*HOVER*/
1625
+ :host(:not([disabled])) .form-element:hover,
1626
+ .form-element:focus-visible,
1627
+ .form-element:focus {
1628
+ filter: brightness(0.97);
1629
+ outline: none;
1630
+ }
1631
+
1632
+ .form-label {
1633
+ margin-bottom: 0.22em;
1634
+ display: block;
1635
+ }
1636
+
1637
+ .form-description {
1638
+ color: var(--sc-base-400);
1639
+ font-size: 0.85em;
1640
+ margin-top: 0.2em;
1641
+ display: block;
1642
+ }
1643
+
1644
+ /*Utilitaires*/
1645
+ .hidden {
1646
+ display: none;
1647
+ }
1648
+ .contents {
1649
+ display: contents;
1650
+ }
1651
+
1652
+ /*ERROR*/
1653
+ :host([error]) {
1654
+ --sc-input-b-color: var(--sc-danger);
1655
+ }
1656
+
1657
+ :host input:visited {
1658
+ display: none;
1659
+ }
1660
+
1661
+ :host([touched][required]) :not(:focus):invalid {
1662
+ --sc-input-b-color: var(--sc-danger);
1663
+ --sc-input-c: var(--sc-danger);
1664
+ }
1665
+
1666
+ :host([touched][required]) :not(:focus):invalid + .select-chevron {
1667
+ --sc-input-c: var(--sc-danger);
1668
+ }
1669
+
1670
+ /*VALID*/
1671
+ :host([touched][required]) :not([value=""]):not(:focus):valid {
1672
+ --sc-input-b-color: var(--sc-success);
1673
+ --sc-input-c: var(--sc-success);
1674
+ }
1675
+
1676
+ :host([touched][required]) :not(:focus):valid + .select-chevron {
1677
+ --sc-input-c: var(--sc-success);
1678
+ }
1679
+
1680
+ /*Input COLOR*/
1681
+ :host([type="color"]) .form-element {
1682
+ padding: 0;
1683
+ border: 0;
1684
+ min-width: var(--sc-input-height);
1685
+ }
1686
+ input[type="color"]::-webkit-color-swatch-wrapper {
1687
+ padding: 0;
1688
+ }
1689
+ input[type="color"]::-webkit-color-swatch {
1690
+ border: none;
1691
+ border-radius: var(--sc-item-rounded-tl) var(--sc-item-rounded-tr)
1692
+ var(--sc-item-rounded-br) var(--sc-item-rounded-bl);
1693
+ }
1694
+
1695
+ /*Input Image*/
1696
+ :host([type="image"]) .form-element {
1697
+ padding: 0;
1698
+ border: none;
1699
+ }
1700
+
1701
+ /*Input reset & image*/
1702
+ input[type="reset"],
1703
+ input[type="submit"] {
1704
+ cursor: pointer;
1705
+ }
1706
+
1707
+ /*Input search*/
1708
+ :host([type="search"]) {
1709
+ appearance: none !important;
1710
+ }
1711
+
1712
+ input[type="search"]::-webkit-search-cancel-button {
1713
+ appearance: none;
1714
+ cursor: pointer;
1715
+ height: 0.65em;
1716
+ width: 0.65em;
1717
+ background-image: url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iaXNvLTg4NTktMSI/Pg0KPCEtLSBHZW5lcmF0b3I6IEFkb2JlIElsbHVzdHJhdG9yIDE2LjAuMCwgU1ZHIEV4cG9ydCBQbHVnLUluIC4gU1ZHIFZlcnNpb246IDYuMDAgQnVpbGQgMCkgIC0tPg0KPCFET0NUWVBFIHN2ZyBQVUJMSUMgIi0vL1czQy8vRFREIFNWRyAxLjEvL0VOIiAiaHR0cDovL3d3dy53My5vcmcvR3JhcGhpY3MvU1ZHLzEuMS9EVEQvc3ZnMTEuZHRkIj4NCjxzdmcgdmVyc2lvbj0iMS4xIiBpZD0iQ2FwYV8xIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB4PSIwcHgiIHk9IjBweCINCgkgd2lkdGg9IjEyMy4wNXB4IiBoZWlnaHQ9IjEyMy4wNXB4IiB2aWV3Qm94PSIwIDAgMTIzLjA1IDEyMy4wNSIgc3R5bGU9ImVuYWJsZS1iYWNrZ3JvdW5kOm5ldyAwIDAgMTIzLjA1IDEyMy4wNTsiDQoJIHhtbDpzcGFjZT0icHJlc2VydmUiPg0KPGc+DQoJPHBhdGggZD0iTTEyMS4zMjUsMTAuOTI1bC04LjUtOC4zOTljLTIuMy0yLjMtNi4xLTIuMy04LjUsMGwtNDIuNCw0Mi4zOTlMMTguNzI2LDEuNzI2Yy0yLjMwMS0yLjMwMS02LjEwMS0yLjMwMS04LjUsMGwtOC41LDguNQ0KCQljLTIuMzAxLDIuMy0yLjMwMSw2LjEsMCw4LjVsNDMuMSw0My4xbC00Mi4zLDQyLjVjLTIuMywyLjMtMi4zLDYuMSwwLDguNWw4LjUsOC41YzIuMywyLjMsNi4xLDIuMyw4LjUsMGw0Mi4zOTktNDIuNGw0Mi40LDQyLjQNCgkJYzIuMywyLjMsNi4xLDIuMyw4LjUsMGw4LjUtOC41YzIuMy0yLjMsMi4zLTYuMSwwLTguNWwtNDIuNS00Mi40bDQyLjQtNDIuMzk5QzEyMy42MjUsMTcuMTI1LDEyMy42MjUsMTMuMzI1LDEyMS4zMjUsMTAuOTI1eiIvPg0KPC9nPg0KPGc+DQo8L2c+DQo8Zz4NCjwvZz4NCjxnPg0KPC9nPg0KPGc+DQo8L2c+DQo8Zz4NCjwvZz4NCjxnPg0KPC9nPg0KPGc+DQo8L2c+DQo8Zz4NCjwvZz4NCjxnPg0KPC9nPg0KPGc+DQo8L2c+DQo8Zz4NCjwvZz4NCjxnPg0KPC9nPg0KPGc+DQo8L2c+DQo8Zz4NCjwvZz4NCjxnPg0KPC9nPg0KPC9zdmc+DQo=);
1718
+ background-size: contain;
1719
+ background-repeat: no-repeat;
1720
+ }
1721
+
1722
+ /* Text align */
1723
+ :host([align="center"]) .form-element {
1724
+ text-align: center;
1725
+ }
1726
+ :host([align="left"]) .form-element {
1727
+ text-align: left;
1728
+ }
1729
+ :host([align="right"]) .form-element {
1730
+ text-align: right;
1731
+ }
1732
+
1733
+ /* No arrows ion input Number */
1734
+ :host([noAppearance]) input[type="number"]::-webkit-outer-spin-button,
1735
+ :host([noAppearance]) input[type="number"]::-webkit-inner-spin-button {
1736
+ -webkit-appearance: none;
1737
+ margin: 0;
1738
+ }
1739
+
1740
+ :host([noAppearance]) input[type="number"] {
1741
+ -moz-appearance: textfield !important;
1742
+ }
1743
+ `
112
1744
  /**
113
1745
  * @license
114
1746
  * Copyright 2018 Google LLC
115
1747
  * SPDX-License-Identifier: BSD-3-Clause
116
- */,mr=Wt(class extends Kt{constructor(t){var e;if(super(t),t.type!==Bt||"class"!==t.name||(null===(e=t.strings)||void 0===e?void 0:e.length)>2)throw Error("`classMap()` can only be used in the `class` attribute and must be the only part in the attribute.")}render(t){return" "+Object.keys(t).filter((e=>t[e])).join(" ")+" "}update(t,[e]){var s,i;if(void 0===this.nt){this.nt=new Set,void 0!==t.strings&&(this.st=new Set(t.strings.join(" ").split(/\s/).filter((t=>""!==t))));for(const t in e)e[t]&&!(null===(s=this.st)||void 0===s?void 0:s.has(t))&&this.nt.add(t);return this.render(e)}const r=t.element.classList;this.nt.forEach((t=>{t in e||(r.remove(t),this.nt.delete(t))}));for(const o in e){const t=!!e[o];t===this.nt.has(o)||(null===(i=this.st)||void 0===i?void 0:i.has(o))||(t?(r.add(o),this.nt.add(o)):(r.remove(o),this.nt.delete(o)))}return bt}});var br=Object.defineProperty,fr=Object.getOwnPropertyDescriptor,vr=(t,e,s,i)=>{for(var r,o=i>1?void 0:i?fr(e,s):e,n=t.length-1;n>=0;n--)(r=t[n])&&(o=(i?r(e,s,o):r(o))||o);return i&&o&&br(e,s,o),o};let yr=class extends(Si(Xt(D(zt)))){constructor(){super(...arguments),this.readonly=!1,this.inlineContent=!1,this.disableInlineContentFocus=!1,this.showPasswordToggle=!1,this.hasDescription=!1,this.hasLabel=!1,this.hasSuffix=!1,this.hasPrefix=!1,this.isPassword=!1}connectedCallback(){if(super.connectedCallback(),this.hasSlotOrProps(),this.hasAttribute("sameValueAs")){this.sameValueAsName=this.getAttribute("sameValueAs"),this.sameValueAsHandle=t=>this.pattern=t;const t=this.getFormPublisher();if(!t)return;t[this.sameValueAsName].onAssign(this.sameValueAsHandle)}"password"==this.type&&(this.isPassword=!0,this.showPasswordToggle=!0,this.inlineContent=!0)}disconnectedCallback(){if(super.disconnectedCallback(),this.hasAttribute("sameValueAs")&&this.sameValueAsName){const t=this.getFormPublisher();if(!t)return;t[this.sameValueAsName].offAssign(this.sameValueAsHandle)}}willUpdate(t){this.hasSlotOrProps(),super.willUpdate(t)}setSelectionRange(t,e){this.input.setSelectionRange(t,e)}hasSlotOrProps(){var t,e,s,i;this.hasLabel=!(!this.label&&!(null==(t=this.slotLabelNodes)?void 0:t.length)),this.hasDescription=!(!this.description&&!(null==(e=this.slotDescriptionNodes)?void 0:e.length)),this.hasSuffix=!!(null==(s=this.slotSuffixNodes)?void 0:s.length),this.hasPrefix=!!(null==(i=this.slotPrefixNodes)?void 0:i.length)}inlineContentFocus(){var t;this.inlineContent&&!this.disableInlineContentFocus&&(null==(t=this.input)||t.focus())}handleChange(t){this.hasAttribute("inputDelayMs")?(this.changeTimeoutId&&clearTimeout(this.changeTimeoutId),this.changeTimeoutId=setTimeout((()=>super.handleChange(t)),parseInt(this.getAttribute("inputDelayMs")))):super.handleChange(t)}togglePasswordVisibility(){this.isPassword=!this.isPassword,this._type=this.isPassword?"password":"text",console.log(this.isPassword)}render(){const t={"has-prefix":this.hasPrefix,"has-suffix":this.hasSuffix,"no-suffix":!this.hasSuffix,"no-prefix":!this.hasPrefix};return mt`<label for="form-element" class="${this.hasLabel?"form-label":"hidden"}">${this.label?rs(this.label):""}<slot name="label" @slotchange="${this.hasSlotOrProps}"></slot></label><div @click="${this.inlineContentFocus}" class="form-control ${mr(t)}"><div class="${this.inlineContent?"form-element form-element-wrapper":"contents"}"><slot name="prefix" @slotchange="${this.hasSlotOrProps}"></slot><input id="form-element" part="input" class="form-element input" @input="${this.handleChange}" @blur="${this.handleBlur}" type="${this.type}" disabled="${me(this.disabled)}" ?readonly="${this.readonly}" ?autofocus="${this.autofocus}" list="${me(this.list)}" tabindex="${me(this.tabindex)}" pattern="${me(this.pattern)}" min="${me(this.min)}" max="${me(this.max)}" step="${me(this.step)}" src="${me(this.src)}" minlength="${me(this.minlength)}" maxlength="${me(this.maxlength)}" placeholder="${me(this.placeholder)}" required="${me(this.required)}" autocomplete="${me(this.autocomplete)}" aria-label="${me(this.ariaLabel)}" aria-labelledby="${me(this.ariaLabelledby)}" .name="${this.name}" .value="${this.value}"> ${this.showPasswordToggle?mt`<sonic-button shape="circle" class="password-toggle" @click="${this.togglePasswordVisibility}" aria-label="Toggle password visibility" variant="unstyled"><sonic-icon library="heroicons" name="${this.isPassword?"eye":"eye-slash"}"></sonic-icon></sonic-button>`:""}<slot name="suffix" @slotchange="${this.hasSlotOrProps}"></slot></div></div><slot name="description" @slotchange="${this.hasSlotOrProps}" class="${this.hasDescription?"form-description":"hidden"}">${this.description?mt`${rs(this.description)}`:""}</slot><slot name="list"></slot>`}};yr.styles=[be,gr,pr,ur,dr,T`:host([type=hidden]){appearance:none!important;display:none!important}:host>.form-control{position:relative}`],vr([f({type:String,reflect:!0})],yr.prototype,"size",2),vr([f({type:String})],yr.prototype,"list",2),vr([f({type:String})],yr.prototype,"placeholder",2),vr([f({type:String})],yr.prototype,"pattern",2),vr([f({type:String})],yr.prototype,"min",2),vr([f({type:String})],yr.prototype,"max",2),vr([f({type:Boolean})],yr.prototype,"readonly",2),vr([f({type:Number})],yr.prototype,"step",2),vr([f({type:Number})],yr.prototype,"minlength",2),vr([f({type:Number})],yr.prototype,"maxlength",2),vr([f({type:String})],yr.prototype,"src",2),vr([f({type:Boolean,reflect:!0})],yr.prototype,"inlineContent",2),vr([f({type:Boolean})],yr.prototype,"disableInlineContentFocus",2),vr([f({type:Boolean})],yr.prototype,"showPasswordToggle",2),vr([A({slot:"label"})],yr.prototype,"slotLabelNodes",2),vr([A({slot:"description"})],yr.prototype,"slotDescriptionNodes",2),vr([A({slot:"suffix"})],yr.prototype,"slotSuffixNodes",2),vr([A({slot:"prefix"})],yr.prototype,"slotPrefixNodes",2),vr([w("input")],yr.prototype,"input",2),vr([v()],yr.prototype,"hasDescription",2),vr([v()],yr.prototype,"hasLabel",2),vr([v()],yr.prototype,"hasSuffix",2),vr([v()],yr.prototype,"hasPrefix",2),vr([v()],yr.prototype,"isPassword",2),yr=vr([m("sonic-input")],yr);var wr=Object.defineProperty,xr=Object.getOwnPropertyDescriptor,_r=(t,e,s,i)=>{for(var r,o=i>1?void 0:i?xr(e,s):e,n=t.length-1;n>=0;n--)(r=t[n])&&(o=(i?r(e,s,o):r(o))||o);return i&&o&&wr(e,s,o),o};let kr=class extends zt{constructor(){super(...arguments),this.open=!1,this.noToggle=!1,this.inline=!1,this.shadow="lg",this.placement="bottom",this.positioningRuns=!1,this.lastContentX=0,this.lastContentY=0,this.resizeObserver=new ResizeObserver((()=>this.computePosition(this.placement)))}runPositioningLoop(){this.positioningRuns&&(this.positioningRuns=!0,this.computePosition(this.placement),window.requestAnimationFrame((()=>this.runPositioningLoop())))}_toggle(t){if(this.open&&this.noToggle)return;const e=t;("keydown"!=t.type||"ArrowDown"==e.key&&!this.open)&&(this.open=!this.open,this.open?this._show():this._hide())}_show(){this.popContent.style.removeProperty("display"),this.open=!0,this.popContent.setAttribute("tabindex","0"),this.popBtn&&this.popContent&&!this.positioningRuns&&(this.positioningRuns=!0,this.lastContentX=0,this.lastContentY=0,this.runPositioningLoop()),this.dispatchEvent(new CustomEvent("show"))}_hide(){this.open=!1,this.popContent.setAttribute("tabindex","-1"),this.positioningRuns=!1,this.dispatchEvent(new CustomEvent("hide"))}_handleClosePop(t){const s=t.composedPath(),i=s[0];kr.pops.forEach((r=>{const o=s.includes(r),n=s.includes(r.querySelector('[slot="content"]')),a="keep"===e.getAncestorAttributeValue(i,"data-on-select");"pointerdown"==t.type&&o||"click"==t.type&&(o&&a||!n)||r._hide()}))}connectedCallback(){super.connectedCallback(),0==kr.pops.size&&(document.addEventListener("pointerdown",this._handleClosePop),document.addEventListener("click",this._handleClosePop)),kr.pops.add(this)}firstUpdated(t){super.firstUpdated(t),this.resizeObserver.observe(this.popContent)}disconnectedCallback(){super.disconnectedCallback(),kr.pops.delete(this),0==kr.pops.size&&(document.removeEventListener("pointerdown",this._handleClosePop),document.removeEventListener("click",this._handleClosePop)),this.resizeObserver.unobserve(this.popContent)}computePosition(t){var e,s,i;let r=null==(e=this.popContent)?void 0:e.getBoundingClientRect();const o=this.getBoundingClientRect(),n=o.left,a=o.top;let l=n,c=a;const h=a-r.height-8,d=n-r.width-8,p=n+o.width+8,u=a+o.height+8;switch(t){case"bottom":c=u;break;case"top":c=h;break;case"left":l=d;break;case"right":l=p}this.lastContentX+=l-r.x,this.lastContentY+=c-r.y,Object.assign(this.popContent.style,{left:`${this.lastContentX}px`,top:`${this.lastContentY}px`}),r=null==(s=this.popContent)?void 0:s.getBoundingClientRect(),r.x<5&&"left"==t&&(l=p),r.y<5&&"top"==t&&(c=u),r.x+r.width>window.innerWidth-5&&"right"==t&&(l=d),r.y+r.height>window.innerHeight-5&&"bottom"==t&&(c=h),this.lastContentX+=l-r.x,this.lastContentY+=c-r.y,Object.assign(this.popContent.style,{left:`${this.lastContentX}px`,top:`${this.lastContentY}px`}),r=null==(i=this.popContent)?void 0:i.getBoundingClientRect(),r.x<0&&(this.lastContentX+=-r.x),r.y<0&&(this.lastContentY+=-r.y),r.x+r.width>window.innerWidth&&(this.lastContentX+=window.innerWidth-(r.x+r.width)),r.y+r.height>window.innerHeight&&(this.lastContentY+=window.innerHeight-(r.y+r.height)),Object.assign(this.popContent.style,{left:`${this.lastContentX}px`,top:`${this.lastContentY}px`})}render(){return mt`<slot @click="${this._toggle}" @keydown="${this._toggle}" class="contents"></slot><slot name="content" tabindex="-1" part="content" style="display:none" class="${this.open?"is-open":""}"></slot>`}};kr.pops=new Set,kr.styles=[T`:host{display:inline-block;vertical-align:middle}slot[name=content]{max-width:80vw;background-color:var(--sc-base);position:absolute;z-index:50;display:block;transform:translateY(1rem) scale(.95);opacity:0;pointer-events:none;transition-duration:.15s;transition-timing-function:ease;transition-property:all;border-radius:min(calc(var(--sc-btn-rounded) * 2),.4em)}slot[name=content].is-open:not(.is-empty){transform:translateY(0) scale(1);opacity:1;pointer-events:auto;transition-property:scale,opacity;transition-timing-function:cubic-bezier(.25,.25,.42,1.225)}:host([shadow=md]) slot[name=content],:host([shadow=true]) slot[name=content],:host([shadow]) slot[name=content]{box-shadow:var(--sc-shadow)}:host([shadow=sm]) slot[name=content]{box-shadow:var(--sc-shadow-sm)}:host([shadow=none]) slot[name=content]{box-shadow:none}:host([shadow=lg]) slot[name=content]{box-shadow:var(--sc-shadow-lg)}:host([inline]){vertical-align:baseline}`],_r([v()],kr.prototype,"open",2),_r([w("slot:not([name=content])")],kr.prototype,"popBtn",2),_r([w("slot[name=content]")],kr.prototype,"popContent",2),_r([f({type:Boolean})],kr.prototype,"noToggle",2),_r([f({type:Boolean,reflect:!0})],kr.prototype,"inline",2),_r([f({type:String,reflect:!0})],kr.prototype,"shadow",2),_r([f({type:String})],kr.prototype,"placement",2),kr=_r([m("sonic-pop")],kr);var Ar=Object.defineProperty,Pr=Object.getOwnPropertyDescriptor;let Cr=class extends we{constructor(){super()}connectedCallback(){this.hasAttribute("variant")||(this.variant="ghost"),this.hasAttribute("type")||(this.type="primary"),this.hasAttribute("shape")||(this.shape="block"),this.hasAttribute("align")||(this.align="left"),super.connectedCallback()}};Cr=((t,e,s,i)=>{for(var r,o=i>1?void 0:i?Pr(e,s):e,n=t.length-1;n>=0;n--)(r=t[n])&&(o=(i?r(e,s,o):r(o))||o);return i&&o&&Ar(e,s,o),o})([m("sonic-menu-item")],Cr);class Sr{constructor(t,{target:e,config:s,callback:i,skipInitial:r}){this.t=new Set,this.o=!1,this.i=!1,this.h=t,null!==e&&this.t.add(null!=e?e:t),this.l=s,this.o=null!=r?r:this.o,this.callback=i,window.ResizeObserver?(this.u=new ResizeObserver((t=>{this.handleChanges(t),this.h.requestUpdate()})),t.addController(this)):console.warn("ResizeController error: browser does not support ResizeObserver.")}handleChanges(t){var e;this.value=null===(e=this.callback)||void 0===e?void 0:e.call(this,t,this.u)}hostConnected(){for(const t of this.t)this.observe(t)}hostDisconnected(){this.disconnect()}async hostUpdated(){!this.o&&this.i&&this.handleChanges([]),this.i=!1}observe(t){this.t.add(t),this.u.observe(t,this.l),this.i=!0,this.h.requestUpdate()}unobserve(t){this.t.delete(t),this.u.unobserve(t)}disconnect(){this.u.disconnect()}}var $r=Object.defineProperty,Or=Object.getOwnPropertyDescriptor,Dr=(t,e,s,i)=>{for(var r,o=i>1?void 0:i?Or(e,s):e,n=t.length-1;n>=0;n--)(r=t[n])&&(o=(i?r(e,s,o):r(o))||o);return i&&o&&$r(e,s,o),o};let Lr=class extends(ji(Li(Di(Ei(zt))))){constructor(){super(...arguments),this.size="md",this.placeholder="",this.filteredFields="",this.readonly=null,this.dataProviderExpression="",this.key="",this.searchParameter="",this.propertyName="",this.hasInputPrefix=!1,this._resizeController=new Sr(this,{}),this.searchDataProvider="",this.initSearchDataProvider="",this.queueDataProvider="",this.initQueueDataProvider="",this.lastValidSearch="",this.updateSearchParameter=t=>{var e;if(""==t)return void(this.lastValidSearch="");!1===this.queryQueueListItem(this.queueDataProvider,this.findSelection,this.setSearchFromSelection)&&(this.lastValidSearch=t,null==(e=this.searchPublisher)||e.set(this.lastValidSearch))},this.initSearchParameter=()=>{this.queryQueueListItem(this.initQueueDataProvider,this.findSelection,this.setSearchFromSelection)},this.selectListItem=t=>{var e;let s="_self"===this.propertyName?t:t[this.propertyName||this.name];null==(e=this.formValuePublisher)||e.set(s)},this.findSearchedItem=t=>{var e;return("_self"===this.propertyName?t:t[this.propertyName||this.searchParameter||this.name])==(null==(e=this.searchPublisher)?void 0:e.get())},this.findSelection=t=>("_self"===this.propertyName?t:t[this.propertyName||this.name])==this.value,this.setSearchFromSelection=t=>{var e;this.lastValidSearch="_self"===this.propertyName?t:t[this.propertyName||this.searchParameter||this.name],null==(e=this.searchPublisher)||e.set(this.lastValidSearch)},this.updateActiveSelection=()=>{var t,e,s;this.queryQueueListItem(this.queueDataProvider,this.findSearchedItem,this.selectListItem),!this.select&&this.lastValidSearch&&this.lastValidSearch!=(null==(t=this.searchPublisher)?void 0:t.get())&&(null==(e=this.formValuePublisher)?void 0:e.get())&&(null==(s=this.formValuePublisher)||s.set(""))}}hasSlotOrProps(){var t;this.hasInputPrefix=!!(null==(t=this.slotInputPrefixNodes)?void 0:t.length)}connectedCallback(){var t,e,s;super.connectedCallback();const i=this.searchParameter||this.name,r=this.getAncestorAttributeValue("formDataProvider"),o=r+"__"+this.name+"__autocomplete";this.initSearchDataProvider=`${o}_init_search__`,this.initQueueDataProvider=`${o}_init_queue__`,this.searchDataProvider=`${o}_search__`,this.queueDataProvider=`${o}_queue__`;const n=ce.get;this.searchPublisher=n(this.searchDataProvider)[i],this.formValuePublisher=n(r)[this.name],this.countPublisher=n(this.queueDataProvider).resultCount,this.initCountPublisher=n(this.initQueueDataProvider).resultCount,this.value&&(ce.get(this.initSearchDataProvider)[this.name]=this.value),null==(t=this.initCountPublisher)||t.onAssign(this.initSearchParameter),null==(e=this.formValuePublisher)||e.onAssign(this.updateSearchParameter),null==(s=this.countPublisher)||s.onAssign(this.updateActiveSelection)}disconnectedCallback(){var t,e,s;super.disconnectedCallback(),null==(t=this.initCountPublisher)||t.offAssign(this.initSearchParameter),null==(e=this.formValuePublisher)||e.offAssign(this.updateSearchParameter),null==(s=this.countPublisher)||s.offAssign(this.updateActiveSelection);const i=ce.get;i(this.initSearchDataProvider).delete(),i(this.initQueueDataProvider).delete(),i(this.searchDataProvider).delete(),i(this.queueDataProvider).delete()}queryQueueListItem(t,e,s){let i;const r=ce.get(t).get();if(Array.isArray(r)){for(const t of r){const s=ce.get(t.dataProvider).get();if(Array.isArray(s)&&(i=s.find(e),i))break}return!!i&&(s(i),!0)}}setSelectionRange(t,e){var s;null==(s=this.querySelector("sonic-input"))||s.setSelectionRange(t,e)}handleHide(){var t,e,s;if(this.select)return""==(null==(t=this.searchPublisher)?void 0:t.get())?(this.lastValidSearch="",void(null==(e=this.formValuePublisher)||e.set(""))):void(null==(s=this.searchPublisher)||s.set(this.lastValidSearch))}render(){return mt`<sonic-pop noToggle style="display:block" @hide="${this.handleHide}"><sonic-input dataProvider="${this.initSearchDataProvider+Math.random()}" formDataProvider="${this.searchDataProvider}" type="search" data-keyboard-nav="${this.getAttribute("data-keyboard-nav")||""}" label="${me(this.label)}" description="${me(this.description)}" name="${me(this.searchParameter||this.name)}" placeholder="${me(this.placeholder)}" ?readonly="${this.readonly}" autocomplete="off" clearable inlineContent size="${this.size}"><slot name="prefix" slot="prefix" @slotchange="${this.hasSlotOrProps}"></slot>${this.select?mt`<sonic-icon slot="suffix" class="select-chevron" name="nav-arrow-down" .size="${this.size}"></sonic-icon>`:ft}</sonic-input><sonic-menu slot="content" class="custom-scroll" style="${this.offsetWidth?`width: ${this.offsetWidth}px`:""}"><sonic-queue dataProvider="${this.queueDataProvider}" filteredFields="${this.filteredFields}" dataProviderExpression="${this.dataProviderExpression}" dataFilterProvider="${this.searchDataProvider}" key="${this.key}" .templates="${this.templateList}" displayContents></sonic-queue><sonic-queue noLazyload dataProvider="${this.initQueueDataProvider}" filteredFields="${this.filteredFields}" dataProviderExpression="${this.dataProviderExpression}" dataFilterProvider="${this.initSearchDataProvider}" key="${this.key}" displayContents></sonic-queue></sonic-menu></sonic-pop>`}};Lr.styles=[gs,T`:host{display:block}sonic-menu{display:block;max-height:clamp(20rem,55vh,35rem);min-width:14rem;width:100%}`],Dr([f({type:String})],Lr.prototype,"size",2),Dr([f({type:String})],Lr.prototype,"placeholder",2),Dr([f()],Lr.prototype,"filteredFields",2),Dr([f({type:Boolean})],Lr.prototype,"readonly",2),Dr([f({type:String})],Lr.prototype,"dataProviderExpression",2),Dr([f({type:Boolean})],Lr.prototype,"select",2),Dr([f({type:String})],Lr.prototype,"key",2),Dr([f({type:String})],Lr.prototype,"searchParameter",2),Dr([f({type:String})],Lr.prototype,"propertyName",2),Dr([A({slot:"prefix"})],Lr.prototype,"slotInputPrefixNodes",2),Dr([v()],Lr.prototype,"hasInputPrefix",2),Lr=Dr([m("sonic-input-autocomplete")],Lr);var Er=Object.defineProperty,jr=Object.getOwnPropertyDescriptor,Mr=(t,e,s,i)=>{for(var r,o=i>1?void 0:i?jr(e,s):e,n=t.length-1;n>=0;n--)(r=t[n])&&(o=(i?r(e,s,o):r(o))||o);return i&&o&&Er(e,s,o),o};let Nr=class extends(Ei(zt)){constructor(){super(...arguments),this.minChars=8,this.hasNoChar=!0,this.hasEnoughChars=!1,this.hasMinuscule=!1,this.hasMajuscule=!1,this.hasNumber=!1,this.hasSpecialChar=!1,this.wording_password_helper_decription="Le mot de passe doit contenir au moins :",this.wording_password_helper_min_length="8 caractères",this.wording_password_helper_lower_case="1 minuscule",this.wording_password_helper_upper_case="1 majuscule",this.wording_password_helper_number="1 chiffre",this.wording_password_helper_special_char="1 caractère spécial"}connectedCallback(){super.connectedCallback(),this.name&&(this.checkValue=t=>{t?(this.hasNoChar=0==t.length,this.hasEnoughChars=t.length>this.minChars):(this.hasNoChar=!0,this.hasEnoughChars=!1),this.hasMinuscule=/[a-z]/.test(t),this.hasMajuscule=/[A-Z]/.test(t),this.hasNumber=/[0-9]/.test(t),this.hasSpecialChar=/[!"#$%&'()*+,\-./:;<=>?@[\]^_`{|}~]/.test(t)},ce.get(this.getAncestorAttributeValue("formDataProvider"))[this.name].onAssign(this.checkValue))}disconnectedCallback(){this.checkValue&&this.name&&ce.get(this.getAncestorAttributeValue("formDataProvider"))[this.name].offAssign(this.checkValue),super.disconnectedCallback()}getIcon(t){return t?mt`<sonic-icon library="heroicons" name="face-smile"></sonic-icon>`:mt`<sonic-icon library="heroicons" name="x-mark"></sonic-icon>`}render(){return this.hasNoChar?ft:mt`<div>${this.wording_password_helper_decription}</div><div>${this.getIcon(this.hasEnoughChars)} ${this.wording_password_helper_min_length}</div><div>${this.getIcon(this.hasMinuscule)} ${this.wording_password_helper_lower_case}</div><div>${this.getIcon(this.hasMajuscule)} ${this.wording_password_helper_upper_case}</div><div>${this.getIcon(this.hasNumber)} ${this.wording_password_helper_number}</div><div>${this.getIcon(this.hasSpecialChar)} ${this.wording_password_helper_special_char}</div>`}};Mr([f()],Nr.prototype,"name",2),Mr([f()],Nr.prototype,"minChars",2),Mr([v()],Nr.prototype,"hasNoChar",2),Mr([v()],Nr.prototype,"hasEnoughChars",2),Mr([v()],Nr.prototype,"hasMinuscule",2),Mr([v()],Nr.prototype,"hasMajuscule",2),Mr([v()],Nr.prototype,"hasNumber",2),Mr([v()],Nr.prototype,"hasSpecialChar",2),Mr([f()],Nr.prototype,"wording_password_helper_decription",2),Mr([f()],Nr.prototype,"wording_password_helper_min_length",2),Mr([f()],Nr.prototype,"wording_password_helper_lower_case",2),Mr([f()],Nr.prototype,"wording_password_helper_upper_case",2),Mr([f()],Nr.prototype,"wording_password_helper_number",2),Mr([f()],Nr.prototype,"wording_password_helper_special_char",2),Nr=Mr([m("sonic-password-helper")],Nr);var zr=Object.defineProperty,Ir=Object.getOwnPropertyDescriptor,Fr=(t,e,s,i)=>{for(var r,o=i>1?void 0:i?Ir(e,s):e,n=t.length-1;n>=0;n--)(r=t[n])&&(o=(i?r(e,s,o):r(o))||o);return i&&o&&zr(e,s,o),o};let Tr=class extends(Ei(zt)){constructor(){super(...arguments),this.descriptionWhenEqual="Correspondance : oui",this.descriptionWhenNotEqual="Correspondance : non",this.areEqual=!1,this.hasNoChar=!0}connectedCallback(){super.connectedCallback();const t=ce.get(this.getAncestorAttributeValue("formDataProvider"));this.name&&this.sameValueAs&&(this.checkValue=e=>{this.hasNoChar=!e||0==e.length,this.name&&this.sameValueAs&&(this.areEqual=t[this.name].get()==t[this.sameValueAs].get())},t[this.name].onAssign(this.checkValue),t[this.sameValueAs].onAssign(this.checkValue))}disconnectedCallback(){if(this.checkValue&&this.name&&this.sameValueAs){const t=ce.get(this.getAncestorAttributeValue("formDataProvider"));t[this.name].offAssign(this.checkValue),t[this.sameValueAs].offAssign(this.checkValue)}super.disconnectedCallback()}render(){return this.hasNoChar?ft:mt`<span>${this.areEqual?rs(this.descriptionWhenEqual):rs(this.descriptionWhenNotEqual)}</span>`}};Fr([f()],Tr.prototype,"name",2),Fr([f()],Tr.prototype,"sameValueAs",2),Fr([f()],Tr.prototype,"descriptionWhenEqual",2),Fr([f()],Tr.prototype,"descriptionWhenNotEqual",2),Fr([v()],Tr.prototype,"areEqual",2),Fr([v()],Tr.prototype,"hasNoChar",2),Tr=Fr([m("sonic-same-value-helper")],Tr);var Rr=Object.defineProperty,Vr=Object.getOwnPropertyDescriptor,Ur=(t,e,s,i)=>{for(var r,o=i>1?void 0:i?Vr(e,s):e,n=t.length-1;n>=0;n--)(r=t[n])&&(o=(i?r(e,s,o):r(o))||o);return i&&o&&Rr(e,s,o),o};let qr=class extends(ge(Si(Xt(D(zt))))){constructor(){super(...arguments),this.touched=!1,this.iconName="check",this.indeterminateIconName="minus-small",this.showAsIndeterminate=!1,this.hasDescription=!1,this.hasLabel=!1}connectedCallback(){this.type="checkbox",this.hasSlotOrProps(),super.connectedCallback()}willUpdate(t){this.hasSlotOrProps(),super.willUpdate(t)}hasSlotOrProps(){var t,e;this.hasLabel=!(!this.label&&!(null==(t=this.slotLabelNodes)?void 0:t.length)),this.hasDescription=!(!this.description&&!(null==(e=this.slotDescriptionNodes)?void 0:e.length))}render(){return mt`<label class="checkbox-container ${this.disabled?"disabled":""}"><span class="icon-container"><input type="${this.type}" @click="${this.handleChange}" @blur="${this.handleBlur}" ?required="${this.required}" ?data-indeterminate="${this.showAsIndeterminate}" .disabled="${me(this.disabled)}" .checked="${me(this.checked)}" .name="${this.name}" .value="${this.value}" ?autofocus="${this.autofocus}" aria-label="${me(this.ariaLabel)}" aria-labelledby="${me(this.ariaLabelledby)}"><sonic-icon name="${"indeterminate"==this.checked||this.showAsIndeterminate?this.indeterminateIconName:this.iconName}" class="sc-input-icon"></sonic-icon></span><div class="checkbox-text ${this.hasDescription||this.hasLabel?"checkbox-text":"hidden"}">${this.label?rs(this.label):""}<slot @slotchange="${this.hasSlotOrProps}"></slot><slot @slotchange="${this.hasSlotOrProps}" name="description" class="${this.hasDescription?"description":"hidden"}">${this.description?mt`${rs(this.description)}`:""}</slot></div></label>`}};qr.styles=[be,T`:host{--sc-checkbox-border-width:var(--sc-form-border-width);--sc-checkbox-border-color:var(--sc-input-border-color);--sc-checkbox-bg:var(--sc-input-bg);--sc-checkbox-color:transparent}*{box-sizing:border-box}.checkbox-container{min-height:1.4em;display:flex;gap:.5em;line-height:1.2;align-items:flex-start;font-size:var(--sc-fs)}.icon-container{position:relative;display:flex;flex-shrink:0}input{box-sizing:border-box;appearance:none;flex-shrink:0;height:calc(var(--sc-fs) * 1.25);width:calc(var(--sc-fs) * 1.25);display:block;cursor:pointer;border-radius:.25em;transition:.2s;outline:0;margin:0;background-color:var(--sc-checkbox-bg);border:var(--sc-checkbox-border-width) solid var(--sc-checkbox-border-color)}:host(:not([disabled])) input:active,input:focus{box-shadow:0 0 0 2px var(--sc-primary)}:host(:not([disabled])) label{cursor:pointer}sonic-icon{line-height:0;position:absolute;top:50%;left:50%;transform:translateX(-50%) translateY(-50%) scale(0);transition:transform .2s ease-in-out;color:var(--sc-checkbox-color)}.description{color:var(--sc-base-400);font-size:.85em;margin-top:.2em;display:block}input:checked,input[checked],input[data-indeterminate]{--sc-checkbox-border-color:var(--sc-primary);--sc-checkbox-bg:var(--sc-primary)}input:checked+sonic-icon,input[checked]+sonic-icon,input[data-indeterminate]+sonic-icon{--sc-checkbox-color:var(--sc-primary-content);transform:translateX(-50%) translateY(-50%) scale(1)}.disabled{cursor:not-allowed}.disabled input{opacity:.4}.disabled .checkbox-text{opacity:.6}:host(:not([disabled])) label:hover input{filter:brightness(.97)}::slotted(a){color:inherit;text-decoration:underline!important}::slotted(a:hover){text-decoration:none!important}.hidden{display:none}`],Ur([f({type:Boolean,reflect:!0})],qr.prototype,"touched",2),Ur([f({type:String})],qr.prototype,"iconName",2),Ur([f({type:String})],qr.prototype,"indeterminateIconName",2),Ur([f({type:Boolean})],qr.prototype,"showAsIndeterminate",2),Ur([f({type:Boolean})],qr.prototype,"hasDescription",2),Ur([f({type:Boolean})],qr.prototype,"hasLabel",2),Ur([A()],qr.prototype,"slotLabelNodes",2),Ur([A({slot:"description"})],qr.prototype,"slotDescriptionNodes",2),qr=Ur([m("sonic-checkbox")],qr);var Br=Object.defineProperty,Hr=Object.getOwnPropertyDescriptor;let Wr=class extends qr{constructor(){super(),this.radio=!0}connectedCallback(){super.connectedCallback(),this.type="radio"}};Wr.styles=[qr.styles,T`:host input{border-radius:50%}:host sonic-icon{border-radius:50%;overflow:hidden;background-color:var(--sc-primary-content);line-height:0;display:block;font-size:1em;height:.6em;width:.6em}`],Wr=((t,e,s,i)=>{for(var r,o=i>1?void 0:i?Hr(e,s):e,n=t.length-1;n>=0;n--)(r=t[n])&&(o=(i?r(e,s,o):r(o))||o);return i&&o&&Br(e,s,o),o})([m("sonic-radio")],Wr);var Kr=Object.defineProperty,Zr=Object.getOwnPropertyDescriptor,Qr=(t,e,s,i)=>{for(var r,o=i>1?void 0:i?Zr(e,s):e,n=t.length-1;n>=0;n--)(r=t[n])&&(o=(i?r(e,s,o):r(o))||o);return i&&o&&Kr(e,s,o),o};let Yr=class extends(Xt(D(zt))){constructor(){super(...arguments),this.valueKey="value",this.wordingKey="wording",this.multiple=!1,this._options=[],this.hasDoneFirstUpdate=!1,this._value="",this.forceAutoFill=!1,this.hasDescription=!1,this.hasLabel=!1,this.hasSuffix=!1,this.hasPrefix=!1}set options(t){this._options=t;for(const e of t)e.selected&&(this.value=e.value||"");!(this.value||this.getAttribute("value"))&&this._options.length>0&&(this.value=this._options[0][this.valueKey]),this.requestUpdate()}get options(){return this._options}firstUpdated(){this.hasDoneFirstUpdate=!0}set value(t){(null!=t||this.hasDoneFirstUpdate)&&(t||(t=""),this._value!=t&&(this._value=t,this.updateFormPublisherValue(),this.requestUpdate()))}get value(){return this._value}updateFormPublisherValue(){const t=this.getFormPublisher();t&&(t[this.name]=this.value)}connectedCallback(){super.connectedCallback(),this.hasSlotOrProps();const t=this.querySelectorAll("option");t.length>0&&(this.options=Array.from(t).map((t=>({value:t.value,wording:t.text,selected:t.hasAttribute("selected")}))))}get description(){return this._description}set description(t){this.hasAttribute("description")&&!this.forceAutoFill&&(t=this.getAttribute("description")),this._description=t,this.requestUpdate()}get label(){return this._label}set label(t){this.hasAttribute("label")&&!this.forceAutoFill&&(t=this.getAttribute("label")),this._label=t,this.requestUpdate()}willUpdate(t){this.hasSlotOrProps(),super.willUpdate(t)}hasSlotOrProps(){var t,e,s,i;this.hasLabel=!(!this.label&&!(null==(t=this.slotLabelNodes)?void 0:t.length)),this.hasDescription=!(!this.description&&!(null==(e=this.slotDescriptionNodes)?void 0:e.length)),this.hasSuffix=!!(null==(s=this.slotSuffixNodes)?void 0:s.length),this.hasPrefix=!!(null==(i=this.slotPrefixNodes)?void 0:i.length)}validateFormElement(){var t;const e=null==(t=this.shadowRoot)?void 0:t.querySelector("select");if(!e||e.checkValidity())return;const s=this.getFormPublisher();s&&(s.isFormValid=!1),e.reportValidity()}render(){const t={"has-prefix":this.hasPrefix,"has-suffix":this.hasSuffix};return mt`<label for="form-element" class="${this.hasLabel?"form-label":"hidden"}">${this.label?rs(this.label):""}<slot name="label" @slotchange="${this.hasSlotOrProps}"></slot></label><div class="form-control ${mr(t)}"><slot name="prefix" @slotchange="${this.hasSlotOrProps}"></slot><div class="form-select-wrapper"><select id="form-element" @change="${this.handleChange}" @blur="${this.handleBlur}" ?disabled="${this.disabled}" ?required="${this.required}" ?multiple="${this.multiple}" size="${me(this.selectSize)}" ?autofocus="${this.autofocus}" .value="${this.value}" class="form-element" aria-label="${me(this.ariaLabel)}" aria-labelledby="${me(this.ariaLabelledby)}">${Me(this.options,(t=>t[this.valueKey]),(t=>{const e=this.value==t[this.valueKey];return mt`<option ?selected="${e}" value="${t[this.valueKey]}">${t[this.wordingKey]}</option>`}))}<slot></slot></select><sonic-icon class="select-chevron" name="nav-arrow-down" .size="${this.size}"></sonic-icon></div><slot name="suffix" @slotchange="${this.hasSlotOrProps}"></slot></div><slot name="description" @slotchange="${this.hasSlotOrProps}" class="${this.hasDescription?"form-description":"hidden"}">${this.description?mt`${rs(this.description)}`:""}</slot>`}};Yr.styles=[be,gr,pr,ur,T`.form-element{appearance:none}:host([disabled]) sonic-icon{opacity:0}@supports selector(:has(*)){:host(:not([disabled])) .form-element:not(:has(option:only-child)){padding-right:max(1.275em,calc(1.5 * var(--sc-input-px)))}}@supports not selector(:has(*)){:host(:not([disabled])) .form-element{padding-right:max(1.275em,calc(1.5 * var(--sc-input-px)))}}.form-select-wrapper{position:relative;width:100%}sonic-icon{position:absolute;right:calc(.8 * var(--sc-input-px));top:50%;pointer-events:none;transform:translateY(-50%);color:var(--sc-input-c)}option{padding:.1rem var(--sc-input-px);color:var(--sc-base-content);background:var(--sc-base)}select[multiple] option{background:0 0;padding:0}`],Qr([f({type:String})],Yr.prototype,"valueKey",2),Qr([f({type:String})],Yr.prototype,"wordingKey",2),Qr([f({type:Boolean})],Yr.prototype,"multiple",2),Qr([f({type:String,reflect:!0})],Yr.prototype,"size",2),Qr([f({type:Number})],Yr.prototype,"selectSize",2),Qr([f({type:Array})],Yr.prototype,"options",1),Qr([f({reflect:!0})],Yr.prototype,"value",1),Qr([f({type:Boolean})],Yr.prototype,"forceAutoFill",2),Qr([f()],Yr.prototype,"description",1),Qr([f()],Yr.prototype,"label",1),Qr([A({slot:"label"})],Yr.prototype,"slotLabelNodes",2),Qr([A({slot:"description"})],Yr.prototype,"slotDescriptionNodes",2),Qr([A({slot:"suffix"})],Yr.prototype,"slotSuffixNodes",2),Qr([A({slot:"prefix"})],Yr.prototype,"slotPrefixNodes",2),Qr([v()],Yr.prototype,"hasDescription",2),Qr([v()],Yr.prototype,"hasLabel",2),Qr([v()],Yr.prototype,"hasSuffix",2),Qr([v()],Yr.prototype,"hasPrefix",2),Yr=Qr([m("sonic-select")],Yr);var Gr=Object.defineProperty,Jr=Object.getOwnPropertyDescriptor,Xr=(t,e,s,i)=>{for(var r,o=i>1?void 0:i?Jr(e,s):e,n=t.length-1;n>=0;n--)(r=t[n])&&(o=(i?r(e,s,o):r(o))||o);return i&&o&&Gr(e,s,o),o};let to=class extends(Si(Xt(D(zt)))){constructor(){super(...arguments),this.size="",this.readonly=!1,this.hasDescription=!1,this.hasLabel=!1}connectedCallback(){super.connectedCallback(),this.hasSlotOrProps()}willUpdate(t){this.hasSlotOrProps(),super.willUpdate(t)}hasSlotOrProps(){var t,e;this.hasLabel=!(!this.label&&!(null==(t=this.slotLabelNodes)?void 0:t.length)),this.hasDescription=!(!this.description&&!(null==(e=this.slotDescriptionNodes)?void 0:e.length))}validateFormElement(){var t;const e=null==(t=this.shadowRoot)?void 0:t.querySelector("textarea");if(!e||e.checkValidity())return;const s=this.getFormPublisher();s&&(s.isFormValid=!1),e.reportValidity()}render(){return mt`<label for="form-element" class="${this.hasLabel?"form-label":"hidden"}">${this.label?rs(this.label):""}<slot name="label" @slotchange="${this.hasSlotOrProps}"></slot></label><div class="form-control"><textarea id="form-element" @input="${this.handleChange}" @blur="${this.handleBlur}" disabled="${me(this.disabled)}" ?required="${this.required}" ?autofocus="${this.autofocus}" rows="${me(this.rows)}" cols="${me(this.cols)}" maxlength="${me(this.maxlength)}" minlength="${me(this.minlength)}" ?readonly="${this.readonly}" spellcheck="${me(this.spellcheck)}" autocomplete="${me(this.autocomplete)}" tabindex="${me(this.tabindex)}" wrap="${me(this.wrap)}" placeholder="${this.placeholder}" class="form-element textarea custom-scroll" aria-label="${me(this.ariaLabel)}" aria-labelledby="${me(this.ariaLabelledby)}">
117
- ${this.value}</textarea></div><slot name="description" @slotchange="${this.hasSlotOrProps}" class="${this.hasDescription?"form-description":"hidden"}">${this.description?mt`${rs(this.description)}`:""}</slot>`}};to.styles=[be,gr,pr,ur,gs,T`textarea{font-size:inherit}`],Xr([f({type:String})],to.prototype,"size",2),Xr([f({type:Number})],to.prototype,"rows",2),Xr([f({type:Number})],to.prototype,"cols",2),Xr([f({type:Number})],to.prototype,"maxlength",2),Xr([f({type:Number})],to.prototype,"minlength",2),Xr([f({type:String})],to.prototype,"wrap",2),Xr([f({type:Boolean})],to.prototype,"readonly",2),Xr([f({type:String})],to.prototype,"placeholder",2),Xr([A({slot:"label"})],to.prototype,"slotLabelNodes",2),Xr([A({slot:"description"})],to.prototype,"slotDescriptionNodes",2),Xr([v()],to.prototype,"hasDescription",2),Xr([v()],to.prototype,"hasLabel",2),to=Xr([m("sonic-textarea")],to);var eo=Object.defineProperty,so=Object.getOwnPropertyDescriptor;let io=class extends zt{render(){return mt`<slot></slot>`}};io.styles=[T`:host{color:var(--sc-neutral-500);font-size:1.25rem;line-height:1.2;display:block;font-weight:var(--sc-font-weight-base);font-style:var(--sc-font-style-base);margin-top:.25em}`],io=((t,e,s,i)=>{for(var r,o=i>1?void 0:i?so(e,s):e,n=t.length-1;n>=0;n--)(r=t[n])&&(o=(i?r(e,s,o):r(o))||o);return i&&o&&eo(e,s,o),o})([m("sonic-legend-description")],io);var ro=Object.defineProperty,oo=Object.getOwnPropertyDescriptor,no=(t,e,s,i)=>{for(var r,o=i>1?void 0:i?oo(e,s):e,n=t.length-1;n>=0;n--)(r=t[n])&&(o=(i?r(e,s,o):r(o))||o);return i&&o&&ro(e,s,o),o};let ao=class extends zt{constructor(){super(...arguments),this.forceAutoFill=!1}get description(){return this._description}set description(t){this.hasAttribute("description")&&!this.forceAutoFill&&(t=this.getAttribute("description")),this._description=t,this.requestUpdate()}get label(){return this._label}set label(t){this.hasAttribute("label")&&!this.forceAutoFill&&(t=this.getAttribute("label")),this._label=t,this.requestUpdate()}render(){return mt`<legend part="legend">${this.iconName?mt`<div class="icon"><sonic-icon name="${this.iconName}" prefix="${me(this.iconPrefix)}" library="${me(this.iconLibrary)}"></sonic-icon></div>`:""}<div class="legend-content">${rs(this.label?this.label:"")} ${this.description?mt`<sonic-legend-description>${rs(this.description)}</sonic-legend-description>`:""}<slot></slot></div><slot name="suffix"></slot></legend>`}};ao.styles=[T`:host{--sc-legend-font-size:1.5rem;--sc-legend-font-weight:var(--sc-font-weight-base);--sc-legend-font-style:var(--sc-headings-font-style);--sc-legend-family:var(--sc-headings-font-family);--sc-legend-line-height:var(--sc-headings-line-height);--sc-legend-color:var(--sc-base-content);display:flex;width:100%}legend{font-size:var(--sc-legend-font-size);font-weight:var(--sc-legend-font-weight);font-style:var(--sc-legend-font-style);font-family:var(--sc-legend-font-family);line-height:var(--sc-legend-line-height);color:var(--sc-legend-color);padding:0;display:flex;width:100%;align-items:flex-start;gap:.5em}slot[name=suffix]{display:block;margin-left:auto;flex-shrink:0}.legend-content{flex-grow:1}`],no([f({type:Boolean})],ao.prototype,"forceAutoFill",2),no([f()],ao.prototype,"description",1),no([f()],ao.prototype,"label",1),no([f({type:String})],ao.prototype,"iconName",2),no([f({type:String})],ao.prototype,"iconLibrary",2),no([f({type:String})],ao.prototype,"iconPrefix",2),ao=no([m("sonic-legend")],ao);var lo=Object.defineProperty,co=Object.getOwnPropertyDescriptor,ho=(t,e,s,i)=>{for(var r,o=i>1?void 0:i?co(e,s):e,n=t.length-1;n>=0;n--)(r=t[n])&&(o=(i?r(e,s,o):r(o))||o);return i&&o&&lo(e,s,o),o};let po=class extends(D(zt)){constructor(){super(...arguments),this.disabled=!1,this.variant="default"}render(){return mt`<fieldset form="${me(this.form)}" ?disabled="${this.disabled}">${this.label?mt`<sonic-legend label="${me(this.label)}" description="${me(this.description)}" iconName="${me(this.iconName)}" iconPrefix="${me(this.iconPrefix)}" iconLibrary="${me(this.iconLibrary)}"></sonic-legend>`:ft}<slot></slot></fieldset>`}};po.styles=[T`:host{--sc-fieldset-mt:0;--sc-fieldset-mb:1rem;--sc-fieldset-border-color:var(--sc-border-color);--sc-fieldset-border-width:var(--sc-form-border-width);margin-top:var(--sc-fieldset-mt);margin-bottom:var(--sc-fieldset-mb);display:block;border:var(--sc-fieldset-border-width) solid var(--sc-fieldset-border-color)!important;padding:1.8rem 1.25rem;border-radius:var(--sc-rounded-lg)}fieldset{all:unset;display:contents}:host([variant=ghost]),:host([variant=shadow]){--sc-fieldset-border-color:transparent}:host([variant=shadow]){--sc-fieldset-border-color:transparent;box-shadow:var(--sc-shadow-lg)}::slotted(sonic-legend),sonic-legend{margin-bottom:1.5rem;display:block}::slotted(sonic-legend:last-child){margin-bottom:0}`],ho([f({type:Boolean,reflect:!0})],po.prototype,"disabled",2),ho([f({type:String})],po.prototype,"form",2),ho([f({type:String})],po.prototype,"label",2),ho([f({type:String})],po.prototype,"description",2),ho([f({type:String})],po.prototype,"iconName",2),ho([f({type:String})],po.prototype,"iconLibrary",2),ho([f({type:String})],po.prototype,"iconPrefix",2),ho([f({type:String,reflect:!0})],po.prototype,"variant",2),po=ho([m("sonic-fieldset")],po);var uo=Object.defineProperty,go=Object.getOwnPropertyDescriptor,mo=(t,e,s,i)=>{for(var r,o=i>1?void 0:i?go(e,s):e,n=t.length-1;n>=0;n--)(r=t[n])&&(o=(i?r(e,s,o):r(o))||o);return i&&o&&uo(e,s,o),o};let bo=class extends(D(zt)){constructor(){super(...arguments),this._resizeController=new Sr(this,{}),this.oneFormElement=!1}onSlotChange(){let t=this.slottedElements;const e=["sonic-input","sonic-select","sonic-input-autocomplete",".form-item-container"];t=t.filter((t=>e.includes(t.nodeName.toLowerCase()))),this.oneFormElement=1==t.length}render(){const t={"cq--md":this.offsetWidth>440,"one-form-element":this.oneFormElement};return mt`<div class="${mr(t)}"><slot @slotchange="${this.onSlotChange}"></slot></div>`}};bo.styles=[T`:host{display:block}div{display:grid;grid-gap:1.5rem;align-items:flex-start}.cq--md{grid-gap:1.75rem;grid-template-columns:repeat(2,minmax(0,1fr))}.one-form-element{grid-template-columns:1fr}::slotted(sonic-submit){display:contents}::slotted(:not(sonic-input):not(sonic-select):not(sonic-input-autocomplete):not(.form-item-container)){grid-column:1/-1}::slotted(sonic-divider){--sc-divider-my:0}`],mo([k({flatten:!0})],bo.prototype,"slottedElements",2),mo([f({type:Boolean})],bo.prototype,"oneFormElement",2),bo=mo([m("sonic-form-layout")],bo);var fo=Object.defineProperty,vo=Object.getOwnPropertyDescriptor,yo=(t,e,s,i)=>{for(var r,o=i>1?void 0:i?vo(e,s):e,n=t.length-1;n>=0;n--)(r=t[n])&&(o=(i?r(e,s,o):r(o))||o);return i&&o&&fo(e,s,o),o};let wo=class extends zt{constructor(){super(...arguments),this.direction="row",this.justify="flex-start"}render(){const t={flexDirection:this.direction,justifyContent:this.justify};return mt`<slot style="${Zt(t)}"></slot>`}};wo.styles=[T`:host{display:block}slot{display:flex;flex-wrap:wrap;gap:.3rem}`],yo([f({type:String})],wo.prototype,"direction",2),yo([f({type:String})],wo.prototype,"justify",2),wo=yo([m("sonic-form-actions")],wo);var xo=Object.defineProperty,_o=Object.getOwnPropertyDescriptor,ko=(t,e,s,i)=>{for(var r,o=i>1?void 0:i?_o(e,s):e,n=t.length-1;n>=0;n--)(r=t[n])&&(o=(i?r(e,s,o):r(o))||o);return i&&o&&xo(e,s,o),o};let Ao=class extends zt{constructor(){super(...arguments),this.alignItems="center",this.hasDescription=!1,this.hasLabel=!1}updated(){const t=this.querySelectorAll("sonic-input, sonic-button, sonic-select"),e=t.length;e>1&&t.forEach(((t,s)=>{const i=t;0===s?(i.style.setProperty("--sc-item-rounded-tr","0"),i.style.setProperty("--sc-item-rounded-br","0")):s===e-1?(i.style.setProperty("--sc-item-rounded-tl","0"),i.style.setProperty("--sc-item-rounded-bl","0")):(i.style.setProperty("--sc-item-rounded-tr","0"),i.style.setProperty("--sc-item-rounded-br","0"),i.style.setProperty("--sc-item-rounded-tl","0"),i.style.setProperty("--sc-item-rounded-bl","0"))}))}connectedCallback(){super.connectedCallback(),this.hasSlotOrProps()}willUpdate(t){this.hasSlotOrProps(),super.willUpdate(t)}hasSlotOrProps(){var t,e;this.hasLabel=!(!this.label&&!(null==(t=this.slotLabelNodes)?void 0:t.length)),this.hasDescription=!(!this.description&&!(null==(e=this.slotDescriptionNodes)?void 0:e.length))}render(){const t={alignItems:this.alignItems};return mt`<span class="${this.hasLabel?"form-label":"hidden"}">${this.label?rs(this.label):""}<slot name="label" @slotchange="${this.hasSlotOrProps}"></slot></span><slot class="main-slot" style="${Zt(t)}"></slot><slot name="description" @slotchange="${this.hasSlotOrProps}" class="${this.hasDescription?"form-description":"hidden"}">${this.description?mt`${rs(this.description)}`:""}</slot>`}};Ao.styles=[be,pr,ur,T`:host{display:inline-block;vertical-align:middle}.main-slot{width:100%;display:flex}.hidden{display:none}::slotted(sonic-button),::slotted(sonic-input),::slotted(sonic-select){flex-grow:1}`],ko([f({type:String})],Ao.prototype,"alignItems",2),ko([f({type:String})],Ao.prototype,"label",2),ko([f({type:String})],Ao.prototype,"description",2),ko([A({slot:"label"})],Ao.prototype,"slotLabelNodes",2),ko([A({slot:"description"})],Ao.prototype,"slotDescriptionNodes",2),ko([v()],Ao.prototype,"hasDescription",2),ko([v()],Ao.prototype,"hasLabel",2),Ao=ko([m("sonic-group")],Ao);var Po=Object.defineProperty,Co=Object.getOwnPropertyDescriptor,So=(t,e,s,i)=>{for(var r,o=i>1?void 0:i?Co(e,s):e,n=t.length-1;n>=0;n--)(r=t[n])&&(o=(i?r(e,s,o):r(o))||o);return i&&o&&Po(e,s,o),o};let $o=class extends zt{constructor(){super(...arguments),this.rounded="none",this.src="",this.alt="",this.loading="lazy",this.ratio="auto",this.objectPosition="center center",this.imageRendering="auto",this.cover=!1}firstUpdated(){var t;if(this.transition){const e=null==(t=this.shadowRoot)?void 0:t.querySelector("img");if(!e)return;e.onload=function(){e.classList.add("loaded")}}}render(){const t={aspectRatio:this.cover?"auto":this.ratio,imageRendering:this.imageRendering,objectPosition:this.objectPosition};return mt`<div part="image"><picture part="picture"><img part="img" src="${this.src}" loading="${this.loading}" alt="${this.alt}" style="${Zt(t)}"></picture></div>`}};$o.styles=[T`:host{--sc-img-radius:0;--sc-img-bg:var(--sc-placeholder-bg);border-radius:var(--sc-img-radius);display:block;width:100%;background:var(--sc-img-bg)}img{width:100%;vertical-align:middle;object-fit:cover}img[src=""]{visibility:hidden}:host([rounded]){--sc-img-radius:var(--sc-rounded);overflow:hidden}:host([rounded=sm]){--sc-img-radius:var(--sc-rounded-sm)}:host([rounded=md]){--sc-img-radius:var(--sc-rounded-md)}:host([rounded=lg]){--sc-img-radius:var(--sc-rounded-lg)}:host([rounded=xl]){--sc-img-radius:var(--sc-rounded-xl)}:host([rounded=full]){--sc-img-radius:50%!important}:host([rounded=none]){--sc-img-radius:0!important}:host([cover]),:host([cover]) img,:host([cover])>div{position:absolute!important;left:0!important;top:0!important;right:0!important;bottom:0!important;height:100%!important;width:100%!important}:host([transition]) img{opacity:0;transition:.25s}:host([transition=fade-scale-out]) img{scale:1.08;transition:opacity .3s linear,scale .3s cubic-bezier(.16,1,.3,1)}:host([transition]) img.loaded{opacity:1;scale:1}`],So([f({type:String})],$o.prototype,"rounded",2),So([f({type:String})],$o.prototype,"src",2),So([f({type:String})],$o.prototype,"alt",2),So([f({type:String})],$o.prototype,"loading",2),So([f({type:String,reflect:!0})],$o.prototype,"transition",2),So([f({type:String})],$o.prototype,"ratio",2),So([f({type:String})],$o.prototype,"objectPosition",2),So([f({type:String})],$o.prototype,"imageRendering",2),So([f({type:Boolean,reflect:!0})],$o.prototype,"cover",2),$o=So([m("sonic-image")],$o);var Oo=Object.defineProperty,Do=Object.getOwnPropertyDescriptor,Lo=(t,e,s,i)=>{for(var r,o=i>1?void 0:i?Do(e,s):e,n=t.length-1;n>=0;n--)(r=t[n])&&(o=(i?r(e,s,o):r(o))||o);return i&&o&&Oo(e,s,o),o};let Eo=class extends zt{constructor(){super(...arguments),this.size="",this.direction="column",this.gap="var(--sc-menu-gap)",this.align="left",this.shadow=null,this.moreShape="circle",this.scrollable=!1,this.observer=null,this.minWidth="0",this.hasMoreElements=!1,this.updateIsScollable=()=>{this.scrollable&&(this.initScrollable(),this.setScrollShadow(this,this.direction))}}checkIfMore(){var t;this.hasMoreElements=!!(null==(t=this.moreElements)?void 0:t.length)}updated(t){const e=this.querySelector(".more-btn");this.size&&e&&e.setAttribute("size",this.size);this.querySelectorAll("sonic-divider").forEach((t=>{t.hasAttribute("size")||t.setAttribute("size","xs")})),super.updated(t)}mainSlotChange(){this.setChildrenSize(this.menuChildren),this.updateIsScollable()}connectedCallback(){this.observer=new ResizeObserver(this.updateIsScollable),this.observer.observe(this),super.connectedCallback()}disconnectedCallback(){var t;null==(t=this.observer)||t.disconnect(),super.disconnectedCallback()}initScrollable(){let t,e,s=!1;this.scrollable&&(this.addEventListener("mousedown",(i=>{s=!0,this.classList.add("active"),t=i.pageX-this.offsetLeft,e=this.scrollLeft})),this.addEventListener("mouseleave",(()=>{s=!1,this.classList.remove("active")})),this.addEventListener("mouseup",(()=>{s=!1,this.classList.remove("active")})),this.addEventListener("mousemove",(i=>{if(!s)return;i.preventDefault();const r=1.5*(i.pageX-this.offsetLeft-t);this.scrollLeft=e-r,this.setScrollShadow(this,this.direction)})),this.addEventListener("scroll",(t=>{t.preventDefault(),this.setScrollShadow(this,this.direction)})))}setScrollShadow(t,e){"row"==e?(t.scrollLeft>0?this.classList.add("shadow-left"):this.classList.remove("shadow-left"),t.scrollLeft<t.scrollWidth-t.offsetWidth?this.classList.add("shadow-right"):this.classList.remove("shadow-right")):"column"==e&&(t.scrollTop>0?this.classList.add("shadow-top"):this.classList.remove("shadow-top"),t.scrollTop<t.scrollHeight-(t.offsetHeight+1)?this.classList.add("shadow-bottom"):this.classList.remove("shadow-bottom"))}setChildrenSize(t){t.forEach((t=>{this.size&&t.setAttribute("size",this.size),this.align&&t.setAttribute("align",this.align),"row"==this.direction&&"block"==t.getAttribute("shape")&&t.setAttribute("shape","default")}))}render(){const t={minWidth:this.minWidth,flexDirection:this.direction,gap:this.gap},e="row"==this.direction,s={display:"block",alignSelf:e?"center":"flex-start",justifySelf:"center",flexDirection:this.direction},i={marginLeft:e?"":".55em"};return mt`<menu part="menu" class="shadowable" style="${Zt(t)}"><slot @slotchange="${this.mainSlotChange}"></slot><sonic-pop style="${Zt(s)}" class="${this.hasMoreElements?"":"hidden"}"><sonic-menu-item style="${Zt(i)}" class="more-btn" shape="${this.moreShape}" align="center"><sonic-icon size="xl" name="${e?"more-vert":"more-horiz"}"></sonic-icon></sonic-menu-item><slot name="more" @slotchange="${this.checkIfMore}" slot="content"></slot></sonic-pop></menu>`}};Eo.styles=[T`:host{display:block;--sc-menu-gap:0.15rem}:host>menu{display:flex;border-radius:min(calc(var(--sc-btn-rounded) * 2),.4em);margin:0;padding:.35em}.hidden{display:none!important}:host([shadow=md]) .shadowable,:host([shadow=true]) .shadowable,:host([shadow]) .shadowable{box-shadow:var(--sc-shadow)}:host([shadow=sm]) .shadowable{box-shadow:var(--sc-shadow-sm)}:host([shadow=lg]) .shadowable{box-shadow:var(--sc-shadow-lg)}:host([shadow=none]) .shadowable{box-shadow:none}:host([scrollable]){scrollbar-width:none;-ms-overflow-style:none}:host([scrollable]) menu>*{scroll-snap-align:start;white-space:nowrap}:host([scrollable][direction=row]){overflow-x:scroll;scroll-snap-type:x mandatory}:host([scrollable][direction=column]){overflow-y:scroll;scroll-snap-type:y mandatory}:host([scrollable])::-webkit-scrollbar{display:none!important}:host([scrollable][direction=row].shadow-right){-webkit-mask-image:linear-gradient(to left,rgba(0,0,0,0),#000 10%);mask-image:linear-gradient(to left,rgba(0,0,0,0),#000 10%)}:host([scrollable][direction=row].shadow-left){-webkit-mask-image:linear-gradient(to right,rgba(0,0,0,0),#000 10%);mask-image:linear-gradient(to right,rgba(0,0,0,0),#000 10%)}:host([scrollable][direction=row].shadow-left.shadow-right){-webkit-mask-image:linear-gradient(to right,rgba(0,0,0,0) 0,#000 10%,#000 90%,rgba(0,0,0,0) 100%);mask-image:linear-gradient(to right,rgba(0,0,0,0) 0,#000 10%,#000 90%,rgba(0,0,0,0) 100%)}:host([scrollable][direction=column].shadow-top){-webkit-mask-image:linear-gradient(to bottom,rgba(0,0,0,0),#000 10%);mask-image:linear-gradient(to bottom,rgba(0,0,0,0),#000 10%)}:host([scrollable][direction=column].shadow-bottom){-webkit-mask-image:linear-gradient(to top,rgba(0,0,0,0),#000 10%);mask-image:linear-gradient(to top,rgba(0,0,0,0),#000 10%)}:host([scrollable][direction=column].shadow-top.shadow-bottom){-webkit-mask-image:linear-gradient(to top,rgba(0,0,0,0) 0,#000 10%,#000 90%,rgba(0,0,0,0) 100%);mask-image:linear-gradient(to bottom,rgba(0,0,0,0) 0,#000 10%,#000 90%,rgba(0,0,0,0) 100%)}`],Lo([f({type:String,reflect:!0})],Eo.prototype,"size",2),Lo([f({type:String,reflect:!0})],Eo.prototype,"direction",2),Lo([f({type:String})],Eo.prototype,"gap",2),Lo([f({type:String,reflect:!0})],Eo.prototype,"align",2),Lo([f({type:String,reflect:!0})],Eo.prototype,"shadow",2),Lo([f({type:String})],Eo.prototype,"moreShape",2),Lo([f({type:Boolean})],Eo.prototype,"scrollable",2),Lo([f({type:String})],Eo.prototype,"minWidth",2),Lo([w("menu")],Eo.prototype,"menu",2),Lo([k({selector:"sonic-menu-item"})],Eo.prototype,"menuChildren",2),Lo([k({slot:"more",selector:"*"})],Eo.prototype,"moreElements",2),Lo([v()],Eo.prototype,"hasMoreElements",2),Eo=Lo([m("sonic-menu")],Eo);var jo=Object.defineProperty,Mo=Object.getOwnPropertyDescriptor,No=(t,e,s,i)=>{for(var r,o=i>1?void 0:i?Mo(e,s):e,n=t.length-1;n>=0;n--)(r=t[n])&&(o=(i?r(e,s,o):r(o))||o);return i&&o&&jo(e,s,o),o};let zo=class extends zt{firstUpdated(){var t;null==(t=this.buttons)||t.forEach((t=>{t.addEventListener("click",(()=>{if("false"!=t.getAttribute("hideModal")){const t=this.closest("sonic-modal");null==t||t.hide()}}))}))}render(){return mt`<slot></slot>`}};zo.styles=[T`:host{display:flex;gap:.5rem;margin-top:auto;padding-top:1.5rem}`],No([k({selector:"sonic-button"})],zo.prototype,"buttons",2),zo=No([m("sonic-modal-actions")],zo);var Io=Object.defineProperty,Fo=Object.getOwnPropertyDescriptor,To=(t,e,s,i)=>{for(var r,o=i>1?void 0:i?Fo(e,s):e,n=t.length-1;n>=0;n--)(r=t[n])&&(o=(i?r(e,s,o):r(o))||o);return i&&o&&Io(e,s,o),o};let Ro=class extends zt{render(){return mt`<sonic-button reset="${me(this.reset)}" shape="circle" @click="${this.handleClick}"><sonic-icon name="cancel" size="lg"></sonic-icon></sonic-button>`}handleClick(){this.closest("sonic-modal").hide()}};Ro.styles=[T`:host{position:sticky;display:block;align-self:flex-end;height:0;top:.5rem;right:.5rem;transform:translate3d(calc(var(--sc-modal-px)),calc(-1 * var(--sc-modal-py)),0);z-index:20}`],To([f()],Ro.prototype,"reset",2),Ro=To([m("sonic-modal-close")],Ro);var Vo=Object.defineProperty,Uo=Object.getOwnPropertyDescriptor;let qo=class extends zt{render(){return mt`<slot></slot>`}};qo.styles=[T`:host{display:block;width:100%}`],qo=((t,e,s,i)=>{for(var r,o=i>1?void 0:i?Uo(e,s):e,n=t.length-1;n>=0;n--)(r=t[n])&&(o=(i?r(e,s,o):r(o))||o);return i&&o&&Vo(e,s,o),o})([m("sonic-modal-content")],qo);var Bo=Object.defineProperty,Ho=Object.getOwnPropertyDescriptor;let Wo=class extends zt{render(){return mt`<slot></slot>`}};Wo.styles=[T`:host{font-size:1.1rem;display:block;line-height:1.1rem;line-height:var(--sc-headings-line-height);font-family:var(--sc-headings-font-family);font-weight:var(--sc-headings-font-weight)}`],Wo=((t,e,s,i)=>{for(var r,o=i>1?void 0:i?Ho(e,s):e,n=t.length-1;n>=0;n--)(r=t[n])&&(o=(i?r(e,s,o):r(o))||o);return i&&o&&Bo(e,s,o),o})([m("sonic-modal-subtitle")],Wo);var Ko=Object.defineProperty,Zo=Object.getOwnPropertyDescriptor;let Qo=class extends zt{render(){return mt`<slot></slot>`}};Qo.styles=[T`:host{font-weight:700;font-size:1.5rem;display:block;line-height:var(--sc-headings-line-height);font-family:var(--sc-headings-font-family)}`],Qo=((t,e,s,i)=>{for(var r,o=i>1?void 0:i?Zo(e,s):e,n=t.length-1;n>=0;n--)(r=t[n])&&(o=(i?r(e,s,o):r(o))||o);return i&&o&&Ko(e,s,o),o})([m("sonic-modal-title")],Qo);var Yo=Object.defineProperty,Go=Object.getOwnPropertyDescriptor,Jo=(t,e,s,i)=>{for(var r,o=i>1?void 0:i?Go(e,s):e,n=t.length-1;n>=0;n--)(r=t[n])&&(o=(i?r(e,s,o):r(o))||o);return i&&o&&Yo(e,s,o),o};const Xo="sonic-modal";let tn=class extends(D(zt)){constructor(){super(...arguments),this.forceAction=!1,this.removeOnHide=!1,this.align="left",this.padding="var(--sc-modal-py) var(--sc-modal-px)",this.maxWidth="var(--sc-modal-max-w) ",this.maxHeight="var(--sc-modal-max-h) ",this.width="100%",this.height="auto",this.zIndex="var(--sc-modal-z-index)",this.fullScreen=!1,this.visible=!1}static create(t){const e=document.createElement(Xo);!0===t.removeOnHide&&e.setAttribute("removeOnHide","true"),t.maxWidth&&(e.maxWidth=null==t?void 0:t.maxWidth),t.width&&(e.width=null==t?void 0:t.width),t.maxHeight&&(e.maxHeight=null==t?void 0:t.maxHeight),t.height&&(e.height=null==t?void 0:t.height),t.paddingX&&e.style.setProperty("--sc-modal-px",null==t?void 0:t.paddingX),t.paddingY&&e.style.setProperty("--sc-modal-py",null==t?void 0:t.paddingY),t.zIndex&&e.style.setProperty("--sc-modal-z-index",null==t?void 0:t.zIndex),e.innerHTML=`<sonic-modal-close></sonic-modal-close><sonic-modal-content>${t.content}</sonic-modal-content>`||"";return(document.querySelector("sonic-theme")||document.body).appendChild(e),e.show(),e}connectedCallback(){super.connectedCallback(),this.handleFullsceen()}updated(){const t=this;document.addEventListener("keydown",this.handleEscape),t.closeBtn.forEach((e=>{e.addEventListener("click",(function(){t.hide()}),{once:!0})}))}willUpdate(t){t.has("fullScreen")&&this.handleFullsceen(),super.willUpdate(t)}render(){if(0==this.visible)return ft;const t={padding:this.padding,maxWidth:this.maxWidth,maxHeight:this.maxHeight,width:this.width,height:this.height,zIndex:this.zIndex,borderRadius:this.fullScreen?"0":"var(--sc-modal-rounded)"},e={maxWidth:this.maxWidth,maxHeight:this.maxHeight,width:this.width,height:this.height,borderRadius:this.fullScreen?"0":"var(--sc-modal-rounded)"};return mt`<div class="modal-wrapper" style="${Zt(e)}" ${es({out:Ke})} tabindex="0"><div part="modal" class="modal custom-scroll" style="${Zt(t)}" ${es({keyframeOptions:{duration:400,easing:"cubic-bezier(0.250, 0.250, 0.420, 1.225)"},in:[{transform:"translateY(25%) scale(1)",boxShadow:"0 0 0 rgba(0,0,0,0)",opacity:0}],out:[{transform:"translateY(20%) scale(1)",boxShadow:"0 0 0 rgba(0,0,0,0)",opacity:0}]})}><div class="modal-content"><slot></slot></div></div></div><div class="overlay" @click="${this.forceAction?null:this.hide}" ${es({keyframeOptions:{duration:500},in:Ze,out:[{opacity:0,pointerEvents:"none"}]})}></div>`}show(){var t,e;this.visible=!0,null==(t=this.modalElement)||t.setAttribute("tabindex","0"),null==(e=this.modalElement)||e.focus(),this.dispatchEvent(new CustomEvent("show"))}hide(){var t;this.visible=!1,null==(t=this.modalElement)||t.setAttribute("tabindex","-1"),this.dispatchEvent(new CustomEvent("hide")),this.hasAttribute("resetDataProviderOnHide")&&ce.get(this.getAttribute("resetDataProviderOnHide")).set({}),this.removeOnHide&&this.remove()}dispose(){this.hide(),this.remove()}handleEscape(t){if("Escape"===t.key){[...document.querySelectorAll(Xo)].forEach((t=>{t.forceAction||t.hide()}))}}handleFullsceen(){this.fullScreen&&(this.width="100%",this.height="100%",this.maxWidth="none",this.maxHeight="none")}};tn.styles=[gs,T`:host{--sc-modal-py:2.5rem;--sc-modal-px:1.5rem;--sc-modal-max-w:min(100vw, 64ch);--sc-modal-max-h:85vh;--sc-modal-rounded:var(--sc-rounded-lg);--sc-modal-z-index:990}*{box-sizing:border-box}.modal-wrapper{position:fixed;bottom:0;left:0;width:100%;z-index:calc(var(--sc-modal-z-index) + 1);align-items:center;justify-content:center;flex-direction:column;display:flex;pointer-events:none}.modal-content{display:flex;flex-direction:column;min-height:10rem;line-height:1.25}.modal{background:var(--sc-base);color:var(--sc-base-content);width:100%;box-shadow:var(--sc-shadow-lg);border-radius:var(--sc-modal-rounded) var(--sc-modal-rounded) 0 0;pointer-events:auto;transform:translateZ(0)}.overlay{background:var(--sc-modal-overlay-bg,var(--sc-base-200));left:0;top:0;right:0;bottom:0;z-index:var(--sc-modal-z-index);opacity:.8;position:fixed}::slotted(sonic-modal-title){margin-bottom:1.25rem}::slotted(sonic-modal-subtitle){margin-top:-.9rem;margin-bottom:1.25rem}@media (max-width:767.5px){.modal,.modal-wrapper{max-width:none!important;width:100%!important;border-radius:var(--sc-modal-rounded) var(--sc-modal-rounded) 0 0!important}}@media (min-width:768px){.modal-wrapper{top:50%;left:50%;bottom:auto;right:auto;transform:translateX(-50%) translateY(-50%)}.modal{top:50%;bottom:auto;right:auto;border-radius:var(--sc-modal-rounded)}}:host([align=left]) .modal-content{text-align:left;align-items:flex-start}:host([align=center]) .modal-content{text-align:center;align-items:center}:host([align=right]) .modal-content{text-align:right;align-items:flex-end}:host([rounded=none]) modal{--sc-img-radius:0!important}`],Jo([f({type:Boolean})],tn.prototype,"forceAction",2),Jo([f({type:Boolean})],tn.prototype,"removeOnHide",2),Jo([f({type:String,reflect:!0})],tn.prototype,"align",2),Jo([f({type:String})],tn.prototype,"padding",2),Jo([f({type:String})],tn.prototype,"maxWidth",2),Jo([f({type:String})],tn.prototype,"maxHeight",2),Jo([f({type:String})],tn.prototype,"width",2),Jo([f({type:String})],tn.prototype,"height",2),Jo([f({type:String})],tn.prototype,"zIndex",2),Jo([f({type:Boolean,reflect:!0})],tn.prototype,"fullScreen",2),Jo([f({type:Boolean,reflect:!0})],tn.prototype,"visible",2),Jo([w(".modal-wrapper")],tn.prototype,"modalWrapper",2),Jo([w(".modal")],tn.prototype,"modalElement",2),Jo([k({selector:"sonic-modal-close"})],tn.prototype,"closeBtn",2),tn=Jo([m(Xo)],tn),"undefined"!=typeof window&&(window.SonicModal=tn);var en=Object.defineProperty,sn=Object.getOwnPropertyDescriptor,rn=(t,e,s,i)=>{for(var r,o=i>1?void 0:i?sn(e,s):e,n=t.length-1;n>=0;n--)(r=t[n])&&(o=(i?r(e,s,o):r(o))||o);return i&&o&&en(e,s,o),o};const on={warning:"warning-circled-outline",success:"check-circled-outline",error:"warning-circled-outline",info:"info-empty",default:"info-empty"};let nn=class extends zt{constructor(){super(...arguments),this.label="",this.noIcon=!1,this.text="",this.dismissible=!1,this.background=!1,this.status="default"}render(){return mt`<div part="alert" class="alert">${this.noIcon?ft:mt`<div>${this.status&&mt`<sonic-icon name="${on[this.status]}"></sonic-icon>`}</div>`}<div>${this.label?mt`<span class="label">${rs(this.label)}</span>`:ft}<slot>${this.text}</slot></div>${this.dismissible?mt`<sonic-button @click="${this.close}" class="close-btn" variant="unstyled" shape="circle"><sonic-icon name="cancel" size="lg"></sonic-icon></sonic-button>`:ft}</div>`}close(){this.remove()}};nn.styles=[be,T`:host{--sc-alert-color:var(--sc-base-content);--sc-alert-rounded:var(--sc-rounded);--sc-alert-fw:var(--sc-font-weight-base);--sc-alert-fst:var(--sc-font-style-base);--sc-alert-label-fw:bold;display:block;font-weight:var(--sc-alert-fw);font-style:var(--sc-alert-fst)}.alert{color:var(--sc-alert-color);position:relative;display:flex;gap:.4em;border-radius:var(--sc-alert-rounded)}.label{font-weight:var(--sc-alert-label-fw)}:host([status=warning]){--sc-alert-color:var(--sc-warning)}:host([status=error]){--sc-alert-color:var(--sc-danger)}:host([status=info]){--sc-alert-color:var(--sc-info)}:host([status=success]){--sc-alert-color:var(--sc-success)}:host([background]) .alert,:host([dismissible]) .alert{background:var(--sc-base);padding:.8em 1.15em}:host([background]) .alert:before,:host([dismissible]) .alert:before{background-color:currentColor;content:"";display:block;position:absolute;left:0;top:0;right:0;bottom:0;opacity:.08;border-radius:var(--sc-alert-rounded);pointer-events:none}:host([background])>div,:host([dismissible])>div{z-index:2;position:relative}slot{display:block}:host([size=xs]) .alert{--sc-alert-rounded:var(--sc-rounded-sm)}:host([size=sm]) .alert{--sc-alert-rounded:var(--sc-rounded-sm)}:host([dismissible]) .alert{padding-right:3rem}:host([dismissible]) .close-btn{padding:.5em;position:absolute;top:.25rem;right:.25rem}`],rn([f({type:String})],nn.prototype,"label",2),rn([f({type:Boolean,reflect:!0})],nn.prototype,"noIcon",2),rn([f({type:String})],nn.prototype,"text",2),rn([f({type:String,reflect:!0})],nn.prototype,"size",2),rn([f({type:Boolean,reflect:!0})],nn.prototype,"dismissible",2),rn([f({type:Boolean,reflect:!0})],nn.prototype,"background",2),rn([f({type:String,reflect:!0})],nn.prototype,"status",2),nn=rn([m("sonic-alert")],nn);var an=Object.defineProperty,ln=Object.getOwnPropertyDescriptor,cn=(t,e,s,i)=>{for(var r,o=i>1?void 0:i?ln(e,s):e,n=t.length-1;n>=0;n--)(r=t[n])&&(o=(i?r(e,s,o):r(o))||o);return i&&o&&an(e,s,o),o};let hn=class extends(D(zt)){constructor(){super(...arguments),this._messages=[],this.success=null,this.status=null,this._message="",this._data=""}get messages(){return this._messages}set messages(t){this._messages=t,this.messages&&t.forEach((t=>{"public"==t.type&&ks.add({text:t.content||"",status:t.status})}))}get message(){return this._message}set message(t){var e,s;this._message=t,this.message&&!1===(null==(e=this.props)?void 0:e.success)&&((null==(s=this.props)?void 0:s.public_message)||ks.add({text:this.message,status:"error"}))}get data(){return this._data}set data(t){var e,s,i,r;this._data=t;const o={text:"Votre produit a bien été ajouté",status:"success"};Array.isArray(this.data)&&!0===(null==(e=this.props)?void 0:e.success)&&ks.add(o),""==this.data&&!0===(null==(s=this.props)?void 0:s.status)&&ks.add(o),!1===(null==(i=this.props)?void 0:i.success)&&((null==(r=this.props)?void 0:r.public_message)||ks.add({text:this.data,status:"error"}))}render(){return ft}};cn([f({type:Boolean})],hn.prototype,"success",2),cn([f({type:Boolean})],hn.prototype,"status",2),cn([f({type:Array})],hn.prototype,"messages",1),cn([f({type:String})],hn.prototype,"message",1),cn([f()],hn.prototype,"data",1),hn=cn([m("sonic-toast-message-subscriber")],hn);var dn=Object.defineProperty,pn=Object.getOwnPropertyDescriptor,un=(t,e,s,i)=>{for(var r,o=i>1?void 0:i?pn(e,s):e,n=t.length-1;n>=0;n--)(r=t[n])&&(o=(i?r(e,s,o):r(o))||o);return i&&o&&dn(e,s,o),o};let gn=class extends zt{constructor(){super(...arguments),this.label="",this.disabled=!1}render(){const t=this.disabled||""==this.label?"disabled":"";return mt`<div data-tooltip-text="${this.label.trim().replace("&nbsp;"," ")}" class="tooltip ${t}"><slot></slot></div>`}};gn.styles=[T`:host{position:relative;display:inline-flex;align-items:center;text-align:center;--sc-tooltip-fw:var(--sc-font-weight-base)}.tooltip:before{position:absolute;content:attr(data-tooltip-text);font-size:.85rem;display:block;opacity:0;pointer-events:none;background:var(--sc-base-content,#111827);padding:.32rem .25rem;border-radius:var(--sc-rounded);color:var(--sc-base,#fff);z-index:999;display:none;line-height:1.1;width:max-content;max-width:18rem;white-space:pre-line;font-weight:var(--sc-tooltip-fw)}.tooltip:not(.disabled):hover:before{opacity:1;display:block}:host(:not([placement])) .tooltip:before,:host([placement=top]) .tooltip:before{bottom:calc(100% + .25rem);left:50%;transform:translateX(-50%)}:host([placement=bottom]) .tooltip:before{top:calc(100% + .25rem);left:50%;transform:translateX(-50%)}:host([placement=left]) .tooltip:before{top:50%;right:calc(100% + .25rem);transform:translateY(-50%)}:host([placement=right]) .tooltip:before{top:50%;transform:translateY(-50%);left:calc(100% + .25rem)}`],un([f({type:String})],gn.prototype,"label",2),un([f({type:String,reflect:!0})],gn.prototype,"placement",2),un([f({type:Boolean})],gn.prototype,"disabled",2),gn=un([m("sonic-tooltip")],gn);var mn=Object.defineProperty,bn=Object.getOwnPropertyDescriptor,fn=(t,e,s,i)=>{for(var r,o=i>1?void 0:i?bn(e,s):e,n=t.length-1;n>=0;n--)(r=t[n])&&(o=(i?r(e,s,o):r(o))||o);return i&&o&&mn(e,s,o),o};let vn=class extends zt{constructor(){super(...arguments),this.label="",this.align="center",this.vertical=!1,this.noMargin=!1}firstUpdated(){var t,e;(this.label||(null==(t=this.slotNodes)?void 0:t.length))&&(null==(e=this.divider)||e.classList.add("has-text"))}render(){return mt`<div part="divider"><span class="text">${rs(this.label?this.label:"")}<slot></slot></span></div>`}};vn.styles=[T`:host{--sc-divider-my:0.5rem;--sc-divider-mx:0;--sc-divider-border-width:max(1px, var(--sc-border-width));--sc-divider-border-color:var(--sc-border-color);--sc-divider-border-style:solid;--sc-divider-color:currentColor;--sc-divider-ff:var(--sc-font-family-base);--sc-divider-fs:1rem;--sc-divider-fw:var(--sc-font-weight-base);--sc-divider-fst:var(--sc-font-style-base);margin:var(--sc-divider-my) var(--sc-divider-mx);font-size:var(--sc-divider-fs);font-style:var(--sc-divider-fst);font-family:var(--sc-divider-ff);font-weight:var(--sc-divider-fw);color:var(--sc-divider-color);display:block}:host([size="2xs"]){--sc-divider-my:0.35rem;--sc-divider-fs:0.68rem}:host([size=xs]){--sc-divider-my:0.5rem;--sc-divider-fs:0.75rem}:host([size=sm]){--sc-divider-my:0.75rem;--sc-divider-fs:0.875rem}:host([size=md]){--sc-divider-my:1.25rem}:host([size=lg]){--sc-divider-my:1.85rem}:host([size=xl]){--sc-divider-my:2.25rem}:host([size="2xl"]){--sc-divider-my:3.35rem}div{display:flex;align-items:center;width:100%}div::after,div::before{content:"";flex-grow:1;border-top:var(--sc-divider-border-width) var(--sc-divider-border-style) var(--sc-divider-border-color);width:100%;opacity:var(--sc-divider-opacity,1)}:host([align=left]) div:before{display:none}:host([align=right]) div:after{display:none}:host([vertical]){margin:var(--sc-divider-mx) var(--sc-divider-my)}:host([vertical]) div{flex-direction:column;height:100%;min-height:var(--sc-form-height)}:host([vertical]) .has-text{gap:.25rem}:host([vertical]) div::after,:host([vertical]) div::before{border-top:none;border-left:var(--sc-divider-border-width) var(--sc-divider-border-style) var(--sc-divider-border-color);width:auto;height:100%;opacity:var(--sc-divider-opacity,1)}:host([noMargin]){margin:0}.text{flex-shrink:0;line-height:1.1;max-width:80%}.no-text .text{display:none}.has-text{gap:.5rem}`],fn([A()],vn.prototype,"slotNodes",2),fn([w("div")],vn.prototype,"divider",2),fn([f({type:String})],vn.prototype,"label",2),fn([f({type:String,reflect:!0})],vn.prototype,"size",2),fn([f({type:String,reflect:!0})],vn.prototype,"align",2),fn([f({type:Boolean,reflect:!0})],vn.prototype,"vertical",2),fn([f({type:Boolean,reflect:!0})],vn.prototype,"noMargin",2),vn=fn([m("sonic-divider")],vn);var yn=Object.defineProperty,wn=Object.getOwnPropertyDescriptor;let xn=class extends zt{render(){return mt`<div><slot></slot></div>`}};xn.styles=[T`div{margin-top:.1em;font-family:var(--sc-font-family-base);font-size:.7em;font-weight:var(--sc-font-style-base)}`],xn=((t,e,s,i)=>{for(var r,o=i>1?void 0:i?wn(e,s):e,n=t.length-1;n>=0;n--)(r=t[n])&&(o=(i?r(e,s,o):r(o))||o);return i&&o&&yn(e,s,o),o})([m("sonic-card-header-description")],xn);var _n=Object.defineProperty,kn=Object.getOwnPropertyDescriptor,An=(t,e,s,i)=>{for(var r,o=i>1?void 0:i?kn(e,s):e,n=t.length-1;n>=0;n--)(r=t[n])&&(o=(i?r(e,s,o):r(o))||o);return i&&o&&_n(e,s,o),o};let Pn=class extends zt{render(){return mt`<div class="header"><div class="header-content">${rs(this.label)} ${this.description?mt`<sonic-card-header-description>${rs(this.description)}</sonic-card-header-description>`:""}<slot></slot></div><slot name="suffix"></slot></div>`}};Pn.styles=[T`:host{--sc-card-header-mb:1.35rem;--sc-card-header-font-size:1.875rem;--sc-card-header-font-weight:var(--sc-headings-font-weight);--sc-card-header-font-style:var(--sc-headings-font-style);--sc-card-header-family:var(--sc-headings-font-family);--sc-card-header-line-height:var(--sc-headings-line-height)}@media print{:host{--sc-card-header-font-size:1.45rem}}.header{display:flex;align-items:flex-start;gap:.5em 1em;margin-bottom:var(--sc-card-header-mb);line-height:var(--sc-card-header-line-height);font-family:var(--sc-card-header-font-family);font-size:var(--sc-card-header-font-size);font-style:var(--sc-card-header-font-style);font-weight:var(--sc-card-header-font-weight)}.header-content{flex-grow:1}slot[name=suffix]{flex-shrink:0}`],An([f()],Pn.prototype,"label",2),An([f()],Pn.prototype,"description",2),Pn=An([m("sonic-card-header")],Pn);var Cn=Object.defineProperty,Sn=Object.getOwnPropertyDescriptor;let $n=class extends zt{render(){return mt`<div><slot></slot></div>`}};$n=((t,e,s,i)=>{for(var r,o=i>1?void 0:i?Sn(e,s):e,n=t.length-1;n>=0;n--)(r=t[n])&&(o=(i?r(e,s,o):r(o))||o);return i&&o&&Cn(e,s,o),o})([m("sonic-card-main")],$n);var On=Object.defineProperty,Dn=Object.getOwnPropertyDescriptor;let Ln=class extends zt{render(){return mt`<slot></slot>`}};Ln=((t,e,s,i)=>{for(var r,o=i>1?void 0:i?Dn(e,s):e,n=t.length-1;n>=0;n--)(r=t[n])&&(o=(i?r(e,s,o):r(o))||o);return i&&o&&On(e,s,o),o})([m("sonic-card-footer")],Ln);var En=Object.defineProperty,jn=Object.getOwnPropertyDescriptor,Mn=(t,e,s,i)=>{for(var r,o=i>1?void 0:i?jn(e,s):e,n=t.length-1;n>=0;n--)(r=t[n])&&(o=(i?r(e,s,o):r(o))||o);return i&&o&&En(e,s,o),o};let Nn=class extends zt{constructor(){super(...arguments),this.type="default"}render(){return mt`<div part="card" class="card"><slot></slot></div>`}};Nn.styles=[T`*{box-sizing:border-box}:host{--sc-card-padding:1.5rem;--sc-card-color:var(--sc-base-content);--sc-card-bg:var(--sc-base);--sc-card-rounded:var(--sc-rounded-lg);--sc-card-shadow:var(--sc-shadow-lg);-webkit-print-color-adjust:exact}@media print{.card{page-break-inside:avoid;break-inside:avoid;box-shadow:none!important;border:1px solid var(--sc-base-200)}}.card{padding:var(--sc-card-padding);background-color:var(--sc-card-bg);border-radius:var(--sc-card-rounded);box-shadow:var(--sc-card-shadow);color:var(--sc-card-color)}:host([type=primary]){--sc-card-bg:var(--sc-primary);--sc-card-color:var(--sc-primary-content);--sc-border-color:var(--sc-primary-content);--sc-divider-opacity:0.2}:host([type=warning]){--sc-card-bg:var(--sc-warning);--sc-card-color:var(--sc-warning-content);--sc-border-color:var(--sc-primary-content);--sc-divider-opacity:0.2}:host([type=danger]){--sc-card-bg:var(--sc-danger);--sc-card-color:var(--sc-danger-content);--sc-border-color:var(--sc-primary-content);--sc-divider-opacity:0.2}:host([type=info]){--sc-card-bg:var(--sc-info);--sc-card-color:var(--sc-info-content);--sc-border-color:var(--sc-primary-content);--sc-divider-opacity:0.2}:host([type=success]){--sc-card-bg:var(--sc-success);--sc-card-color:var(--sc-success-content);--sc-border-color:var(--sc-primary-content);--sc-divider-opacity:0.2}:host([type=light]){--sc-card-bg:var(--sc-base-100);--sc-card-color:var(--sc-base-content)}:host([type=neutral]){--sc-card-bg:var(--sc-base-content);--sc-card-color:var(--sc-base)}:host([type=invert]){--sc-card-color:var(--sc-base);--sc-card-bg:var(--sc-base-900)}`],Mn([f({type:String,reflect:!0})],Nn.prototype,"type",2),Nn=Mn([m("sonic-card")],Nn);const zn=T`:host{--sc-color:inherit;color:var(--sc-color)}:host([type=primary]){--sc-color:var(--sc-primary)}:host([type=warning]){--sc-color:var(--sc-warning)}:host([type=danger]){--sc-color:var(--sc-danger)}:host([type=info]){--sc-color:var(--sc-info)}:host([type=success]){--sc-color:var(--sc-success)}.inherit-color{color:var(--sc-color)}`;T`:host{--sc-color:inherit;--sc-bg:inherit;color:var(--sc-color);background:var(--sc-bg)}:host([type=primary]){--sc-color:var(--sc-primary-content);--sc-bg:var(--sc-primary)}:host([type=warning]){--sc-color:var(--sc-warning-content);--sc-bg:var(--sc-warning)}:host([type=danger]){--sc-color:var(--sc-danger-content);--sc-bg:var(--sc-danger)}:host([type=info]){--sc-color:var(--sc-info-content);--sc-bg:var(--sc-info)}:host([type=success]){--sc-color:var(--sc-success-content);--sc-bg:var(--sc-success)}.inherit-bg{color:inherit}`;var In=Object.defineProperty,Fn=Object.getOwnPropertyDescriptor;let Tn=class extends zt{render(){return mt`<slot></slot>`}};Tn.styles=[zn,T`:host{display:table-row}:host([odd]){background:var(--sc-table-accent-bg)}`],Tn=((t,e,s,i)=>{for(var r,o=i>1?void 0:i?Fn(e,s):e,n=t.length-1;n>=0;n--)(r=t[n])&&(o=(i?r(e,s,o):r(o))||o);return i&&o&&In(e,s,o),o})([m("sonic-tr")],Tn);var Rn=Object.defineProperty,Vn=Object.getOwnPropertyDescriptor,Un=(t,e,s,i)=>{for(var r,o=i>1?void 0:i?Vn(e,s):e,n=t.length-1;n>=0;n--)(r=t[n])&&(o=(i?r(e,s,o):r(o))||o);return i&&o&&Rn(e,s,o),o};let qn=class extends zt{render(){const t={textAlign:this.align,minWidth:this.minWidth,maxWidth:this.maxWidth,width:this.width};return mt`<th part="th" style="${Zt(t)}" colspan="${me(this.colSpan)}" rowspan="${me(this.rowSpan)}"><slot></slot></th>`}};qn.styles=[zn,T`:host{display:contents;background:var(--sc-table-bg);position:sticky;top:0;z-index:20}th{all:inherit;display:table-cell;border-bottom:calc(var(--sc-border-width) * 1.5) solid var(--sc-table-border-color);text-transform:var(--sc-table-th-tt);font-weight:var(--sc-table-th-fw);font-size:var(--sc-table-th-fs);padding:var(--sc-table-th-py) var(--sc-table-th-px)}`],Un([f({type:Number})],qn.prototype,"colSpan",2),Un([f({type:Number})],qn.prototype,"rowSpan",2),Un([f({type:String})],qn.prototype,"align",2),Un([f({type:String})],qn.prototype,"minWidth",2),Un([f({type:String})],qn.prototype,"maxWidth",2),Un([f({type:String})],qn.prototype,"width",2),qn=Un([m("sonic-th")],qn);var Bn=Object.defineProperty,Hn=Object.getOwnPropertyDescriptor,Wn=(t,e,s,i)=>{for(var r,o=i>1?void 0:i?Hn(e,s):e,n=t.length-1;n>=0;n--)(r=t[n])&&(o=(i?r(e,s,o):r(o))||o);return i&&o&&Bn(e,s,o),o};let Kn=class extends zt{render(){const t={textAlign:this.align,verticalAlign:this.vAlign,minWidth:this.minWidth,maxWidth:this.maxWidth,width:this.width};return mt`<td part="td" style="${Zt(t)}" colspan="${me(this.colSpan)}" rowspan="${me(this.rowSpan)}"><slot></slot></td>`}};Kn.styles=[zn,T`:host{display:contents}td{all:inherit;display:table-cell;padding:var(--sc-table-td-py) var(--sc-table-td-px)}`],Wn([f({type:Number})],Kn.prototype,"colSpan",2),Wn([f({type:Number})],Kn.prototype,"rowSpan",2),Wn([f({type:String})],Kn.prototype,"align",2),Wn([f({type:String})],Kn.prototype,"vAlign",2),Wn([f({type:String})],Kn.prototype,"minWidth",2),Wn([f({type:String})],Kn.prototype,"maxWidth",2),Wn([f({type:String})],Kn.prototype,"width",2),Kn=Wn([m("sonic-td")],Kn);var Zn=Object.defineProperty,Qn=Object.getOwnPropertyDescriptor;let Yn=class extends zt{render(){return mt`<slot></slot>`}};Yn.styles=[T`:host{display:table-header-group}`],Yn=((t,e,s,i)=>{for(var r,o=i>1?void 0:i?Qn(e,s):e,n=t.length-1;n>=0;n--)(r=t[n])&&(o=(i?r(e,s,o):r(o))||o);return i&&o&&Zn(e,s,o),o})([m("sonic-thead")],Yn);var Gn=Object.defineProperty,Jn=Object.getOwnPropertyDescriptor;let Xn=class extends zt{render(){return mt`<tbody part="tbody"><slot></slot></tbody>`}};Xn.styles=[T`:host{display:table-row-group}::slotted(sonic-tr:nth-child(odd)){background:var(--sc-table-accent-bg)}::slotted(sonic-tr:hover){background:var(--sc-table-hover-bg)}::slotted(sonic-tr:not(:last-child)){border-bottom:var(--sc-form-border-width) solid var(--sc-base-200)!important}`],Xn=((t,e,s,i)=>{for(var r,o=i>1?void 0:i?Jn(e,s):e,n=t.length-1;n>=0;n--)(r=t[n])&&(o=(i?r(e,s,o):r(o))||o);return i&&o&&Gn(e,s,o),o})([m("sonic-tbody")],Xn);var ta=Object.defineProperty,ea=Object.getOwnPropertyDescriptor;let sa=class extends zt{render(){return mt`<tfoot><slot></slot></tfoot>`}};sa.styles=[T`:host{display:contents}`],sa=((t,e,s,i)=>{for(var r,o=i>1?void 0:i?ea(e,s):e,n=t.length-1;n>=0;n--)(r=t[n])&&(o=(i?r(e,s,o):r(o))||o);return i&&o&&ta(e,s,o),o})([m("sonic-tfoot")],sa);var ia=Object.defineProperty,ra=Object.getOwnPropertyDescriptor;let oa=class extends zt{render(){return mt`<slot></slot>`}};oa.styles=[T`:host{display:table-caption;font-size:.75rem;color:var(--sc-table-caption-color);padding:var(--sc-table-td-py) var(--sc-table-td-px) calc(2 * var(--sc-table-td-py))}`],oa=((t,e,s,i)=>{for(var r,o=i>1?void 0:i?ra(e,s):e,n=t.length-1;n>=0;n--)(r=t[n])&&(o=(i?r(e,s,o):r(o))||o);return i&&o&&ia(e,s,o),o})([m("sonic-caption")],oa);var na=Object.defineProperty,aa=Object.getOwnPropertyDescriptor,la=(t,e,s,i)=>{for(var r,o=i>1?void 0:i?aa(e,s):e,n=t.length-1;n>=0;n--)(r=t[n])&&(o=(i?r(e,s,o):r(o))||o);return i&&o&&na(e,s,o),o};let ca=class extends zt{constructor(){super(...arguments),this.bordered=!1}render(){const t={maxHeight:this.maxHeight};return mt`<div class="table-container custom-scroll" style="${Zt(t)}"><div class="table"><slot></slot></div></div>`}};ca.styles=[gs,be,T`:host{--sc-table-fw:var(--sc-font-weight-base);--sc-table-fst:var(--sc-font-style-base);--sc-table-fs:1rem;--sc-table-border-color:var(--sc-border-color);--sc-table-caption-color:var(--sc-base-500);--sc-table-bg:var(--sc-base);--sc-table-accent-bg:var(--sc-base-50);--sc-table-hover-bg:var(--sc-base-100);--sc-table-th-fs:0.85em;--sc-table-th-fw:bold;--sc-table-th-tt:uppercase;--sc-table-th-px:var(--sc-table-td-px);--sc-table-th-py:calc(1.8 * var(--sc-table-td-py));--sc-table-td-px:0.5em;--sc-table-td-py:0.5em;display:block}:host([maxHeight]) .table-container{overflow-x:auto;-webkit-overflow-scrolling:touch}.table{width:100%;display:table;box-sizing:border-box}:host([bordered]) .table-container{border:var(--sc-border-width) solid var(--sc-table-border-color)!important}`],la([f({type:String,reflect:!0})],ca.prototype,"size",2),la([f({type:Boolean,reflect:!0})],ca.prototype,"bordered",2),la([f({type:String})],ca.prototype,"maxHeight",2),ca=la([m("sonic-table")],ca);var ha=Object.defineProperty,da=Object.getOwnPropertyDescriptor,pa=(t,e,s,i)=>{for(var r,o=i>1?void 0:i?da(e,s):e,n=t.length-1;n>=0;n--)(r=t[n])&&(o=(i?r(e,s,o):r(o))||o);return i&&o&&ha(e,s,o),o};let ua=class extends(Ei(zt)){constructor(){super(...arguments),this.key="",this.action=null}connectedCallback(){var t;const e=document.createElement("script");e.src="https://www.google.com/recaptcha/api.js?render="+this.key,document.head.appendChild(e),super.connectedCallback(),this.formPublisher=ce.get(null!=(t=this.getAncestorAttributeValue("headersDataProvider"))?t:this.getAncestorAttributeValue("formDataProvider")),this.formPublisher&&(this.formPublisher.needsCaptchaValidation=!0,this.formPublisher.captchaToken.onAssign((t=>{"request_token"==t&&this.requestToken()})))}requestToken(){var t,e,s,i,r;if(!this.formPublisher)return;const o=(null!=(s=null!=(e=this.action)?e:null==(t=this.formPublisher.captchaAction)?void 0:t.get())?s:"submit").replace(/[^\w_/]/g,"_"),n=(null!=(r=null==(i=this.formPublisher.captchaMethod)?void 0:i.get())?r:"POST").toUpperCase();delete this.formPublisher.captchaAction,delete this.formPublisher.captchaMethod,window.grecaptcha.ready((()=>{window.grecaptcha.execute(this.key,{action:n+"//"+o}).then((t=>{this.formPublisher&&(this.formPublisher.captchaToken=t)}))}))}render(){return mt`<slot></slot>`}};pa([f()],ua.prototype,"key",2),pa([f()],ua.prototype,"action",2),ua=pa([m("sonic-captcha")],ua),window.SonicPublisherManager||(window.SonicPublisherManager=h),window.SonicDataBindObserver||(window.SonicDataBindObserver=g);const ga=ks,ma=tn;window["concorde-components"]=window["concorde-components"]||{},window["concorde-components"]={SonicToast:ga,SonicModal:ma}}));
1748
+ */,Ar=Qt(class extends Gt{constructor(t){var e;if(super(t),t.type!==Zt||"class"!==t.name||(null==(e=t.strings)?void 0:e.length)>2)throw Error("`classMap()` can only be used in the `class` attribute and must be the only part in the attribute.")}render(t){return" "+Object.keys(t).filter((e=>t[e])).join(" ")+" "}update(t,[e]){var s,i;if(void 0===this.it){this.it=new Set,void 0!==t.strings&&(this.st=new Set(t.strings.join(" ").split(/\s/).filter((t=>""!==t))));for(const t in e)e[t]&&!(null==(s=this.st)?void 0:s.has(t))&&this.it.add(t);return this.render(e)}const r=t.element.classList;for(const o of this.it)o in e||(r.remove(o),this.it.delete(o));for(const o in e){const t=!!e[o];t===this.it.has(o)||(null==(i=this.st)?void 0:i.has(o))||(t?(r.add(o),this.it.add(o)):(r.remove(o),this.it.delete(o)))}return _t}});var Pr=Object.defineProperty,Cr=Object.getOwnPropertyDescriptor,Sr=(t,e,s,i)=>{for(var r,o=i>1?void 0:i?Cr(e,s):e,n=t.length-1;n>=0;n--)(r=t[n])&&(o=(i?r(e,s,o):r(o))||o);return i&&o&&Pr(e,s,o),o};let $r=class extends(Ni(oe(G(Rt)))){constructor(){super(...arguments),this.readonly=!1,this.inlineContent=!1,this.disableInlineContentFocus=!1,this.showPasswordToggle=!1,this.hasDescription=!1,this.hasLabel=!1,this.hasSuffix=!1,this.hasPrefix=!1,this.isPassword=!1}connectedCallback(){if(super.connectedCallback(),this.hasSlotOrProps(),this.hasAttribute("sameValueAs")){this.sameValueAsName=this.getAttribute("sameValueAs"),this.sameValueAsHandle=t=>this.pattern=t;const t=this.getFormPublisher();if(!t)return;t[this.sameValueAsName].onAssign(this.sameValueAsHandle)}"password"==this.type&&(this.isPassword=!0,this.showPasswordToggle=!0,this.inlineContent=!0)}disconnectedCallback(){if(super.disconnectedCallback(),this.hasAttribute("sameValueAs")&&this.sameValueAsName){const t=this.getFormPublisher();if(!t)return;t[this.sameValueAsName].offAssign(this.sameValueAsHandle)}}willUpdate(t){this.hasSlotOrProps(),super.willUpdate(t)}setSelectionRange(t,e){this.input.setSelectionRange(t,e)}hasSlotOrProps(){var t,e,s,i;this.hasLabel=!(!this.label&&!(null==(t=this.slotLabelNodes)?void 0:t.length)),this.hasDescription=!(!this.description&&!(null==(e=this.slotDescriptionNodes)?void 0:e.length)),this.hasSuffix=!!(null==(s=this.slotSuffixNodes)?void 0:s.length),this.hasPrefix=!!(null==(i=this.slotPrefixNodes)?void 0:i.length)}inlineContentFocus(){var t;this.inlineContent&&!this.disableInlineContentFocus&&(null==(t=this.input)||t.focus())}handleChange(t){this.hasAttribute("inputDelayMs")?(this.changeTimeoutId&&clearTimeout(this.changeTimeoutId),this.changeTimeoutId=setTimeout((()=>super.handleChange(t)),parseInt(this.getAttribute("inputDelayMs")))):super.handleChange(t)}togglePasswordVisibility(){this.isPassword=!this.isPassword,this._type=this.isPassword?"password":"text",console.log(this.isPassword)}render(){const t={"has-prefix":this.hasPrefix,"has-suffix":this.hasSuffix,"no-suffix":!this.hasSuffix,"no-prefix":!this.hasPrefix};return xt`
1749
+ <label for="form-element" class="${this.hasLabel?"form-label":"hidden"}"
1750
+ >${this.label?cs(this.label):""}<slot
1751
+ name="label"
1752
+ @slotchange=${this.hasSlotOrProps}
1753
+ ></slot
1754
+ ></label>
1755
+
1756
+ <div @click=${this.inlineContentFocus} class="form-control ${Ar(t)}">
1757
+ <div class="${this.inlineContent?"form-element form-element-wrapper":"contents"}">
1758
+ <slot name="prefix" @slotchange=${this.hasSlotOrProps}></slot>
1759
+ <input
1760
+ id="form-element"
1761
+ part="input"
1762
+ class="form-element input"
1763
+ @input=${this.handleChange}
1764
+ @blur=${this.handleBlur}
1765
+ type=${this.type}
1766
+ disabled=${we(this.disabled)}
1767
+ ?readonly=${this.readonly}
1768
+ ?autofocus=${this.autofocus}
1769
+ list=${we(this.list)}
1770
+ tabindex=${we(this.tabindex)}
1771
+ pattern=${we(this.pattern)}
1772
+ min=${we(this.min)}
1773
+ max=${we(this.max)}
1774
+ step=${we(this.step)}
1775
+ src=${we(this.src)}
1776
+ minlength=${we(this.minlength)}
1777
+ maxlength=${we(this.maxlength)}
1778
+ placeholder=${we(this.placeholder)}
1779
+ required=${we(this.required)}
1780
+ autocomplete=${we(this.autocomplete)}
1781
+ aria-label=${we(this.ariaLabel)}
1782
+ aria-labelledby=${we(this.ariaLabelledby)}
1783
+ .name=${this.name}
1784
+ .value=${this.value}
1785
+ />
1786
+ ${this.showPasswordToggle?xt`<sonic-button
1787
+ shape="circle"
1788
+ class="password-toggle"
1789
+ @click=${this.togglePasswordVisibility}
1790
+ aria-label="Toggle password visibility"
1791
+ variant="unstyled"
1792
+ >
1793
+ <sonic-icon library="heroicons" name=${this.isPassword?"eye":"eye-slash"}></sonic-icon>
1794
+ </sonic-button>`:""}
1795
+ <slot name="suffix" @slotchange=${this.hasSlotOrProps}></slot>
1796
+ </div>
1797
+ </div>
1798
+ <slot
1799
+ name="description"
1800
+ @slotchange=${this.hasSlotOrProps}
1801
+ class="${this.hasDescription?"form-description":"hidden"}"
1802
+ >
1803
+ ${this.description?xt`${cs(this.description)}`:""}
1804
+ </slot>
1805
+ <slot name="list"></slot>
1806
+ </div>
1807
+ `}};$r.styles=[xe,kr,xr,_r,wr,_`
1808
+ :host([type="hidden"]) {
1809
+ appearance: none !important;
1810
+ display: none !important;
1811
+ }
1812
+ :host > .form-control {
1813
+ position: relative;
1814
+ }
1815
+ `],Sr([U({type:String,reflect:!0})],$r.prototype,"size",2),Sr([U({type:String})],$r.prototype,"list",2),Sr([U({type:String})],$r.prototype,"placeholder",2),Sr([U({type:String})],$r.prototype,"pattern",2),Sr([U({type:String})],$r.prototype,"min",2),Sr([U({type:String})],$r.prototype,"max",2),Sr([U({type:Boolean})],$r.prototype,"readonly",2),Sr([U({type:Number})],$r.prototype,"step",2),Sr([U({type:Number})],$r.prototype,"minlength",2),Sr([U({type:Number})],$r.prototype,"maxlength",2),Sr([U({type:String})],$r.prototype,"src",2),Sr([U({type:Boolean,reflect:!0})],$r.prototype,"inlineContent",2),Sr([U({type:Boolean})],$r.prototype,"disableInlineContentFocus",2),Sr([U({type:Boolean})],$r.prototype,"showPasswordToggle",2),Sr([H({slot:"label",flatten:!0})],$r.prototype,"slotLabelNodes",2),Sr([H({slot:"description",flatten:!0})],$r.prototype,"slotDescriptionNodes",2),Sr([H({slot:"suffix",flatten:!0})],$r.prototype,"slotSuffixNodes",2),Sr([H({slot:"prefix",flatten:!0})],$r.prototype,"slotPrefixNodes",2),Sr([q("input")],$r.prototype,"input",2),Sr([V()],$r.prototype,"hasDescription",2),Sr([V()],$r.prototype,"hasLabel",2),Sr([V()],$r.prototype,"hasSuffix",2),Sr([V()],$r.prototype,"hasPrefix",2),Sr([V()],$r.prototype,"isPassword",2),$r=Sr([m("sonic-input")],$r);var Or=Object.defineProperty,Dr=Object.getOwnPropertyDescriptor,Lr=(t,e,s,i)=>{for(var r,o=i>1?void 0:i?Dr(e,s):e,n=t.length-1;n>=0;n--)(r=t[n])&&(o=(i?r(e,s,o):r(o))||o);return i&&o&&Or(e,s,o),o};let Er=class extends Rt{constructor(){super(...arguments),this.open=!1,this.noToggle=!1,this.inline=!1,this.shadow="lg",this.placement="bottom",this.positioningRuns=!1,this.lastContentX=0,this.lastContentY=0,this.resizeObserver=new ResizeObserver((()=>this.computePosition(this.placement)))}runPositioningLoop(){this.positioningRuns&&(this.positioningRuns=!0,this.computePosition(this.placement),window.requestAnimationFrame((()=>this.runPositioningLoop())))}_toggle(t){if(this.open&&this.noToggle)return;const e=t;("keydown"!=t.type||"ArrowDown"==e.key&&!this.open)&&(this.open=!this.open,this.open?this._show():this._hide())}_show(){this.popContent.style.removeProperty("display"),this.open=!0,this.popContent.setAttribute("tabindex","0"),this.popBtn&&this.popContent&&!this.positioningRuns&&(this.positioningRuns=!0,this.lastContentX=0,this.lastContentY=0,this.runPositioningLoop()),this.dispatchEvent(new CustomEvent("show"))}_hide(){this.open=!1,this.popContent.setAttribute("tabindex","-1"),this.positioningRuns=!1,this.dispatchEvent(new CustomEvent("hide"))}_handleClosePop(t){const e=t.composedPath(),i=e[0];Er.pops.forEach((r=>{const o=e.includes(r),n=e.includes(r.querySelector('[slot="content"]')),a="keep"===s.getAncestorAttributeValue(i,"data-on-select");"pointerdown"==t.type&&o||"click"==t.type&&(o&&a||!n)||r._hide()}))}connectedCallback(){super.connectedCallback(),0==Er.pops.size&&(document.addEventListener("pointerdown",this._handleClosePop),document.addEventListener("click",this._handleClosePop)),Er.pops.add(this)}firstUpdated(t){super.firstUpdated(t),this.resizeObserver.observe(this.popContent)}disconnectedCallback(){super.disconnectedCallback(),Er.pops.delete(this),0==Er.pops.size&&(document.removeEventListener("pointerdown",this._handleClosePop),document.removeEventListener("click",this._handleClosePop)),this.resizeObserver.unobserve(this.popContent)}computePosition(t){var e,s,i;let r=null==(e=this.popContent)?void 0:e.getBoundingClientRect();const o=this.getBoundingClientRect(),n=o.left,a=o.top;let l=n,c=a;const h=a-r.height-8,d=n-r.width-8,p=n+o.width+8,u=a+o.height+8;switch(t){case"bottom":c=u;break;case"top":c=h;break;case"left":l=d;break;case"right":l=p}this.lastContentX+=l-r.x,this.lastContentY+=c-r.y,Object.assign(this.popContent.style,{left:`${this.lastContentX}px`,top:`${this.lastContentY}px`}),r=null==(s=this.popContent)?void 0:s.getBoundingClientRect(),r.x<5&&"left"==t&&(l=p),r.y<5&&"top"==t&&(c=u),r.x+r.width>window.innerWidth-5&&"right"==t&&(l=d),r.y+r.height>window.innerHeight-5&&"bottom"==t&&(c=h),this.lastContentX+=l-r.x,this.lastContentY+=c-r.y,Object.assign(this.popContent.style,{left:`${this.lastContentX}px`,top:`${this.lastContentY}px`}),r=null==(i=this.popContent)?void 0:i.getBoundingClientRect(),r.x<0&&(this.lastContentX+=-r.x),r.y<0&&(this.lastContentY+=-r.y),r.x+r.width>window.innerWidth&&(this.lastContentX+=window.innerWidth-(r.x+r.width)),r.y+r.height>window.innerHeight&&(this.lastContentY+=window.innerHeight-(r.y+r.height)),Object.assign(this.popContent.style,{left:`${this.lastContentX}px`,top:`${this.lastContentY}px`})}render(){return xt`
1816
+ <slot
1817
+ @click=${this._toggle}
1818
+ @keydown=${this._toggle}
1819
+ class="contents"
1820
+ ></slot>
1821
+ <slot
1822
+ name="content"
1823
+ tabindex="-1"
1824
+ part="content"
1825
+ style="display: none;"
1826
+ class="
1827
+ ${this.open?"is-open":""}"
1828
+ ></slot>
1829
+ `}};Er.pops=new Set,Er.styles=[_`
1830
+ :host {
1831
+ display: inline-block;
1832
+ vertical-align: middle;
1833
+ }
1834
+ slot[name="content"] {
1835
+ max-width: 80vw;
1836
+ background-color: var(--sc-base);
1837
+ position: absolute;
1838
+ z-index: 50;
1839
+ display: block;
1840
+ transform: translateY(1rem) scale(0.95);
1841
+ opacity: 0;
1842
+ pointer-events: none;
1843
+ transition-duration: 0.15s;
1844
+ transition-timing-function: ease;
1845
+ transition-property: all;
1846
+ border-radius: min(calc(var(--sc-btn-rounded) * 2), 0.4em);
1847
+ }
1848
+
1849
+ slot[name="content"].is-open:not(.is-empty) {
1850
+ transform: translateY(0) scale(1);
1851
+ opacity: 1;
1852
+ pointer-events: auto;
1853
+ transition-property: scale, opacity;
1854
+ transition-timing-function: cubic-bezier(0.25, 0.25, 0.42, 1.225);
1855
+ }
1856
+
1857
+ /*OMBRE*/
1858
+ :host([shadow]) slot[name="content"],
1859
+ :host([shadow="md"]) slot[name="content"],
1860
+ :host([shadow="true"]) slot[name="content"] {
1861
+ box-shadow: var(--sc-shadow);
1862
+ }
1863
+
1864
+ :host([shadow="sm"]) slot[name="content"] {
1865
+ box-shadow: var(--sc-shadow-sm);
1866
+ }
1867
+
1868
+ :host([shadow="none"]) slot[name="content"] {
1869
+ box-shadow: none;
1870
+ }
1871
+
1872
+ :host([shadow="lg"]) slot[name="content"] {
1873
+ box-shadow: var(--sc-shadow-lg);
1874
+ }
1875
+
1876
+ :host([inline]) {
1877
+ vertical-align: baseline;
1878
+ }
1879
+ `],Lr([V()],Er.prototype,"open",2),Lr([q("slot:not([name=content])")],Er.prototype,"popBtn",2),Lr([q("slot[name=content]")],Er.prototype,"popContent",2),Lr([U({type:Boolean})],Er.prototype,"noToggle",2),Lr([U({type:Boolean,reflect:!0})],Er.prototype,"inline",2),Lr([U({type:String,reflect:!0})],Er.prototype,"shadow",2),Lr([U({type:String})],Er.prototype,"placement",2),Er=Lr([m("sonic-pop")],Er);var jr=Object.defineProperty,Mr=Object.getOwnPropertyDescriptor;let Nr=class extends Pe{constructor(){super()}connectedCallback(){this.hasAttribute("variant")||(this.variant="ghost"),this.hasAttribute("type")||(this.type="primary"),this.hasAttribute("shape")||(this.shape="block"),this.hasAttribute("align")||(this.align="left"),super.connectedCallback()}};Nr=((t,e,s,i)=>{for(var r,o=i>1?void 0:i?Mr(e,s):e,n=t.length-1;n>=0;n--)(r=t[n])&&(o=(i?r(e,s,o):r(o))||o);return i&&o&&jr(e,s,o),o})([m("sonic-menu-item")],Nr);class zr{constructor(t,{target:e,config:s,callback:i,skipInitial:r}){this.t=new Set,this.o=!1,this.i=!1,this.h=t,null!==e&&this.t.add(e??t),this.l=s,this.o=r??this.o,this.callback=i,window.ResizeObserver?(this.u=new ResizeObserver((t=>{this.handleChanges(t),this.h.requestUpdate()})),t.addController(this)):console.warn("ResizeController error: browser does not support ResizeObserver.")}handleChanges(t){var e;this.value=null==(e=this.callback)?void 0:e.call(this,t,this.u)}hostConnected(){for(const t of this.t)this.observe(t)}hostDisconnected(){this.disconnect()}async hostUpdated(){!this.o&&this.i&&this.handleChanges([]),this.i=!1}observe(t){this.t.add(t),this.u.observe(t,this.l),this.i=!0,this.h.requestUpdate()}unobserve(t){this.t.delete(t),this.u.unobserve(t)}disconnect(){this.u.disconnect()}}var Ir=Object.defineProperty,Tr=Object.getOwnPropertyDescriptor,Fr=(t,e,s,i)=>{for(var r,o=i>1?void 0:i?Tr(e,s):e,n=t.length-1;n>=0;n--)(r=t[n])&&(o=(i?r(e,s,o):r(o))||o);return i&&o&&Ir(e,s,o),o};let Rr=class extends(Ui(Fi(Ti(Ri(Rt))))){constructor(){super(...arguments),this.size="md",this.placeholder="",this.filteredFields="",this.readonly=null,this.dataProviderExpression="",this.key="",this.searchParameter="",this.hasInputPrefix=!1,this._resizeController=new zr(this,{}),this.searchDataProvider="",this.initSearchDataProvider="",this.queueDataProvider="",this.initQueueDataProvider="",this.lastValidSearch="",this.updateSearchParameter=t=>{""!=t?this.queryQueueListItem(this.queueDataProvider,this.findSelection,this.setSearchFromSelection):this.lastValidSearch=""},this.initSearchParameter=()=>{this.queryQueueListItem(this.initQueueDataProvider,this.findSelection,this.setSearchFromSelection)},this.selectListItem=t=>{var e;null==(e=this.formValuePublisher)||e.set(t[this.name])},this.findSearchedItem=t=>{var e;return t[this.searchParameter||this.name]==(null==(e=this.searchPublisher)?void 0:e.get())},this.findSelection=t=>t[this.name]==this.value,this.setSearchFromSelection=t=>{var e;this.lastValidSearch=t[this.searchParameter||this.name],null==(e=this.searchPublisher)||e.set(this.lastValidSearch)},this.updateActiveSelection=()=>{var t,e,s;this.queryQueueListItem(this.queueDataProvider,this.findSearchedItem,this.selectListItem),!this.select&&this.lastValidSearch&&this.lastValidSearch!=(null==(t=this.searchPublisher)?void 0:t.get())&&(null==(e=this.formValuePublisher)?void 0:e.get())&&(null==(s=this.formValuePublisher)||s.set(""))}}hasSlotOrProps(){var t;this.hasInputPrefix=!!(null==(t=this.slotInputPrefixNodes)?void 0:t.length)}connectedCallback(){var t,e,s;super.connectedCallback();const i=this.searchParameter||this.name,r=this.getAncestorAttributeValue("formDataProvider"),o=r+"__autocomplete";this.initSearchDataProvider=`${o}_init_search__`,this.initQueueDataProvider=`${o}_init_queue__`,this.searchDataProvider=`${o}_search__`,this.queueDataProvider=`${o}_queue__`;const n=ge.get;this.searchPublisher=n(this.searchDataProvider)[i],this.formValuePublisher=n(r)[this.name],this.countPublisher=n(this.queueDataProvider).resultCount,this.initCountPublisher=n(this.initQueueDataProvider).resultCount,this.value&&(ge.get(this.initSearchDataProvider)[this.name]=this.value),null==(t=this.initCountPublisher)||t.onAssign(this.initSearchParameter),null==(e=this.formValuePublisher)||e.onAssign(this.updateSearchParameter),null==(s=this.countPublisher)||s.onAssign(this.updateActiveSelection)}disconnectedCallback(){var t,e,s;super.disconnectedCallback(),null==(t=this.initCountPublisher)||t.offAssign(this.initSearchParameter),null==(e=this.formValuePublisher)||e.offAssign(this.updateSearchParameter),null==(s=this.countPublisher)||s.offAssign(this.updateActiveSelection);const i=ge.get;i(this.initSearchDataProvider).delete(),i(this.initQueueDataProvider).delete(),i(this.searchDataProvider).delete(),i(this.queueDataProvider).delete()}queryQueueListItem(t,e,s){let i;const r=ge.get(t).get();if(Array.isArray(r)){for(const t of r){const s=ge.get(t.dataProvider).get();if(Array.isArray(s)&&(i=s.find(e),i))break}i&&s(i)}}setSelectionRange(t,e){var s;null==(s=this.querySelector("sonic-input"))||s.setSelectionRange(t,e)}handleHide(){var t,e,s;if(this.select)return""==(null==(t=this.searchPublisher)?void 0:t.get())?(this.lastValidSearch="",void(null==(e=this.formValuePublisher)||e.set(""))):void(null==(s=this.searchPublisher)||s.set(this.lastValidSearch))}render(){return xt`
1880
+ <sonic-pop noToggle style="display:block;" @hide=${this.handleHide}>
1881
+ <sonic-input
1882
+ dataProvider="${this.initSearchDataProvider+Math.random()}"
1883
+ formDataProvider="${this.searchDataProvider}"
1884
+ type="search"
1885
+ data-keyboard-nav="${this.getAttribute("data-keyboard-nav")||""}"
1886
+ label="${we(this.label)}"
1887
+ description="${we(this.description)}"
1888
+ name="${we(this.searchParameter||this.name)}"
1889
+ placeholder="${we(this.placeholder)}"
1890
+ ?readonly="${this.readonly}"
1891
+ autocomplete="off"
1892
+ clearable
1893
+ inlineContent
1894
+ size=${this.size}
1895
+ >
1896
+ <slot name="prefix" slot="prefix" @slotchange=${this.hasSlotOrProps}></slot>
1897
+
1898
+ ${this.select?xt` <sonic-icon slot="suffix" class="select-chevron" name="nav-arrow-down" .size=${this.size}></sonic-icon> `:kt}
1899
+ </sonic-input>
1900
+ <sonic-menu slot="content" class="custom-scroll" style="${this.offsetWidth?`width: ${this.offsetWidth}px`:""}">
1901
+ <sonic-queue
1902
+ dataProvider="${this.queueDataProvider}"
1903
+ filteredFields=${this.filteredFields}
1904
+ dataProviderExpression="${this.dataProviderExpression}"
1905
+ dataFilterProvider="${this.searchDataProvider}"
1906
+ key="${this.key}"
1907
+ .templates=${this.templateList}
1908
+ displayContents
1909
+ >
1910
+ </sonic-queue>
1911
+ <sonic-queue
1912
+ noLazyload
1913
+ dataProvider="${this.initQueueDataProvider}"
1914
+ filteredFields=${this.filteredFields}
1915
+ dataProviderExpression="${this.dataProviderExpression}"
1916
+ dataFilterProvider="${this.initSearchDataProvider}"
1917
+ key="${this.key}"
1918
+ displayContents
1919
+ >
1920
+ </sonic-queue>
1921
+ </sonic-menu>
1922
+ </sonic-pop>
1923
+ `}};Rr.styles=[xs,_`
1924
+ :host {
1925
+ display: block;
1926
+ }
1927
+
1928
+ sonic-menu {
1929
+ display: block;
1930
+ max-height: clamp(20rem, 55vh, 35rem);
1931
+ min-width: 14rem;
1932
+ width: 100%;
1933
+ }
1934
+ `],Fr([U({type:String})],Rr.prototype,"size",2),Fr([U({type:String})],Rr.prototype,"placeholder",2),Fr([U()],Rr.prototype,"filteredFields",2),Fr([U({type:Boolean})],Rr.prototype,"readonly",2),Fr([U({type:String})],Rr.prototype,"dataProviderExpression",2),Fr([U({type:Boolean})],Rr.prototype,"select",2),Fr([U({type:String})],Rr.prototype,"key",2),Fr([U({type:String})],Rr.prototype,"searchParameter",2),Fr([H({slot:"prefix",flatten:!0})],Rr.prototype,"slotInputPrefixNodes",2),Fr([V()],Rr.prototype,"hasInputPrefix",2),Rr=Fr([m("sonic-input-autocomplete")],Rr);var Ur=Object.defineProperty,Vr=Object.getOwnPropertyDescriptor,Br=(t,e,s,i)=>{for(var r,o=i>1?void 0:i?Vr(e,s):e,n=t.length-1;n>=0;n--)(r=t[n])&&(o=(i?r(e,s,o):r(o))||o);return i&&o&&Ur(e,s,o),o};let qr=class extends(Ri(Rt)){constructor(){super(...arguments),this.minChars=8,this.hasNoChar=!0,this.hasEnoughChars=!1,this.hasMinuscule=!1,this.hasMajuscule=!1,this.hasNumber=!1,this.hasSpecialChar=!1,this.wording_password_helper_decription="Le mot de passe doit contenir au moins :",this.wording_password_helper_min_length="8 caractères",this.wording_password_helper_lower_case="1 minuscule",this.wording_password_helper_upper_case="1 majuscule",this.wording_password_helper_number="1 chiffre",this.wording_password_helper_special_char="1 caractère spécial"}connectedCallback(){super.connectedCallback(),this.name&&(this.checkValue=t=>{t?(this.hasNoChar=0==t.length,this.hasEnoughChars=t.length>this.minChars):(this.hasNoChar=!0,this.hasEnoughChars=!1),this.hasMinuscule=/[a-z]/.test(t),this.hasMajuscule=/[A-Z]/.test(t),this.hasNumber=/[0-9]/.test(t),this.hasSpecialChar=/[!"#$%&'()*+,\-./:;<=>?@[\]^_`{|}~]/.test(t)},ge.get(this.getAncestorAttributeValue("formDataProvider"))[this.name].onAssign(this.checkValue))}disconnectedCallback(){this.checkValue&&this.name&&ge.get(this.getAncestorAttributeValue("formDataProvider"))[this.name].offAssign(this.checkValue),super.disconnectedCallback()}getIcon(t){return t?xt`<sonic-icon library="heroicons" name="face-smile"></sonic-icon>`:xt`<sonic-icon library="heroicons" name="x-mark"></sonic-icon>`}render(){return this.hasNoChar?kt:xt`
1935
+ <div>${this.wording_password_helper_decription}</div>
1936
+ <div>${this.getIcon(this.hasEnoughChars)} ${this.wording_password_helper_min_length}</div>
1937
+ <div>${this.getIcon(this.hasMinuscule)} ${this.wording_password_helper_lower_case}</div>
1938
+ <div>${this.getIcon(this.hasMajuscule)} ${this.wording_password_helper_upper_case}</div>
1939
+ <div>${this.getIcon(this.hasNumber)} ${this.wording_password_helper_number}</div>
1940
+ <div>${this.getIcon(this.hasSpecialChar)} ${this.wording_password_helper_special_char}</div>
1941
+ `}};Br([U()],qr.prototype,"name",2),Br([U()],qr.prototype,"minChars",2),Br([V()],qr.prototype,"hasNoChar",2),Br([V()],qr.prototype,"hasEnoughChars",2),Br([V()],qr.prototype,"hasMinuscule",2),Br([V()],qr.prototype,"hasMajuscule",2),Br([V()],qr.prototype,"hasNumber",2),Br([V()],qr.prototype,"hasSpecialChar",2),Br([U()],qr.prototype,"wording_password_helper_decription",2),Br([U()],qr.prototype,"wording_password_helper_min_length",2),Br([U()],qr.prototype,"wording_password_helper_lower_case",2),Br([U()],qr.prototype,"wording_password_helper_upper_case",2),Br([U()],qr.prototype,"wording_password_helper_number",2),Br([U()],qr.prototype,"wording_password_helper_special_char",2),qr=Br([m("sonic-password-helper")],qr);var Hr=Object.defineProperty,Wr=Object.getOwnPropertyDescriptor,Kr=(t,e,s,i)=>{for(var r,o=i>1?void 0:i?Wr(e,s):e,n=t.length-1;n>=0;n--)(r=t[n])&&(o=(i?r(e,s,o):r(o))||o);return i&&o&&Hr(e,s,o),o};let Zr=class extends(Ri(Rt)){constructor(){super(...arguments),this.descriptionWhenEqual="Correspondance : oui",this.descriptionWhenNotEqual="Correspondance : non",this.areEqual=!1,this.hasNoChar=!0}connectedCallback(){super.connectedCallback();const t=ge.get(this.getAncestorAttributeValue("formDataProvider"));this.name&&this.sameValueAs&&(this.checkValue=e=>{this.hasNoChar=!e||0==e.length,this.name&&this.sameValueAs&&(this.areEqual=t[this.name].get()==t[this.sameValueAs].get())},t[this.name].onAssign(this.checkValue),t[this.sameValueAs].onAssign(this.checkValue))}disconnectedCallback(){if(this.checkValue&&this.name&&this.sameValueAs){const t=ge.get(this.getAncestorAttributeValue("formDataProvider"));t[this.name].offAssign(this.checkValue),t[this.sameValueAs].offAssign(this.checkValue)}super.disconnectedCallback()}render(){return this.hasNoChar?kt:xt`
1942
+ <span> ${this.areEqual?cs(this.descriptionWhenEqual):cs(this.descriptionWhenNotEqual)} </span>
1943
+ `}};Kr([U()],Zr.prototype,"name",2),Kr([U()],Zr.prototype,"sameValueAs",2),Kr([U()],Zr.prototype,"descriptionWhenEqual",2),Kr([U()],Zr.prototype,"descriptionWhenNotEqual",2),Kr([V()],Zr.prototype,"areEqual",2),Kr([V()],Zr.prototype,"hasNoChar",2),Zr=Kr([m("sonic-same-value-helper")],Zr);var Yr=Object.defineProperty,Qr=Object.getOwnPropertyDescriptor,Gr=(t,e,s,i)=>{for(var r,o=i>1?void 0:i?Qr(e,s):e,n=t.length-1;n>=0;n--)(r=t[n])&&(o=(i?r(e,s,o):r(o))||o);return i&&o&&Yr(e,s,o),o};let Jr=class extends(ye(Ni(oe(G(Rt))))){constructor(){super(...arguments),this.touched=!1,this.iconName="check",this.indeterminateIconName="minus-small",this.showAsIndeterminate=!1,this.hasDescription=!1,this.hasLabel=!1}connectedCallback(){this.type="checkbox",this.hasSlotOrProps(),super.connectedCallback()}willUpdate(t){this.hasSlotOrProps(),super.willUpdate(t)}hasSlotOrProps(){var t,e;this.hasLabel=!(!this.label&&!(null==(t=this.slotLabelNodes)?void 0:t.length)),this.hasDescription=!(!this.description&&!(null==(e=this.slotDescriptionNodes)?void 0:e.length))}render(){return xt`
1944
+ <label class="checkbox-container ${this.disabled?"disabled":""}">
1945
+
1946
+ <span class="icon-container">
1947
+ <input
1948
+ type="${this.type}"
1949
+ @click=${this.handleChange}
1950
+ @blur=${this.handleBlur}
1951
+ ?required=${this.required}
1952
+ ?data-indeterminate=${this.showAsIndeterminate}
1953
+ .disabled=${we(this.disabled)}
1954
+ .checked=${we(this.checked)}
1955
+ .name=${this.name}
1956
+ .value=${this.value}
1957
+ ?autofocus=${this.autofocus}
1958
+ aria-label=${we(this.ariaLabel)}
1959
+ aria-labelledby=${we(this.ariaLabelledby)}
1960
+ />
1961
+ <sonic-icon name="${"indeterminate"==this.checked||this.showAsIndeterminate?this.indeterminateIconName:this.iconName}" class="sc-input-icon"></sonic-icon>
1962
+ </span>
1963
+
1964
+ <div class="checkbox-text ${this.hasDescription||this.hasLabel?"checkbox-text":"hidden"}">
1965
+ ${this.label?cs(this.label):""}
1966
+ <slot @slotchange=${this.hasSlotOrProps}></slot>
1967
+ <slot @slotchange=${this.hasSlotOrProps} name="description" class="${this.hasDescription?"description":"hidden"} ">
1968
+ ${this.description?xt`${cs(this.description)}`:""}
1969
+ </slot>
1970
+ </div>
1971
+ </label>
1972
+ </label>
1973
+ `}};Jr.styles=[xe,_`
1974
+ :host {
1975
+ --sc-checkbox-border-width: var(--sc-form-border-width);
1976
+ --sc-checkbox-border-color: var(--sc-input-border-color);
1977
+ --sc-checkbox-bg: var(--sc-input-bg);
1978
+ --sc-checkbox-color: transparent;
1979
+ }
1980
+
1981
+ * {
1982
+ box-sizing: border-box;
1983
+ }
1984
+
1985
+ .checkbox-container {
1986
+ min-height: 1.4em;
1987
+ display: flex;
1988
+ gap: 0.5em;
1989
+ line-height: 1.2;
1990
+ align-items: flex-start;
1991
+ font-size: var(--sc-fs);
1992
+ }
1993
+
1994
+ .icon-container {
1995
+ position: relative;
1996
+ display: flex;
1997
+ flex-shrink: 0;
1998
+ }
1999
+
2000
+ input {
2001
+ box-sizing: border-box;
2002
+ appearance: none;
2003
+ flex-shrink: 0;
2004
+ height: calc(var(--sc-fs) * 1.25);
2005
+ width: calc(var(--sc-fs) * 1.25);
2006
+ display: block;
2007
+ cursor: pointer;
2008
+ border-radius: 0.25em;
2009
+ transition: 0.2s;
2010
+ outline: none;
2011
+ margin: 0;
2012
+ background-color: var(--sc-checkbox-bg);
2013
+ border: var(--sc-checkbox-border-width) solid var(--sc-checkbox-border-color);
2014
+ }
2015
+
2016
+ input:focus,
2017
+ :host(:not([disabled])) input:active {
2018
+ box-shadow: 0 0 0 2px var(--sc-primary);
2019
+ }
2020
+
2021
+ :host(:not([disabled])) label {
2022
+ cursor: pointer;
2023
+ }
2024
+
2025
+ sonic-icon {
2026
+ line-height: 0;
2027
+ position: absolute;
2028
+ top: 50%;
2029
+ left: 50%;
2030
+ transform: translateX(-50%) translateY(-50%) scale(0);
2031
+ transition: transform 0.2s ease-in-out;
2032
+ color: var(--sc-checkbox-color);
2033
+ }
2034
+
2035
+ /* .checkbox-text {
2036
+ align-self: center;
2037
+ } */
2038
+
2039
+ .description {
2040
+ color: var(--sc-base-400);
2041
+ font-size: 0.85em;
2042
+ margin-top: 0.2em;
2043
+ display: block;
2044
+ }
2045
+
2046
+ /*Active */
2047
+ input:checked,
2048
+ input[data-indeterminate],
2049
+ input[checked] {
2050
+ --sc-checkbox-border-color: var(--sc-primary);
2051
+ --sc-checkbox-bg: var(--sc-primary);
2052
+ }
2053
+ input:checked + sonic-icon,
2054
+ input[data-indeterminate] + sonic-icon,
2055
+ input[checked] + sonic-icon {
2056
+ --sc-checkbox-color: var(--sc-primary-content);
2057
+ transform: translateX(-50%) translateY(-50%) scale(1);
2058
+ }
2059
+ /*DISABLED */
2060
+ .disabled {
2061
+ cursor: not-allowed;
2062
+ }
2063
+ .disabled input {
2064
+ opacity: 0.4;
2065
+ }
2066
+
2067
+ .disabled .checkbox-text {
2068
+ opacity: 0.6;
2069
+ }
2070
+
2071
+ /*INPUT HOVER*/
2072
+ :host(:not([disabled])) label:hover input {
2073
+ filter: brightness(0.97);
2074
+ }
2075
+
2076
+ ::slotted(a) {
2077
+ color: inherit;
2078
+ text-decoration: underline !important;
2079
+ }
2080
+
2081
+ ::slotted(a:hover) {
2082
+ text-decoration: none !important;
2083
+ }
2084
+ /*Utils */
2085
+ .hidden {
2086
+ display: none;
2087
+ }
2088
+
2089
+ /*ERROR*/
2090
+ /*
2091
+ :host([touched]) .checkbox-container:has(input:not(:focus):invalid) {
2092
+ --sc-checkbox-border-color:var(--sc-danger);
2093
+ }
2094
+ :host([touched]) .checkbox-container:has(input:not(:focus):invalid) .checkbox-text{
2095
+ color:var(--sc-danger);
2096
+ }
2097
+ */
2098
+ `],Gr([U({type:Boolean,reflect:!0})],Jr.prototype,"touched",2),Gr([U({type:String})],Jr.prototype,"iconName",2),Gr([U({type:String})],Jr.prototype,"indeterminateIconName",2),Gr([U({type:Boolean})],Jr.prototype,"showAsIndeterminate",2),Gr([U({type:Boolean})],Jr.prototype,"hasDescription",2),Gr([U({type:Boolean})],Jr.prototype,"hasLabel",2),Gr([H({flatten:!0})],Jr.prototype,"slotLabelNodes",2),Gr([H({slot:"description",flatten:!0})],Jr.prototype,"slotDescriptionNodes",2),Jr=Gr([m("sonic-checkbox")],Jr);var Xr=Object.defineProperty,to=Object.getOwnPropertyDescriptor;let eo=class extends Jr{constructor(){super(),this.radio=!0}connectedCallback(){super.connectedCallback(),this.type="radio"}};eo.styles=[Jr.styles,_`
2099
+ :host input {
2100
+ border-radius: 50%;
2101
+ }
2102
+ :host sonic-icon {
2103
+ border-radius: 50%;
2104
+ overflow: hidden;
2105
+ background-color: var(--sc-primary-content);
2106
+ line-height: 0;
2107
+ display: block;
2108
+ font-size: 1em;
2109
+ height: 0.6em;
2110
+ width: 0.6em;
2111
+ }
2112
+ `],eo=((t,e,s,i)=>{for(var r,o=i>1?void 0:i?to(e,s):e,n=t.length-1;n>=0;n--)(r=t[n])&&(o=(i?r(e,s,o):r(o))||o);return i&&o&&Xr(e,s,o),o})([m("sonic-radio")],eo);var so=Object.defineProperty,io=Object.getOwnPropertyDescriptor,ro=(t,e,s,i)=>{for(var r,o=i>1?void 0:i?io(e,s):e,n=t.length-1;n>=0;n--)(r=t[n])&&(o=(i?r(e,s,o):r(o))||o);return i&&o&&so(e,s,o),o};let oo=class extends(oe(G(Rt))){constructor(){super(...arguments),this.valueKey="value",this.wordingKey="wording",this.multiple=!1,this._options=[],this.hasDoneFirstUpdate=!1,this._value="",this.forceAutoFill=!1,this.hasDescription=!1,this.hasLabel=!1,this.hasSuffix=!1,this.hasPrefix=!1}set options(t){this._options=t;for(const e of t)e.selected&&(this.value=e.value||"");!(this.value||this.getAttribute("value"))&&this._options.length>0&&(this.value=this._options[0][this.valueKey]),this.requestUpdate()}get options(){return this._options}firstUpdated(t){this.hasDoneFirstUpdate=!0,super.firstUpdated(t)}set value(t){(null!=t||this.hasDoneFirstUpdate)&&(t||(t=""),this._value!=t&&(this._value=t,this.updateFormPublisherValue(),this.requestUpdate()))}get value(){return this._value}updateFormPublisherValue(){const t=this.getFormPublisher();t&&(t[this.name]=this.value)}connectedCallback(){super.connectedCallback(),this.hasSlotOrProps();const t=this.querySelectorAll("option");t.length>0&&(this.options=Array.from(t).map((t=>({value:t.value,wording:t.text,selected:t.hasAttribute("selected")}))))}get description(){return this._description}set description(t){this.hasAttribute("description")&&!this.forceAutoFill&&(t=this.getAttribute("description")),this._description=t,this.requestUpdate()}get label(){return this._label}set label(t){this.hasAttribute("label")&&!this.forceAutoFill&&(t=this.getAttribute("label")),this._label=t,this.requestUpdate()}willUpdate(t){this.hasSlotOrProps(),super.willUpdate(t)}hasSlotOrProps(){var t,e,s,i;this.hasLabel=!(!this.label&&!(null==(t=this.slotLabelNodes)?void 0:t.length)),this.hasDescription=!(!this.description&&!(null==(e=this.slotDescriptionNodes)?void 0:e.length)),this.hasSuffix=!!(null==(s=this.slotSuffixNodes)?void 0:s.length),this.hasPrefix=!!(null==(i=this.slotPrefixNodes)?void 0:i.length)}validateFormElement(){var t;const e=null==(t=this.shadowRoot)?void 0:t.querySelector("select");if(!e||e.checkValidity())return;const s=this.getFormPublisher();s&&(s.isFormValid=!1),e.reportValidity()}render(){const t={"has-prefix":this.hasPrefix,"has-suffix":this.hasSuffix};return xt`
2113
+ <label for="form-element" class="${this.hasLabel?"form-label":"hidden"}"
2114
+ >${this.label?cs(this.label):""}<slot name="label" @slotchange=${this.hasSlotOrProps}></slot
2115
+ ></label>
2116
+
2117
+ <div class="form-control ${Ar(t)}">
2118
+ <slot name="prefix" @slotchange=${this.hasSlotOrProps}></slot>
2119
+ <div class="form-select-wrapper">
2120
+ <select
2121
+ id="form-element"
2122
+ @change=${this.handleChange}
2123
+ @blur=${this.handleBlur}
2124
+ ?disabled=${this.disabled}
2125
+ ?required=${this.required}
2126
+ ?multiple=${this.multiple}
2127
+ size=${we(this.selectSize)}
2128
+ ?autofocus=${this.autofocus}
2129
+ .value="${this.value}"
2130
+ class="form-element"
2131
+ aria-label=${we(this.ariaLabel)}
2132
+ aria-labelledby=${we(this.ariaLabelledby)}
2133
+ >
2134
+ ${Fe(this.options,(t=>t[this.valueKey]),(t=>{const e=this.value==t[this.valueKey];return xt`<option ?selected=${e} value="${t[this.valueKey]}">${t[this.wordingKey]}</option>`}))}
2135
+ <slot></slot>
2136
+ </select>
2137
+ <sonic-icon class="select-chevron" name="nav-arrow-down" .size=${this.size}></sonic-icon>
2138
+ </div>
2139
+ <slot name="suffix" @slotchange=${this.hasSlotOrProps}></slot>
2140
+ </div>
2141
+
2142
+ <slot name="description" @slotchange=${this.hasSlotOrProps} class="${this.hasDescription?"form-description":"hidden"}">
2143
+ ${this.description?xt`${cs(this.description)}`:""}
2144
+ </slot>
2145
+ `}};oo.styles=[xe,kr,xr,_r,_`
2146
+ .form-element {
2147
+ appearance: none;
2148
+ }
2149
+
2150
+ :host([disabled]) sonic-icon {
2151
+ opacity: 0;
2152
+ }
2153
+
2154
+ @supports selector(:has(*)) {
2155
+ :host(:not([disabled])) .form-element:not(:has(option:only-child)) {
2156
+ padding-right: max(1.275em, calc(1.5 * var(--sc-input-px)));
2157
+ }
2158
+ }
2159
+ /*Firefox etc.*/
2160
+ @supports not selector(:has(*)) {
2161
+ :host(:not([disabled])) .form-element {
2162
+ padding-right: max(1.275em, calc(1.5 * var(--sc-input-px)));
2163
+ }
2164
+ }
2165
+
2166
+ .form-select-wrapper {
2167
+ position: relative;
2168
+ width: 100%;
2169
+ }
2170
+
2171
+ sonic-icon {
2172
+ position: absolute;
2173
+ right: calc(0.8 * var(--sc-input-px));
2174
+ top: 50%;
2175
+ pointer-events: none;
2176
+ transform: translateY(-50%);
2177
+ color: var(--sc-input-c);
2178
+ }
2179
+
2180
+ option {
2181
+ padding: 0.1rem var(--sc-input-px);
2182
+ color: var(--sc-base-content);
2183
+ background: var(--sc-base);
2184
+ }
2185
+
2186
+ select[multiple] option {
2187
+ background: transparent;
2188
+ padding: 0;
2189
+ }
2190
+ `],ro([U({type:String})],oo.prototype,"valueKey",2),ro([U({type:String})],oo.prototype,"wordingKey",2),ro([U({type:Boolean})],oo.prototype,"multiple",2),ro([U({type:String,reflect:!0})],oo.prototype,"size",2),ro([U({type:Number})],oo.prototype,"selectSize",2),ro([U({type:Array})],oo.prototype,"options",1),ro([U({reflect:!0})],oo.prototype,"value",1),ro([U({type:Boolean})],oo.prototype,"forceAutoFill",2),ro([U()],oo.prototype,"description",1),ro([U()],oo.prototype,"label",1),ro([H({slot:"label",flatten:!0})],oo.prototype,"slotLabelNodes",2),ro([H({slot:"description",flatten:!0})],oo.prototype,"slotDescriptionNodes",2),ro([H({slot:"suffix",flatten:!0})],oo.prototype,"slotSuffixNodes",2),ro([H({slot:"prefix",flatten:!0})],oo.prototype,"slotPrefixNodes",2),ro([V()],oo.prototype,"hasDescription",2),ro([V()],oo.prototype,"hasLabel",2),ro([V()],oo.prototype,"hasSuffix",2),ro([V()],oo.prototype,"hasPrefix",2),oo=ro([m("sonic-select")],oo);var no=Object.defineProperty,ao=Object.getOwnPropertyDescriptor,lo=(t,e,s,i)=>{for(var r,o=i>1?void 0:i?ao(e,s):e,n=t.length-1;n>=0;n--)(r=t[n])&&(o=(i?r(e,s,o):r(o))||o);return i&&o&&no(e,s,o),o};let co=class extends(Ni(oe(G(Rt)))){constructor(){super(...arguments),this.size="",this.readonly=!1,this.hasDescription=!1,this.hasLabel=!1}connectedCallback(){super.connectedCallback(),this.hasSlotOrProps()}willUpdate(t){this.hasSlotOrProps(),super.willUpdate(t)}hasSlotOrProps(){var t,e;this.hasLabel=!(!this.label&&!(null==(t=this.slotLabelNodes)?void 0:t.length)),this.hasDescription=!(!this.description&&!(null==(e=this.slotDescriptionNodes)?void 0:e.length))}validateFormElement(){var t;const e=null==(t=this.shadowRoot)?void 0:t.querySelector("textarea");if(!e||e.checkValidity())return;const s=this.getFormPublisher();s&&(s.isFormValid=!1),e.reportValidity()}render(){return xt`
2191
+ <label for="form-element" class="${this.hasLabel?"form-label":"hidden"}"
2192
+ >${this.label?cs(this.label):""}<slot name="label" @slotchange=${this.hasSlotOrProps}></slot
2193
+ ></label>
2194
+
2195
+ <div class="form-control">
2196
+ <textarea
2197
+ id="form-element"
2198
+ @input=${this.handleChange}
2199
+ @blur=${this.handleBlur}
2200
+ disabled=${we(this.disabled)}
2201
+ ?required=${this.required}
2202
+ ?autofocus=${this.autofocus}
2203
+ rows=${we(this.rows)}
2204
+ cols=${we(this.cols)}
2205
+ maxlength=${we(this.maxlength)}
2206
+ minlength=${we(this.minlength)}
2207
+ ?readonly=${this.readonly}
2208
+ spellcheck=${we(this.spellcheck)}
2209
+ autocomplete=${we(this.autocomplete)}
2210
+ tabindex=${we(this.tabindex)}
2211
+ wrap=${we(this.wrap)}
2212
+ placeholder="${this.placeholder}"
2213
+ class="form-element textarea custom-scroll"
2214
+ aria-label=${we(this.ariaLabel)}
2215
+ aria-labelledby=${we(this.ariaLabelledby)}
2216
+ >
2217
+ ${this.value}</textarea
2218
+ >
2219
+ </div>
2220
+
2221
+ <slot name="description" @slotchange=${this.hasSlotOrProps} class="${this.hasDescription?"form-description":"hidden"}">
2222
+ ${this.description?xt`${cs(this.description)}`:""}
2223
+ </slot>
2224
+ `}};co.styles=[xe,kr,xr,_r,xs,_`
2225
+ textarea {
2226
+ font-size: inherit;
2227
+ }
2228
+ `],lo([U({type:String})],co.prototype,"size",2),lo([U({type:Number})],co.prototype,"rows",2),lo([U({type:Number})],co.prototype,"cols",2),lo([U({type:Number})],co.prototype,"maxlength",2),lo([U({type:Number})],co.prototype,"minlength",2),lo([U({type:String})],co.prototype,"wrap",2),lo([U({type:Boolean})],co.prototype,"readonly",2),lo([U({type:String})],co.prototype,"placeholder",2),lo([H({slot:"label",flatten:!0})],co.prototype,"slotLabelNodes",2),lo([H({slot:"description",flatten:!0})],co.prototype,"slotDescriptionNodes",2),lo([V()],co.prototype,"hasDescription",2),lo([V()],co.prototype,"hasLabel",2),co=lo([m("sonic-textarea")],co);var ho=Object.defineProperty,po=Object.getOwnPropertyDescriptor;let uo=class extends Rt{render(){return xt`<slot></slot>`}};uo.styles=[_`
2229
+ :host {
2230
+ color: var(--sc-neutral-500);
2231
+ font-size: 1.25rem;
2232
+ line-height: 1.2;
2233
+ display: block;
2234
+ font-weight: var(--sc-font-weight-base);
2235
+ font-style: var(--sc-font-style-base);
2236
+ margin-top: 0.25em;
2237
+ }
2238
+ `],uo=((t,e,s,i)=>{for(var r,o=i>1?void 0:i?po(e,s):e,n=t.length-1;n>=0;n--)(r=t[n])&&(o=(i?r(e,s,o):r(o))||o);return i&&o&&ho(e,s,o),o})([m("sonic-legend-description")],uo);var go=Object.defineProperty,bo=Object.getOwnPropertyDescriptor,mo=(t,e,s,i)=>{for(var r,o=i>1?void 0:i?bo(e,s):e,n=t.length-1;n>=0;n--)(r=t[n])&&(o=(i?r(e,s,o):r(o))||o);return i&&o&&go(e,s,o),o};let fo=class extends Rt{constructor(){super(...arguments),this.forceAutoFill=!1}get description(){return this._description}set description(t){this.hasAttribute("description")&&!this.forceAutoFill&&(t=this.getAttribute("description")),this._description=t,this.requestUpdate()}get label(){return this._label}set label(t){this.hasAttribute("label")&&!this.forceAutoFill&&(t=this.getAttribute("label")),this._label=t,this.requestUpdate()}render(){return xt`<legend part="legend">
2239
+ ${this.iconName?xt`<div class="icon">
2240
+ <sonic-icon
2241
+ name=${this.iconName}
2242
+ prefix=${we(this.iconPrefix)}
2243
+ library=${we(this.iconLibrary)}
2244
+ ></sonic-icon>
2245
+ </div>`:""}
2246
+
2247
+ <div class="legend-content">
2248
+ ${cs(this.label?this.label:"")}
2249
+ ${this.description?xt`<sonic-legend-description>${cs(this.description)}</sonic-legend-description>`:""}
2250
+ <slot></slot>
2251
+ </div>
2252
+ <slot name="suffix"></slot>
2253
+ </legend>`}};fo.styles=[_`
2254
+ :host {
2255
+ --sc-legend-font-size: 1.5rem;
2256
+ --sc-legend-font-weight: var(--sc-font-weight-base);
2257
+ --sc-legend-font-style: var(--sc-headings-font-style);
2258
+ --sc-legend-family: var(--sc-headings-font-family);
2259
+ --sc-legend-line-height: var(--sc-headings-line-height);
2260
+ --sc-legend-color: var(--sc-base-content);
2261
+ display: flex;
2262
+ width: 100%;
2263
+ }
2264
+
2265
+ legend {
2266
+ font-size: var(--sc-legend-font-size);
2267
+ font-weight: var(--sc-legend-font-weight);
2268
+ font-style: var(--sc-legend-font-style);
2269
+ font-family: var(--sc-legend-font-family);
2270
+ line-height: var(--sc-legend-line-height);
2271
+ color: var(--sc-legend-color);
2272
+ padding: 0;
2273
+ display: flex;
2274
+ width: 100%;
2275
+ align-items: flex-start;
2276
+ gap: 0.5em;
2277
+ }
2278
+
2279
+ slot[name="suffix"] {
2280
+ display: block;
2281
+ margin-left: auto;
2282
+ flex-shrink: 0;
2283
+ }
2284
+
2285
+ .legend-content {
2286
+ flex-grow: 1;
2287
+ }
2288
+ `],mo([U({type:Boolean})],fo.prototype,"forceAutoFill",2),mo([U()],fo.prototype,"description",1),mo([U()],fo.prototype,"label",1),mo([U({type:String})],fo.prototype,"iconName",2),mo([U({type:String})],fo.prototype,"iconLibrary",2),mo([U({type:String})],fo.prototype,"iconPrefix",2),fo=mo([m("sonic-legend")],fo);var vo=Object.defineProperty,yo=Object.getOwnPropertyDescriptor,wo=(t,e,s,i)=>{for(var r,o=i>1?void 0:i?yo(e,s):e,n=t.length-1;n>=0;n--)(r=t[n])&&(o=(i?r(e,s,o):r(o))||o);return i&&o&&vo(e,s,o),o};let xo=class extends(G(Rt)){constructor(){super(...arguments),this.disabled=!1,this.variant="default"}render(){return xt`<fieldset form="${we(this.form)}" ?disabled="${this.disabled}">
2289
+ ${this.label?xt` <sonic-legend
2290
+ label=${we(this.label)}
2291
+ description=${we(this.description)}
2292
+ iconName=${we(this.iconName)}
2293
+ iconPrefix=${we(this.iconPrefix)}
2294
+ iconLibrary=${we(this.iconLibrary)}
2295
+ ></sonic-legend>`:kt}
2296
+ <slot></slot>
2297
+ </fieldset>`}};xo.styles=[_`
2298
+ :host {
2299
+ --sc-fieldset-mt: 0;
2300
+ --sc-fieldset-mb: 1rem;
2301
+ --sc-fieldset-border-color: var(--sc-border-color);
2302
+ --sc-fieldset-border-width: var(--sc-form-border-width);
2303
+
2304
+ margin-top: var(--sc-fieldset-mt);
2305
+ margin-bottom: var(--sc-fieldset-mb);
2306
+ display: block;
2307
+ border: var(--sc-fieldset-border-width) solid var(--sc-fieldset-border-color) !important;
2308
+ padding: 1.8rem 1.25rem;
2309
+ border-radius: var(--sc-rounded-lg);
2310
+ }
2311
+
2312
+ fieldset {
2313
+ all: unset;
2314
+ display: contents;
2315
+ }
2316
+ :host([variant="shadow"]),
2317
+ :host([variant="ghost"]) {
2318
+ --sc-fieldset-border-color: transparent;
2319
+ }
2320
+ :host([variant="shadow"]) {
2321
+ --sc-fieldset-border-color: transparent;
2322
+ box-shadow: var(--sc-shadow-lg);
2323
+ }
2324
+
2325
+ sonic-legend,
2326
+ ::slotted(sonic-legend) {
2327
+ margin-bottom: 1.5rem;
2328
+ display: block;
2329
+ }
2330
+
2331
+ ::slotted(sonic-legend:last-child) {
2332
+ margin-bottom: 0;
2333
+ }
2334
+ `],wo([U({type:Boolean,reflect:!0})],xo.prototype,"disabled",2),wo([U({type:String})],xo.prototype,"form",2),wo([U({type:String})],xo.prototype,"label",2),wo([U({type:String})],xo.prototype,"description",2),wo([U({type:String})],xo.prototype,"iconName",2),wo([U({type:String})],xo.prototype,"iconLibrary",2),wo([U({type:String})],xo.prototype,"iconPrefix",2),wo([U({type:String,reflect:!0})],xo.prototype,"variant",2),xo=wo([m("sonic-fieldset")],xo);var _o=Object.defineProperty,ko=Object.getOwnPropertyDescriptor,Ao=(t,e,s,i)=>{for(var r,o=i>1?void 0:i?ko(e,s):e,n=t.length-1;n>=0;n--)(r=t[n])&&(o=(i?r(e,s,o):r(o))||o);return i&&o&&_o(e,s,o),o};let Po=class extends(G(Rt)){constructor(){super(...arguments),this._resizeController=new zr(this,{}),this.oneFormElement=!1}onSlotChange(){let t=this.slottedElements;const e=["sonic-input","sonic-select","sonic-input-autocomplete",".form-item-container"];t=t.filter((t=>e.includes(t.nodeName.toLowerCase()))),this.oneFormElement=1==t.length}render(){const t={"cq--md":this.offsetWidth>440,"one-form-element":this.oneFormElement};return xt`<div class=${Ar(t)}>
2335
+ <slot @slotchange=${this.onSlotChange}></slot>
2336
+ </div>`}};Po.styles=[_`
2337
+ :host {
2338
+ display: block;
2339
+ }
2340
+
2341
+ div {
2342
+ display: grid;
2343
+ grid-gap: 1.5rem;
2344
+ align-items: flex-start;
2345
+ }
2346
+
2347
+ .cq--md {
2348
+ grid-gap: 1.75rem;
2349
+ grid-template-columns: repeat(2, minmax(0, 1fr));
2350
+ }
2351
+ .one-form-element {
2352
+ grid-template-columns: 1fr;
2353
+ }
2354
+ /*::slotted(sonic-radio),
2355
+ ::slotted(sonic-checkbox),
2356
+ ::slotted(sonic-form-actions),
2357
+ ::slotted(sonic-divider),
2358
+ ::slotted(sonic-textarea) {
2359
+ grid-column: 1 / -1;
2360
+ }*/
2361
+ ::slotted(sonic-submit) {
2362
+ display: contents;
2363
+ }
2364
+ ::slotted(:not(sonic-input):not(sonic-select):not(sonic-input-autocomplete):not(.form-item-container)) {
2365
+ grid-column: 1 / -1;
2366
+ }
2367
+
2368
+ ::slotted(sonic-divider) {
2369
+ --sc-divider-my: 0;
2370
+ }
2371
+ `],Ao([H({flatten:!0})],Po.prototype,"slottedElements",2),Ao([U({type:Boolean})],Po.prototype,"oneFormElement",2),Po=Ao([m("sonic-form-layout")],Po);var Co=Object.defineProperty,So=Object.getOwnPropertyDescriptor,$o=(t,e,s,i)=>{for(var r,o=i>1?void 0:i?So(e,s):e,n=t.length-1;n>=0;n--)(r=t[n])&&(o=(i?r(e,s,o):r(o))||o);return i&&o&&Co(e,s,o),o};let Oo=class extends Rt{constructor(){super(...arguments),this.direction="row",this.justify="flex-start"}render(){const t={flexDirection:this.direction,justifyContent:this.justify};return xt`<slot style=${te(t)}></slot>`}};Oo.styles=[_`
2372
+ :host {
2373
+ display: block;
2374
+ }
2375
+ slot {
2376
+ display: flex;
2377
+ flex-wrap: wrap;
2378
+ gap: 0.3rem;
2379
+ }
2380
+ `],$o([U({type:String})],Oo.prototype,"direction",2),$o([U({type:String})],Oo.prototype,"justify",2),Oo=$o([m("sonic-form-actions")],Oo);var Do=Object.defineProperty,Lo=Object.getOwnPropertyDescriptor,Eo=(t,e,s,i)=>{for(var r,o=i>1?void 0:i?Lo(e,s):e,n=t.length-1;n>=0;n--)(r=t[n])&&(o=(i?r(e,s,o):r(o))||o);return i&&o&&Do(e,s,o),o};let jo=class extends Rt{constructor(){super(...arguments),this.alignItems="center",this.hasDescription=!1,this.hasLabel=!1}updated(){const t=this.querySelectorAll("sonic-input, sonic-button, sonic-select"),e=t.length;e>1&&t.forEach(((t,s)=>{const i=t;0===s?(i.style.setProperty("--sc-item-rounded-tr","0"),i.style.setProperty("--sc-item-rounded-br","0")):s===e-1?(i.style.setProperty("--sc-item-rounded-tl","0"),i.style.setProperty("--sc-item-rounded-bl","0")):(i.style.setProperty("--sc-item-rounded-tr","0"),i.style.setProperty("--sc-item-rounded-br","0"),i.style.setProperty("--sc-item-rounded-tl","0"),i.style.setProperty("--sc-item-rounded-bl","0"))}))}connectedCallback(){super.connectedCallback(),this.hasSlotOrProps()}willUpdate(t){this.hasSlotOrProps(),super.willUpdate(t)}hasSlotOrProps(){var t,e;this.hasLabel=!(!this.label&&!(null==(t=this.slotLabelNodes)?void 0:t.length)),this.hasDescription=!(!this.description&&!(null==(e=this.slotDescriptionNodes)?void 0:e.length))}render(){const t={alignItems:this.alignItems};return xt`<span class="${this.hasLabel?"form-label":"hidden"}"
2381
+ >${this.label?cs(this.label):""}<slot name="label" @slotchange=${this.hasSlotOrProps}></slot
2382
+ ></span>
2383
+ <slot class="main-slot" style=${te(t)}></slot>
2384
+ <slot name="description" @slotchange=${this.hasSlotOrProps} class="${this.hasDescription?"form-description":"hidden"}">
2385
+ ${this.description?xt`${cs(this.description)}`:""}
2386
+ </slot>`}};jo.styles=[xe,xr,_r,_`
2387
+ :host {
2388
+ display: inline-block;
2389
+ vertical-align: middle;
2390
+ }
2391
+
2392
+ .main-slot {
2393
+ width: 100%;
2394
+ display: flex;
2395
+ }
2396
+ .hidden {
2397
+ display: none;
2398
+ }
2399
+
2400
+ ::slotted(sonic-button),
2401
+ ::slotted(sonic-input),
2402
+ ::slotted(sonic-select) {
2403
+ flex-grow: 1;
2404
+ }
2405
+ `],Eo([U({type:String})],jo.prototype,"alignItems",2),Eo([U({type:String})],jo.prototype,"label",2),Eo([U({type:String})],jo.prototype,"description",2),Eo([H({slot:"label",flatten:!0})],jo.prototype,"slotLabelNodes",2),Eo([H({slot:"description",flatten:!0})],jo.prototype,"slotDescriptionNodes",2),Eo([V()],jo.prototype,"hasDescription",2),Eo([V()],jo.prototype,"hasLabel",2),jo=Eo([m("sonic-group")],jo);var Mo=Object.defineProperty,No=Object.getOwnPropertyDescriptor,zo=(t,e,s,i)=>{for(var r,o=i>1?void 0:i?No(e,s):e,n=t.length-1;n>=0;n--)(r=t[n])&&(o=(i?r(e,s,o):r(o))||o);return i&&o&&Mo(e,s,o),o};let Io=class extends Rt{constructor(){super(...arguments),this.rounded="none",this.src="",this.alt="",this.loading="lazy",this.ratio="auto",this.objectPosition="center center",this.imageRendering="auto",this.cover=!1}firstUpdated(t){var e;if(this.transition){const t=null==(e=this.shadowRoot)?void 0:e.querySelector("img");if(!t)return;t.onload=function(){t.classList.add("loaded")}}super.firstUpdated(t)}render(){const t={aspectRatio:this.cover?"auto":this.ratio,imageRendering:this.imageRendering,objectPosition:this.objectPosition};return xt`<div part="image">
2406
+ <picture part="picture"
2407
+ ><img part="img" src="${this.src}" loading="${this.loading}" alt="${this.alt}" style=${te(t)}
2408
+ /></picture>
2409
+ </div>`}};Io.styles=[_`
2410
+ :host {
2411
+ --sc-img-radius: 0;
2412
+ --sc-img-bg: var(--sc-placeholder-bg);
2413
+ border-radius: var(--sc-img-radius);
2414
+ display: block;
2415
+ width: 100%;
2416
+ background: var(--sc-img-bg);
2417
+ }
2418
+
2419
+ img {
2420
+ width: 100%;
2421
+ vertical-align: middle;
2422
+ object-fit: cover;
2423
+ }
2424
+
2425
+ img[src=""] {
2426
+ visibility: hidden;
2427
+ }
2428
+
2429
+ /*Rounded*/
2430
+ :host([rounded]) {
2431
+ --sc-img-radius: var(--sc-rounded);
2432
+ overflow: hidden;
2433
+ }
2434
+ :host([rounded="sm"]) {
2435
+ --sc-img-radius: var(--sc-rounded-sm);
2436
+ }
2437
+
2438
+ :host([rounded="md"]) {
2439
+ --sc-img-radius: var(--sc-rounded-md);
2440
+ }
2441
+
2442
+ :host([rounded="lg"]) {
2443
+ --sc-img-radius: var(--sc-rounded-lg);
2444
+ }
2445
+ :host([rounded="xl"]) {
2446
+ --sc-img-radius: var(--sc-rounded-xl);
2447
+ }
2448
+
2449
+ /*Cercle*/
2450
+ :host([rounded="full"]) {
2451
+ --sc-img-radius: 50% !important;
2452
+ }
2453
+ :host([rounded="none"]) {
2454
+ --sc-img-radius: 0 !important;
2455
+ }
2456
+
2457
+ :host([cover]),
2458
+ :host([cover]) > div,
2459
+ :host([cover]) img {
2460
+ position: absolute !important;
2461
+ left: 0 !important;
2462
+ top: 0 !important;
2463
+ right: 0 !important;
2464
+ bottom: 0 !important;
2465
+ height: 100% !important;
2466
+ width: 100% !important;
2467
+ }
2468
+
2469
+ :host([transition]) img {
2470
+ opacity: 0;
2471
+ transition: 0.25s;
2472
+ }
2473
+
2474
+ :host([transition="fade-scale-out"]) img {
2475
+ scale: 1.08;
2476
+ transition: opacity 0.3s linear, scale 0.3s cubic-bezier(0.16, 1, 0.3, 1);
2477
+ }
2478
+ :host([transition]) img.loaded {
2479
+ opacity: 1;
2480
+ scale: 1;
2481
+ }
2482
+ `],zo([U({type:String})],Io.prototype,"rounded",2),zo([U({type:String})],Io.prototype,"src",2),zo([U({type:String})],Io.prototype,"alt",2),zo([U({type:String})],Io.prototype,"loading",2),zo([U({type:String,reflect:!0})],Io.prototype,"transition",2),zo([U({type:String})],Io.prototype,"ratio",2),zo([U({type:String})],Io.prototype,"objectPosition",2),zo([U({type:String})],Io.prototype,"imageRendering",2),zo([U({type:Boolean,reflect:!0})],Io.prototype,"cover",2),Io=zo([m("sonic-image")],Io);var To=Object.defineProperty,Fo=Object.getOwnPropertyDescriptor,Ro=(t,e,s,i)=>{for(var r,o=i>1?void 0:i?Fo(e,s):e,n=t.length-1;n>=0;n--)(r=t[n])&&(o=(i?r(e,s,o):r(o))||o);return i&&o&&To(e,s,o),o};let Uo=class extends Rt{constructor(){super(...arguments),this.size="",this.direction="column",this.gap="var(--sc-menu-gap)",this.align="left",this.shadow=null,this.moreShape="circle",this.scrollable=!1,this.observer=null,this.minWidth="0",this.hasMoreElements=!1,this.updateIsScollable=()=>{this.scrollable&&(this.initScrollable(),this.setScrollShadow(this,this.direction))}}checkIfMore(){var t;this.hasMoreElements=!!(null==(t=this.moreElements)?void 0:t.length)}updated(t){const e=this.querySelector(".more-btn");this.size&&e&&e.setAttribute("size",this.size);this.querySelectorAll("sonic-divider").forEach((t=>{t.hasAttribute("size")||t.setAttribute("size","xs")})),super.updated(t)}mainSlotChange(){this.setChildrenSize(this.menuChildren),this.updateIsScollable()}connectedCallback(){this.observer=new ResizeObserver(this.updateIsScollable),this.observer.observe(this),super.connectedCallback()}disconnectedCallback(){var t;null==(t=this.observer)||t.disconnect(),super.disconnectedCallback()}initScrollable(){let t,e,s=!1;this.scrollable&&(this.addEventListener("mousedown",(i=>{s=!0,this.classList.add("active"),t=i.pageX-this.offsetLeft,e=this.scrollLeft})),this.addEventListener("mouseleave",(()=>{s=!1,this.classList.remove("active")})),this.addEventListener("mouseup",(()=>{s=!1,this.classList.remove("active")})),this.addEventListener("mousemove",(i=>{if(!s)return;i.preventDefault();const r=1.5*(i.pageX-this.offsetLeft-t);this.scrollLeft=e-r,this.setScrollShadow(this,this.direction)})),this.addEventListener("scroll",(t=>{t.preventDefault(),this.setScrollShadow(this,this.direction)})))}setScrollShadow(t,e){"row"==e?(t.scrollLeft>0?this.classList.add("shadow-left"):this.classList.remove("shadow-left"),t.scrollLeft<t.scrollWidth-t.offsetWidth?this.classList.add("shadow-right"):this.classList.remove("shadow-right")):"column"==e&&(t.scrollTop>0?this.classList.add("shadow-top"):this.classList.remove("shadow-top"),t.scrollTop<t.scrollHeight-(t.offsetHeight+1)?this.classList.add("shadow-bottom"):this.classList.remove("shadow-bottom"))}setChildrenSize(t){t.forEach((t=>{this.size&&t.setAttribute("size",this.size),this.align&&t.setAttribute("align",this.align),"row"==this.direction&&"block"==t.getAttribute("shape")&&t.setAttribute("shape","default")}))}render(){const t={minWidth:this.minWidth,flexDirection:this.direction,gap:this.gap},e="row"==this.direction,s={display:"block",alignSelf:e?"center":"flex-start",justifySelf:"center",flexDirection:this.direction},i={marginLeft:e?"":".55em"};return xt`<menu part="menu" class="shadowable" style=${te(t)}>
2483
+ <slot @slotchange=${this.mainSlotChange}></slot>
2484
+ <sonic-pop style=${te(s)} class=${this.hasMoreElements?"":"hidden"}>
2485
+ <sonic-menu-item style=${te(i)} class="more-btn" shape=${this.moreShape} align="center">
2486
+ <sonic-icon size="xl" name=${e?"more-vert":"more-horiz"}></sonic-icon>
2487
+ </sonic-menu-item>
2488
+ <slot name="more" @slotchange=${this.checkIfMore} slot="content"></slot>
2489
+ </sonic-pop>
2490
+ </menu>`}};Uo.styles=[_`
2491
+ :host {
2492
+ display: block;
2493
+ --sc-menu-gap: 0.15rem;
2494
+ }
2495
+
2496
+ :host > menu {
2497
+ display: flex;
2498
+ border-radius: min(calc(var(--sc-btn-rounded) * 2), 0.4em);
2499
+ margin: 0;
2500
+ padding: 0.35em;
2501
+ }
2502
+
2503
+ .hidden {
2504
+ display: none !important;
2505
+ }
2506
+
2507
+ /*OMBRE*/
2508
+ :host([shadow]) .shadowable,
2509
+ :host([shadow="md"]) .shadowable,
2510
+ :host([shadow="true"]) .shadowable {
2511
+ box-shadow: var(--sc-shadow);
2512
+ }
2513
+
2514
+ :host([shadow="sm"]) .shadowable {
2515
+ box-shadow: var(--sc-shadow-sm);
2516
+ }
2517
+
2518
+ :host([shadow="lg"]) .shadowable {
2519
+ box-shadow: var(--sc-shadow-lg);
2520
+ }
2521
+
2522
+ :host([shadow="none"]) .shadowable {
2523
+ box-shadow: none;
2524
+ }
2525
+
2526
+ /* SCROLLABLE*/
2527
+ :host([scrollable]) {
2528
+ scrollbar-width: none;
2529
+ -ms-overflow-style: none;
2530
+ }
2531
+ :host([scrollable]) menu > * {
2532
+ scroll-snap-align: start;
2533
+ white-space: nowrap;
2534
+ }
2535
+ :host([scrollable][direction="row"]) {
2536
+ overflow-x: scroll;
2537
+ scroll-snap-type: x mandatory;
2538
+ }
2539
+ :host([scrollable][direction="column"]) {
2540
+ overflow-y: scroll;
2541
+ scroll-snap-type: y mandatory;
2542
+ }
2543
+ :host([scrollable])::-webkit-scrollbar {
2544
+ display: none !important;
2545
+ }
2546
+ :host([scrollable][direction="row"].shadow-right) {
2547
+ -webkit-mask-image: linear-gradient(to left, rgba(0, 0, 0, 0), rgba(0, 0, 0, 1) 10%);
2548
+ mask-image: linear-gradient(to left, rgba(0, 0, 0, 0), rgba(0, 0, 0, 1) 10%);
2549
+ }
2550
+ :host([scrollable][direction="row"].shadow-left) {
2551
+ -webkit-mask-image: linear-gradient(to right, rgba(0, 0, 0, 0), rgba(0, 0, 0, 1) 10%);
2552
+ mask-image: linear-gradient(to right, rgba(0, 0, 0, 0), rgba(0, 0, 0, 1) 10%);
2553
+ }
2554
+ :host([scrollable][direction="row"].shadow-left.shadow-right) {
2555
+ -webkit-mask-image: linear-gradient(
2556
+ to right,
2557
+ rgba(0, 0, 0, 0) 0%,
2558
+ rgba(0, 0, 0, 1) 10%,
2559
+ rgba(0, 0, 0, 1) 90%,
2560
+ rgba(0, 0, 0, 0) 100%
2561
+ );
2562
+ mask-image: linear-gradient(
2563
+ to right,
2564
+ rgba(0, 0, 0, 0) 0%,
2565
+ rgba(0, 0, 0, 1) 10%,
2566
+ rgba(0, 0, 0, 1) 90%,
2567
+ rgba(0, 0, 0, 0) 100%
2568
+ );
2569
+ }
2570
+ :host([scrollable][direction="column"].shadow-top) {
2571
+ -webkit-mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0), rgba(0, 0, 0, 1) 10%);
2572
+ mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0), rgba(0, 0, 0, 1) 10%);
2573
+ }
2574
+ :host([scrollable][direction="column"].shadow-bottom) {
2575
+ -webkit-mask-image: linear-gradient(to top, rgba(0, 0, 0, 0), rgba(0, 0, 0, 1) 10%);
2576
+ mask-image: linear-gradient(to top, rgba(0, 0, 0, 0), rgba(0, 0, 0, 1) 10%);
2577
+ }
2578
+ :host([scrollable][direction="column"].shadow-top.shadow-bottom) {
2579
+ -webkit-mask-image: linear-gradient(
2580
+ to top,
2581
+ rgba(0, 0, 0, 0) 0%,
2582
+ rgba(0, 0, 0, 1) 10%,
2583
+ rgba(0, 0, 0, 1) 90%,
2584
+ rgba(0, 0, 0, 0) 100%
2585
+ );
2586
+ mask-image: linear-gradient(
2587
+ to bottom,
2588
+ rgba(0, 0, 0, 0) 0%,
2589
+ rgba(0, 0, 0, 1) 10%,
2590
+ rgba(0, 0, 0, 1) 90%,
2591
+ rgba(0, 0, 0, 0) 100%
2592
+ );
2593
+ }
2594
+ `],Ro([U({type:String,reflect:!0})],Uo.prototype,"size",2),Ro([U({type:String,reflect:!0})],Uo.prototype,"direction",2),Ro([U({type:String})],Uo.prototype,"gap",2),Ro([U({type:String,reflect:!0})],Uo.prototype,"align",2),Ro([U({type:String,reflect:!0})],Uo.prototype,"shadow",2),Ro([U({type:String})],Uo.prototype,"moreShape",2),Ro([U({type:Boolean})],Uo.prototype,"scrollable",2),Ro([U({type:String})],Uo.prototype,"minWidth",2),Ro([q("menu")],Uo.prototype,"menu",2),Ro([H({selector:"sonic-menu-item"})],Uo.prototype,"menuChildren",2),Ro([H({slot:"more",selector:"*"})],Uo.prototype,"moreElements",2),Ro([V()],Uo.prototype,"hasMoreElements",2),Uo=Ro([m("sonic-menu")],Uo);var Vo=Object.defineProperty,Bo=Object.getOwnPropertyDescriptor,qo=(t,e,s,i)=>{for(var r,o=i>1?void 0:i?Bo(e,s):e,n=t.length-1;n>=0;n--)(r=t[n])&&(o=(i?r(e,s,o):r(o))||o);return i&&o&&Vo(e,s,o),o};let Ho=class extends Rt{firstUpdated(t){var e;null==(e=this.buttons)||e.forEach((t=>{t.addEventListener("click",(()=>{if("false"!=t.getAttribute("hideModal")){const t=this.closest("sonic-modal");null==t||t.hide()}}))})),super.firstUpdated(t)}render(){return xt`<slot></slot>`}};Ho.styles=[_`
2595
+ :host {
2596
+ display: flex;
2597
+ gap: 0.5rem;
2598
+ margin-top: auto;
2599
+ padding-top: 1.5rem;
2600
+ }
2601
+ `],qo([H({selector:"sonic-button"})],Ho.prototype,"buttons",2),Ho=qo([m("sonic-modal-actions")],Ho);var Wo=Object.defineProperty,Ko=Object.getOwnPropertyDescriptor,Zo=(t,e,s,i)=>{for(var r,o=i>1?void 0:i?Ko(e,s):e,n=t.length-1;n>=0;n--)(r=t[n])&&(o=(i?r(e,s,o):r(o))||o);return i&&o&&Wo(e,s,o),o};let Yo=class extends Rt{render(){return xt`<sonic-button reset=${we(this.reset)} shape="circle" @click=${this.handleClick}
2602
+ ><sonic-icon name="cancel" size="lg"></sonic-icon
2603
+ ></sonic-button>`}handleClick(){this.closest("sonic-modal").hide()}};Yo.styles=[_`
2604
+ :host {
2605
+ position: sticky;
2606
+ display: block;
2607
+ align-self: flex-end;
2608
+ height: 0;
2609
+ top: 0.5rem;
2610
+ right: 0.5rem;
2611
+ transform: translate3d(calc(var(--sc-modal-px)), calc(-1 * var(--sc-modal-py)), 0);
2612
+ z-index: 20;
2613
+ }
2614
+ `],Zo([U()],Yo.prototype,"reset",2),Yo=Zo([m("sonic-modal-close")],Yo);var Qo=Object.defineProperty,Go=Object.getOwnPropertyDescriptor;let Jo=class extends Rt{render(){return xt`<slot></slot>`}};Jo.styles=[_`
2615
+ :host {
2616
+ display: block;
2617
+ width: 100%;
2618
+ }
2619
+ `],Jo=((t,e,s,i)=>{for(var r,o=i>1?void 0:i?Go(e,s):e,n=t.length-1;n>=0;n--)(r=t[n])&&(o=(i?r(e,s,o):r(o))||o);return i&&o&&Qo(e,s,o),o})([m("sonic-modal-content")],Jo);var Xo=Object.defineProperty,tn=Object.getOwnPropertyDescriptor;let en=class extends Rt{render(){return xt`<slot></slot>`}};en.styles=[_`
2620
+ :host {
2621
+ font-size: 1.1rem;
2622
+ display: block;
2623
+ line-height: 1.1rem;
2624
+ line-height: var(--sc-headings-line-height);
2625
+ font-family: var(--sc-headings-font-family);
2626
+ font-weight: var(--sc-headings-font-weight);
2627
+ }
2628
+ `],en=((t,e,s,i)=>{for(var r,o=i>1?void 0:i?tn(e,s):e,n=t.length-1;n>=0;n--)(r=t[n])&&(o=(i?r(e,s,o):r(o))||o);return i&&o&&Xo(e,s,o),o})([m("sonic-modal-subtitle")],en);var sn=Object.defineProperty,rn=Object.getOwnPropertyDescriptor;let on=class extends Rt{render(){return xt`<slot></slot>`}};on.styles=[_`
2629
+ :host {
2630
+ font-weight: bold;
2631
+ font-size: 1.5rem;
2632
+ display: block;
2633
+ line-height: var(--sc-headings-line-height);
2634
+ font-family: var(--sc-headings-font-family);
2635
+ }
2636
+ `],on=((t,e,s,i)=>{for(var r,o=i>1?void 0:i?rn(e,s):e,n=t.length-1;n>=0;n--)(r=t[n])&&(o=(i?r(e,s,o):r(o))||o);return i&&o&&sn(e,s,o),o})([m("sonic-modal-title")],on);var nn=Object.defineProperty,an=Object.getOwnPropertyDescriptor,ln=(t,e,s,i)=>{for(var r,o=i>1?void 0:i?an(e,s):e,n=t.length-1;n>=0;n--)(r=t[n])&&(o=(i?r(e,s,o):r(o))||o);return i&&o&&nn(e,s,o),o};const cn="sonic-modal";let hn=class extends(G(Rt)){constructor(){super(...arguments),this.forceAction=!1,this.removeOnHide=!1,this.align="left",this.padding="var(--sc-modal-py) var(--sc-modal-px)",this.maxWidth="var(--sc-modal-max-w) ",this.maxHeight="var(--sc-modal-max-h) ",this.width="100%",this.height="auto",this.zIndex="var(--sc-modal-z-index)",this.fullScreen=!1,this.visible=!1}static create(t){const e=document.createElement(cn);!0===t.removeOnHide&&e.setAttribute("removeOnHide","true"),t.maxWidth&&(e.maxWidth=null==t?void 0:t.maxWidth),t.width&&(e.width=null==t?void 0:t.width),t.maxHeight&&(e.maxHeight=null==t?void 0:t.maxHeight),t.height&&(e.height=null==t?void 0:t.height),t.paddingX&&e.style.setProperty("--sc-modal-px",null==t?void 0:t.paddingX),t.paddingY&&e.style.setProperty("--sc-modal-py",null==t?void 0:t.paddingY),t.zIndex&&e.style.setProperty("--sc-modal-z-index",null==t?void 0:t.zIndex),e.innerHTML=`<sonic-modal-close></sonic-modal-close><sonic-modal-content>${t.content}</sonic-modal-content>`||"";return(document.querySelector("sonic-theme")||document.body).appendChild(e),e.show(),e}connectedCallback(){super.connectedCallback(),this.handleFullsceen()}updated(){const t=this;document.addEventListener("keydown",this.handleEscape),t.closeBtn.forEach((e=>{e.addEventListener("click",(function(){t.hide()}),{once:!0})}))}willUpdate(t){t.has("fullScreen")&&this.handleFullsceen(),super.willUpdate(t)}render(){if(0==this.visible)return kt;const t={padding:this.padding,maxWidth:this.maxWidth,maxHeight:this.maxHeight,width:this.width,height:this.height,zIndex:this.zIndex,borderRadius:this.fullScreen?"0":"var(--sc-modal-rounded)"},e={maxWidth:this.maxWidth,maxHeight:this.maxHeight,width:this.width,height:this.height,borderRadius:this.fullScreen?"0":"var(--sc-modal-rounded)"};return xt`<div
2637
+ class="modal-wrapper"
2638
+ style=${te(e)}
2639
+ ${ns({out:Je})}
2640
+ tabindex="0"
2641
+ >
2642
+ <div
2643
+ part="modal"
2644
+ class="modal custom-scroll"
2645
+ style=${te(t)}
2646
+ ${ns({keyframeOptions:{duration:400,easing:"cubic-bezier(0.250, 0.250, 0.420, 1.225)"},in:[{transform:"translateY(25%) scale(1)",boxShadow:"0 0 0 rgba(0,0,0,0)",opacity:0}],out:[{transform:"translateY(20%) scale(1)",boxShadow:"0 0 0 rgba(0,0,0,0)",opacity:0}]})}
2647
+ >
2648
+ <div class="modal-content ">
2649
+ <slot></slot>
2650
+ </div>
2651
+ </div>
2652
+ </div>
2653
+
2654
+ <div
2655
+ class="overlay"
2656
+ @click="${this.forceAction?null:this.hide}"
2657
+ ${ns({keyframeOptions:{duration:500},in:Xe,out:[{opacity:0,pointerEvents:"none"}]})}
2658
+ ></div>`}show(){var t,e;this.visible=!0,null==(t=this.modalElement)||t.setAttribute("tabindex","0"),null==(e=this.modalElement)||e.focus(),this.dispatchEvent(new CustomEvent("show"))}hide(){var t;this.visible=!1,null==(t=this.modalElement)||t.setAttribute("tabindex","-1"),this.dispatchEvent(new CustomEvent("hide")),this.hasAttribute("resetDataProviderOnHide")&&ge.get(this.getAttribute("resetDataProviderOnHide")).set({}),this.removeOnHide&&this.remove()}dispose(){this.hide(),this.remove()}handleEscape(t){if("Escape"===t.key){[...document.querySelectorAll(cn)].forEach((t=>{t.forceAction||t.hide()}))}}handleFullsceen(){this.fullScreen&&(this.width="100%",this.height="100%",this.maxWidth="none",this.maxHeight="none")}};hn.styles=[xs,_`
2659
+ :host {
2660
+ --sc-modal-py: 2.5rem;
2661
+ --sc-modal-px: 1.5rem;
2662
+ --sc-modal-max-w: min(100vw, 64ch);
2663
+ --sc-modal-max-h: 85vh;
2664
+ --sc-modal-rounded: var(--sc-rounded-lg);
2665
+ --sc-modal-z-index: 990;
2666
+ }
2667
+
2668
+ * {
2669
+ box-sizing: border-box;
2670
+ }
2671
+
2672
+ .modal-wrapper {
2673
+ position: fixed;
2674
+ bottom: 0;
2675
+ left: 0;
2676
+ width: 100%;
2677
+ z-index: calc(var(--sc-modal-z-index) + 1);
2678
+ align-items: center;
2679
+ justify-content: center;
2680
+ flex-direction: column;
2681
+ display: flex;
2682
+ pointer-events: none;
2683
+ }
2684
+
2685
+ .modal-content {
2686
+ display: flex;
2687
+ flex-direction: column;
2688
+ min-height: 10rem;
2689
+ line-height: 1.25;
2690
+ }
2691
+
2692
+ .modal {
2693
+ background: var(--sc-base);
2694
+ color: var(--sc-base-content);
2695
+ width: 100%;
2696
+ box-shadow: var(--sc-shadow-lg);
2697
+ border-radius: var(--sc-modal-rounded) var(--sc-modal-rounded) 0 0;
2698
+ pointer-events: auto;
2699
+ /*overflow: hidden;*/
2700
+ transform: translateZ(0);
2701
+ }
2702
+
2703
+ .overlay {
2704
+ background: var(--sc-modal-overlay-bg, var(--sc-base-200));
2705
+ left: 0;
2706
+ top: 0;
2707
+ right: 0;
2708
+ bottom: 0;
2709
+ z-index: var(--sc-modal-z-index);
2710
+ opacity: 0.8;
2711
+ position: fixed;
2712
+ }
2713
+
2714
+ ::slotted(sonic-modal-title) {
2715
+ margin-bottom: 1.25rem;
2716
+ }
2717
+
2718
+ ::slotted(sonic-modal-subtitle) {
2719
+ margin-top: -0.9rem;
2720
+ margin-bottom: 1.25rem;
2721
+ }
2722
+
2723
+ @media (max-width: 767.5px) {
2724
+ .modal-wrapper,
2725
+ .modal {
2726
+ max-width: none !important;
2727
+ width: 100% !important;
2728
+ border-radius: var(--sc-modal-rounded) var(--sc-modal-rounded) 0 0 !important;
2729
+ }
2730
+ }
2731
+
2732
+ @media (min-width: 768px) {
2733
+ .modal-wrapper {
2734
+ top: 50%;
2735
+ left: 50%;
2736
+ bottom: auto;
2737
+ right: auto;
2738
+ transform: translateX(-50%) translateY(-50%);
2739
+ }
2740
+
2741
+ .modal {
2742
+ top: 50%;
2743
+ bottom: auto;
2744
+ right: auto;
2745
+ border-radius: var(--sc-modal-rounded);
2746
+ }
2747
+ }
2748
+
2749
+ :host([align="left"]) .modal-content {
2750
+ text-align: left;
2751
+ align-items: flex-start;
2752
+ }
2753
+
2754
+ :host([align="center"]) .modal-content {
2755
+ text-align: center;
2756
+ align-items: center;
2757
+ }
2758
+
2759
+ :host([align="right"]) .modal-content {
2760
+ text-align: right;
2761
+ align-items: flex-end;
2762
+ }
2763
+
2764
+ /* Border radius */
2765
+ :host([rounded="none"]) modal {
2766
+ --sc-img-radius: 0 !important;
2767
+ }
2768
+ `],ln([U({type:Boolean})],hn.prototype,"forceAction",2),ln([U({type:Boolean})],hn.prototype,"removeOnHide",2),ln([U({type:String,reflect:!0})],hn.prototype,"align",2),ln([U({type:String})],hn.prototype,"padding",2),ln([U({type:String})],hn.prototype,"maxWidth",2),ln([U({type:String})],hn.prototype,"maxHeight",2),ln([U({type:String})],hn.prototype,"width",2),ln([U({type:String})],hn.prototype,"height",2),ln([U({type:String})],hn.prototype,"zIndex",2),ln([U({type:Boolean,reflect:!0})],hn.prototype,"fullScreen",2),ln([U({type:Boolean,reflect:!0})],hn.prototype,"visible",2),ln([q(".modal-wrapper")],hn.prototype,"modalWrapper",2),ln([q(".modal")],hn.prototype,"modalElement",2),ln([H({selector:"sonic-modal-close"})],hn.prototype,"closeBtn",2),hn=ln([m(cn)],hn),"undefined"!=typeof window&&(window.SonicModal=hn);var dn=Object.defineProperty,pn=Object.getOwnPropertyDescriptor,un=(t,e,s,i)=>{for(var r,o=i>1?void 0:i?pn(e,s):e,n=t.length-1;n>=0;n--)(r=t[n])&&(o=(i?r(e,s,o):r(o))||o);return i&&o&&dn(e,s,o),o};const gn={warning:"warning-circled-outline",success:"check-circled-outline",error:"warning-circled-outline",info:"info-empty",default:"info-empty"};let bn=class extends Rt{constructor(){super(...arguments),this.label="",this.noIcon=!1,this.text="",this.dismissible=!1,this.background=!1,this.status="default"}render(){return xt`<div part="alert" class="alert">
2769
+ ${this.noIcon?kt:xt`<div>${this.status&&xt`<sonic-icon name=${gn[this.status]}></sonic-icon>`}</div>`}
2770
+ <div>
2771
+ ${this.label?xt`<span class="label">${cs(this.label)}</span>`:kt}
2772
+ <slot>${this.text}</slot>
2773
+ </div>
2774
+ ${this.dismissible?xt`<sonic-button @click=${this.close} class="close-btn" variant="unstyled" shape="circle">
2775
+ <sonic-icon name="cancel" size="lg"></sonic-icon>
2776
+ </sonic-button>`:kt}
2777
+ </div>`}close(){this.remove()}};bn.styles=[xe,_`
2778
+ :host {
2779
+ --sc-alert-color: var(--sc-base-content);
2780
+ --sc-alert-rounded: var(--sc-rounded);
2781
+ --sc-alert-fw: var(--sc-font-weight-base);
2782
+ --sc-alert-fst: var(--sc-font-style-base);
2783
+ --sc-alert-label-fw: bold;
2784
+ display: block;
2785
+ font-weight: var(--sc-alert-fw);
2786
+ font-style: var(--sc-alert-fst);
2787
+ }
2788
+
2789
+ .alert {
2790
+ color: var(--sc-alert-color);
2791
+ position: relative;
2792
+ display: flex;
2793
+ gap: 0.4em;
2794
+ border-radius: var(--sc-alert-rounded);
2795
+ }
2796
+
2797
+ .label {
2798
+ font-weight: var(--sc-alert-label-fw);
2799
+ }
2800
+
2801
+ :host([status="warning"]) {
2802
+ --sc-alert-color: var(--sc-warning);
2803
+ }
2804
+ :host([status="error"]) {
2805
+ --sc-alert-color: var(--sc-danger);
2806
+ }
2807
+ :host([status="info"]) {
2808
+ --sc-alert-color: var(--sc-info);
2809
+ }
2810
+ :host([status="success"]) {
2811
+ --sc-alert-color: var(--sc-success);
2812
+ }
2813
+
2814
+ /*background*/
2815
+ :host([dismissible]) .alert,
2816
+ :host([background]) .alert {
2817
+ background: var(--sc-base);
2818
+ padding: 0.8em 1.15em;
2819
+ }
2820
+ :host([dismissible]) .alert:before,
2821
+ :host([background]) .alert:before {
2822
+ background-color: currentColor;
2823
+ content: "";
2824
+ display: block;
2825
+ position: absolute;
2826
+ left: 0;
2827
+ top: 0;
2828
+ right: 0;
2829
+ bottom: 0;
2830
+ opacity: 0.08;
2831
+ border-radius: var(--sc-alert-rounded);
2832
+ pointer-events: none;
2833
+ }
2834
+ :host([dismissible]) > div,
2835
+ :host([background]) > div {
2836
+ z-index: 2;
2837
+ position: relative;
2838
+ }
2839
+
2840
+ slot {
2841
+ display: block;
2842
+ }
2843
+
2844
+ /*Rounded*/
2845
+ :host([size="xs"]) .alert {
2846
+ --sc-alert-rounded: var(--sc-rounded-sm);
2847
+ }
2848
+ :host([size="sm"]) .alert {
2849
+ --sc-alert-rounded: var(--sc-rounded-sm);
2850
+ }
2851
+
2852
+ /*Dismissible*/
2853
+ :host([dismissible]) .alert {
2854
+ padding-right: 3rem;
2855
+ }
2856
+ :host([dismissible]) .close-btn {
2857
+ padding: 0.5em;
2858
+ position: absolute;
2859
+ top: 0.25rem;
2860
+ right: 0.25rem;
2861
+ }
2862
+ `],un([U({type:String})],bn.prototype,"label",2),un([U({type:Boolean,reflect:!0})],bn.prototype,"noIcon",2),un([U({type:String})],bn.prototype,"text",2),un([U({type:String,reflect:!0})],bn.prototype,"size",2),un([U({type:Boolean,reflect:!0})],bn.prototype,"dismissible",2),un([U({type:Boolean,reflect:!0})],bn.prototype,"background",2),un([U({type:String,reflect:!0})],bn.prototype,"status",2),bn=un([m("sonic-alert")],bn);var mn=Object.defineProperty,fn=Object.getOwnPropertyDescriptor,vn=(t,e,s,i)=>{for(var r,o=i>1?void 0:i?fn(e,s):e,n=t.length-1;n>=0;n--)(r=t[n])&&(o=(i?r(e,s,o):r(o))||o);return i&&o&&mn(e,s,o),o};let yn=class extends(G(Rt)){constructor(){super(...arguments),this._messages=[],this.success=null,this.status=null,this._message="",this._data=""}get messages(){return this._messages}set messages(t){this._messages=t,this.messages&&t.forEach((t=>{"public"==t.type&&Ds.add({text:t.content||"",status:t.status})}))}get message(){return this._message}set message(t){var e,s;this._message=t,this.message&&!1===(null==(e=this.props)?void 0:e.success)&&((null==(s=this.props)?void 0:s.public_message)||Ds.add({text:this.message,status:"error"}))}get data(){return this._data}set data(t){var e,s,i,r;this._data=t;const o={text:"Votre produit a bien été ajouté",status:"success"};Array.isArray(this.data)&&!0===(null==(e=this.props)?void 0:e.success)&&Ds.add(o),""==this.data&&!0===(null==(s=this.props)?void 0:s.status)&&Ds.add(o),!1===(null==(i=this.props)?void 0:i.success)&&((null==(r=this.props)?void 0:r.public_message)||Ds.add({text:this.data,status:"error"}))}render(){return kt}};vn([U({type:Boolean})],yn.prototype,"success",2),vn([U({type:Boolean})],yn.prototype,"status",2),vn([U({type:Array})],yn.prototype,"messages",1),vn([U({type:String})],yn.prototype,"message",1),vn([U()],yn.prototype,"data",1),yn=vn([m("sonic-toast-message-subscriber")],yn);var wn=Object.defineProperty,xn=Object.getOwnPropertyDescriptor,_n=(t,e,s,i)=>{for(var r,o=i>1?void 0:i?xn(e,s):e,n=t.length-1;n>=0;n--)(r=t[n])&&(o=(i?r(e,s,o):r(o))||o);return i&&o&&wn(e,s,o),o};let kn=class extends Rt{constructor(){super(...arguments),this.label="",this.disabled=!1}render(){const t=this.disabled||""==this.label?"disabled":"";return xt`<div data-tooltip-text="${this.label.trim().replace("&nbsp;"," ")}" class="tooltip ${t}">
2863
+ <slot></slot>
2864
+ </div>`}};kn.styles=[_`
2865
+ :host {
2866
+ position: relative;
2867
+ display: inline-flex;
2868
+ align-items: center;
2869
+ text-align: center;
2870
+ --sc-tooltip-fw: var(--sc-font-weight-base);
2871
+ }
2872
+
2873
+ .tooltip:before {
2874
+ position: absolute;
2875
+ content: attr(data-tooltip-text);
2876
+ font-size: 0.85rem;
2877
+ display: block;
2878
+ opacity: 0;
2879
+ pointer-events: none;
2880
+ background: var(--sc-base-content, #111827);
2881
+ padding: 0.32rem 0.25rem;
2882
+ border-radius: var(--sc-rounded);
2883
+ color: var(--sc-base, #fff);
2884
+ z-index: 999;
2885
+ display: none;
2886
+ line-height: 1.1;
2887
+ width: max-content;
2888
+ max-width: 18rem;
2889
+ white-space: pre-line;
2890
+ font-weight: var(--sc-tooltip-fw);
2891
+ }
2892
+ .tooltip:not(.disabled):hover:before {
2893
+ opacity: 1;
2894
+ display: block;
2895
+ }
2896
+
2897
+ :host(:not([placement])) .tooltip:before,
2898
+ :host([placement="top"]) .tooltip:before {
2899
+ bottom: calc(100% + 0.25rem);
2900
+ left: 50%;
2901
+ transform: translateX(-50%);
2902
+ }
2903
+
2904
+ :host([placement="bottom"]) .tooltip:before {
2905
+ top: calc(100% + 0.25rem);
2906
+ left: 50%;
2907
+ transform: translateX(-50%);
2908
+ }
2909
+
2910
+ :host([placement="left"]) .tooltip:before {
2911
+ top: 50%;
2912
+ right: calc(100% + 0.25rem);
2913
+ transform: translateY(-50%);
2914
+ }
2915
+
2916
+ :host([placement="right"]) .tooltip:before {
2917
+ top: 50%;
2918
+ transform: translateY(-50%);
2919
+ left: calc(100% + 0.25rem);
2920
+ }
2921
+ `],_n([U({type:String})],kn.prototype,"label",2),_n([U({type:String,reflect:!0})],kn.prototype,"placement",2),_n([U({type:Boolean})],kn.prototype,"disabled",2),kn=_n([m("sonic-tooltip")],kn);var An=Object.defineProperty,Pn=Object.getOwnPropertyDescriptor,Cn=(t,e,s,i)=>{for(var r,o=i>1?void 0:i?Pn(e,s):e,n=t.length-1;n>=0;n--)(r=t[n])&&(o=(i?r(e,s,o):r(o))||o);return i&&o&&An(e,s,o),o};let Sn=class extends Rt{constructor(){super(...arguments),this.label="",this.align="center",this.vertical=!1,this.noMargin=!1}firstUpdated(t){var e,s;super.firstUpdated(t),(this.label||(null==(e=this.slotNodes)?void 0:e.length))&&(null==(s=this.divider)||s.classList.add("has-text"))}render(){return xt`<div part="divider">
2922
+ <span class="text">${cs(this.label?this.label:"")}<slot></slot></span>
2923
+ </div>`}};Sn.styles=[_`
2924
+ :host {
2925
+ --sc-divider-my: 0.5rem;
2926
+ --sc-divider-mx: 0;
2927
+ --sc-divider-border-width: max(1px, var(--sc-border-width));
2928
+ --sc-divider-border-color: var(--sc-border-color);
2929
+ --sc-divider-border-style: solid;
2930
+ --sc-divider-color: currentColor;
2931
+ --sc-divider-ff: var(--sc-font-family-base);
2932
+ --sc-divider-fs: 1rem;
2933
+ --sc-divider-fw: var(--sc-font-weight-base);
2934
+ --sc-divider-fst: var(--sc-font-style-base);
2935
+
2936
+ margin: var(--sc-divider-my) var(--sc-divider-mx);
2937
+ font-size: var(--sc-divider-fs);
2938
+ font-style: var(--sc-divider-fst);
2939
+ font-family: var(--sc-divider-ff);
2940
+ font-weight: var(--sc-divider-fw);
2941
+ color: var(--sc-divider-color);
2942
+ display: block;
2943
+ }
2944
+
2945
+ /*SIZE*/
2946
+ :host([size="2xs"]) {
2947
+ --sc-divider-my: 0.35rem;
2948
+ --sc-divider-fs: 0.68rem;
2949
+ }
2950
+
2951
+ :host([size="xs"]) {
2952
+ --sc-divider-my: 0.5rem;
2953
+ --sc-divider-fs: 0.75rem;
2954
+ }
2955
+
2956
+ :host([size="sm"]) {
2957
+ --sc-divider-my: 0.75rem;
2958
+ --sc-divider-fs: 0.875rem;
2959
+ }
2960
+
2961
+ :host([size="md"]) {
2962
+ --sc-divider-my: 1.25rem;
2963
+ }
2964
+
2965
+ :host([size="lg"]) {
2966
+ --sc-divider-my: 1.85rem;
2967
+ }
2968
+
2969
+ :host([size="xl"]) {
2970
+ --sc-divider-my: 2.25rem;
2971
+ }
2972
+
2973
+ :host([size="2xl"]) {
2974
+ --sc-divider-my: 3.35rem;
2975
+ }
2976
+
2977
+ div {
2978
+ display: flex;
2979
+ align-items: center;
2980
+ width: 100%;
2981
+ }
2982
+
2983
+ div::before,
2984
+ div::after {
2985
+ content: "";
2986
+ flex-grow: 1;
2987
+ border-top: var(--sc-divider-border-width) var(--sc-divider-border-style) var(--sc-divider-border-color);
2988
+ width: 100%;
2989
+ opacity: var(--sc-divider-opacity, 1);
2990
+ }
2991
+
2992
+ /*ALIGNEMENT*/
2993
+ :host([align="left"]) div:before {
2994
+ display: none;
2995
+ }
2996
+
2997
+ :host([align="right"]) div:after {
2998
+ display: none;
2999
+ }
3000
+
3001
+ :host([vertical]) {
3002
+ margin: var(--sc-divider-mx) var(--sc-divider-my);
3003
+ }
3004
+
3005
+ :host([vertical]) div {
3006
+ flex-direction: column;
3007
+ height: 100%;
3008
+ min-height: var(--sc-form-height);
3009
+ }
3010
+
3011
+ :host([vertical]) .has-text {
3012
+ gap: 0.25rem;
3013
+ }
3014
+
3015
+ :host([vertical]) div::before,
3016
+ :host([vertical]) div::after {
3017
+ border-top: none;
3018
+ border-left: var(--sc-divider-border-width) var(--sc-divider-border-style) var(--sc-divider-border-color);
3019
+ width: auto;
3020
+ height: 100%;
3021
+ opacity: var(--sc-divider-opacity, 1);
3022
+ }
3023
+
3024
+ :host([noMargin]) {
3025
+ margin: 0;
3026
+ }
3027
+
3028
+ /*TEXT*/
3029
+ .text {
3030
+ flex-shrink: 0;
3031
+ line-height: 1.1;
3032
+ max-width: 80%;
3033
+ }
3034
+
3035
+ .no-text .text {
3036
+ display: none;
3037
+ }
3038
+
3039
+ .has-text {
3040
+ gap: 0.5rem;
3041
+ }
3042
+ `],Cn([H({flatten:!0})],Sn.prototype,"slotNodes",2),Cn([q("div")],Sn.prototype,"divider",2),Cn([U({type:String})],Sn.prototype,"label",2),Cn([U({type:String,reflect:!0})],Sn.prototype,"size",2),Cn([U({type:String,reflect:!0})],Sn.prototype,"align",2),Cn([U({type:Boolean,reflect:!0})],Sn.prototype,"vertical",2),Cn([U({type:Boolean,reflect:!0})],Sn.prototype,"noMargin",2),Sn=Cn([m("sonic-divider")],Sn);var $n=Object.defineProperty,On=Object.getOwnPropertyDescriptor;let Dn=class extends Rt{render(){return xt`
3043
+ <div>
3044
+ <slot></slot>
3045
+ </div>
3046
+ `}};Dn.styles=[_`
3047
+ div {
3048
+ margin-top: 0.1em;
3049
+ font-family: var(--sc-font-family-base);
3050
+ font-size: 0.7em;
3051
+ font-weight: var(--sc-font-style-base);
3052
+ }
3053
+ `],Dn=((t,e,s,i)=>{for(var r,o=i>1?void 0:i?On(e,s):e,n=t.length-1;n>=0;n--)(r=t[n])&&(o=(i?r(e,s,o):r(o))||o);return i&&o&&$n(e,s,o),o})([m("sonic-card-header-description")],Dn);var Ln=Object.defineProperty,En=Object.getOwnPropertyDescriptor,jn=(t,e,s,i)=>{for(var r,o=i>1?void 0:i?En(e,s):e,n=t.length-1;n>=0;n--)(r=t[n])&&(o=(i?r(e,s,o):r(o))||o);return i&&o&&Ln(e,s,o),o};let Mn=class extends Rt{render(){return xt`
3054
+ <div class="header">
3055
+ <div class="header-content">
3056
+ ${cs(this.label)}
3057
+ ${this.description?xt`<sonic-card-header-description>${cs(this.description)}</sonic-card-header-description>`:""}
3058
+ <slot></slot>
3059
+ </div>
3060
+ <slot name="suffix"></slot>
3061
+ </div>
3062
+ `}};Mn.styles=[_`
3063
+ :host {
3064
+ --sc-card-header-mb: 1.35rem;
3065
+ --sc-card-header-font-size: 1.875rem;
3066
+ --sc-card-header-font-weight: var(--sc-headings-font-weight);
3067
+ --sc-card-header-font-style: var(--sc-headings-font-style);
3068
+ --sc-card-header-family: var(--sc-headings-font-family);
3069
+ --sc-card-header-line-height: var(--sc-headings-line-height);
3070
+ }
3071
+ @media print {
3072
+ :host {
3073
+ --sc-card-header-font-size: 1.45rem;
3074
+ }
3075
+ }
3076
+ .header {
3077
+ display: flex;
3078
+ align-items: flex-start;
3079
+ gap: 0.5em 1em;
3080
+ margin-bottom: var(--sc-card-header-mb);
3081
+ line-height: var(--sc-card-header-line-height);
3082
+ font-family: var(--sc-card-header-font-family);
3083
+ font-size: var(--sc-card-header-font-size);
3084
+ font-style: var(--sc-card-header-font-style);
3085
+ font-weight: var(--sc-card-header-font-weight);
3086
+ }
3087
+
3088
+ .header-content {
3089
+ flex-grow: 1;
3090
+ }
3091
+
3092
+ slot[name="suffix"] {
3093
+ flex-shrink: 0;
3094
+ }
3095
+ `],jn([U()],Mn.prototype,"label",2),jn([U()],Mn.prototype,"description",2),Mn=jn([m("sonic-card-header")],Mn);var Nn=Object.defineProperty,zn=Object.getOwnPropertyDescriptor;let In=class extends Rt{render(){return xt`
3096
+ <div>
3097
+ <slot></slot>
3098
+ </div>
3099
+ `}};In=((t,e,s,i)=>{for(var r,o=i>1?void 0:i?zn(e,s):e,n=t.length-1;n>=0;n--)(r=t[n])&&(o=(i?r(e,s,o):r(o))||o);return i&&o&&Nn(e,s,o),o})([m("sonic-card-main")],In);var Tn=Object.defineProperty,Fn=Object.getOwnPropertyDescriptor;let Rn=class extends Rt{render(){return xt` <slot></slot> `}};Rn=((t,e,s,i)=>{for(var r,o=i>1?void 0:i?Fn(e,s):e,n=t.length-1;n>=0;n--)(r=t[n])&&(o=(i?r(e,s,o):r(o))||o);return i&&o&&Tn(e,s,o),o})([m("sonic-card-footer")],Rn);var Un=Object.defineProperty,Vn=Object.getOwnPropertyDescriptor,Bn=(t,e,s,i)=>{for(var r,o=i>1?void 0:i?Vn(e,s):e,n=t.length-1;n>=0;n--)(r=t[n])&&(o=(i?r(e,s,o):r(o))||o);return i&&o&&Un(e,s,o),o};let qn=class extends Rt{constructor(){super(...arguments),this.type="default"}render(){return xt`
3100
+ <div part="card" class="card">
3101
+ <slot></slot>
3102
+ </div>
3103
+ `}};qn.styles=[_`
3104
+ * {
3105
+ box-sizing: border-box;
3106
+ }
3107
+ :host {
3108
+ --sc-card-padding: 1.5rem;
3109
+ --sc-card-color: var(--sc-base-content);
3110
+ --sc-card-bg: var(--sc-base);
3111
+ --sc-card-rounded: var(--sc-rounded-lg);
3112
+ --sc-card-shadow: var(--sc-shadow-lg);
3113
+ -webkit-print-color-adjust: exact;
3114
+ }
3115
+
3116
+ @media print {
3117
+ .card {
3118
+ page-break-inside: avoid;
3119
+ break-inside: avoid;
3120
+ box-shadow: none !important;
3121
+ border: 1px solid var(--sc-base-200);
3122
+ }
3123
+ }
3124
+
3125
+ .card {
3126
+ padding: var(--sc-card-padding);
3127
+ background-color: var(--sc-card-bg);
3128
+ border-radius: var(--sc-card-rounded);
3129
+ box-shadow: var(--sc-card-shadow);
3130
+ color: var(--sc-card-color);
3131
+ }
3132
+
3133
+ /*TYPES*/
3134
+ :host([type="primary"]) {
3135
+ --sc-card-bg: var(--sc-primary);
3136
+ --sc-card-color: var(--sc-primary-content);
3137
+ --sc-border-color: var(--sc-primary-content);
3138
+ --sc-divider-opacity: 0.2;
3139
+ }
3140
+ :host([type="warning"]) {
3141
+ --sc-card-bg: var(--sc-warning);
3142
+ --sc-card-color: var(--sc-warning-content);
3143
+ --sc-border-color: var(--sc-primary-content);
3144
+ --sc-divider-opacity: 0.2;
3145
+ }
3146
+ :host([type="danger"]) {
3147
+ --sc-card-bg: var(--sc-danger);
3148
+ --sc-card-color: var(--sc-danger-content);
3149
+ --sc-border-color: var(--sc-primary-content);
3150
+ --sc-divider-opacity: 0.2;
3151
+ }
3152
+ :host([type="info"]) {
3153
+ --sc-card-bg: var(--sc-info);
3154
+ --sc-card-color: var(--sc-info-content);
3155
+ --sc-border-color: var(--sc-primary-content);
3156
+ --sc-divider-opacity: 0.2;
3157
+ }
3158
+ :host([type="success"]) {
3159
+ --sc-card-bg: var(--sc-success);
3160
+ --sc-card-color: var(--sc-success-content);
3161
+ --sc-border-color: var(--sc-primary-content);
3162
+ --sc-divider-opacity: 0.2;
3163
+ }
3164
+
3165
+ :host([type="light"]) {
3166
+ --sc-card-bg: var(--sc-base-100);
3167
+ --sc-card-color: var(--sc-base-content);
3168
+ }
3169
+
3170
+ :host([type="neutral"]) {
3171
+ --sc-card-bg: var(--sc-base-content);
3172
+ --sc-card-color: var(--sc-base);
3173
+ }
3174
+
3175
+ :host([type="invert"]) {
3176
+ --sc-card-color: var(--sc-base);
3177
+ --sc-card-bg: var(--sc-base-900);
3178
+ }
3179
+ `],Bn([U({type:String,reflect:!0})],qn.prototype,"type",2),qn=Bn([m("sonic-card")],qn);const Hn=_`
3180
+ :host {
3181
+ --sc-color: inherit;
3182
+ color: var(--sc-color);
3183
+ }
3184
+
3185
+ :host([type="primary"]) {
3186
+ --sc-color: var(--sc-primary);
3187
+ }
3188
+ :host([type="warning"]) {
3189
+ --sc-color: var(--sc-warning);
3190
+ }
3191
+ :host([type="danger"]) {
3192
+ --sc-color: var(--sc-danger);
3193
+ }
3194
+ :host([type="info"]) {
3195
+ --sc-color: var(--sc-info);
3196
+ }
3197
+ :host([type="success"]) {
3198
+ --sc-color: var(--sc-success);
3199
+ }
3200
+
3201
+ .inherit-color {
3202
+ color: var(--sc-color);
3203
+ }
3204
+ `;_`
3205
+ :host {
3206
+ --sc-color: inherit;
3207
+ --sc-bg: inherit;
3208
+ color: var(--sc-color);
3209
+ background: var(--sc-bg);
3210
+ }
3211
+
3212
+ :host([type="primary"]) {
3213
+ --sc-color: var(--sc-primary-content);
3214
+ --sc-bg: var(--sc-primary);
3215
+ }
3216
+ :host([type="warning"]) {
3217
+ --sc-color: var(--sc-warning-content);
3218
+ --sc-bg: var(--sc-warning);
3219
+ }
3220
+ :host([type="danger"]) {
3221
+ --sc-color: var(--sc-danger-content);
3222
+ --sc-bg: var(--sc-danger);
3223
+ }
3224
+ :host([type="info"]) {
3225
+ --sc-color: var(--sc-info-content);
3226
+ --sc-bg: var(--sc-info);
3227
+ }
3228
+ :host([type="success"]) {
3229
+ --sc-color: var(--sc-success-content);
3230
+ --sc-bg: var(--sc-success);
3231
+ }
3232
+
3233
+ .inherit-bg {
3234
+ color: inherit;
3235
+ }
3236
+ `;var Wn=Object.defineProperty,Kn=Object.getOwnPropertyDescriptor;let Zn=class extends Rt{render(){return xt`<slot></slot>`}};Zn.styles=[Hn,_`
3237
+ :host {
3238
+ display: table-row;
3239
+ }
3240
+
3241
+ :host([odd]) {
3242
+ background: var(--sc-table-accent-bg) !important;
3243
+ }
3244
+ :host([even]) {
3245
+ background: var(--sc-table-bg) !important;
3246
+ }
3247
+
3248
+ :host(:hover) {
3249
+ background: var(--sc-table-hover-bg) !important;
3250
+ }
3251
+ `],Zn=((t,e,s,i)=>{for(var r,o=i>1?void 0:i?Kn(e,s):e,n=t.length-1;n>=0;n--)(r=t[n])&&(o=(i?r(e,s,o):r(o))||o);return i&&o&&Wn(e,s,o),o})([m("sonic-tr")],Zn);var Yn=Object.defineProperty,Qn=Object.getOwnPropertyDescriptor,Gn=(t,e,s,i)=>{for(var r,o=i>1?void 0:i?Qn(e,s):e,n=t.length-1;n>=0;n--)(r=t[n])&&(o=(i?r(e,s,o):r(o))||o);return i&&o&&Yn(e,s,o),o};let Jn=class extends Rt{render(){const t={textAlign:this.align,minWidth:this.minWidth,maxWidth:this.maxWidth,width:this.width};return xt`<th part="th" style=${te(t)} colspan=${we(this.colSpan)} rowspan=${we(this.rowSpan)}>
3252
+ <slot></slot>
3253
+ </th> `}};Jn.styles=[Hn,_`
3254
+ :host {
3255
+ display: contents;
3256
+ background: var(--sc-table-bg);
3257
+ position: sticky;
3258
+ top: 0;
3259
+ z-index: 20;
3260
+ }
3261
+
3262
+ th {
3263
+ all: inherit;
3264
+ display: table-cell;
3265
+ border-bottom: calc(var(--sc-border-width) * 1.5) solid var(--sc-table-border-color);
3266
+ text-transform: var(--sc-table-th-tt);
3267
+ font-weight: var(--sc-table-th-fw);
3268
+ font-size: var(--sc-table-th-fs);
3269
+ padding: var(--sc-table-th-py) var(--sc-table-th-px);
3270
+ }
3271
+
3272
+ :host([noBorder]) th {
3273
+ border-bottom: none;
3274
+ }
3275
+ `],Gn([U({type:Number})],Jn.prototype,"colSpan",2),Gn([U({type:Number})],Jn.prototype,"rowSpan",2),Gn([U({type:String})],Jn.prototype,"align",2),Gn([U({type:String})],Jn.prototype,"minWidth",2),Gn([U({type:String})],Jn.prototype,"maxWidth",2),Gn([U({type:String})],Jn.prototype,"width",2),Jn=Gn([m("sonic-th")],Jn);var Xn=Object.defineProperty,ta=Object.getOwnPropertyDescriptor,ea=(t,e,s,i)=>{for(var r,o=i>1?void 0:i?ta(e,s):e,n=t.length-1;n>=0;n--)(r=t[n])&&(o=(i?r(e,s,o):r(o))||o);return i&&o&&Xn(e,s,o),o};let sa=class extends Rt{render(){const t={textAlign:this.align,verticalAlign:this.vAlign,minWidth:this.minWidth,maxWidth:this.maxWidth,width:this.width};return xt`<td part="td" style=${te(t)} colspan=${we(this.colSpan)} rowspan=${we(this.rowSpan)}>
3276
+ <slot></slot>
3277
+ </td>`}};sa.styles=[Hn,_`
3278
+ :host {
3279
+ display: contents;
3280
+ }
3281
+ td {
3282
+ all: inherit;
3283
+ display: table-cell;
3284
+ padding: var(--sc-table-td-py) var(--sc-table-td-px);
3285
+ border-top: var(--sc-table-td-border-t, none);
3286
+ border-bottom: var(--sc-table-td-border-b, none);
3287
+ border-right: var(--sc-table-td-border-r, none);
3288
+ border-left: var(--sc-table-td-border-l, none);
3289
+ }
3290
+ `],ea([U({type:Number})],sa.prototype,"colSpan",2),ea([U({type:Number})],sa.prototype,"rowSpan",2),ea([U({type:String})],sa.prototype,"align",2),ea([U({type:String})],sa.prototype,"vAlign",2),ea([U({type:String})],sa.prototype,"minWidth",2),ea([U({type:String})],sa.prototype,"maxWidth",2),ea([U({type:String})],sa.prototype,"width",2),sa=ea([m("sonic-td")],sa);var ia=Object.defineProperty,ra=Object.getOwnPropertyDescriptor;let oa=class extends Rt{render(){return xt`<slot></slot>`}};oa.styles=[_`
3291
+ :host {
3292
+ display: table-header-group;
3293
+ }
3294
+ `],oa=((t,e,s,i)=>{for(var r,o=i>1?void 0:i?ra(e,s):e,n=t.length-1;n>=0;n--)(r=t[n])&&(o=(i?r(e,s,o):r(o))||o);return i&&o&&ia(e,s,o),o})([m("sonic-thead")],oa);var na=Object.defineProperty,aa=Object.getOwnPropertyDescriptor;let la=class extends Rt{render(){return xt`<tbody part="tbody">
3295
+ <slot></slot>
3296
+ </tbody>`}};la.styles=[_`
3297
+ :host {
3298
+ display: table-row-group;
3299
+ }
3300
+
3301
+ ::slotted(sonic-tr:nth-child(odd)) {
3302
+ background: var(--sc-table-accent-bg);
3303
+ }
3304
+
3305
+ ::slotted(sonic-tr:hover) {
3306
+ background: var(--sc-table-hover-bg);
3307
+ }
3308
+
3309
+ ::slotted(sonic-tr:not(:last-child)) {
3310
+ border-bottom: var(--sc-form-border-width) solid var(--sc-base-200) !important;
3311
+ }
3312
+ `],la=((t,e,s,i)=>{for(var r,o=i>1?void 0:i?aa(e,s):e,n=t.length-1;n>=0;n--)(r=t[n])&&(o=(i?r(e,s,o):r(o))||o);return i&&o&&na(e,s,o),o})([m("sonic-tbody")],la);var ca=Object.defineProperty,ha=Object.getOwnPropertyDescriptor;let da=class extends Rt{render(){return xt`<tfoot>
3313
+ <slot></slot>
3314
+ </tfoot>`}};da.styles=[_`
3315
+ :host {
3316
+ display: contents;
3317
+ }
3318
+ `],da=((t,e,s,i)=>{for(var r,o=i>1?void 0:i?ha(e,s):e,n=t.length-1;n>=0;n--)(r=t[n])&&(o=(i?r(e,s,o):r(o))||o);return i&&o&&ca(e,s,o),o})([m("sonic-tfoot")],da);var pa=Object.defineProperty,ua=Object.getOwnPropertyDescriptor;let ga=class extends Rt{render(){return xt`<slot></slot>`}};ga.styles=[_`
3319
+ :host {
3320
+ display: table-caption;
3321
+ font-size: 0.75rem;
3322
+ color: var(--sc-table-caption-color);
3323
+ padding: var(--sc-table-td-py) var(--sc-table-td-px) calc(2 * var(--sc-table-td-py));
3324
+ }
3325
+ `],ga=((t,e,s,i)=>{for(var r,o=i>1?void 0:i?ua(e,s):e,n=t.length-1;n>=0;n--)(r=t[n])&&(o=(i?r(e,s,o):r(o))||o);return i&&o&&pa(e,s,o),o})([m("sonic-caption")],ga);var ba=Object.defineProperty,ma=Object.getOwnPropertyDescriptor,fa=(t,e,s,i)=>{for(var r,o=i>1?void 0:i?ma(e,s):e,n=t.length-1;n>=0;n--)(r=t[n])&&(o=(i?r(e,s,o):r(o))||o);return i&&o&&ba(e,s,o),o};let va=class extends Rt{constructor(){super(...arguments),this.bordered=!1,this.noCustomScroll=!1}render(){const t={maxHeight:this.maxHeight};return xt`
3326
+ <div class="table-container ${this.noCustomScroll?"":"custom-scroll"}" style=${te(t)}>
3327
+ <div class="table">
3328
+ <slot></slot>
3329
+ </div>
3330
+ </div>
3331
+ `}};va.styles=[xs,xe,_`
3332
+ :host {
3333
+ --sc-table-fw: var(--sc-font-weight-base);
3334
+ --sc-table-fst: var(--sc-font-style-base);
3335
+ --sc-table-fs: 1rem;
3336
+ --sc-table-border-color: var(--sc-border-color);
3337
+ --sc-table-caption-color: var(--sc-base-500);
3338
+ --sc-table-bg: var(--sc-base);
3339
+ --sc-table-accent-bg: var(--sc-base-50);
3340
+ --sc-table-hover-bg: var(--sc-base-100);
3341
+ --sc-table-th-fs: 0.85em;
3342
+ --sc-table-th-fw: bold;
3343
+ --sc-table-th-tt: uppercase;
3344
+ --sc-table-th-px: var(--sc-table-td-px);
3345
+ --sc-table-th-py: calc(1.8 * var(--sc-table-td-py));
3346
+ --sc-table-td-px: 0.5em;
3347
+ --sc-table-td-py: 0.5em;
3348
+ display: block;
3349
+ }
3350
+
3351
+ :host([maxHeight]) .table-container {
3352
+ overflow-x: auto;
3353
+ -webkit-overflow-scrolling: touch;
3354
+ }
3355
+
3356
+ :host(:not([maxHeight])) .table-container {
3357
+ overflow: initial !important;
3358
+ }
3359
+
3360
+ .table {
3361
+ width: 100%;
3362
+ display: table;
3363
+ box-sizing: border-box;
3364
+ }
3365
+
3366
+ :host([bordered]) .table-container {
3367
+ border: var(--sc-border-width) solid var(--sc-table-border-color) !important;
3368
+ }
3369
+ `],fa([U({type:String,reflect:!0})],va.prototype,"size",2),fa([U({type:Boolean,reflect:!0})],va.prototype,"bordered",2),fa([U({type:Boolean,reflect:!0})],va.prototype,"noCustomScroll",2),fa([U({type:String})],va.prototype,"maxHeight",2),va=fa([m("sonic-table")],va);var ya=Object.defineProperty,wa=Object.getOwnPropertyDescriptor,xa=(t,e,s,i)=>{for(var r,o=i>1?void 0:i?wa(e,s):e,n=t.length-1;n>=0;n--)(r=t[n])&&(o=(i?r(e,s,o):r(o))||o);return i&&o&&ya(e,s,o),o};let _a=class extends(Ri(Rt)){constructor(){super(...arguments),this.key="",this.action=null}connectedCallback(){const t=document.createElement("script");t.src="https://www.google.com/recaptcha/api.js?render="+this.key,document.head.appendChild(t),super.connectedCallback(),this.formPublisher=ge.get(this.getAncestorAttributeValue("headersDataProvider")??this.getAncestorAttributeValue("formDataProvider")),this.formPublisher&&(this.formPublisher.needsCaptchaValidation=!0,this.formPublisher.captchaToken.onAssign((t=>{"request_token"==t&&this.requestToken()})))}requestToken(){var t,e;if(!this.formPublisher)return;const s=(this.action??(null==(t=this.formPublisher.captchaAction)?void 0:t.get())??"submit").replace(/[^\w_/]/g,"_"),i=((null==(e=this.formPublisher.captchaMethod)?void 0:e.get())??"POST").toUpperCase();delete this.formPublisher.captchaAction,delete this.formPublisher.captchaMethod,window.grecaptcha.ready((()=>{window.grecaptcha.execute(this.key,{action:i+"//"+s}).then((t=>{this.formPublisher&&(this.formPublisher.captchaToken=t)}))}))}render(){return xt` <slot></slot> `}};xa([U()],_a.prototype,"key",2),xa([U()],_a.prototype,"action",2),_a=xa([m("sonic-captcha")],_a),window.SonicPublisherManager||(window.SonicPublisherManager=d),window.SonicDataBindObserver||(window.SonicDataBindObserver=b),window.queueMicrotask=window.queueMicrotask||function(t){Promise.resolve().then(t).catch((t=>setTimeout((()=>{throw t}))))};const ka=Ds,Aa=hn;window["concorde-components"]=window["concorde-components"]||{},window["concorde-components"]={SonicToast:ka,SonicModal:Aa}}));