@limetech/lime-crm-building-blocks 1.126.2 → 1.126.4

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 (128) hide show
  1. package/CHANGELOG.md +14 -0
  2. package/dist/cjs/{index.esm-C1i_NocP.js → index.esm-BSgM4tyh.js} +17 -17
  3. package/dist/cjs/{lime-query-validation-DOruuzFE.js → lime-query-validation-DhL0xwur.js} +1 -1
  4. package/dist/cjs/limebb-browser.cjs.entry.js +1 -1
  5. package/dist/cjs/limebb-chat-icon-list_3.cjs.entry.js +1 -1
  6. package/dist/cjs/limebb-chat-list.cjs.entry.js +1 -1
  7. package/dist/cjs/limebb-component-config.cjs.entry.js +1 -1
  8. package/dist/cjs/limebb-component-picker.cjs.entry.js +1 -1
  9. package/dist/cjs/limebb-composer-toolbar.cjs.entry.js +1 -1
  10. package/dist/cjs/limebb-currency-picker.cjs.entry.js +1 -1
  11. package/dist/cjs/limebb-data-cells.cjs.entry.js +1 -1
  12. package/dist/cjs/limebb-date-picker.cjs.entry.js +1 -1
  13. package/dist/cjs/limebb-feed-timeline-item.cjs.entry.js +1 -1
  14. package/dist/cjs/limebb-feed.cjs.entry.js +1 -1
  15. package/dist/cjs/limebb-icon-picker.cjs.entry.js +5 -0
  16. package/dist/cjs/limebb-info-tile.cjs.entry.js +2 -2
  17. package/dist/cjs/limebb-kanban-group.cjs.entry.js +1 -1
  18. package/dist/cjs/limebb-kanban-item.cjs.entry.js +1 -1
  19. package/dist/cjs/limebb-lime-query-builder.cjs.entry.js +2 -2
  20. package/dist/cjs/limebb-lime-query-filter-builder_3.cjs.entry.js +2 -2
  21. package/dist/cjs/limebb-lime-query-filter-comparison_2.cjs.entry.js +1 -1
  22. package/dist/cjs/limebb-lime-query-filter-group_3.cjs.entry.js +1 -1
  23. package/dist/cjs/limebb-lime-query-response-format-builder.cjs.entry.js +2 -2
  24. package/dist/cjs/limebb-limeobject-file-viewer.cjs.entry.js +1 -1
  25. package/dist/cjs/limebb-loader.cjs.entry.js +1 -1
  26. package/dist/cjs/limebb-locale-picker.cjs.entry.js +1 -1
  27. package/dist/cjs/limebb-mention.cjs.entry.js +1 -1
  28. package/dist/cjs/limebb-notification-item.cjs.entry.js +1 -1
  29. package/dist/cjs/limebb-notification-list.cjs.entry.js +1 -1
  30. package/dist/cjs/limebb-object-chip.cjs.entry.js +3 -3
  31. package/dist/cjs/limebb-percentage-visualizer.cjs.entry.js +1 -1
  32. package/dist/cjs/limebb-property-selector.cjs.entry.js +2 -2
  33. package/dist/cjs/limebb-rule-chip-popover.cjs.entry.js +1 -1
  34. package/dist/cjs/limebb-rule-editor.cjs.entry.js +1 -1
  35. package/dist/cjs/limebb-rule-gate.cjs.entry.js +13 -4
  36. package/dist/cjs/limebb-text-editor.cjs.entry.js +11 -6
  37. package/dist/cjs/limebb-trend-indicator.cjs.entry.js +1 -1
  38. package/dist/cjs/{limetype-BlG0Apxb.js → limetype-DQeJRVNw.js} +1 -1
  39. package/dist/collection/components/dashboard-widget/dashboard-widget.js +1 -1
  40. package/dist/collection/components/info-tile/info-tile.js +1 -1
  41. package/dist/collection/components/rule-gate/rule-gate.js +12 -3
  42. package/dist/collection/components/summary-popover/summary-popover.js +1 -1
  43. package/dist/collection/components/text-editor/mentions.js +7 -2
  44. package/dist/collection/components/text-editor/text-editor.js +2 -2
  45. package/dist/components/index.esm.js +1 -1
  46. package/dist/components/limebb-icon-picker.js +1 -1
  47. package/dist/components/limebb-object-chip.js +1 -1
  48. package/dist/components/limebb-rule-gate.js +1 -1
  49. package/dist/components/limebb-text-editor.js +1 -1
  50. package/dist/esm/{index.esm-CMeGYws2.js → index.esm-oW1YVf33.js} +17 -17
  51. package/dist/esm/{lime-query-validation-DvCLebd2.js → lime-query-validation-C3jEHfxk.js} +1 -1
  52. package/dist/esm/limebb-browser.entry.js +1 -1
  53. package/dist/esm/limebb-chat-icon-list_3.entry.js +1 -1
  54. package/dist/esm/limebb-chat-list.entry.js +1 -1
  55. package/dist/esm/limebb-component-config.entry.js +1 -1
  56. package/dist/esm/limebb-component-picker.entry.js +1 -1
  57. package/dist/esm/limebb-composer-toolbar.entry.js +1 -1
  58. package/dist/esm/limebb-currency-picker.entry.js +1 -1
  59. package/dist/esm/limebb-data-cells.entry.js +1 -1
  60. package/dist/esm/limebb-date-picker.entry.js +1 -1
  61. package/dist/esm/limebb-feed-timeline-item.entry.js +1 -1
  62. package/dist/esm/limebb-feed.entry.js +1 -1
  63. package/dist/esm/limebb-icon-picker.entry.js +5 -0
  64. package/dist/esm/limebb-info-tile.entry.js +2 -2
  65. package/dist/esm/limebb-kanban-group.entry.js +1 -1
  66. package/dist/esm/limebb-kanban-item.entry.js +1 -1
  67. package/dist/esm/limebb-lime-query-builder.entry.js +2 -2
  68. package/dist/esm/limebb-lime-query-filter-builder_3.entry.js +2 -2
  69. package/dist/esm/limebb-lime-query-filter-comparison_2.entry.js +1 -1
  70. package/dist/esm/limebb-lime-query-filter-group_3.entry.js +1 -1
  71. package/dist/esm/limebb-lime-query-response-format-builder.entry.js +2 -2
  72. package/dist/esm/limebb-limeobject-file-viewer.entry.js +1 -1
  73. package/dist/esm/limebb-loader.entry.js +1 -1
  74. package/dist/esm/limebb-locale-picker.entry.js +1 -1
  75. package/dist/esm/limebb-mention.entry.js +1 -1
  76. package/dist/esm/limebb-notification-item.entry.js +1 -1
  77. package/dist/esm/limebb-notification-list.entry.js +1 -1
  78. package/dist/esm/limebb-object-chip.entry.js +3 -3
  79. package/dist/esm/limebb-percentage-visualizer.entry.js +1 -1
  80. package/dist/esm/limebb-property-selector.entry.js +2 -2
  81. package/dist/esm/limebb-rule-chip-popover.entry.js +1 -1
  82. package/dist/esm/limebb-rule-editor.entry.js +1 -1
  83. package/dist/esm/limebb-rule-gate.entry.js +13 -4
  84. package/dist/esm/limebb-text-editor.entry.js +11 -6
  85. package/dist/esm/limebb-trend-indicator.entry.js +1 -1
  86. package/dist/esm/{limetype-DvPoeXt-.js → limetype-CBSX93Mo.js} +1 -1
  87. package/dist/lime-crm-building-blocks/lime-crm-building-blocks.esm.js +1 -1
  88. package/dist/lime-crm-building-blocks/{p-b978301b.entry.js → p-01ecd249.entry.js} +1 -1
  89. package/dist/lime-crm-building-blocks/{p-610dae2e.entry.js → p-0ee533c9.entry.js} +1 -1
  90. package/dist/lime-crm-building-blocks/{p-9f03e766.entry.js → p-148fe32c.entry.js} +1 -1
  91. package/dist/lime-crm-building-blocks/{p-10ddd002.entry.js → p-16d36b76.entry.js} +1 -1
  92. package/dist/lime-crm-building-blocks/{p-ef62c7d8.entry.js → p-25d8a718.entry.js} +1 -1
  93. package/dist/lime-crm-building-blocks/{p-ea461bb7.entry.js → p-38c2fe60.entry.js} +1 -1
  94. package/dist/lime-crm-building-blocks/{p-25234f4b.entry.js → p-3e4cc2a1.entry.js} +1 -1
  95. package/dist/lime-crm-building-blocks/{p-e468e359.entry.js → p-3fd4e0a1.entry.js} +1 -1
  96. package/dist/lime-crm-building-blocks/{p-30778dac.entry.js → p-4e5f55aa.entry.js} +1 -1
  97. package/dist/lime-crm-building-blocks/{p-7975c91f.entry.js → p-4f1eca0d.entry.js} +1 -1
  98. package/dist/lime-crm-building-blocks/{p-d026068f.entry.js → p-50e5c571.entry.js} +1 -1
  99. package/dist/lime-crm-building-blocks/{p-993991af.entry.js → p-5496f907.entry.js} +1 -1
  100. package/dist/lime-crm-building-blocks/{p-beae8aa1.entry.js → p-56a65792.entry.js} +1 -1
  101. package/dist/lime-crm-building-blocks/{p-89170cc9.entry.js → p-5b830c09.entry.js} +1 -1
  102. package/dist/lime-crm-building-blocks/{p-2a05b949.entry.js → p-5c5788de.entry.js} +1 -1
  103. package/dist/lime-crm-building-blocks/p-6226829d.entry.js +1 -0
  104. package/dist/lime-crm-building-blocks/{p-d1c61830.entry.js → p-625623b7.entry.js} +1 -1
  105. package/dist/lime-crm-building-blocks/{p-99054b73.entry.js → p-6af7d0d2.entry.js} +1 -1
  106. package/dist/lime-crm-building-blocks/{p-99790629.entry.js → p-7759fc0c.entry.js} +1 -1
  107. package/dist/lime-crm-building-blocks/{p-7ace2e41.entry.js → p-7cc615c8.entry.js} +1 -1
  108. package/dist/lime-crm-building-blocks/{p-92738a30.entry.js → p-82af1ade.entry.js} +1 -1
  109. package/dist/lime-crm-building-blocks/{p-49b8a9ca.entry.js → p-885592cc.entry.js} +1 -1
  110. package/dist/lime-crm-building-blocks/p-8c8bbbd4.entry.js +1 -0
  111. package/dist/lime-crm-building-blocks/{p-c43dc121.entry.js → p-931ef83d.entry.js} +1 -1
  112. package/dist/lime-crm-building-blocks/{p-1955495c.entry.js → p-9bc6a1b7.entry.js} +1 -1
  113. package/dist/lime-crm-building-blocks/{p-CI7dwT4T.js → p-GT4hqR5i.js} +1 -1
  114. package/dist/lime-crm-building-blocks/{p-CYiNR7pQ.js → p-VjTMZY3E.js} +1 -1
  115. package/dist/lime-crm-building-blocks/{p-9ccd9d7f.entry.js → p-a06a01fc.entry.js} +1 -1
  116. package/dist/lime-crm-building-blocks/{p-a3439b73.entry.js → p-a9ffe56f.entry.js} +1 -1
  117. package/dist/lime-crm-building-blocks/{p-d33efebb.entry.js → p-b328389c.entry.js} +1 -1
  118. package/dist/lime-crm-building-blocks/{p-a634c792.entry.js → p-bb3f1fa5.entry.js} +1 -1
  119. package/dist/lime-crm-building-blocks/{p-47799e80.entry.js → p-cf76665c.entry.js} +1 -1
  120. package/dist/lime-crm-building-blocks/{p-65ea94b4.entry.js → p-e6374017.entry.js} +1 -1
  121. package/dist/lime-crm-building-blocks/{p-c3a72b03.entry.js → p-e79208ba.entry.js} +1 -1
  122. package/dist/lime-crm-building-blocks/{p-62b247c1.entry.js → p-faa89d77.entry.js} +1 -1
  123. package/dist/lime-crm-building-blocks/{p-e1e1e2d1.entry.js → p-fe4811a1.entry.js} +1 -1
  124. package/dist/lime-crm-building-blocks/{p-D5qhls4G.js → p-ndni-0im.js} +1 -1
  125. package/dist/types/components/text-editor/mentions.d.ts +3 -1
  126. package/package.json +5 -5
  127. package/dist/lime-crm-building-blocks/p-006b6449.entry.js +0 -1
  128. package/dist/lime-crm-building-blocks/p-6093254e.entry.js +0 -1
@@ -1 +1 @@
1
- import{r as t,h as e,H as i,g as r}from"./p-BIwHMk6j.js";import{b as n}from"./p-D5qhls4G.js";function o(t){return"type"in t&&"iconList"===t.type}function a(t){if("chat"===t.type||"iconList"===t.type)return t.item.timestamp}function s(t){for(const e of t.items)o(e)?t.processedItems.push({type:"iconList",item:e}):t.processedItems.push({type:"chat",item:e});return t}function l(t){if(!t.lastVisitedTimestamp)return t;const e=t.processedItems,i=t.lastVisitedTimestamp;for(let r=e.length-1;r>=0;r--){const n=e[r];if("group"!==n.type)continue;const o=c(n.items,i);if(-1!==o)return h(t,e,r,n,o)}return t}function c(t,e){for(let i=t.length-1;i>=0;i--){const r=a(t[i]);if(void 0!==r&&new Date(r)<=e)return i}return-1}function h(t,e,i,r,n){const o=n===r.items.length-1;if(o&&i===e.length-1)return t;if(o)return Object.assign(Object.assign({},t),{processedItems:[...e.slice(0,i+1),{type:"newItemIndicator"},...e.slice(i+1)]});const a=[...r.items.slice(0,n+1),{type:"newItemIndicator"},...r.items.slice(n+1)];return Object.assign(Object.assign({},t),{processedItems:[...e.slice(0,i),Object.assign(Object.assign({},r),{items:a}),...e.slice(i+1)]})}function d(t){const e=[];let i=null,r=null;for(const n of t.processedItems){if("chat"!==n.type&&"iconList"!==n.type)continue;const o=t.dateTimeFormatter.format(new Date(n.item.timestamp),"date");o===r?null==i||i.items.push(n):(i&&e.push(i),i={type:"group",groupType:"dateGroup",heading:o,items:[n]},r=o)}return i&&e.push(i),Object.assign(Object.assign({},t),{processedItems:e})}class m{constructor(t,e,i){this.scrollContainer=t,this.getOrder=e,this.isSticky=!0,this.paintedOrder=i}beforeRender(){this.scrollContainer.isConnected&&(this.isSticky=this.distanceFromNewestEdge(this.paintedOrder)<50)}afterRender(){this.scrollContainer.isConnected&&(this.paintedOrder=this.getOrder(),this.isSticky&&this.scrollToNewest())}repinIfSticky(){this.scrollContainer.isConnected&&this.isSticky&&this.scrollToNewest()}scrollToNewest(){const t="oldest-on-top"===this.getOrder()?this.scrollContainer.scrollHeight:0;this.scrollContainer.scrollTop!==t&&(this.scrollContainer.scrollTop=t)}distanceFromNewestEdge(t){return"oldest-on-top"===t?this.scrollContainer.scrollHeight-this.scrollContainer.scrollTop-this.scrollContainer.clientHeight:this.scrollContainer.scrollTop}}const p="grid-template-rows",g=class{constructor(e){var i;t(this,e),this.items=[],this.order="oldest-on-top",this.processedItems=[],this.handleHeightTransitionEnd=(i=()=>{var t;return null===(t=this.scrollAnchor)||void 0===t?void 0:t.repinIfSticky()},t=>{t.propertyName===p&&i()})}handleItemsChange(){let t=null;var e;this.lastVisitedTimestamp&&(t="string"==typeof(e=this.lastVisitedTimestamp)?new Date(Date.parse(e)):new Date(e));const i=(r={items:this.items,processedItems:[],lastVisitedTimestamp:t,dateTimeFormatter:this.dateTimeFormatter},[s,d,l].reduce(((t,e)=>e(t)),r)).processedItems;var r;this.processedItems="newest-on-top"===this.order?i.toReversed().map((t=>"group"!==t.type?t:Object.assign(Object.assign({},t),{items:t.items.toReversed()}))):i}componentWillLoad(){this.handleItemsChange(),this.scrollAnchor=new m(this.host,(()=>this.order),this.order)}componentDidLoad(){var t;!function(t){if(!t)return;const e=globalThis.getComputedStyle(t).transitionProperty;if(!e)return;const i=new Set(e.split(",").map((t=>t.trim())));i.has("all")||i.has(p)||console.warn(`[limebb-chat-list] Typing indicator is transitioning \`${e}\` instead of \`${p}\`. The auto-scroll on indicator appearance will not fire. Update the CSS or the handler so they match.`)}(null===(t=this.host.shadowRoot)||void 0===t?void 0:t.querySelector(".typing-indicator-height-animation"))}componentWillRender(){0!==this.items.length&&this.scrollAnchor.beforeRender()}componentDidRender(){0!==this.items.length&&this.scrollAnchor.afterRender()}render(){return e(i,{key:"1684ed7ba9da966e3c8b8c1c9615738b825b28fa",class:{"is-empty":0===this.items.length&&!this.isTypingIndicatorVisible},"aria-busy":this.isBusy(),role:"log"},this.renderSpinner(),"newest-on-top"===this.order&&this.renderTypingIndicatorBlock(),this.renderChatItems(),"oldest-on-top"===this.order&&this.renderTypingIndicatorBlock())}renderSpinner(){if(this.loading)return e("limel-spinner",null)}renderTypingIndicatorBlock(){return e("div",{class:"typing-indicator-height-animation",onTransitionEnd:this.handleHeightTransitionEnd},e("div",null,this.renderTypingIndicator()))}renderTypingIndicator(){if(this.isTypingIndicatorVisible)return e("limebb-typing-indicator",null)}renderChatItems(){return this.processedItems.map((t=>{switch(t.type){case"group":return this.renderGroup(t);case"newItemIndicator":return this.renderIndicator();case"chat":case"iconList":return null;default:return b(t)}}))}renderGroup(t){const i=t.items.map((t=>{switch(t.type){case"chat":return this.renderChatItem(t.item);case"iconList":return this.renderIconList(t.item);case"newItemIndicator":return this.renderIndicator();case"group":return null;default:return b(t)}})),r="date-group-"+t.heading,n=`heading-${r}`.replaceAll(/[^a-zA-Z0-9_-]/g,"_"),o=e("a",{id:n,class:"date-heading",role:"heading","aria-level":2},t.heading);return e("section",{class:"date-group",key:r,"aria-labelledby":n},o,i)}renderChatItem(t){return e("limebb-chat-item",{platform:this.platform,context:this.context,item:t,helperText:t.helperText,hasError:t.hasError,key:t.id})}renderIconList(t){return e("limebb-chat-icon-list",{item:t,key:t.id})}renderIndicator(){return e("div",{class:"new-items-indicator",role:"separator"},e("hr",null),e("h3",null,this.translator.get("webclient.new")))}isBusy(){return this.loading||this.isTypingIndicatorVisible?"true":"false"}get dateTimeFormatter(){return this.platform.get(n.DateTimeFormatter)}get translator(){return this.platform.get(n.Translate)}get host(){return r(this)}static get watchers(){return{items:[{handleItemsChange:0}],order:[{handleItemsChange:0}]}}};function b(t){throw new Error(`Unexpected value in exhaustive switch: ${JSON.stringify(t)}`)}g.style='@charset "UTF-8";:host(limebb-chat-list){--limel-top-edge-fade-height:0.75rem;isolation:isolate;--limel-overflow-mask-vertical:linear-gradient( to bottom, transparent 0%, black calc(0% + var(--limel-top-edge-fade-height, 1rem)), black calc(100% - var(--limel-bottom-edge-fade-height, 1rem)), transparent 100% );-webkit-mask-image:var(--limel-overflow-mask-vertical);mask-image:var(--limel-overflow-mask-vertical);padding-top:var(--limel-top-edge-fade-height, 1rem);padding-bottom:var(--limel-bottom-edge-fade-height, 1rem);box-sizing:border-box;display:flex;flex-direction:column;gap:0.5rem;height:100%;width:100%;min-width:0;min-height:0;padding:var(--limel-top-edge-fade-height) 0.5rem;overflow:hidden auto}:host(limebb-chat-list.is-empty){padding:0}*{box-sizing:border-box}limel-spinner{align-self:center;justify-self:center;margin:auto}.date-group{isolation:isolate;display:flex;flex-direction:inherit;gap:0.5rem}.date-heading{position:sticky;z-index:1;top:0.25rem;display:flex;border-radius:9rem;padding:0.25rem 0.5rem;margin:0 auto;width:fit-content;font-size:0.75rem;line-height:1;color:rgb(var(--contrast-900));backdrop-filter:blur(0.5rem);-webkit-backdrop-filter:blur(0.5rem);transition:color 0.2s ease, border-color 0.4s ease}.date-heading:hover{color:rgb(var(--contrast-1000));border-color:rgb(var(--contrast-500))}.date-heading:hover:before{opacity:1}.date-heading:before{transition:opacity 0.2s ease;content:"";position:absolute;z-index:-1;inset:0;opacity:0.6;border-radius:inherit;background-color:rgb(var(--contrast-100))}.new-items-indicator{position:relative;isolation:isolate;display:flex;align-items:center;justify-content:flex-end;margin:0.25rem 0}.new-items-indicator hr{border:none;position:absolute;width:100%;height:1px;background-color:rgb(var(--color-red-lighter))}.new-items-indicator h3{z-index:1;padding:0 0.5rem;border-radius:1rem;margin:0 1rem;font-size:small;line-height:0.75rem;text-transform:lowercase;color:rgb(var(--color-red-default));background-color:rgb(var(--contrast-100))}.typing-indicator-height-animation{--limebb-chat-typing-opacity-transition-speed:0.1s;--limebb-chat-typing-opacity-transition-delay:0s;--limebb-chat-typing-grid-template-rows-transition-speed:0.3s;position:sticky;z-index:1;transition:grid-template-rows var(--limebb-chat-typing-grid-template-rows-transition-speed) ease;display:grid;grid-template-rows:0}.typing-indicator-height-animation div{transition:opacity var(--limebb-chat-typing-opacity-transition-speed) ease var(--limebb-chat-typing-opacity-transition-delay);overflow:hidden;opacity:0}:host(limebb-chat-list[order=oldest-on-top]) .typing-indicator-height-animation{bottom:0}:host(limebb-chat-list[order=newest-on-top]) .typing-indicator-height-animation{top:0}:host(limebb-chat-list[is-typing-indicator-visible]) .typing-indicator-height-animation{--limebb-chat-typing-opacity-transition-speed:0.4s;--limebb-chat-typing-opacity-transition-delay:0.3s;--limebb-chat-typing-grid-template-rows-transition-speed:0.46s;grid-template-rows:1.5rem}:host(limebb-chat-list[is-typing-indicator-visible]) .typing-indicator-height-animation div{opacity:1}.date-group limebb-chat-item{--limebb-promoted-action-bar-grid-template-rows:0fr}:host(limebb-chat-list[order=oldest-on-top]) .date-group:last-of-type limebb-chat-item:last-of-type{--limebb-promoted-action-bar-grid-template-rows:1fr}:host(limebb-chat-list[order=newest-on-top]) .date-group:first-of-type limebb-chat-item:first-of-type{--limebb-promoted-action-bar-grid-template-rows:1fr}';export{g as limebb_chat_list}
1
+ import{r as t,h as e,H as i,g as r}from"./p-BIwHMk6j.js";import{b as n}from"./p-ndni-0im.js";function o(t){return"type"in t&&"iconList"===t.type}function a(t){if("chat"===t.type||"iconList"===t.type)return t.item.timestamp}function s(t){for(const e of t.items)o(e)?t.processedItems.push({type:"iconList",item:e}):t.processedItems.push({type:"chat",item:e});return t}function l(t){if(!t.lastVisitedTimestamp)return t;const e=t.processedItems,i=t.lastVisitedTimestamp;for(let r=e.length-1;r>=0;r--){const n=e[r];if("group"!==n.type)continue;const o=c(n.items,i);if(-1!==o)return h(t,e,r,n,o)}return t}function c(t,e){for(let i=t.length-1;i>=0;i--){const r=a(t[i]);if(void 0!==r&&new Date(r)<=e)return i}return-1}function h(t,e,i,r,n){const o=n===r.items.length-1;if(o&&i===e.length-1)return t;if(o)return Object.assign(Object.assign({},t),{processedItems:[...e.slice(0,i+1),{type:"newItemIndicator"},...e.slice(i+1)]});const a=[...r.items.slice(0,n+1),{type:"newItemIndicator"},...r.items.slice(n+1)];return Object.assign(Object.assign({},t),{processedItems:[...e.slice(0,i),Object.assign(Object.assign({},r),{items:a}),...e.slice(i+1)]})}function d(t){const e=[];let i=null,r=null;for(const n of t.processedItems){if("chat"!==n.type&&"iconList"!==n.type)continue;const o=t.dateTimeFormatter.format(new Date(n.item.timestamp),"date");o===r?null==i||i.items.push(n):(i&&e.push(i),i={type:"group",groupType:"dateGroup",heading:o,items:[n]},r=o)}return i&&e.push(i),Object.assign(Object.assign({},t),{processedItems:e})}class m{constructor(t,e,i){this.scrollContainer=t,this.getOrder=e,this.isSticky=!0,this.paintedOrder=i}beforeRender(){this.scrollContainer.isConnected&&(this.isSticky=this.distanceFromNewestEdge(this.paintedOrder)<50)}afterRender(){this.scrollContainer.isConnected&&(this.paintedOrder=this.getOrder(),this.isSticky&&this.scrollToNewest())}repinIfSticky(){this.scrollContainer.isConnected&&this.isSticky&&this.scrollToNewest()}scrollToNewest(){const t="oldest-on-top"===this.getOrder()?this.scrollContainer.scrollHeight:0;this.scrollContainer.scrollTop!==t&&(this.scrollContainer.scrollTop=t)}distanceFromNewestEdge(t){return"oldest-on-top"===t?this.scrollContainer.scrollHeight-this.scrollContainer.scrollTop-this.scrollContainer.clientHeight:this.scrollContainer.scrollTop}}const p="grid-template-rows",g=class{constructor(e){var i;t(this,e),this.items=[],this.order="oldest-on-top",this.processedItems=[],this.handleHeightTransitionEnd=(i=()=>{var t;return null===(t=this.scrollAnchor)||void 0===t?void 0:t.repinIfSticky()},t=>{t.propertyName===p&&i()})}handleItemsChange(){let t=null;var e;this.lastVisitedTimestamp&&(t="string"==typeof(e=this.lastVisitedTimestamp)?new Date(Date.parse(e)):new Date(e));const i=(r={items:this.items,processedItems:[],lastVisitedTimestamp:t,dateTimeFormatter:this.dateTimeFormatter},[s,d,l].reduce(((t,e)=>e(t)),r)).processedItems;var r;this.processedItems="newest-on-top"===this.order?i.toReversed().map((t=>"group"!==t.type?t:Object.assign(Object.assign({},t),{items:t.items.toReversed()}))):i}componentWillLoad(){this.handleItemsChange(),this.scrollAnchor=new m(this.host,(()=>this.order),this.order)}componentDidLoad(){var t;!function(t){if(!t)return;const e=globalThis.getComputedStyle(t).transitionProperty;if(!e)return;const i=new Set(e.split(",").map((t=>t.trim())));i.has("all")||i.has(p)||console.warn(`[limebb-chat-list] Typing indicator is transitioning \`${e}\` instead of \`${p}\`. The auto-scroll on indicator appearance will not fire. Update the CSS or the handler so they match.`)}(null===(t=this.host.shadowRoot)||void 0===t?void 0:t.querySelector(".typing-indicator-height-animation"))}componentWillRender(){0!==this.items.length&&this.scrollAnchor.beforeRender()}componentDidRender(){0!==this.items.length&&this.scrollAnchor.afterRender()}render(){return e(i,{key:"1684ed7ba9da966e3c8b8c1c9615738b825b28fa",class:{"is-empty":0===this.items.length&&!this.isTypingIndicatorVisible},"aria-busy":this.isBusy(),role:"log"},this.renderSpinner(),"newest-on-top"===this.order&&this.renderTypingIndicatorBlock(),this.renderChatItems(),"oldest-on-top"===this.order&&this.renderTypingIndicatorBlock())}renderSpinner(){if(this.loading)return e("limel-spinner",null)}renderTypingIndicatorBlock(){return e("div",{class:"typing-indicator-height-animation",onTransitionEnd:this.handleHeightTransitionEnd},e("div",null,this.renderTypingIndicator()))}renderTypingIndicator(){if(this.isTypingIndicatorVisible)return e("limebb-typing-indicator",null)}renderChatItems(){return this.processedItems.map((t=>{switch(t.type){case"group":return this.renderGroup(t);case"newItemIndicator":return this.renderIndicator();case"chat":case"iconList":return null;default:return b(t)}}))}renderGroup(t){const i=t.items.map((t=>{switch(t.type){case"chat":return this.renderChatItem(t.item);case"iconList":return this.renderIconList(t.item);case"newItemIndicator":return this.renderIndicator();case"group":return null;default:return b(t)}})),r="date-group-"+t.heading,n=`heading-${r}`.replaceAll(/[^a-zA-Z0-9_-]/g,"_"),o=e("a",{id:n,class:"date-heading",role:"heading","aria-level":2},t.heading);return e("section",{class:"date-group",key:r,"aria-labelledby":n},o,i)}renderChatItem(t){return e("limebb-chat-item",{platform:this.platform,context:this.context,item:t,helperText:t.helperText,hasError:t.hasError,key:t.id})}renderIconList(t){return e("limebb-chat-icon-list",{item:t,key:t.id})}renderIndicator(){return e("div",{class:"new-items-indicator",role:"separator"},e("hr",null),e("h3",null,this.translator.get("webclient.new")))}isBusy(){return this.loading||this.isTypingIndicatorVisible?"true":"false"}get dateTimeFormatter(){return this.platform.get(n.DateTimeFormatter)}get translator(){return this.platform.get(n.Translate)}get host(){return r(this)}static get watchers(){return{items:[{handleItemsChange:0}],order:[{handleItemsChange:0}]}}};function b(t){throw new Error(`Unexpected value in exhaustive switch: ${JSON.stringify(t)}`)}g.style='@charset "UTF-8";:host(limebb-chat-list){--limel-top-edge-fade-height:0.75rem;isolation:isolate;--limel-overflow-mask-vertical:linear-gradient( to bottom, transparent 0%, black calc(0% + var(--limel-top-edge-fade-height, 1rem)), black calc(100% - var(--limel-bottom-edge-fade-height, 1rem)), transparent 100% );-webkit-mask-image:var(--limel-overflow-mask-vertical);mask-image:var(--limel-overflow-mask-vertical);padding-top:var(--limel-top-edge-fade-height, 1rem);padding-bottom:var(--limel-bottom-edge-fade-height, 1rem);box-sizing:border-box;display:flex;flex-direction:column;gap:0.5rem;height:100%;width:100%;min-width:0;min-height:0;padding:var(--limel-top-edge-fade-height) 0.5rem;overflow:hidden auto}:host(limebb-chat-list.is-empty){padding:0}*{box-sizing:border-box}limel-spinner{align-self:center;justify-self:center;margin:auto}.date-group{isolation:isolate;display:flex;flex-direction:inherit;gap:0.5rem}.date-heading{position:sticky;z-index:1;top:0.25rem;display:flex;border-radius:9rem;padding:0.25rem 0.5rem;margin:0 auto;width:fit-content;font-size:0.75rem;line-height:1;color:rgb(var(--contrast-900));backdrop-filter:blur(0.5rem);-webkit-backdrop-filter:blur(0.5rem);transition:color 0.2s ease, border-color 0.4s ease}.date-heading:hover{color:rgb(var(--contrast-1000));border-color:rgb(var(--contrast-500))}.date-heading:hover:before{opacity:1}.date-heading:before{transition:opacity 0.2s ease;content:"";position:absolute;z-index:-1;inset:0;opacity:0.6;border-radius:inherit;background-color:rgb(var(--contrast-100))}.new-items-indicator{position:relative;isolation:isolate;display:flex;align-items:center;justify-content:flex-end;margin:0.25rem 0}.new-items-indicator hr{border:none;position:absolute;width:100%;height:1px;background-color:rgb(var(--color-red-lighter))}.new-items-indicator h3{z-index:1;padding:0 0.5rem;border-radius:1rem;margin:0 1rem;font-size:small;line-height:0.75rem;text-transform:lowercase;color:rgb(var(--color-red-default));background-color:rgb(var(--contrast-100))}.typing-indicator-height-animation{--limebb-chat-typing-opacity-transition-speed:0.1s;--limebb-chat-typing-opacity-transition-delay:0s;--limebb-chat-typing-grid-template-rows-transition-speed:0.3s;position:sticky;z-index:1;transition:grid-template-rows var(--limebb-chat-typing-grid-template-rows-transition-speed) ease;display:grid;grid-template-rows:0}.typing-indicator-height-animation div{transition:opacity var(--limebb-chat-typing-opacity-transition-speed) ease var(--limebb-chat-typing-opacity-transition-delay);overflow:hidden;opacity:0}:host(limebb-chat-list[order=oldest-on-top]) .typing-indicator-height-animation{bottom:0}:host(limebb-chat-list[order=newest-on-top]) .typing-indicator-height-animation{top:0}:host(limebb-chat-list[is-typing-indicator-visible]) .typing-indicator-height-animation{--limebb-chat-typing-opacity-transition-speed:0.4s;--limebb-chat-typing-opacity-transition-delay:0.3s;--limebb-chat-typing-grid-template-rows-transition-speed:0.46s;grid-template-rows:1.5rem}:host(limebb-chat-list[is-typing-indicator-visible]) .typing-indicator-height-animation div{opacity:1}.date-group limebb-chat-item{--limebb-promoted-action-bar-grid-template-rows:0fr}:host(limebb-chat-list[order=oldest-on-top]) .date-group:last-of-type limebb-chat-item:last-of-type{--limebb-promoted-action-bar-grid-template-rows:1fr}:host(limebb-chat-list[order=newest-on-top]) .date-group:first-of-type limebb-chat-item:first-of-type{--limebb-promoted-action-bar-grid-template-rows:1fr}';export{g as limebb_chat_list}
@@ -1 +1 @@
1
- import{r as e,c as r,h as n}from"./p-BIwHMk6j.js";import{b as i}from"./p-D5qhls4G.js";import{i as c}from"./p-CkTg5UPD.js";var u,a,o,t,s,d,l,m,b={},g={exports:{}};function y(){if(o)return g.exports;o=1;var e=g.exports=function(r,n){if("function"==typeof r||n)return e.by(r,n);for(var i={object:[],function:[],string:{},number:{},boolean:{},undefined:{}},c=[],u=0;u<r.length;u++){var a=r[u],o="__proto__"===a?i.objects:i[typeof a]||i.objects;Array.isArray(o)?o.indexOf(a)<0&&(o.push(a),c.push(a)):Object.hasOwnProperty.call(o,a)||(o[a]=!0,c.push(a))}return c};return e.by=function(e,r){if("function"==typeof e){var n=r;r=e,e=n}for(var i=[],c=0;c<e.length;c++){for(var u=e[c],a=!1,o=0;o<i.length;o++)if(r.call(i,u,i[o])){a=!0;break}a||i.push(u)}return i},g.exports}function h(){return s?t:(s=1,t=[{code:"AED",number:"784",digits:2,currency:"UAE Dirham",countries:["United Arab Emirates (The)"]},{code:"AFN",number:"971",digits:2,currency:"Afghani",countries:["Afghanistan"]},{code:"ALL",number:"008",digits:2,currency:"Lek",countries:["Albania"]},{code:"AMD",number:"051",digits:2,currency:"Armenian Dram",countries:["Armenia"]},{code:"ANG",number:"532",digits:2,currency:"Netherlands Antillean Guilder",countries:["Curaçao","Sint Maarten (Dutch Part)"]},{code:"AOA",number:"973",digits:2,currency:"Kwanza",countries:["Angola"]},{code:"ARS",number:"032",digits:2,currency:"Argentine Peso",countries:["Argentina"]},{code:"AUD",number:"036",digits:2,currency:"Australian Dollar",countries:["Australia","Christmas Island","Cocos (Keeling) Islands (The)","Heard Island and Mcdonald Islands","Kiribati","Nauru","Norfolk Island","Tuvalu"]},{code:"AWG",number:"533",digits:2,currency:"Aruban Florin",countries:["Aruba"]},{code:"AZN",number:"944",digits:2,currency:"Azerbaijan Manat",countries:["Azerbaijan"]},{code:"BAM",number:"977",digits:2,currency:"Convertible Mark",countries:["Bosnia and Herzegovina"]},{code:"BBD",number:"052",digits:2,currency:"Barbados Dollar",countries:["Barbados"]},{code:"BDT",number:"050",digits:2,currency:"Taka",countries:["Bangladesh"]},{code:"BGN",number:"975",digits:2,currency:"Bulgarian Lev",countries:["Bulgaria"]},{code:"BHD",number:"048",digits:3,currency:"Bahraini Dinar",countries:["Bahrain"]},{code:"BIF",number:"108",digits:0,currency:"Burundi Franc",countries:["Burundi"]},{code:"BMD",number:"060",digits:2,currency:"Bermudian Dollar",countries:["Bermuda"]},{code:"BND",number:"096",digits:2,currency:"Brunei Dollar",countries:["Brunei Darussalam"]},{code:"BOB",number:"068",digits:2,currency:"Boliviano",countries:["Bolivia (Plurinational State Of)"]},{code:"BOV",number:"984",digits:2,currency:"Mvdol",countries:["Bolivia (Plurinational State Of)"]},{code:"BRL",number:"986",digits:2,currency:"Brazilian Real",countries:["Brazil"]},{code:"BSD",number:"044",digits:2,currency:"Bahamian Dollar",countries:["Bahamas (The)"]},{code:"BTN",number:"064",digits:2,currency:"Ngultrum",countries:["Bhutan"]},{code:"BWP",number:"072",digits:2,currency:"Pula",countries:["Botswana"]},{code:"BYN",number:"933",digits:2,currency:"Belarusian Ruble",countries:["Belarus"]},{code:"BZD",number:"084",digits:2,currency:"Belize Dollar",countries:["Belize"]},{code:"CAD",number:"124",digits:2,currency:"Canadian Dollar",countries:["Canada"]},{code:"CDF",number:"976",digits:2,currency:"Congolese Franc",countries:["Congo (The Democratic Republic of The)"]},{code:"CHE",number:"947",digits:2,currency:"WIR Euro",countries:["Switzerland"]},{code:"CHF",number:"756",digits:2,currency:"Swiss Franc",countries:["Liechtenstein","Switzerland"]},{code:"CHW",number:"948",digits:2,currency:"WIR Franc",countries:["Switzerland"]},{code:"CLF",number:"990",digits:4,currency:"Unidad de Fomento",countries:["Chile"]},{code:"CLP",number:"152",digits:0,currency:"Chilean Peso",countries:["Chile"]},{code:"CNY",number:"156",digits:2,currency:"Yuan Renminbi",countries:["China"]},{code:"COP",number:"170",digits:2,currency:"Colombian Peso",countries:["Colombia"]},{code:"COU",number:"970",digits:2,currency:"Unidad de Valor Real",countries:["Colombia"]},{code:"CRC",number:"188",digits:2,currency:"Costa Rican Colon",countries:["Costa Rica"]},{code:"CUC",number:"931",digits:2,currency:"Peso Convertible",countries:["Cuba"]},{code:"CUP",number:"192",digits:2,currency:"Cuban Peso",countries:["Cuba"]},{code:"CVE",number:"132",digits:2,currency:"Cabo Verde Escudo",countries:["Cabo Verde"]},{code:"CZK",number:"203",digits:2,currency:"Czech Koruna",countries:["Czechia"]},{code:"DJF",number:"262",digits:0,currency:"Djibouti Franc",countries:["Djibouti"]},{code:"DKK",number:"208",digits:2,currency:"Danish Krone",countries:["Denmark","Faroe Islands (The)","Greenland"]},{code:"DOP",number:"214",digits:2,currency:"Dominican Peso",countries:["Dominican Republic (The)"]},{code:"DZD",number:"012",digits:2,currency:"Algerian Dinar",countries:["Algeria"]},{code:"EGP",number:"818",digits:2,currency:"Egyptian Pound",countries:["Egypt"]},{code:"ERN",number:"232",digits:2,currency:"Nakfa",countries:["Eritrea"]},{code:"ETB",number:"230",digits:2,currency:"Ethiopian Birr",countries:["Ethiopia"]},{code:"EUR",number:"978",digits:2,currency:"Euro",countries:["Åland Islands","Andorra","Austria","Belgium","Croatia","Cyprus","Estonia","European Union","Finland","France","French Guiana","French Southern Territories (The)","Germany","Greece","Guadeloupe","Holy See (The)","Ireland","Italy","Latvia","Lithuania","Luxembourg","Malta","Martinique","Mayotte","Monaco","Montenegro","Netherlands (The)","Portugal","Réunion","Saint Barthélemy","Saint Martin (French Part)","Saint Pierre and Miquelon","San Marino","Slovakia","Slovenia","Spain"]},{code:"FJD",number:"242",digits:2,currency:"Fiji Dollar",countries:["Fiji"]},{code:"FKP",number:"238",digits:2,currency:"Falkland Islands Pound",countries:["Falkland Islands (The) [Malvinas]"]},{code:"GBP",number:"826",digits:2,currency:"Pound Sterling",countries:["Guernsey","Isle of Man","Jersey","United Kingdom of Great Britain and Northern Ireland (The)"]},{code:"GEL",number:"981",digits:2,currency:"Lari",countries:["Georgia"]},{code:"GHS",number:"936",digits:2,currency:"Ghana Cedi",countries:["Ghana"]},{code:"GIP",number:"292",digits:2,currency:"Gibraltar Pound",countries:["Gibraltar"]},{code:"GMD",number:"270",digits:2,currency:"Dalasi",countries:["Gambia (The)"]},{code:"GNF",number:"324",digits:0,currency:"Guinean Franc",countries:["Guinea"]},{code:"GTQ",number:"320",digits:2,currency:"Quetzal",countries:["Guatemala"]},{code:"GYD",number:"328",digits:2,currency:"Guyana Dollar",countries:["Guyana"]},{code:"HKD",number:"344",digits:2,currency:"Hong Kong Dollar",countries:["Hong Kong"]},{code:"HNL",number:"340",digits:2,currency:"Lempira",countries:["Honduras"]},{code:"HTG",number:"332",digits:2,currency:"Gourde",countries:["Haiti"]},{code:"HUF",number:"348",digits:2,currency:"Forint",countries:["Hungary"]},{code:"IDR",number:"360",digits:2,currency:"Rupiah",countries:["Indonesia"]},{code:"ILS",number:"376",digits:2,currency:"New Israeli Sheqel",countries:["Israel"]},{code:"INR",number:"356",digits:2,currency:"Indian Rupee",countries:["Bhutan","India"]},{code:"IQD",number:"368",digits:3,currency:"Iraqi Dinar",countries:["Iraq"]},{code:"IRR",number:"364",digits:2,currency:"Iranian Rial",countries:["Iran (Islamic Republic Of)"]},{code:"ISK",number:"352",digits:0,currency:"Iceland Krona",countries:["Iceland"]},{code:"JMD",number:"388",digits:2,currency:"Jamaican Dollar",countries:["Jamaica"]},{code:"JOD",number:"400",digits:3,currency:"Jordanian Dinar",countries:["Jordan"]},{code:"JPY",number:"392",digits:0,currency:"Yen",countries:["Japan"]},{code:"KES",number:"404",digits:2,currency:"Kenyan Shilling",countries:["Kenya"]},{code:"KGS",number:"417",digits:2,currency:"Som",countries:["Kyrgyzstan"]},{code:"KHR",number:"116",digits:2,currency:"Riel",countries:["Cambodia"]},{code:"KMF",number:"174",digits:0,currency:"Comorian Franc ",countries:["Comoros (The)"]},{code:"KPW",number:"408",digits:2,currency:"North Korean Won",countries:["Korea (The Democratic People’s Republic Of)"]},{code:"KRW",number:"410",digits:0,currency:"Won",countries:["Korea (The Republic Of)"]},{code:"KWD",number:"414",digits:3,currency:"Kuwaiti Dinar",countries:["Kuwait"]},{code:"KYD",number:"136",digits:2,currency:"Cayman Islands Dollar",countries:["Cayman Islands (The)"]},{code:"KZT",number:"398",digits:2,currency:"Tenge",countries:["Kazakhstan"]},{code:"LAK",number:"418",digits:2,currency:"Lao Kip",countries:["Lao People’s Democratic Republic (The)"]},{code:"LBP",number:"422",digits:2,currency:"Lebanese Pound",countries:["Lebanon"]},{code:"LKR",number:"144",digits:2,currency:"Sri Lanka Rupee",countries:["Sri Lanka"]},{code:"LRD",number:"430",digits:2,currency:"Liberian Dollar",countries:["Liberia"]},{code:"LSL",number:"426",digits:2,currency:"Loti",countries:["Lesotho"]},{code:"LYD",number:"434",digits:3,currency:"Libyan Dinar",countries:["Libya"]},{code:"MAD",number:"504",digits:2,currency:"Moroccan Dirham",countries:["Morocco","Western Sahara"]},{code:"MDL",number:"498",digits:2,currency:"Moldovan Leu",countries:["Moldova (The Republic Of)"]},{code:"MGA",number:"969",digits:2,currency:"Malagasy Ariary",countries:["Madagascar"]},{code:"MKD",number:"807",digits:2,currency:"Denar",countries:["North Macedonia"]},{code:"MMK",number:"104",digits:2,currency:"Kyat",countries:["Myanmar"]},{code:"MNT",number:"496",digits:2,currency:"Tugrik",countries:["Mongolia"]},{code:"MOP",number:"446",digits:2,currency:"Pataca",countries:["Macao"]},{code:"MRU",number:"929",digits:2,currency:"Ouguiya",countries:["Mauritania"]},{code:"MUR",number:"480",digits:2,currency:"Mauritius Rupee",countries:["Mauritius"]},{code:"MVR",number:"462",digits:2,currency:"Rufiyaa",countries:["Maldives"]},{code:"MWK",number:"454",digits:2,currency:"Malawi Kwacha",countries:["Malawi"]},{code:"MXN",number:"484",digits:2,currency:"Mexican Peso",countries:["Mexico"]},{code:"MXV",number:"979",digits:2,currency:"Mexican Unidad de Inversion (UDI)",countries:["Mexico"]},{code:"MYR",number:"458",digits:2,currency:"Malaysian Ringgit",countries:["Malaysia"]},{code:"MZN",number:"943",digits:2,currency:"Mozambique Metical",countries:["Mozambique"]},{code:"NAD",number:"516",digits:2,currency:"Namibia Dollar",countries:["Namibia"]},{code:"NGN",number:"566",digits:2,currency:"Naira",countries:["Nigeria"]},{code:"NIO",number:"558",digits:2,currency:"Cordoba Oro",countries:["Nicaragua"]},{code:"NOK",number:"578",digits:2,currency:"Norwegian Krone",countries:["Bouvet Island","Norway","Svalbard and Jan Mayen"]},{code:"NPR",number:"524",digits:2,currency:"Nepalese Rupee",countries:["Nepal"]},{code:"NZD",number:"554",digits:2,currency:"New Zealand Dollar",countries:["Cook Islands (The)","New Zealand","Niue","Pitcairn","Tokelau"]},{code:"OMR",number:"512",digits:3,currency:"Rial Omani",countries:["Oman"]},{code:"PAB",number:"590",digits:2,currency:"Balboa",countries:["Panama"]},{code:"PEN",number:"604",digits:2,currency:"Sol",countries:["Peru"]},{code:"PGK",number:"598",digits:2,currency:"Kina",countries:["Papua New Guinea"]},{code:"PHP",number:"608",digits:2,currency:"Philippine Peso",countries:["Philippines (The)"]},{code:"PKR",number:"586",digits:2,currency:"Pakistan Rupee",countries:["Pakistan"]},{code:"PLN",number:"985",digits:2,currency:"Zloty",countries:["Poland"]},{code:"PYG",number:"600",digits:0,currency:"Guarani",countries:["Paraguay"]},{code:"QAR",number:"634",digits:2,currency:"Qatari Rial",countries:["Qatar"]},{code:"RON",number:"946",digits:2,currency:"Romanian Leu",countries:["Romania"]},{code:"RSD",number:"941",digits:2,currency:"Serbian Dinar",countries:["Serbia"]},{code:"RUB",number:"643",digits:2,currency:"Russian Ruble",countries:["Russian Federation (The)"]},{code:"RWF",number:"646",digits:0,currency:"Rwanda Franc",countries:["Rwanda"]},{code:"SAR",number:"682",digits:2,currency:"Saudi Riyal",countries:["Saudi Arabia"]},{code:"SBD",number:"090",digits:2,currency:"Solomon Islands Dollar",countries:["Solomon Islands"]},{code:"SCR",number:"690",digits:2,currency:"Seychelles Rupee",countries:["Seychelles"]},{code:"SDG",number:"938",digits:2,currency:"Sudanese Pound",countries:["Sudan (The)"]},{code:"SEK",number:"752",digits:2,currency:"Swedish Krona",countries:["Sweden"]},{code:"SGD",number:"702",digits:2,currency:"Singapore Dollar",countries:["Singapore"]},{code:"SHP",number:"654",digits:2,currency:"Saint Helena Pound",countries:["Saint Helena, Ascension and Tristan Da Cunha"]},{code:"SLE",number:"925",digits:2,currency:"Leone",countries:["Sierra Leone"]},{code:"SOS",number:"706",digits:2,currency:"Somali Shilling",countries:["Somalia"]},{code:"SRD",number:"968",digits:2,currency:"Surinam Dollar",countries:["Suriname"]},{code:"SSP",number:"728",digits:2,currency:"South Sudanese Pound",countries:["South Sudan"]},{code:"STN",number:"930",digits:2,currency:"Dobra",countries:["Sao Tome and Principe"]},{code:"SVC",number:"222",digits:2,currency:"El Salvador Colon",countries:["El Salvador"]},{code:"SYP",number:"760",digits:2,currency:"Syrian Pound",countries:["Syrian Arab Republic"]},{code:"SZL",number:"748",digits:2,currency:"Lilangeni",countries:["Eswatini"]},{code:"THB",number:"764",digits:2,currency:"Baht",countries:["Thailand"]},{code:"TJS",number:"972",digits:2,currency:"Somoni",countries:["Tajikistan"]},{code:"TMT",number:"934",digits:2,currency:"Turkmenistan New Manat",countries:["Turkmenistan"]},{code:"TND",number:"788",digits:3,currency:"Tunisian Dinar",countries:["Tunisia"]},{code:"TOP",number:"776",digits:2,currency:"Pa’anga",countries:["Tonga"]},{code:"TRY",number:"949",digits:2,currency:"Turkish Lira",countries:["Türki̇ye"]},{code:"TTD",number:"780",digits:2,currency:"Trinidad and Tobago Dollar",countries:["Trinidad and Tobago"]},{code:"TWD",number:"901",digits:2,currency:"New Taiwan Dollar",countries:["Taiwan (Province of China)"]},{code:"TZS",number:"834",digits:2,currency:"Tanzanian Shilling",countries:["Tanzania, United Republic Of"]},{code:"UAH",number:"980",digits:2,currency:"Hryvnia",countries:["Ukraine"]},{code:"UGX",number:"800",digits:0,currency:"Uganda Shilling",countries:["Uganda"]},{code:"USD",number:"840",digits:2,currency:"US Dollar",countries:["American Samoa","Bonaire, Sint Eustatius and Saba","British Indian Ocean Territory (The)","Ecuador","El Salvador","Guam","Haiti","Marshall Islands (The)","Micronesia (Federated States Of)","Northern Mariana Islands (The)","Palau","Panama","Puerto Rico","Timor-Leste","Turks and Caicos Islands (The)","United States Minor Outlying Islands (The)","United States of America (The)","Virgin Islands (British)","Virgin Islands (u.s.)"]},{code:"USN",number:"997",digits:2,currency:"US Dollar (Next day)",countries:["United States of America (The)"]},{code:"UYI",number:"940",digits:0,currency:"Uruguay Peso en Unidades Indexadas (UI)",countries:["Uruguay"]},{code:"UYU",number:"858",digits:2,currency:"Peso Uruguayo",countries:["Uruguay"]},{code:"UYW",number:"927",digits:4,currency:"Unidad Previsional",countries:["Uruguay"]},{code:"UZS",number:"860",digits:2,currency:"Uzbekistan Sum",countries:["Uzbekistan"]},{code:"VED",number:"926",digits:2,currency:"Bolívar Soberano",countries:["Venezuela (Bolivarian Republic Of)"]},{code:"VES",number:"928",digits:2,currency:"Bolívar Soberano",countries:["Venezuela (Bolivarian Republic Of)"]},{code:"VND",number:"704",digits:0,currency:"Dong",countries:["Viet Nam"]},{code:"VUV",number:"548",digits:0,currency:"Vatu",countries:["Vanuatu"]},{code:"WST",number:"882",digits:2,currency:"Tala",countries:["Samoa"]},{code:"XAF",number:"950",digits:0,currency:"CFA Franc BEAC",countries:["Cameroon","Central African Republic (The)","Chad","Congo (The)","Equatorial Guinea","Gabon"]},{code:"XAG",number:"961",digits:0,currency:"Silver",countries:["Zz11_silver"]},{code:"XAU",number:"959",digits:0,currency:"Gold",countries:["Zz08_gold"]},{code:"XBA",number:"955",digits:0,currency:"Bond Markets Unit European Composite Unit (EURCO)",countries:["Zz01_bond Markets Unit European_eurco"]},{code:"XBB",number:"956",digits:0,currency:"Bond Markets Unit European Monetary Unit (E.M.U.-6)",countries:["Zz02_bond Markets Unit European_emu-6"]},{code:"XBC",number:"957",digits:0,currency:"Bond Markets Unit European Unit of Account 9 (E.U.A.-9)",countries:["Zz03_bond Markets Unit European_eua-9"]},{code:"XBD",number:"958",digits:0,currency:"Bond Markets Unit European Unit of Account 17 (E.U.A.-17)",countries:["Zz04_bond Markets Unit European_eua-17"]},{code:"XCD",number:"951",digits:2,currency:"East Caribbean Dollar",countries:["Anguilla","Antigua and Barbuda","Dominica","Grenada","Montserrat","Saint Kitts and Nevis","Saint Lucia","Saint Vincent and the Grenadines"]},{code:"XDR",number:"960",digits:0,currency:"SDR (Special Drawing Right)",countries:["International Monetary Fund (Imf) "]},{code:"XOF",number:"952",digits:0,currency:"CFA Franc BCEAO",countries:["Benin","Burkina Faso","Côte D'ivoire","Guinea-Bissau","Mali","Niger (The)","Senegal","Togo"]},{code:"XPD",number:"964",digits:0,currency:"Palladium",countries:["Zz09_palladium"]},{code:"XPF",number:"953",digits:0,currency:"CFP Franc",countries:["French Polynesia","New Caledonia","Wallis and Futuna"]},{code:"XPT",number:"962",digits:0,currency:"Platinum",countries:["Zz10_platinum"]},{code:"XSU",number:"994",digits:0,currency:"Sucre",countries:['Sistema Unitario De Compensacion Regional De Pagos "Sucre"']},{code:"XTS",number:"963",digits:0,currency:"Codes specifically reserved for testing purposes",countries:["Zz06_testing_code"]},{code:"XUA",number:"965",digits:0,currency:"ADB Unit of Account",countries:["Member Countries of the African Development Bank Group"]},{code:"XXX",number:"999",digits:0,currency:"The codes assigned for transactions where no currency is involved",countries:["Zz07_no_currency"]},{code:"YER",number:"886",digits:2,currency:"Yemeni Rial",countries:["Yemen"]},{code:"ZAR",number:"710",digits:2,currency:"Rand",countries:["Lesotho","Namibia","South Africa"]},{code:"ZMW",number:"967",digits:2,currency:"Zambian Kwacha",countries:["Zambia"]},{code:"ZWG",number:"924",digits:2,currency:"Zimbabwe Gold",countries:["Zimbabwe"]}])}var S=function(){if(m)return b;m=1;var e=function(){if(a)return u;function e(e){return e}return a=1,u=function(r,n,i){n=n||e,i=i||r;for(var c=0,u=r.length;c<u;c+=1)if(n.call(i,r[c],c))return r[c]}}(),r=y(),n=h(),i=l?d:(l=1,d="2024-06-25");return b.code=function(r){return r=r.toUpperCase(),e(n,(function(e){return e.code===r}))},b.country=function(e){return e=e.toLowerCase(),n.filter((function(r){return(r.countries.map((function(e){return e.toLowerCase()}))||[]).indexOf(e)>-1}))},b.number=function(r){return e(n,(function(e){return e.number===String(r)}))},b.codes=function(){return n.map((function(e){return e.code}))},b.numbers=function(){return n.map((function(e){return e.number})).filter((function(e){if(e)return e}))},b.countries=function(){var e=n.filter((function(e){return e.countries})).map((function(e){return e.countries}));return r(Array.prototype.concat.apply([],e))},b.publishDate=i,b.data=n,b}();const D=class{constructor(n){e(this,n),this.change=r(this,"change"),this.currencies=S.codes(),this.required=!1,this.readonly=!1,this.invalid=!1,this.disabled=!1,this.search=async e=>""===e?this.currencies.map(this.createListItem).filter(c):this.currencies.map(this.createListItem).filter(c).filter((r=>{var n;return(null===(n=null==r?void 0:r.secondaryText)||void 0===n?void 0:n.toLowerCase().includes(e.toLowerCase()))||r.text.toLowerCase().includes(e.toLowerCase())})),this.createListItem=e=>{if(e)return{text:e,value:e,secondaryText:this.getCurrencyName(e),icon:this.getCurrencyIcon(e)}},this.handleChange=e=>{var r;e.stopPropagation(),this.change.emit(null===(r=e.detail)||void 0===r?void 0:r.value)}}render(){return n("limel-picker",{key:"2e9dcd3bf98fe7a3377aa24c0e45814f2c698633",label:this.label||this.defaultLabel,value:this.createListItem(this.value),helperText:this.helperText,onChange:this.handleChange,badgeIcons:!1,disabled:this.disabled,required:this.required,readonly:this.readonly,invalid:this.readonly,searcher:this.search})}getCurrencyName(e){var r;const n=Intl.NumberFormat(this.application.getLanguage(),{style:"currency",currency:e,currencyDisplay:"name"});try{return null===(r=n.formatToParts(1).find((e=>"currency"===e.type)))||void 0===r?void 0:r.value}catch(e){return}}getCurrencyIcon(e){return{EUR:"euro",USD:"us_dollar",SEK:"sek",NOK:"sek",DKK:"sek",ISK:"sek"}[e]}get translator(){return this.platform.get(i.Translate)}get application(){return this.platform.get(i.Application)}get defaultLabel(){return this.translator.get("webclient.currency-picker.label")}};export{D as limebb_currency_picker}
1
+ import{r as e,c as r,h as n}from"./p-BIwHMk6j.js";import{b as i}from"./p-ndni-0im.js";import{i as c}from"./p-CkTg5UPD.js";var u,a,o,t,s,d,l,m,b={},g={exports:{}};function y(){if(o)return g.exports;o=1;var e=g.exports=function(r,n){if("function"==typeof r||n)return e.by(r,n);for(var i={object:[],function:[],string:{},number:{},boolean:{},undefined:{}},c=[],u=0;u<r.length;u++){var a=r[u],o="__proto__"===a?i.objects:i[typeof a]||i.objects;Array.isArray(o)?o.indexOf(a)<0&&(o.push(a),c.push(a)):Object.hasOwnProperty.call(o,a)||(o[a]=!0,c.push(a))}return c};return e.by=function(e,r){if("function"==typeof e){var n=r;r=e,e=n}for(var i=[],c=0;c<e.length;c++){for(var u=e[c],a=!1,o=0;o<i.length;o++)if(r.call(i,u,i[o])){a=!0;break}a||i.push(u)}return i},g.exports}function h(){return s?t:(s=1,t=[{code:"AED",number:"784",digits:2,currency:"UAE Dirham",countries:["United Arab Emirates (The)"]},{code:"AFN",number:"971",digits:2,currency:"Afghani",countries:["Afghanistan"]},{code:"ALL",number:"008",digits:2,currency:"Lek",countries:["Albania"]},{code:"AMD",number:"051",digits:2,currency:"Armenian Dram",countries:["Armenia"]},{code:"ANG",number:"532",digits:2,currency:"Netherlands Antillean Guilder",countries:["Curaçao","Sint Maarten (Dutch Part)"]},{code:"AOA",number:"973",digits:2,currency:"Kwanza",countries:["Angola"]},{code:"ARS",number:"032",digits:2,currency:"Argentine Peso",countries:["Argentina"]},{code:"AUD",number:"036",digits:2,currency:"Australian Dollar",countries:["Australia","Christmas Island","Cocos (Keeling) Islands (The)","Heard Island and Mcdonald Islands","Kiribati","Nauru","Norfolk Island","Tuvalu"]},{code:"AWG",number:"533",digits:2,currency:"Aruban Florin",countries:["Aruba"]},{code:"AZN",number:"944",digits:2,currency:"Azerbaijan Manat",countries:["Azerbaijan"]},{code:"BAM",number:"977",digits:2,currency:"Convertible Mark",countries:["Bosnia and Herzegovina"]},{code:"BBD",number:"052",digits:2,currency:"Barbados Dollar",countries:["Barbados"]},{code:"BDT",number:"050",digits:2,currency:"Taka",countries:["Bangladesh"]},{code:"BGN",number:"975",digits:2,currency:"Bulgarian Lev",countries:["Bulgaria"]},{code:"BHD",number:"048",digits:3,currency:"Bahraini Dinar",countries:["Bahrain"]},{code:"BIF",number:"108",digits:0,currency:"Burundi Franc",countries:["Burundi"]},{code:"BMD",number:"060",digits:2,currency:"Bermudian Dollar",countries:["Bermuda"]},{code:"BND",number:"096",digits:2,currency:"Brunei Dollar",countries:["Brunei Darussalam"]},{code:"BOB",number:"068",digits:2,currency:"Boliviano",countries:["Bolivia (Plurinational State Of)"]},{code:"BOV",number:"984",digits:2,currency:"Mvdol",countries:["Bolivia (Plurinational State Of)"]},{code:"BRL",number:"986",digits:2,currency:"Brazilian Real",countries:["Brazil"]},{code:"BSD",number:"044",digits:2,currency:"Bahamian Dollar",countries:["Bahamas (The)"]},{code:"BTN",number:"064",digits:2,currency:"Ngultrum",countries:["Bhutan"]},{code:"BWP",number:"072",digits:2,currency:"Pula",countries:["Botswana"]},{code:"BYN",number:"933",digits:2,currency:"Belarusian Ruble",countries:["Belarus"]},{code:"BZD",number:"084",digits:2,currency:"Belize Dollar",countries:["Belize"]},{code:"CAD",number:"124",digits:2,currency:"Canadian Dollar",countries:["Canada"]},{code:"CDF",number:"976",digits:2,currency:"Congolese Franc",countries:["Congo (The Democratic Republic of The)"]},{code:"CHE",number:"947",digits:2,currency:"WIR Euro",countries:["Switzerland"]},{code:"CHF",number:"756",digits:2,currency:"Swiss Franc",countries:["Liechtenstein","Switzerland"]},{code:"CHW",number:"948",digits:2,currency:"WIR Franc",countries:["Switzerland"]},{code:"CLF",number:"990",digits:4,currency:"Unidad de Fomento",countries:["Chile"]},{code:"CLP",number:"152",digits:0,currency:"Chilean Peso",countries:["Chile"]},{code:"CNY",number:"156",digits:2,currency:"Yuan Renminbi",countries:["China"]},{code:"COP",number:"170",digits:2,currency:"Colombian Peso",countries:["Colombia"]},{code:"COU",number:"970",digits:2,currency:"Unidad de Valor Real",countries:["Colombia"]},{code:"CRC",number:"188",digits:2,currency:"Costa Rican Colon",countries:["Costa Rica"]},{code:"CUC",number:"931",digits:2,currency:"Peso Convertible",countries:["Cuba"]},{code:"CUP",number:"192",digits:2,currency:"Cuban Peso",countries:["Cuba"]},{code:"CVE",number:"132",digits:2,currency:"Cabo Verde Escudo",countries:["Cabo Verde"]},{code:"CZK",number:"203",digits:2,currency:"Czech Koruna",countries:["Czechia"]},{code:"DJF",number:"262",digits:0,currency:"Djibouti Franc",countries:["Djibouti"]},{code:"DKK",number:"208",digits:2,currency:"Danish Krone",countries:["Denmark","Faroe Islands (The)","Greenland"]},{code:"DOP",number:"214",digits:2,currency:"Dominican Peso",countries:["Dominican Republic (The)"]},{code:"DZD",number:"012",digits:2,currency:"Algerian Dinar",countries:["Algeria"]},{code:"EGP",number:"818",digits:2,currency:"Egyptian Pound",countries:["Egypt"]},{code:"ERN",number:"232",digits:2,currency:"Nakfa",countries:["Eritrea"]},{code:"ETB",number:"230",digits:2,currency:"Ethiopian Birr",countries:["Ethiopia"]},{code:"EUR",number:"978",digits:2,currency:"Euro",countries:["Åland Islands","Andorra","Austria","Belgium","Croatia","Cyprus","Estonia","European Union","Finland","France","French Guiana","French Southern Territories (The)","Germany","Greece","Guadeloupe","Holy See (The)","Ireland","Italy","Latvia","Lithuania","Luxembourg","Malta","Martinique","Mayotte","Monaco","Montenegro","Netherlands (The)","Portugal","Réunion","Saint Barthélemy","Saint Martin (French Part)","Saint Pierre and Miquelon","San Marino","Slovakia","Slovenia","Spain"]},{code:"FJD",number:"242",digits:2,currency:"Fiji Dollar",countries:["Fiji"]},{code:"FKP",number:"238",digits:2,currency:"Falkland Islands Pound",countries:["Falkland Islands (The) [Malvinas]"]},{code:"GBP",number:"826",digits:2,currency:"Pound Sterling",countries:["Guernsey","Isle of Man","Jersey","United Kingdom of Great Britain and Northern Ireland (The)"]},{code:"GEL",number:"981",digits:2,currency:"Lari",countries:["Georgia"]},{code:"GHS",number:"936",digits:2,currency:"Ghana Cedi",countries:["Ghana"]},{code:"GIP",number:"292",digits:2,currency:"Gibraltar Pound",countries:["Gibraltar"]},{code:"GMD",number:"270",digits:2,currency:"Dalasi",countries:["Gambia (The)"]},{code:"GNF",number:"324",digits:0,currency:"Guinean Franc",countries:["Guinea"]},{code:"GTQ",number:"320",digits:2,currency:"Quetzal",countries:["Guatemala"]},{code:"GYD",number:"328",digits:2,currency:"Guyana Dollar",countries:["Guyana"]},{code:"HKD",number:"344",digits:2,currency:"Hong Kong Dollar",countries:["Hong Kong"]},{code:"HNL",number:"340",digits:2,currency:"Lempira",countries:["Honduras"]},{code:"HTG",number:"332",digits:2,currency:"Gourde",countries:["Haiti"]},{code:"HUF",number:"348",digits:2,currency:"Forint",countries:["Hungary"]},{code:"IDR",number:"360",digits:2,currency:"Rupiah",countries:["Indonesia"]},{code:"ILS",number:"376",digits:2,currency:"New Israeli Sheqel",countries:["Israel"]},{code:"INR",number:"356",digits:2,currency:"Indian Rupee",countries:["Bhutan","India"]},{code:"IQD",number:"368",digits:3,currency:"Iraqi Dinar",countries:["Iraq"]},{code:"IRR",number:"364",digits:2,currency:"Iranian Rial",countries:["Iran (Islamic Republic Of)"]},{code:"ISK",number:"352",digits:0,currency:"Iceland Krona",countries:["Iceland"]},{code:"JMD",number:"388",digits:2,currency:"Jamaican Dollar",countries:["Jamaica"]},{code:"JOD",number:"400",digits:3,currency:"Jordanian Dinar",countries:["Jordan"]},{code:"JPY",number:"392",digits:0,currency:"Yen",countries:["Japan"]},{code:"KES",number:"404",digits:2,currency:"Kenyan Shilling",countries:["Kenya"]},{code:"KGS",number:"417",digits:2,currency:"Som",countries:["Kyrgyzstan"]},{code:"KHR",number:"116",digits:2,currency:"Riel",countries:["Cambodia"]},{code:"KMF",number:"174",digits:0,currency:"Comorian Franc ",countries:["Comoros (The)"]},{code:"KPW",number:"408",digits:2,currency:"North Korean Won",countries:["Korea (The Democratic People’s Republic Of)"]},{code:"KRW",number:"410",digits:0,currency:"Won",countries:["Korea (The Republic Of)"]},{code:"KWD",number:"414",digits:3,currency:"Kuwaiti Dinar",countries:["Kuwait"]},{code:"KYD",number:"136",digits:2,currency:"Cayman Islands Dollar",countries:["Cayman Islands (The)"]},{code:"KZT",number:"398",digits:2,currency:"Tenge",countries:["Kazakhstan"]},{code:"LAK",number:"418",digits:2,currency:"Lao Kip",countries:["Lao People’s Democratic Republic (The)"]},{code:"LBP",number:"422",digits:2,currency:"Lebanese Pound",countries:["Lebanon"]},{code:"LKR",number:"144",digits:2,currency:"Sri Lanka Rupee",countries:["Sri Lanka"]},{code:"LRD",number:"430",digits:2,currency:"Liberian Dollar",countries:["Liberia"]},{code:"LSL",number:"426",digits:2,currency:"Loti",countries:["Lesotho"]},{code:"LYD",number:"434",digits:3,currency:"Libyan Dinar",countries:["Libya"]},{code:"MAD",number:"504",digits:2,currency:"Moroccan Dirham",countries:["Morocco","Western Sahara"]},{code:"MDL",number:"498",digits:2,currency:"Moldovan Leu",countries:["Moldova (The Republic Of)"]},{code:"MGA",number:"969",digits:2,currency:"Malagasy Ariary",countries:["Madagascar"]},{code:"MKD",number:"807",digits:2,currency:"Denar",countries:["North Macedonia"]},{code:"MMK",number:"104",digits:2,currency:"Kyat",countries:["Myanmar"]},{code:"MNT",number:"496",digits:2,currency:"Tugrik",countries:["Mongolia"]},{code:"MOP",number:"446",digits:2,currency:"Pataca",countries:["Macao"]},{code:"MRU",number:"929",digits:2,currency:"Ouguiya",countries:["Mauritania"]},{code:"MUR",number:"480",digits:2,currency:"Mauritius Rupee",countries:["Mauritius"]},{code:"MVR",number:"462",digits:2,currency:"Rufiyaa",countries:["Maldives"]},{code:"MWK",number:"454",digits:2,currency:"Malawi Kwacha",countries:["Malawi"]},{code:"MXN",number:"484",digits:2,currency:"Mexican Peso",countries:["Mexico"]},{code:"MXV",number:"979",digits:2,currency:"Mexican Unidad de Inversion (UDI)",countries:["Mexico"]},{code:"MYR",number:"458",digits:2,currency:"Malaysian Ringgit",countries:["Malaysia"]},{code:"MZN",number:"943",digits:2,currency:"Mozambique Metical",countries:["Mozambique"]},{code:"NAD",number:"516",digits:2,currency:"Namibia Dollar",countries:["Namibia"]},{code:"NGN",number:"566",digits:2,currency:"Naira",countries:["Nigeria"]},{code:"NIO",number:"558",digits:2,currency:"Cordoba Oro",countries:["Nicaragua"]},{code:"NOK",number:"578",digits:2,currency:"Norwegian Krone",countries:["Bouvet Island","Norway","Svalbard and Jan Mayen"]},{code:"NPR",number:"524",digits:2,currency:"Nepalese Rupee",countries:["Nepal"]},{code:"NZD",number:"554",digits:2,currency:"New Zealand Dollar",countries:["Cook Islands (The)","New Zealand","Niue","Pitcairn","Tokelau"]},{code:"OMR",number:"512",digits:3,currency:"Rial Omani",countries:["Oman"]},{code:"PAB",number:"590",digits:2,currency:"Balboa",countries:["Panama"]},{code:"PEN",number:"604",digits:2,currency:"Sol",countries:["Peru"]},{code:"PGK",number:"598",digits:2,currency:"Kina",countries:["Papua New Guinea"]},{code:"PHP",number:"608",digits:2,currency:"Philippine Peso",countries:["Philippines (The)"]},{code:"PKR",number:"586",digits:2,currency:"Pakistan Rupee",countries:["Pakistan"]},{code:"PLN",number:"985",digits:2,currency:"Zloty",countries:["Poland"]},{code:"PYG",number:"600",digits:0,currency:"Guarani",countries:["Paraguay"]},{code:"QAR",number:"634",digits:2,currency:"Qatari Rial",countries:["Qatar"]},{code:"RON",number:"946",digits:2,currency:"Romanian Leu",countries:["Romania"]},{code:"RSD",number:"941",digits:2,currency:"Serbian Dinar",countries:["Serbia"]},{code:"RUB",number:"643",digits:2,currency:"Russian Ruble",countries:["Russian Federation (The)"]},{code:"RWF",number:"646",digits:0,currency:"Rwanda Franc",countries:["Rwanda"]},{code:"SAR",number:"682",digits:2,currency:"Saudi Riyal",countries:["Saudi Arabia"]},{code:"SBD",number:"090",digits:2,currency:"Solomon Islands Dollar",countries:["Solomon Islands"]},{code:"SCR",number:"690",digits:2,currency:"Seychelles Rupee",countries:["Seychelles"]},{code:"SDG",number:"938",digits:2,currency:"Sudanese Pound",countries:["Sudan (The)"]},{code:"SEK",number:"752",digits:2,currency:"Swedish Krona",countries:["Sweden"]},{code:"SGD",number:"702",digits:2,currency:"Singapore Dollar",countries:["Singapore"]},{code:"SHP",number:"654",digits:2,currency:"Saint Helena Pound",countries:["Saint Helena, Ascension and Tristan Da Cunha"]},{code:"SLE",number:"925",digits:2,currency:"Leone",countries:["Sierra Leone"]},{code:"SOS",number:"706",digits:2,currency:"Somali Shilling",countries:["Somalia"]},{code:"SRD",number:"968",digits:2,currency:"Surinam Dollar",countries:["Suriname"]},{code:"SSP",number:"728",digits:2,currency:"South Sudanese Pound",countries:["South Sudan"]},{code:"STN",number:"930",digits:2,currency:"Dobra",countries:["Sao Tome and Principe"]},{code:"SVC",number:"222",digits:2,currency:"El Salvador Colon",countries:["El Salvador"]},{code:"SYP",number:"760",digits:2,currency:"Syrian Pound",countries:["Syrian Arab Republic"]},{code:"SZL",number:"748",digits:2,currency:"Lilangeni",countries:["Eswatini"]},{code:"THB",number:"764",digits:2,currency:"Baht",countries:["Thailand"]},{code:"TJS",number:"972",digits:2,currency:"Somoni",countries:["Tajikistan"]},{code:"TMT",number:"934",digits:2,currency:"Turkmenistan New Manat",countries:["Turkmenistan"]},{code:"TND",number:"788",digits:3,currency:"Tunisian Dinar",countries:["Tunisia"]},{code:"TOP",number:"776",digits:2,currency:"Pa’anga",countries:["Tonga"]},{code:"TRY",number:"949",digits:2,currency:"Turkish Lira",countries:["Türki̇ye"]},{code:"TTD",number:"780",digits:2,currency:"Trinidad and Tobago Dollar",countries:["Trinidad and Tobago"]},{code:"TWD",number:"901",digits:2,currency:"New Taiwan Dollar",countries:["Taiwan (Province of China)"]},{code:"TZS",number:"834",digits:2,currency:"Tanzanian Shilling",countries:["Tanzania, United Republic Of"]},{code:"UAH",number:"980",digits:2,currency:"Hryvnia",countries:["Ukraine"]},{code:"UGX",number:"800",digits:0,currency:"Uganda Shilling",countries:["Uganda"]},{code:"USD",number:"840",digits:2,currency:"US Dollar",countries:["American Samoa","Bonaire, Sint Eustatius and Saba","British Indian Ocean Territory (The)","Ecuador","El Salvador","Guam","Haiti","Marshall Islands (The)","Micronesia (Federated States Of)","Northern Mariana Islands (The)","Palau","Panama","Puerto Rico","Timor-Leste","Turks and Caicos Islands (The)","United States Minor Outlying Islands (The)","United States of America (The)","Virgin Islands (British)","Virgin Islands (u.s.)"]},{code:"USN",number:"997",digits:2,currency:"US Dollar (Next day)",countries:["United States of America (The)"]},{code:"UYI",number:"940",digits:0,currency:"Uruguay Peso en Unidades Indexadas (UI)",countries:["Uruguay"]},{code:"UYU",number:"858",digits:2,currency:"Peso Uruguayo",countries:["Uruguay"]},{code:"UYW",number:"927",digits:4,currency:"Unidad Previsional",countries:["Uruguay"]},{code:"UZS",number:"860",digits:2,currency:"Uzbekistan Sum",countries:["Uzbekistan"]},{code:"VED",number:"926",digits:2,currency:"Bolívar Soberano",countries:["Venezuela (Bolivarian Republic Of)"]},{code:"VES",number:"928",digits:2,currency:"Bolívar Soberano",countries:["Venezuela (Bolivarian Republic Of)"]},{code:"VND",number:"704",digits:0,currency:"Dong",countries:["Viet Nam"]},{code:"VUV",number:"548",digits:0,currency:"Vatu",countries:["Vanuatu"]},{code:"WST",number:"882",digits:2,currency:"Tala",countries:["Samoa"]},{code:"XAF",number:"950",digits:0,currency:"CFA Franc BEAC",countries:["Cameroon","Central African Republic (The)","Chad","Congo (The)","Equatorial Guinea","Gabon"]},{code:"XAG",number:"961",digits:0,currency:"Silver",countries:["Zz11_silver"]},{code:"XAU",number:"959",digits:0,currency:"Gold",countries:["Zz08_gold"]},{code:"XBA",number:"955",digits:0,currency:"Bond Markets Unit European Composite Unit (EURCO)",countries:["Zz01_bond Markets Unit European_eurco"]},{code:"XBB",number:"956",digits:0,currency:"Bond Markets Unit European Monetary Unit (E.M.U.-6)",countries:["Zz02_bond Markets Unit European_emu-6"]},{code:"XBC",number:"957",digits:0,currency:"Bond Markets Unit European Unit of Account 9 (E.U.A.-9)",countries:["Zz03_bond Markets Unit European_eua-9"]},{code:"XBD",number:"958",digits:0,currency:"Bond Markets Unit European Unit of Account 17 (E.U.A.-17)",countries:["Zz04_bond Markets Unit European_eua-17"]},{code:"XCD",number:"951",digits:2,currency:"East Caribbean Dollar",countries:["Anguilla","Antigua and Barbuda","Dominica","Grenada","Montserrat","Saint Kitts and Nevis","Saint Lucia","Saint Vincent and the Grenadines"]},{code:"XDR",number:"960",digits:0,currency:"SDR (Special Drawing Right)",countries:["International Monetary Fund (Imf) "]},{code:"XOF",number:"952",digits:0,currency:"CFA Franc BCEAO",countries:["Benin","Burkina Faso","Côte D'ivoire","Guinea-Bissau","Mali","Niger (The)","Senegal","Togo"]},{code:"XPD",number:"964",digits:0,currency:"Palladium",countries:["Zz09_palladium"]},{code:"XPF",number:"953",digits:0,currency:"CFP Franc",countries:["French Polynesia","New Caledonia","Wallis and Futuna"]},{code:"XPT",number:"962",digits:0,currency:"Platinum",countries:["Zz10_platinum"]},{code:"XSU",number:"994",digits:0,currency:"Sucre",countries:['Sistema Unitario De Compensacion Regional De Pagos "Sucre"']},{code:"XTS",number:"963",digits:0,currency:"Codes specifically reserved for testing purposes",countries:["Zz06_testing_code"]},{code:"XUA",number:"965",digits:0,currency:"ADB Unit of Account",countries:["Member Countries of the African Development Bank Group"]},{code:"XXX",number:"999",digits:0,currency:"The codes assigned for transactions where no currency is involved",countries:["Zz07_no_currency"]},{code:"YER",number:"886",digits:2,currency:"Yemeni Rial",countries:["Yemen"]},{code:"ZAR",number:"710",digits:2,currency:"Rand",countries:["Lesotho","Namibia","South Africa"]},{code:"ZMW",number:"967",digits:2,currency:"Zambian Kwacha",countries:["Zambia"]},{code:"ZWG",number:"924",digits:2,currency:"Zimbabwe Gold",countries:["Zimbabwe"]}])}var S=function(){if(m)return b;m=1;var e=function(){if(a)return u;function e(e){return e}return a=1,u=function(r,n,i){n=n||e,i=i||r;for(var c=0,u=r.length;c<u;c+=1)if(n.call(i,r[c],c))return r[c]}}(),r=y(),n=h(),i=l?d:(l=1,d="2024-06-25");return b.code=function(r){return r=r.toUpperCase(),e(n,(function(e){return e.code===r}))},b.country=function(e){return e=e.toLowerCase(),n.filter((function(r){return(r.countries.map((function(e){return e.toLowerCase()}))||[]).indexOf(e)>-1}))},b.number=function(r){return e(n,(function(e){return e.number===String(r)}))},b.codes=function(){return n.map((function(e){return e.code}))},b.numbers=function(){return n.map((function(e){return e.number})).filter((function(e){if(e)return e}))},b.countries=function(){var e=n.filter((function(e){return e.countries})).map((function(e){return e.countries}));return r(Array.prototype.concat.apply([],e))},b.publishDate=i,b.data=n,b}();const D=class{constructor(n){e(this,n),this.change=r(this,"change"),this.currencies=S.codes(),this.required=!1,this.readonly=!1,this.invalid=!1,this.disabled=!1,this.search=async e=>""===e?this.currencies.map(this.createListItem).filter(c):this.currencies.map(this.createListItem).filter(c).filter((r=>{var n;return(null===(n=null==r?void 0:r.secondaryText)||void 0===n?void 0:n.toLowerCase().includes(e.toLowerCase()))||r.text.toLowerCase().includes(e.toLowerCase())})),this.createListItem=e=>{if(e)return{text:e,value:e,secondaryText:this.getCurrencyName(e),icon:this.getCurrencyIcon(e)}},this.handleChange=e=>{var r;e.stopPropagation(),this.change.emit(null===(r=e.detail)||void 0===r?void 0:r.value)}}render(){return n("limel-picker",{key:"2e9dcd3bf98fe7a3377aa24c0e45814f2c698633",label:this.label||this.defaultLabel,value:this.createListItem(this.value),helperText:this.helperText,onChange:this.handleChange,badgeIcons:!1,disabled:this.disabled,required:this.required,readonly:this.readonly,invalid:this.readonly,searcher:this.search})}getCurrencyName(e){var r;const n=Intl.NumberFormat(this.application.getLanguage(),{style:"currency",currency:e,currencyDisplay:"name"});try{return null===(r=n.formatToParts(1).find((e=>"currency"===e.type)))||void 0===r?void 0:r.value}catch(e){return}}getCurrencyIcon(e){return{EUR:"euro",USD:"us_dollar",SEK:"sek",NOK:"sek",DKK:"sek",ISK:"sek"}[e]}get translator(){return this.platform.get(i.Translate)}get application(){return this.platform.get(i.Application)}get defaultLabel(){return this.translator.get("webclient.currency-picker.label")}};export{D as limebb_currency_picker}
@@ -1 +1 @@
1
- import{a as t,g as n}from"./p-BIwHMk6j.js";var r={};function i(t){return t&&["belongsto","hasone","hasmany","hasandbelongstomany"].includes(t.type)}function e(t){return t&&["belongsto","hasone"].includes(t.type)}r.LimeTypeRepository="state.limetypes";var o="context-request";function u(t,n){let r,i={context:n,callback:t=>{r=t}};return t.dispatchEvent(new CustomEvent(o,{bubbles:!0,composed:!0,detail:i})),r}var c="context";function f(t){return t.context?t.context:u(n(t),c)}var s=function(t,n){return s=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])},s(t,n)};function a(t,n){if("function"!=typeof n&&null!==n)throw TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}s(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}function l(t){var n="function"==typeof Symbol&&Symbol.iterator,r=n&&t[n],i=0;if(r)return r.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&i>=t.length&&(t=void 0),{value:t&&t[i++],done:!t}}};throw TypeError(n?"Object is not iterable.":"Symbol.iterator is not defined.")}function h(t){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var r,i,e=n.call(t),o=[];try{for(;!(r=e.next()).done;)o.push(r.value)}catch(t){i={error:t}}finally{try{r&&!r.done&&(n=e.return)&&n.call(e)}finally{if(i)throw i.error}}return o}function v(t,n,r){if(2===arguments.length)for(var i,e=0,o=n.length;e<o;e++)(i||!(e in n))&&(i||=Array.prototype.slice.call(n,0,e),i[e]=n[e]);return t.concat(i||Array.prototype.slice.call(n))}function y(t){return"function"==typeof t}function b(t){var n=t((function(t){Error.call(t),t.stack=Error().stack}));return n.prototype=Object.create(Error.prototype),n.prototype.constructor=n,n}var m=b((function(t){return function(n){t(this),this.message=n?n.length+" errors occurred during unsubscription:\n"+n.map((function(t,n){return n+1+") "+t.toString()})).join("\n "):"",this.name="UnsubscriptionError",this.errors=n}}));function p(t,n){if(t){var r=t.indexOf(n);0<=r&&t.splice(r,1)}}var d=function(){function t(t){this.initialTeardown=t,this.closed=!1,this._parentage=null,this._finalizers=null}return t.prototype.unsubscribe=function(){var t,n,r,i,e;if(!this.closed){this.closed=!0;var o=this._parentage;if(o)if(this._parentage=null,Array.isArray(o))try{for(var u=l(o),c=u.next();!c.done;c=u.next())c.value.remove(this)}catch(n){t={error:n}}finally{try{c&&!c.done&&(n=u.return)&&n.call(u)}finally{if(t)throw t.error}}else o.remove(this);var f=this.initialTeardown;if(y(f))try{f()}catch(t){e=t instanceof m?t.errors:[t]}var s=this._finalizers;if(s){this._finalizers=null;try{for(var a=l(s),b=a.next();!b.done;b=a.next()){var p=b.value;try{j(p)}catch(t){e??=[],t instanceof m?e=v(v([],h(e)),h(t.errors)):e.push(t)}}}catch(t){r={error:t}}finally{try{b&&!b.done&&(i=a.return)&&i.call(a)}finally{if(r)throw r.error}}}if(e)throw new m(e)}},t.prototype.add=function(n){if(n&&n!==this)if(this.closed)j(n);else{if(n instanceof t){if(n.closed||n._hasParent(this))return;n._addParent(this)}(this._finalizers=this._finalizers??[]).push(n)}},t.prototype._hasParent=function(t){var n=this._parentage;return n===t||Array.isArray(n)&&n.includes(t)},t.prototype._addParent=function(t){var n=this._parentage;this._parentage=Array.isArray(n)?(n.push(t),n):n?[n,t]:t},t.prototype._removeParent=function(t){var n=this._parentage;n===t?this._parentage=null:Array.isArray(n)&&p(n,t)},t.prototype.remove=function(n){var r=this._finalizers;r&&p(r,n),n instanceof t&&n._removeParent(this)},t.EMPTY=((n=new t).closed=!0,n),t;var n}(),g=d.EMPTY;function w(t){return t instanceof d||t&&"closed"in t&&y(t.remove)&&y(t.add)&&y(t.unsubscribe)}function j(t){y(t)?t():t.unsubscribe()}function x(){}function O(t){t()}var R=function(t){function n(n){var r=t.call(this)||this;return r.isStopped=!1,n?(r.destination=n,w(n)&&n.add(r)):r.destination=A,r}return a(n,t),n.create=function(t,n,r){return new S(t,n,r)},n.prototype.next=function(t){this.isStopped||this._next(t)},n.prototype.error=function(t){this.isStopped||(this.isStopped=!0,this._error(t))},n.prototype.complete=function(){this.isStopped||(this.isStopped=!0,this._complete())},n.prototype.unsubscribe=function(){this.closed||(this.isStopped=!0,t.prototype.unsubscribe.call(this),this.destination=null)},n.prototype._next=function(t){this.destination.next(t)},n.prototype._error=function(t){try{this.destination.error(t)}finally{this.unsubscribe()}},n.prototype._complete=function(){try{this.destination.complete()}finally{this.unsubscribe()}},n}(d),E=function(){function t(t){this.partialObserver=t}return t.prototype.next=function(t){var n=this.partialObserver;if(n.next)try{n.next(t)}catch(t){k(t)}},t.prototype.error=function(t){var n=this.partialObserver;if(n.error)try{n.error(t)}catch(t){k(t)}else k(t)},t.prototype.complete=function(){var t=this.partialObserver;if(t.complete)try{t.complete()}catch(t){k(t)}},t}(),S=function(t){function n(n,r,i){var e,o=t.call(this)||this;return e=y(n)||!n?{next:n??void 0,error:r??void 0,complete:i??void 0}:n,o.destination=new E(e),o}return a(n,t),n}(R);function k(t){!function(t){!function(t,n){var r=[...arguments].slice(2);setTimeout.apply(void 0,v([t,n],h(r)))}((function(){throw t}))}(t)}var A={closed:!0,next:x,error:function(t){throw t},complete:x},C="function"==typeof Symbol&&Symbol.observable||"@@observable";function P(t){return t}var T=function(){function t(t){t&&(this._subscribe=t)}return t.prototype.lift=function(n){var r=new t;return r.source=this,r.operator=n,r},t.prototype.subscribe=function(t,n,r){var i=this,e=function(t){return t&&t instanceof R||function(t){return t&&y(t.next)&&y(t.error)&&y(t.complete)}(t)&&w(t)}(t)?t:new S(t,n,r);return O((function(){var t=i.operator,n=i.source;e.add(t?t.call(e,n):n?i._subscribe(e):i._trySubscribe(e))})),e},t.prototype._trySubscribe=function(t){try{return this._subscribe(t)}catch(n){t.error(n)}},t.prototype.forEach=function(t,n){var r=this;return new(n=$(n))((function(n,i){var e=new S({next:function(n){try{t(n)}catch(t){i(t),e.unsubscribe()}},error:i,complete:n});r.subscribe(e)}))},t.prototype._subscribe=function(t){return this.source?.subscribe(t)},t.prototype[C]=function(){return this},t.prototype.pipe=function(){return function(t){return 0===t.length?P:1===t.length?t[0]:function(n){return t.reduce((function(t,n){return n(t)}),n)}}([...arguments])(this)},t.prototype.toPromise=function(t){var n=this;return new(t=$(t))((function(t,r){var i;n.subscribe((function(t){return i=t}),(function(t){return r(t)}),(function(){return t(i)}))}))},t.create=function(n){return new t(n)},t}();function $(t){return t??undefined??Promise}var M=b((function(t){return function(){t(this),this.name="ObjectUnsubscribedError",this.message="object unsubscribed"}})),_=function(t){function n(){var n=t.call(this)||this;return n.closed=!1,n.currentObservers=null,n.observers=[],n.isStopped=!1,n.hasError=!1,n.thrownError=null,n}return a(n,t),n.prototype.lift=function(t){var n=new q(this,this);return n.operator=t,n},n.prototype._throwIfClosed=function(){if(this.closed)throw new M},n.prototype.next=function(t){var n=this;O((function(){var r,i;if(n._throwIfClosed(),!n.isStopped){n.currentObservers||=Array.from(n.observers);try{for(var e=l(n.currentObservers),o=e.next();!o.done;o=e.next())o.value.next(t)}catch(t){r={error:t}}finally{try{o&&!o.done&&(i=e.return)&&i.call(e)}finally{if(r)throw r.error}}}}))},n.prototype.error=function(t){var n=this;O((function(){if(n._throwIfClosed(),!n.isStopped){n.hasError=n.isStopped=!0,n.thrownError=t;for(var r=n.observers;r.length;)r.shift().error(t)}}))},n.prototype.complete=function(){var t=this;O((function(){if(t._throwIfClosed(),!t.isStopped){t.isStopped=!0;for(var n=t.observers;n.length;)n.shift().complete()}}))},n.prototype.unsubscribe=function(){this.isStopped=this.closed=!0,this.observers=this.currentObservers=null},Object.defineProperty(n.prototype,"observed",{get:function(){return this.observers?.length>0},enumerable:!1,configurable:!0}),n.prototype._trySubscribe=function(n){return this._throwIfClosed(),t.prototype._trySubscribe.call(this,n)},n.prototype._subscribe=function(t){return this._throwIfClosed(),this._checkFinalizedStatuses(t),this._innerSubscribe(t)},n.prototype._innerSubscribe=function(t){var n=this,r=this,i=r.observers;return r.hasError||r.isStopped?g:(this.currentObservers=null,i.push(t),new d((function(){n.currentObservers=null,p(i,t)})))},n.prototype._checkFinalizedStatuses=function(t){var n=this,r=n.isStopped;n.hasError?t.error(n.thrownError):r&&t.complete()},n.prototype.asObservable=function(){var t=new T;return t.source=this,t},n.create=function(t,n){return new q(t,n)},n}(T),q=function(t){function n(n,r){var i=t.call(this)||this;return i.destination=n,i.source=r,i}return a(n,t),n.prototype.next=function(t){var n,r;null==(r=(n=this.destination)?.next)||r.call(n,t)},n.prototype.error=function(t){var n,r;null==(r=(n=this.destination)?.error)||r.call(n,t)},n.prototype.complete=function(){var t,n;null==(n=(t=this.destination)?.complete)||n.call(t)},n.prototype._subscribe=function(t){return this.source?.subscribe(t)??g},n}(_),F=function(t){function n(n){var r=t.call(this)||this;return r._value=n,r}return a(n,t),Object.defineProperty(n.prototype,"value",{get:function(){return this.getValue()},enumerable:!1,configurable:!0}),n.prototype._subscribe=function(n){var r=t.prototype._subscribe.call(this,n);return!r.closed&&n.next(this._value),r},n.prototype.getValue=function(){var t=this,n=t._value;if(t.hasError)throw t.thrownError;return this._throwIfClosed(),n},n.prototype.next=function(n){t.prototype.next.call(this,this._value=n)},n}(_);function N(t){return t}function U(t,n){return(r,i)=>{let e=function(t,n,r,i){let e=W.get(t);return e||(e=[],W.set(t,e)),e.push({options:r,name:n,optionFactory:i.optionFactory||N,service:{name:i.name,method:i.method||"subscribe"}}),e}(r,i,t,n);1===e.length&&function(t,n){t.connectedCallback=I(t.connectedCallback,n),t.componentWillLoad=function(t,n){return function(...r){return!0===D.get(this)?t?t.apply(this,r):void 0:I(t,n).apply(this,r)}}(t.componentWillLoad,n),t.componentDidUnload=L(t.componentDidUnload),t.disconnectedCallback=L(t.disconnectedCallback)}(r,e)}}var W=new WeakMap,B=new WeakMap,D=new WeakMap;function I(t,r){return function(...i){D.set(this,!0);let e=[];B.set(this,e);let u=new F(f(this));e.push(function(t,r){let i=n(t);return c in i?function(t,n){let r=Object.getOwnPropertyDescriptor(t,c),i=function(t,n){let r=t;for(;r;){let t=Object.getOwnPropertyDescriptor(r,n);if(t)return t;r=Object.getPrototypeOf(r)}}(t,c);return n(i?.get?.call(t)),Object.defineProperty(t,c,{configurable:!0,enumerable:!0,get:()=>i?.get?.call(t),set:r=>{i?.set?.call(t,r),n(r)}}),()=>{r?Object.defineProperty(t,c,r):Reflect.deleteProperty(t,c)}}(i,r):function(t,n,r){let i,e={context:c,subscribe:!0,callback:(t,n)=>{r(t),n&&(i=n)}};return t.dispatchEvent(new CustomEvent(o,{bubbles:!0,composed:!0,detail:e})),()=>i?.()}(i,0,r)}(this,(t=>u.next(t))));for(let t of r)t.options=t.optionFactory(t.options,this),G(t.options)&&(t.options.context=u),H(this,t);if(t)return t.apply(this,i)}}function L(t){return async function(...n){let r;return t&&(r=t.apply(this,n)),function(t){let n=B.get(t);for(let t of n)t();B.set(t,[])}(this),r}}function G(t){return"context"in t}function H(t,r){let i=function(t,r){let i={...r.options};!function(t,n){t.filter&&=t.filter.map((t=>t.bind(n))),t.map&&=t.map.map((t=>t.bind(n)))}(i,t);let e=r.service.name,o=function(t){if(t.platform)return t.platform;let r=u(n(t),"platform");if(!r)throw Error("Platform not available. Set the @Prop() platform value or provide it via ContextRegistry.provide('platform', ...) at boot.");return r}(t);if(!o.has(e))throw Error(`Service ${e} does not exist`);return o.get(e)[r.service.method](function(t,n){return r=>{t[n]=r}}(t,r.name),i)}(t,r);"function"==typeof i&&B.get(t).push(i)}function z(t={}){return U(t,{name:r.LimeTypeRepository})}function J(t={}){let n={name:r.LimeTypeRepository};return t.map=[K,...t.map||[]],t.context=null,U(t,n)}function K(t){let n=f(this);if(n)return t[n.limetype]}function Q(t={}){let n={name:r.LimeObjectRepository};return t.map=[V,...t.map||[]],t.context=null,U(t,n)}function V(t){let n=f(this);if(!n)return;let{limetype:r,id:i}=n;return t[r]?t[r].find((t=>t.id===i)):void 0}function X(t){return n=>{(function(t,n){t.commandId=n})(n,t.id),function(t,n){Object.defineProperty(t,Symbol.hasInstance,{value:t=>function(t){let n,r=[],i=t;for(;n=Y(i);)r=[...r,n],i=Object.getPrototypeOf(i);return[...new Set(r)]}(t).includes(n)})}(n,t.id)}}function Y(t){return"string"==typeof t?t:t&&t.constructor&&t.constructor.commandId?t.constructor.commandId:t&&t.commandId?t.commandId:null}function Z(t,n,r,i){var e,o=arguments.length,u=o<3?n:null===i?i=Object.getOwnPropertyDescriptor(n,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)u=Reflect.decorate(t,n,r,i);else for(var c=t.length-1;c>=0;c--)(e=t[c])&&(u=(o<3?e(u):o>3?e(n,r,u):e(n,r))||u);return o>3&&u&&Object.defineProperty(n,r,u),u}r.LimeObjectRepository="state.limeobjects",r.CommandBus="commandBus";var tt=class{context;filter;relation};tt=Z([X({id:"limeobject.bulk-create-dialog"})],tt);var nt=class{limetype;limeobject;route=!1;title;subtitle;context;autoAttachRelation;saveCommand};nt=Z([X({id:"limeobject.create-dialog"})],nt);var rt=class{context};rt=Z([X({id:"limeobject.delete-object"})],rt);var it=class{context};it=Z([X({id:"limeobject.object-access"})],it);var et=class{context;limeobject;route=!1;label};et=Z([X({id:"limeobject.save-object"})],et);var ot=function(t){return t.AND="AND",t.OR="OR",t.NOT="!",t.EQUALS="=",t.NOT_EQUALS="!=",t.GREATER=">",t.LESS="<",t.IN="IN",t.BEGINS="=?",t.LIKE="?",t.LESS_OR_EQUAL="<=",t.GREATER_OR_EQUAL=">=",t.ENDS="=$",t}({}),ut={Count:"COUNT"};r.Query="query";var ct={Post:"POST"};r.Http="http",r.EventDispatcher="eventDispatcher",r.Translate="translate",r.Dialog="dialog",r.KeybindingRegistry="keybindingRegistry",r.Navigator="navigator";var ft,st,at=class{path;query;hash;state};function lt(t){return U(t,{name:r.ConfigRepository})}function ht(t={}){return U(t,{name:r.FilterRepository})}function vt(t){let n=window.Lime?.logger?.createLogger;return"function"==typeof n?(void 0===st&&(st=function(t){return t&&(function(t){let n=t.match(/\/([^/]+)-lwc-components\//);return n?n[1]:null}(t)||function(t){let n=t.match(/\/packages\/(?:@[^/]+\/)?([^/]+)/);return n?n[1]:null}(t)||function(t){let n=t.indexOf("+");if(-1===n)return null;let r=t.slice(0,n),i=r.lastIndexOf("/");return-1===i?null:r.slice(i+1)}(t)||function(t){let n=t.match(/\/static\/([^/]+)\//);return n?n[1]:null}(t))||null}(void 0===ft?ft="string"==typeof import.meta.url?import.meta.url:function(){try{let t=Error(".").stack;if(!t)return null;let n=t.split("\n");for(let t of n){let n=t.match(/(https?:\/\/[^)\s:]+)/);if(n)return n[1]}return null}catch{return null}}():ft)),st&&(t=`${st}:${t}`),n(t)):(console.warn(`Logger factory is not configured. Returning console logger for scope "${t}".`),console)}at=Z([X({id:"navigator.navigate"})],at),r.Notification="notifications",r.RouteRegistry="routeRegistry",r.TaskRepository="state.tasks",r.ConfigRepository="state.configs",r.Device="state.device",r.FilterRepository="state.filters",r.UserDataRepository="state.user-data",r.Application="state.application",r.UserPreferencesRepository="userPreferences",r.DateTimeFormatter="datetimeformatter",r.ConditionRegistry="conditionRegistry",r.ContextRegistry="contextRegistry",r.RuleRegistry="ruleRegistry",r.ViewFactoryRegistry="viewFactoryRegistry",r.WebComponentRegistry="webComponentRegistry",r.NotificationRepository="state.notifications",r.PollerFactory="pollerFactory",r.Logger="logger",r.ProblemRepository="problemRepository",r.AIContextRegistry="aiContextRegistry";var yt=null;try{t((function(t,n){yt||=vt("uncaught-error");let r={};n&&(r.element=n.tagName,n.id&&(r.elementId=n.id));let i=t instanceof Error?t.message:String(t),e=t instanceof Error?t:void 0;yt.error(i,e,r)}))}catch{}export{Q as G,X as H,z as L,J as R,e as a,r as b,ct as c,ht as d,i,vt as j,lt as l,ot as n,ut as r}
1
+ import{a as t,g as n}from"./p-BIwHMk6j.js";var r={};function i(t){return t&&["belongsto","hasone","hasmany","hasandbelongstomany"].includes(t.type)}function e(t){return t&&["belongsto","hasone"].includes(t.type)}r.LimeTypeRepository="state.limetypes";var o="context-request";function u(t,n){let r,i={context:n,callback:t=>{r=t}};return t.dispatchEvent(new CustomEvent(o,{bubbles:!0,composed:!0,detail:i})),r}var c="context";function f(t){return t.context?t.context:u(n(t),c)}var s=function(t,n){return s=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])},s(t,n)};function a(t,n){if("function"!=typeof n&&null!==n)throw TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}s(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}function l(t){var n="function"==typeof Symbol&&Symbol.iterator,r=n&&t[n],i=0;if(r)return r.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&i>=t.length&&(t=void 0),{value:t&&t[i++],done:!t}}};throw TypeError(n?"Object is not iterable.":"Symbol.iterator is not defined.")}function h(t){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var r,i,e=n.call(t),o=[];try{for(;!(r=e.next()).done;)o.push(r.value)}catch(t){i={error:t}}finally{try{r&&!r.done&&(n=e.return)&&n.call(e)}finally{if(i)throw i.error}}return o}function v(t,n,r){if(2===arguments.length)for(var i,e=0,o=n.length;e<o;e++)(i||!(e in n))&&(i||=Array.prototype.slice.call(n,0,e),i[e]=n[e]);return t.concat(i||Array.prototype.slice.call(n))}function y(t){return"function"==typeof t}function b(t){var n=t((function(t){Error.call(t),t.stack=Error().stack}));return n.prototype=Object.create(Error.prototype),n.prototype.constructor=n,n}var m=b((function(t){return function(n){t(this),this.message=n?n.length+" errors occurred during unsubscription:\n"+n.map((function(t,n){return n+1+") "+t.toString()})).join("\n "):"",this.name="UnsubscriptionError",this.errors=n}}));function p(t,n){if(t){var r=t.indexOf(n);0<=r&&t.splice(r,1)}}var d=function(){function t(t){this.initialTeardown=t,this.closed=!1,this._parentage=null,this._finalizers=null}return t.prototype.unsubscribe=function(){var t,n,r,i,e;if(!this.closed){this.closed=!0;var o=this._parentage;if(o)if(this._parentage=null,Array.isArray(o))try{for(var u=l(o),c=u.next();!c.done;c=u.next())c.value.remove(this)}catch(n){t={error:n}}finally{try{c&&!c.done&&(n=u.return)&&n.call(u)}finally{if(t)throw t.error}}else o.remove(this);var f=this.initialTeardown;if(y(f))try{f()}catch(t){e=t instanceof m?t.errors:[t]}var s=this._finalizers;if(s){this._finalizers=null;try{for(var a=l(s),b=a.next();!b.done;b=a.next()){var p=b.value;try{j(p)}catch(t){e??=[],t instanceof m?e=v(v([],h(e)),h(t.errors)):e.push(t)}}}catch(t){r={error:t}}finally{try{b&&!b.done&&(i=a.return)&&i.call(a)}finally{if(r)throw r.error}}}if(e)throw new m(e)}},t.prototype.add=function(n){if(n&&n!==this)if(this.closed)j(n);else{if(n instanceof t){if(n.closed||n._hasParent(this))return;n._addParent(this)}(this._finalizers=this._finalizers??[]).push(n)}},t.prototype._hasParent=function(t){var n=this._parentage;return n===t||Array.isArray(n)&&n.includes(t)},t.prototype._addParent=function(t){var n=this._parentage;this._parentage=Array.isArray(n)?(n.push(t),n):n?[n,t]:t},t.prototype._removeParent=function(t){var n=this._parentage;n===t?this._parentage=null:Array.isArray(n)&&p(n,t)},t.prototype.remove=function(n){var r=this._finalizers;r&&p(r,n),n instanceof t&&n._removeParent(this)},t.EMPTY=((n=new t).closed=!0,n),t;var n}(),g=d.EMPTY;function w(t){return t instanceof d||t&&"closed"in t&&y(t.remove)&&y(t.add)&&y(t.unsubscribe)}function j(t){y(t)?t():t.unsubscribe()}function x(){}function O(t){t()}var R=function(t){function n(n){var r=t.call(this)||this;return r.isStopped=!1,n?(r.destination=n,w(n)&&n.add(r)):r.destination=A,r}return a(n,t),n.create=function(t,n,r){return new S(t,n,r)},n.prototype.next=function(t){this.isStopped||this._next(t)},n.prototype.error=function(t){this.isStopped||(this.isStopped=!0,this._error(t))},n.prototype.complete=function(){this.isStopped||(this.isStopped=!0,this._complete())},n.prototype.unsubscribe=function(){this.closed||(this.isStopped=!0,t.prototype.unsubscribe.call(this),this.destination=null)},n.prototype._next=function(t){this.destination.next(t)},n.prototype._error=function(t){try{this.destination.error(t)}finally{this.unsubscribe()}},n.prototype._complete=function(){try{this.destination.complete()}finally{this.unsubscribe()}},n}(d),E=function(){function t(t){this.partialObserver=t}return t.prototype.next=function(t){var n=this.partialObserver;if(n.next)try{n.next(t)}catch(t){k(t)}},t.prototype.error=function(t){var n=this.partialObserver;if(n.error)try{n.error(t)}catch(t){k(t)}else k(t)},t.prototype.complete=function(){var t=this.partialObserver;if(t.complete)try{t.complete()}catch(t){k(t)}},t}(),S=function(t){function n(n,r,i){var e,o=t.call(this)||this;return e=y(n)||!n?{next:n??void 0,error:r??void 0,complete:i??void 0}:n,o.destination=new E(e),o}return a(n,t),n}(R);function k(t){!function(t){!function(t,n){var r=[...arguments].slice(2);setTimeout.apply(void 0,v([t,n],h(r)))}((function(){throw t}))}(t)}var A={closed:!0,next:x,error:function(t){throw t},complete:x},C="function"==typeof Symbol&&Symbol.observable||"@@observable";function P(t){return t}var M=function(){function t(t){t&&(this._subscribe=t)}return t.prototype.lift=function(n){var r=new t;return r.source=this,r.operator=n,r},t.prototype.subscribe=function(t,n,r){var i=this,e=function(t){return t&&t instanceof R||function(t){return t&&y(t.next)&&y(t.error)&&y(t.complete)}(t)&&w(t)}(t)?t:new S(t,n,r);return O((function(){var t=i.operator,n=i.source;e.add(t?t.call(e,n):n?i._subscribe(e):i._trySubscribe(e))})),e},t.prototype._trySubscribe=function(t){try{return this._subscribe(t)}catch(n){t.error(n)}},t.prototype.forEach=function(t,n){var r=this;return new(n=T(n))((function(n,i){var e=new S({next:function(n){try{t(n)}catch(t){i(t),e.unsubscribe()}},error:i,complete:n});r.subscribe(e)}))},t.prototype._subscribe=function(t){return this.source?.subscribe(t)},t.prototype[C]=function(){return this},t.prototype.pipe=function(){return function(t){return 0===t.length?P:1===t.length?t[0]:function(n){return t.reduce((function(t,n){return n(t)}),n)}}([...arguments])(this)},t.prototype.toPromise=function(t){var n=this;return new(t=T(t))((function(t,r){var i;n.subscribe((function(t){return i=t}),(function(t){return r(t)}),(function(){return t(i)}))}))},t.create=function(n){return new t(n)},t}();function T(t){return t??undefined??Promise}var $=b((function(t){return function(){t(this),this.name="ObjectUnsubscribedError",this.message="object unsubscribed"}})),_=function(t){function n(){var n=t.call(this)||this;return n.closed=!1,n.currentObservers=null,n.observers=[],n.isStopped=!1,n.hasError=!1,n.thrownError=null,n}return a(n,t),n.prototype.lift=function(t){var n=new q(this,this);return n.operator=t,n},n.prototype._throwIfClosed=function(){if(this.closed)throw new $},n.prototype.next=function(t){var n=this;O((function(){var r,i;if(n._throwIfClosed(),!n.isStopped){n.currentObservers||=Array.from(n.observers);try{for(var e=l(n.currentObservers),o=e.next();!o.done;o=e.next())o.value.next(t)}catch(t){r={error:t}}finally{try{o&&!o.done&&(i=e.return)&&i.call(e)}finally{if(r)throw r.error}}}}))},n.prototype.error=function(t){var n=this;O((function(){if(n._throwIfClosed(),!n.isStopped){n.hasError=n.isStopped=!0,n.thrownError=t;for(var r=n.observers;r.length;)r.shift().error(t)}}))},n.prototype.complete=function(){var t=this;O((function(){if(t._throwIfClosed(),!t.isStopped){t.isStopped=!0;for(var n=t.observers;n.length;)n.shift().complete()}}))},n.prototype.unsubscribe=function(){this.isStopped=this.closed=!0,this.observers=this.currentObservers=null},Object.defineProperty(n.prototype,"observed",{get:function(){return this.observers?.length>0},enumerable:!1,configurable:!0}),n.prototype._trySubscribe=function(n){return this._throwIfClosed(),t.prototype._trySubscribe.call(this,n)},n.prototype._subscribe=function(t){return this._throwIfClosed(),this._checkFinalizedStatuses(t),this._innerSubscribe(t)},n.prototype._innerSubscribe=function(t){var n=this,r=this,i=r.observers;return r.hasError||r.isStopped?g:(this.currentObservers=null,i.push(t),new d((function(){n.currentObservers=null,p(i,t)})))},n.prototype._checkFinalizedStatuses=function(t){var n=this,r=n.isStopped;n.hasError?t.error(n.thrownError):r&&t.complete()},n.prototype.asObservable=function(){var t=new M;return t.source=this,t},n.create=function(t,n){return new q(t,n)},n}(M),q=function(t){function n(n,r){var i=t.call(this)||this;return i.destination=n,i.source=r,i}return a(n,t),n.prototype.next=function(t){var n,r;null==(r=(n=this.destination)?.next)||r.call(n,t)},n.prototype.error=function(t){var n,r;null==(r=(n=this.destination)?.error)||r.call(n,t)},n.prototype.complete=function(){var t,n;null==(n=(t=this.destination)?.complete)||n.call(t)},n.prototype._subscribe=function(t){return this.source?.subscribe(t)??g},n}(_),F=function(t){function n(n){var r=t.call(this)||this;return r._value=n,r}return a(n,t),Object.defineProperty(n.prototype,"value",{get:function(){return this.getValue()},enumerable:!1,configurable:!0}),n.prototype._subscribe=function(n){var r=t.prototype._subscribe.call(this,n);return!r.closed&&n.next(this._value),r},n.prototype.getValue=function(){var t=this,n=t._value;if(t.hasError)throw t.thrownError;return this._throwIfClosed(),n},n.prototype.next=function(n){t.prototype.next.call(this,this._value=n)},n}(_);function N(t){return t}function U(t,n){return(r,i)=>{let e=function(t,n,r,i){let e=W.get(t);return e||(e=[],W.set(t,e)),e.push({options:r,name:n,optionFactory:i.optionFactory||N,service:{name:i.name,method:i.method||"subscribe"}}),e}(r,i,t,n);1===e.length&&function(t,n){t.connectedCallback=I(t.connectedCallback,n),t.componentWillLoad=function(t,n){return function(...r){return!0===D.get(this)?t?t.apply(this,r):void 0:I(t,n).apply(this,r)}}(t.componentWillLoad,n),t.componentDidUnload=L(t.componentDidUnload),t.disconnectedCallback=L(t.disconnectedCallback)}(r,e)}}var W=new WeakMap,B=new WeakMap,D=new WeakMap;function I(t,r){return function(...i){D.set(this,!0);let e=[];B.set(this,e);let u=new F(f(this));e.push(function(t,r){let i=n(t);return c in i?function(t,n){let r=Object.getOwnPropertyDescriptor(t,c),i=function(t,n){let r=t;for(;r;){let t=Object.getOwnPropertyDescriptor(r,n);if(t)return t;r=Object.getPrototypeOf(r)}}(t,c);return n(i?.get?.call(t)),Object.defineProperty(t,c,{configurable:!0,enumerable:!0,get:()=>i?.get?.call(t),set:r=>{i?.set?.call(t,r),n(r)}}),()=>{r?Object.defineProperty(t,c,r):Reflect.deleteProperty(t,c)}}(i,r):function(t,n,r){let i,e={context:c,subscribe:!0,callback:(t,n)=>{r(t),n&&(i=n)}};return t.dispatchEvent(new CustomEvent(o,{bubbles:!0,composed:!0,detail:e})),()=>i?.()}(i,0,r)}(this,(t=>u.next(t))));for(let t of r)t.options=t.optionFactory(t.options,this),G(t.options)&&(t.options.context=u),H(this,t);if(t)return t.apply(this,i)}}function L(t){return async function(...n){let r;return t&&(r=t.apply(this,n)),function(t){let n=B.get(t);for(let t of n)t();B.set(t,[])}(this),r}}function G(t){return"context"in t}function H(t,r){let i=function(t,r){let i={...r.options};!function(t,n){t.filter&&=t.filter.map((t=>t.bind(n))),t.map&&=t.map.map((t=>t.bind(n)))}(i,t);let e=r.service.name,o=function(t){if(t.platform)return t.platform;let r=u(n(t),"platform");if(!r)throw Error("Platform not available. Set the @Prop() platform value or provide it via ContextRegistry.provide('platform', ...) at boot.");return r}(t);if(!o.has(e))throw Error(`Service ${e} does not exist`);return o.get(e)[r.service.method](function(t,n){return r=>{t[n]=r}}(t,r.name),i)}(t,r);"function"==typeof i&&B.get(t).push(i)}function z(t={}){return U(t,{name:r.LimeTypeRepository})}function J(t={}){let n={name:r.LimeTypeRepository};return t.map=[K,...t.map||[]],t.context=null,U(t,n)}function K(t){let n=f(this);if(n)return t[n.limetype]}function Q(t={}){let n={name:r.LimeObjectRepository};return t.map=[V,...t.map||[]],t.context=null,U(t,n)}function V(t){let n=f(this);if(!n)return;let{limetype:r,id:i}=n;return t[r]?t[r].find((t=>t.id===i)):void 0}function X(t){return n=>{(function(t,n){t.commandId=n})(n,t.id),function(t,n){Object.defineProperty(t,Symbol.hasInstance,{value:t=>function(t){let n,r=[],i=t;for(;n=Y(i);)r=[...r,n],i=Object.getPrototypeOf(i);return[...new Set(r)]}(t).includes(n)})}(n,t.id)}}function Y(t){return"string"==typeof t?t:t&&t.constructor&&t.constructor.commandId?t.constructor.commandId:t&&t.commandId?t.commandId:null}function Z(t,n,r,i){var e,o=arguments.length,u=o<3?n:null===i?i=Object.getOwnPropertyDescriptor(n,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)u=Reflect.decorate(t,n,r,i);else for(var c=t.length-1;c>=0;c--)(e=t[c])&&(u=(o<3?e(u):o>3?e(n,r,u):e(n,r))||u);return o>3&&u&&Object.defineProperty(n,r,u),u}r.LimeObjectRepository="state.limeobjects",r.CommandBus="commandBus";var tt=class{context;filter;relation};tt=Z([X({id:"limeobject.bulk-create-dialog"})],tt);var nt=class{limetype;limeobject;route=!1;title;subtitle;context;autoAttachRelation;saveCommand};nt=Z([X({id:"limeobject.create-dialog"})],nt);var rt=class{context};rt=Z([X({id:"limeobject.delete-object"})],rt);var it=class{context};it=Z([X({id:"limeobject.object-access"})],it);var et=class{context;limeobject;route=!1;label};et=Z([X({id:"limeobject.save-object"})],et);var ot=function(t){return t.AND="AND",t.OR="OR",t.NOT="!",t.EQUALS="=",t.NOT_EQUALS="!=",t.GREATER=">",t.LESS="<",t.IN="IN",t.BEGINS="=?",t.LIKE="?",t.LESS_OR_EQUAL="<=",t.GREATER_OR_EQUAL=">=",t.ENDS="=$",t}({}),ut={Count:"COUNT"};r.Query="query";var ct={Post:"POST"};r.Http="http",r.EventDispatcher="eventDispatcher",r.Translate="translate",r.Dialog="dialog",r.KeybindingRegistry="keybindingRegistry",r.Navigator="navigator";var ft,st,at=class{path;query;hash;state};function lt(t){return U(t,{name:r.ConfigRepository})}function ht(t={}){return U(t,{name:r.FilterRepository})}function vt(t){let n=window.Lime?.logger?.createLogger;return"function"==typeof n?(void 0===st&&(st=function(t){return t&&(function(t){let n=t.match(/\/([^/]+)-lwc-components\//);return n?n[1]:null}(t)||function(t){let n=t.match(/\/packages\/(?:@[^/]+\/)?([^/]+)/);return n?n[1]:null}(t)||function(t){let n=t.indexOf("+");if(-1===n)return null;let r=t.slice(0,n),i=r.lastIndexOf("/");return-1===i?null:r.slice(i+1)}(t)||function(t){let n=t.match(/\/static\/([^/]+)\//);return n?n[1]:null}(t))||null}(void 0===ft?ft="string"==typeof import.meta.url?import.meta.url:function(){try{let t=Error(".").stack;if(!t)return null;let n=t.split("\n");for(let t of n){let n=t.match(/(https?:\/\/[^)\s:]+)/);if(n)return n[1]}return null}catch{return null}}():ft)),st&&(t=`${st}:${t}`),n(t)):(console.warn(`Logger factory is not configured. Returning console logger for scope "${t}".`),console)}at=Z([X({id:"navigator.navigate"})],at),r.Notification="notifications",r.RouteRegistry="routeRegistry",r.TaskRepository="state.tasks",r.ConfigRepository="state.configs",r.Device="state.device",r.FilterRepository="state.filters",r.UserDataRepository="state.user-data",r.Application="state.application",r.UserPreferencesRepository="userPreferences",r.DateTimeFormatter="datetimeformatter",r.ConditionRegistry="conditionRegistry",r.ContextRegistry="contextRegistry",r.RuleRegistry="ruleRegistry",r.ViewFactoryRegistry="viewFactoryRegistry",r.WebComponentRegistry="webComponentRegistry",r.NotificationRepository="state.notifications",r.PollerFactory="pollerFactory",r.Logger="logger",r.ProblemRepository="problemRepository",r.AIContextRegistry="aiContextRegistry";var yt=null;try{t((function(t,n){yt||=vt("uncaught-error");let r={};n&&(r.element=n.tagName,n.id&&(r.elementId=n.id));let i=t instanceof Error?t.message:String(t),e=t instanceof Error?t:void 0;yt.error(i,e,r)}))}catch{}export{Q as G,X as H,z as L,vt as M,J as R,e as a,r as b,ct as c,ht as d,i,lt as l,ot as n,ut as r}
@@ -12,16 +12,18 @@ export declare class MentionsService {
12
12
  private readonly platform;
13
13
  private readonly context;
14
14
  private readonly searchableLimetypes;
15
+ private readonly host;
15
16
  private readonly groupCounts;
16
17
  private readonly _triggerCharacter;
17
18
  private readonly _triggerHandler;
18
19
  private get limeObjectService();
19
20
  private get queryService();
20
21
  private get viewFactoryRegistry();
22
+ private get contextRegistry();
21
23
  private get translator();
22
24
  get triggerCharacter(): TriggerCharacter;
23
25
  get triggerHandler(): TriggerHandler;
24
- constructor(platform: LimeWebComponentPlatform, context: LimeWebComponentContext, searchableLimetypes: LimeType[]);
26
+ constructor(platform: LimeWebComponentPlatform, context: LimeWebComponentContext, searchableLimetypes: LimeType[], host: HTMLElement);
25
27
  initialize(): Promise<void>;
26
28
  private loadGroupCounts;
27
29
  private getGroupCounts;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@limetech/lime-crm-building-blocks",
3
- "version": "1.126.2",
3
+ "version": "1.126.4",
4
4
  "description": "A home for shared components meant for use with Lime CRM",
5
5
  "main": "dist/index.cjs.js",
6
6
  "module": "dist/index.js",
@@ -35,10 +35,10 @@
35
35
  },
36
36
  "devDependencies": {
37
37
  "@limetech/eslint-config": "^4.0.1",
38
- "@limetech/lime-elements": "^39.25.0",
39
- "@limetech/lime-web-components": "^6.23.0",
40
- "@lundalogik/lime-icons8": "^2.40.1",
41
- "@lundalogik/limeclient.js": "^1.102.1",
38
+ "@limetech/lime-elements": "^39.29.0",
39
+ "@limetech/lime-web-components": "^6.24.0",
40
+ "@lundalogik/lime-icons8": "^2.41.0",
41
+ "@lundalogik/limeclient.js": "^1.104.0",
42
42
  "@stencil/core": "^4.43.4",
43
43
  "@stencil/sass": "^3.1.9",
44
44
  "@types/jest": "^29.5.14",
@@ -1 +0,0 @@
1
- import{r as t,c as i,h as e,g as s}from"./p-BIwHMk6j.js";import{b as r,r as n,c as o,L as a}from"./p-D5qhls4G.js";import{A as h,a as c,b as u,E as l,T as d}from"./p-CwMJvF_Z.js";import{o as f,U as v,c as m,a as p,d as b,n as g,i as j,S as y,g as w}from"./p-CtcTT7BK.js";import{d as O}from"./p-Ceen0vzd.js";import{c as k,e as x,S as C,i as S,a as T,r as I}from"./p-BgAfMcRA.js";import{c as A}from"./p-C2JP2nLw.js";import{h as F,b as M,c as E}from"./p-CI7dwT4T.js";import{i as P}from"./p-CkTg5UPD.js";import{i as N}from"./p-6PYziigk.js";var D=/\s/,$=/^\s+/;var _=/^[-+]0x[0-9a-f]+$/i,L=/^0b[01]+$/i,z=/^0o[0-7]+$/i,R=parseInt;function U(t){if("number"==typeof t)return t;if(N(t))return NaN;if(k(t)){var i="function"==typeof t.valueOf?t.valueOf():t;t=k(i)?i+"":i}if("string"!=typeof t)return 0===t?t:+t;var e;t=(e=t)?e.slice(0,function(t){for(var i=t.length;i--&&D.test(t.charAt(i)););return i}(e)+1).replace($,""):e;var s=L.test(t);return s||z.test(t)?R(t.slice(2),s?2:8):_.test(t)?NaN:+t}var G=Object.create,B=function(){function t(){}return function(i){if(!k(i))return{};if(G)return G(i);t.prototype=i;var e=new t;return t.prototype=void 0,e}}(),q=Object.prototype.hasOwnProperty;var H=f(Object.getPrototypeOf,Object);"object"==typeof exports&&exports&&!exports.nodeType&&exports&&"object"==typeof module&&module&&!module.nodeType&&module;var Q=Object.prototype.hasOwnProperty;function W(t){var i=new t.constructor(t.byteLength);return new v(i).set(new v(t)),i}var J=/\w*$/,K=C?C.prototype:void 0,V=K?K.valueOf:void 0;var Y=g&&g.isMap,Z=Y?b(Y):function(t){return S(t)&&"[object Map]"==p(t)},X=g&&g.isSet,tt=X?b(X):function(t){return S(t)&&"[object Set]"==p(t)},it="[object Arguments]",et="[object Function]",st="[object Object]",rt={};function nt(t,i,e,s,r,n){var o;if(void 0!==o)return o;if(!k(t))return t;var a=T(t);if(a)o=function(t){var i=t.length,e=new t.constructor(i);return i&&"string"==typeof t[0]&&Q.call(t,"index")&&(e.index=t.index,e.input=t.input),e}(t);else{var h=p(t),c=h==et||"[object GeneratorFunction]"==h;if(j(t))return t.slice();if(h==st||h==it||c&&!r)o=c?{}:function(t){return"function"!=typeof t.constructor||m(t)?{}:B(H(t))}(t);else{if(!rt[h])return r?t:{};o=function(t,i){var e,s,r,n,o=t.constructor;switch(i){case"[object ArrayBuffer]":return W(t);case"[object Boolean]":case"[object Date]":return new o(+t);case"[object DataView]":return n=W((r=t).buffer),new r.constructor(n,r.byteOffset,r.byteLength);case"[object Float32Array]":case"[object Float64Array]":case"[object Int8Array]":case"[object Int16Array]":case"[object Int32Array]":case"[object Uint8Array]":case"[object Uint8ClampedArray]":case"[object Uint16Array]":case"[object Uint32Array]":return function(t){var i=W(t.buffer);return new t.constructor(i,t.byteOffset,t.length)}(t);case"[object Map]":case"[object Set]":return new o;case"[object Number]":case"[object String]":return new o(t);case"[object RegExp]":return(s=new(e=t).constructor(e.source,J.exec(e))).lastIndex=e.lastIndex,s;case"[object Symbol]":return V?Object(V.call(t)):{}}}(t,h)}}n||(n=new y);var u=n.get(t);if(u)return u;n.set(t,o),tt(t)?t.forEach((function(s){o.add(nt(s,i,e,0,t,n))})):Z(t)&&t.forEach((function(s,r){o.set(r,nt(s,i,e,0,t,n))}));var l=a?void 0:w(t);return function(t,i){for(var e=-1,s=null==t?0:t.length;++e<s&&!1!==i(t[e],e););}(l||t,(function(s,r){l&&(s=t[r=s]),function(t,i,e){var s=t[i];q.call(t,i)&&x(s,e)&&(void 0!==e||i in t)||function(t,i,e){"__proto__"==i&&O?O(t,i,{configurable:!0,enumerable:!0,value:e,writable:!0}):t[i]=e}(t,i,e)}(o,r,nt(s,i,e,0,t,n))})),o}rt[it]=rt["[object Array]"]=rt["[object ArrayBuffer]"]=rt["[object DataView]"]=rt["[object Boolean]"]=rt["[object Date]"]=rt["[object Float32Array]"]=rt["[object Float64Array]"]=rt["[object Int8Array]"]=rt["[object Int16Array]"]=rt["[object Int32Array]"]=rt["[object Map]"]=rt["[object Number]"]=rt[st]=rt["[object RegExp]"]=rt["[object Set]"]=rt["[object String]"]=rt["[object Symbol]"]=rt["[object Uint8Array]"]=rt["[object Uint8ClampedArray]"]=rt["[object Uint16Array]"]=rt["[object Uint32Array]"]=!0,rt["[object Error]"]=rt[et]=rt["[object WeakMap]"]=!1;var ot=function(){return I.Date.now()},at=Math.max,ht=Math.min;class ct{get limeObjectService(){return this.platform.get(r.LimeObjectRepository)}get queryService(){return this.platform.get(r.Query)}get viewFactoryRegistry(){return this.platform.get(r.ViewFactoryRegistry)}get translator(){var t;return null===(t=this.platform)||void 0===t?void 0:t.get(r.Translate)}get triggerCharacter(){return this._triggerCharacter}get triggerHandler(){return this._triggerHandler}constructor(t,i,e){this.platform=t,this.context=i,this.searchableLimetypes=e,this.groupCounts={},this._triggerCharacter="@",this._triggerHandler={searcher:t=>this.searcher(t),inserter:(t,i)=>this.inserter(t,i),emptySearchMessage:"Start typing a name...",noItemsFoundMessage:"No results for your search...",nodeDefinition:{customElement:{tagName:"limebb-mention",attributes:["limetype","objectid","href"]},mapAttributes:t=>({limetype:t.value.getLimetype().name,objectid:t.value.id,href:`object/${this.context.limetype}/${this.context.id}`})}},this.searcher=async t=>{if(!t)return[];const{objects:i}=await this.limeObjectService.search(t,this.searchableLimetypes,10);return this.createSearchListItems(i)},this.inserter=async(t,i)=>{var e;const s=this.triggerHandler.nodeDefinition;s&&t.insert({node:{tagName:s.customElement.tagName,attributes:s.mapAttributes(i)},children:[null===(e=i.value)||void 0===e?void 0:e.descriptive]})}}async initialize(){await this.loadGroupCounts()}async loadGroupCounts(){const t=this.searchableLimetypes.filter((t=>!M(t,"user")&&F(t,"user"))).map((t=>this.getGroupCounts(t)));for(const i of await Promise.all(t))Object.assign(this.groupCounts,i)}async getGroupCounts(t){var i;const e=E(t,"user"),s=t.name;try{const t=await this.queryService.execute({limetype:s,responseFormat:{object:{_id:null,[e.name]:{count:{aggregate:{op:n.Count}}}}}});if(!(null===(i=t.objects)||void 0===i?void 0:i.length))return{[s]:{}};const r=this.createGroupCount(t.objects,e.name);return{[s]:r}}catch(i){return console.error(`Error fetching group count for limetype: ${t.name}`,i),{[s]:{}}}}createGroupCount(t,i){const e={};for(const s of t){const{_id:t,[i]:r}=s;e[t]=r.count}return e}createSearchListItems(t=[]){return t.map((t=>this.createSearchListItem(t))).filter(P)}createSearchListItem(t){const i=this.viewFactoryRegistry.getFactory("search"),e=this.limeObjectService.getObject(t._limetype,t._id);if(!e)return null;const s=i(e,this.context),r=this.getGroupCountComponent(e);return Object.assign(Object.assign({},s),r?{primaryComponent:r}:{})}getGroupCountComponent(t){var i;const e=t.getLimetype(),s=null===(i=this.groupCounts[e.name])||void 0===i?void 0:i[t.id],r=E(e,"user");if(void 0!==s&&r)return{name:"limebb-mention-group-counter",props:{count:s,limetype:r.relation.getLimetype(),helperLabel:this.translator.get("webclient.notification-center.members-will-be-notified")}}}}class ut{constructor(t,i){this.file=t,this.http=i,this.uploadCancelled=!1,this.getUrl=t=>`api/v1/file/${null!=t?t:""}`}async initialize(){this.uploadService=await this.http.createFileUpload(o.Post,this.getUrl(),this.file),this.progressCallback&&(this.uploadService.onProgress=this.progressCallback)}async upload(){return this.uploadService.upload()}getFileName(){return this.file.name}cancel(){this.uploadService.cancel(),this.uploadCancelled=!0}set onProgress(t){this.progressCallback=t,this.uploadService&&(this.uploadService.onProgress=t)}}class lt{constructor(t){this.platform=t}async handleImagePasted(t){const i=null==t?void 0:t.fileInfo;if(!i)return;if(!this.validateImageSize(i))return;t.insertThumbnail();const e=await this.createFileUpload(i),s=null==e?void 0:e.href;return s&&void 0!==(null==e?void 0:e.fileId)?t.insertImage(s):t.insertFailedThumbnail(),e}parseFileIdFromSrc(t){if(t){const i=/\/(\d+)\/contents\/?$/.exec(t);if(i&&i[1])return Number(i[1])}}validateImageSize(t){return!!t.fileContent&&t.fileContent.size<=52428800}async createFileUpload(t){var i;if(!t.fileContent)return;const e=new ut(t.fileContent,this.http);await e.initialize();const s=Object.assign(Object.assign({},t),{progress:0,file:e,state:"added",fileId:void 0,href:void 0,id:t.id});e.onProgress=t=>{0===s.progress&&(s.state="uploading"),s.progress=t,100===t&&(s.state="finalizing")};const r=await e.upload();return s.fileId=r.id,s.filename=r.filename,s.extension=r.extension,s.contentType=r.contentType,s.size=r.size,s.state="done",s.href=null===(i=r._links)||void 0===i?void 0:i.contents.href,s}get http(){return this.platform.get(r.Http)}}const dt=class{watchOpen(){this.setupHandlers(),this.setPickerMessage()}watchQuery(){this.setPickerMessage()}constructor(e){t(this,e),this.change=i(this,"change"),this.metadataChange=i(this,"metadataChange"),this.allowMentioning=!1,this.contentType="markdown",this.language="en",this.disabled=!1,this.readonly=!1,this.invalid=!1,this.required=!1,this.ui="standard",this.allowResize=!0,this.value="",this.triggerMap={},this.customElements=[],this.allowInlineImages=!1,this.items=[],this.highlightedItemIndex=0,this.isPickerOpen=!1,this.isSearching=!1,this.registeredTriggers=[],this.registeredTriggerMap=this.triggerMap,this.registeredCustomElements=this.customElements,this.activeTrigger=void 0,this.handleMouseClick=t=>{this.textEditorPickerElement&&(t.target===this.textEditorPickerElement||this.resetTriggerAndPicker())},this.handleKeyPress=t=>{if(!this.isPickerOpen||!this.activeTrigger)return;if(![c,u,h,l,d].includes(t.key))return;if(t.stopPropagation(),t.preventDefault(),"keyup"===t.type)return;const i={[c]:this.handleEscapeKey,[l]:this.handleEnterOrTabKey,[d]:this.handleEnterOrTabKey,[h]:this.handleArrowKeyPress,[u]:this.handleArrowKeyPress}[t.key];i&&i(t)},this.handleArrowKeyPress=t=>{this.highlightedItemIndex=this.findNonSeparatorIndex(t.key,this.highlightedItemIndex)},this.findNonSeparatorIndex=(t,i,e=0)=>{if(0===this.items.length||e>this.items.length)return i;const s=((t,i,e)=>(i+(t===h?1:-1)+e)%e)(t,i,this.items.length);return this.isListSeparator(this.items[s])?this.findNonSeparatorIndex(t,s,e+1):s},this.handleEscapeKey=()=>{var t;null===(t=this.triggerFunction)||void 0===t||t.stopTrigger(),this.resetTriggerAndPicker()},this.handleEnterOrTabKey=t=>{this.handleItemSelection(t)},this.handleMetadataChange=t=>{t.stopPropagation();const i=t.detail,e=this.getEnhancedImages(i.images||[]),s=Object.assign(Object.assign({},i),{images:e});this.metadataChange.emit(s)},this.handleImagePasted=t=>{t.stopPropagation(),this.allowInlineImages&&this.uploadHandler.handleImagePasted(t.detail)},this.handleTriggerStart=t=>{t.stopPropagation(),this.activeTrigger=t.detail.trigger,this.triggerFunction=t.detail.textEditor,this.isPickerOpen=!0},this.handleTriggerStop=t=>{t.stopPropagation(),this.resetTriggerAndPicker()},this.handleTriggerChange=t=>{var i;t.stopImmediatePropagation(),this.editorPickerQuery=t.detail.value;const e=null===(i=this.registeredTriggerMap[t.detail.trigger])||void 0===i?void 0:i.searcher;e&&(this.isSearching=!0,this.debouncedSearchFn(e,this.editorPickerQuery))},this.resetTriggerAndPicker=()=>{this.isPickerOpen=!1,this.activeTrigger=void 0,this.triggerFunction=void 0,this.isSearching=!1,this.highlightedItemIndex=0,this.items=[]},this.handleItemSelection=t=>{var i;let e;if(t instanceof CustomEvent)e=t.detail;else{if(!(t instanceof KeyboardEvent))return;{const t=this.items[this.highlightedItemIndex];if(this.isListSeparator(t))return;e=t}}if(!this.activeTrigger||(null==e?void 0:e.disabled))return;const s=this.registeredTriggerMap[this.activeTrigger];try{s.inserter(this.triggerFunction,e)}catch(t){console.error("Error inserting",t)}this.resetTriggerAndPicker(),null===(i=this.textEditor)||void 0===i||i.focus()},this.handleVisibilityChange=()=>{"hidden"===document.visibilityState&&this.saveDraft()},this.handleBeforeUnload=()=>{this.saveDraft()},this.portalId=A(),this.debouncedSearchFn=function(t,i,e){var s,r,n,o,a,h,c=0,u=!1,l=!1,d=!0;if("function"!=typeof t)throw new TypeError("Expected a function");function f(i){var e=s,n=r;return s=r=void 0,c=i,o=t.apply(n,e)}function v(t){var e=t-h;return void 0===h||e>=i||e<0||l&&t-c>=n}function m(){var t=ot();if(v(t))return p(t);a=setTimeout(m,function(t){var e=i-(t-h);return l?ht(e,n-(t-c)):e}(t))}function p(t){return a=void 0,d&&s?f(t):(s=r=void 0,o)}function b(){var t=ot(),e=v(t);if(s=arguments,r=this,h=t,e){if(void 0===a)return function(t){return c=t,a=setTimeout(m,i),u?f(t):o}(h);if(l)return clearTimeout(a),a=setTimeout(m,i),f(h)}return void 0===a&&(a=setTimeout(m,i)),o}return i=U(i)||0,k(e)&&(u=!!e.leading,n=(l="maxWait"in e)?at(U(e.maxWait)||0,i):n,d="trailing"in e?!!e.trailing:d),b.cancel=function(){void 0!==a&&clearTimeout(a),c=0,s=h=r=a=void 0},b.flush=function(){return void 0===a?o:p(ot())},b}((async(t,i)=>{try{const e=await t(i);if(i!==this.editorPickerQuery||!this.activeTrigger)return;this.items=e}catch(t){console.error("Error searching",t)}finally{this.isSearching=!1}}),300)}connectedCallback(){var t,i,e,s;if(this.draftIdentifier){const r=null!==(i=null===(t=this.context)||void 0===t?void 0:t.id)&&void 0!==i?i:"no-limeobject",n=null!==(s=null===(e=this.context)||void 0===e?void 0:e.limetype)&&void 0!==s?s:"no-limetype";this.textEditorInnerId=["text-editor-draft",n,r,this.draftIdentifier].join("-")}this.textEditorInnerId&&(document.addEventListener("visibilitychange",this.handleVisibilityChange),window.addEventListener("beforeunload",this.handleBeforeUnload)),this.uploadHandler=new lt(this.platform)}componentWillLoad(){this.allowMentioning&&this.registerMentions(),this.registerTriggers(),this.loadDraft()}disconnectedCallback(){document.removeEventListener("visibilitychange",this.handleVisibilityChange),window.removeEventListener("beforeunload",this.handleBeforeUnload),document.removeEventListener("mousedown",this.handleMouseClick),this.saveDraft(),this.host&&(this.host.removeEventListener("keyup",this.handleKeyPress,{capture:!0}),this.host.removeEventListener("keydown",this.handleKeyPress,{capture:!0})),this.debouncedSearchFn&&this.debouncedSearchFn.cancel&&this.debouncedSearchFn.cancel()}registerMentions(){const t=new ct(this.platform,this.context,this.searchableLimetypes),i=t.triggerHandler.nodeDefinition;i&&(this.registeredCustomElements.push(i.customElement),this.registeredTriggerMap[t.triggerCharacter]=t.triggerHandler,t.initialize())}registerTriggers(){this.registeredTriggers=Object.keys(this.registeredTriggerMap)}setPickerMessage(){var t;if(!this.activeTrigger)return;const i=this.registeredTriggerMap[this.activeTrigger];this.pickerMessage=(null===(t=this.editorPickerQuery)||void 0===t?void 0:t.length)>0?i.noItemsFoundMessage:i.emptySearchMessage}setupHandlers(){this.isPickerOpen?(this.host.addEventListener("keyup",this.handleKeyPress,{capture:!0}),this.host.addEventListener("keydown",this.handleKeyPress,{capture:!0}),document.addEventListener("mousedown",this.handleMouseClick)):(this.host.removeEventListener("keyup",this.handleKeyPress,{capture:!0}),this.host.removeEventListener("keydown",this.handleKeyPress,{capture:!0}),document.removeEventListener("mousedown",this.handleMouseClick))}isListSeparator(t){return"separator"in t&&!0===t.separator}render(){return[e("limel-text-editor",{key:"38d692ec58c569a0429caddf7ecfe418e21ac14b",ref:t=>this.textEditor=t,tabindex:this.disabled?-1:0,value:this.value,contentType:this.contentType,customElements:this.registeredCustomElements,"aria-disabled":this.disabled,language:this.language,triggers:this.registeredTriggers,onTriggerStart:this.handleTriggerStart,onTriggerStop:this.handleTriggerStop,onTriggerChange:this.handleTriggerChange,onImagePasted:this.handleImagePasted,onMetadataChange:this.handleMetadataChange,ui:this.ui,allowResize:this.allowResize,required:this.required,disabled:this.disabled,readonly:this.readonly,helperText:this.helperText,placeholder:this.placeholder,label:this.label,invalid:this.invalid}),this.renderPicker()]}renderPicker(){if(this.isPickerOpen)return e("limel-portal",{containerId:this.portalId,visible:this.isPickerOpen,openDirection:"top",inheritParentWidth:!0,anchor:this.textEditor},e("limebb-text-editor-picker",{ref:t=>this.textEditorPickerElement=t,items:(t=this.items,i=this.highlightedItemIndex,t.map(((t,e)=>{const s=nt(t,5);return Object.assign(Object.assign({},s),{selected:e===i})}))),onItemSelected:this.handleItemSelection,emptyMessage:this.pickerMessage,isSearching:this.isSearching}));var t,i}getEnhancedImages(t){return t.map((t=>{let i;return"success"===t.state&&(i=this.uploadHandler.parseFileIdFromSrc(t.src)),i?Object.assign(Object.assign({},t),{fileId:i}):t}))}loadDraft(){if(!this.userDataService||!this.textEditorInnerId)return;if(this.value)return;const t=this.userDataService.get(this.textEditorInnerId);t&&this.change.emit(t)}saveDraft(){var t,i,e,s;if(!this.textEditorInnerId)return;const r=null===(t=this.value)||void 0===t?void 0:t.trim(),n=null===(i=this.userDataService)||void 0===i?void 0:i.get(this.textEditorInnerId);r&&r!==n?null===(e=this.userDataService)||void 0===e||e.set(this.textEditorInnerId,r):!r&&n&&(null===(s=this.userDataService)||void 0===s||s.set(this.textEditorInnerId,void 0))}get userDataService(){return this.platform.get(r.UserDataRepository)}static get delegatesFocus(){return!0}get host(){return s(this)}static get watchers(){return{isPickerOpen:[{watchOpen:0}],editorPickerQuery:[{watchQuery:0}]}}};(function(t,i,e,s){var r,n=arguments.length,o=n<3?i:null===s?s=Object.getOwnPropertyDescriptor(i,e):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(t,i,e,s);else for(var a=t.length-1;a>=0;a--)(r=t[a])&&(o=(n<3?r(o):n>3?r(i,e,o):r(i,e))||o);n>3&&o&&Object.defineProperty(i,e,o)})([a({map:[function(t){return Object.values(t).filter((t=>M(t,"user")||F(t,"user")))}]})],dt.prototype,"searchableLimetypes",void 0),dt.style=":host(limebb-text-editor){display:block;width:100%;min-width:5rem;min-height:5rem;height:100%;max-height:var(--text-editor-max-height, calc(100vh - (env(safe-area-inset-top) + env(safe-area-inset-bottom)) - 4rem))}";export{dt as limebb_text_editor}
@@ -1 +0,0 @@
1
- import{r as t,h as s,H as e,g as i}from"./p-BIwHMk6j.js";import{b as o}from"./p-D5qhls4G.js";const h=class{constructor(s){t(this,s),this.shouldRender=!1}componentWillLoad(){this.compileAndEvaluate()}onRuleChange(){this.compileAndEvaluate()}onScopeChange(){this.compileAndEvaluate()}render(){return s(e,{key:"365df6908301371b8b964671382ad936971b6624",hidden:!this.shouldRender},s("slot",{key:"ca7c2a9febf0189dfae882a2ae894d1d0262a213"}))}get ruleRegistry(){return this.platform.get(o.RuleRegistry)}compileAndEvaluate(){var t;if(!this.rule)return void(this.shouldRender=!0);const s=this.ruleRegistry.compile(this.rule),e=null!==(t=this.scope)&&void 0!==t?t:this.ruleRegistry.scope({host:this.host});this.shouldRender=s(e)}get host(){return i(this)}static get watchers(){return{rule:[{onRuleChange:0}],scope:[{onScopeChange:0}]}}};h.style=":host{display:contents}:host([hidden]){display:none}";export{h as limebb_rule_gate}