@simai-studio/ui 5.20261019.1710 → 5.20261019.1921

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 (46) hide show
  1. package/README.md +4 -4
  2. package/distr/component/button-group/css/button-group.min.css +1 -1
  3. package/distr/component/country-code/js/country-code.min.js +1 -1
  4. package/distr/component/dropdown/js/dropdown.min.js +1 -1
  5. package/distr/component/file-upload/js/file-upload.min.js +1 -1
  6. package/distr/component/inputs/js/inputs.min.js +1 -1
  7. package/distr/component/pagination/css/pagination.min.css +1 -1
  8. package/distr/component/quantity/js/quantity.min.js +1 -1
  9. package/distr/component/textarea/js/textarea.min.js +1 -1
  10. package/distr/core/contracts/adaptive-sizing.schema.json +1 -1
  11. package/distr/core/contracts/composite-host-port.v1.schema.json +1 -1
  12. package/distr/core/contracts/composition-document.v1.schema.json +1 -1
  13. package/distr/core/contracts/composition-editor-field-kind.v1.schema.json +1 -1
  14. package/distr/core/contracts/composition-editor-manifest.v1.schema.json +1 -1
  15. package/distr/core/contracts/composition-port-manifest.v1.schema.json +1 -1
  16. package/distr/core/contracts/composition-type-manifest.v1.schema.json +1 -1
  17. package/distr/core/contracts/public-js-api.json +1 -0
  18. package/distr/core/contracts/public-variables.v1.json +11 -0
  19. package/distr/core/css/core.css +11 -0
  20. package/distr/core/css/core.min.css +1 -1
  21. package/distr/core/js/core-loader.js +13 -11
  22. package/distr/core/js/core-loader.min.js +1 -1
  23. package/distr/core/js/core.js +75 -24
  24. package/distr/core/js/core.min.js +2 -2
  25. package/distr/core/js/smart-base.js +2 -2
  26. package/distr/core/js/smart-base.min.js +1 -1
  27. package/distr/core/js/template-utilities.generated.json +1 -0
  28. package/distr/smart/avatar/js/avatar.min.js +1 -1
  29. package/distr/smart/badges/js/badges.min.js +1 -1
  30. package/distr/smart/button-group/js/button-group.min.js +22 -21
  31. package/distr/smart/button-group/smart.manifest.json +22 -1
  32. package/distr/smart/button-group/template/default.js +4 -0
  33. package/distr/smart/buttons/js/buttons.min.js +1 -1
  34. package/distr/smart/country-code/js/country-code.min.js +1 -1
  35. package/distr/smart/datepicker/js/datepicker.min.js +1 -1
  36. package/distr/smart/dropdown/js/dropdown.min.js +1 -1
  37. package/distr/smart/file-upload/js/file-upload.min.js +1 -1
  38. package/distr/smart/inputs/js/inputs.min.js +1 -1
  39. package/distr/smart/list-item/js/list-item.min.js +16 -16
  40. package/distr/smart/modal/contract.json +1 -1
  41. package/distr/smart/progress-scale/js/progress-scale.min.js +1 -1
  42. package/distr/smart/reference-link/js/reference-link.min.js +1 -1
  43. package/distr/smart/tags/js/tags.min.js +1 -1
  44. package/distr/smart/textarea/js/textarea.min.js +5 -5
  45. package/package-manifest.json +46 -46
  46. package/package.json +4 -4
@@ -1,4 +1,4 @@
1
- (()=>{"use strict";var e={"3a03d4610486"(e,t,i){i.d(t,{Q:()=>o});let s=0;function n(e,t){if(!e.id){let i;do{i=`${t}-${++s}`}while(document.getElementById(i));e.id=i}return e.id}function o(e,t){let i=null,s=null,o=null,r=!1;const a=new WeakMap,l=(e,t,i)=>{const s=a.get(e)||{};void 0!==s[t]&&e.getAttribute(t)===s[t]&&e.removeAttribute(t),delete s[t],!e.hasAttribute(t)&&i&&(e.setAttribute(t,i),s[t]=i),a.set(e,s)},c=()=>e.querySelector(".sf-dropdown-field, .sf-dropdown-trigger"),d=()=>c()?.querySelector(":scope > button")||c(),u=()=>c()?.querySelector('input:not([type="hidden"])'),p=()=>t.getList()?.querySelector(".sf-input input"),h=()=>[...t.getList()?.querySelectorAll(".sf-list-item")||[]],f=()=>h().filter(e=>!e.hidden&&!e.classList.contains("disabled")&&"true"!==e.getAttribute("aria-disabled")&&"true"!==e.getAttribute("aria-hidden")),g=e=>e.querySelector(".sf-list-item-container, .sf-avatar-label-group-title, .sf-tag-container")?.textContent?.trim()||e.dataset.value||"",b=e=>{e&&!e.disabled&&(e.focus({preventScroll:!0}),e.scrollIntoView({block:"nearest",inline:"nearest"}))},m=()=>{s="trigger",b(d()),t.close(),x()},v=e=>{if(t.isDisabled()||e.altKey||e.ctrlKey||e.metaKey)return;const i=e.target,n=i.closest?.(".sf-list-item"),o=t.getList()?.contains(i),r=i===d()||i===u()||i===c();let a=!1;if("Escape"===e.key&&t.isOpen())m(),a=!0;else{if("Tab"===e.key&&t.isOpen())return o&&b(d()),t.close(),void x();if(r&&["ArrowDown","ArrowUp","Enter"," "].includes(e.key))t.isOpen()&&["Enter"," "].includes(e.key)?m():(e=>{s=e,t.open(),x()})("ArrowUp"===e.key?"last":"search"),a=!0;else if(o&&["ArrowDown","ArrowUp"].includes(e.key)){const t=f(),i=t.indexOf(n),s=i<0?"ArrowUp"===e.key?t.length-1:0:Math.max(0,Math.min(t.length-1,i+("ArrowUp"===e.key?-1:1)));b(t[s]),a=!0}else if(n&&o&&["Home","End"].includes(e.key)){const t=f();b("Home"===e.key?t[0]:t.at(-1)),a=!0}else n&&o&&["Enter"," "].includes(e.key)&&(f().includes(n)&&(s=t.isMultiple()?{value:n.dataset.value}:"trigger",t.select(n),x()),a=!0)}a&&(e.preventDefault(),e.stopImmediatePropagation())},y=()=>{null!==o&&cancelAnimationFrame(o),o=requestAnimationFrame(()=>{var i;o=null,r||!t.isOpen()||s||(i=document.activeElement)&&(e.contains(i)||t.getList()?.contains(i))||(t.close(),x())})};let w=document.createElement("span");w.className="sf-dropdown-value",e.append(w),n(w,"sf-dropdown-value");const x=()=>{if(r)return;const o=t.getList();i!==o&&(i?.removeEventListener("keydown",v,!0),i?.removeEventListener("focusout",y),i=o,i?.addEventListener("keydown",v,!0),i?.addEventListener("focusout",y));const m=d(),x=i?.querySelector(".sf-list-container");if(!m||!x)return;w.isConnected||e.append(w);const _=e.querySelector(".sf-dropdown-label .sf-dropdown-text"),$=t.owner||e,S=_?.textContent.trim()?n(_,"sf-dropdown-label"):"",A=$.getAttribute("aria-label")||e.getAttribute("aria-label"),k=$.getAttribute("aria-labelledby")||e.getAttribute("aria-labelledby"),C=n(m,"sf-dropdown-trigger"),L=m.hasAttribute("aria-label")&&a.get(m)?.["aria-label"]!==m.getAttribute("aria-label");l(m,"aria-labelledby",k||(!A&&S?L?`${C} ${S}`:S:"")),l(m,"aria-label",A),"BUTTON"!==m.tagName&&m.setAttribute("role","button"),m.tabIndex=t.isDisabled()?-1:0,m.setAttribute("aria-expanded",String(t.isOpen())),m.setAttribute("aria-haspopup","listbox"),m.setAttribute("aria-controls",n(x,"sf-dropdown-listbox")),m.querySelectorAll(".sf-icon").forEach(e=>e.setAttribute("aria-hidden","true")),c()!==m&&(c().tabIndex=-1),u()&&(u().tabIndex=-1),x.setAttribute("role","listbox"),x.setAttribute("aria-multiselectable",String(t.isMultiple())),l(x,"aria-labelledby",k||S||C);const z=p();z&&(z.setAttribute("role","searchbox"),z.setAttribute("aria-controls",x.id),l(z,"aria-labelledby",z.hasAttribute("aria-label")?"":k||S||C)),h().forEach(e=>{e.setAttribute("role","option"),e.tabIndex=-1,e.setAttribute("aria-selected",String(e.classList.contains("selected"))),l(e,"aria-disabled",e.classList.contains("disabled")?"true":""),function(e,t){const i=e.querySelector('.sf-checkbox input[type="checkbox"]');if(!i)return;const s=e.querySelector(".sf-checkbox-box sf-icon, .sf-checkbox-box .sf-icon"),n="sf-icon"===s?.tagName?.toLowerCase()?s.getAttribute("icon")||"":s?.textContent;(i.checked!==t||i.indeterminate||s&&n!==(t?"check":""))&&(i.checked=t,i.indeterminate=!1,globalThis.SF?.Checkbox?.setState?.(i,{checked:t,indeterminate:!1}))}(e,e.classList.contains("selected")),e.querySelectorAll(".sf-checkbox").forEach(e=>{"true"!==e.getAttribute("aria-hidden")&&e.setAttribute("aria-hidden","true")}),e.querySelectorAll(".sf-icon, sf-icon").forEach(e=>{"true"!==e.getAttribute("aria-hidden")&&e.setAttribute("aria-hidden","true")}),e.querySelectorAll("input, button, a[href], [tabindex]").forEach(e=>{e.tabIndex=-1})});const V=t.selectedLabels?.()||h().filter(e=>e.classList.contains("selected")).map(g);w.textContent=V.join(", ")||u()?.value||u()?.placeholder||"";const T=new Set((m.getAttribute("aria-describedby")||"").split(/\s+/).filter(Boolean));T.add(w.id),m.setAttribute("aria-describedby",[...T].join(" ")),(()=>{if(!s)return;if("trigger"===s)return s=null,void b(d());if(!t.isOpen()||t.getList()?.hidden)return;const e=f(),i="search"===s?p()||e[0]||d():"last"===s?e.at(-1):"object"==typeof s?e.find(e=>e.dataset.value===s.value):e[0];s=null,b(i)})()};return e.addEventListener("keydown",v,!0),e.addEventListener("focusout",y),x(),{refresh:x,beforeClose:()=>{t.getList()?.contains(document.activeElement)&&(s="trigger")},release(){r=!0,null!==o&&cancelAnimationFrame(o),e.removeEventListener("keydown",v,!0),e.removeEventListener("focusout",y),i?.removeEventListener("keydown",v,!0),i?.removeEventListener("focusout",y);const t=d();if(t){const e=(t.getAttribute("aria-describedby")||"").split(/\s+/).filter(e=>e&&e!==w.id);e.length?t.setAttribute("aria-describedby",e.join(" ")):t.removeAttribute("aria-describedby")}w.remove()}}}},a0f23dca0b37(e,t,i){i.a(e,async(e,s)=>{try{i.d(t,{AL:()=>g,GD:()=>f});var n=i("5c1dc214bb5e"),o=e([n]);n=(o.then?(await o)():o)[0];var r=i.n(n);const a=()=>globalThis.SF?.Position||r(),l=new WeakMap,c=["position","inset","margin","width","max-width","max-height","overflow","left","top","right","bottom","z-index"],d=["font-family","font-size","font-weight","font-style","font-stretch","font-variant","font-feature-settings","font-variation-settings","font-optical-sizing","font-kerning","line-height","letter-spacing","word-spacing","text-transform","text-indent","white-space","word-break","overflow-wrap","text-rendering","direction","writing-mode","text-orientation","color","color-scheme","text-align"];function u(e,t){if(!t.context)return;const i=t.context,s=getComputedStyle(e),n=["sf-dropdown",...Array.from(e.classList).filter(e=>e.startsWith("sf-dropdown--")&&!["sf-dropdown--open","sf-dropdown--drop-up","sf-dropdown--drop-down"].includes(e))].join(" ");i.className!==n&&(i.className=n);const o=[...Array.from(s).filter(e=>e.startsWith("--sf-")),...d],r=new Set(o);for(const e of t.contextProperties||[])r.has(e)||i.style.removeProperty(e);for(const e of o){const t=s.getPropertyValue(e);i.style.getPropertyValue(e)!==t&&i.style.setProperty(e,t)}t.contextProperties=o}function p(e){return e?.querySelector(".sf-dropdown-field, .sf-dropdown-trigger")??null}function h(e,t){const i=l.get(t);if(!i||!e.isConnected||t.hidden)return!1;const s=p(e);return!!s&&(e.closest('[hidden], [inert], [aria-hidden="true"], dialog:not([open])')||!s.getClientRects().length||["hidden","collapse"].includes(getComputedStyle(s).visibility)?(i.onUnavailable?.(),!1):(u(e,i),i.wrap&&(i.wrap.style.minHeight="0",i.wrap.style.overflowY="auto"),i.anchor||(i.anchor=a().anchor(s,t,{side:"block-end",align:"start",matchWidth:s.classList.contains("sf-dropdown-field"),fitHeight:!0,autoUpdate:!1,onPosition:({side:i})=>{const s="block-start"===i;t.dataset.placement=e.dataset.placement=s?"top":"bottom",e.classList.toggle("sf-dropdown--drop-up",s),e.classList.toggle("sf-dropdown--drop-down",!s)}})),i.anchor.update(),!0))}function f(e,t,i){if(!t?.isConnected||!p(e))return!1;const s=t.contains(document.activeElement)?document.activeElement:null;if(!l.has(t)){const s=c.map(e=>[e,t.style.getPropertyValue(e),t.style.getPropertyPriority(e)]),n={root:e,saved:s,onUnavailable:i,popover:t.getAttribute("popover"),frame:0,native:"function"==typeof t.showPopover};if(n.wrap=t.querySelector(".sf-list-container-wrap"),n.wrapStyles=n.wrap?["min-height","overflow-y"].map(e=>[e,n.wrap.style.getPropertyValue(e),n.wrap.style.getPropertyPriority(e)]):[],n.schedule=()=>{n.frame||(n.frame=requestAnimationFrame(()=>{n.frame=0,h(e,t)}))},l.set(t,n),e.__sfDropdownPortalList=t,n.native)t.setAttribute("popover","manual");else{n.parent=t.parentNode,n.next=t.nextSibling,n.context=document.createElement("div"),n.context.style.cssText="display:contents;position:static",u(e,n);(e.closest('dialog[open], [role="dialog"][aria-modal="true"]')||document.body).append(n.context),n.context.append(t),t.style.zIndex="var(--sf-z-index-9)"}n.inheritance=new MutationObserver(n.schedule);for(let t=e;t;t=t.parentElement)n.inheritance.observe(t,{attributes:!0,attributeFilter:["class","style","dir","hidden","inert","aria-hidden","open"]});Object.assign(t.style,{position:"fixed",inset:"auto",margin:"0",overflow:n.wrap?"hidden":"auto"}),"function"==typeof ResizeObserver&&(n.resize=new ResizeObserver(n.schedule),n.resize.observe(p(e)),n.resize.observe(t)),window.visualViewport?.addEventListener("resize",n.schedule),window.visualViewport?.addEventListener("scroll",n.schedule)}return t.hidden=!1,l.get(t).native&&!t.matches(":popover-open")&&t.showPopover(),!!h(e,t)&&(s&&document.activeElement!==s&&s.focus({preventScroll:!0}),!0)}function g(e){const t=l.get(e);if(!t)return!1;const i=e.contains(document.activeElement)?document.activeElement:null;t.anchor?.stop(),t.resize?.disconnect(),cancelAnimationFrame(t.frame),t.inheritance?.disconnect(),window.visualViewport?.removeEventListener("resize",t.schedule),window.visualViewport?.removeEventListener("scroll",t.schedule),t.native?(e.matches(":popover-open")&&e.hidePopover(),null===t.popover?e.removeAttribute("popover"):e.setAttribute("popover",t.popover)):(t.next?.parentNode===t.parent?t.parent.insertBefore(e,t.next):t.parent.append(e),t.context.remove());for(const[i,s,n]of t.saved)s?e.style.setProperty(i,s,n):e.style.removeProperty(i);for(const[e,i,s]of t.wrapStyles)i?t.wrap.style.setProperty(e,i,s):t.wrap.style.removeProperty(e);return delete e.dataset.placement,delete t.root.dataset.placement,t.root.classList.remove("sf-dropdown--drop-up","sf-dropdown--drop-down"),t.root.__sfDropdownPortalList===e&&delete t.root.__sfDropdownPortalList,l.delete(e),i&&!e.hidden&&t.root.isConnected&&document.activeElement!==i&&i.focus({preventScroll:!0}),!0}s()}catch(b){s(b)}})},"98e26702f55a"(e,t,i){function s(){const e=globalThis.SF=globalThis.SF||{};return e.__deprecationNotes instanceof Map||Object.defineProperty(e,"__deprecationNotes",{value:new Map,configurable:!0}),e.__deprecationNotes}function n({component:e="",kind:t="attribute",attribute:i="",from:n,to:o=null}={}){if(!n)return;const r=[e,t,i,n].join("|"),a=s(),l=a.get(r);if(l)l.count+=1;else if(a.set(r,{component:e,kind:t,attribute:i,from:n,to:o,count:1}),function(){const e=globalThis.document?.documentElement;return"warn"===e?.dataset?.sfDeprecations||!0===globalThis.SF?.deprecations?.warn}()){const s=e?`${e}: `:"",r="value"===t?`${i}="${n}"`:`${t} ${n}`;globalThis.console?.warn?.(`[Simai Framework] ${s}${r} is a legacy name${o?`; write ${o}`:""}. See contracts/changes/journal.json.`)}}if(i.d(t,{id:()=>c,kA:()=>l}),"undefined"!=typeof globalThis){globalThis.SF=globalThis.SF||{};const e=globalThis.SF.deprecations||{};e.list=function(){return[...s().values()].map(e=>({...e}))},e.clear=function(){s().clear()},e.note=n,globalThis.SF.deprecations=e}const o=Object.freeze(["1/2","1","2"]),r=Object.freeze({"1/3":"1/2",3:"2"}),a=new Set;function l(e){const t=String(e??"").trim().toLowerCase();return o.includes(t)?t:Object.hasOwn(r,t)?r[t]:"1"}function c(e,t="field",i="1"){const s=String(e??"").trim().toLowerCase();if(o.includes(s))return s;if(Object.hasOwn(r,s)){const e=r[s];n({component:t,kind:"value",attribute:"size",from:s,to:e});const i=`${t}:${s}`;return a.has(i)||"undefined"==typeof console||(a.add(i),console.warn(`[Simai Framework] ${t}: size ${s} is retired for form fields; rendering size ${e}.`)),e}return i}},"67eed2647f47"(e,t,i){i.d(t,{z:()=>o});const s=new WeakMap,n=new WeakSet;function o(e,t){const i=e.ownerDocument;n.has(i)||(i.addEventListener("reset",e=>{const t=e.target;if("FORM"!==t?.tagName)return;const i=Array.from(t.elements);setTimeout(()=>{if(!e.defaultPrevented)for(const e of i)if(e.isConnected&&e.form===t)for(const t of s.get(e)||[])t()},0)},!0),n.add(i));let o=s.get(e);return o||s.set(e,o=new Set),o.add(t),()=>o.delete(t)}},"50a1017ded91"(e,t,i){i.a(e,async(e,t)=>{try{var s=i("fbe0570fcc69"),n=i("0d662e4d7d63"),o=i("98e26702f55a"),r=i("5429d6e80991"),a=i("3a03d4610486"),l=i("67eed2647f47"),c=i("a0f23dca0b37"),d=e([s,n,r,c]);[s,n,r,c]=d.then?(await d)():d;var u=i.n(s);const p={en:{search:"Search"},ru:{search:"Поиск"}};function h(e){return(0,o.id)(e,"sf-dropdown")}function f(e){const t=String(e||"").toLowerCase();return["text","icon","checkbox","avatar","color"].includes(t)?t:"text"}function g(e,t="1"){return e instanceof HTMLElement?"sf-list-item"!==e.tagName.toLowerCase()?null:{type:f(e.getAttribute("kind")||e.getAttribute("type")),size:h(e.getAttribute("size")||t),text:e.getAttribute("text")||"",icon:e.getAttribute("icon")||"person",checked:e.hasAttribute("checked")||(0,s.toBoolean)(e.getAttribute("checked")),selected:e.hasAttribute("selected")||(0,s.toBoolean)(e.getAttribute("selected")),disabled:e.hasAttribute("disabled")||(0,s.toBoolean)(e.getAttribute("disabled")),colorClass:e.getAttribute("color-class")||"bg-tertiary",avatarImageUrl:e.getAttribute("avatar-image-url")||"",avatarTitle:e.getAttribute("avatar-title")||e.getAttribute("text")||"",value:e.getAttribute("value")??e.getAttribute("text")??"",ariaLabel:e.getAttribute("aria-label")||"",group:e.getAttribute("group")||""}:null}function b(e,t="1"){if(!e||"object"!=typeof e)return null;const i=void 0===e.text||null===e.text?"":String(e.text),n=void 0===e.value||null===e.value?i:String(e.value);return""===i&&""===n?null:{type:f(e.kind||e.type),size:h(e.size||t),text:i,icon:e.icon?String(e.icon):"person",checked:(0,s.toBoolean)(e.checked),selected:(0,s.toBoolean)(e.selected),disabled:(0,s.toBoolean)(e.disabled),colorClass:e.colorClass?String(e.colorClass):"bg-tertiary",avatarImageUrl:e.avatarImageUrl?String(e.avatarImageUrl):"",avatarTitle:e.avatarTitle?String(e.avatarTitle):i,value:n,ariaLabel:e.ariaLabel?String(e.ariaLabel):"",group:e.group?String(e.group):""}}function m(e,t="1"){let i=e;if("string"==typeof i){const e=i.trim();if(""===e)return[];try{i=JSON.parse(e)}catch{return[]}}return Array.isArray(i)?i.map(e=>b("string"==typeof e||"number"==typeof e?{text:String(e),value:String(e)}:e,t)).filter(Boolean):[]}function v(e=""){return String(e||"").split(",").map(e=>e.trim()).filter(Boolean)}function y(e=[]){return e.map(e=>String(e)).join(",")}function w(e={}){return"avatar"===e.type?e.avatarTitle||e.text||e.value||"":e.text||e.avatarTitle||e.value||""}class x extends(u()){constructor(){super(),this._options=[],this._optionsCaptured=!1,this._optionsFromData=!1,this._open=!1,this._searchValue="",this._selectedValues=[],this._dropdownRoot=null,this._list=null,this._documentClickHandler=this.handleDocumentClick.bind(this),this._viewportHandler=this.positionPortalList.bind(this)}static get props(){return{templateName:{attribute:"template",default:"default"},size:{default:"1"},appearance:{default:"outlined",values:["filled","outlined"],aliases:["type"]},mode:{default:"select",values:["tag","select"]},multiple:{type:Boolean,default:!1},portal:{type:Boolean,default:!0},value:{default:""},name:{default:""},label:{default:""},required:{type:Boolean,default:!1},placeholder:{default:""},searchPlaceholder:{default:""},search:{type:Boolean,default:!0},layout:{default:"list",values:["list","grid"]},columns:{default:"6"},disabled:{type:Boolean,default:!1},ariaLabel:{default:""}}}connectedCallback(){this.captureOptions(),Object.prototype.hasOwnProperty.call(this,"_resetValues")||(this._resetValues=[...this.selectedValues]),super.connectedCallback()}attributeChangedCallback(e,t,i){t!==i&&("value"===e&&(this._selectedValues=v(i)),"disabled"===e&&this.disabled&&(this._open=!1,this._searchValue="")),super.attributeChangedCallback(e,t,i)}get componentName(){return"dropdown"}get templateName(){return this.getAttribute("template")||"default"}get size(){return h(this.getAttribute("size"))}get appearance(){return this.getProp("appearance")}get type(){return this.appearance}get mode(){return this.getEnumAttr("mode",["tag","select"],"select")}get multiple(){return this.hasAttribute("multiple")?this.getBooleanAttr("multiple",!0):"tag"===this.mode}get portal(){return this.getBooleanAttr("portal",!0)}get name(){return this.getAttribute("name")||""}get selectedValue(){return this.getAttribute("value")||""}get label(){return this.getAttribute("label")||""}get required(){return this.getBooleanAttr("required",!1)}get placeholder(){return this.getAttribute("placeholder")||""}get searchPlaceholder(){return this.getAttribute("search-placeholder")||(0,n.pageText)(p,"search",this)}get layout(){return this.getEnumAttr("layout",["list","grid"],"list")}get columns(){const e=Number.parseInt(this.getAttribute("columns")??"",10);return Number.isFinite(e)&&e>0?String(e):"6"}get search(){return this.getBooleanAttr("search",!0)}get disabled(){return this.getBooleanAttr("disabled",!1)}get ariaLabel(){return this.getAttribute("aria-label")||""}get selectedValues(){return this.hasAttribute("value")?v(this.selectedValue):this._selectedValues}get selectedOptions(){const e=this.options;return[...new Set(this.selectedValues)].map(t=>e.find(e=>String(e.value)===t)).filter(Boolean)}get triggerText(){if("tag"===this.mode)return"";return(this.multiple?this.selectedOptions:this.selectedOptions.slice(0,1)).map(w).join(", ")}get hiddenValue(){return this.selectedValues.join(",")}captureOptions(){if(this._optionsFromData)return;const e=Array.from(this.children).filter(e=>e instanceof HTMLElement&&"sf-list-item"===e.tagName.toLowerCase());e.length&&(this._options=e.map(e=>g(e,this.size)).filter(Boolean),this._optionsCaptured=!0,this.selectedValue||this._selectedValues.length||(this._selectedValues=this._options.filter(e=>e.selected).map(e=>String(e.value))),e.forEach(e=>e.remove()))}set options(e){const t=m(e,this.size);this._optionsFromData=!0,this._options=t,this._optionsCaptured=!0,this.selectedValue||this._selectedValues.length||(this._selectedValues=t.filter(e=>e.selected).map(e=>String(e.value))),this.requestComponentUpdate("options")}get options(){if(!Array.isArray(this._options)||!this._options.length)return[];const e=new Set(this.selectedValues);return this._options.map(t=>({...t,size:h(t.size||this.size),selected:e.has(String(t.value))}))}get visibleOptions(){const e=String(this._searchValue||"").trim().toLowerCase();return e?this.options.filter(t=>w(t).toLowerCase().includes(e)):this.options}templateContext(){const e=this.getPropsContext();return this.createTemplateContext({...e,component:this,open:this._open,multiple:this.multiple,value:this.hiddenValue,triggerText:this.triggerText,searchValue:this._searchValue,searchPlaceholder:this.searchPlaceholder,selectedValues:this.selectedValues,selectedOptions:this.selectedOptions,options:this.visibleOptions})}template(){return(0,r.g)(this.templateContext())}beforeRender(){this.captureOptions()}afterRender(){const e=this._dropdownRoot,t=this._list;this._dropdownRoot=this.querySelector(".sf-dropdown"),this._list=this.querySelector(".sf-list")||(e===this._dropdownRoot?t:null),t!==this._list&&(0,c.AL)(t),this.syncDocumentListeners(),this.syncPortalListeners(),this.positionPortalList(),e!==this._dropdownRoot&&(this._interaction?.release(),this._interaction=null),this._dropdownRoot&&!this._interaction&&(this._interaction=(0,a.Q)(this._dropdownRoot,{owner:this,getList:()=>this._list,isOpen:()=>this._open,isDisabled:()=>this.disabled,isMultiple:()=>this.multiple,open:()=>this.openDropdown(),close:()=>this.closeDropdown(),select:e=>this.selectValue(e.dataset.value||""),selectedLabels:()=>this.selectedOptions.map(w)})),this._interaction?.refresh();const i=this.querySelector(".sf-dropdown-hidden-input")||this.querySelector(".sf-dropdown-field > button");this._resetControl!==i&&(this._releaseReset?.(),this._resetControl=i,this._releaseReset=i?(0,l.z)(i,()=>{this._interaction?.beforeClose(),this._selectedValues=[...this._resetValues],this.setAttributeValue("value",y(this._selectedValues)),this._open=!1,this._searchValue="";const e=this.querySelector('.sf-dropdown-field input:not([type="hidden"])');e&&(e.value=this.triggerText),this.requestComponentUpdate("reset")}):null)}onDisconnected(){(0,c.AL)(this._list),this._releaseReset?.(),this._releaseReset=null,this._resetControl=null,this._interaction?.release(),this._interaction=null,this.removeDocumentListeners(),this.removePortalListeners(),super.onDisconnected()}openDropdown(){return this.disabled||this._open||(this._open=!0,this.requestComponentUpdate("open")),this}closeDropdown(){return this._open?(this._interaction?.beforeClose(),this._open=!1,this._searchValue="",this.requestComponentUpdate("close"),this):this}toggleDropdown(){return this._open?this.closeDropdown():this.openDropdown()}handleTriggerClick(e){this.disabled||(e?.preventDefault?.(),this.toggleDropdown())}handleSearchInput(e){this._searchValue=e?.target?.value||"",this.requestComponentUpdate("search")}handleOptionClick(e){if(this.disabled)return;const t=e.target?.closest?.(".sf-list-item");t&&(this.contains(t)||this._list?.contains(t))&&!t.classList.contains("disabled")&&(e.preventDefault(),this.selectValue(t.dataset.value||""))}handleOptionKeydown(e){"Enter"!==e.key&&" "!==e.key||this.handleOptionClick(e)}handleDocumentClick(e){!this._open||this.contains(e.target)||this._list?.contains(e.target)||this.closeDropdown()}selectValue(e=""){if(this.disabled)return this;const t=this.options.find(t=>String(t.value)===String(e));if(!t||t.disabled)return this;const i=!this.multiple&&1===this.selectedValues.length&&this.selectedValues[0]===String(t.value);if(this.multiple){const e=new Set(this.selectedValues);e.has(String(t.value))?e.delete(String(t.value)):e.add(String(t.value)),this._selectedValues=Array.from(e)}else this._selectedValues=[String(t.value)];const s=[...this._selectedValues];return this.setAttributeValue("value",y(s)),i||this.dispatchDropdownChange(t,s),this.multiple||(this._interaction?.beforeClose(),this._open=!1,this._searchValue=""),this.requestComponentUpdate("select"),this}removeSelectedValue(e=""){if(this.disabled)return this;const t=new Set(this.selectedValues);t.delete(String(e)),this._selectedValues=Array.from(t);const i=[...this._selectedValues];return this.setAttributeValue("value",y(i)),this.dispatchDropdownChange(null,i),this.requestComponentUpdate("remove-tag"),this}dispatchDropdownChange(e=null,t=this.selectedValues){const i={value:e?.value||"",label:e?w(e):"",values:t,item:e,root:this,multiple:this.multiple};this.dispatchEvent(new CustomEvent("sf-dropdown:change",{bubbles:!0,composed:!0,detail:i})),this.dispatchEvent(new CustomEvent("change",{bubbles:!0,composed:!0,detail:i}))}syncDocumentListeners(){this._open?document.addEventListener("click",this._documentClickHandler):this.removeDocumentListeners()}removeDocumentListeners(){document.removeEventListener("click",this._documentClickHandler)}syncPortalListeners(){if(this._open&&this.portal)return window.addEventListener("resize",this._viewportHandler),void document.addEventListener("scroll",this._viewportHandler,!0);this.removePortalListeners()}removePortalListeners(){window.removeEventListener("resize",this._viewportHandler),document.removeEventListener("scroll",this._viewportHandler,!0)}positionPortalList(){this._list&&this._dropdownRoot&&this.portal&&this._open?(0,c.GD)(this._dropdownRoot,this._list,()=>this.closeDropdown()):(0,c.AL)(this._list)}get value(){return this.hiddenValue}set value(e){if(e&&"object"==typeof e&&!Array.isArray(e))return void this.setValueAttributes(e);const t=Array.isArray(e)?e.map(String):v(null==e?"":String(e));this.setAttributeValue("value",y(t))}}x.define("sf-dropdown"),t()}catch(_){t(_)}})},"5429d6e80991"(e,t,i){i.a(e,async(e,s)=>{try{i.d(t,{g:()=>h});var n=i("ddf1cdb42ecc"),o=i("c22590307c6c"),r=e([n,o]);[n,o]=r.then?(await r)():r;function a(e={}){return"avatar"===e.type?e.avatarTitle||e.text||e.value||"":e.text||e.avatarTitle||e.value||""}function l(e=[]){const t=[];let i=null;for(const s of e){const e=s.group?String(s.group):"";e!==i&&(i=e,e&&t.push((0,o.aU)(e,s.size))),t.push((0,o.lN)(s))}return t}const c=Object.freeze({"1/2":{size:"1/3",spacing:""},1:{size:"1",spacing:"compact"},2:{size:"2",spacing:"compact"}});function d(e){if(e.multiple||1!==e.selectedOptions?.length)return n.nothing;const t=e.selectedOptions[0];return"icon"===t.type&&t.icon?n.html`<i class="sf-icon sf-dropdown-field-visual" aria-hidden="true">${t.icon}</i>`:"color"===t.type&&t.colorClass?n.html`<span class="sf-tag-color-icon sf-dropdown-field-visual ${t.colorClass}" aria-hidden="true"></span>`:"avatar"===t.type&&t.avatarImageUrl?n.html`<span class="sf-avatar sf-avatar--size-1/2 bg-cover sf-dropdown-field-visual" aria-hidden="true" style=${`background-image: url(${t.avatarImageUrl});`}></span>`:n.nothing}function u(e,t){const i=a(t),s=c[e.size]||c[1],o=s.size,r=s.spacing?` spacing-${s.spacing}`:"",l="color"===t.type?"color":"avatar"===t.type?"avatar":"icon";return n.html`
1
+ (()=>{"use strict";var e={"3a03d4610486"(e,t,i){i.d(t,{Q:()=>o});let s=0;function n(e,t){if(!e.id){let i;do{i=`${t}-${++s}`}while(document.getElementById(i));e.id=i}return e.id}function o(e,t){let i=null,s=null,o=null,r=!1;const a=new WeakMap,l=(e,t,i)=>{const s=a.get(e)||{};void 0!==s[t]&&e.getAttribute(t)===s[t]&&e.removeAttribute(t),delete s[t],!e.hasAttribute(t)&&i&&(e.setAttribute(t,i),s[t]=i),a.set(e,s)},c=()=>e.querySelector(".sf-dropdown-field, .sf-dropdown-trigger"),d=()=>c()?.querySelector(":scope > button")||c(),u=()=>c()?.querySelector('input:not([type="hidden"])'),p=()=>t.getList()?.querySelector(".sf-input input"),h=()=>[...t.getList()?.querySelectorAll(".sf-list-item")||[]],f=()=>h().filter(e=>!e.hidden&&!e.classList.contains("disabled")&&"true"!==e.getAttribute("aria-disabled")&&"true"!==e.getAttribute("aria-hidden")),g=e=>e.querySelector(".sf-list-item-container, .sf-avatar-label-group-title, .sf-tag-container")?.textContent?.trim()||e.dataset.value||"",b=e=>{e&&!e.disabled&&(e.focus({preventScroll:!0}),e.scrollIntoView({block:"nearest",inline:"nearest"}))},m=()=>{s="trigger",b(d()),t.close(),x()},v=e=>{if(t.isDisabled()||e.altKey||e.ctrlKey||e.metaKey)return;const i=e.target,n=i.closest?.(".sf-list-item"),o=t.getList()?.contains(i),r=i===d()||i===u()||i===c();let a=!1;if("Escape"===e.key&&t.isOpen())m(),a=!0;else{if("Tab"===e.key&&t.isOpen())return o&&b(d()),t.close(),void x();if(r&&["ArrowDown","ArrowUp","Enter"," "].includes(e.key))t.isOpen()&&["Enter"," "].includes(e.key)?m():(e=>{s=e,t.open(),x()})("ArrowUp"===e.key?"last":"search"),a=!0;else if(o&&["ArrowDown","ArrowUp"].includes(e.key)){const t=f(),i=t.indexOf(n),s=i<0?"ArrowUp"===e.key?t.length-1:0:Math.max(0,Math.min(t.length-1,i+("ArrowUp"===e.key?-1:1)));b(t[s]),a=!0}else if(n&&o&&["Home","End"].includes(e.key)){const t=f();b("Home"===e.key?t[0]:t.at(-1)),a=!0}else n&&o&&["Enter"," "].includes(e.key)&&(f().includes(n)&&(s=t.isMultiple()?{value:n.dataset.value}:"trigger",t.select(n),x()),a=!0)}a&&(e.preventDefault(),e.stopImmediatePropagation())},y=()=>{null!==o&&cancelAnimationFrame(o),o=requestAnimationFrame(()=>{var i;o=null,r||!t.isOpen()||s||(i=document.activeElement)&&(e.contains(i)||t.getList()?.contains(i))||(t.close(),x())})};let w=document.createElement("span");w.className="sf-dropdown-value",e.append(w),n(w,"sf-dropdown-value");const x=()=>{if(r)return;const o=t.getList();i!==o&&(i?.removeEventListener("keydown",v,!0),i?.removeEventListener("focusout",y),i=o,i?.addEventListener("keydown",v,!0),i?.addEventListener("focusout",y));const m=d(),x=i?.querySelector(".sf-list-container");if(!m||!x)return;w.isConnected||e.append(w);const _=e.querySelector(".sf-dropdown-label .sf-dropdown-text"),$=t.owner||e,S=_?.textContent.trim()?n(_,"sf-dropdown-label"):"",A=$.getAttribute("aria-label")||e.getAttribute("aria-label"),k=$.getAttribute("aria-labelledby")||e.getAttribute("aria-labelledby"),C=n(m,"sf-dropdown-trigger"),L=m.hasAttribute("aria-label")&&a.get(m)?.["aria-label"]!==m.getAttribute("aria-label");l(m,"aria-labelledby",k||(!A&&S?L?`${C} ${S}`:S:"")),l(m,"aria-label",A),"BUTTON"!==m.tagName&&m.setAttribute("role","button"),m.tabIndex=t.isDisabled()?-1:0,m.setAttribute("aria-expanded",String(t.isOpen())),m.setAttribute("aria-haspopup","listbox"),m.setAttribute("aria-controls",n(x,"sf-dropdown-listbox")),m.querySelectorAll(".sf-icon").forEach(e=>e.setAttribute("aria-hidden","true")),c()!==m&&(c().tabIndex=-1),u()&&(u().tabIndex=-1),x.setAttribute("role","listbox"),x.setAttribute("aria-multiselectable",String(t.isMultiple())),l(x,"aria-labelledby",k||S||C);const z=p();z&&(z.setAttribute("role","searchbox"),z.setAttribute("aria-controls",x.id),l(z,"aria-labelledby",z.hasAttribute("aria-label")?"":k||S||C)),h().forEach(e=>{e.setAttribute("role","option"),e.tabIndex=-1,e.setAttribute("aria-selected",String(e.classList.contains("selected"))),l(e,"aria-disabled",e.classList.contains("disabled")?"true":""),function(e,t){const i=e.querySelector('.sf-checkbox input[type="checkbox"]');if(!i)return;const s=e.querySelector(".sf-checkbox-box sf-icon, .sf-checkbox-box .sf-icon"),n="sf-icon"===s?.tagName?.toLowerCase()?s.getAttribute("icon")||"":s?.textContent;(i.checked!==t||i.indeterminate||s&&n!==(t?"check":""))&&(i.checked=t,i.indeterminate=!1,globalThis.SF?.Checkbox?.setState?.(i,{checked:t,indeterminate:!1}))}(e,e.classList.contains("selected")),e.querySelectorAll(".sf-checkbox").forEach(e=>{"true"!==e.getAttribute("aria-hidden")&&e.setAttribute("aria-hidden","true")}),e.querySelectorAll(".sf-icon, sf-icon").forEach(e=>{"true"!==e.getAttribute("aria-hidden")&&e.setAttribute("aria-hidden","true")}),e.querySelectorAll("input, button, a[href], [tabindex]").forEach(e=>{e.tabIndex=-1})});const V=t.selectedLabels?.()||h().filter(e=>e.classList.contains("selected")).map(g);w.textContent=V.join(", ")||u()?.value||u()?.placeholder||"";const T=new Set((m.getAttribute("aria-describedby")||"").split(/\s+/).filter(Boolean));T.add(w.id),m.setAttribute("aria-describedby",[...T].join(" ")),(()=>{if(!s)return;if("trigger"===s)return s=null,void b(d());if(!t.isOpen()||t.getList()?.hidden)return;const e=f(),i="search"===s?p()||e[0]||d():"last"===s?e.at(-1):"object"==typeof s?e.find(e=>e.dataset.value===s.value):e[0];s=null,b(i)})()};return e.addEventListener("keydown",v,!0),e.addEventListener("focusout",y),x(),{refresh:x,beforeClose:()=>{t.getList()?.contains(document.activeElement)&&(s="trigger")},release(){r=!0,null!==o&&cancelAnimationFrame(o),e.removeEventListener("keydown",v,!0),e.removeEventListener("focusout",y),i?.removeEventListener("keydown",v,!0),i?.removeEventListener("focusout",y);const t=d();if(t){const e=(t.getAttribute("aria-describedby")||"").split(/\s+/).filter(e=>e&&e!==w.id);e.length?t.setAttribute("aria-describedby",e.join(" ")):t.removeAttribute("aria-describedby")}w.remove()}}}},a0f23dca0b37(e,t,i){i.a(e,async(e,s)=>{try{i.d(t,{AL:()=>g,GD:()=>f});var n=i("5c1dc214bb5e"),o=e([n]);n=(o.then?(await o)():o)[0];var r=i.n(n);const a=()=>globalThis.SF?.Position||r(),l=new WeakMap,c=["position","inset","margin","width","max-width","max-height","overflow","left","top","right","bottom","z-index"],d=["font-family","font-size","font-weight","font-style","font-stretch","font-variant","font-feature-settings","font-variation-settings","font-optical-sizing","font-kerning","line-height","letter-spacing","word-spacing","text-transform","text-indent","white-space","word-break","overflow-wrap","text-rendering","direction","writing-mode","text-orientation","color","color-scheme","text-align"];function u(e,t){if(!t.context)return;const i=t.context,s=getComputedStyle(e),n=["sf-dropdown",...Array.from(e.classList).filter(e=>e.startsWith("sf-dropdown--")&&!["sf-dropdown--open","sf-dropdown--drop-up","sf-dropdown--drop-down"].includes(e))].join(" ");i.className!==n&&(i.className=n);const o=[...Array.from(s).filter(e=>e.startsWith("--sf-")),...d],r=new Set(o);for(const e of t.contextProperties||[])r.has(e)||i.style.removeProperty(e);for(const e of o){const t=s.getPropertyValue(e);i.style.getPropertyValue(e)!==t&&i.style.setProperty(e,t)}t.contextProperties=o}function p(e){return e?.querySelector(".sf-dropdown-field, .sf-dropdown-trigger")??null}function h(e,t){const i=l.get(t);if(!i||!e.isConnected||t.hidden)return!1;const s=p(e);return!!s&&(e.closest('[hidden], [inert], [aria-hidden="true"], dialog:not([open])')||!s.getClientRects().length||["hidden","collapse"].includes(getComputedStyle(s).visibility)?(i.onUnavailable?.(),!1):(u(e,i),i.wrap&&(i.wrap.style.minHeight="0",i.wrap.style.overflowY="auto"),i.anchor||(i.anchor=a().anchor(s,t,{side:"block-end",align:"start",matchWidth:s.classList.contains("sf-dropdown-field"),fitHeight:!0,autoUpdate:!1,onPosition:({side:i})=>{const s="block-start"===i;t.dataset.placement=e.dataset.placement=s?"top":"bottom",e.classList.toggle("sf-dropdown--drop-up",s),e.classList.toggle("sf-dropdown--drop-down",!s)}})),i.anchor.update(),!0))}function f(e,t,i){if(!t?.isConnected||!p(e))return!1;const s=t.contains(document.activeElement)?document.activeElement:null;if(!l.has(t)){const s=c.map(e=>[e,t.style.getPropertyValue(e),t.style.getPropertyPriority(e)]),n={root:e,saved:s,onUnavailable:i,popover:t.getAttribute("popover"),frame:0,native:"function"==typeof t.showPopover};if(n.wrap=t.querySelector(".sf-list-container-wrap"),n.wrapStyles=n.wrap?["min-height","overflow-y"].map(e=>[e,n.wrap.style.getPropertyValue(e),n.wrap.style.getPropertyPriority(e)]):[],n.schedule=()=>{n.frame||(n.frame=requestAnimationFrame(()=>{n.frame=0,h(e,t)}))},l.set(t,n),e.__sfDropdownPortalList=t,n.native)t.setAttribute("popover","manual");else{n.parent=t.parentNode,n.next=t.nextSibling,n.context=document.createElement("div"),n.context.style.cssText="display:contents;position:static",u(e,n);(e.closest('dialog[open], [role="dialog"][aria-modal="true"]')||document.body).append(n.context),n.context.append(t),t.style.zIndex="var(--sf-z-index-9)"}n.inheritance=new MutationObserver(n.schedule);for(let t=e;t;t=t.parentElement)n.inheritance.observe(t,{attributes:!0,attributeFilter:["class","style","dir","hidden","inert","aria-hidden","open"]});Object.assign(t.style,{position:"fixed",inset:"auto",margin:"0",overflow:n.wrap?"hidden":"auto"}),"function"==typeof ResizeObserver&&(n.resize=new ResizeObserver(n.schedule),n.resize.observe(p(e)),n.resize.observe(t)),window.visualViewport?.addEventListener("resize",n.schedule),window.visualViewport?.addEventListener("scroll",n.schedule)}return t.hidden=!1,l.get(t).native&&!t.matches(":popover-open")&&t.showPopover(),!!h(e,t)&&(s&&document.activeElement!==s&&s.focus({preventScroll:!0}),!0)}function g(e){const t=l.get(e);if(!t)return!1;const i=e.contains(document.activeElement)?document.activeElement:null;t.anchor?.stop(),t.resize?.disconnect(),cancelAnimationFrame(t.frame),t.inheritance?.disconnect(),window.visualViewport?.removeEventListener("resize",t.schedule),window.visualViewport?.removeEventListener("scroll",t.schedule),t.native?(e.matches(":popover-open")&&e.hidePopover(),null===t.popover?e.removeAttribute("popover"):e.setAttribute("popover",t.popover)):(t.next?.parentNode===t.parent?t.parent.insertBefore(e,t.next):t.parent.append(e),t.context.remove());for(const[i,s,n]of t.saved)s?e.style.setProperty(i,s,n):e.style.removeProperty(i);for(const[e,i,s]of t.wrapStyles)i?t.wrap.style.setProperty(e,i,s):t.wrap.style.removeProperty(e);return delete e.dataset.placement,delete t.root.dataset.placement,t.root.classList.remove("sf-dropdown--drop-up","sf-dropdown--drop-down"),t.root.__sfDropdownPortalList===e&&delete t.root.__sfDropdownPortalList,l.delete(e),i&&!e.hidden&&t.root.isConnected&&document.activeElement!==i&&i.focus({preventScroll:!0}),!0}s()}catch(b){s(b)}})},"98e26702f55a"(e,t,i){function s(){const e=globalThis.SF=globalThis.SF||{};return e.__deprecationNotes instanceof Map||Object.defineProperty(e,"__deprecationNotes",{value:new Map,configurable:!0}),e.__deprecationNotes}function n({component:e="",kind:t="attribute",attribute:i="",from:n,to:o=null}={}){if(!n)return;const r=[e,t,i,n].join("|"),a=s(),l=a.get(r);if(l)l.count+=1;else if(a.set(r,{component:e,kind:t,attribute:i,from:n,to:o,count:1}),function(){const e=globalThis.document?.documentElement;return"warn"===e?.dataset?.sfDeprecations||!0===globalThis.SF?.deprecations?.warn}()){const s=e?`${e}: `:"",r="value"===t?`${i}="${n}"`:`${t} ${n}`;globalThis.console?.warn?.(`[SIMAI Framework] ${s}${r} is a legacy name${o?`; write ${o}`:""}. See contracts/changes/journal.json.`)}}if(i.d(t,{id:()=>c,kA:()=>l}),"undefined"!=typeof globalThis){globalThis.SF=globalThis.SF||{};const e=globalThis.SF.deprecations||{};e.list=function(){return[...s().values()].map(e=>({...e}))},e.clear=function(){s().clear()},e.note=n,globalThis.SF.deprecations=e}const o=Object.freeze(["1/2","1","2"]),r=Object.freeze({"1/3":"1/2",3:"2"}),a=new Set;function l(e){const t=String(e??"").trim().toLowerCase();return o.includes(t)?t:Object.hasOwn(r,t)?r[t]:"1"}function c(e,t="field",i="1"){const s=String(e??"").trim().toLowerCase();if(o.includes(s))return s;if(Object.hasOwn(r,s)){const e=r[s];n({component:t,kind:"value",attribute:"size",from:s,to:e});const i=`${t}:${s}`;return a.has(i)||"undefined"==typeof console||(a.add(i),console.warn(`[SIMAI Framework] ${t}: size ${s} is retired for form fields; rendering size ${e}.`)),e}return i}},"67eed2647f47"(e,t,i){i.d(t,{z:()=>o});const s=new WeakMap,n=new WeakSet;function o(e,t){const i=e.ownerDocument;n.has(i)||(i.addEventListener("reset",e=>{const t=e.target;if("FORM"!==t?.tagName)return;const i=Array.from(t.elements);setTimeout(()=>{if(!e.defaultPrevented)for(const e of i)if(e.isConnected&&e.form===t)for(const t of s.get(e)||[])t()},0)},!0),n.add(i));let o=s.get(e);return o||s.set(e,o=new Set),o.add(t),()=>o.delete(t)}},"50a1017ded91"(e,t,i){i.a(e,async(e,t)=>{try{var s=i("fbe0570fcc69"),n=i("0d662e4d7d63"),o=i("98e26702f55a"),r=i("5429d6e80991"),a=i("3a03d4610486"),l=i("67eed2647f47"),c=i("a0f23dca0b37"),d=e([s,n,r,c]);[s,n,r,c]=d.then?(await d)():d;var u=i.n(s);const p={en:{search:"Search"},ru:{search:"Поиск"}};function h(e){return(0,o.id)(e,"sf-dropdown")}function f(e){const t=String(e||"").toLowerCase();return["text","icon","checkbox","avatar","color"].includes(t)?t:"text"}function g(e,t="1"){return e instanceof HTMLElement?"sf-list-item"!==e.tagName.toLowerCase()?null:{type:f(e.getAttribute("kind")||e.getAttribute("type")),size:h(e.getAttribute("size")||t),text:e.getAttribute("text")||"",icon:e.getAttribute("icon")||"person",checked:e.hasAttribute("checked")||(0,s.toBoolean)(e.getAttribute("checked")),selected:e.hasAttribute("selected")||(0,s.toBoolean)(e.getAttribute("selected")),disabled:e.hasAttribute("disabled")||(0,s.toBoolean)(e.getAttribute("disabled")),colorClass:e.getAttribute("color-class")||"bg-tertiary",avatarImageUrl:e.getAttribute("avatar-image-url")||"",avatarTitle:e.getAttribute("avatar-title")||e.getAttribute("text")||"",value:e.getAttribute("value")??e.getAttribute("text")??"",ariaLabel:e.getAttribute("aria-label")||"",group:e.getAttribute("group")||""}:null}function b(e,t="1"){if(!e||"object"!=typeof e)return null;const i=void 0===e.text||null===e.text?"":String(e.text),n=void 0===e.value||null===e.value?i:String(e.value);return""===i&&""===n?null:{type:f(e.kind||e.type),size:h(e.size||t),text:i,icon:e.icon?String(e.icon):"person",checked:(0,s.toBoolean)(e.checked),selected:(0,s.toBoolean)(e.selected),disabled:(0,s.toBoolean)(e.disabled),colorClass:e.colorClass?String(e.colorClass):"bg-tertiary",avatarImageUrl:e.avatarImageUrl?String(e.avatarImageUrl):"",avatarTitle:e.avatarTitle?String(e.avatarTitle):i,value:n,ariaLabel:e.ariaLabel?String(e.ariaLabel):"",group:e.group?String(e.group):""}}function m(e,t="1"){let i=e;if("string"==typeof i){const e=i.trim();if(""===e)return[];try{i=JSON.parse(e)}catch{return[]}}return Array.isArray(i)?i.map(e=>b("string"==typeof e||"number"==typeof e?{text:String(e),value:String(e)}:e,t)).filter(Boolean):[]}function v(e=""){return String(e||"").split(",").map(e=>e.trim()).filter(Boolean)}function y(e=[]){return e.map(e=>String(e)).join(",")}function w(e={}){return"avatar"===e.type?e.avatarTitle||e.text||e.value||"":e.text||e.avatarTitle||e.value||""}class x extends(u()){constructor(){super(),this._options=[],this._optionsCaptured=!1,this._optionsFromData=!1,this._open=!1,this._searchValue="",this._selectedValues=[],this._dropdownRoot=null,this._list=null,this._documentClickHandler=this.handleDocumentClick.bind(this),this._viewportHandler=this.positionPortalList.bind(this)}static get props(){return{templateName:{attribute:"template",default:"default"},size:{default:"1"},appearance:{default:"outlined",values:["filled","outlined"],aliases:["type"]},mode:{default:"select",values:["tag","select"]},multiple:{type:Boolean,default:!1},portal:{type:Boolean,default:!0},value:{default:""},name:{default:""},label:{default:""},required:{type:Boolean,default:!1},placeholder:{default:""},searchPlaceholder:{default:""},search:{type:Boolean,default:!0},layout:{default:"list",values:["list","grid"]},columns:{default:"6"},disabled:{type:Boolean,default:!1},ariaLabel:{default:""}}}connectedCallback(){this.captureOptions(),Object.prototype.hasOwnProperty.call(this,"_resetValues")||(this._resetValues=[...this.selectedValues]),super.connectedCallback()}attributeChangedCallback(e,t,i){t!==i&&("value"===e&&(this._selectedValues=v(i)),"disabled"===e&&this.disabled&&(this._open=!1,this._searchValue="")),super.attributeChangedCallback(e,t,i)}get componentName(){return"dropdown"}get templateName(){return this.getAttribute("template")||"default"}get size(){return h(this.getAttribute("size"))}get appearance(){return this.getProp("appearance")}get type(){return this.appearance}get mode(){return this.getEnumAttr("mode",["tag","select"],"select")}get multiple(){return this.hasAttribute("multiple")?this.getBooleanAttr("multiple",!0):"tag"===this.mode}get portal(){return this.getBooleanAttr("portal",!0)}get name(){return this.getAttribute("name")||""}get selectedValue(){return this.getAttribute("value")||""}get label(){return this.getAttribute("label")||""}get required(){return this.getBooleanAttr("required",!1)}get placeholder(){return this.getAttribute("placeholder")||""}get searchPlaceholder(){return this.getAttribute("search-placeholder")||(0,n.pageText)(p,"search",this)}get layout(){return this.getEnumAttr("layout",["list","grid"],"list")}get columns(){const e=Number.parseInt(this.getAttribute("columns")??"",10);return Number.isFinite(e)&&e>0?String(e):"6"}get search(){return this.getBooleanAttr("search",!0)}get disabled(){return this.getBooleanAttr("disabled",!1)}get ariaLabel(){return this.getAttribute("aria-label")||""}get selectedValues(){return this.hasAttribute("value")?v(this.selectedValue):this._selectedValues}get selectedOptions(){const e=this.options;return[...new Set(this.selectedValues)].map(t=>e.find(e=>String(e.value)===t)).filter(Boolean)}get triggerText(){if("tag"===this.mode)return"";return(this.multiple?this.selectedOptions:this.selectedOptions.slice(0,1)).map(w).join(", ")}get hiddenValue(){return this.selectedValues.join(",")}captureOptions(){if(this._optionsFromData)return;const e=Array.from(this.children).filter(e=>e instanceof HTMLElement&&"sf-list-item"===e.tagName.toLowerCase());e.length&&(this._options=e.map(e=>g(e,this.size)).filter(Boolean),this._optionsCaptured=!0,this.selectedValue||this._selectedValues.length||(this._selectedValues=this._options.filter(e=>e.selected).map(e=>String(e.value))),e.forEach(e=>e.remove()))}set options(e){const t=m(e,this.size);this._optionsFromData=!0,this._options=t,this._optionsCaptured=!0,this.selectedValue||this._selectedValues.length||(this._selectedValues=t.filter(e=>e.selected).map(e=>String(e.value))),this.requestComponentUpdate("options")}get options(){if(!Array.isArray(this._options)||!this._options.length)return[];const e=new Set(this.selectedValues);return this._options.map(t=>({...t,size:h(t.size||this.size),selected:e.has(String(t.value))}))}get visibleOptions(){const e=String(this._searchValue||"").trim().toLowerCase();return e?this.options.filter(t=>w(t).toLowerCase().includes(e)):this.options}templateContext(){const e=this.getPropsContext();return this.createTemplateContext({...e,component:this,open:this._open,multiple:this.multiple,value:this.hiddenValue,triggerText:this.triggerText,searchValue:this._searchValue,searchPlaceholder:this.searchPlaceholder,selectedValues:this.selectedValues,selectedOptions:this.selectedOptions,options:this.visibleOptions})}template(){return(0,r.g)(this.templateContext())}beforeRender(){this.captureOptions()}afterRender(){const e=this._dropdownRoot,t=this._list;this._dropdownRoot=this.querySelector(".sf-dropdown"),this._list=this.querySelector(".sf-list")||(e===this._dropdownRoot?t:null),t!==this._list&&(0,c.AL)(t),this.syncDocumentListeners(),this.syncPortalListeners(),this.positionPortalList(),e!==this._dropdownRoot&&(this._interaction?.release(),this._interaction=null),this._dropdownRoot&&!this._interaction&&(this._interaction=(0,a.Q)(this._dropdownRoot,{owner:this,getList:()=>this._list,isOpen:()=>this._open,isDisabled:()=>this.disabled,isMultiple:()=>this.multiple,open:()=>this.openDropdown(),close:()=>this.closeDropdown(),select:e=>this.selectValue(e.dataset.value||""),selectedLabels:()=>this.selectedOptions.map(w)})),this._interaction?.refresh();const i=this.querySelector(".sf-dropdown-hidden-input")||this.querySelector(".sf-dropdown-field > button");this._resetControl!==i&&(this._releaseReset?.(),this._resetControl=i,this._releaseReset=i?(0,l.z)(i,()=>{this._interaction?.beforeClose(),this._selectedValues=[...this._resetValues],this.setAttributeValue("value",y(this._selectedValues)),this._open=!1,this._searchValue="";const e=this.querySelector('.sf-dropdown-field input:not([type="hidden"])');e&&(e.value=this.triggerText),this.requestComponentUpdate("reset")}):null)}onDisconnected(){(0,c.AL)(this._list),this._releaseReset?.(),this._releaseReset=null,this._resetControl=null,this._interaction?.release(),this._interaction=null,this.removeDocumentListeners(),this.removePortalListeners(),super.onDisconnected()}openDropdown(){return this.disabled||this._open||(this._open=!0,this.requestComponentUpdate("open")),this}closeDropdown(){return this._open?(this._interaction?.beforeClose(),this._open=!1,this._searchValue="",this.requestComponentUpdate("close"),this):this}toggleDropdown(){return this._open?this.closeDropdown():this.openDropdown()}handleTriggerClick(e){this.disabled||(e?.preventDefault?.(),this.toggleDropdown())}handleSearchInput(e){this._searchValue=e?.target?.value||"",this.requestComponentUpdate("search")}handleOptionClick(e){if(this.disabled)return;const t=e.target?.closest?.(".sf-list-item");t&&(this.contains(t)||this._list?.contains(t))&&!t.classList.contains("disabled")&&(e.preventDefault(),this.selectValue(t.dataset.value||""))}handleOptionKeydown(e){"Enter"!==e.key&&" "!==e.key||this.handleOptionClick(e)}handleDocumentClick(e){!this._open||this.contains(e.target)||this._list?.contains(e.target)||this.closeDropdown()}selectValue(e=""){if(this.disabled)return this;const t=this.options.find(t=>String(t.value)===String(e));if(!t||t.disabled)return this;const i=!this.multiple&&1===this.selectedValues.length&&this.selectedValues[0]===String(t.value);if(this.multiple){const e=new Set(this.selectedValues);e.has(String(t.value))?e.delete(String(t.value)):e.add(String(t.value)),this._selectedValues=Array.from(e)}else this._selectedValues=[String(t.value)];const s=[...this._selectedValues];return this.setAttributeValue("value",y(s)),i||this.dispatchDropdownChange(t,s),this.multiple||(this._interaction?.beforeClose(),this._open=!1,this._searchValue=""),this.requestComponentUpdate("select"),this}removeSelectedValue(e=""){if(this.disabled)return this;const t=new Set(this.selectedValues);t.delete(String(e)),this._selectedValues=Array.from(t);const i=[...this._selectedValues];return this.setAttributeValue("value",y(i)),this.dispatchDropdownChange(null,i),this.requestComponentUpdate("remove-tag"),this}dispatchDropdownChange(e=null,t=this.selectedValues){const i={value:e?.value||"",label:e?w(e):"",values:t,item:e,root:this,multiple:this.multiple};this.dispatchEvent(new CustomEvent("sf-dropdown:change",{bubbles:!0,composed:!0,detail:i})),this.dispatchEvent(new CustomEvent("change",{bubbles:!0,composed:!0,detail:i}))}syncDocumentListeners(){this._open?document.addEventListener("click",this._documentClickHandler):this.removeDocumentListeners()}removeDocumentListeners(){document.removeEventListener("click",this._documentClickHandler)}syncPortalListeners(){if(this._open&&this.portal)return window.addEventListener("resize",this._viewportHandler),void document.addEventListener("scroll",this._viewportHandler,!0);this.removePortalListeners()}removePortalListeners(){window.removeEventListener("resize",this._viewportHandler),document.removeEventListener("scroll",this._viewportHandler,!0)}positionPortalList(){this._list&&this._dropdownRoot&&this.portal&&this._open?(0,c.GD)(this._dropdownRoot,this._list,()=>this.closeDropdown()):(0,c.AL)(this._list)}get value(){return this.hiddenValue}set value(e){if(e&&"object"==typeof e&&!Array.isArray(e))return void this.setValueAttributes(e);const t=Array.isArray(e)?e.map(String):v(null==e?"":String(e));this.setAttributeValue("value",y(t))}}x.define("sf-dropdown"),t()}catch(_){t(_)}})},"5429d6e80991"(e,t,i){i.a(e,async(e,s)=>{try{i.d(t,{g:()=>h});var n=i("ddf1cdb42ecc"),o=i("c22590307c6c"),r=e([n,o]);[n,o]=r.then?(await r)():r;function a(e={}){return"avatar"===e.type?e.avatarTitle||e.text||e.value||"":e.text||e.avatarTitle||e.value||""}function l(e=[]){const t=[];let i=null;for(const s of e){const e=s.group?String(s.group):"";e!==i&&(i=e,e&&t.push((0,o.aU)(e,s.size))),t.push((0,o.lN)(s))}return t}const c=Object.freeze({"1/2":{size:"1/3",spacing:""},1:{size:"1",spacing:"compact"},2:{size:"2",spacing:"compact"}});function d(e){if(e.multiple||1!==e.selectedOptions?.length)return n.nothing;const t=e.selectedOptions[0];return"icon"===t.type&&t.icon?n.html`<i class="sf-icon sf-dropdown-field-visual" aria-hidden="true">${t.icon}</i>`:"color"===t.type&&t.colorClass?n.html`<span class="sf-tag-color-icon sf-dropdown-field-visual ${t.colorClass}" aria-hidden="true"></span>`:"avatar"===t.type&&t.avatarImageUrl?n.html`<span class="sf-avatar sf-avatar--size-1/2 bg-cover sf-dropdown-field-visual" aria-hidden="true" style=${`background-image: url(${t.avatarImageUrl});`}></span>`:n.nothing}function u(e,t){const i=a(t),s=c[e.size]||c[1],o=s.size,r=s.spacing?` spacing-${s.spacing}`:"",l="color"===t.type?"color":"avatar"===t.type?"avatar":"icon";return n.html`
2
2
  <div
3
3
  class="sf-tag transition sf-tag--${l} sf-tag--size-${o} sf-tag--inline${r} flex flex-row flex-nowrap items-center active"
4
4
  data-value=${t.value}
@@ -1,4 +1,4 @@
1
- (()=>{"use strict";var e={"98e26702f55a"(e,t,s){function n(){const e=globalThis.SF=globalThis.SF||{};return e.__deprecationNotes instanceof Map||Object.defineProperty(e,"__deprecationNotes",{value:new Map,configurable:!0}),e.__deprecationNotes}function i({component:e="",kind:t="attribute",attribute:s="",from:i,to:o=null}={}){if(!i)return;const r=[e,t,s,i].join("|"),a=n(),l=a.get(r);if(l)l.count+=1;else if(a.set(r,{component:e,kind:t,attribute:s,from:i,to:o,count:1}),function(){const e=globalThis.document?.documentElement;return"warn"===e?.dataset?.sfDeprecations||!0===globalThis.SF?.deprecations?.warn}()){const n=e?`${e}: `:"",r="value"===t?`${s}="${i}"`:`${t} ${i}`;globalThis.console?.warn?.(`[Simai Framework] ${n}${r} is a legacy name${o?`; write ${o}`:""}. See contracts/changes/journal.json.`)}}if(s.d(t,{cS:()=>o,id:()=>l,vl:()=>d}),"undefined"!=typeof globalThis){globalThis.SF=globalThis.SF||{};const e=globalThis.SF.deprecations||{};e.list=function(){return[...n().values()].map(e=>({...e}))},e.clear=function(){n().clear()},e.note=i,globalThis.SF.deprecations=e}const o=Object.freeze(["1/2","1","2"]),r=Object.freeze({"1/3":"1/2",3:"2"}),a=new Set;function l(e,t="field",s="1"){const n=String(e??"").trim().toLowerCase();if(o.includes(n))return n;if(Object.hasOwn(r,n)){const e=r[n];i({component:t,kind:"value",attribute:"size",from:n,to:e});const s=`${t}:${n}`;return a.has(s)||"undefined"==typeof console||(a.add(s),console.warn(`[Simai Framework] ${t}: size ${n} is retired for form fields; rendering size ${e}.`)),e}return s}function d(e,t){if(e?.classList)for(const[s,n]of Object.entries(r)){const n=`${t}--size-${s}`;e.classList.contains(n)&&e.classList.replace(n,`${t}--size-${l(s,t)}`)}}},c43efa1014a6(e,t,s){s.a(e,async(e,n)=>{try{s.d(t,{Wj:()=>j,i:()=>K,pA:()=>B});var i=s("d7f974466839"),o=s("58661bec99a6"),r=s("98e26702f55a"),a=s("0d662e4d7d63"),l=e([a]),d=l.then?(await l)():l;a=d[0];const c={en:{remove:"Remove",uploading:"Uploading",retry:"Try again",linkText:"Click to upload",text:"or drag and drop"},ru:{remove:"Удалить",uploading:"Загрузка",retry:"Повторить",linkText:"Выберите файл",text:"или перетащите его сюда"}},u=".sf-file-upload",f="sfFileUploadBound";function p(e,t=!1){return null==e||""===e?t:"boolean"==typeof e?e:["1","true","yes","on","disabled","multiple"].includes(String(e).toLowerCase())}function m(e){return(0,r.id)(e,"sf-file-upload")}function h(e){const t=Number(e);if(!Number.isFinite(t)||t<0)return"";if(t<1024)return`${t} B`;const s=["KB","MB","GB","TB"];let n=t/1024,i=0;for(;n>=1024&&i<s.length-1;)n/=1024,i+=1;return`${n>=10?n.toFixed(0):n.toFixed(1)}${s[i]}`}function b(e){const t=String(e?.state||e?.status||"process").toLowerCase();return["process","done","error"].includes(t)?t:"process"}function g(e,t){return e?.id?String(e.id):e?.file&&e.file.name?`${e.file.name}-${e.file.size}-${e.file.lastModified}`:e?.name||e?.fileName?`${e.name||e.fileName}-${t}`:`item-${t}`}function _(e){return!!e&&(e.classList.contains("disabled")||e.hasAttribute("disabled"))}function v(e){return e?.querySelector?.('input[type="file"].sf-file-upload-input')||null}function y(e){if(!e)return null;const t=e.dataset.target||e.getAttribute("data-target")||"";if(t)try{const e=document.querySelector(t);if(e)return e}catch{}const s=e.nextElementSibling;return s?.classList?.contains("sf-file-upload-files")?s:e.querySelector(".sf-file-upload-files")||null}function x(e){return!!e&&("1"===e.dataset.renderManaged||e.hasAttribute("data-render-managed"))}function F(e){return e.hasAttribute("multiple")||p(e.dataset.multiple??e.getAttribute("multiple"),!1)}function E(e){return e.dataset.accept||e.getAttribute("accept")||""}function w(e){let t=v(e);return t||(t=document.createElement("input"),t.type="file",t.classList.add("sf-file-upload-input"),t.hidden=!0,t.tabIndex=-1,t.setAttribute("aria-hidden","true"),e.append(t),t)}function S(e,t){if(!e||!t)return;t.multiple=F(e);const s=E(e);s?t.setAttribute("accept",s):t.removeAttribute("accept"),t.disabled=_(e)}function A(e){const t=e.__sfFileUploadInteractionState||={tabIndex:e.getAttribute("tabindex")??"0",disabled:!1,buttons:new WeakMap},s=_(e);t.disabled||(t.tabIndex=e.getAttribute("tabindex")??"0");const n=s?"-1":t.tabIndex;e.getAttribute("tabindex")!==n&&e.setAttribute("tabindex",n),e.getAttribute("aria-disabled")!==String(s)&&e.setAttribute("aria-disabled",String(s)),t.disabled=s,S(e,v(e)),s&&e.classList.contains("dragover")&&e.classList.remove("dragover");const i=y(e);i?.querySelectorAll('button[data-action="remove"], button[data-action="retry"]').forEach(n=>{let i=t.buttons.get(n);i||(i={disabled:n.disabled,managedDisabled:!1,label:null},t.buttons.set(n,i)),i.managedDisabled||(i.disabled=n.disabled);const o=s||i.disabled;if(n.disabled!==o&&(n.disabled=o),i.managedDisabled=s,"remove"!==n.dataset.action)return;const r=n.getAttribute("aria-label");if(!(n.hasAttribute("aria-labelledby")||r&&r!==i.label)){const t=n.closest(".sf-upload-progress")?.querySelector(".sf-upload-progress-name")?.textContent?.trim()||"",s=`${(0,a.pageText)(c,"remove",e,"sf-file-upload")} ${t}`.trim();r!==s&&n.setAttribute("aria-label",s),i.label=s}n.querySelectorAll(".sf-icon").forEach(e=>{"true"!==e.getAttribute("aria-hidden")&&e.setAttribute("aria-hidden","true")})}),i?.querySelectorAll(".sf-upload-progress").forEach(t=>{const s=t.querySelector(".sf-upload-progress-name")?.textContent?.trim()||"",n=`${(0,a.pageText)(c,"uploading",e,"sf-file-upload")} ${s}`.trim(),i=t.querySelector("sf-progress-bar");if(i){const e=i.dataset.sfUploadLabel;return void(i.hasAttribute("label")&&i.getAttribute("label")!==e||(i.getAttribute("label")!==n&&i.setAttribute("label",n),i.dataset.sfUploadLabel=n))}const o=t.querySelector(".sf-progress-bar");if(!o||o.hasAttribute("aria-labelledby"))return;const r=o.getAttribute("aria-label");r&&r!==o.dataset.sfUploadLabel||(r!==n&&o.setAttribute("aria-label",n),o.dataset.label=n,o.dataset.sfUploadLabel=n)})}function U(e,t="1",s=null){const n=m(t),i=String(e.state||e.status||"done").toLowerCase(),o=String(e.name||e.fileName||"File"),r=String(e.fileSize||e.sizeText||""),l=Math.max(0,Math.min(100,Number(e.progress??100)||0)),d=String(e.icon||"cloud_upload"),u=String(e.errorMessage||e.retryText||(0,a.pageText)(c,"retry",s,"sf-file-upload")),f=document.createElement("div");f.className=["sf-upload-progress",`sf-upload-progress--size-${n}`,`sf-upload-progress--${i}`,"flex","items-main-start","items-cross-start"].join(" ");const p=document.createElement("i");p.classList.add("sf-icon"),p.textContent=d;const h=document.createElement("div");h.className="sf-upload-progress-content flex flex-col flex-1";const b=document.createElement("div");b.className="sf-upload-progress-top flex content-main-between";const g=document.createElement("div");g.className="sf-upload-progress-left flex flex-col";const _=document.createElement("div");_.className="sf-upload-progress-name",_.textContent=o;const v=document.createElement("div");if(v.className="sf-upload-progress-text",v.textContent=r,g.append(_,v),b.append(g),"done"===i){const e=document.createElement("i");e.className="sf-icon sf-icon-solid",e.textContent="check_circle",b.append(e)}else{if("error"===i){const e=document.createElement("button");e.type="button",e.className=`sf-icon-button sf-icon-button--icon sf-icon-button--on-surface sf-icon-button--link sf-icon-button--size-${n} flex items-cross-center content-main-center self-cross-start`,e.dataset.action="remove";const t=document.createElement("i");t.className="sf-icon",t.textContent="delete",e.append(t),b.append(e);const s=document.createElement("button");return s.type="button",s.className="sf-upload-progress-repeat self-cross-start",s.dataset.action="retry",s.textContent=u,h.append(b,s),f.append(p,h),f}{const e=document.createElement("button");e.type="button",e.className=`sf-icon-button sf-icon-button--icon sf-icon-button--on-surface sf-icon-button--link sf-icon-button--size-${n} flex items-cross-center content-main-center self-cross-start`,e.dataset.action="remove";const t=document.createElement("i");t.className="sf-icon",t.textContent="delete",e.append(t),b.append(e)}}const y=document.createElement("div");y.className=`sf-progress-bar sf-progress-bar--size-${n} flex flex-row items-cross-center`,y.dataset.value=String(l),y.dataset.textPosition="inline-end";const x=document.createElement("div");x.className="sf-progress-bar-main";const F=document.createElement("div");F.className="sf-progress-bar-progress transition",F.style.width=`${l}%`;const E=document.createElement("div");return E.className="sf-progress-bar-text",E.textContent=`${l}%`,x.append(F),y.append(x,E),h.append(b,y),f.append(p,h),f}function T(e,t=[]){e?.classList?.toggle?.("has-files",t.length>0);const s=y(e);if(!s||x(e))return void(e&&A(e));s.innerHTML="";const n=m(Array.from(e.classList).find(e=>e.startsWith("sf-file-upload--size-"))?.replace("sf-file-upload--size-","")||"1");t.forEach((t,i)=>{const o=U(t,n,e);o.dataset.index=String(i),s.append(o)}),A(e)}function L(e,t,s,n,i="input"){e.dispatchEvent(new CustomEvent("sf-file-upload:file-add",{bubbles:!0,detail:{item:t,index:s,items:n,source:i,multiple:F(e)}}))}function $(e,t,s,n){e.dispatchEvent(new CustomEvent("sf-file-upload:file-error",{bubbles:!0,detail:{item:t,index:s,items:n}}))}function C(e,t,s,n){e.dispatchEvent(new CustomEvent("sf-file-upload:file-complete",{bubbles:!0,detail:{item:t,index:s,items:n}}))}function N(e,t){e.dispatchEvent(new CustomEvent("sf-file-upload:complete",{bubbles:!0,detail:{items:t}}))}function k(e,t=[],s=[]){const n=new Map(s.map((e,t)=>[g(e,t),b(e)]));t.forEach((s,i)=>{const o=g(s,i),r=b(s),a=n.get(o);"error"===r&&"error"!==a&&$(e,s,i,t),"done"===r&&"done"!==a&&C(e,s,i,t)});const i=t.length>0&&t.every(e=>"done"===b(e)),o=s.length>0&&s.every(e=>"done"===b(e));i&&!o&&N(e,t)}function O(e=[]){return Array.from(e).map(e=>({id:`${e.name}-${e.size}-${e.lastModified}`,name:e.name,fileSize:h(e.size),progress:0,state:"process",file:e}))}function R(e,t){if(!e)return!1;const s=Array.from(e.__sfFileUploadItems||[]);if(!s.length)return!1;const n=Number(t);if(!Number.isInteger(n)||n<0||n>=s.length)return!1;const[i]=s.splice(n,1);return e.__sfFileUploadItems=s,T(e,s),e.dispatchEvent(new CustomEvent("sf-file-upload:remove",{bubbles:!0,detail:{item:i||null,index:n,items:s}})),!0}function I(e,t){if(!e)return!1;const s=Array.from(e.__sfFileUploadItems||[]);if(!s.length)return!1;const n=Number(t);if(!Number.isInteger(n)||n<0||n>=s.length)return!1;const i=s.map(e=>({...e})),o=i[n];o.state="process",o.progress=0,delete o.errorMessage,delete o.retryText;const r=Array.from(e.__sfFileUploadItems||[]);return e.__sfFileUploadItems=i,T(e,i),k(e,i,r),e.dispatchEvent(new CustomEvent("sf-file-upload:retry",{bubbles:!0,detail:{item:o,index:n,items:i}})),!0}function M(e,t){const s=String(e||"").split(",").map(e=>e.trim().toLowerCase()).filter(Boolean);if(!s.length)return!0;const n=String(t?.name||"").toLowerCase(),i=String(t?.type||"").toLowerCase();return s.some(e=>e.startsWith(".")?n.endsWith(e):e.endsWith("/*")?i.startsWith(e.slice(0,-1)):i===e)}function z(e,t,s="input"){e.dispatchEvent(new CustomEvent("sf-file-upload:select",{bubbles:!0,detail:{files:t,source:s,multiple:F(e)}}))}function D(e,t=[],s="input"){const n=O(t),i=Array.from(e.__sfFileUploadItems||[]);e.__sfFileUploadItems=n,T(e,n),k(e,n,i),n.forEach((t,i)=>{L(e,t,i,n,s)}),z(e,n,s)}function B(e){if((0,r.vl)(e,"sf-file-upload"),!e)return;const t=w(e),s=y(e);if("function"==typeof e.__sfFileUploadOnClick){if(e.__sfFileUploadBoundInput===t&&e.__sfFileUploadBoundFiles===s)return;j(e)}else"1"!==e.dataset[f]||e.__sfFileUploadItems||x(e)||(e.__sfFileUploadItems=[],e.classList.contains("has-files")&&!e.hasAttribute("data-target")&&T(e,[]),e.classList.remove("has-files","dragover"));A(e),e.hasAttribute("role")||e.setAttribute("role","button");const n=()=>{_(e)||(S(e,t),t.click())},i=t=>{if(_(e))return void t.preventDefault();const s=t.target;s instanceof Element&&(s.closest(".sf-upload-progress-repeat")||s.closest('input[type="file"]')||s.closest('[data-action="remove"]')||n())},o=t=>{t.target!==e||t.repeat||e.matches("button, input, a[href]")||_(e)||"Enter"!==t.key&&" "!==t.key||(t.preventDefault(),n())},a=t=>{if(_(e))return;const s=Array.from(t.target?.files||[]);s.length&&(D(e,s,"input"),t.target.value="")},l=t=>{Array.from(t.dataTransfer?.types||[]).includes("Files")&&(t.preventDefault(),_(e)?t.dataTransfer.dropEffect="none":(t.dataTransfer.dropEffect="copy",e.classList.add("dragover")))},d=t=>{e.contains(t.relatedTarget)||e.classList.remove("dragover")},c=t=>{e.classList.remove("dragover");const s=Array.from(t.dataTransfer?.files||[]);if(!s.length&&!Array.from(t.dataTransfer?.types||[]).includes("Files"))return;if(t.preventDefault(),_(e)||!s.length)return;const n=s.filter(t=>M(E(e),t)),i=s.filter(e=>!n.includes(e));if(i.length&&e.dispatchEvent(new CustomEvent("sf-file-upload:reject",{bubbles:!0,detail:{files:i,accept:E(e),source:"drop"}})),!n.length)return;const o=F(e)?n:n.slice(0,1);D(e,o,"drop"),e.dispatchEvent(new CustomEvent("change",{bubbles:!0,detail:{files:o,source:"drop"}}))},u=t=>{const s=t.target;if(!(s instanceof Element))return;const n=s.closest('[data-action="remove"]'),i=s.closest('[data-action="retry"]');if(!n&&!i)return;if(_(e)||(n||i).disabled)return t.preventDefault(),void t.stopPropagation();const o=(n||i).closest(".sf-upload-progress");o&&(t.preventDefault(),t.stopPropagation(),n?R(e,o.dataset.index):I(e,o.dataset.index))};e.addEventListener("click",i),e.addEventListener("keydown",o),e.addEventListener("dragover",l),e.addEventListener("dragleave",d),e.addEventListener("drop",c),t.addEventListener("change",a),s?.addEventListener("click",u),e.__sfFileUploadOnClick=i,e.__sfFileUploadOnKeydown=o,e.__sfFileUploadOnDragOver=l,e.__sfFileUploadOnDragLeave=d,e.__sfFileUploadOnDrop=c,e.__sfFileUploadOnChange=a,e.__sfFileUploadOnFilesClick=u,e.__sfFileUploadBoundInput=t,e.__sfFileUploadBoundFiles=s;const p=new MutationObserver(()=>A(e));p.observe(e,{attributes:!0,attributeFilter:["disabled","class","accept","multiple","data-accept","data-multiple"]}),s&&p.observe(s,{childList:!0,subtree:!0,characterData:!0}),e.__sfFileUploadInteractionObserver=p,e.dataset[f]="1"}function j(e){if(!e)return;const t=e.__sfFileUploadBoundInput||v(e);e.__sfFileUploadInteractionObserver?.disconnect(),delete e.__sfFileUploadInteractionObserver,e.__sfFileUploadOnClick&&e.removeEventListener("click",e.__sfFileUploadOnClick),e.__sfFileUploadOnKeydown&&e.removeEventListener("keydown",e.__sfFileUploadOnKeydown),e.__sfFileUploadOnDragOver&&e.removeEventListener("dragover",e.__sfFileUploadOnDragOver),e.__sfFileUploadOnDragLeave&&e.removeEventListener("dragleave",e.__sfFileUploadOnDragLeave),e.__sfFileUploadOnDrop&&e.removeEventListener("drop",e.__sfFileUploadOnDrop),t&&e.__sfFileUploadOnChange&&t.removeEventListener("change",e.__sfFileUploadOnChange);const s=e.__sfFileUploadBoundFiles||y(e);s&&e.__sfFileUploadOnFilesClick&&s.removeEventListener("click",e.__sfFileUploadOnFilesClick),delete e.__sfFileUploadOnClick,delete e.__sfFileUploadOnKeydown,delete e.__sfFileUploadOnDragOver,delete e.__sfFileUploadOnDragLeave,delete e.__sfFileUploadOnDrop,delete e.__sfFileUploadOnChange,delete e.__sfFileUploadOnFilesClick,delete e.__sfFileUploadBoundInput,delete e.__sfFileUploadBoundFiles,delete e.dataset[f]}function q(e=document){e.querySelectorAll(u).forEach(P)}function P(e){e.isConnected&&!e.closest("sf-file-upload")&&B(e)}function W(e){const t=e instanceof HTMLElement?e.closest(u)||e:null;return t?Array.from(t.__sfFileUploadItems||[]):[]}function K(e,t=[]){const s=e instanceof HTMLElement?e.closest(u)||e:null;if(!s)return!1;const n=Array.from(s.__sfFileUploadItems||[]);return s.__sfFileUploadItems=Array.isArray(t)?t:[],T(s,s.__sfFileUploadItems),k(s,s.__sfFileUploadItems,n),!0}function G(e){return K(e,[])}class H extends i.y{static componentName="FileUpload";constructor(e){super(e);const{size:t="1",accept:s="",multiple:n=!1,disabled:i=!1,icon:o="cloud_upload",linkText:r,text:l,supportingText:d="",label:u=""}=this.params||{},f=m(t),h=document.createElement("div");h.className="sf-file-upload-wrap flex flex-col gap-1";const b=document.createElement("div");this.id&&(b.id=this.id),b.className=`sf-file-upload sf-file-upload--size-${f} flex flex-col items-cross-center cursor-pointer`;const g=this.attrs.class||this.attrs.className;g&&b.classList.add(...String(g).split(" ").filter(Boolean)),s&&(b.dataset.accept=s),b.dataset.multiple=p(n)?"true":"false",p(n)&&b.setAttribute("multiple",""),p(i)&&b.setAttribute("disabled",""),u&&b.setAttribute("aria-label",u),b.tabIndex=0;const _=document.createElement("div");_.className=`sf-featured-icon sf-featured-icon--size-${f} sf-featured-icon--soft sf-featured-icon--circle sf-featured-icon--neutral`;const v=document.createElement("i");v.className="sf-icon",v.textContent=o,_.append(v);const y=document.createElement("div");y.className="sf-file-upload-bottom flex flex-col items-cross-center";const x=document.createElement("div");x.className="sf-file-upload-block flex";const F=document.createElement("div");F.className="sf-file-upload-block-text";const E=document.createElement("span");if(E.className="sf-file-upload-link",E.textContent=r??(0,a.pageText)(c,"linkText",b,"sf-file-upload"),F.append(E,` ${l??(0,a.pageText)(c,"text",b,"sf-file-upload")}`),x.append(F),y.append(x),d){const e=document.createElement("span");e.className="sf-file-upload-text",e.textContent=d,y.append(e)}b.append(_,y);const w=document.createElement("div");w.className="sf-file-upload-files grid grid-col-1 gap-1 w-full",h.append(b,w),this.root=b,this.template=h}init(){B(this.root)}destroyInternal(){j(this.root)}}(0,o.A)("FileUpload",H),"undefined"!=typeof window&&(window.SF=window.SF||{},window.SF.FileUpload=window.SF.FileUpload||{},window.SF.FileUpload.getItems=W,window.SF.FileUpload.setItems=K,window.SF.FileUpload.clear=G,window.SF.FileUpload.removeItem=R),"loading"===document.readyState?document.addEventListener("DOMContentLoaded",()=>q(),{once:!0}):q();new MutationObserver(e=>{e.forEach(e=>{e.addedNodes.forEach(e=>{e instanceof Element&&(e.matches?.(u)&&P(e),q(e))}),e.removedNodes.forEach(e=>{if(!(e instanceof Element)||e.isConnected)return;const t=[...e.querySelectorAll(u)];e.matches(u)&&t.push(e),t.forEach(e=>{e.isConnected||e.closest("sf-file-upload")||j(e)})})})}).observe(document.documentElement,{childList:!0,subtree:!0}),n()}catch(J){n(J)}})},"58661bec99a6"(e,t,s){const n=function(e,t){if(e&&t)if("undefined"==typeof window||"function"!=typeof window.registerSfComponent){if("undefined"!=typeof window&&window.SF?.Loader?.registerComponent)window.SF.Loader.registerComponent(e,t);else if("undefined"!=typeof window){(window.SF_PENDING_COMPONENTS=window.SF_PENDING_COMPONENTS||[]).push([e,t])}}else window.registerSfComponent(e,t)};s.d(t,["A",0,n])},d7f974466839(e,t,s){s.d(t,{y:()=>n});class n{lifecycleName(){return this.componentName??this.constructor.componentName}constructor(e){this.props=e,this.id=e?.id,this.params=e?.param,this.attrs=e?.attrs||{},this.template=null,window.dispatchEvent(new CustomEvent(`${this.lifecycleName()}:beforeRender`,{detail:this}))}getUtilityMap(){return this.constructor.utilityMap||null}extractUtilityClasses(e){if(!Array.isArray(e))return[];const t=new Set;return e.forEach(e=>{if("string"!=typeof e)return;const s=e.match(/\(([^)]+)\)/g);s&&s.forEach(e=>{e.slice(1,-1).split(/\s+/).filter(Boolean).forEach(e=>{e.startsWith(".")&&e.length>1&&t.add(e.slice(1))})})}),Array.from(t)}applyLayoutUtilities(e,t){if(!e||!t)return;const s=this.getUtilityMap();if(!s||!s[t])return;this.extractUtilityClasses(s[t]).forEach(t=>e.classList.add(t))}render(){return this.html=this.template,"function"==typeof this.init&&this.init(),this.html&&window.dispatchEvent(new CustomEvent(`${this.lifecycleName()}:render`,{detail:this})),this.html}destroy(){this.destroyInternal?.(),this.props=null,this.id=null,this.params=null,this.template=null,this.html&&(this.html.remove(),this.html=null),window.dispatchEvent(new CustomEvent(`${this.lifecycleName()}:destroy`,{detail:this}))}destroyInternal(){}}},"4a441273c368"(e,t,s){s.a(e,async(e,t)=>{try{var n=s("c43efa1014a6"),i=s("fbe0570fcc69"),o=s("a0ca4643a85f"),r=s("98e26702f55a"),a=s("0d662e4d7d63"),l=e([n,i,o,a]);[n,i,o,a]=l.then?(await l)():l;var d=s.n(i);const c={en:{linkText:"Click to upload",text:"or drag and drop",retry:"Try again"},ru:{linkText:"Выберите файл",text:"или перетащите его сюда",retry:"Повторить"}};class u extends(d()){static get props(){return{templateName:{attribute:"template",default:"default"},size:{default:"1",values:r.cS},icon:{default:"upload_file"},linkText:{default:""},text:{default:"or drag and drop"},formats:{default:""},supportingText:{default:""},accept:{default:""},multiple:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},ariaLabel:{default:""}}}constructor(){super(),this._items=[],this._boundRoot=null,this._onSelect=null,this._onRemove=null,this._onRetry=null}get componentName(){return"file-upload"}shouldClearLightDomBeforeFirstRender(){return super.shouldClearLightDomBeforeFirstRender()||"default"===this.templateName&&!!this.querySelector(':scope > .sf-file-upload[data-render-managed="1"]')}get templateName(){return this.getAttribute("template")||"default"}get size(){return(0,r.id)(this.getAttribute("size")||"1","sf-file-upload")}get icon(){return this.getAttribute("icon")||"upload_file"}get linkText(){return this.getAttribute("link-text")||(0,a.pageText)(c,"linkText",this)}get text(){return this.getAttribute("text")||(0,a.pageText)(c,"text",this)}get formats(){return this.getAttribute("formats")||(e=this.accept,String(e||"").split(",").map(e=>e.trim()).filter(Boolean).map(e=>e.replace(/^\./,"")).map(e=>e.includes("/")&&e.split("/").pop()||e).map(e=>e.toUpperCase()).join(", "))||"";var e}get supportingText(){return this.getAttribute("supporting-text")||this.formats}get accept(){return this.getAttribute("accept")||""}get multiple(){return this.getBooleanAttr("multiple",!1)}get disabled(){return this.getBooleanAttr("disabled",!1)}get ariaLabel(){return this.getAttribute("aria-label")||""}get items(){return Array.isArray(this._items)?this._items:[]}set items(e){this._items=Array.isArray(e)?e:[],this.syncRuntimeItems(),this.requestComponentUpdate("items")}templateContext(){const e=this.getPropsContext();return this.createTemplateContext({...e,linkText:this.getAttribute("link-text")||(0,a.pageText)(c,"linkText",this),text:this.getAttribute("text")||(0,a.pageText)(c,"text",this),retryText:(0,a.pageText)(c,"retry",this),component:this,formats:this.formats,supportingText:this.supportingText,items:this.items})}template(){return(0,o.y)(this.templateContext())}get state(){return{size:this.size,icon:this.icon,linkText:this.linkText,text:this.text,formats:this.formats,supportingText:this.supportingText,accept:this.accept,multiple:this.multiple,disabled:this.disabled,items:this.items}}getItems(){return this.items}onFileAdd(e,t){return"function"==typeof e&&this.addEventListener("sf-file-upload:file-add",e,t),this}onFileError(e,t){return"function"==typeof e&&this.addEventListener("sf-file-upload:file-error",e,t),this}onFileComplete(e,t){return"function"==typeof e&&this.addEventListener("sf-file-upload:file-complete",e,t),this}onFileRemove(e,t){return"function"==typeof e&&this.addEventListener("sf-file-upload:remove",e,t),this}onFileRetry(e,t){return"function"==typeof e&&this.addEventListener("sf-file-upload:retry",e,t),this}onComplete(e,t){return"function"==typeof e&&this.addEventListener("sf-file-upload:complete",e,t),this}setItems(e=[]){return this.items=e,this}clear(){return this.items=[],this}removeItem(e){const t=Array.from(this.items),s=Number(e);return!Number.isInteger(s)||s<0||s>=t.length||(t.splice(s,1),this.items=t),this}setState(e={}){if(!e||"object"!=typeof e)return this;const t={...e};return"items"in t&&(this._items=Array.isArray(t.items)?t.items:[],delete t.items),super.setState(t),this.syncRuntimeItems(),this.requestComponentUpdate("state"),this}beforeRender(){this.teardownRuntime()}afterRender(e){if("function"==typeof e)return super.afterRender(e);this._boundRoot=this.querySelector(".sf-file-upload"),this._boundRoot&&((0,n.pA)(this._boundRoot),this.syncRuntimeItems(),this._onSelect=()=>{this._items=Array.from(this._boundRoot?.__sfFileUploadItems||[]),this.requestComponentUpdate("items")},this._onRemove=()=>{this._items=Array.from(this._boundRoot?.__sfFileUploadItems||[]),this.requestComponentUpdate("items")},this._onRetry=()=>{this._items=Array.from(this._boundRoot?.__sfFileUploadItems||[]),this.requestComponentUpdate("items")},this._boundRoot.addEventListener("sf-file-upload:select",this._onSelect),this._boundRoot.addEventListener("sf-file-upload:remove",this._onRemove),this._boundRoot.addEventListener("sf-file-upload:retry",this._onRetry))}onDisconnected(){this.teardownRuntime()}syncRuntimeItems(){this._boundRoot&&(0,n.i)(this._boundRoot,this.items)}teardownRuntime(){this._boundRoot&&this._onSelect&&this._boundRoot.removeEventListener("sf-file-upload:select",this._onSelect),this._boundRoot&&this._onRemove&&this._boundRoot.removeEventListener("sf-file-upload:remove",this._onRemove),this._boundRoot&&this._onRetry&&this._boundRoot.removeEventListener("sf-file-upload:retry",this._onRetry),this._boundRoot&&((0,n.Wj)(this._boundRoot),this._boundRoot=null),this._onSelect=null,this._onRemove=null,this._onRetry=null}}u.define("sf-file-upload"),t()}catch(e){t(e)}})},a0ca4643a85f(e,t,s){s.a(e,async(e,n)=>{try{s.d(t,{y:()=>u});var i=s("ddf1cdb42ecc"),o=s("98e26702f55a"),r=e([i]),a=r.then?(await r)():r;i=a[0];function l(e){const t=String(e||"").toLowerCase();return["process","done","error"].includes(t)?t:"process"}function d(e){const t=Number(e);return Number.isFinite(t)?Math.max(0,Math.min(100,t)):0}function c(e,t,s,n){const o=l(e.state||e.status),r=d(e.progress??("done"===o?100:0)),a=e.icon||"cloud_upload",c=e.name||e.fileName||"File",u=e.fileSize||e.sizeText||"",f=e.errorMessage||e.retryText||n;return i.html`
1
+ (()=>{"use strict";var e={"98e26702f55a"(e,t,s){function n(){const e=globalThis.SF=globalThis.SF||{};return e.__deprecationNotes instanceof Map||Object.defineProperty(e,"__deprecationNotes",{value:new Map,configurable:!0}),e.__deprecationNotes}function i({component:e="",kind:t="attribute",attribute:s="",from:i,to:o=null}={}){if(!i)return;const r=[e,t,s,i].join("|"),a=n(),l=a.get(r);if(l)l.count+=1;else if(a.set(r,{component:e,kind:t,attribute:s,from:i,to:o,count:1}),function(){const e=globalThis.document?.documentElement;return"warn"===e?.dataset?.sfDeprecations||!0===globalThis.SF?.deprecations?.warn}()){const n=e?`${e}: `:"",r="value"===t?`${s}="${i}"`:`${t} ${i}`;globalThis.console?.warn?.(`[SIMAI Framework] ${n}${r} is a legacy name${o?`; write ${o}`:""}. See contracts/changes/journal.json.`)}}if(s.d(t,{cS:()=>o,id:()=>l,vl:()=>d}),"undefined"!=typeof globalThis){globalThis.SF=globalThis.SF||{};const e=globalThis.SF.deprecations||{};e.list=function(){return[...n().values()].map(e=>({...e}))},e.clear=function(){n().clear()},e.note=i,globalThis.SF.deprecations=e}const o=Object.freeze(["1/2","1","2"]),r=Object.freeze({"1/3":"1/2",3:"2"}),a=new Set;function l(e,t="field",s="1"){const n=String(e??"").trim().toLowerCase();if(o.includes(n))return n;if(Object.hasOwn(r,n)){const e=r[n];i({component:t,kind:"value",attribute:"size",from:n,to:e});const s=`${t}:${n}`;return a.has(s)||"undefined"==typeof console||(a.add(s),console.warn(`[SIMAI Framework] ${t}: size ${n} is retired for form fields; rendering size ${e}.`)),e}return s}function d(e,t){if(e?.classList)for(const[s,n]of Object.entries(r)){const n=`${t}--size-${s}`;e.classList.contains(n)&&e.classList.replace(n,`${t}--size-${l(s,t)}`)}}},c43efa1014a6(e,t,s){s.a(e,async(e,n)=>{try{s.d(t,{Wj:()=>j,i:()=>K,pA:()=>B});var i=s("d7f974466839"),o=s("58661bec99a6"),r=s("98e26702f55a"),a=s("0d662e4d7d63"),l=e([a]),d=l.then?(await l)():l;a=d[0];const c={en:{remove:"Remove",uploading:"Uploading",retry:"Try again",linkText:"Click to upload",text:"or drag and drop"},ru:{remove:"Удалить",uploading:"Загрузка",retry:"Повторить",linkText:"Выберите файл",text:"или перетащите его сюда"}},u=".sf-file-upload",f="sfFileUploadBound";function p(e,t=!1){return null==e||""===e?t:"boolean"==typeof e?e:["1","true","yes","on","disabled","multiple"].includes(String(e).toLowerCase())}function m(e){return(0,r.id)(e,"sf-file-upload")}function h(e){const t=Number(e);if(!Number.isFinite(t)||t<0)return"";if(t<1024)return`${t} B`;const s=["KB","MB","GB","TB"];let n=t/1024,i=0;for(;n>=1024&&i<s.length-1;)n/=1024,i+=1;return`${n>=10?n.toFixed(0):n.toFixed(1)}${s[i]}`}function b(e){const t=String(e?.state||e?.status||"process").toLowerCase();return["process","done","error"].includes(t)?t:"process"}function g(e,t){return e?.id?String(e.id):e?.file&&e.file.name?`${e.file.name}-${e.file.size}-${e.file.lastModified}`:e?.name||e?.fileName?`${e.name||e.fileName}-${t}`:`item-${t}`}function _(e){return!!e&&(e.classList.contains("disabled")||e.hasAttribute("disabled"))}function v(e){return e?.querySelector?.('input[type="file"].sf-file-upload-input')||null}function y(e){if(!e)return null;const t=e.dataset.target||e.getAttribute("data-target")||"";if(t)try{const e=document.querySelector(t);if(e)return e}catch{}const s=e.nextElementSibling;return s?.classList?.contains("sf-file-upload-files")?s:e.querySelector(".sf-file-upload-files")||null}function x(e){return!!e&&("1"===e.dataset.renderManaged||e.hasAttribute("data-render-managed"))}function F(e){return e.hasAttribute("multiple")||p(e.dataset.multiple??e.getAttribute("multiple"),!1)}function E(e){return e.dataset.accept||e.getAttribute("accept")||""}function w(e){let t=v(e);return t||(t=document.createElement("input"),t.type="file",t.classList.add("sf-file-upload-input"),t.hidden=!0,t.tabIndex=-1,t.setAttribute("aria-hidden","true"),e.append(t),t)}function S(e,t){if(!e||!t)return;t.multiple=F(e);const s=E(e);s?t.setAttribute("accept",s):t.removeAttribute("accept"),t.disabled=_(e)}function A(e){const t=e.__sfFileUploadInteractionState||={tabIndex:e.getAttribute("tabindex")??"0",disabled:!1,buttons:new WeakMap},s=_(e);t.disabled||(t.tabIndex=e.getAttribute("tabindex")??"0");const n=s?"-1":t.tabIndex;e.getAttribute("tabindex")!==n&&e.setAttribute("tabindex",n),e.getAttribute("aria-disabled")!==String(s)&&e.setAttribute("aria-disabled",String(s)),t.disabled=s,S(e,v(e)),s&&e.classList.contains("dragover")&&e.classList.remove("dragover");const i=y(e);i?.querySelectorAll('button[data-action="remove"], button[data-action="retry"]').forEach(n=>{let i=t.buttons.get(n);i||(i={disabled:n.disabled,managedDisabled:!1,label:null},t.buttons.set(n,i)),i.managedDisabled||(i.disabled=n.disabled);const o=s||i.disabled;if(n.disabled!==o&&(n.disabled=o),i.managedDisabled=s,"remove"!==n.dataset.action)return;const r=n.getAttribute("aria-label");if(!(n.hasAttribute("aria-labelledby")||r&&r!==i.label)){const t=n.closest(".sf-upload-progress")?.querySelector(".sf-upload-progress-name")?.textContent?.trim()||"",s=`${(0,a.pageText)(c,"remove",e,"sf-file-upload")} ${t}`.trim();r!==s&&n.setAttribute("aria-label",s),i.label=s}n.querySelectorAll(".sf-icon").forEach(e=>{"true"!==e.getAttribute("aria-hidden")&&e.setAttribute("aria-hidden","true")})}),i?.querySelectorAll(".sf-upload-progress").forEach(t=>{const s=t.querySelector(".sf-upload-progress-name")?.textContent?.trim()||"",n=`${(0,a.pageText)(c,"uploading",e,"sf-file-upload")} ${s}`.trim(),i=t.querySelector("sf-progress-bar");if(i){const e=i.dataset.sfUploadLabel;return void(i.hasAttribute("label")&&i.getAttribute("label")!==e||(i.getAttribute("label")!==n&&i.setAttribute("label",n),i.dataset.sfUploadLabel=n))}const o=t.querySelector(".sf-progress-bar");if(!o||o.hasAttribute("aria-labelledby"))return;const r=o.getAttribute("aria-label");r&&r!==o.dataset.sfUploadLabel||(r!==n&&o.setAttribute("aria-label",n),o.dataset.label=n,o.dataset.sfUploadLabel=n)})}function U(e,t="1",s=null){const n=m(t),i=String(e.state||e.status||"done").toLowerCase(),o=String(e.name||e.fileName||"File"),r=String(e.fileSize||e.sizeText||""),l=Math.max(0,Math.min(100,Number(e.progress??100)||0)),d=String(e.icon||"cloud_upload"),u=String(e.errorMessage||e.retryText||(0,a.pageText)(c,"retry",s,"sf-file-upload")),f=document.createElement("div");f.className=["sf-upload-progress",`sf-upload-progress--size-${n}`,`sf-upload-progress--${i}`,"flex","items-main-start","items-cross-start"].join(" ");const p=document.createElement("i");p.classList.add("sf-icon"),p.textContent=d;const h=document.createElement("div");h.className="sf-upload-progress-content flex flex-col flex-1";const b=document.createElement("div");b.className="sf-upload-progress-top flex content-main-between";const g=document.createElement("div");g.className="sf-upload-progress-left flex flex-col";const _=document.createElement("div");_.className="sf-upload-progress-name",_.textContent=o;const v=document.createElement("div");if(v.className="sf-upload-progress-text",v.textContent=r,g.append(_,v),b.append(g),"done"===i){const e=document.createElement("i");e.className="sf-icon sf-icon-solid",e.textContent="check_circle",b.append(e)}else{if("error"===i){const e=document.createElement("button");e.type="button",e.className=`sf-icon-button sf-icon-button--icon sf-icon-button--on-surface sf-icon-button--link sf-icon-button--size-${n} flex items-cross-center content-main-center self-cross-start`,e.dataset.action="remove";const t=document.createElement("i");t.className="sf-icon",t.textContent="delete",e.append(t),b.append(e);const s=document.createElement("button");return s.type="button",s.className="sf-upload-progress-repeat self-cross-start",s.dataset.action="retry",s.textContent=u,h.append(b,s),f.append(p,h),f}{const e=document.createElement("button");e.type="button",e.className=`sf-icon-button sf-icon-button--icon sf-icon-button--on-surface sf-icon-button--link sf-icon-button--size-${n} flex items-cross-center content-main-center self-cross-start`,e.dataset.action="remove";const t=document.createElement("i");t.className="sf-icon",t.textContent="delete",e.append(t),b.append(e)}}const y=document.createElement("div");y.className=`sf-progress-bar sf-progress-bar--size-${n} flex flex-row items-cross-center`,y.dataset.value=String(l),y.dataset.textPosition="inline-end";const x=document.createElement("div");x.className="sf-progress-bar-main";const F=document.createElement("div");F.className="sf-progress-bar-progress transition",F.style.width=`${l}%`;const E=document.createElement("div");return E.className="sf-progress-bar-text",E.textContent=`${l}%`,x.append(F),y.append(x,E),h.append(b,y),f.append(p,h),f}function T(e,t=[]){e?.classList?.toggle?.("has-files",t.length>0);const s=y(e);if(!s||x(e))return void(e&&A(e));s.innerHTML="";const n=m(Array.from(e.classList).find(e=>e.startsWith("sf-file-upload--size-"))?.replace("sf-file-upload--size-","")||"1");t.forEach((t,i)=>{const o=U(t,n,e);o.dataset.index=String(i),s.append(o)}),A(e)}function L(e,t,s,n,i="input"){e.dispatchEvent(new CustomEvent("sf-file-upload:file-add",{bubbles:!0,detail:{item:t,index:s,items:n,source:i,multiple:F(e)}}))}function $(e,t,s,n){e.dispatchEvent(new CustomEvent("sf-file-upload:file-error",{bubbles:!0,detail:{item:t,index:s,items:n}}))}function C(e,t,s,n){e.dispatchEvent(new CustomEvent("sf-file-upload:file-complete",{bubbles:!0,detail:{item:t,index:s,items:n}}))}function N(e,t){e.dispatchEvent(new CustomEvent("sf-file-upload:complete",{bubbles:!0,detail:{items:t}}))}function k(e,t=[],s=[]){const n=new Map(s.map((e,t)=>[g(e,t),b(e)]));t.forEach((s,i)=>{const o=g(s,i),r=b(s),a=n.get(o);"error"===r&&"error"!==a&&$(e,s,i,t),"done"===r&&"done"!==a&&C(e,s,i,t)});const i=t.length>0&&t.every(e=>"done"===b(e)),o=s.length>0&&s.every(e=>"done"===b(e));i&&!o&&N(e,t)}function O(e=[]){return Array.from(e).map(e=>({id:`${e.name}-${e.size}-${e.lastModified}`,name:e.name,fileSize:h(e.size),progress:0,state:"process",file:e}))}function I(e,t){if(!e)return!1;const s=Array.from(e.__sfFileUploadItems||[]);if(!s.length)return!1;const n=Number(t);if(!Number.isInteger(n)||n<0||n>=s.length)return!1;const[i]=s.splice(n,1);return e.__sfFileUploadItems=s,T(e,s),e.dispatchEvent(new CustomEvent("sf-file-upload:remove",{bubbles:!0,detail:{item:i||null,index:n,items:s}})),!0}function R(e,t){if(!e)return!1;const s=Array.from(e.__sfFileUploadItems||[]);if(!s.length)return!1;const n=Number(t);if(!Number.isInteger(n)||n<0||n>=s.length)return!1;const i=s.map(e=>({...e})),o=i[n];o.state="process",o.progress=0,delete o.errorMessage,delete o.retryText;const r=Array.from(e.__sfFileUploadItems||[]);return e.__sfFileUploadItems=i,T(e,i),k(e,i,r),e.dispatchEvent(new CustomEvent("sf-file-upload:retry",{bubbles:!0,detail:{item:o,index:n,items:i}})),!0}function M(e,t){const s=String(e||"").split(",").map(e=>e.trim().toLowerCase()).filter(Boolean);if(!s.length)return!0;const n=String(t?.name||"").toLowerCase(),i=String(t?.type||"").toLowerCase();return s.some(e=>e.startsWith(".")?n.endsWith(e):e.endsWith("/*")?i.startsWith(e.slice(0,-1)):i===e)}function z(e,t,s="input"){e.dispatchEvent(new CustomEvent("sf-file-upload:select",{bubbles:!0,detail:{files:t,source:s,multiple:F(e)}}))}function D(e,t=[],s="input"){const n=O(t),i=Array.from(e.__sfFileUploadItems||[]);e.__sfFileUploadItems=n,T(e,n),k(e,n,i),n.forEach((t,i)=>{L(e,t,i,n,s)}),z(e,n,s)}function B(e){if((0,r.vl)(e,"sf-file-upload"),!e)return;const t=w(e),s=y(e);if("function"==typeof e.__sfFileUploadOnClick){if(e.__sfFileUploadBoundInput===t&&e.__sfFileUploadBoundFiles===s)return;j(e)}else"1"!==e.dataset[f]||e.__sfFileUploadItems||x(e)||(e.__sfFileUploadItems=[],e.classList.contains("has-files")&&!e.hasAttribute("data-target")&&T(e,[]),e.classList.remove("has-files","dragover"));A(e),e.hasAttribute("role")||e.setAttribute("role","button");const n=()=>{_(e)||(S(e,t),t.click())},i=t=>{if(_(e))return void t.preventDefault();const s=t.target;s instanceof Element&&(s.closest(".sf-upload-progress-repeat")||s.closest('input[type="file"]')||s.closest('[data-action="remove"]')||n())},o=t=>{t.target!==e||t.repeat||e.matches("button, input, a[href]")||_(e)||"Enter"!==t.key&&" "!==t.key||(t.preventDefault(),n())},a=t=>{if(_(e))return;const s=Array.from(t.target?.files||[]);s.length&&(D(e,s,"input"),t.target.value="")},l=t=>{Array.from(t.dataTransfer?.types||[]).includes("Files")&&(t.preventDefault(),_(e)?t.dataTransfer.dropEffect="none":(t.dataTransfer.dropEffect="copy",e.classList.add("dragover")))},d=t=>{e.contains(t.relatedTarget)||e.classList.remove("dragover")},c=t=>{e.classList.remove("dragover");const s=Array.from(t.dataTransfer?.files||[]);if(!s.length&&!Array.from(t.dataTransfer?.types||[]).includes("Files"))return;if(t.preventDefault(),_(e)||!s.length)return;const n=s.filter(t=>M(E(e),t)),i=s.filter(e=>!n.includes(e));if(i.length&&e.dispatchEvent(new CustomEvent("sf-file-upload:reject",{bubbles:!0,detail:{files:i,accept:E(e),source:"drop"}})),!n.length)return;const o=F(e)?n:n.slice(0,1);D(e,o,"drop"),e.dispatchEvent(new CustomEvent("change",{bubbles:!0,detail:{files:o,source:"drop"}}))},u=t=>{const s=t.target;if(!(s instanceof Element))return;const n=s.closest('[data-action="remove"]'),i=s.closest('[data-action="retry"]');if(!n&&!i)return;if(_(e)||(n||i).disabled)return t.preventDefault(),void t.stopPropagation();const o=(n||i).closest(".sf-upload-progress");o&&(t.preventDefault(),t.stopPropagation(),n?I(e,o.dataset.index):R(e,o.dataset.index))};e.addEventListener("click",i),e.addEventListener("keydown",o),e.addEventListener("dragover",l),e.addEventListener("dragleave",d),e.addEventListener("drop",c),t.addEventListener("change",a),s?.addEventListener("click",u),e.__sfFileUploadOnClick=i,e.__sfFileUploadOnKeydown=o,e.__sfFileUploadOnDragOver=l,e.__sfFileUploadOnDragLeave=d,e.__sfFileUploadOnDrop=c,e.__sfFileUploadOnChange=a,e.__sfFileUploadOnFilesClick=u,e.__sfFileUploadBoundInput=t,e.__sfFileUploadBoundFiles=s;const p=new MutationObserver(()=>A(e));p.observe(e,{attributes:!0,attributeFilter:["disabled","class","accept","multiple","data-accept","data-multiple"]}),s&&p.observe(s,{childList:!0,subtree:!0,characterData:!0}),e.__sfFileUploadInteractionObserver=p,e.dataset[f]="1"}function j(e){if(!e)return;const t=e.__sfFileUploadBoundInput||v(e);e.__sfFileUploadInteractionObserver?.disconnect(),delete e.__sfFileUploadInteractionObserver,e.__sfFileUploadOnClick&&e.removeEventListener("click",e.__sfFileUploadOnClick),e.__sfFileUploadOnKeydown&&e.removeEventListener("keydown",e.__sfFileUploadOnKeydown),e.__sfFileUploadOnDragOver&&e.removeEventListener("dragover",e.__sfFileUploadOnDragOver),e.__sfFileUploadOnDragLeave&&e.removeEventListener("dragleave",e.__sfFileUploadOnDragLeave),e.__sfFileUploadOnDrop&&e.removeEventListener("drop",e.__sfFileUploadOnDrop),t&&e.__sfFileUploadOnChange&&t.removeEventListener("change",e.__sfFileUploadOnChange);const s=e.__sfFileUploadBoundFiles||y(e);s&&e.__sfFileUploadOnFilesClick&&s.removeEventListener("click",e.__sfFileUploadOnFilesClick),delete e.__sfFileUploadOnClick,delete e.__sfFileUploadOnKeydown,delete e.__sfFileUploadOnDragOver,delete e.__sfFileUploadOnDragLeave,delete e.__sfFileUploadOnDrop,delete e.__sfFileUploadOnChange,delete e.__sfFileUploadOnFilesClick,delete e.__sfFileUploadBoundInput,delete e.__sfFileUploadBoundFiles,delete e.dataset[f]}function q(e=document){e.querySelectorAll(u).forEach(P)}function P(e){e.isConnected&&!e.closest("sf-file-upload")&&B(e)}function W(e){const t=e instanceof HTMLElement?e.closest(u)||e:null;return t?Array.from(t.__sfFileUploadItems||[]):[]}function K(e,t=[]){const s=e instanceof HTMLElement?e.closest(u)||e:null;if(!s)return!1;const n=Array.from(s.__sfFileUploadItems||[]);return s.__sfFileUploadItems=Array.isArray(t)?t:[],T(s,s.__sfFileUploadItems),k(s,s.__sfFileUploadItems,n),!0}function G(e){return K(e,[])}class H extends i.y{static componentName="FileUpload";constructor(e){super(e);const{size:t="1",accept:s="",multiple:n=!1,disabled:i=!1,icon:o="cloud_upload",linkText:r,text:l,supportingText:d="",label:u=""}=this.params||{},f=m(t),h=document.createElement("div");h.className="sf-file-upload-wrap flex flex-col gap-1";const b=document.createElement("div");this.id&&(b.id=this.id),b.className=`sf-file-upload sf-file-upload--size-${f} flex flex-col items-cross-center cursor-pointer`;const g=this.attrs.class||this.attrs.className;g&&b.classList.add(...String(g).split(" ").filter(Boolean)),s&&(b.dataset.accept=s),b.dataset.multiple=p(n)?"true":"false",p(n)&&b.setAttribute("multiple",""),p(i)&&b.setAttribute("disabled",""),u&&b.setAttribute("aria-label",u),b.tabIndex=0;const _=document.createElement("div");_.className=`sf-featured-icon sf-featured-icon--size-${f} sf-featured-icon--soft sf-featured-icon--circle sf-featured-icon--neutral`;const v=document.createElement("i");v.className="sf-icon",v.textContent=o,_.append(v);const y=document.createElement("div");y.className="sf-file-upload-bottom flex flex-col items-cross-center";const x=document.createElement("div");x.className="sf-file-upload-block flex";const F=document.createElement("div");F.className="sf-file-upload-block-text";const E=document.createElement("span");if(E.className="sf-file-upload-link",E.textContent=r??(0,a.pageText)(c,"linkText",b,"sf-file-upload"),F.append(E,` ${l??(0,a.pageText)(c,"text",b,"sf-file-upload")}`),x.append(F),y.append(x),d){const e=document.createElement("span");e.className="sf-file-upload-text",e.textContent=d,y.append(e)}b.append(_,y);const w=document.createElement("div");w.className="sf-file-upload-files grid grid-col-1 gap-1 w-full",h.append(b,w),this.root=b,this.template=h}init(){B(this.root)}destroyInternal(){j(this.root)}}(0,o.A)("FileUpload",H),"undefined"!=typeof window&&(window.SF=window.SF||{},window.SF.FileUpload=window.SF.FileUpload||{},window.SF.FileUpload.getItems=W,window.SF.FileUpload.setItems=K,window.SF.FileUpload.clear=G,window.SF.FileUpload.removeItem=I),"loading"===document.readyState?document.addEventListener("DOMContentLoaded",()=>q(),{once:!0}):q();new MutationObserver(e=>{e.forEach(e=>{e.addedNodes.forEach(e=>{e instanceof Element&&(e.matches?.(u)&&P(e),q(e))}),e.removedNodes.forEach(e=>{if(!(e instanceof Element)||e.isConnected)return;const t=[...e.querySelectorAll(u)];e.matches(u)&&t.push(e),t.forEach(e=>{e.isConnected||e.closest("sf-file-upload")||j(e)})})})}).observe(document.documentElement,{childList:!0,subtree:!0}),n()}catch(J){n(J)}})},"58661bec99a6"(e,t,s){const n=function(e,t){if(e&&t)if("undefined"==typeof window||"function"!=typeof window.registerSfComponent){if("undefined"!=typeof window&&window.SF?.Loader?.registerComponent)window.SF.Loader.registerComponent(e,t);else if("undefined"!=typeof window){(window.SF_PENDING_COMPONENTS=window.SF_PENDING_COMPONENTS||[]).push([e,t])}}else window.registerSfComponent(e,t)};s.d(t,["A",0,n])},d7f974466839(e,t,s){s.d(t,{y:()=>n});class n{lifecycleName(){return this.componentName??this.constructor.componentName}constructor(e){this.props=e,this.id=e?.id,this.params=e?.param,this.attrs=e?.attrs||{},this.template=null,window.dispatchEvent(new CustomEvent(`${this.lifecycleName()}:beforeRender`,{detail:this}))}getUtilityMap(){return this.constructor.utilityMap||null}extractUtilityClasses(e){if(!Array.isArray(e))return[];const t=new Set;return e.forEach(e=>{if("string"!=typeof e)return;const s=e.match(/\(([^)]+)\)/g);s&&s.forEach(e=>{e.slice(1,-1).split(/\s+/).filter(Boolean).forEach(e=>{e.startsWith(".")&&e.length>1&&t.add(e.slice(1))})})}),Array.from(t)}applyLayoutUtilities(e,t){if(!e||!t)return;const s=this.getUtilityMap();if(!s||!s[t])return;this.extractUtilityClasses(s[t]).forEach(t=>e.classList.add(t))}render(){return this.html=this.template,"function"==typeof this.init&&this.init(),this.html&&window.dispatchEvent(new CustomEvent(`${this.lifecycleName()}:render`,{detail:this})),this.html}destroy(){this.destroyInternal?.(),this.props=null,this.id=null,this.params=null,this.template=null,this.html&&(this.html.remove(),this.html=null),window.dispatchEvent(new CustomEvent(`${this.lifecycleName()}:destroy`,{detail:this}))}destroyInternal(){}}},"4a441273c368"(e,t,s){s.a(e,async(e,t)=>{try{var n=s("c43efa1014a6"),i=s("fbe0570fcc69"),o=s("a0ca4643a85f"),r=s("98e26702f55a"),a=s("0d662e4d7d63"),l=e([n,i,o,a]);[n,i,o,a]=l.then?(await l)():l;var d=s.n(i);const c={en:{linkText:"Click to upload",text:"or drag and drop",retry:"Try again"},ru:{linkText:"Выберите файл",text:"или перетащите его сюда",retry:"Повторить"}};class u extends(d()){static get props(){return{templateName:{attribute:"template",default:"default"},size:{default:"1",values:r.cS},icon:{default:"upload_file"},linkText:{default:""},text:{default:"or drag and drop"},formats:{default:""},supportingText:{default:""},accept:{default:""},multiple:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},ariaLabel:{default:""}}}constructor(){super(),this._items=[],this._boundRoot=null,this._onSelect=null,this._onRemove=null,this._onRetry=null}get componentName(){return"file-upload"}shouldClearLightDomBeforeFirstRender(){return super.shouldClearLightDomBeforeFirstRender()||"default"===this.templateName&&!!this.querySelector(':scope > .sf-file-upload[data-render-managed="1"]')}get templateName(){return this.getAttribute("template")||"default"}get size(){return(0,r.id)(this.getAttribute("size")||"1","sf-file-upload")}get icon(){return this.getAttribute("icon")||"upload_file"}get linkText(){return this.getAttribute("link-text")||(0,a.pageText)(c,"linkText",this)}get text(){return this.getAttribute("text")||(0,a.pageText)(c,"text",this)}get formats(){return this.getAttribute("formats")||(e=this.accept,String(e||"").split(",").map(e=>e.trim()).filter(Boolean).map(e=>e.replace(/^\./,"")).map(e=>e.includes("/")&&e.split("/").pop()||e).map(e=>e.toUpperCase()).join(", "))||"";var e}get supportingText(){return this.getAttribute("supporting-text")||this.formats}get accept(){return this.getAttribute("accept")||""}get multiple(){return this.getBooleanAttr("multiple",!1)}get disabled(){return this.getBooleanAttr("disabled",!1)}get ariaLabel(){return this.getAttribute("aria-label")||""}get items(){return Array.isArray(this._items)?this._items:[]}set items(e){this._items=Array.isArray(e)?e:[],this.syncRuntimeItems(),this.requestComponentUpdate("items")}templateContext(){const e=this.getPropsContext();return this.createTemplateContext({...e,linkText:this.getAttribute("link-text")||(0,a.pageText)(c,"linkText",this),text:this.getAttribute("text")||(0,a.pageText)(c,"text",this),retryText:(0,a.pageText)(c,"retry",this),component:this,formats:this.formats,supportingText:this.supportingText,items:this.items})}template(){return(0,o.y)(this.templateContext())}get state(){return{size:this.size,icon:this.icon,linkText:this.linkText,text:this.text,formats:this.formats,supportingText:this.supportingText,accept:this.accept,multiple:this.multiple,disabled:this.disabled,items:this.items}}getItems(){return this.items}onFileAdd(e,t){return"function"==typeof e&&this.addEventListener("sf-file-upload:file-add",e,t),this}onFileError(e,t){return"function"==typeof e&&this.addEventListener("sf-file-upload:file-error",e,t),this}onFileComplete(e,t){return"function"==typeof e&&this.addEventListener("sf-file-upload:file-complete",e,t),this}onFileRemove(e,t){return"function"==typeof e&&this.addEventListener("sf-file-upload:remove",e,t),this}onFileRetry(e,t){return"function"==typeof e&&this.addEventListener("sf-file-upload:retry",e,t),this}onComplete(e,t){return"function"==typeof e&&this.addEventListener("sf-file-upload:complete",e,t),this}setItems(e=[]){return this.items=e,this}clear(){return this.items=[],this}removeItem(e){const t=Array.from(this.items),s=Number(e);return!Number.isInteger(s)||s<0||s>=t.length||(t.splice(s,1),this.items=t),this}setState(e={}){if(!e||"object"!=typeof e)return this;const t={...e};return"items"in t&&(this._items=Array.isArray(t.items)?t.items:[],delete t.items),super.setState(t),this.syncRuntimeItems(),this.requestComponentUpdate("state"),this}beforeRender(){this.teardownRuntime()}afterRender(e){if("function"==typeof e)return super.afterRender(e);this._boundRoot=this.querySelector(".sf-file-upload"),this._boundRoot&&((0,n.pA)(this._boundRoot),this.syncRuntimeItems(),this._onSelect=()=>{this._items=Array.from(this._boundRoot?.__sfFileUploadItems||[]),this.requestComponentUpdate("items")},this._onRemove=()=>{this._items=Array.from(this._boundRoot?.__sfFileUploadItems||[]),this.requestComponentUpdate("items")},this._onRetry=()=>{this._items=Array.from(this._boundRoot?.__sfFileUploadItems||[]),this.requestComponentUpdate("items")},this._boundRoot.addEventListener("sf-file-upload:select",this._onSelect),this._boundRoot.addEventListener("sf-file-upload:remove",this._onRemove),this._boundRoot.addEventListener("sf-file-upload:retry",this._onRetry))}onDisconnected(){this.teardownRuntime()}syncRuntimeItems(){this._boundRoot&&(0,n.i)(this._boundRoot,this.items)}teardownRuntime(){this._boundRoot&&this._onSelect&&this._boundRoot.removeEventListener("sf-file-upload:select",this._onSelect),this._boundRoot&&this._onRemove&&this._boundRoot.removeEventListener("sf-file-upload:remove",this._onRemove),this._boundRoot&&this._onRetry&&this._boundRoot.removeEventListener("sf-file-upload:retry",this._onRetry),this._boundRoot&&((0,n.Wj)(this._boundRoot),this._boundRoot=null),this._onSelect=null,this._onRemove=null,this._onRetry=null}}u.define("sf-file-upload"),t()}catch(e){t(e)}})},a0ca4643a85f(e,t,s){s.a(e,async(e,n)=>{try{s.d(t,{y:()=>u});var i=s("ddf1cdb42ecc"),o=s("98e26702f55a"),r=e([i]),a=r.then?(await r)():r;i=a[0];function l(e){const t=String(e||"").toLowerCase();return["process","done","error"].includes(t)?t:"process"}function d(e){const t=Number(e);return Number.isFinite(t)?Math.max(0,Math.min(100,t)):0}function c(e,t,s,n){const o=l(e.state||e.status),r=d(e.progress??("done"===o?100:0)),a=e.icon||"cloud_upload",c=e.name||e.fileName||"File",u=e.fileSize||e.sizeText||"",f=e.errorMessage||e.retryText||n;return i.html`
2
2
  <div
3
3
  class="sf-upload-progress sf-upload-progress--size-${t} sf-upload-progress--${o} flex items-main-start items-cross-start"
4
4
  data-index=${String(s)}
@@ -1,4 +1,4 @@
1
- (()=>{"use strict";var t={e138a730fd7c(t,e,n){n.d(e,{U:()=>i,h:()=>s});let a=0;const r=new WeakMap;function s(t,{prefix:e="sf-field",required:n=!1,invalid:s=!1,hint:i="",errorMessage:o=""}={}){const l=function(t,e){if(t&&r.has(t))return r.get(t);const n=(t?.id?String(t.id).trim():"")||`${e}-${++a}`,s={controlId:`${n}-control`,messageId:`${n}-message`};return!t||"object"!=typeof t&&"function"!=typeof t||r.set(t,s),s}(t,e),u=Boolean(s),d=u&&o?o:i;return{...l,required:Boolean(n),invalid:u,message:d,describedBy:d?l.messageId:"",errorMessageId:u&&o?l.messageId:""}}function i(t,e,{prefix:n="sf-field",required:a=!1,invalid:r=!1,messageNode:i=null,labelNode:o=null,errorMessage:l=""}={}){if(!t||!e)return null;const u=s(t,{prefix:n,required:a,invalid:r,hint:i?.textContent?.trim()||"",errorMessage:l});var d,c;return e.id||(e.id=u.controlId),"LABEL"!==t.tagName||t.hasAttribute("for")||t.setAttribute("for",e.id),!o?.textContent?.trim()||e.hasAttribute("aria-label")||e.hasAttribute("aria-labelledby")||(o.id||(o.id=`${e.id}-label`),e.setAttribute("aria-labelledby",o.id)),e.required=u.required,t.classList.toggle("error",u.invalid),e.classList.toggle("error",u.invalid),u.invalid?e.setAttribute("aria-invalid","true"):e.removeAttribute("aria-invalid"),i&&(i.id||(i.id=u.messageId),e.setAttribute("aria-describedby",(d=e.getAttribute("aria-describedby"),c=[i.id],[...new Set([...String(d||"").split(/\s+/).filter(Boolean),...c.filter(Boolean)])].join(" ")))),u.errorMessageId&&i?e.setAttribute("aria-errormessage",i.id):e.removeAttribute("aria-errormessage"),u}},"98e26702f55a"(t,e,n){function a(){const t=globalThis.SF=globalThis.SF||{};return t.__deprecationNotes instanceof Map||Object.defineProperty(t,"__deprecationNotes",{value:new Map,configurable:!0}),t.__deprecationNotes}function r({component:t="",kind:e="attribute",attribute:n="",from:r,to:s=null}={}){if(!r)return;const i=[t,e,n,r].join("|"),o=a(),l=o.get(i);if(l)l.count+=1;else if(o.set(i,{component:t,kind:e,attribute:n,from:r,to:s,count:1}),function(){const t=globalThis.document?.documentElement;return"warn"===t?.dataset?.sfDeprecations||!0===globalThis.SF?.deprecations?.warn}()){const a=t?`${t}: `:"",i="value"===e?`${n}="${r}"`:`${e} ${r}`;globalThis.console?.warn?.(`[Simai Framework] ${a}${i} is a legacy name${s?`; write ${s}`:""}. See contracts/changes/journal.json.`)}}if(n.d(e,{id:()=>l,vl:()=>u}),"undefined"!=typeof globalThis){globalThis.SF=globalThis.SF||{};const t=globalThis.SF.deprecations||{};t.list=function(){return[...a().values()].map(t=>({...t}))},t.clear=function(){a().clear()},t.note=r,globalThis.SF.deprecations=t}const s=Object.freeze(["1/2","1","2"]),i=Object.freeze({"1/3":"1/2",3:"2"}),o=new Set;function l(t,e="field",n="1"){const a=String(t??"").trim().toLowerCase();if(s.includes(a))return a;if(Object.hasOwn(i,a)){const t=i[a];r({component:e,kind:"value",attribute:"size",from:a,to:t});const n=`${e}:${a}`;return o.has(n)||"undefined"==typeof console||(o.add(n),console.warn(`[Simai Framework] ${e}: size ${a} is retired for form fields; rendering size ${t}.`)),t}return n}function u(t,e){if(t?.classList)for(const[n,a]of Object.entries(i)){const a=`${e}--size-${n}`;t.classList.contains(a)&&t.classList.replace(a,`${e}--size-${l(n,e)}`)}}},f8ed4bd5aa8a(t,e,n){n.d(e,{m3:()=>k,Lu:()=>_});class a{lifecycleName(){return this.componentName??this.constructor.componentName}constructor(t){this.props=t,this.id=t?.id,this.params=t?.param,this.attrs=t?.attrs||{},this.template=null,window.dispatchEvent(new CustomEvent(`${this.lifecycleName()}:beforeRender`,{detail:this}))}getUtilityMap(){return this.constructor.utilityMap||null}extractUtilityClasses(t){if(!Array.isArray(t))return[];const e=new Set;return t.forEach(t=>{if("string"!=typeof t)return;const n=t.match(/\(([^)]+)\)/g);n&&n.forEach(t=>{t.slice(1,-1).split(/\s+/).filter(Boolean).forEach(t=>{t.startsWith(".")&&t.length>1&&e.add(t.slice(1))})})}),Array.from(e)}applyLayoutUtilities(t,e){if(!t||!e)return;const n=this.getUtilityMap();if(!n||!n[e])return;this.extractUtilityClasses(n[e]).forEach(e=>t.classList.add(e))}render(){return this.html=this.template,"function"==typeof this.init&&this.init(),this.html&&window.dispatchEvent(new CustomEvent(`${this.lifecycleName()}:render`,{detail:this})),this.html}destroy(){this.destroyInternal?.(),this.props=null,this.id=null,this.params=null,this.template=null,this.html&&(this.html.remove(),this.html=null),window.dispatchEvent(new CustomEvent(`${this.lifecycleName()}:destroy`,{detail:this}))}destroyInternal(){}}const r=function(t,e){if(t&&e)if("undefined"==typeof window||"function"!=typeof window.registerSfComponent){if("undefined"!=typeof window&&window.SF?.Loader?.registerComponent)window.SF.Loader.registerComponent(t,e);else if("undefined"!=typeof window){(window.SF_PENDING_COMPONENTS=window.SF_PENDING_COMPONENTS||[]).push([t,e])}}else window.registerSfComponent(t,e)},s=JSON.parse('{".sf-input":["display/flex (.flex)","flex-direction/column (.flex-col)","flex-wrap/nowrap (.flex-nowrap)","gap/var(--sf-space-1\\\\/4)","justify-content/flex-start (.justify-start)"],".sf-input .sf-input-field":["display/flex (.flex)","flex-direction/row (.flex-row)","flex-wrap/nowrap (.flex-nowrap)","justify-content/flex-start (.justify-start)","align-items/center (.items-center)"],".sf-input .sf-input-label":["display/flex (.flex)","flex-direction/row (.flex-row)","align-items/flex-start (.items-start)"],".sf-input .sf-input-field input":["flex/1 (.flex-1)"],".sf-input .sf-input-field .sf-icon":["display/flex (.flex)","justify-content/flex-start (.justify-start)","align-items/center (.items-center)"],".sf-input .sf-input-text-container":["flex/1 (.flex-1)","display/flex (.flex)","flex-direction/row (.flex-row)","flex-wrap/nowrap (.flex-nowrap)","justify-content/flex-start (.justify-start)","align-items/center (.items-center)"],".sf-input .sf-input-group":["display/flex (.flex)","flex-direction/column (.flex-col)","flex-wrap/nowrap (.flex-nowrap)","justify-content/center (.justify-center)","align-items/flex-start (.items-start)"],".sf-input .sf-input-text-container-alt":["display/flex (.flex)","flex-direction/row (.flex-row)","flex-wrap/nowrap (.flex-nowrap)","justify-content/center (.justify-center)","align-items/center (.items-center)"],".sf-input .sf-icon-alt":["display/flex (.flex)","justify-content/flex-start (.justify-start)","align-items/center (.items-center)"],".sf-input .sf-input-hint-text-wrap":["flex/1 (.flex-1)","display/flex (.flex)","flex-direction/row (.flex-row)","flex-wrap/nowrap (.flex-nowrap)","gap/var(--sf-b0)","justify-content/flex-start (.justify-start)","align-items/center (.items-center)"]}');var i=n("e138a730fd7c"),o=n("98e26702f55a");const l=new WeakMap,u=new WeakSet;let d=null;const c="label.sf-input",p="sfInputBound",f=new Set(["text","email","password","search","tel","url"]),h=new Set(["","none","text","tel","url","email","numeric","decimal","search"]),m=new Set(["bordered","filled","hidden"]);function g(t){if(""===t||null==t)return null;const e=Number(t);return Number.isInteger(e)&&e>=0?e:null}function y(t,e=!1){return null==t||""===t?e:"boolean"==typeof t?t:["1","true","yes","on"].includes(String(t).toLowerCase())}function b(t){return t?.querySelector?.(".sf-input-field input, input")||null}function w(t){return t?.querySelector?.(".sf-input-hint-text-wrap")||null}function x(t){const e=w(t);return{messageNode:e,errorMessage:"error"===e?.dataset.fieldMessage&&e.textContent?.trim()||""}}function S(t){if(!t||"string"!=typeof t)return null;const e=t.trim();if(!e)return null;try{const t=JSON.parse(e);return t&&"object"==typeof t?t:null}catch{return null}}function v(t,e,n){const a={...t},r=n.dataset.maskLazy??e.dataset.maskLazy,s=n.dataset.maskPlaceholderChar??e.dataset.maskPlaceholderChar;return void 0!==r&&""!==r&&(a.lazy=y(r,!0)),void 0!==s&&""!==s&&(a.placeholderChar=String(s)),a}async function $(t,e){const n=function(t,e){if(!y(e.dataset.mask??t.dataset.mask,!1))return null;const n=S(e.dataset.maskOptions),a=S(t.dataset.maskOptions);if(n)return v(n,t,e);if(a)return v(a,t,e);const r=e.dataset.maskPattern??t.dataset.maskPattern;return r?v({mask:String(r)},t,e):null}(t,e);if(!n)return;const a={};t.__sfInputMaskRequest=a;try{const r=await function(){const t=()=>window.SF?.Mask?.create?window.SF.Mask:null,e=t();return e?Promise.resolve(e):d||(d=new Promise(e=>{const n=[[window,"sf-mask-ready"],[window,"sf-loader-ready"],[window,"load"],[document,"DOMContentLoaded"]],a=()=>{const r=t();r&&(n.forEach(([t,e])=>t.removeEventListener(e,a)),d=null,e(r))};n.forEach(([t,e])=>t.addEventListener(e,a))}),d)}();if(t.__sfInputMaskRequest!==a)return;const s=await r.create(e,n);if(!s)return;if("1"!==t.dataset[p]||t.__sfInputMaskRequest!==a||b(t)!==e)return void r.destroy(s);t.__sfInputMask=s}catch(t){console.warn("SF.Input mask init failed",t)}}function k(t){if((0,o.vl)(t,"sf-input"),!t||"1"===t.dataset[p])return;const e=b(t);if(!e)return;const n=()=>{},a=()=>t.classList.add("sf-input--pointer-focus"),r=()=>t.classList.remove("sf-input--pointer-focus");e.addEventListener("input",n),e.addEventListener("pointerdown",a),e.addEventListener("blur",r),t.__sfInputNoopHandler=n,t.__sfInputPointerFocusHandler=a,t.__sfInputBlurHandler=r,t.dataset[p]="1";const s=x(t);(0,i.U)(t,e,{prefix:"sf-input",labelNode:t.querySelector(".sf-input-text"),required:e.required||Boolean(t.querySelector(".sf-input-required")),invalid:t.classList.contains("error")||e.classList.contains("error"),...s}),t.__sfInputReleaseReset=function(t,e){const n=t.ownerDocument;u.has(n)||(n.addEventListener("reset",t=>{const e=t.target;if("FORM"!==e?.tagName)return;const n=Array.from(e.elements);setTimeout(()=>{if(!t.defaultPrevented)for(const t of n)if(t.isConnected&&t.form===e)for(const e of l.get(t)||[])e()},0)},!0),u.add(n));let a=l.get(t);return a||l.set(t,a=new Set),a.add(e),()=>a.delete(e)}(e,()=>{t.__sfInputMask&&(t.__sfInputMask.value=e.value)}),$(t,e)}function _(t){if(!t||"1"!==t.dataset[p])return;delete t.__sfInputMaskRequest;const e=b(t);e&&t.__sfInputNoopHandler&&e.removeEventListener("input",t.__sfInputNoopHandler),e&&t.__sfInputPointerFocusHandler&&e.removeEventListener("pointerdown",t.__sfInputPointerFocusHandler),e&&t.__sfInputBlurHandler&&e.removeEventListener("blur",t.__sfInputBlurHandler),t.__sfInputMask&&window.SF?.Mask?.destroy?.(t.__sfInputMask),t.__sfInputReleaseReset?.(),delete t.__sfInputReleaseReset,delete t.__sfInputMask,delete t.__sfInputNoopHandler,delete t.__sfInputPointerFocusHandler,delete t.__sfInputBlurHandler,t.classList.remove("sf-input--pointer-focus"),delete t.dataset[p]}function L(t=document){t.querySelectorAll(c).forEach(k)}class I extends a{static componentName="Inputs";html=null;constructor(t){super(t);const{size:e="1",type:n="bordered",label:a="",required:r=!1,placeholder:s="",inputType:i="text",autocomplete:l="",inputMode:u="",minLength:d="",maxLength:c="",pattern:p="",hint:b="",value:w="",name:x="",leftIcon:S="",rightText:v="",hintIcon:$="",disabled:k=!1,readonly:_=!1,error:L=!1,invalid:I=!1,errorMessage:E="",mask:C=!1,maskPattern:A="",maskLazy:M="",maskPlaceholderChar:P="",maskOptions:q=""}=this.params||{},O=this.attrs.class||this.attrs.className,j=(0,o.id)(e,"sf-input"),F=function(t,e,n){const a=String(t||n);return e.has(a)?a:n}(n,m,"bordered");this.template=document.createElement("label"),this.id&&(this.template.id=this.id),this.template.classList.add("sf-input",`sf-input--size-${j}`,`sf-input--${F}`),this.template.classList.toggle("error",y(I||L,!1)),this.template.dataset.mask=String(y(C,!1)),this.template.dataset.maskPattern=String(A||""),this.template.dataset.maskLazy=String(M??""),this.template.dataset.maskPlaceholderChar=String(P||""),this.template.dataset.maskOptions=String(q||""),O&&this.template.classList.add(...`${O}`.split(" ").filter(Boolean));const T=document.createElement("span");T.classList.add("sf-input-label");const N=document.createElement("span");if(N.classList.add("sf-input-text"),N.textContent=a,T.append(N),y(r,!0)){const t=document.createElement("span");t.classList.add("sf-input-required"),t.textContent="*",T.append(t)}const z=document.createElement("span");if(z.classList.add("sf-input-field"),S){const t=document.createElement("i");t.classList.add("sf-icon"),t.textContent=String(S),z.append(t)}const B=document.createElement("input");B.type=function(t){const e=String(t||"text").toLowerCase();return f.has(e)?e:"text"}(i),B.placeholder=String(s??""),l&&(B.autocomplete=String(l)),B.inputMode=function(t){const e=String(t||"").toLowerCase();return h.has(e)?e:""}(u);const R=g(d),H=g(c);if(null!==R&&(B.minLength=R),null!==H&&(B.maxLength=H),p&&(B.pattern=String(p)),B.value=String(w??""),B.defaultValue=String(w??""),x&&(B.name=String(x)),B.disabled=y(k,!1),B.readOnly=y(_,!1),B.required=y(r,!0),B.dataset.mask=String(y(C,!1)),B.dataset.maskPattern=String(A||""),B.dataset.maskLazy=String(M??""),B.dataset.maskPlaceholderChar=String(P||""),B.dataset.maskOptions=String(q||""),B.classList.toggle("error",y(I||L,!1)),z.append(B),v){const t=document.createElement("span");t.classList.add("sf-input-right"),t.textContent=String(v),z.append(t)}if($){const t=document.createElement("i");t.classList.add("sf-icon","sf-icon-hint"),t.textContent=String($),z.append(t)}this.template.append(T,z);const U=y(I||L,!1)&&E?E:b;if(U){const t=document.createElement("span");t.classList.add("sf-input-hint-text-wrap"),t.textContent=String(U),t.dataset.fieldMessage=y(I||L,!1)&&E?"error":"hint",this.template.append(t)}this.applyLayoutUtilities(this.template,".sf-input"),this.applyLayoutUtilities(T,".sf-input .sf-input-label"),this.applyLayoutUtilities(z,".sf-input .sf-input-field"),this.applyLayoutUtilities(B,".sf-input .sf-input-field input")}init(){k(this.template)}destroyInternal(){_(this.template)}}I.utilityMap=s,r("Inputs",I),"undefined"!=typeof window&&(window.SF=window.SF||{},window.SF.Input=window.SF.Input||{},window.SF.Input.setState=function(t,e={}){const n=t instanceof HTMLElement?t.closest(c)||t:null;if(!n)return!1;const a=b(n);if(!a)return!1;if(Object.prototype.hasOwnProperty.call(e,"disabled")&&(a.disabled=y(e.disabled)),Object.prototype.hasOwnProperty.call(e,"error")){const t=y(e.error);n.classList.toggle("error",t),a.classList.toggle("error",t)}if(Object.prototype.hasOwnProperty.call(e,"invalid")){const t=y(e.invalid);n.classList.toggle("error",t),a.classList.toggle("error",t)}if(Object.prototype.hasOwnProperty.call(e,"errorMessage")){const t=String(e.errorMessage??""),r=t?function(t){const e=w(t);if(e)return e;const n=document.createElement("span");return n.classList.add("sf-input-hint-text-wrap"),t.append(n),n}(n):w(n);if(r){r.textContent=t;const e=n.classList.contains("error")||a.classList.contains("error");r.dataset.fieldMessage=t&&e?"error":"hint"}}return Object.prototype.hasOwnProperty.call(e,"value")&&(a.value=String(e.value??""),a.dispatchEvent(new Event("input",{bubbles:!0}))),(0,i.U)(n,a,{prefix:"sf-input",labelNode:n.querySelector(".sf-input-text"),required:a.required||Boolean(n.querySelector(".sf-input-required")),invalid:n.classList.contains("error")||a.classList.contains("error"),...x(n)}),!0}),"loading"===document.readyState?document.addEventListener("DOMContentLoaded",()=>L()):L();new MutationObserver(t=>{t.forEach(t=>{t.addedNodes.forEach(t=>{t instanceof Element&&(t.matches?.(c)&&k(t),L(t))})})}).observe(document.documentElement,{childList:!0,subtree:!0})},"44b791419862"(t,e,n){n.a(t,async(t,e)=>{try{var a=n("f8ed4bd5aa8a"),r=n("fbe0570fcc69"),s=n("98e26702f55a"),i=n("e602dd4d6e16"),o=t([r,i]);[r,i]=o.then?(await o)():o;var l=n.n(r);const u=new Set(["text","email","password","search","tel","url"]),d=new Set(["","none","text","tel","url","email","numeric","decimal","search"]),c=(new Set(["bordered","filled","hidden"]),(t,e,n)=>e.has(t)?t:n);class p extends(l()){static get props(){return{size:{default:"1"},appearance:{default:"bordered",values:["bordered","filled","hidden"],aliases:["type"]},label:{default:""},required:{type:Boolean,default:!1},placeholder:{default:""},inputType:{default:"text"},autocomplete:{default:""},inputmode:{default:""},minlength:{default:""},maxlength:{default:""},pattern:{default:""},hint:{default:""},value:{default:""},defaultValue:{default:""},name:{default:""},iconStart:{type:String,default:null},textEnd:{type:String,default:null},leftIcon:{default:""},rightText:{default:""},hintIcon:{default:""},rootClass:{default:""},disabled:{type:Boolean,default:!1},readonly:{type:Boolean,default:!1},error:{type:Boolean,default:!1},invalid:{type:Boolean,default:!1},errorMessage:{default:""},mask:{type:Boolean,default:!1},maskPattern:{default:""},maskLazy:{default:""},maskPlaceholderChar:{default:""},maskOptions:{default:""}}}constructor(){super(),this._boundRoot=null}get size(){return(0,s.id)(this.getAttribute("size")||"1","sf-input")}get appearance(){return this.getProp("appearance")}get type(){return this.appearance}get label(){return this.getAttribute("label")||""}get required(){return this.getBooleanAttr("required",!1)}get placeholder(){return this.getAttribute("placeholder")||""}get inputType(){return c(this.getAttribute("input-type")||"text",u,"text")}get autocomplete(){return this.getAttribute("autocomplete")||""}get inputmode(){return c(this.getAttribute("inputmode")||"",d,"")}get minlength(){return this.getAttribute("minlength")||""}get maxlength(){return this.getAttribute("maxlength")||""}get pattern(){return this.getAttribute("pattern")||""}get hint(){return this.getAttribute("hint")||""}get value(){const t=this.getInputElement();return t?t.value:this.getAttribute("value")||""}set value(t){const e=this.getInputElement(),n=String(t??"");null==t?this.removeAttribute("value"):this.setAttribute("value",n);const a=this.querySelector(".sf-input")?.__sfInputMask;a?a.value=n:e&&e.value!==n&&(e.value=n)}get defaultValue(){return this.getAttribute("default-value")??this.getAttribute("value")??""}set defaultValue(t){null!=t?this.setAttribute("default-value",String(t)):this.removeAttribute("default-value")}get name(){return this.getAttribute("name")||""}get leftIcon(){return this.getAttribute("icon-start")??this.getAttribute("left-icon")??""}get rightText(){return this.getAttribute("text-end")??this.getAttribute("right-text")??""}get iconStart(){return this.leftIcon}get textEnd(){return this.rightText}get hintIcon(){return this.getAttribute("hint-icon")||""}get disabled(){return this.getBooleanAttr("disabled",!1)}get readonly(){return this.getBooleanAttr("readonly",!1)}get error(){return this.getBooleanAttr("error",!1)}get invalid(){return this.getBooleanAttr("invalid",!1)}get errorMessage(){return this.getAttribute("error-message")||""}get mask(){return this.getBooleanAttr("mask",!1)}get maskPattern(){return this.getAttribute("mask-pattern")||""}get maskLazy(){return this.hasAttribute("mask-lazy")?this.getBooleanAttr("mask-lazy",!0):""}get maskPlaceholderChar(){return this.getAttribute("mask-placeholder-char")||""}get maskOptions(){return this.getAttribute("mask-options")||""}templateContext(){const t=this.getPropsContext(),e=this.hasAttribute("value"),n=this.getInputElement();return this.createTemplateContext({...t,leftIcon:t.iconStart??t.leftIcon,rightText:t.textEnd??t.rightText,iconStart:this.iconStart,textEnd:this.textEnd,type:this.type,maskLazy:this.maskLazy,value:e?t.value:n?n.value:this.defaultValue,defaultValue:this.defaultValue,hasControlledValue:e,component:this})}onDisconnected(){this._boundRoot&&((0,a.Lu)(this._boundRoot),this._boundRoot=null)}afterRender(){this._boundRoot&&((0,a.Lu)(this._boundRoot),this._boundRoot=null),this._boundRoot=this.querySelector(".sf-input"),this._boundRoot&&(0,a.m3)(this._boundRoot)}getInputElement(){return this.querySelector(".sf-input-field input, input")}template(){return(0,i.P)(this.templateContext())}get state(){const t=this.querySelector(".sf-input"),e=this.getInputElement();return{value:e?.value||"",disabled:!!e?.disabled,invalid:"true"===e?.getAttribute("aria-invalid"),error:t?.classList?.contains("error")||e?.classList?.contains("error")||!1}}onInput(t,e){return"function"==typeof t&&this.addEventListener("input",t,e),this}onChange(t,e){return"function"==typeof t&&this.addEventListener("change",t,e),this}onKeyUp(t,e){return"function"==typeof t&&this.addEventListener("keyup",t,e),this}onKeyDown(t,e){return"function"==typeof t&&this.addEventListener("keydown",t,e),this}onFocus(t,e){return"function"==typeof t&&this.addEventListener("focusin",t,e),this}onBlur(t,e){return"function"==typeof t&&this.addEventListener("focusout",t,e),this}}p.define("sf-input"),e()}catch(t){e(t)}})},e602dd4d6e16(t,e,n){n.a(t,async(t,a)=>{try{n.d(e,{P:()=>l});var r=n("ddf1cdb42ecc"),s=n("e138a730fd7c"),i=t([r]),o=i.then?(await i)():i;r=o[0];function l(t){const{size:e,appearance:n,type:a,label:i,required:o,placeholder:l,inputType:u,autocomplete:d,inputmode:c,minlength:p,maxlength:f,pattern:h,hint:m,value:g,defaultValue:y,hasControlledValue:b,name:w,leftIcon:x,rightText:S,hintIcon:v,disabled:$,error:k,invalid:_,errorMessage:L,mask:I,rootClass:E,rootStyle:C,readonly:A,maskPattern:M,maskLazy:P,maskPlaceholderChar:q,maskOptions:O}=t,j=""===P?"":String(P),F=b?g:y,T=(0,s.h)(t.component,{prefix:"sf-input",required:o,invalid:_||k,hint:m,errorMessage:L}),N=["sf-input",T.invalid?"error":"",`sf-input--size-${e}`,`sf-input--${n??a}`,E,"flex","flex-col"];if("hidden"===a)return r.html`<input
1
+ (()=>{"use strict";var t={e138a730fd7c(t,e,n){n.d(e,{U:()=>i,h:()=>s});let a=0;const r=new WeakMap;function s(t,{prefix:e="sf-field",required:n=!1,invalid:s=!1,hint:i="",errorMessage:o=""}={}){const l=function(t,e){if(t&&r.has(t))return r.get(t);const n=(t?.id?String(t.id).trim():"")||`${e}-${++a}`,s={controlId:`${n}-control`,messageId:`${n}-message`};return!t||"object"!=typeof t&&"function"!=typeof t||r.set(t,s),s}(t,e),u=Boolean(s),d=u&&o?o:i;return{...l,required:Boolean(n),invalid:u,message:d,describedBy:d?l.messageId:"",errorMessageId:u&&o?l.messageId:""}}function i(t,e,{prefix:n="sf-field",required:a=!1,invalid:r=!1,messageNode:i=null,labelNode:o=null,errorMessage:l=""}={}){if(!t||!e)return null;const u=s(t,{prefix:n,required:a,invalid:r,hint:i?.textContent?.trim()||"",errorMessage:l});var d,c;return e.id||(e.id=u.controlId),"LABEL"!==t.tagName||t.hasAttribute("for")||t.setAttribute("for",e.id),!o?.textContent?.trim()||e.hasAttribute("aria-label")||e.hasAttribute("aria-labelledby")||(o.id||(o.id=`${e.id}-label`),e.setAttribute("aria-labelledby",o.id)),e.required=u.required,t.classList.toggle("error",u.invalid),e.classList.toggle("error",u.invalid),u.invalid?e.setAttribute("aria-invalid","true"):e.removeAttribute("aria-invalid"),i&&(i.id||(i.id=u.messageId),e.setAttribute("aria-describedby",(d=e.getAttribute("aria-describedby"),c=[i.id],[...new Set([...String(d||"").split(/\s+/).filter(Boolean),...c.filter(Boolean)])].join(" ")))),u.errorMessageId&&i?e.setAttribute("aria-errormessage",i.id):e.removeAttribute("aria-errormessage"),u}},"98e26702f55a"(t,e,n){function a(){const t=globalThis.SF=globalThis.SF||{};return t.__deprecationNotes instanceof Map||Object.defineProperty(t,"__deprecationNotes",{value:new Map,configurable:!0}),t.__deprecationNotes}function r({component:t="",kind:e="attribute",attribute:n="",from:r,to:s=null}={}){if(!r)return;const i=[t,e,n,r].join("|"),o=a(),l=o.get(i);if(l)l.count+=1;else if(o.set(i,{component:t,kind:e,attribute:n,from:r,to:s,count:1}),function(){const t=globalThis.document?.documentElement;return"warn"===t?.dataset?.sfDeprecations||!0===globalThis.SF?.deprecations?.warn}()){const a=t?`${t}: `:"",i="value"===e?`${n}="${r}"`:`${e} ${r}`;globalThis.console?.warn?.(`[SIMAI Framework] ${a}${i} is a legacy name${s?`; write ${s}`:""}. See contracts/changes/journal.json.`)}}if(n.d(e,{id:()=>l,vl:()=>u}),"undefined"!=typeof globalThis){globalThis.SF=globalThis.SF||{};const t=globalThis.SF.deprecations||{};t.list=function(){return[...a().values()].map(t=>({...t}))},t.clear=function(){a().clear()},t.note=r,globalThis.SF.deprecations=t}const s=Object.freeze(["1/2","1","2"]),i=Object.freeze({"1/3":"1/2",3:"2"}),o=new Set;function l(t,e="field",n="1"){const a=String(t??"").trim().toLowerCase();if(s.includes(a))return a;if(Object.hasOwn(i,a)){const t=i[a];r({component:e,kind:"value",attribute:"size",from:a,to:t});const n=`${e}:${a}`;return o.has(n)||"undefined"==typeof console||(o.add(n),console.warn(`[SIMAI Framework] ${e}: size ${a} is retired for form fields; rendering size ${t}.`)),t}return n}function u(t,e){if(t?.classList)for(const[n,a]of Object.entries(i)){const a=`${e}--size-${n}`;t.classList.contains(a)&&t.classList.replace(a,`${e}--size-${l(n,e)}`)}}},f8ed4bd5aa8a(t,e,n){n.d(e,{m3:()=>k,Lu:()=>_});class a{lifecycleName(){return this.componentName??this.constructor.componentName}constructor(t){this.props=t,this.id=t?.id,this.params=t?.param,this.attrs=t?.attrs||{},this.template=null,window.dispatchEvent(new CustomEvent(`${this.lifecycleName()}:beforeRender`,{detail:this}))}getUtilityMap(){return this.constructor.utilityMap||null}extractUtilityClasses(t){if(!Array.isArray(t))return[];const e=new Set;return t.forEach(t=>{if("string"!=typeof t)return;const n=t.match(/\(([^)]+)\)/g);n&&n.forEach(t=>{t.slice(1,-1).split(/\s+/).filter(Boolean).forEach(t=>{t.startsWith(".")&&t.length>1&&e.add(t.slice(1))})})}),Array.from(e)}applyLayoutUtilities(t,e){if(!t||!e)return;const n=this.getUtilityMap();if(!n||!n[e])return;this.extractUtilityClasses(n[e]).forEach(e=>t.classList.add(e))}render(){return this.html=this.template,"function"==typeof this.init&&this.init(),this.html&&window.dispatchEvent(new CustomEvent(`${this.lifecycleName()}:render`,{detail:this})),this.html}destroy(){this.destroyInternal?.(),this.props=null,this.id=null,this.params=null,this.template=null,this.html&&(this.html.remove(),this.html=null),window.dispatchEvent(new CustomEvent(`${this.lifecycleName()}:destroy`,{detail:this}))}destroyInternal(){}}const r=function(t,e){if(t&&e)if("undefined"==typeof window||"function"!=typeof window.registerSfComponent){if("undefined"!=typeof window&&window.SF?.Loader?.registerComponent)window.SF.Loader.registerComponent(t,e);else if("undefined"!=typeof window){(window.SF_PENDING_COMPONENTS=window.SF_PENDING_COMPONENTS||[]).push([t,e])}}else window.registerSfComponent(t,e)},s=JSON.parse('{".sf-input":["display/flex (.flex)","flex-direction/column (.flex-col)","flex-wrap/nowrap (.flex-nowrap)","gap/var(--sf-space-1\\\\/4)","justify-content/flex-start (.justify-start)"],".sf-input .sf-input-field":["display/flex (.flex)","flex-direction/row (.flex-row)","flex-wrap/nowrap (.flex-nowrap)","justify-content/flex-start (.justify-start)","align-items/center (.items-center)"],".sf-input .sf-input-label":["display/flex (.flex)","flex-direction/row (.flex-row)","align-items/flex-start (.items-start)"],".sf-input .sf-input-field input":["flex/1 (.flex-1)"],".sf-input .sf-input-field .sf-icon":["display/flex (.flex)","justify-content/flex-start (.justify-start)","align-items/center (.items-center)"],".sf-input .sf-input-text-container":["flex/1 (.flex-1)","display/flex (.flex)","flex-direction/row (.flex-row)","flex-wrap/nowrap (.flex-nowrap)","justify-content/flex-start (.justify-start)","align-items/center (.items-center)"],".sf-input .sf-input-group":["display/flex (.flex)","flex-direction/column (.flex-col)","flex-wrap/nowrap (.flex-nowrap)","justify-content/center (.justify-center)","align-items/flex-start (.items-start)"],".sf-input .sf-input-text-container-alt":["display/flex (.flex)","flex-direction/row (.flex-row)","flex-wrap/nowrap (.flex-nowrap)","justify-content/center (.justify-center)","align-items/center (.items-center)"],".sf-input .sf-icon-alt":["display/flex (.flex)","justify-content/flex-start (.justify-start)","align-items/center (.items-center)"],".sf-input .sf-input-hint-text-wrap":["flex/1 (.flex-1)","display/flex (.flex)","flex-direction/row (.flex-row)","flex-wrap/nowrap (.flex-nowrap)","gap/var(--sf-b0)","justify-content/flex-start (.justify-start)","align-items/center (.items-center)"]}');var i=n("e138a730fd7c"),o=n("98e26702f55a");const l=new WeakMap,u=new WeakSet;let d=null;const c="label.sf-input",p="sfInputBound",f=new Set(["text","email","password","search","tel","url"]),h=new Set(["","none","text","tel","url","email","numeric","decimal","search"]),m=new Set(["bordered","filled","hidden"]);function g(t){if(""===t||null==t)return null;const e=Number(t);return Number.isInteger(e)&&e>=0?e:null}function y(t,e=!1){return null==t||""===t?e:"boolean"==typeof t?t:["1","true","yes","on"].includes(String(t).toLowerCase())}function b(t){return t?.querySelector?.(".sf-input-field input, input")||null}function w(t){return t?.querySelector?.(".sf-input-hint-text-wrap")||null}function x(t){const e=w(t);return{messageNode:e,errorMessage:"error"===e?.dataset.fieldMessage&&e.textContent?.trim()||""}}function S(t){if(!t||"string"!=typeof t)return null;const e=t.trim();if(!e)return null;try{const t=JSON.parse(e);return t&&"object"==typeof t?t:null}catch{return null}}function v(t,e,n){const a={...t},r=n.dataset.maskLazy??e.dataset.maskLazy,s=n.dataset.maskPlaceholderChar??e.dataset.maskPlaceholderChar;return void 0!==r&&""!==r&&(a.lazy=y(r,!0)),void 0!==s&&""!==s&&(a.placeholderChar=String(s)),a}async function $(t,e){const n=function(t,e){if(!y(e.dataset.mask??t.dataset.mask,!1))return null;const n=S(e.dataset.maskOptions),a=S(t.dataset.maskOptions);if(n)return v(n,t,e);if(a)return v(a,t,e);const r=e.dataset.maskPattern??t.dataset.maskPattern;return r?v({mask:String(r)},t,e):null}(t,e);if(!n)return;const a={};t.__sfInputMaskRequest=a;try{const r=await function(){const t=()=>window.SF?.Mask?.create?window.SF.Mask:null,e=t();return e?Promise.resolve(e):d||(d=new Promise(e=>{const n=[[window,"sf-mask-ready"],[window,"sf-loader-ready"],[window,"load"],[document,"DOMContentLoaded"]],a=()=>{const r=t();r&&(n.forEach(([t,e])=>t.removeEventListener(e,a)),d=null,e(r))};n.forEach(([t,e])=>t.addEventListener(e,a))}),d)}();if(t.__sfInputMaskRequest!==a)return;const s=await r.create(e,n);if(!s)return;if("1"!==t.dataset[p]||t.__sfInputMaskRequest!==a||b(t)!==e)return void r.destroy(s);t.__sfInputMask=s}catch(t){console.warn("SF.Input mask init failed",t)}}function k(t){if((0,o.vl)(t,"sf-input"),!t||"1"===t.dataset[p])return;const e=b(t);if(!e)return;const n=()=>{},a=()=>t.classList.add("sf-input--pointer-focus"),r=()=>t.classList.remove("sf-input--pointer-focus");e.addEventListener("input",n),e.addEventListener("pointerdown",a),e.addEventListener("blur",r),t.__sfInputNoopHandler=n,t.__sfInputPointerFocusHandler=a,t.__sfInputBlurHandler=r,t.dataset[p]="1";const s=x(t);(0,i.U)(t,e,{prefix:"sf-input",labelNode:t.querySelector(".sf-input-text"),required:e.required||Boolean(t.querySelector(".sf-input-required")),invalid:t.classList.contains("error")||e.classList.contains("error"),...s}),t.__sfInputReleaseReset=function(t,e){const n=t.ownerDocument;u.has(n)||(n.addEventListener("reset",t=>{const e=t.target;if("FORM"!==e?.tagName)return;const n=Array.from(e.elements);setTimeout(()=>{if(!t.defaultPrevented)for(const t of n)if(t.isConnected&&t.form===e)for(const e of l.get(t)||[])e()},0)},!0),u.add(n));let a=l.get(t);return a||l.set(t,a=new Set),a.add(e),()=>a.delete(e)}(e,()=>{t.__sfInputMask&&(t.__sfInputMask.value=e.value)}),$(t,e)}function _(t){if(!t||"1"!==t.dataset[p])return;delete t.__sfInputMaskRequest;const e=b(t);e&&t.__sfInputNoopHandler&&e.removeEventListener("input",t.__sfInputNoopHandler),e&&t.__sfInputPointerFocusHandler&&e.removeEventListener("pointerdown",t.__sfInputPointerFocusHandler),e&&t.__sfInputBlurHandler&&e.removeEventListener("blur",t.__sfInputBlurHandler),t.__sfInputMask&&window.SF?.Mask?.destroy?.(t.__sfInputMask),t.__sfInputReleaseReset?.(),delete t.__sfInputReleaseReset,delete t.__sfInputMask,delete t.__sfInputNoopHandler,delete t.__sfInputPointerFocusHandler,delete t.__sfInputBlurHandler,t.classList.remove("sf-input--pointer-focus"),delete t.dataset[p]}function L(t=document){t.querySelectorAll(c).forEach(k)}class I extends a{static componentName="Inputs";html=null;constructor(t){super(t);const{size:e="1",type:n="bordered",label:a="",required:r=!1,placeholder:s="",inputType:i="text",autocomplete:l="",inputMode:u="",minLength:d="",maxLength:c="",pattern:p="",hint:b="",value:w="",name:x="",leftIcon:S="",rightText:v="",hintIcon:$="",disabled:k=!1,readonly:_=!1,error:L=!1,invalid:I=!1,errorMessage:E="",mask:C=!1,maskPattern:A="",maskLazy:M="",maskPlaceholderChar:P="",maskOptions:q=""}=this.params||{},O=this.attrs.class||this.attrs.className,j=(0,o.id)(e,"sf-input"),F=function(t,e,n){const a=String(t||n);return e.has(a)?a:n}(n,m,"bordered");this.template=document.createElement("label"),this.id&&(this.template.id=this.id),this.template.classList.add("sf-input",`sf-input--size-${j}`,`sf-input--${F}`),this.template.classList.toggle("error",y(I||L,!1)),this.template.dataset.mask=String(y(C,!1)),this.template.dataset.maskPattern=String(A||""),this.template.dataset.maskLazy=String(M??""),this.template.dataset.maskPlaceholderChar=String(P||""),this.template.dataset.maskOptions=String(q||""),O&&this.template.classList.add(...`${O}`.split(" ").filter(Boolean));const T=document.createElement("span");T.classList.add("sf-input-label");const N=document.createElement("span");if(N.classList.add("sf-input-text"),N.textContent=a,T.append(N),y(r,!0)){const t=document.createElement("span");t.classList.add("sf-input-required"),t.textContent="*",T.append(t)}const z=document.createElement("span");if(z.classList.add("sf-input-field"),S){const t=document.createElement("i");t.classList.add("sf-icon"),t.textContent=String(S),z.append(t)}const B=document.createElement("input");B.type=function(t){const e=String(t||"text").toLowerCase();return f.has(e)?e:"text"}(i),B.placeholder=String(s??""),l&&(B.autocomplete=String(l)),B.inputMode=function(t){const e=String(t||"").toLowerCase();return h.has(e)?e:""}(u);const R=g(d),H=g(c);if(null!==R&&(B.minLength=R),null!==H&&(B.maxLength=H),p&&(B.pattern=String(p)),B.value=String(w??""),B.defaultValue=String(w??""),x&&(B.name=String(x)),B.disabled=y(k,!1),B.readOnly=y(_,!1),B.required=y(r,!0),B.dataset.mask=String(y(C,!1)),B.dataset.maskPattern=String(A||""),B.dataset.maskLazy=String(M??""),B.dataset.maskPlaceholderChar=String(P||""),B.dataset.maskOptions=String(q||""),B.classList.toggle("error",y(I||L,!1)),z.append(B),v){const t=document.createElement("span");t.classList.add("sf-input-right"),t.textContent=String(v),z.append(t)}if($){const t=document.createElement("i");t.classList.add("sf-icon","sf-icon-hint"),t.textContent=String($),z.append(t)}this.template.append(T,z);const U=y(I||L,!1)&&E?E:b;if(U){const t=document.createElement("span");t.classList.add("sf-input-hint-text-wrap"),t.textContent=String(U),t.dataset.fieldMessage=y(I||L,!1)&&E?"error":"hint",this.template.append(t)}this.applyLayoutUtilities(this.template,".sf-input"),this.applyLayoutUtilities(T,".sf-input .sf-input-label"),this.applyLayoutUtilities(z,".sf-input .sf-input-field"),this.applyLayoutUtilities(B,".sf-input .sf-input-field input")}init(){k(this.template)}destroyInternal(){_(this.template)}}I.utilityMap=s,r("Inputs",I),"undefined"!=typeof window&&(window.SF=window.SF||{},window.SF.Input=window.SF.Input||{},window.SF.Input.setState=function(t,e={}){const n=t instanceof HTMLElement?t.closest(c)||t:null;if(!n)return!1;const a=b(n);if(!a)return!1;if(Object.prototype.hasOwnProperty.call(e,"disabled")&&(a.disabled=y(e.disabled)),Object.prototype.hasOwnProperty.call(e,"error")){const t=y(e.error);n.classList.toggle("error",t),a.classList.toggle("error",t)}if(Object.prototype.hasOwnProperty.call(e,"invalid")){const t=y(e.invalid);n.classList.toggle("error",t),a.classList.toggle("error",t)}if(Object.prototype.hasOwnProperty.call(e,"errorMessage")){const t=String(e.errorMessage??""),r=t?function(t){const e=w(t);if(e)return e;const n=document.createElement("span");return n.classList.add("sf-input-hint-text-wrap"),t.append(n),n}(n):w(n);if(r){r.textContent=t;const e=n.classList.contains("error")||a.classList.contains("error");r.dataset.fieldMessage=t&&e?"error":"hint"}}return Object.prototype.hasOwnProperty.call(e,"value")&&(a.value=String(e.value??""),a.dispatchEvent(new Event("input",{bubbles:!0}))),(0,i.U)(n,a,{prefix:"sf-input",labelNode:n.querySelector(".sf-input-text"),required:a.required||Boolean(n.querySelector(".sf-input-required")),invalid:n.classList.contains("error")||a.classList.contains("error"),...x(n)}),!0}),"loading"===document.readyState?document.addEventListener("DOMContentLoaded",()=>L()):L();new MutationObserver(t=>{t.forEach(t=>{t.addedNodes.forEach(t=>{t instanceof Element&&(t.matches?.(c)&&k(t),L(t))})})}).observe(document.documentElement,{childList:!0,subtree:!0})},"44b791419862"(t,e,n){n.a(t,async(t,e)=>{try{var a=n("f8ed4bd5aa8a"),r=n("fbe0570fcc69"),s=n("98e26702f55a"),i=n("e602dd4d6e16"),o=t([r,i]);[r,i]=o.then?(await o)():o;var l=n.n(r);const u=new Set(["text","email","password","search","tel","url"]),d=new Set(["","none","text","tel","url","email","numeric","decimal","search"]),c=(new Set(["bordered","filled","hidden"]),(t,e,n)=>e.has(t)?t:n);class p extends(l()){static get props(){return{size:{default:"1"},appearance:{default:"bordered",values:["bordered","filled","hidden"],aliases:["type"]},label:{default:""},required:{type:Boolean,default:!1},placeholder:{default:""},inputType:{default:"text"},autocomplete:{default:""},inputmode:{default:""},minlength:{default:""},maxlength:{default:""},pattern:{default:""},hint:{default:""},value:{default:""},defaultValue:{default:""},name:{default:""},iconStart:{type:String,default:null},textEnd:{type:String,default:null},leftIcon:{default:""},rightText:{default:""},hintIcon:{default:""},rootClass:{default:""},disabled:{type:Boolean,default:!1},readonly:{type:Boolean,default:!1},error:{type:Boolean,default:!1},invalid:{type:Boolean,default:!1},errorMessage:{default:""},mask:{type:Boolean,default:!1},maskPattern:{default:""},maskLazy:{default:""},maskPlaceholderChar:{default:""},maskOptions:{default:""}}}constructor(){super(),this._boundRoot=null}get size(){return(0,s.id)(this.getAttribute("size")||"1","sf-input")}get appearance(){return this.getProp("appearance")}get type(){return this.appearance}get label(){return this.getAttribute("label")||""}get required(){return this.getBooleanAttr("required",!1)}get placeholder(){return this.getAttribute("placeholder")||""}get inputType(){return c(this.getAttribute("input-type")||"text",u,"text")}get autocomplete(){return this.getAttribute("autocomplete")||""}get inputmode(){return c(this.getAttribute("inputmode")||"",d,"")}get minlength(){return this.getAttribute("minlength")||""}get maxlength(){return this.getAttribute("maxlength")||""}get pattern(){return this.getAttribute("pattern")||""}get hint(){return this.getAttribute("hint")||""}get value(){const t=this.getInputElement();return t?t.value:this.getAttribute("value")||""}set value(t){const e=this.getInputElement(),n=String(t??"");null==t?this.removeAttribute("value"):this.setAttribute("value",n);const a=this.querySelector(".sf-input")?.__sfInputMask;a?a.value=n:e&&e.value!==n&&(e.value=n)}get defaultValue(){return this.getAttribute("default-value")??this.getAttribute("value")??""}set defaultValue(t){null!=t?this.setAttribute("default-value",String(t)):this.removeAttribute("default-value")}get name(){return this.getAttribute("name")||""}get leftIcon(){return this.getAttribute("icon-start")??this.getAttribute("left-icon")??""}get rightText(){return this.getAttribute("text-end")??this.getAttribute("right-text")??""}get iconStart(){return this.leftIcon}get textEnd(){return this.rightText}get hintIcon(){return this.getAttribute("hint-icon")||""}get disabled(){return this.getBooleanAttr("disabled",!1)}get readonly(){return this.getBooleanAttr("readonly",!1)}get error(){return this.getBooleanAttr("error",!1)}get invalid(){return this.getBooleanAttr("invalid",!1)}get errorMessage(){return this.getAttribute("error-message")||""}get mask(){return this.getBooleanAttr("mask",!1)}get maskPattern(){return this.getAttribute("mask-pattern")||""}get maskLazy(){return this.hasAttribute("mask-lazy")?this.getBooleanAttr("mask-lazy",!0):""}get maskPlaceholderChar(){return this.getAttribute("mask-placeholder-char")||""}get maskOptions(){return this.getAttribute("mask-options")||""}templateContext(){const t=this.getPropsContext(),e=this.hasAttribute("value"),n=this.getInputElement();return this.createTemplateContext({...t,leftIcon:t.iconStart??t.leftIcon,rightText:t.textEnd??t.rightText,iconStart:this.iconStart,textEnd:this.textEnd,type:this.type,maskLazy:this.maskLazy,value:e?t.value:n?n.value:this.defaultValue,defaultValue:this.defaultValue,hasControlledValue:e,component:this})}onDisconnected(){this._boundRoot&&((0,a.Lu)(this._boundRoot),this._boundRoot=null)}afterRender(){this._boundRoot&&((0,a.Lu)(this._boundRoot),this._boundRoot=null),this._boundRoot=this.querySelector(".sf-input"),this._boundRoot&&(0,a.m3)(this._boundRoot)}getInputElement(){return this.querySelector(".sf-input-field input, input")}template(){return(0,i.P)(this.templateContext())}get state(){const t=this.querySelector(".sf-input"),e=this.getInputElement();return{value:e?.value||"",disabled:!!e?.disabled,invalid:"true"===e?.getAttribute("aria-invalid"),error:t?.classList?.contains("error")||e?.classList?.contains("error")||!1}}onInput(t,e){return"function"==typeof t&&this.addEventListener("input",t,e),this}onChange(t,e){return"function"==typeof t&&this.addEventListener("change",t,e),this}onKeyUp(t,e){return"function"==typeof t&&this.addEventListener("keyup",t,e),this}onKeyDown(t,e){return"function"==typeof t&&this.addEventListener("keydown",t,e),this}onFocus(t,e){return"function"==typeof t&&this.addEventListener("focusin",t,e),this}onBlur(t,e){return"function"==typeof t&&this.addEventListener("focusout",t,e),this}}p.define("sf-input"),e()}catch(t){e(t)}})},e602dd4d6e16(t,e,n){n.a(t,async(t,a)=>{try{n.d(e,{P:()=>l});var r=n("ddf1cdb42ecc"),s=n("e138a730fd7c"),i=t([r]),o=i.then?(await i)():i;r=o[0];function l(t){const{size:e,appearance:n,type:a,label:i,required:o,placeholder:l,inputType:u,autocomplete:d,inputmode:c,minlength:p,maxlength:f,pattern:h,hint:m,value:g,defaultValue:y,hasControlledValue:b,name:w,leftIcon:x,rightText:S,hintIcon:v,disabled:$,error:k,invalid:_,errorMessage:L,mask:I,rootClass:E,rootStyle:C,readonly:A,maskPattern:M,maskLazy:P,maskPlaceholderChar:q,maskOptions:O}=t,j=""===P?"":String(P),F=b?g:y,T=(0,s.h)(t.component,{prefix:"sf-input",required:o,invalid:_||k,hint:m,errorMessage:L}),N=["sf-input",T.invalid?"error":"",`sf-input--size-${e}`,`sf-input--${n??a}`,E,"flex","flex-col"];if("hidden"===a)return r.html`<input
2
2
  style=${C||r.nothing}
3
3
  type="hidden"
4
4
  .value=${F}
@@ -1,17 +1,17 @@
1
- (()=>{"use strict";var e={"98e26702f55a"(e,t,a){function i(){const e=globalThis.SF=globalThis.SF||{};return e.__deprecationNotes instanceof Map||Object.defineProperty(e,"__deprecationNotes",{value:new Map,configurable:!0}),e.__deprecationNotes}if(a.d(t,{kA:()=>o}),"undefined"!=typeof globalThis){globalThis.SF=globalThis.SF||{};const e=globalThis.SF.deprecations||{};e.list=function(){return[...i().values()].map(e=>({...e}))},e.clear=function(){i().clear()},e.note=function({component:e="",kind:t="attribute",attribute:a="",from:s,to:r=null}={}){if(!s)return;const o=[e,t,a,s].join("|"),l=i(),n=l.get(o);if(n)n.count+=1;else if(l.set(o,{component:e,kind:t,attribute:a,from:s,to:r,count:1}),function(){const e=globalThis.document?.documentElement;return"warn"===e?.dataset?.sfDeprecations||!0===globalThis.SF?.deprecations?.warn}()){const i=e?`${e}: `:"",o="value"===t?`${a}="${s}"`:`${t} ${s}`;globalThis.console?.warn?.(`[Simai Framework] ${i}${o} is a legacy name${r?`; write ${r}`:""}. See contracts/changes/journal.json.`)}},globalThis.SF.deprecations=e}const s=Object.freeze(["1/2","1","2"]),r=Object.freeze({"1/3":"1/2",3:"2"});new Set;function o(e){const t=String(e??"").trim().toLowerCase();return s.includes(t)?t:Object.hasOwn(r,t)?r[t]:"1"}},e4b691e01e6b(e,t,a){a.a(e,async(e,t)=>{try{var i=a("fbe0570fcc69"),s=a("c22590307c6c"),r=a("98e26702f55a"),o=e([i,s]);[i,s]=o.then?(await o)():o;var l=a.n(i);function n(e){const t=e;return"1/3"===t||"1/2"===t?{item:t,checkbox:(0,r.kA)(t),avatarGroup:"1/2",colorTag:"1/2"}:{item:t,checkbox:(0,r.kA)(t),avatarGroup:t,colorTag:"1"}}class c extends(l()){static get props(){return{templateName:{attribute:"template",default:"default"},itemValue:{attribute:"value",default:""},kind:{default:"text",values:["text","icon","checkbox","avatar","color"],aliases:["type"]},size:{default:"1",values:["1/3","1/2","1","2","3"]},text:{default:""},icon:{default:"person"},checked:{type:Boolean,default:!1},selected:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},colorClass:{default:"bg-tertiary"},avatarImageUrl:{default:""},avatarTitle:{default:""},ariaLabel:{default:""}}}get componentName(){return"list-item"}get templateName(){return this.getAttribute("template")||"default"}get kind(){return this.getProp("kind")}get type(){return this.kind}get itemValue(){return this.getAttribute("value")||""}get size(){return this.getEnumAttr("size",["1/3","1/2","1","2","3"],"1")}get sizeGroup(){return n(this.size)}get text(){return this.getAttribute("text")||""}get icon(){return this.getAttribute("icon")||"person"}get checked(){return this.getBooleanAttr("checked",!1)}get selected(){return this.getBooleanAttr("selected",!1)}get disabled(){return this.getBooleanAttr("disabled",!1)}get colorClass(){return this.getAttribute("color-class")||"bg-tertiary"}get avatarImageUrl(){return this.getAttribute("avatar-image-url")||""}get avatarTitle(){return this.getAttribute("avatar-title")||this.text}get ariaLabel(){return this.getAttribute("aria-label")||""}templateContext(){const e=this.getPropsContext();return this.createTemplateContext({...e,component:this,sizeGroup:this.sizeGroup,avatarTitle:this.avatarTitle,type:this.type,value:this.itemValue,option:!1})}template(){return(0,s.Ws)(this.templateContext())}resolveUpdateMode(e=[]){return e.length>0&&e.every(e=>["text","aria-label","disabled","selected","checked"].includes(e))?"dom":"lit"}updateDom(e=[]){const t=this.querySelector(".sf-list-item"),a=this.querySelector(".sf-list-item-container, .sf-avatar-label-group-title, .sf-tag-container"),i=this.querySelector(".sf-checkbox input");return!!t&&(e.includes("text")&&a&&(a.textContent=this.text),e.includes("disabled")&&(t.classList.toggle("disabled",this.disabled),i&&(i.disabled=this.disabled)),e.includes("selected")&&t.classList.toggle("selected",this.selected),i&&(e.includes("checked")||e.includes("selected"))&&(i.checked=this.checked||this.selected),!0)}get value(){return{template:this.templateName,value:this.itemValue,type:this.type,size:this.size,text:this.text,icon:this.icon,checked:this.checked,selected:this.selected,disabled:this.disabled,colorClass:this.colorClass,avatarImageUrl:this.avatarImageUrl,avatarTitle:this.avatarTitle,ariaLabel:this.ariaLabel}}set value(e){if(!e||"object"!=typeof e)return;const{value:t,...a}=e;Object.prototype.hasOwnProperty.call(e,"value")&&this.setAttributeValue("value",t),this.setValueAttributes(a)}}c.define("sf-list-item"),t()}catch(d){t(d)}})},c22590307c6c(e,t,a){a.a(e,async(e,i)=>{try{a.d(t,{Ws:()=>l});var s=a("ddf1cdb42ecc"),r=(a("98e26702f55a"),e([s])),o=r.then?(await r)():r;s=o[0];function l(e){const t=!0===e.option,a=e.component?.hasSlotContent?.("text")?e.component.getSlotContent("text"):e.text,i=e.component?.hasSlotContent?.("leading")?e.component.getSlotContent("leading"):s.nothing,r=e.component?.hasSlotContent?.("trailing")?e.component.getSlotContent("trailing"):s.nothing,o=["sf-list-item","flex","items-cross-center",`sf-list-item--${e.kind??e.type}`,`sf-list-item--size-${e.size}`,t?"cursor-pointer":"",e.selected?"selected":"",e.disabled?"disabled":"",e.rootClass].filter(Boolean),l=["sf-list-item-wrap","flex","flex-1"];["icon","checkbox","avatar","color"].includes(e.type)&&l.push("flex","flex-row","flex-nowrap","items-center","gap-2"),"avatar"!==e.type&&"color"!==e.type||(l.splice(l.indexOf("gap-2"),1),l.push("justify-between","gap-2"));return s.html`
1
+ (()=>{"use strict";var e={"98e26702f55a"(e,t,a){function s(){const e=globalThis.SF=globalThis.SF||{};return e.__deprecationNotes instanceof Map||Object.defineProperty(e,"__deprecationNotes",{value:new Map,configurable:!0}),e.__deprecationNotes}if(a.d(t,{kA:()=>o}),"undefined"!=typeof globalThis){globalThis.SF=globalThis.SF||{};const e=globalThis.SF.deprecations||{};e.list=function(){return[...s().values()].map(e=>({...e}))},e.clear=function(){s().clear()},e.note=function({component:e="",kind:t="attribute",attribute:a="",from:i,to:r=null}={}){if(!i)return;const o=[e,t,a,i].join("|"),l=s(),n=l.get(o);if(n)n.count+=1;else if(l.set(o,{component:e,kind:t,attribute:a,from:i,to:r,count:1}),function(){const e=globalThis.document?.documentElement;return"warn"===e?.dataset?.sfDeprecations||!0===globalThis.SF?.deprecations?.warn}()){const s=e?`${e}: `:"",o="value"===t?`${a}="${i}"`:`${t} ${i}`;globalThis.console?.warn?.(`[SIMAI Framework] ${s}${o} is a legacy name${r?`; write ${r}`:""}. See contracts/changes/journal.json.`)}},globalThis.SF.deprecations=e}const i=Object.freeze(["1/2","1","2"]),r=Object.freeze({"1/3":"1/2",3:"2"});new Set;function o(e){const t=String(e??"").trim().toLowerCase();return i.includes(t)?t:Object.hasOwn(r,t)?r[t]:"1"}},e4b691e01e6b(e,t,a){a.a(e,async(e,t)=>{try{var s=a("fbe0570fcc69"),i=a("c22590307c6c"),r=a("98e26702f55a"),o=e([s,i]);[s,i]=o.then?(await o)():o;var l=a.n(s);function n(e){const t=e;return"1/3"===t||"1/2"===t?{item:t,checkbox:(0,r.kA)(t),avatarGroup:"1/2",colorTag:"1/2"}:{item:t,checkbox:(0,r.kA)(t),avatarGroup:t,colorTag:"1"}}class c extends(l()){static get props(){return{templateName:{attribute:"template",default:"default"},itemValue:{attribute:"value",default:""},kind:{default:"text",values:["text","icon","checkbox","avatar","color"],aliases:["type"]},size:{default:"1",values:["1/3","1/2","1","2","3"]},text:{default:""},icon:{default:"person"},checked:{type:Boolean,default:!1},selected:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},colorClass:{default:"bg-tertiary"},avatarImageUrl:{default:""},avatarTitle:{default:""},ariaLabel:{default:""}}}get componentName(){return"list-item"}get templateName(){return this.getAttribute("template")||"default"}get kind(){return this.getProp("kind")}get type(){return this.kind}get itemValue(){return this.getAttribute("value")||""}get size(){return this.getEnumAttr("size",["1/3","1/2","1","2","3"],"1")}get sizeGroup(){return n(this.size)}get text(){return this.getAttribute("text")||""}get icon(){return this.getAttribute("icon")||"person"}get checked(){return this.getBooleanAttr("checked",!1)}get selected(){return this.getBooleanAttr("selected",!1)}get disabled(){return this.getBooleanAttr("disabled",!1)}get colorClass(){return this.getAttribute("color-class")||"bg-tertiary"}get avatarImageUrl(){return this.getAttribute("avatar-image-url")||""}get avatarTitle(){return this.getAttribute("avatar-title")||this.text}get ariaLabel(){return this.getAttribute("aria-label")||""}templateContext(){const e=this.getPropsContext();return this.createTemplateContext({...e,component:this,sizeGroup:this.sizeGroup,avatarTitle:this.avatarTitle,type:this.type,value:this.itemValue,option:!1})}template(){return(0,i.Ws)(this.templateContext())}resolveUpdateMode(e=[]){return e.length>0&&e.every(e=>["text","aria-label","disabled","selected","checked"].includes(e))?"dom":"lit"}updateDom(e=[]){const t=this.querySelector(".sf-list-item"),a=this.querySelector(".sf-list-item-container, .sf-avatar-label-group-title, .sf-tag-container"),s=this.querySelector(".sf-checkbox input");return!!t&&(e.includes("text")&&a&&(a.textContent=this.text),e.includes("disabled")&&(t.classList.toggle("disabled",this.disabled),s&&(s.disabled=this.disabled)),e.includes("selected")&&t.classList.toggle("selected",this.selected),s&&(e.includes("checked")||e.includes("selected"))&&(s.checked=this.checked||this.selected),!0)}get value(){return{template:this.templateName,value:this.itemValue,type:this.type,size:this.size,text:this.text,icon:this.icon,checked:this.checked,selected:this.selected,disabled:this.disabled,colorClass:this.colorClass,avatarImageUrl:this.avatarImageUrl,avatarTitle:this.avatarTitle,ariaLabel:this.ariaLabel}}set value(e){if(!e||"object"!=typeof e)return;const{value:t,...a}=e;Object.prototype.hasOwnProperty.call(e,"value")&&this.setAttributeValue("value",t),this.setValueAttributes(a)}}c.define("sf-list-item"),t()}catch(d){t(d)}})},c22590307c6c(e,t,a){a.a(e,async(e,s)=>{try{a.d(t,{Ws:()=>l});var i=a("ddf1cdb42ecc"),r=(a("98e26702f55a"),e([i])),o=r.then?(await r)():r;i=o[0];function l(e){const t=!0===e.option,a=e.component?.hasSlotContent?.("text")?e.component.getSlotContent("text"):e.text,s=e.component?.hasSlotContent?.("leading")?e.component.getSlotContent("leading"):i.nothing,r=e.component?.hasSlotContent?.("trailing")?e.component.getSlotContent("trailing"):i.nothing,o=["sf-list-item","flex","items-cross-center",`sf-list-item--${e.kind??e.type}`,`sf-list-item--size-${e.size}`,t?"cursor-pointer":"",e.selected?"selected":"",e.disabled?"disabled":"",e.rootClass].filter(Boolean),l=["sf-list-item-wrap","flex","flex-1"];["icon","checkbox","avatar","color"].includes(e.type)&&l.push("flex","flex-row","flex-nowrap","items-center","gap-2"),"avatar"!==e.type&&"color"!==e.type||(l.splice(l.indexOf("gap-2"),1),l.push("justify-between","gap-2"));return i.html`
2
2
  <div
3
3
  class=${o.join(" ")}
4
- style=${e.rootStyle||s.nothing}
5
- role=${t?"option":s.nothing}
6
- tabindex=${t?"-1":s.nothing}
7
- data-value=${t&&e.value||s.nothing}
8
- aria-label=${t&&e.ariaLabel||s.nothing}
9
- title=${t&&e.ariaLabel||s.nothing}
10
- aria-disabled=${t&&e.disabled?"true":s.nothing}
11
- aria-selected=${t?e.selected?"true":"false":s.nothing}
4
+ style=${e.rootStyle||i.nothing}
5
+ role=${t?"option":i.nothing}
6
+ tabindex=${t?"-1":i.nothing}
7
+ data-value=${t&&e.value||i.nothing}
8
+ aria-label=${t&&e.ariaLabel||i.nothing}
9
+ title=${t&&e.ariaLabel||i.nothing}
10
+ aria-disabled=${t&&e.disabled?"true":i.nothing}
11
+ aria-selected=${t?e.selected?"true":"false":i.nothing}
12
12
  >
13
13
  <div class=${l.join(" ")}>
14
- ${(()=>{if(i!==s.nothing)return i;if("icon"===e.type)return s.html`<i class="sf-icon" aria-hidden="true">${e.icon}</i>`;if("checkbox"===e.type)return s.html`
14
+ ${(()=>{if(s!==i.nothing)return s;if("icon"===e.type)return i.html`<i class="sf-icon" aria-hidden="true">${e.icon}</i>`;if("checkbox"===e.type)return i.html`
15
15
  <label
16
16
  class="sf-checkbox sf-checkbox--size-${e.sizeGroup.checkbox} flex"
17
17
  aria-hidden="true"
@@ -26,14 +26,14 @@
26
26
  <span class="sf-icon" aria-hidden="true"></span>
27
27
  </span>
28
28
  </label>
29
- `;if("avatar"===e.type){const t=["sf-avatar","sf-avatar--size-"+("1/3"===e.sizeGroup.item||"1/2"===e.sizeGroup.item?"1/3":"1"===e.sizeGroup.item?"1/2":"2"===e.sizeGroup.item?"1":"2"),"bg-cover",e.disabled?"disabled":""].filter(Boolean);return s.html`
29
+ `;if("avatar"===e.type){const t=["sf-avatar","sf-avatar--size-"+("1/3"===e.sizeGroup.item||"1/2"===e.sizeGroup.item?"1/3":"1"===e.sizeGroup.item?"1/2":"2"===e.sizeGroup.item?"1":"2"),"bg-cover",e.disabled?"disabled":""].filter(Boolean);return i.html`
30
30
  <div
31
31
  class="sf-avatar-label-group sf-avatar-label-group--size-${e.sizeGroup.avatarGroup} flex items-cross-center"
32
32
  >
33
33
  <span
34
34
  class=${t.join(" ")}
35
35
  aria-hidden="true"
36
- style=${e.avatarImageUrl?`background-image: url(${e.avatarImageUrl});`:s.nothing}
36
+ style=${e.avatarImageUrl?`background-image: url(${e.avatarImageUrl});`:i.nothing}
37
37
  ></span>
38
38
  <div class="sf-avatar-label-group-container flex flex-col">
39
39
  <div class="sf-avatar-label-group-title">
@@ -41,12 +41,12 @@
41
41
  </div>
42
42
  </div>
43
43
  </div>
44
- `}if("color"===e.type){const t=["sf-tag","sf-tag--color",`sf-tag--size-${e.sizeGroup.colorTag}`,"flex","flex-row","flex-nowrap","items-center","flex-1",e.disabled?"disabled":""].filter(Boolean);return s.html`
44
+ `}if("color"===e.type){const t=["sf-tag","sf-tag--color",`sf-tag--size-${e.sizeGroup.colorTag}`,"flex","flex-row","flex-nowrap","items-center","flex-1",e.disabled?"disabled":""].filter(Boolean);return i.html`
45
45
  <div class=${t.join(" ")}>
46
46
  <span class="sf-tag-color-icon ${e.colorClass}" aria-hidden="true"></span>
47
47
  <span class="sf-tag-container">${a}</span>
48
48
  </div>
49
- `}return s.nothing})()} ${"color"===e.type||"avatar"===e.type?s.nothing:s.html`<div class="sf-list-item-container">${a}</div>`} ${r!==s.nothing?r:"avatar"===e.type||"color"===e.type?s.html`
49
+ `}return i.nothing})()} ${"color"===e.type||"avatar"===e.type?i.nothing:i.html`<div class="sf-list-item-container">${a}</div>`} ${r!==i.nothing?r:"avatar"===e.type||"color"===e.type?i.html`
50
50
  <label
51
51
  class="sf-checkbox sf-checkbox--size-${e.sizeGroup.checkbox} flex"
52
52
  aria-hidden="true"
@@ -61,7 +61,7 @@
61
61
  <span class="sf-icon" aria-hidden="true"></span>
62
62
  </span>
63
63
  </label>
64
- `:s.nothing}
64
+ `:i.nothing}
65
65
  </div>
66
66
  </div>
67
- `}i()}catch(n){i(n)}})},ddf1cdb42ecc(e){e.exports=globalThis.SF&&globalThis.SF.runtimeModule?globalThis.SF.runtimeModule("lit"):new Promise(e=>globalThis.addEventListener("sf-runtime-ready",()=>e(globalThis.SF.runtimeModule("lit")),{once:!0}))},fbe0570fcc69(e){e.exports=globalThis.SF&&globalThis.SF.runtimeModule?globalThis.SF.runtimeModule("smart-base"):new Promise(e=>globalThis.addEventListener("sf-runtime-ready",()=>e(globalThis.SF.runtimeModule("smart-base")),{once:!0}))}};const t={};function a(i){const s=t[i];if(void 0!==s)return s.exports;const r=t[i]={exports:{}};return e[i](r,r.exports,a),r.exports}(()=>{const e="function"==typeof Symbol,t=e?Symbol("webpack queues"):"__webpack_queues__",i=e?Symbol("webpack exports"):"__webpack_exports__",s=e?Symbol("webpack error"):"__webpack_error__",r=e=>{e?.d<1&&(e.d=1,e.forEach(e=>e.r--),e.forEach(e=>e.r--?e.r++:e()))};a.a=(e,a,o)=>{let l;o&&((l=[]).d=-1);const n=new Set,c=e.exports;let d,u,h;const p=new Promise((e,t)=>{h=t,u=e});p[i]=c,p[t]=e=>(l&&e(l),n.forEach(e),p.catch(e=>{})),e.exports=p;a(e=>{let a;d=(e=>e.map(e=>{if(null!==e&&"object"==typeof e){if(e[t])return e;if(e.then){const a=[];a.d=0,e.then(e=>{o[i]=e,r(a)},e=>{o[s]=e,r(a)});const o={};return o[t]=e=>e(a),o}}const a={};return a[t]=e=>{},a[i]=e,a}))(e);const o=()=>d.map(e=>{if(e[s])throw e[s];return e[i]}),c=new Promise(e=>{a=()=>e(o),a.r=0;const i=e=>e!==l&&!n.has(e)&&(n.add(e),e&&!e.d&&(a.r++,e.push(a)));d.map(e=>e[t](i))});return a.r?c:o()},e=>(e?h(p[s]=e):u(c),r(l))),l?.d<0&&(l.d=0)}})(),a.n=e=>{const t=e&&e.__esModule?()=>e.default:()=>e;return a.d(t,{a:t}),t},a.d=(e,t)=>{if(Array.isArray(t))for(var i=0;i<t.length;){var s=t[i++],r=t[i++];a.o(e,s)?0===r&&i++:0===r?Object.defineProperty(e,s,{enumerable:!0,value:t[i++]}):Object.defineProperty(e,s,{enumerable:!0,get:r})}else for(var s in t)a.o(t,s)&&!a.o(e,s)&&Object.defineProperty(e,s,{enumerable:!0,get:t[s]})},a.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t);a("e4b691e01e6b")})();
67
+ `}s()}catch(n){s(n)}})},ddf1cdb42ecc(e){e.exports=globalThis.SF&&globalThis.SF.runtimeModule?globalThis.SF.runtimeModule("lit"):new Promise(e=>globalThis.addEventListener("sf-runtime-ready",()=>e(globalThis.SF.runtimeModule("lit")),{once:!0}))},fbe0570fcc69(e){e.exports=globalThis.SF&&globalThis.SF.runtimeModule?globalThis.SF.runtimeModule("smart-base"):new Promise(e=>globalThis.addEventListener("sf-runtime-ready",()=>e(globalThis.SF.runtimeModule("smart-base")),{once:!0}))}};const t={};function a(s){const i=t[s];if(void 0!==i)return i.exports;const r=t[s]={exports:{}};return e[s](r,r.exports,a),r.exports}(()=>{const e="function"==typeof Symbol,t=e?Symbol("webpack queues"):"__webpack_queues__",s=e?Symbol("webpack exports"):"__webpack_exports__",i=e?Symbol("webpack error"):"__webpack_error__",r=e=>{e?.d<1&&(e.d=1,e.forEach(e=>e.r--),e.forEach(e=>e.r--?e.r++:e()))};a.a=(e,a,o)=>{let l;o&&((l=[]).d=-1);const n=new Set,c=e.exports;let d,u,h;const p=new Promise((e,t)=>{h=t,u=e});p[s]=c,p[t]=e=>(l&&e(l),n.forEach(e),p.catch(e=>{})),e.exports=p;a(e=>{let a;d=(e=>e.map(e=>{if(null!==e&&"object"==typeof e){if(e[t])return e;if(e.then){const a=[];a.d=0,e.then(e=>{o[s]=e,r(a)},e=>{o[i]=e,r(a)});const o={};return o[t]=e=>e(a),o}}const a={};return a[t]=e=>{},a[s]=e,a}))(e);const o=()=>d.map(e=>{if(e[i])throw e[i];return e[s]}),c=new Promise(e=>{a=()=>e(o),a.r=0;const s=e=>e!==l&&!n.has(e)&&(n.add(e),e&&!e.d&&(a.r++,e.push(a)));d.map(e=>e[t](s))});return a.r?c:o()},e=>(e?h(p[i]=e):u(c),r(l))),l?.d<0&&(l.d=0)}})(),a.n=e=>{const t=e&&e.__esModule?()=>e.default:()=>e;return a.d(t,{a:t}),t},a.d=(e,t)=>{if(Array.isArray(t))for(var s=0;s<t.length;){var i=t[s++],r=t[s++];a.o(e,i)?0===r&&s++:0===r?Object.defineProperty(e,i,{enumerable:!0,value:t[s++]}):Object.defineProperty(e,i,{enumerable:!0,get:r})}else for(var i in t)a.o(t,i)&&!a.o(e,i)&&Object.defineProperty(e,i,{enumerable:!0,get:t[i]})},a.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t);a("e4b691e01e6b")})();
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "schema_version": "1.0.0",
3
3
  "contract_id": "simai.framework.smart.modal",
4
- "public_name": "Simai Framework Modal",
4
+ "public_name": "SIMAI Framework Modal",
5
5
  "technical_tag": "sf-modal",
6
6
  "layer": "smart-component",
7
7
  "source": {