smoothly 1.123.0 → 1.124.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/smoothly-app_99.cjs.entry.js +9 -4
- package/dist/cjs/smoothly-app_99.cjs.entry.js.map +1 -1
- package/dist/collection/components/input/select/index.js +4 -4
- package/dist/collection/components/input/select/index.js.map +1 -1
- package/dist/collection/components/input/select/menu.js +5 -0
- package/dist/collection/components/input/select/menu.js.map +1 -1
- package/dist/components/{p-DxMW5Du7.js → p-B1agr2Cu.js} +2 -2
- package/dist/components/{p-BoVqzcqA.js → p-B4ZWPf6K.js} +2 -2
- package/dist/components/{p-CRgTWhgN.js → p-B8xGVFme.js} +2 -2
- package/dist/components/{p-DilrpZI6.js → p-BOgkCDpz.js} +2 -2
- package/dist/components/{p-C5SROPcr.js → p-BiRi-ZIu.js} +2 -2
- package/dist/components/{p-CsbRRVxH.js → p-Bp65xiCy.js} +2 -2
- package/dist/components/{p-CKguOE4o.js → p-C3ntRScd.js} +2 -2
- package/dist/components/{p-BlSr9psC.js → p-C4PyQibs.js} +2 -2
- package/dist/components/{p-5RD9qap_.js → p-CA4ZV5xR.js} +2 -2
- package/dist/components/{p-CG405xpf.js → p-CZY1H_tZ.js} +2 -2
- package/dist/components/{p-DABDOf4i.js → p-Cd3l3tXR.js} +2 -2
- package/dist/components/{p-DdG2-QwQ.js → p-CnPK9tlN.js} +2 -2
- package/dist/components/{p-BW08Z-5c.js → p-D1kz47jP.js} +2 -2
- package/dist/components/{p-B7iMXQWl.js → p-D7ibQkKs.js} +2 -2
- package/dist/components/{p-DJZNwn-w.js → p-DB5eYiPc.js} +2 -2
- package/dist/components/p-DTo2Itg9.js +2 -0
- package/dist/components/p-DTo2Itg9.js.map +1 -0
- package/dist/components/{p-Obm_ForQ.js → p-DcOQ-AL9.js} +2 -2
- package/dist/components/{p-DUuSvBmQ.js → p-DfSSSicA.js} +2 -2
- package/dist/components/{p-CRlfq-AL.js → p-EqRJl32n.js} +2 -2
- package/dist/components/{p-CocCQeEi.js → p-J05ZrIy8.js} +2 -2
- package/dist/components/{p-CeUOn6zh.js → p-_46rt1sK.js} +2 -2
- package/dist/components/{p-C0Z37bUn.js → p-fZNu4CkP.js} +2 -2
- package/dist/components/{p-bROQezlS.js → p-jd_qrwk9.js} +2 -2
- package/dist/components/{p-DES0wbqs.js → p-l7KxEsrG.js} +2 -2
- package/dist/components/smoothly-app-demo.js +1 -1
- package/dist/components/smoothly-button-demo-standard.js +1 -1
- package/dist/components/smoothly-button-demo.js +1 -1
- package/dist/components/smoothly-calendar.js +1 -1
- package/dist/components/smoothly-form-demo-all.js +1 -1
- package/dist/components/smoothly-form-demo-controlled.js +1 -1
- package/dist/components/smoothly-form-demo-date-range.js +1 -1
- package/dist/components/smoothly-form-demo-date.js +1 -1
- package/dist/components/smoothly-form-demo-pet.js +1 -1
- package/dist/components/smoothly-form-demo-schedule.js +1 -1
- package/dist/components/smoothly-form-demo-transparent.js +1 -1
- package/dist/components/smoothly-form-demo-typed.js +1 -1
- package/dist/components/smoothly-form-demo.js +1 -1
- package/dist/components/smoothly-icon-demo.js +1 -1
- package/dist/components/smoothly-input-checkbox-demo.js +1 -1
- package/dist/components/smoothly-input-date-demo.js +1 -1
- package/dist/components/smoothly-input-date-range.js +1 -1
- package/dist/components/smoothly-input-date-time.js +1 -1
- package/dist/components/smoothly-input-date.js +1 -1
- package/dist/components/smoothly-input-demo-standard.js +1 -1
- package/dist/components/smoothly-input-demo-user-input.js +1 -1
- package/dist/components/smoothly-input-demo.js +1 -1
- package/dist/components/smoothly-input-month.js +1 -1
- package/dist/components/smoothly-input-select.js +1 -1
- package/dist/components/smoothly-theme-demo.js +1 -1
- package/dist/components/smoothly-theme-picker.js +1 -1
- package/dist/esm/smoothly-app_99.entry.js +9 -4
- package/dist/esm/smoothly-app_99.entry.js.map +1 -1
- package/dist/smoothly/{p-bf6726da.entry.js → p-53cbd170.entry.js} +2 -2
- package/dist/smoothly/p-53cbd170.entry.js.map +1 -0
- package/dist/smoothly/smoothly.esm.js +1 -1
- package/dist/types/components/input/select/menu.d.ts +1 -0
- package/package.json +1 -1
- package/dist/components/p-Bd-a9CG1.js +0 -2
- package/dist/components/p-Bd-a9CG1.js.map +0 -1
- package/dist/smoothly/p-bf6726da.entry.js.map +0 -1
- /package/dist/components/{p-DxMW5Du7.js.map → p-B1agr2Cu.js.map} +0 -0
- /package/dist/components/{p-BoVqzcqA.js.map → p-B4ZWPf6K.js.map} +0 -0
- /package/dist/components/{p-CRgTWhgN.js.map → p-B8xGVFme.js.map} +0 -0
- /package/dist/components/{p-DilrpZI6.js.map → p-BOgkCDpz.js.map} +0 -0
- /package/dist/components/{p-C5SROPcr.js.map → p-BiRi-ZIu.js.map} +0 -0
- /package/dist/components/{p-CsbRRVxH.js.map → p-Bp65xiCy.js.map} +0 -0
- /package/dist/components/{p-CKguOE4o.js.map → p-C3ntRScd.js.map} +0 -0
- /package/dist/components/{p-BlSr9psC.js.map → p-C4PyQibs.js.map} +0 -0
- /package/dist/components/{p-5RD9qap_.js.map → p-CA4ZV5xR.js.map} +0 -0
- /package/dist/components/{p-CG405xpf.js.map → p-CZY1H_tZ.js.map} +0 -0
- /package/dist/components/{p-DABDOf4i.js.map → p-Cd3l3tXR.js.map} +0 -0
- /package/dist/components/{p-DdG2-QwQ.js.map → p-CnPK9tlN.js.map} +0 -0
- /package/dist/components/{p-BW08Z-5c.js.map → p-D1kz47jP.js.map} +0 -0
- /package/dist/components/{p-B7iMXQWl.js.map → p-D7ibQkKs.js.map} +0 -0
- /package/dist/components/{p-DJZNwn-w.js.map → p-DB5eYiPc.js.map} +0 -0
- /package/dist/components/{p-Obm_ForQ.js.map → p-DcOQ-AL9.js.map} +0 -0
- /package/dist/components/{p-DUuSvBmQ.js.map → p-DfSSSicA.js.map} +0 -0
- /package/dist/components/{p-CRlfq-AL.js.map → p-EqRJl32n.js.map} +0 -0
- /package/dist/components/{p-CocCQeEi.js.map → p-J05ZrIy8.js.map} +0 -0
- /package/dist/components/{p-CeUOn6zh.js.map → p-_46rt1sK.js.map} +0 -0
- /package/dist/components/{p-C0Z37bUn.js.map → p-fZNu4CkP.js.map} +0 -0
- /package/dist/components/{p-bROQezlS.js.map → p-jd_qrwk9.js.map} +0 -0
- /package/dist/components/{p-DES0wbqs.js.map → p-l7KxEsrG.js.map} +0 -0
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{r as t,c as e,h as o,H as s,g as a,F as i}from"./p-CdFSoe1d.js";import{b as l,S as n,C as r,F as c,I as h,T as d,o as m,i as y,c as b,s as u,D as p,f,R as g,n as k,M as v}from"./p-CbMKpwBI.js";import{B as w,S as x}from"./p-DZSl4MD1.js";import{i as C}from"./p-BVKhAhsB.js";import{N as S}from"./p-Bq3C8g8G.js";import"./p-D0tCcwtl.js";function z(t){return new I("any")}class I extends l{class="any";is=t=>t!=undefined}function T(){const t=navigator.language;return C.Locale.is(t)?t:C.Language.is(t)?C.Locale.toLocale(t):undefined}const D=()=>`smoothly-app{--header-height:5rem;display:block}smoothly-app>smoothly-notifier>main{height:calc(100dvh - var(--header-height))}smoothly-app[hidden]{display:none}smoothly-app>smoothly-notifier{height:100%;background:none}smoothly-app.smoothly-mobile-mode>smoothly-notifier>header:has(smoothly-burger)>nav>ul smoothly-app-room{width:100%;height:4em}smoothly-app>smoothly-notifier>header{position:sticky;top:0;z-index:20;width:100%;height:var(--header-height);display:flex;justify-content:space-between;box-sizing:border-box;align-items:center;box-shadow:0 1px 0 0 rgb(var(--smoothly-color-shade)) inset}smoothly-app>smoothly-notifier>header>nav{width:100%;flex-shrink:2;height:100%}smoothly-app>smoothly-notifier>header>nav,smoothly-app>smoothly-notifier>header>nav>ul{display:flex;margin:0}smoothly-app:not([label])>smoothly-notifier>header>h1{display:none}smoothly-app>smoothly-notifier>header>h1{margin-left:1rem;margin-bottom:0.8em;display:flex;height:100%}smoothly-app>smoothly-notifier>header>h1>a{display:inline-block;align-self:center;size:100%;background-position-y:center;text-decoration:none;white-space:nowrap}smoothly-app>smoothly-notifier>header>nav>ul{width:100%}smoothly-app>smoothly-notifier>header>nav>ul>div.nav-start-container{display:flex;align-items:center;height:100%}smoothly-app>smoothly-notifier>header>nav>ul>div.nav-end-container{display:flex;align-items:center;height:100%;margin-left:auto;margin-right:1rem}smoothly-app>smoothly-notifier>header>nav>ul>[slot="nav-end"]{width:fit-content;align-self:center;height:fit-content;margin-left:10rem}smoothly-app>smoothly-notifier>header>nav>ul li a{display:flex;height:2.3rem;text-decoration:none;align-items:center;align-self:center}smoothly-app.smoothly-mobile-mode:not([menu-open])>smoothly-notifier>header>nav{display:none}smoothly-app>smoothly-notifier>main>div{overflow-y:scroll;height:100%}smoothly-app.smoothly-mobile-mode>smoothly-notifier>header>nav{width:fit-content;max-width:100%;top:100%;position:absolute;max-height:calc(100dvh - var(--header-height));overflow-y:scroll;right:0;height:auto}smoothly-app.smoothly-mobile-mode>smoothly-notifier>header>nav,smoothly-app.smoothly-mobile-mode>smoothly-notifier>header>nav>ul{flex-direction:column;background-color:rgba(var(--smoothly-color))}smoothly-app.smoothly-mobile-mode>smoothly-notifier>header>nav>ul{padding:1.5rem;box-sizing:border-box}smoothly-app.smoothly-mobile-mode>smoothly-notifier>header>nav>ul li{margin-right:0;width:100%}smoothly-app:not(.smoothly-mobile-mode)>smoothly-notifier>header>smoothly-burger{display:none}smoothly-app.smoothly-mobile-mode>smoothly-notifier>header>smoothly-burger{position:absolute;top:0;right:0}smoothly-app.smoothly-mobile-mode>smoothly-notifier>header>nav>ul>[slot="nav-start"]{display:none}smoothly-app.smoothly-mobile-mode>smoothly-notifier>header>nav>ul>div.nav-start-container,smoothly-app.smoothly-mobile-mode>smoothly-notifier>header>nav>ul>div.nav-end-container{flex-direction:column;margin:0;align-items:start;justify-content:center}smoothly-app.smoothly-mobile-mode>smoothly-notifier>header>nav>ul>div.nav-start-container>*:last-child{margin-bottom:1em}`;const j=class{constructor(o){t(this,o);this.smoothlyUrlChange=e(this,"smoothlyUrlChange");this.menuOpen=false;this.navBreakpoint="48rem";this.mobileMode=false;this.rooms={}}componentWillLoad(){const t=window.matchMedia(`(max-width: ${this.navBreakpoint})`);this.mobileMode=t.matches;t.addEventListener("change",(t=>this.updateMobileMode(t.matches)))}componentDidLoad(){this.updateMobileMode(this.mobileMode)}updateMobileMode(t){this.mobileMode=t;Object.values(this.rooms).forEach((e=>e===null||e===void 0?void 0:e.element.setMobileMode(t)));if(!t){this.menuOpen=false}}async componentDidRender(){var t;if(!this.selected&&!window.location.search){(t=this.home&&this.rooms[this.home]?this.rooms[this.home]:Object.values(this.rooms).find((t=>!(t===null||t===void 0?void 0:t.element.disabled))))===null||t===void 0?void 0:t.element.setSelected(true)}}async selectRoom(t){var e;(e=this.rooms[t])===null||e===void 0?void 0:e.element.setSelected(true)}async selectedChanged(){var t;Object.values(this.rooms).forEach((t=>{var e;return(t===null||t===void 0?void 0:t.element.path)!=((e=this.selected)===null||e===void 0?void 0:e.element.path)&&(t===null||t===void 0?void 0:t.element.setSelected(false))}));const e=await((t=this.selected)===null||t===void 0?void 0:t.element.getContent());requestAnimationFrame((()=>{if(this.mainElement&&e){this.mainElement.replaceChildren(e)}}))}async locationChangeHandler(t){var e;(e=this.rooms[t.state.smoothlyPath])===null||e===void 0?void 0:e.element.setSelected(true,{history:true});this.smoothlyUrlChange.emit(window.location.href)}roomSelectedHandler(t){this.selected={element:t.target};if(this.mobileMode){this.menuOpen=false}if(!t.detail.history){const e=t.detail.path;const o=new URL(window.location.pathname==e?window.location.href:window.location.origin);o.pathname=e;o.search=t.detail.query?`?${t.detail.query}`:"";window.history.pushState({smoothlyPath:e,smoothlyQuery:t.detail.query||""},"",o.href)}}roomLoadedHandler(t){const e=this.rooms[t.target.path.toString()]={element:t.target};if(e.element.selected){this.selected=e}}clickHandler(t){if(this.mobileMode&&!t.composedPath().some((t=>t==this.burgerElement||t==this.navElement))){this.menuOpen=false}}render(){return o(s,{key:"746fa3adf359072b95f0b00ecea914189bdfead2",class:{"smoothly-mobile-mode":this.mobileMode}},o("smoothly-notifier",{key:"ddf542afef536ab6141394b658e82686bd414e69"},o("header",{key:"511a856fb813b5476a705c993734380ad94194cf",color:this.color},o("h1",{key:"9c3e79f9fcd3ef587183e3b83d646753a0f8dd7c"},o("a",{key:"9be4ba4d2ffaeaca1cb00752b5fcba0b1b64c261",href:""},this.label)),o("slot",{key:"92573b6cffad97e2afbfb6b6a7d5d1fb8f0ec59e",name:"header"}),o("nav",{key:"4a7c5cbbb39a82b845775d6dd0015a47ab72757d",ref:t=>this.navElement=t},o("ul",{key:"a8035a4e9143d4cd49ac4edfbb837785a8a58cd8"},o("div",{key:"2c4de281ad7f522c2c09acfcad890eadabc30c40",class:"nav-start-container"},o("slot",{key:"05e3f3a40f45d9505a463a29c90bbfcc2a3ff330",name:"nav-start"})),o("slot",{key:"695fd5bef476d1c00e5654803c03e94c8218943a"}),o("div",{key:"382c0271207f040374c3f69aa2946d0938bbb1c1",class:"nav-end-container"},o("slot",{key:"02fe44b3c557b7a930f24fdc465d8824eccbbbef",name:"nav-end"})))),o("smoothly-burger",{key:"fad0b5d8e2841ed284af04d9b0554e91ddf98575",ref:t=>this.burgerElement=t,open:this.menuOpen,onSmoothlyNavStatus:t=>(t.stopPropagation(),this.menuOpen=t.detail)})),o("main",{key:"5c6464b6db6e0eba2acbaf5efd549cebe08c1a95",ref:t=>this.mainElement=t})))}static get watchers(){return{selected:[{selectedChanged:0}]}}};j.style=D();const L=class{constructor(e){t(this,e)}urlChangeHandler(t){console.log("smoothlyUrlChange",t.detail)}render(){return o("smoothly-app",{key:"86d6cc67b58d8c7c04b9fd7e33891dfacb529943",color:"dark",label:"Smoothly Demo",home:"/root",ref:t=>this.app=t},o("smoothly-app-room",{key:"7012500cb2629c53e1156372722e8ef2b6d047eb",path:"/"},o("section",{key:"759dafafbd63e7fff5bf0acd0502e8eec36e8c64",style:{padding:"1em",maxWidth:"32em",margin:"0 auto"}},o("header",{key:"0ed18baa408a674f906abc32425ce6037662a476"},o("h1",{key:"22cb0dc61fece9d2d7acae6a55db19ccc57261df"},"Welcome")),o("p",{key:"d914f970b834d217cd2dfd7d2d05cd0c4b5dcb65"},"Smoothly is a component library written in ",o("a",{key:"3626d6388b49307f475e4071ef114039dcb51f60",href:"http://stenciljs.com"},"Stencil"),". It can therefore be used across web based frontend toolchains such as React, Vue, Angular, Svelte, and even plain HTML."),o("p",{key:"319549bf6b8cca5d5f9042b1f74c29e884545a59"},"This is particularly useful when trying to unifying the user experience across projects written in different technology stacks. It is also written to minimize the amount of code you need to write to achieve a nice user experience."))),o("smoothly-app-room",{key:"4c752059c00ad39c3bee1d36bdac99bfad027f5f",path:"/form",label:"Forms",content:o("smoothly-form-demo",null)}),o("smoothly-app-room",{key:"02b7dd008a64194f348bfb0679217ebbea05fac9",path:"/input",label:"Inputs",content:o("smoothly-input-demo",null)}),o("smoothly-app-room",{key:"41c7489608d0da9a8d4a2ab9b1a56c425cc36f21",path:"/table",label:"Tables",content:o("smoothly-table-demo",null)}),o("smoothly-app-room",{key:"b10b3c95084e9f27a6ebeaf5170bb10be8226c87",path:"/button",label:"Buttons",content:o("smoothly-button-demo",null)}),o("smoothly-app-room",{key:"f20620084dd779b954fa440b559db2bdccf0b3a3",path:"/icon",label:"Icons",content:o("smoothly-icon-demo",null)}),o("smoothly-app-room",{key:"5078c24c13064315cf8f761809e60cdfc1734c41",path:"/theme",label:"Theming",content:o("smoothly-theme-demo",null)}),o("smoothly-app-room",{key:"2a54a53a694e23460e96b9fb04483204f9e1c347",path:"/notifier",label:"Notices",content:o("smoothly-notifier-demo",null)}),o("smoothly-app-room",{key:"d57766baebf8df0791e1e5f845c2bac7d7b8729f",path:"/dialog",label:"Dialogs",content:o("smoothly-dialog-demo",null),slot:"nav-end"}),o("smoothly-app-room",{key:"d5bde6145e9950a3ddcda8e24d811203a4b69f27",path:"/display",label:"Display",content:o("smoothly-display-demo",null),slot:"nav-end"}),o("smoothly-app-room",{key:"3d56ef533e12cb88ec84bd2fdc63a60e64031083",path:"/tabs",label:"Tabs",slot:"nav-end"},o("smoothly-tabs-demo",{key:"271d70eb22cc0152161d42c137a3d00c19c6bba3"})),o("smoothly-app-room",{key:"c0cbe202e3d74ceacd8e88795c58ece2c1392bf5",path:"/links",label:"Links",slot:"nav-end"},o("smoothly-input",{key:"a39f0e568b614baaf271585da4ee013e48ff24fe",type:"text"},"Default"),o("div",{key:"a75dc6524b85da5e0c81b75a9b74d020c2723384",style:{padding:"1em",maxWidth:"12em"}},o("smoothly-button",{key:"a3820b0c802acc358ee3ab4ca9483411bdff04a8",fill:"solid",color:"danger",link:"https://google.com"},"open"),o("smoothly-button",{key:"fd1c12e214b53d8acdb8828cb616356ae8fe94e9",fill:"solid",color:"danger",link:"https://www.w3.org/WAI/ER/tests/xhtml/testfiles/resources/pdf/dummy.pdf",type:"download"},"download"),o("smoothly-button",{key:"f7c9c0a9eb4ca942f56e02b840087398a2688cd8",fill:"solid",color:"danger",onClick:()=>alert("clicked")},"action"),o("smoothly-button",{key:"ebce581340217e91d6abf1bbff7538f77c5842ae",disabled:true,fill:"solid",color:"danger",onClick:()=>alert("clicked")},"action"),o("smoothly-button",{key:"01c20890774174c6ec793de4711d8e0530630108",type:"link",fill:"clear",color:"danger",onClick:()=>alert("clicked")},"action link"))),o("smoothly-app-room",{key:"42945bb6698943a783d0502f3ff0a08cb6ad583e",path:"/redirect",label:"Redirect",slot:"nav-end"},o("smoothly-button",{key:"b022c14f0680b1ca5f511cd87ab152a9ffb5b15d",type:"link",link:"/input"},"To input"),o("smoothly-button",{key:"566a1821001da85b67ce9f68f74b590c5319f060",type:"link",link:"../button"},"To button"),o("smoothly-button",{key:"e99bbe6cbb348b2c8b2dba558458c08dea22db21",type:"link",link:new URL("/hidden",window.location.origin).href},"To hidden"),o("smoothly-button",{key:"61e59ec9039a63b1d9c50c6705dc0098027be92a",type:"link",link:"/redirect"},"To redirect"),o("smoothly-button",{key:"511eba63ae34b4151e99ce482cb532849ab91dd7",type:"link",link:"nested"},"To redirect nested, relative path")),o("smoothly-app-room",{key:"bac6fa14c1c0dd2ebda292fe70255e53f466dc00",path:"/hidden"},o("p",{key:"1acd1207b775790f189fd8d8c3fb96a5b8d8a991"},"hello world!")),o("smoothly-app-room",{key:"2ecda7ecb183b382bb2987195af5a96e13e3b8b1",path:"/redirect/nested"},"this is a nested room"))}};var R=class{constructor(t,e,o,s,a,i){this.type=3;this.name="";this.prefix="";this.value="";this.suffix="";this.modifier=3;this.type=t;this.name=e;this.prefix=o;this.value=s;this.suffix=a;this.modifier=i}hasCustomName(){return this.name!==""&&typeof this.name!=="number"}};var _=/[$_\p{ID_Start}]/u;var A=/[$_\u200C\u200D\p{ID_Continue}]/u;var $=".*";function M(t,e){return/^[\x00-\x7F]*$/.test(t)}function E(t,e=false){const o=[];let s=0;while(s<t.length){const a=t[s];const i=function(a){if(!e)throw new TypeError(a);o.push({type:"INVALID_CHAR",index:s,value:t[s++]})};if(a==="*"){o.push({type:"ASTERISK",index:s,value:t[s++]});continue}if(a==="+"||a==="?"){o.push({type:"OTHER_MODIFIER",index:s,value:t[s++]});continue}if(a==="\\"){o.push({type:"ESCAPED_CHAR",index:s++,value:t[s++]});continue}if(a==="{"){o.push({type:"OPEN",index:s,value:t[s++]});continue}if(a==="}"){o.push({type:"CLOSE",index:s,value:t[s++]});continue}if(a===":"){let e="";let a=s+1;while(a<t.length){const o=t.substr(a,1);if(a===s+1&&_.test(o)||a!==s+1&&A.test(o)){e+=t[a++];continue}break}if(!e){i(`Missing parameter name at ${s}`);continue}o.push({type:"NAME",index:s,value:e});s=a;continue}if(a==="("){let e=1;let a="";let l=s+1;let n=false;if(t[l]==="?"){i(`Pattern cannot start with "?" at ${l}`);continue}while(l<t.length){if(!M(t[l])){i(`Invalid character '${t[l]}' at ${l}.`);n=true;break}if(t[l]==="\\"){a+=t[l++]+t[l++];continue}if(t[l]===")"){e--;if(e===0){l++;break}}else if(t[l]==="("){e++;if(t[l+1]!=="?"){i(`Capturing groups are not allowed at ${l}`);n=true;break}}a+=t[l++]}if(n){continue}if(e){i(`Unbalanced pattern at ${s}`);continue}if(!a){i(`Missing pattern at ${s}`);continue}o.push({type:"REGEX",index:s,value:a});s=l;continue}o.push({type:"CHAR",index:s,value:t[s++]})}o.push({type:"END",index:s,value:""});return o}function O(t,e={}){const o=E(t);e.delimiter??(e.delimiter="/#?");e.prefixes??(e.prefixes="./");const s=`[^${P(e.delimiter)}]+?`;const a=[];let i=0;let l=0;let n=new Set;const r=t=>{if(l<o.length&&o[l].type===t)return o[l++].value};const c=()=>r("OTHER_MODIFIER")??r("ASTERISK");const h=t=>{const e=r(t);if(e!==void 0)return e;const{type:s,index:a}=o[l];throw new TypeError(`Unexpected ${s} at ${a}, expected ${t}`)};const d=()=>{let t="";let e;while(e=r("CHAR")??r("ESCAPED_CHAR")){t+=e}return t};const m=t=>t;const y=e.encodePart||m;let b="";const u=t=>{b+=t};const p=()=>{if(!b.length){return}a.push(new R(3,"","",y(b),"",3));b=""};const f=(t,e,o,l,r)=>{let c=3;switch(r){case"?":c=1;break;case"*":c=0;break;case"+":c=2;break}if(!e&&!o&&c===3){u(t);return}p();if(!e&&!o){if(!t){return}a.push(new R(3,"","",y(t),"",c));return}let h;if(!o){h=s}else if(o==="*"){h=$}else{h=o}let d=2;if(h===s){d=1;h=""}else if(h===$){d=0;h=""}let m;if(e){m=e}else if(o){m=i++}if(n.has(m)){throw new TypeError(`Duplicate name '${m}'.`)}n.add(m);a.push(new R(d,m,y(t),h,y(l),c))};while(l<o.length){const t=r("CHAR");const o=r("NAME");let s=r("REGEX");if(!o&&!s){s=r("ASTERISK")}if(o||s){let a=t??"";if(e.prefixes.indexOf(a)===-1){u(a);a=""}p();let i=c();f(a,o,s,"",i);continue}const a=t??r("ESCAPED_CHAR");if(a){u(a);continue}const i=r("OPEN");if(i){const t=d();const e=r("NAME");let o=r("REGEX");if(!e&&!o){o=r("ASTERISK")}const s=d();h("CLOSE");const a=c();f(t,e,o,s,a);continue}p();h("END")}return a}function P(t){return t.replace(/([.+*?^${}()[\]|/\\])/g,"\\$1")}function H(t){return t&&t.ignoreCase?"ui":"u"}function F(t,e,o){return N(O(t,o),e,o)}function U(t){switch(t){case 0:return"*";case 1:return"?";case 2:return"+";case 3:return""}}function N(t,e,o={}){o.delimiter??(o.delimiter="/#?");o.prefixes??(o.prefixes="./");o.sensitive??(o.sensitive=false);o.strict??(o.strict=false);o.end??(o.end=true);o.start??(o.start=true);o.endsWith="";let s=o.start?"^":"";for(const a of t){if(a.type===3){if(a.modifier===3){s+=P(a.value)}else{s+=`(?:${P(a.value)})${U(a.modifier)}`}continue}if(e)e.push(a.name);const t=`[^${P(o.delimiter)}]+?`;let i=a.value;if(a.type===1)i=t;else if(a.type===0)i=$;if(!a.prefix.length&&!a.suffix.length){if(a.modifier===3||a.modifier===1){s+=`(${i})${U(a.modifier)}`}else{s+=`((?:${i})${U(a.modifier)})`}continue}if(a.modifier===3||a.modifier===1){s+=`(?:${P(a.prefix)}(${i})${P(a.suffix)})`;s+=U(a.modifier);continue}s+=`(?:${P(a.prefix)}`;s+=`((?:${i})(?:`;s+=P(a.suffix);s+=P(a.prefix);s+=`(?:${i}))*)${P(a.suffix)})`;if(a.modifier===0){s+="?"}}const a=`[${P(o.endsWith)}]|$`;const i=`[${P(o.delimiter)}]`;if(o.end){if(!o.strict){s+=`${i}?`}if(!o.endsWith.length){s+="$"}else{s+=`(?=${a})`}return new RegExp(s,H(o))}if(!o.strict){s+=`(?:${i}(?=${a}))?`}let l=false;if(t.length){const e=t[t.length-1];if(e.type===3&&e.modifier===3){l=o.delimiter.indexOf(e)>-1}}if(!l){s+=`(?=${i}|${a})`}return new RegExp(s,H(o))}var Y={delimiter:"",prefixes:"",sensitive:true,strict:true};var W={delimiter:".",prefixes:"",sensitive:true,strict:true};var B={delimiter:"/",prefixes:"/",sensitive:true,strict:true};function V(t,e){if(!t.length){return false}if(t[0]==="/"){return true}if(!e){return false}if(t.length<2){return false}if((t[0]=="\\"||t[0]=="{")&&t[1]=="/"){return true}return false}function G(t,e){if(t.startsWith(e)){return t.substring(e.length,t.length)}return t}function K(t,e){if(t.endsWith(e)){return t.substr(0,t.length-e.length)}return t}function q(t){if(!t||t.length<2){return false}if(t[0]==="["){return true}if((t[0]==="\\"||t[0]==="{")&&t[1]==="["){return true}return false}var Z=["ftp","file","http","https","ws","wss"];function J(t){if(!t){return true}for(const e of Z){if(t.test(e)){return true}}return false}function X(t,e){t=G(t,"#");if(e||t===""){return t}const o=new URL("https://example.com");o.hash=t;return o.hash?o.hash.substring(1,o.hash.length):""}function Q(t,e){t=G(t,"?");if(e||t===""){return t}const o=new URL("https://example.com");o.search=t;return o.search?o.search.substring(1,o.search.length):""}function tt(t,e){if(e||t===""){return t}if(q(t)){return dt(t)}else{return ht(t)}}function et(t,e){if(e||t===""){return t}const o=new URL("https://example.com");o.password=t;return o.password}function ot(t,e){if(e||t===""){return t}const o=new URL("https://example.com");o.username=t;return o.username}function st(t,e,o){if(o||t===""){return t}if(e&&!Z.includes(e)){const o=new URL(`${e}:${t}`);return o.pathname}const s=t[0]=="/";t=new URL(!s?"/-"+t:t,"https://example.com").pathname;if(!s){t=t.substring(2,t.length)}return t}function at(t,e,o){if(lt(e)===t){t=""}if(o||t===""){return t}return mt(t)}function it(t,e){t=K(t,":");if(e||t===""){return t}return nt(t)}function lt(t){switch(t){case"ws":case"http":return"80";case"wws":case"https":return"443";case"ftp":return"21";default:return""}}function nt(t){if(t===""){return t}if(/^[-+.A-Za-z0-9]*$/.test(t))return t.toLowerCase();throw new TypeError(`Invalid protocol '${t}'.`)}function rt(t){if(t===""){return t}const e=new URL("https://example.com");e.username=t;return e.username}function ct(t){if(t===""){return t}const e=new URL("https://example.com");e.password=t;return e.password}function ht(t){if(t===""){return t}if(/[\t\n\r #%/:<>?@[\]^\\|]/g.test(t)){throw new TypeError(`Invalid hostname '${t}'`)}const e=new URL("https://example.com");e.hostname=t;return e.hostname}function dt(t){if(t===""){return t}if(/[^0-9a-fA-F[\]:]/g.test(t)){throw new TypeError(`Invalid IPv6 hostname '${t}'`)}return t.toLowerCase()}function mt(t){if(t===""){return t}if(/^[0-9]*$/.test(t)&&parseInt(t)<=65535){return t}throw new TypeError(`Invalid port '${t}'.`)}function yt(t){if(t===""){return t}const e=new URL("https://example.com");e.pathname=t[0]!=="/"?"/-"+t:t;if(t[0]!=="/"){return e.pathname.substring(2,e.pathname.length)}return e.pathname}function bt(t){if(t===""){return t}const e=new URL(`data:${t}`);return e.pathname}function ut(t){if(t===""){return t}const e=new URL("https://example.com");e.search=t;return e.search.substring(1,e.search.length)}function pt(t){if(t===""){return t}const e=new URL("https://example.com");e.hash=t;return e.hash.substring(1,e.hash.length)}var ft=class{constructor(t){this.tokenList=[];this.internalResult={};this.tokenIndex=0;this.tokenIncrement=1;this.componentStart=0;this.state=0;this.groupDepth=0;this.hostnameIPv6BracketDepth=0;this.shouldTreatAsStandardURL=false;this.input=t}get result(){return this.internalResult}parse(){this.tokenList=E(this.input,true);for(;this.tokenIndex<this.tokenList.length;this.tokenIndex+=this.tokenIncrement){this.tokenIncrement=1;if(this.tokenList[this.tokenIndex].type==="END"){if(this.state===0){this.rewind();if(this.isHashPrefix()){this.changeState(9,1)}else if(this.isSearchPrefix()){this.changeState(8,1);this.internalResult.hash=""}else{this.changeState(7,0);this.internalResult.search="";this.internalResult.hash=""}continue}else if(this.state===2){this.rewindAndSetState(5);continue}this.changeState(10,0);break}if(this.groupDepth>0){if(this.isGroupClose()){this.groupDepth-=1}else{continue}}if(this.isGroupOpen()){this.groupDepth+=1;continue}switch(this.state){case 0:if(this.isProtocolSuffix()){this.internalResult.username="";this.internalResult.password="";this.internalResult.hostname="";this.internalResult.port="";this.internalResult.pathname="";this.internalResult.search="";this.internalResult.hash="";this.rewindAndSetState(1)}break;case 1:if(this.isProtocolSuffix()){this.computeShouldTreatAsStandardURL();let t=7;let e=1;if(this.shouldTreatAsStandardURL){this.internalResult.pathname="/"}if(this.nextIsAuthoritySlashes()){t=2;e=3}else if(this.shouldTreatAsStandardURL){t=2}this.changeState(t,e)}break;case 2:if(this.isIdentityTerminator()){this.rewindAndSetState(3)}else if(this.isPathnameStart()||this.isSearchPrefix()||this.isHashPrefix()){this.rewindAndSetState(5)}break;case 3:if(this.isPasswordPrefix()){this.changeState(4,1)}else if(this.isIdentityTerminator()){this.changeState(5,1)}break;case 4:if(this.isIdentityTerminator()){this.changeState(5,1)}break;case 5:if(this.isIPv6Open()){this.hostnameIPv6BracketDepth+=1}else if(this.isIPv6Close()){this.hostnameIPv6BracketDepth-=1}if(this.isPortPrefix()&&!this.hostnameIPv6BracketDepth){this.changeState(6,1)}else if(this.isPathnameStart()){this.changeState(7,0)}else if(this.isSearchPrefix()){this.changeState(8,1)}else if(this.isHashPrefix()){this.changeState(9,1)}break;case 6:if(this.isPathnameStart()){this.changeState(7,0)}else if(this.isSearchPrefix()){this.changeState(8,1)}else if(this.isHashPrefix()){this.changeState(9,1)}break;case 7:if(this.isSearchPrefix()){this.changeState(8,1)}else if(this.isHashPrefix()){this.changeState(9,1)}break;case 8:if(this.isHashPrefix()){this.changeState(9,1)}break}}}changeState(t,e){switch(this.state){case 0:break;case 1:this.internalResult.protocol=this.makeComponentString();break;case 2:break;case 3:this.internalResult.username=this.makeComponentString();break;case 4:this.internalResult.password=this.makeComponentString();break;case 5:this.internalResult.hostname=this.makeComponentString();break;case 6:this.internalResult.port=this.makeComponentString();break;case 7:this.internalResult.pathname=this.makeComponentString();break;case 8:this.internalResult.search=this.makeComponentString();break;case 9:this.internalResult.hash=this.makeComponentString();break}this.changeStateWithoutSettingComponent(t,e)}changeStateWithoutSettingComponent(t,e){this.state=t;this.componentStart=this.tokenIndex+e;this.tokenIndex+=e;this.tokenIncrement=0}rewind(){this.tokenIndex=this.componentStart;this.tokenIncrement=0}rewindAndSetState(t){this.rewind();this.state=t}safeToken(t){if(t<0){t=this.tokenList.length-t}if(t<this.tokenList.length){return this.tokenList[t]}return this.tokenList[this.tokenList.length-1]}isNonSpecialPatternChar(t,e){const o=this.safeToken(t);return o.value===e&&(o.type==="CHAR"||o.type==="ESCAPED_CHAR"||o.type==="INVALID_CHAR")}isProtocolSuffix(){return this.isNonSpecialPatternChar(this.tokenIndex,":")}nextIsAuthoritySlashes(){return this.isNonSpecialPatternChar(this.tokenIndex+1,"/")&&this.isNonSpecialPatternChar(this.tokenIndex+2,"/")}isIdentityTerminator(){return this.isNonSpecialPatternChar(this.tokenIndex,"@")}isPasswordPrefix(){return this.isNonSpecialPatternChar(this.tokenIndex,":")}isPortPrefix(){return this.isNonSpecialPatternChar(this.tokenIndex,":")}isPathnameStart(){return this.isNonSpecialPatternChar(this.tokenIndex,"/")}isSearchPrefix(){if(this.isNonSpecialPatternChar(this.tokenIndex,"?")){return true}if(this.tokenList[this.tokenIndex].value!=="?"){return false}const t=this.safeToken(this.tokenIndex-1);return t.type!=="NAME"&&t.type!=="REGEX"&&t.type!=="CLOSE"&&t.type!=="ASTERISK"}isHashPrefix(){return this.isNonSpecialPatternChar(this.tokenIndex,"#")}isGroupOpen(){return this.tokenList[this.tokenIndex].type=="OPEN"}isGroupClose(){return this.tokenList[this.tokenIndex].type=="CLOSE"}isIPv6Open(){return this.isNonSpecialPatternChar(this.tokenIndex,"[")}isIPv6Close(){return this.isNonSpecialPatternChar(this.tokenIndex,"]")}makeComponentString(){const t=this.tokenList[this.tokenIndex];const e=this.safeToken(this.componentStart).index;return this.input.substring(e,t.index)}computeShouldTreatAsStandardURL(){const t={};Object.assign(t,Y);t.encodePart=nt;const e=F(this.makeComponentString(),void 0,t);this.shouldTreatAsStandardURL=J(e)}};var gt=["protocol","username","password","hostname","port","pathname","search","hash"];var kt="*";function vt(t,e){if(typeof t!=="string"){throw new TypeError(`parameter 1 is not of type 'string'.`)}const o=new URL(t,e);return{protocol:o.protocol.substring(0,o.protocol.length-1),username:o.username,password:o.password,hostname:o.hostname,port:o.port,pathname:o.pathname,search:o.search!==""?o.search.substring(1,o.search.length):void 0,hash:o.hash!==""?o.hash.substring(1,o.hash.length):void 0}}function wt(t,e){if(!e){return t}return Ct(t)}function xt(t,e,o){let s;if(typeof e.baseURL==="string"){try{s=new URL(e.baseURL);t.protocol=wt(s.protocol.substring(0,s.protocol.length-1),o);t.username=wt(s.username,o);t.password=wt(s.password,o);t.hostname=wt(s.hostname,o);t.port=wt(s.port,o);t.pathname=wt(s.pathname,o);t.search=wt(s.search.substring(1,s.search.length),o);t.hash=wt(s.hash.substring(1,s.hash.length),o)}catch{throw new TypeError(`invalid baseURL '${e.baseURL}'.`)}}if(typeof e.protocol==="string"){t.protocol=it(e.protocol,o)}if(typeof e.username==="string"){t.username=ot(e.username,o)}if(typeof e.password==="string"){t.password=et(e.password,o)}if(typeof e.hostname==="string"){t.hostname=tt(e.hostname,o)}if(typeof e.port==="string"){t.port=at(e.port,t.protocol,o)}if(typeof e.pathname==="string"){t.pathname=e.pathname;if(s&&!V(t.pathname,o)){const e=s.pathname.lastIndexOf("/");if(e>=0){t.pathname=wt(s.pathname.substring(0,e+1),o)+t.pathname}}t.pathname=st(t.pathname,t.protocol,o)}if(typeof e.search==="string"){t.search=Q(e.search,o)}if(typeof e.hash==="string"){t.hash=X(e.hash,o)}return t}function Ct(t){return t.replace(/([+*?:{}()\\])/g,"\\$1")}function St(t){return t.replace(/([.+*?^${}()[\]|/\\])/g,"\\$1")}function zt(t,e){e.delimiter??(e.delimiter="/#?");e.prefixes??(e.prefixes="./");e.sensitive??(e.sensitive=false);e.strict??(e.strict=false);e.end??(e.end=true);e.start??(e.start=true);e.endsWith="";const o=".*";const s=`[^${St(e.delimiter)}]+?`;const a=/[$_\u200C\u200D\p{ID_Continue}]/u;let i="";for(let l=0;l<t.length;++l){const n=t[l];if(n.type===3){if(n.modifier===3){i+=Ct(n.value);continue}i+=`{${Ct(n.value)}}${U(n.modifier)}`;continue}const r=n.hasCustomName();let c=!!n.suffix.length||!!n.prefix.length&&(n.prefix.length!==1||!e.prefixes.includes(n.prefix));const h=l>0?t[l-1]:null;const d=l<t.length-1?t[l+1]:null;if(!c&&r&&n.type===1&&n.modifier===3&&d&&!d.prefix.length&&!d.suffix.length){if(d.type===3){const t=d.value.length>0?d.value[0]:"";c=a.test(t)}else{c=!d.hasCustomName()}}if(!c&&!n.prefix.length&&h&&h.type===3){const t=h.value[h.value.length-1];c=e.prefixes.includes(t)}if(c){i+="{"}i+=Ct(n.prefix);if(r){i+=`:${n.name}`}if(n.type===2){i+=`(${n.value})`}else if(n.type===1){if(!r){i+=`(${s})`}}else if(n.type===0){if(!r&&(!h||h.type===3||h.modifier!==3||c||n.prefix!=="")){i+="*"}else{i+=`(${o})`}}if(n.type===1&&r&&!!n.suffix.length){if(a.test(n.suffix[0])){i+="\\"}}i+=Ct(n.suffix);if(c){i+="}"}if(n.modifier!==3){i+=U(n.modifier)}}return i}var It=class t{constructor(t={},e,o){this.regexp={};this.names={};this.component_pattern={};this.parts={};try{let s=void 0;if(typeof e==="string"){s=e}else{o=e}if(typeof t==="string"){const e=new ft(t);e.parse();t=e.result;if(s===void 0&&typeof t.protocol!=="string"){throw new TypeError(`A base URL must be provided for a relative constructor string.`)}t.baseURL=s}else{if(!t||typeof t!=="object"){throw new TypeError(`parameter 1 is not of type 'string' and cannot convert to dictionary.`)}if(s){throw new TypeError(`parameter 1 is not of type 'string'.`)}}if(typeof o==="undefined"){o={ignoreCase:false}}const a={ignoreCase:o.ignoreCase===true};const i={pathname:kt,protocol:kt,username:kt,password:kt,hostname:kt,port:kt,search:kt,hash:kt};this.pattern=xt(i,t,true);if(lt(this.pattern.protocol)===this.pattern.port){this.pattern.port=""}let l;for(l of gt){if(!(l in this.pattern))continue;const t={};const e=this.pattern[l];this.names[l]=[];switch(l){case"protocol":Object.assign(t,Y);t.encodePart=nt;break;case"username":Object.assign(t,Y);t.encodePart=rt;break;case"password":Object.assign(t,Y);t.encodePart=ct;break;case"hostname":Object.assign(t,W);if(q(e)){t.encodePart=dt}else{t.encodePart=ht}break;case"port":Object.assign(t,Y);t.encodePart=mt;break;case"pathname":if(J(this.regexp.protocol)){Object.assign(t,B,a);t.encodePart=yt}else{Object.assign(t,Y,a);t.encodePart=bt}break;case"search":Object.assign(t,Y,a);t.encodePart=ut;break;case"hash":Object.assign(t,Y,a);t.encodePart=pt;break}try{this.parts[l]=O(e,t);this.regexp[l]=N(this.parts[l],this.names[l],t);this.component_pattern[l]=zt(this.parts[l],t)}catch(t){throw new TypeError(`invalid ${l} pattern '${this.pattern[l]}'.`)}}}catch(t){throw new TypeError(`Failed to construct 'URLPattern': ${t.message}`)}}test(t={},e){let o={pathname:"",protocol:"",username:"",password:"",hostname:"",port:"",search:"",hash:""};if(typeof t!=="string"&&e){throw new TypeError(`parameter 1 is not of type 'string'.`)}if(typeof t==="undefined"){return false}try{if(typeof t==="object"){o=xt(o,t,false)}else{o=xt(o,vt(t,e),false)}}catch(t){return false}let s;for(s of gt){if(!this.regexp[s].exec(o[s])){return false}}return true}exec(t={},e){let o={pathname:"",protocol:"",username:"",password:"",hostname:"",port:"",search:"",hash:""};if(typeof t!=="string"&&e){throw new TypeError(`parameter 1 is not of type 'string'.`)}if(typeof t==="undefined"){return}try{if(typeof t==="object"){o=xt(o,t,false)}else{o=xt(o,vt(t,e),false)}}catch(t){return null}let s={};if(e){s.inputs=[t,e]}else{s.inputs=[t]}let a;for(a of gt){let t=this.regexp[a].exec(o[a]);if(!t){return null}let e={};for(let[o,s]of this.names[a].entries()){if(typeof s==="string"||typeof s==="number"){let a=t[o+1];e[s]=a}}s[a]={input:o[a]??"",groups:e}}return s}static compareComponent(t,e,o){const s=(t,e)=>{for(let o of["type","modifier","prefix","value","suffix"]){if(t[o]<e[o])return-1;else if(t[o]===e[o])continue;else return 1}return 0};const a=new R(3,"","","","",3);const i=new R(0,"","","","",3);const l=(t,e)=>{let o=0;for(;o<Math.min(t.length,e.length);++o){let a=s(t[o],e[o]);if(a)return a}if(t.length===e.length){return 0}return s(t[o]??a,e[o]??a)};if(!e.component_pattern[t]&&!o.component_pattern[t]){return 0}if(e.component_pattern[t]&&!o.component_pattern[t]){return l(e.parts[t],[i])}if(!e.component_pattern[t]&&o.component_pattern[t]){return l([i],o.parts[t])}return l(e.parts[t],o.parts[t])}get protocol(){return this.component_pattern.protocol}get username(){return this.component_pattern.username}get password(){return this.component_pattern.password}get hostname(){return this.component_pattern.hostname}get port(){return this.component_pattern.port}get pathname(){return this.component_pattern.pathname}get search(){return this.component_pattern.search}get hash(){return this.component_pattern.hash}};if(!globalThis.URLPattern){globalThis.URLPattern=It}const Tt=()=>`.sc-smoothly-app-room-h{display:flex;justify-content:center;text-align:center;cursor:pointer;height:100%;position:relative}.sc-smoothly-app-room-h>div.sc-smoothly-app-room{overflow-y:auto;height:100%}:not([label].sc-smoothly-app-room-h,[icon]).sc-smoothly-app-room-h,[disabled].sc-smoothly-app-room-h{display:none}.sc-smoothly-app-room-h>div.sc-smoothly-app-room{display:none}.sc-smoothly-app-room-h>li.sc-smoothly-app-room{height:100%;list-style:none}.sc-smoothly-app-room-h>li.sc-smoothly-app-room>a.sc-smoothly-app-room{padding:0 1.5em;height:100%}[selected].sc-smoothly-app-room-h>li.sc-smoothly-app-room>a.sc-smoothly-app-room{display:flex;color:rgb(var(--smoothly-color-contrast));background:rgb(var(--smoothly-color-shade))}.sc-smoothly-app-room-h:hover>li.sc-smoothly-app-room>a.sc-smoothly-app-room{color:rgb(var(--smoothly-color-contrast));background-color:rgb(var(--smoothly-color-tint));transition:0.2s}.sc-smoothly-app-room-h>li.sc-smoothly-app-room>a.sc-smoothly-app-room>smoothly-icon.sc-smoothly-app-room{align-self:inherit}[icon].sc-smoothly-app-room-h>li.sc-smoothly-app-room>a.sc-smoothly-app-room>.label.sc-smoothly-app-room{display:none}[icon][label].sc-smoothly-app-room-h:hover::before,[icon][label].sc-smoothly-app-room-h:hover::after{position:absolute;color:rgb(var(--smoothly-color-contrast));background-color:rgb(var(--smoothly-color-tint));border-radius:0.25rem;pointer-events:none}[icon][label].sc-smoothly-app-room-h:hover::before{content:"";bottom:-1.75rem;transform:rotate(45deg);width:1.25em;height:1.25em}[icon][label].sc-smoothly-app-room-h:hover::after{content:attr(label);white-space:nowrap;bottom:-3.25rem;padding:.5rem 1rem;border-radius:.25rem}.smoothly-mobile-mode.sc-smoothly-app-room-h>li.sc-smoothly-app-room>a.sc-smoothly-app-room{padding:0}.smoothly-mobile-mode[icon].sc-smoothly-app-room-h>li.sc-smoothly-app-room>a.sc-smoothly-app-room>.label.sc-smoothly-app-room{display:unset;padding:0 1rem}.smoothly-mobile-mode.sc-smoothly-app-room-h>li.sc-smoothly-app-room>a.sc-smoothly-app-room{margin-left:-1.5rem;margin-right:-1.5rem;padding-left:1.5rem;padding-right:1.5rem}.smoothly-mobile-mode[icon][label].sc-smoothly-app-room-h:hover::before,.smoothly-mobile-mode[icon][label].sc-smoothly-app-room-h:hover::after{content:unset}`;const Dt=class{constructor(o){t(this,o);this.smoothlyRoomSelect=e(this,"smoothlyRoomSelect");this.smoothlyRoomLoad=e(this,"smoothlyRoomLoad");this.smoothlyUrlChange=e(this,"smoothlyUrlChange");this.path="";this.mobileMode=false}componentDidRender(){this.selected&&this.smoothlyUrlChange.emit(window.location.href)}componentWillLoad(){const t=Array.isArray(this.path)?this.path:[this.path];this.paths=t.map((t=>typeof t=="string"?new URLPattern({pathname:t}):t));this.selected=this.paths.some((t=>t.test(window.location.href)));this.smoothlyRoomLoad.emit({selected:this.selected});this.selected&&window.history.replaceState({smoothlyPath:this.paths[0].pathname},"",window.location.href)}async setMobileMode(t){this.mobileMode=t}async getContent(){return this.contentElement}async setSelected(t,e){this.selected=t;if(t){this.smoothlyRoomSelect.emit({history:!!(e===null||e===void 0?void 0:e.history),path:this.paths[0].pathname,query:this.query})}}async setQuery(t){if(t.detail.path==this.path&&this.query!=t.detail.query){this.query=t.detail.query;window.history.pushState({smoothlyPath:this.path,smoothlyQuery:this.query},"",`${window.location.pathname}${this.query?`?${this.query}`:""}`);this.smoothlyUrlChange.emit(window.location.href)}}clickHandler(t){if(!t.metaKey&&!t.ctrlKey&&t.which!=2&&t.button!=1){t.preventDefault();this.setSelected(true)}}render(){var t;return o(s,{key:"a85747f78cb72957e52a35bb4a5ddf7fd38c8901",class:{"smoothly-mobile-mode":this.mobileMode}},o("li",{key:"2a89979ce87b7cbcbc250014d6c60110bdf8c7eb"},o("a",{key:"e7c03470ceab8f52195b90eb04d97678a75368a4",href:(t=this.paths[0])===null||t===void 0?void 0:t.pathname,onClick:t=>this.clickHandler(t)},this.icon&&o("smoothly-icon",{key:"0b40566be9199d9c34b75ec1260fac0e962c0fd6",name:this.icon}),this.label&&o("span",{key:"e55412f3a1c041d81b1d3a4e7751a315eafeede3",class:"label"},this.label))),o("div",{key:"30eb0eda3109314348f4036ed6206779ad8cee96",ref:t=>this.contentElement=t},this.content&&o("smoothly-lazy",{key:"929973767465e67ba49580978d83811f31637b9f",content:this.content}),o("slot",{key:"a96c18f28066755f450174e9372e4ef8a25a7c57"})))}};Dt.style=Tt();const jt=()=>`.sc-smoothly-back-to-top-h{background-color:rgba(var(--smoothly-default-color), 1);opacity:var(--opacity);pointer-events:var(--pointer-events);transition:opacity 400ms;z-index:3;border-radius:50%;box-shadow:var(--smoothly-shadow);height:3rem;width:3rem;position:fixed;bottom:var(--bottom);right:var(--right);outline:none;cursor:pointer;display:flex;justify-content:center;align-items:center}`;const Lt=class{constructor(e){t(this,e);this.opacity="0.5";this.bottom="1rem";this.right="1rem"}componentWillLoad(){var t;this.scrollableParent=n.findParent(this.element);(t=this.scrollableParent)===null||t===void 0?void 0:t.addEventListener("scroll",(()=>{var t,e;this.visible=((e=(t=this.scrollableParent)===null||t===void 0?void 0:t.scrollTop)!==null&&e!==void 0?e:0)>20}))}render(){const t={"--opacity":this.visible?this.opacity:"0","--pointer-events":this.visible?"auto":"none","--bottom":this.bottom,"--right":this.right};return o(s,{key:"5743000aaec20538ad6a57688015cb4afd65d56b",style:t,onClick:()=>{var t;return(t=this.scrollableParent)===null||t===void 0?void 0:t.scrollTo({top:0,left:0,behavior:"smooth"})}},o("smoothly-icon",{key:"39ed5f8fb75c131e62e588101ec26fca43c7ca2c",name:"caret-up-outline"}))}get element(){return a(this)}};Lt.style=jt();const Rt=()=>`.sc-smoothly-burger-h{display:flex;justify-content:center;align-items:center;height:100%;cursor:pointer}.sc-smoothly-burger-h smoothly-icon.sc-smoothly-burger{--smoothly-icon-size:3rem;margin-right:1em}.sc-smoothly-burger-h:not([open]) smoothly-icon.sc-smoothly-burger{transform:rotate(0deg);transition:transform 100ms ease-in-out}[open].sc-smoothly-burger-h smoothly-icon.sc-smoothly-burger{transform:rotate(-90deg);transition:transform 100ms ease-in-out}`;const _t=class{constructor(o){t(this,o);this.smoothlyNavStatus=e(this,"smoothlyNavStatus");this.open=false}openChanged(){this.smoothlyNavStatus.emit(this.open)}clickHandler(){this.open=!this.open}render(){return o(s,{key:"000c346b45f190a4616e30bd6b64c24a00d0be00"},o("smoothly-icon",{key:"be31c4e7dc3a8848a633801f705988329602805b",name:"menu"}))}get element(){return a(this)}static get watchers(){return{open:[{openChanged:0}]}}};_t.style=Rt();const At=()=>`[color=default].sc-smoothly-button{--smoothly-color:var(--smoothly-default-color);--smoothly-color-contrast:var(--smoothly-default-contrast);--smoothly-color-shade:var(--smoothly-default-shade);--smoothly-color-tint:var(--smoothly-default-tint)}[color=primary].sc-smoothly-button{--smoothly-color:var(--smoothly-primary-color);--smoothly-color-contrast:var(--smoothly-primary-contrast);--smoothly-color-shade:var(--smoothly-primary-shade);--smoothly-color-tint:var(--smoothly-primary-tint)}[color=secondary].sc-smoothly-button{--smoothly-color:var(--smoothly-secondary-color);--smoothly-color-contrast:var(--smoothly-secondary-contrast);--smoothly-color-shade:var(--smoothly-secondary-shade);--smoothly-color-tint:var(--smoothly-secondary-tint)}[color=tertiary].sc-smoothly-button{--smoothly-color:var(--smoothly-tertiary-color);--smoothly-color-contrast:var(--smoothly-tertiary-contrast);--smoothly-color-shade:var(--smoothly-tertiary-shade);--smoothly-color-tint:var(--smoothly-tertiary-tint)}[color=success].sc-smoothly-button{--smoothly-color:var(--smoothly-success-color);--smoothly-color-contrast:var(--smoothly-success-contrast);--smoothly-color-shade:var(--smoothly-success-shade);--smoothly-color-tint:var(--smoothly-success-tint)}[color=warning].sc-smoothly-button{--smoothly-color:var(--smoothly-warning-color);--smoothly-color-contrast:var(--smoothly-warning-contrast);--smoothly-color-shade:var(--smoothly-warning-shade);--smoothly-color-tint:var(--smoothly-warning-tint)}[color=danger].sc-smoothly-button{--smoothly-color:var(--smoothly-danger-color);--smoothly-color-contrast:var(--smoothly-danger-contrast);--smoothly-color-shade:var(--smoothly-danger-shade);--smoothly-color-tint:var(--smoothly-danger-tint)}[color=light].sc-smoothly-button{--smoothly-color:var(--smoothly-light-color);--smoothly-color-contrast:var(--smoothly-light-contrast);--smoothly-color-shade:var(--smoothly-light-shade);--smoothly-color-tint:var(--smoothly-light-tint)}[color=medium].sc-smoothly-button{--smoothly-color:var(--smoothly-medium-color);--smoothly-color-contrast:var(--smoothly-medium-contrast);--smoothly-color-shade:var(--smoothly-medium-shade);--smoothly-color-tint:var(--smoothly-medium-tint)}[color=dark].sc-smoothly-button{--smoothly-color:var(--smoothly-dark-color);--smoothly-color-contrast:var(--smoothly-dark-contrast);--smoothly-color-shade:var(--smoothly-dark-shade);--smoothly-color-tint:var(--smoothly-dark-tint)}.sc-smoothly-button-h{--smoothly-button-border-radius:0.5rem;display:inline-flex;box-sizing:border-box;border-radius:var(--smoothly-button-border-radius);font-size:var(--smoothly-button-font-size, 1rem);cursor:pointer;border:none;outline:none;position:relative}[shape=rounded].sc-smoothly-button-h{--smoothly-button-border-radius:2rem}[type=link].sc-smoothly-button-h{display:inline}[disabled].sc-smoothly-button-h{opacity:0.5}.sc-smoothly-button-h>a.sc-smoothly-button{font-weight:400;background-color:transparent}.sc-smoothly-button-h>a.sc-smoothly-button,.sc-smoothly-button-h>button.sc-smoothly-button{font-size:var(--smoothly-button-font-size);border:1px solid transparent;outline:none;cursor:pointer;display:inline-flex;gap:0.5rem;box-sizing:border-box}.sc-smoothly-button-h>button.sc-smoothly-button{font-weight:bold;justify-content:center;width:100%;align-items:center;border-radius:var(--smoothly-button-border-radius);padding-inline:var(--smoothly-button-padding-inline, 1rem)}.sc-smoothly-button-h{min-height:var(--smoothly-button-height, 2.5rem)}.sc-smoothly-button-h:has(>a:empty),.sc-smoothly-button-h:has(>button:empty),.sc-smoothly-button-h>a.sc-smoothly-button:empty,.sc-smoothly-button-h>button.sc-smoothly-button:empty{border-width:0;min-height:0;padding-inline:0}[size=small].sc-smoothly-button-h{--smoothly-button-height:2rem;--smoothly-button-padding-inline:0.75rem;--smoothly-button-font-size:0.875rem;--smoothly-icon-size:1.4rem}[size=large].sc-smoothly-button-h{--smoothly-button-height:3rem;--smoothly-button-padding-inline:1.25rem;--smoothly-button-font-size:1.125rem}.sc-smoothly-button-h:not([size=icon]):not([size=flexible])>button.sc-smoothly-button{min-width:8rem}[size=icon].sc-smoothly-button-h{--smoothly-icon-size:1.4rem}[size=icon].sc-smoothly-button-h>button.sc-smoothly-button{min-height:var(--smoothly-button-height, 2.5rem);min-width:var(--smoothly-button-height, 2.5rem);padding:0}.sc-smoothly-button-h:not([size=icon]){min-width:8em}[size=flexible].sc-smoothly-button-h{min-width:unset;padding:0;margin:0;display:flex;justify-content:center}[size=flexible].sc-smoothly-button-h>button.sc-smoothly-button{min-width:unset;padding:0;margin:0}[expand].sc-smoothly-button-h{width:100%}[expand=full].sc-smoothly-button-h{border-left:none;border-right:none;--smoothly-button-border-radius:0}[fill=outline].sc-smoothly-button-h>button.sc-smoothly-button{background-color:transparent;color:rgb(var(--smoothly-button-foreground));fill:rgb(var(--smoothly-button-foreground));stroke:rgb(var(--smoothly-button-foreground));border-color:rgb(var(--smoothly-button-foreground))}.sc-smoothly-button-h:not([fill=clear]):not([disabled])>button.sc-smoothly-button:hover,.sc-smoothly-button-h:not([disabled])>button.sc-smoothly-button:focus-visible,[fill=outline].sc-smoothly-button-h:not([disabled]):active>button.sc-smoothly-button::before{border-color:rgb(var(--smoothly-button-focus-color))}[fill=outline].sc-smoothly-button-h:not([disabled])>button.sc-smoothly-button:hover::before,[fill=outline].sc-smoothly-button-h:not([disabled])>button.sc-smoothly-button:focus-within::before,[fill=outline].sc-smoothly-button-h:not([disabled])>button.sc-smoothly-button:active::before{content:"";position:absolute;border:2px solid rgb(var(--smoothly-button-focus-border));inset:-1px;border-radius:var(--smoothly-button-border-radius)}.sc-smoothly-button-h:not([fill=clear]):not([fill=outline]):not([disabled])>button.sc-smoothly-button:hover,.sc-smoothly-button-h:not([fill=clear]):not([fill=outline]):not([disabled])>button.sc-smoothly-button:focus-visible,.sc-smoothly-button-h:not([fill=clear]):not([fill=outline]):not([disabled])>button.sc-smoothly-button:active{background:rgb(var(--smoothly-button-hover-background))}.sc-smoothly-button-h>button.sc-smoothly-button,.sc-smoothly-button-h.sc-smoothly-button-s>smoothly-icon,.sc-smoothly-button-h .sc-smoothly-button-s>smoothly-icon{color:rgb(var(--smoothly-button-foreground));stroke:rgb(var(--smoothly-button-foreground));fill:rgb(var(--smoothly-button-foreground))}[hidden].sc-smoothly-button-h{display:none}`;const $t=class{constructor(e){t(this,e);this.disabled=false}render(){return o(s,{key:"fddb810b2465ce82a68ce0bf4789aa8f14f79303",title:this.tooltip},o(w,{key:"3c08a7871e9ed69611790646f87fc7dae834330c",disabled:this.disabled,type:this.type,link:this.link},o("slot",{key:"8048ac9a2c4e450201ef15b82f66532c253783d9"})))}};$t.style=At();const Mt=()=>`.sc-smoothly-button-confirm-h{display:inline-block}[disabled].sc-smoothly-button-confirm-h{opacity:0.5;pointer-events:none}.sc-smoothly-button-confirm-h:not([warning])>smoothly-button.sc-smoothly-button-confirm:first-child{display:none}[warning].sc-smoothly-button-confirm-h>smoothly-button.sc-smoothly-button-confirm:nth-child(2){display:none}[expand].sc-smoothly-button-confirm-h{width:100%}`;const Et=class{constructor(o){t(this,o);this.smoothlyInputLoad=e(this,"smoothlyInputLoad");this.smoothlyConfirm=e(this,"smoothlyConfirm");this.doubleClickTime=.2;this.disabled=false}clickHandler(t){if(this.clickTimeStamp&&t.timeStamp-this.clickTimeStamp>this.doubleClickTime*1e3){this.timer&&window.clearTimeout(this.timer);this.clickTimeStamp=undefined;this.smoothlyConfirm.emit({[this.name]:true})}else{this.clickTimeStamp=t.timeStamp;this.timer=window.setTimeout((()=>{this.clickTimeStamp=undefined}),2e3)}}render(){return o(s,{key:"4412f32553a126e383e1d9bf32d1d0013eb85bc9",warning:this.clickTimeStamp},o("smoothly-button",{key:"8f53b5dfa7d10e669536b87c7d91a9fe2f05a240",fill:this.fill,expand:this.expand,size:this.size,shape:this.shape,color:"warning",disabled:this.disabled,type:"button",onClick:t=>this.clickHandler(t)},o("smoothly-icon",{key:"be8bbedf8b038e06468c5aac4c813a5af41205ff",name:"alert-outline",fill:this.fill,color:"warning",size:this.size==="icon"?"tiny":"small"})),o("smoothly-button",{key:"719d905afde3e78e2297eba4bb7cc37e1a8728d6",fill:this.fill,expand:this.expand,size:this.size,shape:this.shape,color:this.color,disabled:this.disabled,type:"button",onClick:t=>this.clickHandler(t)},o("slot",{key:"f3add649906ef5e0d5dd6a7fb504a2af4efe0e66"})))}};Et.style=Mt();const Ot=()=>`smoothly-button-demo{display:block;margin:1rem}smoothly-button-demo>section>div{display:flex;align-items:center}smoothly-button-demo smoothly-button{margin:.2em .5em}`;const Pt=class{constructor(e){t(this,e)}render(){return o(s,{key:"41fbe591e1a0c9ab6d1d73335a9b9f4a5a3c4d93"},o("section",{key:"59b6da9df3532752d3e5dcf9763c527d165bcf1f"},o("smoothly-button-demo-standard",{key:"27bf9cd1746a1718bf887dcef5d79230b01318ff"})),o("section",{key:"e7e87e4c84c0e8df43d56f217196e27a9bb5670e"},o("h4",{key:"8bf5cff46e4146474a9b91bfe8b83db89dd13c3a"},"Confirm button (two clicks)"),o("div",{key:"3c341489427dbf76dc4e9a200c23f58174696591"},o("smoothly-button-confirm",{key:"75793866c6111afbd5aeadf1bc6251f1efa9d592",name:"confirm",shape:"rounded",color:"danger",size:"large"},"Delete"),o("smoothly-button-confirm",{key:"14bdceddb01044ae6979af4a0c8efe0970e81e3d",name:"confirm-icon",shape:"rounded",color:"success",size:"icon"},o("smoothly-icon",{key:"33058b7d3638a0ca28aee23a5fb238d60356b16d",name:"checkmark-outline",size:"tiny"})),o("smoothly-button-confirm",{key:"d7d306d14262d7b43c5c37af91ffb79f0be82b14",name:"confirm-icon",shape:"rounded",color:"danger",size:"icon",fill:"outline"},o("smoothly-icon",{key:"7ea300edde779ca34db97bb2fe60f0051b1e366d",name:"trash-outline",size:"tiny",fill:"outline"}))),o("smoothly-toggle-switch-demo",{key:"c6e8b4c78605733c73bab3c1aa8ae5e770cc14e4"}),o("h4",{key:"8e92524469b1b4e0a59d14907e8df2f4e7680887"},"Links with icons"),o("smoothly-button",{key:"4ca461c47396b88dd9c276248d2fb425255e26f8",type:"link"},o("smoothly-icon",{key:"07c089e06c38afc5d0abe83491c38716486225c6",name:"checkmark-circle",slot:"start"}),"type link"),o("smoothly-button",{key:"b1c765d706ee22acb4368b8a67b1faddb591581a",type:"button",color:"warning",fill:"default"},o("smoothly-icon",{key:"d3188cb32fd389fb88a3a1e760fe33867265c5fc",name:"call",slot:"start"}),o("a",{key:"9bdf562304a25ce3024ca58cb53fff7c4b04acb6",href:"https://google.com"},"link")),o("smoothly-button",{key:"5da225cc3dfd1638a54fc9ce533cd038cccc808e",link:"https://google.com",type:"link"},o("smoothly-icon",{key:"a2417e1fbdff1b064e1cc3f61c4fc1615291e44d",name:"arrow-forward",slot:"end"}),"link + type link"),o("h4",{key:"54a1da928e2c9c48638a12dd3768c001ba38a77f"},"Size and Color test"),o("smoothly-button",{key:"bce9b7538f39f17b0377f723310eadbad511ed80",color:"primary",fill:"solid",size:"small",shape:"rounded"},"Color Primary + Small"),o("smoothly-button",{key:"210799c91bfe94fb54b3434fd99e67075cc91b43",color:"secondary",fill:"solid",shape:"rounded"},"Color Secondary + Default"),o("smoothly-button",{key:"374856692cefcb96deb1a38758eb4fec6f7808ab",color:"warning",fill:"solid",size:"large"},"Color Warning + Large"),o("smoothly-button",{key:"e807e6793fb358e6ced92caecb1d0feab2f011c7",color:"danger",fill:"solid",size:"small",shape:"rounded"},"Color Danger + Small"),o("smoothly-button",{key:"9bcde023dd0e12a84835bdd3d0c93d7602485246",color:"success",fill:"solid",size:"small",shape:"rounded"},"Color Success + Small"),o("smoothly-button",{key:"f98fb61b19dfbc7bbf29a740e7a5ae1997861c80",color:"tertiary",fill:"solid",size:"small",shape:"rounded"},"Color Tertiary + Small"),o("smoothly-button",{key:"6a46ea925f111b8c1d8b4510577d57f10e49ed1e",color:"dark",fill:"solid",size:"small",shape:"rounded"},"Color Dark + Small"),o("smoothly-button",{key:"3ced819c355f03ef775ace7ccfbb0206bbc07b6a",color:"medium",fill:"solid",size:"small",shape:"rounded"},"Color Medium + Small"),o("smoothly-button",{key:"3257cef08250f67f8ec2666130e3ea0645a8e2c7",color:"light",fill:"solid",size:"small",shape:"rounded"},"Color Light + Small"),o("h4",{key:"0a0800062a9f545328408b50f91d9f080cdee158"},"Expand examples"),o("smoothly-button",{key:"02fabfb6c3583fb8853d82c4b97245428253774a",color:"secondary",fill:"solid",expand:"full"},"Color Secondary + Default"),o("smoothly-button",{key:"51ddb0b657a2648909072cac84055478db97f95d",color:"warning",fill:"solid",expand:"block"},"Color Warning + Large"),o("h4",{key:"52624dee081a11c096585822d810cf4288059379"},"Fill examples"),o("div",{key:"2c1eeadd860b6115dd7fdd0b2f4f8538a564269a"},o("smoothly-button",{key:"9e5454cac152c3eaea53cb55f607ca32ab09ff62",shape:"rounded",color:"primary",fill:"solid"},o("smoothly-icon",{key:"188d4c19f60645acb41e0f47f4a96da2e544b8c0",name:"checkmark-circle",slot:"start"}),"Fill Solid"),o("smoothly-button",{key:"8587e3a0015b27248dd5b0cfa801e8abd962c5ab",shape:"rounded",color:"secondary",fill:"outline"},o("smoothly-icon",{key:"557848720b2df5e0425ba66f892b5bf29fa5ea2f",name:"checkmark-circle",slot:"start"}),"Fill Outline"),o("smoothly-button",{key:"bb9406a007325c258a6a7b1039fcb1665c0abd3a",shape:"rounded",color:"tertiary",fill:"clear"},o("smoothly-icon",{key:"ed23a5661e678f293cbfa5745d684e6b10dc8c1a",name:"checkmark-circle",slot:"start"}),"Fill Clear"),o("smoothly-button",{key:"910b4a12a963dc64747c0d37eac3ce437215982f",size:"icon",shape:"rounded",color:"success",fill:"solid"},o("smoothly-icon",{key:"f32e72f63b447d69655d51eb23fb23671132c34f",name:"basketball"}))),o("h4",{key:"13a6bf24881c6eb2c7753b6cc5a23dfe8c16f5bc"},'Buttons with Icon in "start"'),o("div",{key:"cc0e96b1435883957159795474f8cf7aead9586d"},o("smoothly-button",{key:"963d08b7ffe3533daa1a933ce66263616258f92b",shape:"rounded",fill:"solid",color:"warning"},o("smoothly-icon",{key:"6fd017cf57e5ebdf63078003e02d92c68c8f4af5",name:"checkmark-circle",slot:"start"}),"Check"),o("smoothly-button",{key:"0bfde99dba0e56974c4132d2ef6c727c9a2a809f",shape:"rounded",fill:"solid",color:"secondary"},o("smoothly-icon",{key:"5780d006fe5a007b68f17c537934ebae8fb23480",name:"basketball",slot:"start"}),"Check"),o("smoothly-button",{key:"00e418dec2de5f78e40f56a38bff2e66f0ea8744",shape:"rounded",fill:"solid",color:"success"},o("smoothly-icon",{key:"eed0a2bb3c839dd3d914dc0a07e1e3c51e3c5bf3",name:"call",slot:"start"}),"Check"),o("smoothly-button",{key:"7ccffbe4c12666ce4f167f0fdc9b6bc7078faeb0",size:"icon",fill:"solid",shape:"rounded",color:"success"},o("smoothly-icon",{key:"56531f0dd24f7c5bb0ae63fcf7b82935b60d24f2",name:"call"})),o("smoothly-button",{key:"8466fd4b388ad0e5411ba5f31975aaf6a1b0680b",size:"flexible",fill:"solid",color:"success"},o("smoothly-icon",{key:"1472f81c21140b5a8ee4408a947657cd673bd1dc",name:"airplane"}))),o("h4",{key:"0e2ac17f379dd54737037e4d3b32ad256ebf8494"},'Buttons with Icon in "end"'),o("smoothly-button",{key:"a4350f353ce14cb9adb6b362b0b11e527c0cd9fe",fill:"solid",color:"light"},"Go Forward",o("smoothly-icon",{key:"c8e56f3ab255349c872b991ec76de6c6ab878066",name:"arrow-forward",slot:"end"})),o("h4",{key:"4a318ff840e33a41e1afbdc2e328430ac4bbc830"},"Test for icon button"),o("div",{key:"9305973351f925768f74b64f7b790c92b1588839"},o("smoothly-button",{key:"da959f375b10df462b6bf8df9d5104dce89fb9d0",size:"icon",fill:"solid",shape:"rounded",color:"success"},o("smoothly-icon",{key:"141d5fa125a2a34220c4cf0320ec45ca3fe31139",name:"call"})),o("smoothly-button",{key:"0987067c106765e51df6f9586aa1d45d942ef125",size:"icon",shape:"rounded",color:"warning",fill:"solid"},o("smoothly-icon",{key:"5fa23e7a1d9b315af5354b55fc4eefd9835e0a44",name:"search-outline"})),o("smoothly-button",{key:"60e76fbb66064799f114cc841c813f9ee1d7d065",size:"icon",shape:"rounded",color:"secondary"},o("smoothly-icon",{key:"1ae4510d90d1b47baadee8f6ed7dd492066bd3e9",name:"checkmark-circle"}))),o("h4",{key:"fadbc9d0a253d68f24b030d2d52d73d5947d335a"},"Link examples"),o("div",{key:"8b4ced5d7bbb2e479073f04cfb98e7f98b41f01c"},o("smoothly-button",{key:"128369132e142d37361b6d640fde4d2743e145a7",type:"link"},"type link"),o("smoothly-button",{key:"b9f05aa9925ca88c1aa65f4e0b3040bed9d01e83",type:"button",fill:"clear"},o("a",{key:"9b565879faf7af07377103494a04b9c3c3a53c8a",href:"https://google.com"},"link")),o("smoothly-button",{key:"69355e4bbbf46fd49597bc3db62d31548d112f87",link:"https://google.com",type:"link"},"link + type link")),o("h4",{key:"dbc23f33d5d74c0147f658672f7a4fcfb166df9d"},"Disabled buttons"),o("div",{key:"0b6d087a8e7ca3a3c1b94159f126962b6c622b20"},o("smoothly-button",{key:"636c5d7b4ddfee2ca6b912b8c8f65e06b5a64136",disabled:true,fill:"solid",color:"secondary"},"Disabled"),o("smoothly-button",{key:"da4a2457eef26c077d603bd3482764ce357918ad",type:"link",link:"https://google.com",disabled:true},"Disabled link"))),o("smoothly-back-to-top",{key:"2906fd515608fe4a3c880755bbb9dfee63d94889"}))}};Pt.style=Ot();const Ht=()=>`.sc-smoothly-button-demo-standard-h smoothly-input-select.sc-smoothly-button-demo-standard smoothly-item.sc-smoothly-button-demo-standard{display:flex}.sc-smoothly-button-demo-standard-h .buttons.sc-smoothly-button-demo-standard{display:flex;flex-wrap:wrap;gap:0.5rem}.sc-smoothly-button-demo-standard-h .buttons.sc-smoothly-button-demo-standard>smoothly-button.sc-smoothly-button-demo-standard{margin-block:0}.sc-smoothly-button-demo-standard-h .height-text.sc-smoothly-button-demo-standard{border-left:3px dotted rgb(var(--smoothly-default-contrast));padding-inline:1rem;align-content:center}`;const Ft=class{constructor(e){t(this,e);this.props={};this.heightText=""}updateInputHeightText(){setTimeout((()=>{const t=Number(getComputedStyle(document.documentElement).fontSize.replace("px",""));if(this.lastButton){const e=this.lastButton.clientHeight;this.heightText=`${e/t}rem (${e}px)`}}),100)}render(){return o(s,{key:"d6e6ca6091ae99e7203ec3d88a00d4b486f5f3bd"},o("h2",{key:"b62fd377ec00749b0f0f7b8cff1e2e2fdceb318d"},"Button Standard"),o("smoothly-form",{key:"c9c1113d5c7073b66d0cfbd90bfa552ca3104d37",onSmoothlyFormInput:t=>this.props=t.detail,looks:"grid"},o("smoothly-input-checkbox",{key:"0666c152084c24ec1596ab16d09b04da4f885752",name:"text.useColor",checked:true},"Use Color as Text"),o("smoothly-input-select",{key:"77fa423c1bed60c446bad2fee6ef4927610ac8af",name:"size"},o("span",{key:"d5cd74d1252542454a5fb6441d2099da14a53023",slot:"label"},"Size"),["small","large","icon","flexible"].map((t=>o("smoothly-item",{value:t,key:t},t)))),o("smoothly-input",{key:"b6df255a745261b34ef164f04c5458c77a9c286b",name:"text.value",value:"Button"},"Text",o("smoothly-input-clear",{key:"0ee5dff1bd206c5db7d1928773cef6890fb2ed80",slot:"end"})),o("smoothly-input-radio",{key:"f6f3027ea26fc6c6d077b79bbb228b6cd0809e54",name:"expand",clearable:true},o("span",{key:"33436d08686b4714e0cfdb0cea7ba6b082b666ed",slot:"label"},"Expand"),o("smoothly-input-radio-item",{key:"be55407c3191954aca07baf6aa027ac6bbe9d106",value:"block"},"block"),o("smoothly-input-radio-item",{key:"1e94daa9639011bf686019ba4883524f0073fae6",value:"full"},"full"),o("smoothly-input-clear",{key:"3b51e51710dbac5a260d3396546285234f55ad9e",slot:"end"})),o("smoothly-input-select",{key:"73b66b593f926e9035e4502bb8978deac7675d76",name:"fill"},o("span",{key:"5b143acb8c018f8c37d50788d77c8935fb5e014f",slot:"label"},"Fill"),c.values.map((t=>o("smoothly-item",{value:t,key:t},t)))),o("smoothly-input-checkbox",{key:"ef134a75c0dc58a8ef42ab5f382132eb8163452a",name:"disabled"},"Disabled"),o("smoothly-input-select",{key:"ad79838c8c83d40eeb08b1c5b83d6e82a9b6c87c",name:"type"},o("span",{key:"1581c9346c7c2443324996f8e2b79d03f31241da",slot:"label"},"Type"),["button","submit","reset","link"].map((t=>o("smoothly-item",{value:t,key:t},t)))),o("smoothly-input-checkbox",{key:"05a368b01328adf76df30553a714934b582c16f6",name:"rounded"},"Rounded"),o("smoothly-input-select",{key:"a8298ce4893589cdef6de8b311d393e1d4d7bd1d",name:"icon",menuHeight:"8items"},o("span",{key:"f0a06face2985f21d7159adb1ce523483268644a",slot:"label"},"Icon"),h.Name.values.map((t=>o("smoothly-item",{value:t,key:t},o("smoothly-icon",{name:t,size:"small",tooltip:t})))),o("smoothly-input-clear",{key:"5791bab3057dac0dfcbd69b3c593b331878b4ed0",slot:"end"})),o("smoothly-input",{key:"8c650a560e278a4aac4040ee101e4e1346ca3a54",name:"tooltip",value:"Tooltip"},"Tooltip",o("smoothly-input-clear",{key:"e67bfad19b0bc374f025055140a689bb45ec4dbb",slot:"end"}))),o("div",{key:"0c312b6d27ddb2a1a80c04661345c703b2622414",class:"buttons"},r.values.map(((t,e,s)=>{var a,i;return o("smoothly-button",{onClick:e=>console.log(`Clicked button with color: ${t}`,e),tooltip:this.props.tooltip,ref:t=>s.length-1==e&&(this.lastButton=t),color:t,expand:this.props.expand,fill:this.props.fill,disabled:this.props.disabled,shape:this.props.rounded?"rounded":undefined,size:this.props.size,type:this.props.type,key:t},this.props.icon?o("smoothly-icon",{name:this.props.icon}):undefined,((a=this.props.text)===null||a===void 0?void 0:a.useColor)?t:(i=this.props.text)===null||i===void 0?void 0:i.value)})),o("div",{key:"638acf6f59bd885acb4262f43e377afc22e35b79",class:"height-text"},this.heightText)))}static get watchers(){return{props:[{updateInputHeightText:0}]}}};Ft.style=Ht();function Ut(t){const e=new Date(t);e.setDate(1);let o=-((e.getDay()+6)%7)+1;const s=[];for(let e=0;e<6;e++){const a=[];for(let e=0;e<7;e++){const e=new Date(t);e.setUTCDate(o++);a.push(C.Date.create(e))}if(e<5||C.Date.firstOfMonth(a[0])==C.Date.firstOfMonth(t)){s.push(a)}}return s}function Nt(){const t=new globalThis.Date;t.setDate(t.getDate()-t.getDay()+1);const e=[];for(let o=0;o<7;o++){e.push(t.toLocaleString(undefined,{weekday:"short"}));t.setDate(t.getDate()+1)}return e}function Yt(t){const e=new globalThis.Date(t);const o=[];for(let s=0;s<12;s++){e.setMonth(s,28);const a=C.Date.create(e);o.push({date:a,name:e.toLocaleString(undefined,{month:"long"}),selected:a.substr(0,7)==t.substr(0,7)})}return o}function Wt(t,e,o){const s=new globalThis.Date(t);const a=e?C.Date.getYear(e):(new Date).getFullYear()-50;const i=o?C.Date.getYear(o):(new Date).getFullYear()+50;const l=[];for(let e=a;e<=i;e++){s.setFullYear(e);const o=C.Date.create(s);l.push({date:o,name:s.toLocaleString(undefined,{year:"numeric"}),selected:o==t})}return l}const Bt=()=>`.sc-smoothly-calendar-h{display:block;--other-month-opacity:0.5;padding:0.5em;border:1px solid rgb(var(--smoothly-input-border))}.sc-smoothly-calendar-h>smoothly-input-month.sc-smoothly-calendar{padding:0 0.5em}.sc-smoothly-calendar-h>table.sc-smoothly-calendar{table-layout:fixed;width:100%}.sc-smoothly-calendar-h>table.sc-smoothly-calendar>thead.sc-smoothly-calendar>tr.sc-smoothly-calendar>th.sc-smoothly-calendar,.sc-smoothly-calendar-h>table.sc-smoothly-calendar>tr.sc-smoothly-calendar>td.sc-smoothly-calendar{text-align:center;padding:0.5em;min-width:2em;box-sizing:border-box;background-color:rgb(var(--smoothly-input-background));color:rgb(var(--smoothly-input-foreground));-webkit-user-select:none;user-select:none}.sc-smoothly-calendar-h>table.sc-smoothly-calendar>tr.sc-smoothly-calendar>td.sc-smoothly-calendar{position:relative;cursor:pointer}.sc-smoothly-calendar-h>table.sc-smoothly-calendar>tr.sc-smoothly-calendar>td.currentMonth.sc-smoothly-calendar{color:rgb(var(--smoothly-default-contrast))}.sc-smoothly-calendar-h>table.sc-smoothly-calendar>tr.sc-smoothly-calendar>td.sc-smoothly-calendar:not(.currentMonth){color:rgba(var(--smoothly-default-contrast), var(--other-month-opacity))}.sc-smoothly-calendar-h>table.sc-smoothly-calendar>tr.sc-smoothly-calendar>td.sc-smoothly-calendar:nth-child(6):not(.currentMonth).selected,.sc-smoothly-calendar-h>table.sc-smoothly-calendar>tr.sc-smoothly-calendar>td.sc-smoothly-calendar:nth-child(6):not(.currentMonth).dateRange,.sc-smoothly-calendar-h>table.sc-smoothly-calendar>tr.sc-smoothly-calendar>td.sc-smoothly-calendar:nth-child(7):not(.currentMonth).selected,.sc-smoothly-calendar-h>table.sc-smoothly-calendar>tr.sc-smoothly-calendar>td.sc-smoothly-calendar:nth-child(7):not(.currentMonth).dateRange{color:rgba(var(--smoothly-default-contrast))}.sc-smoothly-calendar-h>table.sc-smoothly-calendar>tr.sc-smoothly-calendar>td.sc-smoothly-calendar:nth-child(6),.sc-smoothly-calendar-h>table.sc-smoothly-calendar>tr.sc-smoothly-calendar>td.sc-smoothly-calendar:nth-child(7){color:rgb(var(--smoothly-calendar-weekend-foreground, var(--smoothly-danger-color)))}.sc-smoothly-calendar-h>table.sc-smoothly-calendar>tr.sc-smoothly-calendar>td.sc-smoothly-calendar:nth-child(6):not(.currentMonth),.sc-smoothly-calendar-h>table.sc-smoothly-calendar>tr.sc-smoothly-calendar>td.sc-smoothly-calendar:nth-child(7):not(.currentMonth){color:rgba(var(--smoothly-calendar-weekend-foreground, var(--smoothly-danger-color)), var(--other-month-opacity))}>table>tr>td.sc-smoothly-calendar-h:not(.selected,.disable).sc-smoothly-calendar:hover{color:rgb(var(--smoothly-primary-contrast));background:rgb(var(--smoothly-primary-tint))}.sc-smoothly-calendar-h>table.sc-smoothly-calendar>tr.sc-smoothly-calendar>td.selected.sc-smoothly-calendar{color:rgb(var(--smoothly-primary-contrast));background:rgb(var(--smoothly-primary-color))}.sc-smoothly-calendar-h>table.sc-smoothly-calendar>tr.sc-smoothly-calendar>td.today.sc-smoothly-calendar::before{content:"";inset:2px;position:absolute;border:1px solid currentColor}.sc-smoothly-calendar-h>table.sc-smoothly-calendar>tr.sc-smoothly-calendar>td.dateRange.sc-smoothly-calendar{color:rgb(var(--smoothly-primary-contrast));background:rgb(var(--smoothly-primary-tint))}.sc-smoothly-calendar-h>table.sc-smoothly-calendar>tr.sc-smoothly-calendar>td.disable.sc-smoothly-calendar{cursor:not-allowed;opacity:0.5}`;const Vt=class{constructor(o){t(this,o);this.smoothlyDateSet=e(this,"smoothlyDateSet");this.smoothlyDateRangeSet=e(this,"smoothlyDateRangeSet");this.clickCounter=0}componentWillLoad(){this.onStart();this.onEnd()}onStart(){this.startInternal=this.start}onEnd(){this.endInternal=this.end}async jumpTo(t){var e,o,s,a;const i=C.Date.Year.is(t.Y)?t.Y:(o=(e=this.month)===null||e===void 0?void 0:e.substring(0,4))!==null&&o!==void 0?o:C.Date.now().substring(0,4);const l=C.Date.Month.is(t.M)?t.M:(a=(s=this.month)===null||s===void 0?void 0:s.substring(5,7))!==null&&a!==void 0?a:C.Date.now().substring(5,7);const n=`${i}-${l}-01`;if(C.Date.is(n)){this.month=n}}onClick(t){this.value=t;this.smoothlyDateSet.emit(this.value)}onClickDoubleInput(t){this.clickCounter+=1;if(this.clickCounter%2==1){this.startInternal=this.endInternal=this.frozenDate=t}else{const e=this.startInternal>t?t:this.startInternal;const o=this.endInternal<t?t:this.endInternal;this.startInternal=e;this.endInternal=o}this.clickCounter%2==0&&this.startInternal&&this.endInternal&&this.smoothlyDateRangeSet.emit({start:this.startInternal,end:this.endInternal})}onHover(t){if(this.doubleInput&&this.clickCounter%2==1){if(t<this.frozenDate){this.startInternal=t;this.endInternal=this.frozenDate}else{this.startInternal=this.frozenDate;this.endInternal=t}}}withinLimit(t){return(!this.min||t>=this.min)&&(!this.max||t<=this.max)}render(){var t,e,s;return o(i,{key:"51ec0570b1b71eb9ff8bca9984ecf40550abe435"},o("smoothly-input-month",{key:"1beb2d18f5a08e93d88fddca59675078d8662715",name:"month",value:(t=this.month)!==null&&t!==void 0?t:this.value,min:this.min,max:this.max,inCalendar:true,next:true,previous:true,showLabel:false,onSmoothlyInput:t=>{t.stopPropagation();"month"in t.detail&&typeof t.detail.month=="string"&&(this.month=t.detail.month)},onSmoothlyUserInput:t=>t.stopPropagation()},o("div",{key:"14ed1a3cc6dd8fe89d7ac4f1450f391ccb0bff77",slot:"year-label"},o("slot",{key:"c07b485adf7b6b4aa71d3ceb10d530aa029c652d",name:"year-label"})),o("div",{key:"cd1e232ded9c2ac84156de7419bc46bdd4e01680",slot:"month-label"},o("slot",{key:"1255e6cef5898b90aba12716639774957e09cd86",name:"month-label"}))),o("table",{key:"8ada3e2ac6abf42710c8611d9264ddbc7691e307"},o("thead",{key:"1f686102dc5f57bbc838d11d984e85407d44fdda"},o("tr",{key:"41ab20afc9b1a4491f5070345f779dc6238dd8d3"},Nt().map((t=>o("th",null,t))))),Ut((s=(e=this.month)!==null&&e!==void 0?e:this.value)!==null&&s!==void 0?s:C.Date.now()).map((t=>o("tr",null,t.map((t=>{var e,s,a,i;return o("td",{tabindex:1,onMouseOver:this.withinLimit(t)?()=>this.onHover(t):undefined,onClick:this.withinLimit(t)?()=>this.doubleInput?this.onClickDoubleInput(t):this.onClick(t):undefined,class:{selected:t==this.value||this.doubleInput&&(t==this.startInternal||t==this.endInternal),today:t==C.Date.now(),currentMonth:C.Date.firstOfMonth((s=(e=this.month)!==null&&e!==void 0?e:this.value)!==null&&s!==void 0?s:C.Date.now())==C.Date.firstOfMonth(t),dateRange:this.doubleInput&&t>((a=this.startInternal)!==null&&a!==void 0?a:"")&&t<((i=this.endInternal)!==null&&i!==void 0?i:""),disable:!this.withinLimit(t)}},t.substring(8,10))})))))))}get element(){return a(this)}static get watchers(){return{start:[{onStart:0}],end:[{onEnd:0}]}}};Vt.style=Bt();var Gt;(function(t){t.guides={Y:"YYYY",M:"MM",D:"DD"};(function(e){function o(e,o){var s;return((s=o===null||o===void 0?void 0:o.length)!==null&&s!==void 0?s:0)>=t.Part.lengthOf(e)}e.isComplete=o;function s(e){return t.guides[e].length}e.lengthOf=s;function a(e,o){const s=t.guides[e];return s.substring(0,s.length-(o!==null&&o!==void 0?o:0))}e.getGuide=a})(t.Part||(t.Part={}));(function(t){function e(t){if(t.Y&&t.M&&parseInt(t.M)>=1&&parseInt(t.M)<=12){const e=C.Date.lastOfMonth(`${t.Y.padStart(4,"0")}-${t.M.padStart(2,"0")}-01`);return C.Date.getDay(e)}else if(t.M&&parseInt(t.M)>=1&&parseInt(t.M)<=12){const e=C.Date.lastOfMonth(`2004-${t.M.padStart(2,"0")}-01`);return C.Date.getDay(e)}return 31}t.lastDay=e;function o(t){if(t.Y&&t.Y.length==4&&t.M&&t.M.length==2&&t.D&&t.D.length==2){const e=`${t.Y}-${t.M}-${t.D}`;const o=C.Date.lastOfMonth(`${t.Y}-${t.M}-01`);return o<e?o:e}return undefined}t.toDate=o;function s(t){if(t){return{Y:t.substring(0,4).padStart(4,"0"),M:t.substring(5,7).padStart(2,"0"),D:t.substring(8,10).padStart(2,"0")}}return undefined}t.fromDate=s})(t.Parts||(t.Parts={}));(function(t){function e(t){switch(t){case"en-US":return"MDY";case"sq-AL":case"es-AR":case"it-IT":case"en-GB":case"fr-FR":case"et-EE":case"de-AT":case"de-DE":case"he-IL":case"is-IS":case"lv-LV":case"pl-PL":case"ru-RU":case"fi-FI":case"hi-IN":case"en-IN":return"DMY";default:return"YMD"}}t.fromLocale=e;function o(t,e){return t.charAt(e)}t.getPart=o;function s(t){return t.split("")}t.toArray=s})(t.Order||(t.Order={}));(function(t){function e(t){switch(t){case"sq-AL":case"es-AR":case"it-IT":case"en-GB":case"fr-FR":case"en-US":return"/";case"et-EE":case"de-AT":case"de-DE":case"he-IL":case"is-IS":case"lv-LV":case"pl-PL":case"ru-RU":case"fi-FI":return".";default:return"-"}}t.fromLocale=e})(t.Separator||(t.Separator={}))})(Gt||(Gt={}));var Kt;(function(t){function e(t){const e=t.currentTarget;const o=window.getSelection();if(!o||o.rangeCount===0||!e.contains(o.anchorNode)){return false}if(!o.isCollapsed){return false}const s=o.getRangeAt(0);const a=s.cloneRange();a.selectNodeContents(e);a.setEnd(s.startContainer,s.startOffset);return a.toString().length===0}t.isAtStart=e;function o(t){const e=t.currentTarget;const o=window.getSelection();if(!o||o.rangeCount===0||!e.contains(o.anchorNode)){return false}if(!o.isCollapsed){return false}const s=o.getRangeAt(0);const a=s.cloneRange();a.selectNodeContents(e);a.setStart(s.endContainer,s.endOffset);return a.toString().length===0}t.isAtEnd=o;function s(t){if(!t){return}t.focus();const e=document.createRange();e.selectNodeContents(t);const o=window.getSelection();if(!o){return}o.removeAllRanges();o.addRange(e)}t.selectAll=s;function a(t,e){if(!t){return}t.focus();const o=window.getSelection();if(!o){return}const s=document.createRange();const a=t.firstChild||t;const i=Math.max(0,Math.min(e,t.innerText.length));s.setStart(a,i);s.collapse(true);o.removeAllRanges();o.addRange(s)}t.setPosition=a;function i(t){const e=window.getSelection();if(!e||e.rangeCount===0){return true}const o=e.getRangeAt(0);if(!t.contains(o.startContainer)||!t.contains(o.endContainer)){return true}return o.collapsed}t.isCollapsed=i})(Kt||(Kt={}));const qt=()=>`.sc-smoothly-date-text-h{--guide-opacity:0.5}.sc-smoothly-date-text-h .smoothly-date-text-part.sc-smoothly-date-text:focus{outline:none}.sc-smoothly-date-text-h .guide.sc-smoothly-date-text{opacity:var(--guide-opacity)}.sc-smoothly-date-text-h .smoothly-date-text-part.sc-smoothly-date-text:not(.is-complete)+.guide.sc-smoothly-date-text+.smoothly-date-separator.sc-smoothly-date-text{opacity:var(--guide-opacity)}`;const Zt=class{constructor(o){t(this,o);this.smoothlyDateTextHasText=e(this,"smoothlyDateTextHasText");this.smoothlyDateTextChange=e(this,"smoothlyDateTextChange");this.smoothlyDateTextFocusChange=e(this,"smoothlyDateTextFocusChange");this.smoothlyDateHasPartialDate=e(this,"smoothlyDateHasPartialDate");this.smoothlyDateTextDone=e(this,"smoothlyDateTextDone");this.smoothlyDateTextPrevious=e(this,"smoothlyDateTextPrevious");this.smoothlyDateTextNext=e(this,"smoothlyDateTextNext");this.partElements={0:undefined,1:undefined,2:undefined};this.locale=T();this.showLabel=true;this.parts={}}componentWillLoad(){var t;this.order=Gt.Order.fromLocale(this.locale);this.separator=Gt.Separator.fromLocale(this.locale);this.parts=(t=Gt.Parts.fromDate(this.value))!==null&&t!==void 0?t:{}}componentDidLoad(){this.updateInputs()}partsHandler(){const t=Gt.Parts.toDate(this.parts);if(t!=this.previousEmittedValue){this.smoothlyDateTextChange.emit(t);this.previousEmittedValue=t}this.smoothlyDateTextHasText.emit(Object.values(this.parts).some((t=>!!t)))}focusedIndexHandler(){this.smoothlyDateTextFocusChange.emit(typeof this.focusedIndex=="number")}async setValue(t){const e=Gt.Parts.fromDate(t);this.setAllParts(e)}setAllParts(t){this.parts=t!==null&&t!==void 0?t:{};this.updateInputs()}updateInputs(){var t,e,o;const s=this.order.indexOf("Y");const a=this.order.indexOf("M");const i=this.order.indexOf("D");this.partElements[s]&&(this.partElements[s].innerText=(t=this.parts.Y)!==null&&t!==void 0?t:"");this.partElements[a]&&(this.partElements[a].innerText=(e=this.parts.M)!==null&&e!==void 0?e:"");this.partElements[i]&&(this.partElements[i].innerText=(o=this.parts.D)!==null&&o!==void 0?o:"")}setPart(t,e){this.parts=Object.assign(Object.assign({},this.parts),{[t]:e});const o=this.order.indexOf(t);this.partElements[o]&&(this.partElements[o].innerText=e!==null&&e!==void 0?e:"")}async select(t="start"){const e=t=="start"?0:2;this.setFocus(e)}async deselect(){var t,e;(e=this.partElements[(t=this.focusedIndex)!==null&&t!==void 0?t:0])===null||e===void 0?void 0:e.blur()}getInnerText(t){return t.innerText.replace(/\n/g,"").replace(/\D/g,"")}beforeInputHandler(t){var e;const o=this.order[(e=this.focusedIndex)!==null&&e!==void 0?e:0];const s=this.getInnerText(t.target);const a=t.data&&/\D/.test(t.data);const i=Gt.Part.isComplete(o,s);const l=Kt.isCollapsed(t.target);if((t.inputType=="insertText"||t.inputType=="insertFromPaste")&&(a||i&&l)){t.preventDefault()}if(t.inputType=="insertParagraph"||t.inputType=="insertLineBreak"){this.smoothlyDateTextDone.emit();t.preventDefault()}}inputHandler(t){var e,o;const s=Gt.Order.getPart(this.order,(e=this.focusedIndex)!==null&&e!==void 0?e:0);const a=(o=this.focusedIndex)!==null&&o!==void 0?o:0;const i=this.getInnerText(t.target);this.parts=Object.assign(Object.assign({},this.parts),{[s]:i});if(["D","M"].includes(s)){const t=s=="D";const e=t?Gt.Parts.lastDay(this.parts):12;const o=t?3:1;const l=parseInt(i);if(i.length>=2){this.commitPart(s,l,a,e)}else if(i.length==1&&l>o){this.autoAdvancePart(s,l,a,e)}}if(Gt.Part.isComplete(s,i)){this.setFocus(a+1)}const l=Gt.Parts.toDate(this.parts);if(l){const t=Gt.Parts.fromDate(l);if(this.parts.D!==(t===null||t===void 0?void 0:t.D)){this.setPart("D",t===null||t===void 0?void 0:t.D)}}if(this.parts.Y||this.parts.M||this.parts.D){this.smoothlyDateHasPartialDate.emit(this.parts)}}keyDownHandler(t){var e;const o=this.getInnerText(t.target);const s=(e=this.focusedIndex)!==null&&e!==void 0?e:0;if(Kt.isAtStart(t)&&t.key=="ArrowLeft"){this.autoAdvanceIfPossible(s);this.setFocus(s-1);t.preventDefault()}else if(Kt.isAtEnd(t)&&t.key=="ArrowRight"){this.autoAdvanceIfPossible(s);this.setFocus(s+1);t.preventDefault()}else if(t.key=="Home"||t.key=="ArrowUp"){this.autoAdvanceIfPossible(s);this.setFocus(0);t.preventDefault()}else if(t.key=="End"||t.key=="ArrowDown"){this.autoAdvanceIfPossible(s);this.setFocus(2);t.preventDefault()}else if(Kt.isAtStart(t)&&t.key=="Backspace"&&o==""){this.autoAdvanceIfPossible(s);this.setFocus(s-1);t.preventDefault()}else if(Kt.isAtEnd(t)&&t.key=="Delete"&&o==""){this.autoAdvanceIfPossible(s);this.setFocus(s+1);t.preventDefault()}}commitPart(t,e,o,s){const a=Math.max(1,Math.min(e,s));this.setPart(t,a.toString().padStart(2,"0"));Kt.setPosition(this.partElements[o],2)}autoAdvancePart(t,e,o,s){const a=Math.max(1,Math.min(e,s));this.setPart(t,a.toString().padStart(2,"0"));this.setFocus(o+1)}autoAdvanceIfPossible(t){var e;const o=Gt.Order.getPart(this.order,t);const s=(e=this.parts[o])!==null&&e!==void 0?e:"";if(o=="D"&&s.length==1){this.autoAdvancePart(o,parseInt(s),t,Gt.Parts.lastDay(this.parts))}else if(o=="M"&&s.length==1){this.autoAdvancePart(o,parseInt(s),t,12)}}setFocus(t){if(t<0){this.smoothlyDateTextPrevious.emit()}else if(t>2){this.smoothlyDateTextNext.emit()}else{Kt.selectAll(this.partElements[t])}}render(){return o(s,{key:"f85c786115e7a171f69dc12fc7cd7fd95d47dc04",class:{"has-text":Object.values(this.parts).some((t=>!!t))}},Gt.Order.toArray(this.order).map(((t,e)=>{var s;return o("span",{onClick:()=>!this.readonly&&!this.disabled&&this.setFocus(e)},o("span",{class:{"smoothly-date-text-part":true,"is-complete":Gt.Part.isComplete(t,this.parts[t])},onFocus:()=>this.focusedIndex=e,onBlur:()=>this.focusedIndex=undefined,onKeyDown:t=>this.keyDownHandler(t),key:e,ref:t=>this.partElements[e]=t,contenteditable:!(this.readonly||this.disabled),inputmode:"numeric"}),o("span",{class:"guide"},Gt.Part.getGuide(t,(s=this.parts[t])===null||s===void 0?void 0:s.length)),e<2&&o("span",{class:"smoothly-date-separator"},this.separator))})))}get element(){return a(this)}static get watchers(){return{parts:[{partsHandler:0}],focusedIndex:[{focusedIndexHandler:0}]}}};Zt.style=qt();const Jt=()=>`.sc-smoothly-dialog-h{display:block;position:fixed;top:55%;left:50%;transform:translate(-50%, -50%);width:100%;height:100%;z-index:1;background:rgba(var(--smoothly-default-color), var(--smoothly-semitransparent)) !important}[hidden].sc-smoothly-dialog-h{display:none}.sc-smoothly-dialog-h>section.sc-smoothly-dialog{margin-top:var(--smoothly-dialog-margin-top)}.sc-smoothly-dialog-h>section.sc-smoothly-dialog>div.header.sc-smoothly-dialog{border-top-left-radius:8px;border-top-right-radius:8px;margin-top:2em;color:rgb(var(--smoothly-primary-contrast));background:rgb(var(--smoothly-primary-color));border-color:rgb(var(--smoothly-primary-color))}.sc-smoothly-dialog-h:not([header]) div.header.sc-smoothly-dialog{border:none}.sc-smoothly-dialog-h>section.sc-smoothly-dialog>*.sc-smoothly-dialog{position:relative;color:rgb(var(--smoothly-default-contrast));background-color:rgb(var(--smoothly-default-color));border-color:rgb(var(--smoothly-color));border-width:1px;border-style:solid;max-width:40em;width:calc(100vw - 4em - 2px);max-height:calc(100vh - 6em - 2px);height:auto;margin-left:auto;margin-right:auto;border-collapse:collapse}.sc-smoothly-dialog-h>section.sc-smoothly-dialog>div.content.sc-smoothly-dialog{border-bottom-left-radius:8px;border-bottom-right-radius:8px;margin-bottom:2em;border:1px solid rgb(var(--smoothly-default-contrast));box-sizing:border-box;overflow:hidden}.sc-smoothly-dialog-h:not([header])>section.sc-smoothly-dialog>div.content.sc-smoothly-dialog{border-radius:8px}.sc-smoothly-dialog-h>section.sc-smoothly-dialog>*.sc-smoothly-dialog>smoothly-trigger.sc-smoothly-dialog{position:absolute;right:-2em;top:-2em;z-index:1;border-color:transparent}.sc-smoothly-dialog-h>section.sc-smoothly-dialog>*.sc-smoothly-dialog>smoothly-trigger.sc-smoothly-dialog:hover{border-color:transparent}.sc-smoothly-dialog-h>section.sc-smoothly-dialog>div.header.sc-smoothly-dialog>smoothly-trigger.sc-smoothly-dialog>smoothly-icon.sc-smoothly-dialog{background-color:rgb(var(--smoothly-color));border-radius:50%}.sc-smoothly-dialog-h>section.sc-smoothly-dialog>*.sc-smoothly-dialog>*.sc-smoothly-dialog{margin:10px}`;const Xt=class{constructor(e){t(this,e);this.open=true;this.closable=false}TriggerListener(t){if(d.is(t.detail)&&t.detail.name=="close"){this.open=false}}hostData(){return{style:{display:this.open?"block":"none"}}}__stencil_render(){return o("section",{key:"5bdc10b02671eed7397ae99e872f104cb098d2c0"},o("div",{key:"05bbab31a6d30c2ff0e3ec64ac59c8e56560526c",class:"header"},this.closable&&o("smoothly-trigger",{key:"4f5d1a0d5c87d22d00281fadba0ffacf20c4b8db",fill:"clear",name:"close"},o("smoothly-icon",{key:"2474cba19d732b0d34b02a055379bf1926a8fc4d",name:"close-circle",fill:"solid",color:this.color})),this.header?o("h1",null,this.header):o("slot",{name:"header"})),o("div",{key:"861af5e557c0ef202273cab84877c8806bb2c232",class:"content"},o("slot",{key:"e755042ab3f24972fa2eaac24914649d10dafd0f"})))}render(){return o(s,this.hostData(),this.__stencil_render())}};Xt.style=Jt();const Qt=()=>`.sc-smoothly-dialog-demo-h>smoothly-button.sc-smoothly-dialog-demo{display:block;margin-block:2rem}`;const te=class{constructor(e){t(this,e);this.openModal=false;this.openTallModal=false;this.showFrame=false}render(){return o(s,{key:"0d1ca7f9bc049064eb1680cc807bd49bafab0e7e"},o("smoothly-button",{key:"33683c13b2f666aea6d3306056b74b694cb88654",fill:"solid",color:"light",onClick:()=>this.openModal=true},"Open Modal"),o("smoothly-button",{key:"46de03312dfa5a28f164aacd442a7074148d6390",fill:"solid",color:"light",onClick:()=>this.openTallModal=true},"Open Modal with long text and top-aligned."),o("smoothly-button",{key:"ea629cfa5afabb8151f230b4916d9eb13849a4d7",fill:"solid",color:"light",onClick:()=>this.showFrame=!this.showFrame},"Show Frame"),o("smoothly-modal",{key:"45b7313f8539478b1418298a7e086e506b18cf79",closable:true,open:this.openModal,onSmoothlyModalChange:t=>this.openModal=t.detail},o("h2",{key:"005f8f44463bd4f5048582f4d59b8792a02321e4",slot:"header"},"Modal"),o("span",{key:"8bdae975d32f862fe1b2da1b75c1cdd8e0596e19"},"Are you sure you want to confirm this action?"),o("smoothly-button",{key:"7a4fc7fbeb273ddaf66723c022c0408d7d5e6cc0",slot:"actions",color:"success"},"Confirm"),o("smoothly-button",{key:"c41f548b2f249ab1d04d180c6a8745f0be0c3180",slot:"actions",color:"light",fill:"outline",onClick:()=>this.openModal=false},"Cancel")),o("smoothly-modal",{key:"9b8efe1c92dae88afeb60053efcc19c89fcb53f6",closable:true,open:this.openTallModal,onSmoothlyModalChange:t=>this.openTallModal=t.detail,align:"top"},o("h2",{key:"0c7b0382250669ac142152a49f24214180b75c11",slot:"header"},"Modal"),o("smoothly-summary",{key:"ccb69953bda0af96ba9e6679d0492770e1face22"},o("div",{key:"95d44ba81eec2106d470f4f84c0857aab8f9b6c5",slot:"summary"},"Lorem ipsum"),o("div",{key:"73a8c397c891af87ebb019bdb3ace838ab40ee24",slot:"content"},Array.from({length:10}).map((()=>o("p",null,"Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum."))))),o("smoothly-button",{key:"61c0e81f6b49ff91d58cc3536c516e25afe9ee71",slot:"actions",color:"light",fill:"outline",onClick:()=>this.openTallModal=false},"Cancel")),this.showFrame&&o("smoothly-dialog",{key:"c0315ea0fbf1a253fe4fbc7aa9e01f7b21e49293",closable:true},o("smoothly-frame",{key:"1469ba8f2d229d42329627b12e2a4bd4028a2273",url:"https://www.wikipedia.org/",name:"parent",style:{height:"80vh"}})))}};te.style=Qt();function ee(t,e,o){let s=0;while(o.exec(t)!=null){s=o.lastIndex;if(o.lastIndex>e)break}o.lastIndex<=e&&(s=t.length);return s}function oe(t,e,o){let s=0;let a;while((a=o.exec(t))!=null){if(o.lastIndex-a[0].length<e)s=o.lastIndex-a[0].length;else break}return s}function se(t,e,o){const s=/([\wåäöüéáúíóßðœøæñµçþ_]+|[@-]+)/gi;return o=="backward"?oe(t,e,s):ee(t,e,s)}var ae;(function(t){function e(t){return t.direction=="backward"?t.start:t.end}t.getCursor=e;function o(t){return t.direction!="backward"?t.start:t.end}t.getStalker=o})(ae||(ae={}));var ie;(function(t){function e(t){return{value:t.value,selection:{start:t.selection.start,end:t.selection.end,direction:t.selection.direction},remainder:t.remainder}}t.copy=e})(ie||(ie={}));class le{value;selection;constructor(t){this.value=t.value;this.selection={start:t.selection?.start,end:t.selection?.end,direction:t.selection?.direction}}get(t,e=1){return this.value.substring(t,t+e)}is(t,...e){const o=this.get(t);return e.some((t=>o==t))}isDigit(t){const e=this.get(t);return e>="0"&&e<="9"}match(t){return this.value.match(t)}replace(t,e,o){let s;if(typeof t=="string"&&typeof e=="string"){let o;s=this;while((o=s.value.indexOf(t))>-1)s=s.replace(o,o+t.length,e)}else if(typeof t=="number"&&typeof e=="number"){const a={value:this.value,selection:{start:this.selection.start,end:this.selection.end,direction:this.selection.direction}};if(!o)o="";a.value=this.value.slice(0,t)+o+this.value.slice(e,this.value.length);if(this.selection.start>=e)a.selection.start=this.selection.start+o.length-e+t;else if(this.selection.start>t&&this.selection.start<e)a.selection.start=Math.min(this.selection.start,t+o.length);if(this.selection.end>=e)a.selection.end=this.selection.end+o.length-e+t;else if(this.selection.end>t&&this.selection.end<e)a.selection.end=Math.min(this.selection.end,t+o.length);s=new le(a)}return s||this}insert(t,e){return this.replace(t,t,e)}append(t){return this.insert(this.value.length,t)}prepend(t){return this.insert(0,t)}suffix(t){return new le({value:this.value+t,selection:this.selection})}delete(t,e){let o;if(!this.value)o=this;else if(typeof t=="string"){let e;o=this;while(t&&(e=o.value.indexOf(t))>-1)o=o.delete(e,e+t.length)}else o=this.replace(t,e||t+1,"");return o}truncate(t){return this.value.length>=t?this.delete(t,this.value.length):this}pad(t,e,o){let s=this;while(t>s.value.length+e.length)s=s.insert(o,e);if(t>s.value.length)s=s.insert(o,e.substring(0,t-s.value.length));return s}padEnd(t,e){return this.pad(t,e,this.value.length)}padStart(t,e){return this.pad(t,e,0)}toLower(){return this.map((t=>t.toLowerCase()))}toUpper(){return this.map((t=>t.toUpperCase()))}map(t){let e=this;let o=0;for(let s=0;s<this.value.length;s++){const a=t(this.get(s),s);e=e.replace(o,o+1,a);o+=a.length}return e}static copy(t){return new le({...t})}static create(){return new le({value:"",selection:{start:0,end:0}})}static modify(t){return new le(typeof t=="string"?{value:t,selection:{start:t.length,end:t.length}}:t)}}var ne;(function(t){function e(t,e,o){let c=ie.copy(t.unformat(le.copy(e)));if(e.autocomplete=="cc-exp"&&/^\d\d \/$/g.test(e.value))o?.key&&(o.key="Backspace");if(o){if(o.ctrlKey||o.metaKey){if(o.key=="a")l(c,0,c.value.length,"forward");else if(["ArrowLeft","ArrowRight"].includes(o.key)&&e?.type!="password")c=s(t,e,o);else if(["Delete","Backspace"].includes(o.key)&&e?.type!="password")c=a(t,e,o)}else if(["ArrowLeft","ArrowRight","Home","End"].includes(o.key))i(c,o);else if(["Delete","Backspace"].includes(o.key)){c.selection.start==c.selection.end&&l(c,c.selection.start+(o.key=="Backspace"?-1:0),c.selection.end+(o.key=="Delete"?1:0));n(c)}else if(o.key!="Unidentified"){n(c);t.allowed(o.key,c)&&r(c,o.key)}}return t.format(le.copy(c))}t.apply=e;function o(t,e,o){const s=ie.copy(t.unformat(le.copy(e)));r(s,o);return t.format(le.copy(s))}t.paste=o;function s(t,e,o){let s=ae.getCursor(e.selection);let a=ae.getStalker(e.selection);s=se(e.value,s,o.key=="ArrowLeft"?"backward":"forward");a=o.shiftKey?a:s;return ie.copy(t.unformat(le.copy({...e,selection:{start:Math.min(a,s),end:Math.max(a,s),direction:a<s?"forward":a>s?"backward":"none"}})))}function a(t,e,o){const s=ae.getCursor(e.selection);const a=se(e.value,s,o.key=="Backspace"?"backward":"forward");const i=ie.copy(t.unformat(le.copy({...e,selection:{start:Math.min(s,a),end:Math.max(s,a),direction:"none"}})));i.value=i.value.substring(0,i.selection.start)+i.value.substring(i.selection.end);i.selection.end=i.selection.start;return i}function i(t,e){let o=ae.getCursor(t.selection);let s=ae.getStalker(t.selection);o=e.key=="Home"?0:e.key=="End"?t.value.length:t.selection.start==t.selection.end||e.shiftKey?Math.min(Math.max(o+(e.key=="ArrowLeft"?-1:1),0),t.value.length):e.key=="ArrowLeft"?t.selection.start:t.selection.end;s=e.shiftKey?s:o;t.selection.direction=s<o?"forward":s>o?"backward":"none";t.selection.start=Math.min(s,o);t.selection.end=Math.max(s,o)}function l(t,e,o,s){t.selection.start=e;t.selection.end=o;s&&(t.selection.direction=s)}function n(t){r(t,"")}function r(t,e){t.value=t.value.substring(0,t.selection.start)+e+t.value.substring(t.selection.end);t.selection.start=t.selection.start+e.length;t.selection.end=t.selection.start}})(ne||(ne={}));const re={};function ce(t,e){re[t]=e}function he(t,...e){const o=re[t];return o&&o(e)}function de(t,e,...o){const s=he(e,...o);return s?s.format(le.modify(s.toString(typeof t=="string"?me(t,e,o):t))).value:""}function me(t,e,...o){const s=he(e,o);return s?s.fromString(s.unformat(le.modify(t)).value):undefined}let ye=class t{toString(t){return typeof t=="string"?t:""}fromString(t){return typeof t=="string"&&!!t?t:undefined}partialFormat=this.format;format(t){return{...t,type:"text",inputmode:"numeric",autocomplete:"cc-csc",length:[3,3],pattern:/^\d{3}$/}}unformat(t){return t}allowed(t,e){return e.value.length<3&&t>="0"&&t<="9"}};ce("card-csc",(()=>new ye));let be=class t{toString(t){return Array.isArray(t)&&t.length==2&&typeof t[0]=="number"&&typeof t[1]=="number"?t[0].toString().padStart(2,"0")+t[1].toString().padStart(2,"0"):""}fromString(t){return typeof t=="string"&&t.length==4?[Number.parseInt(t.slice(0,2)),Number.parseInt(t.slice(2))]:undefined}partialFormat=this.format;format(t){let e=t;if(t.value.length>0&&!t.is(0,"0","1"))e=e.prepend("0");if(e.value.length>1)e=e.insert(2," / ");return{...e,type:"text",inputmode:"numeric",autocomplete:"cc-exp",length:[7,7],pattern:/^(0[1-9]|1[012]) \/ \d\d$/}}unformat(t){return t.delete(" / ")}allowed(t,e){return e.value.length<4&&t>="0"&&t<="9"}};ce("card-expires",(()=>new be));let ue=class t{toString(t){return typeof t=="string"?t:""}fromString(t){return typeof t=="string"&&!!t?t:undefined}partialFormat=this.format;format(t){const e=pe(t.value);const o=t.map(((t,o)=>(o+1<e.length[0]&&e.spaceIndexes.includes(o)?" ":"")+t));return{...o,type:"text",inputmode:"numeric",autocomplete:"cc-number",length:e.length.slice(1),pattern:e.verification,classes:["issuer-"+e.icon]}}unformat(t){return t.delete(" ")}allowed(t,e){const o=pe(e.value);return t>="0"&&t<="9"&&e.value.length<o.length[0]}};ce("card-number",(()=>new ue));function pe(t){let e={...fe,spaceIndexes:t.length==14?[4,10]:fe.spaceIndexes};for(const o in ge)if(Object.prototype.hasOwnProperty.call(ge,o)&&ge[o].identification.test(t)){e={...fe,name:o,...ge[o]};break}return e}const fe={name:"unknown",verification:/^\d{19}$/,spaceIndexes:[4,8,12],identification:/^\d/,length:[16,16,19],icon:"generic"};const ge={amex:{verification:/^3[47][0-9]{2}\s[0-9]{4}\s[0-9]{4}\s[0-9]{3}$/,identification:/^3[47]/,length:[15,18,18],icon:"amex"},dankort:{verification:/^(5019)\s[0-9]{4}\s[0-9]{4}\s[0-9]{4}$/,spaceIndexes:[4,8,12],identification:/^(5019)\d+/,length:[16,19,19],icon:"generic"},diners:{verification:/^3(?:0[0-5]|[68][0-9])[0-9]\s[0-9]{6}\s[0-9]{4}$/,identification:/^3(?:0[0-5]|[68][0-9])/,spaceIndexes:[4,10],length:[14,16,16],icon:"diners"},discover:{verification:/^6(?:011|5[0-9]{2})\s[0-9]{4}\s[0-9]{4}\s[0-9]{4}$/,spaceIndexes:[4,8,12],identification:/^6(?:011|5[0-9]{2})/,length:[16,19,19],icon:"generic"},electron:{verification:/^((4026|4405|4508|4844|4913|4917)\s[0-9]{4}\s[0-9]{4}\s[0-9]{4})|((4175)\s(00)[0-9]{2}\s[0-9]{4}\s[0-9]{4})$/,identification:/^(4026|417500|4405|4508|4844|4913|4917)/,spaceIndexes:[4,8,12],length:[16,19,19],icon:"generic"},interpayment:{verification:/^(636)[0-9]\s[0-9]{4}\s[0-9]{4}\s[0-9]{4}$/,spaceIndexes:[4,8,12],identification:/^(636)/,length:[16,19,19],icon:"generic"},jcb:{verification:/^((?:2131|1800)\s[0-9]{4}\s[0-9]{4}\s[0-9]{4})|(35[0-9]{2}\s[0-9]{4}\s[0-9]{4}\s[0-9]{4})$/,identification:/^(?:2131|1800|35\d{3})/,spaceIndexes:[4,8,12],length:[16,19,19],icon:"generic"},unionpay:{verification:/^(62|88)[0-9]{2}\s[0-9]{4}\s[0-9]{4}\s[0-9]{4}$/,spaceIndexes:[4,8,12],identification:/^(62|88)/,length:[16,19,19],icon:"generic"},maestro:{verification:/^(5018|5020|5038|5612|5893|6304|6759|6761|6762|6763|0604|6390)\s[0-9]{4}\s[0-9]{4}\s[0-9]{4}$/,spaceIndexes:[4,8,12],identification:/^(5018|5020|5038|5612|5893|6304|6759|6761|6762|6763|0604|6390)/,length:[16,19,19],icon:"maestro"},mastercard:{verification:/^5[1-5][0-9]{2}\s[0-9]{4}\s[0-9]{4}\s[0-9]{4}$/,spaceIndexes:[4,8,12],identification:/^5[1-5][0-9]/,length:[16,19,19],icon:"mastercard"},visa:{verification:/^4[0-9]{3}\s[0-9]{4}\s[0-9]{4}\s[0-9](?:[0-9]{3})?$/,spaceIndexes:[4,8,12],identification:/^4[0-9]/,length:[16,16,19],icon:"visa"}};var ke;(function(t){function e(t){let e;switch(t){case"sq-AL":case"es-AR":case"it-IT":case"en-GB":case"fr-FR":e="dd/mm/YYYY";break;case"en-US":e="mm/dd/YYYY";break;case"et-EE":case"de-AT":case"de-DE":case"he-IL":case"is-IS":case"lv-LV":case"pl-PL":case"ru-RU":case"fi-FI":e="dd.mm.YYYY";break;case"hi-IN":case"en-IN":e="dd-mm-YYYY";break;default:e="YYYY-mm-dd";break}return e}t.fromLocale=e;function o(t){let e;switch(t){case"dd/mm/YYYY":e="en-GB";break;case"mm/dd/YYYY":e="en-US";break;case"dd.mm.YYYY":e="de-DE";break;default:e="sv-SE";break}return e}t.toLocale=o;function s(t){return typeof t=="string"&&(t=="YYYY-mm-dd"||t=="dd/mm/YYYY"||t=="dd.mm.YYYY"||t=="mm/dd/YYYY")}t.is=s})(ke||(ke={}));class ve{separator;constructor(t){this.separator=t}partialFormat(t){const e=this.format(t);return{...e,remainder:this.formatString.slice(e.value.length)}}unformat(t){return t.delete(this.separator)}validMonth(t,e,o){return new Date(Number.parseInt(o??"2004"),Number.parseInt(e),0).getDate()>=Number.parseInt(t)}}const we={};function xe(t,e){we[t]=e}ce("date",(t=>{const e=t&&t.length>0?t[0]:undefined;const o=ke.is(e)?e:ke.fromLocale(e);const s=we[o]??we["YYYY-mm-dd"];return s()}));let Ce=class t extends ve{constructor(t){super(t)}toString(t){return C.Date.is(t)&&t.length==10?[t.substring(8,10),t.substring(5,7),t.substring(0,4)].join(this.separator):""}fromString(t){const e=t?.length==8?`${t.substring(4,8)}-${t.substring(2,4)}-${t.substring(0,2)}`:undefined;return C.Date.is(e)?e:undefined}formatString=`DD${this.separator}MM${this.separator}YYYY`;format(t){let e=t.delete(this.separator);if(e.get(0,1)>"3")e=e.insert(0,"0");if(e.value.length>1)e=e.insert(2,this.separator);if(e.get(3,1)>"1")e=e.insert(3,"0");if(e.value.length>4)e=e.insert(5,this.separator);return{...e,type:"text",length:[0,10],pattern:new RegExp(["^(0[1-9]|[12][0-9]|3[01])","(0[1-9]|1[012])","\\d{4}$"].join(this.separator))}}allowed(t,e){return e.selection.start==1&&e.value[0]=="3"?t>="0"&&t<="1":e.selection.start==1&&e.value[0]=="0"?t>="1"&&t<="9":e.selection.start==2?t>="0"&&t<="9"&&(t=="0"||t=="1"||this.validMonth(e.value.substring(0,2),t)):e.selection.start==3?t>="0"&&t<="9"&&this.validMonth(e.value.substring(0,2),e.value[2]+t):e.selection.start==7?t>="0"&&t<="9"&&this.validMonth(e.value.substring(0,2),e.value.substring(2,4),e.value.substring(4,7)+t):e.selection.start<8&&t>="0"&&t<="9"}};xe("dd.mm.YYYY",(()=>new Ce(".")));xe("dd/mm/YYYY",(()=>new Ce("/")));xe("dd-mm-YYYY",(()=>new Ce("-")));let Se=class t extends ve{constructor(t){super(t)}toString(t){return C.Date.is(t)&&t.length==10?[t.substring(5,7),t.substring(8,10),t.substring(0,4)].join(this.separator):""}fromString(t){const e=t.length==8?`${t.substring(4,8)}-${t.substring(0,2)}-${t.substring(2,4)}`:undefined;return C.Date.is(e)?e:undefined}formatString=`MM${this.separator}DD${this.separator}YYYY`;format(t){let e=t.delete(this.separator);if(e.get(0,1)>"1")e=e.insert(0,"0");if(e.value.length>1)e=e.insert(2,this.separator);if(e.get(3,1)>(e.get(0,2)=="02"?"2":"3"))e=e.insert(3,"0");if(e.value.length>4)e=e.insert(5,this.separator);return{...e,type:"text",length:[0,10],pattern:new RegExp(["^(0[1-9]|1[012])","(0[1-9]|[12][0-9]|3[01])","\\d{4}$"].join(this.separator))}}allowed(t,e){const o=e.selection.start==1&&e.value[0]=="1"?t>="0"&&t<="2":e.selection.start==1&&e.value[0]=="0"?t>="1"&&t<="9":e.selection.start==3?t>="0"&&t<="9"&&this.validMonth(e.value[2]+t,e.value.substring(0,2)):e.selection.start==7?t>="0"&&t<="9"&&this.validMonth(e.value.substring(2,4),e.value.substring(0,2),e.value.substring(4,7)+t):e.selection.start<8&&t>="0"&&t<="9";return o}};xe("mm/dd/YYYY",(()=>new Se("/")));let ze=class t extends ve{constructor(t){super(t)}toString(t){return typeof t!="string"?"":t}fromString(t){const e=t?.length==8?`${t.substring(0,4)}-${t.substring(4,6)}-${t.substring(6,8)}`:undefined;return C.Date.is(e)?e:undefined}daysInMonth(t){const e=`${t.substring(0,4)}-${t.substring(4,6)}-01`;return C.Date.is(e)?+C.Date.lastOfMonth(`${t.substring(0,4)}-${t.substring(4,6)}-01`).substring(8,10):31}formatString=`YYYY${this.separator}MM${this.separator}DD`;format(t){let e=t.delete(this.separator);if(e.value.length>3){e=e.insert(4,this.separator);if(e.get(5,1)>"1")e=e.insert(5,"0");if(e.value.length>6){e=e.insert(7,this.separator);if(e.get(8,1)>this.daysInMonth(t.value).toString().substring(0,1))e=e.insert(8,"0")}}return{...e,type:"text",length:[0,10],pattern:new RegExp(["^\\d{4}","(0[1-9]|1[012])","(0[1-9]|[12][0-9]|3[01])$"].join(this.separator))}}allowed(t,e){const o=this.daysInMonth(e.value);return e.selection.start==5&&e.value[4]=="0"?t>="1"&&t<="9":e.selection.start==5&&e.value[4]=="1"?t>="0"&&t<="2":e.selection.start==7&&e.value[6]=="0"?t>="1"&&t<="9":e.selection.start==7&&(e.value[6]=="2"&&o<30||e.value[6]=="3")?t>="0"&&t<=o.toString().substring(1):e.selection.start<8&&t>="0"&&t<="9"}};xe("YYYY-mm-dd",(()=>new ze("-")));let Ie=class t{toString(t){return typeof t=="string"?t:""}fromString(t){let e=t.replace(" ","T");const o="0000-01-01T00:00:00.000Z";if(e?.match(/-\d$/))e=e.substring(0,e.length-1)+"0"+e.substring(e.length-1,e.length);e=!e.match(/^\d{4}-(0[1-9]|1[012])/)?undefined:e+o.substring(e.length,o.length);return C.DateTime.is(e)?e:undefined}partialFormat=this.format;format(t){let e=Te(t);if(e.match(/^\d{4}-(0[1-9]|1[012])-(0[1-9]|[12][0-9]|3[01])[\d:.-]$/))e=e.insert(10," ");if(e.match(/^\d{4}-(0[1-9]|1[012])-(0[1-9]|[12][0-9]|3[01]) 3$/))e=e.replace(11,12,"23:");if(e.match(/^\d{4}-(0[1-9]|1[012])-(0[1-9]|[12][0-9]|3[01]) [45]$/))e=e.insert(11,"23:");if(e.match(/^\d{4}-(0[1-9]|1[012])-(0[1-9]|[12][0-9]|3[01]) [6-9]$/))e=e.insert(11,"23:5");if(e.match(/^\d{4}-(0[1-9]|1[012])-(0[1-9]|[12][0-9]|3[01]) 24$/))e=e.replace(10,13,"00:");if(e.match(/^\d{4}-(0[1-9]|1[012])-(0[1-9]|[12][0-9]|3[01]) 25$/))e=e.insert(12,"3:");if(e.match(/^\d{4}-(0[1-9]|1[012])-(0[1-9]|[12][0-9]|3[01]) 2[6-9]$/))e=e.insert(12,"3:5").append(":");if(e.match(/^\d{4}-(0[1-9]|1[012])-(0[1-9]|[12][0-9]|3[01]) ([0-1]\d|2[0-3])\d[\s\S]$/))e=e.insert(13,":");if(e.match(/^\d{4}-(0[1-9]|1[012])-(0[1-9]|[12][0-9]|3[01]) ([0-1]\d|2[0-3]):[6-9]$/))e=e.insert(14,"5");if(e.match(/^\d{4}-(0[1-9]|1[012])-(0[1-9]|[12][0-9]|3[01]) ([0-1]\d|2[0-3]):[0-5]\d\d$/))e=e.insert(16,":");if(e.match(/^\d{4}-(0[1-9]|1[012])-(0[1-9]|[12][0-9]|3[01]) ([0-1]\d|2[0-3]):[0-5]\d:[6-9]$/))e=e.insert(17,"5");return{...e,type:"text",length:[0,19],pattern:/^\d{4}-(0[1-9]|1[012])-(0[1-9]|[12][0-9]|3[01]) ([0-1]\d|2[0-3])(:[0-5]\d){2}$/}}unformat(t){return t}allowed(t,e){return e.value.length<19&&(t>="0"&&t<="9"||t=="-"||t==":"||t=="."||t==" ")}};ce("date-time",(()=>new Ie));function Te(t,e){let o=t;switch(e){case"dd/mm/YYYY":case"dd.mm.YYYY":if(!De(o.value,e))o=o.replace(0,10,De("31"+o.value.substring(2,10),e)?"31"+o.value.substring(2,10):De("30"+o.value.substring(2,10),e)?"30"+o.value.substring(2,10):De("29"+o.value.substring(2,10),e)?"29"+o.value.substring(2,10):De("28"+o.value.substring(2,10),e)?"28"+o.value.substring(2,10):o.value);break;case"mm/dd/YYYY":if(!De(o.value,e))o=o.replace(0,10,De(o.value.substring(0,3)+"31"+o.value.substring(5,10),e)?o.value.substring(0,3)+"31"+o.value.substring(5,10):De(o.value.substring(0,3)+"30"+o.value.substring(5,10),e)?o.value.substring(0,3)+"30"+o.value.substring(5,10):De(o.value.substring(0,3)+"29"+o.value.substring(5,10),e)?o.value.substring(0,3)+"29"+o.value.substring(5,10):De(o.value.substring(0,3)+"28"+o.value.substring(5,10),e)?o.value.substring(0,3)+"28"+o.value.substring(5,10):o.value);break;default:if(t.value.length==10){if(!De(o.value)){o=o.replace(0,10,De(o.value.substring(0,8)+"31")?o.value.substring(0,8)+"31":De(o.value.substring(0,8)+"30")?o.value.substring(0,8)+"30":De(o.value.substring(0,8)+"29")?o.value.substring(0,8)+"29":De(o.value.substring(0,8)+"28")?o.value.substring(0,8)+"28":o.value);break}return t}}return o}function De(t,e){let o;let s;let a;switch(e){case"dd/mm/YYYY":case"dd.mm.YYYY":o=parseInt(t.substring(6,10));s=parseInt(t.substring(3,5));a=parseInt(t.substring(0,2));return o&&s&&a?a>0&&je(o,s)>=a:false;case"mm/dd/YYYY":o=parseInt(t.substring(6,10));s=parseInt(t.substring(0,2));a=parseInt(t.substring(3,5));return o&&s&&a?a>0&&je(o,s)>=a:false;default:o=parseInt(t.substring(0,4));s=parseInt(t.substring(5,7));a=parseInt(t.substring(8,10));return o&&s&&a?a>0&&je(o,s)>=a:false}}function je(t,e){let o;switch(e){case 1:case 3:case 5:case 7:case 8:case 10:case 12:default:o=31;break;case 4:case 6:case 9:case 11:o=30;break;case 2:o=28;break}return o}let Le=class t{toString(t){return Array.isArray(t)&&t.length==2&&typeof t[0]=="number"&&typeof t[1]=="number"?t[0].toString()+" / "+t[1].toString():typeof t=="number"?t.toString():""}fromString(t){return typeof t=="string"&&t.match(/^\d{1,2}\s+\/\s+\d{1,2}$/)?[Number.parseInt(t.slice(0,2)),Number.parseInt(t.slice(t.length-2))]:typeof t=="string"&&t.match(/\d{1,2}/)?Number.parseInt(t):undefined}partialFormat=this.format;format(t){let e=t;if(t.match(/^\d\/$/))e=t.replace(1,2," / ");else if(t.match(/^\d{1,2}\s$/))e=t.replace(t.value.length-1,t.value.length," / ");else if(t.match(/^[\D.]+\/[\D.]+$/))e=t.delete(0,t.value.length);else if(t.match(/^[\D.]+\/[\D.]+\d$/))e=t.delete(0,t.value.length-1);else if(t.match(/^[\D.]+\/[\D.]+\d\d$/))e=t.delete(0,t.value.length-2);else if(t.match(/^[\D.]+\//))e=t.delete(0,t.value.search("/")+1);else if(t.match(/^\d\d\/$/))e=t.replace(2,3," / ");else if(t.match(/^\d\d\s+\/$/))e=t.delete(2,t.value.length);else if(t.match(/^\d\s+\/$/))e=t.delete(1,t.value.length);else if(t.match(/^\d\d\s\s+\/\s*$/))e=t.replace(2,t.value.length," / ");else if(t.match(/^\d\s\s+(\/\s*)?$/))e=t.replace(1,t.value.length," / ");else if(t.match(/^\d\s\/\s\d\d.+$/))e=t.delete(6,t.value.length);else if(t.value.length>1&&t.value.indexOf("/")<1)e=t.insert(2," / ");else if(t.value.length>1&&t.value.split("/").length>2)e=t.delete(t.value.lastIndexOf("/"));else if(t.value.length==1&&!t.isDigit(0))e=t.delete(0);return{...e,type:"text",length:[1,7],pattern:/^(\d{1,2}|\d{1,2} \/ \d{1,2})$/}}unformat(t){return t}allowed(t,e){return e.value.length<7&&(t>="0"&&t<="9"||t=="/"||t==" ")}};ce("divisor",(()=>new Le));let Re=class t{separator=":";patterns={allowed:/^-?\d*(?::{0,1}[0-5]{0,1}[0-9]{0,1}|[.,]{0,1}[0-9]{0,2})$/,extract:/^(-?)(\d*)([:,.]{0,1})([0-9]{0,2})$/,zeros:/^(-?)(0+)(?:[1-9]|0[,.:]?)/};toString(t){let e;if(!C.TimeSpan.is(t))e="";else{const o=C.TimeSpan.normalize(t);if(!o.minutes&&!o.hours)e="";else if(this.separator!=":")e=(+C.TimeSpan.toHours(o).toFixed(2)||"").toString(10);else if(o.hours&&!o.minutes)e=o.hours.toString(10);else if(!o.hours&&o.minutes)e=`${o.minutes<0?"-":""}0:${Math.abs(o.minutes).toString(10)}`;else e=`${o.hours?.toString(10)}:${Math.abs(o.minutes??0).toString(10)}`}return e}fromString(t){let e;const o=t.match(this.patterns.extract);if(!o)e=undefined;else{const[t,s,a,i,l]=o;this.separator=i;if(i==":"){const t={hours:parseInt(a),minutes:parseInt(l)};const o=s?-1:1;e=C.TimeSpan.normalize({hours:!Number.isFinite(t.hours)?0:t.hours*o,minutes:!Number.isFinite(t.minutes)?0:t.minutes*o})}else{const o=parseFloat(t.replace(",","."));e=C.TimeSpan.normalize({hours:!Number.isFinite(o)?0:o})}}return e}partialFormat=this.format;format(t){let e=t;const[,o,s,a]=t.match(this.patterns.extract)??[];if(!s&&a)e=e.insert(o?1:0,"0");const i=e.match(this.patterns.zeros);if(i){const[,t,o]=i;if(o){const s=t?1:0;e=e.delete(s,o.length+s)}}return{...e,type:"tel",pattern:this.patterns.allowed}}unformat(t){const[,,,e]=t.match(this.patterns.extract)??[];if(e)this.separator=e;return t}allowed(t,e){const o=e.value.slice(0,e.selection.start)+t+e.value.slice(e.selection.end);return!!o.match(this.patterns.allowed)}};ce("duration",(()=>new Re));let _e=class t{settings;constructor(t){this.settings=t}toString(t){return typeof t=="string"?t:""}fromString(t){return typeof t=="string"&&!!t?t:undefined}partialFormat=this.format;format(t){return{...t,...this.settings,type:"text",inputmode:"email",autocomplete:"email"}}unformat(t){return t}allowed(t,e){return this.settings.length==undefined||this.settings.length[1]==undefined||e.value.length<this.settings.length[1]}};ce("email",(t=>new _e(t||{})));let Ae=class t{settings;mode;constructor(t,e){this.settings=t;this.mode=e}toString(t){return typeof t=="string"?t:""}fromString(t){return typeof t=="string"&&!!t?t:undefined}split(t){let e;let o="";return t.map(((t,s)=>{const a=s!==0&&t===t.toUpperCase()&&isNaN(+t)&&o!==" "&&this.isSymbolAllowed(t)&&e?" "+t:(t==="_"||t==="-")&&o!==" "?" ":t===" "&&o===" "||!this.isSymbolAllowed(t)||!e&&!this.isSymbolLetter(t)&&this.mode!=="code"?"":t;!e&&(e=this.isSymbolLetter(t));this.isSymbolAllowed(t)&&(o=t);return a})).toLower().delete("-").delete("_")}isSymbolLetter(t){return t>="a"&&t<="z"||t>="A"&&t<="Z"}isSymbolAllowed(t){return this.isSymbolLetter(t)||t>="0"&&t<="9"||t===" "}partialFormat=this.format;format(t){const e=this.split(t);let o;switch(this.mode){case"code":o=e.delete(" ");break;case"pascal":case"camel":let s;o=e.map(((t,e)=>{const o=e===0&&this.mode==="pascal"||s?t.toUpperCase():t.toLowerCase();s=t==" ";return o})).delete(" ");break;case"snake":case"attribute":o=e.replace(" ",this.mode==="snake"?"_":"-");break;default:o=t}return{...o,...this.settings,type:"text",autocomplete:"on"}}unformat(t){return t}allowed(t,e){return this.isSymbolLetter(t)||t>="0"&&t<="9"&&(this.mode=="code"||e.value.length>0)||t=="_"&&this.mode=="snake"&&e.value.length>0||t=="-"&&this.mode=="attribute"&&e.value.length>0}};ce("identifier-code",(t=>new Ae(t||{},"code")));ce("identifier-pascal",(t=>new Ae(t||{},"pascal")));ce("identifier-snake",(t=>new Ae(t||{},"snake")));ce("identifier-camel",(t=>new Ae(t||{},"camel")));ce("identifier-attribute",(t=>new Ae(t||{},"attribute")));let $e=class t{country;constructor(t){this.country=t}toString(t){return typeof t=="string"?t:""}fromString(t){return typeof t=="string"&&!!t?t:undefined}partialFormat=this.format;format(t){let e=t;const o=(new Date).getFullYear().toString();if(t.value.length>1&&t.get(0,2)!="19"&&t.get(0,2)!="20")e=e.prepend(t.get(0,2)>o.substring(2,4)?"19":"20");if(e.value.length>=8)e=e.insert(8,"-");return{...e.truncate(13),type:"text",length:[11,13],pattern:/^\d{6,8}-\d{4}$/}}unformat(t){return t.delete("-")}allowed(t,e){return e.value.length<13&&t>="0"&&t<="9"}};ce("identity-number",(t=>new $e(t&&t.length>0?t[0]:undefined)));let Me=class t{min;max;pad;constructor(t){this.min=t.min;this.max=t.max;this.pad=t.pad}toString(t){return typeof t=="number"?t.toString():""}fromString(t){const e=typeof t=="string"?Number.parseInt(t):undefined;return typeof e=="number"&&!Number.isNaN(e)?e:undefined}partialFormat(t){return{...t,type:"text",inputmode:"numeric",length:[3,undefined],pattern:/^[0-9]+$/}}format(t){const e=this.partialFormat(t);const o=this.fromString(e.value);const s=o==undefined?e.value:this.min!=undefined&&o<this.min?this.toString(this.min):this.max!=undefined&&o>this.max?this.toString(this.max):e.value;return{...e,value:typeof this.pad=="number"&&s?s.padStart(this.pad,"0"):s}}unformat(t){return t}allowed(t,e){return t>="0"&&t<="9"&&(this.max==undefined||this.max.toString().length>e.value.length||e.selection.start!=e.selection.end)}};ce("integer",(t=>new Me(t?.[0]??{})));let Ee=class t{toString(t){return typeof t=="string"?t:""}fromString(t){return typeof t=="string"&&!!t?t:undefined}partialFormat=this.format;format(t){return{...t,type:"password",autocomplete:"current-password"}}unformat(t){return t}allowed(t,e){return true}};ce("password",(()=>new Ee));let Oe=class t{toString(t){let e="";if(typeof t=="number"){const o=t.toString().split(".")[1]?.length??2;e=(t*100).toFixed(!o||o<=1?0:o-2)}return e}fromString(t){const e=typeof t=="string"?Number.parseFloat(t):undefined;return typeof e=="number"&&!Number.isNaN(e)?e/100:undefined}partialFormat=this.format;format(t){return{...t.value?t.suffix(" %"):t,type:"text",inputmode:"numeric",length:[3,undefined],pattern:/^\d+(.\d+)? %+$/}}unformat(t){return t.delete(" %")}allowed(t,e){return t>="0"&&t<="9"||t=="."&&!e.value.includes(".")}};ce("percent",(()=>new Oe));const Pe=[{countryCode:"+46",areaCodes:["011","0120","0121","0122","0123","0125","013","0140","0141","0142","0143","0144","0150","0151","0152","0155","0156","0157","0158","0159","016","0171","0173","0174","0175","0176","018","019","021","0220","0221","0222","0223","0224","0225","0226","0227","023","0240","0241","0243","0246","0247","0248","0250","0251","0253","0258","026","0270","0271","0278","0280","0281","0290","0291","0292","0293","0294","0295","0297","0300","0301","0302","0303","0304","031","0320","0321","0322","0325","033","0340","0345","0346","035","036","0370","0371","0372","0380","0381","0382","0383","0390","0392","0393","040","0410","0411","0413","0414","0415","0416","0417","0418","042","0430","0431","0433","0435","044","0451","0454","0455","0456","0457","0459","046","0470","0471","0472","0474","0476","0477","0478","0479","0480","0481","0485","0486","0490","0491","0492","0493","0494","0495","0496","0498","0499","0500","0501","0502","0503","0504","0505","0506","0510","0511","0512","0513","0514","0515","0520","0521","0522","0523","0524","0525","0526","0528","0530","0531","0532","0533","0534","054","0550","0551","0552","0553","0554","0555","0560","0563","0564","0565","0570","0571","0573","0580","0581","0582","0583","0584","0585","0586","0587","0589","0590","0591","060","0611","0612","0613","0620","0621","0622","0623","0624","063","0640","0642","0643","0644","0645","0647","0650","0651","0652","0653","0657","0660","0661","0662","0663","0670","0671","0672","0680","0682","0684","0687","0690","0691","0692","0693","0695","0696","08","090","0910","0911","0912","0913","0914","0915","0916","0918","0920","0921","0922","0923","0924","0925","0926","0927","0928","0929","0930","0932","0933","0934","0935","0940","0941","0942","0943","0950","0951","0952","0953","0954","0960","0961","0970","0971","0973","0975","0976","0977","0978","0980","0981","010","020","0378","070","072","073","076","079","0710","0740","0746","0749","0741","0742","0743","0744","0745","0747","075","077","078","0900","0939","0944","0969","099"]}];let He=class t{toString(t){return typeof t=="string"?t:""}fromString(t){return typeof t=="string"&&!!t?t:undefined}partialFormat=this.format;format(t){let e=t;if(e.value.startsWith("+")){for(const t of Pe)if(e.value.startsWith(t.countryCode))for(let o of t.areaCodes){o=o.substring(1);if(e.value.startsWith(t.countryCode+o)&&!e.value.includes("-"))e=e.insert(t.countryCode.length,"-").insert(t.countryCode.length+1+o.length,"-")}}else{const t=Pe[0];for(const o of t.areaCodes)if(e.value.startsWith(o)&&!e.value.includes("-")){e=e.insert(o.length,"-");e=e.delete(0);e=e.insert(0,"-").insert(0,t.countryCode)}}if(e.value.includes("-")){const t=e.value.indexOf("-",e.value.indexOf("-")+1)+1;const o=e.value.substring(t,e.value.length+1).length;switch(o){case 4:e=e.insert(t+2," ");break;case 5:e=e.insert(t+3," ");break;case 6:e=e.insert(t+2," ");e=e.insert(t+5," ");break;case 7:e=e.insert(t+3," ");e=e.insert(t+6," ");break;case 8:case 9:e=e.insert(t+3," ");e=e.insert(t+7," ");break}if(o>9){const s=Math.ceil(o/3)-1;if(s>0){for(let o=0;o<s;o++){const s=o*3+3+o;e=e.insert(s+t," ")}}}}return{...e,type:"tel",autocomplete:"tel"}}unformat(t){return t.delete(" ").delete("-")}allowed(t,e){return t>="0"&&t<="9"||e.selection.start==0&&t=="+"&&!e.value.includes("+")}};ce("phone",(()=>new He));let Fe=class t{country;constructor(t){this.country=t}toString(t){return typeof t=="string"?t:""}fromString(t){return typeof t=="string"&&!!t?t:undefined}partialFormat=this.format;format(t){const e=!t.value.includes(" ")&&t.value.length>=4?t.insert(3," "):t;return{...e.truncate(6),type:"text",autocomplete:"postal-code",length:[6,6],pattern:/^\d{3} \d{2}$/}}unformat(t){return t.delete(" ")}allowed(t,e){return e.value.length<=5&&t>="0"&&t<="9"}};ce("postal-code",(t=>new Fe(t&&t.length>0?t[0]:undefined)));let Ue=class t{currency;toInteger;constructor(t){this.currency=t&&typeof t=="object"?t.currency:t;this.toInteger=t&&typeof t=="object"?t.toInteger:undefined}toString(t){return typeof t=="number"?isNaN(t)?"":t.toString():""}fromString(t){const e=typeof t=="string"?Number.parseFloat(t):undefined;return e!=undefined&&!isNaN(e)?e:undefined}partialFormat(t){let e=t.value=="NaN"?t.replace(0,t.value.length,""):le.copy(t);const o=this.currency&&C.Currency.decimalDigits(this.currency);e=this.addLeadingIntegerZero(e);e=this.fillDecimalsIfPresent(e,o,"onlyLimit");e=this.truncateIntegerZeros(e);e=this.addThousandSeparators(e);return{...e,remainder:this.format(t).value.slice(e.value.length),type:"text",inputmode:"numeric",length:[3,undefined],pattern:new RegExp("^(\\d{0,3})( \\d{3})*(\\.\\d*)?$")}}format(t){let e=t.value=="NaN"?t.replace(0,t.value.length,""):le.copy(t);const o=this.currency&&C.Currency.decimalDigits(this.currency);if(!this.toInteger)e=this.forceDecimalZero(e,o);e=this.addLeadingIntegerZero(e);e=this.fillDecimalsIfPresent(e,o,"fillAndLimit");e=this.truncateIntegerZeros(e);e=this.addThousandSeparators(e);e=this.appendCurrency(e);return{...e,type:"text",inputmode:"numeric",length:[3,undefined],pattern:new RegExp("^(\\d{0,3})( \\d{3})*(\\.\\d+)?"+(this.currency?" "+this.currency:"")+"$")}}forceDecimalZero(t,e){if(!t.value.includes(".")&&e&&(Math.abs(Number.parseFloat(t.value))>=0||t.value=="0"))t=t.suffix(".0");return t}addLeadingIntegerZero(t){const e=t.value&&t.value.includes(".")?t.value.indexOf("."):undefined;if(e==0)t=t.prepend("0");return t}fillDecimalsIfPresent(t,e,o){const s=t.value.indexOf(".");if(s!=-1){const a=s+1+(e??2)-t.value.length;t=a<0?t.truncate(t.value.length+a):o=="fillAndLimit"?t.suffix("0".repeat(a)):t}return t}truncateIntegerZeros(t){const e=t.match(/^[0\s]{2,}/);if(e)t=t.replace(0,e[0].length,"0");return t}addThousandSeparators(t){let e=t.value.includes(".")?t.value.indexOf("."):t.value.length;const o=e<=0?0:Math.ceil(e/3)-1;for(let s=0;s<o;s++){const a=e-(o-s)*3;t=t.insert(a," ");e++}return t}appendCurrency(t){return this.currency&&(t.value.length>1||t.value.length==1&&t.value.charAt(0)!=".")?t.suffix(" "+this.currency):t}unformat(t){return this.currency?t.delete(" ").delete(""+this.currency):t.delete(" ")}allowed(t,e){return t>="0"&&t<="9"||t=="."&&!e.value.includes(".")&&(!this.currency||C.Currency.decimalDigits(this.currency)!=0)}};ce("price",(t=>new Ue(t&&t.length>0?t[0]:undefined)));let Ne=class t{settings;constructor(t){this.settings=t}toString(t){return typeof t=="string"?t:""}fromString(t){return typeof t=="string"&&!!t?t:undefined}partialFormat=this.format;format(t){return{...t,type:"text",...this.settings}}unformat(t){return t}allowed(t,e){return this.settings.length==undefined||this.settings.length[1]==undefined||e.value.length<this.settings.length[1]}};ce("text",(t=>new Ne(t||{})));class Ye{toString(t){return typeof t=="string"?"#"+t:""}fromString(t){return t?"#"+t:undefined}partialFormat=this.format;format(t){const e=t.delete("#");return{...e.value?e.prepend("#"):e,type:"text",length:[4,7],pattern:/^#([0-9a-f]{3}|[0-9a-f]{6})$/i}}unformat(t){return t.delete("#")}allowed(t,e){return(t>="0"&&t<="9"||t>="a"&&t<="f"||t>="A"&&t<="F")&&e.value.length<6}}ce("hex-color",(()=>new Ye));const We=()=>`.sc-smoothly-display-h{display:block;white-space:wrap}[hidden].sc-smoothly-display-h{display:none}.sc-smoothly-display-h>div.sc-smoothly-display{opacity:0.6;font-size:.8rem}`;const Be=class{constructor(e){t(this,e)}render(){var t,e;let s;const a=this.type;switch(a){case"json":s=o("smoothly-display-json",{key:"fd641ce179a967152448d7c489ad96dd5ea6cc4e",value:this.value,collapseDepth:this.collapseDepth});break;default:s=de(this.value,a);break;case"email":s=o("a",{key:"d32e3545f5b4e43e0b8f383ba0ef7274472f4d41",href:"mailto:"+this.value},de(this.value,a));break;case"phone":s=o("a",{key:"3b6156fba727f342215fc2510e497bf24e21fa9b",href:"tel:"+this.value},de(this.value,a,this.country));break;case"postal-code":s=de(this.value,a,this.country);break;case"price":s=de(this.value,a,{currency:this.currency,toInteger:this.toInteger});break;case"date":s=(t=he(this.type,T()))===null||t===void 0?void 0:t.toString(this.value);break;case"duration":s=de(this.value,a)||"0";break;case"date-time":s=this.format?C.DateTime.localize(this.value,this.format,T()):(e=he(this.type,T()))===null||e===void 0?void 0:e.toString(this.value);break}return this.label?[o("div",null,this.label),s]:s}};Be.style=We();const Ve=class{constructor(o){t(this,o);this.notice=e(this,"notice")}noticeWarning(t){console.log("emit",t);this.notice.emit(t)}render(){return[o("main",{key:"570a8cf525b8d883f2c226fd9d1f24ef9d2a7bac"},o("fieldset",{key:"9daf4d2a5ff6c3924c09186d0b73c8dc11ef2354"},o("h2",{key:"01bf90a47c56197346494bbc1992edf5ab9d8b2e"},"Smoothly display"),o("dl",{key:"dd5fbdf6e596430cb0a18482b50a8d3ef46cc2d9"},o("dt",{key:"e97f6d69f565560e54956acc47c61e676db32b26"},"Duration"),o("dd",{key:"b3ec7065ba3cb6e1832cf22f329964bc3a983d09"},o("div",{key:"db46dbf07917dd784f0939803fcb97f80d4ab0a7"},o("div",{key:"eda3a232df465a291734a9e1e607f779727928a2"},o("smoothly-display",{key:"894097c909f8c1b0dd276696db72daadf3365aee",style:{display:"inline"},type:"duration",value:{hours:13,minutes:100}})," h"),o("div",{key:"0f258be9133609201671eb993a290b2be1ee8d2b"},o("smoothly-display",{key:"d98834b9c367bbb650e8e933be3ee20b93df8082",style:{display:"inline"},type:"duration",value:{hours:8}})," h"),o("div",{key:"2dc0241b935f3d45f812fe0175731954c8e0b983"},o("smoothly-display",{key:"cc4c171af5aa79cf5487a8a131430bacc5248c98",style:{display:"inline"},type:"duration",value:{minutes:3}})," h"),o("div",{key:"19ff8935bb3454d538b0312530d32ff63dfb3034"},o("smoothly-display",{key:"e3c7ba72956c3735bc646773cf30eb78c2c4e75b",style:{display:"inline"},type:"duration",value:{hours:-13,minutes:100}})," h"),o("div",{key:"40d13934f818da8df03dd4215b5176cdf0089c20"},o("smoothly-display",{key:"f03306bc6cbd65f3ee50ce6fb57c66b2af229a83",style:{display:"inline"},type:"duration",value:{hours:-8}})," h"),o("div",{key:"f0d127f6a00ed1c06eb36fdfa1b809354cb139ba"},o("smoothly-display",{key:"85ea4fa490947ec5bf9810fc5e5677550b507f7b",style:{display:"inline"},type:"duration",value:{}})," h"),o("div",{key:"f60948619c1fcbad63e4af03f282ff3366f1ba76"},o("smoothly-display",{key:"846841ac1b7cd206a2a95034db25a3059dccf890",style:{display:"inline"},type:"duration",value:{minutes:-3}})," h"))),o("dt",{key:"3db393fff9fd7740683746088e884d83ac51e1e8"},"text"),o("dd",{key:"2bd200acca8afd5cf72dd94294e4438e811ac411"},o("smoothly-display",{key:"aa88f3c9ed96edff41c91b4ed2206a04c90ed6f4",type:"text",value:"text"})),o("dt",{key:"81e183489b4fb749823c25b2a50ced9621aa432e"},"postal code"),o("dd",{key:"390dd9916fcf42cb15a48727082a27550e46814a"},o("smoothly-display",{key:"7e80d1d0b8746596448ca50c356e4afbe7d6f276",type:"postal-code",value:"752 31"})),o("dt",{key:"c0d0dc8205d93cb8479713bdae1208e2847e477a"},"password"),o("dd",{key:"0ea85f4699579f4b24f35f59775d7dec43978e5e"},o("smoothly-display",{key:"9779849ced3842513a5c7d5d37cd20bf1f01f244",type:"password",value:"password"})),o("dt",{key:"5143b3ae0e39eb416c344a98b45974c2ad480eef"},"email"),o("dd",{key:"8c25c7f73f1f4ec38cea3d7c520dc037df7b2224"},o("smoothly-display",{key:"53a354324dea186db81a5b59bf75e222db33e56d",type:"email",value:"test@example.com"})),o("dt",{key:"469bd6001f5ad150ea815bb6e89a29eda53b5b77"},"price"),o("dd",{key:"cde7a755ca3ff50a5b0cea8eb4a1dae6aa5b253b"},o("smoothly-display",{key:"bb68a44ffd892b48277aa20a95f5e863680b4fa3",type:"price",value:"13.37",currency:"SEK"})),o("dt",{key:"aff590f97d41ab80c38e7ecaba3e8023fd8ea734"},"price without decimals"),o("dd",{key:"39a40abdaae41f74fa5e52be77cbe1045965e1dc"},o("smoothly-display",{key:"1c653914e801725457fb55bb1b70ed56d991dabb",type:"price",value:200,currency:"SEK",toInteger:true})),o("dt",{key:"be366012d28535a04fa54216d29fa7835bdd789b"},"price with decimals if they are set, otherwise no decimal"),o("dd",{key:"f40b67c170fec282518c59179189b4f262a12804"},o("smoothly-display",{key:"52ba5c8026d562f40ac62cd14fe1cf67b5d0c641",type:"price",value:200.2,currency:"SEK",toInteger:true})),o("dt",{key:"cc1048ee5cb4ef42c4396009ccb085e7ce8c3eca"},"price with decimals"),o("dd",{key:"4814a19946eb610096f1aa76236971ca4e7d52f6"},o("smoothly-display",{key:"cb4cbda427c7a488bbba0c978d91a80683b9d8cb",type:"price",value:200.2,currency:"SEK"})),o("dt",{key:"deb381d3caec587043c0f58a58d06406f215f3e5"},"percent"),o("dd",{key:"afbe0bc5aa167605f50ec765a999432856019082"},o("smoothly-display",{key:"ffb1aee2a313b9f6ab71d42ed937619423095293",type:"percent",value:"42"})),o("dt",{key:"381bc0bb2857f9cc3b0e1b9e2cd439e35106f24b"},"phone"),o("dd",{key:"96c9e0fb69de5004ba8666939b932f42db444db6"},o("smoothly-display",{key:"a242f3011ff04f9f02791b40bc0c042d9b95e087",type:"phone",value:"0101881108"})),o("dt",{key:"ddf64889ff408a199d11b734ee2d41f15c619ace"},"card number"),o("dd",{key:"a6d6b94ab7b1c53b35622fb1e063b1293a637cf6"},o("smoothly-display",{key:"8dbdba91c26bd0f1b4f923f76589b08f5c032f65",type:"card-number",value:"4111111111111111"})),o("dt",{key:"ef7ef814a8cf29fec2f974efd32f040c3d725cc7"},"card expires"),o("dd",{key:"84321e803af55ddd5469ef3068fd2eb8d946420b"},o("smoothly-display",{key:"20651476830684d2a40e911a40fc00fe7f1ffe7e",type:"card-expires",value:"7/22"})),o("dt",{key:"7aef10fd17c205805fe7f5e790d12c2b89247a77"},"card csc"),o("dd",{key:"00eca296571bf49a6c338c13a939d6f3155d4a08"},o("smoothly-display",{key:"c18662e291199765f4278d54e595588bfc3d6f1e",type:"card-csc",value:"987"})),o("dt",{key:"e92d089a639a1e3357a6d39d2e499fff6bd7c2d1"},"date"),o("dd",{key:"f3cc2aabdec6942c8eadc2278b7a42adae09168d"},o("smoothly-display",{key:"fcd502f245a1c814faa093d82bb101182b3dafcd",type:"date",value:"2022-07-07"})),o("dt",{key:"81b8cbdb349df1bd1e1f84cc4bd006d7f2549c19"},"date time"),o("dd",{key:"eb5a64ea635751c62366292ce0ca23d125ad17ee"},o("smoothly-display",{key:"039d66c0457be7e82b999a9e4c0672deee8fbe90",type:"date-time",format:{year:"numeric",month:"short",day:"numeric",hour:"numeric",minute:"numeric",second:"numeric"},value:"2022-07-07T02:02:02Z"})),o("dd",{key:"456d8713e2e366e0efd48c4b0eca946a780bcd93"},o("smoothly-display",{key:"a6ea10ff87584dc5ce0146d6547b0948bb625e2e",type:"date-time",format:{year:"2-digit",month:"long",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit"},value:"2022-07-07T02:02:02Z"})),o("dd",{key:"0fc3da083c35e907cb4c48645ecc7a3e4a4455d7"},o("smoothly-display",{key:"49485eb182ac66fb8f9940d3719c4059c3897dc4",type:"date-time",format:{year:"numeric",month:"2-digit",day:"2-digit",hour:"numeric",minute:"numeric",second:"numeric"},value:"2022-07-07T12:22:24Z"})),o("dd",{key:"40a262a2fc34177b63b7e2969b3b59a5de602861"},o("smoothly-display",{key:"b7f00e769f842ed9ea6a630058cd01768ec2c0ac",type:"date-time",format:{year:"numeric",month:"numeric",day:"numeric",hour:"numeric",minute:"numeric",second:"numeric"},value:"2022-07-07T12:22:24Z"})),o("dd",{key:"4a3173f9713aaa4371ab13ebd8577cd7a7935c95"},o("smoothly-display",{key:"05904422b25f61dfc9f4325a4bb51b3d39a9aabf",type:"date-time",format:{year:"numeric",month:"short",day:"numeric"},value:"2022-07-07T00:00+02:00"})),o("dd",{key:"59783d4201fcf777c5e3635ad53934644eb68310"},o("smoothly-display",{key:"58450e26b3eeab44be1c083f7f1320976dadf783",type:"date-time",format:{year:"2-digit",month:"numeric",day:"numeric"},value:"2022-07-07T00:00+02:00"})),o("dd",{key:"0beada1376af2c6652c3dad47b08c1b1699b24bb"},o("smoothly-display",{key:"9d1b738dd535da8a7e07b959b4e581cf0f2b93d1",type:"date-time",format:{year:"2-digit",month:"numeric",day:"numeric",hour:"2-digit",minute:"2-digit",second:"2-digit",timeZone:"Europe/Stockholm"},value:"2022-07-07T12:15Z"})),o("dt",{key:"6d2aac61ed9fad093c2f19c2ec4d4de32b12e9a0"},"Display JSON"),o("dd",{key:"2215884fa898511c90acf6997f8e20aea4c0ea0d"},o("smoothly-display-demo-json",{key:"85cecf5eeaa416c9baca4a7876e348b54a09dbcb"})))),o("h2",{key:"56ae1be90a6bf9a152118dab9fec7d04b2a9b8e4"},"With labels"),o("dd",{key:"4689634be5c50bafa97e8a08baee4b85b0a621ec"},o("smoothly-display",{key:"14067ba1153408f0d11b02a76c5685b2c1f4a374",label:"Today",type:"date",value:C.Date.now()}),o("smoothly-display",{key:"4ba2105f9b3e139fac91bab03b9640766a18814a",label:"Total amount",type:"price",currency:"SEK",value:6789}),o("smoothly-display",{key:"138eb84408cb4efbc29f43ed1e3f9f71539dfac8",label:"Total amount",type:"price",currency:"GBP",value:678.9}),o("smoothly-display",{key:"2bddcb3e8ec54e29fc53a8ff4213cd157b34c8f1",label:"Logs",type:"json",value:[{type:"trace",message:"Hello"},{type:"error",message:"Oh no!"}]})),o("fieldset",{key:"830ecceb2f6904425d60f24ab37e046e4d147b04"},o("h2",{key:"dbab367e69309f7c29a3d025d585afbb2fa88965"},"Test of different kinds of notifier"),o("button",{key:"187872d0e82b1389961e3d41a0998a0814f5e086",onClick:()=>this.noticeWarning(S.warn("This is a test warning notice."))},"warning"),o("button",{key:"3f2ee3e8052834171ee2878dc3dcbd58d0fa6ed5",onClick:()=>this.noticeWarning(S.succeeded("This is a test success notice."))},"success"),o("button",{key:"678349d8e5f0ba8b237ef1f2cd7c2b2d04aafe14",onClick:()=>this.noticeWarning(S.failed("This is a test danger notice."))},"danger"),o("button",{key:"06792c0fd16258c1a306a902c77e3600bcae0872",onClick:()=>this.noticeWarning(S.execute("This is a test execute notice.",(()=>new Promise((t=>window.setTimeout((()=>t([true,"This went great"])),3e3))))))},"execute"),o("button",{key:"91ffa7d831eefbdce57ea2732ca884a3f30129ea",onClick:()=>this.noticeWarning(S.delay("This is a test delay notice.",(()=>new Promise((t=>window.setTimeout((()=>t([true,"This went great"])),3e3))))))},"delay")),o("fieldset",{key:"020e2fe53b4ee2f6b36a94863dbe2367d02e0b51"},o("h2",{key:"bb7cfda125e43c7f2afee6d7853318522456762e"},"Smoothly spinner"),o("div",{key:"a9f199a1fe6837f1546ee3aca45b74c399c23519",style:{width:"fit-content"}},"Large",o("smoothly-spinner",{key:"b3d78a677a1c3a62be4e448ac394096d62bc04e0",size:"large",style:{"--spinner-background":"200,255,200","--spinner-background-opacity":"0.2","--spinner-color":"0,130,0"}})),o("div",{key:"db5b5ce167113c8471537bc9604af1d31ef5f228",style:{width:"fit-content"}},"Medium",o("smoothly-spinner",{key:"2eff854f0c518cb3928615775367c6ca768f1a9e",size:"medium"})),o("div",{key:"b92410ef7ff77eb220554dce92ee9e5e0161b8d2",style:{width:"fit-content"}},"Small",o("smoothly-spinner",{key:"4836644ee23ce44de781fc59b185c363d2d10e5e",size:"small"})),o("div",{key:"a6b659783973f77a39e1643940fc97f77be1f7ad"},"Icon sized spinner on button",r.values.map((t=>o("smoothly-button",{size:"icon",color:t,shape:"rounded",onClick:()=>{this.downloadingSpinner=true;setTimeout((()=>this.downloadingSpinner=false),3e3)}},!this.downloadingSpinner&&o("smoothly-icon",{name:"download-outline"}),this.downloadingSpinner&&o("smoothly-spinner",{size:"icon",style:{"--spinner-background-opacity":"0"}}))))),o("h3",{key:"8161fb53d9dfa5aba8bc164adcaf9e3daeeaa627"},"Spinner with overlay"),o("div",{key:"8d4115c6ab8a24add137c06cde794937aba85b69",style:{position:"relative",height:"10em"}},"Large Overlay Spinner",o("smoothly-spinner",{key:"d04a2e77e759e5e094244922ec70fc150bac6858",overlay:true,size:"large",style:{"--spinner-background":"255,200,255","--spinner-background-opacity":"0.5","--spinner-color":"0,130,0"}})),o("div",{key:"e284851987d3e475d72dd68e5465ff2b54e38710",style:{position:"relative",height:"10em"}},"Medium Overlay Spinner",o("smoothly-spinner",{key:"29d593da93d2e11ac520650d64af1de6728e837e",overlay:true,color:"secondary",size:"medium"})),o("div",{key:"bcc6e156596f946964173cf9a100dce8f3f9adcb",style:{position:"relative",height:"10em"}},"Small Overlay Spinner",o("smoothly-spinner",{key:"57498aeaf7c8690958a1f42d80220bf6ba01a069",overlay:true,size:"small"}))),o("fieldset",{key:"ed65a407dde854768a1934add1d88a40d99f20c5"},o("h2",{key:"3f0a8eba2588ac878f02104f60fbc6072173c480"},"Smoothly summary"),o("smoothly-summary",{key:"b5538b3841957408ca25314d20789fc87db9f89c"},o("span",{key:"0a66c656b75981dd493f9288522c914c6aaf3177",slot:"summary"},"Some title"),o("smoothly-summary",{key:"d7a1064544e0f530ee18fc98e5dbac110f7aad79",slot:"content"},o("div",{key:"7dc9a5d35ddd789ef54fe021ecf9b784793a3074",slot:"summary"},"Some other title"),o("div",{key:"b0b0000431972ce6510eeb966d35f90f98baa372",slot:"content"},"A lot more content, yes please. A lot more content, yes please. A lot more content, yes please. A lot more content, yes please. A lot more content, yes please.A lot more content, yes please. A lot more content, yes please. A lot more content, yes please. A lot more content, yes please."))),o("smoothly-summary",{key:"7eac5c136d5ed3c09c53f676991fb957bdea50f2"},o("div",{key:"45239a377a7ae5b15baa3fefaca04f965bc3dd80",slot:"summary",style:{display:"flex",gap:"0.3rem"}},o("span",{key:"aed615a5e1dcfece04dc29d3381e706e89328025"},"Person"),o("smoothly-icon",{key:"bbdbee4093170b788015686e6ac31cb75adfb3c4",name:"person",color:"light",fill:"clear",size:"tiny"})),o("p",{key:"dcbe807176c6c8c0a642b8351487c63a2a31d1d1",slot:"content"},"Some person information.")),o("h2",{key:"b939b82ef761060a6de4190fd80e5aec1d6c6938"},"Label"),Ge.map((t=>o("smoothly-label",{hue:t.hue,description:t.description,shape:"rectangle"},t.name))),o("smoothly-label",{key:"9dd6878b3e540f24dee8fc99d6834a6c2ed85744",color:"primary",description:"Using colors",shape:"rectangle"},"Primary")))]}};const Ge=[{name:"2fa",hue:120,description:"User has two factor authentication enabled."},{name:"expired",hue:240,description:"User's password has expired."},{name:"inactive",hue:60,description:"User is inactive."}];const Ke=class{constructor(e){t(this,e)}render(){return o(s,{key:"dd76081f4adf3ae47e0015c2f17b43e50c6ace15"},[0,1,3,undefined].map((t=>[o("div",null,"collapseDepth=",t!==null&&t!==void 0?t:"undefined"),o("div",null,o("smoothly-display",{type:"json",value:qe,collapseDepth:t}))])))}};const qe={name:"stringy",nested:{age:109,array:["one","two","three",{name:"four"}],emptyObject:{},emptyArray:[],truthy:true,falsy:false,null:null,notDefined:undefined,longString:"pepparkakorpepparkakorpepparkakorpepparkakorpepparkakorpepparkakorpepparkakorpepparkakorpepparkakorpepparkakorpepparkakorpepparkakorpepparkakorpepparkakorpepparkakorpepparkakorpepparkakorpepparkakorpepparkakorpepparkakorpepparkakorpepparkakorpepparkakorpepparkakorpepparkakorpepparkakorpepparkakorpepparkakorpepparkakorpepparkakorpepparkakorpepparkakorpepparkakorpepparkakorpepparkakorpepparkakorpepparkakorpepparkakorpepparkakorpepparkakorpepparkakorpepparkakorpepparkakorpepparkakorpepparkakorpepparkakorpepparkakorpepparkakorpepparkakorpepparkakorpepparkakorpepparkakorpepparkakorpepparkakorpepparkakorpepparkakorpepparkakorpepparkakorpepparkakorpepparkakorpepparkakorpepparkakorpepparkakorpepparkakorpepparkakorpepparkakorpepparkakorpepparkakorpepparkakorpepparkakorpepparkakorpepparkakorpepparkakorpepparkakorpepparkakorpepparkakorpepparkakorpepparkakorpepparkakorpepparkakorpepparkakorpepparkakorpepparkakorpepparkakorpepparkakorpepparkakorpepparkakorpepparkakorpepparkakorpepparkakorpepparkakorpepparkakorpepparkakorpepparkakorpepparkakorpepparkakorpepparkakorpepparkakorpepparkakorpepparkakorpepparkakorpepparkakorpepparkakorpepparkakorpepparkakorpepparkakorpepparkakorpepparkakorpepparkakorpepparkakorpepparkakorpepparkakorpepparkakorpepparkakorpepparkakorpepparkakorpepparkakorpepparkakorpepparkakorpepparkakorpepparkakorpepparkakorpepparkakorpepparkakorpepparkakorpepparkakorpepparkakorpepparkakorpepparkakorpepparkakorpepparkakorpepparkakorpepparkakorpepparkakorpepparkakorpepparkakorpepparkakorpepparkakorpepparkakorpepparkakorpepparkakorpepparkakor"}};const Ze=({value:t,collapseDepth:e})=>m().is(t)||Array.isArray(t)?o("smoothly-display-json-object",{value:t,collapseDepth:e}):o("smoothly-display-json-primitive",{value:t});const Je=()=>`.sc-smoothly-display-json-h{font-family:monospace}`;const Xe=class{constructor(e){t(this,e)}render(){return o(Ze,{key:"939a93b45e7f0f021c361331d011e7cb61627fed",value:this.value,collapseDepth:this.collapseDepth})}};Xe.style=Je();const Qe=()=>`.sc-smoothly-display-json-object-h{font-family:monospace;position:relative}[hidden].sc-smoothly-display-json-object-h{display:none}.indent.sc-smoothly-display-json-object{padding-left:1rem;border-left:1px solid rgba(var(--smoothly-default-contrast), 0.3)}.sc-smoothly-display-json-object-h:not(.open) .content.sc-smoothly-display-json-object{opacity:0;position:absolute;pointer-events:none}.sc-smoothly-display-json-object-h>.content.sc-smoothly-display-json-object>.indent.sc-smoothly-display-json-object:last-child>.comma.sc-smoothly-display-json-object{display:none}.sc-smoothly-display-json-object-h .open-bracket.sc-smoothly-display-json-object{cursor:pointer}.sc-smoothly-display-json-object-h .open-bracket.sc-smoothly-display-json-object::after{background-color:rgb(var(--smoothly-light-color));color:rgb(var(--smoothly-light-shade));border:1px solid rgb(var(--smoothly-light-color));white-space:pre;border-radius:0.25rem;font-weight:bold;font-size:0.8em}.sc-smoothly-display-json-object-h>.open-bracket.sc-smoothly-display-json-object:hover::after{color:rgb(var(--smoothly-default-contrast));border-color:rgb(var(--smoothly-light-shade))}.sc-smoothly-display-json-object-h:not(.open):not(.empty)>.open-bracket.sc-smoothly-display-json-object::after{content:" ▶ " attr(data-length) " ◀ "}.open.sc-smoothly-display-json-object-h:not(.empty)>.open-bracket.sc-smoothly-display-json-object::after{content:" ▼ "}.sc-smoothly-display-json-object-h>.open-bracket.sc-smoothly-display-json-object:hover,.sc-smoothly-display-json-object-h>.open-bracket.sc-smoothly-display-json-object:hover~.close-bracket.sc-smoothly-display-json-object{font-weight:bold}.sc-smoothly-display-json-object-h>.open-bracket.sc-smoothly-display-json-object:hover+.content.sc-smoothly-display-json-object>.indent.sc-smoothly-display-json-object{border-left-color:rgb(var(--smoothly-default-contrast))}`;const to=class{constructor(e){t(this,e);this.openBracket="";this.closeBracket=""}componentWillLoad(){this.open=typeof this.collapseDepth=="number"?this.collapseDepth>0:true;if(Array.isArray(this.value)){this.openBracket="[";this.closeBracket="]";this.length=this.value.length}else{this.openBracket="{";this.closeBracket="}";this.length=Object.keys(this.value).length}this.empty=this.length==0}render(){const t=typeof this.collapseDepth=="number"?Math.max(this.collapseDepth-1,0):undefined;return o(s,{key:"9c9b5a46433770a7d56343c4bf723163e8a56475",class:{empty:this.empty,open:this.open}},o("span",{key:"836957462d65b5c136231bd3867f7da169ecb343",class:"open-bracket",onClick:()=>this.open=!this.open,"data-length":this.length},this.openBracket),o("span",{key:"ef132e20317fb0b1b3f38442fec7bd2731ec5c43",class:"content"},Array.isArray(this.value)?this.value.map((e=>o("div",{class:"indent"},o(Ze,{value:e,collapseDepth:t}),o("span",{class:"comma"},",")))):Object.entries(this.value).map((([e,s])=>o("div",{class:"indent"},o("smoothly-display-json-record-key",{value:e}),":"," ",o(Ze,{value:s,collapseDepth:t}),o("span",{class:"comma"},","))))),o("span",{key:"50bed891b85fc5d407cad5e8ae1d53dcf56551d2",class:"close-bracket"},this.closeBracket))}};to.style=Qe();const eo=()=>`.sc-smoothly-display-json-primitive-h{font-family:monospace;display:inline;overflow-wrap:anywhere;white-space:pre-wrap}[hidden].sc-smoothly-display-json-primitive-h{display:none}.string.sc-smoothly-display-json-primitive-h{font-weight:var(--smoothly-display-json-string-font-weight, bold);color:rgb(var(--smoothly-display-json-string, var(--smoothly-primary-color)))}.number.sc-smoothly-display-json-primitive-h{font-weight:var(--smoothly-display-json-number-font-weight, bold);color:rgb(var(--smoothly-display-json-number, var(--smoothly-secondary-color)))}.boolean.sc-smoothly-display-json-primitive-h{font-weight:var(--smoothly-display-json-boolean-font-weight, bold);color:rgb(var(--smoothly-display-json-boolean, var(--smoothly-tertiary-color)))}.null.sc-smoothly-display-json-primitive-h,.undefined.sc-smoothly-display-json-primitive-h{font-weight:var(--smoothly-display-json-undefined-font-weight, normal);color:rgb(var(--smoothly-display-json-undefined, var(--smoothly-medium-color)))}`;const oo=class{constructor(e){t(this,e)}render(){return o(s,{key:"017bbc369b1e8ff42466411a5b28b52c5661b740",class:this.value==null?"null":typeof this.value},""+JSON.stringify(this.value))}};oo.style=eo();const so=()=>`.sc-smoothly-display-json-record-key-h{font-family:monospace;display:inline;color:rgb(var(--smoothly-default-contrast))}[hidden].sc-smoothly-display-json-record-key-h{display:none}`;const ao=class{constructor(e){t(this,e)}render(){return o(s,{key:"67d6629e71ecde01829b6279188bc7332c3d9379"},'"',this.value,'"')}};ao.style=so();var io;(function(t){function e(t){return typeof t=="string"&&(t=="GET"||t=="POST"||t=="DELETE"||t=="HEAD"||t=="PATCH"||t=="PUT"||t=="OPTIONS"||t=="TRACE"||t=="CONNECT")}t.is=e;function o(t){t=t?.toUpperCase();return e(t)?t:undefined}t.parse=o})(io||(io={}));const lo={};function no(t,...e){e.forEach((e=>lo[e]=t))}function ro(t){const e=t.headers.get("Content-Type");const o=e&&e.split(";");const s=lo[o?.[0]??"plain/text"];return s?s(t):t.text()}const co={};function ho(t,...e){e.forEach((e=>co[e]=t))}function mo(t,e){const o=co[e?.split(";")[0]??""];return o?o(t,e):t}function yo(t){return t.toLowerCase().replace(/-[a-z]/g,(t=>t.substring(1).toUpperCase()))}function bo(t){const e=t.replace(/[A-Z]/g,(t=>"-"+t));return e[0].toUpperCase()+e.substring(1)}const uo=[["aIM","A-IM",1],["accept","Accept",2],["acceptCharset","Accept-Charset",2],["acceptDatetime","Accept-Datetime",1],["acceptEncoding","Accept-Encoding",2],["acceptLanguage","Accept-Language",2],["accessControlRequestMethod","Access-Control-Request-Method",1],["accessControlRequestHeaders","Access-Control-Request-Headers",1],["authorization","Authorization",1],["cacheControl","Cache-Control",1],["cfConnectionIp","CF-Connecting-IP",1],["cfIpCountry","CF-IPCountry",1],["connection","Connection",1],["contentLength","Content-Length",1],["contentMD5","Content-MD5",1],["contentType","Content-Type",1],["cookie","Cookie",1],["date","Date",1],["expect","Expect",1],["forwarded","Forwarded",1],["from","From",1],["host","Host",1],["http2Settings","HTTP2-Settings",1],["ifMatch","If-Match",2],["ifModifiedSince","If-Modified-Since",1],["ifNoneMatch","If-None-Match",2],["ifRange","If-Range",1],["ifUnmodifiedSince","If-Unmodified-Since",1],["maxForwards","Max-Forwards",1],["origin","Origin",1],["pragma","Pragma",1],["proxyAuthorization","Proxy-Authorization",1],["range","Range",1],["referer","Referer",1],["te","TE",2],["trailer","Trailer",1],["transferEncoding","Transfer-Encoding",1],["userAgent","User-Agent",1],["upgrade","Upgrade",2],["via","Via",2],["warning","Warning",1],["upgradeInsecureRequests","Upgrade-Insecure-Requests",1],["xRequestedWith","X-Requested-With",1],["dnt","DNT",1],["xForwardedFor","X-Forwarded-For",1],["xForwardedHost","X-Forwarded-Host",1],["xForwardedProto","X-Forwarded-Proto",1],["xMsContinuation","X-Ms-Continuation",1],["frontEndHttps","Front-End-Https",1],["xHttpMethodOverride","X-Http-Method-Override",1],["xAttDeviceId","X-ATT-DeviceId",1],["xWapProfile","X-Wap-Profile",1],["proxyConnection","Proxy-Connection",1],["xCsrfToken","X-Csrf-Token",1],["xCorrelationID","X-Correlation-ID",1],["xModNonce","x-mod-nonce",1],["xModRetry","x-mod-retry",1],["saveData","Save-Data",1],["xAuthToken","X-Auth-Token",1],["xTrackingId","x-tracking-id",1]];var po;(function(t){function e(t){function e(t){return t==undefined||typeof t=="string"}function o(t){return t==undefined||Array.isArray(t)&&t.every((t=>typeof t=="string"))}return typeof t=="object"&&uo.every((s=>(s[2]==1?e:o)(t[s[0]])))}t.is=e;function o(t){return Object.fromEntries(Object.entries(t).map((([t,e])=>{const o=uo.find((([e,o,s])=>e==t));return[o?o[1]:bo(t),Array.isArray(e)?e.join(", "):e]})))}t.to=o;function s(t){return Object.fromEntries((Array.isArray(t)?t.map((([t,...e])=>[t,e.join(", ")])):i(t)?[...t]:Object.entries(t)).map((([t,e])=>{const o=uo.find((([e,o,s])=>t.toLowerCase()==o.toLowerCase()));return o?[o[0],o[2]==1||typeof e!="string"?e:e.split(",").map((t=>t.trim()))]:[yo(t),e]})))}t.from=s;function a(t){return Object.entries(t).map((([t,e])=>t+": "+e)).join("\n")}t.toString=a;function i(t){return typeof t.entries=="function"}})(po||(po={}));var fo;(function(t){function e(t){return typeof t=="object"&&Object.keys(t).every((t=>["method","url","parameter","search","remote","header","body"].some((e=>e==t))))&&io.is(t.method)&&t.url instanceof URL&&typeof t.parameter=="object"&&Object.entries(t.parameter).every((([t,e])=>typeof t=="string"&&typeof e=="string"))&&typeof t.search=="object"&&Object.entries(t.search).every((([t,e])=>typeof t=="string"&&typeof e=="string"))&&(t.remote==undefined||typeof t.remote=="string")&&(t.header==undefined||po.is(t.header))}t.is=e;async function o(t){const o=e(t)?t:a(t);const s=o.header.contentType?.startsWith("multipart/form-data")?(({contentType:t,...e})=>e)(o.header):o.header;return{url:o.url.toString(),method:o.method,headers:po.to(s),body:["GET","HEAD"].some((t=>t==o.method))?undefined:await mo(await o.body,o.header.contentType)}}t.to=o;function s(t){const e=new URL(t.url);return{method:io.parse(t.method)??"GET",url:e,header:po.from(t.headers),parameter:{},search:Object.fromEntries(e.searchParams.entries()),body:ro(t),..."cf"in t&&{cloudflare:t.cf}}}t.from=s;function a(t){let e;if(typeof t=="string")e=a({url:t});else{const o=typeof t.url=="string"?new URL(t.url):t.url;e={method:io.parse(t.method)??"GET",url:o,parameter:t.parameter??{},search:{...t.search,...Object.fromEntries(o.searchParams.entries())},remote:t.remote,header:t.header??{},body:t.body}}return e}t.create=a;(function(t){t.is=po.is;t.from=po.from;t.to=po.to})(t.Header||(t.Header={}))})(fo||(fo={}));const go=typeof Response!="undefined"?Response:globalThis.Response;var ko=undefined&&undefined.__classPrivateFieldGet||function(t,e,o,s){if(o==="a"&&!s)throw new TypeError("Private accessor was defined without a getter");if(typeof e==="function"?t!==e||!s:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return o==="m"?s:o==="a"?s.call(t):s?s.value:e.get(t)};var vo=undefined&&undefined.__classPrivateFieldSet||function(t,e,o,s,a){if(s==="m")throw new TypeError("Private method is not writable");if(s==="a"&&!a)throw new TypeError("Private accessor was defined without a setter");if(typeof e==="function"?t!==e||!a:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return s==="a"?a.call(t,o):a?a.value=o:e.set(t,o),o};var wo,xo,Co,So,zo,Io,To,Do,jo;let Lo=class t{get state(){return ko(this,So,"f")?"closed":"opened"}set onMessage(t){if(ko(this,xo,"f").length&&t){ko(this,xo,"f").forEach(t);vo(this,xo,[],"f")}vo(this,Io,t,"f")}set onClose(t){if(this.state=="closed"&&t)t();vo(this,To,t,"f")}set onOpen(t){if(this.state=="opened"&&t)t();vo(this,jo,t,"f")}constructor(t,e){wo.add(this);xo.set(this,[]);Co.set(this,[]);So.set(this,false);zo.set(this,void 0);Io.set(this,void 0);To.set(this,void 0);jo.set(this,void 0);vo(this,zo,t,"f");if(e)vo(this,Co,undefined,"f");ko(this,zo,"f").addEventListener("open",(()=>{if(ko(this,jo,"f"))ko(this,jo,"f").call(this);ko(this,wo,"m",Do).bind(this)}));ko(this,zo,"f").addEventListener("message",(async t=>{const e=this.processReceived(t.data);ko(this,wo,"m",Do).call(this);if(ko(this,Io,"f"))ko(this,Io,"f").call(this,e);else ko(this,xo,"f")?.push(e)}));ko(this,zo,"f").addEventListener("close",(()=>{if(ko(this,To,"f"))ko(this,To,"f").call(this);vo(this,So,true,"f")}))}send(t){if(ko(this,Co,"f"))ko(this,Co,"f").push(this.processSend(t));else ko(this,zo,"f").send(this.processSend(t))}};xo=new WeakMap,Co=new WeakMap,So=new WeakMap,zo=new WeakMap,Io=new WeakMap,To=new WeakMap,jo=new WeakMap,wo=new WeakSet,Do=function t(){ko(this,Co,"f")?.forEach((t=>ko(this,zo,"f").send(t)));vo(this,Co,undefined,"f")};let Ro=class t extends Lo{processReceived(t){return t?.arrayBuffer?t.arrayBuffer():typeof t=="string"?(new TextEncoder).encode(t).buffer:t}processSend(t){return t}};class _o extends Lo{processReceived(t){return JSON.parse(t?.arrayBuffer?(new TextDecoder).decode(t.arrayBuffer()):typeof t!="string"?(new TextDecoder).decode(t):t)}processSend(t){return JSON.stringify(t)}}let Ao=class t extends Lo{processReceived(t){return t?.arrayBuffer?(new TextDecoder).decode(t.arrayBuffer()):typeof t!="string"?(new TextDecoder).decode(t):t}processSend(t){return t}};var $o=undefined&&undefined.__classPrivateFieldGet||function(t,e,o,s){if(o==="a"&&!s)throw new TypeError("Private accessor was defined without a getter");if(typeof e==="function"?t!==e||!s:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return o==="m"?s:o==="a"?s.call(t):s?s.value:e.get(t)};var Mo=undefined&&undefined.__classPrivateFieldSet||function(t,e,o,s,a){if(s==="m")throw new TypeError("Private method is not writable");if(s==="a"&&!a)throw new TypeError("Private accessor was defined without a setter");if(typeof e==="function"?t!==e||!a:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return s==="a"?a.call(t,o):a?a.value=o:e.set(t,o),o};var Eo,Oo,Po;class Ho{get json(){if(!$o(this,Eo,"f"))Mo(this,Eo,new _o(this.backend,this.isOpen),"f");return $o(this,Eo,"f")}get string(){if(!$o(this,Oo,"f"))Mo(this,Oo,new Ao(this.backend,this.isOpen),"f");return $o(this,Oo,"f")}get arrayBuffer(){if(!$o(this,Po,"f"))Mo(this,Po,new Ro(this.backend,this.isOpen),"f");return $o(this,Po,"f")}constructor(t,e){this.backend=t;this.isOpen=e;Eo.set(this,void 0);Oo.set(this,void 0);Po.set(this,void 0)}createResponse(t={}){return{status:101,socket:this,header:t}}close(t,e){this.backend.close(t,e)}}Eo=new WeakMap,Oo=new WeakMap,Po=new WeakMap;var Fo;(function(t){t.Factory=Ho})(Fo||(Fo={}));const Uo=[["accessControlAllowOrigin","Access-Control-Allow-Origin",1],["accessControlAllowCredentials","Access-Control-Allow-Credentials",1],["accessControlExposeHeaders","Access-Control-Expose-Headers",2],["accessControlMaxAge","Access-Control-Max-Age",1],["accessControlAllowMethods","Access-Control-Allow-Methods",2],["accessControlAllowHeaders","Access-Control-Allow-Headers",2],["acceptPatch","Accept-Patch",1],["acceptRanges","Accept-Ranges",1],["age","Age",1],["allow","Allow",2],["altSvc","Alt-Svc",1],["cacheControl","Cache-Control",1],["cfConnectionIp","CF-Connecting-IP",1],["cfIpCountry","CF-IPCountry",1],["connection","Connection",1],["contentDisposition","Content-Disposition",1],["contentEncoding","Content-Encoding",1],["contentLanguage","Content-Language",2],["contentLength","Content-Length",1],["contentLocation","Content-Location",1],["contentMD5","Content-MD5",1],["contentRange","Content-Range",1],["contentSecurityPolicy","Content-Security-Policy",1],["contentType","Content-Type",1],["date","Date",1],["deltaBase","Delta-Base",1],["eTag","ETag",1],["expires","Expires",1],["iM","IM",1],["lastModified","Last-Modified",1],["link","Link",1],["location","Location",1],["p3P","P3P",1],["pragma","Pragma",1],["proxyAuthenticate","Proxy-Authenticate",1],["publicKeyPins","Public-Key-Pins",1],["refresh","Refresh",1],["retryAfter","Retry-After",1],["server","Server",1],["setCookie","Set-Cookie",1],["status","Status",1],["strictTransportSecurity","Strict-Transport-Security",1],["timingAllowOrigin","Timing-Allow-Origin",2],["trailer","Trailer",1],["transferEncoding","Transfer-Encoding",1],["tk","Tk",1],["upgrade","Upgrade",2],["vary","Vary",2],["via","Via",1],["warning","Warning",1],["wwwAuthenticate","WWW-Authenticate",1],["xContentDuration","X-Content-Duration",1],["xContentSecurityPolicy","X-Content-Security-Policy",1],["xContentTypeOptions","X-Content-Type-Options",1],["xCorrelationId","X-Correlation-ID",1],["xFrameOptions","X-Frame-Options",1],["xMsContinuation","X-Ms-Continuation",1],["xPoweredBy","X-Powered-By",1],["xRequestId","X-Request-ID",1],["xUACompatible","X-UA-Compatible",1],["xWebkitCsp","X-WebKit-CSP",1],["xXssProtection","X-XSS-Protection",1]];var No;(function(t){function e(t){function e(t){return t==undefined||typeof t=="string"}function o(t){return t==undefined||Array.isArray(t)&&t.every((t=>typeof t=="string"))}return typeof t=="object"&&Uo.every((s=>(s[2]==1?e:o)(t[s[0]])))}t.is=e;function o(t){return Object.fromEntries(Object.entries(t).map((([t,e])=>{const o=Uo.find((([e,...o])=>e==t));return[o?o[1]:bo(t),Array.isArray(e)?e.join(", "):e]})))}t.to=o;function s(t){return Object.fromEntries((Array.isArray(t)?t.map((([t,...e])=>[t,e.join(", ")])):i(t)?l(t):Object.entries(t)).map((([t,e])=>{const o=Uo.find((([e,o,s])=>t.toLowerCase()==o.toLowerCase()));return o?[o[0],o[2]==1||typeof e!="string"?e:e.split(",").map((t=>t.trim()))]:[yo(t),e]})))}t.from=s;function a(t){return Object.entries(t).map((([t,e])=>t+": "+e)).join("\n")}t.toString=a;function i(t){return typeof t.forEach=="function"}function l(t){const e=[];t.forEach(((t,o)=>e.push([o,t])));return e}})(No||(No={}));var Yo;(function(t){function e(t){return typeof t=="object"&&Object.keys(t).every((t=>["status","header","body","socket"].some((e=>e==t))))&&(t.status==undefined||typeof t.status=="number")&&(t.header==undefined||No.is(t.header))&&(t.socket==undefined||typeof t.socket.close=="function"&&typeof t.socket.json?.send=="function"&&typeof t.socket.string?.send=="function"&&typeof t.socket.arrayBuffer?.send=="function")&&(t.status!=undefined||t.header!=undefined||t.body!=undefined)}t.is=e})(Yo||(Yo={}));var Wo;(function(t){function e(t){return typeof t=="object"&&Object.keys(t).every((t=>["status","header","body","socket"].some((e=>e==t))))&&(t.status==undefined||typeof t.status=="number")&&(t.header==undefined||No.is(t.header))&&(t.socket==undefined||t.socket instanceof WebSocket)}t.is=e;async function o(t){return new go(await mo(await t.body,t.header.contentType),{status:t.status,headers:new Headers(No.to(!t.header.contentType?.startsWith("multipart/formdata")?t.header:(({contentType:t,...e})=>e)(t.header))),...t.socket&&{webSocket:{...t.socket.createResponse().socket}?.backend}})}t.to=o;function s(t){return{status:t.status,header:No.from(t.headers),body:t.status==101?undefined:ro(t),...t.webSocket&&{socket:new Fo.Factory(t.webSocket)}}}t.from=s;function a(t,e){const o=Yo.is(t)?{status:200,header:{},body:undefined,...t.socket&&{socket:t.socket},...t}:typeof t?.createResponse=="function"&&(e==undefined||No.is(e))?t.createResponse(e):{status:typeof t=="object"&&typeof t.status=="number"&&t.status||200,header:typeof t=="object"?{...t.header,...(t.status==301||t.status==302)&&t.location?{location:t.location}:{}}:{},body:!(typeof t=="object"&&!Array.isArray(t))||t instanceof ArrayBuffer||ArrayBuffer.isView(t)||t instanceof FormData?t:(({header:t,...e})=>e)(t),...t.webSocket&&{socket:new Fo.Factory(t.webSocket)}||t.socket&&{socket:t.socket}};if(!o.header.contentType)switch(typeof o.body){case"undefined":break;default:case"object":o.header.contentType=typeof e=="string"?e:e?.contentType?e.contentType:o.body instanceof FormData?"multipart/formdata":o.body instanceof ArrayBuffer||ArrayBuffer.isView(o.body)?i(o.body)?"application/pdf":"application/octet-stream":"application/json; charset=utf-8";break;case"string":o.header.contentType=o.body.slice(0,9).toLowerCase()=="<!doctype"?"text/html; charset=utf-8":/^[A-Za-z0-9-_=]+\.[A-Za-z0-9-_=]+\.?[A-Za-z0-9-_.+/=]*$/.test(o.body)?"application/jwt; charset=utf-8":/^<\?xml version=(.|\n)*\?>(.|\n)*<svg(.|\n)*<\/svg>$/.test(o.body)?"image/svg+xml":"text/plain; charset=utf-8";break}return o}t.create=a;function i(t){const e=new Uint8Array(ArrayBuffer.isView(t)?t.buffer:t).slice(0,4);return[37,80,68,70].every(((t,o)=>t==e[o]))}t.Header=No;t.Like=Yo})(Wo||(Wo={}));const Bo=Vo(globalThis.fetch);Bo.create=Vo;function Vo(t){return async e=>{const o=fo.create(e);return Wo.from(await t(o.url.toString(),await fo.to(o)))}}var Go;(function(t){function e(t){const e=new globalThis.FormData;e.append("*",new globalThis.Blob([(new TextEncoder).encode(JSON.stringify(o(t,"",e)))],{type:"application/json; charset=utf-8"}));return e}t.to=e;function o(t,e,a){return Object.entries(t).reduce(((t,[i,l])=>{l instanceof Blob?a.append(e?`${e}.${i}`:i,l):typeof l=="object"&&l?Array.isArray(l)?t[i]=s(l,e?`${e}.${i}`:i,a):t[i]=o(l,e?`${e}.${i}`:i,a):t[i]=l;return t}),{})}function s(t,e,a){return t.reduce(((t,i)=>{typeof i=="object"&&i?Array.isArray(i)?t.push(s(i,e,a)):t.push(o(i,e,a)):t.push(i);return t}),[])}async function a(t){const e={};for(const[o,s]of t.entries())await i(e,o.split("."),s);return e}t.from=a;async function i(t,[e,...o],s){if(o.length==0)s instanceof Blob&&s.type.startsWith("application/json")?e=="*"?l(t,JSON.parse(await s.text())):typeof t[e]=="object"&&t[e]?l(t[e],JSON.parse(await s.text())):t[e]=JSON.parse(await s.text()):t[e]=s;else i(typeof t[e]=="object"&&t[e]?t[e]:t[e]={},o,s)}function l(t,...e){if(e.length){const[o,...s]=e;Object.entries(o).forEach((([e,s])=>n(s)?l(n(t[e])?t[e]:t[e]={},s):t[e]=o[e]));l(t,...s)}}function n(t){return t&&typeof t=="object"&&!Array.isArray(t)}t.isObject=n})(Go||(Go={}));function Ko(t){const e=[];const o=(t,s)=>{switch(typeof s){default:case"bigint":case"boolean":case"number":case"string":e.push(`${t}=${encodeURIComponent(s.toString())}`);break;case"undefined":break;case"object":for(const e in s)if(Object.prototype.hasOwnProperty.call(s,e))o(t?t+`[${e}]`:e,s[e]);break}};o("",t);return e.join("&")}function qo(t){const e=t=>typeof t=="object"&&Object.keys(t).sort().every(((t,e)=>`${t}`==`${e}`))?Object.entries(t).sort().map((t=>typeof t[1]=="object"?e(t[1]):t[1])):typeof t=="object"?Object.fromEntries(Object.entries(t).map((t=>[t[0],e(t[1])]))):t;const o=(t,e,s)=>{t[e[0]]=e.length>1?o(t[e[0]]??{},e.slice(1),s):s;return t};const s=t.split("&").map((t=>t.split("=",2))).map((([t,e])=>[decodeURIComponent(t).split("[").map((t=>t.replace("]",""))),decodeURIComponent(e.replace(/\+/g," "))]));return s.reduce(((t,[s,a])=>e(o(t,s,a))),{})}no((async t=>await t.text()),"text/plain","text/html");no((async t=>await t.json()),"application/json");no((async t=>await t.arrayBuffer()),"application/pdf");no((async t=>Go.from(await t.formData())),"multipart/form-data");no((async t=>qo(await t.text())),"application/x-www-form-urlencoded");ho((async t=>typeof t=="string"?t:t.toString()),"text/plain","text/html");ho((async t=>JSON.stringify(t)),"application/json");ho((async t=>t),"application/pdf");ho((async t=>Ko(t)),"application/x-www-form-urlencoded");ho((async t=>t instanceof globalThis.FormData?t:Go.to(t)),"multipart/form-data");var Zo;(function(t){function e(t){return t&&typeof t=="object"&&typeof t.clear=="function"}t.is=e})(Zo||(Zo={}));class Jo{constructor(t){this.parent=t;this.callbacks=[]}async subscribe(t){this.callbacks.push(t);await t(this.parent)}async publish(){Promise.all(this.callbacks.map((t=>t(this.parent))))}static create(t){return new Jo(t)}}var Xo;(function(t){t.Observer=Jo;let e;(function(t){t.type=m({edit:y(),readonly:b(),listen:y(),reset:y(),setInitialValue:y()});t.is=t.type.is})(e=t.Element||(t.Element={}));const o=m({emit:y()});t.type=e.type.extend({isDifferentFromInitial:b(),value:z().optional(),smoothlyFormDisable:o});t.is=t.type.is})(Xo||(Xo={}));var Qo;(function(t){t.values=["plain","grid","border","line","transparent"];t.type=u(t.values);t.is=t.type.is})(Qo||(Qo={}));var ts;(function(t){let e;(function(t){t.type=m({register:y(),unregister:y(),getValue:y(),disabled:b().optional(),color:r.type.optional(),name:u(),invalid:b().optional(),looks:Qo.type.optional(),defined:b().optional(),binary:y().optional()});t.is=t.type.is})(e=t.Element||(t.Element={}));const o=m({emit:y()});t.type=e.type.extend({smoothlyInputLoad:o,smoothlyInput:o,smoothlyUserInput:o,smoothlyKeydown:o.optional(),smoothlyInputForm:o.optional(),parent:Xo.type.optional()});t.is=t.type.is;function s(t,e){if(t.parent instanceof os){t.parent.removeInput(e!==null&&e!==void 0?e:t.name)}}t.formRemove=s;function a(t){t.smoothlyInputLoad.emit((e=>t.parent=e))}t.formAdd=a;function i(t,e){if(e){s(t,e)}a(t)}t.formRename=i;function l(t,e){if(!(e.target&&"name"in e.target&&e.target.name===t.name)){e.stopPropagation();e.detail(t)}}t.registerSubAction=l})(ts||(ts={}));const es=()=>`smoothly-form{display:block;position:relative}smoothly-form>form{position:relative}smoothly-form>form>fieldset{display:flex;flex-flow:row wrap;margin-inline-start:unset;margin-inline-end:unset;padding-block-start:unset;padding-inline-start:unset;padding-inline-end:unset;padding-block-end:unset;min-inline-size:unset;border-width:unset;border-style:unset;border-color:unset;border-image:unset}smoothly-form>form>fieldset>*{flex-grow:1;min-width:min(100%, var(--smoothly-form-input-min-width, 14rem));flex-basis:40%}smoothly-form[looks="line"]>form>fieldset,smoothly-form[looks="border"]>form>fieldset,smoothly-form[looks="transparent"]>form>fieldset{row-gap:var(--smoothly-form-row-gap, 2rem);column-gap:var(--smoothly-form-column-gap, 2rem)}smoothly-form[looks="grid"]>form>fieldset{padding:1px;gap:1px}smoothly-form>form>div:not(:empty){display:flex;justify-content:end;gap:1em;margin-top:1.5rem}`;const os=class{constructor(o){t(this,o);this.smoothlyFormDisable=e(this,"smoothlyFormDisable");this.smoothlyFormInput=e(this,"smoothlyFormInput");this.smoothlyFormSubmit=e(this,"smoothlyFormSubmit");this.smoothlyFormReset=e(this,"smoothlyFormReset");this.smoothlyFormEdit=e(this,"smoothlyFormEdit");this.smoothlyFormClear=e(this,"smoothlyFormClear");this.notice=e(this,"notice");this.value={};this.type=this.action?"create":undefined;this.readonly=false;this.prevent=true;this.isDifferentFromInitial=false;this.contentType="json";this.inputs=new Map;this.readonlyAtLoad=this.readonly;this.observer=Xo.Observer.create(this)}componentWillLoad(){!this.readonly&&this.smoothlyFormDisable.emit((t=>this.readonly=t))}async removeInput(t){if(this.element.isConnected){this.value=p.remove(this.value,t);this.inputs.delete(t);this.smoothlyFormInput.emit(p.convertArrays(this.value))}}async listen(t){this.observer.subscribe(t)}async watchValue(){var t,e;this.isDifferentFromInitial=[...this.inputs.values()].some((t=>Xo.type.is(t)?t.isDifferentFromInitial:true));if(this.validator){const o=(e=(t=this.validator)===null||t===void 0?void 0:t.flaw(p.convertArrays(this.value)).flaws)===null||e===void 0?void 0:e.reduce(((t,e)=>e.property?Object.assign(Object.assign({},t),{[e.property]:e}):t),{});for(const[t,e]of this.inputs.entries()){this.validate(o,t,e)}}this.observer.publish()}validate(t,e,o){var s,a;if(e.includes(".")){const[i,...l]=e.split(".");const n=(a=(s=t===null||t===void 0?void 0:t[i])===null||s===void 0?void 0:s.flaws)!==null&&a!==void 0?a:[];this.validate(n.reduce(((t,e)=>e.property?Object.assign(Object.assign({},t),{[e.property]:e}):t),{}),l.join("."),o)}else{const s=t===null||t===void 0?void 0:t[e];o&&(o.invalid=!!s)}}watchReadonly(){this.observer.publish()}smoothlyInputLooksHandler(t){t.stopPropagation();t.detail(this.looks,this.color)}async smoothlyInputHandler(t){this.value=p.merge(this.value,t.detail);this.smoothlyFormInput.emit(p.convertArrays(this.value))}async smoothlyKeydownHandler(t){if(t.detail.key=="Enter"&&this.inputs.has(t.detail.name)){t.stopPropagation();await this.submit()}}windowSubmitHandler(t){t.target==this.element&&t.detail.result(false)}submitHandler(t){this.action&&t.stopPropagation()}async smoothlyInputLoadHandler(t){var e;t.stopPropagation();t.detail(this);const o=t.target;if(ts.Element.is(o)){if(await((e=o.binary)===null||e===void 0?void 0:e.call(o))){this.contentType="form-data"}const t=await o.getValue();this.value=p.merge(this.value,{[o.name]:t});this.smoothlyFormInput.emit(p.convertArrays(this.value));this.inputs.set(o.name,o)}}async smoothlyFormDisableHandler(t){t.stopPropagation();t.detail(this.readonly)}async submit(t){this.processing=new Promise((e=>{this.smoothlyFormSubmit.emit({value:p.convertArrays(this.value),result:e,type:t==true?"remove":this.type});if(this.action){const o=this.action;this.notice.emit(S.execute("Submitting form",(async()=>{const s=t?"DELETE":!this.type||this.type=="create"?"POST":this.type=="change"?"PUT":this.type=="update"?"PATCH":"GET";const a=await Bo(fo.create(s=="GET"?{method:s,url:`${o}?${Ko(this.value)}`}:Object.assign({method:s,url:o},this.value&&{header:{contentType:this.contentType?"multipart/form-data":"application/json"},body:this.value}))).catch((()=>undefined));const i=!a||(a===null||a===void 0?void 0:a.status)<200||a.status>=300?[false,"Failed to submit form."]:[true,"Form successfully submitted."];e(i[0]);return[...i]})))}}));if(await this.processing){this.type=="create"&&await this.clear();await this.setInitialValue();this.readonlyAtLoad&&await this.edit(!this.readonlyAtLoad)}this.processing=undefined}async clear(){await Promise.all([...this.inputs.values()].map((async t=>Zo.is(t)&&t.clear())));this.smoothlyFormClear.emit()}async edit(t){await Promise.all([...this.inputs.values()].map((async e=>Xo.Element.type.is(e)&&e.edit(t))));this.readonly=!t;this.smoothlyFormEdit.emit(t)}async reset(){await Promise.all([...this.inputs.values()].map((t=>Xo.Element.type.is(t)&&t.reset())));this.isDifferentFromInitial=[...this.inputs.values()].some((t=>Xo.type.is(t)?t.isDifferentFromInitial:true));this.smoothlyFormReset.emit()}async setInitialValue(){await Promise.all([...this.inputs.values()].map((t=>Xo.Element.type.is(t)&&t.setInitialValue())))}render(){return o(s,{key:"13832187ab5df2576ff044529d909eb8037dc847"},o("smoothly-spinner",{key:"bfe49cf7d062e9691fa14b33cbe2a5084f521b27",overlay:true,hidden:!this.processing}),o("form",{key:"d8796700525994279e108c8c7e92ca70f0e29712",onSubmit:!this.prevent?undefined:t=>t.preventDefault(),name:this.name},o("fieldset",{key:"3ea76b10bf7025a3073813aa897f8d588d79f871"},o("slot",{key:"422845b145092f3c44009327dd5157ff1a8edf74"})),o("div",{key:"c85cf3f3211724e24acb964ed4747896cf184ece"},o("slot",{key:"94cb03243a1b223e2f9b0665e593486d95a13041",name:"clear"}),o("slot",{key:"8298256cbc374dc7731a1ae1e90b46ce7318c960",name:"edit"}),o("slot",{key:"37a1f5479fe938cc423c3c9c7e79d1d19e667997",name:"reset"}),o("slot",{key:"53856e34deb228ffa25e9c7611075b12b3339160",name:"delete"}),o("slot",{key:"fdc4667a9ca84c01f5a803a7b8865f7f258de837",name:"submit"}))))}get element(){return a(this)}static get watchers(){return{value:[{watchValue:0}],readonly:[{watchReadonly:0}]}}};os.style=es();const ss=()=>`.sc-smoothly-form-demo-h{display:flex;margin-top:2em;margin-bottom:10em}.sc-smoothly-form-demo-h>div.sc-smoothly-form-demo{margin:auto;width:1200px;max-width:calc(100% - 0.5rem)}`;const as=class{constructor(e){t(this,e)}render(){return o(s,{key:"e6b40ea5e535c8fd4fbbe65aa060d0ba061f5a3e"},o("div",{key:"848116c5bc43a4a5adb20ecf3f66a66b050e529c"},o("smoothly-form-demo-all",{key:"44179c77bfd53bfa4f347a465a3f4000d4d94b08"}),o("smoothly-form-demo-pet",{key:"356b17321dc0f11e63c8dd4846c4e1d91c7b6b5c"}),o("smoothly-form-demo-card",{key:"2584856236b89b5818551f8826056c0a14ab6356"}),o("smoothly-form-demo-login",{key:"dacc85e611dec4115fefc49f63463912b6718285"}),o("smoothly-form-demo-prices",{key:"500d6d4c056c79113b16bd0f67bfe0ab562cd8d8"}),o("smoothly-form-demo-typed",{key:"933cce32ed4668eb28140c0c01c8238cdf1526d2"}),o("smoothly-form-demo-transparent",{key:"2a39b5d64aaff4d53d703c9508df3de18d5a6ad6"}),o("smoothly-form-demo-date",{key:"fb0a6356529047d3bbbebd1b5980c2884be0cbb6"}),o("smoothly-form-demo-schedule",{key:"c7eb48895c714d436f04544af9519a93232f76d0"}),o("smoothly-form-demo-date-range",{key:"6370bf9ca0671705777b03e6b985361d06ee9d56"}),o("smoothly-form-demo-controlled",{key:"abf920dd124a8c43ce7818ba29bb1931a4b90910"})))}};as.style=ss();const is=class{constructor(e){t(this,e)}render(){return o(s,{key:"2b2e779dc35f9f35173515a6db59425654d7446a"},o("h2",{key:"b2423e5f45a6841b6fedcb7db17626ed192ee15d"},"All inputs"),o("smoothly-form",{key:"ac6fc721d22456edb5104ba9553c423d6f8bdebe",looks:"grid",type:"create",readonly:true,action:"https://api.toiletapi.com/upload/6b12fd2f-e896-46f9-b38f-25cf42cee4b4",onSmoothlyFormSubmit:t=>{Object.entries(t.detail.value).forEach((([t,e])=>console.log(t,e)))}},o("smoothly-input",{key:"4ec033bb9d51a7edc81cce2a1fde55bd21458318",readonly:true,name:"First Name",value:"John"},"First name"),o("smoothly-input",{key:"8d6abee797b1c9b60efeb068c828453174401012",showLabel:false,name:"Last name",value:"Doe"},"Last name",o("smoothly-input-clear",{key:"8caeac3cbd2290eaeeda549aea083d4499b960c5",size:"icon",slot:"end"})),o("smoothly-input",{key:"9a22277ed064a84b98a8c68c5f176758735748f0",type:"phone",name:"Phone",value:"777888999"},"Phone",o("smoothly-input-reset",{key:"2b45ff8ceaf71289d350e102d53123dc1c82600f",size:"icon",slot:"end"})),o("smoothly-input-radio",{key:"15856b48204c21b5f7318df22130e17aa3e14e8d",clearable:true,name:"radioFirstInput"},o("label",{key:"c94b6e0c185c8ab4325161a6e4249863017e5eb2",slot:"label"},"Clearable"),o("smoothly-input-radio-item",{key:"e978bde5ec519ab872eac3fb2a7d75b493099f31",value:"first"},"Label 1"),o("smoothly-input-radio-item",{key:"3c30fd0d9b549f93c912759f8329570db377df79",selected:true,value:"second"},"Label 2"),o("smoothly-input-radio-item",{key:"2f3f773cade1c39fa2a121b24ba2778a42d9a9b0",value:"third"},"Label 3")),o("smoothly-input-color",{key:"f1e0b0b1e759c85c5de1f3a8af9818b41c692bdb",name:"color"},"Color"),o("smoothly-input-select",{key:"7e1069ff0515224e17145539afefec11979ed88c",multiple:true,menuHeight:"7.5items",placeholder:"Select...",name:"select-month"},o("label",{key:"c42749acb44e6e7db99f4e7981f20ad0c09f1694",slot:"label"},"Month multiple select"),o("smoothly-item",{key:"fdd0c90294bdf50d77ccf187777fdd804760b8ac",value:"1"},"January"),o("smoothly-item",{key:"4f0c9d90f6909eaacccd5d385e317832f5a8b213",value:"2"},"February"),o("smoothly-item",{key:"7779ea4af1f17cb48ef0249b7857262deb6c485d",value:"3"},"March"),o("smoothly-item",{key:"5f15c3d32240bfb7c3b8d0a61f90599697b8e2a0",value:"4"},"April"),o("smoothly-item",{key:"0952c95b2cf623f5573d70b5fa39b1c1ce008f16",value:"5"},"May"),o("smoothly-item",{key:"1352e9245e39341d99d1bc8d051691b6b70dac37",value:"6"},"June"),o("smoothly-item",{key:"7eddedff608a9148cb2b9c17f23ac2108b2190fd",value:"7"},"July"),o("smoothly-item",{key:"627e81c5c7ddd5e1230b6eead20ac7932edbff9a",value:"8"},"August"),o("smoothly-item",{key:"587bcf666e0bc92c14f5665f975563f06a419bac",value:"9"},"September"),o("smoothly-item",{key:"896f05e2b88d7613cbc7f21b2aa4c58f1ae3938d",value:"10"},"October"),o("smoothly-item",{key:"fb539afa5edd3fe8391df5fc9d63fcb84940512c",value:"11"},"November"),o("smoothly-item",{key:"959e9af2c479a299431f302041649bd86f5db331",value:"12"},"December")),o("smoothly-input-select",{key:"64e83fb7dba19c8c21b5697eade0c7c5404d330c",name:"select-icon",clearable:false,showSelected:false},o("smoothly-item",{key:"b1a055ab1c73f28e0b49e626561aeff83efb124b",value:"folder",selected:true},o("smoothly-icon",{key:"9ba931c9dd28c9f88168f5ab94fd80bc6f7f6bc0",size:"small",name:"folder-outline"})),o("smoothly-item",{key:"acd791714a16504b5dc6a56f2fbfc89cf1ef4600",value:"camera"},o("smoothly-icon",{key:"d65e7beb3c74941bf494769126124ef79ce800d0",size:"small",name:"camera-outline"}))),o("smoothly-input-checkbox",{key:"d6f2f199daf447bb0992ca8839b89e4e14166846",name:"checkbox"},"Check the box"),o("smoothly-input-checkbox",{key:"79885d84642626f7cba6d348d0044f2c8037007e",name:"checkbox2",checked:true},"Check the box 2"),o("smoothly-input-range",{key:"7e791279c3b1bd2898d4c5e9e35ef9df76aa14cf",step:1,name:"range3",value:20,label:"Range"}),o("smoothly-input",{key:"f7b07cef9882952dc91be6484c04ba459ef5db62",name:"pets.0.name"},"First Pet's Name"),o("smoothly-input-range",{key:"44b404105c6d9aa19c7f14ac529e7b8ab3f964e9",name:"pets.0.age",max:100,step:1,label:"First Pet's Age"}),o("smoothly-input",{key:"aca9bc7aebd243f8e82158d1c60b7a69886e9a02",name:"pets.1.name"},"Second Pet's Name"),o("smoothly-input-range",{key:"674b16d94949bcbd3fd4980b0b262ba580efbd5b",name:"pets.1.age",max:100,step:1,label:"Second Pet's Age"}),o("smoothly-input",{key:"b25175ffa941b70d606a66db0f97e61547faf5b9",name:"pets.2.name"},"Third Pet's Name"),o("smoothly-input-range",{key:"0113d466fc09afc4734a65500cdc20b06267d77d",name:"pets.2.age",max:100,step:1,label:"Third Pet's Age"}),o("smoothly-input-range",{key:"d06183dd7731f6a70070ff0d823fb18ad8e4a10f",dual:true,name:"dualRange",min:0,max:100,step:1,label:"Dual Range"}),o("smoothly-input-file",{key:"ed5cf91c1db69c748cf52d4a99601fc2ddd675eb",name:"profile",placeholder:"Click or drag your profile picture here..."},o("span",{key:"f72fba530a1ee1d6f6a021544863dbb892f5a955",slot:"label"},"Profile"),o("smoothly-icon",{key:"dae1cc212fb3ea87ec62ac7e40c7d489bcb5cb1d",slot:"button",name:"person-circle-outline",size:"tiny",fill:"default"})),o("smoothly-input",{key:"0e9e8dc38f055440bba351cb5b7c3186d480f661",type:"duration",name:"duration",value:{}},"Duration"),o("smoothly-input-clear",{key:"ce7946c654f4a4cef855455a94311b08eee47108",fill:"default",type:"form",color:"warning",slot:"clear",size:"icon",shape:"rounded"}),o("smoothly-input-edit",{key:"c77b9febf666fac99980b868327a3a03946edb1a",fill:"default",type:"form",color:"tertiary",slot:"edit",size:"icon",shape:"rounded"}),o("smoothly-input-reset",{key:"d1597484a38571db597eecca554f706f484b8d08",fill:"default",type:"form",color:"warning",slot:"reset",size:"icon",shape:"rounded"}),o("smoothly-input-submit",{key:"0fb965b190a21ff54bb69a34b41bf8b264b06b81",delete:true,slot:"delete",color:"danger",size:"icon",shape:"rounded"}),o("smoothly-input-submit",{key:"2003e45ab3c0fa5301cbbc39717b9c2dd3b74af5",fill:"default",color:"success",slot:"submit",size:"icon",shape:"rounded"})))}};const ls=class{constructor(e){t(this,e)}render(){return o(s,{key:"d0889b4a3e456b2fb26a93597566c7453d46747f"},o("h2",{key:"471a1e8530903494b0bdd1a9eff533019d8c5dd0"},"Card"),o("smoothly-form",{key:"2ec006bf008bd8e02a17402a3fb28f5c65123d68",looks:"grid",onSmoothlyFormSubmit:t=>alert(JSON.stringify(t.detail))},o("smoothly-input",{key:"5ef72a77c01144388d22485c148752b64b4a3bf9",type:"card-number",name:"card"},"Card #"),o("smoothly-input-submit",{key:"c00fc4964eaaf03ab3201ea1e698e19e634041f7",size:"icon",slot:"submit",color:"success",fill:"solid"}),o("smoothly-input",{key:"bf05960ab0adf45c8ab9438626e6ef6bff49d9c9",type:"card-expires",name:"expires"},"Expires"),o("smoothly-input",{key:"3d4ffb589693919a6e24b8870f6b29a3a93d05c9",type:"card-csc",name:"csc"},"CVV/CVC"),o("smoothly-input",{key:"e5238377f611551e8c787df7e111b812776e3ea5",type:"text",name:"name.first"},"First Name"),o("smoothly-input",{key:"bbbf04daa4ce51c605cb4abdfe40f2dcebc9d794",type:"text",name:"name.last"},"Last Name")))}};const ns=class{constructor(e){t(this,e);this.name="Initial name";this.currency="EUR";this.date=C.Date.now();this.currencies=["GBP","SEK","EUR","USD"]}nameChanged(t,e){console.log(`updated name from '${e}' to '${t}'`)}async submitHandler(t){t.stopPropagation();console.log("Received event. Processing...",t.detail);if(!(typeof t.detail.value.name=="string")){console.error("Bad input. Resolving false.")}else if(!(typeof t.detail.value.date=="string")){console.error("Bad input. Resolving false.")}else if(!C.Currency.is(t.detail.value.currency)){console.error("Bad input. Resolving false.")}else{await new Promise((t=>window.setTimeout(t,1e3)));this.name=t.detail.value.name;this.date=t.detail.value.date;this.currency=t.detail.value.currency;console.log("Finished processing successfully. Resolving true.");t.detail.result(true)}t.detail.result(false)}render(){return o(s,{key:"1061bb8a73e16641920a69ed39c2861e1181cfeb"},o("h2",{key:"2cda89170ac80504da7efbde49166b1bbdab7ec4"},"Controlled"),o("smoothly-form",{key:"a31ac6ae0da84799c93e0027bb209d151594b6c3",readonly:true,looks:"grid",onSmoothlyFormSubmit:t=>this.submitHandler(t)},o("smoothly-input",{key:"8a5ebd13b22a4b98b427f3090be3415738d29111",type:"text",name:"name",value:this.name},"Name"),o("smoothly-input-select",{key:"6c5209dc75ed440b3f42ba06585c3ad056ad09bc",name:"currency"},o("span",{key:"6d756e50b45c999a90ef1aafc1020d13d8720269",slot:"label"},"Currency"),this.currencies.map((t=>o("smoothly-item",{selected:t==this.currency,value:t},t)))),o("smoothly-input",{key:"b1f7dc38934053c148836e5b5d91accd819a4a5d"},"Dummy"),o("smoothly-input-month",{key:"e8e1765d0ba064787b14bc1a339ac64dca884fab",name:"date",value:this.date,next:true,previous:true},o("span",{key:"983f2faab5366f2658f80d2e4f8861df083e0dfe",slot:"year-label"},"Year"),o("span",{key:"a5ee74e1293e85da358c248aa272613948236166",slot:"month-label"},"Month")),o("smoothly-input-edit",{key:"f49c8c23ce5612594a96895cd7d690fac88421e9",slot:"edit",size:"icon",color:"primary",fill:"default"}),o("smoothly-input-reset",{key:"28ea077e4c88330a476849a178b74abe55658740",slot:"reset",size:"icon",color:"warning",fill:"default"}),o("smoothly-input-submit",{key:"13b11813f5d9521d04c14b847d4aac6db9ff4a10",slot:"submit",size:"icon",color:"success"})))}static get watchers(){return{name:[{nameChanged:0}]}}};const rs=()=>`.sc-smoothly-form-demo-date-h{display:block}`;const cs=class{constructor(o){t(this,o);this.notice=e(this,"notice");this.validator=m({date:f("isoly.Date",C.Date.is)})}async submitHandler(t){t.stopPropagation();if(!this.validator.is(t.detail.value)){console.error(`Type is incomplete.`);this.notice.emit(S.failed(`Type is incomplete.`))}else{this.notice.emit(S.succeeded(`Type is complete!`));t.detail.result(true)}t.detail.result(false)}render(){return o(s,{key:"f87469968c363fc2e6908a6b8323d31d10e43f7b"},o("h2",{key:"1b039d54dc14bd23fdf4a67404493fe4fa1002e5"},"Date input"),o("smoothly-form",{key:"503627a427a6e50eaacb0a9aed71b057f0631a35",looks:"border",type:"create",validator:this.validator,onSmoothlyFormSubmit:t=>this.submitHandler(t)},o("smoothly-input-date",{key:"a0e1a4482ab53227b1833ee32edf37537766c34b",name:"date"},"Date"),o("smoothly-input-submit",{key:"3ca7baebc20a2378b0858b84aa4f420d80cc035d",slot:"submit"},o("smoothly-icon",{key:"44b553b4e0cdc44462ca87e7a2c25ab86be2cc34",name:"checkmark-outline"}))))}};cs.style=rs();const hs=()=>`.sc-smoothly-form-demo-date-range-h{display:block}`;const ds=class{constructor(o){t(this,o);this.notice=e(this,"notice");this.validator=m({range:f("isoly.DateRange",C.DateRange.is)})}async submitHandler(t){t.stopPropagation();if(!this.validator.is(t.detail.value)){console.error(`Type is incomplete.`);this.notice.emit(S.failed(`Type is incomplete.`))}else{this.notice.emit(S.succeeded(`Type is complete!`));t.detail.result(true)}t.detail.result(false)}render(){return o(s,{key:"4f37b88dde84ff912e87e63fd814017216377e9d"},o("h2",{key:"dea9d4cd7d15f08b949e7f686e0274df57d166b9"},"Date-range input"),o("smoothly-form",{key:"a6a14c6ef899d219179ad3e84ab711bc011fbb3c",looks:"border",type:"create",validator:this.validator,onSmoothlyFormSubmit:t=>this.submitHandler(t)},o("smoothly-input-date-range",{key:"6b4b82499434e807c117b807c4e446cf614762d3",name:"range"},"Range"),o("smoothly-input-submit",{key:"99495f5f3db19bd9c443e25ec94d013d6c46fd4f",slot:"submit"},o("smoothly-icon",{key:"ab29510526ee2915eccafbed8eec41bf9f39c7cf",name:"checkmark-outline"}))))}};ds.style=hs();const ms=class{constructor(e){t(this,e)}render(){return o(s,{key:"145a8d63bafe3ecc82c765765c4a0f1518960b7b"},o("h2",{key:"4318914484c253d03811ec55f71c5a5dd64bc1a9"},"Login"),o("smoothly-form",{key:"dac54028546467ca44a7820470b39bc1af8292e7",looks:"border"},o("smoothly-input",{key:"2192584adf11193655e622644f7e40f6ee158693",type:"text",name:"username"},"Username"),o("smoothly-input",{key:"cd8d66e6d9a8a07f25cb8ac4386e3dffa6556d02",type:"password",name:"password"},"Password"),o("smoothly-input-reset",{key:"ffeef7e33af77477942b8990b8e61482037dedb6",slot:"reset",type:"form",size:"icon",color:"warning"}),o("smoothly-input-submit",{key:"1a0bbd656c65bc7f7e3e5f3c8553b81f5e4a9112",slot:"submit"})))}};const ys=()=>`.sc-smoothly-form-demo-pet-h{display:grid;grid-template-columns:2fr 1fr;grid-template-rows:auto auto;grid-column-gap:2rem}.sc-smoothly-form-demo-pet-h smoothly-input-checkbox[name="hasOwner"].sc-smoothly-form-demo-pet,.sc-smoothly-form-demo-pet-h>smoothly-form.sc-smoothly-form-demo-pet smoothly-tabs.sc-smoothly-form-demo-pet{flex-basis:100%}`;const bs=class{constructor(e){t(this,e);this.hasOwner=false;this.owner={}}render(){var t,e;return o(s,{key:"3555b678ce1821ff509e6c6bf7cd5f846150361e"},o("h2",{key:"977304593cbf95b3a07e55d27bcba52421c3a806"},"Pet"),o("h3",{key:"30d9e280ca0f61806f9267fd2cb64b0018a13fd0"},"Value"),o("smoothly-form",{key:"9fea67b46ff29a01b7a15aa482cd7d756c766315",looks:"border",onSmoothlyFormSubmit:t=>alert(JSON.stringify(t.detail)),onSmoothlyFormInput:t=>this.value=Object.assign({},t.detail)},o("smoothly-input",{key:"0e4dcd3f6853fcd923db4e2aec019d5448a9985c",type:"text",name:"name.first",value:"Johnny"},"Name",o("smoothly-input-reset",{key:"5741904cab68af6d1be19fe0f8a54490b84d21ba",slot:"end"})),o("smoothly-input",{key:"c866df63069281710b3a331655de6d052402b139",type:"integer",name:"age"},"Age (Years)"),o("smoothly-input-checkbox",{key:"0b1b661bf19f1ca7fa08fe79af51082843d3170c",name:"hasOwner",onSmoothlyInputLoad:t=>t.stopPropagation(),onSmoothlyInput:t=>{this.hasOwner=t.detail.hasOwner;t.stopPropagation()}},"Has Owner",o("smoothly-input-reset",{key:"b11ab6e4f6c4f5c3b58b7b1d697031830ef6c897",slot:"end"})),this.hasOwner&&o(i,{key:"f73c34c51c677c929481e3467a4a1720d2af6192"},o("smoothly-input",{key:"93e88b422344bf296bc08e1c87153ee5e171f116",type:"text",name:"owner.firstName",value:this.owner.firstName,onSmoothlyInput:t=>this.owner=Object.assign(Object.assign({},this.owner),{firstName:t.detail["owner.firstName"]})},"Owner First Name",o("smoothly-input-reset",{key:"b7364d965671c8389a4ebf10b6dff81a8f83579d",slot:"end"})),o("smoothly-input",{key:"e02d9a248eadadca31f2b7e54a4fe2d7dcb78ab7",type:"text",name:"owner.lastName",value:this.owner.lastName,onSmoothlyInput:t=>this.owner=Object.assign(Object.assign({},this.owner),{lastName:t.detail["owner.lastName"]})},"Owner Last Name"),o("smoothly-input-file",{key:"c62884a682169ef822236373673f6b21c960fe79",name:"owner.picture"},o("span",{key:"dee1e245fbb06cfff787b50beff581bc48dff312",slot:"label"},"Owner picture")),o("smoothly-input-date",{key:"968c755e88629fd76f61cc109f8a7c85c6b87b14",name:"owner.birthday",value:this.owner.birthday,onSmoothlyInput:t=>this.owner=Object.assign(Object.assign({},this.owner),{birthday:t.detail["owner.birthday"]})},"Owner birthday",o("smoothly-input-reset",{key:"bdc545954853494c63ec34555b90f35f12a081c1",slot:"end"})),o("smoothly-input-date-range",{key:"e18ac1955b66407c2dd2aebb3d1b616752cba832",name:"owner.ownedRange",start:(t=this.owner.ownedRange)===null||t===void 0?void 0:t.start,end:(e=this.owner.ownedRange)===null||e===void 0?void 0:e.end,onSmoothlyInput:t=>this.owner=Object.assign(Object.assign({},this.owner),{ownedRange:t.detail["owner.ownedRange"]})},"Owner ownedRange",o("smoothly-input-reset",{key:"56d1ce3d8b2a0a0daf1b0e66b5e5fd2fca291d12",slot:"end"})),o("smoothly-input-range",{key:"aa6cf832bc63235bc0590ac6cab2da6b1d5923f0",name:"owner.height",step:1,max:250,value:this.owner.height,onSmoothlyInput:t=>this.owner=Object.assign(Object.assign({},this.owner),{height:t.detail["owner.height"]})},"Owner's Height",o("smoothly-input-reset",{key:"ecae9fdf30760aa00a799a24729221ef0bb26786",slot:"end"})),o("smoothly-input-select",{key:"587127c00899a6b985a1ba41f73c906e94abf504",name:"owner.favoriteHat"},o("span",{key:"02289ec45dd570ca382776beb9fa34d2552d92da",slot:"label"},"Owner's Favorite Hat"),["🎩 top hat","🧢 cap","👒 sun hat","❌ none"].map(((t,e)=>o("smoothly-item",{value:t,key:e,selected:this.owner.favoriteHat==t},t))),o("smoothly-input-reset",{key:"52aeef0a52c37c0ad9236c99e3a5af20c26f7c6d",slot:"end"})),o("smoothly-input-color",{key:"2640d32a91c9e12b2ffb9564e44e43bd24d97162",name:"owner.favoriteColor",value:this.owner.favoriteColor?g.toHex(this.owner.favoriteColor):undefined,onSmoothlyInput:t=>this.owner=Object.assign(Object.assign({},this.owner),{favoriteColor:t.detail["owner.favoriteColor"]})},"Owner's Favorite Color",o("smoothly-input-reset",{key:"9253ea9ae7e24f1fc70da6f7ab04bbe38599024a",slot:"end"})),o("smoothly-input-radio",{key:"f6b4f1e0b3c1e8eef422c154b22454610e7e6af3",name:"owner.favoritePizza",value:this.owner.favoritePizza,onSmoothlyInput:t=>this.owner=Object.assign(Object.assign({},this.owner),{favoritePizza:t.detail["owner.favoritePizza"]})},o("span",{key:"6ec795591acadf04027319369d72e9470787945f",slot:"label"},"Owner's Favorite Pizza"),["vesuvio","capricciosa","quattro formaggi"].map(((t,e)=>o("smoothly-input-radio-item",{value:t,key:e},t)))),o("smoothly-input-checkbox",{key:"34815b0ebee805a4481312379025218fd46f01c7",name:"owner.hasPet",checked:this.owner.hasPet,onSmoothlyInput:t=>this.owner=Object.assign(Object.assign({},this.owner),{hasPet:t.detail["owner.hasPet"]})},"Has Pet")),o("smoothly-tabs",{key:"ae43c2284ea51f72e415e00a1ada8cab10afebdb"},o("smoothly-tab",{key:"6485c24546d14f5845987da38646066c8f066c61",label:"Dog",name:"dog"},o("smoothly-input",{key:"257d6b7f1140ff7210173fb0e5de4704000bc432",type:"text",name:"dog.breed"},"Breed"),o("smoothly-input-file",{key:"a75e2029fe5b630410fee39462d197489a5291db",name:"dog.picture"},o("span",{key:"7d881935f028284bb80a3e33a47baf59813bc63a",slot:"label"},"Dog picture")),o("smoothly-input-date-time",{key:"f8991e1f543ad09a241977a2570a473597c79a80",name:"dog.lastWalk"},"Time of last walk"),o("smoothly-input-date",{key:"abdf29fd0b95142a6a28aacbc2a3de52b28acfa6",name:"dog.birthday"},"Dog birthday"),o("smoothly-input-date-range",{key:"07710a1af7f884114fee361d80b27e9351cd85d5",name:"dog.dateRange"},"Dog date range"),o("smoothly-input-select",{key:"1307c6bdafc9598e829ee60c4ce7c1b1546dc7af",name:"dog.favoriteHat"},o("span",{key:"4ed1cd24bba8e63db60d63cffdd1417023117a2d",slot:"label"},"Dog's Favorite Hat"),["🎩 top hat","🧢 cap","👒 sun hat","❌ none"].map(((t,e)=>o("smoothly-item",{value:t,key:e},t)))),o("smoothly-input-color",{key:"0b049778a99bee6df6d2ec48dbc071697136fe16",name:"dog.favoriteColor"},"Dog's Favorite Color"),o("smoothly-input-radio",{key:"c65093016a5b90c6bb25e85e4e3575124712c7be",name:"dog.favoritePizza"},o("span",{key:"9565009584ed77b05040ed9468700f116adb563c",slot:"label"},"Dog's Favorite Pizza"),["vesuvio","capricciosa","quattro formaggi"].map(((t,e)=>o("smoothly-input-radio-item",{value:t,key:e},t)))),o("smoothly-input-checkbox",{key:"666be38409bc89d3e4650ad9401c854327ebefc1",name:"dog.hasPet"},"Has Pet")),o("smoothly-tab",{key:"fb5f8f5459b5f642b0c6a2439b319a42002959a4",label:"Cat",name:"cat",open:true},o("smoothly-input",{key:"682f5638f562e61dd092f83eccf7925f720cf194",name:"cat.favoriteFood"},"Favorite Food")),o("smoothly-tab",{key:"c5482174c9405a1136f012fa82cca350c2ed83c2",label:"Parrot",name:"parrot"},o("smoothly-input",{key:"f78b450a29382f8f856ebbff27745c953af53308",type:"price",name:"parrot.price",currency:"EUR"},"Summary Price"),o("smoothly-input-file",{key:"efbd349e10beda447d69c20474c692e2688bcaab",name:"parrot.picture"},o("span",{key:"01a1817ed064f0181742eb5aeb3f2723338f84e7",slot:"label"},"Summary picture"),o("smoothly-input-clear",{key:"be120da97155f2f5591d924aa32604d6086e31c1",slot:"end"})),o("smoothly-input-date",{key:"e59e3a24b479cfbd94eb3c6c7c5f394f93049274",name:"parrot.birthday"},"Summary birthday"),o("smoothly-input-date-range",{key:"4e918229a0745964257c0fb32f0ecd1a4283cdca",name:"parrot.ownedRange",start:"2020-01-01",end:"2020-01-15"},"Summary ownedRange",o("smoothly-input-reset",{key:"514983470344439c22cc6b68bace5b1609f04f89",slot:"end"})),o("smoothly-input-range",{key:"cca92a33c0bc46d7bf85e86e467b9f703063d35d",name:"parrot.height",label:"Height"},o("smoothly-input-reset",{key:"edb1126fcabc71b9d98f33257c8d282982e8ea36",slot:"end"})),o("smoothly-input-select",{key:"868654a72f5642b033392aa33b3b107b1d7ddfa4",name:"parrot.favoriteHat"},o("span",{key:"f811c0c08c4277aba3e85da353903b0185bb9df7",slot:"label"},"Summary's Favorite Hat"),["🎩 top hat","🧢 cap","👒 sun hat","❌ none"].map(((t,e)=>o("smoothly-item",{value:t,key:e},t)))),o("smoothly-input-month",{key:"4226a5e036817f3a80fce926c6761cee1a8bcd66",name:"parrot.month"},o("span",{key:"61570b4fc31693fd2d3f81bea327cfc890ea6c54",slot:"month-label"},"Summary month")),o("smoothly-input-color",{key:"23a77f1358748ee93995b71253bf43641593fc3c",name:"parrot.color"},"Summary Color"),o("smoothly-input-radio",{key:"a32718e3246ec6ffa4cb33eab22c6e549ef764f0",name:"parrot.favoritePizza"},o("span",{key:"5283e5e305bbc586ac74665518f077a2b20e261a",slot:"label"},"Summary's Favorite Pizza"),["vesuvio","capricciosa","quattro formaggi"].map(((t,e)=>o("smoothly-input-radio-item",{value:t,key:e},t)))),o("smoothly-input-checkbox",{key:"15c5b92cd4ee1c6f46880327a7737abba978cb6a",name:"parrot.hasPet"},"Has Pet"))),o("smoothly-input-submit",{key:"975b1bbb887c933a2eacb4bc1a79dfdf99d73972",size:"icon",slot:"submit",color:"success",fill:"solid"})),o("smoothly-display",{key:"09fef0282ab5dea1bceacee812f4d9563c21ed2c",type:"json",value:this.value}))}};bs.style=ys();const us=class e{constructor(e){t(this,e)}render(){return o(s,{key:"d89cfc4c738e18c59e84d5a40ac90b59ebcaa551"},o("h2",{key:"d16f1cd51c9a42f877e8e63bd29f7dcb438fa618"},"Prices"),o("smoothly-form",{key:"54c6b506b280868839cf1c7b8c164f522a75f565",looks:"line"},o("smoothly-input",{key:"fc19f9f370d6a24be561adf18631cfda95ad27fe",type:"price",name:"no"},"No currency"),o("smoothly-input",{key:"339ee6c1ec60a602b3393741a54cbdb4a7847453",type:"price",name:"crowns",currency:"SEK",toInteger:true},"SEK (toInteger)"),o("smoothly-input",{key:"9bc604033f31ac1469bd7b50ff0c69baeab75b22",type:"price",name:"usDollar",currency:"USD"},"USD"),o("smoothly-input",{key:"9e38c5260d5cef788a1b1e493a54de7350d5ce10",type:"price",name:"pounds",currency:"GBP"},"GBP"),o("smoothly-input",{key:"63bb932ba93d35014c30c6ff8e0ff7cb0275da6a",type:"price",name:"peso",currency:"UYW"},"UYW"),o("smoothly-input",{key:"b0e40b64dc06806a270439ee5eef3ebbf65cfc06",type:"price",name:"iceland",currency:"ISK"},"ISK"),o("smoothly-input",{key:"1b9e0e5f2c19a80eebc03c24c90e28f91c4be87d",type:"price",name:"Palladium",currency:"XPD"},"XPD (Palladium)"),o("smoothly-input-reset",{key:"cf298b534cb48e04ddf87ad3bad2297254c7dfab",slot:"reset",fill:"default",type:"form",color:"warning"}),o("smoothly-input-submit",{key:"0db94f32db809a84dfec09db0f8af27de58745fa",slot:"submit"})))}};var ps;(function(t){t.type=m({date:f("isoly.Date",C.Date.is),amount:k()})})(ps||(ps={}));var fs;(function(t){t.type=m({schedule:ps.type.array()})})(fs||(fs={}));const gs=class{constructor(e){t(this,e)}render(){return o(s,{key:"a2126d7eaeabd3063412c258990a01b868a0c173"},o("h2",{key:"872ca8c246de93f89109157b26f4ef1c9a9391ad"},"Schedule"),o("smoothly-form",{key:"89c101a95b88d1ff8b8da72905b2e096dd98ddc5",looks:"line",validator:fs.type},o("smoothly-input-date",{key:"8413214b637cfe958f89bdf1c71fc77709f18103",name:"schedule.0.date"},"Date"),o("smoothly-input",{key:"3e611fb26a30656a7e564137421cd0d14da1ca95",name:"schedule.0.amount",type:"price"},"Amount"),o("smoothly-input-date",{key:"7a17cd21c525191ff38c33598f4e4fbca854ec14",name:"schedule.1.date"},"Date"),o("smoothly-input",{key:"d15a3abf4d7f73a8c926c5aa1585b41d998ca0cd",name:"schedule.1.amount",type:"price"},"Amount"),o("smoothly-input-date",{key:"4ee81b72873b84cbdbec86b3ed5503c7b5a251e3",name:"schedule.2.date"},"Date"),o("smoothly-input",{key:"34d786c0cc21d919af28f510a597609f8941abbb",name:"schedule.2.amount",type:"price"},"Amount"),o("smoothly-input-reset",{key:"a397f462d936320060941134796d925b855c0d87",slot:"reset",fill:"default",type:"form",color:"warning"}),o("smoothly-input-submit",{key:"43220117e87d3d7145b25915caa03850477c3795",slot:"submit"})))}};const ks=class{constructor(e){t(this,e)}render(){return o(s,{key:"673b06b46e297f0abc1c49bcf7ee7acf46cb0295"},o("h2",{key:"4ffa92eb6f9261555d777d05c3e78c404a7df03a"},"Transparent"),o("smoothly-form",{key:"03c25db049779ee90220f0028f18e6e70c037408",looks:"transparent",onSmoothlyFormSubmit:t=>console.log(t.detail.value)},o("smoothly-input-file",{key:"99424c41ab07b388c9e9c35c799e2daec342389b",name:"file"},o("span",{key:"4b686a0fe7159e757d1a76070e2b6246e17a15dc",slot:"label"},"File"),o("smoothly-icon",{key:"8e323ca63e51c6b5acb6d4d8b31641dbbd4e98b0",slot:"button",name:"folder-open-outline",size:"small"})),o("smoothly-input",{key:"fba6aa2567e053902d9100831573d2fc6aaac1b2",type:"duration",looks:"transparent",placeholder:"h:mm"},"Input"),o("smoothly-input-date",{key:"49eeabd20143a15cf14ff6289a3aa28be531a5d9"},"Date"),o("smoothly-input-date-range",{key:"ea4235cc90265d0b73c96d2f2ee9665ba62c40e4"},"Date Range"),o("smoothly-input-select",{key:"ed44815dd57ba74c31a436fff6ece4edcd8091ae",name:"transport"},o("smoothly-item",{key:"f7679b58d170d3bbf264fc67556b21ecc55c7b3e",value:"plane"},o("smoothly-icon",{key:"a16734c2ed81ae0985db7328c389818d717f976e",name:"airplane-outline"})),o("smoothly-item",{key:"8c08a4ce4812a1ecb8d0304c002b6179f586a21f",value:"car"},o("smoothly-icon",{key:"2488556ed2e45e6e4fff17c647ae987b8f4f1773",name:"car-outline"})),o("smoothly-item",{key:"5b0cb1c46c7783a49b954b5eba8bafcd23cf2985",value:"bus",selected:true},o("smoothly-icon",{key:"62b98cc6a689f5c1d49eee728b697321a85283f8",name:"bus-outline"}))),o("smoothly-input-submit",{key:"5a229bbbd0cf22d44080a22d583403569ca62a5f",icon:"checkbox-outline"})))}};var vs;(function(t){t.type=m({name:m({first:u(),middle:u().optional(),last:u()}),age:k((t=>18<=t&&t<=120)),country:f("CountryCode",C.CountryCode.Alpha2.is),birthday:f("Date",C.Date.is)})})(vs||(vs={}));const ws=()=>``;const xs=class{constructor(e){t(this,e)}render(){return o(s,{key:"171f1c7dfeac8a1789c3bc00699ffc273efbd59c"},o("h2",{key:"cc04112cd3cf2a247b4b9310a1f4af3215e755f7"},"Typed Contact"),o("smoothly-form",{key:"07052256c424c1d3167d729974ce53660153d6f2",validator:vs.type},o("smoothly-input",{key:"055ac603967bf083319d0fdeaa54f7143419c66b",name:"name.first"},"First Name"),o("smoothly-input",{key:"3088fee3b1126a6bf878435428e4922c4c6066c1",name:"name.middle"},"Middle Name (optional)"),o("smoothly-input",{key:"936e6cae0987a5524539aa9058213dcb6d32ae00",name:"name.last"},"Last Name"),o("smoothly-input",{key:"f14199b95c41d2573c29b5d0fa02b84de510b6ed",name:"age",type:"integer"},"Age (18-120)"),o("smoothly-input-select",{key:"00d2bc235840996e1316a7730e4007d1c65e54fd",name:"country"},o("span",{key:"4f287287585dd68aa2d3263ccffc7b240d9d7a0e",slot:"label"},"Country"),C.CountryCode.Alpha2.values.map((t=>o("smoothly-item",{value:t},C.CountryCode.Name.en.from(t))))),o("smoothly-input-date",{key:"74d7b9b3932a9cd9c164e425fc6548a781ab9f09",name:"birthday"},"Date of birth"),o("smoothly-input-reset",{key:"1cab6d7ebb9ee4b619a43f400bade9f94d1ed6a7",slot:"reset",type:"form",size:"icon",color:"warning"}),o("smoothly-input-submit",{key:"2616a4bd6f66a1bd770fa48328562cce56aa0414",slot:"submit",size:"icon",color:"success"})))}};xs.style=ws();const Cs=()=>`.sc-smoothly-frame-h{display:block;width:100%;height:100%}[hidden].sc-smoothly-frame-h{display:none}.sc-smoothly-frame-h>iframe.sc-smoothly-frame{border:none;padding:none;margin:none}`;const Ss=class{constructor(o){t(this,o);this.trigger=e(this,"trigger");this.message2=e(this,"message2")}get contentWindow(){const t=this.element&&this.element.firstElementChild?this.element.firstElementChild:undefined;return t&&t.contentWindow||undefined}get defaultOrigin(){const t=this.url.match(/^(([a-z]+\+)*[a-z]+:\/\/)?[^/^\n]+/);return t?t[0]:"*"}componentDidLoad(){var t;if(this.contentWindow){v.listen((t=this.origin)!==null&&t!==void 0?t:this.defaultOrigin,((t,e)=>{if(t==this.name){if(d.is(e)){this.trigger.emit(e)}else{this.message2.emit({destination:t,content:e})}}}),window)}}async send(t,e){var o,s;if(typeof t=="string"){v.send(((o=this.origin)!==null&&o!==void 0?o:this.defaultOrigin)+"#"+t,e,this.contentWindow)}else if(v.is(t)&&this.contentWindow){v.send({destination:((s=this.origin)!==null&&s!==void 0?s:this.defaultOrigin)+"#"+t.destination,content:t.destination},this.contentWindow)}}render(){return[]}get element(){return a(this)}};Ss.style=Cs();const zs=()=>`[fill].sc-smoothly-icon-h{background:none}.sc-smoothly-icon-h{display:flex;flex-shrink:0;align-items:center;justify-content:center;box-sizing:content-box}[rotate].sc-smoothly-icon-h{--rotate:rotate(var(--rotation, 0deg));transform:var(--rotate)}[flip=x].sc-smoothly-icon-h{--flip:scaleX(-1);transform:var(--flip)}[flip=y].sc-smoothly-icon-h{--flip:scaleY(-1);transform:var(--flip)}[rotate][flip].sc-smoothly-icon-h{transform:var(--rotate)var(--flip)}[hidden].sc-smoothly-icon-h{display:none}[size=tiny].sc-smoothly-icon-h{--smoothly-icon-size:1.2rem}[size=small].sc-smoothly-icon-h{--smoothly-icon-size:1.4rem}[size=medium].sc-smoothly-icon-h{--smoothly-icon-size:1.8rem}[size=large].sc-smoothly-icon-h{--smoothly-icon-size:2.8rem}[size=xlarge].sc-smoothly-icon-h{--smoothly-icon-size:4rem}.sc-smoothly-icon-h{width:var(--smoothly-icon-size, 1.8rem);height:var(--smoothly-icon-size, 1.8rem)}.sc-smoothly-icon-h.sc-smoothly-icon-s>svg{width:100%}`;const Is=class{constructor(e){t(this,e);this.fill="solid";this.name="empty"}async componentWillLoad(){await this.nameChanged()}async nameChanged(){if(this.name=="empty"){this.updateSvg();return}const t=this.latestPromise=h.load(this.name);const e=await t;if(t!=this.latestPromise){return}if(e){const t=this.sanitizeSvg(e);this.updateSvg(t)}}sanitizeSvg(t){const e=new DOMParser;const o=e.parseFromString(t,"image/svg+xml");const s=o.querySelector("svg");if(s){s.setAttribute("role","img");s.removeAttribute("width");s.removeAttribute("height")}return s!==null&&s!==void 0?s:undefined}updateSvg(t){t?this.element.replaceChildren(t):this.element.innerHTML=`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512">\n\t\t\t\t\t<title>Empty</title>\n\t\t\t\t</svg>`}render(){var t;return o(s,{key:"a04fcfccfde192d4146ebb8113809c8606bcd04f",title:this.tooltip,style:{["--rotation"]:`${(t=this.rotate)!==null&&t!==void 0?t:0}deg`}})}get element(){return a(this)}static get watchers(){return{tooltip:[{nameChanged:0}],name:[{nameChanged:0}]}}};Is.style=zs();const Ts=()=>`.sc-smoothly-icon-demo-h{display:block;width:clamp(200px, 100%, 1200px);margin:auto}[hidden].sc-smoothly-icon-demo-h{display:none}.sc-smoothly-icon-demo-h>div.sc-smoothly-icon-demo{display:flex;flex-flow:row wrap}.sc-smoothly-icon-demo-h>div.sc-smoothly-icon-demo>smoothly-icon.sc-smoothly-icon-demo{padding:1rem;position:relative}.sc-smoothly-icon-demo-h>div.sc-smoothly-icon-demo>smoothly-icon.sc-smoothly-icon-demo:hover{scale:1.5}.sc-smoothly-icon-demo-h>div.sc-smoothly-icon-demo>smoothly-icon.sc-smoothly-icon-demo:hover::after{content:attr(data-name);position:absolute;white-space:nowrap;bottom:100%;background:rgb(var(--smoothly-default-contrast));color:rgb(var(--smoothly-default-color));padding:0.25rem 1rem;z-index:1;pointer-events:none}`;const Ds=class{constructor(o){t(this,o);this.notice=e(this,"notice");this.page=0;this.display={};this.props={}}render(){return o(s,{key:"8fbea784d2ed3e61eed53bbde4bf62acd7c00c33"},o("h2",{key:"e0ffda5c80cffb4a5819b69889980d43dc873c5c"},"Filter and Variants"),o("smoothly-form",{key:"9734546f38e2bc3aa1136ec2d60ca919f96b7c78",looks:"grid",onSmoothlyFormInput:t=>this.display=t.detail},o("smoothly-input",{key:"fb615bfa1bb32cde349e9461eb7c95db4561c5f1",name:"filter"},"Filter"),o("smoothly-input-select",{key:"63402507181804347642d78531856b217174951a",name:"variant"},o("span",{key:"d301e5204b7ce8bc4d3d31ab5c0ced12f1e3d893",slot:"label"},"Variant"),o("smoothly-item",{key:"fca79aa0f519c2c9823c0fc08dba8fc7d017c184",value:"outline"},"outline"),o("smoothly-item",{key:"78f2882358c54452f4ce56f976bed73fcade9b4f",value:"sharp"},"sharp"),o("smoothly-input-clear",{key:"1f3d317162149b9abd016a5f329d69ac05683646",slot:"end"}))),o("h2",{key:"3e894f0b4aa610c5a8267a183277e272f4855a9b"},"Props"),o("smoothly-form",{key:"694c7a9bd59edbea5823eb04156dc16e0bae9712",looks:"grid",onSmoothlyFormInput:t=>{this.props=t.detail;console.log("props",this.props)}},o("smoothly-input-select",{key:"0c3057a4f67a05e690ff3b063c930465016d8dd6",name:"color"},o("span",{key:"ae91aea176ba10c3da98a60c3063ec0f43167bff",slot:"label"},"Color"),r.values.map((t=>o("smoothly-item",{value:t},o("span",{style:{background:`rgb(var(--smoothly-${t}-color))`,"margin-right":"0.5rem",width:"2.5rem",height:"2.5rem"}}),o("span",null,t)))),o("smoothly-input-clear",{key:"22657bf293b433e392d57a06ca7ae2301c50676d",slot:"end"})),o("smoothly-input-select",{key:"a3cb883bd3ce072da544acb7c4a9d23de599d63f",name:"fill"},o("span",{key:"f2332f34ea7fd13b2722addacbb8ccb0a02a005e",slot:"label"},"Fill"),c.values.map((t=>o("smoothly-item",{value:t},t))),o("smoothly-input-clear",{key:"8518dae156b2233616eaaa468421a05c8f34025f",slot:"end"})),o("smoothly-input-select",{key:"0c684a06181b5e3aba3e9285c27e5dfc95b11fba",name:"customColor",menuHeight:"12items",ordered:true},o("span",{key:"bdf65faa5cc2d6ac46c2d8f57d12f6c980dbed4f",slot:"label"},"Custom Color"),r.values.flatMap((t=>o(i,null,["tint","color","shade","contrast"].map((e=>o("smoothly-item",{value:`--smoothly-${t}-${e}`},o("span",{style:{background:`rgb(var(--smoothly-${t}-${e}))`,"margin-right":"0.5rem",width:"2.5rem",height:"2.5rem"}}),o("span",null,`rgb(var(--smoothly-${t}-${e}))`)))))))),o("smoothly-input-select",{key:"38e1df15f3e5756a231ea13ae7e603ad729cbfd5",name:"customBackground",menuHeight:"12items",ordered:true},o("span",{key:"034a6c1102fcfc4f84802b652ae4773daedcc79a",slot:"label"},"Custom Background"),r.values.flatMap((t=>o(i,null,["tint","color","shade","contrast"].map((e=>o("smoothly-item",{value:`--smoothly-${t}-${e}`},o("span",{style:{background:`rgb(var(--smoothly-${t}-${e}))`,"margin-right":"0.5rem",width:"2.5rem",height:"2.5rem"}}),o("span",null,`rgb(var(--smoothly-${t}-${e}))`)))))))),o("smoothly-input-select",{key:"bf07ed563c77658d9c8627794932cf807d4d497c",name:"flip"},o("span",{key:"f117c483d18de238eb575e23c358ecd54eec249f",slot:"label"},"Flip"),o("smoothly-item",{key:"d8d6d1da3ede777093bfb6882c4a34a498b109d1",value:"x"},"x"),o("smoothly-item",{key:"fb202fe8bf15b614abacc3778e49f2a9da67abd8",value:"y"},"y"),o("smoothly-input-clear",{key:"c6067ab01e51359091f41c82f315aa36aad09ad4",slot:"end"})),o("smoothly-input-select",{key:"9ba36e95d18097099035b4a11182091e1e7e2287",name:"size"},o("span",{key:"571f9a1953f6b3f22d18f0dd591c9743d3818687",slot:"label"},"Size"),o("smoothly-item",{key:"c38f009d2fb5df14dc7c5dbde70538f8ae5b3e04",value:"tiny"},"tiny"),o("smoothly-item",{key:"800ae091d06fe8f3f9a728ad4ac63b67a7141200",value:"small"},"small"),o("smoothly-item",{key:"b24d245d0614bae7fc0c125824c7cf6ad3a11aa2",value:"medium"},"medium"),o("smoothly-item",{key:"8fdb8c8686a36898c63d6981ef44fc2348e6018e",value:"large"},"large"),o("smoothly-item",{key:"a1d2a033d0531ca802a3241f0f7bfe3b9ab6faf6",value:"xlarge"},"xlarge"),o("smoothly-input-clear",{key:"b72340bf5146665b425c1debb51dcf46bab08a72",slot:"end"})),o("smoothly-input-range",{key:"b39307e3bd9fb244dd56b4de51f392b3522cd39d",name:"rotate",step:1,min:-180,max:180,value:0},"Rotate",o("smoothly-input-clear",{key:"b73479f5999155b57a18c1adaf4dd2a06f98fab5",slot:"end"}))),o("h1",{key:"d9423d81faff0144d5d67a1a15af7395dec71c13"},"Icons"),o("div",{key:"26499ec293ff6772322d9853841d33ad1c0a1195",class:"icons"},[...h.Name.values.filter((t=>!this.display.filter||t.includes(this.display.filter))).map((t=>this.display.variant?`${t}-${this.display.variant}`:t)),...h.Logo.values.filter((t=>!this.display.filter||t.includes(this.display.filter)))].map((t=>o("smoothly-icon",{name:t,tooltip:t,"data-name":t,color:this.props.color,style:{fill:this.props["customColor"]?`rgb(var(${this.props["customColor"]}))`:"",color:this.props["customColor"]?`rgb(var(${this.props["customColor"]}))`:"",background:this.props["customBackground"]?`rgb(var(${this.props["customBackground"]}))`:""},fill:this.props.fill,flip:this.props.flip,size:this.props.size,rotate:this.props.rotate,onClick:()=>{navigator.clipboard.writeText(t);this.notice.emit(S.succeeded(`Copied "${t}"`))}})))))}};Ds.style=Ts();var js;(function(t){function e(t,o){if(t===o){return true}if(typeof t=="object"&&typeof o=="object"){const s=Object.keys(t);if(s.length==Object.keys(o).length&&s.every((s=>e(t[s],o[s])))){return true}}return false}t.equal=e;function o(t,o){return!e(t,o)}t.notEqual=o})(js||(js={}));var Ls;(function(t){function e(t,e,a){const i=/([^.-@\s]+)/gi;return a=="backward"?o(t,e,i):s(t,e,i)}t.getWordBreakIndex=e;function o(t,e,o){let s=0;let a;while((a=o.exec(t))!=null){if(o.lastIndex-a[0].length<e){s=o.lastIndex-a[0].length}else{break}}return s}function s(t,e,o){let s=0;while(o.exec(t)!=null){s=o.lastIndex;if(o.lastIndex>e){break}}o.lastIndex<=e&&(s=t.length);return s}})(Ls||(Ls={}));class Rs{constructor(t,e){this.formatter=t;this.type=e;this.keydownHandlers={ArrowLeft:(t,e)=>t.ctrlKey||t.metaKey?e:this.moveCursor(t,e),ArrowRight:(t,e)=>t.ctrlKey||t.metaKey?e:this.moveCursor(t,e)};this.eventHandlers={beforeinput:{insertText:(t,e)=>this.insert(t,e),insertFromPaste:(t,e)=>this.insert(t,e),insertFromDrop:(t,e)=>this.insert(t,e),deleteContentBackward:(t,e)=>{t.preventDefault();if(e.selection.start==e.selection.end){this.select(e,e.selection.start-1,e.selection.end)}this.erase(e);return e},deleteContentForward:(t,e)=>{t.preventDefault();if(e.selection.start==e.selection.end){this.select(e,e.selection.start,e.selection.end+1)}this.erase(e);return e},deleteWordBackward:(t,e,o)=>{let s=e;if(this.type!="password"){t.preventDefault();s=this.deleteWord(o,"backward")}return s},deleteWordForward:(t,e,o)=>{let s=e;if(this.type!="password"){t.preventDefault();s=this.deleteWord(o,"forward")}return s},deleteByCut:(t,e)=>{this.erase(e);return e}},input:{insertReplacementText:(t,e)=>Object.assign(Object.assign({},e),{value:t.target.value}),insertCompositionText:(t,e)=>Object.assign(Object.assign({},e),{value:t.target.value}),deleteWordBackward:(t,e)=>this.type=="password"?Object.assign(Object.assign({},e),{value:t.target.value}):e,deleteWordForward:(t,e)=>this.type=="password"?Object.assign(Object.assign({},e),{value:t.target.value}):e,undefined:(t,e)=>Object.assign(Object.assign({},e),{value:t.target.value})}}}static create(t,e){let o;switch(t){case"price":o=he("price",e);break;case"integer":o=he("integer",e);break;default:o=he(t,e);break}return new Rs(o||he("text"),t)}onKeyDown(t,e){var o,s,a,i;let l=e;const n=this.keydownHandlers[t.key];if(n){const r=t.target;e.selection.start=(o=r.selectionStart)!==null&&o!==void 0?o:e.selection.start;e.selection.end=(s=r.selectionEnd)!==null&&s!==void 0?s:e.selection.end;e.selection.direction=(a=r.selectionDirection)!==null&&a!==void 0?a:e.selection.direction;const c=n(t,this.unformatState(e),e);const h=this.partialFormatState(c);if(t.defaultPrevented){r.selectionStart=h.selection.start;r.selectionEnd=h.selection.end;r.selectionDirection=(i=h.selection.direction)!==null&&i!==void 0?i:null}l=h}return l}moveCursor(t,e){t.preventDefault();let o=ae.getCursor(e.selection);let s=ae.getStalker(e.selection);o=Math.min(Math.max(o+(t.key=="ArrowLeft"?-1:1),0),e.value.length);s=t.shiftKey?s:o;e.selection.direction=s<o?"forward":s>o?"backward":"none";e.selection.start=Math.min(s,o);e.selection.end=Math.max(s,o);return e}onFocus(t,e){const o=this.partialFormatState(this.unformatState(e));const s=t.target;s.value=o.value;return o}onBlur(t,e){const o=this.createFormattedState(e);const s=t.target;s.value=o.value;return o}onInputEvent(t,e){var o,s,a,i,l,n,r;const c=t.target;e.selection.start=(o=c.selectionStart)!==null&&o!==void 0?o:e.selection.start;e.selection.end=(s=c.selectionEnd)!==null&&s!==void 0?s:e.selection.end;e.selection.direction=(a=c.selectionDirection)!==null&&a!==void 0?a:e.selection.direction;const h=t.type=="beforeinput"||t.type=="input"?(n=(l=(i=this.eventHandlers[t.type])[t.inputType])===null||l===void 0?void 0:l.call(i,t,this.unformatState(e),e))!==null&&n!==void 0?n:e:e;const d=this.partialFormatState(h);if(t.defaultPrevented){c.value=d.value;c.selectionStart=d.selection.start;c.selectionEnd=d.selection.end;c.selectionDirection=(r=d.selection.direction)!==null&&r!==void 0?r:null}return d}insert(t,e){t.preventDefault();if(typeof t.data=="string"){for(const o of t.data){this.formatter.allowed(o,e)&&this.replace(e,o.replace(/(\r|\n|\t)/g,""))}}return e}deleteWord(t,e){const o=ae.getCursor(t.selection);const s=Ls.getWordBreakIndex(t.value,o,e);const a=this.unformatState(Object.assign(Object.assign({},t),{selection:{start:Math.min(o,s),end:Math.max(o,s),direction:"none"}}));const i=a.value.substring(0,a.selection.start)+a.value.substring(a.selection.end);a.value=i;a.selection.end=a.selection.start;return a}select(t,e,o,s){t.selection.start=e;t.selection.end=o;s&&(t.selection.direction=s)}erase(t){this.replace(t,"")}replace(t,e){t.value=t.value.substring(0,t.selection.start)+e+t.value.substring(t.selection.end);t.selection.start=t.selection.start+e.length;t.selection.end=t.selection.start}unformatState(t){return ie.copy(this.formatter.unformat(le.copy(t)))}partialFormatState(t){return this.formatter.partialFormat(le.copy(t))}createFormattedState(t){return this.formatter.format(le.copy(this.formatter.unformat(le.copy(t))))}toString(t){return this.formatter.toString(t)}initialState(t,e){const o=this.toString(t)||"";const s=o.length;const a=this.createFormattedState({value:o,selection:{start:s,end:s,direction:"none"}});if(e){e.value=a.value}return a}setValue(t,e,o){const s=Object.assign(Object.assign({},e),{value:this.createFormattedState({value:this.formatter.toString(o),selection:e.selection}).value});t.value=s.value;return s}getValue(t){return this.formatter.fromString(this.unformatState(t).value)}setSelection(t,e,o,s){t.focus();t.selectionStart=o;t.selectionEnd=s;this.select(e,o,s);return e}}var _s;(function(t){t.type=m({name:u(),key:u(),shift:b(),ctrl:b(),alt:b(),meta:b()});t.is=t.type.is;function e(t,e){return{name:t,key:e.key,shift:e.shiftKey,ctrl:e.ctrlKey,alt:e.altKey,meta:e.metaKey}}t.create=e})(_s||(_s={}));const As=()=>`.sc-smoothly-input-h{--input-padding-side:.5rem;--input-value-padding-top:1.25rem;--input-value-padding-bottom:.25rem;--input-min-height:3rem;min-height:var(--input-min-height);box-sizing:border-box;border-radius:var(--smoothly-input-border-radius)}[looks="border"].sc-smoothly-input-h{border:rgb(var(--smoothly-input-border)) solid 1px}[looks="border"].sc-smoothly-input-h:not([readonly]):not([disabled]):focus-within{outline:2px solid rgb(var(--smoothly-input-border-focus))}[looks="border"][readonly].sc-smoothly-input-h{border:transparent solid 1px}[looks="line"].sc-smoothly-input-h{border-bottom:rgb(var(--smoothly-input-border)) solid 1px;position:relative}[looks="line"][readonly].sc-smoothly-input-h{border-bottom:transparent solid 1px}[looks="line"].sc-smoothly-input-h:not([readonly]):not([disabled]):focus-within::before{content:"";position:absolute;inset:0;pointer-events:none;border-bottom:2px solid rgb(var(--smoothly-input-border-focus));z-index:10}[looks="grid"].sc-smoothly-input-h{flex-grow:1;flex-basis:40%;box-shadow:0px 0px 0px 1px rgb(var(--smoothly-input-border));border:none}[looks="grid"][readonly].sc-smoothly-input-h{box-shadow:0px 0px 0px 1px rgba(var(--smoothly-input-border-readonly))}[looks="grid"].sc-smoothly-input-h:not([readonly]):not([disabled]):focus-within{position:relative;box-shadow:0px 0px 0px 2px rgb(var(--smoothly-input-border-focus));outline:none;z-index:10}[looks="transparent"].sc-smoothly-input-h{border:none}[looks="transparent"][readonly].sc-smoothly-input-h,[looks="transparent"].sc-smoothly-input-h:not(:focus-within){background-color:transparent}[looks="transparent"][readonly].sc-smoothly-input-h>input.sc-smoothly-input,[looks="transparent"].sc-smoothly-input-h:not(:focus-within)>input.sc-smoothly-input{background-color:transparent}[looks="transparent"].sc-smoothly-input-h:not([readonly]):focus-within{outline:1px solid rgb(var(--smoothly-input-border))}[disabled].sc-smoothly-input-h{cursor:not-allowed;--smoothly-input-foreground:var(--smoothly-input-disabled-foreground);--smoothly-input-background:var(--smoothly-input-disabled-background);--smoothly-input-border:var(--smoothly-input-disabled-border)}.sc-smoothly-input-h.sc-smoothly-input-s>[slot=label],.sc-smoothly-input-h .sc-smoothly-input-s>[slot=label],.sc-smoothly-input-h .label.sc-smoothly-input{position:absolute;top:.6rem;opacity:0.8;user-select:none;cursor:inherit;transform-origin:top left;transition:transform 100ms ease}[right].sc-smoothly-input-h .label.sc-smoothly-input{transform-origin:top right}.sc-smoothly-input-h.floating-label.sc-smoothly-input-s>[slot=label],.sc-smoothly-input-h.floating-label .sc-smoothly-input-s>[slot=label],.sc-smoothly-input-h.has-value.sc-smoothly-input-s>[slot=label],.sc-smoothly-input-h.has-value .sc-smoothly-input-s>[slot=label],.sc-smoothly-input-h[placeholder].sc-smoothly-input-s>[slot=label],.sc-smoothly-input-h[placeholder] .sc-smoothly-input-s>[slot=label],.sc-smoothly-input-h[readonly].sc-smoothly-input-s>[slot=label],.sc-smoothly-input-h[readonly] .sc-smoothly-input-s>[slot=label],.floating-label.sc-smoothly-input-h .label.sc-smoothly-input,.has-value.sc-smoothly-input-h .label.sc-smoothly-input,.has-text.sc-smoothly-input-h .label.sc-smoothly-input,[placeholder].sc-smoothly-input-h .label.sc-smoothly-input,[readonly].sc-smoothly-input-h .label.sc-smoothly-input,.sc-smoothly-input-h:not([readonly]):focus-within .label.float-on-focus.sc-smoothly-input{top:.2rem;transform:scale(0.8)}.sc-smoothly-input-h:not([show-label]):not(.show-label) .label.sc-smoothly-input{display:none}.sc-smoothly-input-h smoothly-icon.smoothly-invalid.sc-smoothly-input{fill:rgb(var(--smoothly-input-invalid-icon, var(--smoothly-danger-color)))}.sc-smoothly-input-h{display:flex;align-items:center;justify-content:center;font-weight:var(--smoothly-font-weight);background-color:rgb(var(--smoothly-input-background));color:rgb(var(--smoothly-input-foreground))}[hidden].sc-smoothly-input-h{display:none}.sc-smoothly-input-h>.smoothly-input-container.sc-smoothly-input{position:relative;flex-grow:1;height:100%}.sc-smoothly-input-h>.smoothly-input-container.sc-smoothly-input>label.sc-smoothly-input{left:var(--input-padding-side)}[right].sc-smoothly-input-h>.smoothly-input-container.sc-smoothly-input>label.sc-smoothly-input{right:var(--input-padding-side);left:auto}[right].sc-smoothly-input-h>div.sc-smoothly-input>input.sc-smoothly-input{text-align:right}.sc-smoothly-input-h:not([show-label])>div.sc-smoothly-input>input.sc-smoothly-input{padding:0 var(--input-padding-side)}.sc-smoothly-input-h>.smoothly-input-container.sc-smoothly-input>div.guide.sc-smoothly-input{position:absolute;box-sizing:border-box;align-content:center;height:100%;padding-inline:var(--input-padding-side)}[show-label].sc-smoothly-input-h>.smoothly-input-container.sc-smoothly-input>div.guide.sc-smoothly-input{padding-block:var(--input-value-padding-top) var(--input-value-padding-bottom)}.sc-smoothly-input-h>.smoothly-input-container.sc-smoothly-input>div.guide.sc-smoothly-input>div.value.sc-smoothly-input{display:inline;pointer-events:none;opacity:0}.sc-smoothly-input-h>.smoothly-input-container.sc-smoothly-input>div.guide.sc-smoothly-input>div.remainder.sc-smoothly-input{display:inline;pointer-events:none;opacity:0.5}.sc-smoothly-input-h>.smoothly-input-container.sc-smoothly-input>input.sc-smoothly-input{padding:var(--input-value-padding-top) var(--input-padding-side) var(--input-value-padding-bottom) var(--input-padding-side);box-sizing:border-box;width:100%;height:100%;border:0;z-index:1;position:relative;font-size:1rem;font-family:var(--smoothly-font-family)}[disabled].sc-smoothly-input-h>.smoothly-input-container.sc-smoothly-input>input.sc-smoothly-input{cursor:not-allowed}.sc-smoothly-input-h>.smoothly-invalid.sc-smoothly-input{display:none;z-index:2;padding:0.5rem}[invalid].sc-smoothly-input-h>.smoothly-invalid.sc-smoothly-input{display:flex}.sc-smoothly-input-h>div.sc-smoothly-input>label.sc-smoothly-input{z-index:1;pointer-events:none}.sc-smoothly-input-h>div.sc-smoothly-input>input.sc-smoothly-input:focus{outline:none}.sc-smoothly-input-h>div.sc-smoothly-input>input.sc-smoothly-input:-webkit-autofill,.sc-smoothly-input-h>div.sc-smoothly-input>input.sc-smoothly-input:-webkit-autofill:hover,.sc-smoothly-input-h>div.sc-smoothly-input>input.sc-smoothly-input:-webkit-autofill:focus,.sc-smoothly-input-h>div.sc-smoothly-input>input.sc-smoothly-input:-webkit-autofill:active{box-shadow:0 0 0 40em rgb(var(--smoothly-input-background)) inset;-webkit-box-shadow:0 0 0 40em rgb(var(--smoothly-input-background)) inset}.sc-smoothly-input-h>div.sc-smoothly-input>input.sc-smoothly-input:-webkit-autofill,.sc-smoothly-input-h>div.sc-smoothly-input>input.sc-smoothly-input:-webkit-autofill+label.sc-smoothly-input{-webkit-text-fill-color:rgb(var(--smoothly-input-foreground))}.sc-smoothly-input-h>span.copyable.sc-smoothly-input{position:relative}.sc-smoothly-input-h>span.copyable.sc-smoothly-input>smoothly-icon.sc-smoothly-input{cursor:pointer;display:flex;align-items:center;padding:0.5rem}.sc-smoothly-input-h>span.copyable.sc-smoothly-input:hover small.sc-smoothly-input,.sc-smoothly-input-h>span.copyable.sc-smoothly-input:focus small.sc-smoothly-input{display:block}.sc-smoothly-input-h>span.copyable.sc-smoothly-input>small.sc-smoothly-input{display:none;width:max-content;border-radius:0.25rem;padding:0.2rem 0.3rem;position:absolute;right:-0.5rem;top:-2rem;background-color:rgb(var(--smoothly-default-contrast));color:rgb(var(--smoothly-default-tint))}`;const $s=class{constructor(o){t(this,o);this.smoothlyInputLooks=e(this,"smoothlyInputLooks");this.smoothlyInputLoad=e(this,"smoothlyInputLoad");this.smoothlyFormDisable=e(this,"smoothlyFormDisable");this.smoothlyKeydown=e(this,"smoothlyKeydown");this.smoothlyBlur=e(this,"smoothlyBlur");this.smoothlyChange=e(this,"smoothlyChange");this.smoothlyInput=e(this,"smoothlyInput");this.smoothlyUserInput=e(this,"smoothlyUserInput");this.type="text";this.required=false;this.showLabel=true;this.disabled=false;this.readonly=false;this.invalid=false;this.copied=false;this.isDifferentFromInitial=false;this.uneditable=this.readonly;this.observer=Xo.Observer.create(this)}async getValue(){return this.stateHandler.getValue(this.state)}async setValue(t){if(this.inputElement){this.state=this.stateHandler.setValue(this.inputElement,this.state,t)}}async setFocus(){var t;(t=this.inputElement)===null||t===void 0?void 0:t.focus()}async setSelection(t,e){if(this.inputElement){this.state=this.stateHandler.setSelection(this.inputElement,this.state,t,e<0?this.inputElement.value.length+e+1:e)}}async listen(t){this.observer.subscribe(t)}nameChange(t,e){ts.formRename(this,e)}async register(){ts.formAdd(this)}async unregister(){ts.formRemove(this)}async clear(){if(!this.uneditable&&this.inputElement){this.state=this.stateHandler.setValue(this.inputElement,this.state,undefined)}}async edit(t){!this.uneditable&&(this.readonly=!t)}async reset(){if(!this.uneditable&&this.inputElement){this.state=this.stateHandler.setValue(this.inputElement,this.state,this.initialValue)}}async setInitialValue(){this.isDifferentFromInitial=false;this.initialValue=this.value;this.smoothlyInput.emit({[this.name]:await this.getValue()})}async setCustomInitialValue(t){this.initialValue=t}async smoothlyInputLoadHandler(t){ts.registerSubAction(this,t)}typeChange(){var t,e;switch(this.type){case"price":this.stateHandler=Rs.create("price",{currency:this.currency,toInteger:this.toInteger});break;case"integer":this.stateHandler=Rs.create("integer",{min:this.min,max:this.max,pad:this.pad});break;default:this.stateHandler=Rs.create(this.type,T());break}this.state=this.stateHandler.initialState((t=this.value)!==null&&t!==void 0?t:(e=this.state)===null||e===void 0?void 0:e.value,this.inputElement)}stateChange(){const t=this.stateHandler.getValue(this.state);this.isDifferentFromInitial=js.notEqual(this.initialValue,t);this.smoothlyInput.emit({[this.name]:t});this.observer.publish()}valueChange(t){const e=this.stateHandler.getValue(this.state);if(js.notEqual(e,t)&&this.inputElement){this.state=this.stateHandler.setValue(this.inputElement,this.state,t);this.smoothlyInput.emit({[this.name]:this.stateHandler.getValue(this.state)})}}readonlyChange(){this.observer.publish()}componentWillLoad(){this.initialValue=this.value;this.typeChange();this.smoothlyInputLooks.emit(((t,e)=>{var o;return this.looks=(o=this.looks)!==null&&o!==void 0?o:t,!this.color&&(this.color=e)}));this.smoothlyInputLoad.emit((t=>this.parent=t));!this.readonly&&this.smoothlyFormDisable.emit((t=>this.readonly=t));this.observer.publish()}componentDidLoad(){if(this.inputElement){this.inputElement.value=this.state.value}}async disconnectedCallback(){if(!this.element.isConnected){await this.unregister()}}onEvent(t){this.state=this.stateHandler.onInputEvent(t,this.state);if(t.type=="input"||t.defaultPrevented){this.smoothlyUserInput.emit({name:this.name,value:this.stateHandler.getValue(this.state)})}}copyText(t){if(t){navigator.clipboard.writeText(t);this.copied=true}}render(){var t,e,a,i,l,n,r,c,h,d;return o(s,{key:"dc56c8b63c3a0402640a20a811dae85468138f3b",class:{"has-value":((t=this.state)===null||t===void 0?void 0:t.value)!=undefined&&((e=this.state)===null||e===void 0?void 0:e.value)!=""},onclick:()=>{var t;return(t=this.inputElement)===null||t===void 0?void 0:t.focus()}},o("slot",{key:"f3372746df6932f07cea568a5f16d9bbdeef39cd",name:"start"}),o("div",{key:"1d50dc7ea1c62c4835af80ec08c708d2162452c5",class:"smoothly-input-container"},o("div",{key:"f562dd8ffdda755718f02c742e0b96bc1c823071",class:"guide"},o("div",{key:"1f02c40d673223061f83933a252caf01ccede774",class:"value"},(a=this.state)===null||a===void 0?void 0:a.value),o("div",{key:"12c0b824734da7fbd20de68ce033b0da60149ecf",class:"remainder"},(i=this.state)===null||i===void 0?void 0:i.remainder)),o("input",{key:"89ff5f54533362d8776d4f500c019aef7a951b58",ref:t=>this.inputElement=t,color:this.color,name:this.name,type:(l=this.state)===null||l===void 0?void 0:l.type,inputmode:(n=this.state)===null||n===void 0?void 0:n.inputmode,placeholder:this.placeholder,required:this.required,autocomplete:(r=this.autocomplete)!==null&&r!==void 0?r:(c=this.state)===null||c===void 0?void 0:c.autocomplete,disabled:this.disabled,readOnly:this.readonly,pattern:((h=this.state)===null||h===void 0?void 0:h.pattern)&&((d=this.state)===null||d===void 0?void 0:d.pattern.source),onKeyDown:async t=>{this.state=this.stateHandler.onKeyDown(t,this.state);if(!this.readonly&&!this.disabled){this.smoothlyKeydown.emit(_s.create(this.name,t))}},onFocus:t=>!this.readonly&&(this.state=this.stateHandler.onFocus(t,this.state)),onBlur:t=>{if(!this.readonly){const e=this.stateHandler.getValue(this.state);this.state=this.stateHandler.onBlur(t,this.state);this.smoothlyBlur.emit();this.smoothlyInput.emit({[this.name]:this.stateHandler.getValue(this.state)});if(js.notEqual(e,this.stateHandler.getValue(this.state))){this.smoothlyChange.emit({[this.name]:this.stateHandler.getValue(this.state)});this.smoothlyUserInput.emit({name:this.name,value:this.stateHandler.getValue(this.state)})}}}}),o("label",{key:"0773d2f8eac3c880558ed831dca5903f4da1f5aa",class:"label float-on-focus",htmlFor:this.name},o("slot",{key:"fbce8ed1251aa8b97937ee81ec4e07c36941de52"}))),this.copyable&&this.value&&o("span",{key:"a0ffe7c27427df173276dbedd1159d1a3428ec36",class:"copyable"},o("small",{key:"da9740e6bc386abe42a23d4e0d428a72da6ee4de"},this.copied?"Copied!":"Copy"),o("smoothly-icon",{key:"7b3eaa57b44c623c09a55ef143dd98fd90a6a660",name:"copy-outline",size:"small",onClick:()=>this.copyText(this.value),onMouseLeave:()=>this.copied=false})),o("smoothly-icon",{key:"b89c81c66a99efab0dcb5aa0f751c41c28723f64",class:"smoothly-invalid",name:"alert-circle",size:"small",tooltip:this.errorMessage}),o("slot",{key:"0f84b621e6860ab9b6477ee2a5aff5d0e099d1d9",name:"end"}))}get element(){return a(this)}static get watchers(){return{name:[{nameChange:0}],currency:[{typeChange:0}],type:[{typeChange:0}],state:[{stateChange:0}],value:[{valueChange:0}],disabled:[{readonlyChange:0}],readonly:[{readonlyChange:0}]}}};$s.style=As();const Ms=()=>`.sc-smoothly-input-checkbox-h{--input-padding-side:.5rem;--input-value-padding-top:1.25rem;--input-value-padding-bottom:.25rem;--input-min-height:3rem;min-height:var(--input-min-height);box-sizing:border-box;border-radius:var(--smoothly-input-border-radius)}[looks="border"].sc-smoothly-input-checkbox-h{border:rgb(var(--smoothly-input-border)) solid 1px}[looks="border"].sc-smoothly-input-checkbox-h:not([readonly]):not([disabled]):focus-within{outline:2px solid rgb(var(--smoothly-input-border-focus))}[looks="border"][readonly].sc-smoothly-input-checkbox-h{border:transparent solid 1px}[looks="line"].sc-smoothly-input-checkbox-h{border-bottom:rgb(var(--smoothly-input-border)) solid 1px;position:relative}[looks="line"][readonly].sc-smoothly-input-checkbox-h{border-bottom:transparent solid 1px}[looks="line"].sc-smoothly-input-checkbox-h:not([readonly]):not([disabled]):focus-within::before{content:"";position:absolute;inset:0;pointer-events:none;border-bottom:2px solid rgb(var(--smoothly-input-border-focus));z-index:10}[looks="grid"].sc-smoothly-input-checkbox-h{flex-grow:1;flex-basis:40%;box-shadow:0px 0px 0px 1px rgb(var(--smoothly-input-border));border:none}[looks="grid"][readonly].sc-smoothly-input-checkbox-h{box-shadow:0px 0px 0px 1px rgba(var(--smoothly-input-border-readonly))}[looks="grid"].sc-smoothly-input-checkbox-h:not([readonly]):not([disabled]):focus-within{position:relative;box-shadow:0px 0px 0px 2px rgb(var(--smoothly-input-border-focus));outline:none;z-index:10}[looks="transparent"].sc-smoothly-input-checkbox-h{border:none}[looks="transparent"][readonly].sc-smoothly-input-checkbox-h,[looks="transparent"].sc-smoothly-input-checkbox-h:not(:focus-within){background-color:transparent}[looks="transparent"][readonly].sc-smoothly-input-checkbox-h>input.sc-smoothly-input-checkbox,[looks="transparent"].sc-smoothly-input-checkbox-h:not(:focus-within)>input.sc-smoothly-input-checkbox{background-color:transparent}[looks="transparent"].sc-smoothly-input-checkbox-h:not([readonly]):focus-within{outline:1px solid rgb(var(--smoothly-input-border))}[disabled].sc-smoothly-input-checkbox-h{cursor:not-allowed;--smoothly-input-foreground:var(--smoothly-input-disabled-foreground);--smoothly-input-background:var(--smoothly-input-disabled-background);--smoothly-input-border:var(--smoothly-input-disabled-border)}.sc-smoothly-input-checkbox-h.sc-smoothly-input-checkbox-s>[slot=label],.sc-smoothly-input-checkbox-h .sc-smoothly-input-checkbox-s>[slot=label],.sc-smoothly-input-checkbox-h .label.sc-smoothly-input-checkbox{position:absolute;top:.6rem;opacity:0.8;user-select:none;cursor:inherit;transform-origin:top left;transition:transform 100ms ease}[right].sc-smoothly-input-checkbox-h .label.sc-smoothly-input-checkbox{transform-origin:top right}.sc-smoothly-input-checkbox-h.floating-label.sc-smoothly-input-checkbox-s>[slot=label],.sc-smoothly-input-checkbox-h.floating-label .sc-smoothly-input-checkbox-s>[slot=label],.sc-smoothly-input-checkbox-h.has-value.sc-smoothly-input-checkbox-s>[slot=label],.sc-smoothly-input-checkbox-h.has-value .sc-smoothly-input-checkbox-s>[slot=label],.sc-smoothly-input-checkbox-h[placeholder].sc-smoothly-input-checkbox-s>[slot=label],.sc-smoothly-input-checkbox-h[placeholder] .sc-smoothly-input-checkbox-s>[slot=label],.sc-smoothly-input-checkbox-h[readonly].sc-smoothly-input-checkbox-s>[slot=label],.sc-smoothly-input-checkbox-h[readonly] .sc-smoothly-input-checkbox-s>[slot=label],.floating-label.sc-smoothly-input-checkbox-h .label.sc-smoothly-input-checkbox,.has-value.sc-smoothly-input-checkbox-h .label.sc-smoothly-input-checkbox,.has-text.sc-smoothly-input-checkbox-h .label.sc-smoothly-input-checkbox,[placeholder].sc-smoothly-input-checkbox-h .label.sc-smoothly-input-checkbox,[readonly].sc-smoothly-input-checkbox-h .label.sc-smoothly-input-checkbox,.sc-smoothly-input-checkbox-h:not([readonly]):focus-within .label.float-on-focus.sc-smoothly-input-checkbox{top:.2rem;transform:scale(0.8)}.sc-smoothly-input-checkbox-h:not([show-label]):not(.show-label) .label.sc-smoothly-input-checkbox{display:none}.sc-smoothly-input-checkbox-h smoothly-icon.smoothly-invalid.sc-smoothly-input-checkbox{fill:rgb(var(--smoothly-input-invalid-icon, var(--smoothly-danger-color)))}.sc-smoothly-input-checkbox-h{display:flex;align-items:center;flex-direction:row;position:relative;gap:.5rem;padding-inline:var(--input-padding-side);background-color:rgb(var(--smoothly-input-background));box-sizing:border-box;background-color:rgb(var(--smoothly-input-background));color:rgb(var(--smoothly-input-foreground))}.sc-smoothly-input-checkbox-h:has(>.smoothly-checkbox-end-slot:not(:empty)){padding-right:0}.sc-smoothly-input-checkbox-h>input.sc-smoothly-input-checkbox{-webkit-appearance:none;-moz-appearance:none;appearance:none;height:1.25rem;width:1.25rem;border-radius:0.25rem;border:1px solid rgb(var(--smoothly-input-foreground));color:rgb(var(--smoothly-input-foreground));display:block}[checked][looks=transparent].sc-smoothly-input-checkbox-h>input.sc-smoothly-input-checkbox,[checked].sc-smoothly-input-checkbox-h>input.sc-smoothly-input-checkbox{background-color:rgb(var(--smoothly-input-foreground))}.sc-smoothly-input-checkbox-h:not([readonly]):not([disabled])>input.sc-smoothly-input-checkbox,.sc-smoothly-input-checkbox-h:not([readonly]):not([disabled])>label.sc-smoothly-input-checkbox{cursor:pointer}.sc-smoothly-input-checkbox-h>label.sc-smoothly-input-checkbox:empty{display:none}[disabled].sc-smoothly-input-checkbox-h,[disabled].sc-smoothly-input-checkbox-h>*.sc-smoothly-input-checkbox{cursor:not-allowed}.sc-smoothly-input-checkbox-h>smoothly-icon.sc-smoothly-input-checkbox{position:absolute;z-index:1;pointer-events:none;--smoothly-color-contrast:var(--smoothly-input-background)}[looks="transparent"].sc-smoothly-input-checkbox-h{background-color:transparent}[looks="transparent"].sc-smoothly-input-checkbox-h:not([readonly]):focus-within{outline-color:transparent}.sc-smoothly-input-checkbox-h>.smoothly-checkbox-end-slot.sc-smoothly-input-checkbox{margin-left:auto}.sc-smoothly-input-checkbox-h>.smoothly-checkbox-end-slot.sc-smoothly-input-checkbox:empty{display:none}`;const Es=class{constructor(o){t(this,o);this.smoothlyInputLooks=e(this,"smoothlyInputLooks");this.smoothlyInput=e(this,"smoothlyInput");this.smoothlyUserInput=e(this,"smoothlyUserInput");this.smoothlyInputLoad=e(this,"smoothlyInputLoad");this.smoothlyFormDisable=e(this,"smoothlyFormDisable");this.isDifferentFromInitial=false;this.observer=Xo.Observer.create(this);this.readonly=false;this.checked=false}componentWillLoad(){this.initialValue=this.checked;!this.readonly&&this.smoothlyFormDisable.emit((t=>this.readonly=t));this.smoothlyInputLooks.emit(((t,e)=>{var o;return this.looks=(o=this.looks)!==null&&o!==void 0?o:t,!this.color&&(this.color=e)}));this.smoothlyInputLoad.emit((t=>this.parent=t));this.observer.publish();this.id="id-"+Math.random().toString(36).substring(2,11)}async disconnectedCallback(){if(!this.element.isConnected){await this.unregister()}}async smoothlyInputLoadHandler(t){ts.registerSubAction(this,t)}nameChange(t,e){ts.formRename(this,e)}async register(){ts.formAdd(this)}async unregister(){ts.formRemove(this)}async getValue(){return this.value?this.value[`${!!this.checked}`]:this.checked}async clear(){!this.disabled&&!this.readonly&&(this.checked=false)}async listen(t){this.observer.subscribe(t)}async edit(t){this.readonly=!t}async reset(){this.checked=this.initialValue}async setInitialValue(){this.initialValue=this.checked;this.isDifferentFromInitial=false}async handleDisabledChange(){this.observer.publish()}async elementCheck(t,e){this.isDifferentFromInitial=!!this.initialValue!=!!this.checked;const o=!!this.checked!=!!e;if(o){this.smoothlyInput.emit({[this.name]:await this.getValue()});this.observer.publish()}}render(){return o(s,{key:"8d586e5be3e100b6f67e79694bdb7166b2aeddf8"},o("input",{key:"fe7b1db5fe641116040034355e04ca8b5ab22e97",type:"checkbox",id:this.id,checked:this.checked,disabled:this.disabled||this.readonly,onChange:async t=>{this.checked=t.target.checked;this.smoothlyUserInput.emit({name:this.name,value:await this.getValue()})}}),this.checked&&o("smoothly-icon",{key:"51b9efb24588c22d2a568227297787d023571e71",name:"checkmark-sharp",size:"tiny"}),o("label",{key:"6987b8f1b6e08a7f2c0b14c57e081939bc174fb4",htmlFor:this.id},o("slot",{key:"3f86fa549bbe9a68c83895a8bda1517b1554a926"})),o("span",{key:"75546ae8484e8aa1945fdec28fd4449880304ae9",class:"smoothly-checkbox-end-slot"},o("slot",{key:"1e4e1fcf24e300d18b3728bfbde4a1e178253bce",name:"end"})))}get element(){return a(this)}static get watchers(){return{name:[{nameChange:0}],disabled:[{handleDisabledChange:0}],readonly:[{handleDisabledChange:0}],checked:[{elementCheck:0}]}}};Es.style=Ms();const Os=()=>`[color=default].sc-smoothly-input-clear{--smoothly-color:var(--smoothly-default-color);--smoothly-color-contrast:var(--smoothly-default-contrast);--smoothly-color-shade:var(--smoothly-default-shade);--smoothly-color-tint:var(--smoothly-default-tint)}[color=primary].sc-smoothly-input-clear{--smoothly-color:var(--smoothly-primary-color);--smoothly-color-contrast:var(--smoothly-primary-contrast);--smoothly-color-shade:var(--smoothly-primary-shade);--smoothly-color-tint:var(--smoothly-primary-tint)}[color=secondary].sc-smoothly-input-clear{--smoothly-color:var(--smoothly-secondary-color);--smoothly-color-contrast:var(--smoothly-secondary-contrast);--smoothly-color-shade:var(--smoothly-secondary-shade);--smoothly-color-tint:var(--smoothly-secondary-tint)}[color=tertiary].sc-smoothly-input-clear{--smoothly-color:var(--smoothly-tertiary-color);--smoothly-color-contrast:var(--smoothly-tertiary-contrast);--smoothly-color-shade:var(--smoothly-tertiary-shade);--smoothly-color-tint:var(--smoothly-tertiary-tint)}[color=success].sc-smoothly-input-clear{--smoothly-color:var(--smoothly-success-color);--smoothly-color-contrast:var(--smoothly-success-contrast);--smoothly-color-shade:var(--smoothly-success-shade);--smoothly-color-tint:var(--smoothly-success-tint)}[color=warning].sc-smoothly-input-clear{--smoothly-color:var(--smoothly-warning-color);--smoothly-color-contrast:var(--smoothly-warning-contrast);--smoothly-color-shade:var(--smoothly-warning-shade);--smoothly-color-tint:var(--smoothly-warning-tint)}[color=danger].sc-smoothly-input-clear{--smoothly-color:var(--smoothly-danger-color);--smoothly-color-contrast:var(--smoothly-danger-contrast);--smoothly-color-shade:var(--smoothly-danger-shade);--smoothly-color-tint:var(--smoothly-danger-tint)}[color=light].sc-smoothly-input-clear{--smoothly-color:var(--smoothly-light-color);--smoothly-color-contrast:var(--smoothly-light-contrast);--smoothly-color-shade:var(--smoothly-light-shade);--smoothly-color-tint:var(--smoothly-light-tint)}[color=medium].sc-smoothly-input-clear{--smoothly-color:var(--smoothly-medium-color);--smoothly-color-contrast:var(--smoothly-medium-contrast);--smoothly-color-shade:var(--smoothly-medium-shade);--smoothly-color-tint:var(--smoothly-medium-tint)}[color=dark].sc-smoothly-input-clear{--smoothly-color:var(--smoothly-dark-color);--smoothly-color-contrast:var(--smoothly-dark-contrast);--smoothly-color-shade:var(--smoothly-dark-shade);--smoothly-color-tint:var(--smoothly-dark-tint)}.sc-smoothly-input-clear-h{--smoothly-button-border-radius:0.5rem;display:inline-flex;box-sizing:border-box;border-radius:var(--smoothly-button-border-radius);font-size:var(--smoothly-button-font-size, 1rem);cursor:pointer;border:none;outline:none;position:relative}[shape=rounded].sc-smoothly-input-clear-h{--smoothly-button-border-radius:2rem}[type=link].sc-smoothly-input-clear-h{display:inline}[disabled].sc-smoothly-input-clear-h{opacity:0.5}.sc-smoothly-input-clear-h>a.sc-smoothly-input-clear{font-weight:400;background-color:transparent}.sc-smoothly-input-clear-h>a.sc-smoothly-input-clear,.sc-smoothly-input-clear-h>button.sc-smoothly-input-clear{font-size:var(--smoothly-button-font-size);border:1px solid transparent;outline:none;cursor:pointer;display:inline-flex;gap:0.5rem;box-sizing:border-box}.sc-smoothly-input-clear-h>button.sc-smoothly-input-clear{font-weight:bold;justify-content:center;width:100%;align-items:center;border-radius:var(--smoothly-button-border-radius);padding-inline:var(--smoothly-button-padding-inline, 1rem)}.sc-smoothly-input-clear-h{min-height:var(--smoothly-button-height, 2.5rem)}.sc-smoothly-input-clear-h:has(>a:empty),.sc-smoothly-input-clear-h:has(>button:empty),.sc-smoothly-input-clear-h>a.sc-smoothly-input-clear:empty,.sc-smoothly-input-clear-h>button.sc-smoothly-input-clear:empty{border-width:0;min-height:0;padding-inline:0}[size=small].sc-smoothly-input-clear-h{--smoothly-button-height:2rem;--smoothly-button-padding-inline:0.75rem;--smoothly-button-font-size:0.875rem;--smoothly-icon-size:1.4rem}[size=large].sc-smoothly-input-clear-h{--smoothly-button-height:3rem;--smoothly-button-padding-inline:1.25rem;--smoothly-button-font-size:1.125rem}.sc-smoothly-input-clear-h:not([size=icon]):not([size=flexible])>button.sc-smoothly-input-clear{min-width:8rem}[size=icon].sc-smoothly-input-clear-h{--smoothly-icon-size:1.4rem}[size=icon].sc-smoothly-input-clear-h>button.sc-smoothly-input-clear{min-height:var(--smoothly-button-height, 2.5rem);min-width:var(--smoothly-button-height, 2.5rem);padding:0}.sc-smoothly-input-clear-h:not([size=icon]){min-width:8em}[size=flexible].sc-smoothly-input-clear-h{min-width:unset;padding:0;margin:0;display:flex;justify-content:center}[size=flexible].sc-smoothly-input-clear-h>button.sc-smoothly-input-clear{min-width:unset;padding:0;margin:0}[expand].sc-smoothly-input-clear-h{width:100%}[expand=full].sc-smoothly-input-clear-h{border-left:none;border-right:none;--smoothly-button-border-radius:0}[fill=outline].sc-smoothly-input-clear-h>button.sc-smoothly-input-clear{background-color:transparent;color:rgb(var(--smoothly-button-foreground));fill:rgb(var(--smoothly-button-foreground));stroke:rgb(var(--smoothly-button-foreground));border-color:rgb(var(--smoothly-button-foreground))}.sc-smoothly-input-clear-h:not([fill=clear]):not([disabled])>button.sc-smoothly-input-clear:hover,.sc-smoothly-input-clear-h:not([disabled])>button.sc-smoothly-input-clear:focus-visible,[fill=outline].sc-smoothly-input-clear-h:not([disabled]):active>button.sc-smoothly-input-clear::before{border-color:rgb(var(--smoothly-button-focus-color))}[fill=outline].sc-smoothly-input-clear-h:not([disabled])>button.sc-smoothly-input-clear:hover::before,[fill=outline].sc-smoothly-input-clear-h:not([disabled])>button.sc-smoothly-input-clear:focus-within::before,[fill=outline].sc-smoothly-input-clear-h:not([disabled])>button.sc-smoothly-input-clear:active::before{content:"";position:absolute;border:2px solid rgb(var(--smoothly-button-focus-border));inset:-1px;border-radius:var(--smoothly-button-border-radius)}.sc-smoothly-input-clear-h:not([fill=clear]):not([fill=outline]):not([disabled])>button.sc-smoothly-input-clear:hover,.sc-smoothly-input-clear-h:not([fill=clear]):not([fill=outline]):not([disabled])>button.sc-smoothly-input-clear:focus-visible,.sc-smoothly-input-clear-h:not([fill=clear]):not([fill=outline]):not([disabled])>button.sc-smoothly-input-clear:active{background:rgb(var(--smoothly-button-hover-background))}.sc-smoothly-input-clear-h>button.sc-smoothly-input-clear,.sc-smoothly-input-clear-h.sc-smoothly-input-clear-s>smoothly-icon,.sc-smoothly-input-clear-h .sc-smoothly-input-clear-s>smoothly-icon{color:rgb(var(--smoothly-button-foreground));stroke:rgb(var(--smoothly-button-foreground));fill:rgb(var(--smoothly-button-foreground))}[hidden].sc-smoothly-input-clear-h{display:none}.sc-smoothly-input-clear-h{display:flex}.sc-smoothly-input-clear-h:not([display]){display:none}.sc-smoothly-input-clear-h[type="input"].sc-smoothly-input-clear-s>smoothly-button>button{cursor:pointer;filter:opacity(60%);--smoothly-button-foreground:var(--smoothly-input-foreground);background-color:transparent}.sc-smoothly-input-clear-h.sc-smoothly-input-clear-s>smoothly-button>button>*+smoothly-icon{display:none}[disabled].sc-smoothly-input-clear-h{cursor:not-allowed}.sc-smoothly-input-clear-h[type="input"]:hover.sc-smoothly-input-clear-s>smoothly-icon,.sc-smoothly-input-clear-h[type="input"]:hover .sc-smoothly-input-clear-s>smoothly-icon{cursor:pointer;filter:opacity(100%)}`;const Ps=class{constructor(o){t(this,o);this.smoothlyInputLoad=e(this,"smoothlyInputLoad");this.fill="clear";this.size="icon";this.display=true;this.type="input";this.tooltip="Clear"}async componentWillLoad(){this.smoothlyInputLoad.emit((t=>{if(Zo.is(t)){this.parent=t;if(Xo.Element.is(t)){t.listen((async t=>{if(ts.is(t)){const e=typeof t.defined=="boolean"?t.defined:Boolean(await t.getValue());this.display=e&&!t.readonly&&!t.disabled}if(t instanceof os){this.display=!t.readonly}}));if(typeof this.disabled!=="boolean"){t.listen((async t=>{if(t instanceof os){this.disabled=t.readonly||Object.values(t.value).filter((t=>t)).length<1}}))}}}}))}clickHandler(){var t;(t=this.parent)===null||t===void 0?void 0:t.clear()}render(){var t;return o(s,{key:"5c6e49461edbf91245aaa2bf66de4550e334919c",title:this.tooltip},o("smoothly-button",{key:"ad7d421bdedceaf36cc14d87602ce960c19f77eb",disabled:this.disabled,size:this.size,type:"button",shape:this.shape,expand:this.expand,color:this.color,fill:(t=this.fill)!==null&&t!==void 0?t:this.type=="input"?"clear":undefined},o("slot",{key:"84cf8946d1d4681dde6c708aac9f791a276fd070"}),o("smoothly-icon",{key:"55a4310a4db96393cc6da853a7cfd974479bfe6c",name:"close",size:"tiny"})))}get element(){return a(this)}};Ps.style=Os();const Hs=()=>`.sc-smoothly-input-color-h{--input-padding-side:.5rem;--input-value-padding-top:1.25rem;--input-value-padding-bottom:.25rem;--input-min-height:3rem;min-height:var(--input-min-height);box-sizing:border-box;border-radius:var(--smoothly-input-border-radius)}[looks="border"].sc-smoothly-input-color-h{border:rgb(var(--smoothly-input-border)) solid 1px}[looks="border"].sc-smoothly-input-color-h:not([readonly]):not([disabled]):focus-within{outline:2px solid rgb(var(--smoothly-input-border-focus))}[looks="border"][readonly].sc-smoothly-input-color-h{border:transparent solid 1px}[looks="line"].sc-smoothly-input-color-h{border-bottom:rgb(var(--smoothly-input-border)) solid 1px;position:relative}[looks="line"][readonly].sc-smoothly-input-color-h{border-bottom:transparent solid 1px}[looks="line"].sc-smoothly-input-color-h:not([readonly]):not([disabled]):focus-within::before{content:"";position:absolute;inset:0;pointer-events:none;border-bottom:2px solid rgb(var(--smoothly-input-border-focus));z-index:10}[looks="grid"].sc-smoothly-input-color-h{flex-grow:1;flex-basis:40%;box-shadow:0px 0px 0px 1px rgb(var(--smoothly-input-border));border:none}[looks="grid"][readonly].sc-smoothly-input-color-h{box-shadow:0px 0px 0px 1px rgba(var(--smoothly-input-border-readonly))}[looks="grid"].sc-smoothly-input-color-h:not([readonly]):not([disabled]):focus-within{position:relative;box-shadow:0px 0px 0px 2px rgb(var(--smoothly-input-border-focus));outline:none;z-index:10}[looks="transparent"].sc-smoothly-input-color-h{border:none}[looks="transparent"][readonly].sc-smoothly-input-color-h,[looks="transparent"].sc-smoothly-input-color-h:not(:focus-within){background-color:transparent}[looks="transparent"][readonly].sc-smoothly-input-color-h>input.sc-smoothly-input-color,[looks="transparent"].sc-smoothly-input-color-h:not(:focus-within)>input.sc-smoothly-input-color{background-color:transparent}[looks="transparent"].sc-smoothly-input-color-h:not([readonly]):focus-within{outline:1px solid rgb(var(--smoothly-input-border))}[disabled].sc-smoothly-input-color-h{cursor:not-allowed;--smoothly-input-foreground:var(--smoothly-input-disabled-foreground);--smoothly-input-background:var(--smoothly-input-disabled-background);--smoothly-input-border:var(--smoothly-input-disabled-border)}.sc-smoothly-input-color-h.sc-smoothly-input-color-s>[slot=label],.sc-smoothly-input-color-h .sc-smoothly-input-color-s>[slot=label],.sc-smoothly-input-color-h .label.sc-smoothly-input-color{position:absolute;top:.6rem;opacity:0.8;user-select:none;cursor:inherit;transform-origin:top left;transition:transform 100ms ease}[right].sc-smoothly-input-color-h .label.sc-smoothly-input-color{transform-origin:top right}.sc-smoothly-input-color-h.floating-label.sc-smoothly-input-color-s>[slot=label],.sc-smoothly-input-color-h.floating-label .sc-smoothly-input-color-s>[slot=label],.sc-smoothly-input-color-h.has-value.sc-smoothly-input-color-s>[slot=label],.sc-smoothly-input-color-h.has-value .sc-smoothly-input-color-s>[slot=label],.sc-smoothly-input-color-h[placeholder].sc-smoothly-input-color-s>[slot=label],.sc-smoothly-input-color-h[placeholder] .sc-smoothly-input-color-s>[slot=label],.sc-smoothly-input-color-h[readonly].sc-smoothly-input-color-s>[slot=label],.sc-smoothly-input-color-h[readonly] .sc-smoothly-input-color-s>[slot=label],.floating-label.sc-smoothly-input-color-h .label.sc-smoothly-input-color,.has-value.sc-smoothly-input-color-h .label.sc-smoothly-input-color,.has-text.sc-smoothly-input-color-h .label.sc-smoothly-input-color,[placeholder].sc-smoothly-input-color-h .label.sc-smoothly-input-color,[readonly].sc-smoothly-input-color-h .label.sc-smoothly-input-color,.sc-smoothly-input-color-h:not([readonly]):focus-within .label.float-on-focus.sc-smoothly-input-color{top:.2rem;transform:scale(0.8)}.sc-smoothly-input-color-h:not([show-label]):not(.show-label) .label.sc-smoothly-input-color{display:none}.sc-smoothly-input-color-h smoothly-icon.smoothly-invalid.sc-smoothly-input-color{fill:rgb(var(--smoothly-input-invalid-icon, var(--smoothly-danger-color)))}.sc-smoothly-input-color-h{display:flex;position:relative;background-color:rgb(var(--smoothly-input-background));align-items:center;justify-content:center}.sc-smoothly-input-color-h>smoothly-input.sc-smoothly-input-color{width:100%;--input-min-height:calc(var(--input-min-height) - 2px);--smoothly-input-border-focus:none}.sc-smoothly-input-color-h div.color-sample.sc-smoothly-input-color{height:2em;width:3em;margin-right:0.5rem;background-color:var(--hexCode);outline:1px solid rgb(var(--smoothly-input-border));border-radius:3px}.sc-smoothly-input-color-h smoothly-icon[name=options-outline].sc-smoothly-input-color{padding-right:var(--input-padding-side)}[readonly].sc-smoothly-input-color-h smoothly-icon[name=options-outline].sc-smoothly-input-color,[disabled].sc-smoothly-input-color-h smoothly-icon[name=options-outline].sc-smoothly-input-color{display:none}.sc-smoothly-input-color-h:not([readonly]):not([disabled]) smoothly-icon[name=options-outline].sc-smoothly-input-color{cursor:pointer}.sc-smoothly-input-color-h>div.rgb-sliders.sc-smoothly-input-color{background-color:rgb(var(--smoothly-input-background));position:absolute;padding:1rem 0 1rem 2.5rem;top:calc(var(--element-height) + .8em);left:0;box-sizing:border-box;z-index:20;border:1px solid rgb(var(--smoothly-input-border))}.sc-smoothly-input-color-h>div.rgb-sliders.sc-smoothly-input-color::before{content:"";transform:translate(2em, -0.55em) rotate(45deg);width:1em;height:1em;background-color:rgb(var(--smoothly-input-background));border-top:1px solid rgb(var(--smoothly-input-border));border-left:1px solid rgb(var(--smoothly-input-border));position:absolute;z-index:100;top:0em}.sc-smoothly-input-color-h>div.rgb-sliders.sc-smoothly-input-color>smoothly-toggle-switch.sc-smoothly-input-color{margin-left:auto;margin-right:1em;margin-bottom:1em}div.rgb-sliders.sc-smoothly-input-color smoothly-input-range.sc-smoothly-input-color{padding:.5em 0}div.rgb-sliders.sc-smoothly-input-color smoothly-input-range.sc-smoothly-input-color label.sc-smoothly-input-color{width:4em}div.rgb-sliders.sc-smoothly-input-color smoothly-input-range.sc-smoothly-input-color>div.sc-smoothly-input-color>input[name=r].sc-smoothly-input-color::-webkit-slider-runnable-track{background:linear-gradient(to left, rgb(255, var(--rgb-g), var(--rgb-b)), rgb(0, var(--rgb-g), var(--rgb-b)))}div.rgb-sliders.sc-smoothly-input-color smoothly-input-range.sc-smoothly-input-color>div.sc-smoothly-input-color>input[name=r].sc-smoothly-input-color::-moz-range-track{background:linear-gradient(to left, rgb(255, var(--rgb-g), var(--rgb-b)), rgb(0, var(--rgb-g), var(--rgb-b)))}div.rgb-sliders.sc-smoothly-input-color smoothly-input-range.sc-smoothly-input-color>div.sc-smoothly-input-color>input[name=r].sc-smoothly-input-color::-moz-range-thumb{background-color:red}div.rgb-sliders.sc-smoothly-input-color smoothly-input-range.sc-smoothly-input-color>div.sc-smoothly-input-color>input[name=r].sc-smoothly-input-color::-webkit-slider-thumb{background-color:red}div.rgb-sliders.sc-smoothly-input-color smoothly-input-range.sc-smoothly-input-color>div.sc-smoothly-input-color>input[name=g].sc-smoothly-input-color::-webkit-slider-runnable-track{background:linear-gradient(to left, rgb(var(--rgb-r), 255, var(--rgb-b)), rgb(var(--rgb-r), 0, var(--rgb-b)))}div.rgb-sliders.sc-smoothly-input-color smoothly-input-range.sc-smoothly-input-color>div.sc-smoothly-input-color>input[name=g].sc-smoothly-input-color::-moz-range-track{background:linear-gradient(to left, rgb(var(--rgb-r), 255, var(--rgb-b)), rgb(var(--rgb-r), 0, var(--rgb-b)))}div.rgb-sliders.sc-smoothly-input-color smoothly-input-range.sc-smoothly-input-color>div.sc-smoothly-input-color>input[name=g].sc-smoothly-input-color::-moz-range-thumb{background-color:green}div.rgb-sliders.sc-smoothly-input-color smoothly-input-range.sc-smoothly-input-color>div.sc-smoothly-input-color>input[name=g].sc-smoothly-input-color::-webkit-slider-thumb{background-color:green}div.rgb-sliders.sc-smoothly-input-color smoothly-input-range.sc-smoothly-input-color>div.sc-smoothly-input-color>input[name=b].sc-smoothly-input-color::-webkit-slider-runnable-track{background:linear-gradient(to left, rgb(var(--rgb-r), var(--rgb-g), 255), rgb(var(--rgb-r), var(--rgb-g), 0))}div.rgb-sliders.sc-smoothly-input-color smoothly-input-range.sc-smoothly-input-color>div.sc-smoothly-input-color>input[name=b].sc-smoothly-input-color::-moz-range-track{background:linear-gradient(to left, rgb(var(--rgb-r), var(--rgb-g), 255), rgb(var(--rgb-r), var(--rgb-g), 0))}div.rgb-sliders.sc-smoothly-input-color smoothly-input-range.sc-smoothly-input-color>div.sc-smoothly-input-color>input[name=b].sc-smoothly-input-color::-moz-range-thumb{background-color:blue}div.rgb-sliders.sc-smoothly-input-color smoothly-input-range.sc-smoothly-input-color>div.sc-smoothly-input-color>input[name=b].sc-smoothly-input-color::-webkit-slider-thumb{background-color:blue}div.rgb-sliders.sc-smoothly-input-color smoothly-input-range.sc-smoothly-input-color>div.sc-smoothly-input-color>input[name=h].sc-smoothly-input-color::-webkit-slider-runnable-track{background:linear-gradient(to right in hsl longer hue, red, red)}div.rgb-sliders.sc-smoothly-input-color smoothly-input-range.sc-smoothly-input-color>div.sc-smoothly-input-color>input[name=h].sc-smoothly-input-color::-moz-range-track{background:linear-gradient(to right in hsl longer hue, red, red)}div.rgb-sliders.sc-smoothly-input-color smoothly-input-range.sc-smoothly-input-color>div.sc-smoothly-input-color>input[name=h].sc-smoothly-input-color::-webkit-slider-thumb{background-color:hsl(var(--hsl-h), 100%, 50%)}div.rgb-sliders.sc-smoothly-input-color smoothly-input-range.sc-smoothly-input-color>div.sc-smoothly-input-color>input[name=h].sc-smoothly-input-color::-moz-range-thumb{background-color:hsl(var(--hsl-h), 100%, 50%)}div.rgb-sliders.sc-smoothly-input-color smoothly-input-range.sc-smoothly-input-color>div.sc-smoothly-input-color>input[name=s].sc-smoothly-input-color::-webkit-slider-runnable-track{background:linear-gradient(to right, hsl(var(--hsl-h), 0%, 50%), hsl(var(--hsl-h), 100%, 50%))}div.rgb-sliders.sc-smoothly-input-color smoothly-input-range.sc-smoothly-input-color>div.sc-smoothly-input-color>input[name=s].sc-smoothly-input-color::-moz-range-track{background:linear-gradient(to right, hsl(var(--hsl-h), 0%, 50%), hsl(var(--hsl-h), 100%, 50%))}div.rgb-sliders.sc-smoothly-input-color smoothly-input-range.sc-smoothly-input-color>div.sc-smoothly-input-color>input[name=s].sc-smoothly-input-color::-moz-range-thumb{background-color:hsl(var(--hsl-h), var(--hsl-s), 50%)}div.rgb-sliders.sc-smoothly-input-color smoothly-input-range.sc-smoothly-input-color>div.sc-smoothly-input-color>input[name=s].sc-smoothly-input-color::-webkit-slider-thumb{background-color:hsl(var(--hsl-h), var(--hsl-s), 50%)}div.rgb-sliders.sc-smoothly-input-color smoothly-input-range.sc-smoothly-input-color>div.sc-smoothly-input-color>input[name=l].sc-smoothly-input-color::-moz-range-track{background:linear-gradient(to right, black, white)}div.rgb-sliders.sc-smoothly-input-color smoothly-input-range.sc-smoothly-input-color>div.sc-smoothly-input-color>input[name=l].sc-smoothly-input-color::-webkit-slider-runnable-track{background:linear-gradient(to right, black, white)}div.rgb-sliders.sc-smoothly-input-color smoothly-input-range.sc-smoothly-input-color>div.sc-smoothly-input-color>input[name=l].sc-smoothly-input-color::-moz-range-thumb{background-color:#777}div.rgb-sliders.sc-smoothly-input-color smoothly-input-range.sc-smoothly-input-color>div.sc-smoothly-input-color>input[name=l].sc-smoothly-input-color::-webkit-slider-thumb{background-color:#777}`;const Fs=class{constructor(o){t(this,o);this.smoothlyInputLooks=e(this,"smoothlyInputLooks");this.smoothlyInput=e(this,"smoothlyInput");this.smoothlyUserInput=e(this,"smoothlyUserInput");this.smoothlyInputLoad=e(this,"smoothlyInputLoad");this.smoothlyFormDisable=e(this,"smoothlyFormDisable");this.isDifferentFromInitial=false;this.observer=Xo.Observer.create(this);this.rgb={r:undefined,g:undefined,b:undefined};this.hsl={h:undefined,s:undefined,l:undefined};this.value=undefined;this.readonly=false;this.output="rgb";this.showLabel=true;this.open=false;this.sliderMode="rgb"}async componentWillLoad(){this.value&&this.setInitialValue();this.value&&(this.rgb=r.Hex.toRGB(this.value));this.smoothlyInputLooks.emit(((t,e)=>{var o;return this.looks=(o=this.looks)!==null&&o!==void 0?o:t,this.color=e}));this.smoothlyInput.emit({[this.name]:await this.getValue()});this.smoothlyInputLoad.emit((t=>this.parent=t));!this.readonly&&this.smoothlyFormDisable.emit((t=>this.readonly=t))}smoothlyInputLooksHandler(t){if(t.target!=this.element){t.stopPropagation()}}smoothlyInputLoadHandler(t){ts.registerSubAction(this,t)}onWindowClick(t){!t.composedPath().includes(this.element)&&this.open&&(this.open=!this.open)}async disconnectedCallback(){if(!this.element.isConnected){await this.unregister()}}nameChange(t,e){ts.formRename(this,e)}watchingReadonly(){this.observer.publish()}async register(){ts.formAdd(this)}async unregister(){ts.formRemove(this)}async getValue(){return this.output==="rgb"?{r:this.rgb.r===undefined?undefined:Math.round(this.rgb.r),g:this.rgb.g===undefined?undefined:Math.round(this.rgb.g),b:this.rgb.b===undefined?undefined:Math.round(this.rgb.b)}:this.value?this.value:undefined}async clear(){this.rgb={r:undefined,g:undefined,b:undefined};this.hsl={h:undefined,s:undefined,l:undefined};this.value=undefined}async listen(t){this.observer.subscribe(t)}async edit(t){this.readonly=!t;this.open=false}async reset(){this.value=this.initialValue;this.open=false}async setInitialValue(){this.initialValue=this.value;this.open=false}async valueChanged(){this.isDifferentFromInitial=this.initialValue!==this.value;this.smoothlyInput.emit({[this.name]:await this.getValue()});this.observer.publish()}handleSwitchMode(t){t.stopPropagation();this.sliderMode=t.detail?"hsl":"rgb";if(this.sliderMode==="rgb"){this.value&&(this.rgb=r.Hex.toRGB(this.value))}else{this.value&&(this.hsl=r.RGB.toHSL(r.Hex.toRGB(this.value)))}}async hexInputHandler(t){if(t!==this.value){if(t&&r.Hex.type.is(t)){if(this.sliderMode==="hsl"||this.rgb.r===undefined){this.rgb=r.Hex.toRGB(t)}if(this.sliderMode==="rgb"||this.hsl.h===undefined){this.hsl=r.RGB.toHSL(r.Hex.toRGB(t))}}else if(!t||!r.Hex.type.is(t)){this.rgb={r:undefined,g:undefined,b:undefined};this.hsl={h:undefined,s:undefined,l:undefined}}this.value=t;this.smoothlyUserInput.emit({name:this.name,value:await this.getValue()})}}sliderInputHandler(t){var e;t.stopPropagation();const o=Object.keys(t.detail)[0];let s=this.sliderMode==="rgb"?this.rgb:this.hsl;if(!(t.detail[o]===undefined)){for(const a of Object.keys(s)){if(a===o){s=Object.assign(Object.assign({},s),{[a]:a==="s"||a==="l"?+((e=t.detail[o])!==null&&e!==void 0?e:0)*100:t.detail[o]})}else if(s[a]===undefined){s=Object.assign(Object.assign({},s),{[a]:0})}}if(this.sliderMode==="rgb"){this.rgb=Object.assign({},s);this.hsl=r.RGB.toHSL(this.rgb);this.hexInputHandler(r.RGB.toHex(this.rgb))}else{this.hsl=Object.assign({},s);this.rgb=r.HSL.toRGB(this.hsl);this.hexInputHandler(r.RGB.toHex(r.HSL.toRGB(this.hsl)))}}}openDropdown(){this.open=!this.open}render(){var t,e,a,i,l,n;return o(s,{key:"4db4d9329eaee9cad54871a66e4ea406e04a5b92",style:{"--hexCode":this.value,"--rgb-r":`${Math.round((t=this.rgb.r)!==null&&t!==void 0?t:0)}`,"--rgb-g":`${Math.round((e=this.rgb.g)!==null&&e!==void 0?e:0)}`,"--rgb-b":`${Math.round((a=this.rgb.b)!==null&&a!==void 0?a:0)}`,"--hsl-h":`${Math.round((i=this.hsl.h)!==null&&i!==void 0?i:0)}`,"--hsl-s":`${Math.round((l=this.hsl.s)!==null&&l!==void 0?l:0)}%`,"--hsl-l":`${Math.round((n=this.hsl.l)!==null&&n!==void 0?n:0)}%`,"--element-height":`${this.element.clientHeight}px`}},o("smoothly-input",{key:"d3fe0aeedcd45bacc1d38e75d7d5e97be3992a34",value:this.value,color:this.color,looks:undefined,name:this.name,type:"hex-color",readonly:this.readonly,disabled:this.disabled,showLabel:this.showLabel,onSmoothlyInput:t=>(t===null||t===void 0?void 0:t.stopPropagation(),this.hexInputHandler(t.detail[this.name]))},o("slot",{key:"77f78c79097fc43d15b453044170290e25c1bfc2"})),o("div",{key:"f8c144c3cfdc9ef249c941f492b009030eb97dda",class:"color-sample"}),o("smoothly-icon",{key:"8d29d95ef7cbc08cdf429088e9f005a02544ecad",color:this.color,name:"options-outline",size:"small",onClick:()=>!this.readonly&&!this.disabled&&this.openDropdown()}),o("div",{key:"8efce2fd4ca6fbde9968bddd60b54cb6e097091e"},o("slot",{key:"fd99776b1a150dd549d69e013124308ab6d2f16f",name:"end"})),this.open&&!this.readonly&&!this.disabled&&o("div",{key:"67b8c3fb973292a65257eedb64ac7a01044843d2",class:"rgb-sliders"},o("smoothly-toggle-switch",{key:"f576c2ce5b277209b94c8560e559299c715ea1e1",title:`${this.sliderMode==="rgb"?"To HSL":"To RGB"}`,onSmoothlyToggleSwitchChange:t=>this.handleSwitchMode(t),size:"tiny",checkmark:false,selected:this.sliderMode==="hsl"}),Object.entries(this.rgb).map((([t,e])=>o("smoothly-input-range",{style:this.sliderMode!="rgb"?{display:"none"}:{},name:t,min:0,max:255,color:undefined,type:"text",value:e,step:1,outputSide:"right",onSmoothlyInput:t=>this.sliderInputHandler(t),onSmoothlyUserInput:t=>t.stopPropagation(),label:t.toUpperCase()}))),Object.entries(this.hsl).map((([t,e])=>o("smoothly-input-range",{style:this.sliderMode!="hsl"?{display:"none"}:{},name:t,min:0,max:t==="h"?359:1,color:undefined,type:t==="s"||t==="l"?"percent":"text",value:(t==="s"||t==="l")&&e?e/100:e,step:t==="s"||t==="l"?.01:1,outputSide:"right",onSmoothlyInput:t=>this.sliderInputHandler(t),onSmoothlyUserInput:t=>t.stopPropagation(),label:t.toUpperCase()})))))}get element(){return a(this)}static get watchers(){return{name:[{nameChange:0}],disabled:[{watchingReadonly:0}],readonly:[{watchingReadonly:0}],value:[{valueChanged:0}]}}};Fs.style=Hs();const Us=class{constructor(e){t(this,e)}render(){return o(s,{key:"9ad04e1aa481ec3ad05d6487a25ab69202d2a8bf"},o("h2",{key:"cc47b241d3bb3e43752a3b0ec2e72144b2955bfa"},"Color"),o("smoothly-input-color",{key:"db081098c0eb29a73c9a708df96b48fd77425796",name:"color"},"Choose color"))}};Us.style=`style.css`;const Ns=()=>`.sc-smoothly-input-date-h{--input-padding-side:.5rem;--input-value-padding-top:1.25rem;--input-value-padding-bottom:.25rem;--input-min-height:3rem;min-height:var(--input-min-height);box-sizing:border-box;border-radius:var(--smoothly-input-border-radius)}[looks="border"].sc-smoothly-input-date-h{border:rgb(var(--smoothly-input-border)) solid 1px}[looks="border"].sc-smoothly-input-date-h:not([readonly]):not([disabled]):focus-within{outline:2px solid rgb(var(--smoothly-input-border-focus))}[looks="border"][readonly].sc-smoothly-input-date-h{border:transparent solid 1px}[looks="line"].sc-smoothly-input-date-h{border-bottom:rgb(var(--smoothly-input-border)) solid 1px;position:relative}[looks="line"][readonly].sc-smoothly-input-date-h{border-bottom:transparent solid 1px}[looks="line"].sc-smoothly-input-date-h:not([readonly]):not([disabled]):focus-within::before{content:"";position:absolute;inset:0;pointer-events:none;border-bottom:2px solid rgb(var(--smoothly-input-border-focus));z-index:10}[looks="grid"].sc-smoothly-input-date-h{flex-grow:1;flex-basis:40%;box-shadow:0px 0px 0px 1px rgb(var(--smoothly-input-border));border:none}[looks="grid"][readonly].sc-smoothly-input-date-h{box-shadow:0px 0px 0px 1px rgba(var(--smoothly-input-border-readonly))}[looks="grid"].sc-smoothly-input-date-h:not([readonly]):not([disabled]):focus-within{position:relative;box-shadow:0px 0px 0px 2px rgb(var(--smoothly-input-border-focus));outline:none;z-index:10}[looks="transparent"].sc-smoothly-input-date-h{border:none}[looks="transparent"][readonly].sc-smoothly-input-date-h,[looks="transparent"].sc-smoothly-input-date-h:not(:focus-within){background-color:transparent}[looks="transparent"][readonly].sc-smoothly-input-date-h>input.sc-smoothly-input-date,[looks="transparent"].sc-smoothly-input-date-h:not(:focus-within)>input.sc-smoothly-input-date{background-color:transparent}[looks="transparent"].sc-smoothly-input-date-h:not([readonly]):focus-within{outline:1px solid rgb(var(--smoothly-input-border))}[disabled].sc-smoothly-input-date-h{cursor:not-allowed;--smoothly-input-foreground:var(--smoothly-input-disabled-foreground);--smoothly-input-background:var(--smoothly-input-disabled-background);--smoothly-input-border:var(--smoothly-input-disabled-border)}.sc-smoothly-input-date-h.sc-smoothly-input-date-s>[slot=label],.sc-smoothly-input-date-h .sc-smoothly-input-date-s>[slot=label],.sc-smoothly-input-date-h .label.sc-smoothly-input-date{position:absolute;top:.6rem;opacity:0.8;user-select:none;cursor:inherit;transform-origin:top left;transition:transform 100ms ease}[right].sc-smoothly-input-date-h .label.sc-smoothly-input-date{transform-origin:top right}.sc-smoothly-input-date-h.floating-label.sc-smoothly-input-date-s>[slot=label],.sc-smoothly-input-date-h.floating-label .sc-smoothly-input-date-s>[slot=label],.sc-smoothly-input-date-h.has-value.sc-smoothly-input-date-s>[slot=label],.sc-smoothly-input-date-h.has-value .sc-smoothly-input-date-s>[slot=label],.sc-smoothly-input-date-h[placeholder].sc-smoothly-input-date-s>[slot=label],.sc-smoothly-input-date-h[placeholder] .sc-smoothly-input-date-s>[slot=label],.sc-smoothly-input-date-h[readonly].sc-smoothly-input-date-s>[slot=label],.sc-smoothly-input-date-h[readonly] .sc-smoothly-input-date-s>[slot=label],.floating-label.sc-smoothly-input-date-h .label.sc-smoothly-input-date,.has-value.sc-smoothly-input-date-h .label.sc-smoothly-input-date,.has-text.sc-smoothly-input-date-h .label.sc-smoothly-input-date,[placeholder].sc-smoothly-input-date-h .label.sc-smoothly-input-date,[readonly].sc-smoothly-input-date-h .label.sc-smoothly-input-date,.sc-smoothly-input-date-h:not([readonly]):focus-within .label.float-on-focus.sc-smoothly-input-date{top:.2rem;transform:scale(0.8)}.sc-smoothly-input-date-h:not([show-label]):not(.show-label) .label.sc-smoothly-input-date{display:none}.sc-smoothly-input-date-h smoothly-icon.smoothly-invalid.sc-smoothly-input-date{fill:rgb(var(--smoothly-input-invalid-icon, var(--smoothly-danger-color)))}.sc-smoothly-input-date-h{display:flex;position:relative;max-width:100vw;background-color:rgb(var(--smoothly-input-background));box-sizing:border-box;min-height:var(--input-min-height)}.sc-smoothly-input-date-h .smoothly-date-placeholder.sc-smoothly-input-date{display:none}.sc-smoothly-input-date-h:not([always-show-guide]):not(:focus-within):not(.has-text) .smoothly-date-placeholder.sc-smoothly-input-date{opacity:0.5;display:block}.sc-smoothly-input-date-h:not([always-show-guide]):not(:focus-within):not(.has-text) smoothly-date-text.sc-smoothly-input-date{visibility:hidden}.sc-smoothly-input-date-h>.label.sc-smoothly-input-date{left:var(--input-padding-side)}[show-label].sc-smoothly-input-date-h>.smoothly-date-placeholder.sc-smoothly-input-date,[show-label].sc-smoothly-input-date-h>smoothly-date-text.sc-smoothly-input-date{margin-inline:var(--input-padding-side);margin-block:var(--input-value-padding-top) var(--input-value-padding-bottom)}.sc-smoothly-input-date-h:not([show-label])>.smoothly-date-placeholder.sc-smoothly-input-date,.sc-smoothly-input-date-h:not([show-label])>smoothly-date-text.sc-smoothly-input-date{margin-inline:var(--input-padding-side) auto;margin-block:auto}.sc-smoothly-input-date-h:not([readonly]){cursor:pointer}[disabled].sc-smoothly-input-date-h{cursor:not-allowed}.sc-smoothly-input-date-h>smoothly-calendar.sc-smoothly-input-date{position:absolute;z-index:20;top:4rem;background-color:rgb(var(--smoothly-input-background));min-width:18rem;max-width:22rem}.sc-smoothly-input-date-h>smoothly-calendar.sc-smoothly-input-date::before{content:"";position:absolute;left:2rem;top:-0.55rem;z-index:9;transform:rotate(45deg);width:1rem;height:1rem;background-color:rgb(var(--smoothly-input-background));border-top:1px solid rgb(var(--smoothly-input-border));border-left:1px solid rgb(var(--smoothly-input-border))}.sc-smoothly-input-date-h>.smoothly-icons.sc-smoothly-input-date{display:flex;flex-direction:row;align-items:center;margin-left:auto}.sc-smoothly-input-date-h>.smoothly-icons.sc-smoothly-input-date>.smoothly-invalid.sc-smoothly-input-date{display:none;padding:0.5rem}[invalid].sc-smoothly-input-date-h>.smoothly-icons.sc-smoothly-input-date>.smoothly-invalid.sc-smoothly-input-date{display:flex}`;const Ys=class{constructor(o){t(this,o);this.smoothlyInputLoad=e(this,"smoothlyInputLoad");this.smoothlyValueChange=e(this,"smoothlyValueChange");this.smoothlyInput=e(this,"smoothlyInput");this.smoothlyUserInput=e(this,"smoothlyUserInput");this.smoothlyInputLooks=e(this,"smoothlyInputLooks");this.smoothlyFormDisable=e(this,"smoothlyFormDisable");this.readonly=false;this.invalid=false;this.alwaysShowGuide=false;this.changed=false;this.isDifferentFromInitial=false;this.hasFocus=false;this.observer=Xo.Observer.create(this);this.showLabel=true;this.hasText=false}componentWillLoad(){this.setInitialValue();this.smoothlyInputLooks.emit(((t,e)=>{var o;return this.looks=(o=this.looks)!==null&&o!==void 0?o:t,!this.color&&(this.color=e)}));this.smoothlyInputLoad.emit((t=>this.parent=t));!this.readonly&&this.smoothlyFormDisable.emit((t=>this.readonly=t));this.observer.publish()}async disconnectedCallback(){if(!this.element.isConnected){await this.unregister()}}nameChange(t,e){ts.formRename(this,e)}async register(){ts.formAdd(this)}async unregister(){ts.formRemove(this)}async getValue(){return this.value}async listen(t){this.observer.subscribe(t)}async clear(){this.value=undefined}onValueChange(t){var e;if(!this.hasFocus){(e=this.dateTextElement)===null||e===void 0?void 0:e.setValue(t)}this.isDifferentFromInitial=this.initialValue!=this.value;this.smoothlyValueChange.emit(t);this.smoothlyInput.emit({[this.name]:t});this.observer.publish()}watchingReadonly(){this.observer.publish()}smoothlyInputHandler(t){if(t.target!=this.element){t.stopPropagation()}}smoothlyInputLooksHandler(t){if(t.target!=this.element){t.stopPropagation()}}smoothlyInputLoadHandler(t){ts.registerSubAction(this,t)}onWindowClick(t){!t.composedPath().includes(this.element)&&this.open&&(this.open=!this.open)}onClick(t){var e;const o=!!this.dateTextElement&&t.composedPath().includes(this.dateTextElement);const s=!!this.calendarElement&&t.composedPath().includes(this.calendarElement);const a=!!this.iconsElement&&t.composedPath().includes(this.iconsElement);if(!this.readonly&&!this.disabled&&!o&&!s&&!a){(e=this.dateTextElement)===null||e===void 0?void 0:e.select()}if(!this.readonly&&!this.disabled&&!s&&!a){this.open=!this.open||o}}onUserChangedValue(t){var e;t.stopPropagation();const o=(e=t.detail)!==null&&e!==void 0?e:undefined;if(this.value!=o){this.value=o;this.smoothlyUserInput.emit({name:this.name,value:this.value})}}async edit(t){this.readonly=!t}async reset(){this.value=this.initialValue}async setInitialValue(){this.initialValue=this.value;this.isDifferentFromInitial=false}dateSetHandler(t){this.open=false;t.stopPropagation()}render(){return o(s,{key:"23eb18ee49132c7fa6bb48a457212e95b3297499",tabindex:this.disabled?undefined:0,class:{"has-value":!!this.value,"has-text":this.hasText,"floating-label":this.alwaysShowGuide},onClick:t=>this.onClick(t)},o("slot",{key:"92c0fc2f3bdba5377ffee8289cba726125541997",name:"start"}),o("label",{key:"cd6a68025235ba18a254dd1a7e7bdb722f5c24ec",class:"label float-on-focus"},o("slot",{key:"c2d23b15c470fe987088c41abc9fb3af2fb5c7f4"})),this.placeholder&&o("span",{key:"530b2676fc554e1cf1efce7f1553897fdf405767",class:"smoothly-date-placeholder"},this.placeholder),o("smoothly-date-text",{key:"8d4fa83adba95afedc7adebbf88582801141b8ca",ref:t=>this.dateTextElement=t,locale:this.locale,readonly:this.readonly,disabled:this.disabled,showLabel:this.showLabel,value:this.value,onSmoothlyDateTextHasText:t=>(t.stopPropagation(),this.hasText=t.detail),onSmoothlyDateTextFocusChange:t=>(t.stopPropagation(),this.hasFocus=t.detail),onSmoothlyDateHasPartialDate:t=>{var e;return t.stopPropagation(),(e=this.calendarElement)===null||e===void 0?void 0:e.jumpTo(t.detail)},onSmoothlyDateTextChange:t=>(t.stopPropagation(),this.onUserChangedValue(t)),onSmoothlyDateTextDone:t=>{var e;return t.stopPropagation(),this.open=false,(e=this.dateTextElement)===null||e===void 0?void 0:e.deselect()}}),o("span",{key:"697c0a69230175703f5be27b2ffe5608424e3c6e",class:"smoothly-icons",ref:t=>this.iconsElement=t},o("smoothly-icon",{key:"1d33bc9911d8bfe7e955bed1be025da988c34897",class:"smoothly-invalid",name:"alert-circle",size:"small",tooltip:this.errorMessage}),o("slot",{key:"c0a3906ace69bd3a6c41c39a3538a811554673bc",name:"end"})),this.open&&!this.readonly&&o("smoothly-calendar",{key:"19d3e81a19c37a7d50ee31b1a27b1762a32de2ee",ref:t=>this.calendarElement=t,doubleInput:false,value:this.value,onSmoothlyDateSet:t=>(t.stopPropagation(),this.onUserChangedValue(t)),max:this.max,min:this.min},o("div",{key:"960b3b1b2fb3928d6f71d6d7f3456b6d86c537f2",slot:"year-label"},o("slot",{key:"1ba7fa33c27fbc2310f6fbb6094f1fac3901ca0f",name:"year-label"})),o("div",{key:"b129672d85ce661203e6a0746a0778437a4ea857",slot:"month-label"},o("slot",{key:"8c19839eb59e587650b40715722ee8ce12fb26a7",name:"month-label"}))))}get element(){return a(this)}static get watchers(){return{name:[{nameChange:0}],value:[{onValueChange:0}],disabled:[{watchingReadonly:0}],readonly:[{watchingReadonly:0}]}}};Ys.style=Ns();const Ws=()=>`.sc-smoothly-input-date-demo-h{display:grid;grid-template-columns:repeat(auto-fit, minmax(20rem, 1fr));max-width:min(42rem, 100%);margin:auto;flex-direction:column;gap:0.5rem}.sc-smoothly-input-date-demo-h .sc-smoothly-input-date-demo:not(smoothly-input-date):not(smoothly-input-date-range){grid-column:1 / -1}`;const Bs=class{constructor(e){t(this,e);this.alwaysShowGuide=false}render(){return o(s,{key:"9602907d9ae0152643b48455bdd21da2a8a91a50"},o("div",{key:"2e9244031f62cb552fff12fd107050c42065bc1d"},o("h2",{key:"26b155267a35157e779724e7b805496aa01d61e5"},"Date input"),o("p",{key:"b2f4a4d204e681869e2a3067b4f08bfd53700077"},"Different locales formatting the same date"),o("smoothly-button",{key:"2e8e18bc20722b720f6f26b5c720cf31c6ba236b",color:"primary",onClick:()=>this.date=this.date?C.Date.next(this.date):C.Date.now()},"Set date"),o("smoothly-input-checkbox",{key:"13101795d8056cad4581762357226c669181f56b",looks:"transparent",onSmoothlyUserInput:t=>{this.alwaysShowGuide=t.detail.value;console.log(this.alwaysShowGuide)}},"Always Show Guide")),["en-US","en-GB","de-DE","se-SE"].map((t=>o(i,null,o("smoothly-input-date",{locale:t,name:t,looks:"border",value:this.date,alwaysShowGuide:this.alwaysShowGuide},t,o("smoothly-input-clear",{slot:"end"})),o("smoothly-input-date-range",{locale:t,name:t+"-range",looks:"border",start:this.date,end:this.date?C.Date.next(this.date):undefined,alwaysShowGuide:this.alwaysShowGuide},t," Range",o("smoothly-input-clear",{slot:"end"}))))))}};Bs.style=Ws();const Vs=()=>`.sc-smoothly-input-date-range-h{--input-padding-side:.5rem;--input-value-padding-top:1.25rem;--input-value-padding-bottom:.25rem;--input-min-height:3rem;min-height:var(--input-min-height);box-sizing:border-box;border-radius:var(--smoothly-input-border-radius)}[looks="border"].sc-smoothly-input-date-range-h{border:rgb(var(--smoothly-input-border)) solid 1px}[looks="border"].sc-smoothly-input-date-range-h:not([readonly]):not([disabled]):focus-within{outline:2px solid rgb(var(--smoothly-input-border-focus))}[looks="border"][readonly].sc-smoothly-input-date-range-h{border:transparent solid 1px}[looks="line"].sc-smoothly-input-date-range-h{border-bottom:rgb(var(--smoothly-input-border)) solid 1px;position:relative}[looks="line"][readonly].sc-smoothly-input-date-range-h{border-bottom:transparent solid 1px}[looks="line"].sc-smoothly-input-date-range-h:not([readonly]):not([disabled]):focus-within::before{content:"";position:absolute;inset:0;pointer-events:none;border-bottom:2px solid rgb(var(--smoothly-input-border-focus));z-index:10}[looks="grid"].sc-smoothly-input-date-range-h{flex-grow:1;flex-basis:40%;box-shadow:0px 0px 0px 1px rgb(var(--smoothly-input-border));border:none}[looks="grid"][readonly].sc-smoothly-input-date-range-h{box-shadow:0px 0px 0px 1px rgba(var(--smoothly-input-border-readonly))}[looks="grid"].sc-smoothly-input-date-range-h:not([readonly]):not([disabled]):focus-within{position:relative;box-shadow:0px 0px 0px 2px rgb(var(--smoothly-input-border-focus));outline:none;z-index:10}[looks="transparent"].sc-smoothly-input-date-range-h{border:none}[looks="transparent"][readonly].sc-smoothly-input-date-range-h,[looks="transparent"].sc-smoothly-input-date-range-h:not(:focus-within){background-color:transparent}[looks="transparent"][readonly].sc-smoothly-input-date-range-h>input.sc-smoothly-input-date-range,[looks="transparent"].sc-smoothly-input-date-range-h:not(:focus-within)>input.sc-smoothly-input-date-range{background-color:transparent}[looks="transparent"].sc-smoothly-input-date-range-h:not([readonly]):focus-within{outline:1px solid rgb(var(--smoothly-input-border))}[disabled].sc-smoothly-input-date-range-h{cursor:not-allowed;--smoothly-input-foreground:var(--smoothly-input-disabled-foreground);--smoothly-input-background:var(--smoothly-input-disabled-background);--smoothly-input-border:var(--smoothly-input-disabled-border)}.sc-smoothly-input-date-range-h.sc-smoothly-input-date-range-s>[slot=label],.sc-smoothly-input-date-range-h .sc-smoothly-input-date-range-s>[slot=label],.sc-smoothly-input-date-range-h .label.sc-smoothly-input-date-range{position:absolute;top:.6rem;opacity:0.8;user-select:none;cursor:inherit;transform-origin:top left;transition:transform 100ms ease}[right].sc-smoothly-input-date-range-h .label.sc-smoothly-input-date-range{transform-origin:top right}.sc-smoothly-input-date-range-h.floating-label.sc-smoothly-input-date-range-s>[slot=label],.sc-smoothly-input-date-range-h.floating-label .sc-smoothly-input-date-range-s>[slot=label],.sc-smoothly-input-date-range-h.has-value.sc-smoothly-input-date-range-s>[slot=label],.sc-smoothly-input-date-range-h.has-value .sc-smoothly-input-date-range-s>[slot=label],.sc-smoothly-input-date-range-h[placeholder].sc-smoothly-input-date-range-s>[slot=label],.sc-smoothly-input-date-range-h[placeholder] .sc-smoothly-input-date-range-s>[slot=label],.sc-smoothly-input-date-range-h[readonly].sc-smoothly-input-date-range-s>[slot=label],.sc-smoothly-input-date-range-h[readonly] .sc-smoothly-input-date-range-s>[slot=label],.floating-label.sc-smoothly-input-date-range-h .label.sc-smoothly-input-date-range,.has-value.sc-smoothly-input-date-range-h .label.sc-smoothly-input-date-range,.has-text.sc-smoothly-input-date-range-h .label.sc-smoothly-input-date-range,[placeholder].sc-smoothly-input-date-range-h .label.sc-smoothly-input-date-range,[readonly].sc-smoothly-input-date-range-h .label.sc-smoothly-input-date-range,.sc-smoothly-input-date-range-h:not([readonly]):focus-within .label.float-on-focus.sc-smoothly-input-date-range{top:.2rem;transform:scale(0.8)}.sc-smoothly-input-date-range-h:not([show-label]):not(.show-label) .label.sc-smoothly-input-date-range{display:none}.sc-smoothly-input-date-range-h smoothly-icon.smoothly-invalid.sc-smoothly-input-date-range{fill:rgb(var(--smoothly-input-invalid-icon, var(--smoothly-danger-color)))}.sc-smoothly-input-date-range-h{position:relative;display:flex;background-color:rgb(var(--smoothly-input-background))}.sc-smoothly-input-date-range-h [slot=start].sc-smoothly-input-date-range{align-self:center}.sc-smoothly-input-date-range-h .label.sc-smoothly-input-date-range{left:var(--input-padding-side)}.sc-smoothly-input-date-range-h .smoothly-date-range-separator.sc-smoothly-input-date-range{white-space:pre}.sc-smoothly-input-date-range-h .smoothly-date-range-placeholder.sc-smoothly-input-date-range{margin-inline:var(--input-padding-side);display:none}.sc-smoothly-input-date-range-h:not([always-show-guide]):not(:focus-within):not(.has-text) .smoothly-date-range-placeholder.sc-smoothly-input-date-range{display:block;opacity:0.5}.sc-smoothly-input-date-range-h:not([always-show-guide]):not(:focus-within):not(.has-text) smoothly-date-text.sc-smoothly-input-date-range,.sc-smoothly-input-date-range-h:not([always-show-guide]):not(:focus-within):not(.has-text) .smoothly-date-range-separator.sc-smoothly-input-date-range{visibility:hidden}.sc-smoothly-input-date-range-h smoothly-date-text.start-date-text.sc-smoothly-input-date-range{margin-inline:var(--input-padding-side) 0}.sc-smoothly-input-date-range-h smoothly-date-text.end-date-text.sc-smoothly-input-date-range{margin-inline:0 var(--input-padding-side)}[show-label].sc-smoothly-input-date-range-h .smoothly-date-range-placeholder.sc-smoothly-input-date-range,[show-label].sc-smoothly-input-date-range-h smoothly-date-text.sc-smoothly-input-date-range,[show-label].sc-smoothly-input-date-range-h .smoothly-date-range-separator.sc-smoothly-input-date-range{margin-block:var(--input-value-padding-top) var(--input-value-padding-bottom)}.sc-smoothly-input-date-range-h:not([show-label]) .smoothly-date-range-placeholder.sc-smoothly-input-date-range,.sc-smoothly-input-date-range-h:not([show-label]) smoothly-date-text.sc-smoothly-input-date-range,.sc-smoothly-input-date-range-h:not([show-label]) .smoothly-date-range-separator.sc-smoothly-input-date-range{margin-block:auto}.sc-smoothly-input-date-range-h:not([readonly]){cursor:pointer}[disabled].sc-smoothly-input-date-range-h{cursor:not-allowed}.sc-smoothly-input-date-range-h>smoothly-calendar.sc-smoothly-input-date-range{position:absolute;z-index:20;top:4rem;background-color:rgb(var(--smoothly-input-background));max-width:22rem;min-width:18rem}.sc-smoothly-input-date-range-h>smoothly-calendar.sc-smoothly-input-date-range::before{content:"";position:absolute;top:-0.55rem;left:3rem;z-index:9;transform:rotate(45deg);width:1rem;height:1rem;background-color:rgb(var(--smoothly-input-background));border-top:1px solid rgb(var(--smoothly-input-border));border-left:1px solid rgb(var(--smoothly-input-border))}.sc-smoothly-input-date-range-h>.smoothly-date-range-input-part.sc-smoothly-input-date-range{display:flex;width:100%;background-color:var(--smoothly-input-background);border-radius:0.25rem;cursor:pointer}.sc-smoothly-input-date-range-h>span.smoothly-icons.sc-smoothly-input-date-range{display:flex;flex-direction:row;align-items:center}.sc-smoothly-input-date-range-h>.smoothly-icons.sc-smoothly-input-date-range>.smoothly-invalid.sc-smoothly-input-date-range{display:none;padding:0.5rem}[invalid].sc-smoothly-input-date-range-h>.smoothly-icons.sc-smoothly-input-date-range>.smoothly-invalid.sc-smoothly-input-date-range{display:flex}`;const Gs=class{constructor(o){t(this,o);this.smoothlyInput=e(this,"smoothlyInput");this.smoothlyUserInput=e(this,"smoothlyUserInput");this.smoothlyInputLoad=e(this,"smoothlyInputLoad");this.smoothlyInputLooks=e(this,"smoothlyInputLooks");this.smoothlyFormDisable=e(this,"smoothlyFormDisable");this.name="dateRange";this.readonly=false;this.showLabel=true;this.alwaysShowGuide=false;this.invalid=false;this.isDifferentFromInitial=false;this.hasFocus=false;this.observer=Xo.Observer.create(this);this.startHasText=false;this.endHasText=false}async componentWillLoad(){this.setInitialValue();this.smoothlyInputLooks.emit(((t,e)=>{var o;return this.looks=(o=this.looks)!==null&&o!==void 0?o:t,!this.color&&(this.color=e)}));this.smoothlyInputLoad.emit((t=>this.parent=t));this.smoothlyInput.emit({[this.name]:await this.getValue()});!this.readonly&&this.smoothlyFormDisable.emit((t=>this.readonly=t));this.observer.publish()}startChanged(t,e){this.updateValue(e,this.end)}endChanged(t,e){this.updateValue(this.start,e)}async updateValue(t,e){var o,s;if(t!=this.start||e!=this.end){this.isDifferentFromInitial=this.initialStart!=this.start||this.initialEnd!=this.end;this.smoothlyInput.emit({[this.name]:await this.getValue()});this.observer.publish()}if(!this.hasFocus){(o=this.startTextElement)===null||o===void 0?void 0:o.setValue(this.start);(s=this.endTextElement)===null||s===void 0?void 0:s.setValue(this.end)}}watchingReadonly(){this.observer.publish()}smoothlyInputLoadHandler(t){ts.registerSubAction(this,t)}smoothlyInputLooksHandler(t){if(t.target!=this.element){t.stopPropagation()}}onWindowClick(t){!t.composedPath().includes(this.element)&&this.open&&(this.open=!this.open)}onClick(t){var e,o;const s=!!this.startTextElement&&t.composedPath().includes(this.startTextElement);const a=!!this.endTextElement&&t.composedPath().includes(this.endTextElement);const i=s||a;if(!i&&!this.readonly&&!this.disabled){this.start&&!this.end?(e=this.endTextElement)===null||e===void 0?void 0:e.select():(o=this.startTextElement)===null||o===void 0?void 0:o.select()}if(!this.readonly&&!this.disabled){this.open=!this.open||i}}async onSmoothlyDateTextChange(t,e){var o,s,a;t.stopPropagation();const i=(o=t.detail)!==null&&o!==void 0?o:undefined;const l=e=="start"?i:this.start;const n=e=="end"?i:this.end;if(C.Date.is(l)&&C.Date.is(n)&&l>n){this.start=n;this.end=l;(s=this.startTextElement)===null||s===void 0?void 0:s.setValue(this.start);(a=this.endTextElement)===null||a===void 0?void 0:a.setValue(this.end);this.smoothlyUserInput.emit({name:this.name,value:await this.getValue()})}else if(this[e]!=i){this[e]=i;this.smoothlyUserInput.emit({name:this.name,value:await this.getValue()})}}async disconnectedCallback(){if(!this.element.isConnected){await this.unregister()}}nameChange(t,e){ts.formRename(this,e)}async register(){ts.formAdd(this)}async unregister(){ts.formRemove(this)}async getValue(){return this.start||this.end?{start:this.start,end:this.end}:undefined}async listen(t){this.observer.subscribe(t)}async edit(t){this.readonly=!t}async reset(){this.start=this.initialStart;this.end=this.initialEnd}async setInitialValue(){this.initialStart=this.start;this.initialEnd=this.end;this.isDifferentFromInitial=false}async clear(){this.start=undefined;this.end=undefined;this.smoothlyInput.emit({[this.name]:undefined})}render(){return o(s,{key:"8d1cc0bf552d9366cd676ca4d28ba9131b762985",tabindex:this.disabled?undefined:0,class:{"has-value":!!(this.start||this.end),"has-text":!!(this.startHasText||this.endHasText),"floating-label":this.alwaysShowGuide}},o("span",{key:"ea5b162b919565e8ab3ba6d5c7420fad8d7bbfbd",class:"smoothly-date-range-input-part",onClick:t=>this.onClick(t)},o("slot",{key:"ea6a109b34aefa2256aa1b82972dbbc5fef55897",name:"start"}),o("label",{key:"b9b7f869df370e0f6e882b95babbe5c8f54ea324",class:"label float-on-focus"},o("slot",{key:"1aa509d8a9438fa7151d4d50c62e9e07c981c58c"})),this.placeholder&&o("span",{key:"ece35a37734177645133e14582ae692565c8a0a6",class:"smoothly-date-range-placeholder"},this.placeholder),o("smoothly-date-text",{key:"b840c7a75cf6aa6a73bac8aef415d709e533a7f4",ref:t=>this.startTextElement=t,class:"start-date-text",locale:this.locale,onSmoothlyDateTextHasText:t=>(t.stopPropagation(),this.startHasText=t.detail),onSmoothlyDateTextFocusChange:t=>(t.stopPropagation(),this.hasFocus=t.detail),onSmoothlyDateHasPartialDate:t=>{var e;return t.stopPropagation(),(e=this.calendarElement)===null||e===void 0?void 0:e.jumpTo(t.detail)},onSmoothlyDateTextChange:t=>(t.stopPropagation(),this.onSmoothlyDateTextChange(t,"start")),onSmoothlyDateTextNext:t=>{var e;return t.stopPropagation(),(e=this.endTextElement)===null||e===void 0?void 0:e.select()},onSmoothlyDateTextDone:t=>{var e,o;return t.stopPropagation(),this.end?((e=this.startTextElement)===null||e===void 0?void 0:e.deselect(),this.open=false):(o=this.endTextElement)===null||o===void 0?void 0:o.select()},value:this.start,readonly:this.readonly,disabled:this.disabled,showLabel:this.showLabel}),o("span",{key:"f17bfad7cd7aca649b05cc75f3062a28fcf0cd5f",class:"smoothly-date-range-separator"}," – "),o("smoothly-date-text",{key:"1aa47809013250eaea4ded0dc664b1af5a1170ba",ref:t=>this.endTextElement=t,class:"end-date-text",locale:this.locale,onSmoothlyDateTextHasText:t=>(t.stopPropagation(),this.endHasText=t.detail),onSmoothlyDateTextFocusChange:t=>(t.stopPropagation(),this.hasFocus=t.detail),onSmoothlyDateHasPartialDate:t=>{var e;return t.stopPropagation(),(e=this.calendarElement)===null||e===void 0?void 0:e.jumpTo(t.detail)},onSmoothlyDateTextChange:t=>(t.stopPropagation(),this.onSmoothlyDateTextChange(t,"end")),onSmoothlyDateTextPrevious:t=>{var e;return t.stopPropagation(),(e=this.startTextElement)===null||e===void 0?void 0:e.select("end")},onSmoothlyDateTextNext:t=>t.stopPropagation(),onSmoothlyDateTextDone:t=>{var e;return t.stopPropagation(),(e=this.endTextElement)===null||e===void 0?void 0:e.deselect(),this.open=false},value:this.end,readonly:this.readonly,disabled:this.disabled,showLabel:this.showLabel})),o("span",{key:"b429db5ba1bf4197a08c5872028549f09390ac99",class:"smoothly-icons"},o("smoothly-icon",{key:"1b9f165fe8fc3a509636aebe6cd5050ffc99e153",class:"smoothly-invalid",name:"alert-circle",size:"small",tooltip:this.errorMessage}),o("slot",{key:"e508de43633d4cadd8a1f83de6a2fa8599175e30",name:"end"})),this.open&&o("smoothly-calendar",{key:"273526a8a97a657724014910b805c3c41c04833f",ref:t=>this.calendarElement=t,doubleInput:true,onSmoothlyDateSet:t=>t.stopPropagation(),onSmoothlyDateRangeSet:t=>{t.stopPropagation();this.open=false;this.start=t.detail.start;this.end=t.detail.end;this.smoothlyInput.emit({[this.name]:t.detail});this.smoothlyUserInput.emit({name:this.name,value:t.detail})},value:this.start,start:this.start,end:this.end,max:this.max,min:this.min}))}get element(){return a(this)}static get watchers(){return{start:[{startChanged:0}],end:[{endChanged:0}],disabled:[{watchingReadonly:0}],readonly:[{watchingReadonly:0}],name:[{nameChange:0}]}}};Gs.style=Vs();const Ks=()=>`.sc-smoothly-input-date-time-h{--input-padding-side:.5rem;--input-value-padding-top:1.25rem;--input-value-padding-bottom:.25rem;--input-min-height:3rem;min-height:var(--input-min-height);box-sizing:border-box;border-radius:var(--smoothly-input-border-radius)}[looks="border"].sc-smoothly-input-date-time-h{border:rgb(var(--smoothly-input-border)) solid 1px}[looks="border"].sc-smoothly-input-date-time-h:not([readonly]):not([disabled]):focus-within{outline:2px solid rgb(var(--smoothly-input-border-focus))}[looks="border"][readonly].sc-smoothly-input-date-time-h{border:transparent solid 1px}[looks="line"].sc-smoothly-input-date-time-h{border-bottom:rgb(var(--smoothly-input-border)) solid 1px;position:relative}[looks="line"][readonly].sc-smoothly-input-date-time-h{border-bottom:transparent solid 1px}[looks="line"].sc-smoothly-input-date-time-h:not([readonly]):not([disabled]):focus-within::before{content:"";position:absolute;inset:0;pointer-events:none;border-bottom:2px solid rgb(var(--smoothly-input-border-focus));z-index:10}[looks="grid"].sc-smoothly-input-date-time-h{flex-grow:1;flex-basis:40%;box-shadow:0px 0px 0px 1px rgb(var(--smoothly-input-border));border:none}[looks="grid"][readonly].sc-smoothly-input-date-time-h{box-shadow:0px 0px 0px 1px rgba(var(--smoothly-input-border-readonly))}[looks="grid"].sc-smoothly-input-date-time-h:not([readonly]):not([disabled]):focus-within{position:relative;box-shadow:0px 0px 0px 2px rgb(var(--smoothly-input-border-focus));outline:none;z-index:10}[looks="transparent"].sc-smoothly-input-date-time-h{border:none}[looks="transparent"][readonly].sc-smoothly-input-date-time-h,[looks="transparent"].sc-smoothly-input-date-time-h:not(:focus-within){background-color:transparent}[looks="transparent"][readonly].sc-smoothly-input-date-time-h>input.sc-smoothly-input-date-time,[looks="transparent"].sc-smoothly-input-date-time-h:not(:focus-within)>input.sc-smoothly-input-date-time{background-color:transparent}[looks="transparent"].sc-smoothly-input-date-time-h:not([readonly]):focus-within{outline:1px solid rgb(var(--smoothly-input-border))}[disabled].sc-smoothly-input-date-time-h{cursor:not-allowed;--smoothly-input-foreground:var(--smoothly-input-disabled-foreground);--smoothly-input-background:var(--smoothly-input-disabled-background);--smoothly-input-border:var(--smoothly-input-disabled-border)}.sc-smoothly-input-date-time-h.sc-smoothly-input-date-time-s>[slot=label],.sc-smoothly-input-date-time-h .sc-smoothly-input-date-time-s>[slot=label],.sc-smoothly-input-date-time-h .label.sc-smoothly-input-date-time{position:absolute;top:.6rem;opacity:0.8;user-select:none;cursor:inherit;transform-origin:top left;transition:transform 100ms ease}[right].sc-smoothly-input-date-time-h .label.sc-smoothly-input-date-time{transform-origin:top right}.sc-smoothly-input-date-time-h.floating-label.sc-smoothly-input-date-time-s>[slot=label],.sc-smoothly-input-date-time-h.floating-label .sc-smoothly-input-date-time-s>[slot=label],.sc-smoothly-input-date-time-h.has-value.sc-smoothly-input-date-time-s>[slot=label],.sc-smoothly-input-date-time-h.has-value .sc-smoothly-input-date-time-s>[slot=label],.sc-smoothly-input-date-time-h[placeholder].sc-smoothly-input-date-time-s>[slot=label],.sc-smoothly-input-date-time-h[placeholder] .sc-smoothly-input-date-time-s>[slot=label],.sc-smoothly-input-date-time-h[readonly].sc-smoothly-input-date-time-s>[slot=label],.sc-smoothly-input-date-time-h[readonly] .sc-smoothly-input-date-time-s>[slot=label],.floating-label.sc-smoothly-input-date-time-h .label.sc-smoothly-input-date-time,.has-value.sc-smoothly-input-date-time-h .label.sc-smoothly-input-date-time,.has-text.sc-smoothly-input-date-time-h .label.sc-smoothly-input-date-time,[placeholder].sc-smoothly-input-date-time-h .label.sc-smoothly-input-date-time,[readonly].sc-smoothly-input-date-time-h .label.sc-smoothly-input-date-time,.sc-smoothly-input-date-time-h:not([readonly]):focus-within .label.float-on-focus.sc-smoothly-input-date-time{top:.2rem;transform:scale(0.8)}.sc-smoothly-input-date-time-h:not([show-label]):not(.show-label) .label.sc-smoothly-input-date-time{display:none}.sc-smoothly-input-date-time-h smoothly-icon.smoothly-invalid.sc-smoothly-input-date-time{fill:rgb(var(--smoothly-input-invalid-icon, var(--smoothly-danger-color)))}.sc-smoothly-input-date-time-h{display:flex;position:relative;max-width:100vw;background-color:rgb(var(--smoothly-input-background));box-sizing:border-box;min-height:var(--input-min-height)}.sc-smoothly-input-date-time-h>smoothly-input.sc-smoothly-input-date-time{--input-min-height:calc(var(--input-min-height) - 2px);--smoothly-input-border-focus:none}.sc-smoothly-input-date-time-h:not([readonly])>smoothly-input.sc-smoothly-input-date-time>div.sc-smoothly-input-date-time>input.sc-smoothly-input-date-time{cursor:pointer}[disabled].sc-smoothly-input-date-time-h,[disabled].sc-smoothly-input-date-time-h>smoothly-input.sc-smoothly-input-date-time>div.sc-smoothly-input-date-time>input.sc-smoothly-input-date-time{cursor:not-allowed}[looks=transparent].sc-smoothly-input-date-time-h smoothly-input.sc-smoothly-input-date-time{outline:none}.sc-smoothly-input-date-time-h>smoothly-calendar.sc-smoothly-input-date-time{position:absolute;z-index:20;top:4rem;background-color:rgb(var(--smoothly-input-background));min-width:18rem;max-width:22rem}.sc-smoothly-input-date-time-h>smoothly-calendar.sc-smoothly-input-date-time::before{content:"";box-sizing:border-box;position:absolute;top:-0.55rem;left:2rem;z-index:9;transform:rotate(45deg);width:1rem;height:1rem;background-color:rgb(var(--smoothly-input-background));border-top:1px solid rgb(var(--smoothly-input-border));border-left:1px solid rgb(var(--smoothly-input-border))}.sc-smoothly-input-date-time-h>span.icons.sc-smoothly-input-date-time{display:flex;flex-direction:row;align-items:center}.sc-smoothly-input-date-time-h>smoothly-input[name="date"].sc-smoothly-input-date-time{width:12rem}.sc-smoothly-input-date-time-h>smoothly-input[name="hour"].sc-smoothly-input-date-time{width:4rem}.sc-smoothly-input-date-time-h>smoothly-input[name="minute"].sc-smoothly-input-date-time{min-width:4rem;flex-grow:1}.sc-smoothly-input-date-time-h>span.colon.sc-smoothly-input-date-time{padding:var(--input-value-padding-top) var(--input-padding-side) var(--input-value-padding-bottom) var(--input-padding-side)}.sc-smoothly-input-date-time-h>.icons.sc-smoothly-input-date-time>.smoothly-invalid.sc-smoothly-input-date-time{display:none;z-index:2;cursor:pointer;padding:0.5rem}[invalid].sc-smoothly-input-date-time-h>.icons.sc-smoothly-input-date-time>.smoothly-invalid.sc-smoothly-input-date-time{display:flex}`;const qs=class{constructor(o){t(this,o);this.smoothlyInputLoad=e(this,"smoothlyInputLoad");this.smoothlyValueChange=e(this,"smoothlyValueChange");this.smoothlyInput=e(this,"smoothlyInput");this.smoothlyUserInput=e(this,"smoothlyUserInput");this.smoothlyInputLooks=e(this,"smoothlyInputLooks");this.smoothlyFormDisable=e(this,"smoothlyFormDisable");this.readonly=false;this.invalid=false;this.isDifferentFromInitial=false;this.observer=Xo.Observer.create(this);this.showLabel=true}componentWillLoad(){this.setInitialValue();this.smoothlyInputLooks.emit(((t,e)=>{var o;return this.looks=(o=this.looks)!==null&&o!==void 0?o:t,!this.color&&(this.color=e)}));this.smoothlyInputLoad.emit((t=>this.parent=t));!this.readonly&&this.smoothlyFormDisable.emit((t=>this.readonly=t));this.observer.publish();this.valueChange(this.value)}async disconnectedCallback(){if(!this.element.isConnected){await this.unregister()}}nameChange(t,e){ts.formRename(this,e)}async register(){ts.formAdd(this)}async unregister(){ts.formRemove(this)}async getValue(){const t=this.date&&typeof this.hour=="number"&&typeof this.minute=="number"?`${this.date}T${`${this.hour}`.padStart(2,"0")}:${`${this.minute}`.padStart(2,"0")}:00.000Z`:undefined;return C.DateTime.is(t)?t:undefined}async listen(t){this.observer.subscribe(t)}async clear(){this.value=undefined;this.date=undefined;this.hour=undefined;this.minute=undefined}async handleChange(){const t=await this.getValue();this.smoothlyValueChange.emit(t);this.smoothlyInput.emit({[this.name]:t});this.observer.publish()}valueChange(t){if(C.DateTime.is(t)){this.date=C.DateTime.getDate(t);this.hour=C.DateTime.getHour(t);this.minute=C.DateTime.getMinute(t)}this.smoothlyValueChange.emit(t);this.smoothlyInput.emit({[this.name]:t});this.observer.publish()}watchingReadonly(){this.observer.publish()}smoothlyInputLooksHandler(t){if(t.target!=this.element){t.stopPropagation()}}smoothlyInputLoadHandler(t){ts.registerSubAction(this,t)}onWindowClick(t){!t.composedPath().includes(this.element)&&this.open&&(this.open=!this.open)}async edit(t){this.readonly=!t}async reset(){if(C.DateTime.is(this.initialValue)){this.date=C.DateTime.getDate(this.initialValue);this.hour=C.DateTime.getHour(this.initialValue);this.minute=C.DateTime.getMinute(this.initialValue)}else{this.date=undefined;this.hour=undefined;this.minute=undefined}}async setInitialValue(){this.initialValue=await this.getValue();this.isDifferentFromInitial=false}render(){return o(s,{key:"40f6c261f57e7dba3054cf01875d40cdc554ba16"},o("smoothly-input",{key:"98aa0e61e439a1ae686191425fca97a99e3e9232",color:this.color,looks:this.looks=="transparent"?this.looks:undefined,name:"date",onFocus:()=>!this.readonly&&!this.disabled&&(this.open=!this.open),onClick:()=>!this.readonly&&!this.disabled&&(this.open=!this.open),readonly:this.readonly,disabled:this.disabled,type:"date",value:this.date,showLabel:this.showLabel,onSmoothlyInputLoad:t=>t.stopPropagation(),onSmoothlyInput:async t=>{t.stopPropagation();this.date=t.detail.date},onSmoothlyUserInput:async t=>{t.stopPropagation();this.smoothlyUserInput.emit({name:this.name,value:await this.getValue()})}},o("slot",{key:"e54f5e30a8f8bb9add88f07365a723a784da6060"})),o("smoothly-input",{key:"777133878145c16fe94dc58ed7a3c7cbeb6bd44d",name:"hour",type:"integer",max:23,pad:2,value:this.hour,readonly:this.readonly,disabled:this.disabled,placeholder:"hh",onSmoothlyInputLoad:t=>t.stopPropagation(),onSmoothlyInput:async t=>{t.stopPropagation();this.hour=t.detail.hour},onSmoothlyUserInput:async t=>{t.stopPropagation();this.smoothlyUserInput.emit({name:this.name,value:await this.getValue()})}}),o("span",{key:"885faf984fcf9070a1d700acc89dd53dfc5f0731",class:"colon"},":"),o("smoothly-input",{key:"4af1ab62eabdb841edd6a20b9db3758eff7e26b6",name:"minute",type:"integer",max:59,pad:2,value:this.minute,readonly:this.readonly,disabled:this.disabled,placeholder:"mm",onSmoothlyInputLoad:t=>t.stopPropagation(),onSmoothlyInput:async t=>{t.stopPropagation();this.minute=t.detail.minute},onSmoothlyUserInput:async t=>{t.stopPropagation();this.smoothlyUserInput.emit({name:this.name,value:await this.getValue()})}}),o("span",{key:"ae5f1d26cffedde15e3857148fe17c985e147c8d",class:"icons"},o("smoothly-icon",{key:"f50114861f0731b7d5078a6ff683a065defa60e4",class:"smoothly-invalid",name:"alert-circle",size:"small",tooltip:this.errorMessage}),o("slot",{key:"dbe69226779cb9f14e2077381fd9de71c96f5640",name:"end"})),this.open&&!this.readonly&&o("smoothly-calendar",{key:"e047e6e5de085a1c771854ecb9b990ca16e1aa52",doubleInput:false,value:this.value?C.DateTime.getDate(this.value):undefined,min:this.min?C.DateTime.getDate(this.min):undefined,max:this.max?C.DateTime.getDate(this.max):undefined,onSmoothlyDateSet:async t=>{t.stopPropagation();this.date=t.detail;this.smoothlyUserInput.emit({name:this.name,value:await this.getValue()});this.open=false}},o("div",{key:"a06fbb5b5d6800c17166980e056023768eeaf26c",slot:"year-label"},o("slot",{key:"2baa75fd451515f003ae91bc1e7393765cee9de7",name:"year-label"})),o("div",{key:"0b35ff73fbd4e4a0b8b49938a2c8f4deb79f6dd0",slot:"month-label"},o("slot",{key:"f41fd202bcd5d82d87b10ec331e8de51bd518f99",name:"month-label"}))))}get element(){return a(this)}static get watchers(){return{name:[{nameChange:0}],date:[{handleChange:0}],hour:[{handleChange:0}],minute:[{handleChange:0}],value:[{valueChange:0}],disabled:[{watchingReadonly:0}],readonly:[{watchingReadonly:0}]}}};qs.style=Ks();const Zs=()=>`.sc-smoothly-input-demo-h{display:flex;flex-direction:column;margin-top:2em;margin-bottom:10rem}.sc-smoothly-input-demo-h .select-div-row.sc-smoothly-input-demo{display:flex}.sc-smoothly-input-demo-h .select-div-row.sc-smoothly-input-demo smoothly-input.sc-smoothly-input-demo{flex:1}smoothly-input-demo-standard.sc-smoothly-input-demo{margin-bottom:2rem}div.inputs.sc-smoothly-input-demo{max-width:min(calc(100% - 2rem), 56rem);margin:auto}div.inputs.sc-smoothly-input-demo>h2.sc-smoothly-input-demo:not(:first-child){padding-top:3em;margin-top:3em;border-top:1px solid black}.checkbox-group.sc-smoothly-input-demo{display:flex;gap:1.5em;align-items:center;background-color:rgb(var(--smoothly-input-background))}.select-div.sc-smoothly-input-demo{display:flex;gap:1em;flex-wrap:wrap}.select-div.sc-smoothly-input-demo>*.sc-smoothly-input-demo{flex-grow:1;min-width:min(100%, var(--smoothly-form-input-min-width, 18rem));flex-basis:40%}`;const Js=class{constructor(o){t(this,o);this.smoothlyUrlUpdate=e(this,"smoothlyUrlUpdate");this.duration={hours:8};this.alphanumeric="!@##";this.numbers=[1,2,3,4,5,6,7,8,9]}render(){return o(s,{key:"9abde760302f7d14296fc58d56b168ccd992c88a"},o("smoothly-input-demo-standard",{key:"7145773de0c84eab437b1dc065202dc2cb19b37a"}),o("smoothly-input-date-demo",{key:"c0304ad310674ae499009d58ddce974f7412c33f"}),o("smoothly-input-demo-user-input",{key:"efde7d5d40929dcc96890f54a91797d0251db2bc"}),o("smoothly-input-demo-radio",{key:"9cde328a31101ee88b7ac3fd7f86abb00b8aedca"}),o("div",{key:"066262aa80f355d87120622b163621c209b0f43c",class:"inputs"},o("h2",{key:"bc38dbe23f7eb3611cac8cf83c5ce0634cb4e722"},"Calendar"),o("smoothly-input-date",{key:"f56708f29f4fa6158ea18b55d806215ee414c599",name:"some-date"},"Calendar"),o("smoothly-input-date-time",{key:"5fe8d855011464f877d70981663f27980080c16a",name:"someDateTime",value:C.DateTime.now()},"DateTime"),o("h2",{key:"f060f3978aeb3707d20c26cdf03724ffb8b25220"},"Date Range"),o("smoothly-input-date-range",{key:"397960f5adb2f9cdb84883e4a4a73134054e23be",name:"testing",start:C.Date.now(),end:C.Date.nextMonth(C.Date.now()),min:"2021-10-01",max:"2025-01-31"}),o("smoothly-input-date-range",{key:"37e2a88696a6c59498b203a00067c96028b8b7a9",name:"testing",start:C.Date.now(),end:C.Date.nextMonth(C.Date.now()),min:"2021-10-10",max:"2024-12-30"},o("smoothly-input-reset",{key:"e50dcde7cd3ce5a5286f5a9e6dfd8bbee00be2f9",slot:"end",size:"icon"})),o("smoothly-input-date-range",{key:"ab99b94f110b3861c6b0350e555442325332f42a",looks:"grid",start:C.Date.now(),end:C.Date.nextMonth(C.Date.now()),min:"2021-10-10",max:"2025-12-30",showLabel:false,style:{"--smoothly-input-border-radius":"0.5rem"}},o("smoothly-input-clear",{key:"7f6081c65f5280584d04b6ce8f7905ac77634a3e",slot:"end",size:"icon"})),o("h2",{key:"37f34f036ee7dc8fb75c4c00659da25e601ff5b1"},"Date"),o("smoothly-input-date",{key:"511529a03ebe91114a24ac5a1942bf2007e1c338"},"Date"),o("smoothly-input-date",{key:"f0b777d7e776387614b9cbeb866f91fd20c86710",showLabel:false,value:"2021-10-28",max:"2021-12-30",min:"2021-10-10"},"Date"),o("smoothly-input-date",{key:"11c9d53699c3f56ab059fcc4ae23ae3ede7c3ef7",value:"2021-10-28"},"Date",o("smoothly-input-reset",{key:"d8f02f6d1c3a5866f9666199b8dff8bffa2f020a",slot:"end",size:"icon"})),o("smoothly-input-date",{key:"b818db6b9c7b7a3e52bd110795f814f440eab4f7",value:"2021-10-28"},"Date",o("smoothly-input-clear",{key:"c099251b5d2925af72bf10d4e897f4102f62be43",slot:"end",size:"icon"})),o("h2",{key:"8033cbfa7ee22ca7440d58952676a43f092c1304"},"Select"),o("div",{key:"1de49162035bde4ab43a46cea27a2e4ef016c784",class:"select-div"},o("smoothly-input-select",{key:"2d2acbd594c6a260b1bd571f00a35e53db9f904f",name:"select-dessert",looks:"border"},o("label",{key:"4a1ebbb1757580ebfba6c58651fa8207a186274c",slot:"label"},"Select with clear button"),o("smoothly-item",{key:"10fe2d4eec5af17e61f704b594be8a700dde57e8",value:"1"},"Ice cream"),o("smoothly-item",{key:"50f3be0902fa5d9989e0827df63cbbc1e4969a4e",value:"2"},"Sponge cake"),o("smoothly-item",{key:"54d4950affc3378a23311d30f01a6b75877921a8",value:"3",disabled:true},"Disabled Item"),o("smoothly-item",{key:"2b669d8c3138b6bef8b2c0a5b0a17f07ea2b1fc3",value:"4"},"Cookie"),o("smoothly-item",{key:"1d222cd2827315a43f1d8412777f2deab42c707e",value:"5"},"Croissant"),o("smoothly-item",{key:"f5582ec1306d69273508415467d56ef166d59592",value:"6"},"Chocolate fondue"),o("smoothly-input-clear",{key:"903c91c69080f05179a1d4c5c4176f651bbac1a7",size:"icon",slot:"end"})),o("smoothly-input-select",{key:"a73b2cdcca14bddac369727f65113cfe2e36f9c8",multiple:true,name:"select-dessert-multiple",looks:"border"},o("label",{key:"264c0c5c870d69ccd4acd552c0c69b75bdf41322",slot:"label"},"Select multiple with reset button"),o("smoothly-item",{key:"1b013b6fce5892e21cec768704c1c7847f9c2d6b",value:"ice cream"},"Ice cream"),o("smoothly-item",{key:"cbf0fb98cd04b4c21d56c4640ebc7fea61de1b8e",value:"sponge cake"},"Sponge cake"),o("smoothly-item",{key:"5244238b76c116e31888c36887b3f4ac5c88f2d0",selected:true,value:"cookie"},"Cookie"),o("smoothly-item",{key:"665cd5efa69f937a8de2e16549f6b5030f87aadd",value:"croissant"},"Croissant"),o("smoothly-item",{key:"f33f606105a30eadeb8ad91d1d098b59f03f1de2",selected:true,value:"chocolate fondue"},"Chocolate fondue"),o("smoothly-input-reset",{key:"903d7955210a152bdd397bf011ede1bdff121949",size:"icon",slot:"end"})),o("smoothly-input-select",{key:"a3b64c46106cc3059130d7c3a91d7f490d1d2751",name:"spirit-animals",looks:"border",mutable:true},o("label",{key:"a004cf922bae1aad8f4df3af6898096e965cfc6a",slot:"label"},"Select or add new options"),o("smoothly-item",{key:"4aa4ef91d108edb11936203365632dfc604e6973",value:"manatee"},"Manatee"),o("smoothly-item",{key:"12985b2fd02dec4a942274c1ecd0b8d64045fb62",selected:true,value:"cthulu"},"Cthulu")),o("smoothly-input-select",{key:"926065319fff2eb3024955686991469cf4128a36",name:"select-icon",clearable:false,showSelected:false},o("smoothly-item",{key:"1ac998cba750b6779c9d2159cef8245ab915f528",value:"folder",selected:true},o("smoothly-icon",{key:"30d4832563d4b16c0bbb77cb33e0da404b743090",size:"small",name:"folder-outline"})),o("smoothly-item",{key:"b04f79adc06b65369baed20874f53ef04a33f80f",value:"camera"},o("smoothly-icon",{key:"b16eaceb42a9e0b56587ce78e8cfdc6452dddd7b",size:"small",name:"camera-outline"}))),o("smoothly-input-select",{key:"5e225cc4758897b81015db7495c7d7a224776e53",ordered:true,menuHeight:"7.5items",placeholder:"Select...",name:"select-month"},o("label",{key:"4b9bcc2a3fe30dabc8669888a19ce86f369cc41e",slot:"label"},"Alphabet ordered select"),Array.from({length:26}).map(((t,e)=>String.fromCharCode(e+65))).map((t=>o("smoothly-item",{value:t,selected:t=="H"},t)))),o("smoothly-input-select",{key:"a171d4ffb8e1bfc698f0fc9ae4ed69e98ced36c9",multiple:true,menuHeight:"7.5items",placeholder:"Select...",name:"select-month"},o("label",{key:"a23c78b0a859472f5e0123b0c02c010911417369",slot:"label"},"Month multiple select"),o("smoothly-item",{key:"a733057d56e91b60e5baa989e26dddbd91e0241a",value:"1"},"January"),o("smoothly-item",{key:"376d92471d5d2eaa9dd88812a8fc583153410198",value:"2"},"February"),o("smoothly-item",{key:"7a1fce8efd0b7974e5528a5fa5662c1dfd778394",value:"3"},"March"),o("smoothly-item",{key:"cb9baf077486cb9bcdbbf89649530a5e0d6063c7",value:"4"},"April"),o("smoothly-item",{key:"0a3473edcc3c472a629ba3d8a79f902acb2e26f3",value:"5"},"May"),o("smoothly-item",{key:"5fdae912db41bffabf3b295d2c3032277dffaa94",value:"6"},"June"),o("smoothly-item",{key:"80047591254fd32dc669b14753e4786d43d3c97d",value:"7"},"July"),o("smoothly-item",{key:"c9df20403a3c394c64aba952b9fedf32e79ccb4d",value:"8"},"August"),o("smoothly-item",{key:"68313242691a68d57283d668fe9b515793737c7e",value:"9"},"September"),o("smoothly-item",{key:"443d7a691c41599d0d89db84b537eb1f257ef517",value:"10"},"October"),o("smoothly-item",{key:"9744bb0bda7582ad2b8b1f90fdf8032258463c54",value:"11"},"November"),o("smoothly-item",{key:"a96a75320e5c546549c4fa35f4176f35a82f5441",value:"12"},"December")),o("div",{key:"d873c1eec59cde6d8922fe4a50e243a63cab66c5",class:"select-div-row"},o("smoothly-input-select",{key:"50e5308ef0fd5c89c0ef0994a1614e633a3d79e0",name:"select-icon",clearable:false,showSelected:false},o("smoothly-item",{key:"a2126b796f28e4c49dd55ca407bfe9c2d71a732a",value:"folder",selected:true},o("smoothly-icon",{key:"9e59ce322358f4648b7b2cf603f4fa0bbee5e7e6",size:"small",name:"folder-outline"})),o("smoothly-item",{key:"c5695fa853b6cd50323c0bb19b179e66241f7c6e",value:"camera"},o("smoothly-icon",{key:"63fc661e772f7b8f425d1aa3acb7d151169e0ca8",size:"small",name:"camera-outline"})),o("smoothly-item",{key:"beaa91042b1183a2fe5eb9f84309cddab6cdaf74",value:"boat"},o("smoothly-icon",{key:"9214d9c9c794dc289f1d99e65877a05a92be2c51",size:"small",name:"boat-outline"}))),o("smoothly-input-select",{key:"9f1f41dce39f38e5fe63e5d771be4ea768732018",name:"select-number",clearable:false},this.numbers.map((t=>o("smoothly-item",{value:"number",selected:t===3},t)))),o("smoothly-input",{key:"73f079ee5dc954e5274c0d4506687186e985ebc7",name:"name",value:"Sten Qvist"},"Name")),o("smoothly-input-select",{key:"f180ea82340d92cfd514a8f02b0610de97955db6",name:"persistent-search",isSearchPersistent:true,menuHeight:"7.5items",searchPlaceholder:"Not here? Type to search."},o("label",{key:"0bb5a665c356d9262946b012e97e5ebfa6e3a2cc",slot:"label"},"Persistent Search select"),this.numbers.map((t=>o("smoothly-item",{value:t},t))))),o("h2",{key:"aa748593e7a304b916fe003db3574355e861f91f"},"Duration"),o("smoothly-input",{key:"6665cf5c786a67bfd315ca5e698201a28ac58bd9",name:"duration",type:"duration",placeholder:"hh:mm",value:this.duration,onSmoothlyInput:t=>this.duration=t.detail.duration},"Duration"),o("smoothly-input",{key:"acc1524d8f3d81b502f152b9c4a4269f04ec28a3",name:"duration",type:"duration",value:this.duration,placeholder:"-hh:mm",onSmoothlyInput:t=>{const e=t.detail.duration;this.duration=e}},"Duration"),o("h2",{key:"ec697e0d8a4c08cf76096f8ecea3cf928ac8ffed"},"Integer with Min/Max"),o("smoothly-input",{key:"d93e6fcb19b42a47bfb083731678f70aa29e6b91",name:"days",type:"integer",min:0,max:365},"Days per year (0-365)"),o("smoothly-input",{key:"5e08ee5eacadbe550677ed2f80bf120d31f330bb",name:"hour",type:"integer",min:0,max:23},"Hours per day (0-23)"),o("smoothly-input",{key:"dd76431b7c0aab1d449d1008e4b8f304e569981f",name:"minute",type:"integer",min:0,max:59},"Minutes per hour (0-59)"),o("smoothly-input",{key:"9f505d2068e98d936255a2077ce4a7fe10120237",name:"minute",type:"integer",min:18,max:120},"Age (18-120)"),o("h2",{key:"0e6dfdc5d485752df47122337bb0e15b052cde03"},"Invalid text with warning icon and tooltip"),o("smoothly-input",{key:"0c015c17a330733637adbd5e60fed447f4224456",copyable:true,name:"alphanumeric",invalid:!/^[a-zA-Z0-9]+$/.test(this.alphanumeric),errorMessage:"Only alphanumeric allowed",value:this.alphanumeric,onSmoothlyInput:t=>this.alphanumeric=t.detail.alphanumeric},"Alphanumeric"),o("h2",{key:"3443f52822907571e8f158e8fbd5ee31db147e0c"},"Identifiers"),o("smoothly-input",{key:"04f0103307050d20d7a3c8aac48f872b7bed47a9",type:"identifier-code"},"Code"),o("smoothly-input",{key:"ada6bccee4f18ce4cb4f43bacc170bdcac4e5f8d",type:"identifier-attribute"},"Attribute"),o("smoothly-input",{key:"d1dd0cd0fb145e64da7622e650d08068034234d7",type:"identifier-snake"},"Snake"),o("smoothly-input",{key:"6bb9c33e28690ad8ba5910f57f4323b17380bd4d",type:"identifier-pascal"},"Pascal"),o("smoothly-input",{key:"c6d0145666d97941bf4e3cc3f000dcf7df622456",type:"identifier-camel"},"Camel"),o("h2",{key:"a0fd68fd64318c72d4fb5617999eb28434f46acb"},"Input Alternatives"),o("smoothly-input",{key:"b258a367eb583950f4e88462759553304b34ab5f",type:"text",name:"name.last"},o("smoothly-icon",{key:"6680c161daaa98a7eefb134fa6ac01e057a4cda8",name:"checkmark-circle",slot:"start"}),"First Name"),o("smoothly-input",{key:"c3fbc85c3dd1548a2e13dfefb72e999c2e540af3",type:"text",name:"name.first"},"Last Name",o("smoothly-icon",{key:"b870dd9c6a9ec3c8cff7eb0d72b8ff8d01ff4787",name:"checkmark-circle",slot:"end"})),o("smoothly-input",{key:"56483f22dadebefc68a137ef7ea47c201455f9ac",type:"text",name:"name.first",placeholder:"Smith"},"Last Name",o("smoothly-icon",{key:"ab1a1418475389089a04e781020fdec0843db208",name:"checkmark-circle",slot:"end"})),o("smoothly-input",{key:"235e4ba12e66afc201a687d67ba68c09e47c6ae3",placeholder:"test"}),o("smoothly-input-submit",{key:"6cd11548c4da7a358b0c41fc17872173fb5542ed",slot:"submit",fill:"solid",onSubmit:t=>alert(t),color:"success"}),o("h4",{key:"6426ff9a5dcd88a79a0e25f8131a905111e1100d"},"Smoothly checkboxes"),o("div",{key:"2ee293c7ee7cc7028cc5a64c7514089f6e513970",class:"checkbox-group"},o("smoothly-input-checkbox",{key:"04543bfef656a978cfa97278be15ee98ac340226",disabled:true,name:"first-checkbox"},o("smoothly-icon",{key:"d6364cf232eb21eb05d8c0d2c561b5f83c2bfc22",name:"checkmark-circle",slot:"start",size:"tiny"}),"First"),o("smoothly-input-checkbox",{key:"6002b3d4d656de70f45268684091700bb51a34d9",name:"second-checkbox",checked:true},o("smoothly-icon",{key:"a62dede44cee8482cedf454666d74eadcae5b648",name:"checkmark-circle",slot:"start",size:"tiny"}),"second",o("smoothly-input-clear",{key:"efa5fb6d1c0b98657fcdb2f767a1b540cfbe64c2",size:"icon",slot:"end"})),o("smoothly-input-checkbox",{key:"7e9bae820feaf07266c5855521656fb77795f213",name:"third-checkbox"},"3rd")),o("h4",{key:"5e82e2cabd6bfba777cb525f9327f8d0b44bb0a4"},"Smoothly Radio Buttons"),o("smoothly-input-radio",{key:"2f509cac6e45fede44fb781e0d89e3641cbe7087",clearable:true,name:"radioFirstInput"},o("smoothly-icon",{key:"3d8d785ab281ced175b9eff30588e456b9d467c8",name:"checkmark-circle",slot:"start"}),o("label",{key:"7818d1cd7adf436e618c2c1657a9cdb703bd9872",slot:"label"},"Clearable"),o("smoothly-input-radio-item",{key:"8dcef2f957dec38a75138907c0f7b90dfd60eb06",value:"first"},"Label 1"),o("smoothly-input-radio-item",{key:"8abcba992493b5a48c52e83354accb5cd811600e",selected:true,value:"second"},"Label 2"),o("smoothly-input-radio-item",{key:"258b7a4eeed806d90bf532232204c5816138f0e3",value:"third"},"Label 3"),o("smoothly-input-clear",{key:"8162121c8509d4dbfa817f8da1ce83e772635eae",size:"icon",slot:"end"})),o("smoothly-input-radio",{key:"1fb58d1a85229c423cfcdc3cc9dda03e2656a156",name:"radioSecondInput"},o("label",{key:"aa058078296bf6bdb306014dbb2bfff8f4ea4127",slot:"label"},"Not clearable"),o("smoothly-input-radio-item",{key:"a5705cd459d7d23a673bebb2922d96b05886b174",value:"first"},"Label 1"),o("smoothly-input-radio-item",{key:"eaf40dd525cc87eb6945c2f2c13fa3bc88a87b8a",value:"second"},"Label 2"),o("smoothly-input-radio-item",{key:"804cab03ddaaa8117ede9be9c64a7702a6a80e9e",value:"third"},"Label 3"),o("smoothly-input-radio-item",{key:"5fb7e710781e5fbb151dc7e1375e558f2f5b31d6",value:"fourth"},"Label 4"),o("smoothly-input-radio-item",{key:"8eb82275acfeb773ed48a3a16e9185655811f1ac",value:"fifth"},"Label 5"),o("smoothly-input-radio-item",{key:"ca59f13504dabd0cbfe5f990df73b4d1cf3fba40",value:"sixth"},"Label 6")),o("smoothly-input-range-demo",{key:"fb8307d6c518fcb16fe272cbedba69c5a824b631"}),o("smoothly-input-color-demo",{key:"3a5e50a5f2aee26c49a2f0ffd879f6efe6717697"}),o("smoothly-input-price-demo",{key:"69c1564a1952541b35af40a5675029b32bc43256"}),o("smoothly-back-to-top",{key:"574445159a65c986532d39d381a37a606cde04b0"})))}};Js.style=Zs();const Xs=()=>`.sc-smoothly-input-demo-radio-h{display:grid;grid-template-columns:repeat(auto-fit, minmax(20rem, 1fr));max-width:min(56rem, 100%);margin:auto;flex-direction:column;gap:0.5rem}.sc-smoothly-input-demo-radio-h .sc-smoothly-input-demo-radio:not(smoothly-input-date):not(smoothly-input-date-range){grid-column:1 / -1}`;const Qs=class{constructor(e){t(this,e)}selectedChange(){console.log("selected",this.selected)}render(){return o(s,{key:"c5f13f1f1719524fa54e2b506974c031693361a2"},o("h2",{key:"16b9142736583c06f5d4fdccb7f2cb3883ad15b2"},"radio input - column direction"),o("smoothly-input-radio",{key:"fd8665109263a23b2a8b1f57888388cb232f1307",name:"radio",direction:"column",onSmoothlyInput:t=>this.selected=t.detail.radio},o("smoothly-input-radio-item",{key:"7509bdba2358b4ce60e121dfaa76874ad388f6a0",value:"1"},o("span",{key:"d8ed1cf2ba7e979239e35286b561151f81ffe220"},"Option 1"),o("span",{key:"e87b5fb84fef10c368acc6ed0dc77a5dd2f6e2c5",slot:"detail"},"Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.")),o("smoothly-input-radio-item",{key:"c76b0016d8f9c519166b121642bea547a0f1ca19",value:"2",selected:true},o("span",{key:"e573119b6a2be32a078de84bc4941f1f3a9ee76c"},"Option 2"),o("div",{key:"f7b4e4bcf85bd8cacc52d119e6cae9925fb6474a",slot:"detail"},o("smoothly-tabs",{key:"75bf5aafdbd8f4186f70f12af13c4bbbdc4e6a43"},o("smoothly-tab",{key:"c02c4b6d471fb5b37dff0758b53d5dde4e1b705a",label:"Dog",name:"dog",open:true},"🐕"),o("smoothly-tab",{key:"83e8e9179dac5f74d87ca5c9011a77d2c8185b3d",label:"Cat",name:"cat"},"🐈"),o("smoothly-tab",{key:"4be8b9bc53065ed86c0a46b337aeb961bd040006",label:"Rat",name:"rat"},"🐀"))))))}static get watchers(){return{selected:[{selectedChange:0}]}}};Qs.style=Xs();const ta=()=>`.sc-smoothly-input-demo-standard-h{max-width:min(calc(100% - 0.5rem), 48rem);margin:auto}.sc-smoothly-input-demo-standard-h h2.sc-smoothly-input-demo-standard,.sc-smoothly-input-demo-standard-h p.sc-smoothly-input-demo-standard{margin:.5rem 0}.sc-smoothly-input-demo-standard-h>.description.sc-smoothly-input-demo-standard{--smoothly-form-input-min-width:18rem}.sc-smoothly-input-demo-standard-h smoothly-input-range[name=borderRadius].sc-smoothly-input-demo-standard{flex-basis:100%}div.input-wrapper.sc-smoothly-input-demo-standard{display:grid;margin-top:1rem;grid-template-columns:1fr 9rem;gap:1rem;position:relative;justify-content:space-around}div.input-wrapper.sc-smoothly-input-demo-standard>[name].sc-smoothly-input-demo-standard{grid-column:1 / 2}div.input-wrapper.sc-smoothly-input-demo-standard>.width.sc-smoothly-input-demo-standard{width:100%;text-align:center;border-bottom:1px dashed black}div.input-wrapper.sc-smoothly-input-demo-standard>.height.sc-smoothly-input-demo-standard{align-content:center;grid-column:2 / 3;border-left:1px dashed black;padding-left:1rem;content:"hello"}div.input-wrapper.sc-smoothly-input-demo-standard>.left-padding.sc-smoothly-input-demo-standard{width:0.5rem;grid-column:1 / 2;white-space:nowrap;overflow:visible;position:relative;cursor:default}div.input-wrapper.sc-smoothly-input-demo-standard>.left-padding.sc-smoothly-input-demo-standard::before{content:"";position:absolute;width:100%;top:1.5rem;bottom:-1rem;border:1px dashed black;z-index:2}div.input-wrapper.sc-smoothly-input-demo-standard>.left-padding.sc-smoothly-input-demo-standard:hover::before{bottom:-100vh}`;const ea=class{constructor(e){t(this,e);this.duration={hours:8};this.options={}}connectedCallback(){this.updateInputHeightText()}componentDidRender(){this.updateInputHeightText()}updateInputHeightText(){const t=Number(getComputedStyle(document.documentElement).fontSize.replace("px",""));this.element.querySelectorAll(".height").forEach((e=>{const o=e.clientHeight;e.innerHTML=`<b>${o/t}rem</b> (${o}pixels)`}))}render(){return o(s,{key:"565969b29cb4026161d464de5f1098867eb349da"},o("div",{key:"8dfe9097349f2a7e7d6213f21148451d67f3a2dc",class:"description"},o("h2",{key:"ab251407c1b18d95ab4acd9c2a16ce528b8e1916"},"Input Standard"),o("p",{key:"9991d8aa06f8c0315473506dc96abea6c32a95f5"},"Height of input should be ",o("code",{key:"f35b5bae310077317f25a440dee0fb91b7ad1c49"},"3rem")," including border. This is should result in a 48 pixel height at 100% zoom, assuming a root font-size of 16 pixels."),o("smoothly-form",{key:"834178266280b7dfe37ab9294846ce7344f7ffa2",looks:"grid",onSmoothlyFormInput:t=>this.options=t.detail},o("smoothly-input-select",{key:"173b6aa75c138f16a6f39a8153c53520e1cb4667",name:"color"},o("span",{key:"ca1d64b4cdbc55de31e0b8e3debba0bcb1062283",slot:"label"},"Color"),r.values.map((t=>o("smoothly-item",{value:t},o("span",{color:t},t)))),o("smoothly-input-clear",{key:"725b080604c10861eca04ffb2b031743f7dde0c7",slot:"end"})),o("smoothly-input-select",{key:"3b095e076235b0bd7c8668def6b357a807e573bf",name:"looks"},o("span",{key:"8394ea2aaa44301db48cbf85539721b76bfcae8c",slot:"label"},"Looks"),Qo.values.map((t=>o("smoothly-item",{value:t},t)))),o("smoothly-input-range",{key:"04621b7e3fe74a983f5827cfbbf7dffd62c01b0d",label:"Border Radius (rem)",name:"borderRadius",min:0,max:2,step:.25}),o("smoothly-input-checkbox",{key:"7845252b0f9628b6c8ddaaddf6e603b5c793a564",name:"readonly"},"Readonly"),o("smoothly-input-checkbox",{key:"11160109586cc4bff53de12230c200a739bb2855",name:"disabled"},"Disabled"),o("smoothly-input-checkbox",{key:"38a61ebe5da7cc5fafc56cf311ed821c66ad58d3",name:"invalid"},"Invalid"),o("smoothly-input",{key:"7371362ea0fe16f777d816ed26c2bbd96b9c6531",name:"errorMessage",value:"This is not a valid value"},"Error Message"),o("smoothly-input-checkbox",{key:"e405da1dd51a6b741fd284e3b84fd272bff1e5f5",name:"showLabel",checked:true},"Show Label"),o("smoothly-input",{key:"c9042135f21280ad38eae8ea1b15e810650a34cb",name:"placeholder"},"Placeholder"),o("smoothly-input-checkbox",{key:"c43ee5611eed8d05392b8af7bb51289cc7c81252",name:"alwaysShowGuide"},"Always Show Guide (for date inputs)"))),o("div",{key:"bbeb50ec5367e51297a5636d7e98b19e1e943079",class:"input-wrapper",style:{"--smoothly-input-border-radius":`${this.options.borderRadius}rem`}},o("div",{key:"ab3ed4cd95f58bcdeee1a606ca93228a80a23e60",class:"width"},"width: 100%"),o("div",{key:"1c0e7739a2c085b5795143700e407b75b00c4119",class:"left-padding"},"padding-left: 0.5rem"),o("smoothly-input",{key:"66c1e55882d9eac4827a612f1e2bc23d647ab3e5",name:"text",color:this.options.color,looks:this.options.looks,readonly:this.options.readonly,disabled:this.options.disabled,invalid:this.options.invalid,errorMessage:this.options.errorMessage,showLabel:this.options.showLabel,placeholder:this.options.placeholder},this.options.showLabel&&o("span",{key:"138636342ba55fe7123c2c2a6c20d9dfb4ee5f60"},"Text"),o("smoothly-input-clear",{key:"3b3a28fb80a525f59eb268807b2343c0719af331",slot:"end"})),o("div",{key:"e5ae5e25f0e038678c2e51c5de7b15df9f50995e",class:"height"}),o("smoothly-input-select",{key:"d4e65e0e5ec3ffa9a20982853b8ec4eeccf944d9",name:"month",color:this.options.color,looks:this.options.looks,menuHeight:"6.7items",readonly:this.options.readonly,disabled:this.options.disabled,invalid:this.options.invalid,errorMessage:this.options.errorMessage,placeholder:this.options.placeholder},this.options.showLabel&&o("label",{key:"6aebe9d702f31518eaac40a18d5fd576c59e9375",slot:"label"},"Select"),o("smoothly-item",{key:"3313ee1b456498764ec67d2c315d341188be997f",value:"1"},"January"),o("smoothly-item",{key:"8f401f914c7dba15ff927d0630b4f981b46fbff5",value:"2"},"February"),o("smoothly-item",{key:"e92167e28806a39e68648aa87b9c4b428f0c22c8",value:"3"},"March"),o("smoothly-item",{key:"2ed2bccc780279cdeb5c9ec14ee774547735bb3b",value:"4"},"April"),o("smoothly-item",{key:"f4c9e6138ec0f470b86057cc8f472d14ea38a6ee",value:"5"},"May"),o("smoothly-item",{key:"86666e444e49a4fad6a0e62d7572159a7b530cd5",value:"6"},"June"),o("smoothly-item",{key:"aa409f39093a8c2cdf8577834928d62b94a82a5c",value:"7"},"July"),o("smoothly-item",{key:"98ca4aefcc72bb0b62f9fef6a2a06d97fa19c636",value:"8"},"August"),o("smoothly-item",{key:"ac4236a6dc21b2b52b57b983a622552751321aed",value:"9"},"September"),o("smoothly-item",{key:"b6aa81c1adc8b28bc306f850b3b35f3d01026935",value:"10"},"October"),o("smoothly-item",{key:"9067b78e9a5c8024321ed20c9c11403f6171124e",value:"11"},"November"),o("smoothly-item",{key:"f4a2448b92497773440a7602f96c2f007bba6bf4",value:"12"},"December"),o("smoothly-input-clear",{key:"bda865a858903d63b0c0f3b599aabdfbd11ff906",slot:"end"})),o("div",{key:"c4c21ffe5abb9a278e58495d148488cb2fa0efb7",class:"height"}),o("smoothly-input-checkbox",{key:"d329acedf41e7a97dbd9722b47b0bbb685c03fd1",name:"checkbox",checked:true,color:this.options.color,looks:this.options.looks,readonly:this.options.readonly,disabled:this.options.disabled},"Check",o("smoothly-input-reset",{key:"b65bbc409d050d7530a141d0ba27b67a9ef02b95",slot:"end"})),o("div",{key:"6ce56c0613de52c5e7ea9cca1625386d36e39c9f",class:"height"}),o("smoothly-input-radio",{key:"9ac8654a0369a7a3e1f5d4e6021d19f65c481151",name:"radio",clearable:true,color:this.options.color,looks:this.options.looks,readonly:this.options.readonly,disabled:this.options.disabled,showLabel:this.options.showLabel},this.options.showLabel&&o("label",{key:"834e8faeb267255422065b193872a9a55e8f21fa",slot:"label"},"Radio"),o("smoothly-input-radio-item",{key:"6a9c64355615f74973d23d31d226a41653cf04f0",value:"first"},"Label 1"),o("smoothly-input-radio-item",{key:"90aeffb2a08bb1a4ead6fac140022e1fbb6562de",selected:true,value:"second"},"Label 2"),o("smoothly-input-radio-item",{key:"659a872eb48ec26a4dfdd8865b79d47378d266b6",value:"third"},"Label 3"),o("smoothly-input-clear",{key:"2b852706751a90a1954596dbeeabc7d10c1e62a3",slot:"end"})),o("div",{key:"35ae222dd32c0a24f5047c589b1240b3e1dbadc2",class:"height"}),o("smoothly-input-file",{key:"d2c1b6df5cf570bf46874c9472ed3ceef60729b8",name:"file",color:this.options.color,looks:this.options.looks,readonly:this.options.readonly,disabled:this.options.disabled,showLabel:this.options.showLabel,placeholder:this.options.placeholder},this.options.showLabel&&o("span",{key:"c076b435acdd7a14a6a377bb3f9772904736caf7",slot:"label"},"File"),o("smoothly-input-clear",{key:"20e32d6fbac42c4617b5aaffca12f1e68f09156f",slot:"end"})),o("div",{key:"bf99bffecc00feebaa1027ec7f99bcd51d7661f6",class:"height"}),o("smoothly-input-range",{key:"e266bbb8ceb3dcf33bbe745d43a108d40fe97d96",name:"range",color:this.options.color,looks:this.options.looks,readonly:this.options.readonly,disabled:this.options.disabled,label:this.options.showLabel?"Range":undefined},o("smoothly-input-clear",{key:"329f737f8c88d1c68f62d0227293cbff2668b903",slot:"end"})),o("div",{key:"5f5e44e62c2658812f79fff1ceb47f2fc70e0018",class:"height"}),o("smoothly-input-color",{key:"8c39c11aa2d6551e67658f6b17a2be577bfc0be2",name:"color",color:this.options.color,looks:this.options.looks,readonly:this.options.readonly,disabled:this.options.disabled,showLabel:this.options.showLabel},this.options.showLabel&&o("span",{key:"69ff977d1d74c9c1575930668cdd8cd25c63cb7a"},"Color"),o("smoothly-input-clear",{key:"62ef604e4ac15e5808151c44d951c9ee14fcfcc4",slot:"end"})),o("div",{key:"5f2cf9fcffd64dc04a7f92c812e8eb74d4574d7b",class:"height"}),o("smoothly-input-date",{key:"f9778ed78fafb18e5786c522a3dbac2b8a29941f",name:"date",color:this.options.color,looks:this.options.looks,readonly:this.options.readonly,disabled:this.options.disabled,invalid:this.options.invalid,errorMessage:this.options.errorMessage,showLabel:this.options.showLabel,placeholder:this.options.placeholder,alwaysShowGuide:this.options.alwaysShowGuide},this.options.showLabel&&o("span",{key:"71cd8a2aaff8724eb2cd1f61312939cde42628ba"},"Date"),o("smoothly-input-clear",{key:"3a457f21009edb59edda1486cd15861e3f477441",slot:"end"})),o("div",{key:"1adc30f659052cc8a4bcb39d9f7ae9ee098c8d46",class:"height"}),o("smoothly-input-date-time",{key:"dd2744ca25ad41f47e74c1fcdcd18a35d6727cab",name:"dateTime",color:this.options.color,looks:this.options.looks,readonly:this.options.readonly,disabled:this.options.disabled,invalid:this.options.invalid,errorMessage:this.options.errorMessage,showLabel:this.options.showLabel},"DateTime",o("smoothly-input-clear",{key:"79d65744abdb53f4ba552e804ed8c4b7876289a5",slot:"end"})),o("div",{key:"0c9fa58c169272bc1cfe98760c977d898123f195",class:"height"}),o("smoothly-input-date-range",{key:"8d0530766b4278c9a0e1bf752c5201a8a1150cb8",name:"dateRange",color:this.options.color,looks:this.options.looks,readonly:this.options.readonly,disabled:this.options.disabled,invalid:this.options.invalid,errorMessage:this.options.errorMessage,placeholder:this.options.placeholder,alwaysShowGuide:this.options.alwaysShowGuide,showLabel:this.options.showLabel},this.options.showLabel&&o("span",{key:"ced591c321b40cb26ac60adc79c9aef515ba84d4"},"Date Range"),o("smoothly-input-clear",{key:"126e55235695f0e2ce4bee0c4a9f51699dd9ef63",slot:"end"})),o("div",{key:"30cfa18368611c241479cbfc0f6c4de2067a0e41",class:"height"})))}get element(){return a(this)}};ea.style=ta();const oa=()=>`.sc-smoothly-input-demo-user-input-h{max-width:min(100%, 56rem);margin-inline:auto;display:grid;grid-template-columns:12rem 1fr;gap:1rem}.sc-smoothly-input-demo-user-input-h>div.sc-smoothly-input-demo-user-input{grid-column:1 / -1}@media (max-width: 48rem){.sc-smoothly-input-demo-user-input-h{grid-template-columns:1fr}}`;const sa=class{constructor(e){t(this,e);this.values=["zero","one","two","three","four","five"];this.colors=["#ff0000","#00ff00","#0000ff","#ffff00","#00ffff","#ff00ff"]}increment(t){return t===undefined?0:(t+1)%this.values.length}render(){var t,e;return o(s,{key:"f2a4d41e58f06ede6a72fb3f8b172ffba324ba1d"},o("div",{key:"6730bc3f89a2d8a01d2225b520709d8ccf3e7890"},o("h2",{key:"8894c809fd95504f8f01579a11a975b8f143c656"},"User Input Event"),o("p",{key:"741a6f7d9baf8b8bda50330141d87a0160d7bacb"},"These inputs demonstrate how user input is handled. The ",o("code",{key:"467a82db0e06629f333754223ce39645339d777d"},"smoothlyUserInput")," event fires only when the user interacts with an input, not when its value is changed programmatically (such as by clicking the buttons above).",o("br",{key:"ab05e1e07d915dbc118a72a9bdd0e6a091bb21f1"}),"Check the console to see the details of each ",o("code",{key:"efa4627f8e89c03732e2dcab4d1fdce5d0ac1ef6"},"smoothlyUserInput")," event.")),o("smoothly-button",{key:"2dd9580d4ef091d5c2c6a0591b9318ebb7359fe2",color:"tertiary",onClick:()=>this.textIndex=this.increment(this.textIndex)},"Change text"),o("smoothly-input",{key:"0f616b3fd91d0b759f3dbb5d8c8c3ff8f46347b8",looks:"border",name:"demo-user-input-text",value:this.textIndex===undefined?"":this.values[this.textIndex],onSmoothlyUserInput:t=>console.debug(t.type,t.detail.name,t.detail.value)},"Text input"),o("smoothly-button",{key:"190d254c825bd58806a35853aff82a48a7e80f7a",onClick:()=>this.selectIndex=this.increment(this.selectIndex),color:"tertiary"},"Next select item"),o("smoothly-input-select",{key:"1f8241f1cbd29d9c72b91c064d00960fcf8e67be",looks:"border",name:"demo-user-input-select",onSmoothlyUserInput:t=>console.debug(t.type,t.detail.name,t.detail.value)},o("span",{key:"0ee1caf5240b16279f225e77c61eec8ddfa9af96",slot:"label"},"Select input"),this.values.map(((t,e)=>o("smoothly-item",{value:e,selected:e==this.selectIndex},t)))),o("smoothly-button",{key:"ab912c84539c520b0822afcba1f467ad486a3502",color:"tertiary",onClick:()=>this.checkboxChecked=!this.checkboxChecked},"Toggle checkbox"),o("smoothly-input-checkbox",{key:"4561b0608b11b9da9acaa0dd48d80284994bbdba",looks:"border",name:"demo-user-input-checkbox",checked:this.checkboxChecked,onSmoothlyUserInput:t=>console.debug(t.type,t.detail.name,t.detail.value)},"Checkbox input"),o("smoothly-button",{key:"aaae7c8f2458babc9631388b0e968528fd138148",color:"tertiary",onClick:()=>this.radioIndex=this.increment(this.radioIndex)},"Next radio item"),o("smoothly-input-radio",{key:"f70403edaf65e8ff1358461a0d773e1aaeee8718",looks:"border",name:"demo-user-input-radio",onSmoothlyUserInput:t=>console.debug(t.type,t.detail.name,t.detail.value)},o("span",{key:"9c8c3237fdf0ff4aac2dbbf6c7c1b9832993929b",slot:"label"},"Radio input"),this.values.map(((t,e)=>o("smoothly-input-radio-item",{value:t,selected:e==this.radioIndex},t)))),o("smoothly-button",{key:"8eae0440201647bbceb3ad3464ddadbaefc4ea38",color:"tertiary",onClick:()=>this.rangeValue=this.increment(this.rangeValue)},"Next range value"),o("smoothly-input-range",{key:"ff18785f22364aa89c709f0a156c3c824e802a26",looks:"border",name:"demo-user-input-range",step:1,min:0,max:this.values.length,value:this.rangeValue,label:"Range Input",onSmoothlyUserInput:t=>console.debug(t.type,t.detail.name,t.detail.value)}),o("smoothly-button",{key:"d6bdc4a1471dccd98a001044bf22375e38c11279",color:"tertiary",onClick:()=>this.colorIndex=this.increment(this.colorIndex)},"Next color"),o("smoothly-input-color",{key:"c65c8a43e19bb1502da3098d57288d139ffe2faf",looks:"border",name:"demo-user-input-color",value:typeof this.colorIndex=="number"?this.colors[this.colorIndex]:undefined,onSmoothlyUserInput:t=>console.debug(t.type,t.detail.name,t.detail.value)},"Color input"),o("smoothly-button",{key:"6d0f8d7e46b889fcbc94d5dd79b274fc623cd7ba",color:"tertiary",onClick:()=>this.dateValue=this.dateValue?C.Date.next(this.dateValue):C.Date.now()},"Next day"),o("smoothly-input-date",{key:"3e2c83fc75562f0d755cb5440bc2d1aa539dcde9",looks:"border",name:"demo-user-input-date",value:this.dateValue,onSmoothlyUserInput:t=>console.debug(t.type,t.detail.name,t.detail.value)},"Date input"),o("smoothly-button",{key:"c9db4d875e2fcb1f913fcd941f6d9ba9eb6393ee",color:"tertiary",onClick:()=>this.datetimeValue=this.datetimeValue?C.DateTime.nextDay(this.datetimeValue):C.DateTime.now()},"Next date time"),o("smoothly-input-date-time",{key:"2a582db04d01beb54682436d3663a0adeeeb897f",looks:"border",name:"demo-user-input-datetime",value:this.datetimeValue,onSmoothlyUserInput:t=>console.debug(t.type,t.detail.name,t.detail.value)},"Date time input"),o("smoothly-button",{key:"c1623f533dc310005f206282f3ba11a6697b15ca",color:"tertiary",onClick:()=>this.dateRangeValue=this.dateRangeValue?{start:C.Date.next(this.dateRangeValue.start),end:C.Date.next(this.dateRangeValue.end)}:{start:C.Date.now(),end:C.Date.next(C.Date.now(),10)}},"Next date range"),o("smoothly-input-date-range",{key:"f884728adae7e57072deef782aab61f8b57d8147",looks:"border",name:"demo-user-input-daterange",start:(t=this.dateRangeValue)===null||t===void 0?void 0:t.start,end:(e=this.dateRangeValue)===null||e===void 0?void 0:e.end,onSmoothlyUserInput:t=>console.debug(t.type,t.detail.name,t.detail.value)},"Date range input"))}};sa.style=oa();const aa=()=>`[color=default].sc-smoothly-input-edit{--smoothly-color:var(--smoothly-default-color);--smoothly-color-contrast:var(--smoothly-default-contrast);--smoothly-color-shade:var(--smoothly-default-shade);--smoothly-color-tint:var(--smoothly-default-tint)}[color=primary].sc-smoothly-input-edit{--smoothly-color:var(--smoothly-primary-color);--smoothly-color-contrast:var(--smoothly-primary-contrast);--smoothly-color-shade:var(--smoothly-primary-shade);--smoothly-color-tint:var(--smoothly-primary-tint)}[color=secondary].sc-smoothly-input-edit{--smoothly-color:var(--smoothly-secondary-color);--smoothly-color-contrast:var(--smoothly-secondary-contrast);--smoothly-color-shade:var(--smoothly-secondary-shade);--smoothly-color-tint:var(--smoothly-secondary-tint)}[color=tertiary].sc-smoothly-input-edit{--smoothly-color:var(--smoothly-tertiary-color);--smoothly-color-contrast:var(--smoothly-tertiary-contrast);--smoothly-color-shade:var(--smoothly-tertiary-shade);--smoothly-color-tint:var(--smoothly-tertiary-tint)}[color=success].sc-smoothly-input-edit{--smoothly-color:var(--smoothly-success-color);--smoothly-color-contrast:var(--smoothly-success-contrast);--smoothly-color-shade:var(--smoothly-success-shade);--smoothly-color-tint:var(--smoothly-success-tint)}[color=warning].sc-smoothly-input-edit{--smoothly-color:var(--smoothly-warning-color);--smoothly-color-contrast:var(--smoothly-warning-contrast);--smoothly-color-shade:var(--smoothly-warning-shade);--smoothly-color-tint:var(--smoothly-warning-tint)}[color=danger].sc-smoothly-input-edit{--smoothly-color:var(--smoothly-danger-color);--smoothly-color-contrast:var(--smoothly-danger-contrast);--smoothly-color-shade:var(--smoothly-danger-shade);--smoothly-color-tint:var(--smoothly-danger-tint)}[color=light].sc-smoothly-input-edit{--smoothly-color:var(--smoothly-light-color);--smoothly-color-contrast:var(--smoothly-light-contrast);--smoothly-color-shade:var(--smoothly-light-shade);--smoothly-color-tint:var(--smoothly-light-tint)}[color=medium].sc-smoothly-input-edit{--smoothly-color:var(--smoothly-medium-color);--smoothly-color-contrast:var(--smoothly-medium-contrast);--smoothly-color-shade:var(--smoothly-medium-shade);--smoothly-color-tint:var(--smoothly-medium-tint)}[color=dark].sc-smoothly-input-edit{--smoothly-color:var(--smoothly-dark-color);--smoothly-color-contrast:var(--smoothly-dark-contrast);--smoothly-color-shade:var(--smoothly-dark-shade);--smoothly-color-tint:var(--smoothly-dark-tint)}.sc-smoothly-input-edit-h{--smoothly-button-border-radius:0.5rem;display:inline-flex;box-sizing:border-box;border-radius:var(--smoothly-button-border-radius);font-size:var(--smoothly-button-font-size, 1rem);cursor:pointer;border:none;outline:none;position:relative}[shape=rounded].sc-smoothly-input-edit-h{--smoothly-button-border-radius:2rem}[type=link].sc-smoothly-input-edit-h{display:inline}[disabled].sc-smoothly-input-edit-h{opacity:0.5}.sc-smoothly-input-edit-h>a.sc-smoothly-input-edit{font-weight:400;background-color:transparent}.sc-smoothly-input-edit-h>a.sc-smoothly-input-edit,.sc-smoothly-input-edit-h>button.sc-smoothly-input-edit{font-size:var(--smoothly-button-font-size);border:1px solid transparent;outline:none;cursor:pointer;display:inline-flex;gap:0.5rem;box-sizing:border-box}.sc-smoothly-input-edit-h>button.sc-smoothly-input-edit{font-weight:bold;justify-content:center;width:100%;align-items:center;border-radius:var(--smoothly-button-border-radius);padding-inline:var(--smoothly-button-padding-inline, 1rem)}.sc-smoothly-input-edit-h{min-height:var(--smoothly-button-height, 2.5rem)}.sc-smoothly-input-edit-h:has(>a:empty),.sc-smoothly-input-edit-h:has(>button:empty),.sc-smoothly-input-edit-h>a.sc-smoothly-input-edit:empty,.sc-smoothly-input-edit-h>button.sc-smoothly-input-edit:empty{border-width:0;min-height:0;padding-inline:0}[size=small].sc-smoothly-input-edit-h{--smoothly-button-height:2rem;--smoothly-button-padding-inline:0.75rem;--smoothly-button-font-size:0.875rem;--smoothly-icon-size:1.4rem}[size=large].sc-smoothly-input-edit-h{--smoothly-button-height:3rem;--smoothly-button-padding-inline:1.25rem;--smoothly-button-font-size:1.125rem}.sc-smoothly-input-edit-h:not([size=icon]):not([size=flexible])>button.sc-smoothly-input-edit{min-width:8rem}[size=icon].sc-smoothly-input-edit-h{--smoothly-icon-size:1.4rem}[size=icon].sc-smoothly-input-edit-h>button.sc-smoothly-input-edit{min-height:var(--smoothly-button-height, 2.5rem);min-width:var(--smoothly-button-height, 2.5rem);padding:0}.sc-smoothly-input-edit-h:not([size=icon]){min-width:8em}[size=flexible].sc-smoothly-input-edit-h{min-width:unset;padding:0;margin:0;display:flex;justify-content:center}[size=flexible].sc-smoothly-input-edit-h>button.sc-smoothly-input-edit{min-width:unset;padding:0;margin:0}[expand].sc-smoothly-input-edit-h{width:100%}[expand=full].sc-smoothly-input-edit-h{border-left:none;border-right:none;--smoothly-button-border-radius:0}[fill=outline].sc-smoothly-input-edit-h>button.sc-smoothly-input-edit{background-color:transparent;color:rgb(var(--smoothly-button-foreground));fill:rgb(var(--smoothly-button-foreground));stroke:rgb(var(--smoothly-button-foreground));border-color:rgb(var(--smoothly-button-foreground))}.sc-smoothly-input-edit-h:not([fill=clear]):not([disabled])>button.sc-smoothly-input-edit:hover,.sc-smoothly-input-edit-h:not([disabled])>button.sc-smoothly-input-edit:focus-visible,[fill=outline].sc-smoothly-input-edit-h:not([disabled]):active>button.sc-smoothly-input-edit::before{border-color:rgb(var(--smoothly-button-focus-color))}[fill=outline].sc-smoothly-input-edit-h:not([disabled])>button.sc-smoothly-input-edit:hover::before,[fill=outline].sc-smoothly-input-edit-h:not([disabled])>button.sc-smoothly-input-edit:focus-within::before,[fill=outline].sc-smoothly-input-edit-h:not([disabled])>button.sc-smoothly-input-edit:active::before{content:"";position:absolute;border:2px solid rgb(var(--smoothly-button-focus-border));inset:-1px;border-radius:var(--smoothly-button-border-radius)}.sc-smoothly-input-edit-h:not([fill=clear]):not([fill=outline]):not([disabled])>button.sc-smoothly-input-edit:hover,.sc-smoothly-input-edit-h:not([fill=clear]):not([fill=outline]):not([disabled])>button.sc-smoothly-input-edit:focus-visible,.sc-smoothly-input-edit-h:not([fill=clear]):not([fill=outline]):not([disabled])>button.sc-smoothly-input-edit:active{background:rgb(var(--smoothly-button-hover-background))}.sc-smoothly-input-edit-h>button.sc-smoothly-input-edit,.sc-smoothly-input-edit-h.sc-smoothly-input-edit-s>smoothly-icon,.sc-smoothly-input-edit-h .sc-smoothly-input-edit-s>smoothly-icon{color:rgb(var(--smoothly-button-foreground));stroke:rgb(var(--smoothly-button-foreground));fill:rgb(var(--smoothly-button-foreground))}[hidden].sc-smoothly-input-edit-h{display:none}.sc-smoothly-input-edit-h:not([display]){display:none}[editable].sc-smoothly-input-edit-h{opacity:0.5}.sc-smoothly-input-edit-h[type="input"].sc-smoothly-input-edit-s>smoothly-button>button{cursor:pointer;filter:opacity(60%);--smoothly-button-foreground:var(--smoothly-input-foreground);background-color:transparent}.sc-smoothly-input-edit-h smoothly-icon.default.sc-smoothly-input-edit{transform:translate(.1em, -.1em)}.sc-smoothly-input-edit-h.sc-smoothly-input-edit-s>button>*+smoothly-icon{display:none}`;const ia=class{constructor(o){t(this,o);this.smoothlyInputLoad=e(this,"smoothlyInputLoad");this.color="tertiary";this.disabled=false;this.display=true;this.type="input";this.tooltip="Edit"}componentWillLoad(){this.smoothlyInputLoad.emit((t=>{if(Xo.type.is(t)){this.parent=t;t.listen((async t=>{this.display=t.readonly}))}}))}clickHandler(){var t;(t=this.parent)===null||t===void 0?void 0:t.edit(true)}render(){var t;return o(s,{key:"66d55a905800c79f0233f8b6bdecabaad8cb1f1c",title:this.tooltip},o("smoothly-button",{key:"b0223593b49e61f9a6c4b3bd2401318493e6c1eb",disabled:this.disabled,size:this.size,type:"button",shape:this.shape,expand:this.expand,color:this.color,fill:(t=this.fill)!==null&&t!==void 0?t:this.type=="input"?"clear":undefined},o("slot",{key:"0b70d6c8b09bcdd5925ee9f68bcdd4d9da849cf0"}),o("smoothly-icon",{key:"dc4374413867b160df4d4f7bdeda25fded4fd59c",class:"default",name:"create-outline",size:"tiny"})))}};ia.style=aa();const la=()=>`.sc-smoothly-input-file-h{--input-padding-side:.5rem;--input-value-padding-top:1.25rem;--input-value-padding-bottom:.25rem;--input-min-height:3rem;min-height:var(--input-min-height);box-sizing:border-box;border-radius:var(--smoothly-input-border-radius)}[looks="border"].sc-smoothly-input-file-h{border:rgb(var(--smoothly-input-border)) solid 1px}[looks="border"].sc-smoothly-input-file-h:not([readonly]):not([disabled]):focus-within{outline:2px solid rgb(var(--smoothly-input-border-focus))}[looks="border"][readonly].sc-smoothly-input-file-h{border:transparent solid 1px}[looks="line"].sc-smoothly-input-file-h{border-bottom:rgb(var(--smoothly-input-border)) solid 1px;position:relative}[looks="line"][readonly].sc-smoothly-input-file-h{border-bottom:transparent solid 1px}[looks="line"].sc-smoothly-input-file-h:not([readonly]):not([disabled]):focus-within::before{content:"";position:absolute;inset:0;pointer-events:none;border-bottom:2px solid rgb(var(--smoothly-input-border-focus));z-index:10}[looks="grid"].sc-smoothly-input-file-h{flex-grow:1;flex-basis:40%;box-shadow:0px 0px 0px 1px rgb(var(--smoothly-input-border));border:none}[looks="grid"][readonly].sc-smoothly-input-file-h{box-shadow:0px 0px 0px 1px rgba(var(--smoothly-input-border-readonly))}[looks="grid"].sc-smoothly-input-file-h:not([readonly]):not([disabled]):focus-within{position:relative;box-shadow:0px 0px 0px 2px rgb(var(--smoothly-input-border-focus));outline:none;z-index:10}[looks="transparent"].sc-smoothly-input-file-h{border:none}[looks="transparent"][readonly].sc-smoothly-input-file-h,[looks="transparent"].sc-smoothly-input-file-h:not(:focus-within){background-color:transparent}[looks="transparent"][readonly].sc-smoothly-input-file-h>input.sc-smoothly-input-file,[looks="transparent"].sc-smoothly-input-file-h:not(:focus-within)>input.sc-smoothly-input-file{background-color:transparent}[looks="transparent"].sc-smoothly-input-file-h:not([readonly]):focus-within{outline:1px solid rgb(var(--smoothly-input-border))}[disabled].sc-smoothly-input-file-h{cursor:not-allowed;--smoothly-input-foreground:var(--smoothly-input-disabled-foreground);--smoothly-input-background:var(--smoothly-input-disabled-background);--smoothly-input-border:var(--smoothly-input-disabled-border)}.sc-smoothly-input-file-h.sc-smoothly-input-file-s>[slot=label],.sc-smoothly-input-file-h .sc-smoothly-input-file-s>[slot=label],.sc-smoothly-input-file-h .label.sc-smoothly-input-file{position:absolute;top:.6rem;opacity:0.8;user-select:none;cursor:inherit;transform-origin:top left;transition:transform 100ms ease}[right].sc-smoothly-input-file-h .label.sc-smoothly-input-file{transform-origin:top right}.sc-smoothly-input-file-h.floating-label.sc-smoothly-input-file-s>[slot=label],.sc-smoothly-input-file-h.floating-label .sc-smoothly-input-file-s>[slot=label],.sc-smoothly-input-file-h.has-value.sc-smoothly-input-file-s>[slot=label],.sc-smoothly-input-file-h.has-value .sc-smoothly-input-file-s>[slot=label],.sc-smoothly-input-file-h[placeholder].sc-smoothly-input-file-s>[slot=label],.sc-smoothly-input-file-h[placeholder] .sc-smoothly-input-file-s>[slot=label],.sc-smoothly-input-file-h[readonly].sc-smoothly-input-file-s>[slot=label],.sc-smoothly-input-file-h[readonly] .sc-smoothly-input-file-s>[slot=label],.floating-label.sc-smoothly-input-file-h .label.sc-smoothly-input-file,.has-value.sc-smoothly-input-file-h .label.sc-smoothly-input-file,.has-text.sc-smoothly-input-file-h .label.sc-smoothly-input-file,[placeholder].sc-smoothly-input-file-h .label.sc-smoothly-input-file,[readonly].sc-smoothly-input-file-h .label.sc-smoothly-input-file,.sc-smoothly-input-file-h:not([readonly]):focus-within .label.float-on-focus.sc-smoothly-input-file{top:.2rem;transform:scale(0.8)}.sc-smoothly-input-file-h:not([show-label]):not(.show-label) .label.sc-smoothly-input-file{display:none}.sc-smoothly-input-file-h smoothly-icon.smoothly-invalid.sc-smoothly-input-file{fill:rgb(var(--smoothly-input-invalid-icon, var(--smoothly-danger-color)))}.sc-smoothly-input-file-h{display:flex;justify-content:space-between;align-items:center;flex-wrap:wrap;overflow:hidden;position:relative;width:100%;padding-left:var(--input-padding-side);background-color:rgb(var(--smoothly-input-background));box-sizing:border-box}.sc-smoothly-input-file-h>div.sc-smoothly-input-file>div.drag-overlay.sc-smoothly-input-file{position:absolute;inset:0;background-color:rgb(var(--smoothly-input-hover-background), 0.6);border-radius:var(--smoothly-input-border-radius);border:0.25rem dashed rgb(var(--smoothly-input-hover-foreground));display:flex;justify-content:center;align-items:center}.sc-smoothly-input-file-h>div.sc-smoothly-input-file>div.drag-overlay.sc-smoothly-input-file>smoothly-icon.sc-smoothly-input-file{color:rgb(var(--smoothly-input-hover-foreground))}.sc-smoothly-input-file-h:not(.dragging)>div.sc-smoothly-input-file>div.drag-overlay.sc-smoothly-input-file{display:none}.sc-smoothly-input-file-h>div.input.sc-smoothly-input-file>input.sc-smoothly-input-file{overflow:hidden;height:0;width:0;padding:0}.sc-smoothly-input-file-h:not([show-label])>div.input.sc-smoothly-input-file{display:flex;align-items:center;padding-bottom:0.2rem}.sc-smoothly-input-file-h:not([show-label])>smoothly-button.sc-smoothly-input-file:not(:empty){margin-right:1ch}[show-label].sc-smoothly-input-file-h>div.input.sc-smoothly-input-file{display:flex;padding-block:var(--input-value-padding-top) var(--input-value-padding-bottom);height:100%;box-sizing:border-box;flex-grow:1}.sc-smoothly-input-file-h>div.sc-smoothly-input-file>smoothly-button.sc-smoothly-input-file{--smoothly-button-height:1.4rem;margin:0;border:none}.sc-smoothly-input-file-h>label.sc-smoothly-input-file{left:var(--input-padding-side)}.sc-smoothly-input-file-h:not([readonly]),.sc-smoothly-input-file-h:not([readonly]) *.sc-smoothly-input-file{cursor:pointer}[disabled].sc-smoothly-input-file-h,[disabled].sc-smoothly-input-file-h *.sc-smoothly-input-file{cursor:not-allowed}`;const na=class{constructor(o){t(this,o);this.smoothlyInputLooks=e(this,"smoothlyInputLooks");this.smoothlyInput=e(this,"smoothlyInput");this.smoothlyUserInput=e(this,"smoothlyUserInput");this.smoothlyInputLoad=e(this,"smoothlyInputLoad");this.smoothlyFormDisable=e(this,"smoothlyFormDisable");this.readonly=false;this.showLabel=true;this.dragging=false;this.isDifferentFromInitial=false;this.observer=Xo.Observer.create(this);this.transfer=new DataTransfer}get files(){this.transfer.items.clear();this.value&&this.transfer.items.add(this.value);return this.transfer.files}async componentWillLoad(){this.smoothlyInputLooks.emit(((t,e)=>{var o;return this.looks=(o=this.looks)!==null&&o!==void 0?o:t,!this.color&&(this.color=e)}));this.smoothlyInput.emit({[this.name]:await this.getValue()});this.smoothlyInputLoad.emit((t=>this.parent=t));!this.readonly&&this.smoothlyFormDisable.emit((t=>this.readonly=t));this.observer.publish()}async disconnectedCallback(){if(!this.element.isConnected){await this.unregister()}}nameChange(t,e){ts.formRename(this,e)}async register(){ts.formAdd(this)}async unregister(){ts.formRemove(this)}async getValue(){return this.value}async clear(){this.value=undefined}smoothlyInputLoadHandler(t){ts.registerSubAction(this,t)}async listen(t){this.observer.subscribe(t)}async edit(t){this.readonly=!t}async reset(){this.value=this.initialValue}async setInitialValue(){this.initialValue=this.value;this.valueChanged()}async binary(){return true}async valueChanged(){this.isDifferentFromInitial=this.initialValue!==this.value;this.smoothlyInput.emit({[this.name]:await this.getValue()});this.observer.publish()}inputHandler(t){var e,o,s;t.stopPropagation();if((o=(e=this.input)===null||e===void 0?void 0:e.files)===null||o===void 0?void 0:o.length){this.value=(s=this.input)===null||s===void 0?void 0:s.files[0];this.smoothlyUserInput.emit({name:this.name,value:this.value})}}dropHandler(t){var e;t.preventDefault();t.stopPropagation();this.dragging=false;if((e=t.dataTransfer)===null||e===void 0?void 0:e.files.length){this.value=t.dataTransfer.files[0];this.smoothlyUserInput.emit({name:this.name,value:this.value})}}clickHandler(t){var e;if(!this.readonly&&!this.disabled&&!t.composedPath().find((t=>t==this.input))){(e=this.input)===null||e===void 0?void 0:e.click()}}dragOverHandler(t){t.preventDefault();t.stopPropagation()}dragEnterHandler(t){t.preventDefault();!this.readonly&&!this.disabled&&(this.dragging=true)}dragLeaveHandler(t){t.stopPropagation();this.dragging=false}render(){var t,e,a;return o(s,{key:"d63c83a8c7d482b7c210c1fded958380954f3b82",class:{dragging:this.dragging,"has-value":!!this.value},tabindex:this.disabled?undefined:0,onClick:t=>this.clickHandler(t),onDragOver:t=>this.dragOverHandler(t),onDragEnter:t=>this.dragEnterHandler(t)},o("label",{key:"cf5fa329f49e4872149c93e8efc9f83878a89bac"},o("slot",{key:"efe68f3fba462c6b2a9ef1a597ea4eb49f0e504c",name:"label"})),o("div",{key:"8e34635be73902eaec3468afb87680daf40ac39e",class:"input"},o("smoothly-button",{key:"23f3be8ca6a8bd78a261ebc79802d7a817a6f4e4",disabled:this.disabled,type:"button",color:this.color,fill:"clear",size:"flexible"},o("slot",{key:"51844c80711695c452a2dd651b7c6c1536daab2f",name:"button"})),o("span",{key:"bdb73c10af8ccf56429e0c5e5e8a535f9059ccbf"},(e=(t=this.value)===null||t===void 0?void 0:t.name)!==null&&e!==void 0?e:this.placeholder),o("div",{key:"818709c47b75b7ca86af458c911b2836541a3a88",class:"drag-overlay",onDrop:t=>this.dropHandler(t),onDragLeave:t=>this.dragLeaveHandler(t)},o("smoothly-icon",{key:"b12c7d64c0b184214abd9b102f7a35c871dfee0c",name:"document-attach-outline"})),o("input",{key:"a636dedfdb289f59476fe9310abaf1d1045c90e5",ref:t=>this.input=t,type:"file",disabled:this.disabled,capture:this.camera=="back"?"environment":"user",accept:(a=this.accept)!==null&&a!==void 0?a:!this.camera?undefined:"image/jpeg",files:this.files,onInput:t=>this.inputHandler(t)})),o("span",{key:"cde8d6765cf6e954504878ffd787df8796c553ec",onClick:t=>t.stopPropagation()},o("slot",{key:"d258247cd13eddc30354c1f10322b82636b7eab2",name:"end"})))}get element(){return a(this)}static get watchers(){return{name:[{nameChange:0}],value:[{valueChanged:0}]}}};na.style=la();const ra=()=>`.sc-smoothly-input-month-h{display:flex;flex-direction:row;justify-content:space-between;background-color:rgb(var(--smoothly-input-background))}.sc-smoothly-input-month-h:not([in-calendar])>smoothly-input-select.sc-smoothly-input-month{display:flex;flex:1}[looks=line].sc-smoothly-input-month-h,[looks=border].sc-smoothly-input-month-h,[looks=transparent].sc-smoothly-input-month-h{gap:2em}.sc-smoothly-input-month-h:not([previous])>smoothly-icon.sc-smoothly-input-month:first-of-type,.sc-smoothly-input-month-h:not([next])>smoothly-icon.sc-smoothly-input-month:last-of-type{display:none}.sc-smoothly-input-month-h>smoothly-icon.sc-smoothly-input-month{display:flex;align-self:center;cursor:pointer}.sc-smoothly-input-month-h>smoothly-icon.disabled.sc-smoothly-input-month{opacity:0.5;cursor:not-allowed}`;const ca=class{constructor(o){t(this,o);this.smoothlyInput=e(this,"smoothlyInput");this.smoothlyUserInput=e(this,"smoothlyUserInput");this.smoothlyInputLoad=e(this,"smoothlyInputLoad");this.smoothlyFormDisable=e(this,"smoothlyFormDisable");this.smoothlyInputLooks=e(this,"smoothlyInputLooks");this.value=C.Date.now();this.next=false;this.previous=false;this.inCalendar=false;this.showLabel=true;this.allowPreviousMonth=true;this.allowNextMonth=true;this.observer=Xo.Observer.create(this)}componentWillLoad(){this.smoothlyInputLooks.emit((t=>{var e;return this.looks=(e=this.looks)!==null&&e!==void 0?e:t}));this.smoothlyInputLoad.emit((t=>this.parent=t));!this.readonly&&this.smoothlyFormDisable.emit((t=>this.readonly=t));this.valueChanged()}valueChanged(){this.smoothlyInput.emit({[this.name]:this.value})}adjustMonth(t){var e;if(!this.readonly){const o=C.Date.parse((e=this.value)!==null&&e!==void 0?e:C.Date.now());o.setMonth(o.getMonth()+t);this.value=C.Date.create(o)}}async disconnectedCallback(){if(!this.element.isConnected){await this.unregister()}}setAllowPreviousMonth(){var t,e;const o=C.Date.previousMonth((t=this.value)!==null&&t!==void 0?t:C.Date.now()).substring(0,7);const s=(e=this.min)===null||e===void 0?void 0:e.substring(0,7);this.allowPreviousMonth=!s||o>=s}setAllowNextMonth(){var t,e;const o=C.Date.nextMonth((t=this.value)!==null&&t!==void 0?t:C.Date.now()).substring(0,7);const s=(e=this.max)===null||e===void 0?void 0:e.substring(0,7);this.allowNextMonth=!s||o<=s}nameChange(t,e){ts.formRename(this,e)}async register(){ts.formAdd(this)}async unregister(){ts.formRemove(this)}async getValue(){return this.value}async clear(){var t,e;(t=this.year)===null||t===void 0?void 0:t.clear();(e=this.month)===null||e===void 0?void 0:e.clear()}async listen(t){this.observer.subscribe(t)}async edit(t){this.readonly=!t}async reset(){var t,e;(t=this.year)===null||t===void 0?void 0:t.reset();(e=this.month)===null||e===void 0?void 0:e.reset()}async setInitialValue(){var t,e;(t=this.year)===null||t===void 0?void 0:t.setInitialValue();(e=this.month)===null||e===void 0?void 0:e.setInitialValue()}inputHandler(t){if(t.target!=this.element){t.stopPropagation();const e=t.detail[`${this.name}-year`];const o=t.detail[`${this.name}-month`];if(o&&C.Date.is(o)){this.value=C.Date.firstOfMonth(o)}else if(e&&C.Date.is(e)){this.value=C.Date.firstOfMonth(e)}}}smoothlyInputLooksHandler(t){if(t.target!=this.element){t.stopPropagation();t.detail(this.looks,this.color)}}async smoothlyInputLoadHandler(t){if(t.target!=this.element){t.stopPropagation()}}render(){var t,e;return o(s,{key:"24ca26112a36f8f6337339152021cd5acfd04408"},o("smoothly-icon",{key:"a67121015379d6a0faadf6eb869324bbfdbd146e",name:"caret-back-outline",size:"tiny",color:this.color,fill:"default",class:{disabled:this.readonly||!this.allowPreviousMonth},onClick:()=>this.allowPreviousMonth&&this.adjustMonth(-1)}),o("smoothly-input-select",{key:"14f7906ad5a9ba3e91afec77d8bd841fc1df5f23",ref:t=>this.year=t,name:`${this.name}-year`,readonly:this.readonly,menuHeight:"5.5items",required:true,ordered:true,inCalendar:this.inCalendar,showLabel:this.showLabel,onSmoothlyInput:t=>this.inputHandler(t),onSmoothlyUserInput:t=>{const e=t.detail.value;if(e&&C.Date.is(e)){const t=C.Date.firstOfMonth(e);this.smoothlyUserInput.emit({name:this.name,value:t})}},searchDisabled:true},o("div",{key:"975e5cf4e7044d3fe0c59eaec95ca4df60b94a84",slot:"label"},o("slot",{key:"f643c99feb9f9c44a45f3edf8e92e053a59ddf34",name:"year-label"})),Wt((t=this.value)!==null&&t!==void 0?t:C.Date.now(),this.min,this.max).map((t=>o("smoothly-item",{key:t.date,value:t.date,selected:t.selected||this.value==t.date},t.name)))),o("smoothly-input-select",{key:"660d45c6f7d8a8e1f0922be07103f9b3af6cdc5b",ref:t=>this.month=t,name:`${this.name}-month`,readonly:this.readonly,color:this.color,looks:this.looks,menuHeight:"5.5items",required:true,ordered:true,inCalendar:this.inCalendar,showLabel:this.showLabel,onSmoothlyInput:t=>this.inputHandler(t),onSmoothlyUserInput:t=>{const e=t.detail.value;if(e&&C.Date.is(e)){const t=C.Date.firstOfMonth(e);this.smoothlyUserInput.emit({name:this.name,value:t})}},searchDisabled:true},o("div",{key:"54ec84b0ce44034e6443f540d8db2e2ab04b20e9",slot:"label"},o("slot",{key:"cc8ef88cf3edc267fe0e8a61222d779df6b91075",name:"month-label"})),Yt((e=this.value)!==null&&e!==void 0?e:C.Date.now()).map((t=>o("smoothly-item",{key:t.date,value:t.date,selected:t.selected||this.value==t.date},t.name)))),o("smoothly-icon",{key:"82ebdb05ec217778b024e7ab30b641c4ce1e5a91",name:"caret-forward-outline",size:"tiny",color:this.color,fill:"default",class:{disabled:this.readonly||!this.allowNextMonth},onClick:()=>this.allowNextMonth&&this.adjustMonth(1)}))}get element(){return a(this)}static get watchers(){return{value:[{valueChanged:0},{setAllowPreviousMonth:0},{setAllowNextMonth:0}],min:[{setAllowPreviousMonth:0}],max:[{setAllowNextMonth:0}],name:[{nameChange:0}]}}};ca.style=ra();const ha=()=>`.sc-smoothly-input-price-demo-h{display:block}`;const da=class{constructor(e){t(this,e);this.currencies=["EUR","USD","GBP"];this.currency="USD"}render(){return o(s,{key:"c7b07f8d277b3a91da7389f15338e1c3ceeb71e6"},o("h2",{key:"1ff6b680677204eb802cb3fe21ed533903c17cca"},"State demo on smoothly-input"),o("p",{key:"5e322e242eb2ef3dc4400e59745e8cf806126735"},"This demo/test the internal state of the smoothly-input component."),o("p",{key:"839cebc0650dbe161f76620a62809a3213f11889"},"The currency of the price should update when switching between the currencies."),o("smoothly-input-radio",{key:"ef6d1e619f0ae3598de284efa24bcfcebcc92e13",name:"currency",onSmoothlyInput:t=>this.currency=C.Currency.is(t.detail.currency)?t.detail.currency:undefined},this.currencies.map((t=>o("smoothly-input-radio-item",{key:t,selected:t==this.currency,value:t},t)))),o("smoothly-input",{key:"36eb82850d2472f5e9e02c88bbdcda3a9a4a8184",type:"price",currency:this.currency},"price"))}};da.style=ha();const ma=()=>`.sc-smoothly-input-radio-h{--input-padding-side:.5rem;--input-value-padding-top:1.25rem;--input-value-padding-bottom:.25rem;--input-min-height:3rem;min-height:var(--input-min-height);box-sizing:border-box;border-radius:var(--smoothly-input-border-radius)}[looks="border"].sc-smoothly-input-radio-h{border:rgb(var(--smoothly-input-border)) solid 1px}[looks="border"].sc-smoothly-input-radio-h:not([readonly]):not([disabled]):focus-within{outline:2px solid rgb(var(--smoothly-input-border-focus))}[looks="border"][readonly].sc-smoothly-input-radio-h{border:transparent solid 1px}[looks="line"].sc-smoothly-input-radio-h{border-bottom:rgb(var(--smoothly-input-border)) solid 1px;position:relative}[looks="line"][readonly].sc-smoothly-input-radio-h{border-bottom:transparent solid 1px}[looks="line"].sc-smoothly-input-radio-h:not([readonly]):not([disabled]):focus-within::before{content:"";position:absolute;inset:0;pointer-events:none;border-bottom:2px solid rgb(var(--smoothly-input-border-focus));z-index:10}[looks="grid"].sc-smoothly-input-radio-h{flex-grow:1;flex-basis:40%;box-shadow:0px 0px 0px 1px rgb(var(--smoothly-input-border));border:none}[looks="grid"][readonly].sc-smoothly-input-radio-h{box-shadow:0px 0px 0px 1px rgba(var(--smoothly-input-border-readonly))}[looks="grid"].sc-smoothly-input-radio-h:not([readonly]):not([disabled]):focus-within{position:relative;box-shadow:0px 0px 0px 2px rgb(var(--smoothly-input-border-focus));outline:none;z-index:10}[looks="transparent"].sc-smoothly-input-radio-h{border:none}[looks="transparent"][readonly].sc-smoothly-input-radio-h,[looks="transparent"].sc-smoothly-input-radio-h:not(:focus-within){background-color:transparent}[looks="transparent"][readonly].sc-smoothly-input-radio-h>input.sc-smoothly-input-radio,[looks="transparent"].sc-smoothly-input-radio-h:not(:focus-within)>input.sc-smoothly-input-radio{background-color:transparent}[looks="transparent"].sc-smoothly-input-radio-h:not([readonly]):focus-within{outline:1px solid rgb(var(--smoothly-input-border))}[disabled].sc-smoothly-input-radio-h{cursor:not-allowed;--smoothly-input-foreground:var(--smoothly-input-disabled-foreground);--smoothly-input-background:var(--smoothly-input-disabled-background);--smoothly-input-border:var(--smoothly-input-disabled-border)}.sc-smoothly-input-radio-h.sc-smoothly-input-radio-s>[slot=label],.sc-smoothly-input-radio-h .sc-smoothly-input-radio-s>[slot=label],.sc-smoothly-input-radio-h .label.sc-smoothly-input-radio{position:absolute;top:.6rem;opacity:0.8;user-select:none;cursor:inherit;transform-origin:top left;transition:transform 100ms ease}[right].sc-smoothly-input-radio-h .label.sc-smoothly-input-radio{transform-origin:top right}.sc-smoothly-input-radio-h.floating-label.sc-smoothly-input-radio-s>[slot=label],.sc-smoothly-input-radio-h.floating-label .sc-smoothly-input-radio-s>[slot=label],.sc-smoothly-input-radio-h.has-value.sc-smoothly-input-radio-s>[slot=label],.sc-smoothly-input-radio-h.has-value .sc-smoothly-input-radio-s>[slot=label],.sc-smoothly-input-radio-h[placeholder].sc-smoothly-input-radio-s>[slot=label],.sc-smoothly-input-radio-h[placeholder] .sc-smoothly-input-radio-s>[slot=label],.sc-smoothly-input-radio-h[readonly].sc-smoothly-input-radio-s>[slot=label],.sc-smoothly-input-radio-h[readonly] .sc-smoothly-input-radio-s>[slot=label],.floating-label.sc-smoothly-input-radio-h .label.sc-smoothly-input-radio,.has-value.sc-smoothly-input-radio-h .label.sc-smoothly-input-radio,.has-text.sc-smoothly-input-radio-h .label.sc-smoothly-input-radio,[placeholder].sc-smoothly-input-radio-h .label.sc-smoothly-input-radio,[readonly].sc-smoothly-input-radio-h .label.sc-smoothly-input-radio,.sc-smoothly-input-radio-h:not([readonly]):focus-within .label.float-on-focus.sc-smoothly-input-radio{top:.2rem;transform:scale(0.8)}.sc-smoothly-input-radio-h:not([show-label]):not(.show-label) .label.sc-smoothly-input-radio{display:none}.sc-smoothly-input-radio-h smoothly-icon.smoothly-invalid.sc-smoothly-input-radio{fill:rgb(var(--smoothly-input-invalid-icon, var(--smoothly-danger-color)))}.sc-smoothly-input-radio-h{background-color:rgb(var(--smoothly-input-background));display:flex;align-items:center;padding-left:var(--input-padding-side);box-sizing:border-box}[show-label].sc-smoothly-input-radio-h>div.sc-smoothly-input-radio{position:relative;padding-block:var(--input-value-padding-top) var(--input-value-padding-bottom)}.sc-smoothly-input-radio-h>div.sc-smoothly-input-radio,.sc-smoothly-input-radio-h>div.sc-smoothly-input-radio>div.options.sc-smoothly-input-radio{display:flex;gap:1.5rem;width:100%}[direction=column].sc-smoothly-input-radio-h>div.sc-smoothly-input-radio>div.options.sc-smoothly-input-radio{flex-direction:column}.sc-smoothly-input-radio-h.sc-smoothly-input-radio-s>[slot=end]{margin-right:0;margin-left:auto}[disabled].sc-smoothly-input-radio-h smoothly-input-radio-item.sc-smoothly-input-radio *.sc-smoothly-input-radio{cursor:not-allowed}`;const ya=class{constructor(o){t(this,o);this.smoothlyInputLooks=e(this,"smoothlyInputLooks");this.smoothlyInput=e(this,"smoothlyInput");this.smoothlyUserInput=e(this,"smoothlyUserInput");this.smoothlyInputLoad=e(this,"smoothlyInputLoad");this.smoothlyFormDisable=e(this,"smoothlyFormDisable");this.isDifferentFromInitial=false;this.valueReceivedOnLoad=false;this.observer=Xo.Observer.create(this);this.value=undefined;this.readonly=false;this.showLabel=true}componentWillLoad(){this.smoothlyInputLooks.emit(((t,e)=>{var o;return this.looks=(o=this.looks)!==null&&o!==void 0?o:t,this.color=e}));!this.readonly&&this.smoothlyFormDisable.emit((t=>this.readonly=t));this.observer.publish()}componentDidLoad(){!this.valueReceivedOnLoad&&this.smoothlyInput.emit({[this.name]:this.value});this.smoothlyInputLoad.emit((t=>this.parent=t));this.initialValue=this.active}handleRegister(t){t.stopPropagation();t.detail(this)}smoothlyInputLoadHandler(t){ts.registerSubAction(this,t)}smoothlyRadioInputHandler(t){var e,o,s;t.stopPropagation();if(!this.readonly&&!this.disabled||!this.valueReceivedOnLoad){if(this.clearable&&((e=this.active)===null||e===void 0?void 0:e.value)===t.detail.value){this.clear()}else if(((o=this.active)===null||o===void 0?void 0:o.value)!==t.detail.value){(s=this.active)===null||s===void 0?void 0:s.select(false);this.active=t.detail;this.value=this.active.value;this.active.select(true)}}if(t.detail.userInitiated){this.smoothlyUserInput.emit({name:this.name,value:this.value})}!this.valueReceivedOnLoad&&(this.valueReceivedOnLoad=!this.valueReceivedOnLoad)}async listen(t){this.observer.subscribe(t)}async disconnectedCallback(){if(!this.element.isConnected){await this.unregister()}}nameChange(t,e){ts.formRename(this,e)}async register(){ts.formAdd(this)}async unregister(){ts.formRemove(this)}async getValue(){return this.value}async clear(){var t;if(this.clearable){(t=this.active)===null||t===void 0?void 0:t.select(false);this.active=undefined;this.value=undefined}}async edit(t){this.readonly=!t}async reset(){var t,e,o;(t=this.active)===null||t===void 0?void 0:t.select(false);this.active=this.initialValue;this.value=(e=this.initialValue)===null||e===void 0?void 0:e.value;(o=this.active)===null||o===void 0?void 0:o.select(true)}async setInitialValue(){this.initialValue=this.active;this.valueChanged()}async valueChanged(){var t;this.valueReceivedOnLoad&&(this.isDifferentFromInitial=((t=this.initialValue)===null||t===void 0?void 0:t.value)!==this.value);this.smoothlyInput.emit({[this.name]:await this.getValue()});this.observer.publish()}watchingReadonly(){this.observer.publish()}render(){return o(s,{key:"9fc1e8e96700c712be6093737a8fe0b1ac85b78f",class:"floating-label"},o("slot",{key:"5a15933d73444cd550b51374b441c1da91671ec1",name:"start"}),o("div",{key:"cc7434af11b658917d8f7505b6575627a832ca13"},o("slot",{key:"2f9427184a5c285cb7f0201a5782eae9631df43a",name:"label"}),o("div",{key:"021d9fe6508e9726a8a80da21c5d0245e091cd06",class:"options"},o("slot",{key:"3e683b89f8cfb733fc8fb42cc2c7269e4317a2a8"}))),o("slot",{key:"197ca8b9be9417179baee6f4d558e4afcd4f4a76",name:"end"}))}get element(){return a(this)}static get watchers(){return{name:[{nameChange:0}],value:[{valueChanged:0}],disabled:[{watchingReadonly:0}],readonly:[{watchingReadonly:0}]}}};ya.style=ma();const ba=()=>`.sc-smoothly-input-radio-item-h{display:flex;flex-wrap:wrap;align-items:center;position:relative}smoothly-input-radio:not([disabled]):not([readonly]) .sc-smoothly-input-radio-item-h>*.sc-smoothly-input-radio-item{cursor:pointer}smoothly-input-radio[disabled] .sc-smoothly-input-radio-item-h>*.sc-smoothly-input-radio-item{cursor:not-allowed}.sc-smoothly-input-radio-item-h>input.sc-smoothly-input-radio-item:focus-visible+smoothly-icon.sc-smoothly-input-radio-item{outline:2px solid rgb(var(--smoothly-primary-color));border-radius:1px}.sc-smoothly-input-radio-item-h>smoothly-icon.sc-smoothly-input-radio-item{--smoothly-color-contrast:var(--smoothly-input-foreground)}smoothly-input-radio:not([disabled]):not([readonly]) .sc-smoothly-input-radio-item-h>smoothly-icon[name=checkmark-circle].sc-smoothly-input-radio-item{--smoothly-color-contrast:var(--smoothly-success-color)}.sc-smoothly-input-radio-item-h>input.sc-smoothly-input-radio-item{opacity:0;z-index:1;width:1.5em;height:1.5em;position:absolute}.sc-smoothly-input-radio-item-h>label.sc-smoothly-input-radio-item{padding:0 .3em;white-space:nowrap}.sc-smoothly-input-radio-item-h[selected].sc-smoothly-input-radio-item-s>[slot="detail"],.sc-smoothly-input-radio-item-h[selected] .sc-smoothly-input-radio-item-s>[slot="detail"]{display:block;width:100%}.sc-smoothly-input-radio-item-h.sc-smoothly-input-radio-item-s>[slot="detail"],.sc-smoothly-input-radio-item-h .sc-smoothly-input-radio-item-s>[slot="detail"]{display:none}`;const ua=class{constructor(o){t(this,o);this.smoothlyRadioItemSelect=e(this,"smoothlyRadioItemSelect");this.smoothlyRadioItemRegister=e(this,"smoothlyRadioItemRegister");this.selected=false}componentWillLoad(){this.smoothlyRadioItemRegister.emit((t=>{this.name=t.name;t.listen((async t=>{if(ts.is(t)){this.disabled=t.disabled}}))}));this.selected&&this.inputHandler(false)}inputHandler(t){this.smoothlyRadioItemSelect.emit({value:this.value,selected:this.selected,select:t=>this.selected=t,userInitiated:t})}render(){return o(s,{key:"1b1afa5ebdb26239b0a7229c3ee1aeb8e41ba05b",onClick:()=>this.inputHandler(true)},o("input",{key:"1b738c88ce589a0ff9d8ef4b805126a8f308c9fc",name:this.name,type:"radio",checked:this.selected,disabled:this.disabled}),o("smoothly-icon",{key:"4b7630b061c6abd992b5e5d9ae7d492ac7234dba",name:this.selected?"checkmark-circle":"ellipse-outline",size:"small",tooltip:"Select"}),o("label",{key:"f2aca1d982c9cdcda621bb08d529b266c1d80f05"},o("slot",{key:"05f1fcbf282038d10ab95b98629d41a423e913af"})),o("slot",{key:"baa173c7a12a735a701dcfbdd99cbd66f6d3440a",name:"detail"}))}get element(){return a(this)}};ua.style=ba();var pa;(function(t){function e(t){return typeof t=="object"&&t!=undefined&&"start"in t&&"end"in t}t.is=e;function o(t,e,o){return t<e?e:t>o?o:t}t.clamp=o;function s(t,e){var o,s;const a=!e?undefined:(s=(o=e.toString().split(".")[1])===null||o===void 0?void 0:o.length)!==null&&s!==void 0?s:0;return+t.toFixed(a)}t.round=s;function a(t,e,s,a,i){const l=o(s,a,i);return e=="start"?{start:Math.min(l,t.end),end:t.end}:{start:t.start,end:Math.max(l,t.start)}}t.setPart=a;function i(t,o){return e(t)?{start:s(t.start,o),end:s(t.end,o)}:t==undefined||Number.isNaN(t)?undefined:s(t,o)}t.normalize=i;function l(t,o){return e(t)&&e(o)?t.start===o.start&&t.end===o.end:t===o}t.equals=l;function n(t){return e(t)?typeof t.start=="number"&&typeof t.end=="number":typeof t=="number"}t.defined=n;function r(t,e,o){return o==e?0:(t-e)/(o-e)*100}t.percent=r})(pa||(pa={}));const fa=()=>`.sc-smoothly-input-range-h{--input-padding-side:.5rem;--input-value-padding-top:1.25rem;--input-value-padding-bottom:.25rem;--input-min-height:3rem;min-height:var(--input-min-height);box-sizing:border-box;border-radius:var(--smoothly-input-border-radius)}[looks="border"].sc-smoothly-input-range-h{border:rgb(var(--smoothly-input-border)) solid 1px}[looks="border"].sc-smoothly-input-range-h:not([readonly]):not([disabled]):focus-within{outline:2px solid rgb(var(--smoothly-input-border-focus))}[looks="border"][readonly].sc-smoothly-input-range-h{border:transparent solid 1px}[looks="line"].sc-smoothly-input-range-h{border-bottom:rgb(var(--smoothly-input-border)) solid 1px;position:relative}[looks="line"][readonly].sc-smoothly-input-range-h{border-bottom:transparent solid 1px}[looks="line"].sc-smoothly-input-range-h:not([readonly]):not([disabled]):focus-within::before{content:"";position:absolute;inset:0;pointer-events:none;border-bottom:2px solid rgb(var(--smoothly-input-border-focus));z-index:10}[looks="grid"].sc-smoothly-input-range-h{flex-grow:1;flex-basis:40%;box-shadow:0px 0px 0px 1px rgb(var(--smoothly-input-border));border:none}[looks="grid"][readonly].sc-smoothly-input-range-h{box-shadow:0px 0px 0px 1px rgba(var(--smoothly-input-border-readonly))}[looks="grid"].sc-smoothly-input-range-h:not([readonly]):not([disabled]):focus-within{position:relative;box-shadow:0px 0px 0px 2px rgb(var(--smoothly-input-border-focus));outline:none;z-index:10}[looks="transparent"].sc-smoothly-input-range-h{border:none}[looks="transparent"][readonly].sc-smoothly-input-range-h,[looks="transparent"].sc-smoothly-input-range-h:not(:focus-within){background-color:transparent}[looks="transparent"][readonly].sc-smoothly-input-range-h>input.sc-smoothly-input-range,[looks="transparent"].sc-smoothly-input-range-h:not(:focus-within)>input.sc-smoothly-input-range{background-color:transparent}[looks="transparent"].sc-smoothly-input-range-h:not([readonly]):focus-within{outline:1px solid rgb(var(--smoothly-input-border))}[disabled].sc-smoothly-input-range-h{cursor:not-allowed;--smoothly-input-foreground:var(--smoothly-input-disabled-foreground);--smoothly-input-background:var(--smoothly-input-disabled-background);--smoothly-input-border:var(--smoothly-input-disabled-border)}.sc-smoothly-input-range-h.sc-smoothly-input-range-s>[slot=label],.sc-smoothly-input-range-h .sc-smoothly-input-range-s>[slot=label],.sc-smoothly-input-range-h .label.sc-smoothly-input-range{position:absolute;top:.6rem;opacity:0.8;user-select:none;cursor:inherit;transform-origin:top left;transition:transform 100ms ease}[right].sc-smoothly-input-range-h .label.sc-smoothly-input-range{transform-origin:top right}.sc-smoothly-input-range-h.floating-label.sc-smoothly-input-range-s>[slot=label],.sc-smoothly-input-range-h.floating-label .sc-smoothly-input-range-s>[slot=label],.sc-smoothly-input-range-h.has-value.sc-smoothly-input-range-s>[slot=label],.sc-smoothly-input-range-h.has-value .sc-smoothly-input-range-s>[slot=label],.sc-smoothly-input-range-h[placeholder].sc-smoothly-input-range-s>[slot=label],.sc-smoothly-input-range-h[placeholder] .sc-smoothly-input-range-s>[slot=label],.sc-smoothly-input-range-h[readonly].sc-smoothly-input-range-s>[slot=label],.sc-smoothly-input-range-h[readonly] .sc-smoothly-input-range-s>[slot=label],.floating-label.sc-smoothly-input-range-h .label.sc-smoothly-input-range,.has-value.sc-smoothly-input-range-h .label.sc-smoothly-input-range,.has-text.sc-smoothly-input-range-h .label.sc-smoothly-input-range,[placeholder].sc-smoothly-input-range-h .label.sc-smoothly-input-range,[readonly].sc-smoothly-input-range-h .label.sc-smoothly-input-range,.sc-smoothly-input-range-h:not([readonly]):focus-within .label.float-on-focus.sc-smoothly-input-range{top:.2rem;transform:scale(0.8)}.sc-smoothly-input-range-h:not([show-label]):not(.show-label) .label.sc-smoothly-input-range{display:none}.sc-smoothly-input-range-h smoothly-icon.smoothly-invalid.sc-smoothly-input-range{fill:rgb(var(--smoothly-input-invalid-icon, var(--smoothly-danger-color)))}*.sc-smoothly-input-range{box-sizing:border-box}.sc-smoothly-input-range-h{position:relative;width:100%;justify-content:center;align-items:center;display:flex;background-color:rgb(var(--smoothly-input-background));box-sizing:border-box}.sc-smoothly-input-range-h>div.sc-smoothly-input-range:not([slot]){position:relative;display:flex;justify-content:center;align-items:center;width:100%;padding-right:var(--input-padding-side)}.sc-smoothly-input-range-h>div.sc-smoothly-input-range>smoothly-input.sc-smoothly-input-range{width:12em;--input-min-height:calc(3rem - 2px);--smoothly-input-border-focus:none}.sc-smoothly-input-range-h>div.sc-smoothly-input-range>smoothly-input.sc-smoothly-input-range label.sc-smoothly-input-range{white-space:nowrap}.output-side-right.sc-smoothly-input-range-h>div.sc-smoothly-input-range{padding:0}.output-side-right.sc-smoothly-input-range-h>div.sc-smoothly-input-range>smoothly-input.sc-smoothly-input-range{text-align:center;margin-left:var(--input-padding-side);border:none;box-sizing:border-box;width:6rem;order:3;margin:0}.output-side-right.sc-smoothly-input-range-h>div.sc-smoothly-input-range>smoothly-display.sc-smoothly-input-range,.sc-smoothly-input-range-h:not(.output-side-right)>div.sc-smoothly-input-range>label.sc-smoothly-input-range{display:none}.output-side-right.sc-smoothly-input-range-h>div.sc-smoothly-input-range>smoothly-input.sc-smoothly-input-range input.sc-smoothly-input-range{padding:0;text-align:center}.output-side-right.sc-smoothly-input-range-h>div.sc-smoothly-input-range>smoothly-input.sc-smoothly-input-range label.sc-smoothly-input-range{width:100%}.output-side-right.sc-smoothly-input-range-h>div.sc-smoothly-input-range>label.sc-smoothly-input-range{position:static;font-size:inherit;text-align:center;margin:0 var(--input-padding-side)}.sc-smoothly-input-range-h>div.sc-smoothly-input-range>input[type=range].sc-smoothly-input-range{-webkit-appearance:none;width:100%;background:transparent;height:1.5em;padding:0 .4em}.sc-smoothly-input-range-h>div.sc-smoothly-input-range>input[type=range].sc-smoothly-input-range::-webkit-slider-thumb{-webkit-appearance:none;height:0.8em;width:0.8em;border-radius:100%;margin-top:-.25em;border:none}.sc-smoothly-input-range-h:not([disabled]):not([readonly])>div.sc-smoothly-input-range>input[type=range].sc-smoothly-input-range::-webkit-slider-thumb{background-color:rgb(var(--smoothly-primary-color));cursor:pointer}.sc-smoothly-input-range-h>div.sc-smoothly-input-range>input[type=range].sc-smoothly-input-range::-moz-range-thumb{height:0.8em;width:0.8em;border-radius:100%;border:none;background-color:rgb(var(--smoothly-input-foreground))}.sc-smoothly-input-range-h:not([disabled]):not([readonly])>div.sc-smoothly-input-range>input[type=range].sc-smoothly-input-range::-moz-range-thumb{background-color:rgb(var(--smoothly-primary-color));cursor:pointer}.sc-smoothly-input-range-h>div.sc-smoothly-input-range>input[type=range].sc-smoothly-input-range::-webkit-slider-runnable-track{height:.3rem;border-radius:20px;background-color:rgb(var(--smoothly-input-foreground))}.sc-smoothly-input-range-h:not([disabled]):not([readonly])>div.sc-smoothly-input-range>input[type=range].sc-smoothly-input-range::-webkit-slider-runnable-track{background-color:rgb(var(--smoothly-primary-color));cursor:pointer}.sc-smoothly-input-range-h>div.sc-smoothly-input-range>input[type=range].sc-smoothly-input-range::-moz-range-track{width:100%;height:.3rem;border-radius:20px;background-color:rgb(var(--smoothly-input-foreground))}.sc-smoothly-input-range-h:not([disabled]):not([readonly])>div.sc-smoothly-input-range>input[type=range].sc-smoothly-input-range::-moz-range-track{background-color:rgb(var(--smoothly-primary-color));cursor:pointer}.sc-smoothly-input-range-h:not([value]):not([disabled]):not([readonly])>div.sc-smoothly-input-range>input[type=range].sc-smoothly-input-range::-webkit-slider-runnable-track{background-color:rgb(var(--smoothly-primary-tint))}.sc-smoothly-input-range-h:not([value]):not([disabled]):not([readonly])>div.sc-smoothly-input-range>input[type=range].sc-smoothly-input-range::-moz-range-track{background-color:rgb(var(--smoothly-primary-tint))}[disabled].sc-smoothly-input-range-h>div.sc-smoothly-input-range>input[type=range].sc-smoothly-input-range::-webkit-slider-thumb,[disabled].sc-smoothly-input-range-h>div.sc-smoothly-input-range>input[type=range].sc-smoothly-input-range::-moz-range-thumb,[disabled].sc-smoothly-input-range-h>div.sc-smoothly-input-range>input[type=range].sc-smoothly-input-range::-webkit-slider-runnable-track,[disabled].sc-smoothly-input-range-h>div.sc-smoothly-input-range>input[type=range].sc-smoothly-input-range::-moz-range-track,[disabled].sc-smoothly-input-range-h,[disabled].sc-smoothly-input-range-h *.sc-smoothly-input-range{cursor:not-allowed}input.sc-smoothly-input-range::-webkit-outer-spin-button,input.sc-smoothly-input-range::-webkit-inner-spin-button{-webkit-appearance:none;margin:0}.dual.sc-smoothly-input-range-h>div.sc-smoothly-input-range>smoothly-input.sc-smoothly-input-range{width:7rem;flex:0 0 auto}.dual.sc-smoothly-input-range-h .track.sc-smoothly-input-range{position:relative;flex:1;height:1.5em;display:flex;align-items:center}.dual.sc-smoothly-input-range-h .track.sc-smoothly-input-range::before{content:"";position:absolute;left:.4em;right:.4em;height:.3rem;border-radius:20px;background-color:rgb(var(--smoothly-input-foreground))}.dual.sc-smoothly-input-range-h .fill.sc-smoothly-input-range{position:absolute;height:.3rem;border-radius:20px;background-color:rgb(var(--smoothly-primary-color));pointer-events:none}.dual[readonly].sc-smoothly-input-range-h .fill.sc-smoothly-input-range,.dual[disabled].sc-smoothly-input-range-h .fill.sc-smoothly-input-range{background-color:rgb(var(--smoothly-input-foreground))}.dual.sc-smoothly-input-range-h .track.sc-smoothly-input-range>input[type=range].sc-smoothly-input-range{position:absolute;left:0;right:0;width:100%;margin:0;background:transparent;pointer-events:none}.dual.sc-smoothly-input-range-h .track.sc-smoothly-input-range>input[type=range].sc-smoothly-input-range::-webkit-slider-runnable-track{background:transparent}.dual.sc-smoothly-input-range-h .track.sc-smoothly-input-range>input[type=range].sc-smoothly-input-range::-moz-range-track{background:transparent}.dual.sc-smoothly-input-range-h .track.sc-smoothly-input-range>input[type=range].sc-smoothly-input-range::-webkit-slider-thumb{pointer-events:auto}.dual.sc-smoothly-input-range-h .track.sc-smoothly-input-range>input[type=range].sc-smoothly-input-range::-moz-range-thumb{pointer-events:auto}.dual.sc-smoothly-input-range-h .track.sc-smoothly-input-range>input[type=range].sc-smoothly-input-range{-webkit-appearance:none}.dual.sc-smoothly-input-range-h .track.sc-smoothly-input-range>input[type=range].sc-smoothly-input-range::-webkit-slider-runnable-track{height:.3rem}.dual.sc-smoothly-input-range-h .track.sc-smoothly-input-range>input[type=range].sc-smoothly-input-range::-moz-range-track{height:.3rem}.dual.sc-smoothly-input-range-h .track.sc-smoothly-input-range>input[type=range].sc-smoothly-input-range::-webkit-slider-thumb{-webkit-appearance:none;height:0.8em;width:0.8em;margin-top:-.25em;border-radius:100%;border:none;background-color:rgb(var(--smoothly-input-foreground))}.dual.sc-smoothly-input-range-h:not([disabled]):not([readonly]) .track.sc-smoothly-input-range>input[type=range].sc-smoothly-input-range::-webkit-slider-thumb{background-color:rgb(var(--smoothly-primary-color));cursor:pointer}.dual.sc-smoothly-input-range-h .track.sc-smoothly-input-range>input[type=range].sc-smoothly-input-range::-moz-range-thumb{height:0.8em;width:0.8em;border-radius:100%;border:none;background-color:rgb(var(--smoothly-input-foreground))}.dual.sc-smoothly-input-range-h:not([disabled]):not([readonly]) .track.sc-smoothly-input-range>input[type=range].sc-smoothly-input-range::-moz-range-thumb{background-color:rgb(var(--smoothly-primary-color));cursor:pointer}.dual[disabled].sc-smoothly-input-range-h .track.sc-smoothly-input-range>input[type=range].sc-smoothly-input-range::-webkit-slider-thumb,.dual[disabled].sc-smoothly-input-range-h .track.sc-smoothly-input-range>input[type=range].sc-smoothly-input-range::-moz-range-thumb{cursor:not-allowed}`;const ga=class{constructor(o){t(this,o);this.smoothlyInputLooks=e(this,"smoothlyInputLooks");this.smoothlyInput=e(this,"smoothlyInput");this.smoothlyUserInput=e(this,"smoothlyUserInput");this.smoothlyInputLoad=e(this,"smoothlyInputLoad");this.smoothlyFormDisable=e(this,"smoothlyFormDisable");this.isDifferentFromInitial=false;this.observer=Xo.Observer.create(this);this.initialValue=undefined;this.sliding=false;this.value=undefined;this.dual=false;this.defined=false;this.readonly=false;this.type="text";this.min=0;this.max=100;this.name="range";this.outputSide="left";this.showInput=false}componentWillLoad(){this.smoothlyInputLooks.emit(((t,e)=>{var o;return this.looks=(o=this.looks)!==null&&o!==void 0?o:t,this.color=e}));this.smoothlyInputLoad.emit((t=>this.parent=t));!this.readonly&&this.smoothlyFormDisable.emit((t=>this.readonly=t));if(this.dual&&!pa.is(this.value)){this.initialValue={start:this.min,end:this.max};this.value=this.initialValue}else{this.value&&(this.initialValue=this.value);this.valueChanged()}}smoothlyInputLoadHandler(t){ts.registerSubAction(this,t)}smoothlyInputLooksHandler(t){if(t.target!=this.element){t.stopPropagation()}}async disconnectedCallback(){if(!this.element.isConnected){await this.unregister()}}nameChange(t,e){ts.formRename(this,e)}async register(){ts.formAdd(this)}async unregister(){ts.formRemove(this)}async getValue(){return this.value}async clear(){this.value=undefined}async listen(t){this.observer.subscribe(t)}async edit(t){this.readonly=!t}async reset(){this.value=this.initialValue}async setInitialValue(){this.initialValue=this.value;this.isDifferentFromInitial=false;this.valueChanged()}valueChanged(){const t=pa.normalize(this.value,this.step);if(!pa.equals(t,this.value)){this.value=t;return}this.isDifferentFromInitial=!pa.equals(this.initialValue,this.value);this.defined=pa.defined(this.value);if(!this.sliding){this.observer.publish();this.smoothlyInput.emit({[this.name]:this.value})}}watchingReadonly(){this.observer.publish()}setValue(t){var e;if(t==undefined||Number.isNaN(t)){this.value=undefined}else if(t<this.min){this.value=this.min}else if(t>this.max){this.value=this.max}else{this.value=t}this.input&&(this.input.value=this.type=="text"?(e=this.value)===null||e===void 0?void 0:e.toString():this.value)}setRange(t,e){const o=pa.is(this.value)?this.value:{start:this.min,end:this.max};const s=e==undefined||Number.isNaN(e)?t=="start"?this.min:this.max:e;const a=pa.setPart(o,t,s,this.min,this.max);if(pa.equals(a,this.value)){return}this.value=a;const i=t=="start"?this.startInput:this.endInput;const l=a[t];i&&(i.value=this.type=="text"?l.toString():l);!this.sliding&&this.smoothlyUserInput.emit({name:this.name,value:this.value})}async commitField(t){const e=t=="start"?this.startInput:this.endInput;this.setRange(t,e?Number(await e.getValue()):undefined);const o=pa.is(this.value)?this.value[t]:undefined;e===null||e===void 0?void 0:e.setValue(this.type=="text"?o===null||o===void 0?void 0:o.toString():o)}renderSingle(){var t,e,s;return[o("smoothly-input",{ref:t=>this.input=t,looks:undefined,color:this.color,name:this.name,showLabel:this.outputSide==="left"&&!!this.label,type:this.type,onSmoothlyInputLoad:async t=>(t.stopPropagation(),this.setValue(ts.Element.is(t.target)?Number(await t.target.getValue()):undefined)),onSmoothlyBlur:t=>t.stopPropagation(),onSmoothlyInput:async t=>{t.stopPropagation();this.setValue(ts.Element.is(t.target)?Number(await t.target.getValue()):undefined)},value:this.type=="percent"?this.value:(t=this.value)===null||t===void 0?void 0:t.toString(),placeholder:this.outputSide==="right"?"-":undefined,readonly:this.readonly,disabled:this.disabled},this.label),o("smoothly-display",{label:(this.type=="percent"?this.min*100:this.min).toString()}),o("input",{name:this.name,part:"range",type:"range",min:this.min,max:this.max,step:(e=this.step)!==null&&e!==void 0?e:"any",disabled:this.readonly||this.disabled,onInput:t=>{t.stopPropagation();this.sliding=true;this.setValue(t.target.valueAsNumber)},onChange:t=>{t.stopPropagation();this.sliding=false;this.observer.publish();this.smoothlyInput.emit({[this.name]:this.value});this.smoothlyUserInput.emit({name:this.name,value:this.value})},value:(s=this.value)!==null&&s!==void 0?s:this.min}),o("smoothly-display",{label:(this.type=="percent"?this.max*100:this.max).toString()})]}renderDual(){const t=pa.is(this.value)?this.value:{start:this.min,end:this.max};const e=pa.percent(t.start,this.min,this.max);const s=100-pa.percent(t.end,this.min,this.max);return[this.renderField("start",t.start),o("div",{class:"track",part:"track"},o("div",{class:"fill",part:"fill",style:{left:`${e}%`,right:`${s}%`}}),this.renderRangeInput("start",t.start),this.renderRangeInput("end",t.end)),this.renderField("end",t.end)]}renderField(t,e){return o("smoothly-input",{ref:e=>t=="start"?this.startInput=e:this.endInput=e,class:t,color:this.color,name:`${this.name}-${t}`,showLabel:true,type:this.type,onSmoothlyBlur:e=>(e.stopPropagation(),this.commitField(t)),onSmoothlyKeydown:e=>void(e.detail.key=="Enter"&&this.commitField(t)),onSmoothlyInput:t=>t.stopPropagation(),onSmoothlyUserInput:t=>t.stopPropagation(),value:this.type=="percent"?e:e===null||e===void 0?void 0:e.toString(),readonly:this.readonly,disabled:this.disabled,right:t=="start"},`${this.label?this.label:""} ${t=="start"?"From":"To"}`)}renderRangeInput(t,e){var s;return o("input",{part:t=="start"?"range range-start":"range range-end",type:"range",min:this.min,max:this.max,step:(s=this.step)!==null&&s!==void 0?s:"any",disabled:this.readonly||this.disabled,onInput:e=>{const o=e.target;e.stopPropagation();this.sliding=true;this.setRange(t,o.valueAsNumber);const s=pa.is(this.value)?this.value[t]:undefined;s!=undefined&&(o.value=String(s))},onChange:t=>{t.stopPropagation();this.sliding=false;this.observer.publish();this.smoothlyInput.emit({[this.name]:this.value});this.smoothlyUserInput.emit({name:this.name,value:this.value})},value:e!==null&&e!==void 0?e:t=="start"?this.min:this.max})}render(){return o(s,{key:"e6c7859a0b3d9d7aa65954e2bf5ab27645b5a247",class:{"output-side-right":this.outputSide==="right","show-label":this.dual||this.outputSide==="left"&&!!this.label,dual:this.dual}},o("slot",{key:"e6536df1839f5784ec98811059c0b7b75fbcf2e5",name:"start"}),o("div",{key:"aecd457a3c0d380d5cb8c890361490663f4843fd"},o("label",{key:"f87b1212516a92ffdd5ddf541b0c2c556b9dfa89",htmlFor:this.name},this.label),this.dual?this.renderDual():this.renderSingle()),o("slot",{key:"a2055f612918cec6ea2961264bc135beab00310e",name:"end"}))}get element(){return a(this)}static get watchers(){return{name:[{nameChange:0}],value:[{valueChanged:0}],disabled:[{watchingReadonly:0}],readonly:[{watchingReadonly:0}]}}};ga.style=fa();const ka=class{constructor(e){t(this,e)}render(){return o(s,{key:"93085adc52dbed67cd824108eaaf64b3bda0fb6e"},o("h2",{key:"a91437c641e21986ad592c73f92a14234eddb9b9"},"Range"),o("h3",{key:"5003225e9af30f278a7f37ccc1daab93df370e80"},"Phone Number"),o("smoothly-input-range",{key:"38c9a1cf1be25dec16410ca010c5ae734746e28b",name:"first",min:7e8,max:799999999,step:1,label:"Phone Number"}),o("h3",{key:"d698c7cc1fe2f6a8bd6acdeadfa2ed1e5feaada1"},"Stars out of ten"),o("smoothly-input-range",{key:"dc0f9fa7347edbdcb7bbe8ea454fd9f45f4d9415",name:"stars",max:10,step:1,label:"Stars"}),o("h3",{key:"0a9a613efb97dd6c8493de427aec5c24408cc4fa"},"Percent"),o("smoothly-input-range",{key:"ded29f7d3daac293b6c27a19869b31c91775a14f",name:"percent",type:"percent",max:1,step:.01,label:"Percent"}),o("h3",{key:"589f59a5a0fb056d09d73bb233e2d255630bc951"},"With icon at start and clear button"),o("smoothly-input-range",{key:"80a584d2d100d35cc573c3e4c08345a83c2722d4",step:1,name:"withClear",label:"Select"},o("smoothly-icon",{key:"9aeb80b3577a69016be5ce6e5bb874e08d58e435",name:"checkmark-circle",slot:"start"}),o("smoothly-input-clear",{key:"61d3b0a8b0e97c94a8eb1f042c0b7ee60891d90b",size:"icon",slot:"end"})),o("h3",{key:"a4cca86315fe12f0f65925efaf9e9996cd6437b7"},"Dual (start / end)"),o("smoothly-input-range",{key:"14e337185e98ff57664e34a50df68f1999818680",dual:true,min:90.86,max:1e7,step:1,name:"dualRange",label:"Range"}),o("h3",{key:"6bcd7e2e726e75faea6b630eb65baea6aa867cd9"},"Dual percent"),o("smoothly-input-range",{key:"33a08332e9ee254819afbff1bff39c8e84edd6e1",dual:true,name:"dualRangePercent",type:"percent",min:0,max:1,step:.01},o("smoothly-input-clear",{key:"e4125366bf47fb0dafda9fa254f88c023af2760f",size:"icon",slot:"end"})))}};const va=()=>`[color=default].sc-smoothly-input-reset{--smoothly-color:var(--smoothly-default-color);--smoothly-color-contrast:var(--smoothly-default-contrast);--smoothly-color-shade:var(--smoothly-default-shade);--smoothly-color-tint:var(--smoothly-default-tint)}[color=primary].sc-smoothly-input-reset{--smoothly-color:var(--smoothly-primary-color);--smoothly-color-contrast:var(--smoothly-primary-contrast);--smoothly-color-shade:var(--smoothly-primary-shade);--smoothly-color-tint:var(--smoothly-primary-tint)}[color=secondary].sc-smoothly-input-reset{--smoothly-color:var(--smoothly-secondary-color);--smoothly-color-contrast:var(--smoothly-secondary-contrast);--smoothly-color-shade:var(--smoothly-secondary-shade);--smoothly-color-tint:var(--smoothly-secondary-tint)}[color=tertiary].sc-smoothly-input-reset{--smoothly-color:var(--smoothly-tertiary-color);--smoothly-color-contrast:var(--smoothly-tertiary-contrast);--smoothly-color-shade:var(--smoothly-tertiary-shade);--smoothly-color-tint:var(--smoothly-tertiary-tint)}[color=success].sc-smoothly-input-reset{--smoothly-color:var(--smoothly-success-color);--smoothly-color-contrast:var(--smoothly-success-contrast);--smoothly-color-shade:var(--smoothly-success-shade);--smoothly-color-tint:var(--smoothly-success-tint)}[color=warning].sc-smoothly-input-reset{--smoothly-color:var(--smoothly-warning-color);--smoothly-color-contrast:var(--smoothly-warning-contrast);--smoothly-color-shade:var(--smoothly-warning-shade);--smoothly-color-tint:var(--smoothly-warning-tint)}[color=danger].sc-smoothly-input-reset{--smoothly-color:var(--smoothly-danger-color);--smoothly-color-contrast:var(--smoothly-danger-contrast);--smoothly-color-shade:var(--smoothly-danger-shade);--smoothly-color-tint:var(--smoothly-danger-tint)}[color=light].sc-smoothly-input-reset{--smoothly-color:var(--smoothly-light-color);--smoothly-color-contrast:var(--smoothly-light-contrast);--smoothly-color-shade:var(--smoothly-light-shade);--smoothly-color-tint:var(--smoothly-light-tint)}[color=medium].sc-smoothly-input-reset{--smoothly-color:var(--smoothly-medium-color);--smoothly-color-contrast:var(--smoothly-medium-contrast);--smoothly-color-shade:var(--smoothly-medium-shade);--smoothly-color-tint:var(--smoothly-medium-tint)}[color=dark].sc-smoothly-input-reset{--smoothly-color:var(--smoothly-dark-color);--smoothly-color-contrast:var(--smoothly-dark-contrast);--smoothly-color-shade:var(--smoothly-dark-shade);--smoothly-color-tint:var(--smoothly-dark-tint)}.sc-smoothly-input-reset-h{--smoothly-button-border-radius:0.5rem;display:inline-flex;box-sizing:border-box;border-radius:var(--smoothly-button-border-radius);font-size:var(--smoothly-button-font-size, 1rem);cursor:pointer;border:none;outline:none;position:relative}[shape=rounded].sc-smoothly-input-reset-h{--smoothly-button-border-radius:2rem}[type=link].sc-smoothly-input-reset-h{display:inline}[disabled].sc-smoothly-input-reset-h{opacity:0.5}.sc-smoothly-input-reset-h>a.sc-smoothly-input-reset{font-weight:400;background-color:transparent}.sc-smoothly-input-reset-h>a.sc-smoothly-input-reset,.sc-smoothly-input-reset-h>button.sc-smoothly-input-reset{font-size:var(--smoothly-button-font-size);border:1px solid transparent;outline:none;cursor:pointer;display:inline-flex;gap:0.5rem;box-sizing:border-box}.sc-smoothly-input-reset-h>button.sc-smoothly-input-reset{font-weight:bold;justify-content:center;width:100%;align-items:center;border-radius:var(--smoothly-button-border-radius);padding-inline:var(--smoothly-button-padding-inline, 1rem)}.sc-smoothly-input-reset-h{min-height:var(--smoothly-button-height, 2.5rem)}.sc-smoothly-input-reset-h:has(>a:empty),.sc-smoothly-input-reset-h:has(>button:empty),.sc-smoothly-input-reset-h>a.sc-smoothly-input-reset:empty,.sc-smoothly-input-reset-h>button.sc-smoothly-input-reset:empty{border-width:0;min-height:0;padding-inline:0}[size=small].sc-smoothly-input-reset-h{--smoothly-button-height:2rem;--smoothly-button-padding-inline:0.75rem;--smoothly-button-font-size:0.875rem;--smoothly-icon-size:1.4rem}[size=large].sc-smoothly-input-reset-h{--smoothly-button-height:3rem;--smoothly-button-padding-inline:1.25rem;--smoothly-button-font-size:1.125rem}.sc-smoothly-input-reset-h:not([size=icon]):not([size=flexible])>button.sc-smoothly-input-reset{min-width:8rem}[size=icon].sc-smoothly-input-reset-h{--smoothly-icon-size:1.4rem}[size=icon].sc-smoothly-input-reset-h>button.sc-smoothly-input-reset{min-height:var(--smoothly-button-height, 2.5rem);min-width:var(--smoothly-button-height, 2.5rem);padding:0}.sc-smoothly-input-reset-h:not([size=icon]){min-width:8em}[size=flexible].sc-smoothly-input-reset-h{min-width:unset;padding:0;margin:0;display:flex;justify-content:center}[size=flexible].sc-smoothly-input-reset-h>button.sc-smoothly-input-reset{min-width:unset;padding:0;margin:0}[expand].sc-smoothly-input-reset-h{width:100%}[expand=full].sc-smoothly-input-reset-h{border-left:none;border-right:none;--smoothly-button-border-radius:0}[fill=outline].sc-smoothly-input-reset-h>button.sc-smoothly-input-reset{background-color:transparent;color:rgb(var(--smoothly-button-foreground));fill:rgb(var(--smoothly-button-foreground));stroke:rgb(var(--smoothly-button-foreground));border-color:rgb(var(--smoothly-button-foreground))}.sc-smoothly-input-reset-h:not([fill=clear]):not([disabled])>button.sc-smoothly-input-reset:hover,.sc-smoothly-input-reset-h:not([disabled])>button.sc-smoothly-input-reset:focus-visible,[fill=outline].sc-smoothly-input-reset-h:not([disabled]):active>button.sc-smoothly-input-reset::before{border-color:rgb(var(--smoothly-button-focus-color))}[fill=outline].sc-smoothly-input-reset-h:not([disabled])>button.sc-smoothly-input-reset:hover::before,[fill=outline].sc-smoothly-input-reset-h:not([disabled])>button.sc-smoothly-input-reset:focus-within::before,[fill=outline].sc-smoothly-input-reset-h:not([disabled])>button.sc-smoothly-input-reset:active::before{content:"";position:absolute;border:2px solid rgb(var(--smoothly-button-focus-border));inset:-1px;border-radius:var(--smoothly-button-border-radius)}.sc-smoothly-input-reset-h:not([fill=clear]):not([fill=outline]):not([disabled])>button.sc-smoothly-input-reset:hover,.sc-smoothly-input-reset-h:not([fill=clear]):not([fill=outline]):not([disabled])>button.sc-smoothly-input-reset:focus-visible,.sc-smoothly-input-reset-h:not([fill=clear]):not([fill=outline]):not([disabled])>button.sc-smoothly-input-reset:active{background:rgb(var(--smoothly-button-hover-background))}.sc-smoothly-input-reset-h>button.sc-smoothly-input-reset,.sc-smoothly-input-reset-h.sc-smoothly-input-reset-s>smoothly-icon,.sc-smoothly-input-reset-h .sc-smoothly-input-reset-s>smoothly-icon{color:rgb(var(--smoothly-button-foreground));stroke:rgb(var(--smoothly-button-foreground));fill:rgb(var(--smoothly-button-foreground))}[hidden].sc-smoothly-input-reset-h{display:none}.sc-smoothly-input-reset-h:not([display]){display:none}.sc-smoothly-input-reset-h[type="input"].sc-smoothly-input-reset-s>smoothly-button>button{cursor:pointer;filter:opacity(60%);--smoothly-button-foreground:var(--smoothly-input-foreground);background-color:transparent}.sc-smoothly-input-reset-h.sc-smoothly-input-reset-s>smoothly-button>button>*+smoothly-icon{display:none}[disabled].sc-smoothly-input-reset-h{cursor:not-allowed}.sc-smoothly-input-reset-h[type="input"]:hover.sc-smoothly-input-reset-s>smoothly-icon,.sc-smoothly-input-reset-h[type="input"]:hover .sc-smoothly-input-reset-s>smoothly-icon{cursor:pointer;filter:opacity(100%)}`;const wa=class{constructor(o){t(this,o);this.smoothlyInputLoad=e(this,"smoothlyInputLoad");this.size="icon";this.display=true;this.type="input";this.tooltip="Reset"}async componentWillLoad(){this.smoothlyInputLoad.emit((t=>{if(Xo.Element.type.is(t)){this.parent=t;t.listen((async t=>{if(ts.is(t)){const e=typeof t.defined=="boolean"?t.defined:Boolean(await t.getValue());this.display=t.readonly||!e?false:t.isDifferentFromInitial}if(t instanceof os){this.display=!t.readonly}}));if(typeof this.disabled!=="boolean"){this.readonlyAtLoad=t.readonly;t.listen((async t=>{if(t instanceof os){this.disabled=!this.readonlyAtLoad&&!t.isDifferentFromInitial}}))}}}))}clickHandler(t){var e,o;t.stopPropagation();(e=this.parent)===null||e===void 0?void 0:e.reset();this.parent instanceof os&&this.readonlyAtLoad&&((o=this.parent)===null||o===void 0?void 0:o.edit(false))}render(){var t;return o(s,{key:"13185b139b729ca9597dc2677c2014684c250ce7",title:this.tooltip},o("smoothly-button",{key:"34f4dc13947bbdc6b1975cdfd2b3bc868cb7a941",disabled:this.disabled,size:this.size,type:"button",shape:this.shape,expand:this.expand,color:this.color,fill:(t=this.fill)!==null&&t!==void 0?t:this.type=="input"?"clear":undefined,onClick:t=>this.clickHandler(t)},o("slot",{key:"1add7cbbb4b0cc5372156c4b6f448cc5a7d52380"}),o("smoothly-icon",{key:"af9284edf39c8b346903e42fc51dcb20bb7ad7c3",flip:"x",name:"refresh-outline",size:"tiny"})))}};wa.style=va();var xa;(function(t){let e;(function(t){t.type=m({value:z(),deselectable:b(),selected:b().optional(),filter:y()});t.is=t.type.is})(e=t.Element||(t.Element={}));t.type=e.type.extend({});t.is=t.type.is})(xa||(xa={}));var Ca;(function(t){function e(t){var e;return(e=t.find((t=>t.clientHeight>0)))===null||e===void 0?void 0:e.clientHeight}t.firstItemHeight=e;function o(t,e,o){var s,a;const i=o.endsWith("items")?`${e*+((a=(s=o.match(/^(\d+(\.\d+)?|\.\d+)/g))===null||s===void 0?void 0:s[0])!==null&&a!==void 0?a:"10")}px`:o;t.style.setProperty("--menu-height",i)}t.applyMenuHeight=o;function s(t){t===null||t===void 0?void 0:t.style.setProperty("--element-height",`${t.clientHeight}px`)}t.applyElementHeight=s})(Ca||(Ca={}));var Sa;(function(t){function e(t,e){const o=t.filter((t=>!t.hidden&&!t.disabled));const s=o.findIndex((t=>t.marked));let a;if(s==-1){a=0}else{a=(s+e+o.length)%o.length}return{current:o[s],next:o[a]}}t.next=e;function o(t){return t.some((t=>!t.getAttribute("hidden")))}t.hasVisibleItems=o;function s(t,e){t.map((t=>t.marked=t===e))}t.markOnly=s;function a(t){return t.find((t=>t.selected))}t.findFirstSelected=a;function i(t){return t.find((t=>t.marked))}t.findFirstMarked=i})(Sa||(Sa={}));var za;(function(t){function e(t,e,o="smooth"){var s;if(e&&t){t.scrollTo({top:e.offsetTop+e.offsetHeight/2-((s=t.clientHeight)!==null&&s!==void 0?s:0)/2,behavior:o})}}t.centerInView=e})(za||(za={}));const Ia=()=>`.sc-smoothly-input-select-h{--input-padding-side:.5rem;--input-value-padding-top:1.25rem;--input-value-padding-bottom:.25rem;--input-min-height:3rem;min-height:var(--input-min-height);box-sizing:border-box;border-radius:var(--smoothly-input-border-radius)}[looks="border"].sc-smoothly-input-select-h{border:rgb(var(--smoothly-input-border)) solid 1px}[looks="border"].sc-smoothly-input-select-h:not([readonly]):not([disabled]):focus-within{outline:2px solid rgb(var(--smoothly-input-border-focus))}[looks="border"][readonly].sc-smoothly-input-select-h{border:transparent solid 1px}[looks="line"].sc-smoothly-input-select-h{border-bottom:rgb(var(--smoothly-input-border)) solid 1px;position:relative}[looks="line"][readonly].sc-smoothly-input-select-h{border-bottom:transparent solid 1px}[looks="line"].sc-smoothly-input-select-h:not([readonly]):not([disabled]):focus-within::before{content:"";position:absolute;inset:0;pointer-events:none;border-bottom:2px solid rgb(var(--smoothly-input-border-focus));z-index:10}[looks="grid"].sc-smoothly-input-select-h{flex-grow:1;flex-basis:40%;box-shadow:0px 0px 0px 1px rgb(var(--smoothly-input-border));border:none}[looks="grid"][readonly].sc-smoothly-input-select-h{box-shadow:0px 0px 0px 1px rgba(var(--smoothly-input-border-readonly))}[looks="grid"].sc-smoothly-input-select-h:not([readonly]):not([disabled]):focus-within{position:relative;box-shadow:0px 0px 0px 2px rgb(var(--smoothly-input-border-focus));outline:none;z-index:10}[looks="transparent"].sc-smoothly-input-select-h{border:none}[looks="transparent"][readonly].sc-smoothly-input-select-h,[looks="transparent"].sc-smoothly-input-select-h:not(:focus-within){background-color:transparent}[looks="transparent"][readonly].sc-smoothly-input-select-h>input.sc-smoothly-input-select,[looks="transparent"].sc-smoothly-input-select-h:not(:focus-within)>input.sc-smoothly-input-select{background-color:transparent}[looks="transparent"].sc-smoothly-input-select-h:not([readonly]):focus-within{outline:1px solid rgb(var(--smoothly-input-border))}[disabled].sc-smoothly-input-select-h{cursor:not-allowed;--smoothly-input-foreground:var(--smoothly-input-disabled-foreground);--smoothly-input-background:var(--smoothly-input-disabled-background);--smoothly-input-border:var(--smoothly-input-disabled-border)}.sc-smoothly-input-select-h.sc-smoothly-input-select-s>[slot=label],.sc-smoothly-input-select-h .sc-smoothly-input-select-s>[slot=label],.sc-smoothly-input-select-h .label.sc-smoothly-input-select{position:absolute;top:.6rem;opacity:0.8;user-select:none;cursor:inherit;transform-origin:top left;transition:transform 100ms ease}[right].sc-smoothly-input-select-h .label.sc-smoothly-input-select{transform-origin:top right}.sc-smoothly-input-select-h.floating-label.sc-smoothly-input-select-s>[slot=label],.sc-smoothly-input-select-h.floating-label .sc-smoothly-input-select-s>[slot=label],.sc-smoothly-input-select-h.has-value.sc-smoothly-input-select-s>[slot=label],.sc-smoothly-input-select-h.has-value .sc-smoothly-input-select-s>[slot=label],.sc-smoothly-input-select-h[placeholder].sc-smoothly-input-select-s>[slot=label],.sc-smoothly-input-select-h[placeholder] .sc-smoothly-input-select-s>[slot=label],.sc-smoothly-input-select-h[readonly].sc-smoothly-input-select-s>[slot=label],.sc-smoothly-input-select-h[readonly] .sc-smoothly-input-select-s>[slot=label],.floating-label.sc-smoothly-input-select-h .label.sc-smoothly-input-select,.has-value.sc-smoothly-input-select-h .label.sc-smoothly-input-select,.has-text.sc-smoothly-input-select-h .label.sc-smoothly-input-select,[placeholder].sc-smoothly-input-select-h .label.sc-smoothly-input-select,[readonly].sc-smoothly-input-select-h .label.sc-smoothly-input-select,.sc-smoothly-input-select-h:not([readonly]):focus-within .label.float-on-focus.sc-smoothly-input-select{top:.2rem;transform:scale(0.8)}.sc-smoothly-input-select-h:not([show-label]):not(.show-label) .label.sc-smoothly-input-select{display:none}.sc-smoothly-input-select-h smoothly-icon.smoothly-invalid.sc-smoothly-input-select{fill:rgb(var(--smoothly-input-invalid-icon, var(--smoothly-danger-color)))}.sc-smoothly-input-select-h{display:flex;justify-content:space-between;flex-direction:row;position:relative;background-color:rgb(var(--smoothly-input-background));color:rgb(var(--smoothly-input-foreground));fill:rgb(var(--smoothly-input-foreground));stroke:rgb(var(--smoothly-input-foreground));padding-left:var(--input-padding-side)}.open.sc-smoothly-input-select-h{border-radius:var(--smoothly-input-border-radius) var(--smoothly-input-border-radius) 0 0}.sc-smoothly-input-select-h>.select-display.sc-smoothly-input-select{box-sizing:border-box;display:flex;padding:var(--input-value-padding-top) .8rem var(--input-value-padding-bottom) 0;width:100%;white-space:nowrap;gap:1rem}.sc-smoothly-input-select-h>.select-display.sc-smoothly-input-select>.value.sc-smoothly-input-select{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.sc-smoothly-input-select-h:not([readonly]):not([disabled])>.select-display.sc-smoothly-input-select{cursor:pointer}.sc-smoothly-input-select-h:not(:has([slot=label]))>.select-display.sc-smoothly-input-select,.sc-smoothly-input-select-h:not([show-label])>.select-display.sc-smoothly-input-select{padding:.6rem .8rem .6rem 0;align-items:center}.sc-smoothly-input-select-h>.select-display.sc-smoothly-input-select smoothly-icon.sc-smoothly-input-select{color:rgb(var(--smoothly-input-foreground));fill:rgb(var(--smoothly-input-foreground));stroke:rgb(var(--smoothly-input-foreground))}.sc-smoothly-input-select-h>div.icons.sc-smoothly-input-select{display:flex;flex-direction:row;align-items:center}.sc-smoothly-input-select-h:hover>div.icons.sc-smoothly-input-select-s>smoothly-icon{filter:opacity(100%)}.sc-smoothly-input-select-h>div.icons.sc-smoothly-input-select>smoothly-icon[name=caret-down-outline].sc-smoothly-input-select,.sc-smoothly-input-select-h>div.icons.sc-smoothly-input-select>smoothly-icon[name=caret-forward-outline].sc-smoothly-input-select{opacity:.7;height:100%;padding-inline:var(--input-padding-side)}.sc-smoothly-input-select-h:not([readonly]):not([disabled])>div.icons.sc-smoothly-input-select>smoothly-icon[name=caret-down-outline].sc-smoothly-input-select,.sc-smoothly-input-select-h:not([readonly]):not([disabled])>div.icons.sc-smoothly-input-select>smoothly-icon[name=caret-forward-outline].sc-smoothly-input-select{cursor:pointer}[invalid].sc-smoothly-input-select-h>div.sc-smoothly-input-select>smoothly-icon.smoothly-invalid.sc-smoothly-input-select{display:block;padding:0.5rem}.sc-smoothly-input-select-h>div.sc-smoothly-input-select>smoothly-icon.smoothly-invalid.sc-smoothly-input-select{display:none}.has-value.sc-smoothly-input-select-h:has([slot=label]:not(:empty))>.select-display.sc-smoothly-input-select,.sc-smoothly-input-select-h:not(.has-value)[placeholder]>.select-display.sc-smoothly-input-select{overflow:hidden;width:100%}.sc-smoothly-input-select-h>.dropdown.sc-smoothly-input-select{display:flex;flex-direction:column;position:absolute;top:var(--element-height);z-index:20;max-height:var(--menu-height, unset);overflow-x:hidden;overflow-y:auto;background-color:rgb(var(--smoothly-input-background));inset-inline:0;border-radius:0 0 var(--smoothly-input-border-radius) var(--smoothly-input-border-radius);border:rgb(var(--smoothly-input-border, var(--smoothly-color-contrast))) solid 1px;border-top:rgba(var(--smoothly-input-border, var(--smoothly-color-contrast)), .4) solid 1px}.sc-smoothly-input-select-h:not(.open)>.dropdown.sc-smoothly-input-select{border:0}[looks="grid"].sc-smoothly-input-select-h>.dropdown.sc-smoothly-input-select,[looks=border].sc-smoothly-input-select-h>.dropdown.sc-smoothly-input-select,[looks="transparent"].sc-smoothly-input-select-h>.dropdown.sc-smoothly-input-select{inset-inline:-1px}.sc-smoothly-input-select-h>.dropdown.sc-smoothly-input-select>.search.sc-smoothly-input-select{display:flex;position:sticky;align-items:center;top:0;gap:1rem;padding:.7rem .7rem .7rem .25rem;background-color:rgb(var(--smoothly-input-background));color:rgb(var(--smoothly-input-foreground, var(--smoothly-color-contrast)));fill:rgb(var(--smoothly-input-foreground, var(--smoothly-color-contrast)));stroke:rgb(var(--smoothly-input-foreground, var(--smoothly-color-contrast)))}.has-filter-persistent.sc-smoothly-input-select-h>.dropdown.sc-smoothly-input-select>.search.sc-smoothly-input-select{z-index:1}.sc-smoothly-input-select-h:not(.has-filter):not(.has-filter-persistent)>.dropdown.sc-smoothly-input-select>.search.sc-smoothly-input-select{height:0;padding:0;overflow:hidden;pointer-events:none}.sc-smoothly-input-select-h>.dropdown.sc-smoothly-input-select>.search.sc-smoothly-input-select::before{content:"";position:absolute;inset:0;background-color:rgba(var(--smoothly-primary-tint), 0.5);z-index:-1}.sc-smoothly-input-select-h>.dropdown.sc-smoothly-input-select>.search.sc-smoothly-input-select>.search-input.sc-smoothly-input-select{width:100%;background-color:transparent;border:none;outline:none}.sc-smoothly-input-select-h>.dropdown.sc-smoothly-input-select>.search.sc-smoothly-input-select>smoothly-icon[name="search-outline"].sc-smoothly-input-select,.sc-smoothly-input-select-h>.dropdown.sc-smoothly-input-select>.search.sc-smoothly-input-select>smoothly-icon[name="backspace-outline"].sc-smoothly-input-select{color:rgb(var(--smoothly-input-foreground, var(--smoothly-color-contrast)));fill:rgb(var(--smoothly-input-foreground, var(--smoothly-color-contrast)));stroke:rgb(var(--smoothly-input-foreground, var(--smoothly-color-contrast)))}.sc-smoothly-input-select-h[multiple].sc-smoothly-input-select-s>.dropdown>.menu>smoothly-item{position:relative}.sc-smoothly-input-select-h[multiple].sc-smoothly-input-select-s>.dropdown>.menu>smoothly-item::before{content:"";display:inline-block;width:1rem;height:1rem;margin-right:0.5rem;border:1px solid rgb(var(--smoothly-input-foreground));border-radius:0.15rem;vertical-align:middle}.sc-smoothly-input-select-h[multiple].sc-smoothly-input-select-s>.dropdown>.menu>smoothly-item[selected]::before{border-color:rgb(var(--smoothly-item-selected-foreground))}.sc-smoothly-input-select-h[multiple].sc-smoothly-input-select-s>.dropdown>.menu>smoothly-item:hover::before{border:1px solid rgb(var(--smoothly-item-hover-foreground))}.sc-smoothly-input-select-h[multiple].sc-smoothly-input-select-s>.dropdown>.menu>smoothly-item[selected]::after{content:"✔";position:absolute;left:0.65rem;color:rgb(var(--smoothly-item-selected-foreground))}.sc-smoothly-input-select-h[multiple].sc-smoothly-input-select-s>.dropdown>.menu>smoothly-item:hover::after{color:rgb(var(--smoothly-item-hover-foreground))}.sc-smoothly-input-select-h>.dropdown.sc-smoothly-input-select{min-width:fit-content}.sc-smoothly-input-select-h>.dropdown.sc-smoothly-input-select>.menu[hidden].sc-smoothly-input-select{display:none}`;const Ta=class{constructor(o){t(this,o);this.smoothlyInput=e(this,"smoothlyInput");this.smoothlyUserInput=e(this,"smoothlyUserInput");this.smoothlyInputLooks=e(this,"smoothlyInputLooks");this.smoothlyInputLoad=e(this,"smoothlyInputLoad");this.smoothlyFormDisable=e(this,"smoothlyFormDisable");this.smoothlyItemSelect=e(this,"smoothlyItemSelect");this.smoothlySelectOpen=e(this,"smoothlySelectOpen");this.smoothlyFilterChange=e(this,"smoothlyFilterChange");this.isDifferentFromInitial=false;this.initialValue=[];this.initialValueHandled=false;this.observer=Xo.Observer.create(this);this.items=[];this.displaySeparator='<span style="display:inline-block;width:0.8rem"></span>';this.invalid=false;this.name="selected";this.showLabel=true;this.showSelected=true;this.readonly=false;this.disabled=false;this.inCalendar=false;this.multiple=false;this.clearable=true;this.defined=false;this.required=false;this.searchDisabled=false;this.isSearchPersistent=false;this.mutable=false;this.lastOpen=false;this.open=false;this.selected=[];this.filter="";this.addedItems=[];this.display=[]}componentWillLoad(){this.smoothlyInputLooks.emit(((t,e)=>{var o;return this.looks=(o=this.looks)!==null&&o!==void 0?o:t,!this.color&&(this.color=e)}));this.smoothlyInputLoad.emit((t=>this.parent=t));!this.readonly&&this.smoothlyFormDisable.emit((t=>this.readonly=t));this.observer.publish()}componentDidLoad(){this.selected&&!this.initialValueHandled&&(this.initialValue=[...this.selected]);this.initialValueHandled=true;this.onSelectedChange()}componentDidRender(){var t;(t=this.itemHeight)!==null&&t!==void 0?t:this.itemHeight=Ca.firstItemHeight(this.items);if(this.menuHeight&&this.itemHeight){Ca.applyMenuHeight(this.element,this.itemHeight,this.menuHeight)}Ca.applyElementHeight(this.element);const e=this.open&&!this.lastOpen;if(e&&this.ordered){this.scrollToSelected()}}scrollToSelected(){const t=Sa.findFirstSelected(this.items);if(t){Sa.markOnly(this.items,t);za.centerInView(this.dropdownElement,t,"instant")}}async disconnectedCallback(){if(!this.element.isConnected){await this.unregister()}}nameChange(t,e){ts.formRename(this,e)}async register(){ts.formAdd(this)}async unregister(){ts.formRemove(this)}async getValue(){return!this.multiple&&this.selected[0]?this.selected[0].value:this.multiple&&this.selected.length>0?this.selected.map((t=>t.value)):undefined}async getItems(){return this.items}async listen(t){this.observer.subscribe(t)}async reset(){this.selected.forEach((t=>t.selected=t.hidden=false));this.initialValue.forEach((t=>t.selected=true));this.selected=[...this.initialValue];this.displaySelected();this.isDifferentFromInitial=false;this.closeMenu()}async clear(){if(this.clearable){this.selected.forEach((t=>t.selected=t.hidden=false));this.selected=[];this.displaySelected()}}async edit(t){this.readonly=!t}async setInitialValue(){this.isDifferentFromInitial=false;this.initialValue=[...this.selected]}async onSelectedChange(){this.initialValueHandled&&(this.isDifferentFromInitial=!this.areValuesEqual(this.selected,this.initialValue));this.defined=this.selected.length>0;this.smoothlyInput.emit({[this.name]:await this.getValue()});this.observer.publish()}onRequiredChange(){this.items.forEach((t=>t.deselectable=!this.required))}async onFilterChange(t){t=t.toLowerCase();this.smoothlyFilterChange.emit(this.filter);await Promise.all(this.items.map((e=>e.filter(t))))}watchingReadonly(){this.observer.publish()}async smoothlyInputLoadHandler(t){const e=t.target&&"name"in t.target&&t.target.name!==this.name;const o=t.composedPath().some((t=>t==this.iconsElement));if(e||o){t.stopPropagation()}else if(xa.Element.is(t.target)){t.stopPropagation();t.target.deselectable=!this.required;this.items.push(t.target)}ts.registerSubAction(this,t);this.displaySelected()}onWindowClick(t){if(this.open&&!t.composedPath().includes(this.element)){this.closeMenu()}}onItemDomChange(t){t.stopPropagation();const e=t.target;if(e.selected){this.displaySelected()}}async onItemSelect(t){t.stopPropagation();const e=t.detail.item;if(this.multiple){this.selected=e.selected?[...this.selected,e]:this.selected.filter((t=>t.selected))}else if(e.selected||!this.items.some((t=>t.selected))){this.selected[0]&&(this.selected[0].hidden=this.selected[0].selected=false);this.selected=!e.selected?this.selected.filter((t=>t.selected)):[e];!this.showSelected&&e.selected&&(e.hidden=true)}this.displaySelected();if(t.detail.userInitiated){this.smoothlyUserInput.emit({name:this.name,value:await this.getValue()})}}onClosed(t,e){this.lastOpen=e;if(!t){const t=Sa.findFirstMarked(this.items);if(t){t.marked=false}}this.smoothlySelectOpen.emit(t)}areValuesEqual(t,e){return t.length===e.length&&e.every((e=>t.includes(e)))}displaySelected(){this.display=this.selected.map((t=>{const e=t.cloneNode(true);e.querySelectorAll("smoothly-icon").forEach((t=>{const e=t.style;e.display="inline-flex";e.verticalAlign="middle"}));return e.innerHTML}))}onKeyDown(t){t.stopPropagation();const e=t.key;if(e=="ArrowUp"||e=="ArrowDown"){t.preventDefault();this.handlerNavigate(e)}else if(e=="Escape"){t.preventDefault();this.handleEscape()}else if(e=="Enter"){t.preventDefault();this.handleEnter()}else if(e==" "&&!this.open){t.preventDefault();this.openMenu()}else if(this.open&&e=="Tab"){this.closeMenu()}}handlerNavigate(t){if(Sa.hasVisibleItems(this.items)){this.move(t=="ArrowUp"?-1:1)}this.openMenu()}handleEscape(){if(this.filter){this.resetFilter()}else{this.closeMenu()}}handleEnter(){const t=Sa.findFirstMarked(this.items);if(t===null||t===void 0?void 0:t.value){t.selected=!t.selected}if(!this.multiple){this.closeMenu();this.resetFilter()}}move(t){const{current:e,next:o}=Sa.next(this.items,t);e&&(e.marked=false);o.marked=true;za.centerInView(this.dropdownElement,o,"smooth")}addItem(){this.addedItems=this.addedItems.concat(o("smoothly-item",{value:this.filter,selected:true},this.filter))}resetFilter(){this.searchElement&&(this.searchElement.value="");this.filter=""}setFilter(t){if(t){this.filter=t;this.openMenu()}else{this.resetFilter()}}openMenu({focus:t}={}){this.open=true;t&&queueMicrotask((()=>{var t;return(t=this.searchElement)===null||t===void 0?void 0:t.focus()}))}closeMenu(){this.open=false;this.resetFilter()}toggleMenu(){if(!this.readonly&&!this.disabled){this.open?this.closeMenu():this.openMenu({focus:true})}}onClick(t){const e=t.composedPath().includes(this.iconsElement)&&!t.composedPath().includes(this.toggleElement);const o=t.composedPath().includes(this.searchElement);const s=t.composedPath().find((t=>t instanceof HTMLElement&&t.tagName==="SMOOTHLY-ITEM"));if(!e&&!o&&!(s&&this.multiple)){this.toggleMenu()}}render(){return o(s,{key:"25f2bd12bdd838b7405297411a103aeee38d3c5d",class:{"has-value":this.selected.length!==0,open:this.open,"has-filter":this.filter!=="","has-filter-persistent":this.open&&this.isSearchPersistent},onClick:t=>this.onClick(t)},o("div",{key:"95302cdb09bcd5c218e5f05baed904f24dba193a",class:"select-display"},this.display.length>0?o("div",{class:"value",innerHTML:this.display.join(this.displaySeparator)}):this.placeholder),o("div",{key:"fee48291df4fe018b7bd2933cdfc3ddfb9fc469c",class:"icons",ref:t=>this.iconsElement=t},o("smoothly-icon",{key:"8686946d896e5812bb2137c7d564cee0f55a879d",class:"smoothly-invalid",name:"alert-circle",size:"small",tooltip:this.errorMessage}),o("slot",{key:"2fa1e318cf0388d3b9bc937962899c1e3308ba18",name:"end"}),this.looks=="border"&&!this.readonly&&o("smoothly-icon",{key:"0caad9d99e1bc011fbb60b8682556b95149173c3",ref:t=>this.toggleElement=t,size:"tiny",name:this.open?"caret-down-outline":"caret-forward-outline"})),o("slot",{key:"8c3c7a67b3b0d71302bb92bd093b0a16b0382e91",name:"label"}),o("div",{key:"3e7875eeac42fd417c7b47a69830ebb28f34978e",class:"dropdown",ref:t=>this.dropdownElement=t},o("div",{key:"c7053135260263324b3f6a3d933694746df5231d",class:"search"},o("smoothly-icon",{key:"cc144d8b70e0fdb87749c033a03a279840b3d0ba",name:"search-outline",size:"small"}),o("input",{key:"ec12d0f1eeb5786cea018e42289e6b98dc269012",class:"search-input",placeholder:this.searchPlaceholder,ref:t=>this.searchElement=t,disabled:this.searchDisabled,onKeyDown:t=>this.onKeyDown(t),onInput:t=>{var e,o;return t.stopPropagation(),this.setFilter((o=(e=this.searchElement)===null||e===void 0?void 0:e.value)!==null&&o!==void 0?o:"")},onPaste:t=>{var e,o;return t.stopPropagation(),this.setFilter((o=(e=this.searchElement)===null||e===void 0?void 0:e.value)!==null&&o!==void 0?o:"")}}),o("smoothly-icon",{key:"1883da80f3a3f34f3fb83ab2c856e8e9edf4a43a",name:"backspace-outline",size:"small",onClick:()=>{var t;this.resetFilter();(t=this.searchElement)===null||t===void 0?void 0:t.focus()}}),this.mutable&&o("smoothly-icon",{key:"612c07080f7b81e0e3998ce3176e9b44c0c34fa3",name:"add",size:"small",onClick:()=>this.addItem()})),o("div",{key:"27c8a711d5f14efcf0a0e0a74e7276f3b5e19230",class:"menu",hidden:!this.open},o("slot",{key:"ac93c1d16f9ee11c1ed486b1f9d4ed190e665e83"}),this.addedItems)))}get element(){return a(this)}static get watchers(){return{name:[{nameChange:0}],selected:[{onSelectedChange:0}],required:[{onRequiredChange:0}],filter:[{onFilterChange:0}],disabled:[{watchingReadonly:0}],readonly:[{watchingReadonly:0}],open:[{onClosed:0}]}}};Ta.style=Ia();const Da=()=>`[color=default].sc-smoothly-input-submit{--smoothly-color:var(--smoothly-default-color);--smoothly-color-contrast:var(--smoothly-default-contrast);--smoothly-color-shade:var(--smoothly-default-shade);--smoothly-color-tint:var(--smoothly-default-tint)}[color=primary].sc-smoothly-input-submit{--smoothly-color:var(--smoothly-primary-color);--smoothly-color-contrast:var(--smoothly-primary-contrast);--smoothly-color-shade:var(--smoothly-primary-shade);--smoothly-color-tint:var(--smoothly-primary-tint)}[color=secondary].sc-smoothly-input-submit{--smoothly-color:var(--smoothly-secondary-color);--smoothly-color-contrast:var(--smoothly-secondary-contrast);--smoothly-color-shade:var(--smoothly-secondary-shade);--smoothly-color-tint:var(--smoothly-secondary-tint)}[color=tertiary].sc-smoothly-input-submit{--smoothly-color:var(--smoothly-tertiary-color);--smoothly-color-contrast:var(--smoothly-tertiary-contrast);--smoothly-color-shade:var(--smoothly-tertiary-shade);--smoothly-color-tint:var(--smoothly-tertiary-tint)}[color=success].sc-smoothly-input-submit{--smoothly-color:var(--smoothly-success-color);--smoothly-color-contrast:var(--smoothly-success-contrast);--smoothly-color-shade:var(--smoothly-success-shade);--smoothly-color-tint:var(--smoothly-success-tint)}[color=warning].sc-smoothly-input-submit{--smoothly-color:var(--smoothly-warning-color);--smoothly-color-contrast:var(--smoothly-warning-contrast);--smoothly-color-shade:var(--smoothly-warning-shade);--smoothly-color-tint:var(--smoothly-warning-tint)}[color=danger].sc-smoothly-input-submit{--smoothly-color:var(--smoothly-danger-color);--smoothly-color-contrast:var(--smoothly-danger-contrast);--smoothly-color-shade:var(--smoothly-danger-shade);--smoothly-color-tint:var(--smoothly-danger-tint)}[color=light].sc-smoothly-input-submit{--smoothly-color:var(--smoothly-light-color);--smoothly-color-contrast:var(--smoothly-light-contrast);--smoothly-color-shade:var(--smoothly-light-shade);--smoothly-color-tint:var(--smoothly-light-tint)}[color=medium].sc-smoothly-input-submit{--smoothly-color:var(--smoothly-medium-color);--smoothly-color-contrast:var(--smoothly-medium-contrast);--smoothly-color-shade:var(--smoothly-medium-shade);--smoothly-color-tint:var(--smoothly-medium-tint)}[color=dark].sc-smoothly-input-submit{--smoothly-color:var(--smoothly-dark-color);--smoothly-color-contrast:var(--smoothly-dark-contrast);--smoothly-color-shade:var(--smoothly-dark-shade);--smoothly-color-tint:var(--smoothly-dark-tint)}.sc-smoothly-input-submit-h{--smoothly-button-border-radius:0.5rem;display:inline-flex;box-sizing:border-box;border-radius:var(--smoothly-button-border-radius);font-size:var(--smoothly-button-font-size, 1rem);cursor:pointer;border:none;outline:none;position:relative}[shape=rounded].sc-smoothly-input-submit-h{--smoothly-button-border-radius:2rem}[type=link].sc-smoothly-input-submit-h{display:inline}[disabled].sc-smoothly-input-submit-h{opacity:0.5}.sc-smoothly-input-submit-h>a.sc-smoothly-input-submit{font-weight:400;background-color:transparent}.sc-smoothly-input-submit-h>a.sc-smoothly-input-submit,.sc-smoothly-input-submit-h>button.sc-smoothly-input-submit{font-size:var(--smoothly-button-font-size);border:1px solid transparent;outline:none;cursor:pointer;display:inline-flex;gap:0.5rem;box-sizing:border-box}.sc-smoothly-input-submit-h>button.sc-smoothly-input-submit{font-weight:bold;justify-content:center;width:100%;align-items:center;border-radius:var(--smoothly-button-border-radius);padding-inline:var(--smoothly-button-padding-inline, 1rem)}.sc-smoothly-input-submit-h{min-height:var(--smoothly-button-height, 2.5rem)}.sc-smoothly-input-submit-h:has(>a:empty),.sc-smoothly-input-submit-h:has(>button:empty),.sc-smoothly-input-submit-h>a.sc-smoothly-input-submit:empty,.sc-smoothly-input-submit-h>button.sc-smoothly-input-submit:empty{border-width:0;min-height:0;padding-inline:0}[size=small].sc-smoothly-input-submit-h{--smoothly-button-height:2rem;--smoothly-button-padding-inline:0.75rem;--smoothly-button-font-size:0.875rem;--smoothly-icon-size:1.4rem}[size=large].sc-smoothly-input-submit-h{--smoothly-button-height:3rem;--smoothly-button-padding-inline:1.25rem;--smoothly-button-font-size:1.125rem}.sc-smoothly-input-submit-h:not([size=icon]):not([size=flexible])>button.sc-smoothly-input-submit{min-width:8rem}[size=icon].sc-smoothly-input-submit-h{--smoothly-icon-size:1.4rem}[size=icon].sc-smoothly-input-submit-h>button.sc-smoothly-input-submit{min-height:var(--smoothly-button-height, 2.5rem);min-width:var(--smoothly-button-height, 2.5rem);padding:0}.sc-smoothly-input-submit-h:not([size=icon]){min-width:8em}[size=flexible].sc-smoothly-input-submit-h{min-width:unset;padding:0;margin:0;display:flex;justify-content:center}[size=flexible].sc-smoothly-input-submit-h>button.sc-smoothly-input-submit{min-width:unset;padding:0;margin:0}[expand].sc-smoothly-input-submit-h{width:100%}[expand=full].sc-smoothly-input-submit-h{border-left:none;border-right:none;--smoothly-button-border-radius:0}[fill=outline].sc-smoothly-input-submit-h>button.sc-smoothly-input-submit{background-color:transparent;color:rgb(var(--smoothly-button-foreground));fill:rgb(var(--smoothly-button-foreground));stroke:rgb(var(--smoothly-button-foreground));border-color:rgb(var(--smoothly-button-foreground))}.sc-smoothly-input-submit-h:not([fill=clear]):not([disabled])>button.sc-smoothly-input-submit:hover,.sc-smoothly-input-submit-h:not([disabled])>button.sc-smoothly-input-submit:focus-visible,[fill=outline].sc-smoothly-input-submit-h:not([disabled]):active>button.sc-smoothly-input-submit::before{border-color:rgb(var(--smoothly-button-focus-color))}[fill=outline].sc-smoothly-input-submit-h:not([disabled])>button.sc-smoothly-input-submit:hover::before,[fill=outline].sc-smoothly-input-submit-h:not([disabled])>button.sc-smoothly-input-submit:focus-within::before,[fill=outline].sc-smoothly-input-submit-h:not([disabled])>button.sc-smoothly-input-submit:active::before{content:"";position:absolute;border:2px solid rgb(var(--smoothly-button-focus-border));inset:-1px;border-radius:var(--smoothly-button-border-radius)}.sc-smoothly-input-submit-h:not([fill=clear]):not([fill=outline]):not([disabled])>button.sc-smoothly-input-submit:hover,.sc-smoothly-input-submit-h:not([fill=clear]):not([fill=outline]):not([disabled])>button.sc-smoothly-input-submit:focus-visible,.sc-smoothly-input-submit-h:not([fill=clear]):not([fill=outline]):not([disabled])>button.sc-smoothly-input-submit:active{background:rgb(var(--smoothly-button-hover-background))}.sc-smoothly-input-submit-h>button.sc-smoothly-input-submit,.sc-smoothly-input-submit-h.sc-smoothly-input-submit-s>smoothly-icon,.sc-smoothly-input-submit-h .sc-smoothly-input-submit-s>smoothly-icon{color:rgb(var(--smoothly-button-foreground));stroke:rgb(var(--smoothly-button-foreground));fill:rgb(var(--smoothly-button-foreground))}[hidden].sc-smoothly-input-submit-h{display:none}.sc-smoothly-input-submit-h{display:flex}.sc-smoothly-input-submit-h:not([display]){display:none}.sc-smoothly-input-submit-h.sc-smoothly-input-submit-s>smoothly-button button>*+smoothly-icon,.sc-smoothly-input-submit-h.sc-smoothly-input-submit-s>smoothly-button-confirm button>*+smoothly-icon{display:none}[disabled].sc-smoothly-input-submit-h{cursor:not-allowed}`;const ja=class{constructor(o){t(this,o);this.smoothlyInputLoad=e(this,"smoothlyInputLoad");this.delete=false;this.icon="checkmark-outline";this.disabled=false;this.display=false;this.size="icon";this.tooltip=this.delete?"Remove":"Submit"}componentWillLoad(){this.smoothlyInputLoad.emit((t=>{if(x.is(t)&&Xo.type.is(t)){this.parent=t;t.listen((async t=>{this.display=!t.readonly}));if(typeof this.disabled!=="boolean"){t.listen((async t=>{var e;this.disabled=!this.delete&&(t.readonly||"validator"in t&&t.validator instanceof l&&!((e=t.validator)===null||e===void 0?void 0:e.is(p.convertArrays(t.value)))||!t.isDifferentFromInitial)}))}}}))}clickHandler(){var t;(t=this.parent)===null||t===void 0?void 0:t.submit(this.delete)}render(){var t,e;return o(s,{key:"f97c4457da695841b39984556b399746d603eb36",title:this.tooltip},this.delete==true?o("smoothly-button-confirm",{size:this.size,shape:this.shape,expand:this.expand,color:(t=this.color)!==null&&t!==void 0?t:"danger",fill:this.fill,onSmoothlyConfirm:()=>this.clickHandler()},o("slot",null),o("smoothly-icon",{name:"trash-outline",fill:"solid",size:"tiny"})):o("smoothly-button",{disabled:this.disabled,size:this.size,type:"button",shape:this.shape,expand:this.expand,color:(e=this.color)!==null&&e!==void 0?e:"success",fill:this.fill,onClick:()=>this.clickHandler()},o("slot",null),this.icon&&o("smoothly-icon",{name:this.icon,fill:"solid",size:"tiny"})))}};ja.style=Da();const La=()=>`[selected].sc-smoothly-item-h{background-color:rgb(var(--smoothly-item-selected-background));color:rgb(var(--smoothly-item-selected-foreground));border-left:.3em solid rgb(var(--smoothly-item-selected-border))}[disabled].sc-smoothly-item-h,.sc-smoothly-item-h[disabled].sc-smoothly-item-s>*{background-color:rgb(var(--smoothly-item-disabled-background));color:rgb(var(--smoothly-item-disabled-foreground));opacity:var(--smoothly-item-disabled-opacity);cursor:not-allowed}.sc-smoothly-item-h:not([hidden]){display:flex;align-items:center;padding:0.5em;cursor:pointer;border-left:.3em solid transparent;color:rgb(var(--smoothly-item-foreground));fill:rgb(var(--smoothly-item-foreground));stroke:rgb(var(--smoothly-item-foreground));box-sizing:border-box;min-height:3rem}.sc-smoothly-item-h.sc-smoothly-item-s>*{color:rgb(var(--smoothly-item-foreground));fill:rgb(var(--smoothly-item-foreground));stroke:rgb(var(--smoothly-item-foreground))}.sc-smoothly-item-h:not([disabled])[marked],.sc-smoothly-item-h:not([disabled]):hover,.sc-smoothly-item-h:not([disabled])[marked].sc-smoothly-item-s>*,.sc-smoothly-item-h:not([disabled]):hover.sc-smoothly-item-s>*{background-color:rgb(var(--smoothly-item-hover-background));color:rgb(var(--smoothly-item-hover-foreground));fill:rgb(var(--smoothly-item-hover-foreground));stroke:rgb(var(--smoothly-item-hover-foreground))}`;const Ra=class{constructor(o){t(this,o);this.smoothlyItemSelect=e(this,"smoothlyItemSelect");this.smoothlyInputLoad=e(this,"smoothlyInputLoad");this.smoothlyItemDOMChange=e(this,"smoothlyItemDOMChange");this.userInitiated=false;this.selected=false;this.disabled=false;this.deselectable=true}clickHandler(){if(!this.disabled&&(!this.selected||this.deselectable)){this.userInitiated=true;this.selected=!this.selected}}selectedWatcher(){this.smoothlyItemSelect.emit({userInitiated:this.userInitiated,item:this.element});this.userInitiated=false}componentWillLoad(){this.smoothlyInputLoad.emit((()=>{}))}componentDidLoad(){this.mutationObserver=new MutationObserver((()=>this.smoothlyItemDOMChange.emit()));this.mutationObserver.observe(this.element,{childList:true,subtree:true,characterData:true});if(this.selected&&!this.disabled){this.smoothlyItemSelect.emit({userInitiated:false,item:this.element})}}async filter(t){var e;const o=typeof this.value==="string"?this.value:JSON.stringify((e=this.value)!==null&&e!==void 0?e:"");this.element.hidden=t?!(o.includes(t)||this.element.innerText.toLowerCase().includes(t)):false}render(){return o(s,{key:"c5146bc88a4b9c1b1f62f61f00031cb5a5696cc4",tabIndex:-1},o("slot",{key:"4193764aac8e58e2922c250c8f9d648205ae3510"}))}get element(){return a(this)}static get watchers(){return{selected:[{selectedWatcher:0}]}}};Ra.style=La();const _a=()=>`.sc-smoothly-label-h{position:relative;width:max-content;display:flex;justify-content:center;align-items:center;padding:0.15em 0.6em;border-radius:2em;color:rgb(var(--smoothly-default-contrast));background-color:hsl(var(--hue), 85%, 70%)}[shape=rectangle].sc-smoothly-label-h{border-radius:0.3em}`;const Aa=class{constructor(e){t(this,e)}render(){var t;return o(s,{key:"20e6de7cb0e9feec21743e338f7c8c0a5b99efe2",title:this.description,style:{"--hue":(t=this.hue)===null||t===void 0?void 0:t.toString()}},o("slot",{key:"d0f7b0af42f7b6e48d960b972b73422d54e557e2"}))}};Aa.style=_a();const $a=()=>`.sc-smoothly-lazy-h{display:block}`;const Ma=class{constructor(e){t(this,e);this.show=false}loadMoreHandler(t){t.stopPropagation();this.show=true}render(){return o(s,{key:"906ca97b847fc15eb317b18a14c89736b05171a8"},o("slot",{key:"124f5b9a92582b1b396ac9d32d9cb62be98437dd",name:"before"}),o("smoothly-load-more",{key:"773685e7c085099f02ed2be90b3e7770799a2b28",onSmoothlyLoadMore:t=>this.loadMoreHandler(t)}),this.show&&(typeof this.content=="function"?o(this.content,null):this.content),o("slot",{key:"3b852c53060b7ca6355fd15ac34ce03f30f20fe4"}))}};Ma.style=$a();const Ea=class{constructor(o){t(this,o);this.smoothlyLoadMore=e(this,"smoothlyLoadMore");this.triggerMode="intersection";this.name="";this.multiple=false}checkInView(){if(this.inView){this.smoothlyLoadMore.emit(this.name)}}connectedCallback(){var t;this.observer=new IntersectionObserver(((t,e)=>this.observationHandler(e,t)));this.observer.observe(this.element);if(this.triggerMode=="scroll"){this.inView&&this.smoothlyLoadMore.emit(this.name);if(this.multiple||!this.multiple&&!this.inView){this.scrollableParent=n.findParent(this.element);(t=this.scrollableParent)===null||t===void 0?void 0:t.addEventListener("scroll",this.checkInView.bind(this),{once:!this.multiple})}}}disconnectedCallback(){var t;(t=this.scrollableParent)===null||t===void 0?void 0:t.removeEventListener("scroll",this.checkInView.bind(this));this.observer.disconnect()}observationHandler(t,e){var o,s;this.inView=((s=(o=e.find((t=>t.target==this.element)))===null||o===void 0?void 0:o.intersectionRatio)!==null&&s!==void 0?s:0)>0;if(this.inView){this.smoothlyLoadMore.emit(this.name);!this.multiple&&(t.unobserve(this.element),t.disconnect())}}render(){return o(s,{key:"bb19876d56183b2cb5350f775e0072cced3152ef"})}get element(){return a(this)}};const Oa=()=>`.sc-smoothly-modal-h{position:fixed;display:flex;justify-content:center;top:0;left:0;width:100%;height:100%;background-color:rgba(var(--smoothly-modal-backdrop));color:rgb(var(--smoothly-modal-foreground));z-index:20}.sc-smoothly-modal-h:not([open]),[hidden].sc-smoothly-modal-h{display:none}[align=center].sc-smoothly-modal-h{align-items:center}[align=top].sc-smoothly-modal-h>div.modal.sc-smoothly-modal{margin-top:calc((100dvh - var(--smoothly-modal-max-height)) / 2)}.sc-smoothly-modal-h>div.modal.sc-smoothly-modal{display:flex;flex-direction:column;padding:2rem;gap:1.5rem;width:var(--smoothly-modal-width, 40rem);max-width:calc(100dvw - 1rem);height:fit-content;max-height:min(var(--smoothly-modal-max-height), 100dvh);background:rgb(var(--smoothly-modal-background, var(--smoothly-color)));border:1px solid rgb(var(--smoothly-modal-border));border-radius:var(--smoothly-modal-border-radius);box-shadow:var(--smoothly-modal-shadow);box-sizing:border-box}.sc-smoothly-modal-h>div.modal.sc-smoothly-modal>div.header.sc-smoothly-modal:empty,.sc-smoothly-modal-h>div.modal.sc-smoothly-modal>div.actions.sc-smoothly-modal:empty{display:none}.sc-smoothly-modal-h>div.modal.sc-smoothly-modal>div.header.sc-smoothly-modal{display:flex;justify-content:space-between;align-items:center}.sc-smoothly-modal-h>div.modal.sc-smoothly-modal>*.sc-smoothly-modal,.sc-smoothly-modal-h>div.modal.sc-smoothly-modal>div.header.sc-smoothly-modal>*.sc-smoothly-modal{margin-block:0}.sc-smoothly-modal-h>div.modal.sc-smoothly-modal>*.sc-smoothly-modal:not(.header):not(.actions){overflow-y:auto}.sc-smoothly-modal-h>div.modal>div.header:not(:has([slot="header"])){justify-content:end}.sc-smoothly-modal-h>div.modal.sc-smoothly-modal>div.header.sc-smoothly-modal>smoothly-icon.sc-smoothly-modal:not([slot="header"]){cursor:pointer;opacity:0.7;color:rgb(var(--smoothly-default-contrast))}.sc-smoothly-modal-h>div.modal.sc-smoothly-modal>div.header.sc-smoothly-modal>smoothly-icon.sc-smoothly-modal:not([slot="header"]):hover{opacity:1}.sc-smoothly-modal-h>div.modal.sc-smoothly-modal>div.actions.sc-smoothly-modal{display:flex;justify-content:center;align-items:center;gap:1rem;flex-wrap:wrap}`;const Pa=class{constructor(o){t(this,o);this.smoothlyModalChange=e(this,"smoothlyModalChange");this.open=false;this.closable=false;this.align="center"}openChanged(){this.smoothlyModalChange.emit(this.open)}async closeModal(){this.open=false}async openModal(){this.open=true}render(){return o(s,{key:"2d4d99ee6e4abfb35ac797df0b23a5021e7f005d",role:"alertdialog",onClick:t=>{this.closable&&!t.composedPath().some((t=>{var e;return(e=t.classList)===null||e===void 0?void 0:e.contains("modal")}))&&this.closeModal()}},o("div",{key:"3bf2318cf763ecd5374fcc2038b9eed817348783",class:"modal"},o("div",{key:"111d3c15f0b59d840936dad804c5802447584c5b",class:"header"},o("slot",{key:"806558a7918a07f205d40cb47d50d5204c7de251",name:"header"}),this.closable&&o("smoothly-icon",{key:"d5f7711fe4b558018bc69ceb49d909b4f9f52b1b",name:"close-outline",fill:"solid",onClick:()=>this.closeModal()})),o("slot",{key:"2e3e96839359404f885e8003a6541e1b012dd6ea"}),o("div",{key:"6afa87e4c5f621a1f71de288b0a8b73fb07db73c",class:"actions"},o("slot",{key:"7a38d753f855f76da81b97e88aa08300056947e6",name:"actions"}))))}static get watchers(){return{open:[{openChanged:0}]}}};Pa.style=Oa();const Ha=()=>`.sc-smoothly-notification-h{display:block;position:relative;min-width:min(calc(100% - 1rem), 30rem);min-height:3rem;border-radius:5px;margin:0.5rem}.sc-smoothly-notification-h>span.icon.sc-smoothly-notification>smoothly-icon.sc-smoothly-notification,.sc-smoothly-notification-h>span.clean.sc-smoothly-notification{display:flex;justify-content:center;align-self:center}.sc-smoothly-notification-h>span.sc-smoothly-notification{margin-inline:1rem 2rem}.sc-smoothly-notification-h>span.icon.sc-smoothly-notification{display:flex;width:100%;justify-content:center}.sc-smoothly-notification-h>span.icon.sc-smoothly-notification>p.sc-smoothly-notification{padding-right:1em}.sc-smoothly-notification-h>span.sc-smoothly-notification>p.sc-smoothly-notification{text-align:left}[hidden].sc-smoothly-notification-h{display:none}.sc-smoothly-notification-h>span.icon.sc-smoothly-notification>smoothly-icon.sc-smoothly-notification{margin:0 0.5rem}.sc-smoothly-notification-h>smoothly-trigger.sc-smoothly-notification{--smoothly-icon-size:1.6rem;position:absolute;right:0}`;const Fa=class{constructor(o){t(this,o);this.remove=e(this,"remove");this.closable=true;this.tick={};this.listener=t=>{if(t.state=="closed"){this.remove.emit(t)}else{this.tick={}}}}get properties(){let t;switch(this.notice.state){case"delayed":case"warning":t=["warning","warning-outline"];break;case"success":t=["success","checkmark-circle"];break;case"executing":t=["light","hourglass-outline"];break;case"failed":t=["danger","alert-circle"];break;default:t=["light",undefined];break}return t}onTrigger(t){if(t.detail.name=="close"){t.stopPropagation();this.notice.close()}}onUpdatedNotice(t,e){if(e){e.unlisten(this.listener)}t.listen(this.listener)}componentDidLoad(){this.onUpdatedNotice(this.notice)}render(){return o(s,{key:"e2385684cbe97b13c8015dd0a991bb202ca2683c",color:this.properties[0],fill:"solid"},this.closable&&o("smoothly-trigger",{key:"fff9263c900dd2e8b572288371994572ec12229b",fill:"clear",name:"close"},o("smoothly-icon",{key:"2d090ca0063ea0c8decbfaea13fb4839cc790ddf",name:"close-circle-outline"})),o("span",{key:"3b0c67031c982f1bfa3d34a42c674e9eb3500fe2",class:this.icon?"icon":"clean"},this.icon&&o("smoothly-icon",{key:"f8e0c9c2174f56662f44a04b5d83c7b59d5000fc",name:this.properties[1]}),o("p",{key:"4d7abf1d375b3b81e0af90ac5fe9dc72d234f770"},this.notice.message)))}static get watchers(){return{notice:[{onUpdatedNotice:0}]}}};Fa.style=Ha();const Ua=()=>`.sc-smoothly-notifier-h{display:block}[hidden].sc-smoothly-notifier-h{display:none}.sc-smoothly-notifier-h>.smoothly-notifier-wrapper.sc-smoothly-notifier{pointer-events:none;display:flex;flex-wrap:wrap-reverse;align-content:stretch;position:fixed;bottom:3rem;left:0;text-align:center;z-index:100}.sc-smoothly-notifier-h>.smoothly-notifier-wrapper.sc-smoothly-notifier>smoothly-notification.sc-smoothly-notifier{pointer-events:all}`;const Na=class{constructor(e){t(this,e);this.icon=false;this.notices=[]}onNotice(t){this.notices=[...this.notices,t.detail]}onRemove(t){this.notices=[...this.notices.filter((e=>e!=t.detail))]}render(){return o(s,{key:"cedcdf563610fc4108e41f179352239a8f8707b4"},o("slot",{key:"21fd4ba39cfa657c771723be6bfdd258b72c205b"}),o("div",{key:"cf6f577a4a2e78c1358d40fb4e4bc50d832670c8",class:"smoothly-notifier-wrapper"},this.notices.map((t=>o("smoothly-notification",{notice:t,icon:this.icon})))))}};Na.style=Ua();const Ya=class{constructor(o){t(this,o);this.notice=e(this,"notice")}task(t,e=2e3){return()=>new Promise((o=>window.setTimeout((()=>o(t?[true,"Task completed."]:[false,"Task failed."])),e)))}render(){return o("main",{key:"89bcaad40b076b4a8c1cfe2c216d2b20527f393a"},o("fieldset",{key:"73bab8643afbb9ef097a9ccc5a792898ebdce19d"},o("h2",{key:"6849f90ff51a964722cc4feedd848cfa12e7c65e"},"Immediate"),o("p",{key:"eb8f61c5e649843efe412a34741a98de1c0e64e3"},"Fires right away and closes after the default 15 seconds."),o("smoothly-button",{key:"538cb741614f0ab44ece81b12398ef68c3710b17",color:"success",fill:"solid",onClick:()=>this.notice.emit(S.succeeded("Payment processed successfully."))},"Success"),o("smoothly-button",{key:"eebe0c36038ab1a5ce7637ceda4a25526e735043",color:"danger",fill:"solid",onClick:()=>this.notice.emit(S.failed("Payment could not be processed."))},"Failed"),o("smoothly-button",{key:"7df609d43e4ef4bee60506555155c1e41e4b847a",color:"warning",fill:"solid",onClick:()=>this.notice.emit(S.warn("Balance is running low."))},"Warning")),o("fieldset",{key:"280afc55d056e96ab0ed3bfc8cba5646aefdd3ee"},o("h2",{key:"f51f8d45dd8d4f3a8798b79f9b30d1576ad80da4"},"Task"),o("p",{key:"c0158f4afc81179bc0ea8b4bb3df8e14d9f4435a"},"Shows an executing spinner while the task runs, then transitions to success or failure."),o("smoothly-button",{key:"4cc217d8c98ed6905217332c985b7350089c0bef",color:"success",fill:"outline",onClick:()=>this.notice.emit(S.execute("Processing payment…",this.task(true)))},"Execute (succeeds after 2s)"),o("smoothly-button",{key:"e9f7ce24d96a4780a3bcf551ae00787c18bc473e",color:"danger",fill:"outline",onClick:()=>this.notice.emit(S.execute("Processing payment…",this.task(false)))},"Execute (fails after 2s)"),o("smoothly-button",{key:"e2a25f963bc54afd22aff374d921d63387484285",color:"medium",fill:"solid",onClick:()=>this.notice.emit(S.delay("Payment scheduled…",this.task(true)))},"Delay (waits 5s, then executes)")),o("fieldset",{key:"2d818587234f716e6c8faa27f48dd4af276efb42"},o("h2",{key:"4c959f5b6c8cc5ff7a9d387ee69258851d6b527a"},"Custom lifetime"),o("p",{key:"1cc81b1b109dde48d2249b55bcc6e10ad3563805"},"Controls how long the notice stays visible after resolving."),o("smoothly-button",{key:"3ddc8d92b022fe9036a24f22e98afb189df18eb4",color:"success",fill:"solid",onClick:()=>this.notice.emit(S.succeeded("Gone in 3 seconds.",3e3))},"Success (3s)"),o("smoothly-button",{key:"4fed4a77c132e2288df49d0ef7d9d2c7a05dc197",color:"warning",fill:"solid",onClick:()=>this.notice.emit(S.warn("Sticks around for 30 seconds.",3e4))},"Warning (30s)")))}};const Wa=()=>`[hidden].sc-smoothly-spinner-h{display:none}.sc-smoothly-spinner-h{cursor:wait;--spinner-time:1.4s;--spinner-color:var(--smoothly-color-contrast);--spinner-background:var(--smoothly-color);--spinner-background-opacity:var(--smoothly-semitransparent, 0.8);display:block;stroke:rgb(var(--spinner-color));background-color:rgba(var(--spinner-background), var(--spinner-background-opacity))}.sc-smoothly-spinner-h:not([overlay]){width:var(--spinner-size);height:var(--spinner-size)}[overlay].sc-smoothly-spinner-h{position:absolute;inset:0;width:100%;height:100%;z-index:4;background-color:rgba(var(--spinner-background), var(--spinner-background-opacity))}[color].sc-smoothly-spinner-h:not([overlay]),[color][overlay].sc-smoothly-spinner-h{background-color:rgba(var(--spinner-background), var(--spinner-background-opacity));stroke:rgb(var(--spinner-color))}[overlay].sc-smoothly-spinner-h>svg.sc-smoothly-spinner{position:absolute;width:var(--spinner-size);left:calc(50% - var(--spinner-size) / 2);top:calc(50% - var(--spinner-size) / 2)}.sc-smoothly-spinner-h>svg.sc-smoothly-spinner{animation:SPIN-SVG var(--spinner-time) linear infinite}.sc-smoothly-spinner-h>svg.sc-smoothly-spinner>circle.sc-smoothly-spinner{transform-origin:center;animation:SPIN-CIRCLE var(--spinner-time) ease-in-out infinite;stroke-dasharray:187;stroke-dashoffset:0}@keyframes SPIN-SVG{0%{transform:rotate(0deg)}100%{transform:rotate(270deg)}}@keyframes SPIN-CIRCLE{0%{stroke-dashoffset:187}50%{stroke-dashoffset:46.75;transform:rotate(135deg)}100%{stroke-dashoffset:187;transform:rotate(450deg)}}`;const Ba=class{constructor(e){t(this,e);this.size="large"}render(){const t=this.size=="large"?6:this.size=="medium"?8:this.size=="icon"?8:12;return o(s,{key:"dda320c04e0b5f513b01e4ef44a4d9008c0b8fe4",style:{"--spinner-size":this.size=="large"?"5em":this.size=="medium"?"3em":this.size=="icon"?"1.8em":"1.2em"}},o("svg",{key:"2edf8c5b50ee649ab78744b1d495af848bc43b10",class:"spinner",viewBox:`0 0 ${60+t} ${60+t}`,xmlns:"http://www.w3.org/2000/svg"},o("circle",{key:"443e16c5103e59c4089f8e41e8755653d1c8b5ec",class:"path",fill:"none","stroke-width":t,"stroke-linecap":"round",cx:`${30+t/2}`,cy:`${30+t/2}`,r:"30"})))}};Ba.style=Wa();const Va=()=>`.sc-smoothly-summary-h{display:block}.sc-smoothly-summary-h>details.sc-smoothly-summary>summary.sc-smoothly-summary{display:flex;column-gap:0.25rem;width:fit-content;list-style:none;align-items:center;cursor:pointer}.sc-smoothly-summary-h>details.sc-smoothly-summary>summary.sc-smoothly-summary>smoothly-icon.sc-smoothly-summary{transition:transform 0.2s, opacity 0.1s;opacity:0.3}.sc-smoothly-summary-h>details.sc-smoothly-summary>summary.sc-smoothly-summary:hover>smoothly-icon.sc-smoothly-summary{opacity:1}.sc-smoothly-summary-h>details[open].sc-smoothly-summary>summary.sc-smoothly-summary>smoothly-icon.sc-smoothly-summary{transform:rotate(90deg)}.sc-smoothly-summary-h>details.sc-smoothly-summary-s>[slot=content]{margin-left:var(--smoothly-summary-content-indent, 1.5rem)}@media (prefers-reduced-motion){.sc-smoothly-summary-h>details.sc-smoothly-summary>summary.sc-smoothly-summary>smoothly-icon.sc-smoothly-summary{transition:none}}`;const Ga=class{constructor(o){t(this,o);this.smoothlySummaryOpen=e(this,"smoothlySummaryOpen");this.open=false}async toggleHandler(t){if(t.target instanceof HTMLDetailsElement){this.open=t.target.open;this.smoothlySummaryOpen.emit(this.open)}}render(){return o("details",{key:"288fb538d03bbfd1a71b2943b291093219ae2dec",onToggle:t=>this.toggleHandler(t),open:this.open},o("summary",{key:"50421f335a303578bbb761b59cff85c952bd51ed"},o("smoothly-icon",{key:"988c093ab1e4fcd4af0e755827091cc85e6d5087",name:"caret-forward",fill:"solid",size:"tiny"}),o("slot",{key:"a3bf5f55b4f950ef6e6b97a008fe1b99effbe498",name:"summary"})),o("slot",{key:"8d80364b8acfb634e7e687b972e339cd2141526e",name:"content"}))}};Ga.style=Va();const Ka=()=>`.sc-smoothly-tab-h{display:contents;--smoothly-tab-line-width:2px;--smoothly-tab-line-width-active:5px}.sc-smoothly-tab-h>div.sc-smoothly-tab:first-child{grid-column:span 1;background-color:transparent;border-bottom-color:rgb(var(--smoothly-default-shade));border-bottom-width:var(--smoothly-tab-line-width);border-bottom-style:solid}[disabled].sc-smoothly-tab-h>div.sc-smoothly-tab:first-child{color:rgba(var(--smoothly-default-contrast), 0.6)}[disabled].sc-smoothly-tab-h>div.sc-smoothly-tab:first-child>label.sc-smoothly-tab{cursor:not-allowed}.sc-smoothly-tab-h>div.sc-smoothly-tab:first-child>label.sc-smoothly-tab{display:flex;justify-content:center;padding:0.5rem 1rem;width:fit-content;border-radius:0.5rem 0.5rem 0 0;margin:auto;cursor:pointer;position:relative}.sc-smoothly-tab-h:not([disabled])>div.sc-smoothly-tab:first-child>label.sc-smoothly-tab:hover{background-color:rgb(var(--smoothly-tab-hover-background, var(--smoothly-default-shade)))}[open].sc-smoothly-tab-h>div.sc-smoothly-tab:first-child>label.sc-smoothly-tab{font-weight:bold}[open].sc-smoothly-tab-h>div.sc-smoothly-tab:first-child>label.sc-smoothly-tab::before{content:'';position:absolute;height:var(--smoothly-tab-line-width-active);background-color:rgb(var(--smoothly-tab-active-line, var(--smoothly-primary-color)));inset-inline:0;bottom:calc(-1 * var(--smoothly-tab-line-width))}.sc-smoothly-tab-h>div.sc-smoothly-tab:first-child>label[data-smoothly-tooltip].sc-smoothly-tab:hover::after{content:attr(data-smoothly-tooltip);font-size:0.9rem;position:absolute;top:calc(100% + 0.25rem);padding:0.5rem 0.75rem;border-radius:0.5rem;background-color:rgb(var(--smoothly-medium-color));color:rgb(var(--smoothly-medium-contrast));white-space:nowrap;z-index:1}.sc-smoothly-tab-h>div.sc-smoothly-tab:nth-child(2){grid-row:2 / 3;grid-column:1 / -1}`;const qa=class{constructor(o){t(this,o);this.smoothlyTabOpen=e(this,"smoothlyTabOpen");this.smoothlyTabLoad=e(this,"smoothlyTabLoad");this.inputs={}}async openHandler(){if(this.open){this.smoothlyTabOpen.emit(this.name)}this.open?await Promise.all(Object.values(this.inputs).map((t=>t.register()))):await Promise.all(Object.values(this.inputs).map((t=>t.unregister())))}connectedCallback(){this.smoothlyTabLoad.emit((t=>{var e;(e=this.smoothlyTabs)===null||e===void 0?void 0:e.removeTab(this.element);this.smoothlyTabs=t}))}disconnectedCallback(){var t;(t=this.smoothlyTabs)===null||t===void 0?void 0:t.removeTab(this.element)}async componentDidLoad(){await this.openHandler()}onInputLoad(t){if(ts.Element.is(t.target)){this.inputs[t.target.name]=t.target;if(!this.open){t.stopPropagation()}}}render(){return o(s,{key:"a93d651d7e086f30a2f7cd86855005d028591a36"},o("div",{key:"e6fc9b8cac4479fdb717437fe27ed212c218bf4f",onClick:()=>!this.disabled&&(this.open=true)},o("label",{key:"a4bb76ef8387eeaa26a9ce359c5b7cba807edbaf","data-smoothly-tooltip":this.tooltip},this.label)),o("div",{key:"5fc87df52118a57aac0c2e7ac4b74364f4b256bc",hidden:!this.open},o("slot",{key:"05b035045f0523f97792127c1f540eea48317c5e"})))}get element(){return a(this)}static get watchers(){return{open:[{openHandler:0}]}}};qa.style=Ka();const Za=()=>`.sc-smoothly-table-h{display:grid;grid-template-columns:repeat(var(--columns), auto);color:rgb(var(--smoothly-table-foreground));stroke:rgb(var(--smoothly-table-foreground));fill:rgb(var(--smoothly-table-foreground))}`;const Ja=class{constructor(e){t(this,e);this.columns=1}smoothlyTableExpandableRowChange(t){t.stopPropagation()}smoothlyTableExpandableCellChange(t){t.stopPropagation()}render(){return o(s,{key:"9f503e8d029a4954a7745e96063590ccd730e69f",style:{"--columns":this.columns.toString()}},o("slot",{key:"74fe191de90d8e99beae5b5a71805337350d6438"}))}};Ja.style=Za();const Xa=()=>`.sc-smoothly-table-body-h{grid-column:1 / -1;display:grid;grid-template-columns:subgrid;color:rgb(var(--smoothly-table-foreground));background-color:rgb(var(--smoothly-table-background))}`;const Qa=class{constructor(e){t(this,e)}render(){return o(s,{key:"ce870c3cb75e3021ae6df094be0beb4e15a4fa96"},o("slot",{key:"c10f9e14bd9f2737ec480b1fe54bbf20f43d76a0"}))}};Qa.style=Xa();const ti=()=>`.sc-smoothly-table-cell-h{grid-column:span var(--smoothly-table-cell-span, 1);display:flex;align-items:center;padding-inline:var(--smoothly-table-cell-padding-inline, 1.1rem);min-height:var(--smoothly-table-cell-min-height, 2.75rem);white-space:nowrap}`;const ei=class{constructor(e){t(this,e);this.span=1}render(){var t;return o(s,{key:"ca07767049aaf36422712f91d7b6fb5c3969ad97",class:"smoothly-table-cell",style:{"--smoothly-table-cell-span":(t=this.span)===null||t===void 0?void 0:t.toString(10)}},o("slot",{key:"bf432616f663835262a56fe03edd8e0798f5bcd0"}))}};ei.style=ti();const oi=()=>`.sc-smoothly-table-demo-h{display:grid;gap:5rem;box-sizing:border-box;max-width:80rem;width:100%;margin:auto;padding:2rem}`;const si=class{constructor(e){t(this,e)}render(){return o(s,{key:"392f756a60ce9696d3751f3acadef93297c3e643"},o("smoothly-table-demo-filler-row",{key:"5661e2020b5c73c204c394b88de0265573092758"}),o("smoothly-table-demo-group",{key:"fe474555113d6507b02d6782184ea01d03a8a662"}),o("smoothly-table-demo-colspan",{key:"2bb99bf815f006ea91ce30c9c7a0d7cba544d002"}),o("smoothly-table-demo-simple",{key:"88c7fc4ac07e640aa0fe70e8bdb6102dcb98c357"}),o("smoothly-table-demo-nested-no-cell",{key:"deed98e8c8e2b7185ffdebf64076553323cb8019"}))}};si.style=oi();const ai=()=>`.sc-smoothly-table-demo-colspan-h{display:block}.sc-smoothly-table-demo-colspan-h smoothly-display.sc-smoothly-table-demo-colspan{display:inline}`;const ii=class{constructor(e){t(this,e)}render(){return o(s,{key:"5bb9813d47d1db3bc22220f37684497c4ca8f2bd"},o("smoothly-table",{key:"6f7b0f991acf1b7f5acf0fb65b5c819ed013cf3d",columns:3},o("smoothly-table-head",{key:"edc99ec7f702e6fe8dd756ed69e565a95dcd472b"},o("smoothly-table-row",{key:"47b2b2fe6cb7f51b442f4c81e9126202b1c7c8c3"},o("smoothly-table-cell",{key:"55f3222178c889b5973f667219da7ae264888015"},"Date"),o("smoothly-table-cell",{key:"b66af5e27fadc4c433d1e770fa42595dad35c91c"},"Skip"),o("smoothly-table-cell",{key:"945ac4f2179e932a19e4af3c5984b438cdf66aaf"},"Total"))),o("smoothly-table-body",{key:"7a78a928b7698a3d4dbb8cc110cba6e092f9d0e1"},o("smoothly-table-row",{key:"2366aafaabb790d4e4f623d3223def5a5157b80b"},o("smoothly-table-cell",{key:"388661156ce57cceeca8dba5cf949c167243664f",span:2},o("smoothly-display",{key:"dc4994f0086d6f95fcf3610caef8c33994285700",type:"date",value:"2024-01-01"})),o("smoothly-table-cell",{key:"34a6c4374ff76e6bfea930b6df6efab6555bf527"},o("smoothly-display",{key:"f077e002fc6e67894af561548a1b640b293efdbe",type:"price",value:120,currency:"EUR"}))),o("smoothly-table-row",{key:"d80a66ab18c26be3cb098c15f8516bd7b7f4f311"},o("smoothly-table-expandable-cell",{key:"c87f637adece3cb7be000f2c79804a4d6cb18493",span:2},o("smoothly-display",{key:"e98b2f42a4f239f0392cc3061afc1a17843b01da",type:"date",value:"2024-01-02"}),o("smoothly-lazy",{key:"cf4208c25aef5035c832fdc56f21af00f067a7d0",slot:"detail",content:o("smoothly-display",{type:"date-time",value:"2024-01-02T13:37:00.000Z"})})),o("smoothly-table-expandable-cell",{key:"3b7e2255b4ce1b0d8c2a135164af48cff025e3f2"},o("smoothly-display",{key:"eb34c6cacb66fa18cf597427513bdaad1a358629",type:"price",value:220,currency:"EUR"}),o("smoothly-lazy",{key:"3e1b1418fa38a7fa4e283386fdace44845c558fa",slot:"detail",content:o("span",null,o("smoothly-display",{type:"price",value:120,currency:"EUR"})," + ",o("smoothly-display",{type:"price",value:100,currency:"EUR"}))}))),o("smoothly-table-row",{key:"031144a69c437d09bc4eba7b155de56acb89e500"},o("smoothly-table-cell",{key:"22d04fcea0eced05eba133bdaa255345a46885b3"},o("smoothly-display",{key:"c039a6c696c335d50bae24058f2f523c0fd22003",type:"date",value:"2024-01-02"})),o("smoothly-table-cell",{key:"7d36890a8f8c7e1516094aed5395995531f315cb"},"Not Skipped"),o("smoothly-table-cell",{key:"f15c8f77ea83e115038b9f822fa1c740b2ca20f1"},o("smoothly-display",{key:"51f9706d24f3187a9c0edeca8b505ec4aa11b0e0",type:"price",value:320,currency:"EUR"}))))))}};ii.style=ai();const li=()=>`.sc-smoothly-table-demo-filler-row-h{display:block}.sc-smoothly-table-demo-filler-row-h>smoothly-display.sc-smoothly-table-demo-filler-row{font-size:2em}.sc-smoothly-table-demo-filler-row-h>*.sc-smoothly-table-demo-filler-row{margin-bottom:2rem}`;const ni=class{constructor(e){t(this,e);this.cats=[]}async componentDidLoad(){window.setTimeout((()=>{this.cats=undefined}),3e3)}render(){return o(s,{key:"09e5d41ab4453db60da3d6882e3a249b5b7e1efb"},o("smoothly-display",{key:"c884544b6be16e6db27aa14fd74c945ff7791739",type:"text",value:"Filler row"}),o("smoothly-table",{key:"fb21fd98abb9f1932d1588759925b51915986778",color:"primary",columns:4},o("smoothly-table-head",{key:"ff1eca4566d2438b7554c3916c15ac09baabb3c8"},o("smoothly-table-row",{key:"2c023e03a6f8f857368fefc3c7556c1c7898cb21"},o("smoothly-table-cell",{key:"02b65f85b79633ed7256bb8b18a77de7d980873e"},"Breed"),o("smoothly-table-cell",{key:"027ef71ae92b3ba437db7985852e20aa216188d8"},"Country"),o("smoothly-table-cell",{key:"864265604fca102d3f9a185b2711679ead048ed6"},"Coat"),o("smoothly-table-cell",{key:"2d3f0309e3e958ede3a6b9ecdbeae97d05c90e36"},"Origin"))),o("smoothly-table-body",{key:"ebc7b803777f720f03fb5e69955ffb427eec75ee"},this.cats===undefined?o("smoothly-table-filler-row",null,"No data to display"):this.cats.length===0?o("smoothly-table-filler-row",null,o("smoothly-spinner",{style:{margin:"auto"},color:"default",size:"small"})):this.cats.map((t=>o("smoothly-table-row",null,o("div",{class:"smoothly-table-cell"},t.breed),o("div",{class:"smoothly-table-cell"},t.country),o("div",{class:"smoothly-table-cell"},t.coat),o("div",{class:"smoothly-table-cell"},t.origin)))))))}};ni.style=li();const ri=()=>`.sc-smoothly-table-demo-group-h{display:block}.sc-smoothly-table-demo-group-h smoothly-display.sc-smoothly-table-demo-group{display:inline}.sc-smoothly-table-demo-group-h fake-cell-wrapper.span-2.sc-smoothly-table-demo-group{grid-column:span 2}.sc-smoothly-table-demo-group-h>smoothly-display.sc-smoothly-table-demo-group{display:inherit;font-size:2em}.sc-smoothly-table-demo-group-h>*.sc-smoothly-table-demo-group{margin-bottom:2rem}.sc-smoothly-table-demo-group-h fake-group-wrapper.sc-smoothly-table-demo-group,.sc-smoothly-table-demo-group-h fake-row-wrapper.sc-smoothly-table-demo-group,.sc-smoothly-table-demo-group-h fake-expandable-row-wrapper.sc-smoothly-table-demo-group{grid-column:1 / -1;display:grid;grid-template-columns:subgrid}.sc-smoothly-table-demo-group-h fake-cell-wrapper.sc-smoothly-table-demo-group{grid-column:span 1;display:block}.sc-smoothly-table-demo-group-h fake-expandable-cell-wrapper.sc-smoothly-table-demo-group{display:contents}`;const ci=class{constructor(e){t(this,e)}render(){return o(s,{key:"1018b8ebc4a2664146c044a5af08cfc403fdba17"},o("smoothly-display",{key:"156fb43c20ee6f8d98d7c4273c5f7c1e7a7f4c63",type:"text",value:"Group"}),o("smoothly-table",{key:"46410eba49dfd918b0f6a0ce851a4d78c0b6d63e",color:"primary",columns:2},o("smoothly-table-head",{key:"9f570364392c2bb62d107ecb63062e55840561d1"},o("smoothly-table-row",{key:"f2a586ccdd1a76adbb402a1e36e9765bf6981921"},o("smoothly-table-cell",{key:"0896f702cd68a9692ab9a184994ea7924a9556ca"},"Date"),o("smoothly-table-cell",{key:"8164db8527d98cb1fb7a37c9967a1d944c309244"},"Total"))),o("smoothly-table-body",{key:"a13835704bdebe92f6cb2d2b472d44324680d8b0"},o("smoothly-table-row-group",{key:"913d221b9123bfee82db1756b2e87b167ca2ba80",align:true},o("smoothly-display",{key:"36c9a42042b968c1bce4ca33625ae7a0fc871ddf",slot:"start",type:"date",value:"2024-01-01"}),o("smoothly-display",{key:"ba53195b503da10700f3b2ba8eef6ed2677069bf",slot:"end",type:"price",currency:"EUR",value:510}),o("smoothly-table-expandable-row",{key:"22cfad4a47876d0e81597809976964824fd2f538"},o("smoothly-table-cell",{key:"2c6f7f4caacb1b0dfc0483e2fcb8dcc15c8d12ca"},o("smoothly-display",{key:"2e7a2aeacff8cbfb32a6c3b22157d6c5e7a3ed1b",type:"date-time",value:"2024-01-01T01:37:00.000Z"})),o("smoothly-table-cell",{key:"11fa98b3074ac97bd4d7692910ee3c5e79e7f5af"},o("smoothly-display",{key:"b34fad882944ad708298d0e6818522a6e77eb7a5",type:"price",currency:"EUR",value:250})),o("smoothly-lazy",{key:"a73076085f4d0d3cf3c6db40229fc6f6827d388e",slot:"detail",content:o(i,null,"Details of 2024-01-01T01:37:00.000Z")})),o("smoothly-table-expandable-row",{key:"d0be11a2e5cefaacfefd46354e1dc7d007b85f11"},o("smoothly-table-cell",{key:"8da6d365e1f1928f0ded7a94e19446748e0658e3"},o("smoothly-display",{key:"1c173affd2e8899159f6afe0d2c67366961cda4b",type:"date-time",value:"2024-01-01T13:37:00.000Z"})),o("smoothly-table-cell",{key:"a2f8076b4b23b2d6e67e92edd925c0447351dcff"},o("smoothly-display",{key:"bb8ae8fdad6c2b2b475635ea4de50571b2ddb1f8",type:"price",currency:"EUR",value:260})),o("smoothly-lazy",{key:"da2b74dfdb241693fd91f7488a55ed3bd2360bd2",slot:"detail",content:o(i,null,"Details of 2024-01-01T13:37:00.000Z")}))),o("smoothly-table-row",{key:"093beb640b56960968b0abb70586c6ba0a063e78"},o("smoothly-table-cell",{key:"077a3742a8533a17486800c74ca7fea44d23e569"},o("smoothly-display",{key:"d5c18744fb9c8f0ed1358579eaf392e474ca3110",type:"date",value:"2024-01-02"})),o("smoothly-table-cell",{key:"52e33f3bdcf4b13f24dfd3249dbb5ad09ef741f4"},o("smoothly-display",{key:"6e15b5560fd4e7a5f6227bd67949953d77d75141",type:"price",currency:"EUR",value:130}))),o("smoothly-table-row-group",{key:"04eb5b29dfd3357a5aacc74014567b0fb3221acf"},o("smoothly-display",{key:"471be92684f0990c0e81cef378ba4c1a04cd7683",slot:"start",type:"date",value:"2024-01-03"}),o("smoothly-display",{key:"c580d72e50702129ea8d498390424932a96bfb05",slot:"end",type:"price",currency:"EUR",value:720}),o("smoothly-table-expandable-row",{key:"e120aa8a654972237d7d3f77e395667f1ed86f5f"},o("smoothly-table-cell",{key:"478b6acdb0ff7933091a67a8b56ef0aeddafff7a"},o("smoothly-display",{key:"8157a143e2f91bcb98c74d1d4b9e21d62cf75876",type:"date-time",value:"2024-01-03T01:37:00.000Z"})),o("smoothly-table-cell",{key:"2cd00ae76248e86b110550daff7523b06b74a661"},o("smoothly-display",{key:"c364434851ebdb9dd4ea1085aca2f32674fbfee7",type:"price",currency:"EUR",value:320})),o("smoothly-lazy",{key:"c7b3d0cb9b5694f50f02472c7bd5c0e5e7ade73a",slot:"detail",content:o(i,null,"Details of 2024-01-03T01:37:00.000Z")})),o("smoothly-table-expandable-row",{key:"cb715e8e09efa27facaafc38bcfe1bab7a8430a9"},o("smoothly-table-cell",{key:"dc7150566ec0a9fbe7f10dbcfbfa04094c1566d8"},o("smoothly-display",{key:"8db703f533d729b467ea53facf1b5714a9d0007c",type:"date-time",value:"2024-01-03T13:37:00.000Z"})),o("smoothly-table-cell",{key:"e69fb07aea49630093e5b50eb21aac0a512b585e"},o("smoothly-display",{key:"511867e910bc46033a86b884e71bf3a86004f3d5",type:"price",currency:"EUR",value:400})),o("smoothly-lazy",{key:"559dcd86bf7e5182b648269bfe7c89efae6d90b8",slot:"detail",content:o(i,null,"Details of 2024-01-03T13:37:00.000Z")}))),o("smoothly-table-row-group",{key:"cd4c7dd32d9ca131cb928bfe966667d5ef015a06"},o("smoothly-display",{key:"93e31cfc7b700f37eb85a537fa0dcdee5341e21f",slot:"start",type:"date",value:"2024-01-04"}),o("smoothly-table-expandable-row",{key:"212c14a6cc880aca7e28fc13c64aec713cc9ad06"},o("smoothly-table-cell",{key:"bea8887113d5e2c478296e83e156b9d841d04d9d"},o("smoothly-display",{key:"833d792a99e598d79e7ead80cce484975271e945",type:"date-time",value:"2024-01-04T01:37:00.000Z"})),o("smoothly-table-cell",{key:"ee079618899cedabfee38e767e1ebb1d6ea0bd72"},o("smoothly-display",{key:"c465529c47972d35e2c88c21063adcdae1be074a",type:"price",currency:"EUR",value:320})),o("smoothly-lazy",{key:"c13bdae5b1e4b93fef96b9663476317175994ca2",slot:"detail",content:o(i,null,"Details of 2024-01-04T01:37:00.000Z")})),o("smoothly-table-expandable-row",{key:"b8997a4f3d02fa1562f294ab8b511d1a6ab1a340"},o("smoothly-table-cell",{key:"98b18cb5d2dfb3148af7693e3b3e3ca9a18528bc"},o("smoothly-display",{key:"13245ba80046868112615d3e23a5c10ddc9917d2",type:"date-time",value:"2024-01-04T13:37:00.000Z"})),o("smoothly-table-cell",{key:"4acdf8682514dfc9588c4396b22d8eff5814e540"},o("smoothly-display",{key:"6a78481d96266171b7a2ab85e06ab278e517030c",type:"price",currency:"EUR",value:400})),o("smoothly-lazy",{key:"d01607c3e985cd163b6d4f3775fdc6b5e07caa22",slot:"detail",content:o(i,null,"Details of 2024-01-04T13:37:00.000Z")}))),o("smoothly-table-row-group",{key:"a27ce4b894f53565450af368abf00c996fd7e9d6"},o("smoothly-display",{key:"6f7039aae41110f2e7fec069b06f4a9b5e7e88af",slot:"end",type:"price",currency:"EUR",value:720}),o("smoothly-table-expandable-row",{key:"8e5061627868199c6ab234d29eb5b929da8e3970"},o("smoothly-table-cell",{key:"b420f93d94c7bf37279ba2ba4237ff24ec6c0845"},o("smoothly-display",{key:"4dc79070171669b9c3148ae20dd510d47c074044",type:"date-time",value:"2024-01-05T01:37:00.000Z"})),o("smoothly-table-cell",{key:"328a16b1224bec0e114456fc6bc907a2f0c7a2fc"},o("smoothly-display",{key:"880d4fe972fe941c5fee0af89ccf08e78889b131",type:"price",currency:"EUR",value:320})),o("smoothly-lazy",{key:"f9f8da2f655820ddc5512b2a00ac98a27d3b4446",slot:"detail",content:o(i,null,"Details of 2024-01-05T01:37:00.000Z")})),o("smoothly-table-expandable-row",{key:"13b28b2d2aa0339a6ef6f268db7f60d38e392c37"},o("smoothly-table-cell",{key:"e0e9375576839c269c8644d147ccad87469f84f2"},o("smoothly-display",{key:"58507417547c2339a6faccc0eacb450e1414c623",type:"date-time",value:"2024-01-05T13:37:00.000Z"})),o("smoothly-table-cell",{key:"14c620d31511aa90005bc84c7cf7aa13e7caafb7"},o("smoothly-display",{key:"c02cd95f8366924583fab7c58aec5130c0dc6ab3",type:"price",currency:"EUR",value:400})),o("smoothly-lazy",{key:"8c4102ba85f39d1b507430a14bedde4c14352b9d",slot:"detail",content:o(i,null,"Details of 2024-01-05T13:37:00.000Z")}))),o("fake-group-wrapper",{key:"1a7ec6cbf9dd25d1e0c347e7f13e7fc84cb13dee"},o("smoothly-table-row-group",{key:"495ec0d7f737041eed5e18f55b23e2d3a56d1e67"},o("smoothly-display",{key:"9388119e19fe3736adf805a0cf416fb97ee04a60",slot:"start",type:"date",value:"2024-01-06"}),o("smoothly-display",{key:"e316e00a41711f65c5fcdc570ec1893df04553f7",slot:"end",type:"price",currency:"EUR",value:720}),o("fake-row-wrapper",{key:"cf6cf7ada6dcacae53aafae3a552133140aef6bc"},o("smoothly-table-row",{key:"ba1c3a41efd637812f00fc55b36bd3ba18e6b7ca"},o("fake-cell-wrapper",{key:"47eb9df3010833125da9f5ec203063b46b5c710b"},o("smoothly-table-cell",{key:"9d4133a5a40bac6293c873272619fa5d5daf02ab"},o("smoothly-display",{key:"435da756815b232b04c3b736f86f5263f1c69a50",type:"date",value:"2024-01-02"}))),o("fake-expandable-cell-wrapper",{key:"5792524b518ac91535c40af3656497412b2fa7d7"},o("smoothly-table-expandable-cell",{key:"e327d41231936a6bb12928d4f43d45ba5bc98232"},o("smoothly-display",{key:"304564a54f555b12d8eb19c138980881287b4cdf",type:"price",currency:"EUR",value:130}),o("smoothly-lazy",{key:"13329c446406e78a91610db0eac2490d2d453993",slot:"detail",content:o("span",null,o("smoothly-display",{type:"price",value:100,currency:"EUR"})," + ",o("smoothly-display",{type:"price",value:30,currency:"EUR"}))}))))),o("fake-expandable-row-wrapper",{key:"6293bf9f19962a2ade3720e10d713c2db4d61cad"},o("smoothly-table-expandable-row",{key:"ae588d0c6d672edcdb5ab27cc74a660cba58fb23"},o("fake-cell-wrapper",{key:"0997b1e181e2806dd2be5d58fd2f2f3a7ead4ee7",class:"span-2"},o("smoothly-table-cell",{key:"812452b5838a90ae400d5a3db91a7c3b741f9025",span:2},o("smoothly-display",{key:"f0df840fafa95e1eda96add4bf4c74e2ba6b0744",type:"date",value:"2024-01-07"}))),o("smoothly-lazy",{key:"3bfc15b9e23290f24162b9c4edacacc5c498072f",slot:"detail",content:o("smoothly-display",{type:"date-time",value:"2024-01-07T13:37:00.000Z"})}))))),o("smoothly-table-row-group",{key:"c5f72a54bd995bb259c40a03f9eff2b7ed4c2e0d"},o("smoothly-display",{key:"160d3fee233c0ba6f2bb47a319a3d3a4c20fbf0c",slot:"start",type:"date",value:"2024-01-08"}),o("smoothly-display",{key:"a051fa82a2c80f0e61efe82ffc9aab1b12fa5b31",slot:"end",type:"price",currency:"EUR",value:720})))))}};ci.style=ri();const hi=[{id:"667d329f9f4934ecdc4bf9eb",balance:1450.03,age:35,eyeColor:"blue",name:"Glenda Ballard",gender:"female",company:"ZENTIA",registered:"2022-06-13T12:39:15.908",friends:[{id:0,name:"Manning Hunter",age:30,balance:1922.25},{id:1,name:"Mcmillan Oliver",age:32,balance:2440.53},{id:2,name:"Graham Garza",age:33,balance:3712.59},{id:3,name:"Gabrielle Neal",age:36,balance:2519.25},{id:4,name:"Dotson Duncan",age:29,balance:3274.11}]},{id:"667d329f4e07097167ef92a2",balance:2488.91,age:21,eyeColor:"blue",name:"Delaney Haley",gender:"male",company:"COMTOURS",registered:"2018-05-11T08:58:36.197",friends:[{id:0,name:"Elsa Cochran",age:28,balance:2009.45},{id:1,name:"Willis Acevedo",age:33,balance:2198.01},{id:2,name:"Slater Fowler",age:34,balance:2888.16},{id:3,name:"Ashley Wilkerson",age:22,balance:1863.65},{id:4,name:"Ola Lynch",age:23,balance:3649.29}]},{id:"667d329f14a0aeea0d70d5e7",balance:1660.91,age:36,eyeColor:"brown",name:"Riddle Reilly",gender:"male",company:"OPTIQUE",registered:"2016-09-15T09:46:07.962",friends:[{id:0,name:"Hazel Steele",age:33,balance:3129.64},{id:1,name:"Golden Chapman",age:40,balance:2491},{id:2,name:"Solomon Lopez",age:26,balance:1382.71},{id:3,name:"Castro Booth",age:23,balance:1991.6},{id:4,name:"Hernandez Bartlett",age:25,balance:2842.85},{id:5,name:"Lindsay Wagner",age:20,balance:3636.6}]},{id:"667d329f953aaaba19bea98b",balance:1381.34,age:24,eyeColor:"brown",name:"Diana Burns",gender:"female",company:"CODACT",registered:"2023-06-02T09:07:46.478",friends:[{id:0,name:"Tamika Merritt",age:25,balance:2401.06},{id:1,name:"Ballard Buckner",age:36,balance:1986.13},{id:2,name:"Stokes Ramirez",age:25,balance:3521.75},{id:3,name:"Wood Aguirre",age:36,balance:1186.13},{id:4,name:"Sophia Bowen",age:25,balance:2750.95},{id:5,name:"Wilkinson Gordon",age:34,balance:3864.91}]},{id:"667d329f6a753976e21e23b5",balance:3054.74,age:22,eyeColor:"brown",name:"Jackson Burnett",gender:"male",company:"COMCUR",registered:"2019-06-05T09:17:31.312",friends:[{id:0,name:"Atkinson Alston",age:37,balance:1025.72},{id:1,name:"Delia Ford",age:34,balance:3061.87},{id:2,name:"Marylou Hanson",age:33,balance:3255.77},{id:3,name:"Kelly Ray",age:32,balance:3671.73},{id:4,name:"Valdez Weeks",age:38,balance:3911.29},{id:5,name:"Hayes Crawford",age:20,balance:3194.97}]},{id:"667d329fc4805cafac37861e",balance:1173.94,age:20,eyeColor:"green",name:"Stephenson Mcleod",gender:"male",company:"POLARAX",registered:"2015-12-10T07:36:10.267",friends:[{id:0,name:"Kristine Newton",age:26,balance:2713.9},{id:1,name:"Craft Patel",age:40,balance:3822.36},{id:2,name:"Cochran French",age:30,balance:1535.91},{id:3,name:"Bowen Vinson",age:29,balance:2787.01},{id:4,name:"Adrian Ewing",age:21,balance:2319.14},{id:5,name:"Jimmie Mathews",age:31,balance:2869.09},{id:6,name:"Dixon Daugherty",age:24,balance:1496.25}]},{id:"667d329f76318162fe27b208",balance:2977.01,age:24,eyeColor:"blue",name:"Claudette Christensen",gender:"female",company:"PIVITOL",registered:"2021-08-08T07:08:00.936",friends:[{id:0,name:"Parker Lamb",age:36,balance:3409.27},{id:1,name:"Kennedy Bryan",age:34,balance:3904.27},{id:2,name:"Johanna Barton",age:20,balance:3613.79},{id:3,name:"Vazquez Melendez",age:26,balance:3692.31},{id:4,name:"Mendoza Wooten",age:31,balance:2175.64},{id:5,name:"Kelli Hicks",age:21,balance:1326.46},{id:6,name:"Jill Sanchez",age:36,balance:3214.36}]},{id:"667d329ff80a953b7f0a73d2",balance:1993.09,age:20,eyeColor:"green",name:"Buckley Gutierrez",gender:"male",company:"HOUSEDOWN",registered:"2015-04-02T04:53:42.985",friends:[{id:0,name:"Leanne Pennington",age:37,balance:3111.48},{id:1,name:"Juarez Hoover",age:29,balance:2000.62},{id:2,name:"Navarro Mccormick",age:22,balance:3083.93},{id:3,name:"Berry Curry",age:31,balance:3181.41},{id:4,name:"Josefa Howard",age:30,balance:3744.56}]},{id:"667d329f4f53eb59f0512361",balance:2374.56,age:34,eyeColor:"brown",name:"Sallie Mccoy",gender:"female",company:"REALYSIS",registered:"2018-05-11T05:26:36.604",friends:[{id:0,name:"Martina Kirby",age:22,balance:1278.07},{id:1,name:"Macias Lyons",age:20,balance:2991.44},{id:2,name:"Alta Chaney",age:26,balance:1032.71},{id:3,name:"White Manning",age:39,balance:3103.16},{id:4,name:"Mason Rosa",age:31,balance:1384.77},{id:5,name:"Meghan Martin",age:27,balance:1982.09}]},{id:"667d329f8a6cf9319bfdbd30",balance:3220.94,age:23,eyeColor:"blue",name:"Huff Hull",gender:"male",company:"GADTRON",registered:"2023-02-14T01:58:56.938",friends:[{id:0,name:"Rochelle Maldonado",age:28,balance:1548.77},{id:1,name:"Diann Conrad",age:32,balance:1721.33},{id:2,name:"Hope Jarvis",age:38,balance:1265.24},{id:3,name:"Dixie Huffman",age:31,balance:3764.23},{id:4,name:"Erickson Porter",age:27,balance:2958.59},{id:5,name:"Christensen Thomas",age:21,balance:1233.2}]},{id:"667d329f1415ecb1efb216cc",balance:2907.83,age:26,eyeColor:"brown",name:"Hancock Eaton",gender:"male",company:"POLARIUM",registered:"2018-02-25T01:03:11.860",friends:[{id:0,name:"Flynn Gilmore",age:27,balance:2582.57},{id:1,name:"Kline Hickman",age:31,balance:3853.99},{id:2,name:"Hatfield Owens",age:40,balance:2016.57},{id:3,name:"Michael Carson",age:31,balance:1293.03},{id:4,name:"Strickland Lowery",age:23,balance:1367.06},{id:5,name:"Georgia Chavez",age:37,balance:2957.48},{id:6,name:"Alma Berry",age:26,balance:2357.01}]},{id:"667d329f722eb89c82b56dec",balance:1602.02,age:35,eyeColor:"brown",name:"Lorrie Mcpherson",gender:"female",company:"PYRAMIA",registered:"2018-12-07T05:18:34.223",friends:[{id:0,name:"Bridgett Everett",age:37,balance:1438.53},{id:1,name:"Carlene Farley",age:25,balance:1410.54},{id:2,name:"Phoebe Mendez",age:24,balance:1979.36},{id:3,name:"Louella Cox",age:36,balance:3430.55},{id:4,name:"Velez Pugh",age:30,balance:3436.5}]},{id:"667d329ff853efe8c4e0a454",balance:2654.19,age:36,eyeColor:"brown",name:"Luann Jennings",gender:"female",company:"NAXDIS",registered:"2014-02-18T04:25:50.302",friends:[{id:0,name:"Walton Gentry",age:26,balance:1328.43},{id:1,name:"Lucy Koch",age:23,balance:2134.54},{id:2,name:"Toni Meyers",age:31,balance:2572.29},{id:3,name:"Vicki Frost",age:39,balance:3299.36},{id:4,name:"Meadows Baker",age:21,balance:2323.75}]},{id:"667d329f84f3bfbfcc763674",balance:2528.48,age:28,eyeColor:"brown",name:"Michelle Carey",gender:"female",company:"IDEGO",registered:"2016-10-01T04:25:07.187",friends:[{id:0,name:"Roman Sanders",age:40,balance:3551.16},{id:1,name:"Amanda Herman",age:22,balance:3928.02},{id:2,name:"Kay Montgomery",age:26,balance:3241.16},{id:3,name:"Valentine Wilder",age:23,balance:1413.31},{id:4,name:"Brigitte Nixon",age:32,balance:3113.39}]},{id:"667d329f4359ec766055a765",balance:3732.65,age:30,eyeColor:"brown",name:"Beach Maddox",gender:"male",company:"GEEKETRON",registered:"2021-03-24T11:55:31.135",friends:[{id:0,name:"Candy Gibbs",age:20,balance:2602.28},{id:1,name:"Alissa Rosario",age:36,balance:1958.84},{id:2,name:"Imelda Harmon",age:23,balance:3817.79},{id:3,name:"Addie Serrano",age:35,balance:3154.77},{id:4,name:"Jordan Shields",age:26,balance:3566.08}]},{id:"667d329f9ef3817d307e2583",balance:2151.52,age:32,eyeColor:"brown",name:"Whitney Hood",gender:"male",company:"EVENTAGE",registered:"2021-06-17T12:11:56.473",friends:[{id:0,name:"Noel Walsh",age:29,balance:2790.49},{id:1,name:"Barlow Rodriquez",age:35,balance:1664.23},{id:2,name:"Nash Keith",age:23,balance:2285.17},{id:3,name:"Chavez Webster",age:23,balance:3381.55},{id:4,name:"Herminia Chen",age:24,balance:1064.96},{id:5,name:"Susana Glass",age:22,balance:2749.35}]},{id:"667d329f9bd581700cac2dbc",balance:2209.77,age:40,eyeColor:"blue",name:"Tasha Mosley",gender:"female",company:"QUIZKA",registered:"2014-05-11T11:44:55.071",friends:[{id:0,name:"Larsen Wall",age:22,balance:1523.28},{id:1,name:"Holmes Hopkins",age:35,balance:1112.68},{id:2,name:"Giles Espinoza",age:21,balance:2550.95},{id:3,name:"Aimee Rosales",age:26,balance:2195.06},{id:4,name:"Karin Little",age:28,balance:2896.23},{id:5,name:"Angelita Mcfadden",age:25,balance:1051.15}]},{id:"667d329f6e2dbb2002be4b9e",balance:3298.23,age:31,eyeColor:"brown",name:"Schneider Walker",gender:"male",company:"BLEENDOT",registered:"2020-02-11T08:57:29.025",friends:[{id:0,name:"Helena William",age:34,balance:2579.69},{id:1,name:"Silva Ware",age:30,balance:2683.79},{id:2,name:"Enid Oconnor",age:22,balance:1816.46},{id:3,name:"Knowles Goff",age:24,balance:1675.75},{id:4,name:"Carolina Greer",age:29,balance:3337.27}]},{id:"667d329f8c548510c5d4f5ce",balance:2823.51,age:35,eyeColor:"green",name:"Mayo Shepard",gender:"male",company:"KIOSK",registered:"2024-02-24T12:45:57.463",friends:[{id:0,name:"Olga Hester",age:21,balance:3878.21},{id:1,name:"Rogers Sampson",age:23,balance:2669.62},{id:2,name:"Myra Johnson",age:27,balance:3489.32},{id:3,name:"Mcfadden Phillips",age:20,balance:2758.8},{id:4,name:"Park Moody",age:23,balance:3519.08}]},{id:"667d329f6574ada6f090fd54",balance:2631.69,age:40,eyeColor:"blue",name:"Avis Carlson",gender:"female",company:"LINGOAGE",registered:"2016-08-08T08:59:54.752",friends:[{id:0,name:"Mcdonald Dyer",age:25,balance:2262.39},{id:1,name:"Irene Baldwin",age:29,balance:1291.1},{id:2,name:"Rollins Anderson",age:26,balance:1437.04},{id:3,name:"Juliana Larson",age:29,balance:3492.22},{id:4,name:"Michele Gardner",age:20,balance:2003.15},{id:5,name:"Vang Cardenas",age:31,balance:1855.52},{id:6,name:"Puckett Hubbard",age:21,balance:1659.92}]}];const di=()=>`.sc-smoothly-table-demo-nested-no-cell-h{display:block}.sc-smoothly-table-demo-nested-no-cell-h>smoothly-display.sc-smoothly-table-demo-nested-no-cell{font-size:2em}.sc-smoothly-table-demo-nested-no-cell-h>*.sc-smoothly-table-demo-nested-no-cell{margin-bottom:2rem}.sc-smoothly-table-demo-nested-no-cell-h smoothly-table-expandable-row.sc-smoothly-table-demo-nested-no-cell{position:relative}`;const mi=class{constructor(e){t(this,e);this.loadedRows=[]}render(){return o(s,{key:"7bc6c5fec454f34a051539d4332a2b95b1524d36"},o("smoothly-display",{key:"d7b4e33850e1ce970844be312a5da0ef8546da81",type:"text",value:"Nested"}),o("smoothly-table",{key:"c395d0d02151ec40836fb44bca00ecefabc82b00",color:"primary",columns:8},o("smoothly-table-head",{key:"b1d21b6350b49470ce3d3745f067cd0dfe15ca4b"},o("smoothly-table-row",{key:"a1744fa8dfd23a4e2b4edfd5be60821d07f9fb8e"},o("div",{key:"eeccc6056ab4d36eb45b654874ae1887e416eb68",class:"smoothly-table-cell"},"Id"),o("div",{key:"d071193d8db7bf78711e829675ff72a7c31d403c",class:"smoothly-table-cell"},"Registered"),o("div",{key:"870b213222d6dceaf338df0d852ad2288a1c366a",class:"smoothly-table-cell"},"Name"),o("div",{key:"4dfbacae8816bcfcfef7090d08ce91851bb02dbc",class:"smoothly-table-cell"},"Age"),o("div",{key:"df7eb4a02fccae0c6492193a867d36be269622b1",class:"smoothly-table-cell"},"Balance"),o("div",{key:"c0e7a4fb74dfaa3feb90c5365e9b5acf55ba94dc",class:"smoothly-table-cell"},"EyeColor"),o("div",{key:"8ee2746419ff0c382e6f64a7b9d4e3b4e608fcb0",class:"smoothly-table-cell"},"Gender"),o("div",{key:"6a1914277b7ab5442b12671b16afaca77038622a",class:"smoothly-table-cell"},"Company"))),o("smoothly-table-body",{key:"746212a9d93a1577dd5c990b4d14894ceb4f137e"},hi.map(((t,e)=>o("smoothly-table-expandable-row",{onSmoothlyTableExpandableRowChange:t=>{if(t.detail){this.loadingIndex=e;setTimeout((()=>{this.loadingIndex=undefined;this.loadedRows=[...this.loadedRows,e]}),1500)}}},this.loadingIndex===e&&o("smoothly-spinner",{overlay:true,size:"small"}),this.loadedRows.includes(e)&&o("smoothly-table-demo-nested-no-cell-inner",{color:"secondary",data:t.friends,slot:"detail"}),o("div",{class:"smoothly-table-cell"},t.id),o("div",{class:"smoothly-table-cell"},t.registered),o("div",{class:"smoothly-table-cell"},t.name),o("div",{class:"smoothly-table-cell"},t.age),o("div",{class:"smoothly-table-cell"},t.balance),o("div",{class:"smoothly-table-cell"},t.eyeColor),o("div",{class:"smoothly-table-cell"},t.gender),o("div",{class:"smoothly-table-cell"},t.company))))),o("smoothly-table-foot",{key:"612581a9f4ea63707d1426c768ba64f7427987bc"},o("smoothly-table-row",{key:"a45f88cab126bd830d3919acc896dd99961bdce2"},o("div",{key:"19f5ea4fb2906eead38c263f5d0ac7e9139977f2",class:"smoothly-table-cell"},"Footer Cell"),o("div",{key:"039288cb2fa1912826a4bbdde3cba4fc953a99cd",class:"smoothly-table-cell"},"Footer Cell")))))}};mi.style=di();const yi=()=>`.sc-smoothly-table-demo-nested-no-cell-inner-h{display:block;margin:1em auto;width:60%}`;const bi=class{constructor(e){t(this,e)}render(){var t;return o(s,{key:"36f6b45a302f17eea86896fc1904184b34589f19"},o("smoothly-table",{key:"571e5c1870d82817d674f46832196ba837680b31",columns:4},o("smoothly-table-head",{key:"5b7b5b8d02ff31ec82cd35e6ec688a7adcedcf9e"},o("smoothly-table-row",{key:"c7f09a8188bf6be442e687813a9615c3d7afb95a"},o("div",{key:"b4294b01db0691cfb53c0e8e2b9c5dd487c2e07d",class:"smoothly-table-cell"},"Id"),o("div",{key:"ff9f0472466eb4cad25d0663c183a0a7fe932807",class:"smoothly-table-cell"},"Name"),o("div",{key:"0275a1da6d14f24d65dd1c179801ac865426dcbe",class:"smoothly-table-cell"},"Age"),o("div",{key:"3381fd46e6978680d84691992ad093de04ee1ecc",class:"smoothly-table-cell"},"Balance"))),o("smoothly-table-body",{key:"fc58d8650b0e04d350518f33cc2fa07f308e40cf"},(t=this.data)===null||t===void 0?void 0:t.map((t=>o("smoothly-table-expandable-row",null,o("div",{class:"smoothly-table-cell"},t.id),o("div",{class:"smoothly-table-cell"},t.name),o("div",{class:"smoothly-table-cell"},t.age),o("div",{class:"smoothly-table-cell"},t.balance)))))))}};bi.style=yi();const ui=()=>`.sc-smoothly-table-demo-simple-h{display:block}.sc-smoothly-table-demo-simple-h>smoothly-display.sc-smoothly-table-demo-simple{font-size:2em}.sc-smoothly-table-demo-simple-h>*.sc-smoothly-table-demo-simple{margin-bottom:2rem}`;const pi=class{constructor(e){t(this,e)}render(){return o(s,{key:"2efdbea999fe8e2d237d018147ee9080b893ad33"},o("smoothly-display",{key:"12b21356d7aeeae6940243380352b95c12dfff5d",type:"text",value:"Simple"}),o("smoothly-table",{key:"793660cc185168cfc2d80f61e57ab67faffa00d3",color:"primary",columns:2},o("smoothly-table-head",{key:"9d85b0d97a12838aa8c6953155e8a009507f49ac"},o("smoothly-table-row",{key:"4c6f644786476efe6a1beffcbda13abdcad2fd75"},o("smoothly-table-cell",{key:"9538d1875ee057f07c33163e1e78a0e30e6558c0"},"Breed"),o("smoothly-table-cell",{key:"194bf1b1adf62ea0b12c3389fc75fe8d511b14bb"},"Coat"))),o("smoothly-table-body",{key:"1dec581f127727e413a6e4aad94c7b0d29d8f850"},fi.map((t=>o("smoothly-table-row",null,o("smoothly-table-expandable-cell",null,t.breed,o("div",{slot:"detail"},"Country:",o("br",null),t.country)),o("smoothly-table-expandable-cell",null,t.coat,o("div",{slot:"detail"},"Pattern: ",t.pattern))))),o("smoothly-table-row",{key:"0492ef355b8d6829d9e65cd419c521b76bb215f9"},o("smoothly-table-cell",{key:"3459b0e72cb10dfb0d7f820d5b9fda5ac13c2b17"},"Cell5"),o("smoothly-table-expandable-cell",{key:"31b3691b9b4e1b51072bbf1bd22e23ad134d3996"},"Expandable Cell",o("div",{key:"d0e20ad230d037628ad34b4a12d768c3b4fb4ead",slot:"detail"},"Content of the expandable cell"))),o("smoothly-table-row",{key:"74cc23ba61afe01a6f5a89f57fe85d6514aded50"},o("smoothly-table-expandable-cell",{key:"8e0faf1f2361181aa17943da5c065e7f3a0d87dc"},"Expandable Cell 1",o("div",{key:"cbf4bd0814781875bc48ec498699425c21b586ab",slot:"detail"},"Content of the expandable cell 1")),o("smoothly-table-expandable-cell",{key:"be15d9e43dad85222e8bc652e6bd68bdbf636a0f"},"Expandable Cell 2",o("div",{key:"7e1507e45c07ff40bc662a24e6f1d93671de1467",slot:"detail"},"Content of the expandable cell 2")))),o("smoothly-table-foot",{key:"94624f1591f9d3a18e3b84dbf8f76d8a46916028"},o("smoothly-table-row",{key:"a769b1e334d1f73a1cfc5a9539f31a99fb9e152c"},o("smoothly-table-cell",{key:"e14dd9f2bf4762b8e8c91c6309b8b3e966b504bd"},"Footer Cell"),o("smoothly-table-cell",{key:"d1b743ab0a072476bf6f7e7240bec71f2a242949"},"Footer Cell")))))}};const fi=[{breed:"Abyssinian",country:"Ethiopia",origin:"Natural/Standard",coat:"Short",pattern:"Ticked"},{breed:"Aegean",country:"Greece",origin:"Natural/Standard",coat:"Semi-long",pattern:"Bi- or tri-colored"},{breed:"American Curl",country:"United States",origin:"Mutation",coat:"Short/Long",pattern:"All"},{breed:"American Bobtail",country:"United States",origin:"Mutation",coat:"Short/Long",pattern:"All"},{breed:"American Shorthair",country:"United States",origin:"Natural",coat:"Short",pattern:"All but colorpoint"},{breed:"American Wirehair",country:"United States",origin:"Mutation",coat:"Rex",pattern:"All but colorpoint"},{breed:"Arabian Mau",country:"Arabian Peninsula",origin:"Natural",coat:"Short",pattern:""},{breed:"Australian Mist",country:"Australia",origin:"Crossbreed",coat:"Short",pattern:"Spotted and Classic tabby"},{breed:"Asian",country:"developed in the United Kingdom (founding stock from Asia)",origin:"",coat:"Short",pattern:"Evenly solid"},{breed:"Asian Semi-longhair",country:"United Kingdom",origin:"Crossbreed",coat:"Semi-long",pattern:"Solid"}];pi.style=ui();const gi=()=>`.sc-smoothly-table-expandable-cell-h{display:contents}.sc-smoothly-table-expandable-cell-h>div.content.sc-smoothly-table-expandable-cell{grid-column:span var(--smoothly-table-cell-span, 1);display:flex;padding-inline:var(--smoothly-table-cell-padding-inline, 1.1rem);min-height:var(--smoothly-table-cell-min-height, 2.75rem);box-sizing:border-box;align-items:center;white-space:nowrap;position:relative;padding-left:1.1rem}.sc-smoothly-table-expandable-cell-h>div.content.sc-smoothly-table-expandable-cell::before{content:"";display:flex;position:absolute;top:50%;translate:0 -50%;height:0.4rem;width:0.4rem;left:0.3rem;border-bottom:1px solid rgb(var(--smoothly-table-foreground));border-right:1px solid rgb(var(--smoothly-table-foreground));transition:rotate 200ms ease-in-out;rotate:-45deg;opacity:0.3}.sc-smoothly-table-expandable-cell-h>div.content.sc-smoothly-table-expandable-cell:hover::before{border-bottom:1px solid rgb(var(--smoothly-table-hover-foreground));border-right:1px solid rgb(var(--smoothly-table-hover-foreground));opacity:1}.sc-smoothly-table-expandable-cell-h>div.content.sc-smoothly-table-expandable-cell:hover{background-color:rgb(var(--smoothly-table-hover-background));color:rgb(var(--smoothly-table-hover-foreground));stroke:rgb(var(--smoothly-table-hover-foreground));fill:rgb(var(--smoothly-table-hover-foreground))}[open].sc-smoothly-table-expandable-cell-h>div.content.sc-smoothly-table-expandable-cell::before{rotate:45deg}.sc-smoothly-table-expandable-cell-h>div.sc-smoothly-table-expandable-cell:first-child{cursor:pointer}.sc-smoothly-table-expandable-cell-h>div.smoothly-table-detail.sc-smoothly-table-expandable-cell{grid-column:1/-1;grid-row:2;position:relative;padding-block:var(--smoothly-table-detail-padding-block, 0.5rem);padding-inline:var(--smoothly-table-detail-padding-inline, 1.1rem)}[open].sc-smoothly-table-expandable-cell-h>div.content.sc-smoothly-table-expandable-cell{box-shadow:1px 1px 1px -1px rgb(var(--smoothly-table-border)) inset, -3px -1px 1px -3px rgb(var(--smoothly-table-border)) inset}[open].sc-smoothly-table-expandable-cell-h>div.sc-smoothly-table-expandable-cell{background-color:rgb(var(--smoothly-table-expanded-background));color:rgb(var(--smoothly-table-expanded-foreground));stroke:rgb(var(--smoothly-table-expanded-foreground));fill:rgb(var(--smoothly-table-expanded-foreground))}.sc-smoothly-table-expandable-cell-h:not([open])>div.smoothly-table-detail.sc-smoothly-table-expandable-cell{display:none}.sc-smoothly-table-expandable-cell-h>div.smoothly-table-detail.sc-smoothly-table-expandable-cell::before{content:"";position:absolute;display:flex;box-sizing:border-box;top:0;bottom:0;left:-1em;width:1em;background-color:rgb(var(--smoothly-table-expanded-background));border-left:0.3em solid rgb(var(--smoothly-table-detail-border, var(--smoothly-table-border)));box-shadow:2px 0px 0px 0px rgb(var(--smoothly-table-expanded-background)), 0px 0px 1px 0px rgb(var(--smoothly-table-border))}.sc-smoothly-table-expandable-cell-h>div.smoothly-table-detail.sc-smoothly-table-expandable-cell::after{content:"";position:absolute;display:flex;top:0;bottom:0;right:-1em;width:1em;background-color:rgb(var(--smoothly-table-expanded-background));box-shadow:-2px 0px 0px 0px rgb(var(--smoothly-table-expanded-background)), 0px 0px 1px 0px rgb(var(--smoothly-table-border))}`;const ki=class{constructor(o){t(this,o);this.smoothlyTableExpandableCellChange=e(this,"smoothlyTableExpandableCellChange");this.smoothlyTableExpandableCellRegister=e(this,"smoothlyTableExpandableCellRegister");this.span=1;this.open=false}componentWillLoad(){this.smoothlyTableExpandableCellRegister.emit()}async close(){this.open=false}clickHandler(t){var e,o;const s=this.detailElement&&t.composedPath().includes(this.detailElement);if(!s){const t=(e=window.getSelection())===null||e===void 0?void 0:e.toString().trim();if(((o=t===null||t===void 0?void 0:t.length)!==null&&o!==void 0?o:0)==0){this.open=!this.open}}}openChange(){this.smoothlyTableExpandableCellChange.emit(this.open)}render(){var t;return o(s,{key:"4ad3f23ce5db4ed752db950bd4d3ec54ad839c54",style:{"--smoothly-table-cell-span":(t=this.span)===null||t===void 0?void 0:t.toString(10)},onClick:t=>this.clickHandler(t)},o("div",{key:"676608664ca58dcc52d8d684a23bb324aadda90a",class:"content"},o("slot",{key:"209daa4ff46fb96909f528c49dd2f802e2b5c090"})),o("div",{key:"d63a4702d5aa24b8233080a2e621284466312804",class:"smoothly-table-detail",ref:t=>this.detailElement=t},o("slot",{key:"a10d5ab5cc71f24f1c5f6ee63096fd8a27ea857f",name:"detail"})))}static get watchers(){return{open:[{openChange:0}]}}};ki.style=gi();const vi=()=>`.sc-smoothly-table-expandable-row-h{grid-column:1/-1;display:grid;grid-template-columns:subgrid;grid-template-rows:auto 0fr;box-shadow:0px 1px 1px -1px rgb(var(--smoothly-table-border))}.sc-smoothly-table-expandable-row-h.sc-smoothly-table-expandable-row-s>.smoothly-table-cell{grid:subgrid;cursor:pointer;grid-column:span var(--smoothly-table-cell-span, 1);display:flex;align-items:center;padding-inline:var(--smoothly-table-cell-padding-inline, 1.1rem);min-height:var(--smoothly-table-cell-min-height, 2.75rem);white-space:nowrap}.sc-smoothly-table-expandable-row-h:has(>.smoothly-table-cell:hover){background-color:rgb(var(--smoothly-table-hover-background));color:rgb(var(--smoothly-table-hover-foreground))}[open].sc-smoothly-table-expandable-row-h{background-color:rgb(var(--smoothly-table-expanded-background));color:rgb(var(--smoothly-table-expanded-foreground));grid-template-rows:auto 1fr;box-shadow:0px 1px 1px -1px rgb(var(--smoothly-table-border)), 0px 0px 1px rgb(var(--smoothly-table-border)) inset;grid-template-rows:0fr 1fr}.sc-smoothly-table-expandable-row-h:not([open])>div.smoothly-table-detail.sc-smoothly-table-expandable-row{display:none}.sc-smoothly-table-expandable-row-h>div.smoothly-table-detail.sc-smoothly-table-expandable-row{grid-column:1/-1;cursor:default;position:relative;overflow:hidden;background-color:rgb(var(--smoothly-table-expanded-background));color:rgb(var(--smoothly-table-expanded-foreground))}.sc-smoothly-table-expandable-row-h>.smoothly-table-cell.sc-smoothly-table-expandable-row:first-of-type{position:relative;padding-left:1.1rem}.sc-smoothly-table-expandable-row-h>.smoothly-table-cell.sc-smoothly-table-expandable-row:first-of-type::before{content:"";display:flex;position:absolute;top:50%;translate:0 -50%;height:0.4rem;width:0.4rem;left:0.3rem;border-bottom:1px solid rgb(var(--smoothly-table-foreground));border-right:1px solid rgb(var(--smoothly-table-foreground));transition:rotate 200ms ease-in-out;rotate:-45deg;opacity:0.3}.sc-smoothly-table-expandable-row-h:has(>.smoothly-table-cell:hover)>.smoothly-table-cell.sc-smoothly-table-expandable-row:first-of-type::before{border-bottom:1px solid rgb(var(--smoothly-table-hover-foreground));border-right:1px solid rgb(var(--smoothly-table-hover-foreground));opacity:1}[open].sc-smoothly-table-expandable-row-h>.smoothly-table-cell.sc-smoothly-table-expandable-row:first-of-type::before{rotate:45deg}[open].sc-smoothly-table-expandable-row-h>div.smoothly-table-detail.sc-smoothly-table-expandable-row{overflow:visible;padding-block:var(--smoothly-table-detail-padding-block, 0.5rem);padding-inline:var(--smoothly-table-detail-padding-inline, 1.1rem)}.sc-smoothly-table-expandable-row-h>div.smoothly-table-detail.sc-smoothly-table-expandable-row::before{content:"";position:absolute;display:flex;box-sizing:border-box;top:0;bottom:0;left:-1em;width:1em;background-color:rgb(var(--smoothly-table-expanded-background));border-left:0.3em solid rgb(var(--smoothly-table-detail-border, var(--smoothly-table-border)));box-shadow:2px 0px 0px 0px rgb(var(--smoothly-table-expanded-background)), 0px 0px 1px 0px rgb(var(--smoothly-table-border))}.sc-smoothly-table-expandable-row-h>div.smoothly-table-detail.sc-smoothly-table-expandable-row::after{content:"";position:absolute;display:flex;top:0;bottom:0;right:-1em;width:1em;background-color:rgb(var(--smoothly-table-expanded-background));box-shadow:-2px 0px 0px 0px rgb(var(--smoothly-table-expanded-background)), 0px 0px 1px 0px rgb(var(--smoothly-table-border))}`;const wi=class{constructor(o){t(this,o);this.smoothlyTableExpandableRowChange=e(this,"smoothlyTableExpandableRowChange");this.open=false}clickHandler(t){var e,o;const s=this.div&&t.composedPath().includes(this.div);if(!s){const t=(e=window.getSelection())===null||e===void 0?void 0:e.toString().trim();if(((o=t===null||t===void 0?void 0:t.length)!==null&&o!==void 0?o:0)==0){this.open=!this.open}}}openChange(){this.smoothlyTableExpandableRowChange.emit(this.open)}render(){return o(s,{key:"9e84dfc3e17d085b3906f789b014670830079257",onClick:t=>this.clickHandler(t)},o("slot",{key:"550fa1569c00ef0a759958b9a731897dc379e7ca"}),o("div",{key:"b9f6d0b151720b77800c4d610f9682ea9b0a242e",class:"smoothly-table-detail",ref:t=>this.div=t},o("slot",{key:"6b693e48c396b4915a62700567859fa47e6b682e",name:"detail"})))}static get watchers(){return{open:[{openChange:0}]}}};wi.style=vi();const xi=()=>`.sc-smoothly-table-filler-row-h{grid-column:1 / -1}`;const Ci=class{constructor(e){t(this,e)}render(){return o("smoothly-table-row",{key:"d77076fd44474052265f353b93ad55274ce8c58e"},o("smoothly-table-cell",{key:"dbb64a7779542001e6ae2a1d7ba60601fe94a8c6"},o("slot",{key:"73fca7b0a7ee9b9e3cb45b21b9fc83fe1e59c029"})))}};Ci.style=xi();const Si=()=>`.sc-smoothly-table-foot-h{grid-column:1 / -1;display:grid;grid-template-columns:subgrid;position:sticky;z-index:1;bottom:0;background-color:rgb(var(--smoothly-table-footer-background));color:rgb(var(--smoothly-table-footer-foreground));stroke:rgb(var(--smoothly-table-footer-foreground));fill:rgb(var(--smoothly-table-footer-foreground))}`;const zi=class{constructor(e){t(this,e)}render(){return o(s,{key:"9ed27d9a22178da4bb63dc53fcf5ea68179d43a9"},o("slot",{key:"f390e7474a31021cf29914c5b1e994820f3d7265"}))}};zi.style=Si();const Ii=()=>`.sc-smoothly-table-head-h{grid-column:1 / -1;display:grid;grid-template-columns:subgrid;top:var(--top);position:sticky;z-index:var(--z-index);--smoothly-color:var(--smoothly-table-header-background);--smoothly-color-contrast:var(--smoothly-table-header-foreground);background-color:rgb(var(--smoothly-table-header-background));color:rgb(var(--smoothly-table-header-foreground));stroke:rgb(var(--smoothly-table-header-foreground));fill:rgb(var(--smoothly-table-header-foreground));font-weight:bold;transition:box-shadow 0.3s ease}.scrolled.sc-smoothly-table-head-h{box-shadow:var(--smoothly-table-header-shadow)}`;const Ti=class{constructor(e){t(this,e);this.depth=0;this.onScroll=t=>{if(t.target instanceof HTMLElement){this.scrollParent=t.target;const e=this.scrollParent.getBoundingClientRect();const o=this.element.getBoundingClientRect();this.scrolled=e.top==o.top}}}getTopOffset(){let t=0;let e=this.element;while(e){if(e.tagName.toLowerCase()==="smoothly-table"){const o=e.querySelector("smoothly-table-head");if(o!==this.element){const e=Array.from(o.querySelectorAll(":scope > smoothly-table-row"));t+=e.length}}e=e.parentElement}this.depth=t}connectedCallback(){var t;this.scrollParent=n.findParent(this.element);(t=this.scrollParent)===null||t===void 0?void 0:t.addEventListener("scroll",this.onScroll);this.getTopOffset()}disconnectedCallback(){var t;(t=this.scrollParent)===null||t===void 0?void 0:t.removeEventListener("scroll",this.onScroll)}render(){return o(s,{key:"993c6bc1713a36aed6bd3c49fc12998f21f377f5",class:{scrolled:!!this.scrolled},style:{"--top":`calc(${this.depth} * var(--smoothly-table-cell-min-height))`,"--z-index":`${10-this.depth}`}},o("slot",{key:"09bb8cb6a4c4d7812f1c7f793a384997dc439933"}))}get element(){return a(this)}};Ti.style=Ii();const Di=()=>`.sc-smoothly-table-row-h{grid-column:1 / -1;display:grid;grid-template-columns:subgrid;box-sizing:border-box;box-shadow:0px 1px 1px -1px rgb(var(--smoothly-table-border))}.sc-smoothly-table-row-h .smoothly-table-cell.sc-smoothly-table-row,.sc-smoothly-table-row-h.sc-smoothly-table-row-s>.smoothly-table-cell{display:flex;grid-column:span var(--smoothly-table-cell-span, 1);align-items:center;padding-inline:var(--smoothly-table-cell-padding-inline, 1.1rem);min-height:var(--smoothly-table-cell-min-height, 2.75rem);white-space:nowrap}.sc-smoothly-table-row-h:has(smoothly-table-expandable-cell){grid-template-rows:auto 0fr 0fr}.sc-smoothly-table-row-h:has(smoothly-table-expandable-cell[open]){grid-template-rows:auto 1fr 0fr}`;const ji=class{constructor(e){t(this,e);this.expandableCells=new Set}smoothlyTableExpandableCellRegisterHandler(t){t.stopPropagation();this.expandableCells.add(t.target)}smoothlyTableExpandableCellChangeHandler(t){if(t.detail){for(const e of this.expandableCells){t.target!=e&&e.close()}}}render(){return o(s,{key:"0425407687e577b5fffba44db7d3d97723c9d5a5"},o("slot",{key:"51b3451cb07fbd22d1588033a32c1728058fe85c"}))}};ji.style=Di();const Li=()=>`.sc-smoothly-table-row-group-h{grid-column:1/-1;display:grid;grid-template-columns:subgrid;margin-top:1px}.sc-smoothly-table-row-group-h>div.sc-smoothly-table-row-group:first-child{grid-column:1/-1;display:grid;position:relative;cursor:pointer;padding-inline:var(--smoothly-table-cell-padding-inline, 1.1rem);min-height:var(--smoothly-table-cell-min-height, 2.75rem);background-color:rgb(var(--smoothly-default-tint));border-bottom:1px solid rgb(var(--smoothly-default-shade));position:relative;padding-left:1.1rem}.sc-smoothly-table-row-group-h>div.sc-smoothly-table-row-group:first-child::before{content:"";display:flex;position:absolute;top:50%;translate:0 -50%;height:0.4rem;width:0.4rem;left:0.3rem;border-bottom:1px solid rgb(var(--smoothly-table-foreground));border-right:1px solid rgb(var(--smoothly-table-foreground));transition:rotate 200ms ease-in-out;rotate:-45deg;opacity:0.3}.sc-smoothly-table-row-group-h>div.sc-smoothly-table-row-group:first-child:hover::before{border-bottom:1px solid rgb(var(--smoothly-table-hover-foreground));border-right:1px solid rgb(var(--smoothly-table-hover-foreground));opacity:1}.sc-smoothly-table-row-group-h>div.sc-smoothly-table-row-group:first-child:hover{color:rgb(var(--smoothly-table-hover-foreground));background-color:rgb(var(--smoothly-table-hover-background))}[open].sc-smoothly-table-row-group-h>div.sc-smoothly-table-row-group:first-child::before{rotate:45deg}.sc-smoothly-table-row-group-h>div.sc-smoothly-table-row-group:last-child{grid-column:1/-1;display:grid;grid-template-columns:subgrid}[align].sc-smoothly-table-row-group-h>div.sc-smoothly-table-row-group:first-child{grid-template-columns:subgrid}[align].sc-smoothly-table-row-group-h>div.sc-smoothly-table-row-group:first-child>div.sc-smoothly-table-row-group{display:contents}[align].sc-smoothly-table-row-group-h>div.sc-smoothly-table-row-group:first-child>div.sc-smoothly-table-row-group>*.sc-smoothly-table-row-group{display:flex;align-items:center;padding-inline:var(--smoothly-table-cell-padding-inline, 1.1rem);min-height:var(--smoothly-table-cell-min-height, 2.75rem)}.sc-smoothly-table-row-group-h:not([align])>div.sc-smoothly-table-row-group:first-child{grid-column:1/-1;display:grid;align-items:center;grid-template-columns:repeat(2, auto);justify-content:space-between}.sc-smoothly-table-row-group-h:not([align])>div.sc-smoothly-table-row-group:first-child>div.sc-smoothly-table-row-group:first-child{justify-self:start;display:flex;gap:1rem}.sc-smoothly-table-row-group-h:not([align])>div.sc-smoothly-table-row-group:first-child>div.sc-smoothly-table-row-group:last-child{justify-self:end;display:flex;gap:1rem}.sc-smoothly-table-row-group-h:not([open]){grid-template-rows:auto 0fr}.sc-smoothly-table-row-group-h:not([open])>div.sc-smoothly-table-row-group:last-child{grid-row:2;overflow:hidden}`;const Ri=class{constructor(o){t(this,o);this.smoothlyTableRowGroupChange=e(this,"smoothlyTableRowGroupChange");this.align=false;this.open=false}clickHandler(){var t,e;const o=(t=window.getSelection())===null||t===void 0?void 0:t.toString().trim();if(((e=o===null||o===void 0?void 0:o.length)!==null&&e!==void 0?e:0)==0){this.open=!this.open;this.smoothlyTableRowGroupChange.emit(this.open)}}render(){return o(s,{key:"ce13a22ad4e51ee514e1e4b2f7a20c46fa92f6f1"},o("div",{key:"f02760b02c1bb6041a786cfb6d225e39711ff373",onClick:()=>this.clickHandler()},o("div",{key:"db60ed9bc5b1122b59951b71ec314541282fcf6a"},o("slot",{key:"45a5e3c909e67b106fd2d2f4c4569a907d71c144",name:"start"})),o("div",{key:"ebb125b675ab71d721e3898517b4f4c51fa74b11"},o("slot",{key:"d7b3a84aad30848650579443f1545b4728f5e7c3",name:"end"}))),o("div",{key:"25a4c03b5e60f612788485f2aaeaa3c9b1fd0086"},o("slot",{key:"a82b554991b81a22415fcd59b286a2a676cd1aac"})))}};Ri.style=Li();const _i=()=>`.sc-smoothly-tabs-h{display:grid;grid-template-columns:repeat(var(--tabs), auto);grid-template-rows:auto auto}.sc-smoothly-tabs-h.hide-tabs.sc-smoothly-tabs-s>smoothly-tab>div:first-child{display:none}`;const Ai=class{constructor(o){t(this,o);this.smoothlyTabOpen=e(this,"smoothlyTabOpen");this.tabs="always";this.tabElements=[]}async removeTab(t){if(this.element.isConnected){this.tabElements=this.tabElements.filter((e=>e!==t));if(t.open){const t=this.tabElements.find((t=>!t.disabled));t&&(t.open=true)}}}onInputLoad(t){t.stopPropagation();if(this.isSmoothlyTabElement(t.target)&&t.target.parentElement==this.element&&!this.tabElements.includes(t.target)){t.detail(this);this.tabElements=[...this.tabElements,t.target]}}isSmoothlyTabElement(t){return(t===null||t===void 0?void 0:t.tagName)=="SMOOTHLY-TAB"}openChanged(t){const e=t.target;if(this.isSmoothlyTabElement(e)){t.stopPropagation();this.selectedElement=e;this.smoothlyTabOpen.emit(t.detail)}}onSelectedChange(t,e){if(e){e.open=false}}render(){var t;return o(s,{key:"b04840f6e13daa8be63254d382614ddf521ce1b8",class:{"hide-tabs":this.tabs=="multiple"&&this.tabElements.length==1},style:{"--tabs":`${(t=this.numberOfTabs)!==null&&t!==void 0?t:this.tabElements.length}`}},o("slot",{key:"7b4c480e7e74d4b5ecaea562f6d5f981f17f3fa1"}))}get element(){return a(this)}static get watchers(){return{selectedElement:[{onSelectedChange:0}]}}};Ai.style=_i();const $i=()=>`.sc-smoothly-tabs-demo-h{display:block}[hidden].sc-smoothly-tabs-demo-h{display:none}.sc-smoothly-tabs-demo-h>*.sc-smoothly-tabs-demo{margin:auto;max-width:1200px;width:100%;margin-block:5rem}.sc-smoothly-tabs-demo-h code.sc-smoothly-tabs-demo{color:rgb(var(--smoothly-medium-contrast));background-color:rgb(var(--smoothly-medium-color));padding-inline:0.25rem;border-radius:0.25rem}`;const Mi=class{constructor(e){t(this,e)}render(){return o(s,{key:"4a80dd41c51100c1301561693d8c4a2df403c4da"},o("div",{key:"11006ee9bb40b9cf37e2178bce53ed628c1283f6"},o("smoothly-button",{key:"26ff4ef958ee840faecf68fe2e11a0c3c3cdbc30",color:"primary",onClick:()=>this.extraTab1=!this.extraTab1},this.extraTab1?"Remove":"Add"," tab")),o("smoothly-tabs",{key:"417217100133e8df781567c756f39f6947c16f89",tabs:"multiple"},o("smoothly-tab",{key:"724fe03a378b22c016fa2fcda4bad3bc55dfe37a",label:"Single Tab",open:true},o("strong",{key:"e604a2da6994a0bbefd94a8ecdc25f526edaf48e"},"Single Tab content here.")," If only one tab is available setting ",o("code",{key:"93ec1421406263e82787412cb3c81758fd66d13d"},"tabs")," to"," ",o("code",{key:"42428750de3b7c3d8b9a07ef405c4a99a01404d9"},'"multiple"')," will hide the tab navigation and display the single tab's content directly."),this.extraTab1&&o("smoothly-tab",{key:"f423d7a8c75b17b2557c1607e234ef55898eb479",label:"Extra tab"},"When there are more then one tab, the tab navigation will show.")),o("div",{key:"f884806decb90da0e45420a017e2c66a342a766a"},o("smoothly-button",{key:"d124105cba0e312a10e023d0cef9fd5b8976589e",color:"primary",onClick:()=>this.extraTab2=!this.extraTab2},this.extraTab2?"Remove":"Add"," tab")),o("smoothly-tabs",{key:"754abfb1e802e5fe78a41b8a90118988f4cc762a"},o("smoothly-tab",{key:"bdeae6ae82b0cc55116be4cc10709df1decd5a52",label:"Disabled tab",tooltip:"Tooltip for test3",disabled:true},"this is a test message again!"),o("smoothly-tab",{key:"7aaefe748609e3985c2f83acfac325af406e927e",label:"test1",tooltip:"Tooltip for test1",open:true},"Hello world!"),o("smoothly-tab",{key:"c1cccf83bc7042494535ed591cf03d930f8d3332",label:"test2"},"this is a test message!"),this.extraTab2&&o("smoothly-tab",{key:"e77b11f0d06d1805f28092a16d79c5b7cfd926c5",label:"test-extra"},"this is a test message!")))}};Mi.style=$i();const Ei=()=>`.sc-smoothly-theme-color-h{display:flex;flex-direction:column;align-items:center}.sc-smoothly-theme-color-h>.sc-smoothly-theme-color:first-child{margin-top:0.2rem}`;const Oi=class{constructor(e){t(this,e)}render(){return o(s,{key:"d0a540b220f6677f2789af7d5f837d8886a357d0"},this.color,["tint","color","shade"].map((t=>o("smoothly-theme-color-variant",{title:`${this.color} ${t}`,color:this.color,variant:t}))))}};Oi.style=Ei();const Pi=()=>`.sc-smoothly-theme-color-variant-h{display:flex;justify-content:center;align-items:center;width:3em;height:3em;font-weight:900}[color][variant=color].sc-smoothly-theme-color-variant-h{background:rgb(var(--smoothly-color))}[color][variant=tint].sc-smoothly-theme-color-variant-h{background:rgb(var(--smoothly-color-tint))}[color][variant=shade].sc-smoothly-theme-color-variant-h{background:rgb(var(--smoothly-color-shade))}`;const Hi=class{constructor(e){t(this,e);this.variant="color"}render(){return"Aa"}};Hi.style=Pi();const Fi=()=>`.sc-smoothly-theme-colors-h{display:grid;grid-template-columns:repeat(3, 1fr);row-gap:1rem;column-gap:0.5rem;width:fit-content}`;const Ui=class e{constructor(e){t(this,e)}render(){return["primary","secondary","tertiary","success","warning","danger","light","medium","dark","default"].map((t=>o("smoothly-theme-color",{color:t})))}};Ui.style=Fi();const Ni=()=>`.sc-smoothly-theme-demo-h{max-width:min(calc(100% - 2rem), 56rem);margin:auto;display:flex;flex-direction:column;gap:2em;margin-top:2em}.sc-smoothly-theme-demo-h>smoothly-theme-picker.sc-smoothly-theme-demo{width:20em}.sc-smoothly-theme-demo-h>div.sc-smoothly-theme-demo{display:flex;flex-direction:row;justify-content:space-between;gap:1rem}`;const Yi=class{constructor(e){t(this,e)}render(){return o(s,{key:"b0bbd6191f8813c26d5886781733dd9bf741b99c"},o("h2",{key:"e91a7fdb7d96a680e59c927e45acee05200bb95c"},"Theme"),o("smoothly-theme-picker",{key:"5fd8fdae6e0d2ff31dc0ff17c491238ed35bf490"},o("smoothly-item",{key:"5920957a82d6ab7172b57eb59b421aa46ee54b9b",selected:true,value:"assets/style/smoothly.css"},"Smoothly"),o("smoothly-item",{key:"058c6ccaa2f06a749b822a30efe5cc77c4e10e72",value:"https://app.issuefab.com/assets/style/index.css"},"Issuefab"),o("smoothly-item",{key:"39818c97423808e82305846cb10b07a6f33c3f64",value:"https://app.proquse.com/assets/style/index.css"},"Proquse"),o("smoothly-item",{key:"0c6e1332df64fb8735b4dca530762f21880b26eb",value:"https://app.weekmeter.com/assets/style/index.css"},"Weekmeter"),o("smoothly-item",{key:"622e018eef75102e056658a158bad09a65e8000f",value:"https://test.dash.pax2pay.app/p2pdash.css"},"Pax2Pay Dashboard"),o("smoothly-item",{key:"620929a5b84a9ba4aa5ecddfa594711bf8a01d99",value:"https://ui.pax2pay.app/assets/style/pax2pay.css"},"Pax2Pay Portal"),o("smoothly-item",{key:"53ba85ee8f2756864733dd329e9a2e28e7367197",value:"https://theme.payfunc.com/intergiro/index.css"},"Intergiro Monitor"),o("smoothly-item",{key:"50395895f3cb399882761534e08c7d419a81519e",value:"https://theme.payfunc.com/light/index.css"},"Payfunc Light"),o("smoothly-item",{key:"b8becda45015864fa8f5835d3e6cec993b47f59c",value:"https://theme.payfunc.com/dark/index.css"},"Payfunc Dark")),o("div",{key:"0ab79f2d41eacb2414707b9c0231771261b0e488"},o("smoothly-theme-colors",{key:"5f70418b92a6ac65b33f00047dd060f28b5fe020"}),o("smoothly-theme-guide",{key:"102b8e24b377e5b00d5b2f8709faa7e5ba0ef60c"})),o("smoothly-button",{key:"238265f4b86ab0cfdaf98d4ca592a8fc05e68215",type:"link",link:"/redirect"},"To redirect"),o("smoothly-button",{key:"ffaa46726387eea854bdbc6ffc0d2cea5793f149",type:"link",link:"/redirect"},"To /redirect"),o("smoothly-button",{key:"159b1948947dd3adb43142362d0006c71fdf7c03",type:"link",link:new URL("/redirect",window.location.origin).href},'To new URL("redirect")'),o("smoothly-button",{key:"aa510bc3cf7526bd234ed13089ae752113914423",type:"link",link:"redirect/nested"},"To redirect nested"))}};Yi.style=Ni();const Wi=()=>`.sc-smoothly-theme-guide-h{max-width:50ch}`;const Bi=class{constructor(e){t(this,e)}render(){return[o("smoothly-display",{key:"a830c8d6d95a789caee78f4d8417428148983c5e"},"Tint is used as background to highlight, for example hovering an item in the select menu."),o("br",{key:"dbedc7fedfd22a2e565722a82e84dc96fc26a7f8"}),o("smoothly-display",{key:"3c4a7c1e786d6127b9678255784764d72f3611a9"},"Color is used as a normal background or as a background to show that something is selected, for example a selected item in the select menu."),o("br",{key:"5bbad40a4217820ba5b332954702a031bf5b9073"}),o("smoothly-display",{key:"6bf810cc6c0b3a1d2a67bb8b2779fe3d2c4e4a2e"},"Shade is used as border and for symbols in buttons. It works as a semi-low contrast against color and tint."),o("br",{key:"ef169f909cef881bb6f3a0355dc0b482d8bc0496"}),o("smoothly-display",{key:"bd47c4f897e48cc02787f9e7f9396d2c3df23ddc"},"One can use the ","<smoothly-color>"," component to switch between what color set is used."," "),o("br",{key:"39fae791a0b502d9a006e8aa395a357c7f3e5308"})]}};Bi.style=Wi();const Vi=()=>``;const Gi=class{constructor(e){t(this,e);this.element="smoothly-css"}render(){return o(s,{key:"2af98203042f4b72b535f47ff21ffaa4b5c0af6e"},o("smoothly-input-select",{key:"247e1590c3198949e097eeb0a29f0cd339df2f81",name:"theme",looks:"border",onSmoothlyInput:t=>{const e=document.querySelector(`#${this.element}`);if(e instanceof HTMLLinkElement&&typeof t.detail.theme=="string"){e.href=t.detail.theme}}},o("label",{key:"180f4a1ce2bd43d670e0dc111914ba07907c6176",slot:"label"},"Select theme"),o("slot",{key:"86681b9a7827f9329d8827fe01618ab39409570f"})))}};Gi.style=Vi();const Ki=()=>`.sc-smoothly-toggle-switch-h{display:block}.sc-smoothly-toggle-switch-h>button.sc-smoothly-toggle-switch{width:100%;height:100%;display:flex;align-items:center;padding-inline:0;cursor:pointer;border:none;border-radius:3em;background-color:rgb(var(--smoothly-color))}.sc-smoothly-toggle-switch-h>button.sc-smoothly-toggle-switch:hover{background-color:rgb(var(--smoothly-color-tint))}.sc-smoothly-toggle-switch-h>button.sc-smoothly-toggle-switch>smoothly-icon.sc-smoothly-toggle-switch{display:flex;justify-content:flex-start;align-items:center;fill:rgb(var(--smoothly-color-contrast));stroke:rgb(var(--smoothly-color-contrast));transition:100ms ease-in-out}[selected][checkmark].sc-smoothly-toggle-switch-h>button.sc-smoothly-toggle-switch>smoothly-icon.sc-smoothly-toggle-switch{fill:rgb(var(--smoothly-success-contrast));stroke:rgb(var(--smoothly-success-contrast))}[selected][checkmark].sc-smoothly-toggle-switch-h>button.sc-smoothly-toggle-switch{background-color:rgb(var(--smoothly-success-color))}[selected][checkmark].sc-smoothly-toggle-switch-h>button.sc-smoothly-toggle-switch:hover{background-color:rgb(var(--smoothly-success-tint))}[selected].sc-smoothly-toggle-switch-h>button.sc-smoothly-toggle-switch>smoothly-icon.sc-smoothly-toggle-switch{transform:translateX(100%)}[size=tiny].sc-smoothly-toggle-switch-h{--height:1.25rem}[size=small].sc-smoothly-toggle-switch-h{--height:1.5rem}[size=default].sc-smoothly-toggle-switch-h{--height:2rem}[size=large].sc-smoothly-toggle-switch-h{--height:2.5rem}.sc-smoothly-toggle-switch-h{height:var(--height);width:calc(var(--height) * 2)}.sc-smoothly-toggle-switch-h>button.sc-smoothly-toggle-switch>smoothly-icon.sc-smoothly-toggle-switch{--smoothly-icon-size:var(--height)}`;const qi=class{constructor(o){t(this,o);this.smoothlyToggleSwitchChange=e(this,"smoothlyToggleSwitchChange");this.checkmark=true;this.selected=false;this.disabled=false;this.size="default";this.color="medium";this.fill="clear"}handleClick(){this.selected=!this.selected;this.smoothlyToggleSwitchChange.emit(this.selected)}render(){return o(s,{key:"3a4b9d310da72b52813117929327c8a9a42d32ad"},o("button",{key:"ac17b5375ebd1a4437f8ed632f93f1a7c6dde5b3",type:"button",disabled:this.disabled,onClick:()=>this.handleClick()},o("smoothly-icon",{key:"4a07e19ec0a7ee3d0f124b6bcaa2529e055a2a9f",color:this.color,name:!this.checkmark?"ellipse":this.selected?"checkmark-circle":"close-circle",fill:"clear",class:{selected:this.selected}})))}};qi.style=Ki();const Zi=()=>`.sc-smoothly-toggle-switch-demo-h>div.sc-smoothly-toggle-switch-demo{display:grid;grid-template-columns:repeat(5, max-content);gap:1em}.sc-smoothly-toggle-switch-demo-h>div.sc-smoothly-toggle-switch-demo>span.sc-smoothly-toggle-switch-demo>p.sc-smoothly-toggle-switch-demo{margin:0}`;const Ji=class{constructor(e){t(this,e)}render(){return o(s,{key:"89947ffb728f613799f1ce93372ef3ec8f0cc111"},o("h4",{key:"a31e7b5e87461383260677fdaf600a784c228575"},"Toggle switches"),o("div",{key:"bcaab8c0c0a2b201eccd9618f5c4cdd7bf6aadbd"},o("p",{key:"094b895b55b8fa71b47908d5c96eeb1ea15e11f7"},"Checkmark"),o("span",{key:"8f4efd3fcea4e6c12e541a779f6c8404da35b731"},o("p",{key:"f6fdd02e752edec8bf4742e16450fcbc7b6688b9"},"Tiny"),o("smoothly-toggle-switch",{key:"3fc6037f4960b8d32ce09f3f9ebba37016e6664a",disabled:false,size:"tiny"})),o("span",{key:"92a0e20c60b42601e287d6ded2d410cf9621fa32"},o("p",{key:"6f093b2c7c57b5fe575c31a6226a62952264b19f"},"Small"),o("smoothly-toggle-switch",{key:"5218f5534e4b5fb85aa3fe936ae41793ee442fa6",disabled:false,size:"small"})),o("span",{key:"599a5d20bac26ee391ab151ec3d5676fccdc8054"},o("p",{key:"225ae580a936c57910647d1c85f092299e8b35dc"},"Standard"),o("smoothly-toggle-switch",{key:"8207f999bfb0f904c351cea0b527428180215013",disabled:false})),o("span",{key:"82fec0c1bc65ed93ab46f2959ca8ce06e52dbcb3"},o("p",{key:"7b054a1c33329eced30415d1fc1d72d3021135ca"},"Large"),o("smoothly-toggle-switch",{key:"ed2ef6bb357f09b69f086ef8c8a2ce98c5b5748d",disabled:false,size:"large"})),o("p",{key:"79b05ec925bac067ef54dbe70a4bf5e80ab7e4ea"},"Colors checkmark"),o("span",{key:"7d56fa63b7ea2027292cfe7c4d2299effeb23f38"},o("p",{key:"f9a8be885bdbad1e7a7df85b44f173ef54be4446"},"Danger"),o("smoothly-toggle-switch",{key:"14c4d887786aa9b174b2a26d343308949373167b",color:"danger",disabled:false,size:"small"})),o("span",{key:"536e6923c3a0dc41ef2578477bca30aa4ade8c53"},o("p",{key:"ae6488e2f6bfe13d6b66cae9745126ec981178cb"},"Primary color"),o("smoothly-toggle-switch",{key:"9cc32d5f6a276302a112aacf61a632e7d8628ba7",color:"primary",disabled:false,size:"small"})),o("span",{key:"5770c9460bbba19e751d3925d4f2079eb82b2eed"},o("p",{key:"52ac34e499689e7707c1f00ec257f2b2c5421289"},"Secondary color"),o("smoothly-toggle-switch",{key:"0ed76db9819fbb9c055b97ae379f7e570cb1941d",color:"secondary",disabled:false,size:"small"})),o("p",{key:"0ccac3a8a3d45f84e2e897ca1c70bdf5399fdb82"}),o("p",{key:"83ffda4b2eda61607de34fbfa6ec3a0cf57d34b4"},"Colors no checkmark"),o("span",{key:"152648b67751cc22397a520de71a40f7b546f042"},o("p",{key:"5f84c9c846c0c3c8f31d419b8b2dc9a71201c697"},"Danger"),o("smoothly-toggle-switch",{key:"2e8f8db8f6e44225f52a0c23c55a18221d9194bb",checkmark:false,color:"danger",disabled:false,size:"small"})),o("span",{key:"ed667a303cd132a9c33998fd24318784c7e211a2"},o("p",{key:"8dd99066536c3569875e1d9b1756201f13b355b0"},"Primary color"),o("smoothly-toggle-switch",{key:"596e8528d7068418d54650dd77e57e9d7e0c8b6f",checkmark:false,color:"primary",disabled:false,size:"small"})),o("span",{key:"b5aedfa2dc4cca37b931eb8303f1768d091a9c5d"},o("p",{key:"2b3b9216aeb1f94641b91eb0c0ec81afdc39561f"},"Secondary color"),o("smoothly-toggle-switch",{key:"8d5c92b17027032fa44a88a13382e223787b029a",checkmark:false,color:"secondary",disabled:false,size:"small"}))))}};Ji.style=Zi();const Xi=()=>`.sc-smoothly-trigger-h{display:block;border-style:solid;border-width:1px;border-radius:3px}[hidden].sc-smoothly-trigger-h{display:none}[disabled].sc-smoothly-trigger-h{opacity:0.5}.sc-smoothly-trigger-h>button.sc-smoothly-trigger{border-color:transparent;background-color:transparent;padding:0.2em 0.3em;font-size:110%;font-weight:400}.sc-smoothly-trigger-h:not([disabled]):hover,.sc-smoothly-trigger-h:not([disabled]):focus,.sc-smoothly-trigger-h:not([disabled]):active{border-color:var(--smoothly-trigger-border)}[expand=full].sc-smoothly-trigger-h>button.sc-smoothly-trigger,[expand=block].sc-smoothly-trigger-h>button.sc-smoothly-trigger{width:100%}[expand=full].sc-smoothly-trigger-h{border-left:none;border-right:none}`;const Qi=class{constructor(o){t(this,o);this.trigger=e(this,"trigger");this.disabled=false;this.type="button"}onClick(t){this.trigger.emit({name:this.name,value:this.value});t.stopPropagation();t.preventDefault()}render(){let t;switch(this.type){case"link":t=this.disabled?o("slot",null):o("a",{onClick:t=>this.onClick(t)},o("slot",null));break;case"button":t=o("button",{key:"8649cae1ed46bc4c22aafc6dfb5fce04a993bb9d",disabled:this.disabled,name:this.name},o("slot",{key:"bdf0d1b51e56dc99e0cc9b3aae2a563de459b377"}));break}return t}};Qi.style=Xi();export{j as smoothly_app,L as smoothly_app_demo,Dt as smoothly_app_room,Lt as smoothly_back_to_top,_t as smoothly_burger,$t as smoothly_button,Et as smoothly_button_confirm,Pt as smoothly_button_demo,Ft as smoothly_button_demo_standard,Vt as smoothly_calendar,Zt as smoothly_date_text,Xt as smoothly_dialog,te as smoothly_dialog_demo,Be as smoothly_display,Ve as smoothly_display_demo,Ke as smoothly_display_demo_json,Xe as smoothly_display_json,to as smoothly_display_json_object,oo as smoothly_display_json_primitive,ao as smoothly_display_json_record_key,os as smoothly_form,as as smoothly_form_demo,is as smoothly_form_demo_all,ls as smoothly_form_demo_card,ns as smoothly_form_demo_controlled,cs as smoothly_form_demo_date,ds as smoothly_form_demo_date_range,ms as smoothly_form_demo_login,bs as smoothly_form_demo_pet,us as smoothly_form_demo_prices,gs as smoothly_form_demo_schedule,ks as smoothly_form_demo_transparent,xs as smoothly_form_demo_typed,Ss as smoothly_frame,Is as smoothly_icon,Ds as smoothly_icon_demo,$s as smoothly_input,Es as smoothly_input_checkbox,Ps as smoothly_input_clear,Fs as smoothly_input_color,Us as smoothly_input_color_demo,Ys as smoothly_input_date,Bs as smoothly_input_date_demo,Gs as smoothly_input_date_range,qs as smoothly_input_date_time,Js as smoothly_input_demo,Qs as smoothly_input_demo_radio,ea as smoothly_input_demo_standard,sa as smoothly_input_demo_user_input,ia as smoothly_input_edit,na as smoothly_input_file,ca as smoothly_input_month,da as smoothly_input_price_demo,ya as smoothly_input_radio,ua as smoothly_input_radio_item,ga as smoothly_input_range,ka as smoothly_input_range_demo,wa as smoothly_input_reset,Ta as smoothly_input_select,ja as smoothly_input_submit,Ra as smoothly_item,Aa as smoothly_label,Ma as smoothly_lazy,Ea as smoothly_load_more,Pa as smoothly_modal,Fa as smoothly_notification,Na as smoothly_notifier,Ya as smoothly_notifier_demo,Ba as smoothly_spinner,Ga as smoothly_summary,qa as smoothly_tab,Ja as smoothly_table,Qa as smoothly_table_body,ei as smoothly_table_cell,si as smoothly_table_demo,ii as smoothly_table_demo_colspan,ni as smoothly_table_demo_filler_row,ci as smoothly_table_demo_group,mi as smoothly_table_demo_nested_no_cell,bi as smoothly_table_demo_nested_no_cell_inner,pi as smoothly_table_demo_simple,ki as smoothly_table_expandable_cell,wi as smoothly_table_expandable_row,Ci as smoothly_table_filler_row,zi as smoothly_table_foot,Ti as smoothly_table_head,ji as smoothly_table_row,Ri as smoothly_table_row_group,Ai as smoothly_tabs,Mi as smoothly_tabs_demo,Oi as smoothly_theme_color,Hi as smoothly_theme_color_variant,Ui as smoothly_theme_colors,Yi as smoothly_theme_demo,Bi as smoothly_theme_guide,Gi as smoothly_theme_picker,qi as smoothly_toggle_switch,Ji as smoothly_toggle_switch_demo,Qi as smoothly_trigger};
|
|
2
|
-
//# sourceMappingURL=p-
|
|
1
|
+
import{r as t,c as e,h as o,H as s,g as a,F as i}from"./p-CdFSoe1d.js";import{b as l,S as n,C as r,F as c,I as h,T as d,o as m,i as y,c as b,s as u,D as p,f,R as g,n as k,M as v}from"./p-CbMKpwBI.js";import{B as w,S as x}from"./p-DZSl4MD1.js";import{i as C}from"./p-BVKhAhsB.js";import{N as S}from"./p-Bq3C8g8G.js";import"./p-D0tCcwtl.js";function z(t){return new I("any")}class I extends l{class="any";is=t=>t!=undefined}function T(){const t=navigator.language;return C.Locale.is(t)?t:C.Language.is(t)?C.Locale.toLocale(t):undefined}const D=()=>`smoothly-app{--header-height:5rem;display:block}smoothly-app>smoothly-notifier>main{height:calc(100dvh - var(--header-height))}smoothly-app[hidden]{display:none}smoothly-app>smoothly-notifier{height:100%;background:none}smoothly-app.smoothly-mobile-mode>smoothly-notifier>header:has(smoothly-burger)>nav>ul smoothly-app-room{width:100%;height:4em}smoothly-app>smoothly-notifier>header{position:sticky;top:0;z-index:20;width:100%;height:var(--header-height);display:flex;justify-content:space-between;box-sizing:border-box;align-items:center;box-shadow:0 1px 0 0 rgb(var(--smoothly-color-shade)) inset}smoothly-app>smoothly-notifier>header>nav{width:100%;flex-shrink:2;height:100%}smoothly-app>smoothly-notifier>header>nav,smoothly-app>smoothly-notifier>header>nav>ul{display:flex;margin:0}smoothly-app:not([label])>smoothly-notifier>header>h1{display:none}smoothly-app>smoothly-notifier>header>h1{margin-left:1rem;margin-bottom:0.8em;display:flex;height:100%}smoothly-app>smoothly-notifier>header>h1>a{display:inline-block;align-self:center;size:100%;background-position-y:center;text-decoration:none;white-space:nowrap}smoothly-app>smoothly-notifier>header>nav>ul{width:100%}smoothly-app>smoothly-notifier>header>nav>ul>div.nav-start-container{display:flex;align-items:center;height:100%}smoothly-app>smoothly-notifier>header>nav>ul>div.nav-end-container{display:flex;align-items:center;height:100%;margin-left:auto;margin-right:1rem}smoothly-app>smoothly-notifier>header>nav>ul>[slot="nav-end"]{width:fit-content;align-self:center;height:fit-content;margin-left:10rem}smoothly-app>smoothly-notifier>header>nav>ul li a{display:flex;height:2.3rem;text-decoration:none;align-items:center;align-self:center}smoothly-app.smoothly-mobile-mode:not([menu-open])>smoothly-notifier>header>nav{display:none}smoothly-app>smoothly-notifier>main>div{overflow-y:scroll;height:100%}smoothly-app.smoothly-mobile-mode>smoothly-notifier>header>nav{width:fit-content;max-width:100%;top:100%;position:absolute;max-height:calc(100dvh - var(--header-height));overflow-y:scroll;right:0;height:auto}smoothly-app.smoothly-mobile-mode>smoothly-notifier>header>nav,smoothly-app.smoothly-mobile-mode>smoothly-notifier>header>nav>ul{flex-direction:column;background-color:rgba(var(--smoothly-color))}smoothly-app.smoothly-mobile-mode>smoothly-notifier>header>nav>ul{padding:1.5rem;box-sizing:border-box}smoothly-app.smoothly-mobile-mode>smoothly-notifier>header>nav>ul li{margin-right:0;width:100%}smoothly-app:not(.smoothly-mobile-mode)>smoothly-notifier>header>smoothly-burger{display:none}smoothly-app.smoothly-mobile-mode>smoothly-notifier>header>smoothly-burger{position:absolute;top:0;right:0}smoothly-app.smoothly-mobile-mode>smoothly-notifier>header>nav>ul>[slot="nav-start"]{display:none}smoothly-app.smoothly-mobile-mode>smoothly-notifier>header>nav>ul>div.nav-start-container,smoothly-app.smoothly-mobile-mode>smoothly-notifier>header>nav>ul>div.nav-end-container{flex-direction:column;margin:0;align-items:start;justify-content:center}smoothly-app.smoothly-mobile-mode>smoothly-notifier>header>nav>ul>div.nav-start-container>*:last-child{margin-bottom:1em}`;const j=class{constructor(o){t(this,o);this.smoothlyUrlChange=e(this,"smoothlyUrlChange");this.menuOpen=false;this.navBreakpoint="48rem";this.mobileMode=false;this.rooms={}}componentWillLoad(){const t=window.matchMedia(`(max-width: ${this.navBreakpoint})`);this.mobileMode=t.matches;t.addEventListener("change",(t=>this.updateMobileMode(t.matches)))}componentDidLoad(){this.updateMobileMode(this.mobileMode)}updateMobileMode(t){this.mobileMode=t;Object.values(this.rooms).forEach((e=>e===null||e===void 0?void 0:e.element.setMobileMode(t)));if(!t){this.menuOpen=false}}async componentDidRender(){var t;if(!this.selected&&!window.location.search){(t=this.home&&this.rooms[this.home]?this.rooms[this.home]:Object.values(this.rooms).find((t=>!(t===null||t===void 0?void 0:t.element.disabled))))===null||t===void 0?void 0:t.element.setSelected(true)}}async selectRoom(t){var e;(e=this.rooms[t])===null||e===void 0?void 0:e.element.setSelected(true)}async selectedChanged(){var t;Object.values(this.rooms).forEach((t=>{var e;return(t===null||t===void 0?void 0:t.element.path)!=((e=this.selected)===null||e===void 0?void 0:e.element.path)&&(t===null||t===void 0?void 0:t.element.setSelected(false))}));const e=await((t=this.selected)===null||t===void 0?void 0:t.element.getContent());requestAnimationFrame((()=>{if(this.mainElement&&e){this.mainElement.replaceChildren(e)}}))}async locationChangeHandler(t){var e;(e=this.rooms[t.state.smoothlyPath])===null||e===void 0?void 0:e.element.setSelected(true,{history:true});this.smoothlyUrlChange.emit(window.location.href)}roomSelectedHandler(t){this.selected={element:t.target};if(this.mobileMode){this.menuOpen=false}if(!t.detail.history){const e=t.detail.path;const o=new URL(window.location.pathname==e?window.location.href:window.location.origin);o.pathname=e;o.search=t.detail.query?`?${t.detail.query}`:"";window.history.pushState({smoothlyPath:e,smoothlyQuery:t.detail.query||""},"",o.href)}}roomLoadedHandler(t){const e=this.rooms[t.target.path.toString()]={element:t.target};if(e.element.selected){this.selected=e}}clickHandler(t){if(this.mobileMode&&!t.composedPath().some((t=>t==this.burgerElement||t==this.navElement))){this.menuOpen=false}}render(){return o(s,{key:"746fa3adf359072b95f0b00ecea914189bdfead2",class:{"smoothly-mobile-mode":this.mobileMode}},o("smoothly-notifier",{key:"ddf542afef536ab6141394b658e82686bd414e69"},o("header",{key:"511a856fb813b5476a705c993734380ad94194cf",color:this.color},o("h1",{key:"9c3e79f9fcd3ef587183e3b83d646753a0f8dd7c"},o("a",{key:"9be4ba4d2ffaeaca1cb00752b5fcba0b1b64c261",href:""},this.label)),o("slot",{key:"92573b6cffad97e2afbfb6b6a7d5d1fb8f0ec59e",name:"header"}),o("nav",{key:"4a7c5cbbb39a82b845775d6dd0015a47ab72757d",ref:t=>this.navElement=t},o("ul",{key:"a8035a4e9143d4cd49ac4edfbb837785a8a58cd8"},o("div",{key:"2c4de281ad7f522c2c09acfcad890eadabc30c40",class:"nav-start-container"},o("slot",{key:"05e3f3a40f45d9505a463a29c90bbfcc2a3ff330",name:"nav-start"})),o("slot",{key:"695fd5bef476d1c00e5654803c03e94c8218943a"}),o("div",{key:"382c0271207f040374c3f69aa2946d0938bbb1c1",class:"nav-end-container"},o("slot",{key:"02fe44b3c557b7a930f24fdc465d8824eccbbbef",name:"nav-end"})))),o("smoothly-burger",{key:"fad0b5d8e2841ed284af04d9b0554e91ddf98575",ref:t=>this.burgerElement=t,open:this.menuOpen,onSmoothlyNavStatus:t=>(t.stopPropagation(),this.menuOpen=t.detail)})),o("main",{key:"5c6464b6db6e0eba2acbaf5efd549cebe08c1a95",ref:t=>this.mainElement=t})))}static get watchers(){return{selected:[{selectedChanged:0}]}}};j.style=D();const L=class{constructor(e){t(this,e)}urlChangeHandler(t){console.log("smoothlyUrlChange",t.detail)}render(){return o("smoothly-app",{key:"86d6cc67b58d8c7c04b9fd7e33891dfacb529943",color:"dark",label:"Smoothly Demo",home:"/root",ref:t=>this.app=t},o("smoothly-app-room",{key:"7012500cb2629c53e1156372722e8ef2b6d047eb",path:"/"},o("section",{key:"759dafafbd63e7fff5bf0acd0502e8eec36e8c64",style:{padding:"1em",maxWidth:"32em",margin:"0 auto"}},o("header",{key:"0ed18baa408a674f906abc32425ce6037662a476"},o("h1",{key:"22cb0dc61fece9d2d7acae6a55db19ccc57261df"},"Welcome")),o("p",{key:"d914f970b834d217cd2dfd7d2d05cd0c4b5dcb65"},"Smoothly is a component library written in ",o("a",{key:"3626d6388b49307f475e4071ef114039dcb51f60",href:"http://stenciljs.com"},"Stencil"),". It can therefore be used across web based frontend toolchains such as React, Vue, Angular, Svelte, and even plain HTML."),o("p",{key:"319549bf6b8cca5d5f9042b1f74c29e884545a59"},"This is particularly useful when trying to unifying the user experience across projects written in different technology stacks. It is also written to minimize the amount of code you need to write to achieve a nice user experience."))),o("smoothly-app-room",{key:"4c752059c00ad39c3bee1d36bdac99bfad027f5f",path:"/form",label:"Forms",content:o("smoothly-form-demo",null)}),o("smoothly-app-room",{key:"02b7dd008a64194f348bfb0679217ebbea05fac9",path:"/input",label:"Inputs",content:o("smoothly-input-demo",null)}),o("smoothly-app-room",{key:"41c7489608d0da9a8d4a2ab9b1a56c425cc36f21",path:"/table",label:"Tables",content:o("smoothly-table-demo",null)}),o("smoothly-app-room",{key:"b10b3c95084e9f27a6ebeaf5170bb10be8226c87",path:"/button",label:"Buttons",content:o("smoothly-button-demo",null)}),o("smoothly-app-room",{key:"f20620084dd779b954fa440b559db2bdccf0b3a3",path:"/icon",label:"Icons",content:o("smoothly-icon-demo",null)}),o("smoothly-app-room",{key:"5078c24c13064315cf8f761809e60cdfc1734c41",path:"/theme",label:"Theming",content:o("smoothly-theme-demo",null)}),o("smoothly-app-room",{key:"2a54a53a694e23460e96b9fb04483204f9e1c347",path:"/notifier",label:"Notices",content:o("smoothly-notifier-demo",null)}),o("smoothly-app-room",{key:"d57766baebf8df0791e1e5f845c2bac7d7b8729f",path:"/dialog",label:"Dialogs",content:o("smoothly-dialog-demo",null),slot:"nav-end"}),o("smoothly-app-room",{key:"d5bde6145e9950a3ddcda8e24d811203a4b69f27",path:"/display",label:"Display",content:o("smoothly-display-demo",null),slot:"nav-end"}),o("smoothly-app-room",{key:"3d56ef533e12cb88ec84bd2fdc63a60e64031083",path:"/tabs",label:"Tabs",slot:"nav-end"},o("smoothly-tabs-demo",{key:"271d70eb22cc0152161d42c137a3d00c19c6bba3"})),o("smoothly-app-room",{key:"c0cbe202e3d74ceacd8e88795c58ece2c1392bf5",path:"/links",label:"Links",slot:"nav-end"},o("smoothly-input",{key:"a39f0e568b614baaf271585da4ee013e48ff24fe",type:"text"},"Default"),o("div",{key:"a75dc6524b85da5e0c81b75a9b74d020c2723384",style:{padding:"1em",maxWidth:"12em"}},o("smoothly-button",{key:"a3820b0c802acc358ee3ab4ca9483411bdff04a8",fill:"solid",color:"danger",link:"https://google.com"},"open"),o("smoothly-button",{key:"fd1c12e214b53d8acdb8828cb616356ae8fe94e9",fill:"solid",color:"danger",link:"https://www.w3.org/WAI/ER/tests/xhtml/testfiles/resources/pdf/dummy.pdf",type:"download"},"download"),o("smoothly-button",{key:"f7c9c0a9eb4ca942f56e02b840087398a2688cd8",fill:"solid",color:"danger",onClick:()=>alert("clicked")},"action"),o("smoothly-button",{key:"ebce581340217e91d6abf1bbff7538f77c5842ae",disabled:true,fill:"solid",color:"danger",onClick:()=>alert("clicked")},"action"),o("smoothly-button",{key:"01c20890774174c6ec793de4711d8e0530630108",type:"link",fill:"clear",color:"danger",onClick:()=>alert("clicked")},"action link"))),o("smoothly-app-room",{key:"42945bb6698943a783d0502f3ff0a08cb6ad583e",path:"/redirect",label:"Redirect",slot:"nav-end"},o("smoothly-button",{key:"b022c14f0680b1ca5f511cd87ab152a9ffb5b15d",type:"link",link:"/input"},"To input"),o("smoothly-button",{key:"566a1821001da85b67ce9f68f74b590c5319f060",type:"link",link:"../button"},"To button"),o("smoothly-button",{key:"e99bbe6cbb348b2c8b2dba558458c08dea22db21",type:"link",link:new URL("/hidden",window.location.origin).href},"To hidden"),o("smoothly-button",{key:"61e59ec9039a63b1d9c50c6705dc0098027be92a",type:"link",link:"/redirect"},"To redirect"),o("smoothly-button",{key:"511eba63ae34b4151e99ce482cb532849ab91dd7",type:"link",link:"nested"},"To redirect nested, relative path")),o("smoothly-app-room",{key:"bac6fa14c1c0dd2ebda292fe70255e53f466dc00",path:"/hidden"},o("p",{key:"1acd1207b775790f189fd8d8c3fb96a5b8d8a991"},"hello world!")),o("smoothly-app-room",{key:"2ecda7ecb183b382bb2987195af5a96e13e3b8b1",path:"/redirect/nested"},"this is a nested room"))}};var R=class{constructor(t,e,o,s,a,i){this.type=3;this.name="";this.prefix="";this.value="";this.suffix="";this.modifier=3;this.type=t;this.name=e;this.prefix=o;this.value=s;this.suffix=a;this.modifier=i}hasCustomName(){return this.name!==""&&typeof this.name!=="number"}};var _=/[$_\p{ID_Start}]/u;var A=/[$_\u200C\u200D\p{ID_Continue}]/u;var $=".*";function M(t,e){return/^[\x00-\x7F]*$/.test(t)}function E(t,e=false){const o=[];let s=0;while(s<t.length){const a=t[s];const i=function(a){if(!e)throw new TypeError(a);o.push({type:"INVALID_CHAR",index:s,value:t[s++]})};if(a==="*"){o.push({type:"ASTERISK",index:s,value:t[s++]});continue}if(a==="+"||a==="?"){o.push({type:"OTHER_MODIFIER",index:s,value:t[s++]});continue}if(a==="\\"){o.push({type:"ESCAPED_CHAR",index:s++,value:t[s++]});continue}if(a==="{"){o.push({type:"OPEN",index:s,value:t[s++]});continue}if(a==="}"){o.push({type:"CLOSE",index:s,value:t[s++]});continue}if(a===":"){let e="";let a=s+1;while(a<t.length){const o=t.substr(a,1);if(a===s+1&&_.test(o)||a!==s+1&&A.test(o)){e+=t[a++];continue}break}if(!e){i(`Missing parameter name at ${s}`);continue}o.push({type:"NAME",index:s,value:e});s=a;continue}if(a==="("){let e=1;let a="";let l=s+1;let n=false;if(t[l]==="?"){i(`Pattern cannot start with "?" at ${l}`);continue}while(l<t.length){if(!M(t[l])){i(`Invalid character '${t[l]}' at ${l}.`);n=true;break}if(t[l]==="\\"){a+=t[l++]+t[l++];continue}if(t[l]===")"){e--;if(e===0){l++;break}}else if(t[l]==="("){e++;if(t[l+1]!=="?"){i(`Capturing groups are not allowed at ${l}`);n=true;break}}a+=t[l++]}if(n){continue}if(e){i(`Unbalanced pattern at ${s}`);continue}if(!a){i(`Missing pattern at ${s}`);continue}o.push({type:"REGEX",index:s,value:a});s=l;continue}o.push({type:"CHAR",index:s,value:t[s++]})}o.push({type:"END",index:s,value:""});return o}function O(t,e={}){const o=E(t);e.delimiter??(e.delimiter="/#?");e.prefixes??(e.prefixes="./");const s=`[^${P(e.delimiter)}]+?`;const a=[];let i=0;let l=0;let n=new Set;const r=t=>{if(l<o.length&&o[l].type===t)return o[l++].value};const c=()=>r("OTHER_MODIFIER")??r("ASTERISK");const h=t=>{const e=r(t);if(e!==void 0)return e;const{type:s,index:a}=o[l];throw new TypeError(`Unexpected ${s} at ${a}, expected ${t}`)};const d=()=>{let t="";let e;while(e=r("CHAR")??r("ESCAPED_CHAR")){t+=e}return t};const m=t=>t;const y=e.encodePart||m;let b="";const u=t=>{b+=t};const p=()=>{if(!b.length){return}a.push(new R(3,"","",y(b),"",3));b=""};const f=(t,e,o,l,r)=>{let c=3;switch(r){case"?":c=1;break;case"*":c=0;break;case"+":c=2;break}if(!e&&!o&&c===3){u(t);return}p();if(!e&&!o){if(!t){return}a.push(new R(3,"","",y(t),"",c));return}let h;if(!o){h=s}else if(o==="*"){h=$}else{h=o}let d=2;if(h===s){d=1;h=""}else if(h===$){d=0;h=""}let m;if(e){m=e}else if(o){m=i++}if(n.has(m)){throw new TypeError(`Duplicate name '${m}'.`)}n.add(m);a.push(new R(d,m,y(t),h,y(l),c))};while(l<o.length){const t=r("CHAR");const o=r("NAME");let s=r("REGEX");if(!o&&!s){s=r("ASTERISK")}if(o||s){let a=t??"";if(e.prefixes.indexOf(a)===-1){u(a);a=""}p();let i=c();f(a,o,s,"",i);continue}const a=t??r("ESCAPED_CHAR");if(a){u(a);continue}const i=r("OPEN");if(i){const t=d();const e=r("NAME");let o=r("REGEX");if(!e&&!o){o=r("ASTERISK")}const s=d();h("CLOSE");const a=c();f(t,e,o,s,a);continue}p();h("END")}return a}function P(t){return t.replace(/([.+*?^${}()[\]|/\\])/g,"\\$1")}function H(t){return t&&t.ignoreCase?"ui":"u"}function F(t,e,o){return N(O(t,o),e,o)}function U(t){switch(t){case 0:return"*";case 1:return"?";case 2:return"+";case 3:return""}}function N(t,e,o={}){o.delimiter??(o.delimiter="/#?");o.prefixes??(o.prefixes="./");o.sensitive??(o.sensitive=false);o.strict??(o.strict=false);o.end??(o.end=true);o.start??(o.start=true);o.endsWith="";let s=o.start?"^":"";for(const a of t){if(a.type===3){if(a.modifier===3){s+=P(a.value)}else{s+=`(?:${P(a.value)})${U(a.modifier)}`}continue}if(e)e.push(a.name);const t=`[^${P(o.delimiter)}]+?`;let i=a.value;if(a.type===1)i=t;else if(a.type===0)i=$;if(!a.prefix.length&&!a.suffix.length){if(a.modifier===3||a.modifier===1){s+=`(${i})${U(a.modifier)}`}else{s+=`((?:${i})${U(a.modifier)})`}continue}if(a.modifier===3||a.modifier===1){s+=`(?:${P(a.prefix)}(${i})${P(a.suffix)})`;s+=U(a.modifier);continue}s+=`(?:${P(a.prefix)}`;s+=`((?:${i})(?:`;s+=P(a.suffix);s+=P(a.prefix);s+=`(?:${i}))*)${P(a.suffix)})`;if(a.modifier===0){s+="?"}}const a=`[${P(o.endsWith)}]|$`;const i=`[${P(o.delimiter)}]`;if(o.end){if(!o.strict){s+=`${i}?`}if(!o.endsWith.length){s+="$"}else{s+=`(?=${a})`}return new RegExp(s,H(o))}if(!o.strict){s+=`(?:${i}(?=${a}))?`}let l=false;if(t.length){const e=t[t.length-1];if(e.type===3&&e.modifier===3){l=o.delimiter.indexOf(e)>-1}}if(!l){s+=`(?=${i}|${a})`}return new RegExp(s,H(o))}var Y={delimiter:"",prefixes:"",sensitive:true,strict:true};var W={delimiter:".",prefixes:"",sensitive:true,strict:true};var B={delimiter:"/",prefixes:"/",sensitive:true,strict:true};function V(t,e){if(!t.length){return false}if(t[0]==="/"){return true}if(!e){return false}if(t.length<2){return false}if((t[0]=="\\"||t[0]=="{")&&t[1]=="/"){return true}return false}function G(t,e){if(t.startsWith(e)){return t.substring(e.length,t.length)}return t}function K(t,e){if(t.endsWith(e)){return t.substr(0,t.length-e.length)}return t}function q(t){if(!t||t.length<2){return false}if(t[0]==="["){return true}if((t[0]==="\\"||t[0]==="{")&&t[1]==="["){return true}return false}var Z=["ftp","file","http","https","ws","wss"];function J(t){if(!t){return true}for(const e of Z){if(t.test(e)){return true}}return false}function X(t,e){t=G(t,"#");if(e||t===""){return t}const o=new URL("https://example.com");o.hash=t;return o.hash?o.hash.substring(1,o.hash.length):""}function Q(t,e){t=G(t,"?");if(e||t===""){return t}const o=new URL("https://example.com");o.search=t;return o.search?o.search.substring(1,o.search.length):""}function tt(t,e){if(e||t===""){return t}if(q(t)){return dt(t)}else{return ht(t)}}function et(t,e){if(e||t===""){return t}const o=new URL("https://example.com");o.password=t;return o.password}function ot(t,e){if(e||t===""){return t}const o=new URL("https://example.com");o.username=t;return o.username}function st(t,e,o){if(o||t===""){return t}if(e&&!Z.includes(e)){const o=new URL(`${e}:${t}`);return o.pathname}const s=t[0]=="/";t=new URL(!s?"/-"+t:t,"https://example.com").pathname;if(!s){t=t.substring(2,t.length)}return t}function at(t,e,o){if(lt(e)===t){t=""}if(o||t===""){return t}return mt(t)}function it(t,e){t=K(t,":");if(e||t===""){return t}return nt(t)}function lt(t){switch(t){case"ws":case"http":return"80";case"wws":case"https":return"443";case"ftp":return"21";default:return""}}function nt(t){if(t===""){return t}if(/^[-+.A-Za-z0-9]*$/.test(t))return t.toLowerCase();throw new TypeError(`Invalid protocol '${t}'.`)}function rt(t){if(t===""){return t}const e=new URL("https://example.com");e.username=t;return e.username}function ct(t){if(t===""){return t}const e=new URL("https://example.com");e.password=t;return e.password}function ht(t){if(t===""){return t}if(/[\t\n\r #%/:<>?@[\]^\\|]/g.test(t)){throw new TypeError(`Invalid hostname '${t}'`)}const e=new URL("https://example.com");e.hostname=t;return e.hostname}function dt(t){if(t===""){return t}if(/[^0-9a-fA-F[\]:]/g.test(t)){throw new TypeError(`Invalid IPv6 hostname '${t}'`)}return t.toLowerCase()}function mt(t){if(t===""){return t}if(/^[0-9]*$/.test(t)&&parseInt(t)<=65535){return t}throw new TypeError(`Invalid port '${t}'.`)}function yt(t){if(t===""){return t}const e=new URL("https://example.com");e.pathname=t[0]!=="/"?"/-"+t:t;if(t[0]!=="/"){return e.pathname.substring(2,e.pathname.length)}return e.pathname}function bt(t){if(t===""){return t}const e=new URL(`data:${t}`);return e.pathname}function ut(t){if(t===""){return t}const e=new URL("https://example.com");e.search=t;return e.search.substring(1,e.search.length)}function pt(t){if(t===""){return t}const e=new URL("https://example.com");e.hash=t;return e.hash.substring(1,e.hash.length)}var ft=class{constructor(t){this.tokenList=[];this.internalResult={};this.tokenIndex=0;this.tokenIncrement=1;this.componentStart=0;this.state=0;this.groupDepth=0;this.hostnameIPv6BracketDepth=0;this.shouldTreatAsStandardURL=false;this.input=t}get result(){return this.internalResult}parse(){this.tokenList=E(this.input,true);for(;this.tokenIndex<this.tokenList.length;this.tokenIndex+=this.tokenIncrement){this.tokenIncrement=1;if(this.tokenList[this.tokenIndex].type==="END"){if(this.state===0){this.rewind();if(this.isHashPrefix()){this.changeState(9,1)}else if(this.isSearchPrefix()){this.changeState(8,1);this.internalResult.hash=""}else{this.changeState(7,0);this.internalResult.search="";this.internalResult.hash=""}continue}else if(this.state===2){this.rewindAndSetState(5);continue}this.changeState(10,0);break}if(this.groupDepth>0){if(this.isGroupClose()){this.groupDepth-=1}else{continue}}if(this.isGroupOpen()){this.groupDepth+=1;continue}switch(this.state){case 0:if(this.isProtocolSuffix()){this.internalResult.username="";this.internalResult.password="";this.internalResult.hostname="";this.internalResult.port="";this.internalResult.pathname="";this.internalResult.search="";this.internalResult.hash="";this.rewindAndSetState(1)}break;case 1:if(this.isProtocolSuffix()){this.computeShouldTreatAsStandardURL();let t=7;let e=1;if(this.shouldTreatAsStandardURL){this.internalResult.pathname="/"}if(this.nextIsAuthoritySlashes()){t=2;e=3}else if(this.shouldTreatAsStandardURL){t=2}this.changeState(t,e)}break;case 2:if(this.isIdentityTerminator()){this.rewindAndSetState(3)}else if(this.isPathnameStart()||this.isSearchPrefix()||this.isHashPrefix()){this.rewindAndSetState(5)}break;case 3:if(this.isPasswordPrefix()){this.changeState(4,1)}else if(this.isIdentityTerminator()){this.changeState(5,1)}break;case 4:if(this.isIdentityTerminator()){this.changeState(5,1)}break;case 5:if(this.isIPv6Open()){this.hostnameIPv6BracketDepth+=1}else if(this.isIPv6Close()){this.hostnameIPv6BracketDepth-=1}if(this.isPortPrefix()&&!this.hostnameIPv6BracketDepth){this.changeState(6,1)}else if(this.isPathnameStart()){this.changeState(7,0)}else if(this.isSearchPrefix()){this.changeState(8,1)}else if(this.isHashPrefix()){this.changeState(9,1)}break;case 6:if(this.isPathnameStart()){this.changeState(7,0)}else if(this.isSearchPrefix()){this.changeState(8,1)}else if(this.isHashPrefix()){this.changeState(9,1)}break;case 7:if(this.isSearchPrefix()){this.changeState(8,1)}else if(this.isHashPrefix()){this.changeState(9,1)}break;case 8:if(this.isHashPrefix()){this.changeState(9,1)}break}}}changeState(t,e){switch(this.state){case 0:break;case 1:this.internalResult.protocol=this.makeComponentString();break;case 2:break;case 3:this.internalResult.username=this.makeComponentString();break;case 4:this.internalResult.password=this.makeComponentString();break;case 5:this.internalResult.hostname=this.makeComponentString();break;case 6:this.internalResult.port=this.makeComponentString();break;case 7:this.internalResult.pathname=this.makeComponentString();break;case 8:this.internalResult.search=this.makeComponentString();break;case 9:this.internalResult.hash=this.makeComponentString();break}this.changeStateWithoutSettingComponent(t,e)}changeStateWithoutSettingComponent(t,e){this.state=t;this.componentStart=this.tokenIndex+e;this.tokenIndex+=e;this.tokenIncrement=0}rewind(){this.tokenIndex=this.componentStart;this.tokenIncrement=0}rewindAndSetState(t){this.rewind();this.state=t}safeToken(t){if(t<0){t=this.tokenList.length-t}if(t<this.tokenList.length){return this.tokenList[t]}return this.tokenList[this.tokenList.length-1]}isNonSpecialPatternChar(t,e){const o=this.safeToken(t);return o.value===e&&(o.type==="CHAR"||o.type==="ESCAPED_CHAR"||o.type==="INVALID_CHAR")}isProtocolSuffix(){return this.isNonSpecialPatternChar(this.tokenIndex,":")}nextIsAuthoritySlashes(){return this.isNonSpecialPatternChar(this.tokenIndex+1,"/")&&this.isNonSpecialPatternChar(this.tokenIndex+2,"/")}isIdentityTerminator(){return this.isNonSpecialPatternChar(this.tokenIndex,"@")}isPasswordPrefix(){return this.isNonSpecialPatternChar(this.tokenIndex,":")}isPortPrefix(){return this.isNonSpecialPatternChar(this.tokenIndex,":")}isPathnameStart(){return this.isNonSpecialPatternChar(this.tokenIndex,"/")}isSearchPrefix(){if(this.isNonSpecialPatternChar(this.tokenIndex,"?")){return true}if(this.tokenList[this.tokenIndex].value!=="?"){return false}const t=this.safeToken(this.tokenIndex-1);return t.type!=="NAME"&&t.type!=="REGEX"&&t.type!=="CLOSE"&&t.type!=="ASTERISK"}isHashPrefix(){return this.isNonSpecialPatternChar(this.tokenIndex,"#")}isGroupOpen(){return this.tokenList[this.tokenIndex].type=="OPEN"}isGroupClose(){return this.tokenList[this.tokenIndex].type=="CLOSE"}isIPv6Open(){return this.isNonSpecialPatternChar(this.tokenIndex,"[")}isIPv6Close(){return this.isNonSpecialPatternChar(this.tokenIndex,"]")}makeComponentString(){const t=this.tokenList[this.tokenIndex];const e=this.safeToken(this.componentStart).index;return this.input.substring(e,t.index)}computeShouldTreatAsStandardURL(){const t={};Object.assign(t,Y);t.encodePart=nt;const e=F(this.makeComponentString(),void 0,t);this.shouldTreatAsStandardURL=J(e)}};var gt=["protocol","username","password","hostname","port","pathname","search","hash"];var kt="*";function vt(t,e){if(typeof t!=="string"){throw new TypeError(`parameter 1 is not of type 'string'.`)}const o=new URL(t,e);return{protocol:o.protocol.substring(0,o.protocol.length-1),username:o.username,password:o.password,hostname:o.hostname,port:o.port,pathname:o.pathname,search:o.search!==""?o.search.substring(1,o.search.length):void 0,hash:o.hash!==""?o.hash.substring(1,o.hash.length):void 0}}function wt(t,e){if(!e){return t}return Ct(t)}function xt(t,e,o){let s;if(typeof e.baseURL==="string"){try{s=new URL(e.baseURL);t.protocol=wt(s.protocol.substring(0,s.protocol.length-1),o);t.username=wt(s.username,o);t.password=wt(s.password,o);t.hostname=wt(s.hostname,o);t.port=wt(s.port,o);t.pathname=wt(s.pathname,o);t.search=wt(s.search.substring(1,s.search.length),o);t.hash=wt(s.hash.substring(1,s.hash.length),o)}catch{throw new TypeError(`invalid baseURL '${e.baseURL}'.`)}}if(typeof e.protocol==="string"){t.protocol=it(e.protocol,o)}if(typeof e.username==="string"){t.username=ot(e.username,o)}if(typeof e.password==="string"){t.password=et(e.password,o)}if(typeof e.hostname==="string"){t.hostname=tt(e.hostname,o)}if(typeof e.port==="string"){t.port=at(e.port,t.protocol,o)}if(typeof e.pathname==="string"){t.pathname=e.pathname;if(s&&!V(t.pathname,o)){const e=s.pathname.lastIndexOf("/");if(e>=0){t.pathname=wt(s.pathname.substring(0,e+1),o)+t.pathname}}t.pathname=st(t.pathname,t.protocol,o)}if(typeof e.search==="string"){t.search=Q(e.search,o)}if(typeof e.hash==="string"){t.hash=X(e.hash,o)}return t}function Ct(t){return t.replace(/([+*?:{}()\\])/g,"\\$1")}function St(t){return t.replace(/([.+*?^${}()[\]|/\\])/g,"\\$1")}function zt(t,e){e.delimiter??(e.delimiter="/#?");e.prefixes??(e.prefixes="./");e.sensitive??(e.sensitive=false);e.strict??(e.strict=false);e.end??(e.end=true);e.start??(e.start=true);e.endsWith="";const o=".*";const s=`[^${St(e.delimiter)}]+?`;const a=/[$_\u200C\u200D\p{ID_Continue}]/u;let i="";for(let l=0;l<t.length;++l){const n=t[l];if(n.type===3){if(n.modifier===3){i+=Ct(n.value);continue}i+=`{${Ct(n.value)}}${U(n.modifier)}`;continue}const r=n.hasCustomName();let c=!!n.suffix.length||!!n.prefix.length&&(n.prefix.length!==1||!e.prefixes.includes(n.prefix));const h=l>0?t[l-1]:null;const d=l<t.length-1?t[l+1]:null;if(!c&&r&&n.type===1&&n.modifier===3&&d&&!d.prefix.length&&!d.suffix.length){if(d.type===3){const t=d.value.length>0?d.value[0]:"";c=a.test(t)}else{c=!d.hasCustomName()}}if(!c&&!n.prefix.length&&h&&h.type===3){const t=h.value[h.value.length-1];c=e.prefixes.includes(t)}if(c){i+="{"}i+=Ct(n.prefix);if(r){i+=`:${n.name}`}if(n.type===2){i+=`(${n.value})`}else if(n.type===1){if(!r){i+=`(${s})`}}else if(n.type===0){if(!r&&(!h||h.type===3||h.modifier!==3||c||n.prefix!=="")){i+="*"}else{i+=`(${o})`}}if(n.type===1&&r&&!!n.suffix.length){if(a.test(n.suffix[0])){i+="\\"}}i+=Ct(n.suffix);if(c){i+="}"}if(n.modifier!==3){i+=U(n.modifier)}}return i}var It=class t{constructor(t={},e,o){this.regexp={};this.names={};this.component_pattern={};this.parts={};try{let s=void 0;if(typeof e==="string"){s=e}else{o=e}if(typeof t==="string"){const e=new ft(t);e.parse();t=e.result;if(s===void 0&&typeof t.protocol!=="string"){throw new TypeError(`A base URL must be provided for a relative constructor string.`)}t.baseURL=s}else{if(!t||typeof t!=="object"){throw new TypeError(`parameter 1 is not of type 'string' and cannot convert to dictionary.`)}if(s){throw new TypeError(`parameter 1 is not of type 'string'.`)}}if(typeof o==="undefined"){o={ignoreCase:false}}const a={ignoreCase:o.ignoreCase===true};const i={pathname:kt,protocol:kt,username:kt,password:kt,hostname:kt,port:kt,search:kt,hash:kt};this.pattern=xt(i,t,true);if(lt(this.pattern.protocol)===this.pattern.port){this.pattern.port=""}let l;for(l of gt){if(!(l in this.pattern))continue;const t={};const e=this.pattern[l];this.names[l]=[];switch(l){case"protocol":Object.assign(t,Y);t.encodePart=nt;break;case"username":Object.assign(t,Y);t.encodePart=rt;break;case"password":Object.assign(t,Y);t.encodePart=ct;break;case"hostname":Object.assign(t,W);if(q(e)){t.encodePart=dt}else{t.encodePart=ht}break;case"port":Object.assign(t,Y);t.encodePart=mt;break;case"pathname":if(J(this.regexp.protocol)){Object.assign(t,B,a);t.encodePart=yt}else{Object.assign(t,Y,a);t.encodePart=bt}break;case"search":Object.assign(t,Y,a);t.encodePart=ut;break;case"hash":Object.assign(t,Y,a);t.encodePart=pt;break}try{this.parts[l]=O(e,t);this.regexp[l]=N(this.parts[l],this.names[l],t);this.component_pattern[l]=zt(this.parts[l],t)}catch(t){throw new TypeError(`invalid ${l} pattern '${this.pattern[l]}'.`)}}}catch(t){throw new TypeError(`Failed to construct 'URLPattern': ${t.message}`)}}test(t={},e){let o={pathname:"",protocol:"",username:"",password:"",hostname:"",port:"",search:"",hash:""};if(typeof t!=="string"&&e){throw new TypeError(`parameter 1 is not of type 'string'.`)}if(typeof t==="undefined"){return false}try{if(typeof t==="object"){o=xt(o,t,false)}else{o=xt(o,vt(t,e),false)}}catch(t){return false}let s;for(s of gt){if(!this.regexp[s].exec(o[s])){return false}}return true}exec(t={},e){let o={pathname:"",protocol:"",username:"",password:"",hostname:"",port:"",search:"",hash:""};if(typeof t!=="string"&&e){throw new TypeError(`parameter 1 is not of type 'string'.`)}if(typeof t==="undefined"){return}try{if(typeof t==="object"){o=xt(o,t,false)}else{o=xt(o,vt(t,e),false)}}catch(t){return null}let s={};if(e){s.inputs=[t,e]}else{s.inputs=[t]}let a;for(a of gt){let t=this.regexp[a].exec(o[a]);if(!t){return null}let e={};for(let[o,s]of this.names[a].entries()){if(typeof s==="string"||typeof s==="number"){let a=t[o+1];e[s]=a}}s[a]={input:o[a]??"",groups:e}}return s}static compareComponent(t,e,o){const s=(t,e)=>{for(let o of["type","modifier","prefix","value","suffix"]){if(t[o]<e[o])return-1;else if(t[o]===e[o])continue;else return 1}return 0};const a=new R(3,"","","","",3);const i=new R(0,"","","","",3);const l=(t,e)=>{let o=0;for(;o<Math.min(t.length,e.length);++o){let a=s(t[o],e[o]);if(a)return a}if(t.length===e.length){return 0}return s(t[o]??a,e[o]??a)};if(!e.component_pattern[t]&&!o.component_pattern[t]){return 0}if(e.component_pattern[t]&&!o.component_pattern[t]){return l(e.parts[t],[i])}if(!e.component_pattern[t]&&o.component_pattern[t]){return l([i],o.parts[t])}return l(e.parts[t],o.parts[t])}get protocol(){return this.component_pattern.protocol}get username(){return this.component_pattern.username}get password(){return this.component_pattern.password}get hostname(){return this.component_pattern.hostname}get port(){return this.component_pattern.port}get pathname(){return this.component_pattern.pathname}get search(){return this.component_pattern.search}get hash(){return this.component_pattern.hash}};if(!globalThis.URLPattern){globalThis.URLPattern=It}const Tt=()=>`.sc-smoothly-app-room-h{display:flex;justify-content:center;text-align:center;cursor:pointer;height:100%;position:relative}.sc-smoothly-app-room-h>div.sc-smoothly-app-room{overflow-y:auto;height:100%}:not([label].sc-smoothly-app-room-h,[icon]).sc-smoothly-app-room-h,[disabled].sc-smoothly-app-room-h{display:none}.sc-smoothly-app-room-h>div.sc-smoothly-app-room{display:none}.sc-smoothly-app-room-h>li.sc-smoothly-app-room{height:100%;list-style:none}.sc-smoothly-app-room-h>li.sc-smoothly-app-room>a.sc-smoothly-app-room{padding:0 1.5em;height:100%}[selected].sc-smoothly-app-room-h>li.sc-smoothly-app-room>a.sc-smoothly-app-room{display:flex;color:rgb(var(--smoothly-color-contrast));background:rgb(var(--smoothly-color-shade))}.sc-smoothly-app-room-h:hover>li.sc-smoothly-app-room>a.sc-smoothly-app-room{color:rgb(var(--smoothly-color-contrast));background-color:rgb(var(--smoothly-color-tint));transition:0.2s}.sc-smoothly-app-room-h>li.sc-smoothly-app-room>a.sc-smoothly-app-room>smoothly-icon.sc-smoothly-app-room{align-self:inherit}[icon].sc-smoothly-app-room-h>li.sc-smoothly-app-room>a.sc-smoothly-app-room>.label.sc-smoothly-app-room{display:none}[icon][label].sc-smoothly-app-room-h:hover::before,[icon][label].sc-smoothly-app-room-h:hover::after{position:absolute;color:rgb(var(--smoothly-color-contrast));background-color:rgb(var(--smoothly-color-tint));border-radius:0.25rem;pointer-events:none}[icon][label].sc-smoothly-app-room-h:hover::before{content:"";bottom:-1.75rem;transform:rotate(45deg);width:1.25em;height:1.25em}[icon][label].sc-smoothly-app-room-h:hover::after{content:attr(label);white-space:nowrap;bottom:-3.25rem;padding:.5rem 1rem;border-radius:.25rem}.smoothly-mobile-mode.sc-smoothly-app-room-h>li.sc-smoothly-app-room>a.sc-smoothly-app-room{padding:0}.smoothly-mobile-mode[icon].sc-smoothly-app-room-h>li.sc-smoothly-app-room>a.sc-smoothly-app-room>.label.sc-smoothly-app-room{display:unset;padding:0 1rem}.smoothly-mobile-mode.sc-smoothly-app-room-h>li.sc-smoothly-app-room>a.sc-smoothly-app-room{margin-left:-1.5rem;margin-right:-1.5rem;padding-left:1.5rem;padding-right:1.5rem}.smoothly-mobile-mode[icon][label].sc-smoothly-app-room-h:hover::before,.smoothly-mobile-mode[icon][label].sc-smoothly-app-room-h:hover::after{content:unset}`;const Dt=class{constructor(o){t(this,o);this.smoothlyRoomSelect=e(this,"smoothlyRoomSelect");this.smoothlyRoomLoad=e(this,"smoothlyRoomLoad");this.smoothlyUrlChange=e(this,"smoothlyUrlChange");this.path="";this.mobileMode=false}componentDidRender(){this.selected&&this.smoothlyUrlChange.emit(window.location.href)}componentWillLoad(){const t=Array.isArray(this.path)?this.path:[this.path];this.paths=t.map((t=>typeof t=="string"?new URLPattern({pathname:t}):t));this.selected=this.paths.some((t=>t.test(window.location.href)));this.smoothlyRoomLoad.emit({selected:this.selected});this.selected&&window.history.replaceState({smoothlyPath:this.paths[0].pathname},"",window.location.href)}async setMobileMode(t){this.mobileMode=t}async getContent(){return this.contentElement}async setSelected(t,e){this.selected=t;if(t){this.smoothlyRoomSelect.emit({history:!!(e===null||e===void 0?void 0:e.history),path:this.paths[0].pathname,query:this.query})}}async setQuery(t){if(t.detail.path==this.path&&this.query!=t.detail.query){this.query=t.detail.query;window.history.pushState({smoothlyPath:this.path,smoothlyQuery:this.query},"",`${window.location.pathname}${this.query?`?${this.query}`:""}`);this.smoothlyUrlChange.emit(window.location.href)}}clickHandler(t){if(!t.metaKey&&!t.ctrlKey&&t.which!=2&&t.button!=1){t.preventDefault();this.setSelected(true)}}render(){var t;return o(s,{key:"a85747f78cb72957e52a35bb4a5ddf7fd38c8901",class:{"smoothly-mobile-mode":this.mobileMode}},o("li",{key:"2a89979ce87b7cbcbc250014d6c60110bdf8c7eb"},o("a",{key:"e7c03470ceab8f52195b90eb04d97678a75368a4",href:(t=this.paths[0])===null||t===void 0?void 0:t.pathname,onClick:t=>this.clickHandler(t)},this.icon&&o("smoothly-icon",{key:"0b40566be9199d9c34b75ec1260fac0e962c0fd6",name:this.icon}),this.label&&o("span",{key:"e55412f3a1c041d81b1d3a4e7751a315eafeede3",class:"label"},this.label))),o("div",{key:"30eb0eda3109314348f4036ed6206779ad8cee96",ref:t=>this.contentElement=t},this.content&&o("smoothly-lazy",{key:"929973767465e67ba49580978d83811f31637b9f",content:this.content}),o("slot",{key:"a96c18f28066755f450174e9372e4ef8a25a7c57"})))}};Dt.style=Tt();const jt=()=>`.sc-smoothly-back-to-top-h{background-color:rgba(var(--smoothly-default-color), 1);opacity:var(--opacity);pointer-events:var(--pointer-events);transition:opacity 400ms;z-index:3;border-radius:50%;box-shadow:var(--smoothly-shadow);height:3rem;width:3rem;position:fixed;bottom:var(--bottom);right:var(--right);outline:none;cursor:pointer;display:flex;justify-content:center;align-items:center}`;const Lt=class{constructor(e){t(this,e);this.opacity="0.5";this.bottom="1rem";this.right="1rem"}componentWillLoad(){var t;this.scrollableParent=n.findParent(this.element);(t=this.scrollableParent)===null||t===void 0?void 0:t.addEventListener("scroll",(()=>{var t,e;this.visible=((e=(t=this.scrollableParent)===null||t===void 0?void 0:t.scrollTop)!==null&&e!==void 0?e:0)>20}))}render(){const t={"--opacity":this.visible?this.opacity:"0","--pointer-events":this.visible?"auto":"none","--bottom":this.bottom,"--right":this.right};return o(s,{key:"5743000aaec20538ad6a57688015cb4afd65d56b",style:t,onClick:()=>{var t;return(t=this.scrollableParent)===null||t===void 0?void 0:t.scrollTo({top:0,left:0,behavior:"smooth"})}},o("smoothly-icon",{key:"39ed5f8fb75c131e62e588101ec26fca43c7ca2c",name:"caret-up-outline"}))}get element(){return a(this)}};Lt.style=jt();const Rt=()=>`.sc-smoothly-burger-h{display:flex;justify-content:center;align-items:center;height:100%;cursor:pointer}.sc-smoothly-burger-h smoothly-icon.sc-smoothly-burger{--smoothly-icon-size:3rem;margin-right:1em}.sc-smoothly-burger-h:not([open]) smoothly-icon.sc-smoothly-burger{transform:rotate(0deg);transition:transform 100ms ease-in-out}[open].sc-smoothly-burger-h smoothly-icon.sc-smoothly-burger{transform:rotate(-90deg);transition:transform 100ms ease-in-out}`;const _t=class{constructor(o){t(this,o);this.smoothlyNavStatus=e(this,"smoothlyNavStatus");this.open=false}openChanged(){this.smoothlyNavStatus.emit(this.open)}clickHandler(){this.open=!this.open}render(){return o(s,{key:"000c346b45f190a4616e30bd6b64c24a00d0be00"},o("smoothly-icon",{key:"be31c4e7dc3a8848a633801f705988329602805b",name:"menu"}))}get element(){return a(this)}static get watchers(){return{open:[{openChanged:0}]}}};_t.style=Rt();const At=()=>`[color=default].sc-smoothly-button{--smoothly-color:var(--smoothly-default-color);--smoothly-color-contrast:var(--smoothly-default-contrast);--smoothly-color-shade:var(--smoothly-default-shade);--smoothly-color-tint:var(--smoothly-default-tint)}[color=primary].sc-smoothly-button{--smoothly-color:var(--smoothly-primary-color);--smoothly-color-contrast:var(--smoothly-primary-contrast);--smoothly-color-shade:var(--smoothly-primary-shade);--smoothly-color-tint:var(--smoothly-primary-tint)}[color=secondary].sc-smoothly-button{--smoothly-color:var(--smoothly-secondary-color);--smoothly-color-contrast:var(--smoothly-secondary-contrast);--smoothly-color-shade:var(--smoothly-secondary-shade);--smoothly-color-tint:var(--smoothly-secondary-tint)}[color=tertiary].sc-smoothly-button{--smoothly-color:var(--smoothly-tertiary-color);--smoothly-color-contrast:var(--smoothly-tertiary-contrast);--smoothly-color-shade:var(--smoothly-tertiary-shade);--smoothly-color-tint:var(--smoothly-tertiary-tint)}[color=success].sc-smoothly-button{--smoothly-color:var(--smoothly-success-color);--smoothly-color-contrast:var(--smoothly-success-contrast);--smoothly-color-shade:var(--smoothly-success-shade);--smoothly-color-tint:var(--smoothly-success-tint)}[color=warning].sc-smoothly-button{--smoothly-color:var(--smoothly-warning-color);--smoothly-color-contrast:var(--smoothly-warning-contrast);--smoothly-color-shade:var(--smoothly-warning-shade);--smoothly-color-tint:var(--smoothly-warning-tint)}[color=danger].sc-smoothly-button{--smoothly-color:var(--smoothly-danger-color);--smoothly-color-contrast:var(--smoothly-danger-contrast);--smoothly-color-shade:var(--smoothly-danger-shade);--smoothly-color-tint:var(--smoothly-danger-tint)}[color=light].sc-smoothly-button{--smoothly-color:var(--smoothly-light-color);--smoothly-color-contrast:var(--smoothly-light-contrast);--smoothly-color-shade:var(--smoothly-light-shade);--smoothly-color-tint:var(--smoothly-light-tint)}[color=medium].sc-smoothly-button{--smoothly-color:var(--smoothly-medium-color);--smoothly-color-contrast:var(--smoothly-medium-contrast);--smoothly-color-shade:var(--smoothly-medium-shade);--smoothly-color-tint:var(--smoothly-medium-tint)}[color=dark].sc-smoothly-button{--smoothly-color:var(--smoothly-dark-color);--smoothly-color-contrast:var(--smoothly-dark-contrast);--smoothly-color-shade:var(--smoothly-dark-shade);--smoothly-color-tint:var(--smoothly-dark-tint)}.sc-smoothly-button-h{--smoothly-button-border-radius:0.5rem;display:inline-flex;box-sizing:border-box;border-radius:var(--smoothly-button-border-radius);font-size:var(--smoothly-button-font-size, 1rem);cursor:pointer;border:none;outline:none;position:relative}[shape=rounded].sc-smoothly-button-h{--smoothly-button-border-radius:2rem}[type=link].sc-smoothly-button-h{display:inline}[disabled].sc-smoothly-button-h{opacity:0.5}.sc-smoothly-button-h>a.sc-smoothly-button{font-weight:400;background-color:transparent}.sc-smoothly-button-h>a.sc-smoothly-button,.sc-smoothly-button-h>button.sc-smoothly-button{font-size:var(--smoothly-button-font-size);border:1px solid transparent;outline:none;cursor:pointer;display:inline-flex;gap:0.5rem;box-sizing:border-box}.sc-smoothly-button-h>button.sc-smoothly-button{font-weight:bold;justify-content:center;width:100%;align-items:center;border-radius:var(--smoothly-button-border-radius);padding-inline:var(--smoothly-button-padding-inline, 1rem)}.sc-smoothly-button-h{min-height:var(--smoothly-button-height, 2.5rem)}.sc-smoothly-button-h:has(>a:empty),.sc-smoothly-button-h:has(>button:empty),.sc-smoothly-button-h>a.sc-smoothly-button:empty,.sc-smoothly-button-h>button.sc-smoothly-button:empty{border-width:0;min-height:0;padding-inline:0}[size=small].sc-smoothly-button-h{--smoothly-button-height:2rem;--smoothly-button-padding-inline:0.75rem;--smoothly-button-font-size:0.875rem;--smoothly-icon-size:1.4rem}[size=large].sc-smoothly-button-h{--smoothly-button-height:3rem;--smoothly-button-padding-inline:1.25rem;--smoothly-button-font-size:1.125rem}.sc-smoothly-button-h:not([size=icon]):not([size=flexible])>button.sc-smoothly-button{min-width:8rem}[size=icon].sc-smoothly-button-h{--smoothly-icon-size:1.4rem}[size=icon].sc-smoothly-button-h>button.sc-smoothly-button{min-height:var(--smoothly-button-height, 2.5rem);min-width:var(--smoothly-button-height, 2.5rem);padding:0}.sc-smoothly-button-h:not([size=icon]){min-width:8em}[size=flexible].sc-smoothly-button-h{min-width:unset;padding:0;margin:0;display:flex;justify-content:center}[size=flexible].sc-smoothly-button-h>button.sc-smoothly-button{min-width:unset;padding:0;margin:0}[expand].sc-smoothly-button-h{width:100%}[expand=full].sc-smoothly-button-h{border-left:none;border-right:none;--smoothly-button-border-radius:0}[fill=outline].sc-smoothly-button-h>button.sc-smoothly-button{background-color:transparent;color:rgb(var(--smoothly-button-foreground));fill:rgb(var(--smoothly-button-foreground));stroke:rgb(var(--smoothly-button-foreground));border-color:rgb(var(--smoothly-button-foreground))}.sc-smoothly-button-h:not([fill=clear]):not([disabled])>button.sc-smoothly-button:hover,.sc-smoothly-button-h:not([disabled])>button.sc-smoothly-button:focus-visible,[fill=outline].sc-smoothly-button-h:not([disabled]):active>button.sc-smoothly-button::before{border-color:rgb(var(--smoothly-button-focus-color))}[fill=outline].sc-smoothly-button-h:not([disabled])>button.sc-smoothly-button:hover::before,[fill=outline].sc-smoothly-button-h:not([disabled])>button.sc-smoothly-button:focus-within::before,[fill=outline].sc-smoothly-button-h:not([disabled])>button.sc-smoothly-button:active::before{content:"";position:absolute;border:2px solid rgb(var(--smoothly-button-focus-border));inset:-1px;border-radius:var(--smoothly-button-border-radius)}.sc-smoothly-button-h:not([fill=clear]):not([fill=outline]):not([disabled])>button.sc-smoothly-button:hover,.sc-smoothly-button-h:not([fill=clear]):not([fill=outline]):not([disabled])>button.sc-smoothly-button:focus-visible,.sc-smoothly-button-h:not([fill=clear]):not([fill=outline]):not([disabled])>button.sc-smoothly-button:active{background:rgb(var(--smoothly-button-hover-background))}.sc-smoothly-button-h>button.sc-smoothly-button,.sc-smoothly-button-h.sc-smoothly-button-s>smoothly-icon,.sc-smoothly-button-h .sc-smoothly-button-s>smoothly-icon{color:rgb(var(--smoothly-button-foreground));stroke:rgb(var(--smoothly-button-foreground));fill:rgb(var(--smoothly-button-foreground))}[hidden].sc-smoothly-button-h{display:none}`;const $t=class{constructor(e){t(this,e);this.disabled=false}render(){return o(s,{key:"fddb810b2465ce82a68ce0bf4789aa8f14f79303",title:this.tooltip},o(w,{key:"3c08a7871e9ed69611790646f87fc7dae834330c",disabled:this.disabled,type:this.type,link:this.link},o("slot",{key:"8048ac9a2c4e450201ef15b82f66532c253783d9"})))}};$t.style=At();const Mt=()=>`.sc-smoothly-button-confirm-h{display:inline-block}[disabled].sc-smoothly-button-confirm-h{opacity:0.5;pointer-events:none}.sc-smoothly-button-confirm-h:not([warning])>smoothly-button.sc-smoothly-button-confirm:first-child{display:none}[warning].sc-smoothly-button-confirm-h>smoothly-button.sc-smoothly-button-confirm:nth-child(2){display:none}[expand].sc-smoothly-button-confirm-h{width:100%}`;const Et=class{constructor(o){t(this,o);this.smoothlyInputLoad=e(this,"smoothlyInputLoad");this.smoothlyConfirm=e(this,"smoothlyConfirm");this.doubleClickTime=.2;this.disabled=false}clickHandler(t){if(this.clickTimeStamp&&t.timeStamp-this.clickTimeStamp>this.doubleClickTime*1e3){this.timer&&window.clearTimeout(this.timer);this.clickTimeStamp=undefined;this.smoothlyConfirm.emit({[this.name]:true})}else{this.clickTimeStamp=t.timeStamp;this.timer=window.setTimeout((()=>{this.clickTimeStamp=undefined}),2e3)}}render(){return o(s,{key:"4412f32553a126e383e1d9bf32d1d0013eb85bc9",warning:this.clickTimeStamp},o("smoothly-button",{key:"8f53b5dfa7d10e669536b87c7d91a9fe2f05a240",fill:this.fill,expand:this.expand,size:this.size,shape:this.shape,color:"warning",disabled:this.disabled,type:"button",onClick:t=>this.clickHandler(t)},o("smoothly-icon",{key:"be8bbedf8b038e06468c5aac4c813a5af41205ff",name:"alert-outline",fill:this.fill,color:"warning",size:this.size==="icon"?"tiny":"small"})),o("smoothly-button",{key:"719d905afde3e78e2297eba4bb7cc37e1a8728d6",fill:this.fill,expand:this.expand,size:this.size,shape:this.shape,color:this.color,disabled:this.disabled,type:"button",onClick:t=>this.clickHandler(t)},o("slot",{key:"f3add649906ef5e0d5dd6a7fb504a2af4efe0e66"})))}};Et.style=Mt();const Ot=()=>`smoothly-button-demo{display:block;margin:1rem}smoothly-button-demo>section>div{display:flex;align-items:center}smoothly-button-demo smoothly-button{margin:.2em .5em}`;const Pt=class{constructor(e){t(this,e)}render(){return o(s,{key:"41fbe591e1a0c9ab6d1d73335a9b9f4a5a3c4d93"},o("section",{key:"59b6da9df3532752d3e5dcf9763c527d165bcf1f"},o("smoothly-button-demo-standard",{key:"27bf9cd1746a1718bf887dcef5d79230b01318ff"})),o("section",{key:"e7e87e4c84c0e8df43d56f217196e27a9bb5670e"},o("h4",{key:"8bf5cff46e4146474a9b91bfe8b83db89dd13c3a"},"Confirm button (two clicks)"),o("div",{key:"3c341489427dbf76dc4e9a200c23f58174696591"},o("smoothly-button-confirm",{key:"75793866c6111afbd5aeadf1bc6251f1efa9d592",name:"confirm",shape:"rounded",color:"danger",size:"large"},"Delete"),o("smoothly-button-confirm",{key:"14bdceddb01044ae6979af4a0c8efe0970e81e3d",name:"confirm-icon",shape:"rounded",color:"success",size:"icon"},o("smoothly-icon",{key:"33058b7d3638a0ca28aee23a5fb238d60356b16d",name:"checkmark-outline",size:"tiny"})),o("smoothly-button-confirm",{key:"d7d306d14262d7b43c5c37af91ffb79f0be82b14",name:"confirm-icon",shape:"rounded",color:"danger",size:"icon",fill:"outline"},o("smoothly-icon",{key:"7ea300edde779ca34db97bb2fe60f0051b1e366d",name:"trash-outline",size:"tiny",fill:"outline"}))),o("smoothly-toggle-switch-demo",{key:"c6e8b4c78605733c73bab3c1aa8ae5e770cc14e4"}),o("h4",{key:"8e92524469b1b4e0a59d14907e8df2f4e7680887"},"Links with icons"),o("smoothly-button",{key:"4ca461c47396b88dd9c276248d2fb425255e26f8",type:"link"},o("smoothly-icon",{key:"07c089e06c38afc5d0abe83491c38716486225c6",name:"checkmark-circle",slot:"start"}),"type link"),o("smoothly-button",{key:"b1c765d706ee22acb4368b8a67b1faddb591581a",type:"button",color:"warning",fill:"default"},o("smoothly-icon",{key:"d3188cb32fd389fb88a3a1e760fe33867265c5fc",name:"call",slot:"start"}),o("a",{key:"9bdf562304a25ce3024ca58cb53fff7c4b04acb6",href:"https://google.com"},"link")),o("smoothly-button",{key:"5da225cc3dfd1638a54fc9ce533cd038cccc808e",link:"https://google.com",type:"link"},o("smoothly-icon",{key:"a2417e1fbdff1b064e1cc3f61c4fc1615291e44d",name:"arrow-forward",slot:"end"}),"link + type link"),o("h4",{key:"54a1da928e2c9c48638a12dd3768c001ba38a77f"},"Size and Color test"),o("smoothly-button",{key:"bce9b7538f39f17b0377f723310eadbad511ed80",color:"primary",fill:"solid",size:"small",shape:"rounded"},"Color Primary + Small"),o("smoothly-button",{key:"210799c91bfe94fb54b3434fd99e67075cc91b43",color:"secondary",fill:"solid",shape:"rounded"},"Color Secondary + Default"),o("smoothly-button",{key:"374856692cefcb96deb1a38758eb4fec6f7808ab",color:"warning",fill:"solid",size:"large"},"Color Warning + Large"),o("smoothly-button",{key:"e807e6793fb358e6ced92caecb1d0feab2f011c7",color:"danger",fill:"solid",size:"small",shape:"rounded"},"Color Danger + Small"),o("smoothly-button",{key:"9bcde023dd0e12a84835bdd3d0c93d7602485246",color:"success",fill:"solid",size:"small",shape:"rounded"},"Color Success + Small"),o("smoothly-button",{key:"f98fb61b19dfbc7bbf29a740e7a5ae1997861c80",color:"tertiary",fill:"solid",size:"small",shape:"rounded"},"Color Tertiary + Small"),o("smoothly-button",{key:"6a46ea925f111b8c1d8b4510577d57f10e49ed1e",color:"dark",fill:"solid",size:"small",shape:"rounded"},"Color Dark + Small"),o("smoothly-button",{key:"3ced819c355f03ef775ace7ccfbb0206bbc07b6a",color:"medium",fill:"solid",size:"small",shape:"rounded"},"Color Medium + Small"),o("smoothly-button",{key:"3257cef08250f67f8ec2666130e3ea0645a8e2c7",color:"light",fill:"solid",size:"small",shape:"rounded"},"Color Light + Small"),o("h4",{key:"0a0800062a9f545328408b50f91d9f080cdee158"},"Expand examples"),o("smoothly-button",{key:"02fabfb6c3583fb8853d82c4b97245428253774a",color:"secondary",fill:"solid",expand:"full"},"Color Secondary + Default"),o("smoothly-button",{key:"51ddb0b657a2648909072cac84055478db97f95d",color:"warning",fill:"solid",expand:"block"},"Color Warning + Large"),o("h4",{key:"52624dee081a11c096585822d810cf4288059379"},"Fill examples"),o("div",{key:"2c1eeadd860b6115dd7fdd0b2f4f8538a564269a"},o("smoothly-button",{key:"9e5454cac152c3eaea53cb55f607ca32ab09ff62",shape:"rounded",color:"primary",fill:"solid"},o("smoothly-icon",{key:"188d4c19f60645acb41e0f47f4a96da2e544b8c0",name:"checkmark-circle",slot:"start"}),"Fill Solid"),o("smoothly-button",{key:"8587e3a0015b27248dd5b0cfa801e8abd962c5ab",shape:"rounded",color:"secondary",fill:"outline"},o("smoothly-icon",{key:"557848720b2df5e0425ba66f892b5bf29fa5ea2f",name:"checkmark-circle",slot:"start"}),"Fill Outline"),o("smoothly-button",{key:"bb9406a007325c258a6a7b1039fcb1665c0abd3a",shape:"rounded",color:"tertiary",fill:"clear"},o("smoothly-icon",{key:"ed23a5661e678f293cbfa5745d684e6b10dc8c1a",name:"checkmark-circle",slot:"start"}),"Fill Clear"),o("smoothly-button",{key:"910b4a12a963dc64747c0d37eac3ce437215982f",size:"icon",shape:"rounded",color:"success",fill:"solid"},o("smoothly-icon",{key:"f32e72f63b447d69655d51eb23fb23671132c34f",name:"basketball"}))),o("h4",{key:"13a6bf24881c6eb2c7753b6cc5a23dfe8c16f5bc"},'Buttons with Icon in "start"'),o("div",{key:"cc0e96b1435883957159795474f8cf7aead9586d"},o("smoothly-button",{key:"963d08b7ffe3533daa1a933ce66263616258f92b",shape:"rounded",fill:"solid",color:"warning"},o("smoothly-icon",{key:"6fd017cf57e5ebdf63078003e02d92c68c8f4af5",name:"checkmark-circle",slot:"start"}),"Check"),o("smoothly-button",{key:"0bfde99dba0e56974c4132d2ef6c727c9a2a809f",shape:"rounded",fill:"solid",color:"secondary"},o("smoothly-icon",{key:"5780d006fe5a007b68f17c537934ebae8fb23480",name:"basketball",slot:"start"}),"Check"),o("smoothly-button",{key:"00e418dec2de5f78e40f56a38bff2e66f0ea8744",shape:"rounded",fill:"solid",color:"success"},o("smoothly-icon",{key:"eed0a2bb3c839dd3d914dc0a07e1e3c51e3c5bf3",name:"call",slot:"start"}),"Check"),o("smoothly-button",{key:"7ccffbe4c12666ce4f167f0fdc9b6bc7078faeb0",size:"icon",fill:"solid",shape:"rounded",color:"success"},o("smoothly-icon",{key:"56531f0dd24f7c5bb0ae63fcf7b82935b60d24f2",name:"call"})),o("smoothly-button",{key:"8466fd4b388ad0e5411ba5f31975aaf6a1b0680b",size:"flexible",fill:"solid",color:"success"},o("smoothly-icon",{key:"1472f81c21140b5a8ee4408a947657cd673bd1dc",name:"airplane"}))),o("h4",{key:"0e2ac17f379dd54737037e4d3b32ad256ebf8494"},'Buttons with Icon in "end"'),o("smoothly-button",{key:"a4350f353ce14cb9adb6b362b0b11e527c0cd9fe",fill:"solid",color:"light"},"Go Forward",o("smoothly-icon",{key:"c8e56f3ab255349c872b991ec76de6c6ab878066",name:"arrow-forward",slot:"end"})),o("h4",{key:"4a318ff840e33a41e1afbdc2e328430ac4bbc830"},"Test for icon button"),o("div",{key:"9305973351f925768f74b64f7b790c92b1588839"},o("smoothly-button",{key:"da959f375b10df462b6bf8df9d5104dce89fb9d0",size:"icon",fill:"solid",shape:"rounded",color:"success"},o("smoothly-icon",{key:"141d5fa125a2a34220c4cf0320ec45ca3fe31139",name:"call"})),o("smoothly-button",{key:"0987067c106765e51df6f9586aa1d45d942ef125",size:"icon",shape:"rounded",color:"warning",fill:"solid"},o("smoothly-icon",{key:"5fa23e7a1d9b315af5354b55fc4eefd9835e0a44",name:"search-outline"})),o("smoothly-button",{key:"60e76fbb66064799f114cc841c813f9ee1d7d065",size:"icon",shape:"rounded",color:"secondary"},o("smoothly-icon",{key:"1ae4510d90d1b47baadee8f6ed7dd492066bd3e9",name:"checkmark-circle"}))),o("h4",{key:"fadbc9d0a253d68f24b030d2d52d73d5947d335a"},"Link examples"),o("div",{key:"8b4ced5d7bbb2e479073f04cfb98e7f98b41f01c"},o("smoothly-button",{key:"128369132e142d37361b6d640fde4d2743e145a7",type:"link"},"type link"),o("smoothly-button",{key:"b9f05aa9925ca88c1aa65f4e0b3040bed9d01e83",type:"button",fill:"clear"},o("a",{key:"9b565879faf7af07377103494a04b9c3c3a53c8a",href:"https://google.com"},"link")),o("smoothly-button",{key:"69355e4bbbf46fd49597bc3db62d31548d112f87",link:"https://google.com",type:"link"},"link + type link")),o("h4",{key:"dbc23f33d5d74c0147f658672f7a4fcfb166df9d"},"Disabled buttons"),o("div",{key:"0b6d087a8e7ca3a3c1b94159f126962b6c622b20"},o("smoothly-button",{key:"636c5d7b4ddfee2ca6b912b8c8f65e06b5a64136",disabled:true,fill:"solid",color:"secondary"},"Disabled"),o("smoothly-button",{key:"da4a2457eef26c077d603bd3482764ce357918ad",type:"link",link:"https://google.com",disabled:true},"Disabled link"))),o("smoothly-back-to-top",{key:"2906fd515608fe4a3c880755bbb9dfee63d94889"}))}};Pt.style=Ot();const Ht=()=>`.sc-smoothly-button-demo-standard-h smoothly-input-select.sc-smoothly-button-demo-standard smoothly-item.sc-smoothly-button-demo-standard{display:flex}.sc-smoothly-button-demo-standard-h .buttons.sc-smoothly-button-demo-standard{display:flex;flex-wrap:wrap;gap:0.5rem}.sc-smoothly-button-demo-standard-h .buttons.sc-smoothly-button-demo-standard>smoothly-button.sc-smoothly-button-demo-standard{margin-block:0}.sc-smoothly-button-demo-standard-h .height-text.sc-smoothly-button-demo-standard{border-left:3px dotted rgb(var(--smoothly-default-contrast));padding-inline:1rem;align-content:center}`;const Ft=class{constructor(e){t(this,e);this.props={};this.heightText=""}updateInputHeightText(){setTimeout((()=>{const t=Number(getComputedStyle(document.documentElement).fontSize.replace("px",""));if(this.lastButton){const e=this.lastButton.clientHeight;this.heightText=`${e/t}rem (${e}px)`}}),100)}render(){return o(s,{key:"d6e6ca6091ae99e7203ec3d88a00d4b486f5f3bd"},o("h2",{key:"b62fd377ec00749b0f0f7b8cff1e2e2fdceb318d"},"Button Standard"),o("smoothly-form",{key:"c9c1113d5c7073b66d0cfbd90bfa552ca3104d37",onSmoothlyFormInput:t=>this.props=t.detail,looks:"grid"},o("smoothly-input-checkbox",{key:"0666c152084c24ec1596ab16d09b04da4f885752",name:"text.useColor",checked:true},"Use Color as Text"),o("smoothly-input-select",{key:"77fa423c1bed60c446bad2fee6ef4927610ac8af",name:"size"},o("span",{key:"d5cd74d1252542454a5fb6441d2099da14a53023",slot:"label"},"Size"),["small","large","icon","flexible"].map((t=>o("smoothly-item",{value:t,key:t},t)))),o("smoothly-input",{key:"b6df255a745261b34ef164f04c5458c77a9c286b",name:"text.value",value:"Button"},"Text",o("smoothly-input-clear",{key:"0ee5dff1bd206c5db7d1928773cef6890fb2ed80",slot:"end"})),o("smoothly-input-radio",{key:"f6f3027ea26fc6c6d077b79bbb228b6cd0809e54",name:"expand",clearable:true},o("span",{key:"33436d08686b4714e0cfdb0cea7ba6b082b666ed",slot:"label"},"Expand"),o("smoothly-input-radio-item",{key:"be55407c3191954aca07baf6aa027ac6bbe9d106",value:"block"},"block"),o("smoothly-input-radio-item",{key:"1e94daa9639011bf686019ba4883524f0073fae6",value:"full"},"full"),o("smoothly-input-clear",{key:"3b51e51710dbac5a260d3396546285234f55ad9e",slot:"end"})),o("smoothly-input-select",{key:"73b66b593f926e9035e4502bb8978deac7675d76",name:"fill"},o("span",{key:"5b143acb8c018f8c37d50788d77c8935fb5e014f",slot:"label"},"Fill"),c.values.map((t=>o("smoothly-item",{value:t,key:t},t)))),o("smoothly-input-checkbox",{key:"ef134a75c0dc58a8ef42ab5f382132eb8163452a",name:"disabled"},"Disabled"),o("smoothly-input-select",{key:"ad79838c8c83d40eeb08b1c5b83d6e82a9b6c87c",name:"type"},o("span",{key:"1581c9346c7c2443324996f8e2b79d03f31241da",slot:"label"},"Type"),["button","submit","reset","link"].map((t=>o("smoothly-item",{value:t,key:t},t)))),o("smoothly-input-checkbox",{key:"05a368b01328adf76df30553a714934b582c16f6",name:"rounded"},"Rounded"),o("smoothly-input-select",{key:"a8298ce4893589cdef6de8b311d393e1d4d7bd1d",name:"icon",menuHeight:"8items"},o("span",{key:"f0a06face2985f21d7159adb1ce523483268644a",slot:"label"},"Icon"),h.Name.values.map((t=>o("smoothly-item",{value:t,key:t},o("smoothly-icon",{name:t,size:"small",tooltip:t})))),o("smoothly-input-clear",{key:"5791bab3057dac0dfcbd69b3c593b331878b4ed0",slot:"end"})),o("smoothly-input",{key:"8c650a560e278a4aac4040ee101e4e1346ca3a54",name:"tooltip",value:"Tooltip"},"Tooltip",o("smoothly-input-clear",{key:"e67bfad19b0bc374f025055140a689bb45ec4dbb",slot:"end"}))),o("div",{key:"0c312b6d27ddb2a1a80c04661345c703b2622414",class:"buttons"},r.values.map(((t,e,s)=>{var a,i;return o("smoothly-button",{onClick:e=>console.log(`Clicked button with color: ${t}`,e),tooltip:this.props.tooltip,ref:t=>s.length-1==e&&(this.lastButton=t),color:t,expand:this.props.expand,fill:this.props.fill,disabled:this.props.disabled,shape:this.props.rounded?"rounded":undefined,size:this.props.size,type:this.props.type,key:t},this.props.icon?o("smoothly-icon",{name:this.props.icon}):undefined,((a=this.props.text)===null||a===void 0?void 0:a.useColor)?t:(i=this.props.text)===null||i===void 0?void 0:i.value)})),o("div",{key:"638acf6f59bd885acb4262f43e377afc22e35b79",class:"height-text"},this.heightText)))}static get watchers(){return{props:[{updateInputHeightText:0}]}}};Ft.style=Ht();function Ut(t){const e=new Date(t);e.setDate(1);let o=-((e.getDay()+6)%7)+1;const s=[];for(let e=0;e<6;e++){const a=[];for(let e=0;e<7;e++){const e=new Date(t);e.setUTCDate(o++);a.push(C.Date.create(e))}if(e<5||C.Date.firstOfMonth(a[0])==C.Date.firstOfMonth(t)){s.push(a)}}return s}function Nt(){const t=new globalThis.Date;t.setDate(t.getDate()-t.getDay()+1);const e=[];for(let o=0;o<7;o++){e.push(t.toLocaleString(undefined,{weekday:"short"}));t.setDate(t.getDate()+1)}return e}function Yt(t){const e=new globalThis.Date(t);const o=[];for(let s=0;s<12;s++){e.setMonth(s,28);const a=C.Date.create(e);o.push({date:a,name:e.toLocaleString(undefined,{month:"long"}),selected:a.substr(0,7)==t.substr(0,7)})}return o}function Wt(t,e,o){const s=new globalThis.Date(t);const a=e?C.Date.getYear(e):(new Date).getFullYear()-50;const i=o?C.Date.getYear(o):(new Date).getFullYear()+50;const l=[];for(let e=a;e<=i;e++){s.setFullYear(e);const o=C.Date.create(s);l.push({date:o,name:s.toLocaleString(undefined,{year:"numeric"}),selected:o==t})}return l}const Bt=()=>`.sc-smoothly-calendar-h{display:block;--other-month-opacity:0.5;padding:0.5em;border:1px solid rgb(var(--smoothly-input-border))}.sc-smoothly-calendar-h>smoothly-input-month.sc-smoothly-calendar{padding:0 0.5em}.sc-smoothly-calendar-h>table.sc-smoothly-calendar{table-layout:fixed;width:100%}.sc-smoothly-calendar-h>table.sc-smoothly-calendar>thead.sc-smoothly-calendar>tr.sc-smoothly-calendar>th.sc-smoothly-calendar,.sc-smoothly-calendar-h>table.sc-smoothly-calendar>tr.sc-smoothly-calendar>td.sc-smoothly-calendar{text-align:center;padding:0.5em;min-width:2em;box-sizing:border-box;background-color:rgb(var(--smoothly-input-background));color:rgb(var(--smoothly-input-foreground));-webkit-user-select:none;user-select:none}.sc-smoothly-calendar-h>table.sc-smoothly-calendar>tr.sc-smoothly-calendar>td.sc-smoothly-calendar{position:relative;cursor:pointer}.sc-smoothly-calendar-h>table.sc-smoothly-calendar>tr.sc-smoothly-calendar>td.currentMonth.sc-smoothly-calendar{color:rgb(var(--smoothly-default-contrast))}.sc-smoothly-calendar-h>table.sc-smoothly-calendar>tr.sc-smoothly-calendar>td.sc-smoothly-calendar:not(.currentMonth){color:rgba(var(--smoothly-default-contrast), var(--other-month-opacity))}.sc-smoothly-calendar-h>table.sc-smoothly-calendar>tr.sc-smoothly-calendar>td.sc-smoothly-calendar:nth-child(6):not(.currentMonth).selected,.sc-smoothly-calendar-h>table.sc-smoothly-calendar>tr.sc-smoothly-calendar>td.sc-smoothly-calendar:nth-child(6):not(.currentMonth).dateRange,.sc-smoothly-calendar-h>table.sc-smoothly-calendar>tr.sc-smoothly-calendar>td.sc-smoothly-calendar:nth-child(7):not(.currentMonth).selected,.sc-smoothly-calendar-h>table.sc-smoothly-calendar>tr.sc-smoothly-calendar>td.sc-smoothly-calendar:nth-child(7):not(.currentMonth).dateRange{color:rgba(var(--smoothly-default-contrast))}.sc-smoothly-calendar-h>table.sc-smoothly-calendar>tr.sc-smoothly-calendar>td.sc-smoothly-calendar:nth-child(6),.sc-smoothly-calendar-h>table.sc-smoothly-calendar>tr.sc-smoothly-calendar>td.sc-smoothly-calendar:nth-child(7){color:rgb(var(--smoothly-calendar-weekend-foreground, var(--smoothly-danger-color)))}.sc-smoothly-calendar-h>table.sc-smoothly-calendar>tr.sc-smoothly-calendar>td.sc-smoothly-calendar:nth-child(6):not(.currentMonth),.sc-smoothly-calendar-h>table.sc-smoothly-calendar>tr.sc-smoothly-calendar>td.sc-smoothly-calendar:nth-child(7):not(.currentMonth){color:rgba(var(--smoothly-calendar-weekend-foreground, var(--smoothly-danger-color)), var(--other-month-opacity))}>table>tr>td.sc-smoothly-calendar-h:not(.selected,.disable).sc-smoothly-calendar:hover{color:rgb(var(--smoothly-primary-contrast));background:rgb(var(--smoothly-primary-tint))}.sc-smoothly-calendar-h>table.sc-smoothly-calendar>tr.sc-smoothly-calendar>td.selected.sc-smoothly-calendar{color:rgb(var(--smoothly-primary-contrast));background:rgb(var(--smoothly-primary-color))}.sc-smoothly-calendar-h>table.sc-smoothly-calendar>tr.sc-smoothly-calendar>td.today.sc-smoothly-calendar::before{content:"";inset:2px;position:absolute;border:1px solid currentColor}.sc-smoothly-calendar-h>table.sc-smoothly-calendar>tr.sc-smoothly-calendar>td.dateRange.sc-smoothly-calendar{color:rgb(var(--smoothly-primary-contrast));background:rgb(var(--smoothly-primary-tint))}.sc-smoothly-calendar-h>table.sc-smoothly-calendar>tr.sc-smoothly-calendar>td.disable.sc-smoothly-calendar{cursor:not-allowed;opacity:0.5}`;const Vt=class{constructor(o){t(this,o);this.smoothlyDateSet=e(this,"smoothlyDateSet");this.smoothlyDateRangeSet=e(this,"smoothlyDateRangeSet");this.clickCounter=0}componentWillLoad(){this.onStart();this.onEnd()}onStart(){this.startInternal=this.start}onEnd(){this.endInternal=this.end}async jumpTo(t){var e,o,s,a;const i=C.Date.Year.is(t.Y)?t.Y:(o=(e=this.month)===null||e===void 0?void 0:e.substring(0,4))!==null&&o!==void 0?o:C.Date.now().substring(0,4);const l=C.Date.Month.is(t.M)?t.M:(a=(s=this.month)===null||s===void 0?void 0:s.substring(5,7))!==null&&a!==void 0?a:C.Date.now().substring(5,7);const n=`${i}-${l}-01`;if(C.Date.is(n)){this.month=n}}onClick(t){this.value=t;this.smoothlyDateSet.emit(this.value)}onClickDoubleInput(t){this.clickCounter+=1;if(this.clickCounter%2==1){this.startInternal=this.endInternal=this.frozenDate=t}else{const e=this.startInternal>t?t:this.startInternal;const o=this.endInternal<t?t:this.endInternal;this.startInternal=e;this.endInternal=o}this.clickCounter%2==0&&this.startInternal&&this.endInternal&&this.smoothlyDateRangeSet.emit({start:this.startInternal,end:this.endInternal})}onHover(t){if(this.doubleInput&&this.clickCounter%2==1){if(t<this.frozenDate){this.startInternal=t;this.endInternal=this.frozenDate}else{this.startInternal=this.frozenDate;this.endInternal=t}}}withinLimit(t){return(!this.min||t>=this.min)&&(!this.max||t<=this.max)}render(){var t,e,s;return o(i,{key:"51ec0570b1b71eb9ff8bca9984ecf40550abe435"},o("smoothly-input-month",{key:"1beb2d18f5a08e93d88fddca59675078d8662715",name:"month",value:(t=this.month)!==null&&t!==void 0?t:this.value,min:this.min,max:this.max,inCalendar:true,next:true,previous:true,showLabel:false,onSmoothlyInput:t=>{t.stopPropagation();"month"in t.detail&&typeof t.detail.month=="string"&&(this.month=t.detail.month)},onSmoothlyUserInput:t=>t.stopPropagation()},o("div",{key:"14ed1a3cc6dd8fe89d7ac4f1450f391ccb0bff77",slot:"year-label"},o("slot",{key:"c07b485adf7b6b4aa71d3ceb10d530aa029c652d",name:"year-label"})),o("div",{key:"cd1e232ded9c2ac84156de7419bc46bdd4e01680",slot:"month-label"},o("slot",{key:"1255e6cef5898b90aba12716639774957e09cd86",name:"month-label"}))),o("table",{key:"8ada3e2ac6abf42710c8611d9264ddbc7691e307"},o("thead",{key:"1f686102dc5f57bbc838d11d984e85407d44fdda"},o("tr",{key:"41ab20afc9b1a4491f5070345f779dc6238dd8d3"},Nt().map((t=>o("th",null,t))))),Ut((s=(e=this.month)!==null&&e!==void 0?e:this.value)!==null&&s!==void 0?s:C.Date.now()).map((t=>o("tr",null,t.map((t=>{var e,s,a,i;return o("td",{tabindex:1,onMouseOver:this.withinLimit(t)?()=>this.onHover(t):undefined,onClick:this.withinLimit(t)?()=>this.doubleInput?this.onClickDoubleInput(t):this.onClick(t):undefined,class:{selected:t==this.value||this.doubleInput&&(t==this.startInternal||t==this.endInternal),today:t==C.Date.now(),currentMonth:C.Date.firstOfMonth((s=(e=this.month)!==null&&e!==void 0?e:this.value)!==null&&s!==void 0?s:C.Date.now())==C.Date.firstOfMonth(t),dateRange:this.doubleInput&&t>((a=this.startInternal)!==null&&a!==void 0?a:"")&&t<((i=this.endInternal)!==null&&i!==void 0?i:""),disable:!this.withinLimit(t)}},t.substring(8,10))})))))))}get element(){return a(this)}static get watchers(){return{start:[{onStart:0}],end:[{onEnd:0}]}}};Vt.style=Bt();var Gt;(function(t){t.guides={Y:"YYYY",M:"MM",D:"DD"};(function(e){function o(e,o){var s;return((s=o===null||o===void 0?void 0:o.length)!==null&&s!==void 0?s:0)>=t.Part.lengthOf(e)}e.isComplete=o;function s(e){return t.guides[e].length}e.lengthOf=s;function a(e,o){const s=t.guides[e];return s.substring(0,s.length-(o!==null&&o!==void 0?o:0))}e.getGuide=a})(t.Part||(t.Part={}));(function(t){function e(t){if(t.Y&&t.M&&parseInt(t.M)>=1&&parseInt(t.M)<=12){const e=C.Date.lastOfMonth(`${t.Y.padStart(4,"0")}-${t.M.padStart(2,"0")}-01`);return C.Date.getDay(e)}else if(t.M&&parseInt(t.M)>=1&&parseInt(t.M)<=12){const e=C.Date.lastOfMonth(`2004-${t.M.padStart(2,"0")}-01`);return C.Date.getDay(e)}return 31}t.lastDay=e;function o(t){if(t.Y&&t.Y.length==4&&t.M&&t.M.length==2&&t.D&&t.D.length==2){const e=`${t.Y}-${t.M}-${t.D}`;const o=C.Date.lastOfMonth(`${t.Y}-${t.M}-01`);return o<e?o:e}return undefined}t.toDate=o;function s(t){if(t){return{Y:t.substring(0,4).padStart(4,"0"),M:t.substring(5,7).padStart(2,"0"),D:t.substring(8,10).padStart(2,"0")}}return undefined}t.fromDate=s})(t.Parts||(t.Parts={}));(function(t){function e(t){switch(t){case"en-US":return"MDY";case"sq-AL":case"es-AR":case"it-IT":case"en-GB":case"fr-FR":case"et-EE":case"de-AT":case"de-DE":case"he-IL":case"is-IS":case"lv-LV":case"pl-PL":case"ru-RU":case"fi-FI":case"hi-IN":case"en-IN":return"DMY";default:return"YMD"}}t.fromLocale=e;function o(t,e){return t.charAt(e)}t.getPart=o;function s(t){return t.split("")}t.toArray=s})(t.Order||(t.Order={}));(function(t){function e(t){switch(t){case"sq-AL":case"es-AR":case"it-IT":case"en-GB":case"fr-FR":case"en-US":return"/";case"et-EE":case"de-AT":case"de-DE":case"he-IL":case"is-IS":case"lv-LV":case"pl-PL":case"ru-RU":case"fi-FI":return".";default:return"-"}}t.fromLocale=e})(t.Separator||(t.Separator={}))})(Gt||(Gt={}));var Kt;(function(t){function e(t){const e=t.currentTarget;const o=window.getSelection();if(!o||o.rangeCount===0||!e.contains(o.anchorNode)){return false}if(!o.isCollapsed){return false}const s=o.getRangeAt(0);const a=s.cloneRange();a.selectNodeContents(e);a.setEnd(s.startContainer,s.startOffset);return a.toString().length===0}t.isAtStart=e;function o(t){const e=t.currentTarget;const o=window.getSelection();if(!o||o.rangeCount===0||!e.contains(o.anchorNode)){return false}if(!o.isCollapsed){return false}const s=o.getRangeAt(0);const a=s.cloneRange();a.selectNodeContents(e);a.setStart(s.endContainer,s.endOffset);return a.toString().length===0}t.isAtEnd=o;function s(t){if(!t){return}t.focus();const e=document.createRange();e.selectNodeContents(t);const o=window.getSelection();if(!o){return}o.removeAllRanges();o.addRange(e)}t.selectAll=s;function a(t,e){if(!t){return}t.focus();const o=window.getSelection();if(!o){return}const s=document.createRange();const a=t.firstChild||t;const i=Math.max(0,Math.min(e,t.innerText.length));s.setStart(a,i);s.collapse(true);o.removeAllRanges();o.addRange(s)}t.setPosition=a;function i(t){const e=window.getSelection();if(!e||e.rangeCount===0){return true}const o=e.getRangeAt(0);if(!t.contains(o.startContainer)||!t.contains(o.endContainer)){return true}return o.collapsed}t.isCollapsed=i})(Kt||(Kt={}));const qt=()=>`.sc-smoothly-date-text-h{--guide-opacity:0.5}.sc-smoothly-date-text-h .smoothly-date-text-part.sc-smoothly-date-text:focus{outline:none}.sc-smoothly-date-text-h .guide.sc-smoothly-date-text{opacity:var(--guide-opacity)}.sc-smoothly-date-text-h .smoothly-date-text-part.sc-smoothly-date-text:not(.is-complete)+.guide.sc-smoothly-date-text+.smoothly-date-separator.sc-smoothly-date-text{opacity:var(--guide-opacity)}`;const Zt=class{constructor(o){t(this,o);this.smoothlyDateTextHasText=e(this,"smoothlyDateTextHasText");this.smoothlyDateTextChange=e(this,"smoothlyDateTextChange");this.smoothlyDateTextFocusChange=e(this,"smoothlyDateTextFocusChange");this.smoothlyDateHasPartialDate=e(this,"smoothlyDateHasPartialDate");this.smoothlyDateTextDone=e(this,"smoothlyDateTextDone");this.smoothlyDateTextPrevious=e(this,"smoothlyDateTextPrevious");this.smoothlyDateTextNext=e(this,"smoothlyDateTextNext");this.partElements={0:undefined,1:undefined,2:undefined};this.locale=T();this.showLabel=true;this.parts={}}componentWillLoad(){var t;this.order=Gt.Order.fromLocale(this.locale);this.separator=Gt.Separator.fromLocale(this.locale);this.parts=(t=Gt.Parts.fromDate(this.value))!==null&&t!==void 0?t:{}}componentDidLoad(){this.updateInputs()}partsHandler(){const t=Gt.Parts.toDate(this.parts);if(t!=this.previousEmittedValue){this.smoothlyDateTextChange.emit(t);this.previousEmittedValue=t}this.smoothlyDateTextHasText.emit(Object.values(this.parts).some((t=>!!t)))}focusedIndexHandler(){this.smoothlyDateTextFocusChange.emit(typeof this.focusedIndex=="number")}async setValue(t){const e=Gt.Parts.fromDate(t);this.setAllParts(e)}setAllParts(t){this.parts=t!==null&&t!==void 0?t:{};this.updateInputs()}updateInputs(){var t,e,o;const s=this.order.indexOf("Y");const a=this.order.indexOf("M");const i=this.order.indexOf("D");this.partElements[s]&&(this.partElements[s].innerText=(t=this.parts.Y)!==null&&t!==void 0?t:"");this.partElements[a]&&(this.partElements[a].innerText=(e=this.parts.M)!==null&&e!==void 0?e:"");this.partElements[i]&&(this.partElements[i].innerText=(o=this.parts.D)!==null&&o!==void 0?o:"")}setPart(t,e){this.parts=Object.assign(Object.assign({},this.parts),{[t]:e});const o=this.order.indexOf(t);this.partElements[o]&&(this.partElements[o].innerText=e!==null&&e!==void 0?e:"")}async select(t="start"){const e=t=="start"?0:2;this.setFocus(e)}async deselect(){var t,e;(e=this.partElements[(t=this.focusedIndex)!==null&&t!==void 0?t:0])===null||e===void 0?void 0:e.blur()}getInnerText(t){return t.innerText.replace(/\n/g,"").replace(/\D/g,"")}beforeInputHandler(t){var e;const o=this.order[(e=this.focusedIndex)!==null&&e!==void 0?e:0];const s=this.getInnerText(t.target);const a=t.data&&/\D/.test(t.data);const i=Gt.Part.isComplete(o,s);const l=Kt.isCollapsed(t.target);if((t.inputType=="insertText"||t.inputType=="insertFromPaste")&&(a||i&&l)){t.preventDefault()}if(t.inputType=="insertParagraph"||t.inputType=="insertLineBreak"){this.smoothlyDateTextDone.emit();t.preventDefault()}}inputHandler(t){var e,o;const s=Gt.Order.getPart(this.order,(e=this.focusedIndex)!==null&&e!==void 0?e:0);const a=(o=this.focusedIndex)!==null&&o!==void 0?o:0;const i=this.getInnerText(t.target);this.parts=Object.assign(Object.assign({},this.parts),{[s]:i});if(["D","M"].includes(s)){const t=s=="D";const e=t?Gt.Parts.lastDay(this.parts):12;const o=t?3:1;const l=parseInt(i);if(i.length>=2){this.commitPart(s,l,a,e)}else if(i.length==1&&l>o){this.autoAdvancePart(s,l,a,e)}}if(Gt.Part.isComplete(s,i)){this.setFocus(a+1)}const l=Gt.Parts.toDate(this.parts);if(l){const t=Gt.Parts.fromDate(l);if(this.parts.D!==(t===null||t===void 0?void 0:t.D)){this.setPart("D",t===null||t===void 0?void 0:t.D)}}if(this.parts.Y||this.parts.M||this.parts.D){this.smoothlyDateHasPartialDate.emit(this.parts)}}keyDownHandler(t){var e;const o=this.getInnerText(t.target);const s=(e=this.focusedIndex)!==null&&e!==void 0?e:0;if(Kt.isAtStart(t)&&t.key=="ArrowLeft"){this.autoAdvanceIfPossible(s);this.setFocus(s-1);t.preventDefault()}else if(Kt.isAtEnd(t)&&t.key=="ArrowRight"){this.autoAdvanceIfPossible(s);this.setFocus(s+1);t.preventDefault()}else if(t.key=="Home"||t.key=="ArrowUp"){this.autoAdvanceIfPossible(s);this.setFocus(0);t.preventDefault()}else if(t.key=="End"||t.key=="ArrowDown"){this.autoAdvanceIfPossible(s);this.setFocus(2);t.preventDefault()}else if(Kt.isAtStart(t)&&t.key=="Backspace"&&o==""){this.autoAdvanceIfPossible(s);this.setFocus(s-1);t.preventDefault()}else if(Kt.isAtEnd(t)&&t.key=="Delete"&&o==""){this.autoAdvanceIfPossible(s);this.setFocus(s+1);t.preventDefault()}}commitPart(t,e,o,s){const a=Math.max(1,Math.min(e,s));this.setPart(t,a.toString().padStart(2,"0"));Kt.setPosition(this.partElements[o],2)}autoAdvancePart(t,e,o,s){const a=Math.max(1,Math.min(e,s));this.setPart(t,a.toString().padStart(2,"0"));this.setFocus(o+1)}autoAdvanceIfPossible(t){var e;const o=Gt.Order.getPart(this.order,t);const s=(e=this.parts[o])!==null&&e!==void 0?e:"";if(o=="D"&&s.length==1){this.autoAdvancePart(o,parseInt(s),t,Gt.Parts.lastDay(this.parts))}else if(o=="M"&&s.length==1){this.autoAdvancePart(o,parseInt(s),t,12)}}setFocus(t){if(t<0){this.smoothlyDateTextPrevious.emit()}else if(t>2){this.smoothlyDateTextNext.emit()}else{Kt.selectAll(this.partElements[t])}}render(){return o(s,{key:"f85c786115e7a171f69dc12fc7cd7fd95d47dc04",class:{"has-text":Object.values(this.parts).some((t=>!!t))}},Gt.Order.toArray(this.order).map(((t,e)=>{var s;return o("span",{onClick:()=>!this.readonly&&!this.disabled&&this.setFocus(e)},o("span",{class:{"smoothly-date-text-part":true,"is-complete":Gt.Part.isComplete(t,this.parts[t])},onFocus:()=>this.focusedIndex=e,onBlur:()=>this.focusedIndex=undefined,onKeyDown:t=>this.keyDownHandler(t),key:e,ref:t=>this.partElements[e]=t,contenteditable:!(this.readonly||this.disabled),inputmode:"numeric"}),o("span",{class:"guide"},Gt.Part.getGuide(t,(s=this.parts[t])===null||s===void 0?void 0:s.length)),e<2&&o("span",{class:"smoothly-date-separator"},this.separator))})))}get element(){return a(this)}static get watchers(){return{parts:[{partsHandler:0}],focusedIndex:[{focusedIndexHandler:0}]}}};Zt.style=qt();const Jt=()=>`.sc-smoothly-dialog-h{display:block;position:fixed;top:55%;left:50%;transform:translate(-50%, -50%);width:100%;height:100%;z-index:1;background:rgba(var(--smoothly-default-color), var(--smoothly-semitransparent)) !important}[hidden].sc-smoothly-dialog-h{display:none}.sc-smoothly-dialog-h>section.sc-smoothly-dialog{margin-top:var(--smoothly-dialog-margin-top)}.sc-smoothly-dialog-h>section.sc-smoothly-dialog>div.header.sc-smoothly-dialog{border-top-left-radius:8px;border-top-right-radius:8px;margin-top:2em;color:rgb(var(--smoothly-primary-contrast));background:rgb(var(--smoothly-primary-color));border-color:rgb(var(--smoothly-primary-color))}.sc-smoothly-dialog-h:not([header]) div.header.sc-smoothly-dialog{border:none}.sc-smoothly-dialog-h>section.sc-smoothly-dialog>*.sc-smoothly-dialog{position:relative;color:rgb(var(--smoothly-default-contrast));background-color:rgb(var(--smoothly-default-color));border-color:rgb(var(--smoothly-color));border-width:1px;border-style:solid;max-width:40em;width:calc(100vw - 4em - 2px);max-height:calc(100vh - 6em - 2px);height:auto;margin-left:auto;margin-right:auto;border-collapse:collapse}.sc-smoothly-dialog-h>section.sc-smoothly-dialog>div.content.sc-smoothly-dialog{border-bottom-left-radius:8px;border-bottom-right-radius:8px;margin-bottom:2em;border:1px solid rgb(var(--smoothly-default-contrast));box-sizing:border-box;overflow:hidden}.sc-smoothly-dialog-h:not([header])>section.sc-smoothly-dialog>div.content.sc-smoothly-dialog{border-radius:8px}.sc-smoothly-dialog-h>section.sc-smoothly-dialog>*.sc-smoothly-dialog>smoothly-trigger.sc-smoothly-dialog{position:absolute;right:-2em;top:-2em;z-index:1;border-color:transparent}.sc-smoothly-dialog-h>section.sc-smoothly-dialog>*.sc-smoothly-dialog>smoothly-trigger.sc-smoothly-dialog:hover{border-color:transparent}.sc-smoothly-dialog-h>section.sc-smoothly-dialog>div.header.sc-smoothly-dialog>smoothly-trigger.sc-smoothly-dialog>smoothly-icon.sc-smoothly-dialog{background-color:rgb(var(--smoothly-color));border-radius:50%}.sc-smoothly-dialog-h>section.sc-smoothly-dialog>*.sc-smoothly-dialog>*.sc-smoothly-dialog{margin:10px}`;const Xt=class{constructor(e){t(this,e);this.open=true;this.closable=false}TriggerListener(t){if(d.is(t.detail)&&t.detail.name=="close"){this.open=false}}hostData(){return{style:{display:this.open?"block":"none"}}}__stencil_render(){return o("section",{key:"5bdc10b02671eed7397ae99e872f104cb098d2c0"},o("div",{key:"05bbab31a6d30c2ff0e3ec64ac59c8e56560526c",class:"header"},this.closable&&o("smoothly-trigger",{key:"4f5d1a0d5c87d22d00281fadba0ffacf20c4b8db",fill:"clear",name:"close"},o("smoothly-icon",{key:"2474cba19d732b0d34b02a055379bf1926a8fc4d",name:"close-circle",fill:"solid",color:this.color})),this.header?o("h1",null,this.header):o("slot",{name:"header"})),o("div",{key:"861af5e557c0ef202273cab84877c8806bb2c232",class:"content"},o("slot",{key:"e755042ab3f24972fa2eaac24914649d10dafd0f"})))}render(){return o(s,this.hostData(),this.__stencil_render())}};Xt.style=Jt();const Qt=()=>`.sc-smoothly-dialog-demo-h>smoothly-button.sc-smoothly-dialog-demo{display:block;margin-block:2rem}`;const te=class{constructor(e){t(this,e);this.openModal=false;this.openTallModal=false;this.showFrame=false}render(){return o(s,{key:"0d1ca7f9bc049064eb1680cc807bd49bafab0e7e"},o("smoothly-button",{key:"33683c13b2f666aea6d3306056b74b694cb88654",fill:"solid",color:"light",onClick:()=>this.openModal=true},"Open Modal"),o("smoothly-button",{key:"46de03312dfa5a28f164aacd442a7074148d6390",fill:"solid",color:"light",onClick:()=>this.openTallModal=true},"Open Modal with long text and top-aligned."),o("smoothly-button",{key:"ea629cfa5afabb8151f230b4916d9eb13849a4d7",fill:"solid",color:"light",onClick:()=>this.showFrame=!this.showFrame},"Show Frame"),o("smoothly-modal",{key:"45b7313f8539478b1418298a7e086e506b18cf79",closable:true,open:this.openModal,onSmoothlyModalChange:t=>this.openModal=t.detail},o("h2",{key:"005f8f44463bd4f5048582f4d59b8792a02321e4",slot:"header"},"Modal"),o("span",{key:"8bdae975d32f862fe1b2da1b75c1cdd8e0596e19"},"Are you sure you want to confirm this action?"),o("smoothly-button",{key:"7a4fc7fbeb273ddaf66723c022c0408d7d5e6cc0",slot:"actions",color:"success"},"Confirm"),o("smoothly-button",{key:"c41f548b2f249ab1d04d180c6a8745f0be0c3180",slot:"actions",color:"light",fill:"outline",onClick:()=>this.openModal=false},"Cancel")),o("smoothly-modal",{key:"9b8efe1c92dae88afeb60053efcc19c89fcb53f6",closable:true,open:this.openTallModal,onSmoothlyModalChange:t=>this.openTallModal=t.detail,align:"top"},o("h2",{key:"0c7b0382250669ac142152a49f24214180b75c11",slot:"header"},"Modal"),o("smoothly-summary",{key:"ccb69953bda0af96ba9e6679d0492770e1face22"},o("div",{key:"95d44ba81eec2106d470f4f84c0857aab8f9b6c5",slot:"summary"},"Lorem ipsum"),o("div",{key:"73a8c397c891af87ebb019bdb3ace838ab40ee24",slot:"content"},Array.from({length:10}).map((()=>o("p",null,"Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum."))))),o("smoothly-button",{key:"61c0e81f6b49ff91d58cc3536c516e25afe9ee71",slot:"actions",color:"light",fill:"outline",onClick:()=>this.openTallModal=false},"Cancel")),this.showFrame&&o("smoothly-dialog",{key:"c0315ea0fbf1a253fe4fbc7aa9e01f7b21e49293",closable:true},o("smoothly-frame",{key:"1469ba8f2d229d42329627b12e2a4bd4028a2273",url:"https://www.wikipedia.org/",name:"parent",style:{height:"80vh"}})))}};te.style=Qt();function ee(t,e,o){let s=0;while(o.exec(t)!=null){s=o.lastIndex;if(o.lastIndex>e)break}o.lastIndex<=e&&(s=t.length);return s}function oe(t,e,o){let s=0;let a;while((a=o.exec(t))!=null){if(o.lastIndex-a[0].length<e)s=o.lastIndex-a[0].length;else break}return s}function se(t,e,o){const s=/([\wåäöüéáúíóßðœøæñµçþ_]+|[@-]+)/gi;return o=="backward"?oe(t,e,s):ee(t,e,s)}var ae;(function(t){function e(t){return t.direction=="backward"?t.start:t.end}t.getCursor=e;function o(t){return t.direction!="backward"?t.start:t.end}t.getStalker=o})(ae||(ae={}));var ie;(function(t){function e(t){return{value:t.value,selection:{start:t.selection.start,end:t.selection.end,direction:t.selection.direction},remainder:t.remainder}}t.copy=e})(ie||(ie={}));class le{value;selection;constructor(t){this.value=t.value;this.selection={start:t.selection?.start,end:t.selection?.end,direction:t.selection?.direction}}get(t,e=1){return this.value.substring(t,t+e)}is(t,...e){const o=this.get(t);return e.some((t=>o==t))}isDigit(t){const e=this.get(t);return e>="0"&&e<="9"}match(t){return this.value.match(t)}replace(t,e,o){let s;if(typeof t=="string"&&typeof e=="string"){let o;s=this;while((o=s.value.indexOf(t))>-1)s=s.replace(o,o+t.length,e)}else if(typeof t=="number"&&typeof e=="number"){const a={value:this.value,selection:{start:this.selection.start,end:this.selection.end,direction:this.selection.direction}};if(!o)o="";a.value=this.value.slice(0,t)+o+this.value.slice(e,this.value.length);if(this.selection.start>=e)a.selection.start=this.selection.start+o.length-e+t;else if(this.selection.start>t&&this.selection.start<e)a.selection.start=Math.min(this.selection.start,t+o.length);if(this.selection.end>=e)a.selection.end=this.selection.end+o.length-e+t;else if(this.selection.end>t&&this.selection.end<e)a.selection.end=Math.min(this.selection.end,t+o.length);s=new le(a)}return s||this}insert(t,e){return this.replace(t,t,e)}append(t){return this.insert(this.value.length,t)}prepend(t){return this.insert(0,t)}suffix(t){return new le({value:this.value+t,selection:this.selection})}delete(t,e){let o;if(!this.value)o=this;else if(typeof t=="string"){let e;o=this;while(t&&(e=o.value.indexOf(t))>-1)o=o.delete(e,e+t.length)}else o=this.replace(t,e||t+1,"");return o}truncate(t){return this.value.length>=t?this.delete(t,this.value.length):this}pad(t,e,o){let s=this;while(t>s.value.length+e.length)s=s.insert(o,e);if(t>s.value.length)s=s.insert(o,e.substring(0,t-s.value.length));return s}padEnd(t,e){return this.pad(t,e,this.value.length)}padStart(t,e){return this.pad(t,e,0)}toLower(){return this.map((t=>t.toLowerCase()))}toUpper(){return this.map((t=>t.toUpperCase()))}map(t){let e=this;let o=0;for(let s=0;s<this.value.length;s++){const a=t(this.get(s),s);e=e.replace(o,o+1,a);o+=a.length}return e}static copy(t){return new le({...t})}static create(){return new le({value:"",selection:{start:0,end:0}})}static modify(t){return new le(typeof t=="string"?{value:t,selection:{start:t.length,end:t.length}}:t)}}var ne;(function(t){function e(t,e,o){let c=ie.copy(t.unformat(le.copy(e)));if(e.autocomplete=="cc-exp"&&/^\d\d \/$/g.test(e.value))o?.key&&(o.key="Backspace");if(o){if(o.ctrlKey||o.metaKey){if(o.key=="a")l(c,0,c.value.length,"forward");else if(["ArrowLeft","ArrowRight"].includes(o.key)&&e?.type!="password")c=s(t,e,o);else if(["Delete","Backspace"].includes(o.key)&&e?.type!="password")c=a(t,e,o)}else if(["ArrowLeft","ArrowRight","Home","End"].includes(o.key))i(c,o);else if(["Delete","Backspace"].includes(o.key)){c.selection.start==c.selection.end&&l(c,c.selection.start+(o.key=="Backspace"?-1:0),c.selection.end+(o.key=="Delete"?1:0));n(c)}else if(o.key!="Unidentified"){n(c);t.allowed(o.key,c)&&r(c,o.key)}}return t.format(le.copy(c))}t.apply=e;function o(t,e,o){const s=ie.copy(t.unformat(le.copy(e)));r(s,o);return t.format(le.copy(s))}t.paste=o;function s(t,e,o){let s=ae.getCursor(e.selection);let a=ae.getStalker(e.selection);s=se(e.value,s,o.key=="ArrowLeft"?"backward":"forward");a=o.shiftKey?a:s;return ie.copy(t.unformat(le.copy({...e,selection:{start:Math.min(a,s),end:Math.max(a,s),direction:a<s?"forward":a>s?"backward":"none"}})))}function a(t,e,o){const s=ae.getCursor(e.selection);const a=se(e.value,s,o.key=="Backspace"?"backward":"forward");const i=ie.copy(t.unformat(le.copy({...e,selection:{start:Math.min(s,a),end:Math.max(s,a),direction:"none"}})));i.value=i.value.substring(0,i.selection.start)+i.value.substring(i.selection.end);i.selection.end=i.selection.start;return i}function i(t,e){let o=ae.getCursor(t.selection);let s=ae.getStalker(t.selection);o=e.key=="Home"?0:e.key=="End"?t.value.length:t.selection.start==t.selection.end||e.shiftKey?Math.min(Math.max(o+(e.key=="ArrowLeft"?-1:1),0),t.value.length):e.key=="ArrowLeft"?t.selection.start:t.selection.end;s=e.shiftKey?s:o;t.selection.direction=s<o?"forward":s>o?"backward":"none";t.selection.start=Math.min(s,o);t.selection.end=Math.max(s,o)}function l(t,e,o,s){t.selection.start=e;t.selection.end=o;s&&(t.selection.direction=s)}function n(t){r(t,"")}function r(t,e){t.value=t.value.substring(0,t.selection.start)+e+t.value.substring(t.selection.end);t.selection.start=t.selection.start+e.length;t.selection.end=t.selection.start}})(ne||(ne={}));const re={};function ce(t,e){re[t]=e}function he(t,...e){const o=re[t];return o&&o(e)}function de(t,e,...o){const s=he(e,...o);return s?s.format(le.modify(s.toString(typeof t=="string"?me(t,e,o):t))).value:""}function me(t,e,...o){const s=he(e,o);return s?s.fromString(s.unformat(le.modify(t)).value):undefined}let ye=class t{toString(t){return typeof t=="string"?t:""}fromString(t){return typeof t=="string"&&!!t?t:undefined}partialFormat=this.format;format(t){return{...t,type:"text",inputmode:"numeric",autocomplete:"cc-csc",length:[3,3],pattern:/^\d{3}$/}}unformat(t){return t}allowed(t,e){return e.value.length<3&&t>="0"&&t<="9"}};ce("card-csc",(()=>new ye));let be=class t{toString(t){return Array.isArray(t)&&t.length==2&&typeof t[0]=="number"&&typeof t[1]=="number"?t[0].toString().padStart(2,"0")+t[1].toString().padStart(2,"0"):""}fromString(t){return typeof t=="string"&&t.length==4?[Number.parseInt(t.slice(0,2)),Number.parseInt(t.slice(2))]:undefined}partialFormat=this.format;format(t){let e=t;if(t.value.length>0&&!t.is(0,"0","1"))e=e.prepend("0");if(e.value.length>1)e=e.insert(2," / ");return{...e,type:"text",inputmode:"numeric",autocomplete:"cc-exp",length:[7,7],pattern:/^(0[1-9]|1[012]) \/ \d\d$/}}unformat(t){return t.delete(" / ")}allowed(t,e){return e.value.length<4&&t>="0"&&t<="9"}};ce("card-expires",(()=>new be));let ue=class t{toString(t){return typeof t=="string"?t:""}fromString(t){return typeof t=="string"&&!!t?t:undefined}partialFormat=this.format;format(t){const e=pe(t.value);const o=t.map(((t,o)=>(o+1<e.length[0]&&e.spaceIndexes.includes(o)?" ":"")+t));return{...o,type:"text",inputmode:"numeric",autocomplete:"cc-number",length:e.length.slice(1),pattern:e.verification,classes:["issuer-"+e.icon]}}unformat(t){return t.delete(" ")}allowed(t,e){const o=pe(e.value);return t>="0"&&t<="9"&&e.value.length<o.length[0]}};ce("card-number",(()=>new ue));function pe(t){let e={...fe,spaceIndexes:t.length==14?[4,10]:fe.spaceIndexes};for(const o in ge)if(Object.prototype.hasOwnProperty.call(ge,o)&&ge[o].identification.test(t)){e={...fe,name:o,...ge[o]};break}return e}const fe={name:"unknown",verification:/^\d{19}$/,spaceIndexes:[4,8,12],identification:/^\d/,length:[16,16,19],icon:"generic"};const ge={amex:{verification:/^3[47][0-9]{2}\s[0-9]{4}\s[0-9]{4}\s[0-9]{3}$/,identification:/^3[47]/,length:[15,18,18],icon:"amex"},dankort:{verification:/^(5019)\s[0-9]{4}\s[0-9]{4}\s[0-9]{4}$/,spaceIndexes:[4,8,12],identification:/^(5019)\d+/,length:[16,19,19],icon:"generic"},diners:{verification:/^3(?:0[0-5]|[68][0-9])[0-9]\s[0-9]{6}\s[0-9]{4}$/,identification:/^3(?:0[0-5]|[68][0-9])/,spaceIndexes:[4,10],length:[14,16,16],icon:"diners"},discover:{verification:/^6(?:011|5[0-9]{2})\s[0-9]{4}\s[0-9]{4}\s[0-9]{4}$/,spaceIndexes:[4,8,12],identification:/^6(?:011|5[0-9]{2})/,length:[16,19,19],icon:"generic"},electron:{verification:/^((4026|4405|4508|4844|4913|4917)\s[0-9]{4}\s[0-9]{4}\s[0-9]{4})|((4175)\s(00)[0-9]{2}\s[0-9]{4}\s[0-9]{4})$/,identification:/^(4026|417500|4405|4508|4844|4913|4917)/,spaceIndexes:[4,8,12],length:[16,19,19],icon:"generic"},interpayment:{verification:/^(636)[0-9]\s[0-9]{4}\s[0-9]{4}\s[0-9]{4}$/,spaceIndexes:[4,8,12],identification:/^(636)/,length:[16,19,19],icon:"generic"},jcb:{verification:/^((?:2131|1800)\s[0-9]{4}\s[0-9]{4}\s[0-9]{4})|(35[0-9]{2}\s[0-9]{4}\s[0-9]{4}\s[0-9]{4})$/,identification:/^(?:2131|1800|35\d{3})/,spaceIndexes:[4,8,12],length:[16,19,19],icon:"generic"},unionpay:{verification:/^(62|88)[0-9]{2}\s[0-9]{4}\s[0-9]{4}\s[0-9]{4}$/,spaceIndexes:[4,8,12],identification:/^(62|88)/,length:[16,19,19],icon:"generic"},maestro:{verification:/^(5018|5020|5038|5612|5893|6304|6759|6761|6762|6763|0604|6390)\s[0-9]{4}\s[0-9]{4}\s[0-9]{4}$/,spaceIndexes:[4,8,12],identification:/^(5018|5020|5038|5612|5893|6304|6759|6761|6762|6763|0604|6390)/,length:[16,19,19],icon:"maestro"},mastercard:{verification:/^5[1-5][0-9]{2}\s[0-9]{4}\s[0-9]{4}\s[0-9]{4}$/,spaceIndexes:[4,8,12],identification:/^5[1-5][0-9]/,length:[16,19,19],icon:"mastercard"},visa:{verification:/^4[0-9]{3}\s[0-9]{4}\s[0-9]{4}\s[0-9](?:[0-9]{3})?$/,spaceIndexes:[4,8,12],identification:/^4[0-9]/,length:[16,16,19],icon:"visa"}};var ke;(function(t){function e(t){let e;switch(t){case"sq-AL":case"es-AR":case"it-IT":case"en-GB":case"fr-FR":e="dd/mm/YYYY";break;case"en-US":e="mm/dd/YYYY";break;case"et-EE":case"de-AT":case"de-DE":case"he-IL":case"is-IS":case"lv-LV":case"pl-PL":case"ru-RU":case"fi-FI":e="dd.mm.YYYY";break;case"hi-IN":case"en-IN":e="dd-mm-YYYY";break;default:e="YYYY-mm-dd";break}return e}t.fromLocale=e;function o(t){let e;switch(t){case"dd/mm/YYYY":e="en-GB";break;case"mm/dd/YYYY":e="en-US";break;case"dd.mm.YYYY":e="de-DE";break;default:e="sv-SE";break}return e}t.toLocale=o;function s(t){return typeof t=="string"&&(t=="YYYY-mm-dd"||t=="dd/mm/YYYY"||t=="dd.mm.YYYY"||t=="mm/dd/YYYY")}t.is=s})(ke||(ke={}));class ve{separator;constructor(t){this.separator=t}partialFormat(t){const e=this.format(t);return{...e,remainder:this.formatString.slice(e.value.length)}}unformat(t){return t.delete(this.separator)}validMonth(t,e,o){return new Date(Number.parseInt(o??"2004"),Number.parseInt(e),0).getDate()>=Number.parseInt(t)}}const we={};function xe(t,e){we[t]=e}ce("date",(t=>{const e=t&&t.length>0?t[0]:undefined;const o=ke.is(e)?e:ke.fromLocale(e);const s=we[o]??we["YYYY-mm-dd"];return s()}));let Ce=class t extends ve{constructor(t){super(t)}toString(t){return C.Date.is(t)&&t.length==10?[t.substring(8,10),t.substring(5,7),t.substring(0,4)].join(this.separator):""}fromString(t){const e=t?.length==8?`${t.substring(4,8)}-${t.substring(2,4)}-${t.substring(0,2)}`:undefined;return C.Date.is(e)?e:undefined}formatString=`DD${this.separator}MM${this.separator}YYYY`;format(t){let e=t.delete(this.separator);if(e.get(0,1)>"3")e=e.insert(0,"0");if(e.value.length>1)e=e.insert(2,this.separator);if(e.get(3,1)>"1")e=e.insert(3,"0");if(e.value.length>4)e=e.insert(5,this.separator);return{...e,type:"text",length:[0,10],pattern:new RegExp(["^(0[1-9]|[12][0-9]|3[01])","(0[1-9]|1[012])","\\d{4}$"].join(this.separator))}}allowed(t,e){return e.selection.start==1&&e.value[0]=="3"?t>="0"&&t<="1":e.selection.start==1&&e.value[0]=="0"?t>="1"&&t<="9":e.selection.start==2?t>="0"&&t<="9"&&(t=="0"||t=="1"||this.validMonth(e.value.substring(0,2),t)):e.selection.start==3?t>="0"&&t<="9"&&this.validMonth(e.value.substring(0,2),e.value[2]+t):e.selection.start==7?t>="0"&&t<="9"&&this.validMonth(e.value.substring(0,2),e.value.substring(2,4),e.value.substring(4,7)+t):e.selection.start<8&&t>="0"&&t<="9"}};xe("dd.mm.YYYY",(()=>new Ce(".")));xe("dd/mm/YYYY",(()=>new Ce("/")));xe("dd-mm-YYYY",(()=>new Ce("-")));let Se=class t extends ve{constructor(t){super(t)}toString(t){return C.Date.is(t)&&t.length==10?[t.substring(5,7),t.substring(8,10),t.substring(0,4)].join(this.separator):""}fromString(t){const e=t.length==8?`${t.substring(4,8)}-${t.substring(0,2)}-${t.substring(2,4)}`:undefined;return C.Date.is(e)?e:undefined}formatString=`MM${this.separator}DD${this.separator}YYYY`;format(t){let e=t.delete(this.separator);if(e.get(0,1)>"1")e=e.insert(0,"0");if(e.value.length>1)e=e.insert(2,this.separator);if(e.get(3,1)>(e.get(0,2)=="02"?"2":"3"))e=e.insert(3,"0");if(e.value.length>4)e=e.insert(5,this.separator);return{...e,type:"text",length:[0,10],pattern:new RegExp(["^(0[1-9]|1[012])","(0[1-9]|[12][0-9]|3[01])","\\d{4}$"].join(this.separator))}}allowed(t,e){const o=e.selection.start==1&&e.value[0]=="1"?t>="0"&&t<="2":e.selection.start==1&&e.value[0]=="0"?t>="1"&&t<="9":e.selection.start==3?t>="0"&&t<="9"&&this.validMonth(e.value[2]+t,e.value.substring(0,2)):e.selection.start==7?t>="0"&&t<="9"&&this.validMonth(e.value.substring(2,4),e.value.substring(0,2),e.value.substring(4,7)+t):e.selection.start<8&&t>="0"&&t<="9";return o}};xe("mm/dd/YYYY",(()=>new Se("/")));let ze=class t extends ve{constructor(t){super(t)}toString(t){return typeof t!="string"?"":t}fromString(t){const e=t?.length==8?`${t.substring(0,4)}-${t.substring(4,6)}-${t.substring(6,8)}`:undefined;return C.Date.is(e)?e:undefined}daysInMonth(t){const e=`${t.substring(0,4)}-${t.substring(4,6)}-01`;return C.Date.is(e)?+C.Date.lastOfMonth(`${t.substring(0,4)}-${t.substring(4,6)}-01`).substring(8,10):31}formatString=`YYYY${this.separator}MM${this.separator}DD`;format(t){let e=t.delete(this.separator);if(e.value.length>3){e=e.insert(4,this.separator);if(e.get(5,1)>"1")e=e.insert(5,"0");if(e.value.length>6){e=e.insert(7,this.separator);if(e.get(8,1)>this.daysInMonth(t.value).toString().substring(0,1))e=e.insert(8,"0")}}return{...e,type:"text",length:[0,10],pattern:new RegExp(["^\\d{4}","(0[1-9]|1[012])","(0[1-9]|[12][0-9]|3[01])$"].join(this.separator))}}allowed(t,e){const o=this.daysInMonth(e.value);return e.selection.start==5&&e.value[4]=="0"?t>="1"&&t<="9":e.selection.start==5&&e.value[4]=="1"?t>="0"&&t<="2":e.selection.start==7&&e.value[6]=="0"?t>="1"&&t<="9":e.selection.start==7&&(e.value[6]=="2"&&o<30||e.value[6]=="3")?t>="0"&&t<=o.toString().substring(1):e.selection.start<8&&t>="0"&&t<="9"}};xe("YYYY-mm-dd",(()=>new ze("-")));let Ie=class t{toString(t){return typeof t=="string"?t:""}fromString(t){let e=t.replace(" ","T");const o="0000-01-01T00:00:00.000Z";if(e?.match(/-\d$/))e=e.substring(0,e.length-1)+"0"+e.substring(e.length-1,e.length);e=!e.match(/^\d{4}-(0[1-9]|1[012])/)?undefined:e+o.substring(e.length,o.length);return C.DateTime.is(e)?e:undefined}partialFormat=this.format;format(t){let e=Te(t);if(e.match(/^\d{4}-(0[1-9]|1[012])-(0[1-9]|[12][0-9]|3[01])[\d:.-]$/))e=e.insert(10," ");if(e.match(/^\d{4}-(0[1-9]|1[012])-(0[1-9]|[12][0-9]|3[01]) 3$/))e=e.replace(11,12,"23:");if(e.match(/^\d{4}-(0[1-9]|1[012])-(0[1-9]|[12][0-9]|3[01]) [45]$/))e=e.insert(11,"23:");if(e.match(/^\d{4}-(0[1-9]|1[012])-(0[1-9]|[12][0-9]|3[01]) [6-9]$/))e=e.insert(11,"23:5");if(e.match(/^\d{4}-(0[1-9]|1[012])-(0[1-9]|[12][0-9]|3[01]) 24$/))e=e.replace(10,13,"00:");if(e.match(/^\d{4}-(0[1-9]|1[012])-(0[1-9]|[12][0-9]|3[01]) 25$/))e=e.insert(12,"3:");if(e.match(/^\d{4}-(0[1-9]|1[012])-(0[1-9]|[12][0-9]|3[01]) 2[6-9]$/))e=e.insert(12,"3:5").append(":");if(e.match(/^\d{4}-(0[1-9]|1[012])-(0[1-9]|[12][0-9]|3[01]) ([0-1]\d|2[0-3])\d[\s\S]$/))e=e.insert(13,":");if(e.match(/^\d{4}-(0[1-9]|1[012])-(0[1-9]|[12][0-9]|3[01]) ([0-1]\d|2[0-3]):[6-9]$/))e=e.insert(14,"5");if(e.match(/^\d{4}-(0[1-9]|1[012])-(0[1-9]|[12][0-9]|3[01]) ([0-1]\d|2[0-3]):[0-5]\d\d$/))e=e.insert(16,":");if(e.match(/^\d{4}-(0[1-9]|1[012])-(0[1-9]|[12][0-9]|3[01]) ([0-1]\d|2[0-3]):[0-5]\d:[6-9]$/))e=e.insert(17,"5");return{...e,type:"text",length:[0,19],pattern:/^\d{4}-(0[1-9]|1[012])-(0[1-9]|[12][0-9]|3[01]) ([0-1]\d|2[0-3])(:[0-5]\d){2}$/}}unformat(t){return t}allowed(t,e){return e.value.length<19&&(t>="0"&&t<="9"||t=="-"||t==":"||t=="."||t==" ")}};ce("date-time",(()=>new Ie));function Te(t,e){let o=t;switch(e){case"dd/mm/YYYY":case"dd.mm.YYYY":if(!De(o.value,e))o=o.replace(0,10,De("31"+o.value.substring(2,10),e)?"31"+o.value.substring(2,10):De("30"+o.value.substring(2,10),e)?"30"+o.value.substring(2,10):De("29"+o.value.substring(2,10),e)?"29"+o.value.substring(2,10):De("28"+o.value.substring(2,10),e)?"28"+o.value.substring(2,10):o.value);break;case"mm/dd/YYYY":if(!De(o.value,e))o=o.replace(0,10,De(o.value.substring(0,3)+"31"+o.value.substring(5,10),e)?o.value.substring(0,3)+"31"+o.value.substring(5,10):De(o.value.substring(0,3)+"30"+o.value.substring(5,10),e)?o.value.substring(0,3)+"30"+o.value.substring(5,10):De(o.value.substring(0,3)+"29"+o.value.substring(5,10),e)?o.value.substring(0,3)+"29"+o.value.substring(5,10):De(o.value.substring(0,3)+"28"+o.value.substring(5,10),e)?o.value.substring(0,3)+"28"+o.value.substring(5,10):o.value);break;default:if(t.value.length==10){if(!De(o.value)){o=o.replace(0,10,De(o.value.substring(0,8)+"31")?o.value.substring(0,8)+"31":De(o.value.substring(0,8)+"30")?o.value.substring(0,8)+"30":De(o.value.substring(0,8)+"29")?o.value.substring(0,8)+"29":De(o.value.substring(0,8)+"28")?o.value.substring(0,8)+"28":o.value);break}return t}}return o}function De(t,e){let o;let s;let a;switch(e){case"dd/mm/YYYY":case"dd.mm.YYYY":o=parseInt(t.substring(6,10));s=parseInt(t.substring(3,5));a=parseInt(t.substring(0,2));return o&&s&&a?a>0&&je(o,s)>=a:false;case"mm/dd/YYYY":o=parseInt(t.substring(6,10));s=parseInt(t.substring(0,2));a=parseInt(t.substring(3,5));return o&&s&&a?a>0&&je(o,s)>=a:false;default:o=parseInt(t.substring(0,4));s=parseInt(t.substring(5,7));a=parseInt(t.substring(8,10));return o&&s&&a?a>0&&je(o,s)>=a:false}}function je(t,e){let o;switch(e){case 1:case 3:case 5:case 7:case 8:case 10:case 12:default:o=31;break;case 4:case 6:case 9:case 11:o=30;break;case 2:o=28;break}return o}let Le=class t{toString(t){return Array.isArray(t)&&t.length==2&&typeof t[0]=="number"&&typeof t[1]=="number"?t[0].toString()+" / "+t[1].toString():typeof t=="number"?t.toString():""}fromString(t){return typeof t=="string"&&t.match(/^\d{1,2}\s+\/\s+\d{1,2}$/)?[Number.parseInt(t.slice(0,2)),Number.parseInt(t.slice(t.length-2))]:typeof t=="string"&&t.match(/\d{1,2}/)?Number.parseInt(t):undefined}partialFormat=this.format;format(t){let e=t;if(t.match(/^\d\/$/))e=t.replace(1,2," / ");else if(t.match(/^\d{1,2}\s$/))e=t.replace(t.value.length-1,t.value.length," / ");else if(t.match(/^[\D.]+\/[\D.]+$/))e=t.delete(0,t.value.length);else if(t.match(/^[\D.]+\/[\D.]+\d$/))e=t.delete(0,t.value.length-1);else if(t.match(/^[\D.]+\/[\D.]+\d\d$/))e=t.delete(0,t.value.length-2);else if(t.match(/^[\D.]+\//))e=t.delete(0,t.value.search("/")+1);else if(t.match(/^\d\d\/$/))e=t.replace(2,3," / ");else if(t.match(/^\d\d\s+\/$/))e=t.delete(2,t.value.length);else if(t.match(/^\d\s+\/$/))e=t.delete(1,t.value.length);else if(t.match(/^\d\d\s\s+\/\s*$/))e=t.replace(2,t.value.length," / ");else if(t.match(/^\d\s\s+(\/\s*)?$/))e=t.replace(1,t.value.length," / ");else if(t.match(/^\d\s\/\s\d\d.+$/))e=t.delete(6,t.value.length);else if(t.value.length>1&&t.value.indexOf("/")<1)e=t.insert(2," / ");else if(t.value.length>1&&t.value.split("/").length>2)e=t.delete(t.value.lastIndexOf("/"));else if(t.value.length==1&&!t.isDigit(0))e=t.delete(0);return{...e,type:"text",length:[1,7],pattern:/^(\d{1,2}|\d{1,2} \/ \d{1,2})$/}}unformat(t){return t}allowed(t,e){return e.value.length<7&&(t>="0"&&t<="9"||t=="/"||t==" ")}};ce("divisor",(()=>new Le));let Re=class t{separator=":";patterns={allowed:/^-?\d*(?::{0,1}[0-5]{0,1}[0-9]{0,1}|[.,]{0,1}[0-9]{0,2})$/,extract:/^(-?)(\d*)([:,.]{0,1})([0-9]{0,2})$/,zeros:/^(-?)(0+)(?:[1-9]|0[,.:]?)/};toString(t){let e;if(!C.TimeSpan.is(t))e="";else{const o=C.TimeSpan.normalize(t);if(!o.minutes&&!o.hours)e="";else if(this.separator!=":")e=(+C.TimeSpan.toHours(o).toFixed(2)||"").toString(10);else if(o.hours&&!o.minutes)e=o.hours.toString(10);else if(!o.hours&&o.minutes)e=`${o.minutes<0?"-":""}0:${Math.abs(o.minutes).toString(10)}`;else e=`${o.hours?.toString(10)}:${Math.abs(o.minutes??0).toString(10)}`}return e}fromString(t){let e;const o=t.match(this.patterns.extract);if(!o)e=undefined;else{const[t,s,a,i,l]=o;this.separator=i;if(i==":"){const t={hours:parseInt(a),minutes:parseInt(l)};const o=s?-1:1;e=C.TimeSpan.normalize({hours:!Number.isFinite(t.hours)?0:t.hours*o,minutes:!Number.isFinite(t.minutes)?0:t.minutes*o})}else{const o=parseFloat(t.replace(",","."));e=C.TimeSpan.normalize({hours:!Number.isFinite(o)?0:o})}}return e}partialFormat=this.format;format(t){let e=t;const[,o,s,a]=t.match(this.patterns.extract)??[];if(!s&&a)e=e.insert(o?1:0,"0");const i=e.match(this.patterns.zeros);if(i){const[,t,o]=i;if(o){const s=t?1:0;e=e.delete(s,o.length+s)}}return{...e,type:"tel",pattern:this.patterns.allowed}}unformat(t){const[,,,e]=t.match(this.patterns.extract)??[];if(e)this.separator=e;return t}allowed(t,e){const o=e.value.slice(0,e.selection.start)+t+e.value.slice(e.selection.end);return!!o.match(this.patterns.allowed)}};ce("duration",(()=>new Re));let _e=class t{settings;constructor(t){this.settings=t}toString(t){return typeof t=="string"?t:""}fromString(t){return typeof t=="string"&&!!t?t:undefined}partialFormat=this.format;format(t){return{...t,...this.settings,type:"text",inputmode:"email",autocomplete:"email"}}unformat(t){return t}allowed(t,e){return this.settings.length==undefined||this.settings.length[1]==undefined||e.value.length<this.settings.length[1]}};ce("email",(t=>new _e(t||{})));let Ae=class t{settings;mode;constructor(t,e){this.settings=t;this.mode=e}toString(t){return typeof t=="string"?t:""}fromString(t){return typeof t=="string"&&!!t?t:undefined}split(t){let e;let o="";return t.map(((t,s)=>{const a=s!==0&&t===t.toUpperCase()&&isNaN(+t)&&o!==" "&&this.isSymbolAllowed(t)&&e?" "+t:(t==="_"||t==="-")&&o!==" "?" ":t===" "&&o===" "||!this.isSymbolAllowed(t)||!e&&!this.isSymbolLetter(t)&&this.mode!=="code"?"":t;!e&&(e=this.isSymbolLetter(t));this.isSymbolAllowed(t)&&(o=t);return a})).toLower().delete("-").delete("_")}isSymbolLetter(t){return t>="a"&&t<="z"||t>="A"&&t<="Z"}isSymbolAllowed(t){return this.isSymbolLetter(t)||t>="0"&&t<="9"||t===" "}partialFormat=this.format;format(t){const e=this.split(t);let o;switch(this.mode){case"code":o=e.delete(" ");break;case"pascal":case"camel":let s;o=e.map(((t,e)=>{const o=e===0&&this.mode==="pascal"||s?t.toUpperCase():t.toLowerCase();s=t==" ";return o})).delete(" ");break;case"snake":case"attribute":o=e.replace(" ",this.mode==="snake"?"_":"-");break;default:o=t}return{...o,...this.settings,type:"text",autocomplete:"on"}}unformat(t){return t}allowed(t,e){return this.isSymbolLetter(t)||t>="0"&&t<="9"&&(this.mode=="code"||e.value.length>0)||t=="_"&&this.mode=="snake"&&e.value.length>0||t=="-"&&this.mode=="attribute"&&e.value.length>0}};ce("identifier-code",(t=>new Ae(t||{},"code")));ce("identifier-pascal",(t=>new Ae(t||{},"pascal")));ce("identifier-snake",(t=>new Ae(t||{},"snake")));ce("identifier-camel",(t=>new Ae(t||{},"camel")));ce("identifier-attribute",(t=>new Ae(t||{},"attribute")));let $e=class t{country;constructor(t){this.country=t}toString(t){return typeof t=="string"?t:""}fromString(t){return typeof t=="string"&&!!t?t:undefined}partialFormat=this.format;format(t){let e=t;const o=(new Date).getFullYear().toString();if(t.value.length>1&&t.get(0,2)!="19"&&t.get(0,2)!="20")e=e.prepend(t.get(0,2)>o.substring(2,4)?"19":"20");if(e.value.length>=8)e=e.insert(8,"-");return{...e.truncate(13),type:"text",length:[11,13],pattern:/^\d{6,8}-\d{4}$/}}unformat(t){return t.delete("-")}allowed(t,e){return e.value.length<13&&t>="0"&&t<="9"}};ce("identity-number",(t=>new $e(t&&t.length>0?t[0]:undefined)));let Me=class t{min;max;pad;constructor(t){this.min=t.min;this.max=t.max;this.pad=t.pad}toString(t){return typeof t=="number"?t.toString():""}fromString(t){const e=typeof t=="string"?Number.parseInt(t):undefined;return typeof e=="number"&&!Number.isNaN(e)?e:undefined}partialFormat(t){return{...t,type:"text",inputmode:"numeric",length:[3,undefined],pattern:/^[0-9]+$/}}format(t){const e=this.partialFormat(t);const o=this.fromString(e.value);const s=o==undefined?e.value:this.min!=undefined&&o<this.min?this.toString(this.min):this.max!=undefined&&o>this.max?this.toString(this.max):e.value;return{...e,value:typeof this.pad=="number"&&s?s.padStart(this.pad,"0"):s}}unformat(t){return t}allowed(t,e){return t>="0"&&t<="9"&&(this.max==undefined||this.max.toString().length>e.value.length||e.selection.start!=e.selection.end)}};ce("integer",(t=>new Me(t?.[0]??{})));let Ee=class t{toString(t){return typeof t=="string"?t:""}fromString(t){return typeof t=="string"&&!!t?t:undefined}partialFormat=this.format;format(t){return{...t,type:"password",autocomplete:"current-password"}}unformat(t){return t}allowed(t,e){return true}};ce("password",(()=>new Ee));let Oe=class t{toString(t){let e="";if(typeof t=="number"){const o=t.toString().split(".")[1]?.length??2;e=(t*100).toFixed(!o||o<=1?0:o-2)}return e}fromString(t){const e=typeof t=="string"?Number.parseFloat(t):undefined;return typeof e=="number"&&!Number.isNaN(e)?e/100:undefined}partialFormat=this.format;format(t){return{...t.value?t.suffix(" %"):t,type:"text",inputmode:"numeric",length:[3,undefined],pattern:/^\d+(.\d+)? %+$/}}unformat(t){return t.delete(" %")}allowed(t,e){return t>="0"&&t<="9"||t=="."&&!e.value.includes(".")}};ce("percent",(()=>new Oe));const Pe=[{countryCode:"+46",areaCodes:["011","0120","0121","0122","0123","0125","013","0140","0141","0142","0143","0144","0150","0151","0152","0155","0156","0157","0158","0159","016","0171","0173","0174","0175","0176","018","019","021","0220","0221","0222","0223","0224","0225","0226","0227","023","0240","0241","0243","0246","0247","0248","0250","0251","0253","0258","026","0270","0271","0278","0280","0281","0290","0291","0292","0293","0294","0295","0297","0300","0301","0302","0303","0304","031","0320","0321","0322","0325","033","0340","0345","0346","035","036","0370","0371","0372","0380","0381","0382","0383","0390","0392","0393","040","0410","0411","0413","0414","0415","0416","0417","0418","042","0430","0431","0433","0435","044","0451","0454","0455","0456","0457","0459","046","0470","0471","0472","0474","0476","0477","0478","0479","0480","0481","0485","0486","0490","0491","0492","0493","0494","0495","0496","0498","0499","0500","0501","0502","0503","0504","0505","0506","0510","0511","0512","0513","0514","0515","0520","0521","0522","0523","0524","0525","0526","0528","0530","0531","0532","0533","0534","054","0550","0551","0552","0553","0554","0555","0560","0563","0564","0565","0570","0571","0573","0580","0581","0582","0583","0584","0585","0586","0587","0589","0590","0591","060","0611","0612","0613","0620","0621","0622","0623","0624","063","0640","0642","0643","0644","0645","0647","0650","0651","0652","0653","0657","0660","0661","0662","0663","0670","0671","0672","0680","0682","0684","0687","0690","0691","0692","0693","0695","0696","08","090","0910","0911","0912","0913","0914","0915","0916","0918","0920","0921","0922","0923","0924","0925","0926","0927","0928","0929","0930","0932","0933","0934","0935","0940","0941","0942","0943","0950","0951","0952","0953","0954","0960","0961","0970","0971","0973","0975","0976","0977","0978","0980","0981","010","020","0378","070","072","073","076","079","0710","0740","0746","0749","0741","0742","0743","0744","0745","0747","075","077","078","0900","0939","0944","0969","099"]}];let He=class t{toString(t){return typeof t=="string"?t:""}fromString(t){return typeof t=="string"&&!!t?t:undefined}partialFormat=this.format;format(t){let e=t;if(e.value.startsWith("+")){for(const t of Pe)if(e.value.startsWith(t.countryCode))for(let o of t.areaCodes){o=o.substring(1);if(e.value.startsWith(t.countryCode+o)&&!e.value.includes("-"))e=e.insert(t.countryCode.length,"-").insert(t.countryCode.length+1+o.length,"-")}}else{const t=Pe[0];for(const o of t.areaCodes)if(e.value.startsWith(o)&&!e.value.includes("-")){e=e.insert(o.length,"-");e=e.delete(0);e=e.insert(0,"-").insert(0,t.countryCode)}}if(e.value.includes("-")){const t=e.value.indexOf("-",e.value.indexOf("-")+1)+1;const o=e.value.substring(t,e.value.length+1).length;switch(o){case 4:e=e.insert(t+2," ");break;case 5:e=e.insert(t+3," ");break;case 6:e=e.insert(t+2," ");e=e.insert(t+5," ");break;case 7:e=e.insert(t+3," ");e=e.insert(t+6," ");break;case 8:case 9:e=e.insert(t+3," ");e=e.insert(t+7," ");break}if(o>9){const s=Math.ceil(o/3)-1;if(s>0){for(let o=0;o<s;o++){const s=o*3+3+o;e=e.insert(s+t," ")}}}}return{...e,type:"tel",autocomplete:"tel"}}unformat(t){return t.delete(" ").delete("-")}allowed(t,e){return t>="0"&&t<="9"||e.selection.start==0&&t=="+"&&!e.value.includes("+")}};ce("phone",(()=>new He));let Fe=class t{country;constructor(t){this.country=t}toString(t){return typeof t=="string"?t:""}fromString(t){return typeof t=="string"&&!!t?t:undefined}partialFormat=this.format;format(t){const e=!t.value.includes(" ")&&t.value.length>=4?t.insert(3," "):t;return{...e.truncate(6),type:"text",autocomplete:"postal-code",length:[6,6],pattern:/^\d{3} \d{2}$/}}unformat(t){return t.delete(" ")}allowed(t,e){return e.value.length<=5&&t>="0"&&t<="9"}};ce("postal-code",(t=>new Fe(t&&t.length>0?t[0]:undefined)));let Ue=class t{currency;toInteger;constructor(t){this.currency=t&&typeof t=="object"?t.currency:t;this.toInteger=t&&typeof t=="object"?t.toInteger:undefined}toString(t){return typeof t=="number"?isNaN(t)?"":t.toString():""}fromString(t){const e=typeof t=="string"?Number.parseFloat(t):undefined;return e!=undefined&&!isNaN(e)?e:undefined}partialFormat(t){let e=t.value=="NaN"?t.replace(0,t.value.length,""):le.copy(t);const o=this.currency&&C.Currency.decimalDigits(this.currency);e=this.addLeadingIntegerZero(e);e=this.fillDecimalsIfPresent(e,o,"onlyLimit");e=this.truncateIntegerZeros(e);e=this.addThousandSeparators(e);return{...e,remainder:this.format(t).value.slice(e.value.length),type:"text",inputmode:"numeric",length:[3,undefined],pattern:new RegExp("^(\\d{0,3})( \\d{3})*(\\.\\d*)?$")}}format(t){let e=t.value=="NaN"?t.replace(0,t.value.length,""):le.copy(t);const o=this.currency&&C.Currency.decimalDigits(this.currency);if(!this.toInteger)e=this.forceDecimalZero(e,o);e=this.addLeadingIntegerZero(e);e=this.fillDecimalsIfPresent(e,o,"fillAndLimit");e=this.truncateIntegerZeros(e);e=this.addThousandSeparators(e);e=this.appendCurrency(e);return{...e,type:"text",inputmode:"numeric",length:[3,undefined],pattern:new RegExp("^(\\d{0,3})( \\d{3})*(\\.\\d+)?"+(this.currency?" "+this.currency:"")+"$")}}forceDecimalZero(t,e){if(!t.value.includes(".")&&e&&(Math.abs(Number.parseFloat(t.value))>=0||t.value=="0"))t=t.suffix(".0");return t}addLeadingIntegerZero(t){const e=t.value&&t.value.includes(".")?t.value.indexOf("."):undefined;if(e==0)t=t.prepend("0");return t}fillDecimalsIfPresent(t,e,o){const s=t.value.indexOf(".");if(s!=-1){const a=s+1+(e??2)-t.value.length;t=a<0?t.truncate(t.value.length+a):o=="fillAndLimit"?t.suffix("0".repeat(a)):t}return t}truncateIntegerZeros(t){const e=t.match(/^[0\s]{2,}/);if(e)t=t.replace(0,e[0].length,"0");return t}addThousandSeparators(t){let e=t.value.includes(".")?t.value.indexOf("."):t.value.length;const o=e<=0?0:Math.ceil(e/3)-1;for(let s=0;s<o;s++){const a=e-(o-s)*3;t=t.insert(a," ");e++}return t}appendCurrency(t){return this.currency&&(t.value.length>1||t.value.length==1&&t.value.charAt(0)!=".")?t.suffix(" "+this.currency):t}unformat(t){return this.currency?t.delete(" ").delete(""+this.currency):t.delete(" ")}allowed(t,e){return t>="0"&&t<="9"||t=="."&&!e.value.includes(".")&&(!this.currency||C.Currency.decimalDigits(this.currency)!=0)}};ce("price",(t=>new Ue(t&&t.length>0?t[0]:undefined)));let Ne=class t{settings;constructor(t){this.settings=t}toString(t){return typeof t=="string"?t:""}fromString(t){return typeof t=="string"&&!!t?t:undefined}partialFormat=this.format;format(t){return{...t,type:"text",...this.settings}}unformat(t){return t}allowed(t,e){return this.settings.length==undefined||this.settings.length[1]==undefined||e.value.length<this.settings.length[1]}};ce("text",(t=>new Ne(t||{})));class Ye{toString(t){return typeof t=="string"?"#"+t:""}fromString(t){return t?"#"+t:undefined}partialFormat=this.format;format(t){const e=t.delete("#");return{...e.value?e.prepend("#"):e,type:"text",length:[4,7],pattern:/^#([0-9a-f]{3}|[0-9a-f]{6})$/i}}unformat(t){return t.delete("#")}allowed(t,e){return(t>="0"&&t<="9"||t>="a"&&t<="f"||t>="A"&&t<="F")&&e.value.length<6}}ce("hex-color",(()=>new Ye));const We=()=>`.sc-smoothly-display-h{display:block;white-space:wrap}[hidden].sc-smoothly-display-h{display:none}.sc-smoothly-display-h>div.sc-smoothly-display{opacity:0.6;font-size:.8rem}`;const Be=class{constructor(e){t(this,e)}render(){var t,e;let s;const a=this.type;switch(a){case"json":s=o("smoothly-display-json",{key:"fd641ce179a967152448d7c489ad96dd5ea6cc4e",value:this.value,collapseDepth:this.collapseDepth});break;default:s=de(this.value,a);break;case"email":s=o("a",{key:"d32e3545f5b4e43e0b8f383ba0ef7274472f4d41",href:"mailto:"+this.value},de(this.value,a));break;case"phone":s=o("a",{key:"3b6156fba727f342215fc2510e497bf24e21fa9b",href:"tel:"+this.value},de(this.value,a,this.country));break;case"postal-code":s=de(this.value,a,this.country);break;case"price":s=de(this.value,a,{currency:this.currency,toInteger:this.toInteger});break;case"date":s=(t=he(this.type,T()))===null||t===void 0?void 0:t.toString(this.value);break;case"duration":s=de(this.value,a)||"0";break;case"date-time":s=this.format?C.DateTime.localize(this.value,this.format,T()):(e=he(this.type,T()))===null||e===void 0?void 0:e.toString(this.value);break}return this.label?[o("div",null,this.label),s]:s}};Be.style=We();const Ve=class{constructor(o){t(this,o);this.notice=e(this,"notice")}noticeWarning(t){console.log("emit",t);this.notice.emit(t)}render(){return[o("main",{key:"570a8cf525b8d883f2c226fd9d1f24ef9d2a7bac"},o("fieldset",{key:"9daf4d2a5ff6c3924c09186d0b73c8dc11ef2354"},o("h2",{key:"01bf90a47c56197346494bbc1992edf5ab9d8b2e"},"Smoothly display"),o("dl",{key:"dd5fbdf6e596430cb0a18482b50a8d3ef46cc2d9"},o("dt",{key:"e97f6d69f565560e54956acc47c61e676db32b26"},"Duration"),o("dd",{key:"b3ec7065ba3cb6e1832cf22f329964bc3a983d09"},o("div",{key:"db46dbf07917dd784f0939803fcb97f80d4ab0a7"},o("div",{key:"eda3a232df465a291734a9e1e607f779727928a2"},o("smoothly-display",{key:"894097c909f8c1b0dd276696db72daadf3365aee",style:{display:"inline"},type:"duration",value:{hours:13,minutes:100}})," h"),o("div",{key:"0f258be9133609201671eb993a290b2be1ee8d2b"},o("smoothly-display",{key:"d98834b9c367bbb650e8e933be3ee20b93df8082",style:{display:"inline"},type:"duration",value:{hours:8}})," h"),o("div",{key:"2dc0241b935f3d45f812fe0175731954c8e0b983"},o("smoothly-display",{key:"cc4c171af5aa79cf5487a8a131430bacc5248c98",style:{display:"inline"},type:"duration",value:{minutes:3}})," h"),o("div",{key:"19ff8935bb3454d538b0312530d32ff63dfb3034"},o("smoothly-display",{key:"e3c7ba72956c3735bc646773cf30eb78c2c4e75b",style:{display:"inline"},type:"duration",value:{hours:-13,minutes:100}})," h"),o("div",{key:"40d13934f818da8df03dd4215b5176cdf0089c20"},o("smoothly-display",{key:"f03306bc6cbd65f3ee50ce6fb57c66b2af229a83",style:{display:"inline"},type:"duration",value:{hours:-8}})," h"),o("div",{key:"f0d127f6a00ed1c06eb36fdfa1b809354cb139ba"},o("smoothly-display",{key:"85ea4fa490947ec5bf9810fc5e5677550b507f7b",style:{display:"inline"},type:"duration",value:{}})," h"),o("div",{key:"f60948619c1fcbad63e4af03f282ff3366f1ba76"},o("smoothly-display",{key:"846841ac1b7cd206a2a95034db25a3059dccf890",style:{display:"inline"},type:"duration",value:{minutes:-3}})," h"))),o("dt",{key:"3db393fff9fd7740683746088e884d83ac51e1e8"},"text"),o("dd",{key:"2bd200acca8afd5cf72dd94294e4438e811ac411"},o("smoothly-display",{key:"aa88f3c9ed96edff41c91b4ed2206a04c90ed6f4",type:"text",value:"text"})),o("dt",{key:"81e183489b4fb749823c25b2a50ced9621aa432e"},"postal code"),o("dd",{key:"390dd9916fcf42cb15a48727082a27550e46814a"},o("smoothly-display",{key:"7e80d1d0b8746596448ca50c356e4afbe7d6f276",type:"postal-code",value:"752 31"})),o("dt",{key:"c0d0dc8205d93cb8479713bdae1208e2847e477a"},"password"),o("dd",{key:"0ea85f4699579f4b24f35f59775d7dec43978e5e"},o("smoothly-display",{key:"9779849ced3842513a5c7d5d37cd20bf1f01f244",type:"password",value:"password"})),o("dt",{key:"5143b3ae0e39eb416c344a98b45974c2ad480eef"},"email"),o("dd",{key:"8c25c7f73f1f4ec38cea3d7c520dc037df7b2224"},o("smoothly-display",{key:"53a354324dea186db81a5b59bf75e222db33e56d",type:"email",value:"test@example.com"})),o("dt",{key:"469bd6001f5ad150ea815bb6e89a29eda53b5b77"},"price"),o("dd",{key:"cde7a755ca3ff50a5b0cea8eb4a1dae6aa5b253b"},o("smoothly-display",{key:"bb68a44ffd892b48277aa20a95f5e863680b4fa3",type:"price",value:"13.37",currency:"SEK"})),o("dt",{key:"aff590f97d41ab80c38e7ecaba3e8023fd8ea734"},"price without decimals"),o("dd",{key:"39a40abdaae41f74fa5e52be77cbe1045965e1dc"},o("smoothly-display",{key:"1c653914e801725457fb55bb1b70ed56d991dabb",type:"price",value:200,currency:"SEK",toInteger:true})),o("dt",{key:"be366012d28535a04fa54216d29fa7835bdd789b"},"price with decimals if they are set, otherwise no decimal"),o("dd",{key:"f40b67c170fec282518c59179189b4f262a12804"},o("smoothly-display",{key:"52ba5c8026d562f40ac62cd14fe1cf67b5d0c641",type:"price",value:200.2,currency:"SEK",toInteger:true})),o("dt",{key:"cc1048ee5cb4ef42c4396009ccb085e7ce8c3eca"},"price with decimals"),o("dd",{key:"4814a19946eb610096f1aa76236971ca4e7d52f6"},o("smoothly-display",{key:"cb4cbda427c7a488bbba0c978d91a80683b9d8cb",type:"price",value:200.2,currency:"SEK"})),o("dt",{key:"deb381d3caec587043c0f58a58d06406f215f3e5"},"percent"),o("dd",{key:"afbe0bc5aa167605f50ec765a999432856019082"},o("smoothly-display",{key:"ffb1aee2a313b9f6ab71d42ed937619423095293",type:"percent",value:"42"})),o("dt",{key:"381bc0bb2857f9cc3b0e1b9e2cd439e35106f24b"},"phone"),o("dd",{key:"96c9e0fb69de5004ba8666939b932f42db444db6"},o("smoothly-display",{key:"a242f3011ff04f9f02791b40bc0c042d9b95e087",type:"phone",value:"0101881108"})),o("dt",{key:"ddf64889ff408a199d11b734ee2d41f15c619ace"},"card number"),o("dd",{key:"a6d6b94ab7b1c53b35622fb1e063b1293a637cf6"},o("smoothly-display",{key:"8dbdba91c26bd0f1b4f923f76589b08f5c032f65",type:"card-number",value:"4111111111111111"})),o("dt",{key:"ef7ef814a8cf29fec2f974efd32f040c3d725cc7"},"card expires"),o("dd",{key:"84321e803af55ddd5469ef3068fd2eb8d946420b"},o("smoothly-display",{key:"20651476830684d2a40e911a40fc00fe7f1ffe7e",type:"card-expires",value:"7/22"})),o("dt",{key:"7aef10fd17c205805fe7f5e790d12c2b89247a77"},"card csc"),o("dd",{key:"00eca296571bf49a6c338c13a939d6f3155d4a08"},o("smoothly-display",{key:"c18662e291199765f4278d54e595588bfc3d6f1e",type:"card-csc",value:"987"})),o("dt",{key:"e92d089a639a1e3357a6d39d2e499fff6bd7c2d1"},"date"),o("dd",{key:"f3cc2aabdec6942c8eadc2278b7a42adae09168d"},o("smoothly-display",{key:"fcd502f245a1c814faa093d82bb101182b3dafcd",type:"date",value:"2022-07-07"})),o("dt",{key:"81b8cbdb349df1bd1e1f84cc4bd006d7f2549c19"},"date time"),o("dd",{key:"eb5a64ea635751c62366292ce0ca23d125ad17ee"},o("smoothly-display",{key:"039d66c0457be7e82b999a9e4c0672deee8fbe90",type:"date-time",format:{year:"numeric",month:"short",day:"numeric",hour:"numeric",minute:"numeric",second:"numeric"},value:"2022-07-07T02:02:02Z"})),o("dd",{key:"456d8713e2e366e0efd48c4b0eca946a780bcd93"},o("smoothly-display",{key:"a6ea10ff87584dc5ce0146d6547b0948bb625e2e",type:"date-time",format:{year:"2-digit",month:"long",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit"},value:"2022-07-07T02:02:02Z"})),o("dd",{key:"0fc3da083c35e907cb4c48645ecc7a3e4a4455d7"},o("smoothly-display",{key:"49485eb182ac66fb8f9940d3719c4059c3897dc4",type:"date-time",format:{year:"numeric",month:"2-digit",day:"2-digit",hour:"numeric",minute:"numeric",second:"numeric"},value:"2022-07-07T12:22:24Z"})),o("dd",{key:"40a262a2fc34177b63b7e2969b3b59a5de602861"},o("smoothly-display",{key:"b7f00e769f842ed9ea6a630058cd01768ec2c0ac",type:"date-time",format:{year:"numeric",month:"numeric",day:"numeric",hour:"numeric",minute:"numeric",second:"numeric"},value:"2022-07-07T12:22:24Z"})),o("dd",{key:"4a3173f9713aaa4371ab13ebd8577cd7a7935c95"},o("smoothly-display",{key:"05904422b25f61dfc9f4325a4bb51b3d39a9aabf",type:"date-time",format:{year:"numeric",month:"short",day:"numeric"},value:"2022-07-07T00:00+02:00"})),o("dd",{key:"59783d4201fcf777c5e3635ad53934644eb68310"},o("smoothly-display",{key:"58450e26b3eeab44be1c083f7f1320976dadf783",type:"date-time",format:{year:"2-digit",month:"numeric",day:"numeric"},value:"2022-07-07T00:00+02:00"})),o("dd",{key:"0beada1376af2c6652c3dad47b08c1b1699b24bb"},o("smoothly-display",{key:"9d1b738dd535da8a7e07b959b4e581cf0f2b93d1",type:"date-time",format:{year:"2-digit",month:"numeric",day:"numeric",hour:"2-digit",minute:"2-digit",second:"2-digit",timeZone:"Europe/Stockholm"},value:"2022-07-07T12:15Z"})),o("dt",{key:"6d2aac61ed9fad093c2f19c2ec4d4de32b12e9a0"},"Display JSON"),o("dd",{key:"2215884fa898511c90acf6997f8e20aea4c0ea0d"},o("smoothly-display-demo-json",{key:"85cecf5eeaa416c9baca4a7876e348b54a09dbcb"})))),o("h2",{key:"56ae1be90a6bf9a152118dab9fec7d04b2a9b8e4"},"With labels"),o("dd",{key:"4689634be5c50bafa97e8a08baee4b85b0a621ec"},o("smoothly-display",{key:"14067ba1153408f0d11b02a76c5685b2c1f4a374",label:"Today",type:"date",value:C.Date.now()}),o("smoothly-display",{key:"4ba2105f9b3e139fac91bab03b9640766a18814a",label:"Total amount",type:"price",currency:"SEK",value:6789}),o("smoothly-display",{key:"138eb84408cb4efbc29f43ed1e3f9f71539dfac8",label:"Total amount",type:"price",currency:"GBP",value:678.9}),o("smoothly-display",{key:"2bddcb3e8ec54e29fc53a8ff4213cd157b34c8f1",label:"Logs",type:"json",value:[{type:"trace",message:"Hello"},{type:"error",message:"Oh no!"}]})),o("fieldset",{key:"830ecceb2f6904425d60f24ab37e046e4d147b04"},o("h2",{key:"dbab367e69309f7c29a3d025d585afbb2fa88965"},"Test of different kinds of notifier"),o("button",{key:"187872d0e82b1389961e3d41a0998a0814f5e086",onClick:()=>this.noticeWarning(S.warn("This is a test warning notice."))},"warning"),o("button",{key:"3f2ee3e8052834171ee2878dc3dcbd58d0fa6ed5",onClick:()=>this.noticeWarning(S.succeeded("This is a test success notice."))},"success"),o("button",{key:"678349d8e5f0ba8b237ef1f2cd7c2b2d04aafe14",onClick:()=>this.noticeWarning(S.failed("This is a test danger notice."))},"danger"),o("button",{key:"06792c0fd16258c1a306a902c77e3600bcae0872",onClick:()=>this.noticeWarning(S.execute("This is a test execute notice.",(()=>new Promise((t=>window.setTimeout((()=>t([true,"This went great"])),3e3))))))},"execute"),o("button",{key:"91ffa7d831eefbdce57ea2732ca884a3f30129ea",onClick:()=>this.noticeWarning(S.delay("This is a test delay notice.",(()=>new Promise((t=>window.setTimeout((()=>t([true,"This went great"])),3e3))))))},"delay")),o("fieldset",{key:"020e2fe53b4ee2f6b36a94863dbe2367d02e0b51"},o("h2",{key:"bb7cfda125e43c7f2afee6d7853318522456762e"},"Smoothly spinner"),o("div",{key:"a9f199a1fe6837f1546ee3aca45b74c399c23519",style:{width:"fit-content"}},"Large",o("smoothly-spinner",{key:"b3d78a677a1c3a62be4e448ac394096d62bc04e0",size:"large",style:{"--spinner-background":"200,255,200","--spinner-background-opacity":"0.2","--spinner-color":"0,130,0"}})),o("div",{key:"db5b5ce167113c8471537bc9604af1d31ef5f228",style:{width:"fit-content"}},"Medium",o("smoothly-spinner",{key:"2eff854f0c518cb3928615775367c6ca768f1a9e",size:"medium"})),o("div",{key:"b92410ef7ff77eb220554dce92ee9e5e0161b8d2",style:{width:"fit-content"}},"Small",o("smoothly-spinner",{key:"4836644ee23ce44de781fc59b185c363d2d10e5e",size:"small"})),o("div",{key:"a6b659783973f77a39e1643940fc97f77be1f7ad"},"Icon sized spinner on button",r.values.map((t=>o("smoothly-button",{size:"icon",color:t,shape:"rounded",onClick:()=>{this.downloadingSpinner=true;setTimeout((()=>this.downloadingSpinner=false),3e3)}},!this.downloadingSpinner&&o("smoothly-icon",{name:"download-outline"}),this.downloadingSpinner&&o("smoothly-spinner",{size:"icon",style:{"--spinner-background-opacity":"0"}}))))),o("h3",{key:"8161fb53d9dfa5aba8bc164adcaf9e3daeeaa627"},"Spinner with overlay"),o("div",{key:"8d4115c6ab8a24add137c06cde794937aba85b69",style:{position:"relative",height:"10em"}},"Large Overlay Spinner",o("smoothly-spinner",{key:"d04a2e77e759e5e094244922ec70fc150bac6858",overlay:true,size:"large",style:{"--spinner-background":"255,200,255","--spinner-background-opacity":"0.5","--spinner-color":"0,130,0"}})),o("div",{key:"e284851987d3e475d72dd68e5465ff2b54e38710",style:{position:"relative",height:"10em"}},"Medium Overlay Spinner",o("smoothly-spinner",{key:"29d593da93d2e11ac520650d64af1de6728e837e",overlay:true,color:"secondary",size:"medium"})),o("div",{key:"bcc6e156596f946964173cf9a100dce8f3f9adcb",style:{position:"relative",height:"10em"}},"Small Overlay Spinner",o("smoothly-spinner",{key:"57498aeaf7c8690958a1f42d80220bf6ba01a069",overlay:true,size:"small"}))),o("fieldset",{key:"ed65a407dde854768a1934add1d88a40d99f20c5"},o("h2",{key:"3f0a8eba2588ac878f02104f60fbc6072173c480"},"Smoothly summary"),o("smoothly-summary",{key:"b5538b3841957408ca25314d20789fc87db9f89c"},o("span",{key:"0a66c656b75981dd493f9288522c914c6aaf3177",slot:"summary"},"Some title"),o("smoothly-summary",{key:"d7a1064544e0f530ee18fc98e5dbac110f7aad79",slot:"content"},o("div",{key:"7dc9a5d35ddd789ef54fe021ecf9b784793a3074",slot:"summary"},"Some other title"),o("div",{key:"b0b0000431972ce6510eeb966d35f90f98baa372",slot:"content"},"A lot more content, yes please. A lot more content, yes please. A lot more content, yes please. A lot more content, yes please. A lot more content, yes please.A lot more content, yes please. A lot more content, yes please. A lot more content, yes please. A lot more content, yes please."))),o("smoothly-summary",{key:"7eac5c136d5ed3c09c53f676991fb957bdea50f2"},o("div",{key:"45239a377a7ae5b15baa3fefaca04f965bc3dd80",slot:"summary",style:{display:"flex",gap:"0.3rem"}},o("span",{key:"aed615a5e1dcfece04dc29d3381e706e89328025"},"Person"),o("smoothly-icon",{key:"bbdbee4093170b788015686e6ac31cb75adfb3c4",name:"person",color:"light",fill:"clear",size:"tiny"})),o("p",{key:"dcbe807176c6c8c0a642b8351487c63a2a31d1d1",slot:"content"},"Some person information.")),o("h2",{key:"b939b82ef761060a6de4190fd80e5aec1d6c6938"},"Label"),Ge.map((t=>o("smoothly-label",{hue:t.hue,description:t.description,shape:"rectangle"},t.name))),o("smoothly-label",{key:"9dd6878b3e540f24dee8fc99d6834a6c2ed85744",color:"primary",description:"Using colors",shape:"rectangle"},"Primary")))]}};const Ge=[{name:"2fa",hue:120,description:"User has two factor authentication enabled."},{name:"expired",hue:240,description:"User's password has expired."},{name:"inactive",hue:60,description:"User is inactive."}];const Ke=class{constructor(e){t(this,e)}render(){return o(s,{key:"dd76081f4adf3ae47e0015c2f17b43e50c6ace15"},[0,1,3,undefined].map((t=>[o("div",null,"collapseDepth=",t!==null&&t!==void 0?t:"undefined"),o("div",null,o("smoothly-display",{type:"json",value:qe,collapseDepth:t}))])))}};const qe={name:"stringy",nested:{age:109,array:["one","two","three",{name:"four"}],emptyObject:{},emptyArray:[],truthy:true,falsy:false,null:null,notDefined:undefined,longString:"pepparkakorpepparkakorpepparkakorpepparkakorpepparkakorpepparkakorpepparkakorpepparkakorpepparkakorpepparkakorpepparkakorpepparkakorpepparkakorpepparkakorpepparkakorpepparkakorpepparkakorpepparkakorpepparkakorpepparkakorpepparkakorpepparkakorpepparkakorpepparkakorpepparkakorpepparkakorpepparkakorpepparkakorpepparkakorpepparkakorpepparkakorpepparkakorpepparkakorpepparkakorpepparkakorpepparkakorpepparkakorpepparkakorpepparkakorpepparkakorpepparkakorpepparkakorpepparkakorpepparkakorpepparkakorpepparkakorpepparkakorpepparkakorpepparkakorpepparkakorpepparkakorpepparkakorpepparkakorpepparkakorpepparkakorpepparkakorpepparkakorpepparkakorpepparkakorpepparkakorpepparkakorpepparkakorpepparkakorpepparkakorpepparkakorpepparkakorpepparkakorpepparkakorpepparkakorpepparkakorpepparkakorpepparkakorpepparkakorpepparkakorpepparkakorpepparkakorpepparkakorpepparkakorpepparkakorpepparkakorpepparkakorpepparkakorpepparkakorpepparkakorpepparkakorpepparkakorpepparkakorpepparkakorpepparkakorpepparkakorpepparkakorpepparkakorpepparkakorpepparkakorpepparkakorpepparkakorpepparkakorpepparkakorpepparkakorpepparkakorpepparkakorpepparkakorpepparkakorpepparkakorpepparkakorpepparkakorpepparkakorpepparkakorpepparkakorpepparkakorpepparkakorpepparkakorpepparkakorpepparkakorpepparkakorpepparkakorpepparkakorpepparkakorpepparkakorpepparkakorpepparkakorpepparkakorpepparkakorpepparkakorpepparkakorpepparkakorpepparkakorpepparkakorpepparkakorpepparkakorpepparkakorpepparkakorpepparkakorpepparkakorpepparkakorpepparkakorpepparkakorpepparkakorpepparkakorpepparkakorpepparkakorpepparkakor"}};const Ze=({value:t,collapseDepth:e})=>m().is(t)||Array.isArray(t)?o("smoothly-display-json-object",{value:t,collapseDepth:e}):o("smoothly-display-json-primitive",{value:t});const Je=()=>`.sc-smoothly-display-json-h{font-family:monospace}`;const Xe=class{constructor(e){t(this,e)}render(){return o(Ze,{key:"939a93b45e7f0f021c361331d011e7cb61627fed",value:this.value,collapseDepth:this.collapseDepth})}};Xe.style=Je();const Qe=()=>`.sc-smoothly-display-json-object-h{font-family:monospace;position:relative}[hidden].sc-smoothly-display-json-object-h{display:none}.indent.sc-smoothly-display-json-object{padding-left:1rem;border-left:1px solid rgba(var(--smoothly-default-contrast), 0.3)}.sc-smoothly-display-json-object-h:not(.open) .content.sc-smoothly-display-json-object{opacity:0;position:absolute;pointer-events:none}.sc-smoothly-display-json-object-h>.content.sc-smoothly-display-json-object>.indent.sc-smoothly-display-json-object:last-child>.comma.sc-smoothly-display-json-object{display:none}.sc-smoothly-display-json-object-h .open-bracket.sc-smoothly-display-json-object{cursor:pointer}.sc-smoothly-display-json-object-h .open-bracket.sc-smoothly-display-json-object::after{background-color:rgb(var(--smoothly-light-color));color:rgb(var(--smoothly-light-shade));border:1px solid rgb(var(--smoothly-light-color));white-space:pre;border-radius:0.25rem;font-weight:bold;font-size:0.8em}.sc-smoothly-display-json-object-h>.open-bracket.sc-smoothly-display-json-object:hover::after{color:rgb(var(--smoothly-default-contrast));border-color:rgb(var(--smoothly-light-shade))}.sc-smoothly-display-json-object-h:not(.open):not(.empty)>.open-bracket.sc-smoothly-display-json-object::after{content:" ▶ " attr(data-length) " ◀ "}.open.sc-smoothly-display-json-object-h:not(.empty)>.open-bracket.sc-smoothly-display-json-object::after{content:" ▼ "}.sc-smoothly-display-json-object-h>.open-bracket.sc-smoothly-display-json-object:hover,.sc-smoothly-display-json-object-h>.open-bracket.sc-smoothly-display-json-object:hover~.close-bracket.sc-smoothly-display-json-object{font-weight:bold}.sc-smoothly-display-json-object-h>.open-bracket.sc-smoothly-display-json-object:hover+.content.sc-smoothly-display-json-object>.indent.sc-smoothly-display-json-object{border-left-color:rgb(var(--smoothly-default-contrast))}`;const to=class{constructor(e){t(this,e);this.openBracket="";this.closeBracket=""}componentWillLoad(){this.open=typeof this.collapseDepth=="number"?this.collapseDepth>0:true;if(Array.isArray(this.value)){this.openBracket="[";this.closeBracket="]";this.length=this.value.length}else{this.openBracket="{";this.closeBracket="}";this.length=Object.keys(this.value).length}this.empty=this.length==0}render(){const t=typeof this.collapseDepth=="number"?Math.max(this.collapseDepth-1,0):undefined;return o(s,{key:"9c9b5a46433770a7d56343c4bf723163e8a56475",class:{empty:this.empty,open:this.open}},o("span",{key:"836957462d65b5c136231bd3867f7da169ecb343",class:"open-bracket",onClick:()=>this.open=!this.open,"data-length":this.length},this.openBracket),o("span",{key:"ef132e20317fb0b1b3f38442fec7bd2731ec5c43",class:"content"},Array.isArray(this.value)?this.value.map((e=>o("div",{class:"indent"},o(Ze,{value:e,collapseDepth:t}),o("span",{class:"comma"},",")))):Object.entries(this.value).map((([e,s])=>o("div",{class:"indent"},o("smoothly-display-json-record-key",{value:e}),":"," ",o(Ze,{value:s,collapseDepth:t}),o("span",{class:"comma"},","))))),o("span",{key:"50bed891b85fc5d407cad5e8ae1d53dcf56551d2",class:"close-bracket"},this.closeBracket))}};to.style=Qe();const eo=()=>`.sc-smoothly-display-json-primitive-h{font-family:monospace;display:inline;overflow-wrap:anywhere;white-space:pre-wrap}[hidden].sc-smoothly-display-json-primitive-h{display:none}.string.sc-smoothly-display-json-primitive-h{font-weight:var(--smoothly-display-json-string-font-weight, bold);color:rgb(var(--smoothly-display-json-string, var(--smoothly-primary-color)))}.number.sc-smoothly-display-json-primitive-h{font-weight:var(--smoothly-display-json-number-font-weight, bold);color:rgb(var(--smoothly-display-json-number, var(--smoothly-secondary-color)))}.boolean.sc-smoothly-display-json-primitive-h{font-weight:var(--smoothly-display-json-boolean-font-weight, bold);color:rgb(var(--smoothly-display-json-boolean, var(--smoothly-tertiary-color)))}.null.sc-smoothly-display-json-primitive-h,.undefined.sc-smoothly-display-json-primitive-h{font-weight:var(--smoothly-display-json-undefined-font-weight, normal);color:rgb(var(--smoothly-display-json-undefined, var(--smoothly-medium-color)))}`;const oo=class{constructor(e){t(this,e)}render(){return o(s,{key:"017bbc369b1e8ff42466411a5b28b52c5661b740",class:this.value==null?"null":typeof this.value},""+JSON.stringify(this.value))}};oo.style=eo();const so=()=>`.sc-smoothly-display-json-record-key-h{font-family:monospace;display:inline;color:rgb(var(--smoothly-default-contrast))}[hidden].sc-smoothly-display-json-record-key-h{display:none}`;const ao=class{constructor(e){t(this,e)}render(){return o(s,{key:"67d6629e71ecde01829b6279188bc7332c3d9379"},'"',this.value,'"')}};ao.style=so();var io;(function(t){function e(t){return typeof t=="string"&&(t=="GET"||t=="POST"||t=="DELETE"||t=="HEAD"||t=="PATCH"||t=="PUT"||t=="OPTIONS"||t=="TRACE"||t=="CONNECT")}t.is=e;function o(t){t=t?.toUpperCase();return e(t)?t:undefined}t.parse=o})(io||(io={}));const lo={};function no(t,...e){e.forEach((e=>lo[e]=t))}function ro(t){const e=t.headers.get("Content-Type");const o=e&&e.split(";");const s=lo[o?.[0]??"plain/text"];return s?s(t):t.text()}const co={};function ho(t,...e){e.forEach((e=>co[e]=t))}function mo(t,e){const o=co[e?.split(";")[0]??""];return o?o(t,e):t}function yo(t){return t.toLowerCase().replace(/-[a-z]/g,(t=>t.substring(1).toUpperCase()))}function bo(t){const e=t.replace(/[A-Z]/g,(t=>"-"+t));return e[0].toUpperCase()+e.substring(1)}const uo=[["aIM","A-IM",1],["accept","Accept",2],["acceptCharset","Accept-Charset",2],["acceptDatetime","Accept-Datetime",1],["acceptEncoding","Accept-Encoding",2],["acceptLanguage","Accept-Language",2],["accessControlRequestMethod","Access-Control-Request-Method",1],["accessControlRequestHeaders","Access-Control-Request-Headers",1],["authorization","Authorization",1],["cacheControl","Cache-Control",1],["cfConnectionIp","CF-Connecting-IP",1],["cfIpCountry","CF-IPCountry",1],["connection","Connection",1],["contentLength","Content-Length",1],["contentMD5","Content-MD5",1],["contentType","Content-Type",1],["cookie","Cookie",1],["date","Date",1],["expect","Expect",1],["forwarded","Forwarded",1],["from","From",1],["host","Host",1],["http2Settings","HTTP2-Settings",1],["ifMatch","If-Match",2],["ifModifiedSince","If-Modified-Since",1],["ifNoneMatch","If-None-Match",2],["ifRange","If-Range",1],["ifUnmodifiedSince","If-Unmodified-Since",1],["maxForwards","Max-Forwards",1],["origin","Origin",1],["pragma","Pragma",1],["proxyAuthorization","Proxy-Authorization",1],["range","Range",1],["referer","Referer",1],["te","TE",2],["trailer","Trailer",1],["transferEncoding","Transfer-Encoding",1],["userAgent","User-Agent",1],["upgrade","Upgrade",2],["via","Via",2],["warning","Warning",1],["upgradeInsecureRequests","Upgrade-Insecure-Requests",1],["xRequestedWith","X-Requested-With",1],["dnt","DNT",1],["xForwardedFor","X-Forwarded-For",1],["xForwardedHost","X-Forwarded-Host",1],["xForwardedProto","X-Forwarded-Proto",1],["xMsContinuation","X-Ms-Continuation",1],["frontEndHttps","Front-End-Https",1],["xHttpMethodOverride","X-Http-Method-Override",1],["xAttDeviceId","X-ATT-DeviceId",1],["xWapProfile","X-Wap-Profile",1],["proxyConnection","Proxy-Connection",1],["xCsrfToken","X-Csrf-Token",1],["xCorrelationID","X-Correlation-ID",1],["xModNonce","x-mod-nonce",1],["xModRetry","x-mod-retry",1],["saveData","Save-Data",1],["xAuthToken","X-Auth-Token",1],["xTrackingId","x-tracking-id",1]];var po;(function(t){function e(t){function e(t){return t==undefined||typeof t=="string"}function o(t){return t==undefined||Array.isArray(t)&&t.every((t=>typeof t=="string"))}return typeof t=="object"&&uo.every((s=>(s[2]==1?e:o)(t[s[0]])))}t.is=e;function o(t){return Object.fromEntries(Object.entries(t).map((([t,e])=>{const o=uo.find((([e,o,s])=>e==t));return[o?o[1]:bo(t),Array.isArray(e)?e.join(", "):e]})))}t.to=o;function s(t){return Object.fromEntries((Array.isArray(t)?t.map((([t,...e])=>[t,e.join(", ")])):i(t)?[...t]:Object.entries(t)).map((([t,e])=>{const o=uo.find((([e,o,s])=>t.toLowerCase()==o.toLowerCase()));return o?[o[0],o[2]==1||typeof e!="string"?e:e.split(",").map((t=>t.trim()))]:[yo(t),e]})))}t.from=s;function a(t){return Object.entries(t).map((([t,e])=>t+": "+e)).join("\n")}t.toString=a;function i(t){return typeof t.entries=="function"}})(po||(po={}));var fo;(function(t){function e(t){return typeof t=="object"&&Object.keys(t).every((t=>["method","url","parameter","search","remote","header","body"].some((e=>e==t))))&&io.is(t.method)&&t.url instanceof URL&&typeof t.parameter=="object"&&Object.entries(t.parameter).every((([t,e])=>typeof t=="string"&&typeof e=="string"))&&typeof t.search=="object"&&Object.entries(t.search).every((([t,e])=>typeof t=="string"&&typeof e=="string"))&&(t.remote==undefined||typeof t.remote=="string")&&(t.header==undefined||po.is(t.header))}t.is=e;async function o(t){const o=e(t)?t:a(t);const s=o.header.contentType?.startsWith("multipart/form-data")?(({contentType:t,...e})=>e)(o.header):o.header;return{url:o.url.toString(),method:o.method,headers:po.to(s),body:["GET","HEAD"].some((t=>t==o.method))?undefined:await mo(await o.body,o.header.contentType)}}t.to=o;function s(t){const e=new URL(t.url);return{method:io.parse(t.method)??"GET",url:e,header:po.from(t.headers),parameter:{},search:Object.fromEntries(e.searchParams.entries()),body:ro(t),..."cf"in t&&{cloudflare:t.cf}}}t.from=s;function a(t){let e;if(typeof t=="string")e=a({url:t});else{const o=typeof t.url=="string"?new URL(t.url):t.url;e={method:io.parse(t.method)??"GET",url:o,parameter:t.parameter??{},search:{...t.search,...Object.fromEntries(o.searchParams.entries())},remote:t.remote,header:t.header??{},body:t.body}}return e}t.create=a;(function(t){t.is=po.is;t.from=po.from;t.to=po.to})(t.Header||(t.Header={}))})(fo||(fo={}));const go=typeof Response!="undefined"?Response:globalThis.Response;var ko=undefined&&undefined.__classPrivateFieldGet||function(t,e,o,s){if(o==="a"&&!s)throw new TypeError("Private accessor was defined without a getter");if(typeof e==="function"?t!==e||!s:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return o==="m"?s:o==="a"?s.call(t):s?s.value:e.get(t)};var vo=undefined&&undefined.__classPrivateFieldSet||function(t,e,o,s,a){if(s==="m")throw new TypeError("Private method is not writable");if(s==="a"&&!a)throw new TypeError("Private accessor was defined without a setter");if(typeof e==="function"?t!==e||!a:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return s==="a"?a.call(t,o):a?a.value=o:e.set(t,o),o};var wo,xo,Co,So,zo,Io,To,Do,jo;let Lo=class t{get state(){return ko(this,So,"f")?"closed":"opened"}set onMessage(t){if(ko(this,xo,"f").length&&t){ko(this,xo,"f").forEach(t);vo(this,xo,[],"f")}vo(this,Io,t,"f")}set onClose(t){if(this.state=="closed"&&t)t();vo(this,To,t,"f")}set onOpen(t){if(this.state=="opened"&&t)t();vo(this,jo,t,"f")}constructor(t,e){wo.add(this);xo.set(this,[]);Co.set(this,[]);So.set(this,false);zo.set(this,void 0);Io.set(this,void 0);To.set(this,void 0);jo.set(this,void 0);vo(this,zo,t,"f");if(e)vo(this,Co,undefined,"f");ko(this,zo,"f").addEventListener("open",(()=>{if(ko(this,jo,"f"))ko(this,jo,"f").call(this);ko(this,wo,"m",Do).bind(this)}));ko(this,zo,"f").addEventListener("message",(async t=>{const e=this.processReceived(t.data);ko(this,wo,"m",Do).call(this);if(ko(this,Io,"f"))ko(this,Io,"f").call(this,e);else ko(this,xo,"f")?.push(e)}));ko(this,zo,"f").addEventListener("close",(()=>{if(ko(this,To,"f"))ko(this,To,"f").call(this);vo(this,So,true,"f")}))}send(t){if(ko(this,Co,"f"))ko(this,Co,"f").push(this.processSend(t));else ko(this,zo,"f").send(this.processSend(t))}};xo=new WeakMap,Co=new WeakMap,So=new WeakMap,zo=new WeakMap,Io=new WeakMap,To=new WeakMap,jo=new WeakMap,wo=new WeakSet,Do=function t(){ko(this,Co,"f")?.forEach((t=>ko(this,zo,"f").send(t)));vo(this,Co,undefined,"f")};let Ro=class t extends Lo{processReceived(t){return t?.arrayBuffer?t.arrayBuffer():typeof t=="string"?(new TextEncoder).encode(t).buffer:t}processSend(t){return t}};class _o extends Lo{processReceived(t){return JSON.parse(t?.arrayBuffer?(new TextDecoder).decode(t.arrayBuffer()):typeof t!="string"?(new TextDecoder).decode(t):t)}processSend(t){return JSON.stringify(t)}}let Ao=class t extends Lo{processReceived(t){return t?.arrayBuffer?(new TextDecoder).decode(t.arrayBuffer()):typeof t!="string"?(new TextDecoder).decode(t):t}processSend(t){return t}};var $o=undefined&&undefined.__classPrivateFieldGet||function(t,e,o,s){if(o==="a"&&!s)throw new TypeError("Private accessor was defined without a getter");if(typeof e==="function"?t!==e||!s:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return o==="m"?s:o==="a"?s.call(t):s?s.value:e.get(t)};var Mo=undefined&&undefined.__classPrivateFieldSet||function(t,e,o,s,a){if(s==="m")throw new TypeError("Private method is not writable");if(s==="a"&&!a)throw new TypeError("Private accessor was defined without a setter");if(typeof e==="function"?t!==e||!a:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return s==="a"?a.call(t,o):a?a.value=o:e.set(t,o),o};var Eo,Oo,Po;class Ho{get json(){if(!$o(this,Eo,"f"))Mo(this,Eo,new _o(this.backend,this.isOpen),"f");return $o(this,Eo,"f")}get string(){if(!$o(this,Oo,"f"))Mo(this,Oo,new Ao(this.backend,this.isOpen),"f");return $o(this,Oo,"f")}get arrayBuffer(){if(!$o(this,Po,"f"))Mo(this,Po,new Ro(this.backend,this.isOpen),"f");return $o(this,Po,"f")}constructor(t,e){this.backend=t;this.isOpen=e;Eo.set(this,void 0);Oo.set(this,void 0);Po.set(this,void 0)}createResponse(t={}){return{status:101,socket:this,header:t}}close(t,e){this.backend.close(t,e)}}Eo=new WeakMap,Oo=new WeakMap,Po=new WeakMap;var Fo;(function(t){t.Factory=Ho})(Fo||(Fo={}));const Uo=[["accessControlAllowOrigin","Access-Control-Allow-Origin",1],["accessControlAllowCredentials","Access-Control-Allow-Credentials",1],["accessControlExposeHeaders","Access-Control-Expose-Headers",2],["accessControlMaxAge","Access-Control-Max-Age",1],["accessControlAllowMethods","Access-Control-Allow-Methods",2],["accessControlAllowHeaders","Access-Control-Allow-Headers",2],["acceptPatch","Accept-Patch",1],["acceptRanges","Accept-Ranges",1],["age","Age",1],["allow","Allow",2],["altSvc","Alt-Svc",1],["cacheControl","Cache-Control",1],["cfConnectionIp","CF-Connecting-IP",1],["cfIpCountry","CF-IPCountry",1],["connection","Connection",1],["contentDisposition","Content-Disposition",1],["contentEncoding","Content-Encoding",1],["contentLanguage","Content-Language",2],["contentLength","Content-Length",1],["contentLocation","Content-Location",1],["contentMD5","Content-MD5",1],["contentRange","Content-Range",1],["contentSecurityPolicy","Content-Security-Policy",1],["contentType","Content-Type",1],["date","Date",1],["deltaBase","Delta-Base",1],["eTag","ETag",1],["expires","Expires",1],["iM","IM",1],["lastModified","Last-Modified",1],["link","Link",1],["location","Location",1],["p3P","P3P",1],["pragma","Pragma",1],["proxyAuthenticate","Proxy-Authenticate",1],["publicKeyPins","Public-Key-Pins",1],["refresh","Refresh",1],["retryAfter","Retry-After",1],["server","Server",1],["setCookie","Set-Cookie",1],["status","Status",1],["strictTransportSecurity","Strict-Transport-Security",1],["timingAllowOrigin","Timing-Allow-Origin",2],["trailer","Trailer",1],["transferEncoding","Transfer-Encoding",1],["tk","Tk",1],["upgrade","Upgrade",2],["vary","Vary",2],["via","Via",1],["warning","Warning",1],["wwwAuthenticate","WWW-Authenticate",1],["xContentDuration","X-Content-Duration",1],["xContentSecurityPolicy","X-Content-Security-Policy",1],["xContentTypeOptions","X-Content-Type-Options",1],["xCorrelationId","X-Correlation-ID",1],["xFrameOptions","X-Frame-Options",1],["xMsContinuation","X-Ms-Continuation",1],["xPoweredBy","X-Powered-By",1],["xRequestId","X-Request-ID",1],["xUACompatible","X-UA-Compatible",1],["xWebkitCsp","X-WebKit-CSP",1],["xXssProtection","X-XSS-Protection",1]];var No;(function(t){function e(t){function e(t){return t==undefined||typeof t=="string"}function o(t){return t==undefined||Array.isArray(t)&&t.every((t=>typeof t=="string"))}return typeof t=="object"&&Uo.every((s=>(s[2]==1?e:o)(t[s[0]])))}t.is=e;function o(t){return Object.fromEntries(Object.entries(t).map((([t,e])=>{const o=Uo.find((([e,...o])=>e==t));return[o?o[1]:bo(t),Array.isArray(e)?e.join(", "):e]})))}t.to=o;function s(t){return Object.fromEntries((Array.isArray(t)?t.map((([t,...e])=>[t,e.join(", ")])):i(t)?l(t):Object.entries(t)).map((([t,e])=>{const o=Uo.find((([e,o,s])=>t.toLowerCase()==o.toLowerCase()));return o?[o[0],o[2]==1||typeof e!="string"?e:e.split(",").map((t=>t.trim()))]:[yo(t),e]})))}t.from=s;function a(t){return Object.entries(t).map((([t,e])=>t+": "+e)).join("\n")}t.toString=a;function i(t){return typeof t.forEach=="function"}function l(t){const e=[];t.forEach(((t,o)=>e.push([o,t])));return e}})(No||(No={}));var Yo;(function(t){function e(t){return typeof t=="object"&&Object.keys(t).every((t=>["status","header","body","socket"].some((e=>e==t))))&&(t.status==undefined||typeof t.status=="number")&&(t.header==undefined||No.is(t.header))&&(t.socket==undefined||typeof t.socket.close=="function"&&typeof t.socket.json?.send=="function"&&typeof t.socket.string?.send=="function"&&typeof t.socket.arrayBuffer?.send=="function")&&(t.status!=undefined||t.header!=undefined||t.body!=undefined)}t.is=e})(Yo||(Yo={}));var Wo;(function(t){function e(t){return typeof t=="object"&&Object.keys(t).every((t=>["status","header","body","socket"].some((e=>e==t))))&&(t.status==undefined||typeof t.status=="number")&&(t.header==undefined||No.is(t.header))&&(t.socket==undefined||t.socket instanceof WebSocket)}t.is=e;async function o(t){return new go(await mo(await t.body,t.header.contentType),{status:t.status,headers:new Headers(No.to(!t.header.contentType?.startsWith("multipart/formdata")?t.header:(({contentType:t,...e})=>e)(t.header))),...t.socket&&{webSocket:{...t.socket.createResponse().socket}?.backend}})}t.to=o;function s(t){return{status:t.status,header:No.from(t.headers),body:t.status==101?undefined:ro(t),...t.webSocket&&{socket:new Fo.Factory(t.webSocket)}}}t.from=s;function a(t,e){const o=Yo.is(t)?{status:200,header:{},body:undefined,...t.socket&&{socket:t.socket},...t}:typeof t?.createResponse=="function"&&(e==undefined||No.is(e))?t.createResponse(e):{status:typeof t=="object"&&typeof t.status=="number"&&t.status||200,header:typeof t=="object"?{...t.header,...(t.status==301||t.status==302)&&t.location?{location:t.location}:{}}:{},body:!(typeof t=="object"&&!Array.isArray(t))||t instanceof ArrayBuffer||ArrayBuffer.isView(t)||t instanceof FormData?t:(({header:t,...e})=>e)(t),...t.webSocket&&{socket:new Fo.Factory(t.webSocket)}||t.socket&&{socket:t.socket}};if(!o.header.contentType)switch(typeof o.body){case"undefined":break;default:case"object":o.header.contentType=typeof e=="string"?e:e?.contentType?e.contentType:o.body instanceof FormData?"multipart/formdata":o.body instanceof ArrayBuffer||ArrayBuffer.isView(o.body)?i(o.body)?"application/pdf":"application/octet-stream":"application/json; charset=utf-8";break;case"string":o.header.contentType=o.body.slice(0,9).toLowerCase()=="<!doctype"?"text/html; charset=utf-8":/^[A-Za-z0-9-_=]+\.[A-Za-z0-9-_=]+\.?[A-Za-z0-9-_.+/=]*$/.test(o.body)?"application/jwt; charset=utf-8":/^<\?xml version=(.|\n)*\?>(.|\n)*<svg(.|\n)*<\/svg>$/.test(o.body)?"image/svg+xml":"text/plain; charset=utf-8";break}return o}t.create=a;function i(t){const e=new Uint8Array(ArrayBuffer.isView(t)?t.buffer:t).slice(0,4);return[37,80,68,70].every(((t,o)=>t==e[o]))}t.Header=No;t.Like=Yo})(Wo||(Wo={}));const Bo=Vo(globalThis.fetch);Bo.create=Vo;function Vo(t){return async e=>{const o=fo.create(e);return Wo.from(await t(o.url.toString(),await fo.to(o)))}}var Go;(function(t){function e(t){const e=new globalThis.FormData;e.append("*",new globalThis.Blob([(new TextEncoder).encode(JSON.stringify(o(t,"",e)))],{type:"application/json; charset=utf-8"}));return e}t.to=e;function o(t,e,a){return Object.entries(t).reduce(((t,[i,l])=>{l instanceof Blob?a.append(e?`${e}.${i}`:i,l):typeof l=="object"&&l?Array.isArray(l)?t[i]=s(l,e?`${e}.${i}`:i,a):t[i]=o(l,e?`${e}.${i}`:i,a):t[i]=l;return t}),{})}function s(t,e,a){return t.reduce(((t,i)=>{typeof i=="object"&&i?Array.isArray(i)?t.push(s(i,e,a)):t.push(o(i,e,a)):t.push(i);return t}),[])}async function a(t){const e={};for(const[o,s]of t.entries())await i(e,o.split("."),s);return e}t.from=a;async function i(t,[e,...o],s){if(o.length==0)s instanceof Blob&&s.type.startsWith("application/json")?e=="*"?l(t,JSON.parse(await s.text())):typeof t[e]=="object"&&t[e]?l(t[e],JSON.parse(await s.text())):t[e]=JSON.parse(await s.text()):t[e]=s;else i(typeof t[e]=="object"&&t[e]?t[e]:t[e]={},o,s)}function l(t,...e){if(e.length){const[o,...s]=e;Object.entries(o).forEach((([e,s])=>n(s)?l(n(t[e])?t[e]:t[e]={},s):t[e]=o[e]));l(t,...s)}}function n(t){return t&&typeof t=="object"&&!Array.isArray(t)}t.isObject=n})(Go||(Go={}));function Ko(t){const e=[];const o=(t,s)=>{switch(typeof s){default:case"bigint":case"boolean":case"number":case"string":e.push(`${t}=${encodeURIComponent(s.toString())}`);break;case"undefined":break;case"object":for(const e in s)if(Object.prototype.hasOwnProperty.call(s,e))o(t?t+`[${e}]`:e,s[e]);break}};o("",t);return e.join("&")}function qo(t){const e=t=>typeof t=="object"&&Object.keys(t).sort().every(((t,e)=>`${t}`==`${e}`))?Object.entries(t).sort().map((t=>typeof t[1]=="object"?e(t[1]):t[1])):typeof t=="object"?Object.fromEntries(Object.entries(t).map((t=>[t[0],e(t[1])]))):t;const o=(t,e,s)=>{t[e[0]]=e.length>1?o(t[e[0]]??{},e.slice(1),s):s;return t};const s=t.split("&").map((t=>t.split("=",2))).map((([t,e])=>[decodeURIComponent(t).split("[").map((t=>t.replace("]",""))),decodeURIComponent(e.replace(/\+/g," "))]));return s.reduce(((t,[s,a])=>e(o(t,s,a))),{})}no((async t=>await t.text()),"text/plain","text/html");no((async t=>await t.json()),"application/json");no((async t=>await t.arrayBuffer()),"application/pdf");no((async t=>Go.from(await t.formData())),"multipart/form-data");no((async t=>qo(await t.text())),"application/x-www-form-urlencoded");ho((async t=>typeof t=="string"?t:t.toString()),"text/plain","text/html");ho((async t=>JSON.stringify(t)),"application/json");ho((async t=>t),"application/pdf");ho((async t=>Ko(t)),"application/x-www-form-urlencoded");ho((async t=>t instanceof globalThis.FormData?t:Go.to(t)),"multipart/form-data");var Zo;(function(t){function e(t){return t&&typeof t=="object"&&typeof t.clear=="function"}t.is=e})(Zo||(Zo={}));class Jo{constructor(t){this.parent=t;this.callbacks=[]}async subscribe(t){this.callbacks.push(t);await t(this.parent)}async publish(){Promise.all(this.callbacks.map((t=>t(this.parent))))}static create(t){return new Jo(t)}}var Xo;(function(t){t.Observer=Jo;let e;(function(t){t.type=m({edit:y(),readonly:b(),listen:y(),reset:y(),setInitialValue:y()});t.is=t.type.is})(e=t.Element||(t.Element={}));const o=m({emit:y()});t.type=e.type.extend({isDifferentFromInitial:b(),value:z().optional(),smoothlyFormDisable:o});t.is=t.type.is})(Xo||(Xo={}));var Qo;(function(t){t.values=["plain","grid","border","line","transparent"];t.type=u(t.values);t.is=t.type.is})(Qo||(Qo={}));var ts;(function(t){let e;(function(t){t.type=m({register:y(),unregister:y(),getValue:y(),disabled:b().optional(),color:r.type.optional(),name:u(),invalid:b().optional(),looks:Qo.type.optional(),defined:b().optional(),binary:y().optional()});t.is=t.type.is})(e=t.Element||(t.Element={}));const o=m({emit:y()});t.type=e.type.extend({smoothlyInputLoad:o,smoothlyInput:o,smoothlyUserInput:o,smoothlyKeydown:o.optional(),smoothlyInputForm:o.optional(),parent:Xo.type.optional()});t.is=t.type.is;function s(t,e){if(t.parent instanceof os){t.parent.removeInput(e!==null&&e!==void 0?e:t.name)}}t.formRemove=s;function a(t){t.smoothlyInputLoad.emit((e=>t.parent=e))}t.formAdd=a;function i(t,e){if(e){s(t,e)}a(t)}t.formRename=i;function l(t,e){if(!(e.target&&"name"in e.target&&e.target.name===t.name)){e.stopPropagation();e.detail(t)}}t.registerSubAction=l})(ts||(ts={}));const es=()=>`smoothly-form{display:block;position:relative}smoothly-form>form{position:relative}smoothly-form>form>fieldset{display:flex;flex-flow:row wrap;margin-inline-start:unset;margin-inline-end:unset;padding-block-start:unset;padding-inline-start:unset;padding-inline-end:unset;padding-block-end:unset;min-inline-size:unset;border-width:unset;border-style:unset;border-color:unset;border-image:unset}smoothly-form>form>fieldset>*{flex-grow:1;min-width:min(100%, var(--smoothly-form-input-min-width, 14rem));flex-basis:40%}smoothly-form[looks="line"]>form>fieldset,smoothly-form[looks="border"]>form>fieldset,smoothly-form[looks="transparent"]>form>fieldset{row-gap:var(--smoothly-form-row-gap, 2rem);column-gap:var(--smoothly-form-column-gap, 2rem)}smoothly-form[looks="grid"]>form>fieldset{padding:1px;gap:1px}smoothly-form>form>div:not(:empty){display:flex;justify-content:end;gap:1em;margin-top:1.5rem}`;const os=class{constructor(o){t(this,o);this.smoothlyFormDisable=e(this,"smoothlyFormDisable");this.smoothlyFormInput=e(this,"smoothlyFormInput");this.smoothlyFormSubmit=e(this,"smoothlyFormSubmit");this.smoothlyFormReset=e(this,"smoothlyFormReset");this.smoothlyFormEdit=e(this,"smoothlyFormEdit");this.smoothlyFormClear=e(this,"smoothlyFormClear");this.notice=e(this,"notice");this.value={};this.type=this.action?"create":undefined;this.readonly=false;this.prevent=true;this.isDifferentFromInitial=false;this.contentType="json";this.inputs=new Map;this.readonlyAtLoad=this.readonly;this.observer=Xo.Observer.create(this)}componentWillLoad(){!this.readonly&&this.smoothlyFormDisable.emit((t=>this.readonly=t))}async removeInput(t){if(this.element.isConnected){this.value=p.remove(this.value,t);this.inputs.delete(t);this.smoothlyFormInput.emit(p.convertArrays(this.value))}}async listen(t){this.observer.subscribe(t)}async watchValue(){var t,e;this.isDifferentFromInitial=[...this.inputs.values()].some((t=>Xo.type.is(t)?t.isDifferentFromInitial:true));if(this.validator){const o=(e=(t=this.validator)===null||t===void 0?void 0:t.flaw(p.convertArrays(this.value)).flaws)===null||e===void 0?void 0:e.reduce(((t,e)=>e.property?Object.assign(Object.assign({},t),{[e.property]:e}):t),{});for(const[t,e]of this.inputs.entries()){this.validate(o,t,e)}}this.observer.publish()}validate(t,e,o){var s,a;if(e.includes(".")){const[i,...l]=e.split(".");const n=(a=(s=t===null||t===void 0?void 0:t[i])===null||s===void 0?void 0:s.flaws)!==null&&a!==void 0?a:[];this.validate(n.reduce(((t,e)=>e.property?Object.assign(Object.assign({},t),{[e.property]:e}):t),{}),l.join("."),o)}else{const s=t===null||t===void 0?void 0:t[e];o&&(o.invalid=!!s)}}watchReadonly(){this.observer.publish()}smoothlyInputLooksHandler(t){t.stopPropagation();t.detail(this.looks,this.color)}async smoothlyInputHandler(t){this.value=p.merge(this.value,t.detail);this.smoothlyFormInput.emit(p.convertArrays(this.value))}async smoothlyKeydownHandler(t){if(t.detail.key=="Enter"&&this.inputs.has(t.detail.name)){t.stopPropagation();await this.submit()}}windowSubmitHandler(t){t.target==this.element&&t.detail.result(false)}submitHandler(t){this.action&&t.stopPropagation()}async smoothlyInputLoadHandler(t){var e;t.stopPropagation();t.detail(this);const o=t.target;if(ts.Element.is(o)){if(await((e=o.binary)===null||e===void 0?void 0:e.call(o))){this.contentType="form-data"}const t=await o.getValue();this.value=p.merge(this.value,{[o.name]:t});this.smoothlyFormInput.emit(p.convertArrays(this.value));this.inputs.set(o.name,o)}}async smoothlyFormDisableHandler(t){t.stopPropagation();t.detail(this.readonly)}async submit(t){this.processing=new Promise((e=>{this.smoothlyFormSubmit.emit({value:p.convertArrays(this.value),result:e,type:t==true?"remove":this.type});if(this.action){const o=this.action;this.notice.emit(S.execute("Submitting form",(async()=>{const s=t?"DELETE":!this.type||this.type=="create"?"POST":this.type=="change"?"PUT":this.type=="update"?"PATCH":"GET";const a=await Bo(fo.create(s=="GET"?{method:s,url:`${o}?${Ko(this.value)}`}:Object.assign({method:s,url:o},this.value&&{header:{contentType:this.contentType?"multipart/form-data":"application/json"},body:this.value}))).catch((()=>undefined));const i=!a||(a===null||a===void 0?void 0:a.status)<200||a.status>=300?[false,"Failed to submit form."]:[true,"Form successfully submitted."];e(i[0]);return[...i]})))}}));if(await this.processing){this.type=="create"&&await this.clear();await this.setInitialValue();this.readonlyAtLoad&&await this.edit(!this.readonlyAtLoad)}this.processing=undefined}async clear(){await Promise.all([...this.inputs.values()].map((async t=>Zo.is(t)&&t.clear())));this.smoothlyFormClear.emit()}async edit(t){await Promise.all([...this.inputs.values()].map((async e=>Xo.Element.type.is(e)&&e.edit(t))));this.readonly=!t;this.smoothlyFormEdit.emit(t)}async reset(){await Promise.all([...this.inputs.values()].map((t=>Xo.Element.type.is(t)&&t.reset())));this.isDifferentFromInitial=[...this.inputs.values()].some((t=>Xo.type.is(t)?t.isDifferentFromInitial:true));this.smoothlyFormReset.emit()}async setInitialValue(){await Promise.all([...this.inputs.values()].map((t=>Xo.Element.type.is(t)&&t.setInitialValue())))}render(){return o(s,{key:"13832187ab5df2576ff044529d909eb8037dc847"},o("smoothly-spinner",{key:"bfe49cf7d062e9691fa14b33cbe2a5084f521b27",overlay:true,hidden:!this.processing}),o("form",{key:"d8796700525994279e108c8c7e92ca70f0e29712",onSubmit:!this.prevent?undefined:t=>t.preventDefault(),name:this.name},o("fieldset",{key:"3ea76b10bf7025a3073813aa897f8d588d79f871"},o("slot",{key:"422845b145092f3c44009327dd5157ff1a8edf74"})),o("div",{key:"c85cf3f3211724e24acb964ed4747896cf184ece"},o("slot",{key:"94cb03243a1b223e2f9b0665e593486d95a13041",name:"clear"}),o("slot",{key:"8298256cbc374dc7731a1ae1e90b46ce7318c960",name:"edit"}),o("slot",{key:"37a1f5479fe938cc423c3c9c7e79d1d19e667997",name:"reset"}),o("slot",{key:"53856e34deb228ffa25e9c7611075b12b3339160",name:"delete"}),o("slot",{key:"fdc4667a9ca84c01f5a803a7b8865f7f258de837",name:"submit"}))))}get element(){return a(this)}static get watchers(){return{value:[{watchValue:0}],readonly:[{watchReadonly:0}]}}};os.style=es();const ss=()=>`.sc-smoothly-form-demo-h{display:flex;margin-top:2em;margin-bottom:10em}.sc-smoothly-form-demo-h>div.sc-smoothly-form-demo{margin:auto;width:1200px;max-width:calc(100% - 0.5rem)}`;const as=class{constructor(e){t(this,e)}render(){return o(s,{key:"e6b40ea5e535c8fd4fbbe65aa060d0ba061f5a3e"},o("div",{key:"848116c5bc43a4a5adb20ecf3f66a66b050e529c"},o("smoothly-form-demo-all",{key:"44179c77bfd53bfa4f347a465a3f4000d4d94b08"}),o("smoothly-form-demo-pet",{key:"356b17321dc0f11e63c8dd4846c4e1d91c7b6b5c"}),o("smoothly-form-demo-card",{key:"2584856236b89b5818551f8826056c0a14ab6356"}),o("smoothly-form-demo-login",{key:"dacc85e611dec4115fefc49f63463912b6718285"}),o("smoothly-form-demo-prices",{key:"500d6d4c056c79113b16bd0f67bfe0ab562cd8d8"}),o("smoothly-form-demo-typed",{key:"933cce32ed4668eb28140c0c01c8238cdf1526d2"}),o("smoothly-form-demo-transparent",{key:"2a39b5d64aaff4d53d703c9508df3de18d5a6ad6"}),o("smoothly-form-demo-date",{key:"fb0a6356529047d3bbbebd1b5980c2884be0cbb6"}),o("smoothly-form-demo-schedule",{key:"c7eb48895c714d436f04544af9519a93232f76d0"}),o("smoothly-form-demo-date-range",{key:"6370bf9ca0671705777b03e6b985361d06ee9d56"}),o("smoothly-form-demo-controlled",{key:"abf920dd124a8c43ce7818ba29bb1931a4b90910"})))}};as.style=ss();const is=class{constructor(e){t(this,e)}render(){return o(s,{key:"2b2e779dc35f9f35173515a6db59425654d7446a"},o("h2",{key:"b2423e5f45a6841b6fedcb7db17626ed192ee15d"},"All inputs"),o("smoothly-form",{key:"ac6fc721d22456edb5104ba9553c423d6f8bdebe",looks:"grid",type:"create",readonly:true,action:"https://api.toiletapi.com/upload/6b12fd2f-e896-46f9-b38f-25cf42cee4b4",onSmoothlyFormSubmit:t=>{Object.entries(t.detail.value).forEach((([t,e])=>console.log(t,e)))}},o("smoothly-input",{key:"4ec033bb9d51a7edc81cce2a1fde55bd21458318",readonly:true,name:"First Name",value:"John"},"First name"),o("smoothly-input",{key:"8d6abee797b1c9b60efeb068c828453174401012",showLabel:false,name:"Last name",value:"Doe"},"Last name",o("smoothly-input-clear",{key:"8caeac3cbd2290eaeeda549aea083d4499b960c5",size:"icon",slot:"end"})),o("smoothly-input",{key:"9a22277ed064a84b98a8c68c5f176758735748f0",type:"phone",name:"Phone",value:"777888999"},"Phone",o("smoothly-input-reset",{key:"2b45ff8ceaf71289d350e102d53123dc1c82600f",size:"icon",slot:"end"})),o("smoothly-input-radio",{key:"15856b48204c21b5f7318df22130e17aa3e14e8d",clearable:true,name:"radioFirstInput"},o("label",{key:"c94b6e0c185c8ab4325161a6e4249863017e5eb2",slot:"label"},"Clearable"),o("smoothly-input-radio-item",{key:"e978bde5ec519ab872eac3fb2a7d75b493099f31",value:"first"},"Label 1"),o("smoothly-input-radio-item",{key:"3c30fd0d9b549f93c912759f8329570db377df79",selected:true,value:"second"},"Label 2"),o("smoothly-input-radio-item",{key:"2f3f773cade1c39fa2a121b24ba2778a42d9a9b0",value:"third"},"Label 3")),o("smoothly-input-color",{key:"f1e0b0b1e759c85c5de1f3a8af9818b41c692bdb",name:"color"},"Color"),o("smoothly-input-select",{key:"7e1069ff0515224e17145539afefec11979ed88c",multiple:true,menuHeight:"7.5items",placeholder:"Select...",name:"select-month"},o("label",{key:"c42749acb44e6e7db99f4e7981f20ad0c09f1694",slot:"label"},"Month multiple select"),o("smoothly-item",{key:"fdd0c90294bdf50d77ccf187777fdd804760b8ac",value:"1"},"January"),o("smoothly-item",{key:"4f0c9d90f6909eaacccd5d385e317832f5a8b213",value:"2"},"February"),o("smoothly-item",{key:"7779ea4af1f17cb48ef0249b7857262deb6c485d",value:"3"},"March"),o("smoothly-item",{key:"5f15c3d32240bfb7c3b8d0a61f90599697b8e2a0",value:"4"},"April"),o("smoothly-item",{key:"0952c95b2cf623f5573d70b5fa39b1c1ce008f16",value:"5"},"May"),o("smoothly-item",{key:"1352e9245e39341d99d1bc8d051691b6b70dac37",value:"6"},"June"),o("smoothly-item",{key:"7eddedff608a9148cb2b9c17f23ac2108b2190fd",value:"7"},"July"),o("smoothly-item",{key:"627e81c5c7ddd5e1230b6eead20ac7932edbff9a",value:"8"},"August"),o("smoothly-item",{key:"587bcf666e0bc92c14f5665f975563f06a419bac",value:"9"},"September"),o("smoothly-item",{key:"896f05e2b88d7613cbc7f21b2aa4c58f1ae3938d",value:"10"},"October"),o("smoothly-item",{key:"fb539afa5edd3fe8391df5fc9d63fcb84940512c",value:"11"},"November"),o("smoothly-item",{key:"959e9af2c479a299431f302041649bd86f5db331",value:"12"},"December")),o("smoothly-input-select",{key:"64e83fb7dba19c8c21b5697eade0c7c5404d330c",name:"select-icon",clearable:false,showSelected:false},o("smoothly-item",{key:"b1a055ab1c73f28e0b49e626561aeff83efb124b",value:"folder",selected:true},o("smoothly-icon",{key:"9ba931c9dd28c9f88168f5ab94fd80bc6f7f6bc0",size:"small",name:"folder-outline"})),o("smoothly-item",{key:"acd791714a16504b5dc6a56f2fbfc89cf1ef4600",value:"camera"},o("smoothly-icon",{key:"d65e7beb3c74941bf494769126124ef79ce800d0",size:"small",name:"camera-outline"}))),o("smoothly-input-checkbox",{key:"d6f2f199daf447bb0992ca8839b89e4e14166846",name:"checkbox"},"Check the box"),o("smoothly-input-checkbox",{key:"79885d84642626f7cba6d348d0044f2c8037007e",name:"checkbox2",checked:true},"Check the box 2"),o("smoothly-input-range",{key:"7e791279c3b1bd2898d4c5e9e35ef9df76aa14cf",step:1,name:"range3",value:20,label:"Range"}),o("smoothly-input",{key:"f7b07cef9882952dc91be6484c04ba459ef5db62",name:"pets.0.name"},"First Pet's Name"),o("smoothly-input-range",{key:"44b404105c6d9aa19c7f14ac529e7b8ab3f964e9",name:"pets.0.age",max:100,step:1,label:"First Pet's Age"}),o("smoothly-input",{key:"aca9bc7aebd243f8e82158d1c60b7a69886e9a02",name:"pets.1.name"},"Second Pet's Name"),o("smoothly-input-range",{key:"674b16d94949bcbd3fd4980b0b262ba580efbd5b",name:"pets.1.age",max:100,step:1,label:"Second Pet's Age"}),o("smoothly-input",{key:"b25175ffa941b70d606a66db0f97e61547faf5b9",name:"pets.2.name"},"Third Pet's Name"),o("smoothly-input-range",{key:"0113d466fc09afc4734a65500cdc20b06267d77d",name:"pets.2.age",max:100,step:1,label:"Third Pet's Age"}),o("smoothly-input-range",{key:"d06183dd7731f6a70070ff0d823fb18ad8e4a10f",dual:true,name:"dualRange",min:0,max:100,step:1,label:"Dual Range"}),o("smoothly-input-file",{key:"ed5cf91c1db69c748cf52d4a99601fc2ddd675eb",name:"profile",placeholder:"Click or drag your profile picture here..."},o("span",{key:"f72fba530a1ee1d6f6a021544863dbb892f5a955",slot:"label"},"Profile"),o("smoothly-icon",{key:"dae1cc212fb3ea87ec62ac7e40c7d489bcb5cb1d",slot:"button",name:"person-circle-outline",size:"tiny",fill:"default"})),o("smoothly-input",{key:"0e9e8dc38f055440bba351cb5b7c3186d480f661",type:"duration",name:"duration",value:{}},"Duration"),o("smoothly-input-clear",{key:"ce7946c654f4a4cef855455a94311b08eee47108",fill:"default",type:"form",color:"warning",slot:"clear",size:"icon",shape:"rounded"}),o("smoothly-input-edit",{key:"c77b9febf666fac99980b868327a3a03946edb1a",fill:"default",type:"form",color:"tertiary",slot:"edit",size:"icon",shape:"rounded"}),o("smoothly-input-reset",{key:"d1597484a38571db597eecca554f706f484b8d08",fill:"default",type:"form",color:"warning",slot:"reset",size:"icon",shape:"rounded"}),o("smoothly-input-submit",{key:"0fb965b190a21ff54bb69a34b41bf8b264b06b81",delete:true,slot:"delete",color:"danger",size:"icon",shape:"rounded"}),o("smoothly-input-submit",{key:"2003e45ab3c0fa5301cbbc39717b9c2dd3b74af5",fill:"default",color:"success",slot:"submit",size:"icon",shape:"rounded"})))}};const ls=class{constructor(e){t(this,e)}render(){return o(s,{key:"d0889b4a3e456b2fb26a93597566c7453d46747f"},o("h2",{key:"471a1e8530903494b0bdd1a9eff533019d8c5dd0"},"Card"),o("smoothly-form",{key:"2ec006bf008bd8e02a17402a3fb28f5c65123d68",looks:"grid",onSmoothlyFormSubmit:t=>alert(JSON.stringify(t.detail))},o("smoothly-input",{key:"5ef72a77c01144388d22485c148752b64b4a3bf9",type:"card-number",name:"card"},"Card #"),o("smoothly-input-submit",{key:"c00fc4964eaaf03ab3201ea1e698e19e634041f7",size:"icon",slot:"submit",color:"success",fill:"solid"}),o("smoothly-input",{key:"bf05960ab0adf45c8ab9438626e6ef6bff49d9c9",type:"card-expires",name:"expires"},"Expires"),o("smoothly-input",{key:"3d4ffb589693919a6e24b8870f6b29a3a93d05c9",type:"card-csc",name:"csc"},"CVV/CVC"),o("smoothly-input",{key:"e5238377f611551e8c787df7e111b812776e3ea5",type:"text",name:"name.first"},"First Name"),o("smoothly-input",{key:"bbbf04daa4ce51c605cb4abdfe40f2dcebc9d794",type:"text",name:"name.last"},"Last Name")))}};const ns=class{constructor(e){t(this,e);this.name="Initial name";this.currency="EUR";this.date=C.Date.now();this.currencies=["GBP","SEK","EUR","USD"]}nameChanged(t,e){console.log(`updated name from '${e}' to '${t}'`)}async submitHandler(t){t.stopPropagation();console.log("Received event. Processing...",t.detail);if(!(typeof t.detail.value.name=="string")){console.error("Bad input. Resolving false.")}else if(!(typeof t.detail.value.date=="string")){console.error("Bad input. Resolving false.")}else if(!C.Currency.is(t.detail.value.currency)){console.error("Bad input. Resolving false.")}else{await new Promise((t=>window.setTimeout(t,1e3)));this.name=t.detail.value.name;this.date=t.detail.value.date;this.currency=t.detail.value.currency;console.log("Finished processing successfully. Resolving true.");t.detail.result(true)}t.detail.result(false)}render(){return o(s,{key:"1061bb8a73e16641920a69ed39c2861e1181cfeb"},o("h2",{key:"2cda89170ac80504da7efbde49166b1bbdab7ec4"},"Controlled"),o("smoothly-form",{key:"a31ac6ae0da84799c93e0027bb209d151594b6c3",readonly:true,looks:"grid",onSmoothlyFormSubmit:t=>this.submitHandler(t)},o("smoothly-input",{key:"8a5ebd13b22a4b98b427f3090be3415738d29111",type:"text",name:"name",value:this.name},"Name"),o("smoothly-input-select",{key:"6c5209dc75ed440b3f42ba06585c3ad056ad09bc",name:"currency"},o("span",{key:"6d756e50b45c999a90ef1aafc1020d13d8720269",slot:"label"},"Currency"),this.currencies.map((t=>o("smoothly-item",{selected:t==this.currency,value:t},t)))),o("smoothly-input",{key:"b1f7dc38934053c148836e5b5d91accd819a4a5d"},"Dummy"),o("smoothly-input-month",{key:"e8e1765d0ba064787b14bc1a339ac64dca884fab",name:"date",value:this.date,next:true,previous:true},o("span",{key:"983f2faab5366f2658f80d2e4f8861df083e0dfe",slot:"year-label"},"Year"),o("span",{key:"a5ee74e1293e85da358c248aa272613948236166",slot:"month-label"},"Month")),o("smoothly-input-edit",{key:"f49c8c23ce5612594a96895cd7d690fac88421e9",slot:"edit",size:"icon",color:"primary",fill:"default"}),o("smoothly-input-reset",{key:"28ea077e4c88330a476849a178b74abe55658740",slot:"reset",size:"icon",color:"warning",fill:"default"}),o("smoothly-input-submit",{key:"13b11813f5d9521d04c14b847d4aac6db9ff4a10",slot:"submit",size:"icon",color:"success"})))}static get watchers(){return{name:[{nameChanged:0}]}}};const rs=()=>`.sc-smoothly-form-demo-date-h{display:block}`;const cs=class{constructor(o){t(this,o);this.notice=e(this,"notice");this.validator=m({date:f("isoly.Date",C.Date.is)})}async submitHandler(t){t.stopPropagation();if(!this.validator.is(t.detail.value)){console.error(`Type is incomplete.`);this.notice.emit(S.failed(`Type is incomplete.`))}else{this.notice.emit(S.succeeded(`Type is complete!`));t.detail.result(true)}t.detail.result(false)}render(){return o(s,{key:"f87469968c363fc2e6908a6b8323d31d10e43f7b"},o("h2",{key:"1b039d54dc14bd23fdf4a67404493fe4fa1002e5"},"Date input"),o("smoothly-form",{key:"503627a427a6e50eaacb0a9aed71b057f0631a35",looks:"border",type:"create",validator:this.validator,onSmoothlyFormSubmit:t=>this.submitHandler(t)},o("smoothly-input-date",{key:"a0e1a4482ab53227b1833ee32edf37537766c34b",name:"date"},"Date"),o("smoothly-input-submit",{key:"3ca7baebc20a2378b0858b84aa4f420d80cc035d",slot:"submit"},o("smoothly-icon",{key:"44b553b4e0cdc44462ca87e7a2c25ab86be2cc34",name:"checkmark-outline"}))))}};cs.style=rs();const hs=()=>`.sc-smoothly-form-demo-date-range-h{display:block}`;const ds=class{constructor(o){t(this,o);this.notice=e(this,"notice");this.validator=m({range:f("isoly.DateRange",C.DateRange.is)})}async submitHandler(t){t.stopPropagation();if(!this.validator.is(t.detail.value)){console.error(`Type is incomplete.`);this.notice.emit(S.failed(`Type is incomplete.`))}else{this.notice.emit(S.succeeded(`Type is complete!`));t.detail.result(true)}t.detail.result(false)}render(){return o(s,{key:"4f37b88dde84ff912e87e63fd814017216377e9d"},o("h2",{key:"dea9d4cd7d15f08b949e7f686e0274df57d166b9"},"Date-range input"),o("smoothly-form",{key:"a6a14c6ef899d219179ad3e84ab711bc011fbb3c",looks:"border",type:"create",validator:this.validator,onSmoothlyFormSubmit:t=>this.submitHandler(t)},o("smoothly-input-date-range",{key:"6b4b82499434e807c117b807c4e446cf614762d3",name:"range"},"Range"),o("smoothly-input-submit",{key:"99495f5f3db19bd9c443e25ec94d013d6c46fd4f",slot:"submit"},o("smoothly-icon",{key:"ab29510526ee2915eccafbed8eec41bf9f39c7cf",name:"checkmark-outline"}))))}};ds.style=hs();const ms=class{constructor(e){t(this,e)}render(){return o(s,{key:"145a8d63bafe3ecc82c765765c4a0f1518960b7b"},o("h2",{key:"4318914484c253d03811ec55f71c5a5dd64bc1a9"},"Login"),o("smoothly-form",{key:"dac54028546467ca44a7820470b39bc1af8292e7",looks:"border"},o("smoothly-input",{key:"2192584adf11193655e622644f7e40f6ee158693",type:"text",name:"username"},"Username"),o("smoothly-input",{key:"cd8d66e6d9a8a07f25cb8ac4386e3dffa6556d02",type:"password",name:"password"},"Password"),o("smoothly-input-reset",{key:"ffeef7e33af77477942b8990b8e61482037dedb6",slot:"reset",type:"form",size:"icon",color:"warning"}),o("smoothly-input-submit",{key:"1a0bbd656c65bc7f7e3e5f3c8553b81f5e4a9112",slot:"submit"})))}};const ys=()=>`.sc-smoothly-form-demo-pet-h{display:grid;grid-template-columns:2fr 1fr;grid-template-rows:auto auto;grid-column-gap:2rem}.sc-smoothly-form-demo-pet-h smoothly-input-checkbox[name="hasOwner"].sc-smoothly-form-demo-pet,.sc-smoothly-form-demo-pet-h>smoothly-form.sc-smoothly-form-demo-pet smoothly-tabs.sc-smoothly-form-demo-pet{flex-basis:100%}`;const bs=class{constructor(e){t(this,e);this.hasOwner=false;this.owner={}}render(){var t,e;return o(s,{key:"3555b678ce1821ff509e6c6bf7cd5f846150361e"},o("h2",{key:"977304593cbf95b3a07e55d27bcba52421c3a806"},"Pet"),o("h3",{key:"30d9e280ca0f61806f9267fd2cb64b0018a13fd0"},"Value"),o("smoothly-form",{key:"9fea67b46ff29a01b7a15aa482cd7d756c766315",looks:"border",onSmoothlyFormSubmit:t=>alert(JSON.stringify(t.detail)),onSmoothlyFormInput:t=>this.value=Object.assign({},t.detail)},o("smoothly-input",{key:"0e4dcd3f6853fcd923db4e2aec019d5448a9985c",type:"text",name:"name.first",value:"Johnny"},"Name",o("smoothly-input-reset",{key:"5741904cab68af6d1be19fe0f8a54490b84d21ba",slot:"end"})),o("smoothly-input",{key:"c866df63069281710b3a331655de6d052402b139",type:"integer",name:"age"},"Age (Years)"),o("smoothly-input-checkbox",{key:"0b1b661bf19f1ca7fa08fe79af51082843d3170c",name:"hasOwner",onSmoothlyInputLoad:t=>t.stopPropagation(),onSmoothlyInput:t=>{this.hasOwner=t.detail.hasOwner;t.stopPropagation()}},"Has Owner",o("smoothly-input-reset",{key:"b11ab6e4f6c4f5c3b58b7b1d697031830ef6c897",slot:"end"})),this.hasOwner&&o(i,{key:"f73c34c51c677c929481e3467a4a1720d2af6192"},o("smoothly-input",{key:"93e88b422344bf296bc08e1c87153ee5e171f116",type:"text",name:"owner.firstName",value:this.owner.firstName,onSmoothlyInput:t=>this.owner=Object.assign(Object.assign({},this.owner),{firstName:t.detail["owner.firstName"]})},"Owner First Name",o("smoothly-input-reset",{key:"b7364d965671c8389a4ebf10b6dff81a8f83579d",slot:"end"})),o("smoothly-input",{key:"e02d9a248eadadca31f2b7e54a4fe2d7dcb78ab7",type:"text",name:"owner.lastName",value:this.owner.lastName,onSmoothlyInput:t=>this.owner=Object.assign(Object.assign({},this.owner),{lastName:t.detail["owner.lastName"]})},"Owner Last Name"),o("smoothly-input-file",{key:"c62884a682169ef822236373673f6b21c960fe79",name:"owner.picture"},o("span",{key:"dee1e245fbb06cfff787b50beff581bc48dff312",slot:"label"},"Owner picture")),o("smoothly-input-date",{key:"968c755e88629fd76f61cc109f8a7c85c6b87b14",name:"owner.birthday",value:this.owner.birthday,onSmoothlyInput:t=>this.owner=Object.assign(Object.assign({},this.owner),{birthday:t.detail["owner.birthday"]})},"Owner birthday",o("smoothly-input-reset",{key:"bdc545954853494c63ec34555b90f35f12a081c1",slot:"end"})),o("smoothly-input-date-range",{key:"e18ac1955b66407c2dd2aebb3d1b616752cba832",name:"owner.ownedRange",start:(t=this.owner.ownedRange)===null||t===void 0?void 0:t.start,end:(e=this.owner.ownedRange)===null||e===void 0?void 0:e.end,onSmoothlyInput:t=>this.owner=Object.assign(Object.assign({},this.owner),{ownedRange:t.detail["owner.ownedRange"]})},"Owner ownedRange",o("smoothly-input-reset",{key:"56d1ce3d8b2a0a0daf1b0e66b5e5fd2fca291d12",slot:"end"})),o("smoothly-input-range",{key:"aa6cf832bc63235bc0590ac6cab2da6b1d5923f0",name:"owner.height",step:1,max:250,value:this.owner.height,onSmoothlyInput:t=>this.owner=Object.assign(Object.assign({},this.owner),{height:t.detail["owner.height"]})},"Owner's Height",o("smoothly-input-reset",{key:"ecae9fdf30760aa00a799a24729221ef0bb26786",slot:"end"})),o("smoothly-input-select",{key:"587127c00899a6b985a1ba41f73c906e94abf504",name:"owner.favoriteHat"},o("span",{key:"02289ec45dd570ca382776beb9fa34d2552d92da",slot:"label"},"Owner's Favorite Hat"),["🎩 top hat","🧢 cap","👒 sun hat","❌ none"].map(((t,e)=>o("smoothly-item",{value:t,key:e,selected:this.owner.favoriteHat==t},t))),o("smoothly-input-reset",{key:"52aeef0a52c37c0ad9236c99e3a5af20c26f7c6d",slot:"end"})),o("smoothly-input-color",{key:"2640d32a91c9e12b2ffb9564e44e43bd24d97162",name:"owner.favoriteColor",value:this.owner.favoriteColor?g.toHex(this.owner.favoriteColor):undefined,onSmoothlyInput:t=>this.owner=Object.assign(Object.assign({},this.owner),{favoriteColor:t.detail["owner.favoriteColor"]})},"Owner's Favorite Color",o("smoothly-input-reset",{key:"9253ea9ae7e24f1fc70da6f7ab04bbe38599024a",slot:"end"})),o("smoothly-input-radio",{key:"f6b4f1e0b3c1e8eef422c154b22454610e7e6af3",name:"owner.favoritePizza",value:this.owner.favoritePizza,onSmoothlyInput:t=>this.owner=Object.assign(Object.assign({},this.owner),{favoritePizza:t.detail["owner.favoritePizza"]})},o("span",{key:"6ec795591acadf04027319369d72e9470787945f",slot:"label"},"Owner's Favorite Pizza"),["vesuvio","capricciosa","quattro formaggi"].map(((t,e)=>o("smoothly-input-radio-item",{value:t,key:e},t)))),o("smoothly-input-checkbox",{key:"34815b0ebee805a4481312379025218fd46f01c7",name:"owner.hasPet",checked:this.owner.hasPet,onSmoothlyInput:t=>this.owner=Object.assign(Object.assign({},this.owner),{hasPet:t.detail["owner.hasPet"]})},"Has Pet")),o("smoothly-tabs",{key:"ae43c2284ea51f72e415e00a1ada8cab10afebdb"},o("smoothly-tab",{key:"6485c24546d14f5845987da38646066c8f066c61",label:"Dog",name:"dog"},o("smoothly-input",{key:"257d6b7f1140ff7210173fb0e5de4704000bc432",type:"text",name:"dog.breed"},"Breed"),o("smoothly-input-file",{key:"a75e2029fe5b630410fee39462d197489a5291db",name:"dog.picture"},o("span",{key:"7d881935f028284bb80a3e33a47baf59813bc63a",slot:"label"},"Dog picture")),o("smoothly-input-date-time",{key:"f8991e1f543ad09a241977a2570a473597c79a80",name:"dog.lastWalk"},"Time of last walk"),o("smoothly-input-date",{key:"abdf29fd0b95142a6a28aacbc2a3de52b28acfa6",name:"dog.birthday"},"Dog birthday"),o("smoothly-input-date-range",{key:"07710a1af7f884114fee361d80b27e9351cd85d5",name:"dog.dateRange"},"Dog date range"),o("smoothly-input-select",{key:"1307c6bdafc9598e829ee60c4ce7c1b1546dc7af",name:"dog.favoriteHat"},o("span",{key:"4ed1cd24bba8e63db60d63cffdd1417023117a2d",slot:"label"},"Dog's Favorite Hat"),["🎩 top hat","🧢 cap","👒 sun hat","❌ none"].map(((t,e)=>o("smoothly-item",{value:t,key:e},t)))),o("smoothly-input-color",{key:"0b049778a99bee6df6d2ec48dbc071697136fe16",name:"dog.favoriteColor"},"Dog's Favorite Color"),o("smoothly-input-radio",{key:"c65093016a5b90c6bb25e85e4e3575124712c7be",name:"dog.favoritePizza"},o("span",{key:"9565009584ed77b05040ed9468700f116adb563c",slot:"label"},"Dog's Favorite Pizza"),["vesuvio","capricciosa","quattro formaggi"].map(((t,e)=>o("smoothly-input-radio-item",{value:t,key:e},t)))),o("smoothly-input-checkbox",{key:"666be38409bc89d3e4650ad9401c854327ebefc1",name:"dog.hasPet"},"Has Pet")),o("smoothly-tab",{key:"fb5f8f5459b5f642b0c6a2439b319a42002959a4",label:"Cat",name:"cat",open:true},o("smoothly-input",{key:"682f5638f562e61dd092f83eccf7925f720cf194",name:"cat.favoriteFood"},"Favorite Food")),o("smoothly-tab",{key:"c5482174c9405a1136f012fa82cca350c2ed83c2",label:"Parrot",name:"parrot"},o("smoothly-input",{key:"f78b450a29382f8f856ebbff27745c953af53308",type:"price",name:"parrot.price",currency:"EUR"},"Summary Price"),o("smoothly-input-file",{key:"efbd349e10beda447d69c20474c692e2688bcaab",name:"parrot.picture"},o("span",{key:"01a1817ed064f0181742eb5aeb3f2723338f84e7",slot:"label"},"Summary picture"),o("smoothly-input-clear",{key:"be120da97155f2f5591d924aa32604d6086e31c1",slot:"end"})),o("smoothly-input-date",{key:"e59e3a24b479cfbd94eb3c6c7c5f394f93049274",name:"parrot.birthday"},"Summary birthday"),o("smoothly-input-date-range",{key:"4e918229a0745964257c0fb32f0ecd1a4283cdca",name:"parrot.ownedRange",start:"2020-01-01",end:"2020-01-15"},"Summary ownedRange",o("smoothly-input-reset",{key:"514983470344439c22cc6b68bace5b1609f04f89",slot:"end"})),o("smoothly-input-range",{key:"cca92a33c0bc46d7bf85e86e467b9f703063d35d",name:"parrot.height",label:"Height"},o("smoothly-input-reset",{key:"edb1126fcabc71b9d98f33257c8d282982e8ea36",slot:"end"})),o("smoothly-input-select",{key:"868654a72f5642b033392aa33b3b107b1d7ddfa4",name:"parrot.favoriteHat"},o("span",{key:"f811c0c08c4277aba3e85da353903b0185bb9df7",slot:"label"},"Summary's Favorite Hat"),["🎩 top hat","🧢 cap","👒 sun hat","❌ none"].map(((t,e)=>o("smoothly-item",{value:t,key:e},t)))),o("smoothly-input-month",{key:"4226a5e036817f3a80fce926c6761cee1a8bcd66",name:"parrot.month"},o("span",{key:"61570b4fc31693fd2d3f81bea327cfc890ea6c54",slot:"month-label"},"Summary month")),o("smoothly-input-color",{key:"23a77f1358748ee93995b71253bf43641593fc3c",name:"parrot.color"},"Summary Color"),o("smoothly-input-radio",{key:"a32718e3246ec6ffa4cb33eab22c6e549ef764f0",name:"parrot.favoritePizza"},o("span",{key:"5283e5e305bbc586ac74665518f077a2b20e261a",slot:"label"},"Summary's Favorite Pizza"),["vesuvio","capricciosa","quattro formaggi"].map(((t,e)=>o("smoothly-input-radio-item",{value:t,key:e},t)))),o("smoothly-input-checkbox",{key:"15c5b92cd4ee1c6f46880327a7737abba978cb6a",name:"parrot.hasPet"},"Has Pet"))),o("smoothly-input-submit",{key:"975b1bbb887c933a2eacb4bc1a79dfdf99d73972",size:"icon",slot:"submit",color:"success",fill:"solid"})),o("smoothly-display",{key:"09fef0282ab5dea1bceacee812f4d9563c21ed2c",type:"json",value:this.value}))}};bs.style=ys();const us=class e{constructor(e){t(this,e)}render(){return o(s,{key:"d89cfc4c738e18c59e84d5a40ac90b59ebcaa551"},o("h2",{key:"d16f1cd51c9a42f877e8e63bd29f7dcb438fa618"},"Prices"),o("smoothly-form",{key:"54c6b506b280868839cf1c7b8c164f522a75f565",looks:"line"},o("smoothly-input",{key:"fc19f9f370d6a24be561adf18631cfda95ad27fe",type:"price",name:"no"},"No currency"),o("smoothly-input",{key:"339ee6c1ec60a602b3393741a54cbdb4a7847453",type:"price",name:"crowns",currency:"SEK",toInteger:true},"SEK (toInteger)"),o("smoothly-input",{key:"9bc604033f31ac1469bd7b50ff0c69baeab75b22",type:"price",name:"usDollar",currency:"USD"},"USD"),o("smoothly-input",{key:"9e38c5260d5cef788a1b1e493a54de7350d5ce10",type:"price",name:"pounds",currency:"GBP"},"GBP"),o("smoothly-input",{key:"63bb932ba93d35014c30c6ff8e0ff7cb0275da6a",type:"price",name:"peso",currency:"UYW"},"UYW"),o("smoothly-input",{key:"b0e40b64dc06806a270439ee5eef3ebbf65cfc06",type:"price",name:"iceland",currency:"ISK"},"ISK"),o("smoothly-input",{key:"1b9e0e5f2c19a80eebc03c24c90e28f91c4be87d",type:"price",name:"Palladium",currency:"XPD"},"XPD (Palladium)"),o("smoothly-input-reset",{key:"cf298b534cb48e04ddf87ad3bad2297254c7dfab",slot:"reset",fill:"default",type:"form",color:"warning"}),o("smoothly-input-submit",{key:"0db94f32db809a84dfec09db0f8af27de58745fa",slot:"submit"})))}};var ps;(function(t){t.type=m({date:f("isoly.Date",C.Date.is),amount:k()})})(ps||(ps={}));var fs;(function(t){t.type=m({schedule:ps.type.array()})})(fs||(fs={}));const gs=class{constructor(e){t(this,e)}render(){return o(s,{key:"a2126d7eaeabd3063412c258990a01b868a0c173"},o("h2",{key:"872ca8c246de93f89109157b26f4ef1c9a9391ad"},"Schedule"),o("smoothly-form",{key:"89c101a95b88d1ff8b8da72905b2e096dd98ddc5",looks:"line",validator:fs.type},o("smoothly-input-date",{key:"8413214b637cfe958f89bdf1c71fc77709f18103",name:"schedule.0.date"},"Date"),o("smoothly-input",{key:"3e611fb26a30656a7e564137421cd0d14da1ca95",name:"schedule.0.amount",type:"price"},"Amount"),o("smoothly-input-date",{key:"7a17cd21c525191ff38c33598f4e4fbca854ec14",name:"schedule.1.date"},"Date"),o("smoothly-input",{key:"d15a3abf4d7f73a8c926c5aa1585b41d998ca0cd",name:"schedule.1.amount",type:"price"},"Amount"),o("smoothly-input-date",{key:"4ee81b72873b84cbdbec86b3ed5503c7b5a251e3",name:"schedule.2.date"},"Date"),o("smoothly-input",{key:"34d786c0cc21d919af28f510a597609f8941abbb",name:"schedule.2.amount",type:"price"},"Amount"),o("smoothly-input-reset",{key:"a397f462d936320060941134796d925b855c0d87",slot:"reset",fill:"default",type:"form",color:"warning"}),o("smoothly-input-submit",{key:"43220117e87d3d7145b25915caa03850477c3795",slot:"submit"})))}};const ks=class{constructor(e){t(this,e)}render(){return o(s,{key:"673b06b46e297f0abc1c49bcf7ee7acf46cb0295"},o("h2",{key:"4ffa92eb6f9261555d777d05c3e78c404a7df03a"},"Transparent"),o("smoothly-form",{key:"03c25db049779ee90220f0028f18e6e70c037408",looks:"transparent",onSmoothlyFormSubmit:t=>console.log(t.detail.value)},o("smoothly-input-file",{key:"99424c41ab07b388c9e9c35c799e2daec342389b",name:"file"},o("span",{key:"4b686a0fe7159e757d1a76070e2b6246e17a15dc",slot:"label"},"File"),o("smoothly-icon",{key:"8e323ca63e51c6b5acb6d4d8b31641dbbd4e98b0",slot:"button",name:"folder-open-outline",size:"small"})),o("smoothly-input",{key:"fba6aa2567e053902d9100831573d2fc6aaac1b2",type:"duration",looks:"transparent",placeholder:"h:mm"},"Input"),o("smoothly-input-date",{key:"49eeabd20143a15cf14ff6289a3aa28be531a5d9"},"Date"),o("smoothly-input-date-range",{key:"ea4235cc90265d0b73c96d2f2ee9665ba62c40e4"},"Date Range"),o("smoothly-input-select",{key:"ed44815dd57ba74c31a436fff6ece4edcd8091ae",name:"transport"},o("smoothly-item",{key:"f7679b58d170d3bbf264fc67556b21ecc55c7b3e",value:"plane"},o("smoothly-icon",{key:"a16734c2ed81ae0985db7328c389818d717f976e",name:"airplane-outline"})),o("smoothly-item",{key:"8c08a4ce4812a1ecb8d0304c002b6179f586a21f",value:"car"},o("smoothly-icon",{key:"2488556ed2e45e6e4fff17c647ae987b8f4f1773",name:"car-outline"})),o("smoothly-item",{key:"5b0cb1c46c7783a49b954b5eba8bafcd23cf2985",value:"bus",selected:true},o("smoothly-icon",{key:"62b98cc6a689f5c1d49eee728b697321a85283f8",name:"bus-outline"}))),o("smoothly-input-submit",{key:"5a229bbbd0cf22d44080a22d583403569ca62a5f",icon:"checkbox-outline"})))}};var vs;(function(t){t.type=m({name:m({first:u(),middle:u().optional(),last:u()}),age:k((t=>18<=t&&t<=120)),country:f("CountryCode",C.CountryCode.Alpha2.is),birthday:f("Date",C.Date.is)})})(vs||(vs={}));const ws=()=>``;const xs=class{constructor(e){t(this,e)}render(){return o(s,{key:"171f1c7dfeac8a1789c3bc00699ffc273efbd59c"},o("h2",{key:"cc04112cd3cf2a247b4b9310a1f4af3215e755f7"},"Typed Contact"),o("smoothly-form",{key:"07052256c424c1d3167d729974ce53660153d6f2",validator:vs.type},o("smoothly-input",{key:"055ac603967bf083319d0fdeaa54f7143419c66b",name:"name.first"},"First Name"),o("smoothly-input",{key:"3088fee3b1126a6bf878435428e4922c4c6066c1",name:"name.middle"},"Middle Name (optional)"),o("smoothly-input",{key:"936e6cae0987a5524539aa9058213dcb6d32ae00",name:"name.last"},"Last Name"),o("smoothly-input",{key:"f14199b95c41d2573c29b5d0fa02b84de510b6ed",name:"age",type:"integer"},"Age (18-120)"),o("smoothly-input-select",{key:"00d2bc235840996e1316a7730e4007d1c65e54fd",name:"country"},o("span",{key:"4f287287585dd68aa2d3263ccffc7b240d9d7a0e",slot:"label"},"Country"),C.CountryCode.Alpha2.values.map((t=>o("smoothly-item",{value:t},C.CountryCode.Name.en.from(t))))),o("smoothly-input-date",{key:"74d7b9b3932a9cd9c164e425fc6548a781ab9f09",name:"birthday"},"Date of birth"),o("smoothly-input-reset",{key:"1cab6d7ebb9ee4b619a43f400bade9f94d1ed6a7",slot:"reset",type:"form",size:"icon",color:"warning"}),o("smoothly-input-submit",{key:"2616a4bd6f66a1bd770fa48328562cce56aa0414",slot:"submit",size:"icon",color:"success"})))}};xs.style=ws();const Cs=()=>`.sc-smoothly-frame-h{display:block;width:100%;height:100%}[hidden].sc-smoothly-frame-h{display:none}.sc-smoothly-frame-h>iframe.sc-smoothly-frame{border:none;padding:none;margin:none}`;const Ss=class{constructor(o){t(this,o);this.trigger=e(this,"trigger");this.message2=e(this,"message2")}get contentWindow(){const t=this.element&&this.element.firstElementChild?this.element.firstElementChild:undefined;return t&&t.contentWindow||undefined}get defaultOrigin(){const t=this.url.match(/^(([a-z]+\+)*[a-z]+:\/\/)?[^/^\n]+/);return t?t[0]:"*"}componentDidLoad(){var t;if(this.contentWindow){v.listen((t=this.origin)!==null&&t!==void 0?t:this.defaultOrigin,((t,e)=>{if(t==this.name){if(d.is(e)){this.trigger.emit(e)}else{this.message2.emit({destination:t,content:e})}}}),window)}}async send(t,e){var o,s;if(typeof t=="string"){v.send(((o=this.origin)!==null&&o!==void 0?o:this.defaultOrigin)+"#"+t,e,this.contentWindow)}else if(v.is(t)&&this.contentWindow){v.send({destination:((s=this.origin)!==null&&s!==void 0?s:this.defaultOrigin)+"#"+t.destination,content:t.destination},this.contentWindow)}}render(){return[]}get element(){return a(this)}};Ss.style=Cs();const zs=()=>`[fill].sc-smoothly-icon-h{background:none}.sc-smoothly-icon-h{display:flex;flex-shrink:0;align-items:center;justify-content:center;box-sizing:content-box}[rotate].sc-smoothly-icon-h{--rotate:rotate(var(--rotation, 0deg));transform:var(--rotate)}[flip=x].sc-smoothly-icon-h{--flip:scaleX(-1);transform:var(--flip)}[flip=y].sc-smoothly-icon-h{--flip:scaleY(-1);transform:var(--flip)}[rotate][flip].sc-smoothly-icon-h{transform:var(--rotate)var(--flip)}[hidden].sc-smoothly-icon-h{display:none}[size=tiny].sc-smoothly-icon-h{--smoothly-icon-size:1.2rem}[size=small].sc-smoothly-icon-h{--smoothly-icon-size:1.4rem}[size=medium].sc-smoothly-icon-h{--smoothly-icon-size:1.8rem}[size=large].sc-smoothly-icon-h{--smoothly-icon-size:2.8rem}[size=xlarge].sc-smoothly-icon-h{--smoothly-icon-size:4rem}.sc-smoothly-icon-h{width:var(--smoothly-icon-size, 1.8rem);height:var(--smoothly-icon-size, 1.8rem)}.sc-smoothly-icon-h.sc-smoothly-icon-s>svg{width:100%}`;const Is=class{constructor(e){t(this,e);this.fill="solid";this.name="empty"}async componentWillLoad(){await this.nameChanged()}async nameChanged(){if(this.name=="empty"){this.updateSvg();return}const t=this.latestPromise=h.load(this.name);const e=await t;if(t!=this.latestPromise){return}if(e){const t=this.sanitizeSvg(e);this.updateSvg(t)}}sanitizeSvg(t){const e=new DOMParser;const o=e.parseFromString(t,"image/svg+xml");const s=o.querySelector("svg");if(s){s.setAttribute("role","img");s.removeAttribute("width");s.removeAttribute("height")}return s!==null&&s!==void 0?s:undefined}updateSvg(t){t?this.element.replaceChildren(t):this.element.innerHTML=`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512">\n\t\t\t\t\t<title>Empty</title>\n\t\t\t\t</svg>`}render(){var t;return o(s,{key:"a04fcfccfde192d4146ebb8113809c8606bcd04f",title:this.tooltip,style:{["--rotation"]:`${(t=this.rotate)!==null&&t!==void 0?t:0}deg`}})}get element(){return a(this)}static get watchers(){return{tooltip:[{nameChanged:0}],name:[{nameChanged:0}]}}};Is.style=zs();const Ts=()=>`.sc-smoothly-icon-demo-h{display:block;width:clamp(200px, 100%, 1200px);margin:auto}[hidden].sc-smoothly-icon-demo-h{display:none}.sc-smoothly-icon-demo-h>div.sc-smoothly-icon-demo{display:flex;flex-flow:row wrap}.sc-smoothly-icon-demo-h>div.sc-smoothly-icon-demo>smoothly-icon.sc-smoothly-icon-demo{padding:1rem;position:relative}.sc-smoothly-icon-demo-h>div.sc-smoothly-icon-demo>smoothly-icon.sc-smoothly-icon-demo:hover{scale:1.5}.sc-smoothly-icon-demo-h>div.sc-smoothly-icon-demo>smoothly-icon.sc-smoothly-icon-demo:hover::after{content:attr(data-name);position:absolute;white-space:nowrap;bottom:100%;background:rgb(var(--smoothly-default-contrast));color:rgb(var(--smoothly-default-color));padding:0.25rem 1rem;z-index:1;pointer-events:none}`;const Ds=class{constructor(o){t(this,o);this.notice=e(this,"notice");this.page=0;this.display={};this.props={}}render(){return o(s,{key:"8fbea784d2ed3e61eed53bbde4bf62acd7c00c33"},o("h2",{key:"e0ffda5c80cffb4a5819b69889980d43dc873c5c"},"Filter and Variants"),o("smoothly-form",{key:"9734546f38e2bc3aa1136ec2d60ca919f96b7c78",looks:"grid",onSmoothlyFormInput:t=>this.display=t.detail},o("smoothly-input",{key:"fb615bfa1bb32cde349e9461eb7c95db4561c5f1",name:"filter"},"Filter"),o("smoothly-input-select",{key:"63402507181804347642d78531856b217174951a",name:"variant"},o("span",{key:"d301e5204b7ce8bc4d3d31ab5c0ced12f1e3d893",slot:"label"},"Variant"),o("smoothly-item",{key:"fca79aa0f519c2c9823c0fc08dba8fc7d017c184",value:"outline"},"outline"),o("smoothly-item",{key:"78f2882358c54452f4ce56f976bed73fcade9b4f",value:"sharp"},"sharp"),o("smoothly-input-clear",{key:"1f3d317162149b9abd016a5f329d69ac05683646",slot:"end"}))),o("h2",{key:"3e894f0b4aa610c5a8267a183277e272f4855a9b"},"Props"),o("smoothly-form",{key:"694c7a9bd59edbea5823eb04156dc16e0bae9712",looks:"grid",onSmoothlyFormInput:t=>{this.props=t.detail;console.log("props",this.props)}},o("smoothly-input-select",{key:"0c3057a4f67a05e690ff3b063c930465016d8dd6",name:"color"},o("span",{key:"ae91aea176ba10c3da98a60c3063ec0f43167bff",slot:"label"},"Color"),r.values.map((t=>o("smoothly-item",{value:t},o("span",{style:{background:`rgb(var(--smoothly-${t}-color))`,"margin-right":"0.5rem",width:"2.5rem",height:"2.5rem"}}),o("span",null,t)))),o("smoothly-input-clear",{key:"22657bf293b433e392d57a06ca7ae2301c50676d",slot:"end"})),o("smoothly-input-select",{key:"a3cb883bd3ce072da544acb7c4a9d23de599d63f",name:"fill"},o("span",{key:"f2332f34ea7fd13b2722addacbb8ccb0a02a005e",slot:"label"},"Fill"),c.values.map((t=>o("smoothly-item",{value:t},t))),o("smoothly-input-clear",{key:"8518dae156b2233616eaaa468421a05c8f34025f",slot:"end"})),o("smoothly-input-select",{key:"0c684a06181b5e3aba3e9285c27e5dfc95b11fba",name:"customColor",menuHeight:"12items",ordered:true},o("span",{key:"bdf65faa5cc2d6ac46c2d8f57d12f6c980dbed4f",slot:"label"},"Custom Color"),r.values.flatMap((t=>o(i,null,["tint","color","shade","contrast"].map((e=>o("smoothly-item",{value:`--smoothly-${t}-${e}`},o("span",{style:{background:`rgb(var(--smoothly-${t}-${e}))`,"margin-right":"0.5rem",width:"2.5rem",height:"2.5rem"}}),o("span",null,`rgb(var(--smoothly-${t}-${e}))`)))))))),o("smoothly-input-select",{key:"38e1df15f3e5756a231ea13ae7e603ad729cbfd5",name:"customBackground",menuHeight:"12items",ordered:true},o("span",{key:"034a6c1102fcfc4f84802b652ae4773daedcc79a",slot:"label"},"Custom Background"),r.values.flatMap((t=>o(i,null,["tint","color","shade","contrast"].map((e=>o("smoothly-item",{value:`--smoothly-${t}-${e}`},o("span",{style:{background:`rgb(var(--smoothly-${t}-${e}))`,"margin-right":"0.5rem",width:"2.5rem",height:"2.5rem"}}),o("span",null,`rgb(var(--smoothly-${t}-${e}))`)))))))),o("smoothly-input-select",{key:"bf07ed563c77658d9c8627794932cf807d4d497c",name:"flip"},o("span",{key:"f117c483d18de238eb575e23c358ecd54eec249f",slot:"label"},"Flip"),o("smoothly-item",{key:"d8d6d1da3ede777093bfb6882c4a34a498b109d1",value:"x"},"x"),o("smoothly-item",{key:"fb202fe8bf15b614abacc3778e49f2a9da67abd8",value:"y"},"y"),o("smoothly-input-clear",{key:"c6067ab01e51359091f41c82f315aa36aad09ad4",slot:"end"})),o("smoothly-input-select",{key:"9ba36e95d18097099035b4a11182091e1e7e2287",name:"size"},o("span",{key:"571f9a1953f6b3f22d18f0dd591c9743d3818687",slot:"label"},"Size"),o("smoothly-item",{key:"c38f009d2fb5df14dc7c5dbde70538f8ae5b3e04",value:"tiny"},"tiny"),o("smoothly-item",{key:"800ae091d06fe8f3f9a728ad4ac63b67a7141200",value:"small"},"small"),o("smoothly-item",{key:"b24d245d0614bae7fc0c125824c7cf6ad3a11aa2",value:"medium"},"medium"),o("smoothly-item",{key:"8fdb8c8686a36898c63d6981ef44fc2348e6018e",value:"large"},"large"),o("smoothly-item",{key:"a1d2a033d0531ca802a3241f0f7bfe3b9ab6faf6",value:"xlarge"},"xlarge"),o("smoothly-input-clear",{key:"b72340bf5146665b425c1debb51dcf46bab08a72",slot:"end"})),o("smoothly-input-range",{key:"b39307e3bd9fb244dd56b4de51f392b3522cd39d",name:"rotate",step:1,min:-180,max:180,value:0},"Rotate",o("smoothly-input-clear",{key:"b73479f5999155b57a18c1adaf4dd2a06f98fab5",slot:"end"}))),o("h1",{key:"d9423d81faff0144d5d67a1a15af7395dec71c13"},"Icons"),o("div",{key:"26499ec293ff6772322d9853841d33ad1c0a1195",class:"icons"},[...h.Name.values.filter((t=>!this.display.filter||t.includes(this.display.filter))).map((t=>this.display.variant?`${t}-${this.display.variant}`:t)),...h.Logo.values.filter((t=>!this.display.filter||t.includes(this.display.filter)))].map((t=>o("smoothly-icon",{name:t,tooltip:t,"data-name":t,color:this.props.color,style:{fill:this.props["customColor"]?`rgb(var(${this.props["customColor"]}))`:"",color:this.props["customColor"]?`rgb(var(${this.props["customColor"]}))`:"",background:this.props["customBackground"]?`rgb(var(${this.props["customBackground"]}))`:""},fill:this.props.fill,flip:this.props.flip,size:this.props.size,rotate:this.props.rotate,onClick:()=>{navigator.clipboard.writeText(t);this.notice.emit(S.succeeded(`Copied "${t}"`))}})))))}};Ds.style=Ts();var js;(function(t){function e(t,o){if(t===o){return true}if(typeof t=="object"&&typeof o=="object"){const s=Object.keys(t);if(s.length==Object.keys(o).length&&s.every((s=>e(t[s],o[s])))){return true}}return false}t.equal=e;function o(t,o){return!e(t,o)}t.notEqual=o})(js||(js={}));var Ls;(function(t){function e(t,e,a){const i=/([^.-@\s]+)/gi;return a=="backward"?o(t,e,i):s(t,e,i)}t.getWordBreakIndex=e;function o(t,e,o){let s=0;let a;while((a=o.exec(t))!=null){if(o.lastIndex-a[0].length<e){s=o.lastIndex-a[0].length}else{break}}return s}function s(t,e,o){let s=0;while(o.exec(t)!=null){s=o.lastIndex;if(o.lastIndex>e){break}}o.lastIndex<=e&&(s=t.length);return s}})(Ls||(Ls={}));class Rs{constructor(t,e){this.formatter=t;this.type=e;this.keydownHandlers={ArrowLeft:(t,e)=>t.ctrlKey||t.metaKey?e:this.moveCursor(t,e),ArrowRight:(t,e)=>t.ctrlKey||t.metaKey?e:this.moveCursor(t,e)};this.eventHandlers={beforeinput:{insertText:(t,e)=>this.insert(t,e),insertFromPaste:(t,e)=>this.insert(t,e),insertFromDrop:(t,e)=>this.insert(t,e),deleteContentBackward:(t,e)=>{t.preventDefault();if(e.selection.start==e.selection.end){this.select(e,e.selection.start-1,e.selection.end)}this.erase(e);return e},deleteContentForward:(t,e)=>{t.preventDefault();if(e.selection.start==e.selection.end){this.select(e,e.selection.start,e.selection.end+1)}this.erase(e);return e},deleteWordBackward:(t,e,o)=>{let s=e;if(this.type!="password"){t.preventDefault();s=this.deleteWord(o,"backward")}return s},deleteWordForward:(t,e,o)=>{let s=e;if(this.type!="password"){t.preventDefault();s=this.deleteWord(o,"forward")}return s},deleteByCut:(t,e)=>{this.erase(e);return e}},input:{insertReplacementText:(t,e)=>Object.assign(Object.assign({},e),{value:t.target.value}),insertCompositionText:(t,e)=>Object.assign(Object.assign({},e),{value:t.target.value}),deleteWordBackward:(t,e)=>this.type=="password"?Object.assign(Object.assign({},e),{value:t.target.value}):e,deleteWordForward:(t,e)=>this.type=="password"?Object.assign(Object.assign({},e),{value:t.target.value}):e,undefined:(t,e)=>Object.assign(Object.assign({},e),{value:t.target.value})}}}static create(t,e){let o;switch(t){case"price":o=he("price",e);break;case"integer":o=he("integer",e);break;default:o=he(t,e);break}return new Rs(o||he("text"),t)}onKeyDown(t,e){var o,s,a,i;let l=e;const n=this.keydownHandlers[t.key];if(n){const r=t.target;e.selection.start=(o=r.selectionStart)!==null&&o!==void 0?o:e.selection.start;e.selection.end=(s=r.selectionEnd)!==null&&s!==void 0?s:e.selection.end;e.selection.direction=(a=r.selectionDirection)!==null&&a!==void 0?a:e.selection.direction;const c=n(t,this.unformatState(e),e);const h=this.partialFormatState(c);if(t.defaultPrevented){r.selectionStart=h.selection.start;r.selectionEnd=h.selection.end;r.selectionDirection=(i=h.selection.direction)!==null&&i!==void 0?i:null}l=h}return l}moveCursor(t,e){t.preventDefault();let o=ae.getCursor(e.selection);let s=ae.getStalker(e.selection);o=Math.min(Math.max(o+(t.key=="ArrowLeft"?-1:1),0),e.value.length);s=t.shiftKey?s:o;e.selection.direction=s<o?"forward":s>o?"backward":"none";e.selection.start=Math.min(s,o);e.selection.end=Math.max(s,o);return e}onFocus(t,e){const o=this.partialFormatState(this.unformatState(e));const s=t.target;s.value=o.value;return o}onBlur(t,e){const o=this.createFormattedState(e);const s=t.target;s.value=o.value;return o}onInputEvent(t,e){var o,s,a,i,l,n,r;const c=t.target;e.selection.start=(o=c.selectionStart)!==null&&o!==void 0?o:e.selection.start;e.selection.end=(s=c.selectionEnd)!==null&&s!==void 0?s:e.selection.end;e.selection.direction=(a=c.selectionDirection)!==null&&a!==void 0?a:e.selection.direction;const h=t.type=="beforeinput"||t.type=="input"?(n=(l=(i=this.eventHandlers[t.type])[t.inputType])===null||l===void 0?void 0:l.call(i,t,this.unformatState(e),e))!==null&&n!==void 0?n:e:e;const d=this.partialFormatState(h);if(t.defaultPrevented){c.value=d.value;c.selectionStart=d.selection.start;c.selectionEnd=d.selection.end;c.selectionDirection=(r=d.selection.direction)!==null&&r!==void 0?r:null}return d}insert(t,e){t.preventDefault();if(typeof t.data=="string"){for(const o of t.data){this.formatter.allowed(o,e)&&this.replace(e,o.replace(/(\r|\n|\t)/g,""))}}return e}deleteWord(t,e){const o=ae.getCursor(t.selection);const s=Ls.getWordBreakIndex(t.value,o,e);const a=this.unformatState(Object.assign(Object.assign({},t),{selection:{start:Math.min(o,s),end:Math.max(o,s),direction:"none"}}));const i=a.value.substring(0,a.selection.start)+a.value.substring(a.selection.end);a.value=i;a.selection.end=a.selection.start;return a}select(t,e,o,s){t.selection.start=e;t.selection.end=o;s&&(t.selection.direction=s)}erase(t){this.replace(t,"")}replace(t,e){t.value=t.value.substring(0,t.selection.start)+e+t.value.substring(t.selection.end);t.selection.start=t.selection.start+e.length;t.selection.end=t.selection.start}unformatState(t){return ie.copy(this.formatter.unformat(le.copy(t)))}partialFormatState(t){return this.formatter.partialFormat(le.copy(t))}createFormattedState(t){return this.formatter.format(le.copy(this.formatter.unformat(le.copy(t))))}toString(t){return this.formatter.toString(t)}initialState(t,e){const o=this.toString(t)||"";const s=o.length;const a=this.createFormattedState({value:o,selection:{start:s,end:s,direction:"none"}});if(e){e.value=a.value}return a}setValue(t,e,o){const s=Object.assign(Object.assign({},e),{value:this.createFormattedState({value:this.formatter.toString(o),selection:e.selection}).value});t.value=s.value;return s}getValue(t){return this.formatter.fromString(this.unformatState(t).value)}setSelection(t,e,o,s){t.focus();t.selectionStart=o;t.selectionEnd=s;this.select(e,o,s);return e}}var _s;(function(t){t.type=m({name:u(),key:u(),shift:b(),ctrl:b(),alt:b(),meta:b()});t.is=t.type.is;function e(t,e){return{name:t,key:e.key,shift:e.shiftKey,ctrl:e.ctrlKey,alt:e.altKey,meta:e.metaKey}}t.create=e})(_s||(_s={}));const As=()=>`.sc-smoothly-input-h{--input-padding-side:.5rem;--input-value-padding-top:1.25rem;--input-value-padding-bottom:.25rem;--input-min-height:3rem;min-height:var(--input-min-height);box-sizing:border-box;border-radius:var(--smoothly-input-border-radius)}[looks="border"].sc-smoothly-input-h{border:rgb(var(--smoothly-input-border)) solid 1px}[looks="border"].sc-smoothly-input-h:not([readonly]):not([disabled]):focus-within{outline:2px solid rgb(var(--smoothly-input-border-focus))}[looks="border"][readonly].sc-smoothly-input-h{border:transparent solid 1px}[looks="line"].sc-smoothly-input-h{border-bottom:rgb(var(--smoothly-input-border)) solid 1px;position:relative}[looks="line"][readonly].sc-smoothly-input-h{border-bottom:transparent solid 1px}[looks="line"].sc-smoothly-input-h:not([readonly]):not([disabled]):focus-within::before{content:"";position:absolute;inset:0;pointer-events:none;border-bottom:2px solid rgb(var(--smoothly-input-border-focus));z-index:10}[looks="grid"].sc-smoothly-input-h{flex-grow:1;flex-basis:40%;box-shadow:0px 0px 0px 1px rgb(var(--smoothly-input-border));border:none}[looks="grid"][readonly].sc-smoothly-input-h{box-shadow:0px 0px 0px 1px rgba(var(--smoothly-input-border-readonly))}[looks="grid"].sc-smoothly-input-h:not([readonly]):not([disabled]):focus-within{position:relative;box-shadow:0px 0px 0px 2px rgb(var(--smoothly-input-border-focus));outline:none;z-index:10}[looks="transparent"].sc-smoothly-input-h{border:none}[looks="transparent"][readonly].sc-smoothly-input-h,[looks="transparent"].sc-smoothly-input-h:not(:focus-within){background-color:transparent}[looks="transparent"][readonly].sc-smoothly-input-h>input.sc-smoothly-input,[looks="transparent"].sc-smoothly-input-h:not(:focus-within)>input.sc-smoothly-input{background-color:transparent}[looks="transparent"].sc-smoothly-input-h:not([readonly]):focus-within{outline:1px solid rgb(var(--smoothly-input-border))}[disabled].sc-smoothly-input-h{cursor:not-allowed;--smoothly-input-foreground:var(--smoothly-input-disabled-foreground);--smoothly-input-background:var(--smoothly-input-disabled-background);--smoothly-input-border:var(--smoothly-input-disabled-border)}.sc-smoothly-input-h.sc-smoothly-input-s>[slot=label],.sc-smoothly-input-h .sc-smoothly-input-s>[slot=label],.sc-smoothly-input-h .label.sc-smoothly-input{position:absolute;top:.6rem;opacity:0.8;user-select:none;cursor:inherit;transform-origin:top left;transition:transform 100ms ease}[right].sc-smoothly-input-h .label.sc-smoothly-input{transform-origin:top right}.sc-smoothly-input-h.floating-label.sc-smoothly-input-s>[slot=label],.sc-smoothly-input-h.floating-label .sc-smoothly-input-s>[slot=label],.sc-smoothly-input-h.has-value.sc-smoothly-input-s>[slot=label],.sc-smoothly-input-h.has-value .sc-smoothly-input-s>[slot=label],.sc-smoothly-input-h[placeholder].sc-smoothly-input-s>[slot=label],.sc-smoothly-input-h[placeholder] .sc-smoothly-input-s>[slot=label],.sc-smoothly-input-h[readonly].sc-smoothly-input-s>[slot=label],.sc-smoothly-input-h[readonly] .sc-smoothly-input-s>[slot=label],.floating-label.sc-smoothly-input-h .label.sc-smoothly-input,.has-value.sc-smoothly-input-h .label.sc-smoothly-input,.has-text.sc-smoothly-input-h .label.sc-smoothly-input,[placeholder].sc-smoothly-input-h .label.sc-smoothly-input,[readonly].sc-smoothly-input-h .label.sc-smoothly-input,.sc-smoothly-input-h:not([readonly]):focus-within .label.float-on-focus.sc-smoothly-input{top:.2rem;transform:scale(0.8)}.sc-smoothly-input-h:not([show-label]):not(.show-label) .label.sc-smoothly-input{display:none}.sc-smoothly-input-h smoothly-icon.smoothly-invalid.sc-smoothly-input{fill:rgb(var(--smoothly-input-invalid-icon, var(--smoothly-danger-color)))}.sc-smoothly-input-h{display:flex;align-items:center;justify-content:center;font-weight:var(--smoothly-font-weight);background-color:rgb(var(--smoothly-input-background));color:rgb(var(--smoothly-input-foreground))}[hidden].sc-smoothly-input-h{display:none}.sc-smoothly-input-h>.smoothly-input-container.sc-smoothly-input{position:relative;flex-grow:1;height:100%}.sc-smoothly-input-h>.smoothly-input-container.sc-smoothly-input>label.sc-smoothly-input{left:var(--input-padding-side)}[right].sc-smoothly-input-h>.smoothly-input-container.sc-smoothly-input>label.sc-smoothly-input{right:var(--input-padding-side);left:auto}[right].sc-smoothly-input-h>div.sc-smoothly-input>input.sc-smoothly-input{text-align:right}.sc-smoothly-input-h:not([show-label])>div.sc-smoothly-input>input.sc-smoothly-input{padding:0 var(--input-padding-side)}.sc-smoothly-input-h>.smoothly-input-container.sc-smoothly-input>div.guide.sc-smoothly-input{position:absolute;box-sizing:border-box;align-content:center;height:100%;padding-inline:var(--input-padding-side)}[show-label].sc-smoothly-input-h>.smoothly-input-container.sc-smoothly-input>div.guide.sc-smoothly-input{padding-block:var(--input-value-padding-top) var(--input-value-padding-bottom)}.sc-smoothly-input-h>.smoothly-input-container.sc-smoothly-input>div.guide.sc-smoothly-input>div.value.sc-smoothly-input{display:inline;pointer-events:none;opacity:0}.sc-smoothly-input-h>.smoothly-input-container.sc-smoothly-input>div.guide.sc-smoothly-input>div.remainder.sc-smoothly-input{display:inline;pointer-events:none;opacity:0.5}.sc-smoothly-input-h>.smoothly-input-container.sc-smoothly-input>input.sc-smoothly-input{padding:var(--input-value-padding-top) var(--input-padding-side) var(--input-value-padding-bottom) var(--input-padding-side);box-sizing:border-box;width:100%;height:100%;border:0;z-index:1;position:relative;font-size:1rem;font-family:var(--smoothly-font-family)}[disabled].sc-smoothly-input-h>.smoothly-input-container.sc-smoothly-input>input.sc-smoothly-input{cursor:not-allowed}.sc-smoothly-input-h>.smoothly-invalid.sc-smoothly-input{display:none;z-index:2;padding:0.5rem}[invalid].sc-smoothly-input-h>.smoothly-invalid.sc-smoothly-input{display:flex}.sc-smoothly-input-h>div.sc-smoothly-input>label.sc-smoothly-input{z-index:1;pointer-events:none}.sc-smoothly-input-h>div.sc-smoothly-input>input.sc-smoothly-input:focus{outline:none}.sc-smoothly-input-h>div.sc-smoothly-input>input.sc-smoothly-input:-webkit-autofill,.sc-smoothly-input-h>div.sc-smoothly-input>input.sc-smoothly-input:-webkit-autofill:hover,.sc-smoothly-input-h>div.sc-smoothly-input>input.sc-smoothly-input:-webkit-autofill:focus,.sc-smoothly-input-h>div.sc-smoothly-input>input.sc-smoothly-input:-webkit-autofill:active{box-shadow:0 0 0 40em rgb(var(--smoothly-input-background)) inset;-webkit-box-shadow:0 0 0 40em rgb(var(--smoothly-input-background)) inset}.sc-smoothly-input-h>div.sc-smoothly-input>input.sc-smoothly-input:-webkit-autofill,.sc-smoothly-input-h>div.sc-smoothly-input>input.sc-smoothly-input:-webkit-autofill+label.sc-smoothly-input{-webkit-text-fill-color:rgb(var(--smoothly-input-foreground))}.sc-smoothly-input-h>span.copyable.sc-smoothly-input{position:relative}.sc-smoothly-input-h>span.copyable.sc-smoothly-input>smoothly-icon.sc-smoothly-input{cursor:pointer;display:flex;align-items:center;padding:0.5rem}.sc-smoothly-input-h>span.copyable.sc-smoothly-input:hover small.sc-smoothly-input,.sc-smoothly-input-h>span.copyable.sc-smoothly-input:focus small.sc-smoothly-input{display:block}.sc-smoothly-input-h>span.copyable.sc-smoothly-input>small.sc-smoothly-input{display:none;width:max-content;border-radius:0.25rem;padding:0.2rem 0.3rem;position:absolute;right:-0.5rem;top:-2rem;background-color:rgb(var(--smoothly-default-contrast));color:rgb(var(--smoothly-default-tint))}`;const $s=class{constructor(o){t(this,o);this.smoothlyInputLooks=e(this,"smoothlyInputLooks");this.smoothlyInputLoad=e(this,"smoothlyInputLoad");this.smoothlyFormDisable=e(this,"smoothlyFormDisable");this.smoothlyKeydown=e(this,"smoothlyKeydown");this.smoothlyBlur=e(this,"smoothlyBlur");this.smoothlyChange=e(this,"smoothlyChange");this.smoothlyInput=e(this,"smoothlyInput");this.smoothlyUserInput=e(this,"smoothlyUserInput");this.type="text";this.required=false;this.showLabel=true;this.disabled=false;this.readonly=false;this.invalid=false;this.copied=false;this.isDifferentFromInitial=false;this.uneditable=this.readonly;this.observer=Xo.Observer.create(this)}async getValue(){return this.stateHandler.getValue(this.state)}async setValue(t){if(this.inputElement){this.state=this.stateHandler.setValue(this.inputElement,this.state,t)}}async setFocus(){var t;(t=this.inputElement)===null||t===void 0?void 0:t.focus()}async setSelection(t,e){if(this.inputElement){this.state=this.stateHandler.setSelection(this.inputElement,this.state,t,e<0?this.inputElement.value.length+e+1:e)}}async listen(t){this.observer.subscribe(t)}nameChange(t,e){ts.formRename(this,e)}async register(){ts.formAdd(this)}async unregister(){ts.formRemove(this)}async clear(){if(!this.uneditable&&this.inputElement){this.state=this.stateHandler.setValue(this.inputElement,this.state,undefined)}}async edit(t){!this.uneditable&&(this.readonly=!t)}async reset(){if(!this.uneditable&&this.inputElement){this.state=this.stateHandler.setValue(this.inputElement,this.state,this.initialValue)}}async setInitialValue(){this.isDifferentFromInitial=false;this.initialValue=this.value;this.smoothlyInput.emit({[this.name]:await this.getValue()})}async setCustomInitialValue(t){this.initialValue=t}async smoothlyInputLoadHandler(t){ts.registerSubAction(this,t)}typeChange(){var t,e;switch(this.type){case"price":this.stateHandler=Rs.create("price",{currency:this.currency,toInteger:this.toInteger});break;case"integer":this.stateHandler=Rs.create("integer",{min:this.min,max:this.max,pad:this.pad});break;default:this.stateHandler=Rs.create(this.type,T());break}this.state=this.stateHandler.initialState((t=this.value)!==null&&t!==void 0?t:(e=this.state)===null||e===void 0?void 0:e.value,this.inputElement)}stateChange(){const t=this.stateHandler.getValue(this.state);this.isDifferentFromInitial=js.notEqual(this.initialValue,t);this.smoothlyInput.emit({[this.name]:t});this.observer.publish()}valueChange(t){const e=this.stateHandler.getValue(this.state);if(js.notEqual(e,t)&&this.inputElement){this.state=this.stateHandler.setValue(this.inputElement,this.state,t);this.smoothlyInput.emit({[this.name]:this.stateHandler.getValue(this.state)})}}readonlyChange(){this.observer.publish()}componentWillLoad(){this.initialValue=this.value;this.typeChange();this.smoothlyInputLooks.emit(((t,e)=>{var o;return this.looks=(o=this.looks)!==null&&o!==void 0?o:t,!this.color&&(this.color=e)}));this.smoothlyInputLoad.emit((t=>this.parent=t));!this.readonly&&this.smoothlyFormDisable.emit((t=>this.readonly=t));this.observer.publish()}componentDidLoad(){if(this.inputElement){this.inputElement.value=this.state.value}}async disconnectedCallback(){if(!this.element.isConnected){await this.unregister()}}onEvent(t){this.state=this.stateHandler.onInputEvent(t,this.state);if(t.type=="input"||t.defaultPrevented){this.smoothlyUserInput.emit({name:this.name,value:this.stateHandler.getValue(this.state)})}}copyText(t){if(t){navigator.clipboard.writeText(t);this.copied=true}}render(){var t,e,a,i,l,n,r,c,h,d;return o(s,{key:"dc56c8b63c3a0402640a20a811dae85468138f3b",class:{"has-value":((t=this.state)===null||t===void 0?void 0:t.value)!=undefined&&((e=this.state)===null||e===void 0?void 0:e.value)!=""},onclick:()=>{var t;return(t=this.inputElement)===null||t===void 0?void 0:t.focus()}},o("slot",{key:"f3372746df6932f07cea568a5f16d9bbdeef39cd",name:"start"}),o("div",{key:"1d50dc7ea1c62c4835af80ec08c708d2162452c5",class:"smoothly-input-container"},o("div",{key:"f562dd8ffdda755718f02c742e0b96bc1c823071",class:"guide"},o("div",{key:"1f02c40d673223061f83933a252caf01ccede774",class:"value"},(a=this.state)===null||a===void 0?void 0:a.value),o("div",{key:"12c0b824734da7fbd20de68ce033b0da60149ecf",class:"remainder"},(i=this.state)===null||i===void 0?void 0:i.remainder)),o("input",{key:"89ff5f54533362d8776d4f500c019aef7a951b58",ref:t=>this.inputElement=t,color:this.color,name:this.name,type:(l=this.state)===null||l===void 0?void 0:l.type,inputmode:(n=this.state)===null||n===void 0?void 0:n.inputmode,placeholder:this.placeholder,required:this.required,autocomplete:(r=this.autocomplete)!==null&&r!==void 0?r:(c=this.state)===null||c===void 0?void 0:c.autocomplete,disabled:this.disabled,readOnly:this.readonly,pattern:((h=this.state)===null||h===void 0?void 0:h.pattern)&&((d=this.state)===null||d===void 0?void 0:d.pattern.source),onKeyDown:async t=>{this.state=this.stateHandler.onKeyDown(t,this.state);if(!this.readonly&&!this.disabled){this.smoothlyKeydown.emit(_s.create(this.name,t))}},onFocus:t=>!this.readonly&&(this.state=this.stateHandler.onFocus(t,this.state)),onBlur:t=>{if(!this.readonly){const e=this.stateHandler.getValue(this.state);this.state=this.stateHandler.onBlur(t,this.state);this.smoothlyBlur.emit();this.smoothlyInput.emit({[this.name]:this.stateHandler.getValue(this.state)});if(js.notEqual(e,this.stateHandler.getValue(this.state))){this.smoothlyChange.emit({[this.name]:this.stateHandler.getValue(this.state)});this.smoothlyUserInput.emit({name:this.name,value:this.stateHandler.getValue(this.state)})}}}}),o("label",{key:"0773d2f8eac3c880558ed831dca5903f4da1f5aa",class:"label float-on-focus",htmlFor:this.name},o("slot",{key:"fbce8ed1251aa8b97937ee81ec4e07c36941de52"}))),this.copyable&&this.value&&o("span",{key:"a0ffe7c27427df173276dbedd1159d1a3428ec36",class:"copyable"},o("small",{key:"da9740e6bc386abe42a23d4e0d428a72da6ee4de"},this.copied?"Copied!":"Copy"),o("smoothly-icon",{key:"7b3eaa57b44c623c09a55ef143dd98fd90a6a660",name:"copy-outline",size:"small",onClick:()=>this.copyText(this.value),onMouseLeave:()=>this.copied=false})),o("smoothly-icon",{key:"b89c81c66a99efab0dcb5aa0f751c41c28723f64",class:"smoothly-invalid",name:"alert-circle",size:"small",tooltip:this.errorMessage}),o("slot",{key:"0f84b621e6860ab9b6477ee2a5aff5d0e099d1d9",name:"end"}))}get element(){return a(this)}static get watchers(){return{name:[{nameChange:0}],currency:[{typeChange:0}],type:[{typeChange:0}],state:[{stateChange:0}],value:[{valueChange:0}],disabled:[{readonlyChange:0}],readonly:[{readonlyChange:0}]}}};$s.style=As();const Ms=()=>`.sc-smoothly-input-checkbox-h{--input-padding-side:.5rem;--input-value-padding-top:1.25rem;--input-value-padding-bottom:.25rem;--input-min-height:3rem;min-height:var(--input-min-height);box-sizing:border-box;border-radius:var(--smoothly-input-border-radius)}[looks="border"].sc-smoothly-input-checkbox-h{border:rgb(var(--smoothly-input-border)) solid 1px}[looks="border"].sc-smoothly-input-checkbox-h:not([readonly]):not([disabled]):focus-within{outline:2px solid rgb(var(--smoothly-input-border-focus))}[looks="border"][readonly].sc-smoothly-input-checkbox-h{border:transparent solid 1px}[looks="line"].sc-smoothly-input-checkbox-h{border-bottom:rgb(var(--smoothly-input-border)) solid 1px;position:relative}[looks="line"][readonly].sc-smoothly-input-checkbox-h{border-bottom:transparent solid 1px}[looks="line"].sc-smoothly-input-checkbox-h:not([readonly]):not([disabled]):focus-within::before{content:"";position:absolute;inset:0;pointer-events:none;border-bottom:2px solid rgb(var(--smoothly-input-border-focus));z-index:10}[looks="grid"].sc-smoothly-input-checkbox-h{flex-grow:1;flex-basis:40%;box-shadow:0px 0px 0px 1px rgb(var(--smoothly-input-border));border:none}[looks="grid"][readonly].sc-smoothly-input-checkbox-h{box-shadow:0px 0px 0px 1px rgba(var(--smoothly-input-border-readonly))}[looks="grid"].sc-smoothly-input-checkbox-h:not([readonly]):not([disabled]):focus-within{position:relative;box-shadow:0px 0px 0px 2px rgb(var(--smoothly-input-border-focus));outline:none;z-index:10}[looks="transparent"].sc-smoothly-input-checkbox-h{border:none}[looks="transparent"][readonly].sc-smoothly-input-checkbox-h,[looks="transparent"].sc-smoothly-input-checkbox-h:not(:focus-within){background-color:transparent}[looks="transparent"][readonly].sc-smoothly-input-checkbox-h>input.sc-smoothly-input-checkbox,[looks="transparent"].sc-smoothly-input-checkbox-h:not(:focus-within)>input.sc-smoothly-input-checkbox{background-color:transparent}[looks="transparent"].sc-smoothly-input-checkbox-h:not([readonly]):focus-within{outline:1px solid rgb(var(--smoothly-input-border))}[disabled].sc-smoothly-input-checkbox-h{cursor:not-allowed;--smoothly-input-foreground:var(--smoothly-input-disabled-foreground);--smoothly-input-background:var(--smoothly-input-disabled-background);--smoothly-input-border:var(--smoothly-input-disabled-border)}.sc-smoothly-input-checkbox-h.sc-smoothly-input-checkbox-s>[slot=label],.sc-smoothly-input-checkbox-h .sc-smoothly-input-checkbox-s>[slot=label],.sc-smoothly-input-checkbox-h .label.sc-smoothly-input-checkbox{position:absolute;top:.6rem;opacity:0.8;user-select:none;cursor:inherit;transform-origin:top left;transition:transform 100ms ease}[right].sc-smoothly-input-checkbox-h .label.sc-smoothly-input-checkbox{transform-origin:top right}.sc-smoothly-input-checkbox-h.floating-label.sc-smoothly-input-checkbox-s>[slot=label],.sc-smoothly-input-checkbox-h.floating-label .sc-smoothly-input-checkbox-s>[slot=label],.sc-smoothly-input-checkbox-h.has-value.sc-smoothly-input-checkbox-s>[slot=label],.sc-smoothly-input-checkbox-h.has-value .sc-smoothly-input-checkbox-s>[slot=label],.sc-smoothly-input-checkbox-h[placeholder].sc-smoothly-input-checkbox-s>[slot=label],.sc-smoothly-input-checkbox-h[placeholder] .sc-smoothly-input-checkbox-s>[slot=label],.sc-smoothly-input-checkbox-h[readonly].sc-smoothly-input-checkbox-s>[slot=label],.sc-smoothly-input-checkbox-h[readonly] .sc-smoothly-input-checkbox-s>[slot=label],.floating-label.sc-smoothly-input-checkbox-h .label.sc-smoothly-input-checkbox,.has-value.sc-smoothly-input-checkbox-h .label.sc-smoothly-input-checkbox,.has-text.sc-smoothly-input-checkbox-h .label.sc-smoothly-input-checkbox,[placeholder].sc-smoothly-input-checkbox-h .label.sc-smoothly-input-checkbox,[readonly].sc-smoothly-input-checkbox-h .label.sc-smoothly-input-checkbox,.sc-smoothly-input-checkbox-h:not([readonly]):focus-within .label.float-on-focus.sc-smoothly-input-checkbox{top:.2rem;transform:scale(0.8)}.sc-smoothly-input-checkbox-h:not([show-label]):not(.show-label) .label.sc-smoothly-input-checkbox{display:none}.sc-smoothly-input-checkbox-h smoothly-icon.smoothly-invalid.sc-smoothly-input-checkbox{fill:rgb(var(--smoothly-input-invalid-icon, var(--smoothly-danger-color)))}.sc-smoothly-input-checkbox-h{display:flex;align-items:center;flex-direction:row;position:relative;gap:.5rem;padding-inline:var(--input-padding-side);background-color:rgb(var(--smoothly-input-background));box-sizing:border-box;background-color:rgb(var(--smoothly-input-background));color:rgb(var(--smoothly-input-foreground))}.sc-smoothly-input-checkbox-h:has(>.smoothly-checkbox-end-slot:not(:empty)){padding-right:0}.sc-smoothly-input-checkbox-h>input.sc-smoothly-input-checkbox{-webkit-appearance:none;-moz-appearance:none;appearance:none;height:1.25rem;width:1.25rem;border-radius:0.25rem;border:1px solid rgb(var(--smoothly-input-foreground));color:rgb(var(--smoothly-input-foreground));display:block}[checked][looks=transparent].sc-smoothly-input-checkbox-h>input.sc-smoothly-input-checkbox,[checked].sc-smoothly-input-checkbox-h>input.sc-smoothly-input-checkbox{background-color:rgb(var(--smoothly-input-foreground))}.sc-smoothly-input-checkbox-h:not([readonly]):not([disabled])>input.sc-smoothly-input-checkbox,.sc-smoothly-input-checkbox-h:not([readonly]):not([disabled])>label.sc-smoothly-input-checkbox{cursor:pointer}.sc-smoothly-input-checkbox-h>label.sc-smoothly-input-checkbox:empty{display:none}[disabled].sc-smoothly-input-checkbox-h,[disabled].sc-smoothly-input-checkbox-h>*.sc-smoothly-input-checkbox{cursor:not-allowed}.sc-smoothly-input-checkbox-h>smoothly-icon.sc-smoothly-input-checkbox{position:absolute;z-index:1;pointer-events:none;--smoothly-color-contrast:var(--smoothly-input-background)}[looks="transparent"].sc-smoothly-input-checkbox-h{background-color:transparent}[looks="transparent"].sc-smoothly-input-checkbox-h:not([readonly]):focus-within{outline-color:transparent}.sc-smoothly-input-checkbox-h>.smoothly-checkbox-end-slot.sc-smoothly-input-checkbox{margin-left:auto}.sc-smoothly-input-checkbox-h>.smoothly-checkbox-end-slot.sc-smoothly-input-checkbox:empty{display:none}`;const Es=class{constructor(o){t(this,o);this.smoothlyInputLooks=e(this,"smoothlyInputLooks");this.smoothlyInput=e(this,"smoothlyInput");this.smoothlyUserInput=e(this,"smoothlyUserInput");this.smoothlyInputLoad=e(this,"smoothlyInputLoad");this.smoothlyFormDisable=e(this,"smoothlyFormDisable");this.isDifferentFromInitial=false;this.observer=Xo.Observer.create(this);this.readonly=false;this.checked=false}componentWillLoad(){this.initialValue=this.checked;!this.readonly&&this.smoothlyFormDisable.emit((t=>this.readonly=t));this.smoothlyInputLooks.emit(((t,e)=>{var o;return this.looks=(o=this.looks)!==null&&o!==void 0?o:t,!this.color&&(this.color=e)}));this.smoothlyInputLoad.emit((t=>this.parent=t));this.observer.publish();this.id="id-"+Math.random().toString(36).substring(2,11)}async disconnectedCallback(){if(!this.element.isConnected){await this.unregister()}}async smoothlyInputLoadHandler(t){ts.registerSubAction(this,t)}nameChange(t,e){ts.formRename(this,e)}async register(){ts.formAdd(this)}async unregister(){ts.formRemove(this)}async getValue(){return this.value?this.value[`${!!this.checked}`]:this.checked}async clear(){!this.disabled&&!this.readonly&&(this.checked=false)}async listen(t){this.observer.subscribe(t)}async edit(t){this.readonly=!t}async reset(){this.checked=this.initialValue}async setInitialValue(){this.initialValue=this.checked;this.isDifferentFromInitial=false}async handleDisabledChange(){this.observer.publish()}async elementCheck(t,e){this.isDifferentFromInitial=!!this.initialValue!=!!this.checked;const o=!!this.checked!=!!e;if(o){this.smoothlyInput.emit({[this.name]:await this.getValue()});this.observer.publish()}}render(){return o(s,{key:"8d586e5be3e100b6f67e79694bdb7166b2aeddf8"},o("input",{key:"fe7b1db5fe641116040034355e04ca8b5ab22e97",type:"checkbox",id:this.id,checked:this.checked,disabled:this.disabled||this.readonly,onChange:async t=>{this.checked=t.target.checked;this.smoothlyUserInput.emit({name:this.name,value:await this.getValue()})}}),this.checked&&o("smoothly-icon",{key:"51b9efb24588c22d2a568227297787d023571e71",name:"checkmark-sharp",size:"tiny"}),o("label",{key:"6987b8f1b6e08a7f2c0b14c57e081939bc174fb4",htmlFor:this.id},o("slot",{key:"3f86fa549bbe9a68c83895a8bda1517b1554a926"})),o("span",{key:"75546ae8484e8aa1945fdec28fd4449880304ae9",class:"smoothly-checkbox-end-slot"},o("slot",{key:"1e4e1fcf24e300d18b3728bfbde4a1e178253bce",name:"end"})))}get element(){return a(this)}static get watchers(){return{name:[{nameChange:0}],disabled:[{handleDisabledChange:0}],readonly:[{handleDisabledChange:0}],checked:[{elementCheck:0}]}}};Es.style=Ms();const Os=()=>`[color=default].sc-smoothly-input-clear{--smoothly-color:var(--smoothly-default-color);--smoothly-color-contrast:var(--smoothly-default-contrast);--smoothly-color-shade:var(--smoothly-default-shade);--smoothly-color-tint:var(--smoothly-default-tint)}[color=primary].sc-smoothly-input-clear{--smoothly-color:var(--smoothly-primary-color);--smoothly-color-contrast:var(--smoothly-primary-contrast);--smoothly-color-shade:var(--smoothly-primary-shade);--smoothly-color-tint:var(--smoothly-primary-tint)}[color=secondary].sc-smoothly-input-clear{--smoothly-color:var(--smoothly-secondary-color);--smoothly-color-contrast:var(--smoothly-secondary-contrast);--smoothly-color-shade:var(--smoothly-secondary-shade);--smoothly-color-tint:var(--smoothly-secondary-tint)}[color=tertiary].sc-smoothly-input-clear{--smoothly-color:var(--smoothly-tertiary-color);--smoothly-color-contrast:var(--smoothly-tertiary-contrast);--smoothly-color-shade:var(--smoothly-tertiary-shade);--smoothly-color-tint:var(--smoothly-tertiary-tint)}[color=success].sc-smoothly-input-clear{--smoothly-color:var(--smoothly-success-color);--smoothly-color-contrast:var(--smoothly-success-contrast);--smoothly-color-shade:var(--smoothly-success-shade);--smoothly-color-tint:var(--smoothly-success-tint)}[color=warning].sc-smoothly-input-clear{--smoothly-color:var(--smoothly-warning-color);--smoothly-color-contrast:var(--smoothly-warning-contrast);--smoothly-color-shade:var(--smoothly-warning-shade);--smoothly-color-tint:var(--smoothly-warning-tint)}[color=danger].sc-smoothly-input-clear{--smoothly-color:var(--smoothly-danger-color);--smoothly-color-contrast:var(--smoothly-danger-contrast);--smoothly-color-shade:var(--smoothly-danger-shade);--smoothly-color-tint:var(--smoothly-danger-tint)}[color=light].sc-smoothly-input-clear{--smoothly-color:var(--smoothly-light-color);--smoothly-color-contrast:var(--smoothly-light-contrast);--smoothly-color-shade:var(--smoothly-light-shade);--smoothly-color-tint:var(--smoothly-light-tint)}[color=medium].sc-smoothly-input-clear{--smoothly-color:var(--smoothly-medium-color);--smoothly-color-contrast:var(--smoothly-medium-contrast);--smoothly-color-shade:var(--smoothly-medium-shade);--smoothly-color-tint:var(--smoothly-medium-tint)}[color=dark].sc-smoothly-input-clear{--smoothly-color:var(--smoothly-dark-color);--smoothly-color-contrast:var(--smoothly-dark-contrast);--smoothly-color-shade:var(--smoothly-dark-shade);--smoothly-color-tint:var(--smoothly-dark-tint)}.sc-smoothly-input-clear-h{--smoothly-button-border-radius:0.5rem;display:inline-flex;box-sizing:border-box;border-radius:var(--smoothly-button-border-radius);font-size:var(--smoothly-button-font-size, 1rem);cursor:pointer;border:none;outline:none;position:relative}[shape=rounded].sc-smoothly-input-clear-h{--smoothly-button-border-radius:2rem}[type=link].sc-smoothly-input-clear-h{display:inline}[disabled].sc-smoothly-input-clear-h{opacity:0.5}.sc-smoothly-input-clear-h>a.sc-smoothly-input-clear{font-weight:400;background-color:transparent}.sc-smoothly-input-clear-h>a.sc-smoothly-input-clear,.sc-smoothly-input-clear-h>button.sc-smoothly-input-clear{font-size:var(--smoothly-button-font-size);border:1px solid transparent;outline:none;cursor:pointer;display:inline-flex;gap:0.5rem;box-sizing:border-box}.sc-smoothly-input-clear-h>button.sc-smoothly-input-clear{font-weight:bold;justify-content:center;width:100%;align-items:center;border-radius:var(--smoothly-button-border-radius);padding-inline:var(--smoothly-button-padding-inline, 1rem)}.sc-smoothly-input-clear-h{min-height:var(--smoothly-button-height, 2.5rem)}.sc-smoothly-input-clear-h:has(>a:empty),.sc-smoothly-input-clear-h:has(>button:empty),.sc-smoothly-input-clear-h>a.sc-smoothly-input-clear:empty,.sc-smoothly-input-clear-h>button.sc-smoothly-input-clear:empty{border-width:0;min-height:0;padding-inline:0}[size=small].sc-smoothly-input-clear-h{--smoothly-button-height:2rem;--smoothly-button-padding-inline:0.75rem;--smoothly-button-font-size:0.875rem;--smoothly-icon-size:1.4rem}[size=large].sc-smoothly-input-clear-h{--smoothly-button-height:3rem;--smoothly-button-padding-inline:1.25rem;--smoothly-button-font-size:1.125rem}.sc-smoothly-input-clear-h:not([size=icon]):not([size=flexible])>button.sc-smoothly-input-clear{min-width:8rem}[size=icon].sc-smoothly-input-clear-h{--smoothly-icon-size:1.4rem}[size=icon].sc-smoothly-input-clear-h>button.sc-smoothly-input-clear{min-height:var(--smoothly-button-height, 2.5rem);min-width:var(--smoothly-button-height, 2.5rem);padding:0}.sc-smoothly-input-clear-h:not([size=icon]){min-width:8em}[size=flexible].sc-smoothly-input-clear-h{min-width:unset;padding:0;margin:0;display:flex;justify-content:center}[size=flexible].sc-smoothly-input-clear-h>button.sc-smoothly-input-clear{min-width:unset;padding:0;margin:0}[expand].sc-smoothly-input-clear-h{width:100%}[expand=full].sc-smoothly-input-clear-h{border-left:none;border-right:none;--smoothly-button-border-radius:0}[fill=outline].sc-smoothly-input-clear-h>button.sc-smoothly-input-clear{background-color:transparent;color:rgb(var(--smoothly-button-foreground));fill:rgb(var(--smoothly-button-foreground));stroke:rgb(var(--smoothly-button-foreground));border-color:rgb(var(--smoothly-button-foreground))}.sc-smoothly-input-clear-h:not([fill=clear]):not([disabled])>button.sc-smoothly-input-clear:hover,.sc-smoothly-input-clear-h:not([disabled])>button.sc-smoothly-input-clear:focus-visible,[fill=outline].sc-smoothly-input-clear-h:not([disabled]):active>button.sc-smoothly-input-clear::before{border-color:rgb(var(--smoothly-button-focus-color))}[fill=outline].sc-smoothly-input-clear-h:not([disabled])>button.sc-smoothly-input-clear:hover::before,[fill=outline].sc-smoothly-input-clear-h:not([disabled])>button.sc-smoothly-input-clear:focus-within::before,[fill=outline].sc-smoothly-input-clear-h:not([disabled])>button.sc-smoothly-input-clear:active::before{content:"";position:absolute;border:2px solid rgb(var(--smoothly-button-focus-border));inset:-1px;border-radius:var(--smoothly-button-border-radius)}.sc-smoothly-input-clear-h:not([fill=clear]):not([fill=outline]):not([disabled])>button.sc-smoothly-input-clear:hover,.sc-smoothly-input-clear-h:not([fill=clear]):not([fill=outline]):not([disabled])>button.sc-smoothly-input-clear:focus-visible,.sc-smoothly-input-clear-h:not([fill=clear]):not([fill=outline]):not([disabled])>button.sc-smoothly-input-clear:active{background:rgb(var(--smoothly-button-hover-background))}.sc-smoothly-input-clear-h>button.sc-smoothly-input-clear,.sc-smoothly-input-clear-h.sc-smoothly-input-clear-s>smoothly-icon,.sc-smoothly-input-clear-h .sc-smoothly-input-clear-s>smoothly-icon{color:rgb(var(--smoothly-button-foreground));stroke:rgb(var(--smoothly-button-foreground));fill:rgb(var(--smoothly-button-foreground))}[hidden].sc-smoothly-input-clear-h{display:none}.sc-smoothly-input-clear-h{display:flex}.sc-smoothly-input-clear-h:not([display]){display:none}.sc-smoothly-input-clear-h[type="input"].sc-smoothly-input-clear-s>smoothly-button>button{cursor:pointer;filter:opacity(60%);--smoothly-button-foreground:var(--smoothly-input-foreground);background-color:transparent}.sc-smoothly-input-clear-h.sc-smoothly-input-clear-s>smoothly-button>button>*+smoothly-icon{display:none}[disabled].sc-smoothly-input-clear-h{cursor:not-allowed}.sc-smoothly-input-clear-h[type="input"]:hover.sc-smoothly-input-clear-s>smoothly-icon,.sc-smoothly-input-clear-h[type="input"]:hover .sc-smoothly-input-clear-s>smoothly-icon{cursor:pointer;filter:opacity(100%)}`;const Ps=class{constructor(o){t(this,o);this.smoothlyInputLoad=e(this,"smoothlyInputLoad");this.fill="clear";this.size="icon";this.display=true;this.type="input";this.tooltip="Clear"}async componentWillLoad(){this.smoothlyInputLoad.emit((t=>{if(Zo.is(t)){this.parent=t;if(Xo.Element.is(t)){t.listen((async t=>{if(ts.is(t)){const e=typeof t.defined=="boolean"?t.defined:Boolean(await t.getValue());this.display=e&&!t.readonly&&!t.disabled}if(t instanceof os){this.display=!t.readonly}}));if(typeof this.disabled!=="boolean"){t.listen((async t=>{if(t instanceof os){this.disabled=t.readonly||Object.values(t.value).filter((t=>t)).length<1}}))}}}}))}clickHandler(){var t;(t=this.parent)===null||t===void 0?void 0:t.clear()}render(){var t;return o(s,{key:"5c6e49461edbf91245aaa2bf66de4550e334919c",title:this.tooltip},o("smoothly-button",{key:"ad7d421bdedceaf36cc14d87602ce960c19f77eb",disabled:this.disabled,size:this.size,type:"button",shape:this.shape,expand:this.expand,color:this.color,fill:(t=this.fill)!==null&&t!==void 0?t:this.type=="input"?"clear":undefined},o("slot",{key:"84cf8946d1d4681dde6c708aac9f791a276fd070"}),o("smoothly-icon",{key:"55a4310a4db96393cc6da853a7cfd974479bfe6c",name:"close",size:"tiny"})))}get element(){return a(this)}};Ps.style=Os();const Hs=()=>`.sc-smoothly-input-color-h{--input-padding-side:.5rem;--input-value-padding-top:1.25rem;--input-value-padding-bottom:.25rem;--input-min-height:3rem;min-height:var(--input-min-height);box-sizing:border-box;border-radius:var(--smoothly-input-border-radius)}[looks="border"].sc-smoothly-input-color-h{border:rgb(var(--smoothly-input-border)) solid 1px}[looks="border"].sc-smoothly-input-color-h:not([readonly]):not([disabled]):focus-within{outline:2px solid rgb(var(--smoothly-input-border-focus))}[looks="border"][readonly].sc-smoothly-input-color-h{border:transparent solid 1px}[looks="line"].sc-smoothly-input-color-h{border-bottom:rgb(var(--smoothly-input-border)) solid 1px;position:relative}[looks="line"][readonly].sc-smoothly-input-color-h{border-bottom:transparent solid 1px}[looks="line"].sc-smoothly-input-color-h:not([readonly]):not([disabled]):focus-within::before{content:"";position:absolute;inset:0;pointer-events:none;border-bottom:2px solid rgb(var(--smoothly-input-border-focus));z-index:10}[looks="grid"].sc-smoothly-input-color-h{flex-grow:1;flex-basis:40%;box-shadow:0px 0px 0px 1px rgb(var(--smoothly-input-border));border:none}[looks="grid"][readonly].sc-smoothly-input-color-h{box-shadow:0px 0px 0px 1px rgba(var(--smoothly-input-border-readonly))}[looks="grid"].sc-smoothly-input-color-h:not([readonly]):not([disabled]):focus-within{position:relative;box-shadow:0px 0px 0px 2px rgb(var(--smoothly-input-border-focus));outline:none;z-index:10}[looks="transparent"].sc-smoothly-input-color-h{border:none}[looks="transparent"][readonly].sc-smoothly-input-color-h,[looks="transparent"].sc-smoothly-input-color-h:not(:focus-within){background-color:transparent}[looks="transparent"][readonly].sc-smoothly-input-color-h>input.sc-smoothly-input-color,[looks="transparent"].sc-smoothly-input-color-h:not(:focus-within)>input.sc-smoothly-input-color{background-color:transparent}[looks="transparent"].sc-smoothly-input-color-h:not([readonly]):focus-within{outline:1px solid rgb(var(--smoothly-input-border))}[disabled].sc-smoothly-input-color-h{cursor:not-allowed;--smoothly-input-foreground:var(--smoothly-input-disabled-foreground);--smoothly-input-background:var(--smoothly-input-disabled-background);--smoothly-input-border:var(--smoothly-input-disabled-border)}.sc-smoothly-input-color-h.sc-smoothly-input-color-s>[slot=label],.sc-smoothly-input-color-h .sc-smoothly-input-color-s>[slot=label],.sc-smoothly-input-color-h .label.sc-smoothly-input-color{position:absolute;top:.6rem;opacity:0.8;user-select:none;cursor:inherit;transform-origin:top left;transition:transform 100ms ease}[right].sc-smoothly-input-color-h .label.sc-smoothly-input-color{transform-origin:top right}.sc-smoothly-input-color-h.floating-label.sc-smoothly-input-color-s>[slot=label],.sc-smoothly-input-color-h.floating-label .sc-smoothly-input-color-s>[slot=label],.sc-smoothly-input-color-h.has-value.sc-smoothly-input-color-s>[slot=label],.sc-smoothly-input-color-h.has-value .sc-smoothly-input-color-s>[slot=label],.sc-smoothly-input-color-h[placeholder].sc-smoothly-input-color-s>[slot=label],.sc-smoothly-input-color-h[placeholder] .sc-smoothly-input-color-s>[slot=label],.sc-smoothly-input-color-h[readonly].sc-smoothly-input-color-s>[slot=label],.sc-smoothly-input-color-h[readonly] .sc-smoothly-input-color-s>[slot=label],.floating-label.sc-smoothly-input-color-h .label.sc-smoothly-input-color,.has-value.sc-smoothly-input-color-h .label.sc-smoothly-input-color,.has-text.sc-smoothly-input-color-h .label.sc-smoothly-input-color,[placeholder].sc-smoothly-input-color-h .label.sc-smoothly-input-color,[readonly].sc-smoothly-input-color-h .label.sc-smoothly-input-color,.sc-smoothly-input-color-h:not([readonly]):focus-within .label.float-on-focus.sc-smoothly-input-color{top:.2rem;transform:scale(0.8)}.sc-smoothly-input-color-h:not([show-label]):not(.show-label) .label.sc-smoothly-input-color{display:none}.sc-smoothly-input-color-h smoothly-icon.smoothly-invalid.sc-smoothly-input-color{fill:rgb(var(--smoothly-input-invalid-icon, var(--smoothly-danger-color)))}.sc-smoothly-input-color-h{display:flex;position:relative;background-color:rgb(var(--smoothly-input-background));align-items:center;justify-content:center}.sc-smoothly-input-color-h>smoothly-input.sc-smoothly-input-color{width:100%;--input-min-height:calc(var(--input-min-height) - 2px);--smoothly-input-border-focus:none}.sc-smoothly-input-color-h div.color-sample.sc-smoothly-input-color{height:2em;width:3em;margin-right:0.5rem;background-color:var(--hexCode);outline:1px solid rgb(var(--smoothly-input-border));border-radius:3px}.sc-smoothly-input-color-h smoothly-icon[name=options-outline].sc-smoothly-input-color{padding-right:var(--input-padding-side)}[readonly].sc-smoothly-input-color-h smoothly-icon[name=options-outline].sc-smoothly-input-color,[disabled].sc-smoothly-input-color-h smoothly-icon[name=options-outline].sc-smoothly-input-color{display:none}.sc-smoothly-input-color-h:not([readonly]):not([disabled]) smoothly-icon[name=options-outline].sc-smoothly-input-color{cursor:pointer}.sc-smoothly-input-color-h>div.rgb-sliders.sc-smoothly-input-color{background-color:rgb(var(--smoothly-input-background));position:absolute;padding:1rem 0 1rem 2.5rem;top:calc(var(--element-height) + .8em);left:0;box-sizing:border-box;z-index:20;border:1px solid rgb(var(--smoothly-input-border))}.sc-smoothly-input-color-h>div.rgb-sliders.sc-smoothly-input-color::before{content:"";transform:translate(2em, -0.55em) rotate(45deg);width:1em;height:1em;background-color:rgb(var(--smoothly-input-background));border-top:1px solid rgb(var(--smoothly-input-border));border-left:1px solid rgb(var(--smoothly-input-border));position:absolute;z-index:100;top:0em}.sc-smoothly-input-color-h>div.rgb-sliders.sc-smoothly-input-color>smoothly-toggle-switch.sc-smoothly-input-color{margin-left:auto;margin-right:1em;margin-bottom:1em}div.rgb-sliders.sc-smoothly-input-color smoothly-input-range.sc-smoothly-input-color{padding:.5em 0}div.rgb-sliders.sc-smoothly-input-color smoothly-input-range.sc-smoothly-input-color label.sc-smoothly-input-color{width:4em}div.rgb-sliders.sc-smoothly-input-color smoothly-input-range.sc-smoothly-input-color>div.sc-smoothly-input-color>input[name=r].sc-smoothly-input-color::-webkit-slider-runnable-track{background:linear-gradient(to left, rgb(255, var(--rgb-g), var(--rgb-b)), rgb(0, var(--rgb-g), var(--rgb-b)))}div.rgb-sliders.sc-smoothly-input-color smoothly-input-range.sc-smoothly-input-color>div.sc-smoothly-input-color>input[name=r].sc-smoothly-input-color::-moz-range-track{background:linear-gradient(to left, rgb(255, var(--rgb-g), var(--rgb-b)), rgb(0, var(--rgb-g), var(--rgb-b)))}div.rgb-sliders.sc-smoothly-input-color smoothly-input-range.sc-smoothly-input-color>div.sc-smoothly-input-color>input[name=r].sc-smoothly-input-color::-moz-range-thumb{background-color:red}div.rgb-sliders.sc-smoothly-input-color smoothly-input-range.sc-smoothly-input-color>div.sc-smoothly-input-color>input[name=r].sc-smoothly-input-color::-webkit-slider-thumb{background-color:red}div.rgb-sliders.sc-smoothly-input-color smoothly-input-range.sc-smoothly-input-color>div.sc-smoothly-input-color>input[name=g].sc-smoothly-input-color::-webkit-slider-runnable-track{background:linear-gradient(to left, rgb(var(--rgb-r), 255, var(--rgb-b)), rgb(var(--rgb-r), 0, var(--rgb-b)))}div.rgb-sliders.sc-smoothly-input-color smoothly-input-range.sc-smoothly-input-color>div.sc-smoothly-input-color>input[name=g].sc-smoothly-input-color::-moz-range-track{background:linear-gradient(to left, rgb(var(--rgb-r), 255, var(--rgb-b)), rgb(var(--rgb-r), 0, var(--rgb-b)))}div.rgb-sliders.sc-smoothly-input-color smoothly-input-range.sc-smoothly-input-color>div.sc-smoothly-input-color>input[name=g].sc-smoothly-input-color::-moz-range-thumb{background-color:green}div.rgb-sliders.sc-smoothly-input-color smoothly-input-range.sc-smoothly-input-color>div.sc-smoothly-input-color>input[name=g].sc-smoothly-input-color::-webkit-slider-thumb{background-color:green}div.rgb-sliders.sc-smoothly-input-color smoothly-input-range.sc-smoothly-input-color>div.sc-smoothly-input-color>input[name=b].sc-smoothly-input-color::-webkit-slider-runnable-track{background:linear-gradient(to left, rgb(var(--rgb-r), var(--rgb-g), 255), rgb(var(--rgb-r), var(--rgb-g), 0))}div.rgb-sliders.sc-smoothly-input-color smoothly-input-range.sc-smoothly-input-color>div.sc-smoothly-input-color>input[name=b].sc-smoothly-input-color::-moz-range-track{background:linear-gradient(to left, rgb(var(--rgb-r), var(--rgb-g), 255), rgb(var(--rgb-r), var(--rgb-g), 0))}div.rgb-sliders.sc-smoothly-input-color smoothly-input-range.sc-smoothly-input-color>div.sc-smoothly-input-color>input[name=b].sc-smoothly-input-color::-moz-range-thumb{background-color:blue}div.rgb-sliders.sc-smoothly-input-color smoothly-input-range.sc-smoothly-input-color>div.sc-smoothly-input-color>input[name=b].sc-smoothly-input-color::-webkit-slider-thumb{background-color:blue}div.rgb-sliders.sc-smoothly-input-color smoothly-input-range.sc-smoothly-input-color>div.sc-smoothly-input-color>input[name=h].sc-smoothly-input-color::-webkit-slider-runnable-track{background:linear-gradient(to right in hsl longer hue, red, red)}div.rgb-sliders.sc-smoothly-input-color smoothly-input-range.sc-smoothly-input-color>div.sc-smoothly-input-color>input[name=h].sc-smoothly-input-color::-moz-range-track{background:linear-gradient(to right in hsl longer hue, red, red)}div.rgb-sliders.sc-smoothly-input-color smoothly-input-range.sc-smoothly-input-color>div.sc-smoothly-input-color>input[name=h].sc-smoothly-input-color::-webkit-slider-thumb{background-color:hsl(var(--hsl-h), 100%, 50%)}div.rgb-sliders.sc-smoothly-input-color smoothly-input-range.sc-smoothly-input-color>div.sc-smoothly-input-color>input[name=h].sc-smoothly-input-color::-moz-range-thumb{background-color:hsl(var(--hsl-h), 100%, 50%)}div.rgb-sliders.sc-smoothly-input-color smoothly-input-range.sc-smoothly-input-color>div.sc-smoothly-input-color>input[name=s].sc-smoothly-input-color::-webkit-slider-runnable-track{background:linear-gradient(to right, hsl(var(--hsl-h), 0%, 50%), hsl(var(--hsl-h), 100%, 50%))}div.rgb-sliders.sc-smoothly-input-color smoothly-input-range.sc-smoothly-input-color>div.sc-smoothly-input-color>input[name=s].sc-smoothly-input-color::-moz-range-track{background:linear-gradient(to right, hsl(var(--hsl-h), 0%, 50%), hsl(var(--hsl-h), 100%, 50%))}div.rgb-sliders.sc-smoothly-input-color smoothly-input-range.sc-smoothly-input-color>div.sc-smoothly-input-color>input[name=s].sc-smoothly-input-color::-moz-range-thumb{background-color:hsl(var(--hsl-h), var(--hsl-s), 50%)}div.rgb-sliders.sc-smoothly-input-color smoothly-input-range.sc-smoothly-input-color>div.sc-smoothly-input-color>input[name=s].sc-smoothly-input-color::-webkit-slider-thumb{background-color:hsl(var(--hsl-h), var(--hsl-s), 50%)}div.rgb-sliders.sc-smoothly-input-color smoothly-input-range.sc-smoothly-input-color>div.sc-smoothly-input-color>input[name=l].sc-smoothly-input-color::-moz-range-track{background:linear-gradient(to right, black, white)}div.rgb-sliders.sc-smoothly-input-color smoothly-input-range.sc-smoothly-input-color>div.sc-smoothly-input-color>input[name=l].sc-smoothly-input-color::-webkit-slider-runnable-track{background:linear-gradient(to right, black, white)}div.rgb-sliders.sc-smoothly-input-color smoothly-input-range.sc-smoothly-input-color>div.sc-smoothly-input-color>input[name=l].sc-smoothly-input-color::-moz-range-thumb{background-color:#777}div.rgb-sliders.sc-smoothly-input-color smoothly-input-range.sc-smoothly-input-color>div.sc-smoothly-input-color>input[name=l].sc-smoothly-input-color::-webkit-slider-thumb{background-color:#777}`;const Fs=class{constructor(o){t(this,o);this.smoothlyInputLooks=e(this,"smoothlyInputLooks");this.smoothlyInput=e(this,"smoothlyInput");this.smoothlyUserInput=e(this,"smoothlyUserInput");this.smoothlyInputLoad=e(this,"smoothlyInputLoad");this.smoothlyFormDisable=e(this,"smoothlyFormDisable");this.isDifferentFromInitial=false;this.observer=Xo.Observer.create(this);this.rgb={r:undefined,g:undefined,b:undefined};this.hsl={h:undefined,s:undefined,l:undefined};this.value=undefined;this.readonly=false;this.output="rgb";this.showLabel=true;this.open=false;this.sliderMode="rgb"}async componentWillLoad(){this.value&&this.setInitialValue();this.value&&(this.rgb=r.Hex.toRGB(this.value));this.smoothlyInputLooks.emit(((t,e)=>{var o;return this.looks=(o=this.looks)!==null&&o!==void 0?o:t,this.color=e}));this.smoothlyInput.emit({[this.name]:await this.getValue()});this.smoothlyInputLoad.emit((t=>this.parent=t));!this.readonly&&this.smoothlyFormDisable.emit((t=>this.readonly=t))}smoothlyInputLooksHandler(t){if(t.target!=this.element){t.stopPropagation()}}smoothlyInputLoadHandler(t){ts.registerSubAction(this,t)}onWindowClick(t){!t.composedPath().includes(this.element)&&this.open&&(this.open=!this.open)}async disconnectedCallback(){if(!this.element.isConnected){await this.unregister()}}nameChange(t,e){ts.formRename(this,e)}watchingReadonly(){this.observer.publish()}async register(){ts.formAdd(this)}async unregister(){ts.formRemove(this)}async getValue(){return this.output==="rgb"?{r:this.rgb.r===undefined?undefined:Math.round(this.rgb.r),g:this.rgb.g===undefined?undefined:Math.round(this.rgb.g),b:this.rgb.b===undefined?undefined:Math.round(this.rgb.b)}:this.value?this.value:undefined}async clear(){this.rgb={r:undefined,g:undefined,b:undefined};this.hsl={h:undefined,s:undefined,l:undefined};this.value=undefined}async listen(t){this.observer.subscribe(t)}async edit(t){this.readonly=!t;this.open=false}async reset(){this.value=this.initialValue;this.open=false}async setInitialValue(){this.initialValue=this.value;this.open=false}async valueChanged(){this.isDifferentFromInitial=this.initialValue!==this.value;this.smoothlyInput.emit({[this.name]:await this.getValue()});this.observer.publish()}handleSwitchMode(t){t.stopPropagation();this.sliderMode=t.detail?"hsl":"rgb";if(this.sliderMode==="rgb"){this.value&&(this.rgb=r.Hex.toRGB(this.value))}else{this.value&&(this.hsl=r.RGB.toHSL(r.Hex.toRGB(this.value)))}}async hexInputHandler(t){if(t!==this.value){if(t&&r.Hex.type.is(t)){if(this.sliderMode==="hsl"||this.rgb.r===undefined){this.rgb=r.Hex.toRGB(t)}if(this.sliderMode==="rgb"||this.hsl.h===undefined){this.hsl=r.RGB.toHSL(r.Hex.toRGB(t))}}else if(!t||!r.Hex.type.is(t)){this.rgb={r:undefined,g:undefined,b:undefined};this.hsl={h:undefined,s:undefined,l:undefined}}this.value=t;this.smoothlyUserInput.emit({name:this.name,value:await this.getValue()})}}sliderInputHandler(t){var e;t.stopPropagation();const o=Object.keys(t.detail)[0];let s=this.sliderMode==="rgb"?this.rgb:this.hsl;if(!(t.detail[o]===undefined)){for(const a of Object.keys(s)){if(a===o){s=Object.assign(Object.assign({},s),{[a]:a==="s"||a==="l"?+((e=t.detail[o])!==null&&e!==void 0?e:0)*100:t.detail[o]})}else if(s[a]===undefined){s=Object.assign(Object.assign({},s),{[a]:0})}}if(this.sliderMode==="rgb"){this.rgb=Object.assign({},s);this.hsl=r.RGB.toHSL(this.rgb);this.hexInputHandler(r.RGB.toHex(this.rgb))}else{this.hsl=Object.assign({},s);this.rgb=r.HSL.toRGB(this.hsl);this.hexInputHandler(r.RGB.toHex(r.HSL.toRGB(this.hsl)))}}}openDropdown(){this.open=!this.open}render(){var t,e,a,i,l,n;return o(s,{key:"4db4d9329eaee9cad54871a66e4ea406e04a5b92",style:{"--hexCode":this.value,"--rgb-r":`${Math.round((t=this.rgb.r)!==null&&t!==void 0?t:0)}`,"--rgb-g":`${Math.round((e=this.rgb.g)!==null&&e!==void 0?e:0)}`,"--rgb-b":`${Math.round((a=this.rgb.b)!==null&&a!==void 0?a:0)}`,"--hsl-h":`${Math.round((i=this.hsl.h)!==null&&i!==void 0?i:0)}`,"--hsl-s":`${Math.round((l=this.hsl.s)!==null&&l!==void 0?l:0)}%`,"--hsl-l":`${Math.round((n=this.hsl.l)!==null&&n!==void 0?n:0)}%`,"--element-height":`${this.element.clientHeight}px`}},o("smoothly-input",{key:"d3fe0aeedcd45bacc1d38e75d7d5e97be3992a34",value:this.value,color:this.color,looks:undefined,name:this.name,type:"hex-color",readonly:this.readonly,disabled:this.disabled,showLabel:this.showLabel,onSmoothlyInput:t=>(t===null||t===void 0?void 0:t.stopPropagation(),this.hexInputHandler(t.detail[this.name]))},o("slot",{key:"77f78c79097fc43d15b453044170290e25c1bfc2"})),o("div",{key:"f8c144c3cfdc9ef249c941f492b009030eb97dda",class:"color-sample"}),o("smoothly-icon",{key:"8d29d95ef7cbc08cdf429088e9f005a02544ecad",color:this.color,name:"options-outline",size:"small",onClick:()=>!this.readonly&&!this.disabled&&this.openDropdown()}),o("div",{key:"8efce2fd4ca6fbde9968bddd60b54cb6e097091e"},o("slot",{key:"fd99776b1a150dd549d69e013124308ab6d2f16f",name:"end"})),this.open&&!this.readonly&&!this.disabled&&o("div",{key:"67b8c3fb973292a65257eedb64ac7a01044843d2",class:"rgb-sliders"},o("smoothly-toggle-switch",{key:"f576c2ce5b277209b94c8560e559299c715ea1e1",title:`${this.sliderMode==="rgb"?"To HSL":"To RGB"}`,onSmoothlyToggleSwitchChange:t=>this.handleSwitchMode(t),size:"tiny",checkmark:false,selected:this.sliderMode==="hsl"}),Object.entries(this.rgb).map((([t,e])=>o("smoothly-input-range",{style:this.sliderMode!="rgb"?{display:"none"}:{},name:t,min:0,max:255,color:undefined,type:"text",value:e,step:1,outputSide:"right",onSmoothlyInput:t=>this.sliderInputHandler(t),onSmoothlyUserInput:t=>t.stopPropagation(),label:t.toUpperCase()}))),Object.entries(this.hsl).map((([t,e])=>o("smoothly-input-range",{style:this.sliderMode!="hsl"?{display:"none"}:{},name:t,min:0,max:t==="h"?359:1,color:undefined,type:t==="s"||t==="l"?"percent":"text",value:(t==="s"||t==="l")&&e?e/100:e,step:t==="s"||t==="l"?.01:1,outputSide:"right",onSmoothlyInput:t=>this.sliderInputHandler(t),onSmoothlyUserInput:t=>t.stopPropagation(),label:t.toUpperCase()})))))}get element(){return a(this)}static get watchers(){return{name:[{nameChange:0}],disabled:[{watchingReadonly:0}],readonly:[{watchingReadonly:0}],value:[{valueChanged:0}]}}};Fs.style=Hs();const Us=class{constructor(e){t(this,e)}render(){return o(s,{key:"9ad04e1aa481ec3ad05d6487a25ab69202d2a8bf"},o("h2",{key:"cc47b241d3bb3e43752a3b0ec2e72144b2955bfa"},"Color"),o("smoothly-input-color",{key:"db081098c0eb29a73c9a708df96b48fd77425796",name:"color"},"Choose color"))}};Us.style=`style.css`;const Ns=()=>`.sc-smoothly-input-date-h{--input-padding-side:.5rem;--input-value-padding-top:1.25rem;--input-value-padding-bottom:.25rem;--input-min-height:3rem;min-height:var(--input-min-height);box-sizing:border-box;border-radius:var(--smoothly-input-border-radius)}[looks="border"].sc-smoothly-input-date-h{border:rgb(var(--smoothly-input-border)) solid 1px}[looks="border"].sc-smoothly-input-date-h:not([readonly]):not([disabled]):focus-within{outline:2px solid rgb(var(--smoothly-input-border-focus))}[looks="border"][readonly].sc-smoothly-input-date-h{border:transparent solid 1px}[looks="line"].sc-smoothly-input-date-h{border-bottom:rgb(var(--smoothly-input-border)) solid 1px;position:relative}[looks="line"][readonly].sc-smoothly-input-date-h{border-bottom:transparent solid 1px}[looks="line"].sc-smoothly-input-date-h:not([readonly]):not([disabled]):focus-within::before{content:"";position:absolute;inset:0;pointer-events:none;border-bottom:2px solid rgb(var(--smoothly-input-border-focus));z-index:10}[looks="grid"].sc-smoothly-input-date-h{flex-grow:1;flex-basis:40%;box-shadow:0px 0px 0px 1px rgb(var(--smoothly-input-border));border:none}[looks="grid"][readonly].sc-smoothly-input-date-h{box-shadow:0px 0px 0px 1px rgba(var(--smoothly-input-border-readonly))}[looks="grid"].sc-smoothly-input-date-h:not([readonly]):not([disabled]):focus-within{position:relative;box-shadow:0px 0px 0px 2px rgb(var(--smoothly-input-border-focus));outline:none;z-index:10}[looks="transparent"].sc-smoothly-input-date-h{border:none}[looks="transparent"][readonly].sc-smoothly-input-date-h,[looks="transparent"].sc-smoothly-input-date-h:not(:focus-within){background-color:transparent}[looks="transparent"][readonly].sc-smoothly-input-date-h>input.sc-smoothly-input-date,[looks="transparent"].sc-smoothly-input-date-h:not(:focus-within)>input.sc-smoothly-input-date{background-color:transparent}[looks="transparent"].sc-smoothly-input-date-h:not([readonly]):focus-within{outline:1px solid rgb(var(--smoothly-input-border))}[disabled].sc-smoothly-input-date-h{cursor:not-allowed;--smoothly-input-foreground:var(--smoothly-input-disabled-foreground);--smoothly-input-background:var(--smoothly-input-disabled-background);--smoothly-input-border:var(--smoothly-input-disabled-border)}.sc-smoothly-input-date-h.sc-smoothly-input-date-s>[slot=label],.sc-smoothly-input-date-h .sc-smoothly-input-date-s>[slot=label],.sc-smoothly-input-date-h .label.sc-smoothly-input-date{position:absolute;top:.6rem;opacity:0.8;user-select:none;cursor:inherit;transform-origin:top left;transition:transform 100ms ease}[right].sc-smoothly-input-date-h .label.sc-smoothly-input-date{transform-origin:top right}.sc-smoothly-input-date-h.floating-label.sc-smoothly-input-date-s>[slot=label],.sc-smoothly-input-date-h.floating-label .sc-smoothly-input-date-s>[slot=label],.sc-smoothly-input-date-h.has-value.sc-smoothly-input-date-s>[slot=label],.sc-smoothly-input-date-h.has-value .sc-smoothly-input-date-s>[slot=label],.sc-smoothly-input-date-h[placeholder].sc-smoothly-input-date-s>[slot=label],.sc-smoothly-input-date-h[placeholder] .sc-smoothly-input-date-s>[slot=label],.sc-smoothly-input-date-h[readonly].sc-smoothly-input-date-s>[slot=label],.sc-smoothly-input-date-h[readonly] .sc-smoothly-input-date-s>[slot=label],.floating-label.sc-smoothly-input-date-h .label.sc-smoothly-input-date,.has-value.sc-smoothly-input-date-h .label.sc-smoothly-input-date,.has-text.sc-smoothly-input-date-h .label.sc-smoothly-input-date,[placeholder].sc-smoothly-input-date-h .label.sc-smoothly-input-date,[readonly].sc-smoothly-input-date-h .label.sc-smoothly-input-date,.sc-smoothly-input-date-h:not([readonly]):focus-within .label.float-on-focus.sc-smoothly-input-date{top:.2rem;transform:scale(0.8)}.sc-smoothly-input-date-h:not([show-label]):not(.show-label) .label.sc-smoothly-input-date{display:none}.sc-smoothly-input-date-h smoothly-icon.smoothly-invalid.sc-smoothly-input-date{fill:rgb(var(--smoothly-input-invalid-icon, var(--smoothly-danger-color)))}.sc-smoothly-input-date-h{display:flex;position:relative;max-width:100vw;background-color:rgb(var(--smoothly-input-background));box-sizing:border-box;min-height:var(--input-min-height)}.sc-smoothly-input-date-h .smoothly-date-placeholder.sc-smoothly-input-date{display:none}.sc-smoothly-input-date-h:not([always-show-guide]):not(:focus-within):not(.has-text) .smoothly-date-placeholder.sc-smoothly-input-date{opacity:0.5;display:block}.sc-smoothly-input-date-h:not([always-show-guide]):not(:focus-within):not(.has-text) smoothly-date-text.sc-smoothly-input-date{visibility:hidden}.sc-smoothly-input-date-h>.label.sc-smoothly-input-date{left:var(--input-padding-side)}[show-label].sc-smoothly-input-date-h>.smoothly-date-placeholder.sc-smoothly-input-date,[show-label].sc-smoothly-input-date-h>smoothly-date-text.sc-smoothly-input-date{margin-inline:var(--input-padding-side);margin-block:var(--input-value-padding-top) var(--input-value-padding-bottom)}.sc-smoothly-input-date-h:not([show-label])>.smoothly-date-placeholder.sc-smoothly-input-date,.sc-smoothly-input-date-h:not([show-label])>smoothly-date-text.sc-smoothly-input-date{margin-inline:var(--input-padding-side) auto;margin-block:auto}.sc-smoothly-input-date-h:not([readonly]){cursor:pointer}[disabled].sc-smoothly-input-date-h{cursor:not-allowed}.sc-smoothly-input-date-h>smoothly-calendar.sc-smoothly-input-date{position:absolute;z-index:20;top:4rem;background-color:rgb(var(--smoothly-input-background));min-width:18rem;max-width:22rem}.sc-smoothly-input-date-h>smoothly-calendar.sc-smoothly-input-date::before{content:"";position:absolute;left:2rem;top:-0.55rem;z-index:9;transform:rotate(45deg);width:1rem;height:1rem;background-color:rgb(var(--smoothly-input-background));border-top:1px solid rgb(var(--smoothly-input-border));border-left:1px solid rgb(var(--smoothly-input-border))}.sc-smoothly-input-date-h>.smoothly-icons.sc-smoothly-input-date{display:flex;flex-direction:row;align-items:center;margin-left:auto}.sc-smoothly-input-date-h>.smoothly-icons.sc-smoothly-input-date>.smoothly-invalid.sc-smoothly-input-date{display:none;padding:0.5rem}[invalid].sc-smoothly-input-date-h>.smoothly-icons.sc-smoothly-input-date>.smoothly-invalid.sc-smoothly-input-date{display:flex}`;const Ys=class{constructor(o){t(this,o);this.smoothlyInputLoad=e(this,"smoothlyInputLoad");this.smoothlyValueChange=e(this,"smoothlyValueChange");this.smoothlyInput=e(this,"smoothlyInput");this.smoothlyUserInput=e(this,"smoothlyUserInput");this.smoothlyInputLooks=e(this,"smoothlyInputLooks");this.smoothlyFormDisable=e(this,"smoothlyFormDisable");this.readonly=false;this.invalid=false;this.alwaysShowGuide=false;this.changed=false;this.isDifferentFromInitial=false;this.hasFocus=false;this.observer=Xo.Observer.create(this);this.showLabel=true;this.hasText=false}componentWillLoad(){this.setInitialValue();this.smoothlyInputLooks.emit(((t,e)=>{var o;return this.looks=(o=this.looks)!==null&&o!==void 0?o:t,!this.color&&(this.color=e)}));this.smoothlyInputLoad.emit((t=>this.parent=t));!this.readonly&&this.smoothlyFormDisable.emit((t=>this.readonly=t));this.observer.publish()}async disconnectedCallback(){if(!this.element.isConnected){await this.unregister()}}nameChange(t,e){ts.formRename(this,e)}async register(){ts.formAdd(this)}async unregister(){ts.formRemove(this)}async getValue(){return this.value}async listen(t){this.observer.subscribe(t)}async clear(){this.value=undefined}onValueChange(t){var e;if(!this.hasFocus){(e=this.dateTextElement)===null||e===void 0?void 0:e.setValue(t)}this.isDifferentFromInitial=this.initialValue!=this.value;this.smoothlyValueChange.emit(t);this.smoothlyInput.emit({[this.name]:t});this.observer.publish()}watchingReadonly(){this.observer.publish()}smoothlyInputHandler(t){if(t.target!=this.element){t.stopPropagation()}}smoothlyInputLooksHandler(t){if(t.target!=this.element){t.stopPropagation()}}smoothlyInputLoadHandler(t){ts.registerSubAction(this,t)}onWindowClick(t){!t.composedPath().includes(this.element)&&this.open&&(this.open=!this.open)}onClick(t){var e;const o=!!this.dateTextElement&&t.composedPath().includes(this.dateTextElement);const s=!!this.calendarElement&&t.composedPath().includes(this.calendarElement);const a=!!this.iconsElement&&t.composedPath().includes(this.iconsElement);if(!this.readonly&&!this.disabled&&!o&&!s&&!a){(e=this.dateTextElement)===null||e===void 0?void 0:e.select()}if(!this.readonly&&!this.disabled&&!s&&!a){this.open=!this.open||o}}onUserChangedValue(t){var e;t.stopPropagation();const o=(e=t.detail)!==null&&e!==void 0?e:undefined;if(this.value!=o){this.value=o;this.smoothlyUserInput.emit({name:this.name,value:this.value})}}async edit(t){this.readonly=!t}async reset(){this.value=this.initialValue}async setInitialValue(){this.initialValue=this.value;this.isDifferentFromInitial=false}dateSetHandler(t){this.open=false;t.stopPropagation()}render(){return o(s,{key:"23eb18ee49132c7fa6bb48a457212e95b3297499",tabindex:this.disabled?undefined:0,class:{"has-value":!!this.value,"has-text":this.hasText,"floating-label":this.alwaysShowGuide},onClick:t=>this.onClick(t)},o("slot",{key:"92c0fc2f3bdba5377ffee8289cba726125541997",name:"start"}),o("label",{key:"cd6a68025235ba18a254dd1a7e7bdb722f5c24ec",class:"label float-on-focus"},o("slot",{key:"c2d23b15c470fe987088c41abc9fb3af2fb5c7f4"})),this.placeholder&&o("span",{key:"530b2676fc554e1cf1efce7f1553897fdf405767",class:"smoothly-date-placeholder"},this.placeholder),o("smoothly-date-text",{key:"8d4fa83adba95afedc7adebbf88582801141b8ca",ref:t=>this.dateTextElement=t,locale:this.locale,readonly:this.readonly,disabled:this.disabled,showLabel:this.showLabel,value:this.value,onSmoothlyDateTextHasText:t=>(t.stopPropagation(),this.hasText=t.detail),onSmoothlyDateTextFocusChange:t=>(t.stopPropagation(),this.hasFocus=t.detail),onSmoothlyDateHasPartialDate:t=>{var e;return t.stopPropagation(),(e=this.calendarElement)===null||e===void 0?void 0:e.jumpTo(t.detail)},onSmoothlyDateTextChange:t=>(t.stopPropagation(),this.onUserChangedValue(t)),onSmoothlyDateTextDone:t=>{var e;return t.stopPropagation(),this.open=false,(e=this.dateTextElement)===null||e===void 0?void 0:e.deselect()}}),o("span",{key:"697c0a69230175703f5be27b2ffe5608424e3c6e",class:"smoothly-icons",ref:t=>this.iconsElement=t},o("smoothly-icon",{key:"1d33bc9911d8bfe7e955bed1be025da988c34897",class:"smoothly-invalid",name:"alert-circle",size:"small",tooltip:this.errorMessage}),o("slot",{key:"c0a3906ace69bd3a6c41c39a3538a811554673bc",name:"end"})),this.open&&!this.readonly&&o("smoothly-calendar",{key:"19d3e81a19c37a7d50ee31b1a27b1762a32de2ee",ref:t=>this.calendarElement=t,doubleInput:false,value:this.value,onSmoothlyDateSet:t=>(t.stopPropagation(),this.onUserChangedValue(t)),max:this.max,min:this.min},o("div",{key:"960b3b1b2fb3928d6f71d6d7f3456b6d86c537f2",slot:"year-label"},o("slot",{key:"1ba7fa33c27fbc2310f6fbb6094f1fac3901ca0f",name:"year-label"})),o("div",{key:"b129672d85ce661203e6a0746a0778437a4ea857",slot:"month-label"},o("slot",{key:"8c19839eb59e587650b40715722ee8ce12fb26a7",name:"month-label"}))))}get element(){return a(this)}static get watchers(){return{name:[{nameChange:0}],value:[{onValueChange:0}],disabled:[{watchingReadonly:0}],readonly:[{watchingReadonly:0}]}}};Ys.style=Ns();const Ws=()=>`.sc-smoothly-input-date-demo-h{display:grid;grid-template-columns:repeat(auto-fit, minmax(20rem, 1fr));max-width:min(42rem, 100%);margin:auto;flex-direction:column;gap:0.5rem}.sc-smoothly-input-date-demo-h .sc-smoothly-input-date-demo:not(smoothly-input-date):not(smoothly-input-date-range){grid-column:1 / -1}`;const Bs=class{constructor(e){t(this,e);this.alwaysShowGuide=false}render(){return o(s,{key:"9602907d9ae0152643b48455bdd21da2a8a91a50"},o("div",{key:"2e9244031f62cb552fff12fd107050c42065bc1d"},o("h2",{key:"26b155267a35157e779724e7b805496aa01d61e5"},"Date input"),o("p",{key:"b2f4a4d204e681869e2a3067b4f08bfd53700077"},"Different locales formatting the same date"),o("smoothly-button",{key:"2e8e18bc20722b720f6f26b5c720cf31c6ba236b",color:"primary",onClick:()=>this.date=this.date?C.Date.next(this.date):C.Date.now()},"Set date"),o("smoothly-input-checkbox",{key:"13101795d8056cad4581762357226c669181f56b",looks:"transparent",onSmoothlyUserInput:t=>{this.alwaysShowGuide=t.detail.value;console.log(this.alwaysShowGuide)}},"Always Show Guide")),["en-US","en-GB","de-DE","se-SE"].map((t=>o(i,null,o("smoothly-input-date",{locale:t,name:t,looks:"border",value:this.date,alwaysShowGuide:this.alwaysShowGuide},t,o("smoothly-input-clear",{slot:"end"})),o("smoothly-input-date-range",{locale:t,name:t+"-range",looks:"border",start:this.date,end:this.date?C.Date.next(this.date):undefined,alwaysShowGuide:this.alwaysShowGuide},t," Range",o("smoothly-input-clear",{slot:"end"}))))))}};Bs.style=Ws();const Vs=()=>`.sc-smoothly-input-date-range-h{--input-padding-side:.5rem;--input-value-padding-top:1.25rem;--input-value-padding-bottom:.25rem;--input-min-height:3rem;min-height:var(--input-min-height);box-sizing:border-box;border-radius:var(--smoothly-input-border-radius)}[looks="border"].sc-smoothly-input-date-range-h{border:rgb(var(--smoothly-input-border)) solid 1px}[looks="border"].sc-smoothly-input-date-range-h:not([readonly]):not([disabled]):focus-within{outline:2px solid rgb(var(--smoothly-input-border-focus))}[looks="border"][readonly].sc-smoothly-input-date-range-h{border:transparent solid 1px}[looks="line"].sc-smoothly-input-date-range-h{border-bottom:rgb(var(--smoothly-input-border)) solid 1px;position:relative}[looks="line"][readonly].sc-smoothly-input-date-range-h{border-bottom:transparent solid 1px}[looks="line"].sc-smoothly-input-date-range-h:not([readonly]):not([disabled]):focus-within::before{content:"";position:absolute;inset:0;pointer-events:none;border-bottom:2px solid rgb(var(--smoothly-input-border-focus));z-index:10}[looks="grid"].sc-smoothly-input-date-range-h{flex-grow:1;flex-basis:40%;box-shadow:0px 0px 0px 1px rgb(var(--smoothly-input-border));border:none}[looks="grid"][readonly].sc-smoothly-input-date-range-h{box-shadow:0px 0px 0px 1px rgba(var(--smoothly-input-border-readonly))}[looks="grid"].sc-smoothly-input-date-range-h:not([readonly]):not([disabled]):focus-within{position:relative;box-shadow:0px 0px 0px 2px rgb(var(--smoothly-input-border-focus));outline:none;z-index:10}[looks="transparent"].sc-smoothly-input-date-range-h{border:none}[looks="transparent"][readonly].sc-smoothly-input-date-range-h,[looks="transparent"].sc-smoothly-input-date-range-h:not(:focus-within){background-color:transparent}[looks="transparent"][readonly].sc-smoothly-input-date-range-h>input.sc-smoothly-input-date-range,[looks="transparent"].sc-smoothly-input-date-range-h:not(:focus-within)>input.sc-smoothly-input-date-range{background-color:transparent}[looks="transparent"].sc-smoothly-input-date-range-h:not([readonly]):focus-within{outline:1px solid rgb(var(--smoothly-input-border))}[disabled].sc-smoothly-input-date-range-h{cursor:not-allowed;--smoothly-input-foreground:var(--smoothly-input-disabled-foreground);--smoothly-input-background:var(--smoothly-input-disabled-background);--smoothly-input-border:var(--smoothly-input-disabled-border)}.sc-smoothly-input-date-range-h.sc-smoothly-input-date-range-s>[slot=label],.sc-smoothly-input-date-range-h .sc-smoothly-input-date-range-s>[slot=label],.sc-smoothly-input-date-range-h .label.sc-smoothly-input-date-range{position:absolute;top:.6rem;opacity:0.8;user-select:none;cursor:inherit;transform-origin:top left;transition:transform 100ms ease}[right].sc-smoothly-input-date-range-h .label.sc-smoothly-input-date-range{transform-origin:top right}.sc-smoothly-input-date-range-h.floating-label.sc-smoothly-input-date-range-s>[slot=label],.sc-smoothly-input-date-range-h.floating-label .sc-smoothly-input-date-range-s>[slot=label],.sc-smoothly-input-date-range-h.has-value.sc-smoothly-input-date-range-s>[slot=label],.sc-smoothly-input-date-range-h.has-value .sc-smoothly-input-date-range-s>[slot=label],.sc-smoothly-input-date-range-h[placeholder].sc-smoothly-input-date-range-s>[slot=label],.sc-smoothly-input-date-range-h[placeholder] .sc-smoothly-input-date-range-s>[slot=label],.sc-smoothly-input-date-range-h[readonly].sc-smoothly-input-date-range-s>[slot=label],.sc-smoothly-input-date-range-h[readonly] .sc-smoothly-input-date-range-s>[slot=label],.floating-label.sc-smoothly-input-date-range-h .label.sc-smoothly-input-date-range,.has-value.sc-smoothly-input-date-range-h .label.sc-smoothly-input-date-range,.has-text.sc-smoothly-input-date-range-h .label.sc-smoothly-input-date-range,[placeholder].sc-smoothly-input-date-range-h .label.sc-smoothly-input-date-range,[readonly].sc-smoothly-input-date-range-h .label.sc-smoothly-input-date-range,.sc-smoothly-input-date-range-h:not([readonly]):focus-within .label.float-on-focus.sc-smoothly-input-date-range{top:.2rem;transform:scale(0.8)}.sc-smoothly-input-date-range-h:not([show-label]):not(.show-label) .label.sc-smoothly-input-date-range{display:none}.sc-smoothly-input-date-range-h smoothly-icon.smoothly-invalid.sc-smoothly-input-date-range{fill:rgb(var(--smoothly-input-invalid-icon, var(--smoothly-danger-color)))}.sc-smoothly-input-date-range-h{position:relative;display:flex;background-color:rgb(var(--smoothly-input-background))}.sc-smoothly-input-date-range-h [slot=start].sc-smoothly-input-date-range{align-self:center}.sc-smoothly-input-date-range-h .label.sc-smoothly-input-date-range{left:var(--input-padding-side)}.sc-smoothly-input-date-range-h .smoothly-date-range-separator.sc-smoothly-input-date-range{white-space:pre}.sc-smoothly-input-date-range-h .smoothly-date-range-placeholder.sc-smoothly-input-date-range{margin-inline:var(--input-padding-side);display:none}.sc-smoothly-input-date-range-h:not([always-show-guide]):not(:focus-within):not(.has-text) .smoothly-date-range-placeholder.sc-smoothly-input-date-range{display:block;opacity:0.5}.sc-smoothly-input-date-range-h:not([always-show-guide]):not(:focus-within):not(.has-text) smoothly-date-text.sc-smoothly-input-date-range,.sc-smoothly-input-date-range-h:not([always-show-guide]):not(:focus-within):not(.has-text) .smoothly-date-range-separator.sc-smoothly-input-date-range{visibility:hidden}.sc-smoothly-input-date-range-h smoothly-date-text.start-date-text.sc-smoothly-input-date-range{margin-inline:var(--input-padding-side) 0}.sc-smoothly-input-date-range-h smoothly-date-text.end-date-text.sc-smoothly-input-date-range{margin-inline:0 var(--input-padding-side)}[show-label].sc-smoothly-input-date-range-h .smoothly-date-range-placeholder.sc-smoothly-input-date-range,[show-label].sc-smoothly-input-date-range-h smoothly-date-text.sc-smoothly-input-date-range,[show-label].sc-smoothly-input-date-range-h .smoothly-date-range-separator.sc-smoothly-input-date-range{margin-block:var(--input-value-padding-top) var(--input-value-padding-bottom)}.sc-smoothly-input-date-range-h:not([show-label]) .smoothly-date-range-placeholder.sc-smoothly-input-date-range,.sc-smoothly-input-date-range-h:not([show-label]) smoothly-date-text.sc-smoothly-input-date-range,.sc-smoothly-input-date-range-h:not([show-label]) .smoothly-date-range-separator.sc-smoothly-input-date-range{margin-block:auto}.sc-smoothly-input-date-range-h:not([readonly]){cursor:pointer}[disabled].sc-smoothly-input-date-range-h{cursor:not-allowed}.sc-smoothly-input-date-range-h>smoothly-calendar.sc-smoothly-input-date-range{position:absolute;z-index:20;top:4rem;background-color:rgb(var(--smoothly-input-background));max-width:22rem;min-width:18rem}.sc-smoothly-input-date-range-h>smoothly-calendar.sc-smoothly-input-date-range::before{content:"";position:absolute;top:-0.55rem;left:3rem;z-index:9;transform:rotate(45deg);width:1rem;height:1rem;background-color:rgb(var(--smoothly-input-background));border-top:1px solid rgb(var(--smoothly-input-border));border-left:1px solid rgb(var(--smoothly-input-border))}.sc-smoothly-input-date-range-h>.smoothly-date-range-input-part.sc-smoothly-input-date-range{display:flex;width:100%;background-color:var(--smoothly-input-background);border-radius:0.25rem;cursor:pointer}.sc-smoothly-input-date-range-h>span.smoothly-icons.sc-smoothly-input-date-range{display:flex;flex-direction:row;align-items:center}.sc-smoothly-input-date-range-h>.smoothly-icons.sc-smoothly-input-date-range>.smoothly-invalid.sc-smoothly-input-date-range{display:none;padding:0.5rem}[invalid].sc-smoothly-input-date-range-h>.smoothly-icons.sc-smoothly-input-date-range>.smoothly-invalid.sc-smoothly-input-date-range{display:flex}`;const Gs=class{constructor(o){t(this,o);this.smoothlyInput=e(this,"smoothlyInput");this.smoothlyUserInput=e(this,"smoothlyUserInput");this.smoothlyInputLoad=e(this,"smoothlyInputLoad");this.smoothlyInputLooks=e(this,"smoothlyInputLooks");this.smoothlyFormDisable=e(this,"smoothlyFormDisable");this.name="dateRange";this.readonly=false;this.showLabel=true;this.alwaysShowGuide=false;this.invalid=false;this.isDifferentFromInitial=false;this.hasFocus=false;this.observer=Xo.Observer.create(this);this.startHasText=false;this.endHasText=false}async componentWillLoad(){this.setInitialValue();this.smoothlyInputLooks.emit(((t,e)=>{var o;return this.looks=(o=this.looks)!==null&&o!==void 0?o:t,!this.color&&(this.color=e)}));this.smoothlyInputLoad.emit((t=>this.parent=t));this.smoothlyInput.emit({[this.name]:await this.getValue()});!this.readonly&&this.smoothlyFormDisable.emit((t=>this.readonly=t));this.observer.publish()}startChanged(t,e){this.updateValue(e,this.end)}endChanged(t,e){this.updateValue(this.start,e)}async updateValue(t,e){var o,s;if(t!=this.start||e!=this.end){this.isDifferentFromInitial=this.initialStart!=this.start||this.initialEnd!=this.end;this.smoothlyInput.emit({[this.name]:await this.getValue()});this.observer.publish()}if(!this.hasFocus){(o=this.startTextElement)===null||o===void 0?void 0:o.setValue(this.start);(s=this.endTextElement)===null||s===void 0?void 0:s.setValue(this.end)}}watchingReadonly(){this.observer.publish()}smoothlyInputLoadHandler(t){ts.registerSubAction(this,t)}smoothlyInputLooksHandler(t){if(t.target!=this.element){t.stopPropagation()}}onWindowClick(t){!t.composedPath().includes(this.element)&&this.open&&(this.open=!this.open)}onClick(t){var e,o;const s=!!this.startTextElement&&t.composedPath().includes(this.startTextElement);const a=!!this.endTextElement&&t.composedPath().includes(this.endTextElement);const i=s||a;if(!i&&!this.readonly&&!this.disabled){this.start&&!this.end?(e=this.endTextElement)===null||e===void 0?void 0:e.select():(o=this.startTextElement)===null||o===void 0?void 0:o.select()}if(!this.readonly&&!this.disabled){this.open=!this.open||i}}async onSmoothlyDateTextChange(t,e){var o,s,a;t.stopPropagation();const i=(o=t.detail)!==null&&o!==void 0?o:undefined;const l=e=="start"?i:this.start;const n=e=="end"?i:this.end;if(C.Date.is(l)&&C.Date.is(n)&&l>n){this.start=n;this.end=l;(s=this.startTextElement)===null||s===void 0?void 0:s.setValue(this.start);(a=this.endTextElement)===null||a===void 0?void 0:a.setValue(this.end);this.smoothlyUserInput.emit({name:this.name,value:await this.getValue()})}else if(this[e]!=i){this[e]=i;this.smoothlyUserInput.emit({name:this.name,value:await this.getValue()})}}async disconnectedCallback(){if(!this.element.isConnected){await this.unregister()}}nameChange(t,e){ts.formRename(this,e)}async register(){ts.formAdd(this)}async unregister(){ts.formRemove(this)}async getValue(){return this.start||this.end?{start:this.start,end:this.end}:undefined}async listen(t){this.observer.subscribe(t)}async edit(t){this.readonly=!t}async reset(){this.start=this.initialStart;this.end=this.initialEnd}async setInitialValue(){this.initialStart=this.start;this.initialEnd=this.end;this.isDifferentFromInitial=false}async clear(){this.start=undefined;this.end=undefined;this.smoothlyInput.emit({[this.name]:undefined})}render(){return o(s,{key:"8d1cc0bf552d9366cd676ca4d28ba9131b762985",tabindex:this.disabled?undefined:0,class:{"has-value":!!(this.start||this.end),"has-text":!!(this.startHasText||this.endHasText),"floating-label":this.alwaysShowGuide}},o("span",{key:"ea5b162b919565e8ab3ba6d5c7420fad8d7bbfbd",class:"smoothly-date-range-input-part",onClick:t=>this.onClick(t)},o("slot",{key:"ea6a109b34aefa2256aa1b82972dbbc5fef55897",name:"start"}),o("label",{key:"b9b7f869df370e0f6e882b95babbe5c8f54ea324",class:"label float-on-focus"},o("slot",{key:"1aa509d8a9438fa7151d4d50c62e9e07c981c58c"})),this.placeholder&&o("span",{key:"ece35a37734177645133e14582ae692565c8a0a6",class:"smoothly-date-range-placeholder"},this.placeholder),o("smoothly-date-text",{key:"b840c7a75cf6aa6a73bac8aef415d709e533a7f4",ref:t=>this.startTextElement=t,class:"start-date-text",locale:this.locale,onSmoothlyDateTextHasText:t=>(t.stopPropagation(),this.startHasText=t.detail),onSmoothlyDateTextFocusChange:t=>(t.stopPropagation(),this.hasFocus=t.detail),onSmoothlyDateHasPartialDate:t=>{var e;return t.stopPropagation(),(e=this.calendarElement)===null||e===void 0?void 0:e.jumpTo(t.detail)},onSmoothlyDateTextChange:t=>(t.stopPropagation(),this.onSmoothlyDateTextChange(t,"start")),onSmoothlyDateTextNext:t=>{var e;return t.stopPropagation(),(e=this.endTextElement)===null||e===void 0?void 0:e.select()},onSmoothlyDateTextDone:t=>{var e,o;return t.stopPropagation(),this.end?((e=this.startTextElement)===null||e===void 0?void 0:e.deselect(),this.open=false):(o=this.endTextElement)===null||o===void 0?void 0:o.select()},value:this.start,readonly:this.readonly,disabled:this.disabled,showLabel:this.showLabel}),o("span",{key:"f17bfad7cd7aca649b05cc75f3062a28fcf0cd5f",class:"smoothly-date-range-separator"}," – "),o("smoothly-date-text",{key:"1aa47809013250eaea4ded0dc664b1af5a1170ba",ref:t=>this.endTextElement=t,class:"end-date-text",locale:this.locale,onSmoothlyDateTextHasText:t=>(t.stopPropagation(),this.endHasText=t.detail),onSmoothlyDateTextFocusChange:t=>(t.stopPropagation(),this.hasFocus=t.detail),onSmoothlyDateHasPartialDate:t=>{var e;return t.stopPropagation(),(e=this.calendarElement)===null||e===void 0?void 0:e.jumpTo(t.detail)},onSmoothlyDateTextChange:t=>(t.stopPropagation(),this.onSmoothlyDateTextChange(t,"end")),onSmoothlyDateTextPrevious:t=>{var e;return t.stopPropagation(),(e=this.startTextElement)===null||e===void 0?void 0:e.select("end")},onSmoothlyDateTextNext:t=>t.stopPropagation(),onSmoothlyDateTextDone:t=>{var e;return t.stopPropagation(),(e=this.endTextElement)===null||e===void 0?void 0:e.deselect(),this.open=false},value:this.end,readonly:this.readonly,disabled:this.disabled,showLabel:this.showLabel})),o("span",{key:"b429db5ba1bf4197a08c5872028549f09390ac99",class:"smoothly-icons"},o("smoothly-icon",{key:"1b9f165fe8fc3a509636aebe6cd5050ffc99e153",class:"smoothly-invalid",name:"alert-circle",size:"small",tooltip:this.errorMessage}),o("slot",{key:"e508de43633d4cadd8a1f83de6a2fa8599175e30",name:"end"})),this.open&&o("smoothly-calendar",{key:"273526a8a97a657724014910b805c3c41c04833f",ref:t=>this.calendarElement=t,doubleInput:true,onSmoothlyDateSet:t=>t.stopPropagation(),onSmoothlyDateRangeSet:t=>{t.stopPropagation();this.open=false;this.start=t.detail.start;this.end=t.detail.end;this.smoothlyInput.emit({[this.name]:t.detail});this.smoothlyUserInput.emit({name:this.name,value:t.detail})},value:this.start,start:this.start,end:this.end,max:this.max,min:this.min}))}get element(){return a(this)}static get watchers(){return{start:[{startChanged:0}],end:[{endChanged:0}],disabled:[{watchingReadonly:0}],readonly:[{watchingReadonly:0}],name:[{nameChange:0}]}}};Gs.style=Vs();const Ks=()=>`.sc-smoothly-input-date-time-h{--input-padding-side:.5rem;--input-value-padding-top:1.25rem;--input-value-padding-bottom:.25rem;--input-min-height:3rem;min-height:var(--input-min-height);box-sizing:border-box;border-radius:var(--smoothly-input-border-radius)}[looks="border"].sc-smoothly-input-date-time-h{border:rgb(var(--smoothly-input-border)) solid 1px}[looks="border"].sc-smoothly-input-date-time-h:not([readonly]):not([disabled]):focus-within{outline:2px solid rgb(var(--smoothly-input-border-focus))}[looks="border"][readonly].sc-smoothly-input-date-time-h{border:transparent solid 1px}[looks="line"].sc-smoothly-input-date-time-h{border-bottom:rgb(var(--smoothly-input-border)) solid 1px;position:relative}[looks="line"][readonly].sc-smoothly-input-date-time-h{border-bottom:transparent solid 1px}[looks="line"].sc-smoothly-input-date-time-h:not([readonly]):not([disabled]):focus-within::before{content:"";position:absolute;inset:0;pointer-events:none;border-bottom:2px solid rgb(var(--smoothly-input-border-focus));z-index:10}[looks="grid"].sc-smoothly-input-date-time-h{flex-grow:1;flex-basis:40%;box-shadow:0px 0px 0px 1px rgb(var(--smoothly-input-border));border:none}[looks="grid"][readonly].sc-smoothly-input-date-time-h{box-shadow:0px 0px 0px 1px rgba(var(--smoothly-input-border-readonly))}[looks="grid"].sc-smoothly-input-date-time-h:not([readonly]):not([disabled]):focus-within{position:relative;box-shadow:0px 0px 0px 2px rgb(var(--smoothly-input-border-focus));outline:none;z-index:10}[looks="transparent"].sc-smoothly-input-date-time-h{border:none}[looks="transparent"][readonly].sc-smoothly-input-date-time-h,[looks="transparent"].sc-smoothly-input-date-time-h:not(:focus-within){background-color:transparent}[looks="transparent"][readonly].sc-smoothly-input-date-time-h>input.sc-smoothly-input-date-time,[looks="transparent"].sc-smoothly-input-date-time-h:not(:focus-within)>input.sc-smoothly-input-date-time{background-color:transparent}[looks="transparent"].sc-smoothly-input-date-time-h:not([readonly]):focus-within{outline:1px solid rgb(var(--smoothly-input-border))}[disabled].sc-smoothly-input-date-time-h{cursor:not-allowed;--smoothly-input-foreground:var(--smoothly-input-disabled-foreground);--smoothly-input-background:var(--smoothly-input-disabled-background);--smoothly-input-border:var(--smoothly-input-disabled-border)}.sc-smoothly-input-date-time-h.sc-smoothly-input-date-time-s>[slot=label],.sc-smoothly-input-date-time-h .sc-smoothly-input-date-time-s>[slot=label],.sc-smoothly-input-date-time-h .label.sc-smoothly-input-date-time{position:absolute;top:.6rem;opacity:0.8;user-select:none;cursor:inherit;transform-origin:top left;transition:transform 100ms ease}[right].sc-smoothly-input-date-time-h .label.sc-smoothly-input-date-time{transform-origin:top right}.sc-smoothly-input-date-time-h.floating-label.sc-smoothly-input-date-time-s>[slot=label],.sc-smoothly-input-date-time-h.floating-label .sc-smoothly-input-date-time-s>[slot=label],.sc-smoothly-input-date-time-h.has-value.sc-smoothly-input-date-time-s>[slot=label],.sc-smoothly-input-date-time-h.has-value .sc-smoothly-input-date-time-s>[slot=label],.sc-smoothly-input-date-time-h[placeholder].sc-smoothly-input-date-time-s>[slot=label],.sc-smoothly-input-date-time-h[placeholder] .sc-smoothly-input-date-time-s>[slot=label],.sc-smoothly-input-date-time-h[readonly].sc-smoothly-input-date-time-s>[slot=label],.sc-smoothly-input-date-time-h[readonly] .sc-smoothly-input-date-time-s>[slot=label],.floating-label.sc-smoothly-input-date-time-h .label.sc-smoothly-input-date-time,.has-value.sc-smoothly-input-date-time-h .label.sc-smoothly-input-date-time,.has-text.sc-smoothly-input-date-time-h .label.sc-smoothly-input-date-time,[placeholder].sc-smoothly-input-date-time-h .label.sc-smoothly-input-date-time,[readonly].sc-smoothly-input-date-time-h .label.sc-smoothly-input-date-time,.sc-smoothly-input-date-time-h:not([readonly]):focus-within .label.float-on-focus.sc-smoothly-input-date-time{top:.2rem;transform:scale(0.8)}.sc-smoothly-input-date-time-h:not([show-label]):not(.show-label) .label.sc-smoothly-input-date-time{display:none}.sc-smoothly-input-date-time-h smoothly-icon.smoothly-invalid.sc-smoothly-input-date-time{fill:rgb(var(--smoothly-input-invalid-icon, var(--smoothly-danger-color)))}.sc-smoothly-input-date-time-h{display:flex;position:relative;max-width:100vw;background-color:rgb(var(--smoothly-input-background));box-sizing:border-box;min-height:var(--input-min-height)}.sc-smoothly-input-date-time-h>smoothly-input.sc-smoothly-input-date-time{--input-min-height:calc(var(--input-min-height) - 2px);--smoothly-input-border-focus:none}.sc-smoothly-input-date-time-h:not([readonly])>smoothly-input.sc-smoothly-input-date-time>div.sc-smoothly-input-date-time>input.sc-smoothly-input-date-time{cursor:pointer}[disabled].sc-smoothly-input-date-time-h,[disabled].sc-smoothly-input-date-time-h>smoothly-input.sc-smoothly-input-date-time>div.sc-smoothly-input-date-time>input.sc-smoothly-input-date-time{cursor:not-allowed}[looks=transparent].sc-smoothly-input-date-time-h smoothly-input.sc-smoothly-input-date-time{outline:none}.sc-smoothly-input-date-time-h>smoothly-calendar.sc-smoothly-input-date-time{position:absolute;z-index:20;top:4rem;background-color:rgb(var(--smoothly-input-background));min-width:18rem;max-width:22rem}.sc-smoothly-input-date-time-h>smoothly-calendar.sc-smoothly-input-date-time::before{content:"";box-sizing:border-box;position:absolute;top:-0.55rem;left:2rem;z-index:9;transform:rotate(45deg);width:1rem;height:1rem;background-color:rgb(var(--smoothly-input-background));border-top:1px solid rgb(var(--smoothly-input-border));border-left:1px solid rgb(var(--smoothly-input-border))}.sc-smoothly-input-date-time-h>span.icons.sc-smoothly-input-date-time{display:flex;flex-direction:row;align-items:center}.sc-smoothly-input-date-time-h>smoothly-input[name="date"].sc-smoothly-input-date-time{width:12rem}.sc-smoothly-input-date-time-h>smoothly-input[name="hour"].sc-smoothly-input-date-time{width:4rem}.sc-smoothly-input-date-time-h>smoothly-input[name="minute"].sc-smoothly-input-date-time{min-width:4rem;flex-grow:1}.sc-smoothly-input-date-time-h>span.colon.sc-smoothly-input-date-time{padding:var(--input-value-padding-top) var(--input-padding-side) var(--input-value-padding-bottom) var(--input-padding-side)}.sc-smoothly-input-date-time-h>.icons.sc-smoothly-input-date-time>.smoothly-invalid.sc-smoothly-input-date-time{display:none;z-index:2;cursor:pointer;padding:0.5rem}[invalid].sc-smoothly-input-date-time-h>.icons.sc-smoothly-input-date-time>.smoothly-invalid.sc-smoothly-input-date-time{display:flex}`;const qs=class{constructor(o){t(this,o);this.smoothlyInputLoad=e(this,"smoothlyInputLoad");this.smoothlyValueChange=e(this,"smoothlyValueChange");this.smoothlyInput=e(this,"smoothlyInput");this.smoothlyUserInput=e(this,"smoothlyUserInput");this.smoothlyInputLooks=e(this,"smoothlyInputLooks");this.smoothlyFormDisable=e(this,"smoothlyFormDisable");this.readonly=false;this.invalid=false;this.isDifferentFromInitial=false;this.observer=Xo.Observer.create(this);this.showLabel=true}componentWillLoad(){this.setInitialValue();this.smoothlyInputLooks.emit(((t,e)=>{var o;return this.looks=(o=this.looks)!==null&&o!==void 0?o:t,!this.color&&(this.color=e)}));this.smoothlyInputLoad.emit((t=>this.parent=t));!this.readonly&&this.smoothlyFormDisable.emit((t=>this.readonly=t));this.observer.publish();this.valueChange(this.value)}async disconnectedCallback(){if(!this.element.isConnected){await this.unregister()}}nameChange(t,e){ts.formRename(this,e)}async register(){ts.formAdd(this)}async unregister(){ts.formRemove(this)}async getValue(){const t=this.date&&typeof this.hour=="number"&&typeof this.minute=="number"?`${this.date}T${`${this.hour}`.padStart(2,"0")}:${`${this.minute}`.padStart(2,"0")}:00.000Z`:undefined;return C.DateTime.is(t)?t:undefined}async listen(t){this.observer.subscribe(t)}async clear(){this.value=undefined;this.date=undefined;this.hour=undefined;this.minute=undefined}async handleChange(){const t=await this.getValue();this.smoothlyValueChange.emit(t);this.smoothlyInput.emit({[this.name]:t});this.observer.publish()}valueChange(t){if(C.DateTime.is(t)){this.date=C.DateTime.getDate(t);this.hour=C.DateTime.getHour(t);this.minute=C.DateTime.getMinute(t)}this.smoothlyValueChange.emit(t);this.smoothlyInput.emit({[this.name]:t});this.observer.publish()}watchingReadonly(){this.observer.publish()}smoothlyInputLooksHandler(t){if(t.target!=this.element){t.stopPropagation()}}smoothlyInputLoadHandler(t){ts.registerSubAction(this,t)}onWindowClick(t){!t.composedPath().includes(this.element)&&this.open&&(this.open=!this.open)}async edit(t){this.readonly=!t}async reset(){if(C.DateTime.is(this.initialValue)){this.date=C.DateTime.getDate(this.initialValue);this.hour=C.DateTime.getHour(this.initialValue);this.minute=C.DateTime.getMinute(this.initialValue)}else{this.date=undefined;this.hour=undefined;this.minute=undefined}}async setInitialValue(){this.initialValue=await this.getValue();this.isDifferentFromInitial=false}render(){return o(s,{key:"40f6c261f57e7dba3054cf01875d40cdc554ba16"},o("smoothly-input",{key:"98aa0e61e439a1ae686191425fca97a99e3e9232",color:this.color,looks:this.looks=="transparent"?this.looks:undefined,name:"date",onFocus:()=>!this.readonly&&!this.disabled&&(this.open=!this.open),onClick:()=>!this.readonly&&!this.disabled&&(this.open=!this.open),readonly:this.readonly,disabled:this.disabled,type:"date",value:this.date,showLabel:this.showLabel,onSmoothlyInputLoad:t=>t.stopPropagation(),onSmoothlyInput:async t=>{t.stopPropagation();this.date=t.detail.date},onSmoothlyUserInput:async t=>{t.stopPropagation();this.smoothlyUserInput.emit({name:this.name,value:await this.getValue()})}},o("slot",{key:"e54f5e30a8f8bb9add88f07365a723a784da6060"})),o("smoothly-input",{key:"777133878145c16fe94dc58ed7a3c7cbeb6bd44d",name:"hour",type:"integer",max:23,pad:2,value:this.hour,readonly:this.readonly,disabled:this.disabled,placeholder:"hh",onSmoothlyInputLoad:t=>t.stopPropagation(),onSmoothlyInput:async t=>{t.stopPropagation();this.hour=t.detail.hour},onSmoothlyUserInput:async t=>{t.stopPropagation();this.smoothlyUserInput.emit({name:this.name,value:await this.getValue()})}}),o("span",{key:"885faf984fcf9070a1d700acc89dd53dfc5f0731",class:"colon"},":"),o("smoothly-input",{key:"4af1ab62eabdb841edd6a20b9db3758eff7e26b6",name:"minute",type:"integer",max:59,pad:2,value:this.minute,readonly:this.readonly,disabled:this.disabled,placeholder:"mm",onSmoothlyInputLoad:t=>t.stopPropagation(),onSmoothlyInput:async t=>{t.stopPropagation();this.minute=t.detail.minute},onSmoothlyUserInput:async t=>{t.stopPropagation();this.smoothlyUserInput.emit({name:this.name,value:await this.getValue()})}}),o("span",{key:"ae5f1d26cffedde15e3857148fe17c985e147c8d",class:"icons"},o("smoothly-icon",{key:"f50114861f0731b7d5078a6ff683a065defa60e4",class:"smoothly-invalid",name:"alert-circle",size:"small",tooltip:this.errorMessage}),o("slot",{key:"dbe69226779cb9f14e2077381fd9de71c96f5640",name:"end"})),this.open&&!this.readonly&&o("smoothly-calendar",{key:"e047e6e5de085a1c771854ecb9b990ca16e1aa52",doubleInput:false,value:this.value?C.DateTime.getDate(this.value):undefined,min:this.min?C.DateTime.getDate(this.min):undefined,max:this.max?C.DateTime.getDate(this.max):undefined,onSmoothlyDateSet:async t=>{t.stopPropagation();this.date=t.detail;this.smoothlyUserInput.emit({name:this.name,value:await this.getValue()});this.open=false}},o("div",{key:"a06fbb5b5d6800c17166980e056023768eeaf26c",slot:"year-label"},o("slot",{key:"2baa75fd451515f003ae91bc1e7393765cee9de7",name:"year-label"})),o("div",{key:"0b35ff73fbd4e4a0b8b49938a2c8f4deb79f6dd0",slot:"month-label"},o("slot",{key:"f41fd202bcd5d82d87b10ec331e8de51bd518f99",name:"month-label"}))))}get element(){return a(this)}static get watchers(){return{name:[{nameChange:0}],date:[{handleChange:0}],hour:[{handleChange:0}],minute:[{handleChange:0}],value:[{valueChange:0}],disabled:[{watchingReadonly:0}],readonly:[{watchingReadonly:0}]}}};qs.style=Ks();const Zs=()=>`.sc-smoothly-input-demo-h{display:flex;flex-direction:column;margin-top:2em;margin-bottom:10rem}.sc-smoothly-input-demo-h .select-div-row.sc-smoothly-input-demo{display:flex}.sc-smoothly-input-demo-h .select-div-row.sc-smoothly-input-demo smoothly-input.sc-smoothly-input-demo{flex:1}smoothly-input-demo-standard.sc-smoothly-input-demo{margin-bottom:2rem}div.inputs.sc-smoothly-input-demo{max-width:min(calc(100% - 2rem), 56rem);margin:auto}div.inputs.sc-smoothly-input-demo>h2.sc-smoothly-input-demo:not(:first-child){padding-top:3em;margin-top:3em;border-top:1px solid black}.checkbox-group.sc-smoothly-input-demo{display:flex;gap:1.5em;align-items:center;background-color:rgb(var(--smoothly-input-background))}.select-div.sc-smoothly-input-demo{display:flex;gap:1em;flex-wrap:wrap}.select-div.sc-smoothly-input-demo>*.sc-smoothly-input-demo{flex-grow:1;min-width:min(100%, var(--smoothly-form-input-min-width, 18rem));flex-basis:40%}`;const Js=class{constructor(o){t(this,o);this.smoothlyUrlUpdate=e(this,"smoothlyUrlUpdate");this.duration={hours:8};this.alphanumeric="!@##";this.numbers=[1,2,3,4,5,6,7,8,9]}render(){return o(s,{key:"9abde760302f7d14296fc58d56b168ccd992c88a"},o("smoothly-input-demo-standard",{key:"7145773de0c84eab437b1dc065202dc2cb19b37a"}),o("smoothly-input-date-demo",{key:"c0304ad310674ae499009d58ddce974f7412c33f"}),o("smoothly-input-demo-user-input",{key:"efde7d5d40929dcc96890f54a91797d0251db2bc"}),o("smoothly-input-demo-radio",{key:"9cde328a31101ee88b7ac3fd7f86abb00b8aedca"}),o("div",{key:"066262aa80f355d87120622b163621c209b0f43c",class:"inputs"},o("h2",{key:"bc38dbe23f7eb3611cac8cf83c5ce0634cb4e722"},"Calendar"),o("smoothly-input-date",{key:"f56708f29f4fa6158ea18b55d806215ee414c599",name:"some-date"},"Calendar"),o("smoothly-input-date-time",{key:"5fe8d855011464f877d70981663f27980080c16a",name:"someDateTime",value:C.DateTime.now()},"DateTime"),o("h2",{key:"f060f3978aeb3707d20c26cdf03724ffb8b25220"},"Date Range"),o("smoothly-input-date-range",{key:"397960f5adb2f9cdb84883e4a4a73134054e23be",name:"testing",start:C.Date.now(),end:C.Date.nextMonth(C.Date.now()),min:"2021-10-01",max:"2025-01-31"}),o("smoothly-input-date-range",{key:"37e2a88696a6c59498b203a00067c96028b8b7a9",name:"testing",start:C.Date.now(),end:C.Date.nextMonth(C.Date.now()),min:"2021-10-10",max:"2024-12-30"},o("smoothly-input-reset",{key:"e50dcde7cd3ce5a5286f5a9e6dfd8bbee00be2f9",slot:"end",size:"icon"})),o("smoothly-input-date-range",{key:"ab99b94f110b3861c6b0350e555442325332f42a",looks:"grid",start:C.Date.now(),end:C.Date.nextMonth(C.Date.now()),min:"2021-10-10",max:"2025-12-30",showLabel:false,style:{"--smoothly-input-border-radius":"0.5rem"}},o("smoothly-input-clear",{key:"7f6081c65f5280584d04b6ce8f7905ac77634a3e",slot:"end",size:"icon"})),o("h2",{key:"37f34f036ee7dc8fb75c4c00659da25e601ff5b1"},"Date"),o("smoothly-input-date",{key:"511529a03ebe91114a24ac5a1942bf2007e1c338"},"Date"),o("smoothly-input-date",{key:"f0b777d7e776387614b9cbeb866f91fd20c86710",showLabel:false,value:"2021-10-28",max:"2021-12-30",min:"2021-10-10"},"Date"),o("smoothly-input-date",{key:"11c9d53699c3f56ab059fcc4ae23ae3ede7c3ef7",value:"2021-10-28"},"Date",o("smoothly-input-reset",{key:"d8f02f6d1c3a5866f9666199b8dff8bffa2f020a",slot:"end",size:"icon"})),o("smoothly-input-date",{key:"b818db6b9c7b7a3e52bd110795f814f440eab4f7",value:"2021-10-28"},"Date",o("smoothly-input-clear",{key:"c099251b5d2925af72bf10d4e897f4102f62be43",slot:"end",size:"icon"})),o("h2",{key:"8033cbfa7ee22ca7440d58952676a43f092c1304"},"Select"),o("div",{key:"1de49162035bde4ab43a46cea27a2e4ef016c784",class:"select-div"},o("smoothly-input-select",{key:"2d2acbd594c6a260b1bd571f00a35e53db9f904f",name:"select-dessert",looks:"border"},o("label",{key:"4a1ebbb1757580ebfba6c58651fa8207a186274c",slot:"label"},"Select with clear button"),o("smoothly-item",{key:"10fe2d4eec5af17e61f704b594be8a700dde57e8",value:"1"},"Ice cream"),o("smoothly-item",{key:"50f3be0902fa5d9989e0827df63cbbc1e4969a4e",value:"2"},"Sponge cake"),o("smoothly-item",{key:"54d4950affc3378a23311d30f01a6b75877921a8",value:"3",disabled:true},"Disabled Item"),o("smoothly-item",{key:"2b669d8c3138b6bef8b2c0a5b0a17f07ea2b1fc3",value:"4"},"Cookie"),o("smoothly-item",{key:"1d222cd2827315a43f1d8412777f2deab42c707e",value:"5"},"Croissant"),o("smoothly-item",{key:"f5582ec1306d69273508415467d56ef166d59592",value:"6"},"Chocolate fondue"),o("smoothly-input-clear",{key:"903c91c69080f05179a1d4c5c4176f651bbac1a7",size:"icon",slot:"end"})),o("smoothly-input-select",{key:"a73b2cdcca14bddac369727f65113cfe2e36f9c8",multiple:true,name:"select-dessert-multiple",looks:"border"},o("label",{key:"264c0c5c870d69ccd4acd552c0c69b75bdf41322",slot:"label"},"Select multiple with reset button"),o("smoothly-item",{key:"1b013b6fce5892e21cec768704c1c7847f9c2d6b",value:"ice cream"},"Ice cream"),o("smoothly-item",{key:"cbf0fb98cd04b4c21d56c4640ebc7fea61de1b8e",value:"sponge cake"},"Sponge cake"),o("smoothly-item",{key:"5244238b76c116e31888c36887b3f4ac5c88f2d0",selected:true,value:"cookie"},"Cookie"),o("smoothly-item",{key:"665cd5efa69f937a8de2e16549f6b5030f87aadd",value:"croissant"},"Croissant"),o("smoothly-item",{key:"f33f606105a30eadeb8ad91d1d098b59f03f1de2",selected:true,value:"chocolate fondue"},"Chocolate fondue"),o("smoothly-input-reset",{key:"903d7955210a152bdd397bf011ede1bdff121949",size:"icon",slot:"end"})),o("smoothly-input-select",{key:"a3b64c46106cc3059130d7c3a91d7f490d1d2751",name:"spirit-animals",looks:"border",mutable:true},o("label",{key:"a004cf922bae1aad8f4df3af6898096e965cfc6a",slot:"label"},"Select or add new options"),o("smoothly-item",{key:"4aa4ef91d108edb11936203365632dfc604e6973",value:"manatee"},"Manatee"),o("smoothly-item",{key:"12985b2fd02dec4a942274c1ecd0b8d64045fb62",selected:true,value:"cthulu"},"Cthulu")),o("smoothly-input-select",{key:"926065319fff2eb3024955686991469cf4128a36",name:"select-icon",clearable:false,showSelected:false},o("smoothly-item",{key:"1ac998cba750b6779c9d2159cef8245ab915f528",value:"folder",selected:true},o("smoothly-icon",{key:"30d4832563d4b16c0bbb77cb33e0da404b743090",size:"small",name:"folder-outline"})),o("smoothly-item",{key:"b04f79adc06b65369baed20874f53ef04a33f80f",value:"camera"},o("smoothly-icon",{key:"b16eaceb42a9e0b56587ce78e8cfdc6452dddd7b",size:"small",name:"camera-outline"}))),o("smoothly-input-select",{key:"5e225cc4758897b81015db7495c7d7a224776e53",ordered:true,menuHeight:"7.5items",placeholder:"Select...",name:"select-month"},o("label",{key:"4b9bcc2a3fe30dabc8669888a19ce86f369cc41e",slot:"label"},"Alphabet ordered select"),Array.from({length:26}).map(((t,e)=>String.fromCharCode(e+65))).map((t=>o("smoothly-item",{value:t,selected:t=="H"},t)))),o("smoothly-input-select",{key:"a171d4ffb8e1bfc698f0fc9ae4ed69e98ced36c9",multiple:true,menuHeight:"7.5items",placeholder:"Select...",name:"select-month"},o("label",{key:"a23c78b0a859472f5e0123b0c02c010911417369",slot:"label"},"Month multiple select"),o("smoothly-item",{key:"a733057d56e91b60e5baa989e26dddbd91e0241a",value:"1"},"January"),o("smoothly-item",{key:"376d92471d5d2eaa9dd88812a8fc583153410198",value:"2"},"February"),o("smoothly-item",{key:"7a1fce8efd0b7974e5528a5fa5662c1dfd778394",value:"3"},"March"),o("smoothly-item",{key:"cb9baf077486cb9bcdbbf89649530a5e0d6063c7",value:"4"},"April"),o("smoothly-item",{key:"0a3473edcc3c472a629ba3d8a79f902acb2e26f3",value:"5"},"May"),o("smoothly-item",{key:"5fdae912db41bffabf3b295d2c3032277dffaa94",value:"6"},"June"),o("smoothly-item",{key:"80047591254fd32dc669b14753e4786d43d3c97d",value:"7"},"July"),o("smoothly-item",{key:"c9df20403a3c394c64aba952b9fedf32e79ccb4d",value:"8"},"August"),o("smoothly-item",{key:"68313242691a68d57283d668fe9b515793737c7e",value:"9"},"September"),o("smoothly-item",{key:"443d7a691c41599d0d89db84b537eb1f257ef517",value:"10"},"October"),o("smoothly-item",{key:"9744bb0bda7582ad2b8b1f90fdf8032258463c54",value:"11"},"November"),o("smoothly-item",{key:"a96a75320e5c546549c4fa35f4176f35a82f5441",value:"12"},"December")),o("div",{key:"d873c1eec59cde6d8922fe4a50e243a63cab66c5",class:"select-div-row"},o("smoothly-input-select",{key:"50e5308ef0fd5c89c0ef0994a1614e633a3d79e0",name:"select-icon",clearable:false,showSelected:false},o("smoothly-item",{key:"a2126b796f28e4c49dd55ca407bfe9c2d71a732a",value:"folder",selected:true},o("smoothly-icon",{key:"9e59ce322358f4648b7b2cf603f4fa0bbee5e7e6",size:"small",name:"folder-outline"})),o("smoothly-item",{key:"c5695fa853b6cd50323c0bb19b179e66241f7c6e",value:"camera"},o("smoothly-icon",{key:"63fc661e772f7b8f425d1aa3acb7d151169e0ca8",size:"small",name:"camera-outline"})),o("smoothly-item",{key:"beaa91042b1183a2fe5eb9f84309cddab6cdaf74",value:"boat"},o("smoothly-icon",{key:"9214d9c9c794dc289f1d99e65877a05a92be2c51",size:"small",name:"boat-outline"}))),o("smoothly-input-select",{key:"9f1f41dce39f38e5fe63e5d771be4ea768732018",name:"select-number",clearable:false},this.numbers.map((t=>o("smoothly-item",{value:"number",selected:t===3},t)))),o("smoothly-input",{key:"73f079ee5dc954e5274c0d4506687186e985ebc7",name:"name",value:"Sten Qvist"},"Name")),o("smoothly-input-select",{key:"f180ea82340d92cfd514a8f02b0610de97955db6",name:"persistent-search",isSearchPersistent:true,menuHeight:"7.5items",searchPlaceholder:"Not here? Type to search."},o("label",{key:"0bb5a665c356d9262946b012e97e5ebfa6e3a2cc",slot:"label"},"Persistent Search select"),this.numbers.map((t=>o("smoothly-item",{value:t},t))))),o("h2",{key:"aa748593e7a304b916fe003db3574355e861f91f"},"Duration"),o("smoothly-input",{key:"6665cf5c786a67bfd315ca5e698201a28ac58bd9",name:"duration",type:"duration",placeholder:"hh:mm",value:this.duration,onSmoothlyInput:t=>this.duration=t.detail.duration},"Duration"),o("smoothly-input",{key:"acc1524d8f3d81b502f152b9c4a4269f04ec28a3",name:"duration",type:"duration",value:this.duration,placeholder:"-hh:mm",onSmoothlyInput:t=>{const e=t.detail.duration;this.duration=e}},"Duration"),o("h2",{key:"ec697e0d8a4c08cf76096f8ecea3cf928ac8ffed"},"Integer with Min/Max"),o("smoothly-input",{key:"d93e6fcb19b42a47bfb083731678f70aa29e6b91",name:"days",type:"integer",min:0,max:365},"Days per year (0-365)"),o("smoothly-input",{key:"5e08ee5eacadbe550677ed2f80bf120d31f330bb",name:"hour",type:"integer",min:0,max:23},"Hours per day (0-23)"),o("smoothly-input",{key:"dd76431b7c0aab1d449d1008e4b8f304e569981f",name:"minute",type:"integer",min:0,max:59},"Minutes per hour (0-59)"),o("smoothly-input",{key:"9f505d2068e98d936255a2077ce4a7fe10120237",name:"minute",type:"integer",min:18,max:120},"Age (18-120)"),o("h2",{key:"0e6dfdc5d485752df47122337bb0e15b052cde03"},"Invalid text with warning icon and tooltip"),o("smoothly-input",{key:"0c015c17a330733637adbd5e60fed447f4224456",copyable:true,name:"alphanumeric",invalid:!/^[a-zA-Z0-9]+$/.test(this.alphanumeric),errorMessage:"Only alphanumeric allowed",value:this.alphanumeric,onSmoothlyInput:t=>this.alphanumeric=t.detail.alphanumeric},"Alphanumeric"),o("h2",{key:"3443f52822907571e8f158e8fbd5ee31db147e0c"},"Identifiers"),o("smoothly-input",{key:"04f0103307050d20d7a3c8aac48f872b7bed47a9",type:"identifier-code"},"Code"),o("smoothly-input",{key:"ada6bccee4f18ce4cb4f43bacc170bdcac4e5f8d",type:"identifier-attribute"},"Attribute"),o("smoothly-input",{key:"d1dd0cd0fb145e64da7622e650d08068034234d7",type:"identifier-snake"},"Snake"),o("smoothly-input",{key:"6bb9c33e28690ad8ba5910f57f4323b17380bd4d",type:"identifier-pascal"},"Pascal"),o("smoothly-input",{key:"c6d0145666d97941bf4e3cc3f000dcf7df622456",type:"identifier-camel"},"Camel"),o("h2",{key:"a0fd68fd64318c72d4fb5617999eb28434f46acb"},"Input Alternatives"),o("smoothly-input",{key:"b258a367eb583950f4e88462759553304b34ab5f",type:"text",name:"name.last"},o("smoothly-icon",{key:"6680c161daaa98a7eefb134fa6ac01e057a4cda8",name:"checkmark-circle",slot:"start"}),"First Name"),o("smoothly-input",{key:"c3fbc85c3dd1548a2e13dfefb72e999c2e540af3",type:"text",name:"name.first"},"Last Name",o("smoothly-icon",{key:"b870dd9c6a9ec3c8cff7eb0d72b8ff8d01ff4787",name:"checkmark-circle",slot:"end"})),o("smoothly-input",{key:"56483f22dadebefc68a137ef7ea47c201455f9ac",type:"text",name:"name.first",placeholder:"Smith"},"Last Name",o("smoothly-icon",{key:"ab1a1418475389089a04e781020fdec0843db208",name:"checkmark-circle",slot:"end"})),o("smoothly-input",{key:"235e4ba12e66afc201a687d67ba68c09e47c6ae3",placeholder:"test"}),o("smoothly-input-submit",{key:"6cd11548c4da7a358b0c41fc17872173fb5542ed",slot:"submit",fill:"solid",onSubmit:t=>alert(t),color:"success"}),o("h4",{key:"6426ff9a5dcd88a79a0e25f8131a905111e1100d"},"Smoothly checkboxes"),o("div",{key:"2ee293c7ee7cc7028cc5a64c7514089f6e513970",class:"checkbox-group"},o("smoothly-input-checkbox",{key:"04543bfef656a978cfa97278be15ee98ac340226",disabled:true,name:"first-checkbox"},o("smoothly-icon",{key:"d6364cf232eb21eb05d8c0d2c561b5f83c2bfc22",name:"checkmark-circle",slot:"start",size:"tiny"}),"First"),o("smoothly-input-checkbox",{key:"6002b3d4d656de70f45268684091700bb51a34d9",name:"second-checkbox",checked:true},o("smoothly-icon",{key:"a62dede44cee8482cedf454666d74eadcae5b648",name:"checkmark-circle",slot:"start",size:"tiny"}),"second",o("smoothly-input-clear",{key:"efa5fb6d1c0b98657fcdb2f767a1b540cfbe64c2",size:"icon",slot:"end"})),o("smoothly-input-checkbox",{key:"7e9bae820feaf07266c5855521656fb77795f213",name:"third-checkbox"},"3rd")),o("h4",{key:"5e82e2cabd6bfba777cb525f9327f8d0b44bb0a4"},"Smoothly Radio Buttons"),o("smoothly-input-radio",{key:"2f509cac6e45fede44fb781e0d89e3641cbe7087",clearable:true,name:"radioFirstInput"},o("smoothly-icon",{key:"3d8d785ab281ced175b9eff30588e456b9d467c8",name:"checkmark-circle",slot:"start"}),o("label",{key:"7818d1cd7adf436e618c2c1657a9cdb703bd9872",slot:"label"},"Clearable"),o("smoothly-input-radio-item",{key:"8dcef2f957dec38a75138907c0f7b90dfd60eb06",value:"first"},"Label 1"),o("smoothly-input-radio-item",{key:"8abcba992493b5a48c52e83354accb5cd811600e",selected:true,value:"second"},"Label 2"),o("smoothly-input-radio-item",{key:"258b7a4eeed806d90bf532232204c5816138f0e3",value:"third"},"Label 3"),o("smoothly-input-clear",{key:"8162121c8509d4dbfa817f8da1ce83e772635eae",size:"icon",slot:"end"})),o("smoothly-input-radio",{key:"1fb58d1a85229c423cfcdc3cc9dda03e2656a156",name:"radioSecondInput"},o("label",{key:"aa058078296bf6bdb306014dbb2bfff8f4ea4127",slot:"label"},"Not clearable"),o("smoothly-input-radio-item",{key:"a5705cd459d7d23a673bebb2922d96b05886b174",value:"first"},"Label 1"),o("smoothly-input-radio-item",{key:"eaf40dd525cc87eb6945c2f2c13fa3bc88a87b8a",value:"second"},"Label 2"),o("smoothly-input-radio-item",{key:"804cab03ddaaa8117ede9be9c64a7702a6a80e9e",value:"third"},"Label 3"),o("smoothly-input-radio-item",{key:"5fb7e710781e5fbb151dc7e1375e558f2f5b31d6",value:"fourth"},"Label 4"),o("smoothly-input-radio-item",{key:"8eb82275acfeb773ed48a3a16e9185655811f1ac",value:"fifth"},"Label 5"),o("smoothly-input-radio-item",{key:"ca59f13504dabd0cbfe5f990df73b4d1cf3fba40",value:"sixth"},"Label 6")),o("smoothly-input-range-demo",{key:"fb8307d6c518fcb16fe272cbedba69c5a824b631"}),o("smoothly-input-color-demo",{key:"3a5e50a5f2aee26c49a2f0ffd879f6efe6717697"}),o("smoothly-input-price-demo",{key:"69c1564a1952541b35af40a5675029b32bc43256"}),o("smoothly-back-to-top",{key:"574445159a65c986532d39d381a37a606cde04b0"})))}};Js.style=Zs();const Xs=()=>`.sc-smoothly-input-demo-radio-h{display:grid;grid-template-columns:repeat(auto-fit, minmax(20rem, 1fr));max-width:min(56rem, 100%);margin:auto;flex-direction:column;gap:0.5rem}.sc-smoothly-input-demo-radio-h .sc-smoothly-input-demo-radio:not(smoothly-input-date):not(smoothly-input-date-range){grid-column:1 / -1}`;const Qs=class{constructor(e){t(this,e)}selectedChange(){console.log("selected",this.selected)}render(){return o(s,{key:"c5f13f1f1719524fa54e2b506974c031693361a2"},o("h2",{key:"16b9142736583c06f5d4fdccb7f2cb3883ad15b2"},"radio input - column direction"),o("smoothly-input-radio",{key:"fd8665109263a23b2a8b1f57888388cb232f1307",name:"radio",direction:"column",onSmoothlyInput:t=>this.selected=t.detail.radio},o("smoothly-input-radio-item",{key:"7509bdba2358b4ce60e121dfaa76874ad388f6a0",value:"1"},o("span",{key:"d8ed1cf2ba7e979239e35286b561151f81ffe220"},"Option 1"),o("span",{key:"e87b5fb84fef10c368acc6ed0dc77a5dd2f6e2c5",slot:"detail"},"Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.")),o("smoothly-input-radio-item",{key:"c76b0016d8f9c519166b121642bea547a0f1ca19",value:"2",selected:true},o("span",{key:"e573119b6a2be32a078de84bc4941f1f3a9ee76c"},"Option 2"),o("div",{key:"f7b4e4bcf85bd8cacc52d119e6cae9925fb6474a",slot:"detail"},o("smoothly-tabs",{key:"75bf5aafdbd8f4186f70f12af13c4bbbdc4e6a43"},o("smoothly-tab",{key:"c02c4b6d471fb5b37dff0758b53d5dde4e1b705a",label:"Dog",name:"dog",open:true},"🐕"),o("smoothly-tab",{key:"83e8e9179dac5f74d87ca5c9011a77d2c8185b3d",label:"Cat",name:"cat"},"🐈"),o("smoothly-tab",{key:"4be8b9bc53065ed86c0a46b337aeb961bd040006",label:"Rat",name:"rat"},"🐀"))))))}static get watchers(){return{selected:[{selectedChange:0}]}}};Qs.style=Xs();const ta=()=>`.sc-smoothly-input-demo-standard-h{max-width:min(calc(100% - 0.5rem), 48rem);margin:auto}.sc-smoothly-input-demo-standard-h h2.sc-smoothly-input-demo-standard,.sc-smoothly-input-demo-standard-h p.sc-smoothly-input-demo-standard{margin:.5rem 0}.sc-smoothly-input-demo-standard-h>.description.sc-smoothly-input-demo-standard{--smoothly-form-input-min-width:18rem}.sc-smoothly-input-demo-standard-h smoothly-input-range[name=borderRadius].sc-smoothly-input-demo-standard{flex-basis:100%}div.input-wrapper.sc-smoothly-input-demo-standard{display:grid;margin-top:1rem;grid-template-columns:1fr 9rem;gap:1rem;position:relative;justify-content:space-around}div.input-wrapper.sc-smoothly-input-demo-standard>[name].sc-smoothly-input-demo-standard{grid-column:1 / 2}div.input-wrapper.sc-smoothly-input-demo-standard>.width.sc-smoothly-input-demo-standard{width:100%;text-align:center;border-bottom:1px dashed black}div.input-wrapper.sc-smoothly-input-demo-standard>.height.sc-smoothly-input-demo-standard{align-content:center;grid-column:2 / 3;border-left:1px dashed black;padding-left:1rem;content:"hello"}div.input-wrapper.sc-smoothly-input-demo-standard>.left-padding.sc-smoothly-input-demo-standard{width:0.5rem;grid-column:1 / 2;white-space:nowrap;overflow:visible;position:relative;cursor:default}div.input-wrapper.sc-smoothly-input-demo-standard>.left-padding.sc-smoothly-input-demo-standard::before{content:"";position:absolute;width:100%;top:1.5rem;bottom:-1rem;border:1px dashed black;z-index:2}div.input-wrapper.sc-smoothly-input-demo-standard>.left-padding.sc-smoothly-input-demo-standard:hover::before{bottom:-100vh}`;const ea=class{constructor(e){t(this,e);this.duration={hours:8};this.options={}}connectedCallback(){this.updateInputHeightText()}componentDidRender(){this.updateInputHeightText()}updateInputHeightText(){const t=Number(getComputedStyle(document.documentElement).fontSize.replace("px",""));this.element.querySelectorAll(".height").forEach((e=>{const o=e.clientHeight;e.innerHTML=`<b>${o/t}rem</b> (${o}pixels)`}))}render(){return o(s,{key:"565969b29cb4026161d464de5f1098867eb349da"},o("div",{key:"8dfe9097349f2a7e7d6213f21148451d67f3a2dc",class:"description"},o("h2",{key:"ab251407c1b18d95ab4acd9c2a16ce528b8e1916"},"Input Standard"),o("p",{key:"9991d8aa06f8c0315473506dc96abea6c32a95f5"},"Height of input should be ",o("code",{key:"f35b5bae310077317f25a440dee0fb91b7ad1c49"},"3rem")," including border. This is should result in a 48 pixel height at 100% zoom, assuming a root font-size of 16 pixels."),o("smoothly-form",{key:"834178266280b7dfe37ab9294846ce7344f7ffa2",looks:"grid",onSmoothlyFormInput:t=>this.options=t.detail},o("smoothly-input-select",{key:"173b6aa75c138f16a6f39a8153c53520e1cb4667",name:"color"},o("span",{key:"ca1d64b4cdbc55de31e0b8e3debba0bcb1062283",slot:"label"},"Color"),r.values.map((t=>o("smoothly-item",{value:t},o("span",{color:t},t)))),o("smoothly-input-clear",{key:"725b080604c10861eca04ffb2b031743f7dde0c7",slot:"end"})),o("smoothly-input-select",{key:"3b095e076235b0bd7c8668def6b357a807e573bf",name:"looks"},o("span",{key:"8394ea2aaa44301db48cbf85539721b76bfcae8c",slot:"label"},"Looks"),Qo.values.map((t=>o("smoothly-item",{value:t},t)))),o("smoothly-input-range",{key:"04621b7e3fe74a983f5827cfbbf7dffd62c01b0d",label:"Border Radius (rem)",name:"borderRadius",min:0,max:2,step:.25}),o("smoothly-input-checkbox",{key:"7845252b0f9628b6c8ddaaddf6e603b5c793a564",name:"readonly"},"Readonly"),o("smoothly-input-checkbox",{key:"11160109586cc4bff53de12230c200a739bb2855",name:"disabled"},"Disabled"),o("smoothly-input-checkbox",{key:"38a61ebe5da7cc5fafc56cf311ed821c66ad58d3",name:"invalid"},"Invalid"),o("smoothly-input",{key:"7371362ea0fe16f777d816ed26c2bbd96b9c6531",name:"errorMessage",value:"This is not a valid value"},"Error Message"),o("smoothly-input-checkbox",{key:"e405da1dd51a6b741fd284e3b84fd272bff1e5f5",name:"showLabel",checked:true},"Show Label"),o("smoothly-input",{key:"c9042135f21280ad38eae8ea1b15e810650a34cb",name:"placeholder"},"Placeholder"),o("smoothly-input-checkbox",{key:"c43ee5611eed8d05392b8af7bb51289cc7c81252",name:"alwaysShowGuide"},"Always Show Guide (for date inputs)"))),o("div",{key:"bbeb50ec5367e51297a5636d7e98b19e1e943079",class:"input-wrapper",style:{"--smoothly-input-border-radius":`${this.options.borderRadius}rem`}},o("div",{key:"ab3ed4cd95f58bcdeee1a606ca93228a80a23e60",class:"width"},"width: 100%"),o("div",{key:"1c0e7739a2c085b5795143700e407b75b00c4119",class:"left-padding"},"padding-left: 0.5rem"),o("smoothly-input",{key:"66c1e55882d9eac4827a612f1e2bc23d647ab3e5",name:"text",color:this.options.color,looks:this.options.looks,readonly:this.options.readonly,disabled:this.options.disabled,invalid:this.options.invalid,errorMessage:this.options.errorMessage,showLabel:this.options.showLabel,placeholder:this.options.placeholder},this.options.showLabel&&o("span",{key:"138636342ba55fe7123c2c2a6c20d9dfb4ee5f60"},"Text"),o("smoothly-input-clear",{key:"3b3a28fb80a525f59eb268807b2343c0719af331",slot:"end"})),o("div",{key:"e5ae5e25f0e038678c2e51c5de7b15df9f50995e",class:"height"}),o("smoothly-input-select",{key:"d4e65e0e5ec3ffa9a20982853b8ec4eeccf944d9",name:"month",color:this.options.color,looks:this.options.looks,menuHeight:"6.7items",readonly:this.options.readonly,disabled:this.options.disabled,invalid:this.options.invalid,errorMessage:this.options.errorMessage,placeholder:this.options.placeholder},this.options.showLabel&&o("label",{key:"6aebe9d702f31518eaac40a18d5fd576c59e9375",slot:"label"},"Select"),o("smoothly-item",{key:"3313ee1b456498764ec67d2c315d341188be997f",value:"1"},"January"),o("smoothly-item",{key:"8f401f914c7dba15ff927d0630b4f981b46fbff5",value:"2"},"February"),o("smoothly-item",{key:"e92167e28806a39e68648aa87b9c4b428f0c22c8",value:"3"},"March"),o("smoothly-item",{key:"2ed2bccc780279cdeb5c9ec14ee774547735bb3b",value:"4"},"April"),o("smoothly-item",{key:"f4c9e6138ec0f470b86057cc8f472d14ea38a6ee",value:"5"},"May"),o("smoothly-item",{key:"86666e444e49a4fad6a0e62d7572159a7b530cd5",value:"6"},"June"),o("smoothly-item",{key:"aa409f39093a8c2cdf8577834928d62b94a82a5c",value:"7"},"July"),o("smoothly-item",{key:"98ca4aefcc72bb0b62f9fef6a2a06d97fa19c636",value:"8"},"August"),o("smoothly-item",{key:"ac4236a6dc21b2b52b57b983a622552751321aed",value:"9"},"September"),o("smoothly-item",{key:"b6aa81c1adc8b28bc306f850b3b35f3d01026935",value:"10"},"October"),o("smoothly-item",{key:"9067b78e9a5c8024321ed20c9c11403f6171124e",value:"11"},"November"),o("smoothly-item",{key:"f4a2448b92497773440a7602f96c2f007bba6bf4",value:"12"},"December"),o("smoothly-input-clear",{key:"bda865a858903d63b0c0f3b599aabdfbd11ff906",slot:"end"})),o("div",{key:"c4c21ffe5abb9a278e58495d148488cb2fa0efb7",class:"height"}),o("smoothly-input-checkbox",{key:"d329acedf41e7a97dbd9722b47b0bbb685c03fd1",name:"checkbox",checked:true,color:this.options.color,looks:this.options.looks,readonly:this.options.readonly,disabled:this.options.disabled},"Check",o("smoothly-input-reset",{key:"b65bbc409d050d7530a141d0ba27b67a9ef02b95",slot:"end"})),o("div",{key:"6ce56c0613de52c5e7ea9cca1625386d36e39c9f",class:"height"}),o("smoothly-input-radio",{key:"9ac8654a0369a7a3e1f5d4e6021d19f65c481151",name:"radio",clearable:true,color:this.options.color,looks:this.options.looks,readonly:this.options.readonly,disabled:this.options.disabled,showLabel:this.options.showLabel},this.options.showLabel&&o("label",{key:"834e8faeb267255422065b193872a9a55e8f21fa",slot:"label"},"Radio"),o("smoothly-input-radio-item",{key:"6a9c64355615f74973d23d31d226a41653cf04f0",value:"first"},"Label 1"),o("smoothly-input-radio-item",{key:"90aeffb2a08bb1a4ead6fac140022e1fbb6562de",selected:true,value:"second"},"Label 2"),o("smoothly-input-radio-item",{key:"659a872eb48ec26a4dfdd8865b79d47378d266b6",value:"third"},"Label 3"),o("smoothly-input-clear",{key:"2b852706751a90a1954596dbeeabc7d10c1e62a3",slot:"end"})),o("div",{key:"35ae222dd32c0a24f5047c589b1240b3e1dbadc2",class:"height"}),o("smoothly-input-file",{key:"d2c1b6df5cf570bf46874c9472ed3ceef60729b8",name:"file",color:this.options.color,looks:this.options.looks,readonly:this.options.readonly,disabled:this.options.disabled,showLabel:this.options.showLabel,placeholder:this.options.placeholder},this.options.showLabel&&o("span",{key:"c076b435acdd7a14a6a377bb3f9772904736caf7",slot:"label"},"File"),o("smoothly-input-clear",{key:"20e32d6fbac42c4617b5aaffca12f1e68f09156f",slot:"end"})),o("div",{key:"bf99bffecc00feebaa1027ec7f99bcd51d7661f6",class:"height"}),o("smoothly-input-range",{key:"e266bbb8ceb3dcf33bbe745d43a108d40fe97d96",name:"range",color:this.options.color,looks:this.options.looks,readonly:this.options.readonly,disabled:this.options.disabled,label:this.options.showLabel?"Range":undefined},o("smoothly-input-clear",{key:"329f737f8c88d1c68f62d0227293cbff2668b903",slot:"end"})),o("div",{key:"5f5e44e62c2658812f79fff1ceb47f2fc70e0018",class:"height"}),o("smoothly-input-color",{key:"8c39c11aa2d6551e67658f6b17a2be577bfc0be2",name:"color",color:this.options.color,looks:this.options.looks,readonly:this.options.readonly,disabled:this.options.disabled,showLabel:this.options.showLabel},this.options.showLabel&&o("span",{key:"69ff977d1d74c9c1575930668cdd8cd25c63cb7a"},"Color"),o("smoothly-input-clear",{key:"62ef604e4ac15e5808151c44d951c9ee14fcfcc4",slot:"end"})),o("div",{key:"5f2cf9fcffd64dc04a7f92c812e8eb74d4574d7b",class:"height"}),o("smoothly-input-date",{key:"f9778ed78fafb18e5786c522a3dbac2b8a29941f",name:"date",color:this.options.color,looks:this.options.looks,readonly:this.options.readonly,disabled:this.options.disabled,invalid:this.options.invalid,errorMessage:this.options.errorMessage,showLabel:this.options.showLabel,placeholder:this.options.placeholder,alwaysShowGuide:this.options.alwaysShowGuide},this.options.showLabel&&o("span",{key:"71cd8a2aaff8724eb2cd1f61312939cde42628ba"},"Date"),o("smoothly-input-clear",{key:"3a457f21009edb59edda1486cd15861e3f477441",slot:"end"})),o("div",{key:"1adc30f659052cc8a4bcb39d9f7ae9ee098c8d46",class:"height"}),o("smoothly-input-date-time",{key:"dd2744ca25ad41f47e74c1fcdcd18a35d6727cab",name:"dateTime",color:this.options.color,looks:this.options.looks,readonly:this.options.readonly,disabled:this.options.disabled,invalid:this.options.invalid,errorMessage:this.options.errorMessage,showLabel:this.options.showLabel},"DateTime",o("smoothly-input-clear",{key:"79d65744abdb53f4ba552e804ed8c4b7876289a5",slot:"end"})),o("div",{key:"0c9fa58c169272bc1cfe98760c977d898123f195",class:"height"}),o("smoothly-input-date-range",{key:"8d0530766b4278c9a0e1bf752c5201a8a1150cb8",name:"dateRange",color:this.options.color,looks:this.options.looks,readonly:this.options.readonly,disabled:this.options.disabled,invalid:this.options.invalid,errorMessage:this.options.errorMessage,placeholder:this.options.placeholder,alwaysShowGuide:this.options.alwaysShowGuide,showLabel:this.options.showLabel},this.options.showLabel&&o("span",{key:"ced591c321b40cb26ac60adc79c9aef515ba84d4"},"Date Range"),o("smoothly-input-clear",{key:"126e55235695f0e2ce4bee0c4a9f51699dd9ef63",slot:"end"})),o("div",{key:"30cfa18368611c241479cbfc0f6c4de2067a0e41",class:"height"})))}get element(){return a(this)}};ea.style=ta();const oa=()=>`.sc-smoothly-input-demo-user-input-h{max-width:min(100%, 56rem);margin-inline:auto;display:grid;grid-template-columns:12rem 1fr;gap:1rem}.sc-smoothly-input-demo-user-input-h>div.sc-smoothly-input-demo-user-input{grid-column:1 / -1}@media (max-width: 48rem){.sc-smoothly-input-demo-user-input-h{grid-template-columns:1fr}}`;const sa=class{constructor(e){t(this,e);this.values=["zero","one","two","three","four","five"];this.colors=["#ff0000","#00ff00","#0000ff","#ffff00","#00ffff","#ff00ff"]}increment(t){return t===undefined?0:(t+1)%this.values.length}render(){var t,e;return o(s,{key:"f2a4d41e58f06ede6a72fb3f8b172ffba324ba1d"},o("div",{key:"6730bc3f89a2d8a01d2225b520709d8ccf3e7890"},o("h2",{key:"8894c809fd95504f8f01579a11a975b8f143c656"},"User Input Event"),o("p",{key:"741a6f7d9baf8b8bda50330141d87a0160d7bacb"},"These inputs demonstrate how user input is handled. The ",o("code",{key:"467a82db0e06629f333754223ce39645339d777d"},"smoothlyUserInput")," event fires only when the user interacts with an input, not when its value is changed programmatically (such as by clicking the buttons above).",o("br",{key:"ab05e1e07d915dbc118a72a9bdd0e6a091bb21f1"}),"Check the console to see the details of each ",o("code",{key:"efa4627f8e89c03732e2dcab4d1fdce5d0ac1ef6"},"smoothlyUserInput")," event.")),o("smoothly-button",{key:"2dd9580d4ef091d5c2c6a0591b9318ebb7359fe2",color:"tertiary",onClick:()=>this.textIndex=this.increment(this.textIndex)},"Change text"),o("smoothly-input",{key:"0f616b3fd91d0b759f3dbb5d8c8c3ff8f46347b8",looks:"border",name:"demo-user-input-text",value:this.textIndex===undefined?"":this.values[this.textIndex],onSmoothlyUserInput:t=>console.debug(t.type,t.detail.name,t.detail.value)},"Text input"),o("smoothly-button",{key:"190d254c825bd58806a35853aff82a48a7e80f7a",onClick:()=>this.selectIndex=this.increment(this.selectIndex),color:"tertiary"},"Next select item"),o("smoothly-input-select",{key:"1f8241f1cbd29d9c72b91c064d00960fcf8e67be",looks:"border",name:"demo-user-input-select",onSmoothlyUserInput:t=>console.debug(t.type,t.detail.name,t.detail.value)},o("span",{key:"0ee1caf5240b16279f225e77c61eec8ddfa9af96",slot:"label"},"Select input"),this.values.map(((t,e)=>o("smoothly-item",{value:e,selected:e==this.selectIndex},t)))),o("smoothly-button",{key:"ab912c84539c520b0822afcba1f467ad486a3502",color:"tertiary",onClick:()=>this.checkboxChecked=!this.checkboxChecked},"Toggle checkbox"),o("smoothly-input-checkbox",{key:"4561b0608b11b9da9acaa0dd48d80284994bbdba",looks:"border",name:"demo-user-input-checkbox",checked:this.checkboxChecked,onSmoothlyUserInput:t=>console.debug(t.type,t.detail.name,t.detail.value)},"Checkbox input"),o("smoothly-button",{key:"aaae7c8f2458babc9631388b0e968528fd138148",color:"tertiary",onClick:()=>this.radioIndex=this.increment(this.radioIndex)},"Next radio item"),o("smoothly-input-radio",{key:"f70403edaf65e8ff1358461a0d773e1aaeee8718",looks:"border",name:"demo-user-input-radio",onSmoothlyUserInput:t=>console.debug(t.type,t.detail.name,t.detail.value)},o("span",{key:"9c8c3237fdf0ff4aac2dbbf6c7c1b9832993929b",slot:"label"},"Radio input"),this.values.map(((t,e)=>o("smoothly-input-radio-item",{value:t,selected:e==this.radioIndex},t)))),o("smoothly-button",{key:"8eae0440201647bbceb3ad3464ddadbaefc4ea38",color:"tertiary",onClick:()=>this.rangeValue=this.increment(this.rangeValue)},"Next range value"),o("smoothly-input-range",{key:"ff18785f22364aa89c709f0a156c3c824e802a26",looks:"border",name:"demo-user-input-range",step:1,min:0,max:this.values.length,value:this.rangeValue,label:"Range Input",onSmoothlyUserInput:t=>console.debug(t.type,t.detail.name,t.detail.value)}),o("smoothly-button",{key:"d6bdc4a1471dccd98a001044bf22375e38c11279",color:"tertiary",onClick:()=>this.colorIndex=this.increment(this.colorIndex)},"Next color"),o("smoothly-input-color",{key:"c65c8a43e19bb1502da3098d57288d139ffe2faf",looks:"border",name:"demo-user-input-color",value:typeof this.colorIndex=="number"?this.colors[this.colorIndex]:undefined,onSmoothlyUserInput:t=>console.debug(t.type,t.detail.name,t.detail.value)},"Color input"),o("smoothly-button",{key:"6d0f8d7e46b889fcbc94d5dd79b274fc623cd7ba",color:"tertiary",onClick:()=>this.dateValue=this.dateValue?C.Date.next(this.dateValue):C.Date.now()},"Next day"),o("smoothly-input-date",{key:"3e2c83fc75562f0d755cb5440bc2d1aa539dcde9",looks:"border",name:"demo-user-input-date",value:this.dateValue,onSmoothlyUserInput:t=>console.debug(t.type,t.detail.name,t.detail.value)},"Date input"),o("smoothly-button",{key:"c9db4d875e2fcb1f913fcd941f6d9ba9eb6393ee",color:"tertiary",onClick:()=>this.datetimeValue=this.datetimeValue?C.DateTime.nextDay(this.datetimeValue):C.DateTime.now()},"Next date time"),o("smoothly-input-date-time",{key:"2a582db04d01beb54682436d3663a0adeeeb897f",looks:"border",name:"demo-user-input-datetime",value:this.datetimeValue,onSmoothlyUserInput:t=>console.debug(t.type,t.detail.name,t.detail.value)},"Date time input"),o("smoothly-button",{key:"c1623f533dc310005f206282f3ba11a6697b15ca",color:"tertiary",onClick:()=>this.dateRangeValue=this.dateRangeValue?{start:C.Date.next(this.dateRangeValue.start),end:C.Date.next(this.dateRangeValue.end)}:{start:C.Date.now(),end:C.Date.next(C.Date.now(),10)}},"Next date range"),o("smoothly-input-date-range",{key:"f884728adae7e57072deef782aab61f8b57d8147",looks:"border",name:"demo-user-input-daterange",start:(t=this.dateRangeValue)===null||t===void 0?void 0:t.start,end:(e=this.dateRangeValue)===null||e===void 0?void 0:e.end,onSmoothlyUserInput:t=>console.debug(t.type,t.detail.name,t.detail.value)},"Date range input"))}};sa.style=oa();const aa=()=>`[color=default].sc-smoothly-input-edit{--smoothly-color:var(--smoothly-default-color);--smoothly-color-contrast:var(--smoothly-default-contrast);--smoothly-color-shade:var(--smoothly-default-shade);--smoothly-color-tint:var(--smoothly-default-tint)}[color=primary].sc-smoothly-input-edit{--smoothly-color:var(--smoothly-primary-color);--smoothly-color-contrast:var(--smoothly-primary-contrast);--smoothly-color-shade:var(--smoothly-primary-shade);--smoothly-color-tint:var(--smoothly-primary-tint)}[color=secondary].sc-smoothly-input-edit{--smoothly-color:var(--smoothly-secondary-color);--smoothly-color-contrast:var(--smoothly-secondary-contrast);--smoothly-color-shade:var(--smoothly-secondary-shade);--smoothly-color-tint:var(--smoothly-secondary-tint)}[color=tertiary].sc-smoothly-input-edit{--smoothly-color:var(--smoothly-tertiary-color);--smoothly-color-contrast:var(--smoothly-tertiary-contrast);--smoothly-color-shade:var(--smoothly-tertiary-shade);--smoothly-color-tint:var(--smoothly-tertiary-tint)}[color=success].sc-smoothly-input-edit{--smoothly-color:var(--smoothly-success-color);--smoothly-color-contrast:var(--smoothly-success-contrast);--smoothly-color-shade:var(--smoothly-success-shade);--smoothly-color-tint:var(--smoothly-success-tint)}[color=warning].sc-smoothly-input-edit{--smoothly-color:var(--smoothly-warning-color);--smoothly-color-contrast:var(--smoothly-warning-contrast);--smoothly-color-shade:var(--smoothly-warning-shade);--smoothly-color-tint:var(--smoothly-warning-tint)}[color=danger].sc-smoothly-input-edit{--smoothly-color:var(--smoothly-danger-color);--smoothly-color-contrast:var(--smoothly-danger-contrast);--smoothly-color-shade:var(--smoothly-danger-shade);--smoothly-color-tint:var(--smoothly-danger-tint)}[color=light].sc-smoothly-input-edit{--smoothly-color:var(--smoothly-light-color);--smoothly-color-contrast:var(--smoothly-light-contrast);--smoothly-color-shade:var(--smoothly-light-shade);--smoothly-color-tint:var(--smoothly-light-tint)}[color=medium].sc-smoothly-input-edit{--smoothly-color:var(--smoothly-medium-color);--smoothly-color-contrast:var(--smoothly-medium-contrast);--smoothly-color-shade:var(--smoothly-medium-shade);--smoothly-color-tint:var(--smoothly-medium-tint)}[color=dark].sc-smoothly-input-edit{--smoothly-color:var(--smoothly-dark-color);--smoothly-color-contrast:var(--smoothly-dark-contrast);--smoothly-color-shade:var(--smoothly-dark-shade);--smoothly-color-tint:var(--smoothly-dark-tint)}.sc-smoothly-input-edit-h{--smoothly-button-border-radius:0.5rem;display:inline-flex;box-sizing:border-box;border-radius:var(--smoothly-button-border-radius);font-size:var(--smoothly-button-font-size, 1rem);cursor:pointer;border:none;outline:none;position:relative}[shape=rounded].sc-smoothly-input-edit-h{--smoothly-button-border-radius:2rem}[type=link].sc-smoothly-input-edit-h{display:inline}[disabled].sc-smoothly-input-edit-h{opacity:0.5}.sc-smoothly-input-edit-h>a.sc-smoothly-input-edit{font-weight:400;background-color:transparent}.sc-smoothly-input-edit-h>a.sc-smoothly-input-edit,.sc-smoothly-input-edit-h>button.sc-smoothly-input-edit{font-size:var(--smoothly-button-font-size);border:1px solid transparent;outline:none;cursor:pointer;display:inline-flex;gap:0.5rem;box-sizing:border-box}.sc-smoothly-input-edit-h>button.sc-smoothly-input-edit{font-weight:bold;justify-content:center;width:100%;align-items:center;border-radius:var(--smoothly-button-border-radius);padding-inline:var(--smoothly-button-padding-inline, 1rem)}.sc-smoothly-input-edit-h{min-height:var(--smoothly-button-height, 2.5rem)}.sc-smoothly-input-edit-h:has(>a:empty),.sc-smoothly-input-edit-h:has(>button:empty),.sc-smoothly-input-edit-h>a.sc-smoothly-input-edit:empty,.sc-smoothly-input-edit-h>button.sc-smoothly-input-edit:empty{border-width:0;min-height:0;padding-inline:0}[size=small].sc-smoothly-input-edit-h{--smoothly-button-height:2rem;--smoothly-button-padding-inline:0.75rem;--smoothly-button-font-size:0.875rem;--smoothly-icon-size:1.4rem}[size=large].sc-smoothly-input-edit-h{--smoothly-button-height:3rem;--smoothly-button-padding-inline:1.25rem;--smoothly-button-font-size:1.125rem}.sc-smoothly-input-edit-h:not([size=icon]):not([size=flexible])>button.sc-smoothly-input-edit{min-width:8rem}[size=icon].sc-smoothly-input-edit-h{--smoothly-icon-size:1.4rem}[size=icon].sc-smoothly-input-edit-h>button.sc-smoothly-input-edit{min-height:var(--smoothly-button-height, 2.5rem);min-width:var(--smoothly-button-height, 2.5rem);padding:0}.sc-smoothly-input-edit-h:not([size=icon]){min-width:8em}[size=flexible].sc-smoothly-input-edit-h{min-width:unset;padding:0;margin:0;display:flex;justify-content:center}[size=flexible].sc-smoothly-input-edit-h>button.sc-smoothly-input-edit{min-width:unset;padding:0;margin:0}[expand].sc-smoothly-input-edit-h{width:100%}[expand=full].sc-smoothly-input-edit-h{border-left:none;border-right:none;--smoothly-button-border-radius:0}[fill=outline].sc-smoothly-input-edit-h>button.sc-smoothly-input-edit{background-color:transparent;color:rgb(var(--smoothly-button-foreground));fill:rgb(var(--smoothly-button-foreground));stroke:rgb(var(--smoothly-button-foreground));border-color:rgb(var(--smoothly-button-foreground))}.sc-smoothly-input-edit-h:not([fill=clear]):not([disabled])>button.sc-smoothly-input-edit:hover,.sc-smoothly-input-edit-h:not([disabled])>button.sc-smoothly-input-edit:focus-visible,[fill=outline].sc-smoothly-input-edit-h:not([disabled]):active>button.sc-smoothly-input-edit::before{border-color:rgb(var(--smoothly-button-focus-color))}[fill=outline].sc-smoothly-input-edit-h:not([disabled])>button.sc-smoothly-input-edit:hover::before,[fill=outline].sc-smoothly-input-edit-h:not([disabled])>button.sc-smoothly-input-edit:focus-within::before,[fill=outline].sc-smoothly-input-edit-h:not([disabled])>button.sc-smoothly-input-edit:active::before{content:"";position:absolute;border:2px solid rgb(var(--smoothly-button-focus-border));inset:-1px;border-radius:var(--smoothly-button-border-radius)}.sc-smoothly-input-edit-h:not([fill=clear]):not([fill=outline]):not([disabled])>button.sc-smoothly-input-edit:hover,.sc-smoothly-input-edit-h:not([fill=clear]):not([fill=outline]):not([disabled])>button.sc-smoothly-input-edit:focus-visible,.sc-smoothly-input-edit-h:not([fill=clear]):not([fill=outline]):not([disabled])>button.sc-smoothly-input-edit:active{background:rgb(var(--smoothly-button-hover-background))}.sc-smoothly-input-edit-h>button.sc-smoothly-input-edit,.sc-smoothly-input-edit-h.sc-smoothly-input-edit-s>smoothly-icon,.sc-smoothly-input-edit-h .sc-smoothly-input-edit-s>smoothly-icon{color:rgb(var(--smoothly-button-foreground));stroke:rgb(var(--smoothly-button-foreground));fill:rgb(var(--smoothly-button-foreground))}[hidden].sc-smoothly-input-edit-h{display:none}.sc-smoothly-input-edit-h:not([display]){display:none}[editable].sc-smoothly-input-edit-h{opacity:0.5}.sc-smoothly-input-edit-h[type="input"].sc-smoothly-input-edit-s>smoothly-button>button{cursor:pointer;filter:opacity(60%);--smoothly-button-foreground:var(--smoothly-input-foreground);background-color:transparent}.sc-smoothly-input-edit-h smoothly-icon.default.sc-smoothly-input-edit{transform:translate(.1em, -.1em)}.sc-smoothly-input-edit-h.sc-smoothly-input-edit-s>button>*+smoothly-icon{display:none}`;const ia=class{constructor(o){t(this,o);this.smoothlyInputLoad=e(this,"smoothlyInputLoad");this.color="tertiary";this.disabled=false;this.display=true;this.type="input";this.tooltip="Edit"}componentWillLoad(){this.smoothlyInputLoad.emit((t=>{if(Xo.type.is(t)){this.parent=t;t.listen((async t=>{this.display=t.readonly}))}}))}clickHandler(){var t;(t=this.parent)===null||t===void 0?void 0:t.edit(true)}render(){var t;return o(s,{key:"66d55a905800c79f0233f8b6bdecabaad8cb1f1c",title:this.tooltip},o("smoothly-button",{key:"b0223593b49e61f9a6c4b3bd2401318493e6c1eb",disabled:this.disabled,size:this.size,type:"button",shape:this.shape,expand:this.expand,color:this.color,fill:(t=this.fill)!==null&&t!==void 0?t:this.type=="input"?"clear":undefined},o("slot",{key:"0b70d6c8b09bcdd5925ee9f68bcdd4d9da849cf0"}),o("smoothly-icon",{key:"dc4374413867b160df4d4f7bdeda25fded4fd59c",class:"default",name:"create-outline",size:"tiny"})))}};ia.style=aa();const la=()=>`.sc-smoothly-input-file-h{--input-padding-side:.5rem;--input-value-padding-top:1.25rem;--input-value-padding-bottom:.25rem;--input-min-height:3rem;min-height:var(--input-min-height);box-sizing:border-box;border-radius:var(--smoothly-input-border-radius)}[looks="border"].sc-smoothly-input-file-h{border:rgb(var(--smoothly-input-border)) solid 1px}[looks="border"].sc-smoothly-input-file-h:not([readonly]):not([disabled]):focus-within{outline:2px solid rgb(var(--smoothly-input-border-focus))}[looks="border"][readonly].sc-smoothly-input-file-h{border:transparent solid 1px}[looks="line"].sc-smoothly-input-file-h{border-bottom:rgb(var(--smoothly-input-border)) solid 1px;position:relative}[looks="line"][readonly].sc-smoothly-input-file-h{border-bottom:transparent solid 1px}[looks="line"].sc-smoothly-input-file-h:not([readonly]):not([disabled]):focus-within::before{content:"";position:absolute;inset:0;pointer-events:none;border-bottom:2px solid rgb(var(--smoothly-input-border-focus));z-index:10}[looks="grid"].sc-smoothly-input-file-h{flex-grow:1;flex-basis:40%;box-shadow:0px 0px 0px 1px rgb(var(--smoothly-input-border));border:none}[looks="grid"][readonly].sc-smoothly-input-file-h{box-shadow:0px 0px 0px 1px rgba(var(--smoothly-input-border-readonly))}[looks="grid"].sc-smoothly-input-file-h:not([readonly]):not([disabled]):focus-within{position:relative;box-shadow:0px 0px 0px 2px rgb(var(--smoothly-input-border-focus));outline:none;z-index:10}[looks="transparent"].sc-smoothly-input-file-h{border:none}[looks="transparent"][readonly].sc-smoothly-input-file-h,[looks="transparent"].sc-smoothly-input-file-h:not(:focus-within){background-color:transparent}[looks="transparent"][readonly].sc-smoothly-input-file-h>input.sc-smoothly-input-file,[looks="transparent"].sc-smoothly-input-file-h:not(:focus-within)>input.sc-smoothly-input-file{background-color:transparent}[looks="transparent"].sc-smoothly-input-file-h:not([readonly]):focus-within{outline:1px solid rgb(var(--smoothly-input-border))}[disabled].sc-smoothly-input-file-h{cursor:not-allowed;--smoothly-input-foreground:var(--smoothly-input-disabled-foreground);--smoothly-input-background:var(--smoothly-input-disabled-background);--smoothly-input-border:var(--smoothly-input-disabled-border)}.sc-smoothly-input-file-h.sc-smoothly-input-file-s>[slot=label],.sc-smoothly-input-file-h .sc-smoothly-input-file-s>[slot=label],.sc-smoothly-input-file-h .label.sc-smoothly-input-file{position:absolute;top:.6rem;opacity:0.8;user-select:none;cursor:inherit;transform-origin:top left;transition:transform 100ms ease}[right].sc-smoothly-input-file-h .label.sc-smoothly-input-file{transform-origin:top right}.sc-smoothly-input-file-h.floating-label.sc-smoothly-input-file-s>[slot=label],.sc-smoothly-input-file-h.floating-label .sc-smoothly-input-file-s>[slot=label],.sc-smoothly-input-file-h.has-value.sc-smoothly-input-file-s>[slot=label],.sc-smoothly-input-file-h.has-value .sc-smoothly-input-file-s>[slot=label],.sc-smoothly-input-file-h[placeholder].sc-smoothly-input-file-s>[slot=label],.sc-smoothly-input-file-h[placeholder] .sc-smoothly-input-file-s>[slot=label],.sc-smoothly-input-file-h[readonly].sc-smoothly-input-file-s>[slot=label],.sc-smoothly-input-file-h[readonly] .sc-smoothly-input-file-s>[slot=label],.floating-label.sc-smoothly-input-file-h .label.sc-smoothly-input-file,.has-value.sc-smoothly-input-file-h .label.sc-smoothly-input-file,.has-text.sc-smoothly-input-file-h .label.sc-smoothly-input-file,[placeholder].sc-smoothly-input-file-h .label.sc-smoothly-input-file,[readonly].sc-smoothly-input-file-h .label.sc-smoothly-input-file,.sc-smoothly-input-file-h:not([readonly]):focus-within .label.float-on-focus.sc-smoothly-input-file{top:.2rem;transform:scale(0.8)}.sc-smoothly-input-file-h:not([show-label]):not(.show-label) .label.sc-smoothly-input-file{display:none}.sc-smoothly-input-file-h smoothly-icon.smoothly-invalid.sc-smoothly-input-file{fill:rgb(var(--smoothly-input-invalid-icon, var(--smoothly-danger-color)))}.sc-smoothly-input-file-h{display:flex;justify-content:space-between;align-items:center;flex-wrap:wrap;overflow:hidden;position:relative;width:100%;padding-left:var(--input-padding-side);background-color:rgb(var(--smoothly-input-background));box-sizing:border-box}.sc-smoothly-input-file-h>div.sc-smoothly-input-file>div.drag-overlay.sc-smoothly-input-file{position:absolute;inset:0;background-color:rgb(var(--smoothly-input-hover-background), 0.6);border-radius:var(--smoothly-input-border-radius);border:0.25rem dashed rgb(var(--smoothly-input-hover-foreground));display:flex;justify-content:center;align-items:center}.sc-smoothly-input-file-h>div.sc-smoothly-input-file>div.drag-overlay.sc-smoothly-input-file>smoothly-icon.sc-smoothly-input-file{color:rgb(var(--smoothly-input-hover-foreground))}.sc-smoothly-input-file-h:not(.dragging)>div.sc-smoothly-input-file>div.drag-overlay.sc-smoothly-input-file{display:none}.sc-smoothly-input-file-h>div.input.sc-smoothly-input-file>input.sc-smoothly-input-file{overflow:hidden;height:0;width:0;padding:0}.sc-smoothly-input-file-h:not([show-label])>div.input.sc-smoothly-input-file{display:flex;align-items:center;padding-bottom:0.2rem}.sc-smoothly-input-file-h:not([show-label])>smoothly-button.sc-smoothly-input-file:not(:empty){margin-right:1ch}[show-label].sc-smoothly-input-file-h>div.input.sc-smoothly-input-file{display:flex;padding-block:var(--input-value-padding-top) var(--input-value-padding-bottom);height:100%;box-sizing:border-box;flex-grow:1}.sc-smoothly-input-file-h>div.sc-smoothly-input-file>smoothly-button.sc-smoothly-input-file{--smoothly-button-height:1.4rem;margin:0;border:none}.sc-smoothly-input-file-h>label.sc-smoothly-input-file{left:var(--input-padding-side)}.sc-smoothly-input-file-h:not([readonly]),.sc-smoothly-input-file-h:not([readonly]) *.sc-smoothly-input-file{cursor:pointer}[disabled].sc-smoothly-input-file-h,[disabled].sc-smoothly-input-file-h *.sc-smoothly-input-file{cursor:not-allowed}`;const na=class{constructor(o){t(this,o);this.smoothlyInputLooks=e(this,"smoothlyInputLooks");this.smoothlyInput=e(this,"smoothlyInput");this.smoothlyUserInput=e(this,"smoothlyUserInput");this.smoothlyInputLoad=e(this,"smoothlyInputLoad");this.smoothlyFormDisable=e(this,"smoothlyFormDisable");this.readonly=false;this.showLabel=true;this.dragging=false;this.isDifferentFromInitial=false;this.observer=Xo.Observer.create(this);this.transfer=new DataTransfer}get files(){this.transfer.items.clear();this.value&&this.transfer.items.add(this.value);return this.transfer.files}async componentWillLoad(){this.smoothlyInputLooks.emit(((t,e)=>{var o;return this.looks=(o=this.looks)!==null&&o!==void 0?o:t,!this.color&&(this.color=e)}));this.smoothlyInput.emit({[this.name]:await this.getValue()});this.smoothlyInputLoad.emit((t=>this.parent=t));!this.readonly&&this.smoothlyFormDisable.emit((t=>this.readonly=t));this.observer.publish()}async disconnectedCallback(){if(!this.element.isConnected){await this.unregister()}}nameChange(t,e){ts.formRename(this,e)}async register(){ts.formAdd(this)}async unregister(){ts.formRemove(this)}async getValue(){return this.value}async clear(){this.value=undefined}smoothlyInputLoadHandler(t){ts.registerSubAction(this,t)}async listen(t){this.observer.subscribe(t)}async edit(t){this.readonly=!t}async reset(){this.value=this.initialValue}async setInitialValue(){this.initialValue=this.value;this.valueChanged()}async binary(){return true}async valueChanged(){this.isDifferentFromInitial=this.initialValue!==this.value;this.smoothlyInput.emit({[this.name]:await this.getValue()});this.observer.publish()}inputHandler(t){var e,o,s;t.stopPropagation();if((o=(e=this.input)===null||e===void 0?void 0:e.files)===null||o===void 0?void 0:o.length){this.value=(s=this.input)===null||s===void 0?void 0:s.files[0];this.smoothlyUserInput.emit({name:this.name,value:this.value})}}dropHandler(t){var e;t.preventDefault();t.stopPropagation();this.dragging=false;if((e=t.dataTransfer)===null||e===void 0?void 0:e.files.length){this.value=t.dataTransfer.files[0];this.smoothlyUserInput.emit({name:this.name,value:this.value})}}clickHandler(t){var e;if(!this.readonly&&!this.disabled&&!t.composedPath().find((t=>t==this.input))){(e=this.input)===null||e===void 0?void 0:e.click()}}dragOverHandler(t){t.preventDefault();t.stopPropagation()}dragEnterHandler(t){t.preventDefault();!this.readonly&&!this.disabled&&(this.dragging=true)}dragLeaveHandler(t){t.stopPropagation();this.dragging=false}render(){var t,e,a;return o(s,{key:"d63c83a8c7d482b7c210c1fded958380954f3b82",class:{dragging:this.dragging,"has-value":!!this.value},tabindex:this.disabled?undefined:0,onClick:t=>this.clickHandler(t),onDragOver:t=>this.dragOverHandler(t),onDragEnter:t=>this.dragEnterHandler(t)},o("label",{key:"cf5fa329f49e4872149c93e8efc9f83878a89bac"},o("slot",{key:"efe68f3fba462c6b2a9ef1a597ea4eb49f0e504c",name:"label"})),o("div",{key:"8e34635be73902eaec3468afb87680daf40ac39e",class:"input"},o("smoothly-button",{key:"23f3be8ca6a8bd78a261ebc79802d7a817a6f4e4",disabled:this.disabled,type:"button",color:this.color,fill:"clear",size:"flexible"},o("slot",{key:"51844c80711695c452a2dd651b7c6c1536daab2f",name:"button"})),o("span",{key:"bdb73c10af8ccf56429e0c5e5e8a535f9059ccbf"},(e=(t=this.value)===null||t===void 0?void 0:t.name)!==null&&e!==void 0?e:this.placeholder),o("div",{key:"818709c47b75b7ca86af458c911b2836541a3a88",class:"drag-overlay",onDrop:t=>this.dropHandler(t),onDragLeave:t=>this.dragLeaveHandler(t)},o("smoothly-icon",{key:"b12c7d64c0b184214abd9b102f7a35c871dfee0c",name:"document-attach-outline"})),o("input",{key:"a636dedfdb289f59476fe9310abaf1d1045c90e5",ref:t=>this.input=t,type:"file",disabled:this.disabled,capture:this.camera=="back"?"environment":"user",accept:(a=this.accept)!==null&&a!==void 0?a:!this.camera?undefined:"image/jpeg",files:this.files,onInput:t=>this.inputHandler(t)})),o("span",{key:"cde8d6765cf6e954504878ffd787df8796c553ec",onClick:t=>t.stopPropagation()},o("slot",{key:"d258247cd13eddc30354c1f10322b82636b7eab2",name:"end"})))}get element(){return a(this)}static get watchers(){return{name:[{nameChange:0}],value:[{valueChanged:0}]}}};na.style=la();const ra=()=>`.sc-smoothly-input-month-h{display:flex;flex-direction:row;justify-content:space-between;background-color:rgb(var(--smoothly-input-background))}.sc-smoothly-input-month-h:not([in-calendar])>smoothly-input-select.sc-smoothly-input-month{display:flex;flex:1}[looks=line].sc-smoothly-input-month-h,[looks=border].sc-smoothly-input-month-h,[looks=transparent].sc-smoothly-input-month-h{gap:2em}.sc-smoothly-input-month-h:not([previous])>smoothly-icon.sc-smoothly-input-month:first-of-type,.sc-smoothly-input-month-h:not([next])>smoothly-icon.sc-smoothly-input-month:last-of-type{display:none}.sc-smoothly-input-month-h>smoothly-icon.sc-smoothly-input-month{display:flex;align-self:center;cursor:pointer}.sc-smoothly-input-month-h>smoothly-icon.disabled.sc-smoothly-input-month{opacity:0.5;cursor:not-allowed}`;const ca=class{constructor(o){t(this,o);this.smoothlyInput=e(this,"smoothlyInput");this.smoothlyUserInput=e(this,"smoothlyUserInput");this.smoothlyInputLoad=e(this,"smoothlyInputLoad");this.smoothlyFormDisable=e(this,"smoothlyFormDisable");this.smoothlyInputLooks=e(this,"smoothlyInputLooks");this.value=C.Date.now();this.next=false;this.previous=false;this.inCalendar=false;this.showLabel=true;this.allowPreviousMonth=true;this.allowNextMonth=true;this.observer=Xo.Observer.create(this)}componentWillLoad(){this.smoothlyInputLooks.emit((t=>{var e;return this.looks=(e=this.looks)!==null&&e!==void 0?e:t}));this.smoothlyInputLoad.emit((t=>this.parent=t));!this.readonly&&this.smoothlyFormDisable.emit((t=>this.readonly=t));this.valueChanged()}valueChanged(){this.smoothlyInput.emit({[this.name]:this.value})}adjustMonth(t){var e;if(!this.readonly){const o=C.Date.parse((e=this.value)!==null&&e!==void 0?e:C.Date.now());o.setMonth(o.getMonth()+t);this.value=C.Date.create(o)}}async disconnectedCallback(){if(!this.element.isConnected){await this.unregister()}}setAllowPreviousMonth(){var t,e;const o=C.Date.previousMonth((t=this.value)!==null&&t!==void 0?t:C.Date.now()).substring(0,7);const s=(e=this.min)===null||e===void 0?void 0:e.substring(0,7);this.allowPreviousMonth=!s||o>=s}setAllowNextMonth(){var t,e;const o=C.Date.nextMonth((t=this.value)!==null&&t!==void 0?t:C.Date.now()).substring(0,7);const s=(e=this.max)===null||e===void 0?void 0:e.substring(0,7);this.allowNextMonth=!s||o<=s}nameChange(t,e){ts.formRename(this,e)}async register(){ts.formAdd(this)}async unregister(){ts.formRemove(this)}async getValue(){return this.value}async clear(){var t,e;(t=this.year)===null||t===void 0?void 0:t.clear();(e=this.month)===null||e===void 0?void 0:e.clear()}async listen(t){this.observer.subscribe(t)}async edit(t){this.readonly=!t}async reset(){var t,e;(t=this.year)===null||t===void 0?void 0:t.reset();(e=this.month)===null||e===void 0?void 0:e.reset()}async setInitialValue(){var t,e;(t=this.year)===null||t===void 0?void 0:t.setInitialValue();(e=this.month)===null||e===void 0?void 0:e.setInitialValue()}inputHandler(t){if(t.target!=this.element){t.stopPropagation();const e=t.detail[`${this.name}-year`];const o=t.detail[`${this.name}-month`];if(o&&C.Date.is(o)){this.value=C.Date.firstOfMonth(o)}else if(e&&C.Date.is(e)){this.value=C.Date.firstOfMonth(e)}}}smoothlyInputLooksHandler(t){if(t.target!=this.element){t.stopPropagation();t.detail(this.looks,this.color)}}async smoothlyInputLoadHandler(t){if(t.target!=this.element){t.stopPropagation()}}render(){var t,e;return o(s,{key:"24ca26112a36f8f6337339152021cd5acfd04408"},o("smoothly-icon",{key:"a67121015379d6a0faadf6eb869324bbfdbd146e",name:"caret-back-outline",size:"tiny",color:this.color,fill:"default",class:{disabled:this.readonly||!this.allowPreviousMonth},onClick:()=>this.allowPreviousMonth&&this.adjustMonth(-1)}),o("smoothly-input-select",{key:"14f7906ad5a9ba3e91afec77d8bd841fc1df5f23",ref:t=>this.year=t,name:`${this.name}-year`,readonly:this.readonly,menuHeight:"5.5items",required:true,ordered:true,inCalendar:this.inCalendar,showLabel:this.showLabel,onSmoothlyInput:t=>this.inputHandler(t),onSmoothlyUserInput:t=>{const e=t.detail.value;if(e&&C.Date.is(e)){const t=C.Date.firstOfMonth(e);this.smoothlyUserInput.emit({name:this.name,value:t})}},searchDisabled:true},o("div",{key:"975e5cf4e7044d3fe0c59eaec95ca4df60b94a84",slot:"label"},o("slot",{key:"f643c99feb9f9c44a45f3edf8e92e053a59ddf34",name:"year-label"})),Wt((t=this.value)!==null&&t!==void 0?t:C.Date.now(),this.min,this.max).map((t=>o("smoothly-item",{key:t.date,value:t.date,selected:t.selected||this.value==t.date},t.name)))),o("smoothly-input-select",{key:"660d45c6f7d8a8e1f0922be07103f9b3af6cdc5b",ref:t=>this.month=t,name:`${this.name}-month`,readonly:this.readonly,color:this.color,looks:this.looks,menuHeight:"5.5items",required:true,ordered:true,inCalendar:this.inCalendar,showLabel:this.showLabel,onSmoothlyInput:t=>this.inputHandler(t),onSmoothlyUserInput:t=>{const e=t.detail.value;if(e&&C.Date.is(e)){const t=C.Date.firstOfMonth(e);this.smoothlyUserInput.emit({name:this.name,value:t})}},searchDisabled:true},o("div",{key:"54ec84b0ce44034e6443f540d8db2e2ab04b20e9",slot:"label"},o("slot",{key:"cc8ef88cf3edc267fe0e8a61222d779df6b91075",name:"month-label"})),Yt((e=this.value)!==null&&e!==void 0?e:C.Date.now()).map((t=>o("smoothly-item",{key:t.date,value:t.date,selected:t.selected||this.value==t.date},t.name)))),o("smoothly-icon",{key:"82ebdb05ec217778b024e7ab30b641c4ce1e5a91",name:"caret-forward-outline",size:"tiny",color:this.color,fill:"default",class:{disabled:this.readonly||!this.allowNextMonth},onClick:()=>this.allowNextMonth&&this.adjustMonth(1)}))}get element(){return a(this)}static get watchers(){return{value:[{valueChanged:0},{setAllowPreviousMonth:0},{setAllowNextMonth:0}],min:[{setAllowPreviousMonth:0}],max:[{setAllowNextMonth:0}],name:[{nameChange:0}]}}};ca.style=ra();const ha=()=>`.sc-smoothly-input-price-demo-h{display:block}`;const da=class{constructor(e){t(this,e);this.currencies=["EUR","USD","GBP"];this.currency="USD"}render(){return o(s,{key:"c7b07f8d277b3a91da7389f15338e1c3ceeb71e6"},o("h2",{key:"1ff6b680677204eb802cb3fe21ed533903c17cca"},"State demo on smoothly-input"),o("p",{key:"5e322e242eb2ef3dc4400e59745e8cf806126735"},"This demo/test the internal state of the smoothly-input component."),o("p",{key:"839cebc0650dbe161f76620a62809a3213f11889"},"The currency of the price should update when switching between the currencies."),o("smoothly-input-radio",{key:"ef6d1e619f0ae3598de284efa24bcfcebcc92e13",name:"currency",onSmoothlyInput:t=>this.currency=C.Currency.is(t.detail.currency)?t.detail.currency:undefined},this.currencies.map((t=>o("smoothly-input-radio-item",{key:t,selected:t==this.currency,value:t},t)))),o("smoothly-input",{key:"36eb82850d2472f5e9e02c88bbdcda3a9a4a8184",type:"price",currency:this.currency},"price"))}};da.style=ha();const ma=()=>`.sc-smoothly-input-radio-h{--input-padding-side:.5rem;--input-value-padding-top:1.25rem;--input-value-padding-bottom:.25rem;--input-min-height:3rem;min-height:var(--input-min-height);box-sizing:border-box;border-radius:var(--smoothly-input-border-radius)}[looks="border"].sc-smoothly-input-radio-h{border:rgb(var(--smoothly-input-border)) solid 1px}[looks="border"].sc-smoothly-input-radio-h:not([readonly]):not([disabled]):focus-within{outline:2px solid rgb(var(--smoothly-input-border-focus))}[looks="border"][readonly].sc-smoothly-input-radio-h{border:transparent solid 1px}[looks="line"].sc-smoothly-input-radio-h{border-bottom:rgb(var(--smoothly-input-border)) solid 1px;position:relative}[looks="line"][readonly].sc-smoothly-input-radio-h{border-bottom:transparent solid 1px}[looks="line"].sc-smoothly-input-radio-h:not([readonly]):not([disabled]):focus-within::before{content:"";position:absolute;inset:0;pointer-events:none;border-bottom:2px solid rgb(var(--smoothly-input-border-focus));z-index:10}[looks="grid"].sc-smoothly-input-radio-h{flex-grow:1;flex-basis:40%;box-shadow:0px 0px 0px 1px rgb(var(--smoothly-input-border));border:none}[looks="grid"][readonly].sc-smoothly-input-radio-h{box-shadow:0px 0px 0px 1px rgba(var(--smoothly-input-border-readonly))}[looks="grid"].sc-smoothly-input-radio-h:not([readonly]):not([disabled]):focus-within{position:relative;box-shadow:0px 0px 0px 2px rgb(var(--smoothly-input-border-focus));outline:none;z-index:10}[looks="transparent"].sc-smoothly-input-radio-h{border:none}[looks="transparent"][readonly].sc-smoothly-input-radio-h,[looks="transparent"].sc-smoothly-input-radio-h:not(:focus-within){background-color:transparent}[looks="transparent"][readonly].sc-smoothly-input-radio-h>input.sc-smoothly-input-radio,[looks="transparent"].sc-smoothly-input-radio-h:not(:focus-within)>input.sc-smoothly-input-radio{background-color:transparent}[looks="transparent"].sc-smoothly-input-radio-h:not([readonly]):focus-within{outline:1px solid rgb(var(--smoothly-input-border))}[disabled].sc-smoothly-input-radio-h{cursor:not-allowed;--smoothly-input-foreground:var(--smoothly-input-disabled-foreground);--smoothly-input-background:var(--smoothly-input-disabled-background);--smoothly-input-border:var(--smoothly-input-disabled-border)}.sc-smoothly-input-radio-h.sc-smoothly-input-radio-s>[slot=label],.sc-smoothly-input-radio-h .sc-smoothly-input-radio-s>[slot=label],.sc-smoothly-input-radio-h .label.sc-smoothly-input-radio{position:absolute;top:.6rem;opacity:0.8;user-select:none;cursor:inherit;transform-origin:top left;transition:transform 100ms ease}[right].sc-smoothly-input-radio-h .label.sc-smoothly-input-radio{transform-origin:top right}.sc-smoothly-input-radio-h.floating-label.sc-smoothly-input-radio-s>[slot=label],.sc-smoothly-input-radio-h.floating-label .sc-smoothly-input-radio-s>[slot=label],.sc-smoothly-input-radio-h.has-value.sc-smoothly-input-radio-s>[slot=label],.sc-smoothly-input-radio-h.has-value .sc-smoothly-input-radio-s>[slot=label],.sc-smoothly-input-radio-h[placeholder].sc-smoothly-input-radio-s>[slot=label],.sc-smoothly-input-radio-h[placeholder] .sc-smoothly-input-radio-s>[slot=label],.sc-smoothly-input-radio-h[readonly].sc-smoothly-input-radio-s>[slot=label],.sc-smoothly-input-radio-h[readonly] .sc-smoothly-input-radio-s>[slot=label],.floating-label.sc-smoothly-input-radio-h .label.sc-smoothly-input-radio,.has-value.sc-smoothly-input-radio-h .label.sc-smoothly-input-radio,.has-text.sc-smoothly-input-radio-h .label.sc-smoothly-input-radio,[placeholder].sc-smoothly-input-radio-h .label.sc-smoothly-input-radio,[readonly].sc-smoothly-input-radio-h .label.sc-smoothly-input-radio,.sc-smoothly-input-radio-h:not([readonly]):focus-within .label.float-on-focus.sc-smoothly-input-radio{top:.2rem;transform:scale(0.8)}.sc-smoothly-input-radio-h:not([show-label]):not(.show-label) .label.sc-smoothly-input-radio{display:none}.sc-smoothly-input-radio-h smoothly-icon.smoothly-invalid.sc-smoothly-input-radio{fill:rgb(var(--smoothly-input-invalid-icon, var(--smoothly-danger-color)))}.sc-smoothly-input-radio-h{background-color:rgb(var(--smoothly-input-background));display:flex;align-items:center;padding-left:var(--input-padding-side);box-sizing:border-box}[show-label].sc-smoothly-input-radio-h>div.sc-smoothly-input-radio{position:relative;padding-block:var(--input-value-padding-top) var(--input-value-padding-bottom)}.sc-smoothly-input-radio-h>div.sc-smoothly-input-radio,.sc-smoothly-input-radio-h>div.sc-smoothly-input-radio>div.options.sc-smoothly-input-radio{display:flex;gap:1.5rem;width:100%}[direction=column].sc-smoothly-input-radio-h>div.sc-smoothly-input-radio>div.options.sc-smoothly-input-radio{flex-direction:column}.sc-smoothly-input-radio-h.sc-smoothly-input-radio-s>[slot=end]{margin-right:0;margin-left:auto}[disabled].sc-smoothly-input-radio-h smoothly-input-radio-item.sc-smoothly-input-radio *.sc-smoothly-input-radio{cursor:not-allowed}`;const ya=class{constructor(o){t(this,o);this.smoothlyInputLooks=e(this,"smoothlyInputLooks");this.smoothlyInput=e(this,"smoothlyInput");this.smoothlyUserInput=e(this,"smoothlyUserInput");this.smoothlyInputLoad=e(this,"smoothlyInputLoad");this.smoothlyFormDisable=e(this,"smoothlyFormDisable");this.isDifferentFromInitial=false;this.valueReceivedOnLoad=false;this.observer=Xo.Observer.create(this);this.value=undefined;this.readonly=false;this.showLabel=true}componentWillLoad(){this.smoothlyInputLooks.emit(((t,e)=>{var o;return this.looks=(o=this.looks)!==null&&o!==void 0?o:t,this.color=e}));!this.readonly&&this.smoothlyFormDisable.emit((t=>this.readonly=t));this.observer.publish()}componentDidLoad(){!this.valueReceivedOnLoad&&this.smoothlyInput.emit({[this.name]:this.value});this.smoothlyInputLoad.emit((t=>this.parent=t));this.initialValue=this.active}handleRegister(t){t.stopPropagation();t.detail(this)}smoothlyInputLoadHandler(t){ts.registerSubAction(this,t)}smoothlyRadioInputHandler(t){var e,o,s;t.stopPropagation();if(!this.readonly&&!this.disabled||!this.valueReceivedOnLoad){if(this.clearable&&((e=this.active)===null||e===void 0?void 0:e.value)===t.detail.value){this.clear()}else if(((o=this.active)===null||o===void 0?void 0:o.value)!==t.detail.value){(s=this.active)===null||s===void 0?void 0:s.select(false);this.active=t.detail;this.value=this.active.value;this.active.select(true)}}if(t.detail.userInitiated){this.smoothlyUserInput.emit({name:this.name,value:this.value})}!this.valueReceivedOnLoad&&(this.valueReceivedOnLoad=!this.valueReceivedOnLoad)}async listen(t){this.observer.subscribe(t)}async disconnectedCallback(){if(!this.element.isConnected){await this.unregister()}}nameChange(t,e){ts.formRename(this,e)}async register(){ts.formAdd(this)}async unregister(){ts.formRemove(this)}async getValue(){return this.value}async clear(){var t;if(this.clearable){(t=this.active)===null||t===void 0?void 0:t.select(false);this.active=undefined;this.value=undefined}}async edit(t){this.readonly=!t}async reset(){var t,e,o;(t=this.active)===null||t===void 0?void 0:t.select(false);this.active=this.initialValue;this.value=(e=this.initialValue)===null||e===void 0?void 0:e.value;(o=this.active)===null||o===void 0?void 0:o.select(true)}async setInitialValue(){this.initialValue=this.active;this.valueChanged()}async valueChanged(){var t;this.valueReceivedOnLoad&&(this.isDifferentFromInitial=((t=this.initialValue)===null||t===void 0?void 0:t.value)!==this.value);this.smoothlyInput.emit({[this.name]:await this.getValue()});this.observer.publish()}watchingReadonly(){this.observer.publish()}render(){return o(s,{key:"9fc1e8e96700c712be6093737a8fe0b1ac85b78f",class:"floating-label"},o("slot",{key:"5a15933d73444cd550b51374b441c1da91671ec1",name:"start"}),o("div",{key:"cc7434af11b658917d8f7505b6575627a832ca13"},o("slot",{key:"2f9427184a5c285cb7f0201a5782eae9631df43a",name:"label"}),o("div",{key:"021d9fe6508e9726a8a80da21c5d0245e091cd06",class:"options"},o("slot",{key:"3e683b89f8cfb733fc8fb42cc2c7269e4317a2a8"}))),o("slot",{key:"197ca8b9be9417179baee6f4d558e4afcd4f4a76",name:"end"}))}get element(){return a(this)}static get watchers(){return{name:[{nameChange:0}],value:[{valueChanged:0}],disabled:[{watchingReadonly:0}],readonly:[{watchingReadonly:0}]}}};ya.style=ma();const ba=()=>`.sc-smoothly-input-radio-item-h{display:flex;flex-wrap:wrap;align-items:center;position:relative}smoothly-input-radio:not([disabled]):not([readonly]) .sc-smoothly-input-radio-item-h>*.sc-smoothly-input-radio-item{cursor:pointer}smoothly-input-radio[disabled] .sc-smoothly-input-radio-item-h>*.sc-smoothly-input-radio-item{cursor:not-allowed}.sc-smoothly-input-radio-item-h>input.sc-smoothly-input-radio-item:focus-visible+smoothly-icon.sc-smoothly-input-radio-item{outline:2px solid rgb(var(--smoothly-primary-color));border-radius:1px}.sc-smoothly-input-radio-item-h>smoothly-icon.sc-smoothly-input-radio-item{--smoothly-color-contrast:var(--smoothly-input-foreground)}smoothly-input-radio:not([disabled]):not([readonly]) .sc-smoothly-input-radio-item-h>smoothly-icon[name=checkmark-circle].sc-smoothly-input-radio-item{--smoothly-color-contrast:var(--smoothly-success-color)}.sc-smoothly-input-radio-item-h>input.sc-smoothly-input-radio-item{opacity:0;z-index:1;width:1.5em;height:1.5em;position:absolute}.sc-smoothly-input-radio-item-h>label.sc-smoothly-input-radio-item{padding:0 .3em;white-space:nowrap}.sc-smoothly-input-radio-item-h[selected].sc-smoothly-input-radio-item-s>[slot="detail"],.sc-smoothly-input-radio-item-h[selected] .sc-smoothly-input-radio-item-s>[slot="detail"]{display:block;width:100%}.sc-smoothly-input-radio-item-h.sc-smoothly-input-radio-item-s>[slot="detail"],.sc-smoothly-input-radio-item-h .sc-smoothly-input-radio-item-s>[slot="detail"]{display:none}`;const ua=class{constructor(o){t(this,o);this.smoothlyRadioItemSelect=e(this,"smoothlyRadioItemSelect");this.smoothlyRadioItemRegister=e(this,"smoothlyRadioItemRegister");this.selected=false}componentWillLoad(){this.smoothlyRadioItemRegister.emit((t=>{this.name=t.name;t.listen((async t=>{if(ts.is(t)){this.disabled=t.disabled}}))}));this.selected&&this.inputHandler(false)}inputHandler(t){this.smoothlyRadioItemSelect.emit({value:this.value,selected:this.selected,select:t=>this.selected=t,userInitiated:t})}render(){return o(s,{key:"1b1afa5ebdb26239b0a7229c3ee1aeb8e41ba05b",onClick:()=>this.inputHandler(true)},o("input",{key:"1b738c88ce589a0ff9d8ef4b805126a8f308c9fc",name:this.name,type:"radio",checked:this.selected,disabled:this.disabled}),o("smoothly-icon",{key:"4b7630b061c6abd992b5e5d9ae7d492ac7234dba",name:this.selected?"checkmark-circle":"ellipse-outline",size:"small",tooltip:"Select"}),o("label",{key:"f2aca1d982c9cdcda621bb08d529b266c1d80f05"},o("slot",{key:"05f1fcbf282038d10ab95b98629d41a423e913af"})),o("slot",{key:"baa173c7a12a735a701dcfbdd99cbd66f6d3440a",name:"detail"}))}get element(){return a(this)}};ua.style=ba();var pa;(function(t){function e(t){return typeof t=="object"&&t!=undefined&&"start"in t&&"end"in t}t.is=e;function o(t,e,o){return t<e?e:t>o?o:t}t.clamp=o;function s(t,e){var o,s;const a=!e?undefined:(s=(o=e.toString().split(".")[1])===null||o===void 0?void 0:o.length)!==null&&s!==void 0?s:0;return+t.toFixed(a)}t.round=s;function a(t,e,s,a,i){const l=o(s,a,i);return e=="start"?{start:Math.min(l,t.end),end:t.end}:{start:t.start,end:Math.max(l,t.start)}}t.setPart=a;function i(t,o){return e(t)?{start:s(t.start,o),end:s(t.end,o)}:t==undefined||Number.isNaN(t)?undefined:s(t,o)}t.normalize=i;function l(t,o){return e(t)&&e(o)?t.start===o.start&&t.end===o.end:t===o}t.equals=l;function n(t){return e(t)?typeof t.start=="number"&&typeof t.end=="number":typeof t=="number"}t.defined=n;function r(t,e,o){return o==e?0:(t-e)/(o-e)*100}t.percent=r})(pa||(pa={}));const fa=()=>`.sc-smoothly-input-range-h{--input-padding-side:.5rem;--input-value-padding-top:1.25rem;--input-value-padding-bottom:.25rem;--input-min-height:3rem;min-height:var(--input-min-height);box-sizing:border-box;border-radius:var(--smoothly-input-border-radius)}[looks="border"].sc-smoothly-input-range-h{border:rgb(var(--smoothly-input-border)) solid 1px}[looks="border"].sc-smoothly-input-range-h:not([readonly]):not([disabled]):focus-within{outline:2px solid rgb(var(--smoothly-input-border-focus))}[looks="border"][readonly].sc-smoothly-input-range-h{border:transparent solid 1px}[looks="line"].sc-smoothly-input-range-h{border-bottom:rgb(var(--smoothly-input-border)) solid 1px;position:relative}[looks="line"][readonly].sc-smoothly-input-range-h{border-bottom:transparent solid 1px}[looks="line"].sc-smoothly-input-range-h:not([readonly]):not([disabled]):focus-within::before{content:"";position:absolute;inset:0;pointer-events:none;border-bottom:2px solid rgb(var(--smoothly-input-border-focus));z-index:10}[looks="grid"].sc-smoothly-input-range-h{flex-grow:1;flex-basis:40%;box-shadow:0px 0px 0px 1px rgb(var(--smoothly-input-border));border:none}[looks="grid"][readonly].sc-smoothly-input-range-h{box-shadow:0px 0px 0px 1px rgba(var(--smoothly-input-border-readonly))}[looks="grid"].sc-smoothly-input-range-h:not([readonly]):not([disabled]):focus-within{position:relative;box-shadow:0px 0px 0px 2px rgb(var(--smoothly-input-border-focus));outline:none;z-index:10}[looks="transparent"].sc-smoothly-input-range-h{border:none}[looks="transparent"][readonly].sc-smoothly-input-range-h,[looks="transparent"].sc-smoothly-input-range-h:not(:focus-within){background-color:transparent}[looks="transparent"][readonly].sc-smoothly-input-range-h>input.sc-smoothly-input-range,[looks="transparent"].sc-smoothly-input-range-h:not(:focus-within)>input.sc-smoothly-input-range{background-color:transparent}[looks="transparent"].sc-smoothly-input-range-h:not([readonly]):focus-within{outline:1px solid rgb(var(--smoothly-input-border))}[disabled].sc-smoothly-input-range-h{cursor:not-allowed;--smoothly-input-foreground:var(--smoothly-input-disabled-foreground);--smoothly-input-background:var(--smoothly-input-disabled-background);--smoothly-input-border:var(--smoothly-input-disabled-border)}.sc-smoothly-input-range-h.sc-smoothly-input-range-s>[slot=label],.sc-smoothly-input-range-h .sc-smoothly-input-range-s>[slot=label],.sc-smoothly-input-range-h .label.sc-smoothly-input-range{position:absolute;top:.6rem;opacity:0.8;user-select:none;cursor:inherit;transform-origin:top left;transition:transform 100ms ease}[right].sc-smoothly-input-range-h .label.sc-smoothly-input-range{transform-origin:top right}.sc-smoothly-input-range-h.floating-label.sc-smoothly-input-range-s>[slot=label],.sc-smoothly-input-range-h.floating-label .sc-smoothly-input-range-s>[slot=label],.sc-smoothly-input-range-h.has-value.sc-smoothly-input-range-s>[slot=label],.sc-smoothly-input-range-h.has-value .sc-smoothly-input-range-s>[slot=label],.sc-smoothly-input-range-h[placeholder].sc-smoothly-input-range-s>[slot=label],.sc-smoothly-input-range-h[placeholder] .sc-smoothly-input-range-s>[slot=label],.sc-smoothly-input-range-h[readonly].sc-smoothly-input-range-s>[slot=label],.sc-smoothly-input-range-h[readonly] .sc-smoothly-input-range-s>[slot=label],.floating-label.sc-smoothly-input-range-h .label.sc-smoothly-input-range,.has-value.sc-smoothly-input-range-h .label.sc-smoothly-input-range,.has-text.sc-smoothly-input-range-h .label.sc-smoothly-input-range,[placeholder].sc-smoothly-input-range-h .label.sc-smoothly-input-range,[readonly].sc-smoothly-input-range-h .label.sc-smoothly-input-range,.sc-smoothly-input-range-h:not([readonly]):focus-within .label.float-on-focus.sc-smoothly-input-range{top:.2rem;transform:scale(0.8)}.sc-smoothly-input-range-h:not([show-label]):not(.show-label) .label.sc-smoothly-input-range{display:none}.sc-smoothly-input-range-h smoothly-icon.smoothly-invalid.sc-smoothly-input-range{fill:rgb(var(--smoothly-input-invalid-icon, var(--smoothly-danger-color)))}*.sc-smoothly-input-range{box-sizing:border-box}.sc-smoothly-input-range-h{position:relative;width:100%;justify-content:center;align-items:center;display:flex;background-color:rgb(var(--smoothly-input-background));box-sizing:border-box}.sc-smoothly-input-range-h>div.sc-smoothly-input-range:not([slot]){position:relative;display:flex;justify-content:center;align-items:center;width:100%;padding-right:var(--input-padding-side)}.sc-smoothly-input-range-h>div.sc-smoothly-input-range>smoothly-input.sc-smoothly-input-range{width:12em;--input-min-height:calc(3rem - 2px);--smoothly-input-border-focus:none}.sc-smoothly-input-range-h>div.sc-smoothly-input-range>smoothly-input.sc-smoothly-input-range label.sc-smoothly-input-range{white-space:nowrap}.output-side-right.sc-smoothly-input-range-h>div.sc-smoothly-input-range{padding:0}.output-side-right.sc-smoothly-input-range-h>div.sc-smoothly-input-range>smoothly-input.sc-smoothly-input-range{text-align:center;margin-left:var(--input-padding-side);border:none;box-sizing:border-box;width:6rem;order:3;margin:0}.output-side-right.sc-smoothly-input-range-h>div.sc-smoothly-input-range>smoothly-display.sc-smoothly-input-range,.sc-smoothly-input-range-h:not(.output-side-right)>div.sc-smoothly-input-range>label.sc-smoothly-input-range{display:none}.output-side-right.sc-smoothly-input-range-h>div.sc-smoothly-input-range>smoothly-input.sc-smoothly-input-range input.sc-smoothly-input-range{padding:0;text-align:center}.output-side-right.sc-smoothly-input-range-h>div.sc-smoothly-input-range>smoothly-input.sc-smoothly-input-range label.sc-smoothly-input-range{width:100%}.output-side-right.sc-smoothly-input-range-h>div.sc-smoothly-input-range>label.sc-smoothly-input-range{position:static;font-size:inherit;text-align:center;margin:0 var(--input-padding-side)}.sc-smoothly-input-range-h>div.sc-smoothly-input-range>input[type=range].sc-smoothly-input-range{-webkit-appearance:none;width:100%;background:transparent;height:1.5em;padding:0 .4em}.sc-smoothly-input-range-h>div.sc-smoothly-input-range>input[type=range].sc-smoothly-input-range::-webkit-slider-thumb{-webkit-appearance:none;height:0.8em;width:0.8em;border-radius:100%;margin-top:-.25em;border:none}.sc-smoothly-input-range-h:not([disabled]):not([readonly])>div.sc-smoothly-input-range>input[type=range].sc-smoothly-input-range::-webkit-slider-thumb{background-color:rgb(var(--smoothly-primary-color));cursor:pointer}.sc-smoothly-input-range-h>div.sc-smoothly-input-range>input[type=range].sc-smoothly-input-range::-moz-range-thumb{height:0.8em;width:0.8em;border-radius:100%;border:none;background-color:rgb(var(--smoothly-input-foreground))}.sc-smoothly-input-range-h:not([disabled]):not([readonly])>div.sc-smoothly-input-range>input[type=range].sc-smoothly-input-range::-moz-range-thumb{background-color:rgb(var(--smoothly-primary-color));cursor:pointer}.sc-smoothly-input-range-h>div.sc-smoothly-input-range>input[type=range].sc-smoothly-input-range::-webkit-slider-runnable-track{height:.3rem;border-radius:20px;background-color:rgb(var(--smoothly-input-foreground))}.sc-smoothly-input-range-h:not([disabled]):not([readonly])>div.sc-smoothly-input-range>input[type=range].sc-smoothly-input-range::-webkit-slider-runnable-track{background-color:rgb(var(--smoothly-primary-color));cursor:pointer}.sc-smoothly-input-range-h>div.sc-smoothly-input-range>input[type=range].sc-smoothly-input-range::-moz-range-track{width:100%;height:.3rem;border-radius:20px;background-color:rgb(var(--smoothly-input-foreground))}.sc-smoothly-input-range-h:not([disabled]):not([readonly])>div.sc-smoothly-input-range>input[type=range].sc-smoothly-input-range::-moz-range-track{background-color:rgb(var(--smoothly-primary-color));cursor:pointer}.sc-smoothly-input-range-h:not([value]):not([disabled]):not([readonly])>div.sc-smoothly-input-range>input[type=range].sc-smoothly-input-range::-webkit-slider-runnable-track{background-color:rgb(var(--smoothly-primary-tint))}.sc-smoothly-input-range-h:not([value]):not([disabled]):not([readonly])>div.sc-smoothly-input-range>input[type=range].sc-smoothly-input-range::-moz-range-track{background-color:rgb(var(--smoothly-primary-tint))}[disabled].sc-smoothly-input-range-h>div.sc-smoothly-input-range>input[type=range].sc-smoothly-input-range::-webkit-slider-thumb,[disabled].sc-smoothly-input-range-h>div.sc-smoothly-input-range>input[type=range].sc-smoothly-input-range::-moz-range-thumb,[disabled].sc-smoothly-input-range-h>div.sc-smoothly-input-range>input[type=range].sc-smoothly-input-range::-webkit-slider-runnable-track,[disabled].sc-smoothly-input-range-h>div.sc-smoothly-input-range>input[type=range].sc-smoothly-input-range::-moz-range-track,[disabled].sc-smoothly-input-range-h,[disabled].sc-smoothly-input-range-h *.sc-smoothly-input-range{cursor:not-allowed}input.sc-smoothly-input-range::-webkit-outer-spin-button,input.sc-smoothly-input-range::-webkit-inner-spin-button{-webkit-appearance:none;margin:0}.dual.sc-smoothly-input-range-h>div.sc-smoothly-input-range>smoothly-input.sc-smoothly-input-range{width:7rem;flex:0 0 auto}.dual.sc-smoothly-input-range-h .track.sc-smoothly-input-range{position:relative;flex:1;height:1.5em;display:flex;align-items:center}.dual.sc-smoothly-input-range-h .track.sc-smoothly-input-range::before{content:"";position:absolute;left:.4em;right:.4em;height:.3rem;border-radius:20px;background-color:rgb(var(--smoothly-input-foreground))}.dual.sc-smoothly-input-range-h .fill.sc-smoothly-input-range{position:absolute;height:.3rem;border-radius:20px;background-color:rgb(var(--smoothly-primary-color));pointer-events:none}.dual[readonly].sc-smoothly-input-range-h .fill.sc-smoothly-input-range,.dual[disabled].sc-smoothly-input-range-h .fill.sc-smoothly-input-range{background-color:rgb(var(--smoothly-input-foreground))}.dual.sc-smoothly-input-range-h .track.sc-smoothly-input-range>input[type=range].sc-smoothly-input-range{position:absolute;left:0;right:0;width:100%;margin:0;background:transparent;pointer-events:none}.dual.sc-smoothly-input-range-h .track.sc-smoothly-input-range>input[type=range].sc-smoothly-input-range::-webkit-slider-runnable-track{background:transparent}.dual.sc-smoothly-input-range-h .track.sc-smoothly-input-range>input[type=range].sc-smoothly-input-range::-moz-range-track{background:transparent}.dual.sc-smoothly-input-range-h .track.sc-smoothly-input-range>input[type=range].sc-smoothly-input-range::-webkit-slider-thumb{pointer-events:auto}.dual.sc-smoothly-input-range-h .track.sc-smoothly-input-range>input[type=range].sc-smoothly-input-range::-moz-range-thumb{pointer-events:auto}.dual.sc-smoothly-input-range-h .track.sc-smoothly-input-range>input[type=range].sc-smoothly-input-range{-webkit-appearance:none}.dual.sc-smoothly-input-range-h .track.sc-smoothly-input-range>input[type=range].sc-smoothly-input-range::-webkit-slider-runnable-track{height:.3rem}.dual.sc-smoothly-input-range-h .track.sc-smoothly-input-range>input[type=range].sc-smoothly-input-range::-moz-range-track{height:.3rem}.dual.sc-smoothly-input-range-h .track.sc-smoothly-input-range>input[type=range].sc-smoothly-input-range::-webkit-slider-thumb{-webkit-appearance:none;height:0.8em;width:0.8em;margin-top:-.25em;border-radius:100%;border:none;background-color:rgb(var(--smoothly-input-foreground))}.dual.sc-smoothly-input-range-h:not([disabled]):not([readonly]) .track.sc-smoothly-input-range>input[type=range].sc-smoothly-input-range::-webkit-slider-thumb{background-color:rgb(var(--smoothly-primary-color));cursor:pointer}.dual.sc-smoothly-input-range-h .track.sc-smoothly-input-range>input[type=range].sc-smoothly-input-range::-moz-range-thumb{height:0.8em;width:0.8em;border-radius:100%;border:none;background-color:rgb(var(--smoothly-input-foreground))}.dual.sc-smoothly-input-range-h:not([disabled]):not([readonly]) .track.sc-smoothly-input-range>input[type=range].sc-smoothly-input-range::-moz-range-thumb{background-color:rgb(var(--smoothly-primary-color));cursor:pointer}.dual[disabled].sc-smoothly-input-range-h .track.sc-smoothly-input-range>input[type=range].sc-smoothly-input-range::-webkit-slider-thumb,.dual[disabled].sc-smoothly-input-range-h .track.sc-smoothly-input-range>input[type=range].sc-smoothly-input-range::-moz-range-thumb{cursor:not-allowed}`;const ga=class{constructor(o){t(this,o);this.smoothlyInputLooks=e(this,"smoothlyInputLooks");this.smoothlyInput=e(this,"smoothlyInput");this.smoothlyUserInput=e(this,"smoothlyUserInput");this.smoothlyInputLoad=e(this,"smoothlyInputLoad");this.smoothlyFormDisable=e(this,"smoothlyFormDisable");this.isDifferentFromInitial=false;this.observer=Xo.Observer.create(this);this.initialValue=undefined;this.sliding=false;this.value=undefined;this.dual=false;this.defined=false;this.readonly=false;this.type="text";this.min=0;this.max=100;this.name="range";this.outputSide="left";this.showInput=false}componentWillLoad(){this.smoothlyInputLooks.emit(((t,e)=>{var o;return this.looks=(o=this.looks)!==null&&o!==void 0?o:t,this.color=e}));this.smoothlyInputLoad.emit((t=>this.parent=t));!this.readonly&&this.smoothlyFormDisable.emit((t=>this.readonly=t));if(this.dual&&!pa.is(this.value)){this.initialValue={start:this.min,end:this.max};this.value=this.initialValue}else{this.value&&(this.initialValue=this.value);this.valueChanged()}}smoothlyInputLoadHandler(t){ts.registerSubAction(this,t)}smoothlyInputLooksHandler(t){if(t.target!=this.element){t.stopPropagation()}}async disconnectedCallback(){if(!this.element.isConnected){await this.unregister()}}nameChange(t,e){ts.formRename(this,e)}async register(){ts.formAdd(this)}async unregister(){ts.formRemove(this)}async getValue(){return this.value}async clear(){this.value=undefined}async listen(t){this.observer.subscribe(t)}async edit(t){this.readonly=!t}async reset(){this.value=this.initialValue}async setInitialValue(){this.initialValue=this.value;this.isDifferentFromInitial=false;this.valueChanged()}valueChanged(){const t=pa.normalize(this.value,this.step);if(!pa.equals(t,this.value)){this.value=t;return}this.isDifferentFromInitial=!pa.equals(this.initialValue,this.value);this.defined=pa.defined(this.value);if(!this.sliding){this.observer.publish();this.smoothlyInput.emit({[this.name]:this.value})}}watchingReadonly(){this.observer.publish()}setValue(t){var e;if(t==undefined||Number.isNaN(t)){this.value=undefined}else if(t<this.min){this.value=this.min}else if(t>this.max){this.value=this.max}else{this.value=t}this.input&&(this.input.value=this.type=="text"?(e=this.value)===null||e===void 0?void 0:e.toString():this.value)}setRange(t,e){const o=pa.is(this.value)?this.value:{start:this.min,end:this.max};const s=e==undefined||Number.isNaN(e)?t=="start"?this.min:this.max:e;const a=pa.setPart(o,t,s,this.min,this.max);if(pa.equals(a,this.value)){return}this.value=a;const i=t=="start"?this.startInput:this.endInput;const l=a[t];i&&(i.value=this.type=="text"?l.toString():l);!this.sliding&&this.smoothlyUserInput.emit({name:this.name,value:this.value})}async commitField(t){const e=t=="start"?this.startInput:this.endInput;this.setRange(t,e?Number(await e.getValue()):undefined);const o=pa.is(this.value)?this.value[t]:undefined;e===null||e===void 0?void 0:e.setValue(this.type=="text"?o===null||o===void 0?void 0:o.toString():o)}renderSingle(){var t,e,s;return[o("smoothly-input",{ref:t=>this.input=t,looks:undefined,color:this.color,name:this.name,showLabel:this.outputSide==="left"&&!!this.label,type:this.type,onSmoothlyInputLoad:async t=>(t.stopPropagation(),this.setValue(ts.Element.is(t.target)?Number(await t.target.getValue()):undefined)),onSmoothlyBlur:t=>t.stopPropagation(),onSmoothlyInput:async t=>{t.stopPropagation();this.setValue(ts.Element.is(t.target)?Number(await t.target.getValue()):undefined)},value:this.type=="percent"?this.value:(t=this.value)===null||t===void 0?void 0:t.toString(),placeholder:this.outputSide==="right"?"-":undefined,readonly:this.readonly,disabled:this.disabled},this.label),o("smoothly-display",{label:(this.type=="percent"?this.min*100:this.min).toString()}),o("input",{name:this.name,part:"range",type:"range",min:this.min,max:this.max,step:(e=this.step)!==null&&e!==void 0?e:"any",disabled:this.readonly||this.disabled,onInput:t=>{t.stopPropagation();this.sliding=true;this.setValue(t.target.valueAsNumber)},onChange:t=>{t.stopPropagation();this.sliding=false;this.observer.publish();this.smoothlyInput.emit({[this.name]:this.value});this.smoothlyUserInput.emit({name:this.name,value:this.value})},value:(s=this.value)!==null&&s!==void 0?s:this.min}),o("smoothly-display",{label:(this.type=="percent"?this.max*100:this.max).toString()})]}renderDual(){const t=pa.is(this.value)?this.value:{start:this.min,end:this.max};const e=pa.percent(t.start,this.min,this.max);const s=100-pa.percent(t.end,this.min,this.max);return[this.renderField("start",t.start),o("div",{class:"track",part:"track"},o("div",{class:"fill",part:"fill",style:{left:`${e}%`,right:`${s}%`}}),this.renderRangeInput("start",t.start),this.renderRangeInput("end",t.end)),this.renderField("end",t.end)]}renderField(t,e){return o("smoothly-input",{ref:e=>t=="start"?this.startInput=e:this.endInput=e,class:t,color:this.color,name:`${this.name}-${t}`,showLabel:true,type:this.type,onSmoothlyBlur:e=>(e.stopPropagation(),this.commitField(t)),onSmoothlyKeydown:e=>void(e.detail.key=="Enter"&&this.commitField(t)),onSmoothlyInput:t=>t.stopPropagation(),onSmoothlyUserInput:t=>t.stopPropagation(),value:this.type=="percent"?e:e===null||e===void 0?void 0:e.toString(),readonly:this.readonly,disabled:this.disabled,right:t=="start"},`${this.label?this.label:""} ${t=="start"?"From":"To"}`)}renderRangeInput(t,e){var s;return o("input",{part:t=="start"?"range range-start":"range range-end",type:"range",min:this.min,max:this.max,step:(s=this.step)!==null&&s!==void 0?s:"any",disabled:this.readonly||this.disabled,onInput:e=>{const o=e.target;e.stopPropagation();this.sliding=true;this.setRange(t,o.valueAsNumber);const s=pa.is(this.value)?this.value[t]:undefined;s!=undefined&&(o.value=String(s))},onChange:t=>{t.stopPropagation();this.sliding=false;this.observer.publish();this.smoothlyInput.emit({[this.name]:this.value});this.smoothlyUserInput.emit({name:this.name,value:this.value})},value:e!==null&&e!==void 0?e:t=="start"?this.min:this.max})}render(){return o(s,{key:"e6c7859a0b3d9d7aa65954e2bf5ab27645b5a247",class:{"output-side-right":this.outputSide==="right","show-label":this.dual||this.outputSide==="left"&&!!this.label,dual:this.dual}},o("slot",{key:"e6536df1839f5784ec98811059c0b7b75fbcf2e5",name:"start"}),o("div",{key:"aecd457a3c0d380d5cb8c890361490663f4843fd"},o("label",{key:"f87b1212516a92ffdd5ddf541b0c2c556b9dfa89",htmlFor:this.name},this.label),this.dual?this.renderDual():this.renderSingle()),o("slot",{key:"a2055f612918cec6ea2961264bc135beab00310e",name:"end"}))}get element(){return a(this)}static get watchers(){return{name:[{nameChange:0}],value:[{valueChanged:0}],disabled:[{watchingReadonly:0}],readonly:[{watchingReadonly:0}]}}};ga.style=fa();const ka=class{constructor(e){t(this,e)}render(){return o(s,{key:"93085adc52dbed67cd824108eaaf64b3bda0fb6e"},o("h2",{key:"a91437c641e21986ad592c73f92a14234eddb9b9"},"Range"),o("h3",{key:"5003225e9af30f278a7f37ccc1daab93df370e80"},"Phone Number"),o("smoothly-input-range",{key:"38c9a1cf1be25dec16410ca010c5ae734746e28b",name:"first",min:7e8,max:799999999,step:1,label:"Phone Number"}),o("h3",{key:"d698c7cc1fe2f6a8bd6acdeadfa2ed1e5feaada1"},"Stars out of ten"),o("smoothly-input-range",{key:"dc0f9fa7347edbdcb7bbe8ea454fd9f45f4d9415",name:"stars",max:10,step:1,label:"Stars"}),o("h3",{key:"0a9a613efb97dd6c8493de427aec5c24408cc4fa"},"Percent"),o("smoothly-input-range",{key:"ded29f7d3daac293b6c27a19869b31c91775a14f",name:"percent",type:"percent",max:1,step:.01,label:"Percent"}),o("h3",{key:"589f59a5a0fb056d09d73bb233e2d255630bc951"},"With icon at start and clear button"),o("smoothly-input-range",{key:"80a584d2d100d35cc573c3e4c08345a83c2722d4",step:1,name:"withClear",label:"Select"},o("smoothly-icon",{key:"9aeb80b3577a69016be5ce6e5bb874e08d58e435",name:"checkmark-circle",slot:"start"}),o("smoothly-input-clear",{key:"61d3b0a8b0e97c94a8eb1f042c0b7ee60891d90b",size:"icon",slot:"end"})),o("h3",{key:"a4cca86315fe12f0f65925efaf9e9996cd6437b7"},"Dual (start / end)"),o("smoothly-input-range",{key:"14e337185e98ff57664e34a50df68f1999818680",dual:true,min:90.86,max:1e7,step:1,name:"dualRange",label:"Range"}),o("h3",{key:"6bcd7e2e726e75faea6b630eb65baea6aa867cd9"},"Dual percent"),o("smoothly-input-range",{key:"33a08332e9ee254819afbff1bff39c8e84edd6e1",dual:true,name:"dualRangePercent",type:"percent",min:0,max:1,step:.01},o("smoothly-input-clear",{key:"e4125366bf47fb0dafda9fa254f88c023af2760f",size:"icon",slot:"end"})))}};const va=()=>`[color=default].sc-smoothly-input-reset{--smoothly-color:var(--smoothly-default-color);--smoothly-color-contrast:var(--smoothly-default-contrast);--smoothly-color-shade:var(--smoothly-default-shade);--smoothly-color-tint:var(--smoothly-default-tint)}[color=primary].sc-smoothly-input-reset{--smoothly-color:var(--smoothly-primary-color);--smoothly-color-contrast:var(--smoothly-primary-contrast);--smoothly-color-shade:var(--smoothly-primary-shade);--smoothly-color-tint:var(--smoothly-primary-tint)}[color=secondary].sc-smoothly-input-reset{--smoothly-color:var(--smoothly-secondary-color);--smoothly-color-contrast:var(--smoothly-secondary-contrast);--smoothly-color-shade:var(--smoothly-secondary-shade);--smoothly-color-tint:var(--smoothly-secondary-tint)}[color=tertiary].sc-smoothly-input-reset{--smoothly-color:var(--smoothly-tertiary-color);--smoothly-color-contrast:var(--smoothly-tertiary-contrast);--smoothly-color-shade:var(--smoothly-tertiary-shade);--smoothly-color-tint:var(--smoothly-tertiary-tint)}[color=success].sc-smoothly-input-reset{--smoothly-color:var(--smoothly-success-color);--smoothly-color-contrast:var(--smoothly-success-contrast);--smoothly-color-shade:var(--smoothly-success-shade);--smoothly-color-tint:var(--smoothly-success-tint)}[color=warning].sc-smoothly-input-reset{--smoothly-color:var(--smoothly-warning-color);--smoothly-color-contrast:var(--smoothly-warning-contrast);--smoothly-color-shade:var(--smoothly-warning-shade);--smoothly-color-tint:var(--smoothly-warning-tint)}[color=danger].sc-smoothly-input-reset{--smoothly-color:var(--smoothly-danger-color);--smoothly-color-contrast:var(--smoothly-danger-contrast);--smoothly-color-shade:var(--smoothly-danger-shade);--smoothly-color-tint:var(--smoothly-danger-tint)}[color=light].sc-smoothly-input-reset{--smoothly-color:var(--smoothly-light-color);--smoothly-color-contrast:var(--smoothly-light-contrast);--smoothly-color-shade:var(--smoothly-light-shade);--smoothly-color-tint:var(--smoothly-light-tint)}[color=medium].sc-smoothly-input-reset{--smoothly-color:var(--smoothly-medium-color);--smoothly-color-contrast:var(--smoothly-medium-contrast);--smoothly-color-shade:var(--smoothly-medium-shade);--smoothly-color-tint:var(--smoothly-medium-tint)}[color=dark].sc-smoothly-input-reset{--smoothly-color:var(--smoothly-dark-color);--smoothly-color-contrast:var(--smoothly-dark-contrast);--smoothly-color-shade:var(--smoothly-dark-shade);--smoothly-color-tint:var(--smoothly-dark-tint)}.sc-smoothly-input-reset-h{--smoothly-button-border-radius:0.5rem;display:inline-flex;box-sizing:border-box;border-radius:var(--smoothly-button-border-radius);font-size:var(--smoothly-button-font-size, 1rem);cursor:pointer;border:none;outline:none;position:relative}[shape=rounded].sc-smoothly-input-reset-h{--smoothly-button-border-radius:2rem}[type=link].sc-smoothly-input-reset-h{display:inline}[disabled].sc-smoothly-input-reset-h{opacity:0.5}.sc-smoothly-input-reset-h>a.sc-smoothly-input-reset{font-weight:400;background-color:transparent}.sc-smoothly-input-reset-h>a.sc-smoothly-input-reset,.sc-smoothly-input-reset-h>button.sc-smoothly-input-reset{font-size:var(--smoothly-button-font-size);border:1px solid transparent;outline:none;cursor:pointer;display:inline-flex;gap:0.5rem;box-sizing:border-box}.sc-smoothly-input-reset-h>button.sc-smoothly-input-reset{font-weight:bold;justify-content:center;width:100%;align-items:center;border-radius:var(--smoothly-button-border-radius);padding-inline:var(--smoothly-button-padding-inline, 1rem)}.sc-smoothly-input-reset-h{min-height:var(--smoothly-button-height, 2.5rem)}.sc-smoothly-input-reset-h:has(>a:empty),.sc-smoothly-input-reset-h:has(>button:empty),.sc-smoothly-input-reset-h>a.sc-smoothly-input-reset:empty,.sc-smoothly-input-reset-h>button.sc-smoothly-input-reset:empty{border-width:0;min-height:0;padding-inline:0}[size=small].sc-smoothly-input-reset-h{--smoothly-button-height:2rem;--smoothly-button-padding-inline:0.75rem;--smoothly-button-font-size:0.875rem;--smoothly-icon-size:1.4rem}[size=large].sc-smoothly-input-reset-h{--smoothly-button-height:3rem;--smoothly-button-padding-inline:1.25rem;--smoothly-button-font-size:1.125rem}.sc-smoothly-input-reset-h:not([size=icon]):not([size=flexible])>button.sc-smoothly-input-reset{min-width:8rem}[size=icon].sc-smoothly-input-reset-h{--smoothly-icon-size:1.4rem}[size=icon].sc-smoothly-input-reset-h>button.sc-smoothly-input-reset{min-height:var(--smoothly-button-height, 2.5rem);min-width:var(--smoothly-button-height, 2.5rem);padding:0}.sc-smoothly-input-reset-h:not([size=icon]){min-width:8em}[size=flexible].sc-smoothly-input-reset-h{min-width:unset;padding:0;margin:0;display:flex;justify-content:center}[size=flexible].sc-smoothly-input-reset-h>button.sc-smoothly-input-reset{min-width:unset;padding:0;margin:0}[expand].sc-smoothly-input-reset-h{width:100%}[expand=full].sc-smoothly-input-reset-h{border-left:none;border-right:none;--smoothly-button-border-radius:0}[fill=outline].sc-smoothly-input-reset-h>button.sc-smoothly-input-reset{background-color:transparent;color:rgb(var(--smoothly-button-foreground));fill:rgb(var(--smoothly-button-foreground));stroke:rgb(var(--smoothly-button-foreground));border-color:rgb(var(--smoothly-button-foreground))}.sc-smoothly-input-reset-h:not([fill=clear]):not([disabled])>button.sc-smoothly-input-reset:hover,.sc-smoothly-input-reset-h:not([disabled])>button.sc-smoothly-input-reset:focus-visible,[fill=outline].sc-smoothly-input-reset-h:not([disabled]):active>button.sc-smoothly-input-reset::before{border-color:rgb(var(--smoothly-button-focus-color))}[fill=outline].sc-smoothly-input-reset-h:not([disabled])>button.sc-smoothly-input-reset:hover::before,[fill=outline].sc-smoothly-input-reset-h:not([disabled])>button.sc-smoothly-input-reset:focus-within::before,[fill=outline].sc-smoothly-input-reset-h:not([disabled])>button.sc-smoothly-input-reset:active::before{content:"";position:absolute;border:2px solid rgb(var(--smoothly-button-focus-border));inset:-1px;border-radius:var(--smoothly-button-border-radius)}.sc-smoothly-input-reset-h:not([fill=clear]):not([fill=outline]):not([disabled])>button.sc-smoothly-input-reset:hover,.sc-smoothly-input-reset-h:not([fill=clear]):not([fill=outline]):not([disabled])>button.sc-smoothly-input-reset:focus-visible,.sc-smoothly-input-reset-h:not([fill=clear]):not([fill=outline]):not([disabled])>button.sc-smoothly-input-reset:active{background:rgb(var(--smoothly-button-hover-background))}.sc-smoothly-input-reset-h>button.sc-smoothly-input-reset,.sc-smoothly-input-reset-h.sc-smoothly-input-reset-s>smoothly-icon,.sc-smoothly-input-reset-h .sc-smoothly-input-reset-s>smoothly-icon{color:rgb(var(--smoothly-button-foreground));stroke:rgb(var(--smoothly-button-foreground));fill:rgb(var(--smoothly-button-foreground))}[hidden].sc-smoothly-input-reset-h{display:none}.sc-smoothly-input-reset-h:not([display]){display:none}.sc-smoothly-input-reset-h[type="input"].sc-smoothly-input-reset-s>smoothly-button>button{cursor:pointer;filter:opacity(60%);--smoothly-button-foreground:var(--smoothly-input-foreground);background-color:transparent}.sc-smoothly-input-reset-h.sc-smoothly-input-reset-s>smoothly-button>button>*+smoothly-icon{display:none}[disabled].sc-smoothly-input-reset-h{cursor:not-allowed}.sc-smoothly-input-reset-h[type="input"]:hover.sc-smoothly-input-reset-s>smoothly-icon,.sc-smoothly-input-reset-h[type="input"]:hover .sc-smoothly-input-reset-s>smoothly-icon{cursor:pointer;filter:opacity(100%)}`;const wa=class{constructor(o){t(this,o);this.smoothlyInputLoad=e(this,"smoothlyInputLoad");this.size="icon";this.display=true;this.type="input";this.tooltip="Reset"}async componentWillLoad(){this.smoothlyInputLoad.emit((t=>{if(Xo.Element.type.is(t)){this.parent=t;t.listen((async t=>{if(ts.is(t)){const e=typeof t.defined=="boolean"?t.defined:Boolean(await t.getValue());this.display=t.readonly||!e?false:t.isDifferentFromInitial}if(t instanceof os){this.display=!t.readonly}}));if(typeof this.disabled!=="boolean"){this.readonlyAtLoad=t.readonly;t.listen((async t=>{if(t instanceof os){this.disabled=!this.readonlyAtLoad&&!t.isDifferentFromInitial}}))}}}))}clickHandler(t){var e,o;t.stopPropagation();(e=this.parent)===null||e===void 0?void 0:e.reset();this.parent instanceof os&&this.readonlyAtLoad&&((o=this.parent)===null||o===void 0?void 0:o.edit(false))}render(){var t;return o(s,{key:"13185b139b729ca9597dc2677c2014684c250ce7",title:this.tooltip},o("smoothly-button",{key:"34f4dc13947bbdc6b1975cdfd2b3bc868cb7a941",disabled:this.disabled,size:this.size,type:"button",shape:this.shape,expand:this.expand,color:this.color,fill:(t=this.fill)!==null&&t!==void 0?t:this.type=="input"?"clear":undefined,onClick:t=>this.clickHandler(t)},o("slot",{key:"1add7cbbb4b0cc5372156c4b6f448cc5a7d52380"}),o("smoothly-icon",{key:"af9284edf39c8b346903e42fc51dcb20bb7ad7c3",flip:"x",name:"refresh-outline",size:"tiny"})))}};wa.style=va();var xa;(function(t){let e;(function(t){t.type=m({value:z(),deselectable:b(),selected:b().optional(),filter:y()});t.is=t.type.is})(e=t.Element||(t.Element={}));t.type=e.type.extend({});t.is=t.type.is})(xa||(xa={}));var Ca;(function(t){function e(t){var e;return(e=t.find((t=>t.clientHeight>0)))===null||e===void 0?void 0:e.clientHeight}t.firstItemHeight=e;function o(t,e,o){var s,a;const i=o.endsWith("items")?`${e*+((a=(s=o.match(/^(\d+(\.\d+)?|\.\d+)/g))===null||s===void 0?void 0:s[0])!==null&&a!==void 0?a:"10")}px`:o;t.style.setProperty("--menu-height",i)}t.applyMenuHeight=o;function s(t){t===null||t===void 0?void 0:t.style.setProperty("--element-height",`${t.clientHeight}px`)}t.applyElementHeight=s})(Ca||(Ca={}));var Sa;(function(t){function e(t,e){const o=t.findIndex((t=>(e.compareDocumentPosition(t)&Node.DOCUMENT_POSITION_FOLLOWING)!==0));return o==-1?[...t,e]:[...t.slice(0,o),e,...t.slice(o)]}t.insert=e;function o(t,e){const o=t.filter((t=>!t.hidden&&!t.disabled));const s=o.findIndex((t=>t.marked));let a;if(s==-1){a=0}else{a=(s+e+o.length)%o.length}return{current:o[s],next:o[a]}}t.next=o;function s(t){return t.some((t=>!t.getAttribute("hidden")))}t.hasVisibleItems=s;function a(t,e){t.map((t=>t.marked=t===e))}t.markOnly=a;function i(t){return t.find((t=>t.selected))}t.findFirstSelected=i;function l(t){return t.find((t=>t.marked))}t.findFirstMarked=l})(Sa||(Sa={}));var za;(function(t){function e(t,e,o="smooth"){var s;if(e&&t){t.scrollTo({top:e.offsetTop+e.offsetHeight/2-((s=t.clientHeight)!==null&&s!==void 0?s:0)/2,behavior:o})}}t.centerInView=e})(za||(za={}));const Ia=()=>`.sc-smoothly-input-select-h{--input-padding-side:.5rem;--input-value-padding-top:1.25rem;--input-value-padding-bottom:.25rem;--input-min-height:3rem;min-height:var(--input-min-height);box-sizing:border-box;border-radius:var(--smoothly-input-border-radius)}[looks="border"].sc-smoothly-input-select-h{border:rgb(var(--smoothly-input-border)) solid 1px}[looks="border"].sc-smoothly-input-select-h:not([readonly]):not([disabled]):focus-within{outline:2px solid rgb(var(--smoothly-input-border-focus))}[looks="border"][readonly].sc-smoothly-input-select-h{border:transparent solid 1px}[looks="line"].sc-smoothly-input-select-h{border-bottom:rgb(var(--smoothly-input-border)) solid 1px;position:relative}[looks="line"][readonly].sc-smoothly-input-select-h{border-bottom:transparent solid 1px}[looks="line"].sc-smoothly-input-select-h:not([readonly]):not([disabled]):focus-within::before{content:"";position:absolute;inset:0;pointer-events:none;border-bottom:2px solid rgb(var(--smoothly-input-border-focus));z-index:10}[looks="grid"].sc-smoothly-input-select-h{flex-grow:1;flex-basis:40%;box-shadow:0px 0px 0px 1px rgb(var(--smoothly-input-border));border:none}[looks="grid"][readonly].sc-smoothly-input-select-h{box-shadow:0px 0px 0px 1px rgba(var(--smoothly-input-border-readonly))}[looks="grid"].sc-smoothly-input-select-h:not([readonly]):not([disabled]):focus-within{position:relative;box-shadow:0px 0px 0px 2px rgb(var(--smoothly-input-border-focus));outline:none;z-index:10}[looks="transparent"].sc-smoothly-input-select-h{border:none}[looks="transparent"][readonly].sc-smoothly-input-select-h,[looks="transparent"].sc-smoothly-input-select-h:not(:focus-within){background-color:transparent}[looks="transparent"][readonly].sc-smoothly-input-select-h>input.sc-smoothly-input-select,[looks="transparent"].sc-smoothly-input-select-h:not(:focus-within)>input.sc-smoothly-input-select{background-color:transparent}[looks="transparent"].sc-smoothly-input-select-h:not([readonly]):focus-within{outline:1px solid rgb(var(--smoothly-input-border))}[disabled].sc-smoothly-input-select-h{cursor:not-allowed;--smoothly-input-foreground:var(--smoothly-input-disabled-foreground);--smoothly-input-background:var(--smoothly-input-disabled-background);--smoothly-input-border:var(--smoothly-input-disabled-border)}.sc-smoothly-input-select-h.sc-smoothly-input-select-s>[slot=label],.sc-smoothly-input-select-h .sc-smoothly-input-select-s>[slot=label],.sc-smoothly-input-select-h .label.sc-smoothly-input-select{position:absolute;top:.6rem;opacity:0.8;user-select:none;cursor:inherit;transform-origin:top left;transition:transform 100ms ease}[right].sc-smoothly-input-select-h .label.sc-smoothly-input-select{transform-origin:top right}.sc-smoothly-input-select-h.floating-label.sc-smoothly-input-select-s>[slot=label],.sc-smoothly-input-select-h.floating-label .sc-smoothly-input-select-s>[slot=label],.sc-smoothly-input-select-h.has-value.sc-smoothly-input-select-s>[slot=label],.sc-smoothly-input-select-h.has-value .sc-smoothly-input-select-s>[slot=label],.sc-smoothly-input-select-h[placeholder].sc-smoothly-input-select-s>[slot=label],.sc-smoothly-input-select-h[placeholder] .sc-smoothly-input-select-s>[slot=label],.sc-smoothly-input-select-h[readonly].sc-smoothly-input-select-s>[slot=label],.sc-smoothly-input-select-h[readonly] .sc-smoothly-input-select-s>[slot=label],.floating-label.sc-smoothly-input-select-h .label.sc-smoothly-input-select,.has-value.sc-smoothly-input-select-h .label.sc-smoothly-input-select,.has-text.sc-smoothly-input-select-h .label.sc-smoothly-input-select,[placeholder].sc-smoothly-input-select-h .label.sc-smoothly-input-select,[readonly].sc-smoothly-input-select-h .label.sc-smoothly-input-select,.sc-smoothly-input-select-h:not([readonly]):focus-within .label.float-on-focus.sc-smoothly-input-select{top:.2rem;transform:scale(0.8)}.sc-smoothly-input-select-h:not([show-label]):not(.show-label) .label.sc-smoothly-input-select{display:none}.sc-smoothly-input-select-h smoothly-icon.smoothly-invalid.sc-smoothly-input-select{fill:rgb(var(--smoothly-input-invalid-icon, var(--smoothly-danger-color)))}.sc-smoothly-input-select-h{display:flex;justify-content:space-between;flex-direction:row;position:relative;background-color:rgb(var(--smoothly-input-background));color:rgb(var(--smoothly-input-foreground));fill:rgb(var(--smoothly-input-foreground));stroke:rgb(var(--smoothly-input-foreground));padding-left:var(--input-padding-side)}.open.sc-smoothly-input-select-h{border-radius:var(--smoothly-input-border-radius) var(--smoothly-input-border-radius) 0 0}.sc-smoothly-input-select-h>.select-display.sc-smoothly-input-select{box-sizing:border-box;display:flex;padding:var(--input-value-padding-top) .8rem var(--input-value-padding-bottom) 0;width:100%;white-space:nowrap;gap:1rem}.sc-smoothly-input-select-h>.select-display.sc-smoothly-input-select>.value.sc-smoothly-input-select{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.sc-smoothly-input-select-h:not([readonly]):not([disabled])>.select-display.sc-smoothly-input-select{cursor:pointer}.sc-smoothly-input-select-h:not(:has([slot=label]))>.select-display.sc-smoothly-input-select,.sc-smoothly-input-select-h:not([show-label])>.select-display.sc-smoothly-input-select{padding:.6rem .8rem .6rem 0;align-items:center}.sc-smoothly-input-select-h>.select-display.sc-smoothly-input-select smoothly-icon.sc-smoothly-input-select{color:rgb(var(--smoothly-input-foreground));fill:rgb(var(--smoothly-input-foreground));stroke:rgb(var(--smoothly-input-foreground))}.sc-smoothly-input-select-h>div.icons.sc-smoothly-input-select{display:flex;flex-direction:row;align-items:center}.sc-smoothly-input-select-h:hover>div.icons.sc-smoothly-input-select-s>smoothly-icon{filter:opacity(100%)}.sc-smoothly-input-select-h>div.icons.sc-smoothly-input-select>smoothly-icon[name=caret-down-outline].sc-smoothly-input-select,.sc-smoothly-input-select-h>div.icons.sc-smoothly-input-select>smoothly-icon[name=caret-forward-outline].sc-smoothly-input-select{opacity:.7;height:100%;padding-inline:var(--input-padding-side)}.sc-smoothly-input-select-h:not([readonly]):not([disabled])>div.icons.sc-smoothly-input-select>smoothly-icon[name=caret-down-outline].sc-smoothly-input-select,.sc-smoothly-input-select-h:not([readonly]):not([disabled])>div.icons.sc-smoothly-input-select>smoothly-icon[name=caret-forward-outline].sc-smoothly-input-select{cursor:pointer}[invalid].sc-smoothly-input-select-h>div.sc-smoothly-input-select>smoothly-icon.smoothly-invalid.sc-smoothly-input-select{display:block;padding:0.5rem}.sc-smoothly-input-select-h>div.sc-smoothly-input-select>smoothly-icon.smoothly-invalid.sc-smoothly-input-select{display:none}.has-value.sc-smoothly-input-select-h:has([slot=label]:not(:empty))>.select-display.sc-smoothly-input-select,.sc-smoothly-input-select-h:not(.has-value)[placeholder]>.select-display.sc-smoothly-input-select{overflow:hidden;width:100%}.sc-smoothly-input-select-h>.dropdown.sc-smoothly-input-select{display:flex;flex-direction:column;position:absolute;top:var(--element-height);z-index:20;max-height:var(--menu-height, unset);overflow-x:hidden;overflow-y:auto;background-color:rgb(var(--smoothly-input-background));inset-inline:0;border-radius:0 0 var(--smoothly-input-border-radius) var(--smoothly-input-border-radius);border:rgb(var(--smoothly-input-border, var(--smoothly-color-contrast))) solid 1px;border-top:rgba(var(--smoothly-input-border, var(--smoothly-color-contrast)), .4) solid 1px}.sc-smoothly-input-select-h:not(.open)>.dropdown.sc-smoothly-input-select{border:0}[looks="grid"].sc-smoothly-input-select-h>.dropdown.sc-smoothly-input-select,[looks=border].sc-smoothly-input-select-h>.dropdown.sc-smoothly-input-select,[looks="transparent"].sc-smoothly-input-select-h>.dropdown.sc-smoothly-input-select{inset-inline:-1px}.sc-smoothly-input-select-h>.dropdown.sc-smoothly-input-select>.search.sc-smoothly-input-select{display:flex;position:sticky;align-items:center;top:0;gap:1rem;padding:.7rem .7rem .7rem .25rem;background-color:rgb(var(--smoothly-input-background));color:rgb(var(--smoothly-input-foreground, var(--smoothly-color-contrast)));fill:rgb(var(--smoothly-input-foreground, var(--smoothly-color-contrast)));stroke:rgb(var(--smoothly-input-foreground, var(--smoothly-color-contrast)))}.has-filter-persistent.sc-smoothly-input-select-h>.dropdown.sc-smoothly-input-select>.search.sc-smoothly-input-select{z-index:1}.sc-smoothly-input-select-h:not(.has-filter):not(.has-filter-persistent)>.dropdown.sc-smoothly-input-select>.search.sc-smoothly-input-select{height:0;padding:0;overflow:hidden;pointer-events:none}.sc-smoothly-input-select-h>.dropdown.sc-smoothly-input-select>.search.sc-smoothly-input-select::before{content:"";position:absolute;inset:0;background-color:rgba(var(--smoothly-primary-tint), 0.5);z-index:-1}.sc-smoothly-input-select-h>.dropdown.sc-smoothly-input-select>.search.sc-smoothly-input-select>.search-input.sc-smoothly-input-select{width:100%;background-color:transparent;border:none;outline:none}.sc-smoothly-input-select-h>.dropdown.sc-smoothly-input-select>.search.sc-smoothly-input-select>smoothly-icon[name="search-outline"].sc-smoothly-input-select,.sc-smoothly-input-select-h>.dropdown.sc-smoothly-input-select>.search.sc-smoothly-input-select>smoothly-icon[name="backspace-outline"].sc-smoothly-input-select{color:rgb(var(--smoothly-input-foreground, var(--smoothly-color-contrast)));fill:rgb(var(--smoothly-input-foreground, var(--smoothly-color-contrast)));stroke:rgb(var(--smoothly-input-foreground, var(--smoothly-color-contrast)))}.sc-smoothly-input-select-h[multiple].sc-smoothly-input-select-s>.dropdown>.menu>smoothly-item{position:relative}.sc-smoothly-input-select-h[multiple].sc-smoothly-input-select-s>.dropdown>.menu>smoothly-item::before{content:"";display:inline-block;width:1rem;height:1rem;margin-right:0.5rem;border:1px solid rgb(var(--smoothly-input-foreground));border-radius:0.15rem;vertical-align:middle}.sc-smoothly-input-select-h[multiple].sc-smoothly-input-select-s>.dropdown>.menu>smoothly-item[selected]::before{border-color:rgb(var(--smoothly-item-selected-foreground))}.sc-smoothly-input-select-h[multiple].sc-smoothly-input-select-s>.dropdown>.menu>smoothly-item:hover::before{border:1px solid rgb(var(--smoothly-item-hover-foreground))}.sc-smoothly-input-select-h[multiple].sc-smoothly-input-select-s>.dropdown>.menu>smoothly-item[selected]::after{content:"✔";position:absolute;left:0.65rem;color:rgb(var(--smoothly-item-selected-foreground))}.sc-smoothly-input-select-h[multiple].sc-smoothly-input-select-s>.dropdown>.menu>smoothly-item:hover::after{color:rgb(var(--smoothly-item-hover-foreground))}.sc-smoothly-input-select-h>.dropdown.sc-smoothly-input-select{min-width:fit-content}.sc-smoothly-input-select-h>.dropdown.sc-smoothly-input-select>.menu[hidden].sc-smoothly-input-select{display:none}`;const Ta=class{constructor(o){t(this,o);this.smoothlyInput=e(this,"smoothlyInput");this.smoothlyUserInput=e(this,"smoothlyUserInput");this.smoothlyInputLooks=e(this,"smoothlyInputLooks");this.smoothlyInputLoad=e(this,"smoothlyInputLoad");this.smoothlyFormDisable=e(this,"smoothlyFormDisable");this.smoothlyItemSelect=e(this,"smoothlyItemSelect");this.smoothlySelectOpen=e(this,"smoothlySelectOpen");this.smoothlyFilterChange=e(this,"smoothlyFilterChange");this.isDifferentFromInitial=false;this.initialValue=[];this.initialValueHandled=false;this.observer=Xo.Observer.create(this);this.items=[];this.displaySeparator='<span style="display:inline-block;width:0.8rem"></span>';this.invalid=false;this.name="selected";this.showLabel=true;this.showSelected=true;this.readonly=false;this.disabled=false;this.inCalendar=false;this.multiple=false;this.clearable=true;this.defined=false;this.required=false;this.searchDisabled=false;this.isSearchPersistent=false;this.mutable=false;this.lastOpen=false;this.open=false;this.selected=[];this.filter="";this.addedItems=[];this.display=[]}componentWillLoad(){this.smoothlyInputLooks.emit(((t,e)=>{var o;return this.looks=(o=this.looks)!==null&&o!==void 0?o:t,!this.color&&(this.color=e)}));this.smoothlyInputLoad.emit((t=>this.parent=t));!this.readonly&&this.smoothlyFormDisable.emit((t=>this.readonly=t));this.observer.publish()}componentDidLoad(){this.selected&&!this.initialValueHandled&&(this.initialValue=[...this.selected]);this.initialValueHandled=true;this.onSelectedChange()}componentDidRender(){var t;(t=this.itemHeight)!==null&&t!==void 0?t:this.itemHeight=Ca.firstItemHeight(this.items);if(this.menuHeight&&this.itemHeight){Ca.applyMenuHeight(this.element,this.itemHeight,this.menuHeight)}Ca.applyElementHeight(this.element);const e=this.open&&!this.lastOpen;if(e&&this.ordered){this.scrollToSelected()}}scrollToSelected(){const t=Sa.findFirstSelected(this.items);if(t){Sa.markOnly(this.items,t);za.centerInView(this.dropdownElement,t,"instant")}}async disconnectedCallback(){if(!this.element.isConnected){await this.unregister()}}nameChange(t,e){ts.formRename(this,e)}async register(){ts.formAdd(this)}async unregister(){ts.formRemove(this)}async getValue(){return!this.multiple&&this.selected[0]?this.selected[0].value:this.multiple&&this.selected.length>0?this.selected.map((t=>t.value)):undefined}async getItems(){return this.items}async listen(t){this.observer.subscribe(t)}async reset(){this.selected.forEach((t=>t.selected=t.hidden=false));this.initialValue.forEach((t=>t.selected=true));this.selected=[...this.initialValue];this.displaySelected();this.isDifferentFromInitial=false;this.closeMenu()}async clear(){if(this.clearable){this.selected.forEach((t=>t.selected=t.hidden=false));this.selected=[];this.displaySelected()}}async edit(t){this.readonly=!t}async setInitialValue(){this.isDifferentFromInitial=false;this.initialValue=[...this.selected]}async onSelectedChange(){this.initialValueHandled&&(this.isDifferentFromInitial=!this.areValuesEqual(this.selected,this.initialValue));this.defined=this.selected.length>0;this.smoothlyInput.emit({[this.name]:await this.getValue()});this.observer.publish()}onRequiredChange(){this.items.forEach((t=>t.deselectable=!this.required))}async onFilterChange(t){t=t.toLowerCase();this.smoothlyFilterChange.emit(this.filter);await Promise.all(this.items.map((e=>e.filter(t))))}watchingReadonly(){this.observer.publish()}async smoothlyInputLoadHandler(t){const e=t.target&&"name"in t.target&&t.target.name!==this.name;const o=t.composedPath().some((t=>t==this.iconsElement));if(e||o){t.stopPropagation()}else if(xa.Element.is(t.target)){t.stopPropagation();t.target.deselectable=!this.required;this.items=Sa.insert(this.items,t.target)}ts.registerSubAction(this,t);this.displaySelected()}onWindowClick(t){if(this.open&&!t.composedPath().includes(this.element)){this.closeMenu()}}onItemDomChange(t){t.stopPropagation();const e=t.target;if(e.selected){this.displaySelected()}}async onItemSelect(t){t.stopPropagation();const e=t.detail.item;if(this.multiple){this.selected=e.selected?[...this.selected,e]:this.selected.filter((t=>t.selected))}else if(e.selected||!this.items.some((t=>t.selected))){this.selected[0]&&(this.selected[0].hidden=this.selected[0].selected=false);this.selected=!e.selected?this.selected.filter((t=>t.selected)):[e];!this.showSelected&&e.selected&&(e.hidden=true)}this.displaySelected();if(t.detail.userInitiated){this.smoothlyUserInput.emit({name:this.name,value:await this.getValue()})}}onClosed(t,e){this.lastOpen=e;if(!t){const t=Sa.findFirstMarked(this.items);if(t){t.marked=false}}this.smoothlySelectOpen.emit(t)}areValuesEqual(t,e){return t.length===e.length&&e.every((e=>t.includes(e)))}displaySelected(){this.display=this.selected.map((t=>{const e=t.cloneNode(true);e.querySelectorAll("smoothly-icon").forEach((t=>{const e=t.style;e.display="inline-flex";e.verticalAlign="middle"}));return e.innerHTML}))}onKeyDown(t){t.stopPropagation();const e=t.key;if(e=="ArrowUp"||e=="ArrowDown"){t.preventDefault();this.handlerNavigate(e)}else if(e=="Escape"){t.preventDefault();this.handleEscape()}else if(e=="Enter"){t.preventDefault();this.handleEnter()}else if(e==" "&&!this.open){t.preventDefault();this.openMenu()}else if(this.open&&e=="Tab"){this.closeMenu()}}handlerNavigate(t){if(Sa.hasVisibleItems(this.items)){this.move(t=="ArrowUp"?-1:1)}this.openMenu()}handleEscape(){if(this.filter){this.resetFilter()}else{this.closeMenu()}}handleEnter(){const t=Sa.findFirstMarked(this.items);if(t===null||t===void 0?void 0:t.value){t.selected=!t.selected}if(!this.multiple){this.closeMenu();this.resetFilter()}}move(t){const{current:e,next:o}=Sa.next(this.items,t);e&&(e.marked=false);o.marked=true;za.centerInView(this.dropdownElement,o,"smooth")}addItem(){this.addedItems=this.addedItems.concat(o("smoothly-item",{value:this.filter,selected:true},this.filter))}resetFilter(){this.searchElement&&(this.searchElement.value="");this.filter=""}setFilter(t){if(t){this.filter=t;this.openMenu()}else{this.resetFilter()}}openMenu({focus:t}={}){this.open=true;t&&queueMicrotask((()=>{var t;return(t=this.searchElement)===null||t===void 0?void 0:t.focus()}))}closeMenu(){this.open=false;this.resetFilter()}toggleMenu(){if(!this.readonly&&!this.disabled){this.open?this.closeMenu():this.openMenu({focus:true})}}onClick(t){const e=t.composedPath().includes(this.iconsElement)&&!t.composedPath().includes(this.toggleElement);const o=t.composedPath().includes(this.searchElement);const s=t.composedPath().find((t=>t instanceof HTMLElement&&t.tagName==="SMOOTHLY-ITEM"));if(!e&&!o&&!(s&&this.multiple)){this.toggleMenu()}}render(){return o(s,{key:"d993b3b157734feec38bd6d29f52e899aca6725b",class:{"has-value":this.selected.length!==0,open:this.open,"has-filter":this.filter!=="","has-filter-persistent":this.open&&this.isSearchPersistent},onClick:t=>this.onClick(t)},o("div",{key:"b470f6d938347231d20233c9dba2ba0c37c4bba5",class:"select-display"},this.display.length>0?o("div",{class:"value",innerHTML:this.display.join(this.displaySeparator)}):this.placeholder),o("div",{key:"6619b4fb7834654b78a11d853f889c21a7debef6",class:"icons",ref:t=>this.iconsElement=t},o("smoothly-icon",{key:"34cbbcba5ca10149a17ab291cdd32c15ca5f91b0",class:"smoothly-invalid",name:"alert-circle",size:"small",tooltip:this.errorMessage}),o("slot",{key:"f56d5e7bf720de1b3ef508bf18315d94695c5523",name:"end"}),this.looks=="border"&&!this.readonly&&o("smoothly-icon",{key:"3298ebc639ce773036bd3ea71cef4452f87dda6c",ref:t=>this.toggleElement=t,size:"tiny",name:this.open?"caret-down-outline":"caret-forward-outline"})),o("slot",{key:"140d8045589573ccfe66870dd8199f22c9027ccd",name:"label"}),o("div",{key:"6baa982ed55e072d8f96f201adb81e9bdf3b9175",class:"dropdown",ref:t=>this.dropdownElement=t},o("div",{key:"175cf9f37cc561aedc84582116e276b0a37f40df",class:"search"},o("smoothly-icon",{key:"c7692ee449bd43232da25d8246fc847576b7f699",name:"search-outline",size:"small"}),o("input",{key:"1b9a5a4f2994c7d4b0253720688977f75381aede",class:"search-input",placeholder:this.searchPlaceholder,ref:t=>this.searchElement=t,disabled:this.searchDisabled,onKeyDown:t=>this.onKeyDown(t),onInput:t=>{var e,o;return t.stopPropagation(),this.setFilter((o=(e=this.searchElement)===null||e===void 0?void 0:e.value)!==null&&o!==void 0?o:"")},onPaste:t=>{var e,o;return t.stopPropagation(),this.setFilter((o=(e=this.searchElement)===null||e===void 0?void 0:e.value)!==null&&o!==void 0?o:"")}}),o("smoothly-icon",{key:"1eb858f2d3c816ca1a2bbb977cdaf651e7e032b5",name:"backspace-outline",size:"small",onClick:()=>{var t;this.resetFilter();(t=this.searchElement)===null||t===void 0?void 0:t.focus()}}),this.mutable&&o("smoothly-icon",{key:"944ef1566bbf77345110acb315ae1e616f34d131",name:"add",size:"small",onClick:()=>this.addItem()})),o("div",{key:"416bb93ddf7b6a0e01b68892689152b8c637efaf",class:"menu",hidden:!this.open},o("slot",{key:"10be175c314a23c040a4426553db4f3d8004749d"}),this.addedItems)))}get element(){return a(this)}static get watchers(){return{name:[{nameChange:0}],selected:[{onSelectedChange:0}],required:[{onRequiredChange:0}],filter:[{onFilterChange:0}],disabled:[{watchingReadonly:0}],readonly:[{watchingReadonly:0}],open:[{onClosed:0}]}}};Ta.style=Ia();const Da=()=>`[color=default].sc-smoothly-input-submit{--smoothly-color:var(--smoothly-default-color);--smoothly-color-contrast:var(--smoothly-default-contrast);--smoothly-color-shade:var(--smoothly-default-shade);--smoothly-color-tint:var(--smoothly-default-tint)}[color=primary].sc-smoothly-input-submit{--smoothly-color:var(--smoothly-primary-color);--smoothly-color-contrast:var(--smoothly-primary-contrast);--smoothly-color-shade:var(--smoothly-primary-shade);--smoothly-color-tint:var(--smoothly-primary-tint)}[color=secondary].sc-smoothly-input-submit{--smoothly-color:var(--smoothly-secondary-color);--smoothly-color-contrast:var(--smoothly-secondary-contrast);--smoothly-color-shade:var(--smoothly-secondary-shade);--smoothly-color-tint:var(--smoothly-secondary-tint)}[color=tertiary].sc-smoothly-input-submit{--smoothly-color:var(--smoothly-tertiary-color);--smoothly-color-contrast:var(--smoothly-tertiary-contrast);--smoothly-color-shade:var(--smoothly-tertiary-shade);--smoothly-color-tint:var(--smoothly-tertiary-tint)}[color=success].sc-smoothly-input-submit{--smoothly-color:var(--smoothly-success-color);--smoothly-color-contrast:var(--smoothly-success-contrast);--smoothly-color-shade:var(--smoothly-success-shade);--smoothly-color-tint:var(--smoothly-success-tint)}[color=warning].sc-smoothly-input-submit{--smoothly-color:var(--smoothly-warning-color);--smoothly-color-contrast:var(--smoothly-warning-contrast);--smoothly-color-shade:var(--smoothly-warning-shade);--smoothly-color-tint:var(--smoothly-warning-tint)}[color=danger].sc-smoothly-input-submit{--smoothly-color:var(--smoothly-danger-color);--smoothly-color-contrast:var(--smoothly-danger-contrast);--smoothly-color-shade:var(--smoothly-danger-shade);--smoothly-color-tint:var(--smoothly-danger-tint)}[color=light].sc-smoothly-input-submit{--smoothly-color:var(--smoothly-light-color);--smoothly-color-contrast:var(--smoothly-light-contrast);--smoothly-color-shade:var(--smoothly-light-shade);--smoothly-color-tint:var(--smoothly-light-tint)}[color=medium].sc-smoothly-input-submit{--smoothly-color:var(--smoothly-medium-color);--smoothly-color-contrast:var(--smoothly-medium-contrast);--smoothly-color-shade:var(--smoothly-medium-shade);--smoothly-color-tint:var(--smoothly-medium-tint)}[color=dark].sc-smoothly-input-submit{--smoothly-color:var(--smoothly-dark-color);--smoothly-color-contrast:var(--smoothly-dark-contrast);--smoothly-color-shade:var(--smoothly-dark-shade);--smoothly-color-tint:var(--smoothly-dark-tint)}.sc-smoothly-input-submit-h{--smoothly-button-border-radius:0.5rem;display:inline-flex;box-sizing:border-box;border-radius:var(--smoothly-button-border-radius);font-size:var(--smoothly-button-font-size, 1rem);cursor:pointer;border:none;outline:none;position:relative}[shape=rounded].sc-smoothly-input-submit-h{--smoothly-button-border-radius:2rem}[type=link].sc-smoothly-input-submit-h{display:inline}[disabled].sc-smoothly-input-submit-h{opacity:0.5}.sc-smoothly-input-submit-h>a.sc-smoothly-input-submit{font-weight:400;background-color:transparent}.sc-smoothly-input-submit-h>a.sc-smoothly-input-submit,.sc-smoothly-input-submit-h>button.sc-smoothly-input-submit{font-size:var(--smoothly-button-font-size);border:1px solid transparent;outline:none;cursor:pointer;display:inline-flex;gap:0.5rem;box-sizing:border-box}.sc-smoothly-input-submit-h>button.sc-smoothly-input-submit{font-weight:bold;justify-content:center;width:100%;align-items:center;border-radius:var(--smoothly-button-border-radius);padding-inline:var(--smoothly-button-padding-inline, 1rem)}.sc-smoothly-input-submit-h{min-height:var(--smoothly-button-height, 2.5rem)}.sc-smoothly-input-submit-h:has(>a:empty),.sc-smoothly-input-submit-h:has(>button:empty),.sc-smoothly-input-submit-h>a.sc-smoothly-input-submit:empty,.sc-smoothly-input-submit-h>button.sc-smoothly-input-submit:empty{border-width:0;min-height:0;padding-inline:0}[size=small].sc-smoothly-input-submit-h{--smoothly-button-height:2rem;--smoothly-button-padding-inline:0.75rem;--smoothly-button-font-size:0.875rem;--smoothly-icon-size:1.4rem}[size=large].sc-smoothly-input-submit-h{--smoothly-button-height:3rem;--smoothly-button-padding-inline:1.25rem;--smoothly-button-font-size:1.125rem}.sc-smoothly-input-submit-h:not([size=icon]):not([size=flexible])>button.sc-smoothly-input-submit{min-width:8rem}[size=icon].sc-smoothly-input-submit-h{--smoothly-icon-size:1.4rem}[size=icon].sc-smoothly-input-submit-h>button.sc-smoothly-input-submit{min-height:var(--smoothly-button-height, 2.5rem);min-width:var(--smoothly-button-height, 2.5rem);padding:0}.sc-smoothly-input-submit-h:not([size=icon]){min-width:8em}[size=flexible].sc-smoothly-input-submit-h{min-width:unset;padding:0;margin:0;display:flex;justify-content:center}[size=flexible].sc-smoothly-input-submit-h>button.sc-smoothly-input-submit{min-width:unset;padding:0;margin:0}[expand].sc-smoothly-input-submit-h{width:100%}[expand=full].sc-smoothly-input-submit-h{border-left:none;border-right:none;--smoothly-button-border-radius:0}[fill=outline].sc-smoothly-input-submit-h>button.sc-smoothly-input-submit{background-color:transparent;color:rgb(var(--smoothly-button-foreground));fill:rgb(var(--smoothly-button-foreground));stroke:rgb(var(--smoothly-button-foreground));border-color:rgb(var(--smoothly-button-foreground))}.sc-smoothly-input-submit-h:not([fill=clear]):not([disabled])>button.sc-smoothly-input-submit:hover,.sc-smoothly-input-submit-h:not([disabled])>button.sc-smoothly-input-submit:focus-visible,[fill=outline].sc-smoothly-input-submit-h:not([disabled]):active>button.sc-smoothly-input-submit::before{border-color:rgb(var(--smoothly-button-focus-color))}[fill=outline].sc-smoothly-input-submit-h:not([disabled])>button.sc-smoothly-input-submit:hover::before,[fill=outline].sc-smoothly-input-submit-h:not([disabled])>button.sc-smoothly-input-submit:focus-within::before,[fill=outline].sc-smoothly-input-submit-h:not([disabled])>button.sc-smoothly-input-submit:active::before{content:"";position:absolute;border:2px solid rgb(var(--smoothly-button-focus-border));inset:-1px;border-radius:var(--smoothly-button-border-radius)}.sc-smoothly-input-submit-h:not([fill=clear]):not([fill=outline]):not([disabled])>button.sc-smoothly-input-submit:hover,.sc-smoothly-input-submit-h:not([fill=clear]):not([fill=outline]):not([disabled])>button.sc-smoothly-input-submit:focus-visible,.sc-smoothly-input-submit-h:not([fill=clear]):not([fill=outline]):not([disabled])>button.sc-smoothly-input-submit:active{background:rgb(var(--smoothly-button-hover-background))}.sc-smoothly-input-submit-h>button.sc-smoothly-input-submit,.sc-smoothly-input-submit-h.sc-smoothly-input-submit-s>smoothly-icon,.sc-smoothly-input-submit-h .sc-smoothly-input-submit-s>smoothly-icon{color:rgb(var(--smoothly-button-foreground));stroke:rgb(var(--smoothly-button-foreground));fill:rgb(var(--smoothly-button-foreground))}[hidden].sc-smoothly-input-submit-h{display:none}.sc-smoothly-input-submit-h{display:flex}.sc-smoothly-input-submit-h:not([display]){display:none}.sc-smoothly-input-submit-h.sc-smoothly-input-submit-s>smoothly-button button>*+smoothly-icon,.sc-smoothly-input-submit-h.sc-smoothly-input-submit-s>smoothly-button-confirm button>*+smoothly-icon{display:none}[disabled].sc-smoothly-input-submit-h{cursor:not-allowed}`;const ja=class{constructor(o){t(this,o);this.smoothlyInputLoad=e(this,"smoothlyInputLoad");this.delete=false;this.icon="checkmark-outline";this.disabled=false;this.display=false;this.size="icon";this.tooltip=this.delete?"Remove":"Submit"}componentWillLoad(){this.smoothlyInputLoad.emit((t=>{if(x.is(t)&&Xo.type.is(t)){this.parent=t;t.listen((async t=>{this.display=!t.readonly}));if(typeof this.disabled!=="boolean"){t.listen((async t=>{var e;this.disabled=!this.delete&&(t.readonly||"validator"in t&&t.validator instanceof l&&!((e=t.validator)===null||e===void 0?void 0:e.is(p.convertArrays(t.value)))||!t.isDifferentFromInitial)}))}}}))}clickHandler(){var t;(t=this.parent)===null||t===void 0?void 0:t.submit(this.delete)}render(){var t,e;return o(s,{key:"f97c4457da695841b39984556b399746d603eb36",title:this.tooltip},this.delete==true?o("smoothly-button-confirm",{size:this.size,shape:this.shape,expand:this.expand,color:(t=this.color)!==null&&t!==void 0?t:"danger",fill:this.fill,onSmoothlyConfirm:()=>this.clickHandler()},o("slot",null),o("smoothly-icon",{name:"trash-outline",fill:"solid",size:"tiny"})):o("smoothly-button",{disabled:this.disabled,size:this.size,type:"button",shape:this.shape,expand:this.expand,color:(e=this.color)!==null&&e!==void 0?e:"success",fill:this.fill,onClick:()=>this.clickHandler()},o("slot",null),this.icon&&o("smoothly-icon",{name:this.icon,fill:"solid",size:"tiny"})))}};ja.style=Da();const La=()=>`[selected].sc-smoothly-item-h{background-color:rgb(var(--smoothly-item-selected-background));color:rgb(var(--smoothly-item-selected-foreground));border-left:.3em solid rgb(var(--smoothly-item-selected-border))}[disabled].sc-smoothly-item-h,.sc-smoothly-item-h[disabled].sc-smoothly-item-s>*{background-color:rgb(var(--smoothly-item-disabled-background));color:rgb(var(--smoothly-item-disabled-foreground));opacity:var(--smoothly-item-disabled-opacity);cursor:not-allowed}.sc-smoothly-item-h:not([hidden]){display:flex;align-items:center;padding:0.5em;cursor:pointer;border-left:.3em solid transparent;color:rgb(var(--smoothly-item-foreground));fill:rgb(var(--smoothly-item-foreground));stroke:rgb(var(--smoothly-item-foreground));box-sizing:border-box;min-height:3rem}.sc-smoothly-item-h.sc-smoothly-item-s>*{color:rgb(var(--smoothly-item-foreground));fill:rgb(var(--smoothly-item-foreground));stroke:rgb(var(--smoothly-item-foreground))}.sc-smoothly-item-h:not([disabled])[marked],.sc-smoothly-item-h:not([disabled]):hover,.sc-smoothly-item-h:not([disabled])[marked].sc-smoothly-item-s>*,.sc-smoothly-item-h:not([disabled]):hover.sc-smoothly-item-s>*{background-color:rgb(var(--smoothly-item-hover-background));color:rgb(var(--smoothly-item-hover-foreground));fill:rgb(var(--smoothly-item-hover-foreground));stroke:rgb(var(--smoothly-item-hover-foreground))}`;const Ra=class{constructor(o){t(this,o);this.smoothlyItemSelect=e(this,"smoothlyItemSelect");this.smoothlyInputLoad=e(this,"smoothlyInputLoad");this.smoothlyItemDOMChange=e(this,"smoothlyItemDOMChange");this.userInitiated=false;this.selected=false;this.disabled=false;this.deselectable=true}clickHandler(){if(!this.disabled&&(!this.selected||this.deselectable)){this.userInitiated=true;this.selected=!this.selected}}selectedWatcher(){this.smoothlyItemSelect.emit({userInitiated:this.userInitiated,item:this.element});this.userInitiated=false}componentWillLoad(){this.smoothlyInputLoad.emit((()=>{}))}componentDidLoad(){this.mutationObserver=new MutationObserver((()=>this.smoothlyItemDOMChange.emit()));this.mutationObserver.observe(this.element,{childList:true,subtree:true,characterData:true});if(this.selected&&!this.disabled){this.smoothlyItemSelect.emit({userInitiated:false,item:this.element})}}async filter(t){var e;const o=typeof this.value==="string"?this.value:JSON.stringify((e=this.value)!==null&&e!==void 0?e:"");this.element.hidden=t?!(o.includes(t)||this.element.innerText.toLowerCase().includes(t)):false}render(){return o(s,{key:"c5146bc88a4b9c1b1f62f61f00031cb5a5696cc4",tabIndex:-1},o("slot",{key:"4193764aac8e58e2922c250c8f9d648205ae3510"}))}get element(){return a(this)}static get watchers(){return{selected:[{selectedWatcher:0}]}}};Ra.style=La();const _a=()=>`.sc-smoothly-label-h{position:relative;width:max-content;display:flex;justify-content:center;align-items:center;padding:0.15em 0.6em;border-radius:2em;color:rgb(var(--smoothly-default-contrast));background-color:hsl(var(--hue), 85%, 70%)}[shape=rectangle].sc-smoothly-label-h{border-radius:0.3em}`;const Aa=class{constructor(e){t(this,e)}render(){var t;return o(s,{key:"20e6de7cb0e9feec21743e338f7c8c0a5b99efe2",title:this.description,style:{"--hue":(t=this.hue)===null||t===void 0?void 0:t.toString()}},o("slot",{key:"d0f7b0af42f7b6e48d960b972b73422d54e557e2"}))}};Aa.style=_a();const $a=()=>`.sc-smoothly-lazy-h{display:block}`;const Ma=class{constructor(e){t(this,e);this.show=false}loadMoreHandler(t){t.stopPropagation();this.show=true}render(){return o(s,{key:"906ca97b847fc15eb317b18a14c89736b05171a8"},o("slot",{key:"124f5b9a92582b1b396ac9d32d9cb62be98437dd",name:"before"}),o("smoothly-load-more",{key:"773685e7c085099f02ed2be90b3e7770799a2b28",onSmoothlyLoadMore:t=>this.loadMoreHandler(t)}),this.show&&(typeof this.content=="function"?o(this.content,null):this.content),o("slot",{key:"3b852c53060b7ca6355fd15ac34ce03f30f20fe4"}))}};Ma.style=$a();const Ea=class{constructor(o){t(this,o);this.smoothlyLoadMore=e(this,"smoothlyLoadMore");this.triggerMode="intersection";this.name="";this.multiple=false}checkInView(){if(this.inView){this.smoothlyLoadMore.emit(this.name)}}connectedCallback(){var t;this.observer=new IntersectionObserver(((t,e)=>this.observationHandler(e,t)));this.observer.observe(this.element);if(this.triggerMode=="scroll"){this.inView&&this.smoothlyLoadMore.emit(this.name);if(this.multiple||!this.multiple&&!this.inView){this.scrollableParent=n.findParent(this.element);(t=this.scrollableParent)===null||t===void 0?void 0:t.addEventListener("scroll",this.checkInView.bind(this),{once:!this.multiple})}}}disconnectedCallback(){var t;(t=this.scrollableParent)===null||t===void 0?void 0:t.removeEventListener("scroll",this.checkInView.bind(this));this.observer.disconnect()}observationHandler(t,e){var o,s;this.inView=((s=(o=e.find((t=>t.target==this.element)))===null||o===void 0?void 0:o.intersectionRatio)!==null&&s!==void 0?s:0)>0;if(this.inView){this.smoothlyLoadMore.emit(this.name);!this.multiple&&(t.unobserve(this.element),t.disconnect())}}render(){return o(s,{key:"bb19876d56183b2cb5350f775e0072cced3152ef"})}get element(){return a(this)}};const Oa=()=>`.sc-smoothly-modal-h{position:fixed;display:flex;justify-content:center;top:0;left:0;width:100%;height:100%;background-color:rgba(var(--smoothly-modal-backdrop));color:rgb(var(--smoothly-modal-foreground));z-index:20}.sc-smoothly-modal-h:not([open]),[hidden].sc-smoothly-modal-h{display:none}[align=center].sc-smoothly-modal-h{align-items:center}[align=top].sc-smoothly-modal-h>div.modal.sc-smoothly-modal{margin-top:calc((100dvh - var(--smoothly-modal-max-height)) / 2)}.sc-smoothly-modal-h>div.modal.sc-smoothly-modal{display:flex;flex-direction:column;padding:2rem;gap:1.5rem;width:var(--smoothly-modal-width, 40rem);max-width:calc(100dvw - 1rem);height:fit-content;max-height:min(var(--smoothly-modal-max-height), 100dvh);background:rgb(var(--smoothly-modal-background, var(--smoothly-color)));border:1px solid rgb(var(--smoothly-modal-border));border-radius:var(--smoothly-modal-border-radius);box-shadow:var(--smoothly-modal-shadow);box-sizing:border-box}.sc-smoothly-modal-h>div.modal.sc-smoothly-modal>div.header.sc-smoothly-modal:empty,.sc-smoothly-modal-h>div.modal.sc-smoothly-modal>div.actions.sc-smoothly-modal:empty{display:none}.sc-smoothly-modal-h>div.modal.sc-smoothly-modal>div.header.sc-smoothly-modal{display:flex;justify-content:space-between;align-items:center}.sc-smoothly-modal-h>div.modal.sc-smoothly-modal>*.sc-smoothly-modal,.sc-smoothly-modal-h>div.modal.sc-smoothly-modal>div.header.sc-smoothly-modal>*.sc-smoothly-modal{margin-block:0}.sc-smoothly-modal-h>div.modal.sc-smoothly-modal>*.sc-smoothly-modal:not(.header):not(.actions){overflow-y:auto}.sc-smoothly-modal-h>div.modal>div.header:not(:has([slot="header"])){justify-content:end}.sc-smoothly-modal-h>div.modal.sc-smoothly-modal>div.header.sc-smoothly-modal>smoothly-icon.sc-smoothly-modal:not([slot="header"]){cursor:pointer;opacity:0.7;color:rgb(var(--smoothly-default-contrast))}.sc-smoothly-modal-h>div.modal.sc-smoothly-modal>div.header.sc-smoothly-modal>smoothly-icon.sc-smoothly-modal:not([slot="header"]):hover{opacity:1}.sc-smoothly-modal-h>div.modal.sc-smoothly-modal>div.actions.sc-smoothly-modal{display:flex;justify-content:center;align-items:center;gap:1rem;flex-wrap:wrap}`;const Pa=class{constructor(o){t(this,o);this.smoothlyModalChange=e(this,"smoothlyModalChange");this.open=false;this.closable=false;this.align="center"}openChanged(){this.smoothlyModalChange.emit(this.open)}async closeModal(){this.open=false}async openModal(){this.open=true}render(){return o(s,{key:"2d4d99ee6e4abfb35ac797df0b23a5021e7f005d",role:"alertdialog",onClick:t=>{this.closable&&!t.composedPath().some((t=>{var e;return(e=t.classList)===null||e===void 0?void 0:e.contains("modal")}))&&this.closeModal()}},o("div",{key:"3bf2318cf763ecd5374fcc2038b9eed817348783",class:"modal"},o("div",{key:"111d3c15f0b59d840936dad804c5802447584c5b",class:"header"},o("slot",{key:"806558a7918a07f205d40cb47d50d5204c7de251",name:"header"}),this.closable&&o("smoothly-icon",{key:"d5f7711fe4b558018bc69ceb49d909b4f9f52b1b",name:"close-outline",fill:"solid",onClick:()=>this.closeModal()})),o("slot",{key:"2e3e96839359404f885e8003a6541e1b012dd6ea"}),o("div",{key:"6afa87e4c5f621a1f71de288b0a8b73fb07db73c",class:"actions"},o("slot",{key:"7a38d753f855f76da81b97e88aa08300056947e6",name:"actions"}))))}static get watchers(){return{open:[{openChanged:0}]}}};Pa.style=Oa();const Ha=()=>`.sc-smoothly-notification-h{display:block;position:relative;min-width:min(calc(100% - 1rem), 30rem);min-height:3rem;border-radius:5px;margin:0.5rem}.sc-smoothly-notification-h>span.icon.sc-smoothly-notification>smoothly-icon.sc-smoothly-notification,.sc-smoothly-notification-h>span.clean.sc-smoothly-notification{display:flex;justify-content:center;align-self:center}.sc-smoothly-notification-h>span.sc-smoothly-notification{margin-inline:1rem 2rem}.sc-smoothly-notification-h>span.icon.sc-smoothly-notification{display:flex;width:100%;justify-content:center}.sc-smoothly-notification-h>span.icon.sc-smoothly-notification>p.sc-smoothly-notification{padding-right:1em}.sc-smoothly-notification-h>span.sc-smoothly-notification>p.sc-smoothly-notification{text-align:left}[hidden].sc-smoothly-notification-h{display:none}.sc-smoothly-notification-h>span.icon.sc-smoothly-notification>smoothly-icon.sc-smoothly-notification{margin:0 0.5rem}.sc-smoothly-notification-h>smoothly-trigger.sc-smoothly-notification{--smoothly-icon-size:1.6rem;position:absolute;right:0}`;const Fa=class{constructor(o){t(this,o);this.remove=e(this,"remove");this.closable=true;this.tick={};this.listener=t=>{if(t.state=="closed"){this.remove.emit(t)}else{this.tick={}}}}get properties(){let t;switch(this.notice.state){case"delayed":case"warning":t=["warning","warning-outline"];break;case"success":t=["success","checkmark-circle"];break;case"executing":t=["light","hourglass-outline"];break;case"failed":t=["danger","alert-circle"];break;default:t=["light",undefined];break}return t}onTrigger(t){if(t.detail.name=="close"){t.stopPropagation();this.notice.close()}}onUpdatedNotice(t,e){if(e){e.unlisten(this.listener)}t.listen(this.listener)}componentDidLoad(){this.onUpdatedNotice(this.notice)}render(){return o(s,{key:"e2385684cbe97b13c8015dd0a991bb202ca2683c",color:this.properties[0],fill:"solid"},this.closable&&o("smoothly-trigger",{key:"fff9263c900dd2e8b572288371994572ec12229b",fill:"clear",name:"close"},o("smoothly-icon",{key:"2d090ca0063ea0c8decbfaea13fb4839cc790ddf",name:"close-circle-outline"})),o("span",{key:"3b0c67031c982f1bfa3d34a42c674e9eb3500fe2",class:this.icon?"icon":"clean"},this.icon&&o("smoothly-icon",{key:"f8e0c9c2174f56662f44a04b5d83c7b59d5000fc",name:this.properties[1]}),o("p",{key:"4d7abf1d375b3b81e0af90ac5fe9dc72d234f770"},this.notice.message)))}static get watchers(){return{notice:[{onUpdatedNotice:0}]}}};Fa.style=Ha();const Ua=()=>`.sc-smoothly-notifier-h{display:block}[hidden].sc-smoothly-notifier-h{display:none}.sc-smoothly-notifier-h>.smoothly-notifier-wrapper.sc-smoothly-notifier{pointer-events:none;display:flex;flex-wrap:wrap-reverse;align-content:stretch;position:fixed;bottom:3rem;left:0;text-align:center;z-index:100}.sc-smoothly-notifier-h>.smoothly-notifier-wrapper.sc-smoothly-notifier>smoothly-notification.sc-smoothly-notifier{pointer-events:all}`;const Na=class{constructor(e){t(this,e);this.icon=false;this.notices=[]}onNotice(t){this.notices=[...this.notices,t.detail]}onRemove(t){this.notices=[...this.notices.filter((e=>e!=t.detail))]}render(){return o(s,{key:"cedcdf563610fc4108e41f179352239a8f8707b4"},o("slot",{key:"21fd4ba39cfa657c771723be6bfdd258b72c205b"}),o("div",{key:"cf6f577a4a2e78c1358d40fb4e4bc50d832670c8",class:"smoothly-notifier-wrapper"},this.notices.map((t=>o("smoothly-notification",{notice:t,icon:this.icon})))))}};Na.style=Ua();const Ya=class{constructor(o){t(this,o);this.notice=e(this,"notice")}task(t,e=2e3){return()=>new Promise((o=>window.setTimeout((()=>o(t?[true,"Task completed."]:[false,"Task failed."])),e)))}render(){return o("main",{key:"89bcaad40b076b4a8c1cfe2c216d2b20527f393a"},o("fieldset",{key:"73bab8643afbb9ef097a9ccc5a792898ebdce19d"},o("h2",{key:"6849f90ff51a964722cc4feedd848cfa12e7c65e"},"Immediate"),o("p",{key:"eb8f61c5e649843efe412a34741a98de1c0e64e3"},"Fires right away and closes after the default 15 seconds."),o("smoothly-button",{key:"538cb741614f0ab44ece81b12398ef68c3710b17",color:"success",fill:"solid",onClick:()=>this.notice.emit(S.succeeded("Payment processed successfully."))},"Success"),o("smoothly-button",{key:"eebe0c36038ab1a5ce7637ceda4a25526e735043",color:"danger",fill:"solid",onClick:()=>this.notice.emit(S.failed("Payment could not be processed."))},"Failed"),o("smoothly-button",{key:"7df609d43e4ef4bee60506555155c1e41e4b847a",color:"warning",fill:"solid",onClick:()=>this.notice.emit(S.warn("Balance is running low."))},"Warning")),o("fieldset",{key:"280afc55d056e96ab0ed3bfc8cba5646aefdd3ee"},o("h2",{key:"f51f8d45dd8d4f3a8798b79f9b30d1576ad80da4"},"Task"),o("p",{key:"c0158f4afc81179bc0ea8b4bb3df8e14d9f4435a"},"Shows an executing spinner while the task runs, then transitions to success or failure."),o("smoothly-button",{key:"4cc217d8c98ed6905217332c985b7350089c0bef",color:"success",fill:"outline",onClick:()=>this.notice.emit(S.execute("Processing payment…",this.task(true)))},"Execute (succeeds after 2s)"),o("smoothly-button",{key:"e9f7ce24d96a4780a3bcf551ae00787c18bc473e",color:"danger",fill:"outline",onClick:()=>this.notice.emit(S.execute("Processing payment…",this.task(false)))},"Execute (fails after 2s)"),o("smoothly-button",{key:"e2a25f963bc54afd22aff374d921d63387484285",color:"medium",fill:"solid",onClick:()=>this.notice.emit(S.delay("Payment scheduled…",this.task(true)))},"Delay (waits 5s, then executes)")),o("fieldset",{key:"2d818587234f716e6c8faa27f48dd4af276efb42"},o("h2",{key:"4c959f5b6c8cc5ff7a9d387ee69258851d6b527a"},"Custom lifetime"),o("p",{key:"1cc81b1b109dde48d2249b55bcc6e10ad3563805"},"Controls how long the notice stays visible after resolving."),o("smoothly-button",{key:"3ddc8d92b022fe9036a24f22e98afb189df18eb4",color:"success",fill:"solid",onClick:()=>this.notice.emit(S.succeeded("Gone in 3 seconds.",3e3))},"Success (3s)"),o("smoothly-button",{key:"4fed4a77c132e2288df49d0ef7d9d2c7a05dc197",color:"warning",fill:"solid",onClick:()=>this.notice.emit(S.warn("Sticks around for 30 seconds.",3e4))},"Warning (30s)")))}};const Wa=()=>`[hidden].sc-smoothly-spinner-h{display:none}.sc-smoothly-spinner-h{cursor:wait;--spinner-time:1.4s;--spinner-color:var(--smoothly-color-contrast);--spinner-background:var(--smoothly-color);--spinner-background-opacity:var(--smoothly-semitransparent, 0.8);display:block;stroke:rgb(var(--spinner-color));background-color:rgba(var(--spinner-background), var(--spinner-background-opacity))}.sc-smoothly-spinner-h:not([overlay]){width:var(--spinner-size);height:var(--spinner-size)}[overlay].sc-smoothly-spinner-h{position:absolute;inset:0;width:100%;height:100%;z-index:4;background-color:rgba(var(--spinner-background), var(--spinner-background-opacity))}[color].sc-smoothly-spinner-h:not([overlay]),[color][overlay].sc-smoothly-spinner-h{background-color:rgba(var(--spinner-background), var(--spinner-background-opacity));stroke:rgb(var(--spinner-color))}[overlay].sc-smoothly-spinner-h>svg.sc-smoothly-spinner{position:absolute;width:var(--spinner-size);left:calc(50% - var(--spinner-size) / 2);top:calc(50% - var(--spinner-size) / 2)}.sc-smoothly-spinner-h>svg.sc-smoothly-spinner{animation:SPIN-SVG var(--spinner-time) linear infinite}.sc-smoothly-spinner-h>svg.sc-smoothly-spinner>circle.sc-smoothly-spinner{transform-origin:center;animation:SPIN-CIRCLE var(--spinner-time) ease-in-out infinite;stroke-dasharray:187;stroke-dashoffset:0}@keyframes SPIN-SVG{0%{transform:rotate(0deg)}100%{transform:rotate(270deg)}}@keyframes SPIN-CIRCLE{0%{stroke-dashoffset:187}50%{stroke-dashoffset:46.75;transform:rotate(135deg)}100%{stroke-dashoffset:187;transform:rotate(450deg)}}`;const Ba=class{constructor(e){t(this,e);this.size="large"}render(){const t=this.size=="large"?6:this.size=="medium"?8:this.size=="icon"?8:12;return o(s,{key:"dda320c04e0b5f513b01e4ef44a4d9008c0b8fe4",style:{"--spinner-size":this.size=="large"?"5em":this.size=="medium"?"3em":this.size=="icon"?"1.8em":"1.2em"}},o("svg",{key:"2edf8c5b50ee649ab78744b1d495af848bc43b10",class:"spinner",viewBox:`0 0 ${60+t} ${60+t}`,xmlns:"http://www.w3.org/2000/svg"},o("circle",{key:"443e16c5103e59c4089f8e41e8755653d1c8b5ec",class:"path",fill:"none","stroke-width":t,"stroke-linecap":"round",cx:`${30+t/2}`,cy:`${30+t/2}`,r:"30"})))}};Ba.style=Wa();const Va=()=>`.sc-smoothly-summary-h{display:block}.sc-smoothly-summary-h>details.sc-smoothly-summary>summary.sc-smoothly-summary{display:flex;column-gap:0.25rem;width:fit-content;list-style:none;align-items:center;cursor:pointer}.sc-smoothly-summary-h>details.sc-smoothly-summary>summary.sc-smoothly-summary>smoothly-icon.sc-smoothly-summary{transition:transform 0.2s, opacity 0.1s;opacity:0.3}.sc-smoothly-summary-h>details.sc-smoothly-summary>summary.sc-smoothly-summary:hover>smoothly-icon.sc-smoothly-summary{opacity:1}.sc-smoothly-summary-h>details[open].sc-smoothly-summary>summary.sc-smoothly-summary>smoothly-icon.sc-smoothly-summary{transform:rotate(90deg)}.sc-smoothly-summary-h>details.sc-smoothly-summary-s>[slot=content]{margin-left:var(--smoothly-summary-content-indent, 1.5rem)}@media (prefers-reduced-motion){.sc-smoothly-summary-h>details.sc-smoothly-summary>summary.sc-smoothly-summary>smoothly-icon.sc-smoothly-summary{transition:none}}`;const Ga=class{constructor(o){t(this,o);this.smoothlySummaryOpen=e(this,"smoothlySummaryOpen");this.open=false}async toggleHandler(t){if(t.target instanceof HTMLDetailsElement){this.open=t.target.open;this.smoothlySummaryOpen.emit(this.open)}}render(){return o("details",{key:"288fb538d03bbfd1a71b2943b291093219ae2dec",onToggle:t=>this.toggleHandler(t),open:this.open},o("summary",{key:"50421f335a303578bbb761b59cff85c952bd51ed"},o("smoothly-icon",{key:"988c093ab1e4fcd4af0e755827091cc85e6d5087",name:"caret-forward",fill:"solid",size:"tiny"}),o("slot",{key:"a3bf5f55b4f950ef6e6b97a008fe1b99effbe498",name:"summary"})),o("slot",{key:"8d80364b8acfb634e7e687b972e339cd2141526e",name:"content"}))}};Ga.style=Va();const Ka=()=>`.sc-smoothly-tab-h{display:contents;--smoothly-tab-line-width:2px;--smoothly-tab-line-width-active:5px}.sc-smoothly-tab-h>div.sc-smoothly-tab:first-child{grid-column:span 1;background-color:transparent;border-bottom-color:rgb(var(--smoothly-default-shade));border-bottom-width:var(--smoothly-tab-line-width);border-bottom-style:solid}[disabled].sc-smoothly-tab-h>div.sc-smoothly-tab:first-child{color:rgba(var(--smoothly-default-contrast), 0.6)}[disabled].sc-smoothly-tab-h>div.sc-smoothly-tab:first-child>label.sc-smoothly-tab{cursor:not-allowed}.sc-smoothly-tab-h>div.sc-smoothly-tab:first-child>label.sc-smoothly-tab{display:flex;justify-content:center;padding:0.5rem 1rem;width:fit-content;border-radius:0.5rem 0.5rem 0 0;margin:auto;cursor:pointer;position:relative}.sc-smoothly-tab-h:not([disabled])>div.sc-smoothly-tab:first-child>label.sc-smoothly-tab:hover{background-color:rgb(var(--smoothly-tab-hover-background, var(--smoothly-default-shade)))}[open].sc-smoothly-tab-h>div.sc-smoothly-tab:first-child>label.sc-smoothly-tab{font-weight:bold}[open].sc-smoothly-tab-h>div.sc-smoothly-tab:first-child>label.sc-smoothly-tab::before{content:'';position:absolute;height:var(--smoothly-tab-line-width-active);background-color:rgb(var(--smoothly-tab-active-line, var(--smoothly-primary-color)));inset-inline:0;bottom:calc(-1 * var(--smoothly-tab-line-width))}.sc-smoothly-tab-h>div.sc-smoothly-tab:first-child>label[data-smoothly-tooltip].sc-smoothly-tab:hover::after{content:attr(data-smoothly-tooltip);font-size:0.9rem;position:absolute;top:calc(100% + 0.25rem);padding:0.5rem 0.75rem;border-radius:0.5rem;background-color:rgb(var(--smoothly-medium-color));color:rgb(var(--smoothly-medium-contrast));white-space:nowrap;z-index:1}.sc-smoothly-tab-h>div.sc-smoothly-tab:nth-child(2){grid-row:2 / 3;grid-column:1 / -1}`;const qa=class{constructor(o){t(this,o);this.smoothlyTabOpen=e(this,"smoothlyTabOpen");this.smoothlyTabLoad=e(this,"smoothlyTabLoad");this.inputs={}}async openHandler(){if(this.open){this.smoothlyTabOpen.emit(this.name)}this.open?await Promise.all(Object.values(this.inputs).map((t=>t.register()))):await Promise.all(Object.values(this.inputs).map((t=>t.unregister())))}connectedCallback(){this.smoothlyTabLoad.emit((t=>{var e;(e=this.smoothlyTabs)===null||e===void 0?void 0:e.removeTab(this.element);this.smoothlyTabs=t}))}disconnectedCallback(){var t;(t=this.smoothlyTabs)===null||t===void 0?void 0:t.removeTab(this.element)}async componentDidLoad(){await this.openHandler()}onInputLoad(t){if(ts.Element.is(t.target)){this.inputs[t.target.name]=t.target;if(!this.open){t.stopPropagation()}}}render(){return o(s,{key:"a93d651d7e086f30a2f7cd86855005d028591a36"},o("div",{key:"e6fc9b8cac4479fdb717437fe27ed212c218bf4f",onClick:()=>!this.disabled&&(this.open=true)},o("label",{key:"a4bb76ef8387eeaa26a9ce359c5b7cba807edbaf","data-smoothly-tooltip":this.tooltip},this.label)),o("div",{key:"5fc87df52118a57aac0c2e7ac4b74364f4b256bc",hidden:!this.open},o("slot",{key:"05b035045f0523f97792127c1f540eea48317c5e"})))}get element(){return a(this)}static get watchers(){return{open:[{openHandler:0}]}}};qa.style=Ka();const Za=()=>`.sc-smoothly-table-h{display:grid;grid-template-columns:repeat(var(--columns), auto);color:rgb(var(--smoothly-table-foreground));stroke:rgb(var(--smoothly-table-foreground));fill:rgb(var(--smoothly-table-foreground))}`;const Ja=class{constructor(e){t(this,e);this.columns=1}smoothlyTableExpandableRowChange(t){t.stopPropagation()}smoothlyTableExpandableCellChange(t){t.stopPropagation()}render(){return o(s,{key:"9f503e8d029a4954a7745e96063590ccd730e69f",style:{"--columns":this.columns.toString()}},o("slot",{key:"74fe191de90d8e99beae5b5a71805337350d6438"}))}};Ja.style=Za();const Xa=()=>`.sc-smoothly-table-body-h{grid-column:1 / -1;display:grid;grid-template-columns:subgrid;color:rgb(var(--smoothly-table-foreground));background-color:rgb(var(--smoothly-table-background))}`;const Qa=class{constructor(e){t(this,e)}render(){return o(s,{key:"ce870c3cb75e3021ae6df094be0beb4e15a4fa96"},o("slot",{key:"c10f9e14bd9f2737ec480b1fe54bbf20f43d76a0"}))}};Qa.style=Xa();const ti=()=>`.sc-smoothly-table-cell-h{grid-column:span var(--smoothly-table-cell-span, 1);display:flex;align-items:center;padding-inline:var(--smoothly-table-cell-padding-inline, 1.1rem);min-height:var(--smoothly-table-cell-min-height, 2.75rem);white-space:nowrap}`;const ei=class{constructor(e){t(this,e);this.span=1}render(){var t;return o(s,{key:"ca07767049aaf36422712f91d7b6fb5c3969ad97",class:"smoothly-table-cell",style:{"--smoothly-table-cell-span":(t=this.span)===null||t===void 0?void 0:t.toString(10)}},o("slot",{key:"bf432616f663835262a56fe03edd8e0798f5bcd0"}))}};ei.style=ti();const oi=()=>`.sc-smoothly-table-demo-h{display:grid;gap:5rem;box-sizing:border-box;max-width:80rem;width:100%;margin:auto;padding:2rem}`;const si=class{constructor(e){t(this,e)}render(){return o(s,{key:"392f756a60ce9696d3751f3acadef93297c3e643"},o("smoothly-table-demo-filler-row",{key:"5661e2020b5c73c204c394b88de0265573092758"}),o("smoothly-table-demo-group",{key:"fe474555113d6507b02d6782184ea01d03a8a662"}),o("smoothly-table-demo-colspan",{key:"2bb99bf815f006ea91ce30c9c7a0d7cba544d002"}),o("smoothly-table-demo-simple",{key:"88c7fc4ac07e640aa0fe70e8bdb6102dcb98c357"}),o("smoothly-table-demo-nested-no-cell",{key:"deed98e8c8e2b7185ffdebf64076553323cb8019"}))}};si.style=oi();const ai=()=>`.sc-smoothly-table-demo-colspan-h{display:block}.sc-smoothly-table-demo-colspan-h smoothly-display.sc-smoothly-table-demo-colspan{display:inline}`;const ii=class{constructor(e){t(this,e)}render(){return o(s,{key:"5bb9813d47d1db3bc22220f37684497c4ca8f2bd"},o("smoothly-table",{key:"6f7b0f991acf1b7f5acf0fb65b5c819ed013cf3d",columns:3},o("smoothly-table-head",{key:"edc99ec7f702e6fe8dd756ed69e565a95dcd472b"},o("smoothly-table-row",{key:"47b2b2fe6cb7f51b442f4c81e9126202b1c7c8c3"},o("smoothly-table-cell",{key:"55f3222178c889b5973f667219da7ae264888015"},"Date"),o("smoothly-table-cell",{key:"b66af5e27fadc4c433d1e770fa42595dad35c91c"},"Skip"),o("smoothly-table-cell",{key:"945ac4f2179e932a19e4af3c5984b438cdf66aaf"},"Total"))),o("smoothly-table-body",{key:"7a78a928b7698a3d4dbb8cc110cba6e092f9d0e1"},o("smoothly-table-row",{key:"2366aafaabb790d4e4f623d3223def5a5157b80b"},o("smoothly-table-cell",{key:"388661156ce57cceeca8dba5cf949c167243664f",span:2},o("smoothly-display",{key:"dc4994f0086d6f95fcf3610caef8c33994285700",type:"date",value:"2024-01-01"})),o("smoothly-table-cell",{key:"34a6c4374ff76e6bfea930b6df6efab6555bf527"},o("smoothly-display",{key:"f077e002fc6e67894af561548a1b640b293efdbe",type:"price",value:120,currency:"EUR"}))),o("smoothly-table-row",{key:"d80a66ab18c26be3cb098c15f8516bd7b7f4f311"},o("smoothly-table-expandable-cell",{key:"c87f637adece3cb7be000f2c79804a4d6cb18493",span:2},o("smoothly-display",{key:"e98b2f42a4f239f0392cc3061afc1a17843b01da",type:"date",value:"2024-01-02"}),o("smoothly-lazy",{key:"cf4208c25aef5035c832fdc56f21af00f067a7d0",slot:"detail",content:o("smoothly-display",{type:"date-time",value:"2024-01-02T13:37:00.000Z"})})),o("smoothly-table-expandable-cell",{key:"3b7e2255b4ce1b0d8c2a135164af48cff025e3f2"},o("smoothly-display",{key:"eb34c6cacb66fa18cf597427513bdaad1a358629",type:"price",value:220,currency:"EUR"}),o("smoothly-lazy",{key:"3e1b1418fa38a7fa4e283386fdace44845c558fa",slot:"detail",content:o("span",null,o("smoothly-display",{type:"price",value:120,currency:"EUR"})," + ",o("smoothly-display",{type:"price",value:100,currency:"EUR"}))}))),o("smoothly-table-row",{key:"031144a69c437d09bc4eba7b155de56acb89e500"},o("smoothly-table-cell",{key:"22d04fcea0eced05eba133bdaa255345a46885b3"},o("smoothly-display",{key:"c039a6c696c335d50bae24058f2f523c0fd22003",type:"date",value:"2024-01-02"})),o("smoothly-table-cell",{key:"7d36890a8f8c7e1516094aed5395995531f315cb"},"Not Skipped"),o("smoothly-table-cell",{key:"f15c8f77ea83e115038b9f822fa1c740b2ca20f1"},o("smoothly-display",{key:"51f9706d24f3187a9c0edeca8b505ec4aa11b0e0",type:"price",value:320,currency:"EUR"}))))))}};ii.style=ai();const li=()=>`.sc-smoothly-table-demo-filler-row-h{display:block}.sc-smoothly-table-demo-filler-row-h>smoothly-display.sc-smoothly-table-demo-filler-row{font-size:2em}.sc-smoothly-table-demo-filler-row-h>*.sc-smoothly-table-demo-filler-row{margin-bottom:2rem}`;const ni=class{constructor(e){t(this,e);this.cats=[]}async componentDidLoad(){window.setTimeout((()=>{this.cats=undefined}),3e3)}render(){return o(s,{key:"09e5d41ab4453db60da3d6882e3a249b5b7e1efb"},o("smoothly-display",{key:"c884544b6be16e6db27aa14fd74c945ff7791739",type:"text",value:"Filler row"}),o("smoothly-table",{key:"fb21fd98abb9f1932d1588759925b51915986778",color:"primary",columns:4},o("smoothly-table-head",{key:"ff1eca4566d2438b7554c3916c15ac09baabb3c8"},o("smoothly-table-row",{key:"2c023e03a6f8f857368fefc3c7556c1c7898cb21"},o("smoothly-table-cell",{key:"02b65f85b79633ed7256bb8b18a77de7d980873e"},"Breed"),o("smoothly-table-cell",{key:"027ef71ae92b3ba437db7985852e20aa216188d8"},"Country"),o("smoothly-table-cell",{key:"864265604fca102d3f9a185b2711679ead048ed6"},"Coat"),o("smoothly-table-cell",{key:"2d3f0309e3e958ede3a6b9ecdbeae97d05c90e36"},"Origin"))),o("smoothly-table-body",{key:"ebc7b803777f720f03fb5e69955ffb427eec75ee"},this.cats===undefined?o("smoothly-table-filler-row",null,"No data to display"):this.cats.length===0?o("smoothly-table-filler-row",null,o("smoothly-spinner",{style:{margin:"auto"},color:"default",size:"small"})):this.cats.map((t=>o("smoothly-table-row",null,o("div",{class:"smoothly-table-cell"},t.breed),o("div",{class:"smoothly-table-cell"},t.country),o("div",{class:"smoothly-table-cell"},t.coat),o("div",{class:"smoothly-table-cell"},t.origin)))))))}};ni.style=li();const ri=()=>`.sc-smoothly-table-demo-group-h{display:block}.sc-smoothly-table-demo-group-h smoothly-display.sc-smoothly-table-demo-group{display:inline}.sc-smoothly-table-demo-group-h fake-cell-wrapper.span-2.sc-smoothly-table-demo-group{grid-column:span 2}.sc-smoothly-table-demo-group-h>smoothly-display.sc-smoothly-table-demo-group{display:inherit;font-size:2em}.sc-smoothly-table-demo-group-h>*.sc-smoothly-table-demo-group{margin-bottom:2rem}.sc-smoothly-table-demo-group-h fake-group-wrapper.sc-smoothly-table-demo-group,.sc-smoothly-table-demo-group-h fake-row-wrapper.sc-smoothly-table-demo-group,.sc-smoothly-table-demo-group-h fake-expandable-row-wrapper.sc-smoothly-table-demo-group{grid-column:1 / -1;display:grid;grid-template-columns:subgrid}.sc-smoothly-table-demo-group-h fake-cell-wrapper.sc-smoothly-table-demo-group{grid-column:span 1;display:block}.sc-smoothly-table-demo-group-h fake-expandable-cell-wrapper.sc-smoothly-table-demo-group{display:contents}`;const ci=class{constructor(e){t(this,e)}render(){return o(s,{key:"1018b8ebc4a2664146c044a5af08cfc403fdba17"},o("smoothly-display",{key:"156fb43c20ee6f8d98d7c4273c5f7c1e7a7f4c63",type:"text",value:"Group"}),o("smoothly-table",{key:"46410eba49dfd918b0f6a0ce851a4d78c0b6d63e",color:"primary",columns:2},o("smoothly-table-head",{key:"9f570364392c2bb62d107ecb63062e55840561d1"},o("smoothly-table-row",{key:"f2a586ccdd1a76adbb402a1e36e9765bf6981921"},o("smoothly-table-cell",{key:"0896f702cd68a9692ab9a184994ea7924a9556ca"},"Date"),o("smoothly-table-cell",{key:"8164db8527d98cb1fb7a37c9967a1d944c309244"},"Total"))),o("smoothly-table-body",{key:"a13835704bdebe92f6cb2d2b472d44324680d8b0"},o("smoothly-table-row-group",{key:"913d221b9123bfee82db1756b2e87b167ca2ba80",align:true},o("smoothly-display",{key:"36c9a42042b968c1bce4ca33625ae7a0fc871ddf",slot:"start",type:"date",value:"2024-01-01"}),o("smoothly-display",{key:"ba53195b503da10700f3b2ba8eef6ed2677069bf",slot:"end",type:"price",currency:"EUR",value:510}),o("smoothly-table-expandable-row",{key:"22cfad4a47876d0e81597809976964824fd2f538"},o("smoothly-table-cell",{key:"2c6f7f4caacb1b0dfc0483e2fcb8dcc15c8d12ca"},o("smoothly-display",{key:"2e7a2aeacff8cbfb32a6c3b22157d6c5e7a3ed1b",type:"date-time",value:"2024-01-01T01:37:00.000Z"})),o("smoothly-table-cell",{key:"11fa98b3074ac97bd4d7692910ee3c5e79e7f5af"},o("smoothly-display",{key:"b34fad882944ad708298d0e6818522a6e77eb7a5",type:"price",currency:"EUR",value:250})),o("smoothly-lazy",{key:"a73076085f4d0d3cf3c6db40229fc6f6827d388e",slot:"detail",content:o(i,null,"Details of 2024-01-01T01:37:00.000Z")})),o("smoothly-table-expandable-row",{key:"d0be11a2e5cefaacfefd46354e1dc7d007b85f11"},o("smoothly-table-cell",{key:"8da6d365e1f1928f0ded7a94e19446748e0658e3"},o("smoothly-display",{key:"1c173affd2e8899159f6afe0d2c67366961cda4b",type:"date-time",value:"2024-01-01T13:37:00.000Z"})),o("smoothly-table-cell",{key:"a2f8076b4b23b2d6e67e92edd925c0447351dcff"},o("smoothly-display",{key:"bb8ae8fdad6c2b2b475635ea4de50571b2ddb1f8",type:"price",currency:"EUR",value:260})),o("smoothly-lazy",{key:"da2b74dfdb241693fd91f7488a55ed3bd2360bd2",slot:"detail",content:o(i,null,"Details of 2024-01-01T13:37:00.000Z")}))),o("smoothly-table-row",{key:"093beb640b56960968b0abb70586c6ba0a063e78"},o("smoothly-table-cell",{key:"077a3742a8533a17486800c74ca7fea44d23e569"},o("smoothly-display",{key:"d5c18744fb9c8f0ed1358579eaf392e474ca3110",type:"date",value:"2024-01-02"})),o("smoothly-table-cell",{key:"52e33f3bdcf4b13f24dfd3249dbb5ad09ef741f4"},o("smoothly-display",{key:"6e15b5560fd4e7a5f6227bd67949953d77d75141",type:"price",currency:"EUR",value:130}))),o("smoothly-table-row-group",{key:"04eb5b29dfd3357a5aacc74014567b0fb3221acf"},o("smoothly-display",{key:"471be92684f0990c0e81cef378ba4c1a04cd7683",slot:"start",type:"date",value:"2024-01-03"}),o("smoothly-display",{key:"c580d72e50702129ea8d498390424932a96bfb05",slot:"end",type:"price",currency:"EUR",value:720}),o("smoothly-table-expandable-row",{key:"e120aa8a654972237d7d3f77e395667f1ed86f5f"},o("smoothly-table-cell",{key:"478b6acdb0ff7933091a67a8b56ef0aeddafff7a"},o("smoothly-display",{key:"8157a143e2f91bcb98c74d1d4b9e21d62cf75876",type:"date-time",value:"2024-01-03T01:37:00.000Z"})),o("smoothly-table-cell",{key:"2cd00ae76248e86b110550daff7523b06b74a661"},o("smoothly-display",{key:"c364434851ebdb9dd4ea1085aca2f32674fbfee7",type:"price",currency:"EUR",value:320})),o("smoothly-lazy",{key:"c7b3d0cb9b5694f50f02472c7bd5c0e5e7ade73a",slot:"detail",content:o(i,null,"Details of 2024-01-03T01:37:00.000Z")})),o("smoothly-table-expandable-row",{key:"cb715e8e09efa27facaafc38bcfe1bab7a8430a9"},o("smoothly-table-cell",{key:"dc7150566ec0a9fbe7f10dbcfbfa04094c1566d8"},o("smoothly-display",{key:"8db703f533d729b467ea53facf1b5714a9d0007c",type:"date-time",value:"2024-01-03T13:37:00.000Z"})),o("smoothly-table-cell",{key:"e69fb07aea49630093e5b50eb21aac0a512b585e"},o("smoothly-display",{key:"511867e910bc46033a86b884e71bf3a86004f3d5",type:"price",currency:"EUR",value:400})),o("smoothly-lazy",{key:"559dcd86bf7e5182b648269bfe7c89efae6d90b8",slot:"detail",content:o(i,null,"Details of 2024-01-03T13:37:00.000Z")}))),o("smoothly-table-row-group",{key:"cd4c7dd32d9ca131cb928bfe966667d5ef015a06"},o("smoothly-display",{key:"93e31cfc7b700f37eb85a537fa0dcdee5341e21f",slot:"start",type:"date",value:"2024-01-04"}),o("smoothly-table-expandable-row",{key:"212c14a6cc880aca7e28fc13c64aec713cc9ad06"},o("smoothly-table-cell",{key:"bea8887113d5e2c478296e83e156b9d841d04d9d"},o("smoothly-display",{key:"833d792a99e598d79e7ead80cce484975271e945",type:"date-time",value:"2024-01-04T01:37:00.000Z"})),o("smoothly-table-cell",{key:"ee079618899cedabfee38e767e1ebb1d6ea0bd72"},o("smoothly-display",{key:"c465529c47972d35e2c88c21063adcdae1be074a",type:"price",currency:"EUR",value:320})),o("smoothly-lazy",{key:"c13bdae5b1e4b93fef96b9663476317175994ca2",slot:"detail",content:o(i,null,"Details of 2024-01-04T01:37:00.000Z")})),o("smoothly-table-expandable-row",{key:"b8997a4f3d02fa1562f294ab8b511d1a6ab1a340"},o("smoothly-table-cell",{key:"98b18cb5d2dfb3148af7693e3b3e3ca9a18528bc"},o("smoothly-display",{key:"13245ba80046868112615d3e23a5c10ddc9917d2",type:"date-time",value:"2024-01-04T13:37:00.000Z"})),o("smoothly-table-cell",{key:"4acdf8682514dfc9588c4396b22d8eff5814e540"},o("smoothly-display",{key:"6a78481d96266171b7a2ab85e06ab278e517030c",type:"price",currency:"EUR",value:400})),o("smoothly-lazy",{key:"d01607c3e985cd163b6d4f3775fdc6b5e07caa22",slot:"detail",content:o(i,null,"Details of 2024-01-04T13:37:00.000Z")}))),o("smoothly-table-row-group",{key:"a27ce4b894f53565450af368abf00c996fd7e9d6"},o("smoothly-display",{key:"6f7039aae41110f2e7fec069b06f4a9b5e7e88af",slot:"end",type:"price",currency:"EUR",value:720}),o("smoothly-table-expandable-row",{key:"8e5061627868199c6ab234d29eb5b929da8e3970"},o("smoothly-table-cell",{key:"b420f93d94c7bf37279ba2ba4237ff24ec6c0845"},o("smoothly-display",{key:"4dc79070171669b9c3148ae20dd510d47c074044",type:"date-time",value:"2024-01-05T01:37:00.000Z"})),o("smoothly-table-cell",{key:"328a16b1224bec0e114456fc6bc907a2f0c7a2fc"},o("smoothly-display",{key:"880d4fe972fe941c5fee0af89ccf08e78889b131",type:"price",currency:"EUR",value:320})),o("smoothly-lazy",{key:"f9f8da2f655820ddc5512b2a00ac98a27d3b4446",slot:"detail",content:o(i,null,"Details of 2024-01-05T01:37:00.000Z")})),o("smoothly-table-expandable-row",{key:"13b28b2d2aa0339a6ef6f268db7f60d38e392c37"},o("smoothly-table-cell",{key:"e0e9375576839c269c8644d147ccad87469f84f2"},o("smoothly-display",{key:"58507417547c2339a6faccc0eacb450e1414c623",type:"date-time",value:"2024-01-05T13:37:00.000Z"})),o("smoothly-table-cell",{key:"14c620d31511aa90005bc84c7cf7aa13e7caafb7"},o("smoothly-display",{key:"c02cd95f8366924583fab7c58aec5130c0dc6ab3",type:"price",currency:"EUR",value:400})),o("smoothly-lazy",{key:"8c4102ba85f39d1b507430a14bedde4c14352b9d",slot:"detail",content:o(i,null,"Details of 2024-01-05T13:37:00.000Z")}))),o("fake-group-wrapper",{key:"1a7ec6cbf9dd25d1e0c347e7f13e7fc84cb13dee"},o("smoothly-table-row-group",{key:"495ec0d7f737041eed5e18f55b23e2d3a56d1e67"},o("smoothly-display",{key:"9388119e19fe3736adf805a0cf416fb97ee04a60",slot:"start",type:"date",value:"2024-01-06"}),o("smoothly-display",{key:"e316e00a41711f65c5fcdc570ec1893df04553f7",slot:"end",type:"price",currency:"EUR",value:720}),o("fake-row-wrapper",{key:"cf6cf7ada6dcacae53aafae3a552133140aef6bc"},o("smoothly-table-row",{key:"ba1c3a41efd637812f00fc55b36bd3ba18e6b7ca"},o("fake-cell-wrapper",{key:"47eb9df3010833125da9f5ec203063b46b5c710b"},o("smoothly-table-cell",{key:"9d4133a5a40bac6293c873272619fa5d5daf02ab"},o("smoothly-display",{key:"435da756815b232b04c3b736f86f5263f1c69a50",type:"date",value:"2024-01-02"}))),o("fake-expandable-cell-wrapper",{key:"5792524b518ac91535c40af3656497412b2fa7d7"},o("smoothly-table-expandable-cell",{key:"e327d41231936a6bb12928d4f43d45ba5bc98232"},o("smoothly-display",{key:"304564a54f555b12d8eb19c138980881287b4cdf",type:"price",currency:"EUR",value:130}),o("smoothly-lazy",{key:"13329c446406e78a91610db0eac2490d2d453993",slot:"detail",content:o("span",null,o("smoothly-display",{type:"price",value:100,currency:"EUR"})," + ",o("smoothly-display",{type:"price",value:30,currency:"EUR"}))}))))),o("fake-expandable-row-wrapper",{key:"6293bf9f19962a2ade3720e10d713c2db4d61cad"},o("smoothly-table-expandable-row",{key:"ae588d0c6d672edcdb5ab27cc74a660cba58fb23"},o("fake-cell-wrapper",{key:"0997b1e181e2806dd2be5d58fd2f2f3a7ead4ee7",class:"span-2"},o("smoothly-table-cell",{key:"812452b5838a90ae400d5a3db91a7c3b741f9025",span:2},o("smoothly-display",{key:"f0df840fafa95e1eda96add4bf4c74e2ba6b0744",type:"date",value:"2024-01-07"}))),o("smoothly-lazy",{key:"3bfc15b9e23290f24162b9c4edacacc5c498072f",slot:"detail",content:o("smoothly-display",{type:"date-time",value:"2024-01-07T13:37:00.000Z"})}))))),o("smoothly-table-row-group",{key:"c5f72a54bd995bb259c40a03f9eff2b7ed4c2e0d"},o("smoothly-display",{key:"160d3fee233c0ba6f2bb47a319a3d3a4c20fbf0c",slot:"start",type:"date",value:"2024-01-08"}),o("smoothly-display",{key:"a051fa82a2c80f0e61efe82ffc9aab1b12fa5b31",slot:"end",type:"price",currency:"EUR",value:720})))))}};ci.style=ri();const hi=[{id:"667d329f9f4934ecdc4bf9eb",balance:1450.03,age:35,eyeColor:"blue",name:"Glenda Ballard",gender:"female",company:"ZENTIA",registered:"2022-06-13T12:39:15.908",friends:[{id:0,name:"Manning Hunter",age:30,balance:1922.25},{id:1,name:"Mcmillan Oliver",age:32,balance:2440.53},{id:2,name:"Graham Garza",age:33,balance:3712.59},{id:3,name:"Gabrielle Neal",age:36,balance:2519.25},{id:4,name:"Dotson Duncan",age:29,balance:3274.11}]},{id:"667d329f4e07097167ef92a2",balance:2488.91,age:21,eyeColor:"blue",name:"Delaney Haley",gender:"male",company:"COMTOURS",registered:"2018-05-11T08:58:36.197",friends:[{id:0,name:"Elsa Cochran",age:28,balance:2009.45},{id:1,name:"Willis Acevedo",age:33,balance:2198.01},{id:2,name:"Slater Fowler",age:34,balance:2888.16},{id:3,name:"Ashley Wilkerson",age:22,balance:1863.65},{id:4,name:"Ola Lynch",age:23,balance:3649.29}]},{id:"667d329f14a0aeea0d70d5e7",balance:1660.91,age:36,eyeColor:"brown",name:"Riddle Reilly",gender:"male",company:"OPTIQUE",registered:"2016-09-15T09:46:07.962",friends:[{id:0,name:"Hazel Steele",age:33,balance:3129.64},{id:1,name:"Golden Chapman",age:40,balance:2491},{id:2,name:"Solomon Lopez",age:26,balance:1382.71},{id:3,name:"Castro Booth",age:23,balance:1991.6},{id:4,name:"Hernandez Bartlett",age:25,balance:2842.85},{id:5,name:"Lindsay Wagner",age:20,balance:3636.6}]},{id:"667d329f953aaaba19bea98b",balance:1381.34,age:24,eyeColor:"brown",name:"Diana Burns",gender:"female",company:"CODACT",registered:"2023-06-02T09:07:46.478",friends:[{id:0,name:"Tamika Merritt",age:25,balance:2401.06},{id:1,name:"Ballard Buckner",age:36,balance:1986.13},{id:2,name:"Stokes Ramirez",age:25,balance:3521.75},{id:3,name:"Wood Aguirre",age:36,balance:1186.13},{id:4,name:"Sophia Bowen",age:25,balance:2750.95},{id:5,name:"Wilkinson Gordon",age:34,balance:3864.91}]},{id:"667d329f6a753976e21e23b5",balance:3054.74,age:22,eyeColor:"brown",name:"Jackson Burnett",gender:"male",company:"COMCUR",registered:"2019-06-05T09:17:31.312",friends:[{id:0,name:"Atkinson Alston",age:37,balance:1025.72},{id:1,name:"Delia Ford",age:34,balance:3061.87},{id:2,name:"Marylou Hanson",age:33,balance:3255.77},{id:3,name:"Kelly Ray",age:32,balance:3671.73},{id:4,name:"Valdez Weeks",age:38,balance:3911.29},{id:5,name:"Hayes Crawford",age:20,balance:3194.97}]},{id:"667d329fc4805cafac37861e",balance:1173.94,age:20,eyeColor:"green",name:"Stephenson Mcleod",gender:"male",company:"POLARAX",registered:"2015-12-10T07:36:10.267",friends:[{id:0,name:"Kristine Newton",age:26,balance:2713.9},{id:1,name:"Craft Patel",age:40,balance:3822.36},{id:2,name:"Cochran French",age:30,balance:1535.91},{id:3,name:"Bowen Vinson",age:29,balance:2787.01},{id:4,name:"Adrian Ewing",age:21,balance:2319.14},{id:5,name:"Jimmie Mathews",age:31,balance:2869.09},{id:6,name:"Dixon Daugherty",age:24,balance:1496.25}]},{id:"667d329f76318162fe27b208",balance:2977.01,age:24,eyeColor:"blue",name:"Claudette Christensen",gender:"female",company:"PIVITOL",registered:"2021-08-08T07:08:00.936",friends:[{id:0,name:"Parker Lamb",age:36,balance:3409.27},{id:1,name:"Kennedy Bryan",age:34,balance:3904.27},{id:2,name:"Johanna Barton",age:20,balance:3613.79},{id:3,name:"Vazquez Melendez",age:26,balance:3692.31},{id:4,name:"Mendoza Wooten",age:31,balance:2175.64},{id:5,name:"Kelli Hicks",age:21,balance:1326.46},{id:6,name:"Jill Sanchez",age:36,balance:3214.36}]},{id:"667d329ff80a953b7f0a73d2",balance:1993.09,age:20,eyeColor:"green",name:"Buckley Gutierrez",gender:"male",company:"HOUSEDOWN",registered:"2015-04-02T04:53:42.985",friends:[{id:0,name:"Leanne Pennington",age:37,balance:3111.48},{id:1,name:"Juarez Hoover",age:29,balance:2000.62},{id:2,name:"Navarro Mccormick",age:22,balance:3083.93},{id:3,name:"Berry Curry",age:31,balance:3181.41},{id:4,name:"Josefa Howard",age:30,balance:3744.56}]},{id:"667d329f4f53eb59f0512361",balance:2374.56,age:34,eyeColor:"brown",name:"Sallie Mccoy",gender:"female",company:"REALYSIS",registered:"2018-05-11T05:26:36.604",friends:[{id:0,name:"Martina Kirby",age:22,balance:1278.07},{id:1,name:"Macias Lyons",age:20,balance:2991.44},{id:2,name:"Alta Chaney",age:26,balance:1032.71},{id:3,name:"White Manning",age:39,balance:3103.16},{id:4,name:"Mason Rosa",age:31,balance:1384.77},{id:5,name:"Meghan Martin",age:27,balance:1982.09}]},{id:"667d329f8a6cf9319bfdbd30",balance:3220.94,age:23,eyeColor:"blue",name:"Huff Hull",gender:"male",company:"GADTRON",registered:"2023-02-14T01:58:56.938",friends:[{id:0,name:"Rochelle Maldonado",age:28,balance:1548.77},{id:1,name:"Diann Conrad",age:32,balance:1721.33},{id:2,name:"Hope Jarvis",age:38,balance:1265.24},{id:3,name:"Dixie Huffman",age:31,balance:3764.23},{id:4,name:"Erickson Porter",age:27,balance:2958.59},{id:5,name:"Christensen Thomas",age:21,balance:1233.2}]},{id:"667d329f1415ecb1efb216cc",balance:2907.83,age:26,eyeColor:"brown",name:"Hancock Eaton",gender:"male",company:"POLARIUM",registered:"2018-02-25T01:03:11.860",friends:[{id:0,name:"Flynn Gilmore",age:27,balance:2582.57},{id:1,name:"Kline Hickman",age:31,balance:3853.99},{id:2,name:"Hatfield Owens",age:40,balance:2016.57},{id:3,name:"Michael Carson",age:31,balance:1293.03},{id:4,name:"Strickland Lowery",age:23,balance:1367.06},{id:5,name:"Georgia Chavez",age:37,balance:2957.48},{id:6,name:"Alma Berry",age:26,balance:2357.01}]},{id:"667d329f722eb89c82b56dec",balance:1602.02,age:35,eyeColor:"brown",name:"Lorrie Mcpherson",gender:"female",company:"PYRAMIA",registered:"2018-12-07T05:18:34.223",friends:[{id:0,name:"Bridgett Everett",age:37,balance:1438.53},{id:1,name:"Carlene Farley",age:25,balance:1410.54},{id:2,name:"Phoebe Mendez",age:24,balance:1979.36},{id:3,name:"Louella Cox",age:36,balance:3430.55},{id:4,name:"Velez Pugh",age:30,balance:3436.5}]},{id:"667d329ff853efe8c4e0a454",balance:2654.19,age:36,eyeColor:"brown",name:"Luann Jennings",gender:"female",company:"NAXDIS",registered:"2014-02-18T04:25:50.302",friends:[{id:0,name:"Walton Gentry",age:26,balance:1328.43},{id:1,name:"Lucy Koch",age:23,balance:2134.54},{id:2,name:"Toni Meyers",age:31,balance:2572.29},{id:3,name:"Vicki Frost",age:39,balance:3299.36},{id:4,name:"Meadows Baker",age:21,balance:2323.75}]},{id:"667d329f84f3bfbfcc763674",balance:2528.48,age:28,eyeColor:"brown",name:"Michelle Carey",gender:"female",company:"IDEGO",registered:"2016-10-01T04:25:07.187",friends:[{id:0,name:"Roman Sanders",age:40,balance:3551.16},{id:1,name:"Amanda Herman",age:22,balance:3928.02},{id:2,name:"Kay Montgomery",age:26,balance:3241.16},{id:3,name:"Valentine Wilder",age:23,balance:1413.31},{id:4,name:"Brigitte Nixon",age:32,balance:3113.39}]},{id:"667d329f4359ec766055a765",balance:3732.65,age:30,eyeColor:"brown",name:"Beach Maddox",gender:"male",company:"GEEKETRON",registered:"2021-03-24T11:55:31.135",friends:[{id:0,name:"Candy Gibbs",age:20,balance:2602.28},{id:1,name:"Alissa Rosario",age:36,balance:1958.84},{id:2,name:"Imelda Harmon",age:23,balance:3817.79},{id:3,name:"Addie Serrano",age:35,balance:3154.77},{id:4,name:"Jordan Shields",age:26,balance:3566.08}]},{id:"667d329f9ef3817d307e2583",balance:2151.52,age:32,eyeColor:"brown",name:"Whitney Hood",gender:"male",company:"EVENTAGE",registered:"2021-06-17T12:11:56.473",friends:[{id:0,name:"Noel Walsh",age:29,balance:2790.49},{id:1,name:"Barlow Rodriquez",age:35,balance:1664.23},{id:2,name:"Nash Keith",age:23,balance:2285.17},{id:3,name:"Chavez Webster",age:23,balance:3381.55},{id:4,name:"Herminia Chen",age:24,balance:1064.96},{id:5,name:"Susana Glass",age:22,balance:2749.35}]},{id:"667d329f9bd581700cac2dbc",balance:2209.77,age:40,eyeColor:"blue",name:"Tasha Mosley",gender:"female",company:"QUIZKA",registered:"2014-05-11T11:44:55.071",friends:[{id:0,name:"Larsen Wall",age:22,balance:1523.28},{id:1,name:"Holmes Hopkins",age:35,balance:1112.68},{id:2,name:"Giles Espinoza",age:21,balance:2550.95},{id:3,name:"Aimee Rosales",age:26,balance:2195.06},{id:4,name:"Karin Little",age:28,balance:2896.23},{id:5,name:"Angelita Mcfadden",age:25,balance:1051.15}]},{id:"667d329f6e2dbb2002be4b9e",balance:3298.23,age:31,eyeColor:"brown",name:"Schneider Walker",gender:"male",company:"BLEENDOT",registered:"2020-02-11T08:57:29.025",friends:[{id:0,name:"Helena William",age:34,balance:2579.69},{id:1,name:"Silva Ware",age:30,balance:2683.79},{id:2,name:"Enid Oconnor",age:22,balance:1816.46},{id:3,name:"Knowles Goff",age:24,balance:1675.75},{id:4,name:"Carolina Greer",age:29,balance:3337.27}]},{id:"667d329f8c548510c5d4f5ce",balance:2823.51,age:35,eyeColor:"green",name:"Mayo Shepard",gender:"male",company:"KIOSK",registered:"2024-02-24T12:45:57.463",friends:[{id:0,name:"Olga Hester",age:21,balance:3878.21},{id:1,name:"Rogers Sampson",age:23,balance:2669.62},{id:2,name:"Myra Johnson",age:27,balance:3489.32},{id:3,name:"Mcfadden Phillips",age:20,balance:2758.8},{id:4,name:"Park Moody",age:23,balance:3519.08}]},{id:"667d329f6574ada6f090fd54",balance:2631.69,age:40,eyeColor:"blue",name:"Avis Carlson",gender:"female",company:"LINGOAGE",registered:"2016-08-08T08:59:54.752",friends:[{id:0,name:"Mcdonald Dyer",age:25,balance:2262.39},{id:1,name:"Irene Baldwin",age:29,balance:1291.1},{id:2,name:"Rollins Anderson",age:26,balance:1437.04},{id:3,name:"Juliana Larson",age:29,balance:3492.22},{id:4,name:"Michele Gardner",age:20,balance:2003.15},{id:5,name:"Vang Cardenas",age:31,balance:1855.52},{id:6,name:"Puckett Hubbard",age:21,balance:1659.92}]}];const di=()=>`.sc-smoothly-table-demo-nested-no-cell-h{display:block}.sc-smoothly-table-demo-nested-no-cell-h>smoothly-display.sc-smoothly-table-demo-nested-no-cell{font-size:2em}.sc-smoothly-table-demo-nested-no-cell-h>*.sc-smoothly-table-demo-nested-no-cell{margin-bottom:2rem}.sc-smoothly-table-demo-nested-no-cell-h smoothly-table-expandable-row.sc-smoothly-table-demo-nested-no-cell{position:relative}`;const mi=class{constructor(e){t(this,e);this.loadedRows=[]}render(){return o(s,{key:"7bc6c5fec454f34a051539d4332a2b95b1524d36"},o("smoothly-display",{key:"d7b4e33850e1ce970844be312a5da0ef8546da81",type:"text",value:"Nested"}),o("smoothly-table",{key:"c395d0d02151ec40836fb44bca00ecefabc82b00",color:"primary",columns:8},o("smoothly-table-head",{key:"b1d21b6350b49470ce3d3745f067cd0dfe15ca4b"},o("smoothly-table-row",{key:"a1744fa8dfd23a4e2b4edfd5be60821d07f9fb8e"},o("div",{key:"eeccc6056ab4d36eb45b654874ae1887e416eb68",class:"smoothly-table-cell"},"Id"),o("div",{key:"d071193d8db7bf78711e829675ff72a7c31d403c",class:"smoothly-table-cell"},"Registered"),o("div",{key:"870b213222d6dceaf338df0d852ad2288a1c366a",class:"smoothly-table-cell"},"Name"),o("div",{key:"4dfbacae8816bcfcfef7090d08ce91851bb02dbc",class:"smoothly-table-cell"},"Age"),o("div",{key:"df7eb4a02fccae0c6492193a867d36be269622b1",class:"smoothly-table-cell"},"Balance"),o("div",{key:"c0e7a4fb74dfaa3feb90c5365e9b5acf55ba94dc",class:"smoothly-table-cell"},"EyeColor"),o("div",{key:"8ee2746419ff0c382e6f64a7b9d4e3b4e608fcb0",class:"smoothly-table-cell"},"Gender"),o("div",{key:"6a1914277b7ab5442b12671b16afaca77038622a",class:"smoothly-table-cell"},"Company"))),o("smoothly-table-body",{key:"746212a9d93a1577dd5c990b4d14894ceb4f137e"},hi.map(((t,e)=>o("smoothly-table-expandable-row",{onSmoothlyTableExpandableRowChange:t=>{if(t.detail){this.loadingIndex=e;setTimeout((()=>{this.loadingIndex=undefined;this.loadedRows=[...this.loadedRows,e]}),1500)}}},this.loadingIndex===e&&o("smoothly-spinner",{overlay:true,size:"small"}),this.loadedRows.includes(e)&&o("smoothly-table-demo-nested-no-cell-inner",{color:"secondary",data:t.friends,slot:"detail"}),o("div",{class:"smoothly-table-cell"},t.id),o("div",{class:"smoothly-table-cell"},t.registered),o("div",{class:"smoothly-table-cell"},t.name),o("div",{class:"smoothly-table-cell"},t.age),o("div",{class:"smoothly-table-cell"},t.balance),o("div",{class:"smoothly-table-cell"},t.eyeColor),o("div",{class:"smoothly-table-cell"},t.gender),o("div",{class:"smoothly-table-cell"},t.company))))),o("smoothly-table-foot",{key:"612581a9f4ea63707d1426c768ba64f7427987bc"},o("smoothly-table-row",{key:"a45f88cab126bd830d3919acc896dd99961bdce2"},o("div",{key:"19f5ea4fb2906eead38c263f5d0ac7e9139977f2",class:"smoothly-table-cell"},"Footer Cell"),o("div",{key:"039288cb2fa1912826a4bbdde3cba4fc953a99cd",class:"smoothly-table-cell"},"Footer Cell")))))}};mi.style=di();const yi=()=>`.sc-smoothly-table-demo-nested-no-cell-inner-h{display:block;margin:1em auto;width:60%}`;const bi=class{constructor(e){t(this,e)}render(){var t;return o(s,{key:"36f6b45a302f17eea86896fc1904184b34589f19"},o("smoothly-table",{key:"571e5c1870d82817d674f46832196ba837680b31",columns:4},o("smoothly-table-head",{key:"5b7b5b8d02ff31ec82cd35e6ec688a7adcedcf9e"},o("smoothly-table-row",{key:"c7f09a8188bf6be442e687813a9615c3d7afb95a"},o("div",{key:"b4294b01db0691cfb53c0e8e2b9c5dd487c2e07d",class:"smoothly-table-cell"},"Id"),o("div",{key:"ff9f0472466eb4cad25d0663c183a0a7fe932807",class:"smoothly-table-cell"},"Name"),o("div",{key:"0275a1da6d14f24d65dd1c179801ac865426dcbe",class:"smoothly-table-cell"},"Age"),o("div",{key:"3381fd46e6978680d84691992ad093de04ee1ecc",class:"smoothly-table-cell"},"Balance"))),o("smoothly-table-body",{key:"fc58d8650b0e04d350518f33cc2fa07f308e40cf"},(t=this.data)===null||t===void 0?void 0:t.map((t=>o("smoothly-table-expandable-row",null,o("div",{class:"smoothly-table-cell"},t.id),o("div",{class:"smoothly-table-cell"},t.name),o("div",{class:"smoothly-table-cell"},t.age),o("div",{class:"smoothly-table-cell"},t.balance)))))))}};bi.style=yi();const ui=()=>`.sc-smoothly-table-demo-simple-h{display:block}.sc-smoothly-table-demo-simple-h>smoothly-display.sc-smoothly-table-demo-simple{font-size:2em}.sc-smoothly-table-demo-simple-h>*.sc-smoothly-table-demo-simple{margin-bottom:2rem}`;const pi=class{constructor(e){t(this,e)}render(){return o(s,{key:"2efdbea999fe8e2d237d018147ee9080b893ad33"},o("smoothly-display",{key:"12b21356d7aeeae6940243380352b95c12dfff5d",type:"text",value:"Simple"}),o("smoothly-table",{key:"793660cc185168cfc2d80f61e57ab67faffa00d3",color:"primary",columns:2},o("smoothly-table-head",{key:"9d85b0d97a12838aa8c6953155e8a009507f49ac"},o("smoothly-table-row",{key:"4c6f644786476efe6a1beffcbda13abdcad2fd75"},o("smoothly-table-cell",{key:"9538d1875ee057f07c33163e1e78a0e30e6558c0"},"Breed"),o("smoothly-table-cell",{key:"194bf1b1adf62ea0b12c3389fc75fe8d511b14bb"},"Coat"))),o("smoothly-table-body",{key:"1dec581f127727e413a6e4aad94c7b0d29d8f850"},fi.map((t=>o("smoothly-table-row",null,o("smoothly-table-expandable-cell",null,t.breed,o("div",{slot:"detail"},"Country:",o("br",null),t.country)),o("smoothly-table-expandable-cell",null,t.coat,o("div",{slot:"detail"},"Pattern: ",t.pattern))))),o("smoothly-table-row",{key:"0492ef355b8d6829d9e65cd419c521b76bb215f9"},o("smoothly-table-cell",{key:"3459b0e72cb10dfb0d7f820d5b9fda5ac13c2b17"},"Cell5"),o("smoothly-table-expandable-cell",{key:"31b3691b9b4e1b51072bbf1bd22e23ad134d3996"},"Expandable Cell",o("div",{key:"d0e20ad230d037628ad34b4a12d768c3b4fb4ead",slot:"detail"},"Content of the expandable cell"))),o("smoothly-table-row",{key:"74cc23ba61afe01a6f5a89f57fe85d6514aded50"},o("smoothly-table-expandable-cell",{key:"8e0faf1f2361181aa17943da5c065e7f3a0d87dc"},"Expandable Cell 1",o("div",{key:"cbf4bd0814781875bc48ec498699425c21b586ab",slot:"detail"},"Content of the expandable cell 1")),o("smoothly-table-expandable-cell",{key:"be15d9e43dad85222e8bc652e6bd68bdbf636a0f"},"Expandable Cell 2",o("div",{key:"7e1507e45c07ff40bc662a24e6f1d93671de1467",slot:"detail"},"Content of the expandable cell 2")))),o("smoothly-table-foot",{key:"94624f1591f9d3a18e3b84dbf8f76d8a46916028"},o("smoothly-table-row",{key:"a769b1e334d1f73a1cfc5a9539f31a99fb9e152c"},o("smoothly-table-cell",{key:"e14dd9f2bf4762b8e8c91c6309b8b3e966b504bd"},"Footer Cell"),o("smoothly-table-cell",{key:"d1b743ab0a072476bf6f7e7240bec71f2a242949"},"Footer Cell")))))}};const fi=[{breed:"Abyssinian",country:"Ethiopia",origin:"Natural/Standard",coat:"Short",pattern:"Ticked"},{breed:"Aegean",country:"Greece",origin:"Natural/Standard",coat:"Semi-long",pattern:"Bi- or tri-colored"},{breed:"American Curl",country:"United States",origin:"Mutation",coat:"Short/Long",pattern:"All"},{breed:"American Bobtail",country:"United States",origin:"Mutation",coat:"Short/Long",pattern:"All"},{breed:"American Shorthair",country:"United States",origin:"Natural",coat:"Short",pattern:"All but colorpoint"},{breed:"American Wirehair",country:"United States",origin:"Mutation",coat:"Rex",pattern:"All but colorpoint"},{breed:"Arabian Mau",country:"Arabian Peninsula",origin:"Natural",coat:"Short",pattern:""},{breed:"Australian Mist",country:"Australia",origin:"Crossbreed",coat:"Short",pattern:"Spotted and Classic tabby"},{breed:"Asian",country:"developed in the United Kingdom (founding stock from Asia)",origin:"",coat:"Short",pattern:"Evenly solid"},{breed:"Asian Semi-longhair",country:"United Kingdom",origin:"Crossbreed",coat:"Semi-long",pattern:"Solid"}];pi.style=ui();const gi=()=>`.sc-smoothly-table-expandable-cell-h{display:contents}.sc-smoothly-table-expandable-cell-h>div.content.sc-smoothly-table-expandable-cell{grid-column:span var(--smoothly-table-cell-span, 1);display:flex;padding-inline:var(--smoothly-table-cell-padding-inline, 1.1rem);min-height:var(--smoothly-table-cell-min-height, 2.75rem);box-sizing:border-box;align-items:center;white-space:nowrap;position:relative;padding-left:1.1rem}.sc-smoothly-table-expandable-cell-h>div.content.sc-smoothly-table-expandable-cell::before{content:"";display:flex;position:absolute;top:50%;translate:0 -50%;height:0.4rem;width:0.4rem;left:0.3rem;border-bottom:1px solid rgb(var(--smoothly-table-foreground));border-right:1px solid rgb(var(--smoothly-table-foreground));transition:rotate 200ms ease-in-out;rotate:-45deg;opacity:0.3}.sc-smoothly-table-expandable-cell-h>div.content.sc-smoothly-table-expandable-cell:hover::before{border-bottom:1px solid rgb(var(--smoothly-table-hover-foreground));border-right:1px solid rgb(var(--smoothly-table-hover-foreground));opacity:1}.sc-smoothly-table-expandable-cell-h>div.content.sc-smoothly-table-expandable-cell:hover{background-color:rgb(var(--smoothly-table-hover-background));color:rgb(var(--smoothly-table-hover-foreground));stroke:rgb(var(--smoothly-table-hover-foreground));fill:rgb(var(--smoothly-table-hover-foreground))}[open].sc-smoothly-table-expandable-cell-h>div.content.sc-smoothly-table-expandable-cell::before{rotate:45deg}.sc-smoothly-table-expandable-cell-h>div.sc-smoothly-table-expandable-cell:first-child{cursor:pointer}.sc-smoothly-table-expandable-cell-h>div.smoothly-table-detail.sc-smoothly-table-expandable-cell{grid-column:1/-1;grid-row:2;position:relative;padding-block:var(--smoothly-table-detail-padding-block, 0.5rem);padding-inline:var(--smoothly-table-detail-padding-inline, 1.1rem)}[open].sc-smoothly-table-expandable-cell-h>div.content.sc-smoothly-table-expandable-cell{box-shadow:1px 1px 1px -1px rgb(var(--smoothly-table-border)) inset, -3px -1px 1px -3px rgb(var(--smoothly-table-border)) inset}[open].sc-smoothly-table-expandable-cell-h>div.sc-smoothly-table-expandable-cell{background-color:rgb(var(--smoothly-table-expanded-background));color:rgb(var(--smoothly-table-expanded-foreground));stroke:rgb(var(--smoothly-table-expanded-foreground));fill:rgb(var(--smoothly-table-expanded-foreground))}.sc-smoothly-table-expandable-cell-h:not([open])>div.smoothly-table-detail.sc-smoothly-table-expandable-cell{display:none}.sc-smoothly-table-expandable-cell-h>div.smoothly-table-detail.sc-smoothly-table-expandable-cell::before{content:"";position:absolute;display:flex;box-sizing:border-box;top:0;bottom:0;left:-1em;width:1em;background-color:rgb(var(--smoothly-table-expanded-background));border-left:0.3em solid rgb(var(--smoothly-table-detail-border, var(--smoothly-table-border)));box-shadow:2px 0px 0px 0px rgb(var(--smoothly-table-expanded-background)), 0px 0px 1px 0px rgb(var(--smoothly-table-border))}.sc-smoothly-table-expandable-cell-h>div.smoothly-table-detail.sc-smoothly-table-expandable-cell::after{content:"";position:absolute;display:flex;top:0;bottom:0;right:-1em;width:1em;background-color:rgb(var(--smoothly-table-expanded-background));box-shadow:-2px 0px 0px 0px rgb(var(--smoothly-table-expanded-background)), 0px 0px 1px 0px rgb(var(--smoothly-table-border))}`;const ki=class{constructor(o){t(this,o);this.smoothlyTableExpandableCellChange=e(this,"smoothlyTableExpandableCellChange");this.smoothlyTableExpandableCellRegister=e(this,"smoothlyTableExpandableCellRegister");this.span=1;this.open=false}componentWillLoad(){this.smoothlyTableExpandableCellRegister.emit()}async close(){this.open=false}clickHandler(t){var e,o;const s=this.detailElement&&t.composedPath().includes(this.detailElement);if(!s){const t=(e=window.getSelection())===null||e===void 0?void 0:e.toString().trim();if(((o=t===null||t===void 0?void 0:t.length)!==null&&o!==void 0?o:0)==0){this.open=!this.open}}}openChange(){this.smoothlyTableExpandableCellChange.emit(this.open)}render(){var t;return o(s,{key:"4ad3f23ce5db4ed752db950bd4d3ec54ad839c54",style:{"--smoothly-table-cell-span":(t=this.span)===null||t===void 0?void 0:t.toString(10)},onClick:t=>this.clickHandler(t)},o("div",{key:"676608664ca58dcc52d8d684a23bb324aadda90a",class:"content"},o("slot",{key:"209daa4ff46fb96909f528c49dd2f802e2b5c090"})),o("div",{key:"d63a4702d5aa24b8233080a2e621284466312804",class:"smoothly-table-detail",ref:t=>this.detailElement=t},o("slot",{key:"a10d5ab5cc71f24f1c5f6ee63096fd8a27ea857f",name:"detail"})))}static get watchers(){return{open:[{openChange:0}]}}};ki.style=gi();const vi=()=>`.sc-smoothly-table-expandable-row-h{grid-column:1/-1;display:grid;grid-template-columns:subgrid;grid-template-rows:auto 0fr;box-shadow:0px 1px 1px -1px rgb(var(--smoothly-table-border))}.sc-smoothly-table-expandable-row-h.sc-smoothly-table-expandable-row-s>.smoothly-table-cell{grid:subgrid;cursor:pointer;grid-column:span var(--smoothly-table-cell-span, 1);display:flex;align-items:center;padding-inline:var(--smoothly-table-cell-padding-inline, 1.1rem);min-height:var(--smoothly-table-cell-min-height, 2.75rem);white-space:nowrap}.sc-smoothly-table-expandable-row-h:has(>.smoothly-table-cell:hover){background-color:rgb(var(--smoothly-table-hover-background));color:rgb(var(--smoothly-table-hover-foreground))}[open].sc-smoothly-table-expandable-row-h{background-color:rgb(var(--smoothly-table-expanded-background));color:rgb(var(--smoothly-table-expanded-foreground));grid-template-rows:auto 1fr;box-shadow:0px 1px 1px -1px rgb(var(--smoothly-table-border)), 0px 0px 1px rgb(var(--smoothly-table-border)) inset;grid-template-rows:0fr 1fr}.sc-smoothly-table-expandable-row-h:not([open])>div.smoothly-table-detail.sc-smoothly-table-expandable-row{display:none}.sc-smoothly-table-expandable-row-h>div.smoothly-table-detail.sc-smoothly-table-expandable-row{grid-column:1/-1;cursor:default;position:relative;overflow:hidden;background-color:rgb(var(--smoothly-table-expanded-background));color:rgb(var(--smoothly-table-expanded-foreground))}.sc-smoothly-table-expandable-row-h>.smoothly-table-cell.sc-smoothly-table-expandable-row:first-of-type{position:relative;padding-left:1.1rem}.sc-smoothly-table-expandable-row-h>.smoothly-table-cell.sc-smoothly-table-expandable-row:first-of-type::before{content:"";display:flex;position:absolute;top:50%;translate:0 -50%;height:0.4rem;width:0.4rem;left:0.3rem;border-bottom:1px solid rgb(var(--smoothly-table-foreground));border-right:1px solid rgb(var(--smoothly-table-foreground));transition:rotate 200ms ease-in-out;rotate:-45deg;opacity:0.3}.sc-smoothly-table-expandable-row-h:has(>.smoothly-table-cell:hover)>.smoothly-table-cell.sc-smoothly-table-expandable-row:first-of-type::before{border-bottom:1px solid rgb(var(--smoothly-table-hover-foreground));border-right:1px solid rgb(var(--smoothly-table-hover-foreground));opacity:1}[open].sc-smoothly-table-expandable-row-h>.smoothly-table-cell.sc-smoothly-table-expandable-row:first-of-type::before{rotate:45deg}[open].sc-smoothly-table-expandable-row-h>div.smoothly-table-detail.sc-smoothly-table-expandable-row{overflow:visible;padding-block:var(--smoothly-table-detail-padding-block, 0.5rem);padding-inline:var(--smoothly-table-detail-padding-inline, 1.1rem)}.sc-smoothly-table-expandable-row-h>div.smoothly-table-detail.sc-smoothly-table-expandable-row::before{content:"";position:absolute;display:flex;box-sizing:border-box;top:0;bottom:0;left:-1em;width:1em;background-color:rgb(var(--smoothly-table-expanded-background));border-left:0.3em solid rgb(var(--smoothly-table-detail-border, var(--smoothly-table-border)));box-shadow:2px 0px 0px 0px rgb(var(--smoothly-table-expanded-background)), 0px 0px 1px 0px rgb(var(--smoothly-table-border))}.sc-smoothly-table-expandable-row-h>div.smoothly-table-detail.sc-smoothly-table-expandable-row::after{content:"";position:absolute;display:flex;top:0;bottom:0;right:-1em;width:1em;background-color:rgb(var(--smoothly-table-expanded-background));box-shadow:-2px 0px 0px 0px rgb(var(--smoothly-table-expanded-background)), 0px 0px 1px 0px rgb(var(--smoothly-table-border))}`;const wi=class{constructor(o){t(this,o);this.smoothlyTableExpandableRowChange=e(this,"smoothlyTableExpandableRowChange");this.open=false}clickHandler(t){var e,o;const s=this.div&&t.composedPath().includes(this.div);if(!s){const t=(e=window.getSelection())===null||e===void 0?void 0:e.toString().trim();if(((o=t===null||t===void 0?void 0:t.length)!==null&&o!==void 0?o:0)==0){this.open=!this.open}}}openChange(){this.smoothlyTableExpandableRowChange.emit(this.open)}render(){return o(s,{key:"9e84dfc3e17d085b3906f789b014670830079257",onClick:t=>this.clickHandler(t)},o("slot",{key:"550fa1569c00ef0a759958b9a731897dc379e7ca"}),o("div",{key:"b9f6d0b151720b77800c4d610f9682ea9b0a242e",class:"smoothly-table-detail",ref:t=>this.div=t},o("slot",{key:"6b693e48c396b4915a62700567859fa47e6b682e",name:"detail"})))}static get watchers(){return{open:[{openChange:0}]}}};wi.style=vi();const xi=()=>`.sc-smoothly-table-filler-row-h{grid-column:1 / -1}`;const Ci=class{constructor(e){t(this,e)}render(){return o("smoothly-table-row",{key:"d77076fd44474052265f353b93ad55274ce8c58e"},o("smoothly-table-cell",{key:"dbb64a7779542001e6ae2a1d7ba60601fe94a8c6"},o("slot",{key:"73fca7b0a7ee9b9e3cb45b21b9fc83fe1e59c029"})))}};Ci.style=xi();const Si=()=>`.sc-smoothly-table-foot-h{grid-column:1 / -1;display:grid;grid-template-columns:subgrid;position:sticky;z-index:1;bottom:0;background-color:rgb(var(--smoothly-table-footer-background));color:rgb(var(--smoothly-table-footer-foreground));stroke:rgb(var(--smoothly-table-footer-foreground));fill:rgb(var(--smoothly-table-footer-foreground))}`;const zi=class{constructor(e){t(this,e)}render(){return o(s,{key:"9ed27d9a22178da4bb63dc53fcf5ea68179d43a9"},o("slot",{key:"f390e7474a31021cf29914c5b1e994820f3d7265"}))}};zi.style=Si();const Ii=()=>`.sc-smoothly-table-head-h{grid-column:1 / -1;display:grid;grid-template-columns:subgrid;top:var(--top);position:sticky;z-index:var(--z-index);--smoothly-color:var(--smoothly-table-header-background);--smoothly-color-contrast:var(--smoothly-table-header-foreground);background-color:rgb(var(--smoothly-table-header-background));color:rgb(var(--smoothly-table-header-foreground));stroke:rgb(var(--smoothly-table-header-foreground));fill:rgb(var(--smoothly-table-header-foreground));font-weight:bold;transition:box-shadow 0.3s ease}.scrolled.sc-smoothly-table-head-h{box-shadow:var(--smoothly-table-header-shadow)}`;const Ti=class{constructor(e){t(this,e);this.depth=0;this.onScroll=t=>{if(t.target instanceof HTMLElement){this.scrollParent=t.target;const e=this.scrollParent.getBoundingClientRect();const o=this.element.getBoundingClientRect();this.scrolled=e.top==o.top}}}getTopOffset(){let t=0;let e=this.element;while(e){if(e.tagName.toLowerCase()==="smoothly-table"){const o=e.querySelector("smoothly-table-head");if(o!==this.element){const e=Array.from(o.querySelectorAll(":scope > smoothly-table-row"));t+=e.length}}e=e.parentElement}this.depth=t}connectedCallback(){var t;this.scrollParent=n.findParent(this.element);(t=this.scrollParent)===null||t===void 0?void 0:t.addEventListener("scroll",this.onScroll);this.getTopOffset()}disconnectedCallback(){var t;(t=this.scrollParent)===null||t===void 0?void 0:t.removeEventListener("scroll",this.onScroll)}render(){return o(s,{key:"993c6bc1713a36aed6bd3c49fc12998f21f377f5",class:{scrolled:!!this.scrolled},style:{"--top":`calc(${this.depth} * var(--smoothly-table-cell-min-height))`,"--z-index":`${10-this.depth}`}},o("slot",{key:"09bb8cb6a4c4d7812f1c7f793a384997dc439933"}))}get element(){return a(this)}};Ti.style=Ii();const Di=()=>`.sc-smoothly-table-row-h{grid-column:1 / -1;display:grid;grid-template-columns:subgrid;box-sizing:border-box;box-shadow:0px 1px 1px -1px rgb(var(--smoothly-table-border))}.sc-smoothly-table-row-h .smoothly-table-cell.sc-smoothly-table-row,.sc-smoothly-table-row-h.sc-smoothly-table-row-s>.smoothly-table-cell{display:flex;grid-column:span var(--smoothly-table-cell-span, 1);align-items:center;padding-inline:var(--smoothly-table-cell-padding-inline, 1.1rem);min-height:var(--smoothly-table-cell-min-height, 2.75rem);white-space:nowrap}.sc-smoothly-table-row-h:has(smoothly-table-expandable-cell){grid-template-rows:auto 0fr 0fr}.sc-smoothly-table-row-h:has(smoothly-table-expandable-cell[open]){grid-template-rows:auto 1fr 0fr}`;const ji=class{constructor(e){t(this,e);this.expandableCells=new Set}smoothlyTableExpandableCellRegisterHandler(t){t.stopPropagation();this.expandableCells.add(t.target)}smoothlyTableExpandableCellChangeHandler(t){if(t.detail){for(const e of this.expandableCells){t.target!=e&&e.close()}}}render(){return o(s,{key:"0425407687e577b5fffba44db7d3d97723c9d5a5"},o("slot",{key:"51b3451cb07fbd22d1588033a32c1728058fe85c"}))}};ji.style=Di();const Li=()=>`.sc-smoothly-table-row-group-h{grid-column:1/-1;display:grid;grid-template-columns:subgrid;margin-top:1px}.sc-smoothly-table-row-group-h>div.sc-smoothly-table-row-group:first-child{grid-column:1/-1;display:grid;position:relative;cursor:pointer;padding-inline:var(--smoothly-table-cell-padding-inline, 1.1rem);min-height:var(--smoothly-table-cell-min-height, 2.75rem);background-color:rgb(var(--smoothly-default-tint));border-bottom:1px solid rgb(var(--smoothly-default-shade));position:relative;padding-left:1.1rem}.sc-smoothly-table-row-group-h>div.sc-smoothly-table-row-group:first-child::before{content:"";display:flex;position:absolute;top:50%;translate:0 -50%;height:0.4rem;width:0.4rem;left:0.3rem;border-bottom:1px solid rgb(var(--smoothly-table-foreground));border-right:1px solid rgb(var(--smoothly-table-foreground));transition:rotate 200ms ease-in-out;rotate:-45deg;opacity:0.3}.sc-smoothly-table-row-group-h>div.sc-smoothly-table-row-group:first-child:hover::before{border-bottom:1px solid rgb(var(--smoothly-table-hover-foreground));border-right:1px solid rgb(var(--smoothly-table-hover-foreground));opacity:1}.sc-smoothly-table-row-group-h>div.sc-smoothly-table-row-group:first-child:hover{color:rgb(var(--smoothly-table-hover-foreground));background-color:rgb(var(--smoothly-table-hover-background))}[open].sc-smoothly-table-row-group-h>div.sc-smoothly-table-row-group:first-child::before{rotate:45deg}.sc-smoothly-table-row-group-h>div.sc-smoothly-table-row-group:last-child{grid-column:1/-1;display:grid;grid-template-columns:subgrid}[align].sc-smoothly-table-row-group-h>div.sc-smoothly-table-row-group:first-child{grid-template-columns:subgrid}[align].sc-smoothly-table-row-group-h>div.sc-smoothly-table-row-group:first-child>div.sc-smoothly-table-row-group{display:contents}[align].sc-smoothly-table-row-group-h>div.sc-smoothly-table-row-group:first-child>div.sc-smoothly-table-row-group>*.sc-smoothly-table-row-group{display:flex;align-items:center;padding-inline:var(--smoothly-table-cell-padding-inline, 1.1rem);min-height:var(--smoothly-table-cell-min-height, 2.75rem)}.sc-smoothly-table-row-group-h:not([align])>div.sc-smoothly-table-row-group:first-child{grid-column:1/-1;display:grid;align-items:center;grid-template-columns:repeat(2, auto);justify-content:space-between}.sc-smoothly-table-row-group-h:not([align])>div.sc-smoothly-table-row-group:first-child>div.sc-smoothly-table-row-group:first-child{justify-self:start;display:flex;gap:1rem}.sc-smoothly-table-row-group-h:not([align])>div.sc-smoothly-table-row-group:first-child>div.sc-smoothly-table-row-group:last-child{justify-self:end;display:flex;gap:1rem}.sc-smoothly-table-row-group-h:not([open]){grid-template-rows:auto 0fr}.sc-smoothly-table-row-group-h:not([open])>div.sc-smoothly-table-row-group:last-child{grid-row:2;overflow:hidden}`;const Ri=class{constructor(o){t(this,o);this.smoothlyTableRowGroupChange=e(this,"smoothlyTableRowGroupChange");this.align=false;this.open=false}clickHandler(){var t,e;const o=(t=window.getSelection())===null||t===void 0?void 0:t.toString().trim();if(((e=o===null||o===void 0?void 0:o.length)!==null&&e!==void 0?e:0)==0){this.open=!this.open;this.smoothlyTableRowGroupChange.emit(this.open)}}render(){return o(s,{key:"ce13a22ad4e51ee514e1e4b2f7a20c46fa92f6f1"},o("div",{key:"f02760b02c1bb6041a786cfb6d225e39711ff373",onClick:()=>this.clickHandler()},o("div",{key:"db60ed9bc5b1122b59951b71ec314541282fcf6a"},o("slot",{key:"45a5e3c909e67b106fd2d2f4c4569a907d71c144",name:"start"})),o("div",{key:"ebb125b675ab71d721e3898517b4f4c51fa74b11"},o("slot",{key:"d7b3a84aad30848650579443f1545b4728f5e7c3",name:"end"}))),o("div",{key:"25a4c03b5e60f612788485f2aaeaa3c9b1fd0086"},o("slot",{key:"a82b554991b81a22415fcd59b286a2a676cd1aac"})))}};Ri.style=Li();const _i=()=>`.sc-smoothly-tabs-h{display:grid;grid-template-columns:repeat(var(--tabs), auto);grid-template-rows:auto auto}.sc-smoothly-tabs-h.hide-tabs.sc-smoothly-tabs-s>smoothly-tab>div:first-child{display:none}`;const Ai=class{constructor(o){t(this,o);this.smoothlyTabOpen=e(this,"smoothlyTabOpen");this.tabs="always";this.tabElements=[]}async removeTab(t){if(this.element.isConnected){this.tabElements=this.tabElements.filter((e=>e!==t));if(t.open){const t=this.tabElements.find((t=>!t.disabled));t&&(t.open=true)}}}onInputLoad(t){t.stopPropagation();if(this.isSmoothlyTabElement(t.target)&&t.target.parentElement==this.element&&!this.tabElements.includes(t.target)){t.detail(this);this.tabElements=[...this.tabElements,t.target]}}isSmoothlyTabElement(t){return(t===null||t===void 0?void 0:t.tagName)=="SMOOTHLY-TAB"}openChanged(t){const e=t.target;if(this.isSmoothlyTabElement(e)){t.stopPropagation();this.selectedElement=e;this.smoothlyTabOpen.emit(t.detail)}}onSelectedChange(t,e){if(e){e.open=false}}render(){var t;return o(s,{key:"b04840f6e13daa8be63254d382614ddf521ce1b8",class:{"hide-tabs":this.tabs=="multiple"&&this.tabElements.length==1},style:{"--tabs":`${(t=this.numberOfTabs)!==null&&t!==void 0?t:this.tabElements.length}`}},o("slot",{key:"7b4c480e7e74d4b5ecaea562f6d5f981f17f3fa1"}))}get element(){return a(this)}static get watchers(){return{selectedElement:[{onSelectedChange:0}]}}};Ai.style=_i();const $i=()=>`.sc-smoothly-tabs-demo-h{display:block}[hidden].sc-smoothly-tabs-demo-h{display:none}.sc-smoothly-tabs-demo-h>*.sc-smoothly-tabs-demo{margin:auto;max-width:1200px;width:100%;margin-block:5rem}.sc-smoothly-tabs-demo-h code.sc-smoothly-tabs-demo{color:rgb(var(--smoothly-medium-contrast));background-color:rgb(var(--smoothly-medium-color));padding-inline:0.25rem;border-radius:0.25rem}`;const Mi=class{constructor(e){t(this,e)}render(){return o(s,{key:"4a80dd41c51100c1301561693d8c4a2df403c4da"},o("div",{key:"11006ee9bb40b9cf37e2178bce53ed628c1283f6"},o("smoothly-button",{key:"26ff4ef958ee840faecf68fe2e11a0c3c3cdbc30",color:"primary",onClick:()=>this.extraTab1=!this.extraTab1},this.extraTab1?"Remove":"Add"," tab")),o("smoothly-tabs",{key:"417217100133e8df781567c756f39f6947c16f89",tabs:"multiple"},o("smoothly-tab",{key:"724fe03a378b22c016fa2fcda4bad3bc55dfe37a",label:"Single Tab",open:true},o("strong",{key:"e604a2da6994a0bbefd94a8ecdc25f526edaf48e"},"Single Tab content here.")," If only one tab is available setting ",o("code",{key:"93ec1421406263e82787412cb3c81758fd66d13d"},"tabs")," to"," ",o("code",{key:"42428750de3b7c3d8b9a07ef405c4a99a01404d9"},'"multiple"')," will hide the tab navigation and display the single tab's content directly."),this.extraTab1&&o("smoothly-tab",{key:"f423d7a8c75b17b2557c1607e234ef55898eb479",label:"Extra tab"},"When there are more then one tab, the tab navigation will show.")),o("div",{key:"f884806decb90da0e45420a017e2c66a342a766a"},o("smoothly-button",{key:"d124105cba0e312a10e023d0cef9fd5b8976589e",color:"primary",onClick:()=>this.extraTab2=!this.extraTab2},this.extraTab2?"Remove":"Add"," tab")),o("smoothly-tabs",{key:"754abfb1e802e5fe78a41b8a90118988f4cc762a"},o("smoothly-tab",{key:"bdeae6ae82b0cc55116be4cc10709df1decd5a52",label:"Disabled tab",tooltip:"Tooltip for test3",disabled:true},"this is a test message again!"),o("smoothly-tab",{key:"7aaefe748609e3985c2f83acfac325af406e927e",label:"test1",tooltip:"Tooltip for test1",open:true},"Hello world!"),o("smoothly-tab",{key:"c1cccf83bc7042494535ed591cf03d930f8d3332",label:"test2"},"this is a test message!"),this.extraTab2&&o("smoothly-tab",{key:"e77b11f0d06d1805f28092a16d79c5b7cfd926c5",label:"test-extra"},"this is a test message!")))}};Mi.style=$i();const Ei=()=>`.sc-smoothly-theme-color-h{display:flex;flex-direction:column;align-items:center}.sc-smoothly-theme-color-h>.sc-smoothly-theme-color:first-child{margin-top:0.2rem}`;const Oi=class{constructor(e){t(this,e)}render(){return o(s,{key:"d0a540b220f6677f2789af7d5f837d8886a357d0"},this.color,["tint","color","shade"].map((t=>o("smoothly-theme-color-variant",{title:`${this.color} ${t}`,color:this.color,variant:t}))))}};Oi.style=Ei();const Pi=()=>`.sc-smoothly-theme-color-variant-h{display:flex;justify-content:center;align-items:center;width:3em;height:3em;font-weight:900}[color][variant=color].sc-smoothly-theme-color-variant-h{background:rgb(var(--smoothly-color))}[color][variant=tint].sc-smoothly-theme-color-variant-h{background:rgb(var(--smoothly-color-tint))}[color][variant=shade].sc-smoothly-theme-color-variant-h{background:rgb(var(--smoothly-color-shade))}`;const Hi=class{constructor(e){t(this,e);this.variant="color"}render(){return"Aa"}};Hi.style=Pi();const Fi=()=>`.sc-smoothly-theme-colors-h{display:grid;grid-template-columns:repeat(3, 1fr);row-gap:1rem;column-gap:0.5rem;width:fit-content}`;const Ui=class e{constructor(e){t(this,e)}render(){return["primary","secondary","tertiary","success","warning","danger","light","medium","dark","default"].map((t=>o("smoothly-theme-color",{color:t})))}};Ui.style=Fi();const Ni=()=>`.sc-smoothly-theme-demo-h{max-width:min(calc(100% - 2rem), 56rem);margin:auto;display:flex;flex-direction:column;gap:2em;margin-top:2em}.sc-smoothly-theme-demo-h>smoothly-theme-picker.sc-smoothly-theme-demo{width:20em}.sc-smoothly-theme-demo-h>div.sc-smoothly-theme-demo{display:flex;flex-direction:row;justify-content:space-between;gap:1rem}`;const Yi=class{constructor(e){t(this,e)}render(){return o(s,{key:"b0bbd6191f8813c26d5886781733dd9bf741b99c"},o("h2",{key:"e91a7fdb7d96a680e59c927e45acee05200bb95c"},"Theme"),o("smoothly-theme-picker",{key:"5fd8fdae6e0d2ff31dc0ff17c491238ed35bf490"},o("smoothly-item",{key:"5920957a82d6ab7172b57eb59b421aa46ee54b9b",selected:true,value:"assets/style/smoothly.css"},"Smoothly"),o("smoothly-item",{key:"058c6ccaa2f06a749b822a30efe5cc77c4e10e72",value:"https://app.issuefab.com/assets/style/index.css"},"Issuefab"),o("smoothly-item",{key:"39818c97423808e82305846cb10b07a6f33c3f64",value:"https://app.proquse.com/assets/style/index.css"},"Proquse"),o("smoothly-item",{key:"0c6e1332df64fb8735b4dca530762f21880b26eb",value:"https://app.weekmeter.com/assets/style/index.css"},"Weekmeter"),o("smoothly-item",{key:"622e018eef75102e056658a158bad09a65e8000f",value:"https://test.dash.pax2pay.app/p2pdash.css"},"Pax2Pay Dashboard"),o("smoothly-item",{key:"620929a5b84a9ba4aa5ecddfa594711bf8a01d99",value:"https://ui.pax2pay.app/assets/style/pax2pay.css"},"Pax2Pay Portal"),o("smoothly-item",{key:"53ba85ee8f2756864733dd329e9a2e28e7367197",value:"https://theme.payfunc.com/intergiro/index.css"},"Intergiro Monitor"),o("smoothly-item",{key:"50395895f3cb399882761534e08c7d419a81519e",value:"https://theme.payfunc.com/light/index.css"},"Payfunc Light"),o("smoothly-item",{key:"b8becda45015864fa8f5835d3e6cec993b47f59c",value:"https://theme.payfunc.com/dark/index.css"},"Payfunc Dark")),o("div",{key:"0ab79f2d41eacb2414707b9c0231771261b0e488"},o("smoothly-theme-colors",{key:"5f70418b92a6ac65b33f00047dd060f28b5fe020"}),o("smoothly-theme-guide",{key:"102b8e24b377e5b00d5b2f8709faa7e5ba0ef60c"})),o("smoothly-button",{key:"238265f4b86ab0cfdaf98d4ca592a8fc05e68215",type:"link",link:"/redirect"},"To redirect"),o("smoothly-button",{key:"ffaa46726387eea854bdbc6ffc0d2cea5793f149",type:"link",link:"/redirect"},"To /redirect"),o("smoothly-button",{key:"159b1948947dd3adb43142362d0006c71fdf7c03",type:"link",link:new URL("/redirect",window.location.origin).href},'To new URL("redirect")'),o("smoothly-button",{key:"aa510bc3cf7526bd234ed13089ae752113914423",type:"link",link:"redirect/nested"},"To redirect nested"))}};Yi.style=Ni();const Wi=()=>`.sc-smoothly-theme-guide-h{max-width:50ch}`;const Bi=class{constructor(e){t(this,e)}render(){return[o("smoothly-display",{key:"a830c8d6d95a789caee78f4d8417428148983c5e"},"Tint is used as background to highlight, for example hovering an item in the select menu."),o("br",{key:"dbedc7fedfd22a2e565722a82e84dc96fc26a7f8"}),o("smoothly-display",{key:"3c4a7c1e786d6127b9678255784764d72f3611a9"},"Color is used as a normal background or as a background to show that something is selected, for example a selected item in the select menu."),o("br",{key:"5bbad40a4217820ba5b332954702a031bf5b9073"}),o("smoothly-display",{key:"6bf810cc6c0b3a1d2a67bb8b2779fe3d2c4e4a2e"},"Shade is used as border and for symbols in buttons. It works as a semi-low contrast against color and tint."),o("br",{key:"ef169f909cef881bb6f3a0355dc0b482d8bc0496"}),o("smoothly-display",{key:"bd47c4f897e48cc02787f9e7f9396d2c3df23ddc"},"One can use the ","<smoothly-color>"," component to switch between what color set is used."," "),o("br",{key:"39fae791a0b502d9a006e8aa395a357c7f3e5308"})]}};Bi.style=Wi();const Vi=()=>``;const Gi=class{constructor(e){t(this,e);this.element="smoothly-css"}render(){return o(s,{key:"2af98203042f4b72b535f47ff21ffaa4b5c0af6e"},o("smoothly-input-select",{key:"247e1590c3198949e097eeb0a29f0cd339df2f81",name:"theme",looks:"border",onSmoothlyInput:t=>{const e=document.querySelector(`#${this.element}`);if(e instanceof HTMLLinkElement&&typeof t.detail.theme=="string"){e.href=t.detail.theme}}},o("label",{key:"180f4a1ce2bd43d670e0dc111914ba07907c6176",slot:"label"},"Select theme"),o("slot",{key:"86681b9a7827f9329d8827fe01618ab39409570f"})))}};Gi.style=Vi();const Ki=()=>`.sc-smoothly-toggle-switch-h{display:block}.sc-smoothly-toggle-switch-h>button.sc-smoothly-toggle-switch{width:100%;height:100%;display:flex;align-items:center;padding-inline:0;cursor:pointer;border:none;border-radius:3em;background-color:rgb(var(--smoothly-color))}.sc-smoothly-toggle-switch-h>button.sc-smoothly-toggle-switch:hover{background-color:rgb(var(--smoothly-color-tint))}.sc-smoothly-toggle-switch-h>button.sc-smoothly-toggle-switch>smoothly-icon.sc-smoothly-toggle-switch{display:flex;justify-content:flex-start;align-items:center;fill:rgb(var(--smoothly-color-contrast));stroke:rgb(var(--smoothly-color-contrast));transition:100ms ease-in-out}[selected][checkmark].sc-smoothly-toggle-switch-h>button.sc-smoothly-toggle-switch>smoothly-icon.sc-smoothly-toggle-switch{fill:rgb(var(--smoothly-success-contrast));stroke:rgb(var(--smoothly-success-contrast))}[selected][checkmark].sc-smoothly-toggle-switch-h>button.sc-smoothly-toggle-switch{background-color:rgb(var(--smoothly-success-color))}[selected][checkmark].sc-smoothly-toggle-switch-h>button.sc-smoothly-toggle-switch:hover{background-color:rgb(var(--smoothly-success-tint))}[selected].sc-smoothly-toggle-switch-h>button.sc-smoothly-toggle-switch>smoothly-icon.sc-smoothly-toggle-switch{transform:translateX(100%)}[size=tiny].sc-smoothly-toggle-switch-h{--height:1.25rem}[size=small].sc-smoothly-toggle-switch-h{--height:1.5rem}[size=default].sc-smoothly-toggle-switch-h{--height:2rem}[size=large].sc-smoothly-toggle-switch-h{--height:2.5rem}.sc-smoothly-toggle-switch-h{height:var(--height);width:calc(var(--height) * 2)}.sc-smoothly-toggle-switch-h>button.sc-smoothly-toggle-switch>smoothly-icon.sc-smoothly-toggle-switch{--smoothly-icon-size:var(--height)}`;const qi=class{constructor(o){t(this,o);this.smoothlyToggleSwitchChange=e(this,"smoothlyToggleSwitchChange");this.checkmark=true;this.selected=false;this.disabled=false;this.size="default";this.color="medium";this.fill="clear"}handleClick(){this.selected=!this.selected;this.smoothlyToggleSwitchChange.emit(this.selected)}render(){return o(s,{key:"3a4b9d310da72b52813117929327c8a9a42d32ad"},o("button",{key:"ac17b5375ebd1a4437f8ed632f93f1a7c6dde5b3",type:"button",disabled:this.disabled,onClick:()=>this.handleClick()},o("smoothly-icon",{key:"4a07e19ec0a7ee3d0f124b6bcaa2529e055a2a9f",color:this.color,name:!this.checkmark?"ellipse":this.selected?"checkmark-circle":"close-circle",fill:"clear",class:{selected:this.selected}})))}};qi.style=Ki();const Zi=()=>`.sc-smoothly-toggle-switch-demo-h>div.sc-smoothly-toggle-switch-demo{display:grid;grid-template-columns:repeat(5, max-content);gap:1em}.sc-smoothly-toggle-switch-demo-h>div.sc-smoothly-toggle-switch-demo>span.sc-smoothly-toggle-switch-demo>p.sc-smoothly-toggle-switch-demo{margin:0}`;const Ji=class{constructor(e){t(this,e)}render(){return o(s,{key:"89947ffb728f613799f1ce93372ef3ec8f0cc111"},o("h4",{key:"a31e7b5e87461383260677fdaf600a784c228575"},"Toggle switches"),o("div",{key:"bcaab8c0c0a2b201eccd9618f5c4cdd7bf6aadbd"},o("p",{key:"094b895b55b8fa71b47908d5c96eeb1ea15e11f7"},"Checkmark"),o("span",{key:"8f4efd3fcea4e6c12e541a779f6c8404da35b731"},o("p",{key:"f6fdd02e752edec8bf4742e16450fcbc7b6688b9"},"Tiny"),o("smoothly-toggle-switch",{key:"3fc6037f4960b8d32ce09f3f9ebba37016e6664a",disabled:false,size:"tiny"})),o("span",{key:"92a0e20c60b42601e287d6ded2d410cf9621fa32"},o("p",{key:"6f093b2c7c57b5fe575c31a6226a62952264b19f"},"Small"),o("smoothly-toggle-switch",{key:"5218f5534e4b5fb85aa3fe936ae41793ee442fa6",disabled:false,size:"small"})),o("span",{key:"599a5d20bac26ee391ab151ec3d5676fccdc8054"},o("p",{key:"225ae580a936c57910647d1c85f092299e8b35dc"},"Standard"),o("smoothly-toggle-switch",{key:"8207f999bfb0f904c351cea0b527428180215013",disabled:false})),o("span",{key:"82fec0c1bc65ed93ab46f2959ca8ce06e52dbcb3"},o("p",{key:"7b054a1c33329eced30415d1fc1d72d3021135ca"},"Large"),o("smoothly-toggle-switch",{key:"ed2ef6bb357f09b69f086ef8c8a2ce98c5b5748d",disabled:false,size:"large"})),o("p",{key:"79b05ec925bac067ef54dbe70a4bf5e80ab7e4ea"},"Colors checkmark"),o("span",{key:"7d56fa63b7ea2027292cfe7c4d2299effeb23f38"},o("p",{key:"f9a8be885bdbad1e7a7df85b44f173ef54be4446"},"Danger"),o("smoothly-toggle-switch",{key:"14c4d887786aa9b174b2a26d343308949373167b",color:"danger",disabled:false,size:"small"})),o("span",{key:"536e6923c3a0dc41ef2578477bca30aa4ade8c53"},o("p",{key:"ae6488e2f6bfe13d6b66cae9745126ec981178cb"},"Primary color"),o("smoothly-toggle-switch",{key:"9cc32d5f6a276302a112aacf61a632e7d8628ba7",color:"primary",disabled:false,size:"small"})),o("span",{key:"5770c9460bbba19e751d3925d4f2079eb82b2eed"},o("p",{key:"52ac34e499689e7707c1f00ec257f2b2c5421289"},"Secondary color"),o("smoothly-toggle-switch",{key:"0ed76db9819fbb9c055b97ae379f7e570cb1941d",color:"secondary",disabled:false,size:"small"})),o("p",{key:"0ccac3a8a3d45f84e2e897ca1c70bdf5399fdb82"}),o("p",{key:"83ffda4b2eda61607de34fbfa6ec3a0cf57d34b4"},"Colors no checkmark"),o("span",{key:"152648b67751cc22397a520de71a40f7b546f042"},o("p",{key:"5f84c9c846c0c3c8f31d419b8b2dc9a71201c697"},"Danger"),o("smoothly-toggle-switch",{key:"2e8f8db8f6e44225f52a0c23c55a18221d9194bb",checkmark:false,color:"danger",disabled:false,size:"small"})),o("span",{key:"ed667a303cd132a9c33998fd24318784c7e211a2"},o("p",{key:"8dd99066536c3569875e1d9b1756201f13b355b0"},"Primary color"),o("smoothly-toggle-switch",{key:"596e8528d7068418d54650dd77e57e9d7e0c8b6f",checkmark:false,color:"primary",disabled:false,size:"small"})),o("span",{key:"b5aedfa2dc4cca37b931eb8303f1768d091a9c5d"},o("p",{key:"2b3b9216aeb1f94641b91eb0c0ec81afdc39561f"},"Secondary color"),o("smoothly-toggle-switch",{key:"8d5c92b17027032fa44a88a13382e223787b029a",checkmark:false,color:"secondary",disabled:false,size:"small"}))))}};Ji.style=Zi();const Xi=()=>`.sc-smoothly-trigger-h{display:block;border-style:solid;border-width:1px;border-radius:3px}[hidden].sc-smoothly-trigger-h{display:none}[disabled].sc-smoothly-trigger-h{opacity:0.5}.sc-smoothly-trigger-h>button.sc-smoothly-trigger{border-color:transparent;background-color:transparent;padding:0.2em 0.3em;font-size:110%;font-weight:400}.sc-smoothly-trigger-h:not([disabled]):hover,.sc-smoothly-trigger-h:not([disabled]):focus,.sc-smoothly-trigger-h:not([disabled]):active{border-color:var(--smoothly-trigger-border)}[expand=full].sc-smoothly-trigger-h>button.sc-smoothly-trigger,[expand=block].sc-smoothly-trigger-h>button.sc-smoothly-trigger{width:100%}[expand=full].sc-smoothly-trigger-h{border-left:none;border-right:none}`;const Qi=class{constructor(o){t(this,o);this.trigger=e(this,"trigger");this.disabled=false;this.type="button"}onClick(t){this.trigger.emit({name:this.name,value:this.value});t.stopPropagation();t.preventDefault()}render(){let t;switch(this.type){case"link":t=this.disabled?o("slot",null):o("a",{onClick:t=>this.onClick(t)},o("slot",null));break;case"button":t=o("button",{key:"8649cae1ed46bc4c22aafc6dfb5fce04a993bb9d",disabled:this.disabled,name:this.name},o("slot",{key:"bdf0d1b51e56dc99e0cc9b3aae2a563de459b377"}));break}return t}};Qi.style=Xi();export{j as smoothly_app,L as smoothly_app_demo,Dt as smoothly_app_room,Lt as smoothly_back_to_top,_t as smoothly_burger,$t as smoothly_button,Et as smoothly_button_confirm,Pt as smoothly_button_demo,Ft as smoothly_button_demo_standard,Vt as smoothly_calendar,Zt as smoothly_date_text,Xt as smoothly_dialog,te as smoothly_dialog_demo,Be as smoothly_display,Ve as smoothly_display_demo,Ke as smoothly_display_demo_json,Xe as smoothly_display_json,to as smoothly_display_json_object,oo as smoothly_display_json_primitive,ao as smoothly_display_json_record_key,os as smoothly_form,as as smoothly_form_demo,is as smoothly_form_demo_all,ls as smoothly_form_demo_card,ns as smoothly_form_demo_controlled,cs as smoothly_form_demo_date,ds as smoothly_form_demo_date_range,ms as smoothly_form_demo_login,bs as smoothly_form_demo_pet,us as smoothly_form_demo_prices,gs as smoothly_form_demo_schedule,ks as smoothly_form_demo_transparent,xs as smoothly_form_demo_typed,Ss as smoothly_frame,Is as smoothly_icon,Ds as smoothly_icon_demo,$s as smoothly_input,Es as smoothly_input_checkbox,Ps as smoothly_input_clear,Fs as smoothly_input_color,Us as smoothly_input_color_demo,Ys as smoothly_input_date,Bs as smoothly_input_date_demo,Gs as smoothly_input_date_range,qs as smoothly_input_date_time,Js as smoothly_input_demo,Qs as smoothly_input_demo_radio,ea as smoothly_input_demo_standard,sa as smoothly_input_demo_user_input,ia as smoothly_input_edit,na as smoothly_input_file,ca as smoothly_input_month,da as smoothly_input_price_demo,ya as smoothly_input_radio,ua as smoothly_input_radio_item,ga as smoothly_input_range,ka as smoothly_input_range_demo,wa as smoothly_input_reset,Ta as smoothly_input_select,ja as smoothly_input_submit,Ra as smoothly_item,Aa as smoothly_label,Ma as smoothly_lazy,Ea as smoothly_load_more,Pa as smoothly_modal,Fa as smoothly_notification,Na as smoothly_notifier,Ya as smoothly_notifier_demo,Ba as smoothly_spinner,Ga as smoothly_summary,qa as smoothly_tab,Ja as smoothly_table,Qa as smoothly_table_body,ei as smoothly_table_cell,si as smoothly_table_demo,ii as smoothly_table_demo_colspan,ni as smoothly_table_demo_filler_row,ci as smoothly_table_demo_group,mi as smoothly_table_demo_nested_no_cell,bi as smoothly_table_demo_nested_no_cell_inner,pi as smoothly_table_demo_simple,ki as smoothly_table_expandable_cell,wi as smoothly_table_expandable_row,Ci as smoothly_table_filler_row,zi as smoothly_table_foot,Ti as smoothly_table_head,ji as smoothly_table_row,Ri as smoothly_table_row_group,Ai as smoothly_tabs,Mi as smoothly_tabs_demo,Oi as smoothly_theme_color,Hi as smoothly_theme_color_variant,Ui as smoothly_theme_colors,Yi as smoothly_theme_demo,Bi as smoothly_theme_guide,Gi as smoothly_theme_picker,qi as smoothly_toggle_switch,Ji as smoothly_toggle_switch_demo,Qi as smoothly_trigger};
|
|
2
|
+
//# sourceMappingURL=p-53cbd170.entry.js.map
|