UNPKG

omii-ui

Version:

使用OMII开发的WebComponents库,样式采用bootstrap。可以作为标准的esmodule使用

59 lines 96.7 kB
var $r=Object.defineProperty;var Cr=Object.getPrototypeOf;var Nr=Reflect.get;var Lr=(t,e,s)=>e in t?$r(t,e,{enumerable:!0,configurable:!0,writable:!0,value:s}):t[e]=s;var l=(t,e,s)=>(Lr(t,typeof e!="symbol"?e+"":e,s),s),Rs=(t,e,s)=>{if(!e.has(t))throw TypeError("Cannot "+s)};var d=(t,e,s)=>(Rs(t,e,"read from private field"),s?s.call(t):e.get(t)),m=(t,e,s)=>{if(e.has(t))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(t):e.set(t,s)},h=(t,e,s,o)=>(Rs(t,e,"write to private field"),o?o.call(t,s):e.set(t,s),s),Es=(t,e,s,o)=>({set _(i){h(t,e,i,s)},get _(){return d(t,e,o)}}),Ye=(t,e,s)=>(Rs(t,e,"access private method"),s),$t=(t,e,s)=>Nr(Cr(t),s,e);var Tr=(t,e=!1)=>(t=t.replace(/\n/g,"").replace(/<br\/?>/gi,` `).replace(/<div[^>]*>/gi,` `).replace(/<[^>]*\/?>/gi,"").replace(/&nbsp;/gi," ").replace(/&amp;/gi,"&").replace(/&lt;/gi,"<").replace(/&gt;/gi,">").replace(/&quot;/gi,'"'),e&&(t=t.replace(/\n/ig,"")),t),Rr=t=>{let e=new Date;return e.getFullYear()==t.getFullYear()&&e.getMonth()==t.getMonth()&&e.getDate()==t.getDate()},Er=t=>{let e=new Date;return e.getFullYear()==t.getFullYear()&&e.getMonth()==t.getMonth()&&e.getDate()==t.getDate()+1},ts=t=>{if(!t)return null;let e=t.match(/\.\w+$/);return e?e.toString().toLowerCase():null},ss=t=>{if(!t)return null;let e=t.lastIndexOf(".");return e==-1?t:t.substring(0,e)};var Pr=["B","KB","MB","GB","TB","PB"],Ps=t=>{t=Number.parseInt(t);let e=t,s=0;for(;e>1024;)e/=1024,s++;return e.toFixed(s==0?0:2)+Pr[s]},Ar=(t,e)=>{let s=document.createElement("a");s.download=e,s.href=t,s.target="_blank",s.click()},Or=(t,e)=>{window.chrome.extension?t():e()},os=t=>{t.offsetHeight},Br=[[[".doc",".docx"],"word"],[[".ppt",".pptx"],"powerpoint"],[[".xls",".xlsx"],"excel"],[[".zip",".rar"],"zip"],[[".pdf"],"pdf"]],Ct=t=>{if(!t)return"file";t=t.toLowerCase();let e=Br.find(s=>s[0].includes(t));return e==null?"file":e[1]};var ho={tryExtension:Or,getFileType:Ct,downloadUrl:Ar,getName:ss,getExtension:ts,cleanHTML:Tr,isToday:Rr,isYesterday:Er,formatSize:Ps};var _r=import.meta.url,Ir="sortable.core.esm.js",fo=new URL("./sortablejs/",_r).href,F=null,W={AutoScroll:!1,Remove:!1,Revert:!1,MultiDrag:!1,Swap:!1};async function Dr({autoScroll:t,remove:e,revert:s,multiDrag:o,swap:i}={autoScroll:!0,remove:!0,revert:!0,multiDrag:!1,swap:!1},r=fo){F||(F=await import(new URL(Ir,r).href)),t&&!W.AutoScroll&&(W.AutoScroll=!0,F.Sortable.mount(new F.AutoScroll));let[a,n]=F.OnSpill;return e&&!W.Remove&&(W.Remove=!0,F.Sortable.mount(a)),e&&!W.Remove&&(W.Remove=!0,F.Sortable.mount(a)),s&&!W.Remove&&(W.Revert=!0,F.Sortable.mount(n)),o&&!W.MultiDrag&&(W.MultiDrag=!0,F.Sortable.mount(new F.MultiDrag)),i&&!W.Swap&&(W.Swap=!0,F.Sortable.mount(new F.Swap)),F.Sortable}function Hr(t){fo=t}var ct={use:Dr,setRoot:Hr};var{define:qa,h:Ya,Component:Ur}=omii,g=class extends Ur{};var mo=` :host{height:100%;display:block}.tabs{width:100%;display:flex;height:100%;flex-direction:column}.tabs .navs .nav{display:inline-block;padding:var(--oi-tab-nav-padding, 0.3rem 1rem);line-height:var(--oi-tab-nav-line-height, 1.2);font:var(--oi-tab-nav-font, 1.2rem arial, sans-serif);color:var(--oi-tab-nav-color);margin-right:.2rem;cursor:pointer;border-top:var(--oi-tab-nav-border-top, 1px solid transparent);border-right:var(--oi-tab-nav-border-right, 1px solid transparent);border-bottom:var(--oi-tab-nav-border-bottom, 1px solid transparent);border-left:var(--oi-tab-nav-border-left, 1px solid transparent)}.tabs .navs .nav.active{border-top:var(--oi-tab-nav-active-border-top, 1px solid transparent);border-right:var(--oi-tab-nav-active-border-right, 1px solid transparent);border-bottom:var(--oi-tab-nav-active-border-bottom, 1px solid #0d6efd);border-left:var(--oi-tab-nav-active-border-left, 1px solid transparent);font:var(--oi-tab-nav-active-font, bold 1.2rem arial, sans-serif);color:var(--oi-tab-nav-active-color, var(--oi-primary))}.tabs .navs .nav:hover{border-top:var(--oi-tab-nav-hover-border-top, 1px solid transparent);border-right:var(--oi-tab-nav-hover-border-right, 1px solid transparent);border-bottom:var(--oi-tab-nav-hover-border-bottom, 1px solid #0d6efd);border-left:var(--oi-tab-nav-hover-border-left, 1px solid transparent);font:var(--oi-tab-nav-hover-font, bold 1.2rem arial, sans-serif);color:var(--oi-tab-nav-hover-color, var(--oi-primary))}.tabs .panes{flex:1 0 auto;padding:var(--oi-tab-nav-panes-padding, 0rem)}.tabs .panes .pane{display:none;height:100%}.tabs .panes .pane.active{display:block}.tabs .panes oi-loading{width:var(--oi-tab-loading-size, 3rem);height:var(--oi-tab-loading-size, 3rem);display:block;margin:auto}`;var{h:dt,Component:en,classNames:go,render:tn}=omii,ge=class extends g{get activeIndex(){return this.$props.activeIndex??0}get activeKey(){return this.$props.activeKey}async active({index:t,key:e},s=null){(s==null||s==this.$props.activeEvent)&&(this.activeKey?this.update$Props({activeKey:e},{ignoreAttrs:!0,updateSelf:!0}):this.update$Props({activeIndex:t},{ignoreAttrs:!0,updateSelf:!0}))}get slotPanes(){return this.$("slot")?.assignedElements()}async render(t){let e=this.$props,s=t.items??e.items,o=[],i=[];for(let r=0;r<(s??[]).length;r++){let a=s[r],n=this.activeKey?this.activeKey==a.key:r==this.activeIndex,p=a.pane;i.push(dt("div",{key:`pane-${a.key??r}`,className:go("pane",{active:n})},p)),o.push(dt("div",{key:`nav-${a.key??r}`,className:go("nav",{active:n}),onMouseEnter:()=>this.active({index:r,key:a.key},"hover"),onclick:()=>this.active({index:r,key:a.key},"click")},a.nav??a.name??a.key))}return dt("div",{class:"tabs"},dt("div",{class:"navs"},o),dt("div",{class:"panes"},i,dt("slot",null)))}};l(ge,"css",mo),l(ge,"defaultProps",{activeIndex:null,activeKey:null,activeEvent:"click"}),l(ge,"propTypes",{activeIndex:Number,activeKey:String,activeEvent:String});var Ge={BUNDLE:"bundle",SINGLE:"single"},Nt={FILLED:"filled",OUTLINED:"outlined",ROUND:"round",SHARP:"sharp",TWO_TONE:"two-tone",FILE_TYPE:"file-type"};var{define:nn,h:bo,Component:ln}=omii,Lt=Ge.SINGLE,As=Nt.FILLED,vo=new Map,Os=async(t,e,s)=>{e=e??As,e==Nt.FILE_TYPE&&(s=Ge.BUNDLE);try{if((s??Lt)==Ge.BUNDLE){let{default:o}=await import(`./icons/${e}.js`);return o[t]}else{let o=`${e}:${t}`,i=vo.get(o);if(i==null){i={icon:!1,resolves:[]},vo.set(o,i);try{let{default:r}=await import(`./icons/${e}/${t}.js`);i.icon=r}catch{i.icon=null}for(let r of i.resolves)r(i.icon);return i.resolves=[],i.icon}return i.icon===!1?new Promise((r,a)=>{i.resolves.push(r)}):i.icon}}catch(o){return console.error("load icon error",t,e,o),null}},Mr=async(t,e,s,o={})=>{let i=await Os(t,e,s);return bo("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",...o},i)},K=class extends g{static useBundleMode(){Lt=Ge.BUNDLE}static useSingleMode(){Lt=Ge.SINGLE}static get MODES(){return Ge}static get TYPES(){return Nt}static get Mode(){return Lt}static set Mode(t){Lt=t}static get Type(){return As}static set Type(t){As=t}css(){let{size:t,color:e}=this.$props,s=e||"var(--oi-icon-color)",o=t?`${t}rem`:"var(--oi-icon-width, 1rem)",i=t?`${t}rem`:"var(--oi-icon-height, 1rem);";return` :host svg{ fill: ${s} ; width: ${o}; height: ${i}; } `}async render(){let{name:t,type:e,viewBox:s}=this.$props,o=await Os(t,e);return bo("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:`0 0 ${s} ${s}`},o)}};l(K,"updateOnAttributeChanged",!0),l(K,"propTypes",{name:String,type:String,viewBox:Number,size:Number,color:String}),l(K,"defaultProps",{name:null,type:Nt.FILLED,viewBox:24,size:null,color:null}),l(K,"createSvg",Mr),l(K,"loadIcon",Os),l(K,"css",` :host{ vertical-align:var(--oi-icon-valign,middle) ; } svg{ vertical-align:var(--oi-icon-valign,middle) ; } `);var{h:xo}=omii,yo=new Map,Bs=async t=>{try{let e=t,s=yo.get(e);if(s==null){s={icon:!1,resolves:[]},yo.set(e,s);try{let{default:o}=await import(`./bootstrap/icons/${t}.js`);s.icon=o}catch{s.icon=null}for(let o of s.resolves)o(s.icon);return s.resolves=[],s.icon}return s.icon===!1?new Promise((o,i)=>{s.resolves.push(o)}):s.icon}catch{return console.error("load icon error",t),null}},Fr=async(t,e={})=>{let s=await Bs(t);return xo("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",part:"svg",...e},s)},X=class extends g{css(){let{size:t,color:e}=this.$props,s=e||"var(--oi-bi-color)",o=t?`${t}rem`:"var(--oi-bi-width, 1rem)",i=t?`${t}rem`:"var(--oi-bi-height, 1rem);";return` :host svg{ fill: ${s} ; width: ${o}; height: ${i}; } `}async render(){let{name:t,viewBox:e}=this.$props,s=await Bs(t);return xo("svg",{part:"svg",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 "+e+" "+e},s)}};l(X,"updateOnAttributeChanged",!0),l(X,"propTypes",{name:String,viewBox:Number,size:Number,color:String}),l(X,"defaultProps",{name:null,viewBox:16,size:null,color:null}),l(X,"createSvg",Fr),l(X,"loadIcon",Bs),l(X,"css",` :host{ vertical-align:var(--oi-bicon-valign,middle) ; } svg{ vertical-align:var(--oi-bicon-valign,middle) ; } `);var wo=` :host .rate-wrap{display:inline}`;var{define:wn,h:_s,Component:Sn,classNames:zr,render:kn}=omii,Is={STAR:"star",HALF:"star_half",BORDER:"star_border"},J,ve=class extends g{constructor(){super(...arguments);m(this,J,-1)}get rateScore(){return this.$props.score}install(){h(this,J,this.$props.score)}rate(e){this.fire("rate",e),h(this,J,e),this.update$Props({score:e})}render(e){let s=this.$props,{maxScore:o,rateable:i,size:r,color:a}=s,n=[],p=d(this,J);for(let c=0;c<o;c++)p-c>=.5?n.push(Is.STAR):p-c>0?n.push(Is.HALF):n.push(Is.BORDER);return _s("div",{class:zr("rate-wrap","rate-"+d(this,J))},n.map((c,f)=>i?_s("oi-icon",{name:c,size:r,color:a,className:c,onmouseenter:u=>{u.preventDefault(),u.stopPropagation(),h(this,J,f+1),this.fire("tryRate",d(this,J)),this.lazyUpdate()},onmouseleave:u=>{u.preventDefault(),u.stopPropagation(),h(this,J,this.rateScore),this.lazyUpdate()},onclick:u=>{u.preventDefault(),u.stopPropagation(),this.rate(f+1)}}):_s("oi-icon",{name:c,size:r,color:a,className:c})))}};J=new WeakMap,l(ve,"css",wo),l(ve,"defaultProps",{rateable:!1,maxScore:5,score:0,color:null,size:1}),l(ve,"propTypes",{rateable:Boolean,maxScore:Number,score:Number,size:Number,color:String});var So=` :host{display:block}.pager{margin:0 auto}.pager div{padding:var(--oi-pager-page-padding, 0.375rem 0.75rem);line-height:var(--oi-pager-page-line-height, 1.2);text-align:center;display:inline-block;border:0;border-radius:.2rem;background-color:var(--oi-pager-page-bgcolor, #fff);color:var(--oi-pager-page-color, black);margin-right:.3rem;user-select:none;font-size:1.25rem;cursor:pointer;vertical-align:bottom}.pager .first,.pager .last,.pager .prev,.pager .next{font-size:0}.pager .first.disable,.pager .last.disable,.pager .prev.disable,.pager .next.disable{color:var(--oi-pager-disable-color, #ccc);cursor:not-allowed;--oi-icon-color: var(--oi-pager-disable-color, #ccc)}.pager .info{width:auto;cursor:auto;color:var(--oi-pager-info-color, #0d6efd);background-color:var(--oi-pager-info-bgcolor, transparent)}.pager .info .curr{color:var(--oi-pager-info-curr-color, red)}.pager .jumper{width:fit-content;padding:.175rem}.pager .jumper .jump-to{width:3em;padding:0;box-sizing:border-box;height:min-content}.pager .active{background-color:var(--oi-pager-page-active-bgcolor, #0d6efd);color:var(--oi-pager-page-active-color, #fff)}.pager .page:hover{background-color:var(--oi-pager-page-hover-bgcolor, #6f9ab8);color:var(--oi-pager-page-hover-color, #fff)}`;var{h:_,classNames:Tt}=omii,Q=class extends g{get currPageNum(){return this.$props.pageNum}get pageCount(){let{total:t,pageSize:e,pageCount:s}=this.$props;return(t||t===0)&&e?Math.ceil(t/e):s}goto(t){let{pageCount:e}=this.$props;(t>=1||t<e)&&this.update$Props({pageNum:t}).then(()=>{this.fire("paged",t)})}render(t){return t.createLayout(t,this)}};l(Q,"css",So),l(Q,"propTypes",{pageNum:Number,pageCount:Number,pageSize:Number,total:Number,showMore:Boolean}),l(Q,"defaultProps",{pageNum:1,pageCount:10,pageSize:10,linksCount:10,showMore:!0,prev:_("oi-icon",{name:"keyboard_arrow_left"}),next:_("oi-icon",{name:"keyboard_arrow_right"}),first:_("oi-icon",{name:"first_page"}),last:_("oi-icon",{name:"last_page"}),createPrev(t,e){let{pageNum:s,prev:o}=t;return _("div",{class:Tt("prev",{disable:s<=1}),onClick:i=>{s>1&&e.goto(s-1)}},o)},createNext(t,e){let{pageNum:s,next:o}=t,{pageCount:i}=e;return _("div",{class:Tt("next",{disable:s>=i}),onClick:r=>{i>s&&e.goto(s+1)}},o)},createFirst(t,e){let{first:s,pageNum:o}=t;return _("div",{class:Tt("first",{disable:o<=1}),onClick:i=>{o!=1&&e.goto(1)}},s)},createLast(t,e){let{last:s,pageNum:o}=t,{pageCount:i}=e;return _("div",{class:Tt("last",{disable:o>=i}),onClick:r=>{o!=i&&e.goto(i)}},s)},createPages(t,e){let{linksCount:s,pageNum:o}=t,{pageCount:i}=e,r=Math.ceil(s/2),a=o>r?o-r:1,n=a+s-1;n>i&&(n=i),a=n-s+1;let p=[];a<1&&(a=1);for(let c=a;c<=n;c++)p.push(_("div",{className:Tt({active:o==c,page:!0}),onClick:f=>{o!=c&&e.goto(c)}},c));return p},createInfo(t,e){let{pageNum:s}=t,{pageCount:o}=e;return _("div",{class:"info"},_("span",{class:"curr"},s),"/",_("span",{class:"total"},o))},createJumper(t,e){return _("div",{class:"jumper"},"\u524D\u5F80",_("input",{class:"jump-to",title:`\u8BF7\u8F93\u51651-${e.pageCount}\u7684\u6570\u5B57`,type:"number",min:"1",max:e.pageCount,onChange:s=>{let o=s.currentTarget,i=Number(o.value);i>e.pageCount&&(o.value=e.pageCount),i<1&&(o.value=1),i=Number(o.value),e.goto(i)}}),"\u9875")},createLayout(t,e){let{createFirst:s,createPrev:o,createPages:i,createNext:r,createLast:a,createJumper:n,createInfo:p}=t;return _("div",{class:"pager"},s(t,e),o(t,e),i(t,e),r(t,e),a(t,e),n(t,e),p(t,e))}});var ko=` .info .page-link{border-color:rgba(0,0,0,0)}.info .page-link .total{color:var(--oi-gray-dark)}.jumper .page-link{border-color:rgba(0,0,0,0)}.jump-to{margin:0;padding:0;border:0;outline:var(--oi-gray-dark) solid 1px}.pagination{margin:0}`;var is=["accordion","alert","badge","breadcrumb","button-group","buttons","card","carousel","close","containers","dropdown","forms","grid","images","list-group","modal","nav","navbar","offcanvas","pagination","placeholders","popover","progress","reboot","root","scrollbar","spinners","tables","toasts","tooltip","transitions","utilities"];var{render:jr,define:_n,h:Wr,Component:In,setTheme:Kr}=omii,Hs="bootstrap";function Vr(t){Hs=t,be=new URL(`./${Hs}/`,import.meta.url).href}var be=new URL(`./${Hs}/`,import.meta.url).href;function qr(t){be=t}var rs=(t,e=be)=>fetch(Us(t,e)).then(s=>{if(s.ok)return s.text();console.error(`load stylesheet ${t} error`,s)}).catch(s=>(console.error(`load stylesheet ${t} error`,s),null)),Yr=t=>rs=t,$o=(t,e,s=be)=>{let o=Wr("link",{rel:"styleSheet",href:Us(t,s)});jr(o,e??"body")},Gr=(t,e=be)=>{$o("reboot",t,e)},Us=(t,e=be)=>{try{return new URL(`./${t}.css`,e).href}catch(s){console.error(s,t,e)}},Ds=new Map,as=async(t,e=be)=>{let s=`${e}/${t}`,o=Ds.get(s);if(o===void 0){let i=[];Ds.set(s,i),o=new CSSStyleSheet;try{o.replaceSync(await rs(t,e)),i.forEach(r=>{r(o)}),Ds.set(s,o)}catch(r){console.error("get css stylesheets error",r)}}else if(o instanceof Array)return new Promise(i=>{o.push(i)});return o},y=(...t)=>Promise.all(t.map(e=>as(e))),Co={};is.forEach(t=>{Object.defineProperty(Co,t,{get:function(){return as(t)}})});var Xr=(t=is)=>{t.forEach(e=>{as(e)})},Jr=async(t,e=be)=>{let s=await rs(`theme.${t}`,e);Kr(s)},O=(t,e,s=1)=>{if(e instanceof Array&&e.length&&typeof s=="number"&&t.classList){let o=0,i=(r=[])=>{let a=o%e.length,{classNames:n,duration:p=0,delay:c=0,callback:f=null}=e[a];setTimeout(()=>{typeof n=="string"&&(n=n.split(" ").filter(v=>v!="")),t.classList.remove(...r),t.classList.add(...n),f&&f(t,n,p,c)},c*1e3),o++,!(Math.floor(o/e.length)>=s)&&setTimeout(()=>{i(n)},(p+c)*1e3)};i()}},No={StyleSheets:is,CSSStyleSheets:Co,setBaseUrl:qr,setBaseRoot:Vr,loadStyleSheet:rs,setStyleSheetLoader:Yr,addStyleSheet:$o,addRebootStyleSheet:Gr,getStyleSheetUrl:Us,getCSSStyleSheet:as,getCSSStyleSheets:y,useTheme:Jr,timingClassNames:O,preLoad:Xr};var{h:C,classNames:Rt,extractClass:Qr}=omii,pt=class extends Q{},ye=pt;l(ye,"css",[()=>y("reboot","pagination","utilities"),ko]),l(ye,"defaultProps",{...$t(pt,pt,"defaultProps"),align:"left",createPrev(t,e){let{pageNum:s,prev:o}=t;return C("li",{class:Rt("page-item",{disabled:s<=1})},C("a",{class:"page-link",href:"#","aria-label":"Previous",onClick:i=>{s>1&&e.goto(s-1),i.preventDefault(),i.stopPropagation()}},C("span",{"aria-hidden":"true"},"\u2039")))},createNext(t,e){let{pageNum:s,next:o}=t,{pageCount:i}=e;return C("li",{class:Rt("page-item",{disabled:s>=i})},C("a",{class:"page-link",href:"#","aria-label":"Next",onClick:r=>{i>s&&e.goto(s+1),r.preventDefault(),r.stopPropagation()}},C("span",{"aria-hidden":"true"},"\u203A")))},createFirst(t,e){let{first:s,pageNum:o}=t;return C("li",{class:Rt("page-item",{disabled:o<=1})},C("a",{class:"page-link",href:"#","aria-label":"First",onClick:i=>{o!=1&&e.goto(1),i.preventDefault(),i.stopPropagation()}},C("span",{"aria-hidden":"true"}," \xAB")))},createLast(t,e){let{last:s,pageNum:o}=t,{pageCount:i}=e;return C("li",{class:Rt("page-item",{disabled:o>=i})},C("a",{class:"page-link",href:"#","aria-label":"Last",onClick:r=>{o!=i&&e.goto(i),r.preventDefault(),r.stopPropagation()}},C("span",{"aria-hidden":"true"},"\xBB")))},createPages(t,e){let{linksCount:s,pageNum:o}=t,{pageCount:i}=e,r=Math.ceil(s/2),a=o>r?o-r:1,n=a+s-1;n>i&&(n=i),a=n-s+1;let p=[];a<1&&(a=1);for(let c=a;c<=n;c++)p.push(C("li",{key:`pager-${c}`,className:Rt("page-item",{active:o==c,page:!0})},C("a",{class:"page-link",href:"#",onClick:f=>{o!=c&&e.goto(c),f.preventDefault(),f.stopPropagation()}},c)));return p},createInfo(t,e){let{pageNum:s}=t,{pageCount:o}=e;return C("li",{class:"info page-item"},C("span",{className:"page-link"},C("span",{class:"curr"},s),"/",C("span",{class:"total"},o)))},createJumper(t,e){return C("li",{class:"jumper page-item mx-2"},C("span",{className:"page-link"},"\u524D\u5F80",C("input",{class:"jump-to",title:`\u8BF7\u8F93\u51651-${e.pageCount}\u7684\u6570\u5B57`,type:"number",min:"1",max:e.pageCount,onChange:s=>{let o=s.currentTarget,i=Number(o.value);i>e.pageCount&&(o.value=e.pageCount),i<1&&(o.value=1),i=Number(o.value),e.goto(i)}}),"\u9875"))},createLayout(t,e){let{createFirst:s,createPrev:o,createPages:i,createNext:r,createLast:a,createJumper:n,createInfo:p}=t;return C("nav",null,C("ul",{...Qr(t,"pagination",{"justify-content-end":t.align=="right","justify-content-center":t.align=="center"})},s(t,e),o(t,e),i(t,e),r(t,e),a(t,e),n(t,e),p(t,e)))}}),l(ye,"propTypes",{...$t(pt,pt,"propTypes"),align:String});var Lo=` :host{display:block}`;var To=` :host{display:block;margin:.3rem 0;color:var(--oi-tree-node-color, black)}:host .node{position:relative}:host .node .element{display:flex;align-items:center;user-select:none;cursor:pointer;position:relative;align-items:center;font:var(--oi-tree-node-font)}:host .node .element .label{display:inline-block}:host .node .element .expander-wrap{width:1.2rem;align-items:center;display:flex}:host .node .element .expander-wrap>oi-icon{display:flex;transition:transform .35s ease}:host .node .element:hover{background-color:var(--oi-tree-node-hover-bgcolor, #cfe2ff);color:var(--oi-tree-node-hover-color, black);--oi-tree-node-expander-wrap-color: black}:host .node .element.selected{background-color:var(--oi-tree-node-selected-bgcolor, #9ec5fe);color:var(--oi-tree-node-selected-color, black)}:host .node .element oi-loading{position:absolute;transform:scale(0.8);transform-origin:left top}:host .node .element input[type=checkbox],:host .node .element input[type=radio]{width:1rem;height:1rem;vertical-align:top}:host .node .element .checkbox-placeholder{display:inline-block;width:1rem;margin:3px}:host .node .element .radio-placeholder{display:inline-block;width:1rem;margin:3px}:host .node .children{display:none}:host .node.hover .children.empty{display:block;height:2em;border:#cfe2ff 1px dotted}:host .node.expanded .expander-wrap>oi-icon{transform:rotate(90deg);transform-origin:center center}:host .node.expanded .children{display:block}:host(.sortable-ghost){pointer-events:none}:host(.sortable-drag){border:dotted 1px #9ec5fe}`;var{h:Z,classNames:ns,define:Zr,getHost:Ms,throttle:Gn}=omii,ut,Et,zs=class extends g{constructor(){super();m(this,ut,void 0);m(this,Et,void 0)}get tree(){return this.$props.tree}get checkboxTree(){return this.tree.$props.checkboxTree}get radioTree(){return this.tree.$props.radioTree}get sortable(){return this.tree.$props.sortable}get selected(){return this.node.selected??this.tree.isSelected(this.key)}get checked(){return this.node.checked??this.tree.isChecked(this.key)}get radioed(){return this.node.radioed??this.tree.isRadioed(this.key)}get expanded(){return this.node.expanded??this.tree.isExpanded(this.key)}get expander(){return this.node.expander??this.$props.expander??this.tree.$props.expander}get node(){return this.$props.node??{}}get nodes(){return d(this,ut)}get noChildren(){return!this.nodes||this.nodes.length==0}get path(){let s=this.parentTreeNode;return(s?s.path:"")+"/"+this.key}get parentTreeNode(){let s=Ms(this);return s instanceof zs?s:null}get key(){return this.node.key??`node-${this.elementId}`}get level(){return this.$props.nodeLevel??0}expand(){this.tree.expand(this.key,!1),this.node.expanded=!0,this.updateSelf(),this.tree.fire("nodeExpand",{node:this.node,treeNode:this})}collapse(){this.tree.collapse(this.key,!1),this.node.expanded=!1,this.updateSelf(),this.tree.fire("nodeCollapse",{node:this.node,treeNode:this})}select(){this.tree.select(this.key,!1),this.tree.$props.multiSelect?this.updateSelf():(this.tree.__selectedNode&&this.tree.__selectedNode.updateSelf(),this.tree.__selectedNode=this,this.updateSelf()),this.tree.fire("nodeSelect",{node:this.node,treeNode:this})}unselect(){return this.unSelect()}unSelect(){this.tree.unselect(this.key,!1),this.updateSelf(),this.tree.fire("nodeUnSelect",{node:this.node,treeNode:this})}check(){this.tree.check(this.key,!1),this.tree.fire("nodeCheck",{node:this.node,treeNode:this})}uncheck(){this.tree.uncheck(this.key,!1),this.tree.fire("nodeUnCheck",{node:this.node,treeNode:this})}radio(){this.tree.radio(this.key,!1),this.tree.fire("nodeRadio",{node:this.node,treeNode:this}),this.tree.__radioedNode&&this.tree.__radioedNode.updateSelf(),this.tree.__radioedNode=this}unradio(){this.tree.unradio(this.key,!1),this.tree.fire("nodeUnRadio",{node:this.node,treeNode:this})}toggle(){this.expanded?this.collapse():this.expand()}get $checkbox(){return this.checkboxTree?this.node.allowCheck!==!1?Z("input",{type:"checkbox",class:"form-check-input",disabled:this.node.disabled===!0,checked:this.checked,onClick:s=>{s.stopPropagation()},onChange:s=>{s.currentTarget.checked?this.check():this.uncheck()}}):Z("div",{class:"checkbox-placeholder"}):null}get $radio(){return this.radioed&&(this.tree.__radioedNode=this),this.radioTree?this.node.allowCheck!==!1?Z("input",{type:"radio",disabled:this.node.disabled===!0,checked:this.radioed,onClick:s=>{s.stopPropagation()},onChange:s=>{s.currentTarget.checked?this.radio():this.unradio()}}):Z("div",{class:"radio-placeholder"}):null}install(){}get Sortable(){return d(this,Et)}async installed(){if(super.installed(),this.sortable){let s=await ct.use();h(this,Et,s.create(this.$(".children"),{delay:150,handle:".element",fallbackOnBody:!0,invertSwap:!0,group:this.tree.sortGroup,onEnd:o=>{let i=Ms(o.from),r=Ms(o.to),a=i.nodes,n=r.nodes;n||(n=[],r.node.children=n),this.tree.fire("sorted",{fromNode:i.node,fromNodes:a,toNode:r.node,toNodes:n,fromIndex:o.oldIndex,toIndex:o.newIndex})}}))}}async render(s){this.node.selected===!0&&this.tree.select(this.key,!1),this.node.checked===!0&&this.tree.check(this.key,!1),this.node.radioed===!0&&this.tree.radio(this.key,!1),this.node.expanded===!0&&this.tree.expand(this.key,!1),this.node.selected===!1&&this.tree.unselect(this.key,!1),this.node.checked===!1&&this.tree.uncheck(this.key,!1),this.node.radioed===!1&&this.tree.unradio(this.key,!1),this.node.expanded===!1&&this.tree.collapse(this.key,!1);let{node:o,cssss:i}=s;!this.tree.$props.multiSelect&&this.selected&&(this.tree.__selectedNode=this);let r=o.element??o.label??o.key;typeof r=="function"&&(r=await r(o,s,this));let a=null,n=h(this,ut,o.children);return typeof n=="function"&&this.expanded&&h(this,ut,n=await n(o,s,this)),a=Z("div",{class:ns("children",{expanded:this.expanded,sortable:this.sortable,empty:this.noChildren})},this.expanded&&(n instanceof Array?n.map(p=>Z("oi-tree-node",{node:p,"node-level":this.level+1,tree:this.tree,cssss:i})):n)),Z("div",{class:ns("node",{expanded:this.expanded,"no-children":this.noChildren})},Z("div",{class:ns("element",{selected:this.selected}),style:`padding-left:calc(${this.level} * var(--oi-tree-node-indent,1rem))`,onClick:p=>{p.stopPropagation(),this.selected&&p.ctrlKey===!0?this.unselect():this.select()}},Z("div",{onClick:p=>{p.stopPropagation(),this.toggle()},class:ns("expander-wrap",{"no-children":this.noChildren})},!this.noChildren&&this.expander),this.$checkbox,this.$radio,Z("div",{class:"label"},r)),a)}},Xe=zs;ut=new WeakMap,Et=new WeakMap,l(Xe,"css",To),l(Xe,"defaultProps",{cssss:null,nodeLevel:0,ignoreAttrs:!0,expander:null}),l(Xe,"propTypes",{nodeLevel:Number,ignoreAttrs:Boolean});Zr("oi-tree-node",Xe);var Fs=Xe;var{h:js,purgeCSSSS:ea,getHost:ls,classNames:ta}=omii;var Pt,xe=class extends g{constructor(){super(...arguments);m(this,Pt,void 0)}get sortGroup(){return this.$props.sortGroup??`sort-${this.elementId}`}get selectedKeys(){return this.$props.selectedKeys}get selectedKey(){return this.$props.selectedKey}get expandedKeys(){return this.$props.expandedKeys}get checkedKeys(){return this.$props.checkedKeys}get radioedKey(){return this.$props.radioedKey}get Sortable(){return d(this,Pt)}isSelected(e){let{multiSelect:s,selectedKey:o,selectedKeys:i}=this.$props;return s?(i??[]).some(r=>r==e):o!=null&&o==e}select(e,s=!0){let{multiSelect:o,selectedKeys:i}=this.$props;o?i.some(r=>r==e)||i.push(e):this.$props.selectedKey=e,s&&this.update()}unselect(e,s=!0){return this.unSelect(e,s)}unSelect(e,s=!0){let{multiSelect:o,selectedKeys:i}=this.$props;if(!o)this.$props.selectedKey=null;else{let r=i.indexOf(e);r!=-1&&i.splice(r,1)}s&&this.update()}isChecked(e){let{checkboxTree:s,checkedKeys:o}=this.$props;return s?(o??[]).some(i=>i==e):!1}check(e,s=!0){let{checkboxTree:o,checkedKeys:i}=this.$props;o&&i.indexOf(e)==-1&&i.push(e),s&&this.update()}uncheck(e,s=!0){let{checkboxTree:o,checkedKeys:i}=this.$props;if(o){let r=i.indexOf(e);r!=-1&&i.splice(r,1)}s&&this.update()}isRadioed(e){let{radioTree:s,radioedKey:o}=this.$props;return s?o!=null&&o==e:!1}radio(e,s=!0){let{radioTree:o}=this.$props;o&&(this.$props.radioedKey=e),s&&this.update()}unradio(e=!0){let{radioTree:s}=this.$props;s&&(this.$props.radioedKey=null),e&&this.update()}isExpanded(e){let{expandedKeys:s}=this.$props;return(s??[]).some(o=>o==e)}expand(e,s=!0){let{expandedKeys:o}=this.$props;o.indexOf(e)==-1&&o.push(e),s&&this.update()}collapse(e,s=!0){let{expandedKeys:o}=this.$props,i=o.indexOf(e);i!=-1&&o.splice(i,1),s&&this.update()}collapseAll(e=!0){this.expandedKeys.forEach(s=>{this.collapse(s,!1)}),e&&this.update()}async installed(){if(this.$props.sortable){let e=await ct.use();h(this,Pt,e.create(this.rootNode,{delay:150,fallbackOnBody:!0,invertSwap:!0,group:this.sortGroup,onEnd:s=>{let o=ls(s.from),i=ls(s.to),r=o.nodes,a=i.nodes;this.fire("sorted",{fromNode:o.node,fromNodes:r,toNode:i.node,toNodes:a,fromIndex:s.oldIndex,toIndex:s.newIndex})}}))}}get nodes(){let e=this.$props.nodes,s=ls(this);return typeof e=="function"&&(e=e.call(s)),e}set nodes(e){this.$props.nodes=e}render(){let e=ls(this),s=ea(this.$props.nodeCss,e);return js("div",{class:ta("tree-container",{sortable:this.sortable})},this.nodes.map(o=>js("oi-tree-node",{node:o,tree:this,cssss:s})))}};Pt=new WeakMap,l(xe,"css",Lo),l(xe,"defaultProps",{nodeCss:null,radioTree:!1,checkboxTree:!1,multiSelect:!1,sortable:!1,sortGroup:null,ignoreAttrs:!0,selectedKey:null,selectedKeys:[],expandedKeys:[],checkedKeys:[],radioedKey:null,nodes:[],expander:js("oi-icon",{name:"keyboard_arrow_right",class:"expander"})}),l(xe,"propTypes",{ignoreAttrs:Boolean,multiSelect:Boolean,sortable:Boolean,selectedKey:String,selectedKeys:Array,expandedKeys:Array,checkedKeys:Array,radioedKey:String,nodes:Array});var{h:rl,classNames:al}=omii,cs=new Map,At,re=class extends g{constructor(){super(...arguments);m(this,At,void 0)}css(){let{size:e,color:s}=this.$props,o="2rem";if(e)o=`${e}rem`;else{let a=this.parentNode?.host??this.parentNode;a?o=`${a.offsetHeight}px`:o="2rem"}let i=` :host{ --oi-loading-size:${o}; } `,r="";return s&&(r=` :host { --oi-loading-color:${s}; } `),` ${d(this,At)} ${i} ${r} `}async getLoadingConfig(){let{name:e}=this.$props,s=e,o=cs.get(s);if(o==null){o=[],cs.set(s,o);try{let{default:i}=await import(`./loadings/${e}.js`);cs.set(s,i);for(let{resolve:r}of o)r(i);return i}catch{cs.set(s,null);for(let{resolve:i}of o)i(null);return null}}return o instanceof Array?new Promise((i,r)=>{o.push({resolve:i,reject:r})}):o}async render(){let{template:e,css:s}=await this.getLoadingConfig();return h(this,At,s),e}};At=new WeakMap,l(re,"updateOnAttributeChanged",!0),l(re,"css",` :host{ display:inline-block; } `),l(re,"defaultProps",{name:"circle",size:null,color:null}),l(re,"propTypes",{name:String,size:Number,color:String});var ht={HORIZONTAL:"horizontal",VERTICAL:"vertical"},Ws="show",ds="collapse",Ks="collapsing",sa="collapse-horizontal",Vs=.35,qs=(t,e)=>e||(t.classList.contains(sa)?ht.HORIZONTAL:ht.VERTICAL),Ro={show(t,e=Vs,s=null){return new Promise(o=>{s=qs(t,s),O(t,[{classNames:[ds]},{classNames:[Ks],duration:e,callback(i){i.style[s==ht.VERTICAL?"height":"width"]=`${i[s==ht.VERTICAL?"scrollHeight":"scrollWidth"]}px`}},{classNames:[ds,Ws],callback(i){i.style[s==ht.VERTICAL?"height":"width"]="",o()}}])})},hide(t,e=Vs,s=null){return new Promise(o=>{s=qs(t,s);let i=s==ht.VERTICAL?"height":"width";t.style[i]=`${t.getBoundingClientRect()[i]}px`,os(t.offsetHeight),O(t,[{classNames:[Ks,ds,Ws]},{classNames:[Ks],duration:e,callback(r){r.style[i]=""}},{classNames:[ds],callback:o}])})},toggle(t,e=Vs,s=null){return s=qs(t,s),t.classList.contains(Ws)?this.hide(t,e,s):this.show(t,e,s)}};var Ot="fade",Ys="show",Gs=.15,Eo={show(t,e=Gs){return new Promise(s=>{O(t,[{classNames:[Ot]},{classNames:[Ot,Ys],duration:e,callback:s}])})},hide(t,e=Gs){return new Promise(s=>{O(t,[{classNames:[Ot,Ys]},{classNames:[Ot],duration:e,callback:s}])})},toggle(t,e=Gs){return t.classList.contains(Ot)&&!t.classList.contains(Ys)?this.show(t,e):this.hide(t,e)}};var T={collapse:Ro,fade:Eo};var{h:Xs,classNames:oa}=omii;var ia="show",Bt,we=class extends g{constructor(){super(...arguments);m(this,Bt,!1)}css(){return` .fade { transition: opacity ${this.$props.transitionDuration}s linear }`}close(){this.$("div.alert").classList.remove(ia),h(this,Bt,!0),setTimeout(()=>{this.update(!0,!0)},this.$props.transitionDuration*1e3)}render(){let{themeColor:e,closeable:s}=this.$props;return d(this,Bt)?null:Xs("div",{className:oa("alert",`alert-${e}`,{"alert-dismissible":s,fade:s,show:s}),role:"alert"},Xs("slot",null),s?Xs("button",{type:"button",class:"btn-close","aria-label":"Close",onClick:()=>{this.close()}}):null)}};Bt=new WeakMap,l(we,"css",()=>y("reboot","utilities","alert","close","transitions")),l(we,"defaultProps",{themeColor:"primary",closeable:!1,transitionDuration:.15}),l(we,"propTypes",{themeColor:String,closeable:Boolean,transitionDuration:Number});var{h:ft,classNames:Js}=omii,ps={HORIZONTAL:"horizontal",VERTICAL:"vertical"},ra="collapsed",mt,us,Se=class extends g{constructor(){super(...arguments);m(this,mt)}static get DIRECTIONS(){return ps}css(){return` .collapsing { transition-duration: ${this.$props.transitionDuration}s ; }`}install(){let{items:e,alwayOpen:s,firstOpen:o}=this.$props;if(e.length>0&&o&&(e[0].opened=!0),!s){let i=e.filter(r=>r.opened);if(i.length){let r=i.shift();r.opened=!0,i.forEach(a=>a.opened=!1)}}}get dimension(){return this.setting.direction==ps.HORIZONTAL?WIDTH:HEIGHT}toggle(e){let{items:s,alwayOpen:o}=this.$props;if(o)Ye(this,mt,us).call(this,e);else{let i=s.findIndex(a=>a.opened),r=i==-1?null:s[i];r&&r!=e&&Ye(this,mt,us).call(this,r),Ye(this,mt,us).call(this,e)}}render(){let{items:e,direction:s}=this.$props;return ft("div",{class:Js("accordion",{"collapse-horizontal":s==ps.HORIZONTAL})},e.map((o,i)=>ft("div",{class:"accordion-item",key:o.key??`item-${i}`},ft("h2",{class:"accordion-header"},ft("button",{class:Js("accordion-button",{collapsed:!o.opened}),type:"button","aria-expanded":o.opened,onClick:r=>{this.toggle(o)}},o.header)),ft("div",{class:Js("accordion-collapse",{collapse:!0,show:o.opened})},ft("div",{class:"accordion-body"},typeof o.body=="function"?o.body(o,this.$props,this):o.body)))))}};mt=new WeakSet,us=function(e){let{items:s,transitionDuration:o}=this.$props,i=s.indexOf(e),r=this.$(`.accordion>.accordion-item:nth-child(${i+1})`),a=r.querySelector(".accordion-collapse"),n=r.querySelector(".accordion-button");e.opened=!e.opened,n.classList.toggle(ra,!e.opened),e.opened?(T.collapse.show(a),this.fire("collapseShow",e)):(T.collapse.hide(a),this.fire("collapseHide",e))},l(Se,"css",()=>y("reboot","utilities","accordion","close","transitions")),l(Se,"defaultProps",{alwayOpen:!1,firstOpen:!1,transitionDuration:.35,direction:ps.VERTICAL}),l(Se,"propTypes",{alwayOpen:Boolean,firstOpen:Boolean,transitionDuration:Number,direction:String});var{h:_t,classNames:El}=omii,ke=class extends g{css(){let{divider:t}=this.$props;if(typeof t=="string")return`:host{--oi-breadcrumb-divider:'${t}'}`;if(typeof t=="object")return".breadcrumb-item + .breadcrumb-item::before{display:none}"}render(){let{items:t,divider:e}=this.$props;return _t("nav",{"aria-label":"breadcrumb"},_t("ol",{class:"breadcrumb"},t.map((s,o)=>o!==t.length-1?_t("li",{class:"breadcrumb-item"},typeof e=="object"&&o!=0?e:null,_t("a",{href:s.href},s.label)):_t("li",{class:"breadcrumb-item active","aria-current":"page"},typeof e=="object"&&o!=0?e:null,s.label))))}};l(ke,"css",()=>y("reboot","utilities","breadcrumb")),l(ke,"defaultProps",{}),l(ke,"propTypes",{});var Po=` .modal .modal-dialog{transition:margin-top .35s ease;margin-top:0}.modal .modal-dialog.show{margin-top:var(--oi-modal-margin)}`;var{h:D,classNames:Ao,extractClass:aa}=omii,$e=class extends g{open(){this.update$Props({visible:!0}).then(()=>{O(this.$dialog,[{classNames:"show"}])}),this.fire("open")}close(){O(this.$dialog,[{classNames:"show"},{classNames:"",duration:.15},{classNames:"",callback:()=>{this.update$Props({visible:!1})}}]),this.fire("close")}get $dialog(){return this.$(".modal-dialog")}css(){}render(t){let e=this.$props;return D(D.f,null,e.visible&&!e.staticPosition&&D("div",{class:Ao("modal-backdrop","show")}),D("div",{...aa(t,"modal",{"position-static":e.staticPosition,"d-block":e.staticPosition||e.visible}),tabindex:"-1",role:"dialog","aria-modal":"true",onClick:s=>{if(s.target===s.currentTarget){if(e.staticBackdrop)return!1;this.close()}}},D("div",{class:Ao("modal-dialog",e.size?`modal-${e.size}`:!1,{"modal-fullscreen":e.fullscreen,"modal-dialog-scrollable":e.scrollable,"modal-dialog-centered":e.vcentered})},D("div",{class:"modal-content"},D("div",{class:"modal-header"},D("slot",{name:"header"},D("h5",{class:"modal-title"},e.title),D("button",{type:"button",class:"btn-close","aria-label":"Close",onClick:s=>this.close()}))),D("div",{class:"modal-body"},D("slot",null)),D("div",{class:"modal-footer"},D("slot",{name:"footer"}))))))}};l($e,"css",[()=>y("reboot","modal","utilities","close","scrollbar"),Po]),l($e,"defaultProps",{staticPosition:!1,staticBackdrop:!1,vcentered:!1,visible:!1,title:null,scrollable:!1,fullscreen:!1,size:null}),l($e,"propTypes",{staticPosition:Boolean,staticBackdrop:Boolean,vcentered:Boolean,visible:Boolean,scrollable:Boolean,size:String,fullscreen:Boolean});function Dt(t){return t.split("-")[0]}function fs(t){return t.split("-")[1]}function Ht(t){return["top","bottom"].includes(Dt(t))?"x":"y"}function Zs(t){return t==="y"?"height":"width"}function Oo(t,e,s){let{reference:o,floating:i}=t,r=o.x+o.width/2-i.width/2,a=o.y+o.height/2-i.height/2,n=Ht(e),p=Zs(n),c=o[p]/2-i[p]/2,f=n==="x",u;switch(Dt(e)){case"top":u={x:r,y:o.y-i.height};break;case"bottom":u={x:r,y:o.y+o.height};break;case"right":u={x:o.x+o.width,y:a};break;case"left":u={x:o.x-i.width,y:a};break;default:u={x:o.x,y:o.y}}switch(fs(e)){case"start":u[n]-=c*(s&&f?-1:1);break;case"end":u[n]+=c*(s&&f?-1:1)}return u}var _o=async(t,e,s)=>{let{placement:o="bottom",strategy:i="absolute",middleware:r=[],platform:a}=s,n=r.filter(Boolean),p=await(a.isRTL==null?void 0:a.isRTL(e)),c=await a.getElementRects({reference:t,floating:e,strategy:i}),{x:f,y:u}=Oo(c,o,p),v=o,b={},k=0;for(let x=0;x<n.length;x++){let{name:w,fn:R}=n[x],{x:N,y:L,data:E,reset:I}=await R({x:f,y:u,initialPlacement:o,placement:v,strategy:i,middlewareData:b,rects:c,platform:a,elements:{reference:t,floating:e}});f=N??f,u=L??u,b={...b,[w]:{...b[w],...E}},I&&k<=50&&(k++,typeof I=="object"&&(I.placement&&(v=I.placement),I.rects&&(c=I.rects===!0?await a.getElementRects({reference:t,floating:e,strategy:i}):I.rects),{x:f,y:u}=Oo(c,v,p)),x=-1)}return{x:f,y:u,placement:v,strategy:i,middlewareData:b}};function Io(t){return typeof t!="number"?function(e){return{top:0,right:0,bottom:0,left:0,...e}}(t):{top:t,right:t,bottom:t,left:t}}function It(t){return{...t,top:t.y,left:t.x,right:t.x+t.width,bottom:t.y+t.height}}async function eo(t,e){var s;e===void 0&&(e={});let{x:o,y:i,platform:r,rects:a,elements:n,strategy:p}=t,{boundary:c="clippingAncestors",rootBoundary:f="viewport",elementContext:u="floating",altBoundary:v=!1,padding:b=0}=e,k=Io(b),x=n[v?u==="floating"?"reference":"floating":u],w=It(await r.getClippingRect({element:(s=await(r.isElement==null?void 0:r.isElement(x)))==null||s?x:x.contextElement||await(r.getDocumentElement==null?void 0:r.getDocumentElement(n.floating)),boundary:c,rootBoundary:f,strategy:p})),R=u==="floating"?{...a.floating,x:o,y:i}:a.reference,N=await(r.getOffsetParent==null?void 0:r.getOffsetParent(n.floating)),L=await(r.isElement==null?void 0:r.isElement(N))&&await(r.getScale==null?void 0:r.getScale(N))||{x:1,y:1},E=It(r.convertOffsetParentRelativeRectToViewportRelativeRect?await r.convertOffsetParentRelativeRectToViewportRelativeRect({rect:R,offsetParent:N,strategy:p}):R);return{top:(w.top-E.top+k.top)/L.y,bottom:(E.bottom-w.bottom+k.bottom)/L.y,left:(w.left-E.left+k.left)/L.x,right:(E.right-w.right+k.right)/L.x}}var na=Math.min,la=Math.max;function Qs(t,e,s){return la(t,na(e,s))}var to=t=>({name:"arrow",options:t,async fn(e){let{element:s,padding:o=0}=t??{},{x:i,y:r,placement:a,rects:n,platform:p}=e;if(s==null)return{};let c=Io(o),f={x:i,y:r},u=Ht(a),v=fs(a),b=Zs(u),k=await p.getDimensions(s),x=u==="y"?"top":"left",w=u==="y"?"bottom":"right",R=n.reference[b]+n.reference[u]-f[u]-n.floating[b],N=f[u]-n.reference[u],L=await(p.getOffsetParent==null?void 0:p.getOffsetParent(s)),E=L?u==="y"?L.clientHeight||0:L.clientWidth||0:0;E===0&&(E=n.floating[b]);let I=R/2-N/2,fe=c[x],Ve=E-k[b]-c[w],P=E/2-k[b]/2+I,M=Qs(fe,P,Ve),me=(v==="start"?c[x]:c[w])>0&&P!==M&&n.reference[b]<=n.floating[b];return{[u]:f[u]-(me?P<fe?fe-P:Ve-P:0),data:{[u]:M,centerOffset:P-M}}}}),ca={left:"right",right:"left",bottom:"top",top:"bottom"};function hs(t){return t.replace(/left|right|bottom|top/g,e=>ca[e])}function da(t,e,s){s===void 0&&(s=!1);let o=fs(t),i=Ht(t),r=Zs(i),a=i==="x"?o===(s?"end":"start")?"right":"left":o==="start"?"bottom":"top";return e.reference[r]>e.floating[r]&&(a=hs(a)),{main:a,cross:hs(a)}}var pa={start:"end",end:"start"};function Bo(t){return t.replace(/start|end/g,e=>pa[e])}var ua=["top","right","bottom","left"],jl=ua.reduce((t,e)=>t.concat(e,e+"-start",e+"-end"),[]);var Ut=function(t){return t===void 0&&(t={}),{name:"flip",options:t,async fn(e){var s;let{placement:o,middlewareData:i,rects:r,initialPlacement:a,platform:n,elements:p}=e,{mainAxis:c=!0,crossAxis:f=!0,fallbackPlacements:u,fallbackStrategy:v="bestFit",flipAlignment:b=!0,...k}=t,x=Dt(o),w=u||(x===a||!b?[hs(a)]:function(P){let M=hs(P);return[Bo(P),M,Bo(M)]}(a)),R=[a,...w],N=await eo(e,k),L=[],E=((s=i.flip)==null?void 0:s.overflows)||[];if(c&&L.push(N[x]),f){let{main:P,cross:M}=da(o,r,await(n.isRTL==null?void 0:n.isRTL(p.floating)));L.push(N[P],N[M])}if(E=[...E,{placement:o,overflows:L}],!L.every(P=>P<=0)){var I,fe;let P=((I=(fe=i.flip)==null?void 0:fe.index)!=null?I:0)+1,M=R[P];if(M)return{data:{index:P,overflows:E},reset:{placement:M}};let me="bottom";switch(v){case"bestFit":{var Ve;let es=(Ve=E.map(nt=>[nt,nt.overflows.filter(qe=>qe>0).reduce((qe,po)=>qe+po,0)]).sort((nt,qe)=>nt[1]-qe[1])[0])==null?void 0:Ve[0].placement;es&&(me=es);break}case"initialPlacement":me=a}if(o!==me)return{reset:{placement:me}}}return{}}}};var Mt=function(t){return t===void 0&&(t=0),{name:"offset",options:t,async fn(e){let{x:s,y:o}=e,i=await async function(r,a){let{placement:n,platform:p,elements:c}=r,f=await(p.isRTL==null?void 0:p.isRTL(c.floating)),u=Dt(n),v=fs(n),b=Ht(n)==="x",k=["left","top"].includes(u)?-1:1,x=f&&b?-1:1,w=typeof a=="function"?a(r):a,{mainAxis:R,crossAxis:N,alignmentAxis:L}=typeof w=="number"?{mainAxis:w,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...w};return v&&typeof L=="number"&&(N=v==="end"?-1*L:L),b?{x:N*x,y:R*k}:{x:R*k,y:N*x}}(e,t);return{x:s+i.x,y:o+i.y,data:i}}}};function ha(t){return t==="x"?"y":"x"}var Ft=function(t){return t===void 0&&(t={}),{name:"shift",options:t,async fn(e){let{x:s,y:o,placement:i}=e,{mainAxis:r=!0,crossAxis:a=!1,limiter:n={fn:w=>{let{x:R,y:N}=w;return{x:R,y:N}}},...p}=t,c={x:s,y:o},f=await eo(e,p),u=Ht(Dt(i)),v=ha(u),b=c[u],k=c[v];if(r){let w=u==="y"?"bottom":"right";b=Qs(b+f[u==="y"?"top":"left"],b,b-f[w])}if(a){let w=v==="y"?"bottom":"right";k=Qs(k+f[v==="y"?"top":"left"],k,k-f[w])}let x=n.fn({...e,[u]:b,[v]:k});return{...x,data:{x:x.x-s,y:x.y-o}}}}};function ne(t){var e;return((e=t.ownerDocument)==null?void 0:e.defaultView)||window}function ee(t){return ne(t).getComputedStyle(t)}function Ne(t){return Wo(t)?(t.nodeName||"").toLowerCase():""}var ms;function jo(){if(ms)return ms;let t=navigator.userAgentData;return t&&Array.isArray(t.brands)?(ms=t.brands.map(e=>e.brand+"/"+e.version).join(" "),ms):navigator.userAgent}function te(t){return t instanceof ne(t).HTMLElement}function ae(t){return t instanceof ne(t).Element}function Wo(t){return t instanceof ne(t).Node}function Do(t){return typeof ShadowRoot>"u"?!1:t instanceof ne(t).ShadowRoot||t instanceof ShadowRoot}function gs(t){let{overflow:e,overflowX:s,overflowY:o,display:i}=ee(t);return/auto|scroll|overlay|hidden/.test(e+o+s)&&!["inline","contents"].includes(i)}function fa(t){return["table","td","th"].includes(Ne(t))}function so(t){let e=/firefox/i.test(jo()),s=ee(t),o=s.backdropFilter||s.WebkitBackdropFilter;return s.transform!=="none"||s.perspective!=="none"||!!o&&o!=="none"||e&&s.willChange==="filter"||e&&!!s.filter&&s.filter!=="none"||["transform","perspective"].some(i=>s.willChange.includes(i))||["paint","layout","strict","content"].some(i=>{let r=s.contain;return r!=null&&r.includes(i)})}function Ko(){return!/^((?!chrome|android).)*safari/i.test(jo())}function io(t){return["html","body","#document"].includes(Ne(t))}var Ho=Math.min,zt=Math.max,Uo=Math.round,oo={x:1,y:1};function jt(t){let e=!ae(t)&&t.contextElement?t.contextElement:ae(t)?t:null;if(!e)return oo;let s=e.getBoundingClientRect(),o=ee(e);if(o.boxSizing!=="border-box")return te(e)?{x:e.offsetWidth>0&&Uo(s.width)/e.offsetWidth||1,y:e.offsetHeight>0&&Uo(s.height)/e.offsetHeight||1}:oo;let i=s.width/parseFloat(o.width),r=s.height/parseFloat(o.height);return i&&Number.isFinite(i)||(i=1),r&&Number.isFinite(r)||(r=1),{x:i,y:r}}function gt(t,e,s,o){var i,r,a,n;e===void 0&&(e=!1),s===void 0&&(s=!1);let p=t.getBoundingClientRect(),c=oo;e&&(o?ae(o)&&(c=jt(o)):c=jt(t));let f=ae(t)?ne(t):window,u=!Ko()&&s,v=(p.left+(u&&(i=(r=f.visualViewport)==null?void 0:r.offsetLeft)!=null?i:0))/c.x,b=(p.top+(u&&(a=(n=f.visualViewport)==null?void 0:n.offsetTop)!=null?a:0))/c.y,k=p.width/c.x,x=p.height/c.y;return{width:k,height:x,top:b,right:v+k,bottom:b+x,left:v,x:v,y:b}}function Ce(t){return((Wo(t)?t.ownerDocument:t.document)||window.document).documentElement}function vs(t){return ae(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.pageXOffset,scrollTop:t.pageYOffset}}function Vo(t){return gt(Ce(t)).left+vs(t).scrollLeft}function ma(t,e,s){let o=te(e),i=Ce(e),r=gt(t,!0,s==="fixed",e),a={scrollLeft:0,scrollTop:0},n={x:0,y:0};if(o||!o&&s!=="fixed")if((Ne(e)!=="body"||gs(i))&&(a=vs(e)),te(e)){let p=gt(e,!0);n.x=p.x+e.clientLeft,n.y=p.y+e.clientTop}else i&&(n.x=Vo(i));return{x:r.left+a.scrollLeft-n.x,y:r.top+a.scrollTop-n.y,width:r.width,height:r.height}}function Wt(t){if(Ne(t)==="html")return t;let e=t.assignedSlot||t.parentNode||(Do(t)?t.host:null)||Ce(t);return Do(e)?e.host:e}function Mo(t){return te(t)&&ee(t).position!=="fixed"?t.offsetParent:null}function Fo(t){let e=ne(t),s=Mo(t);for(;s&&fa(s)&&ee(s).position==="static";)s=Mo(s);return s&&(Ne(s)==="html"||Ne(s)==="body"&&ee(s).position==="static"&&!so(s))?e:s||function(o){let i=Wt(o);for(;te(i)&&!io(i);){if(so(i))return i;i=Wt(i)}return null}(t)||e}function qo(t){let e=Wt(t);return io(e)?t.ownerDocument.body:te(e)&&gs(e)?e:qo(e)}function Yo(t,e){var s;e===void 0&&(e=[]);let o=qo(t),i=o===((s=t.ownerDocument)==null?void 0:s.body),r=ne(o);return i?e.concat(r,r.visualViewport||[],gs(o)?o:[]):e.concat(o,Yo(o))}function zo(t,e,s){return e==="viewport"?It(function(o,i){let r=ne(o),a=Ce(o),n=r.visualViewport,p=a.clientWidth,c=a.clientHeight,f=0,u=0;if(n){p=n.width,c=n.height;let v=Ko();(v||!v&&i==="fixed")&&(f=n.offsetLeft,u=n.offsetTop)}return{width:p,height:c,x:f,y:u}}(t,s)):ae(e)?function(o,i){let r=gt(o,!0,i==="fixed"),a=r.top+o.clientTop,n=r.left+o.clientLeft,p=te(o)?jt(o):{x:1,y:1},c=o.clientWidth*p.x,f=o.clientHeight*p.y,u=n*p.x,v=a*p.y;return{top:v,left:u,right:u+c,bottom:v+f,x:u,y:v,width:c,height:f}}(e,s):It(function(o){var i;let r=Ce(o),a=vs(o),n=(i=o.ownerDocument)==null?void 0:i.body,p=zt(r.scrollWidth,r.clientWidth,n?n.scrollWidth:0,n?n.clientWidth:0),c=zt(r.scrollHeight,r.clientHeight,n?n.scrollHeight:0,n?n.clientHeight:0),f=-a.scrollLeft+Vo(o),u=-a.scrollTop;return ee(n||r).direction==="rtl"&&(f+=zt(r.clientWidth,n?n.clientWidth:0)-p),{width:p,height:c,x:f,y:u}}(Ce(t)))}var ga={getClippingRect:function(t){let{element:e,boundary:s,rootBoundary:o,strategy:i}=t,r=s==="clippingAncestors"?function(c,f){let u=f.get(c);if(u)return u;let v=Yo(c).filter(w=>ae(w)&&Ne(w)!=="body"),b=null,k=ee(c).position==="fixed",x=k?Wt(c):c;for(;ae(x)&&!io(x);){let w=ee(x),R=so(x);(k?R||b:R||w.position!=="static"||!b||!["absolute","fixed"].includes(b.position))?b=w:v=v.filter(N=>N!==x),x=Wt(x)}return f.set(c,v),v}(e,this._c):[].concat(s),a=[...r,o],n=a[0],p=a.reduce((c,f)=>{let u=zo(e,f,i);return c.top=zt(u.top,c.top),c.right=Ho(u.right,c.right),c.bottom=Ho(u.bottom,c.bottom),c.left=zt(u.left,c.left),c},zo(e,n,i));return{width:p.right-p.left,height:p.bottom-p.top,x:p.left,y:p.top}},convertOffsetParentRelativeRectToViewportRelativeRect:function(t){let{rect:e,offsetParent:s,strategy:o}=t,i=te(s),r=Ce(s);if(s===r)return e;let a={scrollLeft:0,scrollTop:0},n={x:1,y:1},p={x:0,y:0};if((i||!i&&o!=="fixed")&&((Ne(s)!=="body"||gs(r))&&(a=vs(s)),te(s))){let c=gt(s);n=jt(s),p.x=c.x+s.clientLeft,p.y=c.y+s.clientTop}return{width:e.width*n.x,height:e.height*n.y,x:e.x*n.x-a.scrollLeft*n.x+p.x,y:e.y*n.y-a.scrollTop*n.y+p.y}},isElement:ae,getDimensions:function(t){if(te(t))return{width:t.offsetWidth,height:t.offsetHeight};let e=gt(t);return{width:e.width,height:e.height}},getOffsetParent:Fo,getDocumentElement:Ce,getScale:jt,async getElementRects(t){let{reference:e,floating:s,strategy:o}=t,i=this.getOffsetParent||Fo,r=this.getDimensions;return{reference:ma(e,await i(s),o),floating:{x:0,y:0,...await r(s)}}},getClientRects:t=>Array.from(t.getClientRects()),isRTL:t=>ee(t).direction==="rtl"};var bs=(t,e,s)=>{let o=new Map,i={platform:ga,...s},r={...i.platform,_c:o};return _o(t,e,{...i,platform:r})};var Go=` :host{--oi-heading-color: black;position:relative}:host slot:not([name]){position:relative;display:inline-block}:host slot[name=header]:not(:empty){display:block}:host slot[name=body]{display:block;min-width:fit-content}:host .popover{position:absolute;width:max-content;display:none}:host .popover .popover-arrow{position:absolute}:host .popover.show{display:block}`;var{h:Je,classNames:ec,createRef:va}=omii,ys,Xo,Kt,ro,Qe,se=class extends g{constructor(){super(...arguments);m(this,ys);m(this,Kt);l(this,"slotRef",va());m(this,Qe,!1)}get type(){return"popover"}get $element(){return this.$(`.${this.type}`)}setPosition(){let{placement:e,offset:s,strategy:o}=this.$props,i=d(this,Kt,ro);if(i){let r=this.$(`.${this.type}-arrow`);bs(i,this.$element,{strategy:o,placement:e,middleware:[Ut(),Ft(),Mt(s),to({element:r})]}).then(({x:a,y:n,placement:p,middlewareData:c})=>{Object.assign(this.$element.style,{left:`${a}px`,top:`${n}px`});let{x:f,y:u}=c.arrow,v={top:"bottom",right:"left",bottom:"top",left:"right"}[p.split("-")[0]];r&&Object.assign(r.style,{left:f!=null?`${f}px`:"",top:u!=null?`${u}px`:"",right:"",bottom:""});let b=this.$element.dataset;v=="top"?b.popperPlacement="bottom":v=="bottom"?b.popperPlacement="top":v=="left"?b.popperPlacement="right":v=="right"&&(b.popperPlacement="left")})}}show(){h(this,Qe,!0),Object.assign(this.$element.style,{display:"block",position:this.$props.strategy}),this.setPosition(),T.fade.show(this.$element)}hide(){h(this,Qe,!1),T.fade.hide(this.$element),Object.assign(this.$element.style,{display:"none"})}toggle(){d(this,Qe)?this.hide():this.show()}installed(){let e=d(this,Kt,ro),{triggerShow:s,triggerHide:o}=this.$props;e&&(s.split(" ").forEach(i=>{i&&e.addEventListener(i,r=>{r.preventDefault(),r.stopPropagation(),this.show()})}),o.split(" ").forEach(i=>{i&&e.addEventListener(i,r=>{r