@logosphere-ui/core 0.0.0-alpha.4 → 0.0.0-alpha.40
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/AGENTS.md +1167 -0
- package/dist/AGENTS.md +1167 -0
- package/dist/atoms/Badge/badge.d.ts +1 -1
- package/dist/atoms/Button/button.d.ts +5 -3
- package/dist/atoms/Checkbox/checkbox.d.ts +13 -3
- package/dist/atoms/FormField/formfield.d.ts +12 -0
- package/dist/atoms/Slider/index.d.ts +1 -0
- package/dist/atoms/Slider/slider.d.ts +54 -0
- package/dist/badge-B0Bj-HAT.js +72 -0
- package/dist/badge-DWkKpZTX.cjs +13 -0
- package/dist/badge.cjs +1 -1
- package/dist/badge.js +1 -1
- package/dist/breadcrumb-BOuCLUJh.cjs +12 -0
- package/dist/breadcrumb-BeJqq-5C.js +41 -0
- package/dist/breadcrumb.cjs +1 -1
- package/dist/breadcrumb.js +1 -1
- package/dist/button-MBxtvVqn.cjs +10 -0
- package/dist/button-QWCkFTeJ.js +58 -0
- package/dist/button.cjs +1 -1
- package/dist/button.js +1 -1
- package/dist/calendar-DcDT4o-U.cjs +88 -0
- package/dist/calendar-DsriSHZ4.js +652 -0
- package/dist/calendar.cjs +1 -0
- package/dist/calendar.js +4 -0
- package/dist/card-BUWvno93.cjs +43 -0
- package/dist/{card-CUhlTJyJ.js → card-R_cKrdHK.js} +26 -25
- package/dist/card.cjs +1 -1
- package/dist/card.js +1 -1
- package/dist/chatbot-BPVC2wqM.cjs +183 -0
- package/dist/chatbot-yup4Nz00.js +564 -0
- package/dist/chatbot.cjs +1 -1
- package/dist/chatbot.js +2 -2
- package/dist/checkbox-BAbPDN6x.cjs +53 -0
- package/dist/checkbox-CTfbav6M.js +152 -0
- package/dist/checkbox.cjs +1 -1
- package/dist/checkbox.js +1 -1
- package/dist/chip-group-BqYKZKmu.cjs +26 -0
- package/dist/chip-group-CC5RBhN_.js +89 -0
- package/dist/chip-group.cjs +1 -0
- package/dist/chip-group.js +4 -0
- package/dist/combobox-Bah9Akr-.cjs +113 -0
- package/dist/combobox-Nxhk75IH.js +460 -0
- package/dist/combobox.cjs +1 -1
- package/dist/combobox.js +1 -1
- package/dist/datepicker-BExZseRQ.js +382 -0
- package/dist/datepicker-BOQ13sIm.cjs +85 -0
- package/dist/datepicker.cjs +1 -1
- package/dist/datepicker.js +2 -2
- package/dist/{download-manager-A4fOxGWJ.js → download-manager-BPg-6Qfg.js} +4 -4
- package/dist/download-manager-DDeTYRPs.cjs +97 -0
- package/dist/download-manager.cjs +1 -1
- package/dist/download-manager.js +1 -1
- package/dist/drawer-DBrOkz0z.cjs +32 -0
- package/dist/drawer-DHsESNFL.js +114 -0
- package/dist/drawer.cjs +1 -0
- package/dist/drawer.js +4 -0
- package/dist/formfield-JXiv9mvJ.cjs +33 -0
- package/dist/formfield-ss2mFweu.js +161 -0
- package/dist/formfield.cjs +1 -1
- package/dist/formfield.js +1 -1
- package/dist/icon.cjs +1 -0
- package/dist/icon.js +4 -0
- package/dist/index.cjs +291 -1
- package/dist/index.d.ts +15 -0
- package/dist/index.js +909 -32
- package/dist/index.umd.js +1545 -521
- package/dist/input-D9lFcDHU.js +278 -0
- package/dist/input-Dg-jos9u.cjs +60 -0
- package/dist/input.cjs +1 -1
- package/dist/input.js +1 -1
- package/dist/left-menu.cjs +1 -0
- package/dist/left-menu.js +5 -0
- package/dist/leftmenu-CMx2K5Ws.js +301 -0
- package/dist/leftmenu-DCfTelzi.cjs +83 -0
- package/dist/modal-BJNCTlBX.cjs +84 -0
- package/dist/modal-DNjURVZy.js +250 -0
- package/dist/modal.cjs +1 -1
- package/dist/modal.js +1 -1
- package/dist/molecules/Accordion/accordion.d.ts +42 -0
- package/dist/molecules/Accordion/index.d.ts +2 -0
- package/dist/molecules/Chip/chip-group.d.ts +29 -0
- package/dist/molecules/Chip/index.d.ts +2 -0
- package/dist/molecules/Collapse/collapse.d.ts +42 -0
- package/dist/molecules/Collapse/index.d.ts +2 -0
- package/dist/molecules/Input/input.d.ts +24 -1
- package/dist/molecules/InputGroup/index.d.ts +1 -0
- package/dist/molecules/InputGroup/input-group.d.ts +40 -0
- package/dist/molecules/Pagination/index.d.ts +1 -0
- package/dist/molecules/Pagination/pagination.d.ts +60 -0
- package/dist/molecules/Popover/popover.d.ts +1 -0
- package/dist/molecules/SplitButton/index.d.ts +2 -0
- package/dist/molecules/SplitButton/split-button.d.ts +53 -0
- package/dist/molecules/Stepper/index.d.ts +2 -0
- package/dist/molecules/Stepper/stepper.d.ts +34 -0
- package/dist/molecules/Textarea/text-area.d.ts +5 -2
- package/dist/molecules/TimePicker/index.d.ts +2 -0
- package/dist/molecules/TimePicker/timepicker.d.ts +62 -0
- package/dist/organisms/Calendar/calendar.d.ts +54 -0
- package/dist/organisms/Calendar/index.d.ts +1 -0
- package/dist/organisms/Calendar/shared.d.ts +9 -0
- package/dist/organisms/Chatbot/chatbot.d.ts +10 -1
- package/dist/organisms/Chatbot/index.d.ts +1 -1
- package/dist/organisms/Combobox/combobox.d.ts +39 -0
- package/dist/organisms/DatePicker/datepicker.d.ts +35 -33
- package/dist/organisms/Drawer/drawer.d.ts +30 -0
- package/dist/organisms/Drawer/index.d.ts +1 -0
- package/dist/organisms/LeftMenu/index.d.ts +2 -0
- package/dist/organisms/LeftMenu/leftmenu-item.d.ts +14 -0
- package/dist/organisms/LeftMenu/leftmenu.d.ts +45 -0
- package/dist/organisms/Modal/modal.d.ts +29 -4
- package/dist/organisms/Tab/tab.d.ts +13 -1
- package/dist/organisms/Toast/index.d.ts +2 -0
- package/dist/organisms/Toast/toast-container.d.ts +42 -0
- package/dist/organisms/Toast/toast.d.ts +48 -0
- package/dist/organisms/TreeMenu/index.d.ts +1 -0
- package/dist/organisms/TreeMenu/tree-menu.d.ts +41 -0
- package/dist/pagination-B91sZD5E.js +360 -0
- package/dist/pagination-Cnh-o-Nq.cjs +169 -0
- package/dist/pagination.cjs +1 -0
- package/dist/pagination.js +4 -0
- package/dist/{popover-B7tCqk3R.js → popover-CSgoaROl.js} +42 -39
- package/dist/popover-DwDyLpQq.cjs +30 -0
- package/dist/popover.cjs +1 -1
- package/dist/popover.js +1 -1
- package/dist/shared/icons/index.d.ts +1 -0
- package/dist/shared/types/button.types.d.ts +7 -0
- package/dist/styles/main.css +186 -182
- package/dist/switch-Do6SCkPJ.cjs +17 -0
- package/dist/switch-uYVuohJ-.js +68 -0
- package/dist/switch.cjs +1 -1
- package/dist/switch.js +1 -1
- package/dist/tab-BvRVHpWs.cjs +41 -0
- package/dist/tab-Byh4UgFB.js +204 -0
- package/dist/tab.cjs +1 -1
- package/dist/tab.js +1 -1
- package/dist/text-area-CHkrGi3S.js +239 -0
- package/dist/text-area-DvOiCcKP.cjs +51 -0
- package/dist/textarea.cjs +1 -1
- package/dist/textarea.js +1 -1
- package/dist/timepicker-CAat7fcK.js +320 -0
- package/dist/timepicker-Co7lW5Rp.cjs +119 -0
- package/dist/timepicker.cjs +1 -0
- package/dist/timepicker.js +4 -0
- package/dist/toast-container-DxFwLT5S.js +274 -0
- package/dist/toast-container-aY1lGjRi.cjs +64 -0
- package/dist/toast.cjs +1 -0
- package/dist/toast.js +6 -0
- package/dist/tree-menu-Dqy14_m2.cjs +47 -0
- package/dist/tree-menu-Psek8QB9.js +154 -0
- package/dist/tree-menu.cjs +1 -0
- package/dist/tree-menu.js +4 -0
- package/dist/ui-icon-Cd5YhUeQ.cjs +22 -0
- package/dist/ui-icon-Ckljc9hg.js +74 -0
- package/package.json +104 -12
- package/dist/badge-BbhaO73N.cjs +0 -13
- package/dist/badge-DE7Tgd8Z.js +0 -71
- package/dist/breadcrumb-B-4yqoJZ.js +0 -41
- package/dist/breadcrumb-Cop-B1J7.cjs +0 -12
- package/dist/button-C1EwOosO.js +0 -58
- package/dist/button-CDRccsk9.cjs +0 -10
- package/dist/card-n8ka8Zk-.cjs +0 -43
- package/dist/chatbot-Da_itUdJ.cjs +0 -160
- package/dist/chatbot-zkxngMRH.js +0 -481
- package/dist/checkbox-7Rb3WKGx.js +0 -119
- package/dist/checkbox-CdDTRdKV.cjs +0 -37
- package/dist/combobox-BJbI-Tgi.js +0 -268
- package/dist/combobox-pmE7bgEL.cjs +0 -99
- package/dist/datepicker-DFJx45C-.js +0 -750
- package/dist/datepicker-b9JGTTMx.cjs +0 -115
- package/dist/download-manager-BSIMTGaK.cjs +0 -97
- package/dist/formfield-D_7NFFoe.cjs +0 -27
- package/dist/formfield-d8fp9FTV.js +0 -118
- package/dist/input-BcnI1w3_.cjs +0 -46
- package/dist/input-Bj_7u8Iv.js +0 -192
- package/dist/modal-Bfc6WQSL.js +0 -110
- package/dist/modal-DQ8VFL-P.cjs +0 -39
- package/dist/popover-C2p5Pmts.cjs +0 -30
- package/dist/switch-Cpl53nRW.js +0 -64
- package/dist/switch-Rnnn10bn.cjs +0 -17
- package/dist/tab-BKdN4xAz.js +0 -176
- package/dist/tab-DcjAlXzU.cjs +0 -40
- package/dist/text-area-BkHdLnZj.cjs +0 -44
- package/dist/text-area-CC24lj8v.js +0 -204
package/dist/index.umd.js
CHANGED
|
@@ -1,419 +1,1095 @@
|
|
|
1
|
-
(function(
|
|
2
|
-
|
|
3
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Wa(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
4
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Sr(a,n){var e=Object.keys(a);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(a);n&&(t=t.filter(function(r){return Object.getOwnPropertyDescriptor(a,r).enumerable})),e.push.apply(e,t)}return e}function ct(a){for(var n=1;n<arguments.length;n++){var e=arguments[n]!=null?arguments[n]:{};n%2?Sr(Object(e),!0).forEach(function(t){Fa(a,t,e[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(a,Object.getOwnPropertyDescriptors(e)):Sr(Object(e)).forEach(function(t){Object.defineProperty(a,t,Object.getOwnPropertyDescriptor(e,t))})}return a}function Ga(a,n){if(n&&(typeof n=="object"||typeof n=="function"))return n;if(n!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Ra(a)}function F(){var a,n,e=typeof Symbol=="function"?Symbol:{},t=e.iterator||"@@iterator",r=e.toStringTag||"@@toStringTag";function o(g,y,w,v){var _=y&&y.prototype instanceof s?y:s,k=Object.create(_.prototype);return le(k,"_invoke",(function($,x,E){var C,S,D,A=0,B=E||[],P=!1,M={p:0,n:0,v:a,a:T,f:T.bind(a,4),d:function(U,I){return C=U,S=0,D=a,M.n=I,i}};function T(U,I){for(S=U,D=I,n=0;!P&&A&&!Y&&n<B.length;n++){var Y,R=B[n],oe=M.p,J=R[2];U>3?(Y=J===I)&&(D=R[(S=R[4])?5:(S=3,3)],R[4]=R[5]=a):R[0]<=oe&&((Y=U<2&&oe<R[1])?(S=0,M.v=I,M.n=R[1]):oe<J&&(Y=U<3||R[0]>I||I>J)&&(R[4]=U,R[5]=I,M.n=J,S=0))}if(Y||U>1)return i;throw P=!0,I}return function(U,I,Y){if(A>1)throw TypeError("Generator is already running");for(P&&I===1&&T(I,Y),S=I,D=Y;(n=S<2?a:D)||!P;){C||(S?S<3?(S>1&&(M.n=-1),T(S,D)):M.n=D:M.v=D);try{if(A=2,C){if(S||(U="next"),n=C[U]){if(!(n=n.call(C,D)))throw TypeError("iterator result is not an object");if(!n.done)return n;D=n.value,S<2&&(S=0)}else S===1&&(n=C.return)&&n.call(C),S<2&&(D=TypeError("The iterator does not provide a '"+U+"' method"),S=1);C=a}else if((n=(P=M.n<0)?D:$.call(x,M))!==i)break}catch(R){C=a,S=1,D=R}finally{A=1}}return{value:n,done:P}}})(g,w,v),!0),k}var i={};function s(){}function l(){}function d(){}n=Object.getPrototypeOf;var u=[][t]?n(n([][t]())):(le(n={},t,function(){return this}),n),p=d.prototype=s.prototype=Object.create(u);function h(g){return Object.setPrototypeOf?Object.setPrototypeOf(g,d):(g.__proto__=d,le(g,r,"GeneratorFunction")),g.prototype=Object.create(p),g}return l.prototype=d,le(p,"constructor",d),le(d,"constructor",l),l.displayName="GeneratorFunction",le(d,r,"GeneratorFunction"),le(p),le(p,r,"Generator"),le(p,t,function(){return this}),le(p,"toString",function(){return"[object Generator]"}),(F=function(){return{w:o,m:h}})()}function le(a,n,e,t){var r=Object.defineProperty;try{r({},"",{})}catch(o){r=0}le=function(o,i,s,l){function d(u,p){le(o,u,function(h){return this._invoke(u,p,h)})}i?r?r(o,i,{value:s,enumerable:!l,configurable:!l,writable:!l}):o[i]=s:(d("next",0),d("throw",1),d("return",2))},le(a,n,e,t)}function dt(a,n){return dt=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},dt(a,n)}function Be(a,n){return Ia(a)||qa(a,n)||Xt(a,n)||Va()}function Ka(a,n){for(;!{}.hasOwnProperty.call(a,n)&&(a=Le(a))!==null;);return a}function X(a,n,e,t){var r=Gt(Le(a.prototype),n,e);return typeof r=="function"?function(o){return r.apply(e,o)}:r}function b(a,n){return n||(n=a.slice(0)),Object.freeze(Object.defineProperties(a,{raw:{value:Object.freeze(n)}}))}function ve(a){return Ya(a)||Na(a)||Xt(a)||Wa()}function Xa(a,n){if(typeof a!="object"||!a)return a;var e=a[Symbol.toPrimitive];if(e!==void 0){var t=e.call(a,n);if(typeof t!="object")return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(a)}function Dr(a){var n=Xa(a,"string");return typeof n=="symbol"?n:n+""}function ut(a){"@babel/helpers - typeof";return ut=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},ut(a)}function Xt(a,n){if(a){if(typeof a=="string")return Wt(a,n);var e={}.toString.call(a).slice(8,-1);return e==="Object"&&a.constructor&&(e=a.constructor.name),e==="Map"||e==="Set"?Array.from(a):e==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(e)?Wt(a,n):void 0}}function Zt(a){var n=typeof Map=="function"?new Map:void 0;return Zt=function(e){if(e===null||!Ha(e))return e;if(typeof e!="function")throw new TypeError("Super expression must either be null or a function");if(n!==void 0){if(n.has(e))return n.get(e);n.set(e,t)}function t(){return Ua(e,arguments,Le(this).constructor)}return t.prototype=Object.create(e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),dt(t,e)},Zt(a)}var Dt=globalThis,Jt=Dt.ShadowRoot&&(Dt.ShadyCSS===void 0||Dt.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,Qt=Symbol(),zr=new WeakMap,Ar=(function(){function a(n,e,t){if(j(this,a),this._$cssResult$=!0,t!==Qt)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=n,this.t=e}return L(a,[{key:"styleSheet",get:function(){var e=this.o,t=this.t;if(Jt&&e===void 0){var r=t!==void 0&&t.length===1;r&&(e=zr.get(t)),e===void 0&&((this.o=e=new CSSStyleSheet).replaceSync(this.cssText),r&&zr.set(t,e))}return e}},{key:"toString",value:function(){return this.cssText}}])})(),Q=function(n){return new Ar(typeof n=="string"?n:n+"",void 0,Qt)},ee=function(n){for(var e=arguments.length,t=new Array(e>1?e-1:0),r=1;r<e;r++)t[r-1]=arguments[r];var o=n.length===1?n[0]:t.reduce(function(i,s,l){return i+(function(d){if(d._$cssResult$===!0)return d.cssText;if(typeof d=="number")return d;throw Error("Value passed to 'css' function must be a 'css' function result: "+d+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(s)+n[l+1]},n[0]);return new Ar(o,n,Qt)},Za=function(n,e){if(Jt)n.adoptedStyleSheets=e.map(function(l){return l instanceof CSSStyleSheet?l:l.styleSheet});else{var t=ae(e),r;try{for(t.s();!(r=t.n()).done;){var o=r.value,i=document.createElement("style"),s=Dt.litNonce;s!==void 0&&i.setAttribute("nonce",s),i.textContent=o.cssText,n.appendChild(i)}}catch(l){t.e(l)}finally{t.f()}}},Mr=Jt?function(a){return a}:function(a){return a instanceof CSSStyleSheet?(function(n){var e="",t=ae(n.cssRules),r;try{for(t.s();!(r=t.n()).done;){var o=r.value;e+=o.cssText}}catch(i){t.e(i)}finally{t.f()}return Q(e)})(a):a},er,tr,rr;var Ja=Object.is,Qa=Object.defineProperty,ei=Object.getOwnPropertyDescriptor,ti=Object.getOwnPropertyNames,ri=Object.getOwnPropertySymbols,ni=Object.getPrototypeOf,We=globalThis,Pr=We.trustedTypes,oi=Pr?Pr.emptyScript:"",nr=We.reactiveElementPolyfillSupport,pt=function(n,e){return n},zt={toAttribute:function(n,e){switch(e){case Boolean:n=n?oi:null;break;case Object:case Array:n=n==null?n:JSON.stringify(n)}return n},fromAttribute:function(n,e){var t=n;switch(e){case Boolean:t=n!==null;break;case Number:t=n===null?null:Number(n);break;case Object:case Array:try{t=JSON.parse(n)}catch(r){t=null}}return t}},or=function(n,e){return!Ja(n,e)},Tr={attribute:!0,type:String,converter:zt,reflect:!1,useDefault:!1,hasChanged:or};(er=Symbol.metadata)!==null&&er!==void 0||(Symbol.metadata=Symbol("metadata")),(tr=We.litPropertyMetadata)!==null&&tr!==void 0||(We.litPropertyMetadata=new WeakMap);var Ge=(function(a){function n(){var e;return j(this,n),e=H(this,n),e._$Ep=void 0,e.isUpdatePending=!1,e.hasUpdated=!1,e._$Em=null,e._$Ev(),e}return N(n,a),L(n,[{key:"_$Ev",value:function(){var t=this,r;this._$ES=new Promise(function(o){return t.enableUpdating=o}),this._$AL=new Map,this._$E_(),this.requestUpdate(),(r=this.constructor.l)===null||r===void 0||r.forEach(function(o){return o(t)})}},{key:"addController",value:function(t){var r,o;((r=this._$EO)!==null&&r!==void 0?r:this._$EO=new Set).add(t),this.renderRoot!==void 0&&this.isConnected&&((o=t.hostConnected)===null||o===void 0||o.call(t))}},{key:"removeController",value:function(t){var r;(r=this._$EO)===null||r===void 0||r.delete(t)}},{key:"_$E_",value:function(){var t=new Map,r=this.constructor.elementProperties,o=ae(r.keys()),i;try{for(o.s();!(i=o.n()).done;){var s=i.value;this.hasOwnProperty(s)&&(t.set(s,this[s]),delete this[s])}}catch(l){o.e(l)}finally{o.f()}t.size>0&&(this._$Ep=t)}},{key:"createRenderRoot",value:function(){var t,r=(t=this.shadowRoot)!==null&&t!==void 0?t:this.attachShadow(this.constructor.shadowRootOptions);return Za(r,this.constructor.elementStyles),r}},{key:"connectedCallback",value:function(){var t,r;(t=this.renderRoot)!==null&&t!==void 0||(this.renderRoot=this.createRenderRoot()),this.enableUpdating(!0),(r=this._$EO)===null||r===void 0||r.forEach(function(o){var i;return(i=o.hostConnected)===null||i===void 0?void 0:i.call(o)})}},{key:"enableUpdating",value:function(t){}},{key:"disconnectedCallback",value:function(){var t;(t=this._$EO)===null||t===void 0||t.forEach(function(r){var o;return(o=r.hostDisconnected)===null||o===void 0?void 0:o.call(r)})}},{key:"attributeChangedCallback",value:function(t,r,o){this._$AK(t,o)}},{key:"_$ET",value:function(t,r){var o=this.constructor.elementProperties.get(t),i=this.constructor._$Eu(t,o);if(i!==void 0&&o.reflect===!0){var s,l=(((s=o.converter)===null||s===void 0?void 0:s.toAttribute)!==void 0?o.converter:zt).toAttribute(r,o.type);this._$Em=t,l==null?this.removeAttribute(i):this.setAttribute(i,l),this._$Em=null}}},{key:"_$AK",value:function(t,r){var o=this.constructor,i=o._$Eh.get(t);if(i!==void 0&&this._$Em!==i){var s,l,d,u=o.getPropertyOptions(i),p=typeof u.converter=="function"?{fromAttribute:u.converter}:((s=u.converter)===null||s===void 0?void 0:s.fromAttribute)!==void 0?u.converter:zt;this._$Em=i;var h=p.fromAttribute(r,u.type);this[i]=(l=h!=null?h:(d=this._$Ej)===null||d===void 0?void 0:d.get(i))!==null&&l!==void 0?l:h,this._$Em=null}}},{key:"requestUpdate",value:function(t,r,o){var i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1,s=arguments.length>4?arguments[4]:void 0;if(t!==void 0){var l,d,u=this.constructor;if(i===!1&&(s=this[t]),o!=null||(o=u.getPropertyOptions(t)),!(((l=o.hasChanged)!==null&&l!==void 0?l:or)(s,r)||o.useDefault&&o.reflect&&s===((d=this._$Ej)===null||d===void 0?void 0:d.get(t))&&!this.hasAttribute(u._$Eu(t,o))))return;this.C(t,r,o)}this.isUpdatePending===!1&&(this._$ES=this._$EP())}},{key:"C",value:function(t,r,o,i){var s,l,d,u=o.useDefault,p=o.reflect,h=o.wrapped;u&&!((s=this._$Ej)!==null&&s!==void 0?s:this._$Ej=new Map).has(t)&&(this._$Ej.set(t,(l=i!=null?i:r)!==null&&l!==void 0?l:this[t]),h!==!0||i!==void 0)||(this._$AL.has(t)||(this.hasUpdated||u||(r=void 0),this._$AL.set(t,r)),p===!0&&this._$Em!==t&&((d=this._$Eq)!==null&&d!==void 0?d:this._$Eq=new Set).add(t))}},{key:"_$EP",value:(function(){var e=de(F().m(function r(){var o,i,s;return F().w(function(l){for(;;)switch(l.p=l.n){case 0:return this.isUpdatePending=!0,l.p=1,l.n=2,this._$ES;case 2:l.n=4;break;case 3:l.p=3,i=l.v,Promise.reject(i);case 4:if(o=this.scheduleUpdate(),s=o!=null,!s){l.n=5;break}return l.n=5,o;case 5:return l.a(2,!this.isUpdatePending)}},r,this,[[1,3]])}));function t(){return e.apply(this,arguments)}return t})()},{key:"scheduleUpdate",value:function(){return this.performUpdate()}},{key:"performUpdate",value:function(){if(this.isUpdatePending){if(!this.hasUpdated){var t;if((t=this.renderRoot)!==null&&t!==void 0||(this.renderRoot=this.createRenderRoot()),this._$Ep){var r=ae(this._$Ep),o;try{for(r.s();!(o=r.n()).done;){var i=Be(o.value,2),s=i[0],l=i[1];this[s]=l}}catch(x){r.e(x)}finally{r.f()}this._$Ep=void 0}var d=this.constructor.elementProperties;if(d.size>0){var u=ae(d),p;try{for(u.s();!(p=u.n()).done;){var h=Be(p.value,2),g=h[0],y=h[1],w=y.wrapped,v=this[g];w!==!0||this._$AL.has(g)||v===void 0||this.C(g,void 0,y,v)}}catch(x){u.e(x)}finally{u.f()}}}var _=!1,k=this._$AL;try{var $;_=this.shouldUpdate(k),_?(this.willUpdate(k),($=this._$EO)!==null&&$!==void 0&&$.forEach(function(x){var E;return(E=x.hostUpdate)===null||E===void 0?void 0:E.call(x)}),this.update(k)):this._$EM()}catch(x){throw _=!1,this._$EM(),x}_&&this._$AE(k)}}},{key:"willUpdate",value:function(t){}},{key:"_$AE",value:function(t){var r;(r=this._$EO)!==null&&r!==void 0&&r.forEach(function(o){var i;return(i=o.hostUpdated)===null||i===void 0?void 0:i.call(o)}),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(t)),this.updated(t)}},{key:"_$EM",value:function(){this._$AL=new Map,this.isUpdatePending=!1}},{key:"updateComplete",get:function(){return this.getUpdateComplete()}},{key:"getUpdateComplete",value:function(){return this._$ES}},{key:"shouldUpdate",value:function(t){return!0}},{key:"update",value:function(t){var r=this;this._$Eq&&(this._$Eq=this._$Eq.forEach(function(o){return r._$ET(o,r[o])})),this._$EM()}},{key:"updated",value:function(t){}},{key:"firstUpdated",value:function(t){}}],[{key:"addInitializer",value:function(t){var r;this._$Ei(),((r=this.l)!==null&&r!==void 0?r:this.l=[]).push(t)}},{key:"observedAttributes",get:function(){return this.finalize(),this._$Eh&&ve(this._$Eh.keys())}},{key:"createProperty",value:function(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Tr;if(r.state&&(r.attribute=!1),this._$Ei(),this.prototype.hasOwnProperty(t)&&((r=Object.create(r)).wrapped=!0),this.elementProperties.set(t,r),!r.noAccessor){var o=Symbol(),i=this.getPropertyDescriptor(t,o,r);i!==void 0&&Qa(this.prototype,t,i)}}},{key:"getPropertyDescriptor",value:function(t,r,o){var i,s=(i=ei(this.prototype,t))!==null&&i!==void 0?i:{get:function(){return this[r]},set:function(p){this[r]=p}},l=s.get,d=s.set;return{get:l,set:function(p){var h=l==null?void 0:l.call(this);d!=null&&d.call(this,p),this.requestUpdate(t,h,o)},configurable:!0,enumerable:!0}}},{key:"getPropertyOptions",value:function(t){var r;return(r=this.elementProperties.get(t))!==null&&r!==void 0?r:Tr}},{key:"_$Ei",value:function(){if(!this.hasOwnProperty(pt("elementProperties"))){var t=ni(this);t.finalize(),t.l!==void 0&&(this.l=ve(t.l)),this.elementProperties=new Map(t.elementProperties)}}},{key:"finalize",value:function(){if(!this.hasOwnProperty(pt("finalized"))){if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(pt("properties"))){var t=this.properties,r=[].concat(ve(ti(t)),ve(ri(t))),o=ae(r),i;try{for(o.s();!(i=o.n()).done;){var s=i.value;this.createProperty(s,t[s])}}catch(E){o.e(E)}finally{o.f()}}var l=this[Symbol.metadata];if(l!==null){var d=litPropertyMetadata.get(l);if(d!==void 0){var u=ae(d),p;try{for(u.s();!(p=u.n()).done;){var h=Be(p.value,2),g=h[0],y=h[1];this.elementProperties.set(g,y)}}catch(E){u.e(E)}finally{u.f()}}}this._$Eh=new Map;var w=ae(this.elementProperties),v;try{for(w.s();!(v=w.n()).done;){var _=Be(v.value,2),k=_[0],$=_[1],x=this._$Eu(k,$);x!==void 0&&this._$Eh.set(x,k)}}catch(E){w.e(E)}finally{w.f()}this.elementStyles=this.finalizeStyles(this.styles)}}},{key:"finalizeStyles",value:function(t){var r=[];if(Array.isArray(t)){var o=new Set(t.flat(1/0).reverse()),i=ae(o),s;try{for(i.s();!(s=i.n()).done;){var l=s.value;r.unshift(Mr(l))}}catch(d){i.e(d)}finally{i.f()}}else t!==void 0&&r.push(Mr(t));return r}},{key:"_$Eu",value:function(t,r){var o=r.attribute;return o===!1?void 0:typeof o=="string"?o:typeof t=="string"?t.toLowerCase():void 0}}])})(Zt(HTMLElement));Ge.elementStyles=[],Ge.shadowRootOptions={mode:"open"},Ge[pt("elementProperties")]=new Map,Ge[pt("finalized")]=new Map,nr!=null&&nr({ReactiveElement:Ge}),((rr=We.reactiveElementVersions)!==null&&rr!==void 0?rr:We.reactiveElementVersions=[]).push("2.1.2");var ar;var At=globalThis,jr=function(n){return n},Mt=At.trustedTypes,Lr=Mt?Mt.createPolicy("lit-html",{createHTML:function(n){return n}}):void 0,Br="$lit$",Se="lit$".concat(Math.random().toFixed(9).slice(2),"$"),Ir="?"+Se,ai="<".concat(Ir,">"),Ie=document,ht=function(){return Ie.createComment("")},ft=function(n){return n===null||ut(n)!="object"&&typeof n!="function"},ir=Array.isArray,ii=function(n){return ir(n)||typeof(n==null?void 0:n[Symbol.iterator])=="function"},sr=`[
|
|
5
|
-
|
|
6
|
-
\f\r"'\`<>=]|("|')|))|$)`),"g"),Ur=/'/g,Fr=/"/g,Hr=/^(?:script|style|textarea|title)$/i,si=function(n){return function(e){for(var t=arguments.length,r=new Array(t>1?t-1:0),o=1;o<t;o++)r[o-1]=arguments[o];return{_$litType$:n,strings:e,values:r}}},m=si(1),be=Symbol.for("lit-noChange"),O=Symbol.for("lit-nothing"),Nr=new WeakMap,Re=Ie.createTreeWalker(Ie,129);function qr(a,n){if(!ir(a)||!a.hasOwnProperty("raw"))throw Error("invalid template strings array");return Lr!==void 0?Lr.createHTML(n):n}var li=function(n,e){for(var t=n.length-1,r=[],o,i=e===2?"<svg>":e===3?"<math>":"",s=vt,l=0;l<t;l++){for(var d=n[l],u=void 0,p=void 0,h=-1,g=0;g<d.length&&(s.lastIndex=g,p=s.exec(d),p!==null);)g=s.lastIndex,s===vt?p[1]==="!--"?s=Yr:p[1]!==void 0?s=Rr:p[2]!==void 0?(Hr.test(p[2])&&(o=RegExp("</"+p[2],"g")),s=Ye):p[3]!==void 0&&(s=Ye):s===Ye?p[0]===">"?(s=o!=null?o:vt,h=-1):p[1]===void 0?h=-2:(h=s.lastIndex-p[2].length,u=p[1],s=p[3]===void 0?Ye:p[3]==='"'?Fr:Ur):s===Fr||s===Ur?s=Ye:s===Yr||s===Rr?s=vt:(s=Ye,o=void 0);var y=s===Ye&&n[l+1].startsWith("/>")?" ":"";i+=s===vt?d+ai:h>=0?(r.push(u),d.slice(0,h)+Br+d.slice(h)+Se+y):d+Se+(h===-2?l:y)}return[qr(n,i+(n[t]||"<?>")+(e===2?"</svg>":e===3?"</math>":"")),r]},lr=(function(){function a(n,e){var t=n.strings,r=n._$litType$;j(this,a);var o;this.parts=[];var i=0,s=0,l=t.length-1,d=this.parts,u=li(t,r),p=Be(u,2),h=p[0],g=p[1];if(this.el=a.createElement(h,e),Re.currentNode=this.el.content,r===2||r===3){var y=this.el.content.firstChild;y.replaceWith.apply(y,ve(y.childNodes))}for(;(o=Re.nextNode())!==null&&d.length<l;){if(o.nodeType===1){if(o.hasAttributes()){var w=ae(o.getAttributeNames()),v;try{for(w.s();!(v=w.n()).done;){var _=v.value;if(_.endsWith(Br)){var k=g[s++],$=o.getAttribute(_).split(Se),x=/([.?@])?(.*)/.exec(k);d.push({type:1,index:i,name:x[2],strings:$,ctor:x[1]==="."?di:x[1]==="?"?ui:x[1]==="@"?pi:Pt}),o.removeAttribute(_)}else _.startsWith(Se)&&(d.push({type:6,index:i}),o.removeAttribute(_))}}catch(A){w.e(A)}finally{w.f()}}if(Hr.test(o.tagName)){var E=o.textContent.split(Se),C=E.length-1;if(C>0){o.textContent=Mt?Mt.emptyScript:"";for(var S=0;S<C;S++)o.append(E[S],ht()),Re.nextNode(),d.push({type:2,index:++i});o.append(E[C],ht())}}}else if(o.nodeType===8)if(o.data===Ir)d.push({type:2,index:i});else for(var D=-1;(D=o.data.indexOf(Se,D+1))!==-1;)d.push({type:7,index:i}),D+=Se.length-1;i++}}return L(a,null,[{key:"createElement",value:function(e,t){var r=Ie.createElement("template");return r.innerHTML=e,r}}])})();function Ke(a,n){var e,t,r,o,i,s=arguments.length>2&&arguments[2]!==void 0?arguments[2]:a,l=arguments.length>3?arguments[3]:void 0;if(n===be)return n;var d=l!==void 0?(e=s._$Co)===null||e===void 0?void 0:e[l]:s._$Cl,u=ft(n)?void 0:n._$litDirective$;return((t=d)===null||t===void 0?void 0:t.constructor)!==u&&((r=d)!==null&&r!==void 0&&(o=r._$AO)!==null&&o!==void 0&&o.call(r,!1),u===void 0?d=void 0:(d=new u(a),d._$AT(a,s,l)),l!==void 0?((i=s._$Co)!==null&&i!==void 0?i:s._$Co=[])[l]=d:s._$Cl=d),d!==void 0&&(n=Ke(a,d._$AS(a,n.values),d,l)),n}var ci=(function(){function a(n,e){j(this,a),this._$AV=[],this._$AN=void 0,this._$AD=n,this._$AM=e}return L(a,[{key:"parentNode",get:function(){return this._$AM.parentNode}},{key:"_$AU",get:function(){return this._$AM._$AU}},{key:"u",value:function(e){var t,r=this._$AD,o=r.el.content,i=r.parts,s=((t=e==null?void 0:e.creationScope)!==null&&t!==void 0?t:Ie).importNode(o,!0);Re.currentNode=s;for(var l=Re.nextNode(),d=0,u=0,p=i[0];p!==void 0;){var h;if(d===p.index){var g=void 0;p.type===2?g=new cr(l,l.nextSibling,this,e):p.type===1?g=new p.ctor(l,p.name,p.strings,this,e):p.type===6&&(g=new hi(l,this,e)),this._$AV.push(g),p=i[++u]}d!==((h=p)===null||h===void 0?void 0:h.index)&&(l=Re.nextNode(),d++)}return Re.currentNode=Ie,s}},{key:"p",value:function(e){var t=0,r=ae(this._$AV),o;try{for(r.s();!(o=r.n()).done;){var i=o.value;i!==void 0&&(i.strings!==void 0?(i._$AI(e,i,t),t+=i.strings.length-2):i._$AI(e[t])),t++}}catch(s){r.e(s)}finally{r.f()}}}])})(),cr=(function(){function a(n,e,t,r){var o;j(this,a),this.type=2,this._$AH=O,this._$AN=void 0,this._$AA=n,this._$AB=e,this._$AM=t,this.options=r,this._$Cv=(o=r==null?void 0:r.isConnected)!==null&&o!==void 0?o:!0}return L(a,[{key:"_$AU",get:function(){var e,t;return(e=(t=this._$AM)===null||t===void 0?void 0:t._$AU)!==null&&e!==void 0?e:this._$Cv}},{key:"parentNode",get:function(){var e,t=this._$AA.parentNode,r=this._$AM;return r!==void 0&&((e=t)===null||e===void 0?void 0:e.nodeType)===11&&(t=r.parentNode),t}},{key:"startNode",get:function(){return this._$AA}},{key:"endNode",get:function(){return this._$AB}},{key:"_$AI",value:function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this;e=Ke(this,e,t),ft(e)?e===O||e==null||e===""?(this._$AH!==O&&this._$AR(),this._$AH=O):e!==this._$AH&&e!==be&&this._(e):e._$litType$!==void 0?this.$(e):e.nodeType!==void 0?this.T(e):ii(e)?this.k(e):this._(e)}},{key:"O",value:function(e){return this._$AA.parentNode.insertBefore(e,this._$AB)}},{key:"T",value:function(e){this._$AH!==e&&(this._$AR(),this._$AH=this.O(e))}},{key:"_",value:function(e){this._$AH!==O&&ft(this._$AH)?this._$AA.nextSibling.data=e:this.T(Ie.createTextNode(e)),this._$AH=e}},{key:"$",value:function(e){var t,r=e.values,o=e._$litType$,i=typeof o=="number"?this._$AC(e):(o.el===void 0&&(o.el=lr.createElement(qr(o.h,o.h[0]),this.options)),o);if(((t=this._$AH)===null||t===void 0?void 0:t._$AD)===i)this._$AH.p(r);else{var s=new ci(i,this),l=s.u(this.options);s.p(r),this.T(l),this._$AH=s}}},{key:"_$AC",value:function(e){var t=Nr.get(e.strings);return t===void 0&&Nr.set(e.strings,t=new lr(e)),t}},{key:"k",value:function(e){ir(this._$AH)||(this._$AH=[],this._$AR());var t=this._$AH,r,o=0,i=ae(e),s;try{for(i.s();!(s=i.n()).done;){var l=s.value;o===t.length?t.push(r=new _k(this.O(ht()),this.O(ht()),this,this.options)):r=t[o],r._$AI(l),o++}}catch(d){i.e(d)}finally{i.f()}o<t.length&&(this._$AR(r&&r._$AB.nextSibling,o),t.length=o)}},{key:"_$AR",value:function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this._$AA.nextSibling,t=arguments.length>1?arguments[1]:void 0;for((r=this._$AP)===null||r===void 0?void 0:r.call(this,!1,!0,t);e!==this._$AB;){var r,o=jr(e).nextSibling;jr(e).remove(),e=o}}},{key:"setConnected",value:function(e){var t;this._$AM===void 0&&(this._$Cv=e,(t=this._$AP)===null||t===void 0||t.call(this,e))}}])})(),Pt=(function(){function a(n,e,t,r,o){j(this,a),this.type=1,this._$AH=O,this._$AN=void 0,this.element=n,this.name=e,this._$AM=r,this.options=o,t.length>2||t[0]!==""||t[1]!==""?(this._$AH=Array(t.length-1).fill(new String),this.strings=t):this._$AH=O}return L(a,[{key:"tagName",get:function(){return this.element.tagName}},{key:"_$AU",get:function(){return this._$AM._$AU}},{key:"_$AI",value:function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this,r=arguments.length>2?arguments[2]:void 0,o=arguments.length>3?arguments[3]:void 0,i=this.strings,s=!1;if(i===void 0)e=Ke(this,e,t,0),s=!ft(e)||e!==this._$AH&&e!==be,s&&(this._$AH=e);else{var l=e,d,u;for(e=i[0],d=0;d<i.length-1;d++)u=Ke(this,l[r+d],t,d),u===be&&(u=this._$AH[d]),s||(s=!ft(u)||u!==this._$AH[d]),u===O?e=O:e!==O&&(e+=(u!=null?u:"")+i[d+1]),this._$AH[d]=u}s&&!o&&this.j(e)}},{key:"j",value:function(e){e===O?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,e!=null?e:"")}}])})(),di=(function(a){function n(){var e;return j(this,n),e=H(this,n,arguments),e.type=3,e}return N(n,a),L(n,[{key:"j",value:function(t){this.element[this.name]=t===O?void 0:t}}])})(Pt),ui=(function(a){function n(){var e;return j(this,n),e=H(this,n,arguments),e.type=4,e}return N(n,a),L(n,[{key:"j",value:function(t){this.element.toggleAttribute(this.name,!!t&&t!==O)}}])})(Pt),pi=(function(a){function n(e,t,r,o,i){var s;return j(this,n),s=H(this,n,[e,t,r,o,i]),s.type=5,s}return N(n,a),L(n,[{key:"_$AI",value:function(t){var r,o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this;if((t=(r=Ke(this,t,o,0))!==null&&r!==void 0?r:O)!==be){var i=this._$AH,s=t===O&&i!==O||t.capture!==i.capture||t.once!==i.once||t.passive!==i.passive,l=t!==O&&(i===O||s);s&&this.element.removeEventListener(this.name,this,i),l&&this.element.addEventListener(this.name,this,t),this._$AH=t}}},{key:"handleEvent",value:function(t){var r,o;typeof this._$AH=="function"?this._$AH.call((r=(o=this.options)===null||o===void 0?void 0:o.host)!==null&&r!==void 0?r:this.element,t):this._$AH.handleEvent(t)}}])})(Pt),hi=(function(){function a(n,e,t){j(this,a),this.element=n,this.type=6,this._$AN=void 0,this._$AM=e,this.options=t}return L(a,[{key:"_$AU",get:function(){return this._$AM._$AU}},{key:"_$AI",value:function(e){Ke(this,e)}}])})(),dr=At.litHtmlPolyfillSupport;dr!=null&&dr(lr,cr),((ar=At.litHtmlVersions)!==null&&ar!==void 0?ar:At.litHtmlVersions=[]).push("3.3.2");var fi=function(n,e,t){var r,o=(r=t==null?void 0:t.renderBefore)!==null&&r!==void 0?r:e,i=o._$litPart$;if(i===void 0){var s,l=(s=t==null?void 0:t.renderBefore)!==null&&s!==void 0?s:null;o._$litPart$=i=new cr(e.insertBefore(ht(),l),l,void 0,t!=null?t:{})}return i._$AI(n),i};const Ue=globalThis;let Z=class extends Ge{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){var e,t;const n=super.createRenderRoot();return(t=(e=this.renderOptions).renderBefore)!=null||(e.renderBefore=n.firstChild),n}update(n){const e=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(n),this._$Do=fi(e,this.renderRoot,this.renderOptions)}connectedCallback(){var n;super.connectedCallback(),(n=this._$Do)==null||n.setConnected(!0)}disconnectedCallback(){var n;super.disconnectedCallback(),(n=this._$Do)==null||n.setConnected(!1)}render(){return be}};Z._$litElement$=!0,Z.finalized=!0,(za=Ue.litElementHydrateSupport)==null||za.call(Ue,{LitElement:Z});const ur=Ue.litElementPolyfillSupport;ur==null||ur({LitElement:Z}),((Aa=Ue.litElementVersions)!=null?Aa:Ue.litElementVersions=[]).push("4.2.2");var te=function(n){return function(e,t){t!==void 0?t.addInitializer(function(){customElements.define(n,e)}):customElements.define(n,e)}};var vi={attribute:!0,type:String,converter:zt,reflect:!1,hasChanged:or},bi=function(){var n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:vi,e=arguments.length>1?arguments[1]:void 0,t=arguments.length>2?arguments[2]:void 0,r=t.kind,o=t.metadata,i=globalThis.litPropertyMetadata.get(o);if(i===void 0&&globalThis.litPropertyMetadata.set(o,i=new Map),r==="setter"&&((n=Object.create(n)).wrapped=!0),i.set(t.name,n),r==="accessor"){var s=t.name;return{set:function(u){var p=e.get.call(this);e.set.call(this,u),this.requestUpdate(s,p,n,!0,u)},init:function(u){return u!==void 0&&this.C(s,void 0,n,u),u}}}if(r==="setter"){var l=t.name;return function(d){var u=this[l];e.call(this,d),this.requestUpdate(l,u,n,!0,d)}}throw Error("Unsupported decorator location: "+r)};function f(a){return function(n,e){return ut(e)=="object"?bi(a,n,e):(function(t,r,o){var i=r.hasOwnProperty(o);return r.constructor.createProperty(o,t),i?Object.getOwnPropertyDescriptor(r,o):void 0})(a,n,e)}}function z(a){return f(ct(ct({},a),{},{state:!0,attribute:!1}))}var gi=function(n,e,t){return t.configurable=!0,t.enumerable=!0,Reflect.decorate&&ut(e)!="object"&&Object.defineProperty(n,e,t),t};function we(a,n){return function(e,t,r){var o=function(s){var l,d;return(l=(d=s.renderRoot)===null||d===void 0?void 0:d.querySelector(a))!==null&&l!==void 0?l:null};return gi(e,t,{get:function(){return o(this)}})}}const mi='.button{display:inline-flex;align-items:center;justify-content:center;font-family:var(--font-family-base);font-weight:var(--font-weight-semibold);border:none;border-radius:var(--radius-base);cursor:pointer;transition:all var(--transition-speed-base) var(--transition-timing);gap:var(--spacing-2);white-space:nowrap;user-select:none;outline:none;text-decoration:none;line-height:1}.button:focus-visible{outline:2px solid var(--color-primary);outline-offset:2px}.button:disabled{opacity:.5;cursor:not-allowed;pointer-events:none}.button ::slotted(*){display:inline-flex;align-items:center;vertical-align:middle}.button ::slotted(i),.button ::slotted([class^="uil-"]),.button ::slotted([class*=" uil-"]){font-size:inherit;line-height:1;flex-shrink:0}.button--sm{font-size:var(--font-size-sm);padding:var(--spacing-1) var(--spacing-2)}.button--sm.button--icon-only{padding:var(--spacing-1);line-height:16px}.button--md{font-size:var(--font-size-sm);padding:var(--spacing-2) var(--spacing-3)}.button--md.button--icon-only{padding:var(--spacing-2);line-height:16px}.button--lg{font-size:var(--font-size-base);padding:var(--spacing-3) var(--spacing-4)}.button--lg.button--icon-only{padding:var(--spacing-3);line-height:16px}.button--solid.button--primary{background-color:var(--color-primary);color:#fff}.button--solid.button--primary:hover:not(:disabled){background-color:var(--color-primary-hover)}.button--solid.button--primary:active:not(:disabled){background-color:var(--color-primary-active)}.button--solid.button--secondary{background-color:var(--color-secondary);color:#fff}.button--solid.button--secondary:hover:not(:disabled){background-color:var(--color-secondary-hover)}.button--solid.button-secondary:active:not(:disabled){background-color:var(--color-secondary-active)}.button--text.button--secondary{background-color:transparent;color:var(--color-secondary)}.button--solid.button--success{background-color:var(--color-success);color:var(--color-success-text-emphasis)}.button--solid.button--success:hover:not(:disabled){background-color:var(--color-success-hover);color:var(--color-success-text-emphasis)}.button--solid.button--success:active:not(:disabled){background-color:var(--color-success-active);color:var(--color-success-text-emphasis)}.button--solid.button--danger{background-color:var(--color-danger);color:var(--color-danger-text-emphasis)}.button--solid.button--danger:hover:not(:disabled){background-color:var(--color-danger-hover);color:var(--color-danger-text-emphasis)}.button--solid.button--danger:active:not(:disabled){background-color:var(--color-danger-active);color:var(--color-danger-text-emphasis)}.button--solid.button--info{background-color:var(--color-info);color:var(--color-info-text-emphasis)}.button--solid.button--info:hover:not(:disabled){background-color:var(--color-info-hover);color:var(--color-info-text-emphasis)}.button--solid.button--info:active:not(:disabled){background-color:var(--color-info-active);color:var(--color-info-text-emphasis)}.button--solid.button--warning{background-color:var(--color-warning);color:var(--color-warning-text-emphasis)}.button--solid.button--warning:hover:not(:disabled){background-color:var(--color-warning-hover);color:var(--color-warning-text-emphasis)}.button--solid.button--warning:active:not(:disabled){background-color:var(--color-warning-active);color:var(--color-warning-text-emphasis)}.button--outline{border-width:2px;border-style:solid}.button--outline.button--sm{padding:calc(var(--spacing-1) - 2px) calc(var(--spacing-2) - 2px)}.button--outline.button--sm.button--icon-only{padding:calc(var(--spacing-1) - 2px)}.button--outline.button--md{padding:calc(var(--spacing-2) - 2px) calc(var(--spacing-3) - 2px)}.button--outline.button--md.button--icon-only{padding:calc(var(--spacing-2) - 2px)}.button--outline.button--lg{padding:calc(var(--spacing-3) - 2px) calc(var(--spacing-4) - 2px)}.button--outline.button--lg.button--icon-only{padding:calc(var(--spacing-3) - 2px)}.button--outline.button--primary{background-color:transparent;color:var(--color-primary-text-emphasis);border-color:var(--color-border)}.button--outline.button--primary:hover:not(:disabled){background-color:var(--color-outline-hover);color:var(--color-primary)}.button--outline.button--secondary{background-color:transparent;color:var(--color-secondary-text-emphasis);border-color:var(--color-border)}.button--outline.button--secondary:hover:not(:disabled){background-color:var(--color-outline-hover);color:var(--color-secondary)}.button--outline.button--success{background-color:transparent;color:var(--color-success-outline-text-emphasis);border-color:var(--color-border-success)}.button--outline.button--success:hover:not(:disabled){background-color:var(--color-outline-hover);color:var(--color-success-outline-text-emphasis)}.button--outline.button--danger{background-color:transparent;color:var(--color-danger-outline-text-emphasis);border-color:var(--color-border-danger)}.button--outline.button--danger:hover:not(:disabled){background-color:var(--color-outline-hover);color:var(--color-danger-outline-text-emphasis)}.button--outline.button--info{background-color:transparent;color:var(--color-info-outline-text-emphasis);border-color:var(--color-border-info)}.button--outline.button--info:hover:not(:disabled){background-color:var(--color-outline-hover);color:var(--color-info-outline-text-emphasis)}.button--outline.button--warning{background-color:transparent;color:var(--color-warning-text-emphasis);border-color:var(--color-border-warning)}.button--outline.button--warning:hover:not(:disabled){background-color:var(--color-outline-hover);color:var(--color-warning-text-emphasis)}.button--text.button--primary{background-color:transparent;color:var(--color-primary)}.button--text.button--primary:hover:not(:disabled){background-color:var(--color-primary-bg-subtle)}.button--text.button--success{background-color:transparent;color:var(--color-success)}.button--text.button--success:hover:not(:disabled){background-color:var(--color-success-bg-subtle)}.button--text.button--danger{background-color:transparent;color:var(--color-danger)}.button--text.button--danger:hover:not(:disabled){background-color:var(--color-danger-bg-subtle)}.button--text.button--info{background-color:transparent;color:var(--color-info)}.button--text.button--info:hover:not(:disabled){background-color:var(--color-info-bg-subtle)}.button--text.button--warning{background-color:transparent;color:var(--color-warning)}.button--text.button--warning:hover:not(:disabled){background-color:var(--color-warning-bg-subtle)}';var Vr,Wr,_i=Object.defineProperty,yi=Object.getOwnPropertyDescriptor,Xe=function(n,e,t,r){for(var o=r>1?void 0:r?yi(e,t):e,i=n.length-1,s;i>=0;i--)(s=n[i])&&(o=(r?s(e,t,o):s(o))||o);return r&&o&&_i(e,t,o),o};c.Button=(function(a){function n(){var e;return j(this,n),e=H(this,n,arguments),e.variant="solid",e.size="md",e.theme="primary",e.iconOnly=!1,e.disabled=!1,e}return N(n,a),L(n,[{key:"getButtonClasses",value:function(){var t=["button","button--".concat(this.variant),"button--".concat(this.size),"button--".concat(this.theme)];return this.iconOnly&&t.push("button--icon-only"),t.join(" ")}},{key:"render",value:function(){return m(Vr||(Vr=b([`
|
|
1
|
+
(function(a,z){typeof exports=="object"&&typeof module!="undefined"?z(exports,require("dayjs")):typeof define=="function"&&define.amd?define(["exports","dayjs"],z):(a=typeof globalThis!="undefined"?globalThis:a||self,z(a.LogosphereUI={},a.dayjs))})(this,(function(a,z){"use strict";var Zn=Object.defineProperty,Wn=Object.defineProperties;var Gn=Object.getOwnPropertyDescriptors;var qi=Object.getOwnPropertySymbols;var Kn=Object.prototype.hasOwnProperty,Xn=Object.prototype.propertyIsEnumerable;var Zi=(a,z,re)=>z in a?Zn(a,z,{enumerable:!0,configurable:!0,writable:!0,value:re}):a[z]=re,$e=(a,z)=>{for(var re in z||(z={}))Kn.call(z,re)&&Zi(a,re,z[re]);if(qi)for(var re of qi(z))Xn.call(z,re)&&Zi(a,re,z[re]);return a},Me=(a,z)=>Wn(a,Gn(z));var Li,Ti,Bi,Ii,Ri,Hi;const re=globalThis,no=re.ShadowRoot&&(re.ShadyCSS===void 0||re.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,lo=Symbol(),Lo=new WeakMap;let To=class{constructor(e,t,o){if(this._$cssResult$=!0,o!==lo)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=e,this.t=t}get styleSheet(){let e=this.o;const t=this.t;if(no&&e===void 0){const o=t!==void 0&&t.length===1;o&&(e=Lo.get(t)),e===void 0&&((this.o=e=new CSSStyleSheet).replaceSync(this.cssText),o&&Lo.set(t,e))}return e}toString(){return this.cssText}};const A=r=>new To(typeof r=="string"?r:r+"",void 0,lo),D=(r,...e)=>{const t=r.length===1?r[0]:e.reduce((o,i,s)=>o+(n=>{if(n._$cssResult$===!0)return n.cssText;if(typeof n=="number")return n;throw Error("Value passed to 'css' function must be a 'css' function result: "+n+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(i)+r[s+1],r[0]);return new To(t,r,lo)},Wi=(r,e)=>{if(no)r.adoptedStyleSheets=e.map(t=>t instanceof CSSStyleSheet?t:t.styleSheet);else for(const t of e){const o=document.createElement("style"),i=re.litNonce;i!==void 0&&o.setAttribute("nonce",i),o.textContent=t.cssText,r.appendChild(o)}},Bo=no?r=>r:r=>r instanceof CSSStyleSheet?(e=>{let t="";for(const o of e.cssRules)t+=o.cssText;return A(t)})(r):r;const{is:Gi,defineProperty:Ki,getOwnPropertyDescriptor:Xi,getOwnPropertyNames:Ji,getOwnPropertySymbols:Qi,getPrototypeOf:er}=Object,Oe=globalThis,Io=Oe.trustedTypes,tr=Io?Io.emptyScript:"",co=Oe.reactiveElementPolyfillSupport,ft=(r,e)=>r,Ht={toAttribute(r,e){switch(e){case Boolean:r=r?tr:null;break;case Object:case Array:r=r==null?r:JSON.stringify(r)}return r},fromAttribute(r,e){let t=r;switch(e){case Boolean:t=r!==null;break;case Number:t=r===null?null:Number(r);break;case Object:case Array:try{t=JSON.parse(r)}catch(o){t=null}}return t}},po=(r,e)=>!Gi(r,e),Ro={attribute:!0,type:String,converter:Ht,reflect:!1,useDefault:!1,hasChanged:po};(Li=Symbol.metadata)!=null||(Symbol.metadata=Symbol("metadata")),(Ti=Oe.litPropertyMetadata)!=null||(Oe.litPropertyMetadata=new WeakMap);let Qe=class extends HTMLElement{static addInitializer(e){var t;this._$Ei(),((t=this.l)!=null?t:this.l=[]).push(e)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(e,t=Ro){if(t.state&&(t.attribute=!1),this._$Ei(),this.prototype.hasOwnProperty(e)&&((t=Object.create(t)).wrapped=!0),this.elementProperties.set(e,t),!t.noAccessor){const o=Symbol(),i=this.getPropertyDescriptor(e,o,t);i!==void 0&&Ki(this.prototype,e,i)}}static getPropertyDescriptor(e,t,o){var n;const{get:i,set:s}=(n=Xi(this.prototype,e))!=null?n:{get(){return this[t]},set(l){this[t]=l}};return{get:i,set(l){const c=i==null?void 0:i.call(this);s==null||s.call(this,l),this.requestUpdate(e,c,o)},configurable:!0,enumerable:!0}}static getPropertyOptions(e){var t;return(t=this.elementProperties.get(e))!=null?t:Ro}static _$Ei(){if(this.hasOwnProperty(ft("elementProperties")))return;const e=er(this);e.finalize(),e.l!==void 0&&(this.l=[...e.l]),this.elementProperties=new Map(e.elementProperties)}static finalize(){if(this.hasOwnProperty(ft("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(ft("properties"))){const t=this.properties,o=[...Ji(t),...Qi(t)];for(const i of o)this.createProperty(i,t[i])}const e=this[Symbol.metadata];if(e!==null){const t=litPropertyMetadata.get(e);if(t!==void 0)for(const[o,i]of t)this.elementProperties.set(o,i)}this._$Eh=new Map;for(const[t,o]of this.elementProperties){const i=this._$Eu(t,o);i!==void 0&&this._$Eh.set(i,t)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(e){const t=[];if(Array.isArray(e)){const o=new Set(e.flat(1/0).reverse());for(const i of o)t.unshift(Bo(i))}else e!==void 0&&t.push(Bo(e));return t}static _$Eu(e,t){const o=t.attribute;return o===!1?void 0:typeof o=="string"?o:typeof e=="string"?e.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Em=null,this._$Ev()}_$Ev(){var e;this._$ES=new Promise(t=>this.enableUpdating=t),this._$AL=new Map,this._$E_(),this.requestUpdate(),(e=this.constructor.l)==null||e.forEach(t=>t(this))}addController(e){var t,o;((t=this._$EO)!=null?t:this._$EO=new Set).add(e),this.renderRoot!==void 0&&this.isConnected&&((o=e.hostConnected)==null||o.call(e))}removeController(e){var t;(t=this._$EO)==null||t.delete(e)}_$E_(){const e=new Map,t=this.constructor.elementProperties;for(const o of t.keys())this.hasOwnProperty(o)&&(e.set(o,this[o]),delete this[o]);e.size>0&&(this._$Ep=e)}createRenderRoot(){var t;const e=(t=this.shadowRoot)!=null?t:this.attachShadow(this.constructor.shadowRootOptions);return Wi(e,this.constructor.elementStyles),e}connectedCallback(){var e,t;(e=this.renderRoot)!=null||(this.renderRoot=this.createRenderRoot()),this.enableUpdating(!0),(t=this._$EO)==null||t.forEach(o=>{var i;return(i=o.hostConnected)==null?void 0:i.call(o)})}enableUpdating(e){}disconnectedCallback(){var e;(e=this._$EO)==null||e.forEach(t=>{var o;return(o=t.hostDisconnected)==null?void 0:o.call(t)})}attributeChangedCallback(e,t,o){this._$AK(e,o)}_$ET(e,t){var s;const o=this.constructor.elementProperties.get(e),i=this.constructor._$Eu(e,o);if(i!==void 0&&o.reflect===!0){const n=(((s=o.converter)==null?void 0:s.toAttribute)!==void 0?o.converter:Ht).toAttribute(t,o.type);this._$Em=e,n==null?this.removeAttribute(i):this.setAttribute(i,n),this._$Em=null}}_$AK(e,t){var s,n,l;const o=this.constructor,i=o._$Eh.get(e);if(i!==void 0&&this._$Em!==i){const c=o.getPropertyOptions(i),u=typeof c.converter=="function"?{fromAttribute:c.converter}:((s=c.converter)==null?void 0:s.fromAttribute)!==void 0?c.converter:Ht;this._$Em=i;const h=u.fromAttribute(t,c.type);this[i]=(l=h!=null?h:(n=this._$Ej)==null?void 0:n.get(i))!=null?l:h,this._$Em=null}}requestUpdate(e,t,o,i=!1,s){var n,l;if(e!==void 0){const c=this.constructor;if(i===!1&&(s=this[e]),o!=null||(o=c.getPropertyOptions(e)),!(((n=o.hasChanged)!=null?n:po)(s,t)||o.useDefault&&o.reflect&&s===((l=this._$Ej)==null?void 0:l.get(e))&&!this.hasAttribute(c._$Eu(e,o))))return;this.C(e,t,o)}this.isUpdatePending===!1&&(this._$ES=this._$EP())}C(e,t,{useDefault:o,reflect:i,wrapped:s},n){var l,c,u;o&&!((l=this._$Ej)!=null?l:this._$Ej=new Map).has(e)&&(this._$Ej.set(e,(c=n!=null?n:t)!=null?c:this[e]),s!==!0||n!==void 0)||(this._$AL.has(e)||(this.hasUpdated||o||(t=void 0),this._$AL.set(e,t)),i===!0&&this._$Em!==e&&((u=this._$Eq)!=null?u:this._$Eq=new Set).add(e))}async _$EP(){this.isUpdatePending=!0;try{await this._$ES}catch(t){Promise.reject(t)}const e=this.scheduleUpdate();return e!=null&&await e,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){var o,i;if(!this.isUpdatePending)return;if(!this.hasUpdated){if((o=this.renderRoot)!=null||(this.renderRoot=this.createRenderRoot()),this._$Ep){for(const[n,l]of this._$Ep)this[n]=l;this._$Ep=void 0}const s=this.constructor.elementProperties;if(s.size>0)for(const[n,l]of s){const{wrapped:c}=l,u=this[n];c!==!0||this._$AL.has(n)||u===void 0||this.C(n,void 0,l,u)}}let e=!1;const t=this._$AL;try{e=this.shouldUpdate(t),e?(this.willUpdate(t),(i=this._$EO)==null||i.forEach(s=>{var n;return(n=s.hostUpdate)==null?void 0:n.call(s)}),this.update(t)):this._$EM()}catch(s){throw e=!1,this._$EM(),s}e&&this._$AE(t)}willUpdate(e){}_$AE(e){var t;(t=this._$EO)==null||t.forEach(o=>{var i;return(i=o.hostUpdated)==null?void 0:i.call(o)}),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(e)),this.updated(e)}_$EM(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(e){return!0}update(e){this._$Eq&&(this._$Eq=this._$Eq.forEach(t=>this._$ET(t,this[t]))),this._$EM()}updated(e){}firstUpdated(e){}};Qe.elementStyles=[],Qe.shadowRootOptions={mode:"open"},Qe[ft("elementProperties")]=new Map,Qe[ft("finalized")]=new Map,co==null||co({ReactiveElement:Qe}),((Bi=Oe.reactiveElementVersions)!=null?Bi:Oe.reactiveElementVersions=[]).push("2.1.2");const _t=globalThis,Ho=r=>r,jt=_t.trustedTypes,jo=jt?jt.createPolicy("lit-html",{createHTML:r=>r}):void 0,No="$lit$",Le=`lit$${Math.random().toFixed(9).slice(2)}$`,Yo="?"+Le,or=`<${Yo}>`,Ye=document,vt=()=>Ye.createComment(""),mt=r=>r===null||typeof r!="object"&&typeof r!="function",ho=Array.isArray,ir=r=>ho(r)||typeof(r==null?void 0:r[Symbol.iterator])=="function",uo=`[
|
|
2
|
+
\f\r]`,yt=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,Vo=/-->/g,Fo=/>/g,Ve=RegExp(`>|${uo}(?:([^\\s"'>=/]+)(${uo}*=${uo}*(?:[^
|
|
3
|
+
\f\r"'\`<>=]|("|')|))|$)`,"g"),Uo=/'/g,qo=/"/g,Zo=/^(?:script|style|textarea|title)$/i,rr=r=>(e,...t)=>({_$litType$:r,strings:e,values:t}),p=rr(1),pe=Symbol.for("lit-noChange"),b=Symbol.for("lit-nothing"),Wo=new WeakMap,Fe=Ye.createTreeWalker(Ye,129);function Go(r,e){if(!ho(r)||!r.hasOwnProperty("raw"))throw Error("invalid template strings array");return jo!==void 0?jo.createHTML(e):e}const sr=(r,e)=>{const t=r.length-1,o=[];let i,s=e===2?"<svg>":e===3?"<math>":"",n=yt;for(let l=0;l<t;l++){const c=r[l];let u,h,g=-1,f=0;for(;f<c.length&&(n.lastIndex=f,h=n.exec(c),h!==null);)f=n.lastIndex,n===yt?h[1]==="!--"?n=Vo:h[1]!==void 0?n=Fo:h[2]!==void 0?(Zo.test(h[2])&&(i=RegExp("</"+h[2],"g")),n=Ve):h[3]!==void 0&&(n=Ve):n===Ve?h[0]===">"?(n=i!=null?i:yt,g=-1):h[1]===void 0?g=-2:(g=n.lastIndex-h[2].length,u=h[1],n=h[3]===void 0?Ve:h[3]==='"'?qo:Uo):n===qo||n===Uo?n=Ve:n===Vo||n===Fo?n=yt:(n=Ve,i=void 0);const v=n===Ve&&r[l+1].startsWith("/>")?" ":"";s+=n===yt?c+or:g>=0?(o.push(u),c.slice(0,g)+No+c.slice(g)+Le+v):c+Le+(g===-2?l:v)}return[Go(r,s+(r[t]||"<?>")+(e===2?"</svg>":e===3?"</math>":"")),o]};class wt{constructor({strings:e,_$litType$:t},o){let i;this.parts=[];let s=0,n=0;const l=e.length-1,c=this.parts,[u,h]=sr(e,t);if(this.el=wt.createElement(u,o),Fe.currentNode=this.el.content,t===2||t===3){const g=this.el.content.firstChild;g.replaceWith(...g.childNodes)}for(;(i=Fe.nextNode())!==null&&c.length<l;){if(i.nodeType===1){if(i.hasAttributes())for(const g of i.getAttributeNames())if(g.endsWith(No)){const f=h[n++],v=i.getAttribute(g).split(Le),w=/([.?@])?(.*)/.exec(f);c.push({type:1,index:s,name:w[2],strings:v,ctor:w[1]==="."?nr:w[1]==="?"?lr:w[1]==="@"?dr:Nt}),i.removeAttribute(g)}else g.startsWith(Le)&&(c.push({type:6,index:s}),i.removeAttribute(g));if(Zo.test(i.tagName)){const g=i.textContent.split(Le),f=g.length-1;if(f>0){i.textContent=jt?jt.emptyScript:"";for(let v=0;v<f;v++)i.append(g[v],vt()),Fe.nextNode(),c.push({type:2,index:++s});i.append(g[f],vt())}}}else if(i.nodeType===8)if(i.data===Yo)c.push({type:2,index:s});else{let g=-1;for(;(g=i.data.indexOf(Le,g+1))!==-1;)c.push({type:7,index:s}),g+=Le.length-1}s++}}static createElement(e,t){const o=Ye.createElement("template");return o.innerHTML=e,o}}function et(r,e,t=r,o){var n,l,c;if(e===pe)return e;let i=o!==void 0?(n=t._$Co)==null?void 0:n[o]:t._$Cl;const s=mt(e)?void 0:e._$litDirective$;return(i==null?void 0:i.constructor)!==s&&((l=i==null?void 0:i._$AO)==null||l.call(i,!1),s===void 0?i=void 0:(i=new s(r),i._$AT(r,t,o)),o!==void 0?((c=t._$Co)!=null?c:t._$Co=[])[o]=i:t._$Cl=i),i!==void 0&&(e=et(r,i._$AS(r,e.values),i,o)),e}class ar{constructor(e,t){this._$AV=[],this._$AN=void 0,this._$AD=e,this._$AM=t}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(e){var u;const{el:{content:t},parts:o}=this._$AD,i=((u=e==null?void 0:e.creationScope)!=null?u:Ye).importNode(t,!0);Fe.currentNode=i;let s=Fe.nextNode(),n=0,l=0,c=o[0];for(;c!==void 0;){if(n===c.index){let h;c.type===2?h=new tt(s,s.nextSibling,this,e):c.type===1?h=new c.ctor(s,c.name,c.strings,this,e):c.type===6&&(h=new cr(s,this,e)),this._$AV.push(h),c=o[++l]}n!==(c==null?void 0:c.index)&&(s=Fe.nextNode(),n++)}return Fe.currentNode=Ye,i}p(e){let t=0;for(const o of this._$AV)o!==void 0&&(o.strings!==void 0?(o._$AI(e,o,t),t+=o.strings.length-2):o._$AI(e[t])),t++}}class tt{get _$AU(){var e,t;return(t=(e=this._$AM)==null?void 0:e._$AU)!=null?t:this._$Cv}constructor(e,t,o,i){var s;this.type=2,this._$AH=b,this._$AN=void 0,this._$AA=e,this._$AB=t,this._$AM=o,this.options=i,this._$Cv=(s=i==null?void 0:i.isConnected)!=null?s:!0}get parentNode(){let e=this._$AA.parentNode;const t=this._$AM;return t!==void 0&&(e==null?void 0:e.nodeType)===11&&(e=t.parentNode),e}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(e,t=this){e=et(this,e,t),mt(e)?e===b||e==null||e===""?(this._$AH!==b&&this._$AR(),this._$AH=b):e!==this._$AH&&e!==pe&&this._(e):e._$litType$!==void 0?this.$(e):e.nodeType!==void 0?this.T(e):ir(e)?this.k(e):this._(e)}O(e){return this._$AA.parentNode.insertBefore(e,this._$AB)}T(e){this._$AH!==e&&(this._$AR(),this._$AH=this.O(e))}_(e){this._$AH!==b&&mt(this._$AH)?this._$AA.nextSibling.data=e:this.T(Ye.createTextNode(e)),this._$AH=e}$(e){var s;const{values:t,_$litType$:o}=e,i=typeof o=="number"?this._$AC(e):(o.el===void 0&&(o.el=wt.createElement(Go(o.h,o.h[0]),this.options)),o);if(((s=this._$AH)==null?void 0:s._$AD)===i)this._$AH.p(t);else{const n=new ar(i,this),l=n.u(this.options);n.p(t),this.T(l),this._$AH=n}}_$AC(e){let t=Wo.get(e.strings);return t===void 0&&Wo.set(e.strings,t=new wt(e)),t}k(e){ho(this._$AH)||(this._$AH=[],this._$AR());const t=this._$AH;let o,i=0;for(const s of e)i===t.length?t.push(o=new tt(this.O(vt()),this.O(vt()),this,this.options)):o=t[i],o._$AI(s),i++;i<t.length&&(this._$AR(o&&o._$AB.nextSibling,i),t.length=i)}_$AR(e=this._$AA.nextSibling,t){var o;for((o=this._$AP)==null?void 0:o.call(this,!1,!0,t);e!==this._$AB;){const i=Ho(e).nextSibling;Ho(e).remove(),e=i}}setConnected(e){var t;this._$AM===void 0&&(this._$Cv=e,(t=this._$AP)==null||t.call(this,e))}}class Nt{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(e,t,o,i,s){this.type=1,this._$AH=b,this._$AN=void 0,this.element=e,this.name=t,this._$AM=i,this.options=s,o.length>2||o[0]!==""||o[1]!==""?(this._$AH=Array(o.length-1).fill(new String),this.strings=o):this._$AH=b}_$AI(e,t=this,o,i){const s=this.strings;let n=!1;if(s===void 0)e=et(this,e,t,0),n=!mt(e)||e!==this._$AH&&e!==pe,n&&(this._$AH=e);else{const l=e;let c,u;for(e=s[0],c=0;c<s.length-1;c++)u=et(this,l[o+c],t,c),u===pe&&(u=this._$AH[c]),n||(n=!mt(u)||u!==this._$AH[c]),u===b?e=b:e!==b&&(e+=(u!=null?u:"")+s[c+1]),this._$AH[c]=u}n&&!i&&this.j(e)}j(e){e===b?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,e!=null?e:"")}}class nr extends Nt{constructor(){super(...arguments),this.type=3}j(e){this.element[this.name]=e===b?void 0:e}}class lr extends Nt{constructor(){super(...arguments),this.type=4}j(e){this.element.toggleAttribute(this.name,!!e&&e!==b)}}class dr extends Nt{constructor(e,t,o,i,s){super(e,t,o,i,s),this.type=5}_$AI(e,t=this){var n;if((e=(n=et(this,e,t,0))!=null?n:b)===pe)return;const o=this._$AH,i=e===b&&o!==b||e.capture!==o.capture||e.once!==o.once||e.passive!==o.passive,s=e!==b&&(o===b||i);i&&this.element.removeEventListener(this.name,this,o),s&&this.element.addEventListener(this.name,this,e),this._$AH=e}handleEvent(e){var t,o;typeof this._$AH=="function"?this._$AH.call((o=(t=this.options)==null?void 0:t.host)!=null?o:this.element,e):this._$AH.handleEvent(e)}}class cr{constructor(e,t,o){this.element=e,this.type=6,this._$AN=void 0,this._$AM=t,this.options=o}get _$AU(){return this._$AM._$AU}_$AI(e){et(this,e)}}const pr={I:tt},go=_t.litHtmlPolyfillSupport;go==null||go(wt,tt),((Ii=_t.litHtmlVersions)!=null?Ii:_t.litHtmlVersions=[]).push("3.3.2");const hr=(r,e,t)=>{var s,n;const o=(s=t==null?void 0:t.renderBefore)!=null?s:e;let i=o._$litPart$;if(i===void 0){const l=(n=t==null?void 0:t.renderBefore)!=null?n:null;o._$litPart$=i=new tt(e.insertBefore(vt(),l),l,void 0,t!=null?t:{})}return i._$AI(r),i};const Ue=globalThis;let E=class extends Qe{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){var t,o;const e=super.createRenderRoot();return(o=(t=this.renderOptions).renderBefore)!=null||(t.renderBefore=e.firstChild),e}update(e){const t=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(e),this._$Do=hr(t,this.renderRoot,this.renderOptions)}connectedCallback(){var e;super.connectedCallback(),(e=this._$Do)==null||e.setConnected(!0)}disconnectedCallback(){var e;super.disconnectedCallback(),(e=this._$Do)==null||e.setConnected(!1)}render(){return pe}};E._$litElement$=!0,E.finalized=!0,(Ri=Ue.litElementHydrateSupport)==null||Ri.call(Ue,{LitElement:E});const bo=Ue.litElementPolyfillSupport;bo==null||bo({LitElement:E}),((Hi=Ue.litElementVersions)!=null?Hi:Ue.litElementVersions=[]).push("4.2.2");const ke={ATTRIBUTE:1,CHILD:2,PROPERTY:3,BOOLEAN_ATTRIBUTE:4},Yt=r=>(...e)=>({_$litDirective$:r,values:e});let Vt=class{constructor(e){}get _$AU(){return this._$AM._$AU}_$AT(e,t,o){this._$Ct=e,this._$AM=t,this._$Ci=o}_$AS(e,t){return this.update(e,t)}update(e,t){return this.render(...t)}};let fo=class extends Vt{constructor(e){if(super(e),this.it=b,e.type!==ke.CHILD)throw Error(this.constructor.directiveName+"() can only be used in child bindings")}render(e){if(e===b||e==null)return this._t=void 0,this.it=e;if(e===pe)return e;if(typeof e!="string")throw Error(this.constructor.directiveName+"() called with a non-string value");if(e===this.it)return this._t;this.it=e;const t=[e];return t.raw=t,this._t={_$litType$:this.constructor.resultType,strings:t,values:[]}}};fo.directiveName="unsafeHTML",fo.resultType=1;const _o=Yt(fo),ur={"uil-times":'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M13.41,12l4.3-4.29a1,1,0,1,0-1.42-1.42L12,10.59,7.71,6.29A1,1,0,0,0,6.29,7.71L10.59,12l-4.3,4.29a1,1,0,0,0,0,1.42,1,1,0,0,0,1.42,0L12,13.41l4.29,4.3a1,1,0,0,0,1.42,0,1,1,0,0,0,0-1.42Z"/></svg>',"uil-clock":'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M15.09814,12.63379,13,11.42285V7a1,1,0,0,0-2,0v5a.99985.99985,0,0,0,.5.86621l2.59814,1.5a1.00016,1.00016,0,1,0,1-1.73242ZM12,2A10,10,0,1,0,22,12,10.01114,10.01114,0,0,0,12,2Zm0,18a8,8,0,1,1,8-8A8.00917,8.00917,0,0,1,12,20Z"/></svg>',"uil-check":'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M18.71,7.21a1,1,0,0,0-1.42,0L9.84,14.67,6.71,11.53A1,1,0,1,0,5.29,13l3.84,3.84a1,1,0,0,0,1.42,0l8.16-8.16A1,1,0,0,0,18.71,7.21Z"/></svg>',"uil-plus":'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M19,11H13V5a1,1,0,0,0-2,0v6H5a1,1,0,0,0,0,2h6v6a1,1,0,0,0,2,0V13h6a1,1,0,0,0,0-2Z"/></svg>',"uil-calendar":'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M19,4H17V3a1,1,0,0,0-2,0V4H9V3A1,1,0,0,0,7,3V4H5A3,3,0,0,0,2,7V19a3,3,0,0,0,3,3H19a3,3,0,0,0,3-3V7A3,3,0,0,0,19,4Zm1,15a1,1,0,0,1-1,1H5a1,1,0,0,1-1-1V12H20Zm0-9H4V7A1,1,0,0,1,5,6H7V7A1,1,0,0,0,9,7V6h6V7a1,1,0,0,0,2,0V6h2a1,1,0,0,1,1,1Z"/></svg>',"uil-calendar-alt":'<svg xmlns="http://www.w3.org/2000/svg" data-name="Layer 1" viewBox="0 0 24 24"><path d="M12,19a1,1,0,1,0-1-1A1,1,0,0,0,12,19Zm5,0a1,1,0,1,0-1-1A1,1,0,0,0,17,19Zm0-4a1,1,0,1,0-1-1A1,1,0,0,0,17,15Zm-5,0a1,1,0,1,0-1-1A1,1,0,0,0,12,15ZM19,3H18V2a1,1,0,0,0-2,0V3H8V2A1,1,0,0,0,6,2V3H5A3,3,0,0,0,2,6V20a3,3,0,0,0,3,3H19a3,3,0,0,0,3-3V6A3,3,0,0,0,19,3Zm1,17a1,1,0,0,1-1,1H5a1,1,0,0,1-1-1V11H20ZM20,9H4V6A1,1,0,0,1,5,5H6V6A1,1,0,0,0,8,6V5h8V6a1,1,0,0,0,2,0V5h1a1,1,0,0,1,1,1ZM7,15a1,1,0,1,0-1-1A1,1,0,0,0,7,15Zm0,4a1,1,0,1,0-1-1A1,1,0,0,0,7,19Z"/></svg>',"uil-arrow-left":'<svg xmlns="http://www.w3.org/2000/svg" data-name="Layer 1" viewBox="0 0 24 24"><path d="M17,11H9.41l3.3-3.29a1,1,0,1,0-1.42-1.42l-5,5a1,1,0,0,0-.21.33,1,1,0,0,0,0,.76,1,1,0,0,0,.21.33l5,5a1,1,0,0,0,1.42,0,1,1,0,0,0,0-1.42L9.41,13H17a1,1,0,0,0,0-2Z"/></svg>',"uil-arrow-right":'<svg xmlns="http://www.w3.org/2000/svg" data-name="Layer 1" viewBox="0 0 24 24"><path d="M17.92,11.62a1,1,0,0,0-.21-.33l-5-5a1,1,0,0,0-1.42,1.42L14.59,11H7a1,1,0,0,0,0,2h7.59l-3.3,3.29a1,1,0,0,0,0,1.42,1,1,0,0,0,1.42,0l5-5a1,1,0,0,0,.21-.33A1,1,0,0,0,17.92,11.62Z"/></svg>',"uil-arrow-up":'<svg xmlns="http://www.w3.org/2000/svg" data-name="Layer 1" viewBox="0 0 24 24"><path d="M17.71,11.29l-5-5a1,1,0,0,0-.33-.21,1,1,0,0,0-.76,0,1,1,0,0,0-.33.21l-5,5a1,1,0,0,0,1.42,1.42L11,9.41V17a1,1,0,0,0,2,0V9.41l3.29,3.3a1,1,0,0,0,1.42,0A1,1,0,0,0,17.71,11.29Z"/></svg>',"uil-arrow-down":'<svg xmlns="http://www.w3.org/2000/svg" data-name="Layer 1" viewBox="0 0 24 24"><path d="M17.71,11.29a1,1,0,0,0-1.42,0L13,14.59V7a1,1,0,0,0-2,0v7.59l-3.29-3.3a1,1,0,0,0-1.42,1.42l5,5a1,1,0,0,0,.33.21.94.94,0,0,0,.76,0,1,1,0,0,0,.33-.21l5-5A1,1,0,0,0,17.71,11.29Z"/></svg>',"uil-angle-down":'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M17,9.17a1,1,0,0,0-1.41,0L12,12.71,8.46,9.17a1,1,0,0,0-1.41,0,1,1,0,0,0,0,1.42l4.24,4.24a1,1,0,0,0,1.42,0L17,10.59A1,1,0,0,0,17,9.17Z"/></svg>',"uil-angle-left":'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M11.29,12l3.54-3.54a1,1,0,0,0,0-1.41,1,1,0,0,0-1.42,0L9.17,11.29a1,1,0,0,0,0,1.42L13.41,17a1,1,0,0,0,.71.29,1,1,0,0,0,.71-.29,1,1,0,0,0,0-1.41Z"/></svg>',"uil-angle-right":'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M14.83,11.29,10.59,7.05a1,1,0,0,0-1.42,0,1,1,0,0,0,0,1.41L12.71,12,9.17,15.54a1,1,0,0,0,0,1.41,1,1,0,0,0,.71.29,1,1,0,0,0,.71-.29l4.24-4.24A1,1,0,0,0,14.83,11.29Z"/></svg>',"uil-angle-double-left":'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M11.46,8.29a1,1,0,0,0-1.42,0l-3,3a1,1,0,0,0,0,1.42l3,3a1,1,0,0,0,1.42,0,1,1,0,0,0,0-1.42L9.16,12l2.3-2.29A1,1,0,0,0,11.46,8.29ZM14.66,12,17,9.71a1,1,0,0,0-1.42-1.42l-3,3a1,1,0,0,0,0,1.42l3,3a1,1,0,0,0,1.42,0,1,1,0,0,0,0-1.42Z"/></svg>',"uil-angle-double-right":'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M8.46,8.29A1,1,0,1,0,7,9.71L9.34,12,7,14.29a1,1,0,0,0,0,1.42,1,1,0,0,0,1.42,0l3-3a1,1,0,0,0,0-1.42Zm8.5,3-3-3a1,1,0,0,0-1.42,1.42L14.84,12l-2.3,2.29a1,1,0,0,0,0,1.42,1,1,0,0,0,1.42,0l3-3A1,1,0,0,0,17,11.29Z"/></svg>',"uil-trash":'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M20,6H16V5a3,3,0,0,0-3-3H11A3,3,0,0,0,8,5V6H4A1,1,0,0,0,4,8H5V19a3,3,0,0,0,3,3h8a3,3,0,0,0,3-3V8h1a1,1,0,0,0,0-2ZM10,5a1,1,0,0,1,1-1h2a1,1,0,0,1,1,1V6H10Zm7,14a1,1,0,0,1-1,1H8a1,1,0,0,1-1-1V8H17Z"/></svg>',"uil-compress-alt":'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M21.71,2.29a1,1,0,0,0-1.42,0L14.5,8.09V6.5a1,1,0,0,0-2,0v4a1,1,0,0,0,.08.38,1,1,0,0,0,.54.54,1,1,0,0,0,.38.08h4a1,1,0,0,0,0-2H15.91l5.8-5.79A1,1,0,0,0,21.71,2.29ZM10.88,12.58a1,1,0,0,0-.38-.08h-4a1,1,0,0,0,0,2H8.09l-5.8,5.79a1,1,0,0,0,0,1.42,1,1,0,0,0,1.42,0l5.79-5.8V17.5a1,1,0,0,0,2,0v-4a1,1,0,0,0-.08-.38A1,1,0,0,0,10.88,12.58Z"/></svg>',"uil-expand-alt":'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M9.79,12.79,4,18.59V17a1,1,0,0,0-2,0v4a1,1,0,0,0,.08.38,1,1,0,0,0,.54.54A1,1,0,0,0,3,22H7a1,1,0,0,0,0-2H5.41l5.8-5.79a1,1,0,0,0-1.42-1.42ZM21.92,2.62a1,1,0,0,0-.54-.54A1,1,0,0,0,21,2H17a1,1,0,0,0,0,2h1.59l-5.8,5.79a1,1,0,0,0,0,1.42,1,1,0,0,0,1.42,0L20,5.41V7a1,1,0,0,0,2,0V3A1,1,0,0,0,21.92,2.62Z"/></svg>',"uil-copy":'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M21,8.94a1.31,1.31,0,0,0-.06-.27l0-.09a1.07,1.07,0,0,0-.19-.28h0l-6-6h0a1.07,1.07,0,0,0-.28-.19.32.32,0,0,0-.09,0A.88.88,0,0,0,14.05,2H10A3,3,0,0,0,7,5V6H6A3,3,0,0,0,3,9V19a3,3,0,0,0,3,3h8a3,3,0,0,0,3-3V18h1a3,3,0,0,0,3-3V9S21,9,21,8.94ZM15,5.41,17.59,8H16a1,1,0,0,1-1-1ZM15,19a1,1,0,0,1-1,1H6a1,1,0,0,1-1-1V9A1,1,0,0,1,6,8H7v7a3,3,0,0,0,3,3h5Zm4-4a1,1,0,0,1-1,1H10a1,1,0,0,1-1-1V5a1,1,0,0,1,1-1h3V7a3,3,0,0,0,3,3h3Z"/></svg>',"uil-thumbs-up":'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M21.3,10.08A3,3,0,0,0,19,9H14.44L15,7.57A4.13,4.13,0,0,0,11.11,2a1,1,0,0,0-.91.59L7.35,9H5a3,3,0,0,0-3,3v7a3,3,0,0,0,3,3H17.73a3,3,0,0,0,2.95-2.46l1.27-7A3,3,0,0,0,21.3,10.08ZM7,20H5a1,1,0,0,1-1-1V12a1,1,0,0,1,1-1H7Zm13-7.82-1.27,7a1,1,0,0,1-1,.82H9V10.21l2.72-6.12A2.11,2.11,0,0,1,13.1,6.87L12.57,8.3A2,2,0,0,0,14.44,11H19a1,1,0,0,1,.77.36A1,1,0,0,1,20,12.18Z"/></svg>',"uil-thumbs-down":'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M19,2H6.27A3,3,0,0,0,3.32,4.46l-1.27,7A3,3,0,0,0,5,15H9.56L9,16.43A4.13,4.13,0,0,0,12.89,22a1,1,0,0,0,.91-.59L16.65,15H19a3,3,0,0,0,3-3V5A3,3,0,0,0,19,2ZM15,13.79l-2.72,6.12a2.13,2.13,0,0,1-1.38-2.78l.53-1.43A2,2,0,0,0,9.56,13H5a1,1,0,0,1-.77-.36A1,1,0,0,1,4,11.82l1.27-7a1,1,0,0,1,1-.82H15ZM20,12a1,1,0,0,1-1,1H17V4h2a1,1,0,0,1,1,1Z"/></svg>',"uil-arrow-circle-right":'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M15.71,12.71a1,1,0,0,0,.21-.33,1,1,0,0,0,0-.76,1,1,0,0,0-.21-.33l-3-3a1,1,0,0,0-1.42,1.42L12.59,11H9a1,1,0,0,0,0,2h3.59l-1.3,1.29a1,1,0,0,0,0,1.42,1,1,0,0,0,1.42,0ZM22,12A10,10,0,1,0,12,22,10,10,0,0,0,22,12ZM4,12a8,8,0,1,1,8,8A8,8,0,0,1,4,12Z"/></svg>',"uil-eye":'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M21.92,11.6C19.9,6.91,16.1,4,12,4S4.1,6.91,2.08,11.6a1,1,0,0,0,0,.8C4.1,17.09,7.9,20,12,20s7.9-2.91,9.92-7.6A1,1,0,0,0,21.92,11.6ZM12,18c-3.17,0-6.17-2.29-7.9-6C5.83,8.29,8.83,6,12,6s6.17,2.29,7.9,6C18.17,15.71,15.17,18,12,18ZM12,8a4,4,0,1,0,4,4A4,4,0,0,0,12,8Zm0,6a2,2,0,1,1,2-2A2,2,0,0,1,12,14Z"/></svg>',"uil-eye-slash":'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M10.94,6.08A6.93,6.93,0,0,1,12,6c3.18,0,6.17,2.29,7.91,6a15.23,15.23,0,0,1-.9,1.64,1,1,0,0,0-.16.55,1,1,0,0,0,1.86.5,15.77,15.77,0,0,0,1.21-2.3,1,1,0,0,0,0-.79C19.9,6.91,16.1,4,12,4a7.77,7.77,0,0,0-1.4.12,1,1,0,1,0,.34,2ZM3.71,2.29A1,1,0,0,0,2.29,3.71L5.39,6.8a14.62,14.62,0,0,0-3.31,4.8,1,1,0,0,0,0,.8C4.1,17.09,7.9,20,12,20a9.26,9.26,0,0,0,5.05-1.54l3.24,3.25a1,1,0,0,0,1.42,0,1,1,0,0,0,0-1.42Zm6.36,9.19,2.45,2.45A1.81,1.81,0,0,1,12,14a2,2,0,0,1-2-2A1.81,1.81,0,0,1,10.07,11.48ZM12,18c-3.18,0-6.17-2.29-7.9-6A12.09,12.09,0,0,1,6.8,8.21L8.57,10A4,4,0,0,0,14,15.43L15.59,17A7.24,7.24,0,0,1,12,18Z"/></svg>',"uil-search":'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M21.71,20.29,18,16.61A9,9,0,1,0,16.61,18l3.68,3.68a1,1,0,0,0,1.42,0A1,1,0,0,0,21.71,20.29ZM11,18a7,7,0,1,1,7-7A7,7,0,0,1,11,18Z"/></svg>',"uil-left-arrow-to-left":'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M21,11H9.41l2.3-2.29a1,1,0,1,0-1.42-1.42l-4,4a1,1,0,0,0-.21.33,1,1,0,0,0,0,.76,1,1,0,0,0,.21.33l4,4a1,1,0,0,0,1.42,0,1,1,0,0,0,0-1.42L9.41,13H21a1,1,0,0,0,0-2ZM3,3A1,1,0,0,0,2,4V20a1,1,0,0,0,2,0V4A1,1,0,0,0,3,3Z"/></svg>',"uil-right-arrow-to-right":'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M17.71,11.29l-4-4a1,1,0,1,0-1.42,1.42L14.59,11H3a1,1,0,0,0,0,2H14.59l-2.3,2.29a1,1,0,0,0,0,1.42,1,1,0,0,0,1.42,0l4-4a1,1,0,0,0,.21-.33,1,1,0,0,0,0-.76A1,1,0,0,0,17.71,11.29ZM21,4a1,1,0,0,0-1,1V19a1,1,0,0,0,2,0V5A1,1,0,0,0,21,4Z"/></svg>',"uil-pin":'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M16.37,12.79a1,1,0,0,0-.74,1.86C17.09,15.23,18,16.13,18,17c0,1.42-2.46,3-6,3s-6-1.58-6-3c0-.87.91-1.77,2.37-2.35a1,1,0,0,0-.74-1.86C5.36,13.69,4,15.26,4,17c0,2.8,3.51,5,8,5s8-2.2,8-5C20,15.26,18.64,13.69,16.37,12.79ZM11,9.86V17a1,1,0,0,0,2,0V9.86a4,4,0,1,0-2,0ZM12,4a2,2,0,1,1-2,2A2,2,0,0,1,12,4Z"/></svg>',"uil-check-circle":'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M14.72,8.79l-4.29,4.3L8.78,11.44a1,1,0,1,0-1.41,1.41l2.35,2.36a1,1,0,0,0,.71.29,1,1,0,0,0,.7-.29l5-5a1,1,0,0,0,0-1.42A1,1,0,0,0,14.72,8.79ZM12,2A10,10,0,1,0,22,12,10,10,0,0,0,12,2Zm0,18a8,8,0,1,1,8-8A8,8,0,0,1,12,20Z"/></svg>',"uil-exclamation-triangle":'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M12,16a1,1,0,1,0,1,1A1,1,0,0,0,12,16Zm10.67,1.47-8.05-14a3,3,0,0,0-5.24,0l-8,14A3,3,0,0,0,3.94,22H20.06a3,3,0,0,0,2.61-4.53Zm-1.73,2a1,1,0,0,1-.88.51H3.94a1,1,0,0,1-.88-.51,1,1,0,0,1,0-1l8-14a1,1,0,0,1,1.78,0l8.05,14A1,1,0,0,1,20.94,19.49ZM12,8a1,1,0,0,0-1,1v4a1,1,0,0,0,2,0V9A1,1,0,0,0,12,8Z"/></svg>',"uil-exclamation-octagon":'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M12,7a1,1,0,0,0-1,1v4a1,1,0,0,0,2,0V8A1,1,0,0,0,12,7Zm0,8a1,1,0,1,0,1,1A1,1,0,0,0,12,15Zm9.71-7.44L16.44,2.29A1.05,1.05,0,0,0,15.73,2H8.27a1.05,1.05,0,0,0-.71.29L2.29,7.56A1.05,1.05,0,0,0,2,8.27v7.46a1.05,1.05,0,0,0,.29.71l5.27,5.27a1.05,1.05,0,0,0,.71.29h7.46a1.05,1.05,0,0,0,.71-.29l5.27-5.27a1.05,1.05,0,0,0,.29-.71V8.27A1.05,1.05,0,0,0,21.71,7.56ZM20,15.31,15.31,20H8.69L4,15.31V8.69L8.69,4h6.62L20,8.69Z"/></svg>',"uil-info-circle":'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M12,2A10,10,0,1,0,22,12,10.01114,10.01114,0,0,0,12,2Zm0,18a8,8,0,1,1,8-8A8.00917,8.00917,0,0,1,12,20Zm0-8.5a1,1,0,0,0-1,1v3a1,1,0,0,0,2,0v-3A1,1,0,0,0,12,11.5Zm0-4a1.25,1.25,0,1,0,1.25,1.25A1.25,1.25,0,0,0,12,7.5Z"/></svg>'},ro=class ro extends E{constructor(){super(...arguments),this.name="",this.size=20}render(){const e=ur[this.name];return e?p`
|
|
4
|
+
<span
|
|
5
|
+
style="font-size: ${this.size}px;"
|
|
6
|
+
aria-hidden="true"
|
|
7
|
+
>
|
|
8
|
+
${_o(e)}
|
|
9
|
+
</span>
|
|
10
|
+
`:p``}};ro.properties={name:{type:String},size:{type:Number}},ro.styles=D`
|
|
11
|
+
:host {
|
|
12
|
+
display: inline-flex;
|
|
13
|
+
align-items: center;
|
|
14
|
+
justify-content: center;
|
|
15
|
+
line-height: 0;
|
|
16
|
+
color: inherit;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
svg {
|
|
20
|
+
width: 1em;
|
|
21
|
+
height: 1em;
|
|
22
|
+
fill: currentColor;
|
|
23
|
+
}
|
|
24
|
+
`;let Ft=ro;customElements.define("ui-icon",Ft);const M=r=>(e,t)=>{t!==void 0?t.addInitializer(()=>{customElements.define(r,e)}):customElements.define(r,e)};const gr={attribute:!0,type:String,converter:Ht,reflect:!1,hasChanged:po},br=(r=gr,e,t)=>{const{kind:o,metadata:i}=t;let s=globalThis.litPropertyMetadata.get(i);if(s===void 0&&globalThis.litPropertyMetadata.set(i,s=new Map),o==="setter"&&((r=Object.create(r)).wrapped=!0),s.set(t.name,r),o==="accessor"){const{name:n}=t;return{set(l){const c=e.get.call(this);e.set.call(this,l),this.requestUpdate(n,c,r,!0,l)},init(l){return l!==void 0&&this.C(n,void 0,r,l),l}}}if(o==="setter"){const{name:n}=t;return function(l){const c=this[n];e.call(this,l),this.requestUpdate(n,c,r,!0,l)}}throw Error("Unsupported decorator location: "+o)};function d(r){return(e,t)=>typeof t=="object"?br(r,e,t):((o,i,s)=>{const n=i.hasOwnProperty(s);return i.constructor.createProperty(s,o),n?Object.getOwnPropertyDescriptor(i,s):void 0})(r,e,t)}function m(r){return d(Me($e({},r),{state:!0,attribute:!1}))}const fr=(r,e,t)=>(t.configurable=!0,t.enumerable=!0,Reflect.decorate&&typeof e!="object"&&Object.defineProperty(r,e,t),t);function F(r,e){return(t,o,i)=>{const s=n=>{var l,c;return(c=(l=n.renderRoot)==null?void 0:l.querySelector(r))!=null?c:null};return fr(t,o,{get(){return s(this)}})}}const _r=':host{display:inline-block}.button{display:inline-flex;align-items:center;justify-content:center;font-family:var(--font-family-base);font-size:var(--font-size-sm);font-weight:var(--font-weight-semibold);line-height:1.25rem;letter-spacing:-.14px;border:none;border-radius:var(--radius-base);cursor:pointer;transition:all var(--transition-speed-base) var(--transition-timing);gap:var(--spacing-1);white-space:nowrap;-webkit-user-select:none;user-select:none;outline:none;text-decoration:none;box-sizing:border-box}.button:focus-visible{outline:2px solid var(--color-primary);outline-offset:2px}.button ::slotted(*){display:inline-flex;align-items:center;vertical-align:middle}.button ::slotted(i),.button ::slotted([class^="uil-"]),.button ::slotted([class*=" uil-"]){font-size:1rem;line-height:1;flex-shrink:0}.button--sm{padding:var(--spacing-0-5) var(--spacing-2)}.button--sm.button--icon-only{min-height:24px;width:24px;padding:0}.button--md{padding:var(--spacing-1-5) var(--spacing-3)}.button--md.button--icon-only{min-height:32px;width:32px;padding:0}.button--lg{padding:var(--spacing-2-5) var(--spacing-3)}.button--lg.button--icon-only{min-height:40px;width:40px;padding:0}.button--solid.button--primary{background-color:var(--color-primary);color:var(--color-primary-color, #ffffff)}.button--solid.button--primary:hover:not(:disabled){background-color:var(--color-primary-hover)}.button--solid.button--primary:active:not(:disabled){background-color:var(--color-primary-active)}.button--solid.button--primary:disabled{background-color:var(--color-primary-disabled);cursor:not-allowed;pointer-events:none}.button--solid.button--secondary{background-color:var(--color-secondary);color:var(--color-secondary-color)}.button--solid.button--secondary:hover:not(:disabled){background-color:var(--color-secondary-hover)}.button--solid.button--secondary:active:not(:disabled){background-color:var(--color-secondary-active)}.button--solid.button--secondary:disabled{background-color:var(--color-secondary-disabled);cursor:not-allowed;pointer-events:none}.button--solid.button--success{background-color:var(--color-success);color:var(--color-secondary-color)}.button--solid.button--success:hover:not(:disabled){background-color:var(--color-success-hover)}.button--solid.button--success:active:not(:disabled){background-color:var(--color-success-active)}.button--solid.button--success:disabled{background-color:var(--color-success-disabled);cursor:not-allowed;pointer-events:none}.button--solid.button--danger{background-color:var(--color-danger);color:var(--color-secondary-color)}.button--solid.button--danger:hover:not(:disabled){background-color:var(--color-danger-hover)}.button--solid.button--danger:active:not(:disabled){background-color:var(--color-danger-active)}.button--solid.button--danger:disabled{background-color:var(--color-danger-disabled);cursor:not-allowed;pointer-events:none}.button--solid.button--info{background-color:var(--color-info);color:var(--color-secondary-color)}.button--solid.button--info:hover:not(:disabled){background-color:var(--color-info-hover)}.button--solid.button--info:active:not(:disabled){background-color:var(--color-info-active)}.button--solid.button--info:disabled{background-color:var(--color-info-disabled);cursor:not-allowed;pointer-events:none}.button--solid.button--warning{background-color:var(--color-warning);color:var(--color-secondary-color)}.button--solid.button--warning:hover:not(:disabled){background-color:var(--color-warning-hover)}.button--solid.button--warning:active:not(:disabled){background-color:var(--color-warning-active)}.button--solid.button--warning:disabled{background-color:var(--color-warning-disabled);cursor:not-allowed;pointer-events:none}.button--outline{font-weight:var(--font-weight-medium);border:1px solid var(--color-border);background-color:var(--color-body-bg)}.button--outline:hover:not(:disabled){background-color:var(--color-body-bg-hover)}.button--outline:active:not(:disabled){background-color:var(--color-body-bg-active)}.button--outline:disabled{cursor:not-allowed;pointer-events:none;opacity:.5}.button--outline.button--primary{color:var(--color-primary);border-color:var(--color-border)}.button--outline.button--primary:disabled{color:var(--color-primary-disabled);border-color:var(--color-primary-disabled);opacity:1}.button--outline.button--secondary{color:var(--color-secondary);border-color:var(--color-border)}.button--outline.button--secondary:disabled{color:var(--color-secondary-disabled);border-color:var(--color-secondary-border-subtle);opacity:1}.button--outline.button--success{color:var(--color-success);border-color:var(--color-success-border)}.button--outline.button--success:disabled{color:var(--color-success-disabled);border-color:var(--color-success-border-subtle);opacity:1}.button--outline.button--danger{color:var(--color-danger);border-color:var(--color-danger-border)}.button--outline.button--danger:disabled{color:var(--color-danger-disabled);border-color:var(--color-danger-disabled);opacity:1}.button--outline.button--info{color:var(--color-info);border-color:var(--color-info-border)}.button--outline.button--info:disabled{color:var(--color-info-disabled);border-color:var(--color-info-border-subtle);opacity:1}.button--outline.button--warning{color:var(--color-warning-emphasis);border-color:var(--color-warning-border)}.button--outline.button--warning:disabled{color:var(--color-warning-disabled);border-color:var(--color-warning-border-subtle);opacity:1}.button--text{font-weight:var(--font-weight-medium);background-color:transparent;border:none}.button--text:hover:not(:disabled){background-color:var(--color-body-bg-hover)}.button--text:active:not(:disabled){background-color:var(--color-body-bg-active)}.button--text:disabled{cursor:not-allowed;pointer-events:none;opacity:.5}.button--text{background-color:transparent;border:none}.button--text.button--primary{color:var(--color-primary)}.button--text.button--primary:disabled{color:var(--color-primary-disabled);opacity:1}.button--text.button--secondary{color:var(--color-secondary)}.button--text.button--secondary:disabled{color:var(--color-secondary-disabled);opacity:1}.button--text.button--success{color:var(--color-success)}.button--text.button--success:disabled{color:var(--color-success-disabled);opacity:1}.button--text.button--danger{color:var(--color-danger)}.button--text.button--danger:disabled{color:var(--color-danger-disabled);opacity:1}.button--text.button--info{color:var(--color-info)}.button--text.button--info:disabled{color:var(--color-info-disabled);opacity:1}.button--text.button--warning{color:var(--color-warning-emphasis)}.button--text.button--warning:disabled{color:var(--color-warning-disabled);opacity:1}';var vr=Object.defineProperty,mr=Object.getOwnPropertyDescriptor,ot=(r,e,t,o)=>{for(var i=o>1?void 0:o?mr(e,t):e,s=r.length-1,n;s>=0;s--)(n=r[s])&&(i=(o?n(e,t,i):n(i))||i);return o&&i&&vr(e,t,i),i};a.Button=class extends E{constructor(){super(...arguments),this.variant="solid",this.size="md",this.theme="primary",this.iconOnly=!1,this.disabled=!1}getButtonClasses(){const e=["button",`button--${this.variant}`,`button--${this.size}`,`button--${this.theme}`];return this.iconOnly&&e.push("button--icon-only"),e.join(" ")}render(){return p`
|
|
7
25
|
<button
|
|
8
|
-
class="
|
|
9
|
-
?disabled="
|
|
26
|
+
class="${this.getButtonClasses()}"
|
|
27
|
+
?disabled="${this.disabled}"
|
|
10
28
|
>
|
|
11
29
|
<slot name="prefix"></slot>
|
|
12
30
|
<slot></slot>
|
|
13
31
|
<slot name="suffix"></slot>
|
|
14
32
|
</button>
|
|
15
|
-
`
|
|
16
|
-
<div class="
|
|
33
|
+
`}},a.Button.styles=[D`${A(_r)}`],ot([d({type:String})],a.Button.prototype,"variant",2),ot([d({type:String})],a.Button.prototype,"size",2),ot([d({type:String})],a.Button.prototype,"theme",2),ot([d({type:Boolean})],a.Button.prototype,"iconOnly",2),ot([d({type:Boolean})],a.Button.prototype,"disabled",2),a.Button=ot([M("logosphere-button")],a.Button);const yr=":host{display:inline-block}.badge{display:inline-flex;align-items:center;gap:var(--spacing-1);font-family:var(--font-family-base);font-size:11px;font-weight:var(--font-weight-medium);line-height:1rem;letter-spacing:-.11px;border-radius:var(--radius-base);white-space:nowrap;-webkit-user-select:none;user-select:none}.badge--default-size{min-height:24px;max-height:24px;padding:var(--spacing-0) var(--spacing-2)}.badge--small{min-height:16px;max-height:16px;padding:0 var(--spacing-2)}.badge--round{border-radius:var(--radius-full)}.badge--primary{background-color:var(--color-primary);color:var(--color-secondary-color, #ffffff)}.badge--default{background-color:var(--badge-bg, var(--color-light-bg-2));color:var(--badge-color, var(--color-secondary))}.badge--warning{background-color:var( --color-warning-subtle);color:var(--color-warning-emphasis)}.badge--success{background-color:var(--color-success-subtle);color:var(--color-success-emphasis)}.badge--danger{background-color:var(--color-danger-subtle);color:var(--color-danger)}.badge--info{background-color:var(--color-info-subtle);color:var(--color-info-emphasis)}.badge--purple{background-color:var(--color-commercial-subtle);color:var(--color-commercial-emphasis)}.badge__close{display:inline-flex;align-items:center;justify-content:center;margin-left:var(--spacing-1);padding:0;background:none;border:none;cursor:pointer;color:inherit;opacity:.75;transition:opacity var(--transition-speed-fast) var(--transition-timing);line-height:1}.badge__close:hover{opacity:1}.badge__close:focus{outline:none;opacity:1}";var wr=Object.defineProperty,xr=Object.getOwnPropertyDescriptor,qe=(r,e,t,o)=>{for(var i=o>1?void 0:o?xr(e,t):e,s=r.length-1,n;s>=0;s--)(n=r[s])&&(i=(o?n(e,t,i):n(i))||i);return o&&i&&wr(e,t,i),i};a.LogosphereBadge=class extends E{constructor(){super(...arguments),this.variant="default",this.size="default",this.text="",this.closeable=!1,this.isRound=!1}handleClose(){this.onClose&&this.onClose(),this.dispatchEvent(new CustomEvent("close",{bubbles:!0,composed:!0}))}getBadgeClasses(){const e=["badge",`badge--${this.variant}`,this.size==="small"?"badge--small":"badge--default-size"];return this.isRound&&e.push("badge--round"),e.join(" ")}render(){return p`
|
|
34
|
+
<div class="${this.getBadgeClasses()}">
|
|
17
35
|
<slot></slot>
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
<button class="badge__close" @click=`,` aria-label="Close">
|
|
23
|
-
<ui-icon name="uil-times"></ui-icon>
|
|
36
|
+
${this.text?p`<span>${this.text}</span>`:b}
|
|
37
|
+
${this.closeable?p`
|
|
38
|
+
<button class="badge__close" @click=${this.handleClose} aria-label="Close">
|
|
39
|
+
<ui-icon size="16" name="uil-times"></ui-icon>
|
|
24
40
|
</button>
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
`
|
|
41
|
+
`:b}
|
|
42
|
+
</div>
|
|
43
|
+
`}},a.LogosphereBadge.styles=[D`
|
|
44
|
+
${A(yr)}
|
|
45
|
+
`],qe([d({type:String})],a.LogosphereBadge.prototype,"variant",2),qe([d({type:String})],a.LogosphereBadge.prototype,"size",2),qe([d({type:String})],a.LogosphereBadge.prototype,"text",2),qe([d({type:Boolean})],a.LogosphereBadge.prototype,"closeable",2),qe([d({type:Boolean})],a.LogosphereBadge.prototype,"isRound",2),qe([d({attribute:!1})],a.LogosphereBadge.prototype,"onClose",2),a.LogosphereBadge=qe([M("logosphere-badge")],a.LogosphereBadge);const{I:$r}=pr,Ko=r=>r,Xo=r=>r.strings===void 0,Jo=()=>document.createComment(""),xt=(r,e,t)=>{var s;const o=r._$AA.parentNode,i=e===void 0?r._$AB:e._$AA;if(t===void 0){const n=o.insertBefore(Jo(),i),l=o.insertBefore(Jo(),i);t=new $r(n,l,r,r.options)}else{const n=t._$AB.nextSibling,l=t._$AM,c=l!==r;if(c){let u;(s=t._$AQ)==null||s.call(t,r),t._$AM=r,t._$AP!==void 0&&(u=r._$AU)!==l._$AU&&t._$AP(u)}if(n!==i||c){let u=t._$AA;for(;u!==n;){const h=Ko(u).nextSibling;Ko(o).insertBefore(u,i),u=h}}}return t},Ze=(r,e,t=r)=>(r._$AI(e,t),r),kr={},Qo=(r,e=kr)=>r._$AH=e,Cr=r=>r._$AH,vo=r=>{r._$AR(),r._$AA.remove()};const $t=(r,e)=>{var o;const t=r._$AN;if(t===void 0)return!1;for(const i of t)(o=i._$AO)==null||o.call(i,e,!1),$t(i,e);return!0},Ut=r=>{let e,t;do{if((e=r._$AM)===void 0)break;t=e._$AN,t.delete(r),r=e}while((t==null?void 0:t.size)===0)},ei=r=>{for(let e;e=r._$AM;r=e){let t=e._$AN;if(t===void 0)e._$AN=t=new Set;else if(t.has(r))break;t.add(r),Pr(e)}};function Sr(r){this._$AN!==void 0?(Ut(this),this._$AM=r,ei(this)):this._$AM=r}function Er(r,e=!1,t=0){const o=this._$AH,i=this._$AN;if(i!==void 0&&i.size!==0)if(e)if(Array.isArray(o))for(let s=t;s<o.length;s++)$t(o[s],!1),Ut(o[s]);else o!=null&&($t(o,!1),Ut(o));else $t(this,r)}const Pr=r=>{var e,t;r.type==ke.CHILD&&((e=r._$AP)!=null||(r._$AP=Er),(t=r._$AQ)!=null||(r._$AQ=Sr))};class zr extends Vt{constructor(){super(...arguments),this._$AN=void 0}_$AT(e,t,o){super._$AT(e,t,o),ei(this),this.isConnected=e._$AU}_$AO(e,t=!0){var o,i;e!==this.isConnected&&(this.isConnected=e,e?(o=this.reconnected)==null||o.call(this):(i=this.disconnected)==null||i.call(this)),t&&($t(this,e),Ut(this))}setValue(e){if(Xo(this._$Ct))this._$Ct._$AI(e,this);else{const t=[...this._$Ct._$AH];t[this._$Ci]=e,this._$Ct._$AI(t,this,0)}}disconnected(){}reconnected(){}}const mo=new WeakMap,yo=Yt(class extends zr{render(r){return b}update(r,[e]){var o;const t=e!==this.G;return t&&this.G!==void 0&&this.rt(void 0),(t||this.lt!==this.ct)&&(this.G=e,this.ht=(o=r.options)==null?void 0:o.host,this.rt(this.ct=r.element)),b}rt(r){var e;if(this.isConnected||(r=void 0),typeof this.G=="function"){const t=(e=this.ht)!=null?e:globalThis;let o=mo.get(t);o===void 0&&(o=new WeakMap,mo.set(t,o)),o.get(this.G)!==void 0&&this.G.call(this.ht,void 0),o.set(this.G,r),r!==void 0&&this.G.call(this.ht,r)}else this.G.value=r}get lt(){var r,e,t;return typeof this.G=="function"?(e=mo.get((r=this.ht)!=null?r:globalThis))==null?void 0:e.get(this.G):(t=this.G)==null?void 0:t.value}disconnected(){this.lt===this.ct&&this.rt(void 0)}reconnected(){this.rt(this.ct)}}),Ar=':host{display:inline-block}.checkbox-wrapper{display:inline-flex;align-items:center;gap:var(--spacing-2);cursor:pointer;-webkit-user-select:none;user-select:none;font-family:var(--font-family-base)}.checkbox-wrapper--disabled{opacity:.5;cursor:not-allowed;pointer-events:none}.checkbox-input{position:absolute;opacity:0;width:0;height:0;pointer-events:none}.checkbox-control{box-sizing:border-box;width:16px;height:16px;flex-shrink:0;position:relative;border:1.5px solid var(--color-border);border-radius:var(--radius-sm);background-color:var(--color-body-bg);transition:background-color var(--transition-speed-fast) var(--transition-timing),border-color var(--transition-speed-fast) var(--transition-timing)}.checkbox-control--checked{background-color:var(--color-primary);border-color:var(--color-primary)}.checkbox-control--checked:after{content:"";position:absolute;top:50%;left:50%;width:9px;height:5px;border-left:2px solid #ffffff;border-bottom:2px solid #ffffff;transform:translate(-50%,-65%) rotate(-45deg)}.checkbox-control--indeterminate{background-color:var(--color-primary);border-color:var(--color-primary)}.checkbox-control--indeterminate:after{content:"";position:absolute;top:50%;left:50%;width:8px;height:2px;background-color:#fff;border-radius:1px;transform:translate(-50%,-50%)}.checkbox-label{font-size:var(--font-size-sm);line-height:var(--line-height-normal);color:var(--color-body-text)}.radio-control{box-sizing:border-box;width:16px;height:16px;flex-shrink:0;position:relative;border:1.5px solid var(--color-border);border-radius:var(--radius-full);background-color:var(--color-body-bg);transition:background-color var(--transition-speed-fast) var(--transition-timing),border-color var(--transition-speed-fast) var(--transition-timing)}.checkbox-wrapper:hover .radio-control{border-color:var(--color-border-emphasis);background-color:var(--color-body-bg-hover)}.radio-control--checked{background-color:var(--color-primary);border-color:var(--color-primary)}.checkbox-wrapper:hover .radio-control--checked{background-color:var(--color-primary-hover);border-color:var(--color-primary-hover)}.radio-control--checked:after{content:"";position:absolute;top:50%;left:50%;width:6px;height:6px;border-radius:var(--radius-full);background-color:#fff;transform:translate(-50%,-50%)}.checkbox-wrapper--disabled .radio-control--checked{background-color:var(--color-primary-disabled);border-color:var(--color-primary-disabled)}.switch-wrapper{display:inline-flex;align-items:center;gap:var(--spacing-2);cursor:pointer;-webkit-user-select:none;user-select:none;font-family:var(--font-family-base)}.switch-wrapper--disabled{opacity:.5;cursor:not-allowed;pointer-events:none}.switch-track{width:36px;height:20px;flex-shrink:0;border-radius:var(--radius-full);background-color:var(--color-border);position:relative;transition:background-color var(--transition-speed-fast) var(--transition-timing)}.switch-track--checked{background-color:var(--color-primary)}.switch-thumb{position:absolute;top:2px;left:2px;width:16px;height:16px;border-radius:var(--radius-full);background-color:#fff;box-shadow:var(--shadow-xs);transition:transform var(--transition-speed-fast) var(--transition-timing)}.switch-track--checked .switch-thumb{transform:translate(16px)}';var Dr=Object.defineProperty,Mr=Object.getOwnPropertyDescriptor,Te=(r,e,t,o)=>{for(var i=o>1?void 0:o?Mr(e,t):e,s=r.length-1,n;s>=0;s--)(n=r[s])&&(i=(o?n(e,t,i):n(i))||i);return o&&i&&Dr(e,t,i),i};a.Checkbox=class extends E{constructor(){super(...arguments),this.label="",this.value="",this.type="checkbox",this.disabled=!1,this.indeterminate=!1,this.internalChecked=!1,this._checked=!1}get checked(){return this._checked}set checked(e){const t=this._checked;this._checked=e,this.internalChecked=e,this.requestUpdate("checked",t)}firstUpdated(){this.setIndeterminate()}updated(e){e.has("indeterminate")&&this.setIndeterminate()}setIndeterminate(){this.inputElement&&(this.inputElement.indeterminate=this.indeterminate)}toggleChecked(){if(!this.disabled){if(this.type==="radio"){if(this.internalChecked)return;this.internalChecked=!0}else this.indeterminate?(this.indeterminate=!1,this.internalChecked=!0):this.internalChecked=!this.internalChecked;this.dispatchEvent(new CustomEvent("lgsChange",{detail:{checked:this.internalChecked,indeterminate:this.indeterminate,value:this.value},bubbles:!0,composed:!0}))}}renderCheckbox(){const e=["checkbox-control",this.internalChecked?"checkbox-control--checked":"",this.indeterminate?"checkbox-control--indeterminate":""].filter(Boolean).join(" ");return p`
|
|
28
46
|
<div
|
|
29
|
-
class="checkbox-wrapper
|
|
30
|
-
@click
|
|
47
|
+
class="checkbox-wrapper ${this.disabled?"checkbox-wrapper--disabled":""}"
|
|
48
|
+
@click=${this.toggleChecked}
|
|
31
49
|
>
|
|
32
50
|
<input
|
|
33
51
|
type="checkbox"
|
|
34
52
|
class="checkbox-input"
|
|
35
|
-
.checked
|
|
36
|
-
?disabled
|
|
37
|
-
.value
|
|
38
|
-
|
|
53
|
+
.checked=${this.internalChecked}
|
|
54
|
+
?disabled=${this.disabled}
|
|
55
|
+
.value=${this.value}
|
|
56
|
+
${yo(t=>this.inputElement=t)}
|
|
39
57
|
/>
|
|
40
|
-
<span class="
|
|
41
|
-
|
|
58
|
+
<span class="${e}"></span>
|
|
59
|
+
${this.label?p`<span class="checkbox-label">${this.label}</span>`:b}
|
|
42
60
|
</div>
|
|
43
|
-
`
|
|
61
|
+
`}renderRadio(){const e=["radio-control",this.internalChecked?"radio-control--checked":""].filter(Boolean).join(" ");return p`
|
|
44
62
|
<div
|
|
45
|
-
class="
|
|
46
|
-
@click
|
|
63
|
+
class="checkbox-wrapper ${this.disabled?"checkbox-wrapper--disabled":""}"
|
|
64
|
+
@click=${this.toggleChecked}
|
|
65
|
+
>
|
|
66
|
+
<input
|
|
67
|
+
type="radio"
|
|
68
|
+
class="checkbox-input"
|
|
69
|
+
.checked=${this.internalChecked}
|
|
70
|
+
?disabled=${this.disabled}
|
|
71
|
+
.value=${this.value}
|
|
72
|
+
${yo(t=>this.inputElement=t)}
|
|
73
|
+
/>
|
|
74
|
+
<span class="${e}"></span>
|
|
75
|
+
${this.label?p`<span class="checkbox-label">${this.label}</span>`:b}
|
|
76
|
+
</div>
|
|
77
|
+
`}renderSwitch(){return p`
|
|
78
|
+
<div
|
|
79
|
+
class="switch-wrapper ${this.disabled?"switch-wrapper--disabled":""}"
|
|
80
|
+
@click=${this.toggleChecked}
|
|
47
81
|
>
|
|
48
82
|
<input
|
|
49
83
|
type="checkbox"
|
|
50
84
|
class="checkbox-input"
|
|
51
|
-
.checked
|
|
52
|
-
?disabled
|
|
53
|
-
.value
|
|
54
|
-
|
|
85
|
+
.checked=${this.internalChecked}
|
|
86
|
+
?disabled=${this.disabled}
|
|
87
|
+
.value=${this.value}
|
|
88
|
+
${yo(e=>this.inputElement=e)}
|
|
55
89
|
/>
|
|
56
|
-
<div class="switch-track
|
|
90
|
+
<div class="switch-track ${this.internalChecked?"switch-track--checked":""}">
|
|
57
91
|
<div class="switch-thumb"></div>
|
|
58
92
|
</div>
|
|
59
|
-
|
|
93
|
+
${this.label?p`<span class="checkbox-label">${this.label}</span>`:b}
|
|
60
94
|
</div>
|
|
61
|
-
`
|
|
62
|
-
|
|
63
|
-
`]
|
|
95
|
+
`}render(){return this.type==="switch"?this.renderSwitch():this.type==="radio"?this.renderRadio():this.renderCheckbox()}},a.Checkbox.styles=[D`
|
|
96
|
+
${A(Ar)}
|
|
97
|
+
`],Te([d({type:String})],a.Checkbox.prototype,"label",2),Te([d({type:String})],a.Checkbox.prototype,"value",2),Te([d({type:String})],a.Checkbox.prototype,"type",2),Te([d({type:Boolean})],a.Checkbox.prototype,"disabled",2),Te([d({type:Boolean})],a.Checkbox.prototype,"indeterminate",2),Te([m()],a.Checkbox.prototype,"internalChecked",2),Te([d({type:Boolean})],a.Checkbox.prototype,"checked",1),a.Checkbox=Te([M("logosphere-checkbox")],a.Checkbox);const Or=":host{display:block}.formfield{position:relative;font-family:var(--font-family-base)}.formfield__label{display:block;font-size:12px;line-height:1.125rem;letter-spacing:-.12px;font-weight:var(--font-weight-medium);color:var(--color-tertiary);margin-bottom:var(--spacing-1)}.formfield__required{color:var(--color-danger);margin-left:var(--spacing-1)}.formfield__container{position:relative;display:flex;align-items:center;box-sizing:border-box;border-radius:var(--formfield-border-radius, var(--radius-base));border-top:var(--formfield-border-top, var(--formfield-border-top-width, 1px) solid var(--formfield-border-color, var(--color-border)));border-right:var(--formfield-border-right, var(--formfield-border-right-width, 1px) solid var(--formfield-border-color, var(--color-border)));border-bottom:var(--formfield-border-bottom, var(--formfield-border-bottom-width, 1px) solid var(--formfield-border-color, var(--color-border)));border-left:var(--formfield-border-left, var(--formfield-border-left-width, 1px) solid var(--formfield-border-color, var(--color-border)));padding:0 var(--spacing-2) 0 var(--spacing-3);background-color:var(--color-body-bg);cursor:text;transition:border-color var(--transition-speed-base) var(--transition-timing),background-color var(--transition-speed-base) var(--transition-timing)}.formfield__container--cursor-text{cursor:text}.formfield__container--cursor-pointer{cursor:pointer}.formfield__container--cursor-default{cursor:default}.formfield__container--default{min-height:var(--formfield-min-height, 32px)}.formfield__container--large{min-height:var(--formfield-min-height-large, 40px)}.formfield__container--multiline{align-items:flex-start;min-height:64px;padding-top:var(--spacing-2);padding-bottom:var(--spacing-2)}.formfield__container--hovered:not(.formfield__container--focused):not(.formfield__container--error):not(.formfield__container--disabled){background-color:var(--color-light)}.formfield__container--focused{border-color:var(--formfield-border-color-focus, var(--color-body-text));background-color:var(--color-body-bg)}.formfield__container--error{border-color:var(--color-danger)}.formfield__container--disabled{background-color:var(--color-body-bg);opacity:.4;cursor:not-allowed;pointer-events:none}.formfield__container--subtle:not(.formfield__container--focused):not(.formfield__container--error){border-color:transparent;background-color:var(--color-light)}.formfield__input-area{flex:1;min-width:0;display:flex;align-items:center}.formfield__container--multiline .formfield__input-area{align-items:flex-start;align-self:stretch}.formfield__prefix,.formfield__clear,.formfield__suffix{display:flex;align-items:center;flex-shrink:0;align-self:stretch}.formfield__container--multiline .formfield__clear,.formfield__container--multiline .formfield__suffix{align-items:flex-start}.formfield__container--has-prefix .formfield__prefix{margin-right:var(--spacing-2)}.formfield__container--has-clear .formfield__clear,.formfield__container--has-suffix .formfield__suffix{margin-left:var(--spacing-2)}.formfield__container--has-prefix .formfield__prefix{border-right:1px solid var(--color-border);padding-right:var(--spacing-2)}.formfield__container--has-suffix .formfield__suffix{border-left:1px solid var(--color-border);padding-left:var(--spacing-2)}.formfield__helper{font-size:11px;line-height:1rem;letter-spacing:-.11px;font-weight:var(--font-weight-regular);color:var(--color-tertiary);margin-top:var(--spacing-1)}.formfield__error{font-size:11px;line-height:1rem;letter-spacing:-.11px;font-weight:var(--font-weight-regular);color:var(--color-danger);margin-top:var(--spacing-1)}::slotted(input),::slotted(textarea){width:100%;border:none;outline:none;background:transparent;font-family:inherit;font-size:14px;line-height:1.25rem;letter-spacing:-.14px;color:var(--color-body-text)}::slotted(input:disabled),::slotted(textarea:disabled){cursor:not-allowed}";var Lr=Object.defineProperty,Tr=Object.getOwnPropertyDescriptor,G=(r,e,t,o)=>{for(var i=o>1?void 0:o?Tr(e,t):e,s=r.length-1,n;s>=0;s--)(n=r[s])&&(i=(o?n(e,t,i):n(i))||i);return o&&i&&Lr(e,t,i),i};a.FormField=class extends E{constructor(){super(...arguments),this.label="",this.helper="",this.error="",this.placeholder="",this.size="default",this.variant="default",this.cursor="text",this.required=!1,this.disabled=!1,this.readonly=!1,this.multiline=!1,this.forceFocused=!1,this._focused=!1,this._hovered=!1,this._hasPrefix=!1,this._hasSuffix=!1,this._hasClear=!1,this.handleSlotFocus=e=>{const t=e.target;["INPUT","TEXTAREA","SELECT"].includes(t.tagName)&&(this._focused=!0,this.dispatchEvent(new CustomEvent("field-focus",{bubbles:!0,composed:!0,detail:{originalEvent:e}})))},this.handleSlotBlur=e=>{const t=e.target;["INPUT","TEXTAREA","SELECT"].includes(t.tagName)&&(this._focused=!1,this.dispatchEvent(new CustomEvent("field-blur",{bubbles:!0,composed:!0,detail:{originalEvent:e}})))},this.handleMouseEnter=()=>{this._hovered=!0},this.handleMouseLeave=()=>{this._hovered=!1},this.handleContainerClick=e=>{var s;const t=e.target;if(["INPUT","TEXTAREA","SELECT","BUTTON"].includes(t.tagName))return;const o=(s=this.shadowRoot)==null?void 0:s.querySelector("slot:not([name])"),i=o==null?void 0:o.assignedElements({flatten:!0}).find(n=>["INPUT","TEXTAREA","SELECT"].includes(n.tagName));i==null||i.focus()},this.handlePrefixSlotChange=e=>{const t=e.target;this._hasPrefix=t.assignedElements({flatten:!0}).length>0},this.handleSuffixSlotChange=e=>{const t=e.target;this._hasSuffix=t.assignedElements({flatten:!0}).length>0},this.handleClearSlotChange=e=>{const t=e.target;this._hasClear=t.assignedElements({flatten:!0}).length>0}}connectedCallback(){super.connectedCallback(),this.addEventListener("focus",this.handleSlotFocus,!0),this.addEventListener("blur",this.handleSlotBlur,!0)}firstUpdated(){var i,s,n;const e=(i=this.shadowRoot)==null?void 0:i.querySelector('slot[name="prefix"]'),t=(s=this.shadowRoot)==null?void 0:s.querySelector('slot[name="suffix"]'),o=(n=this.shadowRoot)==null?void 0:n.querySelector('slot[name="clear"]');e&&(this._hasPrefix=e.assignedElements({flatten:!0}).length>0),t&&(this._hasSuffix=t.assignedElements({flatten:!0}).length>0),o&&(this._hasClear=o.assignedElements({flatten:!0}).length>0)}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("focus",this.handleSlotFocus,!0),this.removeEventListener("blur",this.handleSlotBlur,!0)}render(){const e=!!this.error,t=!e&&!!this.helper,o=["formfield__container",`formfield__container--${this.size}`,`formfield__container--cursor-${this.cursor}`,this._hasPrefix?"formfield__container--has-prefix":"",this._hasSuffix?"formfield__container--has-suffix":"",this._hasClear?"formfield__container--has-clear":"",e?"formfield__container--error":"",this._focused||this.forceFocused?"formfield__container--focused":"",this._hovered?"formfield__container--hovered":"",this.disabled?"formfield__container--disabled":"",this.variant==="subtle"?"formfield__container--subtle":"",this.multiline?"formfield__container--multiline":""].filter(Boolean).join(" ");return p`
|
|
64
98
|
<div class="formfield">
|
|
65
|
-
|
|
99
|
+
${this.label?p`
|
|
100
|
+
<label class="formfield__label">
|
|
101
|
+
${this.label}
|
|
102
|
+
${this.required?p`<span class="formfield__required">*</span>`:""}
|
|
103
|
+
</label>
|
|
104
|
+
`:""}
|
|
66
105
|
|
|
67
106
|
<div
|
|
68
|
-
class="
|
|
69
|
-
@mouseenter
|
|
70
|
-
@mouseleave
|
|
71
|
-
@click
|
|
107
|
+
class="${o}"
|
|
108
|
+
@mouseenter=${this.handleMouseEnter}
|
|
109
|
+
@mouseleave=${this.handleMouseLeave}
|
|
110
|
+
@click=${this.handleContainerClick}
|
|
72
111
|
>
|
|
112
|
+
<div class="formfield__prefix">
|
|
113
|
+
<slot name="prefix" @slotchange=${this.handlePrefixSlotChange}></slot>
|
|
114
|
+
</div>
|
|
73
115
|
<div class="formfield__input-area">
|
|
74
116
|
<slot></slot>
|
|
75
117
|
</div>
|
|
118
|
+
<div class="formfield__clear">
|
|
119
|
+
<slot name="clear" @slotchange=${this.handleClearSlotChange}></slot>
|
|
120
|
+
</div>
|
|
76
121
|
<div class="formfield__suffix">
|
|
77
|
-
<slot name="suffix"></slot>
|
|
122
|
+
<slot name="suffix" @slotchange=${this.handleSuffixSlotChange}></slot>
|
|
78
123
|
</div>
|
|
79
124
|
</div>
|
|
80
125
|
|
|
81
|
-
|
|
82
|
-
|
|
126
|
+
${t?p`<div class="formfield__helper">${this.helper}</div>`:""}
|
|
127
|
+
${e?p`<div class="formfield__error">${this.error}</div>`:""}
|
|
83
128
|
</div>
|
|
84
|
-
`])),
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
<
|
|
129
|
+
`}},a.FormField.styles=[D`${A(Or)}`],G([d({type:String})],a.FormField.prototype,"label",2),G([d({type:String})],a.FormField.prototype,"helper",2),G([d({type:String})],a.FormField.prototype,"error",2),G([d({type:String})],a.FormField.prototype,"placeholder",2),G([d({type:String})],a.FormField.prototype,"size",2),G([d({type:String})],a.FormField.prototype,"variant",2),G([d({type:String})],a.FormField.prototype,"cursor",2),G([d({type:Boolean})],a.FormField.prototype,"required",2),G([d({type:Boolean})],a.FormField.prototype,"disabled",2),G([d({type:Boolean})],a.FormField.prototype,"readonly",2),G([d({type:Boolean})],a.FormField.prototype,"multiline",2),G([d({type:Boolean})],a.FormField.prototype,"forceFocused",2),G([m()],a.FormField.prototype,"_focused",2),G([m()],a.FormField.prototype,"_hovered",2),G([m()],a.FormField.prototype,"_hasPrefix",2),G([m()],a.FormField.prototype,"_hasSuffix",2),G([m()],a.FormField.prototype,"_hasClear",2),a.FormField=G([M("logosphere-formfield")],a.FormField);const Br=':host{display:block}.slider{position:relative;width:100%;font-family:var(--font-family-base)}.slider--has-tooltip .slider__track-area{margin-top:var(--spacing-8)}.slider__track-area{position:relative;height:20px;display:flex;align-items:center}.slider__track{position:absolute;left:0;right:0;top:50%;transform:translateY(-50%);height:6px;border-radius:var(--radius-full);background:var(--color-border);pointer-events:none}.slider__fill{position:absolute;top:50%;transform:translateY(-50%);height:6px;border-radius:var(--radius-full);background:var(--color-primary);pointer-events:none}.slider__input{position:absolute;top:50%;transform:translateY(-50%);left:0;width:100%;height:6px;margin:0;padding:0;-webkit-appearance:none;-moz-appearance:none;appearance:none;background:transparent;cursor:pointer;pointer-events:none;outline:none}.slider__input::-webkit-slider-runnable-track{background:transparent;height:6px}.slider__input::-moz-range-track{background:transparent;height:6px}.slider__input::-webkit-slider-thumb{-webkit-appearance:none;-moz-appearance:none;appearance:none;width:16px;height:16px;margin-top:-5px;border-radius:50%;background:var(--color-body-bg);border:2px solid var(--color-border);pointer-events:all;cursor:pointer;box-shadow:var(--shadow-sm)}.slider__input::-moz-range-thumb{width:16px;height:16px;border-radius:50%;background:var(--color-body-bg);border:2px solid var(--color-border);pointer-events:all;cursor:pointer;box-shadow:var(--shadow-sm)}.slider__input:not(:disabled):focus-visible::-webkit-slider-thumb{outline:none;box-shadow:0 0 0 4px var(--color-primary-bg-subtle)}.slider__input:not(:disabled):focus-visible::-moz-range-thumb{box-shadow:0 0 0 4px var(--color-primary-bg-subtle)}.slider--disabled .slider__track{background:var(--color-border)}.slider--disabled .slider__fill{background:var(--color-primary-disabled)}.slider--disabled .slider__input{cursor:not-allowed}.slider--disabled .slider__input::-webkit-slider-thumb{background:var(--color-body-bg);border-color:var(--color-border);pointer-events:all;cursor:not-allowed;box-shadow:none}.slider--disabled .slider__input::-moz-range-thumb{background:var(--color-body-bg);border-color:var(--color-secondary-disabled);cursor:not-allowed;box-shadow:none}.slider--disabled .slider__scale-item{color:var(--color-secondary-disabled)}.slider--disabled .slider__scale-item:before{background:var(--color-secondary-disabled)}.slider--disabled .slider__tooltip{color:var(--color-secondary-disabled);border-color:var(--color-secondary-disabled)}.slider__tooltip{position:absolute;top:-34px;transform:translate(-50%);background:var(--color-body-bg);border:1px solid var(--color-border);color:var(--color-body-color);padding:var(--spacing-1) var(--spacing-2);border-radius:var(--radius-sm);font-size:var(--font-size-xs);font-weight:var(--font-weight-medium);font-family:var(--font-family-base);white-space:nowrap;pointer-events:none;z-index:var(--z-index-tooltip);line-height:var(--line-height-normal)}.slider__scale{position:relative;height:26px;margin-top:var(--spacing-1)}.slider__scale-item{position:absolute;transform:translate(-50%);display:flex;flex-direction:column;align-items:center;gap:var(--spacing-1);font-size:var(--font-size-xs);color:var(--color-tertiary);font-family:var(--font-family-base);font-weight:var(--font-weight-regular);white-space:nowrap;line-height:1;-webkit-user-select:none;user-select:none}.slider__scale-item:before{content:"";display:block;width:1px;height:6px;background:var(--color-border);flex-shrink:0}.slider__input--start,.slider__input--end{position:absolute;pointer-events:none}.slider__input--start::-webkit-slider-thumb,.slider__input--end::-webkit-slider-thumb{pointer-events:all}.slider__input--start::-moz-range-thumb,.slider__input--end::-moz-range-thumb{pointer-events:all}';var Ir=Object.defineProperty,Rr=Object.getOwnPropertyDescriptor,Q=(r,e,t,o)=>{for(var i=o>1?void 0:o?Rr(e,t):e,s=r.length-1,n;s>=0;s--)(n=r[s])&&(i=(o?n(e,t,i):n(i))||i);return o&&i&&Ir(e,t,i),i};a.Slider=class extends E{constructor(){super(...arguments),this.value=50,this.min=0,this.max=100,this.step=1,this.disabled=!1,this.range=!1,this.rangeStart=25,this.rangeEnd=75,this.minDistance=0,this.tooltip="never",this.showScale=!1,this.percentage=!1,this.labels=[],this._hoverStart=!1,this._hoverEnd=!1}get _isLabeled(){return this.labels.length>0}get _effectiveStep(){return this._isLabeled&&this.labels.length>1?(this.max-this.min)/(this.labels.length-1):this.step}get _valuePct(){return(this.value-this.min)/(this.max-this.min)*100}get _startPct(){return(this.rangeStart-this.min)/(this.max-this.min)*100}get _endPct(){return(this.rangeEnd-this.min)/(this.max-this.min)*100}get _displayValue(){var e;if(this._isLabeled){const t=Math.round((this.value-this.min)/this._effectiveStep);return(e=this.labels[Math.min(t,this.labels.length-1)])!=null?e:String(this.value)}return this.percentage?`${Math.round(this.value)}%`:String(this.value)}get _displayStart(){return this.percentage?`${Math.round(this.rangeStart)}%`:String(this.rangeStart)}get _displayEnd(){return this.percentage?`${Math.round(this.rangeEnd)}%`:String(this.rangeEnd)}_thumbLeft(e){return`calc(${e}% + ${(.5-e/100)*16}px)`}_onSingleChange(e){const t=e.target;this.value=Number(t.value),this._emit("change",{value:this.value})}_onStartChange(e){const t=e.target,o=Math.min(Number(t.value),this.rangeEnd-this.minDistance);this.rangeStart=o,this._emit("change",{rangeStart:this.rangeStart,rangeEnd:this.rangeEnd})}_onEndChange(e){const t=e.target,o=Math.max(Number(t.value),this.rangeStart+this.minDistance);this.rangeEnd=o,this._emit("change",{rangeStart:this.rangeStart,rangeEnd:this.rangeEnd})}_emit(e,t){this.dispatchEvent(new CustomEvent(e,{detail:t,bubbles:!0,composed:!0}))}_renderFill(){return this.range?p`
|
|
130
|
+
<div
|
|
131
|
+
class="slider__fill"
|
|
132
|
+
style="left: ${this._startPct}%; width: ${this._endPct-this._startPct}%"
|
|
133
|
+
></div>
|
|
134
|
+
`:p`<div class="slider__fill" style="width: ${this._valuePct}%"></div>`}_renderTooltip(e,t,o){return this.tooltip==="never"||this.tooltip==="hover"&&!o?b:p`
|
|
135
|
+
<div class="slider__tooltip" style="left: ${this._thumbLeft(t)}">${e}</div>
|
|
136
|
+
`}_renderScale(){if(!this.showScale)return b;const e=this.max-this.min,t=Math.min(Math.round(e/this.step)+1,11),o=Array.from({length:t},(i,s)=>{const n=t>1?s/(t-1)*100:0,l=this.min+n/100*e,c=this.percentage?`${Math.round(l)}%`:String(Math.round(l));return{pct:n,display:c}});return p`
|
|
137
|
+
<div class="slider__scale">
|
|
138
|
+
${o.map(({pct:i,display:s})=>p`
|
|
139
|
+
<span class="slider__scale-item" style="left: ${this._thumbLeft(i)}">${s}</span>
|
|
140
|
+
`)}
|
|
141
|
+
</div>
|
|
142
|
+
`}_renderLabels(){if(!this._isLabeled)return b;const e=this.labels.length;return p`
|
|
143
|
+
<div class="slider__scale">
|
|
144
|
+
${this.labels.map((t,o)=>{const i=e>1?o/(e-1)*100:0;return p`
|
|
145
|
+
<span class="slider__scale-item" style="left: ${this._thumbLeft(i)}">${t}</span>
|
|
146
|
+
`})}
|
|
147
|
+
</div>
|
|
148
|
+
`}_renderSingleInput(){const e=this.tooltip==="always"||this.tooltip==="hover"&&this._hoverStart;return p`
|
|
149
|
+
<div class="slider__track-area">
|
|
150
|
+
<div class="slider__track"></div>
|
|
151
|
+
${this._renderFill()}
|
|
152
|
+
${this._renderTooltip(this._displayValue,this._valuePct,e)}
|
|
153
|
+
<input
|
|
154
|
+
type="range"
|
|
155
|
+
class="slider__input"
|
|
156
|
+
.value=${String(this.value)}
|
|
157
|
+
min=${this.min}
|
|
158
|
+
max=${this.max}
|
|
159
|
+
step=${this._effectiveStep}
|
|
160
|
+
?disabled=${this.disabled}
|
|
161
|
+
@input=${this._onSingleChange}
|
|
162
|
+
@mouseenter=${()=>{this._hoverStart=!0}}
|
|
163
|
+
@mouseleave=${()=>{this._hoverStart=!1}}
|
|
164
|
+
@focus=${()=>{this._hoverStart=!0}}
|
|
165
|
+
@blur=${()=>{this._hoverStart=!1}}
|
|
166
|
+
aria-label="Slider"
|
|
167
|
+
aria-valuemin=${this.min}
|
|
168
|
+
aria-valuemax=${this.max}
|
|
169
|
+
aria-valuenow=${this.value}
|
|
170
|
+
aria-valuetext=${this._displayValue}
|
|
171
|
+
aria-disabled=${this.disabled}
|
|
172
|
+
/>
|
|
173
|
+
</div>
|
|
174
|
+
`}_renderRangeInputs(){const e=this.tooltip==="always"||this.tooltip==="hover"&&this._hoverStart,t=this.tooltip==="always"||this.tooltip==="hover"&&this._hoverEnd,o=this._startPct>=100?4:3,i=this._startPct>=100?3:4;return p`
|
|
175
|
+
<div class="slider__track-area">
|
|
176
|
+
<div class="slider__track"></div>
|
|
177
|
+
${this._renderFill()}
|
|
178
|
+
${this._renderTooltip(this._displayStart,this._startPct,e)}
|
|
179
|
+
${this._renderTooltip(this._displayEnd,this._endPct,t)}
|
|
180
|
+
<input
|
|
181
|
+
type="range"
|
|
182
|
+
class="slider__input slider__input--start"
|
|
183
|
+
style="z-index: ${o}"
|
|
184
|
+
.value=${String(this.rangeStart)}
|
|
185
|
+
min=${this.min}
|
|
186
|
+
max=${this.max}
|
|
187
|
+
step=${this._effectiveStep}
|
|
188
|
+
?disabled=${this.disabled}
|
|
189
|
+
@input=${this._onStartChange}
|
|
190
|
+
@mouseenter=${()=>{this._hoverStart=!0}}
|
|
191
|
+
@mouseleave=${()=>{this._hoverStart=!1}}
|
|
192
|
+
@focus=${()=>{this._hoverStart=!0}}
|
|
193
|
+
@blur=${()=>{this._hoverStart=!1}}
|
|
194
|
+
aria-label="Range start"
|
|
195
|
+
aria-valuemin=${this.min}
|
|
196
|
+
aria-valuemax=${this.max}
|
|
197
|
+
aria-valuenow=${this.rangeStart}
|
|
198
|
+
aria-valuetext=${this._displayStart}
|
|
199
|
+
aria-disabled=${this.disabled}
|
|
200
|
+
/>
|
|
201
|
+
<input
|
|
202
|
+
type="range"
|
|
203
|
+
class="slider__input slider__input--end"
|
|
204
|
+
style="z-index: ${i}"
|
|
205
|
+
.value=${String(this.rangeEnd)}
|
|
206
|
+
min=${this.min}
|
|
207
|
+
max=${this.max}
|
|
208
|
+
step=${this._effectiveStep}
|
|
209
|
+
?disabled=${this.disabled}
|
|
210
|
+
@input=${this._onEndChange}
|
|
211
|
+
@mouseenter=${()=>{this._hoverEnd=!0}}
|
|
212
|
+
@mouseleave=${()=>{this._hoverEnd=!1}}
|
|
213
|
+
@focus=${()=>{this._hoverEnd=!0}}
|
|
214
|
+
@blur=${()=>{this._hoverEnd=!1}}
|
|
215
|
+
aria-label="Range end"
|
|
216
|
+
aria-valuemin=${this.min}
|
|
217
|
+
aria-valuemax=${this.max}
|
|
218
|
+
aria-valuenow=${this.rangeEnd}
|
|
219
|
+
aria-valuetext=${this._displayEnd}
|
|
220
|
+
aria-disabled=${this.disabled}
|
|
221
|
+
/>
|
|
222
|
+
</div>
|
|
223
|
+
`}render(){const e=this.tooltip!=="never",t=this.showScale||this._isLabeled;return p`
|
|
224
|
+
<div
|
|
225
|
+
class="slider
|
|
226
|
+
${this.disabled?"slider--disabled":""}
|
|
227
|
+
${e?"slider--has-tooltip":""}
|
|
228
|
+
${t?"slider--has-below":""}
|
|
229
|
+
"
|
|
230
|
+
role="presentation"
|
|
231
|
+
>
|
|
232
|
+
${this.range?this._renderRangeInputs():this._renderSingleInput()}
|
|
233
|
+
${this._renderScale()}
|
|
234
|
+
${this._renderLabels()}
|
|
235
|
+
</div>
|
|
236
|
+
`}},a.Slider.styles=[D`${A(Br)}`],Q([d({type:Number})],a.Slider.prototype,"value",2),Q([d({type:Number})],a.Slider.prototype,"min",2),Q([d({type:Number})],a.Slider.prototype,"max",2),Q([d({type:Number})],a.Slider.prototype,"step",2),Q([d({type:Boolean})],a.Slider.prototype,"disabled",2),Q([d({type:Boolean})],a.Slider.prototype,"range",2),Q([d({type:Number})],a.Slider.prototype,"rangeStart",2),Q([d({type:Number})],a.Slider.prototype,"rangeEnd",2),Q([d({type:Number})],a.Slider.prototype,"minDistance",2),Q([d({type:String})],a.Slider.prototype,"tooltip",2),Q([d({type:Boolean})],a.Slider.prototype,"showScale",2),Q([d({type:Boolean})],a.Slider.prototype,"percentage",2),Q([d({type:Array})],a.Slider.prototype,"labels",2),Q([m()],a.Slider.prototype,"_hoverStart",2),Q([m()],a.Slider.prototype,"_hoverEnd",2),a.Slider=Q([M("logosphere-slider")],a.Slider);const Hr=":host{display:inline-block}.switch{display:inline-flex;align-items:center;position:relative;cursor:pointer}.switch--md{width:36px;height:20px}.switch--sm{width:28px;height:16px}.switch__input{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border-width:0}.switch__track{position:absolute;top:0;left:0;width:100%;height:100%;border-radius:16px;cursor:pointer;transition:background-color var(--transition-speed-base) var(--transition-timing);background-color:var(--color-tertiary)}.switch__track--on{background-color:var(--color-primary)}.switch__track--disabled{cursor:not-allowed}.switch__track--disabled-off{background-color:var(--color-secondary-disabled)}.switch__track--disabled-on{background-color:var(--color-primary-disabled)}.switch__thumb{position:absolute;background-color:#fff;border-radius:50%;top:2px;left:2px;transform:translate(0);transition:transform var(--transition-speed-base) var(--transition-timing)}.switch--md .switch__thumb{width:16px;height:16px}.switch--sm .switch__thumb{width:12px;height:12px}";var jr=Object.defineProperty,Nr=Object.getOwnPropertyDescriptor,kt=(r,e,t,o)=>{for(var i=o>1?void 0:o?Nr(e,t):e,s=r.length-1,n;s>=0;s--)(n=r[s])&&(i=(o?n(e,t,i):n(i))||i);return o&&i&&jr(e,t,i),i};a.Switch=class extends E{constructor(){super(...arguments),this.checked=!1,this.disabled=!1,this.size="md"}onChange(e){const t=e.target;this.checked=t.checked,this.dispatchEvent(new CustomEvent("change",{detail:{checked:this.checked}})),this.dispatchEvent(new CustomEvent("lgsChange",{bubbles:!0,composed:!0,detail:{checked:this.checked}}))}render(){const e=`switch switch--${this.size}`,t=["switch__track",this.checked&&!this.disabled?"switch__track--on":"",this.disabled?"switch__track--disabled":"",this.disabled&&this.checked?"switch__track--disabled-on":"",this.disabled&&!this.checked?"switch__track--disabled-off":""].filter(Boolean).join(" "),o=this.size==="sm"?12:16,i=this.checked?`translateX(${o}px)`:"translateX(0)";return p`
|
|
237
|
+
<label class="${e}">
|
|
91
238
|
<input
|
|
92
239
|
class="switch__input"
|
|
93
240
|
type="checkbox"
|
|
94
|
-
?checked
|
|
95
|
-
?disabled
|
|
96
|
-
@change
|
|
241
|
+
?checked=${this.checked}
|
|
242
|
+
?disabled=${this.disabled}
|
|
243
|
+
@change=${this.onChange}
|
|
97
244
|
/>
|
|
98
|
-
<div class="
|
|
245
|
+
<div class="${t}">
|
|
99
246
|
<span
|
|
100
247
|
class="switch__thumb"
|
|
101
|
-
style="transform:
|
|
248
|
+
style="transform: ${i}"
|
|
102
249
|
></span>
|
|
103
250
|
</div>
|
|
104
251
|
</label>
|
|
105
|
-
`
|
|
252
|
+
`}},a.Switch.styles=[D`${A(Hr)}`],kt([d({type:Boolean})],a.Switch.prototype,"checked",2),kt([d({type:Boolean})],a.Switch.prototype,"disabled",2),kt([d({type:String})],a.Switch.prototype,"size",2),kt([F("input")],a.Switch.prototype,"inputElement",2),a.Switch=kt([M("logosphere-switch")],a.Switch);const Yr=":host{display:block}.breadcrumb{display:flex;align-items:center;flex-wrap:wrap;gap:var(--spacing-2);font-family:var(--font-family-base);font-size:var(--font-size-sm);line-height:var(--line-height-normal);list-style:none;margin:0;padding:0}.breadcrumb__item{display:inline-flex;align-items:center;gap:var(--spacing-2)}.breadcrumb__link{color:var(--color-primary);text-decoration:none;font-weight:var(--font-weight-regular);transition:color var(--transition-speed-fast) var(--transition-timing),text-decoration var(--transition-speed-fast) var(--transition-timing)}.breadcrumb__link:hover{color:var(--color-primary-hover);text-decoration:underline}.breadcrumb__label{color:var(--color-tertiary);font-weight:var(--font-weight-regular)}.breadcrumb__label--active{color:var(--color-emphasis);font-weight:var(--font-weight-medium)}.breadcrumb__separator{color:var(--color-gray-400);-webkit-user-select:none;user-select:none;flex-shrink:0}";var Vr=Object.defineProperty,Fr=Object.getOwnPropertyDescriptor,ti=(r,e,t,o)=>{for(var i=o>1?void 0:o?Fr(e,t):e,s=r.length-1,n;s>=0;s--)(n=r[s])&&(i=(o?n(e,t,i):n(i))||i);return o&&i&&Vr(e,t,i),i};a.Breadcrumb=class extends E{constructor(){super(...arguments),this.items=[]}render(){return p`
|
|
106
253
|
<nav>
|
|
107
254
|
<ol class="breadcrumb">
|
|
108
|
-
|
|
109
|
-
</ol>
|
|
110
|
-
</nav>
|
|
111
|
-
`])),this.items.map(function(r,o){return m(bn||(bn=b([`
|
|
255
|
+
${this.items.map((e,t)=>p`
|
|
112
256
|
<li class="breadcrumb__item">
|
|
113
|
-
|
|
114
|
-
|
|
257
|
+
${e.href&&!e.active?p`<a href="${e.href}" class="breadcrumb__link">${e.label}</a>`:p`<span class="breadcrumb__label ${e.active?"breadcrumb__label--active":""}">${e.label}</span>`}
|
|
258
|
+
${t<this.items.length-1?p`<span class="breadcrumb__separator">/</span>`:""}
|
|
115
259
|
</li>
|
|
116
|
-
`
|
|
260
|
+
`)}
|
|
261
|
+
</ol>
|
|
262
|
+
</nav>
|
|
263
|
+
`}},a.Breadcrumb.styles=[D`${A(Yr)}`],ti([d({type:Array})],a.Breadcrumb.prototype,"items",2),a.Breadcrumb=ti([M("logosphere-breadcrumb")],a.Breadcrumb);const Ur=":host{display:block}.card{width:100%;border-radius:var(--radius-lg);border:1px solid var(--color-border);background-color:var(--color-body-bg);overflow:hidden;box-shadow:0 4px 4px 0 var(--color-light-bg);display:grid;grid-template-rows:auto 1fr auto}.card__header{padding:var(--spacing-4);border-bottom:1px solid var(--color-border);background-color:var(--color-body-bg)}.card__header--hidden{display:none}.card__title{margin:0;font-size:var(--font-size-sm);font-weight:var(--font-weight-semibold);line-height:20px;letter-spacing:-.14px;color:var(--color-body-text);font-family:var(--font-family-base)}.card__description{margin:0;color:var(--color-tertiary);font-size:var(--font-size-xs);font-weight:var(--font-weight-regular);line-height:18px;letter-spacing:-.12px;font-family:var(--font-family-base)}.card__body{padding:var(--spacing-4);font-size:var(--font-size-sm);line-height:var(--line-height-normal);font-family:var(--font-family-base)}.card__footer{padding:var(--spacing-4);display:flex;justify-content:flex-end;align-items:center;flex-wrap:wrap;gap:var(--spacing-2);background-color:var(--color-body-bg);border-top:1px solid var(--color-border)}.card__footer--hidden{display:none}";var qr=Object.defineProperty,Zr=Object.getOwnPropertyDescriptor,Ce=(r,e,t,o)=>{for(var i=o>1?void 0:o?Zr(e,t):e,s=r.length-1,n;s>=0;s--)(n=r[s])&&(i=(o?n(e,t,i):n(i))||i);return o&&i&&qr(e,t,i),i};a.Card=class extends E{constructor(){super(...arguments),this.title="",this.description="",this.header=!0,this.footer=!0,this.okLabel="Tamam",this.cancelLabel="İptal"}handleOk(){var e;(e=this.onOk)==null||e.call(this),this.dispatchEvent(new CustomEvent("ok",{bubbles:!0,composed:!0}))}handleCancel(){var e;(e=this.onCancel)==null||e.call(this),this.dispatchEvent(new CustomEvent("cancel",{bubbles:!0,composed:!0}))}render(){return p`
|
|
117
264
|
<div class="card">
|
|
118
|
-
|
|
265
|
+
${this.header?p`
|
|
266
|
+
<div class="card__header">
|
|
267
|
+
${this.title?p`<h3 class="card__title">${this.title}</h3>`:b}
|
|
268
|
+
${this.description?p`<p class="card__description">${this.description}</p>`:b}
|
|
269
|
+
<slot name="header"></slot>
|
|
270
|
+
</div>
|
|
271
|
+
`:b}
|
|
119
272
|
|
|
120
273
|
<div class="card__body">
|
|
121
274
|
<slot></slot>
|
|
122
275
|
</div>
|
|
123
276
|
|
|
124
|
-
|
|
125
|
-
</div>
|
|
126
|
-
`])),this.header?m(xn||(xn=b([`
|
|
127
|
-
<div class="card__header">
|
|
128
|
-
`,`
|
|
129
|
-
`,`
|
|
130
|
-
<slot name="header"></slot>
|
|
131
|
-
</div>
|
|
132
|
-
`])),this.title?m(Cn||(Cn=b(['<h3 class="card__title">',"</h3>"])),this.title):O,this.description?m($n||($n=b(['<p class="card__description">',"</p>"])),this.description):O):O,this.footer?m(On||(On=b([`
|
|
277
|
+
${this.footer?p`
|
|
133
278
|
<div class="card__footer">
|
|
134
279
|
<slot name="footer"></slot>
|
|
135
|
-
|
|
136
|
-
`,`
|
|
137
|
-
</div>
|
|
138
|
-
`])),this.onOk?m(En||(En=b([`
|
|
280
|
+
${this.onCancel?p`
|
|
139
281
|
<logosphere-button
|
|
140
|
-
variant="
|
|
141
|
-
theme="
|
|
282
|
+
variant="outline"
|
|
283
|
+
theme="secondary"
|
|
142
284
|
size="md"
|
|
143
|
-
@click
|
|
285
|
+
@click=${this.handleCancel}
|
|
144
286
|
>
|
|
145
|
-
|
|
287
|
+
${this.cancelLabel}
|
|
146
288
|
</logosphere-button>
|
|
147
|
-
|
|
289
|
+
`:b}
|
|
290
|
+
${this.onOk?p`
|
|
148
291
|
<logosphere-button
|
|
149
292
|
variant="solid"
|
|
150
|
-
theme="
|
|
293
|
+
theme="primary"
|
|
151
294
|
size="md"
|
|
152
|
-
@click
|
|
295
|
+
@click=${this.handleOk}
|
|
153
296
|
>
|
|
154
|
-
|
|
297
|
+
${this.okLabel}
|
|
155
298
|
</logosphere-button>
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
299
|
+
`:b}
|
|
300
|
+
</div>
|
|
301
|
+
`:b}
|
|
302
|
+
</div>
|
|
303
|
+
`}},a.Card.styles=[D`
|
|
304
|
+
${A(Ur)}
|
|
305
|
+
`],Ce([d({type:String})],a.Card.prototype,"title",2),Ce([d({type:String})],a.Card.prototype,"description",2),Ce([d({type:Boolean})],a.Card.prototype,"header",2),Ce([d({type:Boolean})],a.Card.prototype,"footer",2),Ce([d({attribute:!1})],a.Card.prototype,"onOk",2),Ce([d({attribute:!1})],a.Card.prototype,"onCancel",2),Ce([d({type:String})],a.Card.prototype,"okLabel",2),Ce([d({type:String})],a.Card.prototype,"cancelLabel",2),a.Card=Ce([M("logosphere-card")],a.Card);const qt=Yt(class extends Vt{constructor(r){if(super(r),r.type!==ke.PROPERTY&&r.type!==ke.ATTRIBUTE&&r.type!==ke.BOOLEAN_ATTRIBUTE)throw Error("The `live` directive is not allowed on child or event bindings");if(!Xo(r))throw Error("`live` bindings can only contain a single expression")}render(r){return r}update(r,[e]){if(e===pe||e===b)return e;const t=r.element,o=r.name;if(r.type===ke.PROPERTY){if(e===t[o])return pe}else if(r.type===ke.BOOLEAN_ATTRIBUTE){if(!!e===t.hasAttribute(o))return pe}else if(r.type===ke.ATTRIBUTE&&t.getAttribute(o)===e+"")return pe;return Qo(r),e}}),Wr=":host{display:block}.input__field{width:100%;background:transparent;border:none;outline:none;font-size:var(--font-size-sm);font-family:var(--font-family-base);color:var(--color-body-text);box-sizing:border-box;line-height:1.5}.input__field::placeholder{color:var(--color-tertiary)}.input__field:disabled{cursor:not-allowed}.input__field--default{height:var(--input-field-height, 16px)}.input__field--large{height:var(--input-field-height-large, 24px)}.input__clear-btn,.input__password-toggle{border:none;background:transparent;color:var(--color-gray-400);cursor:pointer;padding:0;display:inline-flex;align-items:center;outline:none;flex-shrink:0;transition:color var(--transition-speed-fast) var(--transition-timing)}.input__clear-btn:hover,.input__password-toggle:hover{color:var(--color-gray-600)}";var Gr=Object.defineProperty,Kr=Object.getOwnPropertyDescriptor,T=(r,e,t,o)=>{for(var i=o>1?void 0:o?Kr(e,t):e,s=r.length-1,n;s>=0;s--)(n=r[s])&&(i=(o?n(e,t,i):n(i))||i);return o&&i&&Gr(e,t,i),i};const oi={0:/\d/,a:/[a-zA-Z]/,"*":/[a-zA-Z0-9]/};function wo(r){return r.split("").filter(e=>/[a-zA-Z0-9]/.test(e)).join("")}function Xr(r,e){let t=0,o="";for(let i=0;i<e.length&&!(t>=r.length);i++){const s=e[i],n=oi[s];if(n){for(;t<r.length&&!n.test(r[t]);)t++;t<r.length&&(o+=r[t++])}else o+=s}return o}function Jr(r,e,t){let o=0;for(let i=0;i<r.length;i++)if(oi[e[i]]&&(o++,o===t))return i+1;return r.length}a.LogosphereInput=class extends E{constructor(){super(...arguments),this.value="",this.type="text",this.placeholder="",this.name="",this.autocomplete="",this.pattern="",this.size="default",this.variant="default",this.label="",this.helper="",this.error="",this.required=!1,this.disabled=!1,this.readonly=!1,this.mask="",this.showPasswordToggle=!0,this.suppressNativeValidation=!1,this.errorDisplay="always",this._internalError="",this._showPassword=!1,this._invalid=!1,this.handleInput=e=>{var o;const t=e.target;if(this.mask){const i=(o=t.selectionStart)!=null?o:t.value.length,s=wo(t.value.slice(0,i)).length,n=wo(t.value),l=Xr(n,this.mask);t.value=l,this.value=l;const c=Jr(l,this.mask,s);requestAnimationFrame(()=>t.setSelectionRange(c,c))}else this.value=t.value;this._internalError&&(this._internalError="",this._inputElement.setCustomValidity("")),this._invalid=!1,this.dispatchEvent(new CustomEvent("input",{bubbles:!0,composed:!0,detail:{value:this.value,rawValue:this.mask?wo(this.value):this.value,originalEvent:e}}))},this.handleChange=e=>{const t=e.target;this.value=t.value;const o=t.checkValidity();this._invalid=!o,!o&&!this.suppressNativeValidation&&(this._internalError=t.validationMessage),this.dispatchEvent(new CustomEvent("change",{bubbles:!0,composed:!0,detail:{value:this.value,originalEvent:e}})),this.dispatchEvent(new CustomEvent("lgsChange",{bubbles:!0,composed:!0,detail:{value:this.value}}))},this.handleBlur=()=>{this._inputElement&&(this._invalid=!this._inputElement.checkValidity())},this.handleKeyDown=e=>{this.dispatchEvent(new CustomEvent("keydown",{bubbles:!0,composed:!0,detail:{key:e.key,originalEvent:e}}))},this.handleKeyUp=e=>{this.dispatchEvent(new CustomEvent("keyup",{bubbles:!0,composed:!0,detail:{key:e.key,originalEvent:e}}))},this.handleClear=()=>{this.value="",this._invalid=!1,this._inputElement&&(this._inputElement.value=""),this.dispatchEvent(new CustomEvent("clear",{bubbles:!0,composed:!0})),this.dispatchEvent(new CustomEvent("input",{bubbles:!0,composed:!0,detail:{value:"",originalEvent:null}}))},this.handlePasswordToggle=()=>{var e;this.disabled||(this._showPassword=!this._showPassword,(e=this._inputElement)==null||e.focus())}}get inputElement(){return this._inputElement}focus(){var e;(e=this._inputElement)==null||e.focus()}blur(){var e;(e=this._inputElement)==null||e.blur()}select(){var e;(e=this._inputElement)==null||e.select()}setSelectionRange(e,t,o){var i;(i=this._inputElement)==null||i.setSelectionRange(e,t,o)}checkValidity(){var e,t;return(t=(e=this._inputElement)==null?void 0:e.checkValidity())!=null?t:!0}reportValidity(){var e,t;return(t=(e=this._inputElement)==null?void 0:e.reportValidity())!=null?t:!0}setCustomValidity(e){var t;(t=this._inputElement)==null||t.setCustomValidity(e),this._internalError=e,this.requestUpdate()}willUpdate(e){e.has("type")&&this.type!=="password"&&this._showPassword&&(this._showPassword=!1),e.has("showPasswordToggle")&&!this.showPasswordToggle&&this._showPassword&&(this._showPassword=!1)}get _effectivePlaceholder(){return this.placeholder?this.placeholder:this.mask?this.mask.replace(/[0a*]/g,"_"):""}render(){var l,c,u,h,g;const e=this.error||this._internalError,t=this.errorDisplay==="on-invalid"?this._invalid?e:"":e,o=!!this.value&&!this.disabled&&!this.readonly,i=this.type==="password",s=i&&this._showPassword?"text":this.type,n=`input__field input__field--${this.size}`;return p`
|
|
159
306
|
<logosphere-formfield
|
|
160
|
-
.label
|
|
161
|
-
.helper
|
|
162
|
-
.error
|
|
163
|
-
.required
|
|
164
|
-
.disabled
|
|
165
|
-
.readonly
|
|
166
|
-
.placeholder
|
|
167
|
-
.size
|
|
168
|
-
.variant
|
|
307
|
+
.label=${this.label}
|
|
308
|
+
.helper=${this.helper}
|
|
309
|
+
.error=${t}
|
|
310
|
+
.required=${this.required}
|
|
311
|
+
.disabled=${this.disabled}
|
|
312
|
+
.readonly=${this.readonly}
|
|
313
|
+
.placeholder=${this._effectivePlaceholder}
|
|
314
|
+
.size=${this.size}
|
|
315
|
+
.variant=${this.variant}
|
|
169
316
|
>
|
|
317
|
+
<slot name="prefix" slot="prefix"></slot>
|
|
170
318
|
<input
|
|
171
|
-
class="
|
|
172
|
-
type
|
|
173
|
-
.value
|
|
174
|
-
placeholder
|
|
175
|
-
name
|
|
176
|
-
autocomplete
|
|
177
|
-
?required
|
|
178
|
-
?disabled
|
|
179
|
-
?readonly
|
|
180
|
-
minlength
|
|
181
|
-
maxlength
|
|
182
|
-
pattern
|
|
183
|
-
min
|
|
184
|
-
max
|
|
185
|
-
step
|
|
186
|
-
@input
|
|
187
|
-
@change
|
|
188
|
-
@
|
|
189
|
-
@
|
|
319
|
+
class="${n}"
|
|
320
|
+
type=${s}
|
|
321
|
+
.value=${qt(this.value)}
|
|
322
|
+
placeholder=${this._effectivePlaceholder||b}
|
|
323
|
+
name=${this.name||b}
|
|
324
|
+
autocomplete=${this.autocomplete||b}
|
|
325
|
+
?required=${this.required}
|
|
326
|
+
?disabled=${this.disabled}
|
|
327
|
+
?readonly=${this.readonly}
|
|
328
|
+
minlength=${(l=this.minlength)!=null?l:b}
|
|
329
|
+
maxlength=${(c=this.maxlength)!=null?c:b}
|
|
330
|
+
pattern=${this.pattern||b}
|
|
331
|
+
min=${(u=this.min)!=null?u:b}
|
|
332
|
+
max=${(h=this.max)!=null?h:b}
|
|
333
|
+
step=${(g=this.step)!=null?g:b}
|
|
334
|
+
@input=${this.handleInput}
|
|
335
|
+
@change=${this.handleChange}
|
|
336
|
+
@blur=${this.handleBlur}
|
|
337
|
+
@keydown=${this.handleKeyDown}
|
|
338
|
+
@keyup=${this.handleKeyUp}
|
|
190
339
|
/>
|
|
191
|
-
|
|
192
|
-
</logosphere-formfield>
|
|
193
|
-
`])),this.label,this.helper,l,this.required,this.disabled,this.readonly,this.placeholder,this.size,this.variant,u,this.type,zn(this.value),this.placeholder||O,this.name||O,this.autocomplete||O,this.required,this.disabled,this.readonly,(t=this.minlength)!==null&&t!==void 0?t:O,(r=this.maxlength)!==null&&r!==void 0?r:O,this.pattern||O,(o=this.min)!==null&&o!==void 0?o:O,(i=this.max)!==null&&i!==void 0?i:O,(s=this.step)!==null&&s!==void 0?s:O,this.handleInput,this.handleChange,this.handleKeyDown,this.handleKeyUp,d?m(Mn||(Mn=b([`
|
|
340
|
+
${o?p`
|
|
194
341
|
<button
|
|
195
342
|
type="button"
|
|
196
|
-
slot="
|
|
343
|
+
slot="clear"
|
|
197
344
|
class="input__clear-btn"
|
|
198
|
-
@click
|
|
345
|
+
@click=${this.handleClear}
|
|
199
346
|
tabindex="-1"
|
|
200
347
|
>
|
|
201
348
|
<ui-icon name="uil-times" size="14"></ui-icon>
|
|
202
349
|
</button>
|
|
203
|
-
`])),this.handleClear):O)}}])})(Z),c.LogosphereInput.styles=[ee(Pn||(Pn=b(["",""])),Q(Vi))],W([we("input")],c.LogosphereInput.prototype,"_inputElement",2),W([f({type:String})],c.LogosphereInput.prototype,"value",2),W([f({type:String})],c.LogosphereInput.prototype,"type",2),W([f({type:String})],c.LogosphereInput.prototype,"placeholder",2),W([f({type:String})],c.LogosphereInput.prototype,"name",2),W([f({type:String})],c.LogosphereInput.prototype,"autocomplete",2),W([f({type:Number})],c.LogosphereInput.prototype,"minlength",2),W([f({type:Number})],c.LogosphereInput.prototype,"maxlength",2),W([f({type:String})],c.LogosphereInput.prototype,"pattern",2),W([f({type:Number})],c.LogosphereInput.prototype,"min",2),W([f({type:Number})],c.LogosphereInput.prototype,"max",2),W([f({type:Number})],c.LogosphereInput.prototype,"step",2),W([f({type:String})],c.LogosphereInput.prototype,"size",2),W([f({type:String})],c.LogosphereInput.prototype,"variant",2),W([f({type:Boolean})],c.LogosphereInput.prototype,"showClear",2),W([f({type:String})],c.LogosphereInput.prototype,"label",2),W([f({type:String})],c.LogosphereInput.prototype,"helper",2),W([f({type:String})],c.LogosphereInput.prototype,"error",2),W([f({type:Boolean})],c.LogosphereInput.prototype,"required",2),W([f({type:Boolean})],c.LogosphereInput.prototype,"disabled",2),W([f({type:Boolean})],c.LogosphereInput.prototype,"readonly",2),W([z()],c.LogosphereInput.prototype,"_internalError",2),c.LogosphereInput=W([te("logosphere-input")],c.LogosphereInput);var ie="top",pe="bottom",he="right",se="left",br="auto",mt=[ie,pe,he,se],Ze="start",_t="end",Ki="clippingParents",Tn="viewport",yt="popper",Xi="reference",jn=mt.reduce(function(a,n){return a.concat([n+"-"+Ze,n+"-"+_t])},[]),Ln=[].concat(mt,[br]).reduce(function(a,n){return a.concat([n,n+"-"+Ze,n+"-"+_t])},[]),Zi="beforeRead",Ji="read",Qi="afterRead",es="beforeMain",ts="main",rs="afterMain",ns="beforeWrite",os="write",as="afterWrite",is=[Zi,Ji,Qi,es,ts,rs,ns,os,as];function ge(a){return a?(a.nodeName||"").toLowerCase():null}function ce(a){if(a==null)return window;if(a.toString()!=="[object Window]"){var n=a.ownerDocument;return n&&n.defaultView||window}return a}function He(a){var n=ce(a).Element;return a instanceof n||a instanceof Element}function fe(a){var n=ce(a).HTMLElement;return a instanceof n||a instanceof HTMLElement}function gr(a){if(typeof ShadowRoot=="undefined")return!1;var n=ce(a).ShadowRoot;return a instanceof n||a instanceof ShadowRoot}function ss(a){var n=a.state;Object.keys(n.elements).forEach(function(e){var t=n.styles[e]||{},r=n.attributes[e]||{},o=n.elements[e];!fe(o)||!ge(o)||(Object.assign(o.style,t),Object.keys(r).forEach(function(i){var s=r[i];s===!1?o.removeAttribute(i):o.setAttribute(i,s===!0?"":s)}))})}function ls(a){var n=a.state,e={popper:{position:n.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(n.elements.popper.style,e.popper),n.styles=e,n.elements.arrow&&Object.assign(n.elements.arrow.style,e.arrow),function(){Object.keys(n.elements).forEach(function(t){var r=n.elements[t],o=n.attributes[t]||{},i=Object.keys(n.styles.hasOwnProperty(t)?n.styles[t]:e[t]),s=i.reduce(function(l,d){return l[d]="",l},{});!fe(r)||!ge(r)||(Object.assign(r.style,s),Object.keys(o).forEach(function(l){r.removeAttribute(l)}))})}}const cs={name:"applyStyles",enabled:!0,phase:"write",fn:ss,effect:ls,requires:["computeStyles"]};function me(a){return a.split("-")[0]}var Ne=Math.max,jt=Math.min,Je=Math.round;function mr(){var a=navigator.userAgentData;return a!=null&&a.brands&&Array.isArray(a.brands)?a.brands.map(function(n){return n.brand+"/"+n.version}).join(" "):navigator.userAgent}function Bn(){return!/^((?!chrome|android).)*safari/i.test(mr())}function Qe(a,n,e){n===void 0&&(n=!1),e===void 0&&(e=!1);var t=a.getBoundingClientRect(),r=1,o=1;n&&fe(a)&&(r=a.offsetWidth>0&&Je(t.width)/a.offsetWidth||1,o=a.offsetHeight>0&&Je(t.height)/a.offsetHeight||1);var i=He(a)?ce(a):window,s=i.visualViewport,l=!Bn()&&e,d=(t.left+(l&&s?s.offsetLeft:0))/r,u=(t.top+(l&&s?s.offsetTop:0))/o,p=t.width/r,h=t.height/o;return{width:p,height:h,top:u,right:d+p,bottom:u+h,left:d,x:d,y:u}}function _r(a){var n=Qe(a),e=a.offsetWidth,t=a.offsetHeight;return Math.abs(n.width-e)<=1&&(e=n.width),Math.abs(n.height-t)<=1&&(t=n.height),{x:a.offsetLeft,y:a.offsetTop,width:e,height:t}}function In(a,n){var e=n.getRootNode&&n.getRootNode();if(a.contains(n))return!0;if(e&&gr(e)){var t=n;do{if(t&&a.isSameNode(t))return!0;t=t.parentNode||t.host}while(t)}return!1}function xe(a){return ce(a).getComputedStyle(a)}function ds(a){return["table","td","th"].indexOf(ge(a))>=0}function Ae(a){return((He(a)?a.ownerDocument:a.document)||window.document).documentElement}function Lt(a){return ge(a)==="html"?a:a.assignedSlot||a.parentNode||(gr(a)?a.host:null)||Ae(a)}function Yn(a){return!fe(a)||xe(a).position==="fixed"?null:a.offsetParent}function us(a){var n=/firefox/i.test(mr()),e=/Trident/i.test(mr());if(e&&fe(a)){var t=xe(a);if(t.position==="fixed")return null}var r=Lt(a);for(gr(r)&&(r=r.host);fe(r)&&["html","body"].indexOf(ge(r))<0;){var o=xe(r);if(o.transform!=="none"||o.perspective!=="none"||o.contain==="paint"||["transform","perspective"].indexOf(o.willChange)!==-1||n&&o.willChange==="filter"||n&&o.filter&&o.filter!=="none")return r;r=r.parentNode}return null}function wt(a){for(var n=ce(a),e=Yn(a);e&&ds(e)&&xe(e).position==="static";)e=Yn(e);return e&&(ge(e)==="html"||ge(e)==="body"&&xe(e).position==="static")?n:e||us(a)||n}function yr(a){return["top","bottom"].indexOf(a)>=0?"x":"y"}function kt(a,n,e){return Ne(a,jt(n,e))}function ps(a,n,e){var t=kt(a,n,e);return t>e?e:t}function Rn(){return{top:0,right:0,bottom:0,left:0}}function Un(a){return Object.assign({},Rn(),a)}function Fn(a,n){return n.reduce(function(e,t){return e[t]=a,e},{})}var hs=function(n,e){return n=typeof n=="function"?n(Object.assign({},e.rects,{placement:e.placement})):n,Un(typeof n!="number"?n:Fn(n,mt))};function fs(a){var n,e=a.state,t=a.name,r=a.options,o=e.elements.arrow,i=e.modifiersData.popperOffsets,s=me(e.placement),l=yr(s),d=[se,he].indexOf(s)>=0,u=d?"height":"width";if(!(!o||!i)){var p=hs(r.padding,e),h=_r(o),g=l==="y"?ie:se,y=l==="y"?pe:he,w=e.rects.reference[u]+e.rects.reference[l]-i[l]-e.rects.popper[u],v=i[l]-e.rects.reference[l],_=wt(o),k=_?l==="y"?_.clientHeight||0:_.clientWidth||0:0,$=w/2-v/2,x=p[g],E=k-h[u]-p[y],C=k/2-h[u]/2+$,S=kt(x,C,E),D=l;e.modifiersData[t]=(n={},n[D]=S,n.centerOffset=S-C,n)}}function vs(a){var n=a.state,e=a.options,t=e.element,r=t===void 0?"[data-popper-arrow]":t;r!=null&&(typeof r=="string"&&(r=n.elements.popper.querySelector(r),!r)||In(n.elements.popper,r)&&(n.elements.arrow=r))}const bs={name:"arrow",enabled:!0,phase:"main",fn:fs,effect:vs,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function et(a){return a.split("-")[1]}var gs={top:"auto",right:"auto",bottom:"auto",left:"auto"};function ms(a,n){var e=a.x,t=a.y,r=n.devicePixelRatio||1;return{x:Je(e*r)/r||0,y:Je(t*r)/r||0}}function Hn(a){var n,e=a.popper,t=a.popperRect,r=a.placement,o=a.variation,i=a.offsets,s=a.position,l=a.gpuAcceleration,d=a.adaptive,u=a.roundOffsets,p=a.isFixed,h=i.x,g=h===void 0?0:h,y=i.y,w=y===void 0?0:y,v=typeof u=="function"?u({x:g,y:w}):{x:g,y:w};g=v.x,w=v.y;var _=i.hasOwnProperty("x"),k=i.hasOwnProperty("y"),$=se,x=ie,E=window;if(d){var C=wt(e),S="clientHeight",D="clientWidth";if(C===ce(e)&&(C=Ae(e),xe(C).position!=="static"&&s==="absolute"&&(S="scrollHeight",D="scrollWidth")),C=C,r===ie||(r===se||r===he)&&o===_t){x=pe;var A=p&&C===E&&E.visualViewport?E.visualViewport.height:C[S];w-=A-t.height,w*=l?1:-1}if(r===se||(r===ie||r===pe)&&o===_t){$=he;var B=p&&C===E&&E.visualViewport?E.visualViewport.width:C[D];g-=B-t.width,g*=l?1:-1}}var P=Object.assign({position:s},d&&gs),M=u===!0?ms({x:g,y:w},ce(e)):{x:g,y:w};if(g=M.x,w=M.y,l){var T;return Object.assign({},P,(T={},T[x]=k?"0":"",T[$]=_?"0":"",T.transform=(E.devicePixelRatio||1)<=1?"translate("+g+"px, "+w+"px)":"translate3d("+g+"px, "+w+"px, 0)",T))}return Object.assign({},P,(n={},n[x]=k?w+"px":"",n[$]=_?g+"px":"",n.transform="",n))}function _s(a){var n=a.state,e=a.options,t=e.gpuAcceleration,r=t===void 0?!0:t,o=e.adaptive,i=o===void 0?!0:o,s=e.roundOffsets,l=s===void 0?!0:s,d={placement:me(n.placement),variation:et(n.placement),popper:n.elements.popper,popperRect:n.rects.popper,gpuAcceleration:r,isFixed:n.options.strategy==="fixed"};n.modifiersData.popperOffsets!=null&&(n.styles.popper=Object.assign({},n.styles.popper,Hn(Object.assign({},d,{offsets:n.modifiersData.popperOffsets,position:n.options.strategy,adaptive:i,roundOffsets:l})))),n.modifiersData.arrow!=null&&(n.styles.arrow=Object.assign({},n.styles.arrow,Hn(Object.assign({},d,{offsets:n.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:l})))),n.attributes.popper=Object.assign({},n.attributes.popper,{"data-popper-placement":n.placement})}const ys={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:_s,data:{}};var Bt={passive:!0};function ws(a){var n=a.state,e=a.instance,t=a.options,r=t.scroll,o=r===void 0?!0:r,i=t.resize,s=i===void 0?!0:i,l=ce(n.elements.popper),d=[].concat(n.scrollParents.reference,n.scrollParents.popper);return o&&d.forEach(function(u){u.addEventListener("scroll",e.update,Bt)}),s&&l.addEventListener("resize",e.update,Bt),function(){o&&d.forEach(function(u){u.removeEventListener("scroll",e.update,Bt)}),s&&l.removeEventListener("resize",e.update,Bt)}}const ks={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:ws,data:{}};var xs={left:"right",right:"left",bottom:"top",top:"bottom"};function It(a){return a.replace(/left|right|bottom|top/g,function(n){return xs[n]})}var Cs={start:"end",end:"start"};function Nn(a){return a.replace(/start|end/g,function(n){return Cs[n]})}function wr(a){var n=ce(a),e=n.pageXOffset,t=n.pageYOffset;return{scrollLeft:e,scrollTop:t}}function kr(a){return Qe(Ae(a)).left+wr(a).scrollLeft}function $s(a,n){var e=ce(a),t=Ae(a),r=e.visualViewport,o=t.clientWidth,i=t.clientHeight,s=0,l=0;if(r){o=r.width,i=r.height;var d=Bn();(d||!d&&n==="fixed")&&(s=r.offsetLeft,l=r.offsetTop)}return{width:o,height:i,x:s+kr(a),y:l}}function Os(a){var n,e=Ae(a),t=wr(a),r=(n=a.ownerDocument)==null?void 0:n.body,o=Ne(e.scrollWidth,e.clientWidth,r?r.scrollWidth:0,r?r.clientWidth:0),i=Ne(e.scrollHeight,e.clientHeight,r?r.scrollHeight:0,r?r.clientHeight:0),s=-t.scrollLeft+kr(a),l=-t.scrollTop;return xe(r||e).direction==="rtl"&&(s+=Ne(e.clientWidth,r?r.clientWidth:0)-o),{width:o,height:i,x:s,y:l}}function xr(a){var n=xe(a),e=n.overflow,t=n.overflowX,r=n.overflowY;return/auto|scroll|overlay|hidden/.test(e+r+t)}function qn(a){return["html","body","#document"].indexOf(ge(a))>=0?a.ownerDocument.body:fe(a)&&xr(a)?a:qn(Lt(a))}function xt(a,n){var e;n===void 0&&(n=[]);var t=qn(a),r=t===((e=a.ownerDocument)==null?void 0:e.body),o=ce(t),i=r?[o].concat(o.visualViewport||[],xr(t)?t:[]):t,s=n.concat(i);return r?s:s.concat(xt(Lt(i)))}function Cr(a){return Object.assign({},a,{left:a.x,top:a.y,right:a.x+a.width,bottom:a.y+a.height})}function Es(a,n){var e=Qe(a,!1,n==="fixed");return e.top=e.top+a.clientTop,e.left=e.left+a.clientLeft,e.bottom=e.top+a.clientHeight,e.right=e.left+a.clientWidth,e.width=a.clientWidth,e.height=a.clientHeight,e.x=e.left,e.y=e.top,e}function Vn(a,n,e){return n===Tn?Cr($s(a,e)):He(n)?Es(n,e):Cr(Os(Ae(a)))}function Ss(a){var n=xt(Lt(a)),e=["absolute","fixed"].indexOf(xe(a).position)>=0,t=e&&fe(a)?wt(a):a;return He(t)?n.filter(function(r){return He(r)&&In(r,t)&&ge(r)!=="body"}):[]}function Ds(a,n,e,t){var r=n==="clippingParents"?Ss(a):[].concat(n),o=[].concat(r,[e]),i=o[0],s=o.reduce(function(l,d){var u=Vn(a,d,t);return l.top=Ne(u.top,l.top),l.right=jt(u.right,l.right),l.bottom=jt(u.bottom,l.bottom),l.left=Ne(u.left,l.left),l},Vn(a,i,t));return s.width=s.right-s.left,s.height=s.bottom-s.top,s.x=s.left,s.y=s.top,s}function Wn(a){var n=a.reference,e=a.element,t=a.placement,r=t?me(t):null,o=t?et(t):null,i=n.x+n.width/2-e.width/2,s=n.y+n.height/2-e.height/2,l;switch(r){case ie:l={x:i,y:n.y-e.height};break;case pe:l={x:i,y:n.y+n.height};break;case he:l={x:n.x+n.width,y:s};break;case se:l={x:n.x-e.width,y:s};break;default:l={x:n.x,y:n.y}}var d=r?yr(r):null;if(d!=null){var u=d==="y"?"height":"width";switch(o){case Ze:l[d]=l[d]-(n[u]/2-e[u]/2);break;case _t:l[d]=l[d]+(n[u]/2-e[u]/2);break}}return l}function Ct(a,n){n===void 0&&(n={});var e=n,t=e.placement,r=t===void 0?a.placement:t,o=e.strategy,i=o===void 0?a.strategy:o,s=e.boundary,l=s===void 0?Ki:s,d=e.rootBoundary,u=d===void 0?Tn:d,p=e.elementContext,h=p===void 0?yt:p,g=e.altBoundary,y=g===void 0?!1:g,w=e.padding,v=w===void 0?0:w,_=Un(typeof v!="number"?v:Fn(v,mt)),k=h===yt?Xi:yt,$=a.rects.popper,x=a.elements[y?k:h],E=Ds(He(x)?x:x.contextElement||Ae(a.elements.popper),l,u,i),C=Qe(a.elements.reference),S=Wn({reference:C,element:$,placement:r}),D=Cr(Object.assign({},$,S)),A=h===yt?D:C,B={top:E.top-A.top+_.top,bottom:A.bottom-E.bottom+_.bottom,left:E.left-A.left+_.left,right:A.right-E.right+_.right},P=a.modifiersData.offset;if(h===yt&&P){var M=P[r];Object.keys(B).forEach(function(T){var U=[he,pe].indexOf(T)>=0?1:-1,I=[ie,pe].indexOf(T)>=0?"y":"x";B[T]+=M[I]*U})}return B}function zs(a,n){n===void 0&&(n={});var e=n,t=e.placement,r=e.boundary,o=e.rootBoundary,i=e.padding,s=e.flipVariations,l=e.allowedAutoPlacements,d=l===void 0?Ln:l,u=et(t),p=u?s?jn:jn.filter(function(y){return et(y)===u}):mt,h=p.filter(function(y){return d.indexOf(y)>=0});h.length===0&&(h=p);var g=h.reduce(function(y,w){return y[w]=Ct(a,{placement:w,boundary:r,rootBoundary:o,padding:i})[me(w)],y},{});return Object.keys(g).sort(function(y,w){return g[y]-g[w]})}function As(a){if(me(a)===br)return[];var n=It(a);return[Nn(a),n,Nn(n)]}function Ms(a){var n=a.state,e=a.options,t=a.name;if(!n.modifiersData[t]._skip){for(var r=e.mainAxis,o=r===void 0?!0:r,i=e.altAxis,s=i===void 0?!0:i,l=e.fallbackPlacements,d=e.padding,u=e.boundary,p=e.rootBoundary,h=e.altBoundary,g=e.flipVariations,y=g===void 0?!0:g,w=e.allowedAutoPlacements,v=n.options.placement,_=me(v),k=_===v,$=l||(k||!y?[It(v)]:As(v)),x=[v].concat($).reduce(function(Te,ye){return Te.concat(me(ye)===br?zs(n,{placement:ye,boundary:u,rootBoundary:p,padding:d,flipVariations:y,allowedAutoPlacements:w}):ye)},[]),E=n.rects.reference,C=n.rects.popper,S=new Map,D=!0,A=x[0],B=0;B<x.length;B++){var P=x[B],M=me(P),T=et(P)===Ze,U=[ie,pe].indexOf(M)>=0,I=U?"width":"height",Y=Ct(n,{placement:P,boundary:u,rootBoundary:p,altBoundary:h,padding:d}),R=U?T?he:se:T?pe:ie;E[I]>C[I]&&(R=It(R));var oe=It(R),J=[];if(o&&J.push(Y[M]<=0),s&&J.push(Y[R]<=0,Y[oe]<=0),J.every(function(Te){return Te})){A=P,D=!1;break}S.set(P,J)}if(D)for(var Ce=y?3:1,ne=function(ye){var qe=x.find(function(rt){var Ee=S.get(rt);if(Ee)return Ee.slice(0,ye).every(function(nt){return nt})});if(qe)return A=qe,"break"},$e=Ce;$e>0;$e--){var Oe=ne($e);if(Oe==="break")break}n.placement!==A&&(n.modifiersData[t]._skip=!0,n.placement=A,n.reset=!0)}}const Ps={name:"flip",enabled:!0,phase:"main",fn:Ms,requiresIfExists:["offset"],data:{_skip:!1}};function Gn(a,n,e){return e===void 0&&(e={x:0,y:0}),{top:a.top-n.height-e.y,right:a.right-n.width+e.x,bottom:a.bottom-n.height+e.y,left:a.left-n.width-e.x}}function Kn(a){return[ie,he,pe,se].some(function(n){return a[n]>=0})}function Ts(a){var n=a.state,e=a.name,t=n.rects.reference,r=n.rects.popper,o=n.modifiersData.preventOverflow,i=Ct(n,{elementContext:"reference"}),s=Ct(n,{altBoundary:!0}),l=Gn(i,t),d=Gn(s,r,o),u=Kn(l),p=Kn(d);n.modifiersData[e]={referenceClippingOffsets:l,popperEscapeOffsets:d,isReferenceHidden:u,hasPopperEscaped:p},n.attributes.popper=Object.assign({},n.attributes.popper,{"data-popper-reference-hidden":u,"data-popper-escaped":p})}const js={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:Ts};function Ls(a,n,e){var t=me(a),r=[se,ie].indexOf(t)>=0?-1:1,o=typeof e=="function"?e(Object.assign({},n,{placement:a})):e,i=o[0],s=o[1];return i=i||0,s=(s||0)*r,[se,he].indexOf(t)>=0?{x:s,y:i}:{x:i,y:s}}function Bs(a){var n=a.state,e=a.options,t=a.name,r=e.offset,o=r===void 0?[0,0]:r,i=Ln.reduce(function(u,p){return u[p]=Ls(p,n.rects,o),u},{}),s=i[n.placement],l=s.x,d=s.y;n.modifiersData.popperOffsets!=null&&(n.modifiersData.popperOffsets.x+=l,n.modifiersData.popperOffsets.y+=d),n.modifiersData[t]=i}const Is={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:Bs};function Ys(a){var n=a.state,e=a.name;n.modifiersData[e]=Wn({reference:n.rects.reference,element:n.rects.popper,placement:n.placement})}const Rs={name:"popperOffsets",enabled:!0,phase:"read",fn:Ys,data:{}};function Us(a){return a==="x"?"y":"x"}function Fs(a){var n=a.state,e=a.options,t=a.name,r=e.mainAxis,o=r===void 0?!0:r,i=e.altAxis,s=i===void 0?!1:i,l=e.boundary,d=e.rootBoundary,u=e.altBoundary,p=e.padding,h=e.tether,g=h===void 0?!0:h,y=e.tetherOffset,w=y===void 0?0:y,v=Ct(n,{boundary:l,rootBoundary:d,padding:p,altBoundary:u}),_=me(n.placement),k=et(n.placement),$=!k,x=yr(_),E=Us(x),C=n.modifiersData.popperOffsets,S=n.rects.reference,D=n.rects.popper,A=typeof w=="function"?w(Object.assign({},n.rects,{placement:n.placement})):w,B=typeof A=="number"?{mainAxis:A,altAxis:A}:Object.assign({mainAxis:0,altAxis:0},A),P=n.modifiersData.offset?n.modifiersData.offset[n.placement]:null,M={x:0,y:0};if(C){if(o){var T,U=x==="y"?ie:se,I=x==="y"?pe:he,Y=x==="y"?"height":"width",R=C[x],oe=R+v[U],J=R-v[I],Ce=g?-D[Y]/2:0,ne=k===Ze?S[Y]:D[Y],$e=k===Ze?-D[Y]:-S[Y],Oe=n.elements.arrow,Te=g&&Oe?_r(Oe):{width:0,height:0},ye=n.modifiersData["arrow#persistent"]?n.modifiersData["arrow#persistent"].padding:Rn(),qe=ye[U],rt=ye[I],Ee=kt(0,S[Y],Te[Y]),nt=$?S[Y]/2-Ce-Ee-qe-B.mainAxis:ne-Ee-qe-B.mainAxis,qt=$?-S[Y]/2+Ce+Ee+rt+B.mainAxis:$e+Ee+rt+B.mainAxis,Ve=n.elements.arrow&&wt(n.elements.arrow),Ot=Ve?x==="y"?Ve.clientTop||0:Ve.clientLeft||0:0,ot=(T=P==null?void 0:P[x])!=null?T:0,at=R+nt-ot-Ot,it=R+qt-ot,st=kt(g?jt(oe,at):oe,R,g?Ne(J,it):J);C[x]=st,M[x]=st-R}if(s){var lt,Et=x==="x"?ie:se,St=x==="x"?pe:he,je=C[E],Vt=E==="y"?"height":"width",Ma=je+v[Et],Pa=je-v[St],$r=[ie,se].indexOf(_)!==-1,Ta=(lt=P==null?void 0:P[E])!=null?lt:0,ja=$r?Ma:je-S[Vt]-D[Vt]-Ta+B.altAxis,La=$r?je+S[Vt]+D[Vt]-Ta-B.altAxis:Pa,Ba=g&&$r?ps(ja,je,La):kt(g?ja:Ma,je,g?La:Pa);C[E]=Ba,M[E]=Ba-je}n.modifiersData[t]=M}}const Hs={name:"preventOverflow",enabled:!0,phase:"main",fn:Fs,requiresIfExists:["offset"]};function Ns(a){return{scrollLeft:a.scrollLeft,scrollTop:a.scrollTop}}function qs(a){return a===ce(a)||!fe(a)?wr(a):Ns(a)}function Vs(a){var n=a.getBoundingClientRect(),e=Je(n.width)/a.offsetWidth||1,t=Je(n.height)/a.offsetHeight||1;return e!==1||t!==1}function Ws(a,n,e){e===void 0&&(e=!1);var t=fe(n),r=fe(n)&&Vs(n),o=Ae(n),i=Qe(a,r,e),s={scrollLeft:0,scrollTop:0},l={x:0,y:0};return(t||!t&&!e)&&((ge(n)!=="body"||xr(o))&&(s=qs(n)),fe(n)?(l=Qe(n,!0),l.x+=n.clientLeft,l.y+=n.clientTop):o&&(l.x=kr(o))),{x:i.left+s.scrollLeft-l.x,y:i.top+s.scrollTop-l.y,width:i.width,height:i.height}}function Gs(a){var n=new Map,e=new Set,t=[];a.forEach(function(o){n.set(o.name,o)});function r(o){e.add(o.name);var i=[].concat(o.requires||[],o.requiresIfExists||[]);i.forEach(function(s){if(!e.has(s)){var l=n.get(s);l&&r(l)}}),t.push(o)}return a.forEach(function(o){e.has(o.name)||r(o)}),t}function Ks(a){var n=Gs(a);return is.reduce(function(e,t){return e.concat(n.filter(function(r){return r.phase===t}))},[])}function Xs(a){var n;return function(){return n||(n=new Promise(function(e){Promise.resolve().then(function(){n=void 0,e(a())})})),n}}function Zs(a){var n=a.reduce(function(e,t){var r=e[t.name];return e[t.name]=r?Object.assign({},r,t,{options:Object.assign({},r.options,t.options),data:Object.assign({},r.data,t.data)}):t,e},{});return Object.keys(n).map(function(e){return n[e]})}var Xn={placement:"bottom",modifiers:[],strategy:"absolute"};function Zn(){for(var a=arguments.length,n=new Array(a),e=0;e<a;e++)n[e]=arguments[e];return!n.some(function(t){return!(t&&typeof t.getBoundingClientRect=="function")})}function Js(a){a===void 0&&(a={});var n=a,e=n.defaultModifiers,t=e===void 0?[]:e,r=n.defaultOptions,o=r===void 0?Xn:r;return function(s,l,d){d===void 0&&(d=o);var u={placement:"bottom",orderedModifiers:[],options:Object.assign({},Xn,o),modifiersData:{},elements:{reference:s,popper:l},attributes:{},styles:{}},p=[],h=!1,g={state:u,setOptions:function(_){var k=typeof _=="function"?_(u.options):_;w(),u.options=Object.assign({},o,u.options,k),u.scrollParents={reference:He(s)?xt(s):s.contextElement?xt(s.contextElement):[],popper:xt(l)};var $=Ks(Zs([].concat(t,u.options.modifiers)));return u.orderedModifiers=$.filter(function(x){return x.enabled}),y(),g.update()},forceUpdate:function(){if(!h){var _=u.elements,k=_.reference,$=_.popper;if(Zn(k,$)){u.rects={reference:Ws(k,wt($),u.options.strategy==="fixed"),popper:_r($)},u.reset=!1,u.placement=u.options.placement,u.orderedModifiers.forEach(function(B){return u.modifiersData[B.name]=Object.assign({},B.data)});for(var x=0;x<u.orderedModifiers.length;x++){if(u.reset===!0){u.reset=!1,x=-1;continue}var E=u.orderedModifiers[x],C=E.fn,S=E.options,D=S===void 0?{}:S,A=E.name;typeof C=="function"&&(u=C({state:u,options:D,name:A,instance:g})||u)}}}},update:Xs(function(){return new Promise(function(v){g.forceUpdate(),v(u)})}),destroy:function(){w(),h=!0}};if(!Zn(s,l))return g;g.setOptions(d).then(function(v){!h&&d.onFirstUpdate&&d.onFirstUpdate(v)});function y(){u.orderedModifiers.forEach(function(v){var _=v.name,k=v.options,$=k===void 0?{}:k,x=v.effect;if(typeof x=="function"){var E=x({state:u,name:_,instance:g,options:$}),C=function(){};p.push(E||C)}})}function w(){p.forEach(function(v){return v()}),p=[]}return g}}var Qs=[ks,Rs,ys,cs,Is,Ps,Hs,bs,js],el=Js({defaultModifiers:Qs});const tl='.popover__wrapper{position:relative;display:inline-block;font-family:var(--font-family-base)}.popover__trigger{display:inline-flex}.popover__panel{position:relative;overflow:visible;z-index:var(--z-index-popover);min-width:240px;border-radius:var(--radius-md);border:1px solid var(--color-border);background-color:var(--color-body-bg);box-shadow:var(--shadow-md)}.popover__content{position:relative;z-index:1;background-color:var(--color-body-bg);border-radius:var(--radius-md);overflow:hidden}.popover__content:before{content:"";position:absolute;top:0;left:0;right:0;height:8px;background-color:var(--color-body-bg);border-radius:var(--radius-md) var(--radius-md) 0 0;z-index:1;pointer-events:none}.popover__content>*{position:relative;z-index:2}.popover__title{padding:10px var(--spacing-3);font-size:var(--font-size-sm);font-weight:var(--font-weight-semibold);color:var(--color-body-text)}.popover__body{padding:var(--spacing-3);font-size:var(--font-size-sm);color:var(--color-secondary)}.popover__body--with-border{border-top:1px solid var(--color-border)}.popper-arrow{position:absolute;width:12px;height:12px;pointer-events:none;z-index:0}.popper-arrow:before{content:"";position:absolute;inset:0;background:var(--color-border);transform:rotate(45deg)}.popper-arrow:after{content:"";position:absolute;inset:1px;background:var(--color-body-bg);transform:rotate(45deg)}[data-popper]{position:relative;overflow:visible}[data-popper-placement^=bottom]>.popper-arrow{top:-6px;left:50%;transform:translate(-50%,-50%)}[data-popper-placement^=top]>.popper-arrow{bottom:-6px;left:50%;transform:translate(-50%,50%)}[data-popper-placement^=left]>.popper-arrow{right:-6px;top:50%;transform:translate(50%,-50%)}[data-popper-placement^=right]>.popper-arrow{left:-6px;top:50%;transform:translate(-50%,-50%)}';var Jn,Qn,eo,to,rl=Object.defineProperty,nl=Object.getOwnPropertyDescriptor,_e=function(n,e,t,r){for(var o=r>1?void 0:r?nl(e,t):e,i=n.length-1,s;i>=0;i--)(s=n[i])&&(o=(r?s(e,t,o):s(o))||o);return r&&o&&rl(e,t,o),o};c.Popover=(function(a){function n(){var e;return j(this,n),e=H(this,n,arguments),e.title="",e.trigger="click",e.placement="bottom",e.offset=8,e.open=!1,e.closeOnOutsideClick=!0,e.handleDocumentClick=function(t){!e.open||!e.closeOnOutsideClick||t.composedPath().includes(e)||e.setOpen(!1)},e.toggle=function(t){(e.trigger==="click"||e.trigger==="both")&&(t==null||t.stopPropagation(),e.setOpen(!e.open))},e.handleMouseEnter=function(){(e.trigger==="hover"||e.trigger==="both")&&e.setOpen(!0)},e.handleMouseLeave=function(){(e.trigger==="hover"||e.trigger==="both")&&e.setOpen(!1)},e}return N(n,a),L(n,[{key:"connectedCallback",value:function(){X(n,"connectedCallback",this)([]),document.addEventListener("click",this.handleDocumentClick,{capture:!0})}},{key:"disconnectedCallback",value:function(){X(n,"disconnectedCallback",this)([]),document.removeEventListener("click",this.handleDocumentClick,{capture:!0}),this.destroyPopper()}},{key:"updated",value:function(t){X(n,"updated",this)([t]);var r=t.has("placement"),o=t.has("open")&&this.open,i=t.has("open")&&!this.open;if(i){this.destroyPopper();return}(o||r)&&this.open&&this.updatePopper()}},{key:"setOpen",value:function(t){this.open!==t&&(this.open=t,this.dispatchEvent(new CustomEvent(t?"popover-open":"popover-close",{bubbles:!0,composed:!0})))}},{key:"updatePopper",value:function(){if(!(!this.isConnected||!this.open)){var t=this.triggerElement,r=this.popperElement;if(!(!t||!r)){if(this.popperInstance){this.popperInstance.setOptions({placement:this.placement,modifiers:this.getPopperModifiers(),strategy:"fixed"}),this.popperInstance.update();return}this.popperInstance=el(t,r,{placement:this.placement,strategy:"fixed",modifiers:this.getPopperModifiers()})}}}},{key:"getPopperModifiers",value:function(){return[{name:"offset",options:{offset:[0,this.offset]}},{name:"arrow",options:{element:this.popperArrowElement,padding:8}},{name:"preventOverflow",options:{padding:8}},{name:"flip",options:{padding:8}}]}},{key:"destroyPopper",value:function(){this.popperInstance&&(this.popperInstance.destroy(),this.popperInstance=void 0)}},{key:"render",value:function(){var t=!!this.title;return m(Jn||(Jn=b([`
|
|
350
|
+
`:b}
|
|
351
|
+
${i&&this.showPasswordToggle?p`
|
|
352
|
+
<button
|
|
353
|
+
type="button"
|
|
354
|
+
slot="suffix"
|
|
355
|
+
class="input__password-toggle"
|
|
356
|
+
aria-label=${this._showPassword?"Şifreyi gizle":"Şifreyi göster"}
|
|
357
|
+
@click=${this.handlePasswordToggle}
|
|
358
|
+
>
|
|
359
|
+
<ui-icon name=${this._showPassword?"uil-eye-slash":"uil-eye"} size="16"></ui-icon>
|
|
360
|
+
</button>
|
|
361
|
+
`:b}
|
|
362
|
+
<slot name="suffix" slot="suffix"></slot>
|
|
363
|
+
</logosphere-formfield>
|
|
364
|
+
`}},a.LogosphereInput.styles=[D`${A(Wr)}`],T([F("input")],a.LogosphereInput.prototype,"_inputElement",2),T([d({type:String})],a.LogosphereInput.prototype,"value",2),T([d({type:String})],a.LogosphereInput.prototype,"type",2),T([d({type:String})],a.LogosphereInput.prototype,"placeholder",2),T([d({type:String})],a.LogosphereInput.prototype,"name",2),T([d({type:String})],a.LogosphereInput.prototype,"autocomplete",2),T([d({type:Number})],a.LogosphereInput.prototype,"minlength",2),T([d({type:Number})],a.LogosphereInput.prototype,"maxlength",2),T([d({type:String})],a.LogosphereInput.prototype,"pattern",2),T([d({type:Number})],a.LogosphereInput.prototype,"min",2),T([d({type:Number})],a.LogosphereInput.prototype,"max",2),T([d({type:Number})],a.LogosphereInput.prototype,"step",2),T([d({type:String})],a.LogosphereInput.prototype,"size",2),T([d({type:String})],a.LogosphereInput.prototype,"variant",2),T([d({type:String})],a.LogosphereInput.prototype,"label",2),T([d({type:String})],a.LogosphereInput.prototype,"helper",2),T([d({type:String})],a.LogosphereInput.prototype,"error",2),T([d({type:Boolean})],a.LogosphereInput.prototype,"required",2),T([d({type:Boolean})],a.LogosphereInput.prototype,"disabled",2),T([d({type:Boolean})],a.LogosphereInput.prototype,"readonly",2),T([d({type:String})],a.LogosphereInput.prototype,"mask",2),T([d({type:Boolean,attribute:"show-password-toggle"})],a.LogosphereInput.prototype,"showPasswordToggle",2),T([d({type:Boolean,attribute:"suppress-native-validation"})],a.LogosphereInput.prototype,"suppressNativeValidation",2),T([d({type:String,attribute:"error-display"})],a.LogosphereInput.prototype,"errorDisplay",2),T([m()],a.LogosphereInput.prototype,"_internalError",2),T([m()],a.LogosphereInput.prototype,"_showPassword",2),T([m()],a.LogosphereInput.prototype,"_invalid",2),a.LogosphereInput=T([M("logosphere-input")],a.LogosphereInput);const Qr=":host{display:block;width:100%}.pagination{display:flex;align-items:center;justify-content:space-between;padding:var(--pagination-padding, var(--spacing-4) var(--spacing-6));background-color:var(--pagination-bg, var(--color-body-bg));border-top:1px solid var(--color-border);font-family:var(--font-family-base);gap:var(--spacing-4)}.pagination--justify-end{justify-content:flex-end}.pagination--justify-start{justify-content:flex-start}.pagination--justify-center{justify-content:center}.pagination__nav{display:flex;align-items:center;gap:var(--spacing-1)}.pagination__nav-group{display:flex;align-items:center}.pagination__btn{display:flex;align-items:center;justify-content:center;padding:var(--spacing-2);border:none;background:transparent;border-radius:var(--radius-base);cursor:pointer;color:var(--pagination-color, var(--color-secondary));transition:background-color .15s ease,color .15s ease,opacity .15s ease}.pagination__btn:hover:not(:disabled){background-color:var(--pagination-item-bg-hover, var(--color-body-bg-hover))}.pagination__btn:focus-visible{outline:2px solid var(--color-primary);outline-offset:2px}.pagination__btn:disabled{opacity:.4;cursor:not-allowed}.pagination__btn--icon{display:flex;align-items:center;justify-content:center;width:32px;height:32px;padding:var(--spacing-2);border:1px solid var(--color-border);background-color:var(--pagination-item-bg, var(--color-body-bg));border-radius:var(--radius-base);cursor:pointer;color:var(--pagination-color, var(--color-secondary));transition:background-color .15s ease,border-color .15s ease,opacity .15s ease}.pagination__btn--icon:hover:not(:disabled){background-color:var(--pagination-item-bg-hover, var(--color-body-bg-hover));border-color:var(--color-border-hover)}.pagination__btn--icon:focus-visible{outline:2px solid var(--color-primary);outline-offset:2px}.pagination__btn--icon:disabled{opacity:.4;cursor:not-allowed}.pagination__btn--text{display:flex;align-items:center;justify-content:center;gap:var(--spacing-1);height:32px;min-width:100px;padding:var(--spacing-1) var(--spacing-3);border:1px solid var(--color-border);background-color:var(--pagination-item-bg, var(--color-body-bg));border-radius:var(--radius-base);font-size:var(--font-size-sm);font-weight:var(--font-weight-medium);color:var(--pagination-color, var(--color-secondary));cursor:pointer;transition:all .15s ease}.pagination__btn--text:hover:not(:disabled){background-color:var(--pagination-item-bg-hover, var(--color-body-bg-hover));border-color:var(--color-border-hover)}.pagination__btn--text:disabled{color:var(--pagination-color-disabled, var(--color-secondary-disabled));cursor:not-allowed}.pagination__btn--number{display:flex;align-items:center;justify-content:center;min-width:32px;height:32px;padding:var(--spacing-1) var(--spacing-3);border:1px solid var(--color-border);background-color:var(--pagination-item-bg, var(--color-body-bg));border-radius:var(--radius-base);font-size:var(--font-size-sm);font-weight:var(--font-weight-medium);color:var(--pagination-color, var(--color-secondary));cursor:pointer;transition:all .15s ease}.pagination__btn--number:hover:not(:disabled):not(.pagination__btn--active){background-color:var(--pagination-item-bg-hover, var(--color-body-bg-hover))}.pagination__btn--active{background-color:var(--pagination-active-bg, var(--color-secondary));border-color:var(--pagination-active-bg, var(--color-secondary));color:var(--pagination-active-color, white);font-weight:var(--font-weight-semibold)}.pagination__btn--ellipsis{border:none;background:transparent;cursor:default;min-width:32px}.pagination__btn--ellipsis:hover{background:transparent}.pagination__input-container{display:flex;align-items:center;justify-content:center;min-width:32px;height:32px}.pagination__input{width:100%;height:100%;min-width:32px;padding:0;border:1px solid var(--color-border);border-radius:var(--radius-base);background-color:var(--pagination-item-bg, var(--color-body-bg));font-size:var(--font-size-sm);font-weight:var(--font-weight-regular);color:var(--color-body-text);text-align:center;outline:none;transition:border-color .15s ease}.pagination__input:focus{border-color:var(--color-primary)}.pagination__input::-webkit-outer-spin-button,.pagination__input::-webkit-inner-spin-button{-webkit-appearance:none;margin:0}.pagination__input[type=number]{-moz-appearance:textfield}.pagination__separator{font-size:var(--font-size-xs);font-weight:var(--font-weight-regular);color:var(--color-tertiary);line-height:18px;letter-spacing:-.12px;margin-right:var(--spacing-1)}.pagination__info{display:flex;align-items:center;gap:var(--spacing-2)}.pagination__page-info{display:flex;align-items:center;gap:var(--spacing-1);font-size:var(--font-size-xs);line-height:18px;letter-spacing:-.12px}.pagination__page-info-text{color:var(--pagination-color, var(--color-secondary))}.pagination__page-info-separator{color:var(--color-tertiary)}.pagination__total{display:flex;align-items:center;gap:var(--spacing-1);font-size:var(--font-size-xs);line-height:18px;letter-spacing:-.12px}.pagination__total-separator{color:var(--color-tertiary)}.pagination__total-text{color:var(--pagination-color, var(--color-secondary))}.pagination__page-size{display:flex;align-items:center}@media(max-width:768px){.pagination{flex-wrap:wrap;gap:var(--spacing-3);padding:var(--pagination-padding, var(--spacing-3) var(--spacing-4))}.pagination__btn--text{min-width:80px;font-size:var(--font-size-xs)}}@media(max-width:480px){.pagination__nav,.pagination__info{flex-wrap:wrap;justify-content:center}}";var ne="top",he="bottom",ue="right",le="left",xo="auto",Ct=[ne,he,ue,le],it="start",St="end",es="clippingParents",ii="viewport",Et="popper",ts="reference",ri=Ct.reduce(function(r,e){return r.concat([e+"-"+it,e+"-"+St])},[]),si=[].concat(Ct,[xo]).reduce(function(r,e){return r.concat([e,e+"-"+it,e+"-"+St])},[]),os="beforeRead",is="read",rs="afterRead",ss="beforeMain",as="main",ns="afterMain",ls="beforeWrite",ds="write",cs="afterWrite",ps=[os,is,rs,ss,as,ns,ls,ds,cs];function ve(r){return r?(r.nodeName||"").toLowerCase():null}function de(r){if(r==null)return window;if(r.toString()!=="[object Window]"){var e=r.ownerDocument;return e&&e.defaultView||window}return r}function We(r){var e=de(r).Element;return r instanceof e||r instanceof Element}function ge(r){var e=de(r).HTMLElement;return r instanceof e||r instanceof HTMLElement}function $o(r){if(typeof ShadowRoot=="undefined")return!1;var e=de(r).ShadowRoot;return r instanceof e||r instanceof ShadowRoot}function hs(r){var e=r.state;Object.keys(e.elements).forEach(function(t){var o=e.styles[t]||{},i=e.attributes[t]||{},s=e.elements[t];!ge(s)||!ve(s)||(Object.assign(s.style,o),Object.keys(i).forEach(function(n){var l=i[n];l===!1?s.removeAttribute(n):s.setAttribute(n,l===!0?"":l)}))})}function us(r){var e=r.state,t={popper:{position:e.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(e.elements.popper.style,t.popper),e.styles=t,e.elements.arrow&&Object.assign(e.elements.arrow.style,t.arrow),function(){Object.keys(e.elements).forEach(function(o){var i=e.elements[o],s=e.attributes[o]||{},n=Object.keys(e.styles.hasOwnProperty(o)?e.styles[o]:t[o]),l=n.reduce(function(c,u){return c[u]="",c},{});!ge(i)||!ve(i)||(Object.assign(i.style,l),Object.keys(s).forEach(function(c){i.removeAttribute(c)}))})}}const gs={name:"applyStyles",enabled:!0,phase:"write",fn:hs,effect:us,requires:["computeStyles"]};function me(r){return r.split("-")[0]}var Ge=Math.max,Zt=Math.min,rt=Math.round;function ko(){var r=navigator.userAgentData;return r!=null&&r.brands&&Array.isArray(r.brands)?r.brands.map(function(e){return e.brand+"/"+e.version}).join(" "):navigator.userAgent}function ai(){return!/^((?!chrome|android).)*safari/i.test(ko())}function st(r,e,t){e===void 0&&(e=!1),t===void 0&&(t=!1);var o=r.getBoundingClientRect(),i=1,s=1;e&&ge(r)&&(i=r.offsetWidth>0&&rt(o.width)/r.offsetWidth||1,s=r.offsetHeight>0&&rt(o.height)/r.offsetHeight||1);var n=We(r)?de(r):window,l=n.visualViewport,c=!ai()&&t,u=(o.left+(c&&l?l.offsetLeft:0))/i,h=(o.top+(c&&l?l.offsetTop:0))/s,g=o.width/i,f=o.height/s;return{width:g,height:f,top:h,right:u+g,bottom:h+f,left:u,x:u,y:h}}function Co(r){var e=st(r),t=r.offsetWidth,o=r.offsetHeight;return Math.abs(e.width-t)<=1&&(t=e.width),Math.abs(e.height-o)<=1&&(o=e.height),{x:r.offsetLeft,y:r.offsetTop,width:t,height:o}}function ni(r,e){var t=e.getRootNode&&e.getRootNode();if(r.contains(e))return!0;if(t&&$o(t)){var o=e;do{if(o&&r.isSameNode(o))return!0;o=o.parentNode||o.host}while(o)}return!1}function Se(r){return de(r).getComputedStyle(r)}function bs(r){return["table","td","th"].indexOf(ve(r))>=0}function Be(r){return((We(r)?r.ownerDocument:r.document)||window.document).documentElement}function Wt(r){return ve(r)==="html"?r:r.assignedSlot||r.parentNode||($o(r)?r.host:null)||Be(r)}function li(r){return!ge(r)||Se(r).position==="fixed"?null:r.offsetParent}function fs(r){var e=/firefox/i.test(ko()),t=/Trident/i.test(ko());if(t&&ge(r)){var o=Se(r);if(o.position==="fixed")return null}var i=Wt(r);for($o(i)&&(i=i.host);ge(i)&&["html","body"].indexOf(ve(i))<0;){var s=Se(i);if(s.transform!=="none"||s.perspective!=="none"||s.contain==="paint"||["transform","perspective"].indexOf(s.willChange)!==-1||e&&s.willChange==="filter"||e&&s.filter&&s.filter!=="none")return i;i=i.parentNode}return null}function Pt(r){for(var e=de(r),t=li(r);t&&bs(t)&&Se(t).position==="static";)t=li(t);return t&&(ve(t)==="html"||ve(t)==="body"&&Se(t).position==="static")?e:t||fs(r)||e}function So(r){return["top","bottom"].indexOf(r)>=0?"x":"y"}function zt(r,e,t){return Ge(r,Zt(e,t))}function _s(r,e,t){var o=zt(r,e,t);return o>t?t:o}function di(){return{top:0,right:0,bottom:0,left:0}}function ci(r){return Object.assign({},di(),r)}function pi(r,e){return e.reduce(function(t,o){return t[o]=r,t},{})}var vs=function(e,t){return e=typeof e=="function"?e(Object.assign({},t.rects,{placement:t.placement})):e,ci(typeof e!="number"?e:pi(e,Ct))};function ms(r){var e,t=r.state,o=r.name,i=r.options,s=t.elements.arrow,n=t.modifiersData.popperOffsets,l=me(t.placement),c=So(l),u=[le,ue].indexOf(l)>=0,h=u?"height":"width";if(!(!s||!n)){var g=vs(i.padding,t),f=Co(s),v=c==="y"?ne:le,w=c==="y"?he:ue,C=t.rects.reference[h]+t.rects.reference[c]-n[c]-t.rects.popper[h],_=n[c]-t.rects.reference[c],y=Pt(s),x=y?c==="y"?y.clientHeight||0:y.clientWidth||0:0,$=C/2-_/2,k=g[v],S=x-f[h]-g[w],P=x/2-f[h]/2+$,L=zt(k,P,S),I=c;t.modifiersData[o]=(e={},e[I]=L,e.centerOffset=L-P,e)}}function ys(r){var e=r.state,t=r.options,o=t.element,i=o===void 0?"[data-popper-arrow]":o;i!=null&&(typeof i=="string"&&(i=e.elements.popper.querySelector(i),!i)||ni(e.elements.popper,i)&&(e.elements.arrow=i))}const ws={name:"arrow",enabled:!0,phase:"main",fn:ms,effect:ys,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function at(r){return r.split("-")[1]}var xs={top:"auto",right:"auto",bottom:"auto",left:"auto"};function $s(r,e){var t=r.x,o=r.y,i=e.devicePixelRatio||1;return{x:rt(t*i)/i||0,y:rt(o*i)/i||0}}function hi(r){var e,t=r.popper,o=r.popperRect,i=r.placement,s=r.variation,n=r.offsets,l=r.position,c=r.gpuAcceleration,u=r.adaptive,h=r.roundOffsets,g=r.isFixed,f=n.x,v=f===void 0?0:f,w=n.y,C=w===void 0?0:w,_=typeof h=="function"?h({x:v,y:C}):{x:v,y:C};v=_.x,C=_.y;var y=n.hasOwnProperty("x"),x=n.hasOwnProperty("y"),$=le,k=ne,S=window;if(u){var P=Pt(t),L="clientHeight",I="clientWidth";if(P===de(t)&&(P=Be(t),Se(P).position!=="static"&&l==="absolute"&&(L="scrollHeight",I="scrollWidth")),P=P,i===ne||(i===le||i===ue)&&s===St){k=he;var B=g&&P===S&&S.visualViewport?S.visualViewport.height:P[L];C-=B-o.height,C*=c?1:-1}if(i===le||(i===ne||i===he)&&s===St){$=ue;var R=g&&P===S&&S.visualViewport?S.visualViewport.width:P[I];v-=R-o.width,v*=c?1:-1}}var Y=Object.assign({position:l},u&&xs),U=h===!0?$s({x:v,y:C},de(t)):{x:v,y:C};if(v=U.x,C=U.y,c){var H;return Object.assign({},Y,(H={},H[k]=x?"0":"",H[$]=y?"0":"",H.transform=(S.devicePixelRatio||1)<=1?"translate("+v+"px, "+C+"px)":"translate3d("+v+"px, "+C+"px, 0)",H))}return Object.assign({},Y,(e={},e[k]=x?C+"px":"",e[$]=y?v+"px":"",e.transform="",e))}function ks(r){var e=r.state,t=r.options,o=t.gpuAcceleration,i=o===void 0?!0:o,s=t.adaptive,n=s===void 0?!0:s,l=t.roundOffsets,c=l===void 0?!0:l,u={placement:me(e.placement),variation:at(e.placement),popper:e.elements.popper,popperRect:e.rects.popper,gpuAcceleration:i,isFixed:e.options.strategy==="fixed"};e.modifiersData.popperOffsets!=null&&(e.styles.popper=Object.assign({},e.styles.popper,hi(Object.assign({},u,{offsets:e.modifiersData.popperOffsets,position:e.options.strategy,adaptive:n,roundOffsets:c})))),e.modifiersData.arrow!=null&&(e.styles.arrow=Object.assign({},e.styles.arrow,hi(Object.assign({},u,{offsets:e.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:c})))),e.attributes.popper=Object.assign({},e.attributes.popper,{"data-popper-placement":e.placement})}const Cs={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:ks,data:{}};var Gt={passive:!0};function Ss(r){var e=r.state,t=r.instance,o=r.options,i=o.scroll,s=i===void 0?!0:i,n=o.resize,l=n===void 0?!0:n,c=de(e.elements.popper),u=[].concat(e.scrollParents.reference,e.scrollParents.popper);return s&&u.forEach(function(h){h.addEventListener("scroll",t.update,Gt)}),l&&c.addEventListener("resize",t.update,Gt),function(){s&&u.forEach(function(h){h.removeEventListener("scroll",t.update,Gt)}),l&&c.removeEventListener("resize",t.update,Gt)}}const Es={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:Ss,data:{}};var Ps={left:"right",right:"left",bottom:"top",top:"bottom"};function Kt(r){return r.replace(/left|right|bottom|top/g,function(e){return Ps[e]})}var zs={start:"end",end:"start"};function ui(r){return r.replace(/start|end/g,function(e){return zs[e]})}function Eo(r){var e=de(r),t=e.pageXOffset,o=e.pageYOffset;return{scrollLeft:t,scrollTop:o}}function Po(r){return st(Be(r)).left+Eo(r).scrollLeft}function As(r,e){var t=de(r),o=Be(r),i=t.visualViewport,s=o.clientWidth,n=o.clientHeight,l=0,c=0;if(i){s=i.width,n=i.height;var u=ai();(u||!u&&e==="fixed")&&(l=i.offsetLeft,c=i.offsetTop)}return{width:s,height:n,x:l+Po(r),y:c}}function Ds(r){var e,t=Be(r),o=Eo(r),i=(e=r.ownerDocument)==null?void 0:e.body,s=Ge(t.scrollWidth,t.clientWidth,i?i.scrollWidth:0,i?i.clientWidth:0),n=Ge(t.scrollHeight,t.clientHeight,i?i.scrollHeight:0,i?i.clientHeight:0),l=-o.scrollLeft+Po(r),c=-o.scrollTop;return Se(i||t).direction==="rtl"&&(l+=Ge(t.clientWidth,i?i.clientWidth:0)-s),{width:s,height:n,x:l,y:c}}function zo(r){var e=Se(r),t=e.overflow,o=e.overflowX,i=e.overflowY;return/auto|scroll|overlay|hidden/.test(t+i+o)}function gi(r){return["html","body","#document"].indexOf(ve(r))>=0?r.ownerDocument.body:ge(r)&&zo(r)?r:gi(Wt(r))}function At(r,e){var t;e===void 0&&(e=[]);var o=gi(r),i=o===((t=r.ownerDocument)==null?void 0:t.body),s=de(o),n=i?[s].concat(s.visualViewport||[],zo(o)?o:[]):o,l=e.concat(n);return i?l:l.concat(At(Wt(n)))}function Ao(r){return Object.assign({},r,{left:r.x,top:r.y,right:r.x+r.width,bottom:r.y+r.height})}function Ms(r,e){var t=st(r,!1,e==="fixed");return t.top=t.top+r.clientTop,t.left=t.left+r.clientLeft,t.bottom=t.top+r.clientHeight,t.right=t.left+r.clientWidth,t.width=r.clientWidth,t.height=r.clientHeight,t.x=t.left,t.y=t.top,t}function bi(r,e,t){return e===ii?Ao(As(r,t)):We(e)?Ms(e,t):Ao(Ds(Be(r)))}function Os(r){var e=At(Wt(r)),t=["absolute","fixed"].indexOf(Se(r).position)>=0,o=t&&ge(r)?Pt(r):r;return We(o)?e.filter(function(i){return We(i)&&ni(i,o)&&ve(i)!=="body"}):[]}function Ls(r,e,t,o){var i=e==="clippingParents"?Os(r):[].concat(e),s=[].concat(i,[t]),n=s[0],l=s.reduce(function(c,u){var h=bi(r,u,o);return c.top=Ge(h.top,c.top),c.right=Zt(h.right,c.right),c.bottom=Zt(h.bottom,c.bottom),c.left=Ge(h.left,c.left),c},bi(r,n,o));return l.width=l.right-l.left,l.height=l.bottom-l.top,l.x=l.left,l.y=l.top,l}function fi(r){var e=r.reference,t=r.element,o=r.placement,i=o?me(o):null,s=o?at(o):null,n=e.x+e.width/2-t.width/2,l=e.y+e.height/2-t.height/2,c;switch(i){case ne:c={x:n,y:e.y-t.height};break;case he:c={x:n,y:e.y+e.height};break;case ue:c={x:e.x+e.width,y:l};break;case le:c={x:e.x-t.width,y:l};break;default:c={x:e.x,y:e.y}}var u=i?So(i):null;if(u!=null){var h=u==="y"?"height":"width";switch(s){case it:c[u]=c[u]-(e[h]/2-t[h]/2);break;case St:c[u]=c[u]+(e[h]/2-t[h]/2);break}}return c}function Dt(r,e){e===void 0&&(e={});var t=e,o=t.placement,i=o===void 0?r.placement:o,s=t.strategy,n=s===void 0?r.strategy:s,l=t.boundary,c=l===void 0?es:l,u=t.rootBoundary,h=u===void 0?ii:u,g=t.elementContext,f=g===void 0?Et:g,v=t.altBoundary,w=v===void 0?!1:v,C=t.padding,_=C===void 0?0:C,y=ci(typeof _!="number"?_:pi(_,Ct)),x=f===Et?ts:Et,$=r.rects.popper,k=r.elements[w?x:f],S=Ls(We(k)?k:k.contextElement||Be(r.elements.popper),c,h,n),P=st(r.elements.reference),L=fi({reference:P,element:$,placement:i}),I=Ao(Object.assign({},$,L)),B=f===Et?I:P,R={top:S.top-B.top+y.top,bottom:B.bottom-S.bottom+y.bottom,left:S.left-B.left+y.left,right:B.right-S.right+y.right},Y=r.modifiersData.offset;if(f===Et&&Y){var U=Y[i];Object.keys(R).forEach(function(H){var ee=[ue,he].indexOf(H)>=0?1:-1,te=[ne,he].indexOf(H)>=0?"y":"x";R[H]+=U[te]*ee})}return R}function Ts(r,e){e===void 0&&(e={});var t=e,o=t.placement,i=t.boundary,s=t.rootBoundary,n=t.padding,l=t.flipVariations,c=t.allowedAutoPlacements,u=c===void 0?si:c,h=at(o),g=h?l?ri:ri.filter(function(w){return at(w)===h}):Ct,f=g.filter(function(w){return u.indexOf(w)>=0});f.length===0&&(f=g);var v=f.reduce(function(w,C){return w[C]=Dt(r,{placement:C,boundary:i,rootBoundary:s,padding:n})[me(C)],w},{});return Object.keys(v).sort(function(w,C){return v[w]-v[C]})}function Bs(r){if(me(r)===xo)return[];var e=Kt(r);return[ui(r),e,ui(e)]}function Is(r){var e=r.state,t=r.options,o=r.name;if(!e.modifiersData[o]._skip){for(var i=t.mainAxis,s=i===void 0?!0:i,n=t.altAxis,l=n===void 0?!0:n,c=t.fallbackPlacements,u=t.padding,h=t.boundary,g=t.rootBoundary,f=t.altBoundary,v=t.flipVariations,w=v===void 0?!0:v,C=t.allowedAutoPlacements,_=e.options.placement,y=me(_),x=y===_,$=c||(x||!w?[Kt(_)]:Bs(_)),k=[_].concat($).reduce(function(je,xe){return je.concat(me(xe)===xo?Ts(e,{placement:xe,boundary:h,rootBoundary:g,padding:u,flipVariations:w,allowedAutoPlacements:C}):xe)},[]),S=e.rects.reference,P=e.rects.popper,L=new Map,I=!0,B=k[0],R=0;R<k.length;R++){var Y=k[R],U=me(Y),H=at(Y)===it,ee=[ne,he].indexOf(U)>=0,te=ee?"width":"height",Z=Dt(e,{placement:Y,boundary:h,rootBoundary:g,altBoundary:f,padding:u}),oe=ee?H?ue:le:H?he:ne;S[te]>P[te]&&(oe=Kt(oe));var _e=Kt(oe),ae=[];if(s&&ae.push(Z[U]<=0),l&&ae.push(Z[oe]<=0,Z[_e]<=0),ae.every(function(je){return je})){B=Y,I=!1;break}L.set(Y,ae)}if(I)for(var Pe=w?3:1,ie=function(xe){var Xe=k.find(function(dt){var De=L.get(dt);if(De)return De.slice(0,xe).every(function(ct){return ct})});if(Xe)return B=Xe,"break"},ze=Pe;ze>0;ze--){var Ae=ie(ze);if(Ae==="break")break}e.placement!==B&&(e.modifiersData[o]._skip=!0,e.placement=B,e.reset=!0)}}const Rs={name:"flip",enabled:!0,phase:"main",fn:Is,requiresIfExists:["offset"],data:{_skip:!1}};function _i(r,e,t){return t===void 0&&(t={x:0,y:0}),{top:r.top-e.height-t.y,right:r.right-e.width+t.x,bottom:r.bottom-e.height+t.y,left:r.left-e.width-t.x}}function vi(r){return[ne,ue,he,le].some(function(e){return r[e]>=0})}function Hs(r){var e=r.state,t=r.name,o=e.rects.reference,i=e.rects.popper,s=e.modifiersData.preventOverflow,n=Dt(e,{elementContext:"reference"}),l=Dt(e,{altBoundary:!0}),c=_i(n,o),u=_i(l,i,s),h=vi(c),g=vi(u);e.modifiersData[t]={referenceClippingOffsets:c,popperEscapeOffsets:u,isReferenceHidden:h,hasPopperEscaped:g},e.attributes.popper=Object.assign({},e.attributes.popper,{"data-popper-reference-hidden":h,"data-popper-escaped":g})}const js={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:Hs};function Ns(r,e,t){var o=me(r),i=[le,ne].indexOf(o)>=0?-1:1,s=typeof t=="function"?t(Object.assign({},e,{placement:r})):t,n=s[0],l=s[1];return n=n||0,l=(l||0)*i,[le,ue].indexOf(o)>=0?{x:l,y:n}:{x:n,y:l}}function Ys(r){var e=r.state,t=r.options,o=r.name,i=t.offset,s=i===void 0?[0,0]:i,n=si.reduce(function(h,g){return h[g]=Ns(g,e.rects,s),h},{}),l=n[e.placement],c=l.x,u=l.y;e.modifiersData.popperOffsets!=null&&(e.modifiersData.popperOffsets.x+=c,e.modifiersData.popperOffsets.y+=u),e.modifiersData[o]=n}const Vs={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:Ys};function Fs(r){var e=r.state,t=r.name;e.modifiersData[t]=fi({reference:e.rects.reference,element:e.rects.popper,placement:e.placement})}const Us={name:"popperOffsets",enabled:!0,phase:"read",fn:Fs,data:{}};function qs(r){return r==="x"?"y":"x"}function Zs(r){var e=r.state,t=r.options,o=r.name,i=t.mainAxis,s=i===void 0?!0:i,n=t.altAxis,l=n===void 0?!1:n,c=t.boundary,u=t.rootBoundary,h=t.altBoundary,g=t.padding,f=t.tether,v=f===void 0?!0:f,w=t.tetherOffset,C=w===void 0?0:w,_=Dt(e,{boundary:c,rootBoundary:u,padding:g,altBoundary:h}),y=me(e.placement),x=at(e.placement),$=!x,k=So(y),S=qs(k),P=e.modifiersData.popperOffsets,L=e.rects.reference,I=e.rects.popper,B=typeof C=="function"?C(Object.assign({},e.rects,{placement:e.placement})):C,R=typeof B=="number"?{mainAxis:B,altAxis:B}:Object.assign({mainAxis:0,altAxis:0},B),Y=e.modifiersData.offset?e.modifiersData.offset[e.placement]:null,U={x:0,y:0};if(P){if(s){var H,ee=k==="y"?ne:le,te=k==="y"?he:ue,Z=k==="y"?"height":"width",oe=P[k],_e=oe+_[ee],ae=oe-_[te],Pe=v?-I[Z]/2:0,ie=x===it?L[Z]:I[Z],ze=x===it?-I[Z]:-L[Z],Ae=e.elements.arrow,je=v&&Ae?Co(Ae):{width:0,height:0},xe=e.modifiersData["arrow#persistent"]?e.modifiersData["arrow#persistent"].padding:di(),Xe=xe[ee],dt=xe[te],De=zt(0,L[Z],je[Z]),ct=$?L[Z]/2-Pe-De-Xe-R.mainAxis:ie-De-Xe-R.mainAxis,so=$?-L[Z]/2+Pe+De+dt+R.mainAxis:ze+De+dt+R.mainAxis,Je=e.elements.arrow&&Pt(e.elements.arrow),Bt=Je?k==="y"?Je.clientTop||0:Je.clientLeft||0:0,pt=(H=Y==null?void 0:Y[k])!=null?H:0,ht=oe+ct-pt-Bt,ut=oe+so-pt,gt=zt(v?Zt(_e,ht):_e,oe,v?Ge(ae,ut):ae);P[k]=gt,U[k]=gt-oe}if(l){var bt,It=k==="x"?ne:le,Rt=k==="x"?he:ue,Ne=P[S],ao=S==="y"?"height":"width",ji=Ne+_[It],Ni=Ne-_[Rt],Oo=[ne,le].indexOf(y)!==-1,Yi=(bt=Y==null?void 0:Y[S])!=null?bt:0,Vi=Oo?ji:Ne-L[ao]-I[ao]-Yi+R.altAxis,Fi=Oo?Ne+L[ao]+I[ao]-Yi-R.altAxis:Ni,Ui=v&&Oo?_s(Vi,Ne,Fi):zt(v?Vi:ji,Ne,v?Fi:Ni);P[S]=Ui,U[S]=Ui-Ne}e.modifiersData[o]=U}}const Ws={name:"preventOverflow",enabled:!0,phase:"main",fn:Zs,requiresIfExists:["offset"]};function Gs(r){return{scrollLeft:r.scrollLeft,scrollTop:r.scrollTop}}function Ks(r){return r===de(r)||!ge(r)?Eo(r):Gs(r)}function Xs(r){var e=r.getBoundingClientRect(),t=rt(e.width)/r.offsetWidth||1,o=rt(e.height)/r.offsetHeight||1;return t!==1||o!==1}function Js(r,e,t){t===void 0&&(t=!1);var o=ge(e),i=ge(e)&&Xs(e),s=Be(e),n=st(r,i,t),l={scrollLeft:0,scrollTop:0},c={x:0,y:0};return(o||!o&&!t)&&((ve(e)!=="body"||zo(s))&&(l=Ks(e)),ge(e)?(c=st(e,!0),c.x+=e.clientLeft,c.y+=e.clientTop):s&&(c.x=Po(s))),{x:n.left+l.scrollLeft-c.x,y:n.top+l.scrollTop-c.y,width:n.width,height:n.height}}function Qs(r){var e=new Map,t=new Set,o=[];r.forEach(function(s){e.set(s.name,s)});function i(s){t.add(s.name);var n=[].concat(s.requires||[],s.requiresIfExists||[]);n.forEach(function(l){if(!t.has(l)){var c=e.get(l);c&&i(c)}}),o.push(s)}return r.forEach(function(s){t.has(s.name)||i(s)}),o}function ea(r){var e=Qs(r);return ps.reduce(function(t,o){return t.concat(e.filter(function(i){return i.phase===o}))},[])}function ta(r){var e;return function(){return e||(e=new Promise(function(t){Promise.resolve().then(function(){e=void 0,t(r())})})),e}}function oa(r){var e=r.reduce(function(t,o){var i=t[o.name];return t[o.name]=i?Object.assign({},i,o,{options:Object.assign({},i.options,o.options),data:Object.assign({},i.data,o.data)}):o,t},{});return Object.keys(e).map(function(t){return e[t]})}var mi={placement:"bottom",modifiers:[],strategy:"absolute"};function yi(){for(var r=arguments.length,e=new Array(r),t=0;t<r;t++)e[t]=arguments[t];return!e.some(function(o){return!(o&&typeof o.getBoundingClientRect=="function")})}function ia(r){r===void 0&&(r={});var e=r,t=e.defaultModifiers,o=t===void 0?[]:t,i=e.defaultOptions,s=i===void 0?mi:i;return function(l,c,u){u===void 0&&(u=s);var h={placement:"bottom",orderedModifiers:[],options:Object.assign({},mi,s),modifiersData:{},elements:{reference:l,popper:c},attributes:{},styles:{}},g=[],f=!1,v={state:h,setOptions:function(y){var x=typeof y=="function"?y(h.options):y;C(),h.options=Object.assign({},s,h.options,x),h.scrollParents={reference:We(l)?At(l):l.contextElement?At(l.contextElement):[],popper:At(c)};var $=ea(oa([].concat(o,h.options.modifiers)));return h.orderedModifiers=$.filter(function(k){return k.enabled}),w(),v.update()},forceUpdate:function(){if(!f){var y=h.elements,x=y.reference,$=y.popper;if(yi(x,$)){h.rects={reference:Js(x,Pt($),h.options.strategy==="fixed"),popper:Co($)},h.reset=!1,h.placement=h.options.placement,h.orderedModifiers.forEach(function(R){return h.modifiersData[R.name]=Object.assign({},R.data)});for(var k=0;k<h.orderedModifiers.length;k++){if(h.reset===!0){h.reset=!1,k=-1;continue}var S=h.orderedModifiers[k],P=S.fn,L=S.options,I=L===void 0?{}:L,B=S.name;typeof P=="function"&&(h=P({state:h,options:I,name:B,instance:v})||h)}}}},update:ta(function(){return new Promise(function(_){v.forceUpdate(),_(h)})}),destroy:function(){C(),f=!0}};if(!yi(l,c))return v;v.setOptions(u).then(function(_){!f&&u.onFirstUpdate&&u.onFirstUpdate(_)});function w(){h.orderedModifiers.forEach(function(_){var y=_.name,x=_.options,$=x===void 0?{}:x,k=_.effect;if(typeof k=="function"){var S=k({state:h,name:y,instance:v,options:$}),P=function(){};g.push(S||P)}})}function C(){g.forEach(function(_){return _()}),g=[]}return v}}var ra=[Es,Us,Cs,gs,Vs,Rs,Ws,ws,js],Mt=ia({defaultModifiers:ra});const sa=':host{display:block}.combobox{display:flex;flex-direction:column;gap:var(--spacing-1);font-family:var(--font-family-base);width:100%}.combobox__label{display:block;font-size:var(--font-size-sm);font-weight:var(--font-weight-medium);color:var(--color-body-text)}.combobox__label--required:after{content:" *";color:var(--color-primary)}.combobox__readonly{border:none;background:transparent;font-size:var(--font-size-sm);color:var(--color-body-text);padding:0;outline:none;font-family:var(--font-family-base)}.combobox__wrapper{position:relative;width:100%;box-sizing:border-box;padding-right:16px;cursor:pointer}.combobox__trigger{display:flex;align-items:center;justify-content:space-between;width:100%;gap:var(--spacing-2);padding:0;border:none;border-radius:0;background-color:transparent;cursor:pointer;overflow:hidden;font-size:var(--font-size-sm);color:var(--color-body-text);transition:color var(--transition-speed-fast) var(--transition-timing);box-sizing:border-box}.combobox__trigger--default{min-height:20px}.combobox__trigger--large{min-height:24px;font-size:var(--font-size-base)}.combobox__trigger--open{color:var(--color-body-text)}.combobox__trigger--readonly{cursor:default;color:var(--color-tertiary)}.combobox__trigger--disabled{cursor:not-allowed;color:var(--color-tertiary)}.combobox__trigger--readonly .combobox__chevron,.combobox__trigger--disabled .combobox__chevron{opacity:.3}.combobox__placeholder{color:var(--color-tertiary);font-size:var(--font-size-sm);flex:1}.combobox__single-value{flex:1;font-size:var(--font-size-sm);color:var(--color-body-text)}.combobox__trigger--not-clearable .combobox__single-value,.combobox__trigger--not-clearable .combobox__placeholder{padding-right:24px}.combobox__chevron{display:inline-flex;align-items:center;justify-content:center;color:var(--color-tertiary);flex-shrink:0;transition:transform var(--transition-speed-fast) var(--transition-timing);position:absolute;right:var(--spacing-3)}.combobox__chevron--open{transform:rotate(180deg)}.combobox__tags{display:flex;flex-wrap:wrap;align-items:center;gap:var(--spacing-1);flex:1;overflow:hidden}.combobox__tag{display:inline-flex;align-items:center;gap:var(--spacing-1);padding:var(--spacing-1) var(--spacing-2);background-color:var(--combobox-tag-bg, var(--color-light));border-radius:var(--radius-sm);font-size:var(--font-size-xs);color:var(--combobox-tag-color, var(--color-body-text));white-space:nowrap}.combobox__tag-remove{display:inline-flex;align-items:center;justify-content:center;background:none;border:none;padding:0;cursor:pointer;color:var(--color-tertiary);line-height:1;transition:color var(--transition-speed-fast) var(--transition-timing)}.combobox__tag-remove:hover{color:var(--color-body-text)}.combobox__clear{display:inline-flex;align-items:center;justify-content:center;background:none;border:none;padding:0 12px 0 0;cursor:pointer;color:var(--combobox-clear-color, var(--color-secondary));line-height:1;flex-shrink:0;transition:color var(--transition-speed-fast) var(--transition-timing)}.combobox__clear:hover{color:var(--color-body-text)}.combobox__filter-input{flex:1;border:none;outline:none;background:transparent;font-size:var(--font-size-sm);font-family:var(--font-family-base);color:var(--color-body-text);min-width:0;padding:0;cursor:text}.combobox__filter-input:disabled{cursor:not-allowed}.combobox__filter-input::placeholder{color:var(--color-tertiary)}.combobox__filter-input--inline{flex:1;min-width:60px}.combobox__trigger--multi-filter{flex-wrap:wrap;height:auto;min-height:32px;gap:var(--spacing-1);padding:var(--spacing-1) var(--spacing-3)}.combobox__trigger--large.combobox__trigger--multi-filter{min-height:40px}.combobox__dropdown[popover]{position:fixed;inset:unset;margin:0;padding:0;border:none}.combobox__dropdown{width:auto;background-color:var(--color-body-bg);border:1px solid var(--color-border);border-radius:var(--radius-base);box-shadow:var(--shadow-sm);z-index:var(--z-index-dropdown);overflow:hidden}.combobox__search{width:100%;padding:var(--spacing-2) var(--spacing-3);border:none;border-bottom:1px solid var(--color-border);font-size:var(--font-size-sm);color:var(--color-body-text);font-family:var(--font-family-base);outline:none;box-sizing:border-box;background-color:var(--color-body-bg)}.combobox__search::placeholder{color:var(--color-tertiary)}.combobox__list{max-height:208px;overflow-y:auto}.combobox__group--titled+.combobox__group--titled:before{content:"";display:block;margin:var(--spacing-2) 0;border-top:1px solid var(--color-border)}.combobox__group-title{margin-top:var(--spacing-2);padding:var(--spacing-2) var(--spacing-3) var(--spacing-2);font-size:var(--font-size-sm);font-weight:var(--font-weight-normal);color:var(--color-tertiary)}.combobox__item{display:flex;align-items:center;gap:var(--spacing-2);padding:var(--spacing-2) var(--spacing-3);font-size:var(--font-size-sm);color:var(--color-body-text);cursor:pointer;transition:background-color var(--transition-speed-fast) var(--transition-timing)}.combobox__item:hover,.combobox__item--selected,.combobox__item--focused{background-color:var(--color-light)}.combobox__empty{padding:var(--spacing-2) var(--spacing-3);font-size:var(--font-size-sm);color:var(--color-tertiary);text-align:center}';var aa=Object.defineProperty,na=Object.getOwnPropertyDescriptor,j=(r,e,t,o)=>{for(var i=o>1?void 0:o?na(e,t):e,s=r.length-1,n;s>=0;s--)(n=r[s])&&(i=(o?n(e,t,i):n(i))||i);return o&&i&&aa(e,t,i),i};a.Combobox=class extends E{constructor(){super(...arguments),this.inputId="combo-"+Math.random().toString(36).substring(2),this.label="",this.helper="",this.error="",this.placeholder="Seçim yapınız",this.required=!1,this.disabled=!1,this.readOnly=!1,this.variant="default",this.multiple=!1,this.filterable=!1,this.optionLabel="label",this.optionValue="value",this.emptyMessage="Sonuç yok",this.items=[],this.size="default",this.clearable=!0,this.selected=[],this.inputValue="",this._pendingValue=void 0,this.isOpen=!1,this.focusedIndex=-1,this._filteredItems=[],this._filteredGroups=[],this._handleOutsideClick=e=>{e.composedPath().includes(this)||this._closeDropdown()},this._handleKeydown=e=>{if(!(this.readOnly||this.disabled))switch(e.key){case"ArrowDown":e.preventDefault(),this.isOpen?this.focusedIndex=Math.min(this.focusedIndex+1,this._filteredItems.length-1):(this.isOpen=!0,this.focusedIndex=0),this._scrollFocusedIntoView();break;case"ArrowUp":e.preventDefault(),this.isOpen&&(this.focusedIndex=Math.max(this.focusedIndex-1,0),this._scrollFocusedIntoView());break;case"Enter":e.preventDefault(),this.isOpen?this.focusedIndex>=0&&this.focusedIndex<this._filteredItems.length&&this._selectItem(this._filteredItems[this.focusedIndex],e):(this.isOpen=!0,this.focusedIndex=0);break;case"Escape":e.preventDefault(),this._closeDropdown();break}},this._removeTag=(e,t)=>{t.stopPropagation(),this.setSelected(this.selected.filter(o=>o[this.optionValue]!==e[this.optionValue]))},this._clearSelection=e=>{e.stopPropagation(),this.setSelected([]),this.inputValue=""},this._onFilterFocus=()=>{this.readOnly||this.disabled||(this.inputValue="",this.isOpen=!0,this.focusedIndex=0)},this._onFilterInput=e=>{this.readOnly||this.disabled||(this.inputValue=e.target.value,this.focusedIndex=0,this.isOpen||(this.isOpen=!0))},this._stopPropagation=e=>e.stopPropagation(),this._onTriggerClick=()=>{this.readOnly||this.disabled||(this.filterable&&!this.multiple?this._focusFilterInput():this.isOpen=!this.isOpen)},this._onFieldClick=e=>{if(this.readOnly||this.disabled)return;const t=e.composedPath();if(!(t.some(s=>{const n=s==null?void 0:s.classList;return(n==null?void 0:n.contains("combobox__trigger"))||(n==null?void 0:n.contains("combobox__chevron"))})||t.some(s=>{var n;return(n=s==null?void 0:s.classList)==null?void 0:n.contains("combobox__dropdown")}))){if(this.filterable&&!this.multiple){this.isOpen=!0,this._focusFilterInput();return}this.isOpen=!this.isOpen}},this._onChevronClick=()=>{if(!(this.readOnly||this.disabled)){if(this.isOpen){this._closeDropdown();return}this.isOpen=!0,this.filterable&&!this.multiple&&this._focusFilterInput()}}}get value(){var e;return this.multiple?this.selected.map(t=>t[this.optionValue]):(e=this.selected[0])==null?void 0:e[this.optionValue]}set value(e){this._pendingValue=e,this._applyPendingValue(),this.requestUpdate()}_applyPendingValue(){if(this._pendingValue===void 0||!this.items.length)return;const e=this.multiple?Array.isArray(this._pendingValue)?this._pendingValue:[this._pendingValue]:[this._pendingValue];this.selected=this.items.filter(t=>e.includes(t[this.optionValue])),this._pendingValue=void 0}willUpdate(e){if(e.has("items")&&this._applyPendingValue(),e.has("items")||e.has("inputValue")||e.has("optionLabel")){const t=this.inputValue.toLocaleLowerCase(),o=l=>l.filter(c=>{var u;return String((u=c[this.optionLabel])!=null?u:"").toLocaleLowerCase().includes(t)}),i=[];let s=[];const n=()=>{const l=o(s);l.length&&i.push({label:"",items:l}),s=[]};this.items.forEach(l=>{const c=this._getGroupItems(l);if(!c){s=[...s,l];return}n();const u=o(c);u.length&&i.push({label:this._getGroupLabel(l),items:u})}),n(),this._filteredGroups=i,this._filteredItems=this._filteredGroups.flatMap(l=>l.items)}}updated(e){var t,o;if(e.has("isOpen")&&this.isOpen&&this.filterable&&this.multiple&&((o=(t=this.shadowRoot)==null?void 0:t.querySelector(".combobox__search"))==null||o.focus()),e.has("isOpen")){this.isOpen?this.updateComplete.then(()=>{this._showPopover(),this._updatePopper()}):(this._hidePopover(),this._destroyPopper());return}this.isOpen&&this._updatePopper()}connectedCallback(){super.connectedCallback(),document.addEventListener("click",this._handleOutsideClick)}disconnectedCallback(){super.disconnectedCallback(),document.removeEventListener("click",this._handleOutsideClick),this._destroyPopper()}_closeDropdown(){this.isOpen=!1,this.focusedIndex=-1,this.filterable&&(this.inputValue="")}get _filterDisplayValue(){return this.isOpen?this.inputValue:!this.multiple&&this.selected.length?String(this.selected[0][this.optionLabel]):""}_focusFilterInput(){this.updateComplete.then(()=>{var e,t;(t=(e=this.shadowRoot)==null?void 0:e.querySelector(".combobox__filter-input"))==null||t.focus()})}_scrollFocusedIntoView(){this.updateComplete.then(()=>{var t,o;const e=(t=this.shadowRoot)==null?void 0:t.querySelectorAll(".combobox__item");(o=e==null?void 0:e[this.focusedIndex])==null||o.scrollIntoView({block:"nearest"})})}_getGroupItems(e){if(Array.isArray(e.options))return e.options;if(Array.isArray(e.items))return e.items}_getGroupLabel(e){var t,o,i,s;return String((s=(i=(o=(t=e.label)!=null?t:e.title)!=null?o:e.name)!=null?i:e[this.optionLabel])!=null?s:"")}selectedItems(){return this.selected}isSelected(e){return this.selected.some(t=>t[this.optionValue]===e[this.optionValue])}_selectItem(e,t){t.stopPropagation();let o;this.multiple?o=this.isSelected(e)?this.selected.filter(i=>i[this.optionValue]!==e[this.optionValue]):[...this.selected,e]:(o=[e],this.isOpen=!1,this.filterable&&(this.inputValue="")),this.setSelected(o)}setSelected(e){var t;this.selected=e,this._pendingValue=void 0,this.dispatchEvent(new CustomEvent("selected",{detail:{selected:e},bubbles:!0,composed:!0})),this.dispatchEvent(new CustomEvent("change",{detail:{value:e},bubbles:!0,composed:!0})),this.dispatchEvent(new CustomEvent("lgsChange",{bubbles:!0,composed:!0,detail:{value:this.multiple?e.map(o=>o[this.optionValue]):(t=e[0])==null?void 0:t[this.optionValue],selected:e}}))}_renderTagList(){return p`
|
|
365
|
+
<div class="combobox__tags">
|
|
366
|
+
${this.selected.map(e=>p`
|
|
367
|
+
<logosphere-badge
|
|
368
|
+
variant="default"
|
|
369
|
+
text=${String(e[this.optionLabel])}
|
|
370
|
+
?closeable=${!this.readOnly}
|
|
371
|
+
@close=${t=>this._removeTag(e,t)}
|
|
372
|
+
></logosphere-badge>
|
|
373
|
+
`)}
|
|
374
|
+
</div>
|
|
375
|
+
`}_renderItemContent(e,t){return this.itemRenderer?this.itemRenderer(e,{index:t,selected:this.isSelected(e),focused:t===this.focusedIndex,multiple:this.multiple}):e[this.optionLabel]}_renderTriggerContent(){return this.filterable&&!this.multiple?p`
|
|
376
|
+
<input
|
|
377
|
+
class="combobox__filter-input"
|
|
378
|
+
type="text"
|
|
379
|
+
.value=${this._filterDisplayValue}
|
|
380
|
+
placeholder=${this.placeholder}
|
|
381
|
+
?disabled=${this.readOnly||this.disabled}
|
|
382
|
+
@focus=${this._onFilterFocus}
|
|
383
|
+
@input=${this._onFilterInput}
|
|
384
|
+
@keydown=${this._handleKeydown}
|
|
385
|
+
@click=${this._stopPropagation}
|
|
386
|
+
/>
|
|
387
|
+
${this.clearable&&!this.readOnly&&this.selected.length?p`
|
|
388
|
+
<button class="combobox__clear" @click=${this._clearSelection} aria-label="Clear">
|
|
389
|
+
<ui-icon name="uil-times" size="14"></ui-icon>
|
|
390
|
+
</button>
|
|
391
|
+
`:b}
|
|
392
|
+
`:this.multiple&&this.selected.length?this._renderTagList():!this.multiple&&this.selected.length?p`
|
|
393
|
+
<span class="combobox__single-value">${this.selected[0][this.optionLabel]}</span>
|
|
394
|
+
${this.clearable&&!this.readOnly?p`
|
|
395
|
+
<button class="combobox__clear" @click=${this._clearSelection} aria-label="Clear">
|
|
396
|
+
<ui-icon name="uil-times" size="14"></ui-icon>
|
|
397
|
+
</button>
|
|
398
|
+
`:b}
|
|
399
|
+
`:p`<span class="combobox__placeholder">${this.placeholder}</span>`}_renderDropdown(){let e=0;return p`
|
|
400
|
+
<div data-combobox-popper popover="manual" class="combobox__dropdown">
|
|
401
|
+
${this.filterable&&this.multiple?p`
|
|
402
|
+
<input
|
|
403
|
+
class="combobox__search"
|
|
404
|
+
type="text"
|
|
405
|
+
placeholder=${this.placeholder}
|
|
406
|
+
.value=${this.inputValue}
|
|
407
|
+
@input=${this._onFilterInput}
|
|
408
|
+
@keydown=${this._handleKeydown}
|
|
409
|
+
@click=${this._stopPropagation}
|
|
410
|
+
/>
|
|
411
|
+
`:b}
|
|
412
|
+
|
|
413
|
+
<div class="combobox__list">
|
|
414
|
+
${this._filteredItems.length===0?p`<div class="combobox__empty">${this.emptyMessage}</div>`:this._filteredGroups.map(t=>p`
|
|
415
|
+
<div class="combobox__group ${t.label?"combobox__group--titled":""}">
|
|
416
|
+
${t.label?p`<div class="combobox__group-title">${t.label}</div>`:b}
|
|
417
|
+
${t.items.map(o=>{const i=e++;return p`
|
|
418
|
+
<div
|
|
419
|
+
class="combobox__item
|
|
420
|
+
${!this.multiple&&this.isSelected(o)?"combobox__item--selected":""}
|
|
421
|
+
${i===this.focusedIndex?"combobox__item--focused":""}"
|
|
422
|
+
@click=${s=>this._selectItem(o,s)}
|
|
423
|
+
@mouseenter=${()=>{this.focusedIndex=i}}
|
|
424
|
+
>
|
|
425
|
+
${this.multiple?p`
|
|
426
|
+
<logosphere-checkbox
|
|
427
|
+
.checked=${this.isSelected(o)}
|
|
428
|
+
.value=${o[this.optionValue]}
|
|
429
|
+
@click=${this._stopPropagation}
|
|
430
|
+
></logosphere-checkbox>
|
|
431
|
+
`:b}
|
|
432
|
+
${this._renderItemContent(o,i)}
|
|
433
|
+
</div>
|
|
434
|
+
`})}
|
|
435
|
+
</div>
|
|
436
|
+
`)}
|
|
437
|
+
</div>
|
|
438
|
+
</div>
|
|
439
|
+
`}_getPopperModifiers(){return[{name:"offset",options:{offset:[0,8]}},{name:"preventOverflow",options:{padding:8}},{name:"flip",options:{padding:8,fallbackPlacements:["top-start","right-start","left-start","bottom-end","top-end"]}}]}_getPopperReferenceElement(){var t,o;const e=(o=(t=this._formFieldElement)==null?void 0:t.shadowRoot)==null?void 0:o.querySelector(".formfield__container");return e!=null?e:this._referenceElement}_updatePopper(){const e=this._getPopperReferenceElement(),t=this._dropdownElement;if(!this.isOpen||!e||!t||!this.isConnected)return;const o=Math.round(e.getBoundingClientRect().width);if(t.style.width=`${o}px`,this._popperInstance){this._popperInstance.setOptions({placement:"bottom-start",strategy:"fixed",modifiers:this._getPopperModifiers()}),this._popperInstance.update();return}this._popperInstance=Mt(e,t,{placement:"bottom-start",strategy:"fixed",modifiers:this._getPopperModifiers()})}_destroyPopper(){this._popperInstance&&(this._popperInstance.destroy(),this._popperInstance=void 0)}_showPopover(){var t;const e=this._dropdownElement;(t=e==null?void 0:e.showPopover)==null||t.call(e)}_hidePopover(){var t;const e=this._dropdownElement;try{(t=e==null?void 0:e.hidePopover)==null||t.call(e)}catch(o){}}render(){const e=["combobox__trigger",`combobox__trigger--${this.size}`,this.disabled?"combobox__trigger--disabled":"",this.readOnly?"combobox__trigger--readonly":"",!this.readOnly&&!this.disabled&&this.isOpen?"combobox__trigger--open":"",this.clearable?"":"combobox__trigger--not-clearable"].filter(Boolean).join(" ");return p`
|
|
440
|
+
<div class="combobox">
|
|
441
|
+
<logosphere-formfield
|
|
442
|
+
.label=${this.label}
|
|
443
|
+
.helper=${this.helper}
|
|
444
|
+
.error=${this.error}
|
|
445
|
+
cursor="pointer"
|
|
446
|
+
.required=${this.required}
|
|
447
|
+
.disabled=${this.disabled}
|
|
448
|
+
.readonly=${this.readOnly}
|
|
449
|
+
.size=${this.size}
|
|
450
|
+
.variant=${this.variant}
|
|
451
|
+
.forceFocused=${this.isOpen}
|
|
452
|
+
@click=${this._onFieldClick}
|
|
453
|
+
>
|
|
454
|
+
<div class="combobox__wrapper">
|
|
455
|
+
<div
|
|
456
|
+
class="${e}"
|
|
457
|
+
tabindex="${this.readOnly||this.filterable||this.disabled?-1:0}"
|
|
458
|
+
@click=${this._onTriggerClick}
|
|
459
|
+
@keydown=${this.filterable?b:this._handleKeydown}
|
|
460
|
+
>
|
|
461
|
+
${this._renderTriggerContent()}
|
|
462
|
+
</div>
|
|
463
|
+
|
|
464
|
+
${this._renderDropdown()}
|
|
465
|
+
</div>
|
|
466
|
+
<span
|
|
467
|
+
class="combobox__chevron ${this.isOpen?"combobox__chevron--open":""}"
|
|
468
|
+
@click=${this._onChevronClick}
|
|
469
|
+
>
|
|
470
|
+
<ui-icon name="uil-angle-down" size="16"></ui-icon>
|
|
471
|
+
</span>
|
|
472
|
+
</logosphere-formfield>
|
|
473
|
+
</div>
|
|
474
|
+
`}},a.Combobox.styles=[D`
|
|
475
|
+
${A(sa)}
|
|
476
|
+
`],j([d({type:String})],a.Combobox.prototype,"label",2),j([d({type:String})],a.Combobox.prototype,"helper",2),j([d({type:String})],a.Combobox.prototype,"error",2),j([d({type:String})],a.Combobox.prototype,"placeholder",2),j([d({type:Boolean})],a.Combobox.prototype,"required",2),j([d({type:Boolean})],a.Combobox.prototype,"disabled",2),j([d({type:Boolean})],a.Combobox.prototype,"readOnly",2),j([d({type:String})],a.Combobox.prototype,"variant",2),j([d({type:Boolean})],a.Combobox.prototype,"multiple",2),j([d({type:Boolean})],a.Combobox.prototype,"filterable",2),j([d({type:String})],a.Combobox.prototype,"optionLabel",2),j([d({type:String})],a.Combobox.prototype,"optionValue",2),j([d({type:String})],a.Combobox.prototype,"emptyMessage",2),j([d({type:Array})],a.Combobox.prototype,"items",2),j([d({attribute:!1})],a.Combobox.prototype,"itemRenderer",2),j([d({type:String})],a.Combobox.prototype,"size",2),j([d({type:Boolean})],a.Combobox.prototype,"clearable",2),j([m()],a.Combobox.prototype,"selected",2),j([m()],a.Combobox.prototype,"inputValue",2),j([d({attribute:!1})],a.Combobox.prototype,"value",1),j([m()],a.Combobox.prototype,"isOpen",2),j([m()],a.Combobox.prototype,"focusedIndex",2),j([F(".combobox__wrapper")],a.Combobox.prototype,"_referenceElement",2),j([F("logosphere-formfield")],a.Combobox.prototype,"_formFieldElement",2),j([F("[data-combobox-popper]")],a.Combobox.prototype,"_dropdownElement",2),a.Combobox=j([M("logosphere-combobox")],a.Combobox);var la=Object.defineProperty,se=(r,e,t,o)=>{for(var i=void 0,s=r.length-1,n;s>=0;s--)(n=r[s])&&(i=n(e,t,i)||i);return i&&la(e,t,i),i};const Do=class Do extends E{constructor(){super(...arguments),this.variant="default",this.page=1,this.pageSize=25,this.total=0,this.pageSizeOptions=[10,25,50,100],this.showPageSize=!0,this.showTotal=!0,this.disabled=!1,this.prevLabel="Önceki",this.nextLabel="Sonraki",this.pageLabel="Sayfa",this.perPageLabel="/ sayfa",this.totalLabel="kayıt",this.inputValue="1",this.goFirst=()=>{this.canGoPrev&&this.goToPage(1)},this.goPrev=()=>{this.canGoPrev&&this.goToPage(this.page-1)},this.goNext=()=>{this.canGoNext&&this.goToPage(this.page+1)},this.goLast=()=>{this.canGoNext&&this.goToPage(this.totalPages)},this.handleInputChange=e=>{const t=e.target;this.inputValue=t.value},this.handleInputBlur=()=>{const e=parseInt(this.inputValue,10);isNaN(e)?this.inputValue=String(this.page):this.goToPage(e)},this.handleInputKeydown=e=>{e.key==="Enter"&&e.target.blur()},this.handlePageSizeChange=e=>{var o,i;const t=(i=(o=e.detail)==null?void 0:o.value)==null?void 0:i[0];if(t){const s=t.value;s!==this.pageSize&&(this.pageSize=s,this.page=1,this.emitPageChange())}}}get totalPages(){return Math.max(1,Math.ceil(this.total/this.pageSize))}get canGoPrev(){return this.page>1&&!this.disabled}get canGoNext(){return this.page<this.totalPages&&!this.disabled}firstUpdated(){this.updateComboboxSelection()}updated(e){super.updated(e),e.has("page")&&(this.inputValue=String(this.page)),e.has("pageSize")&&this.updateComboboxSelection()}updateComboboxSelection(){this._combobox&&this.showPageSize&&this._combobox.setSelected(this.selectedPageSizeItem)}emitPageChange(){this.dispatchEvent(new CustomEvent("page-change",{bubbles:!0,composed:!0,detail:{page:this.page,pageSize:this.pageSize,totalPages:this.totalPages}}))}goToPage(e){const t=Math.max(1,Math.min(e,this.totalPages));t!==this.page&&(this.page=t,this.emitPageChange())}get pageSizeItems(){return this.pageSizeOptions.map(e=>({label:`${e} ${this.perPageLabel}`,value:e}))}get selectedPageSizeItem(){return[{label:`${this.pageSize} ${this.perPageLabel}`,value:this.pageSize}]}getPageNumbers(){const e=[],t=this.totalPages,o=this.page,i=1;if(t<=7)for(let s=1;s<=t;s++)e.push(s);else{e.push(1),o>3&&e.push("ellipsis");const s=Math.max(2,o-i),n=Math.min(t-1,o+i);for(let l=s;l<=n;l++)e.includes(l)||e.push(l);o<t-2&&e.push("ellipsis"),e.includes(t)||e.push(t)}return e}renderNavButtons(e=!1){const t=e?"pagination__btn--icon":"pagination__btn";return p`
|
|
477
|
+
<div class="pagination__nav-group">
|
|
478
|
+
<button
|
|
479
|
+
type="button"
|
|
480
|
+
class="${t}"
|
|
481
|
+
?disabled=${!this.canGoPrev}
|
|
482
|
+
@click=${this.goFirst}
|
|
483
|
+
aria-label="İlk sayfa"
|
|
484
|
+
>
|
|
485
|
+
<ui-icon name="uil-angle-double-left" size="16"></ui-icon>
|
|
486
|
+
</button>
|
|
487
|
+
<button
|
|
488
|
+
type="button"
|
|
489
|
+
class="${t}"
|
|
490
|
+
?disabled=${!this.canGoPrev}
|
|
491
|
+
@click=${this.goPrev}
|
|
492
|
+
aria-label="Önceki sayfa"
|
|
493
|
+
>
|
|
494
|
+
<ui-icon name="uil-angle-left" size="16"></ui-icon>
|
|
495
|
+
</button>
|
|
496
|
+
</div>
|
|
497
|
+
`}renderNavButtonsAfter(e=!1){const t=e?"pagination__btn--icon":"pagination__btn";return p`
|
|
498
|
+
<div class="pagination__nav-group">
|
|
499
|
+
<button
|
|
500
|
+
type="button"
|
|
501
|
+
class="${t}"
|
|
502
|
+
?disabled=${!this.canGoNext}
|
|
503
|
+
@click=${this.goNext}
|
|
504
|
+
aria-label="Sonraki sayfa"
|
|
505
|
+
>
|
|
506
|
+
<ui-icon name="uil-angle-right" size="16"></ui-icon>
|
|
507
|
+
</button>
|
|
508
|
+
<button
|
|
509
|
+
type="button"
|
|
510
|
+
class="${t}"
|
|
511
|
+
?disabled=${!this.canGoNext}
|
|
512
|
+
@click=${this.goLast}
|
|
513
|
+
aria-label="Son sayfa"
|
|
514
|
+
>
|
|
515
|
+
<ui-icon name="uil-angle-double-right" size="16"></ui-icon>
|
|
516
|
+
</button>
|
|
517
|
+
</div>
|
|
518
|
+
`}renderPageInput(){return p`
|
|
519
|
+
<div class="pagination__input-container">
|
|
520
|
+
<input
|
|
521
|
+
type="number"
|
|
522
|
+
class="pagination__input"
|
|
523
|
+
.value=${qt(this.inputValue)}
|
|
524
|
+
min="1"
|
|
525
|
+
max=${this.totalPages}
|
|
526
|
+
?disabled=${this.disabled}
|
|
527
|
+
@input=${this.handleInputChange}
|
|
528
|
+
@blur=${this.handleInputBlur}
|
|
529
|
+
@keydown=${this.handleInputKeydown}
|
|
530
|
+
aria-label="Sayfa numarası"
|
|
531
|
+
/>
|
|
532
|
+
</div>
|
|
533
|
+
<span class="pagination__separator">/ ${this.totalPages}</span>
|
|
534
|
+
`}renderPrevNextButtons(){return p`
|
|
535
|
+
<button
|
|
536
|
+
type="button"
|
|
537
|
+
class="pagination__btn--text"
|
|
538
|
+
?disabled=${!this.canGoPrev}
|
|
539
|
+
@click=${this.goPrev}
|
|
540
|
+
>
|
|
541
|
+
<ui-icon name="uil-angle-left" size="16"></ui-icon>
|
|
542
|
+
${this.prevLabel}
|
|
543
|
+
</button>
|
|
544
|
+
<button
|
|
545
|
+
type="button"
|
|
546
|
+
class="pagination__btn--text"
|
|
547
|
+
?disabled=${!this.canGoNext}
|
|
548
|
+
@click=${this.goNext}
|
|
549
|
+
>
|
|
550
|
+
${this.nextLabel}
|
|
551
|
+
<ui-icon name="uil-angle-right" size="16"></ui-icon>
|
|
552
|
+
</button>
|
|
553
|
+
`}renderPageInfo(){return p`
|
|
554
|
+
<div class="pagination__page-info">
|
|
555
|
+
<span class="pagination__page-info-text">${this.pageLabel} ${this.page}</span>
|
|
556
|
+
<span class="pagination__page-info-separator">/</span>
|
|
557
|
+
<span class="pagination__page-info-text">${this.totalPages}</span>
|
|
558
|
+
</div>
|
|
559
|
+
`}renderNumberButtons(){const e=this.getPageNumbers();return p`
|
|
560
|
+
${e.map((t,o)=>t==="ellipsis"?p`
|
|
561
|
+
<span
|
|
562
|
+
class="pagination__btn--number pagination__btn--ellipsis"
|
|
563
|
+
key="ellipsis-${o}"
|
|
564
|
+
>...</span>
|
|
565
|
+
`:p`
|
|
566
|
+
<button
|
|
567
|
+
type="button"
|
|
568
|
+
class="pagination__btn--number ${t===this.page?"pagination__btn--active":""}"
|
|
569
|
+
?disabled=${this.disabled}
|
|
570
|
+
@click=${()=>this.goToPage(t)}
|
|
571
|
+
aria-label="Sayfa ${t}"
|
|
572
|
+
aria-current=${t===this.page?"page":b}
|
|
573
|
+
>
|
|
574
|
+
${t}
|
|
575
|
+
</button>
|
|
576
|
+
`)}
|
|
577
|
+
`}renderPageSizeDropdown(){return this.showPageSize?p`
|
|
578
|
+
<div class="pagination__page-size">
|
|
579
|
+
<logosphere-combobox
|
|
580
|
+
.items=${this.pageSizeItems}
|
|
581
|
+
.disabled=${this.disabled}
|
|
582
|
+
.clearable=${!1}
|
|
583
|
+
optionLabel="label"
|
|
584
|
+
optionValue="value"
|
|
585
|
+
placeholder=""
|
|
586
|
+
@change=${this.handlePageSizeChange}
|
|
587
|
+
></logosphere-combobox>
|
|
588
|
+
</div>
|
|
589
|
+
`:b}renderTotalInfo(){return this.showTotal?p`
|
|
590
|
+
<div class="pagination__total">
|
|
591
|
+
<span class="pagination__total-separator">/</span>
|
|
592
|
+
<span class="pagination__total-text">${this.total} ${this.totalLabel}</span>
|
|
593
|
+
</div>
|
|
594
|
+
`:b}renderDefault(){return p`
|
|
595
|
+
<div class="pagination__nav">
|
|
596
|
+
${this.renderNavButtons()}
|
|
597
|
+
${this.renderPageInput()}
|
|
598
|
+
${this.renderNavButtonsAfter()}
|
|
599
|
+
</div>
|
|
600
|
+
<div class="pagination__info">
|
|
601
|
+
${this.renderPageSizeDropdown()}
|
|
602
|
+
${this.renderTotalInfo()}
|
|
603
|
+
</div>
|
|
604
|
+
`}renderPrevNext(){return p`
|
|
605
|
+
<div class="pagination__nav" style="gap: 8px;">
|
|
606
|
+
${this.renderPrevNextButtons()}
|
|
607
|
+
</div>
|
|
608
|
+
<div class="pagination__info">
|
|
609
|
+
${this.renderPageInfo()}
|
|
610
|
+
</div>
|
|
611
|
+
`}renderPrevNextInverted(){return p`
|
|
612
|
+
<div class="pagination__info">
|
|
613
|
+
${this.renderPageInfo()}
|
|
614
|
+
</div>
|
|
615
|
+
<div class="pagination__nav" style="gap: 8px;">
|
|
616
|
+
${this.renderPrevNextButtons()}
|
|
617
|
+
</div>
|
|
618
|
+
`}renderPrevNextOnly(){return p`
|
|
619
|
+
<div class="pagination__nav" style="gap: 8px; margin-left: auto;">
|
|
620
|
+
${this.renderPrevNextButtons()}
|
|
621
|
+
</div>
|
|
622
|
+
`}renderNumberButtonsVariant(){return p`
|
|
623
|
+
<div class="pagination__nav">
|
|
624
|
+
${this.renderNavButtons(!0)}
|
|
625
|
+
${this.renderNumberButtons()}
|
|
626
|
+
${this.renderNavButtonsAfter(!0)}
|
|
627
|
+
</div>
|
|
628
|
+
<div class="pagination__info">
|
|
629
|
+
${this.renderPageSizeDropdown()}
|
|
630
|
+
${this.renderTotalInfo()}
|
|
631
|
+
</div>
|
|
632
|
+
`}render(){const e=this.variant==="prev-next-only"?"pagination--justify-end":"";return p`
|
|
633
|
+
<nav
|
|
634
|
+
class="pagination ${e}"
|
|
635
|
+
role="navigation"
|
|
636
|
+
aria-label="Sayfalama"
|
|
637
|
+
>
|
|
638
|
+
${this.variant==="default"?this.renderDefault():b}
|
|
639
|
+
${this.variant==="prev-next"?this.renderPrevNext():b}
|
|
640
|
+
${this.variant==="prev-next-inverted"?this.renderPrevNextInverted():b}
|
|
641
|
+
${this.variant==="prev-next-only"?this.renderPrevNextOnly():b}
|
|
642
|
+
${this.variant==="number-buttons"?this.renderNumberButtonsVariant():b}
|
|
643
|
+
</nav>
|
|
644
|
+
`}};Do.styles=[D`${A(Qr)}`];let W=Do;se([d({type:String})],W.prototype,"variant"),se([d({type:Number})],W.prototype,"page"),se([d({type:Number})],W.prototype,"pageSize"),se([d({type:Number})],W.prototype,"total"),se([d({type:Array})],W.prototype,"pageSizeOptions"),se([d({type:Boolean})],W.prototype,"showPageSize"),se([d({type:Boolean})],W.prototype,"showTotal"),se([d({type:Boolean})],W.prototype,"disabled"),se([d({type:String})],W.prototype,"prevLabel"),se([d({type:String})],W.prototype,"nextLabel"),se([d({type:String})],W.prototype,"pageLabel"),se([d({type:String})],W.prototype,"perPageLabel"),se([d({type:String})],W.prototype,"totalLabel"),se([m()],W.prototype,"inputValue"),se([F("logosphere-combobox")],W.prototype,"_combobox"),customElements.get("logosphere-pagination")||customElements.define("logosphere-pagination",W);const da=':host{display:inline-block}.popover__wrapper{position:relative;display:inline-block;font-family:var(--font-family-base)}.popover__trigger{display:inline-flex}.popover__panel{position:relative;overflow:visible;z-index:var(--z-index-popover);min-width:240px;border-radius:var(--radius-md);border:1px solid var(--color-border);background-color:var(--color-body-bg);box-shadow:var(--shadow-md)}.popover__content{position:relative;z-index:1;background-color:var(--color-body-bg);border-radius:var(--radius-md);overflow:hidden}.popover__content:before{content:"";position:absolute;top:0;left:0;right:0;height:8px;background-color:var(--color-body-bg);border-radius:var(--radius-md) var(--radius-md) 0 0;z-index:1;pointer-events:none}.popover__content>*{position:relative;z-index:2}.popover__title{padding:10px var(--spacing-3);font-size:var(--font-size-sm);font-weight:var(--font-weight-semibold);color:var(--color-body-text)}.popover__body{padding:var(--spacing-3);font-size:var(--font-size-sm);color:var(--color-secondary)}.popover__body--with-border{border-top:1px solid var(--color-border)}.popper-arrow{position:absolute;width:12px;height:12px;pointer-events:none;z-index:0}.popper-arrow:before{content:"";position:absolute;top:0;right:0;bottom:0;left:0;background:var(--color-border);transform:rotate(45deg)}.popper-arrow:after{content:"";position:absolute;top:1px;right:1px;bottom:1px;left:1px;background:var(--color-body-bg);transform:rotate(45deg)}[data-popper]{position:relative;overflow:visible}[data-popper-placement^=bottom]>.popper-arrow{top:-6px;left:50%;transform:translate(-50%,-50%)}[data-popper-placement^=top]>.popper-arrow{bottom:-6px;left:50%;transform:translate(-50%,50%)}[data-popper-placement^=left]>.popper-arrow{right:-6px;top:50%;transform:translate(50%,-50%)}[data-popper-placement^=right]>.popper-arrow{left:-6px;top:50%;transform:translate(-50%,-50%)}';var ca=Object.defineProperty,pa=Object.getOwnPropertyDescriptor,fe=(r,e,t,o)=>{for(var i=o>1?void 0:o?pa(e,t):e,s=r.length-1,n;s>=0;s--)(n=r[s])&&(i=(o?n(e,t,i):n(i))||i);return o&&i&&ca(e,t,i),i};a.Popover=class extends E{constructor(){super(...arguments),this.title="",this.trigger="click",this.placement="bottom",this.offset=8,this.open=!1,this.closeOnOutsideClick=!0,this.noArrow=!1,this.handleDocumentClick=e=>{!this.open||!this.closeOnOutsideClick||e.composedPath().includes(this)||this.setOpen(!1)},this.toggle=e=>{(this.trigger==="click"||this.trigger==="both")&&(e==null||e.stopPropagation(),this.setOpen(!this.open))},this.handleMouseEnter=()=>{(this.trigger==="hover"||this.trigger==="both")&&this.setOpen(!0)},this.handleMouseLeave=()=>{(this.trigger==="hover"||this.trigger==="both")&&this.setOpen(!1)}}connectedCallback(){super.connectedCallback(),document.addEventListener("click",this.handleDocumentClick,{capture:!0})}disconnectedCallback(){super.disconnectedCallback(),document.removeEventListener("click",this.handleDocumentClick,{capture:!0}),this.destroyPopper()}updated(e){super.updated(e);const t=e.has("placement"),o=e.has("open")&&this.open;if(e.has("open")&&!this.open){this.destroyPopper();return}(o||t)&&this.open&&this.updatePopper()}setOpen(e){this.open!==e&&(this.open=e,this.dispatchEvent(new CustomEvent(e?"popover-open":"popover-close",{bubbles:!0,composed:!0})))}updatePopper(){if(!this.isConnected||!this.open)return;const e=this.triggerElement,t=this.popperElement;if(!(!e||!t)){if(this.popperInstance){this.popperInstance.setOptions({placement:this.placement,modifiers:this.getPopperModifiers(),strategy:"fixed"}),this.popperInstance.update();return}this.popperInstance=Mt(e,t,{placement:this.placement,strategy:"fixed",modifiers:this.getPopperModifiers()})}}getPopperModifiers(){const e=[{name:"offset",options:{offset:[0,this.offset]}},{name:"preventOverflow",options:{padding:8}},{name:"flip",options:{padding:8}}];return!this.noArrow&&this.popperArrowElement&&e.push({name:"arrow",options:{element:this.popperArrowElement,padding:8}}),e}destroyPopper(){this.popperInstance&&(this.popperInstance.destroy(),this.popperInstance=void 0)}render(){const e=!!this.title;return p`
|
|
204
645
|
<div
|
|
205
646
|
class="popover__wrapper"
|
|
206
|
-
@mouseenter
|
|
207
|
-
@mouseleave
|
|
647
|
+
@mouseenter=${this.handleMouseEnter}
|
|
648
|
+
@mouseleave=${this.handleMouseLeave}
|
|
208
649
|
>
|
|
209
|
-
<div class="popover__trigger" part="trigger" @click
|
|
650
|
+
<div class="popover__trigger" part="trigger" @click=${this.toggle}>
|
|
210
651
|
<slot name="trigger"></slot>
|
|
211
652
|
</div>
|
|
212
653
|
|
|
213
|
-
|
|
214
|
-
</div>
|
|
215
|
-
`])),this.handleMouseEnter,this.handleMouseLeave,this.toggle,this.open?m(Qn||(Qn=b([`
|
|
654
|
+
${this.open?p`
|
|
216
655
|
<div
|
|
217
656
|
data-popper
|
|
218
657
|
class="popover__panel"
|
|
219
658
|
role="dialog"
|
|
220
|
-
aria-hidden
|
|
659
|
+
aria-hidden=${this.open?"false":"true"}
|
|
221
660
|
>
|
|
222
|
-
|
|
661
|
+
${this.noArrow?null:p`<div data-popper-arrow class="popper-arrow"></div>`}
|
|
223
662
|
<div class="popover__content">
|
|
224
|
-
|
|
225
|
-
|
|
663
|
+
${this.title?p`
|
|
664
|
+
<div class="popover__title">${this.title}</div>
|
|
665
|
+
`:null}
|
|
666
|
+
<div class="popover__body ${e?"popover__body--with-border":""}">
|
|
226
667
|
<slot></slot>
|
|
227
668
|
</div>
|
|
228
669
|
</div>
|
|
229
670
|
</div>
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
671
|
+
`:null}
|
|
672
|
+
</div>
|
|
673
|
+
`}},a.Popover.styles=[D`${A(da)}`],fe([d({type:String})],a.Popover.prototype,"title",2),fe([d({type:String})],a.Popover.prototype,"trigger",2),fe([d({type:String})],a.Popover.prototype,"placement",2),fe([d({type:Number})],a.Popover.prototype,"offset",2),fe([d({type:Boolean,reflect:!0})],a.Popover.prototype,"open",2),fe([d({type:Boolean})],a.Popover.prototype,"closeOnOutsideClick",2),fe([d({type:Boolean})],a.Popover.prototype,"noArrow",2),fe([F('[part="trigger"]')],a.Popover.prototype,"triggerElement",2),fe([F("[data-popper]")],a.Popover.prototype,"popperElement",2),fe([F("[data-popper-arrow]")],a.Popover.prototype,"popperArrowElement",2),a.Popover=fe([M("logosphere-popover")],a.Popover);const ha=":host{display:block}.stepper{display:flex;font-family:var(--font-family-base)}.stepper--horizontal{flex-direction:row;align-items:flex-start}.stepper--horizontal .stepper__step{display:flex;flex-direction:column;align-items:center;flex:1;position:relative;min-width:0}.stepper--horizontal .stepper__step-header{display:flex;flex-direction:column;align-items:center;width:100%;position:relative}.stepper--horizontal .stepper__connector{position:absolute;top:10px;left:calc(50% + 18px);right:calc(-50% + 18px);height:2px;z-index:0}.stepper--horizontal .stepper__labels{display:flex;flex-direction:column;align-items:center;text-align:center;margin-top:var(--spacing-2);padding:0 var(--spacing-1)}.stepper--vertical{flex-direction:column;align-items:stretch}.stepper--vertical .stepper__step{display:flex;flex-direction:column;position:relative}.stepper--vertical .stepper__step-header{display:flex;flex-direction:row;align-items:flex-start;gap:var(--spacing-3)}.stepper--vertical .stepper__labels{display:flex;flex-direction:column;padding-top:var(--spacing-1);padding-bottom:var(--spacing-4)}.stepper--vertical .stepper__connector{position:absolute;top:28px;left:9px;width:2px;bottom:0}.stepper__indicator{width:20px;height:20px;border-radius:var(--radius-full);display:flex;align-items:center;justify-content:center;flex-shrink:0;position:relative;z-index:1;transition:background-color var(--transition-speed-base) var(--transition-timing),border-color var(--transition-speed-base) var(--transition-timing)}.stepper__indicator-number{font-size:var(--font-size-xs);font-weight:var(--font-weight-semibold);line-height:1}.stepper__indicator-dot{width:10px;height:10px;border-radius:var(--radius-full);background-color:var(--color-primary);flex-shrink:0}.stepper__indicator--completed{background-color:var(--color-primary);border:2px solid var(--color-primary);color:#fff}.stepper__indicator--current{background-color:var(--color-body-bg);border:2px solid var(--color-primary)}.stepper__indicator--upcoming{background-color:var(--color-body-bg);border:2px solid var(--color-border);color:var(--color-tertiary)}.stepper__indicator--disabled{background-color:var(--color-light-bg);border:2px solid var(--color-secondary-disabled);color:var(--color-secondary-disabled)}.stepper__connector--completed{background-color:var(--color-primary)}.stepper__connector--upcoming{background-color:var(--color-border)}.stepper__title{font-size:var(--font-size-sm);font-weight:var(--font-weight-medium);line-height:var(--line-height-tight);color:var(--color-body-color);white-space:nowrap}.stepper__description{font-size:var(--font-size-xs);font-weight:var(--font-weight-regular);line-height:var(--line-height-normal);color:var(--color-tertiary);margin-top:var(--spacing-0-5);white-space:normal}.stepper__step--current .stepper__title{color:var(--color-primary);font-weight:var(--font-weight-semibold)}.stepper__step--upcoming .stepper__title{color:var(--color-tertiary)}.stepper__step--disabled .stepper__title,.stepper__step--disabled .stepper__description{color:var(--color-secondary-disabled)}.stepper__step--clickable{cursor:pointer}.stepper__step--clickable:hover .stepper__indicator--upcoming,.stepper__step--clickable:hover .stepper__indicator--completed{box-shadow:0 0 0 4px var(--color-primary-bg-subtle)}.stepper__step--clickable:focus-visible{outline:none}.stepper__step--clickable:focus-visible .stepper__indicator{box-shadow:0 0 0 4px var(--color-primary-bg-subtle)}";var ua=Object.defineProperty,ga=Object.getOwnPropertyDescriptor,Ot=(r,e,t,o)=>{for(var i=o>1?void 0:o?ga(e,t):e,s=r.length-1,n;s>=0;s--)(n=r[s])&&(i=(o?n(e,t,i):n(i))||i);return o&&i&&ua(e,t,i),i};a.Stepper=class extends E{constructor(){super(...arguments),this.steps=[],this.activeStep=0,this.orientation="horizontal",this.clickable=!1}_resolveState(e,t){return e.state?e.state:e.disabled?"disabled":t<this.activeStep?"completed":t===this.activeStep?"current":"upcoming"}_onStepClick(e,t){!this.clickable||t==="disabled"||t==="upcoming"||(this.activeStep=e,this.dispatchEvent(new CustomEvent("step-change",{detail:{index:e,step:this.steps[e]},bubbles:!0,composed:!0})))}_onStepKeydown(e,t,o){(e.key==="Enter"||e.key===" ")&&(e.preventDefault(),this._onStepClick(t,o)),(e.key==="ArrowRight"||e.key==="ArrowDown")&&(e.preventDefault(),this._focusStep(t+1)),(e.key==="ArrowLeft"||e.key==="ArrowUp")&&(e.preventDefault(),this._focusStep(t-1))}_focusStep(e){var i;const t=Math.max(0,Math.min(this.steps.length-1,e)),o=(i=this.shadowRoot)==null?void 0:i.querySelector(`[data-step-index="${t}"]`);o==null||o.focus()}_renderIndicator(e,t){let o;return e==="completed"?o=p`<ui-icon name="uil-check" size="12"></ui-icon>`:e==="current"?o=p`<span class="stepper__indicator-dot"></span>`:o=p`<span class="stepper__indicator-number">${t+1}</span>`,p`
|
|
674
|
+
<div
|
|
675
|
+
class="stepper__indicator stepper__indicator--${e}"
|
|
676
|
+
aria-hidden="true"
|
|
677
|
+
>
|
|
678
|
+
${o}
|
|
679
|
+
</div>
|
|
680
|
+
`}_renderConnector(e,t){return t?b:p`
|
|
681
|
+
<div
|
|
682
|
+
class="stepper__connector stepper__connector--${e==="completed"?"completed":"upcoming"}"
|
|
683
|
+
aria-hidden="true"
|
|
684
|
+
></div>
|
|
685
|
+
`}_renderStep(e,t){const o=this._resolveState(e,t),i=t===this.steps.length-1,s=this.clickable&&(o==="completed"||o==="current");return p`
|
|
686
|
+
<div
|
|
687
|
+
class="stepper__step stepper__step--${o} ${s?"stepper__step--clickable":""}"
|
|
688
|
+
data-step-index=${t}
|
|
689
|
+
role=${this.clickable?"button":"listitem"}
|
|
690
|
+
tabindex=${s?"0":"-1"}
|
|
691
|
+
aria-current=${o==="current"?"step":b}
|
|
692
|
+
aria-disabled=${o==="disabled"?"true":b}
|
|
693
|
+
aria-label="${e.title}${e.description?`, ${e.description}`:""}, ${o}"
|
|
694
|
+
@click=${()=>this._onStepClick(t,o)}
|
|
695
|
+
@keydown=${n=>this._onStepKeydown(n,t,o)}
|
|
696
|
+
>
|
|
697
|
+
<div class="stepper__step-header">
|
|
698
|
+
${this._renderIndicator(o,t)}
|
|
699
|
+
${this.orientation==="vertical"?p`
|
|
700
|
+
<div class="stepper__labels">
|
|
701
|
+
<span class="stepper__title">${e.title}</span>
|
|
702
|
+
${e.description?p`<span class="stepper__description">${e.description}</span>`:b}
|
|
703
|
+
</div>
|
|
704
|
+
`:b}
|
|
705
|
+
</div>
|
|
706
|
+
|
|
707
|
+
${this.orientation==="horizontal"?p`
|
|
708
|
+
<div class="stepper__labels">
|
|
709
|
+
<span class="stepper__title">${e.title}</span>
|
|
710
|
+
${e.description?p`<span class="stepper__description">${e.description}</span>`:b}
|
|
711
|
+
</div>
|
|
712
|
+
`:b}
|
|
713
|
+
|
|
714
|
+
${this._renderConnector(o,i)}
|
|
715
|
+
</div>
|
|
716
|
+
`}render(){return p`
|
|
717
|
+
<div
|
|
718
|
+
class="stepper stepper--${this.orientation}"
|
|
719
|
+
role="list"
|
|
720
|
+
aria-label="Progress steps"
|
|
721
|
+
>
|
|
722
|
+
${this.steps.map((e,t)=>this._renderStep(e,t))}
|
|
723
|
+
</div>
|
|
724
|
+
`}},a.Stepper.styles=[D`${A(ha)}`],Ot([d({attribute:!1})],a.Stepper.prototype,"steps",2),Ot([d({type:Number})],a.Stepper.prototype,"activeStep",2),Ot([d({type:String})],a.Stepper.prototype,"orientation",2),Ot([d({type:Boolean})],a.Stepper.prototype,"clickable",2),a.Stepper=Ot([M("logosphere-stepper")],a.Stepper);const ba=":host{display:inline-block;position:relative}.split-button{display:inline-flex;align-items:stretch;gap:1px;font-family:var(--font-family-base);border-radius:var(--radius-base);overflow:hidden}.split-button__action,.split-button__dropdown{display:inline-flex;align-items:center;justify-content:center;border:none;cursor:pointer;font-family:inherit;font-weight:var(--font-weight-semibold);font-size:var(--font-size-sm);line-height:1.25rem;letter-spacing:-.14px;white-space:nowrap;-webkit-user-select:none;user-select:none;transition:background-color var(--transition-speed-base) var(--transition-timing);outline:none}.split-button__action:focus-visible,.split-button__dropdown:focus-visible{outline:2px solid var(--color-primary);outline-offset:2px;position:relative;z-index:1}.split-button__action:disabled,.split-button__dropdown:disabled{cursor:not-allowed;pointer-events:none}.split-button__action{gap:var(--spacing-1)}.split-button__chevron{transition:transform var(--transition-speed-base) var(--transition-timing);display:inline-flex}.split-button__chevron--open{transform:rotate(180deg)}.split-button--sm .split-button__action{padding:var(--spacing-0-5) var(--spacing-2)}.split-button--sm .split-button__dropdown{padding:var(--spacing-0-5) var(--spacing-1-5)}.split-button--md .split-button__action{padding:var(--spacing-1-5) var(--spacing-3)}.split-button--md .split-button__dropdown{padding:var(--spacing-1-5) var(--spacing-2)}.split-button--lg .split-button__action{padding:var(--spacing-2-5) var(--spacing-3)}.split-button--lg .split-button__dropdown{padding:var(--spacing-2-5) var(--spacing-2)}.split-button{background-color:#fff6}.split-button--primary .split-button__action,.split-button--primary .split-button__dropdown{background-color:var(--color-primary);color:#fff}.split-button--primary .split-button__action:hover:not(:disabled),.split-button--primary .split-button__dropdown:hover:not(:disabled){background-color:var(--color-primary-hover)}.split-button--primary .split-button__action:active:not(:disabled),.split-button--primary .split-button__dropdown:active:not(:disabled){background-color:var(--color-primary-active)}.split-button--primary.split-button--disabled,.split-button--primary .split-button__action:disabled,.split-button--primary .split-button__dropdown:disabled{background-color:var(--color-primary-disabled)}.split-button--primary.split-button--disabled .split-button__action,.split-button--primary.split-button--disabled .split-button__dropdown{background-color:var(--color-primary-disabled)}.split-button--secondary .split-button__action,.split-button--secondary .split-button__dropdown{background-color:var(--color-secondary);color:#fff}.split-button--secondary .split-button__action:hover:not(:disabled),.split-button--secondary .split-button__dropdown:hover:not(:disabled){background-color:var(--color-secondary-hover)}.split-button--secondary .split-button__action:active:not(:disabled),.split-button--secondary .split-button__dropdown:active:not(:disabled){background-color:var(--color-secondary-active)}.split-button--secondary.split-button--disabled .split-button__action,.split-button--secondary.split-button--disabled .split-button__dropdown,.split-button--secondary .split-button__action:disabled,.split-button--secondary .split-button__dropdown:disabled{background-color:var(--color-secondary-disabled)}.split-button--success .split-button__action,.split-button--success .split-button__dropdown{background-color:var(--color-success);color:#fff}.split-button--success .split-button__action:hover:not(:disabled),.split-button--success .split-button__dropdown:hover:not(:disabled){background-color:var(--color-success-hover)}.split-button--success .split-button__action:active:not(:disabled),.split-button--success .split-button__dropdown:active:not(:disabled){background-color:var(--color-success-active)}.split-button--success.split-button--disabled .split-button__action,.split-button--success.split-button--disabled .split-button__dropdown,.split-button--success .split-button__action:disabled,.split-button--success .split-button__dropdown:disabled{background-color:var(--color-success-disabled)}.split-button--danger .split-button__action,.split-button--danger .split-button__dropdown{background-color:var(--color-danger);color:#fff}.split-button--danger .split-button__action:hover:not(:disabled),.split-button--danger .split-button__dropdown:hover:not(:disabled){background-color:var(--color-danger-hover)}.split-button--danger .split-button__action:active:not(:disabled),.split-button--danger .split-button__dropdown:active:not(:disabled){background-color:var(--color-danger-active)}.split-button--danger.split-button--disabled .split-button__action,.split-button--danger.split-button--disabled .split-button__dropdown,.split-button--danger .split-button__action:disabled,.split-button--danger .split-button__dropdown:disabled{background-color:var(--color-danger-disabled)}.split-button--info .split-button__action,.split-button--info .split-button__dropdown{background-color:var(--color-info);color:#fff}.split-button--info .split-button__action:hover:not(:disabled),.split-button--info .split-button__dropdown:hover:not(:disabled){background-color:var(--color-info-hover)}.split-button--info .split-button__action:active:not(:disabled),.split-button--info .split-button__dropdown:active:not(:disabled){background-color:var(--color-info-active)}.split-button--info.split-button--disabled .split-button__action,.split-button--info.split-button--disabled .split-button__dropdown,.split-button--info .split-button__action:disabled,.split-button--info .split-button__dropdown:disabled{background-color:var(--color-info-disabled)}.split-button--warning .split-button__action,.split-button--warning .split-button__dropdown{background-color:var(--color-warning);color:var(--color-warning-emphasis)}.split-button--warning .split-button__action:hover:not(:disabled),.split-button--warning .split-button__dropdown:hover:not(:disabled){background-color:var(--color-warning-hover)}.split-button--warning .split-button__action:active:not(:disabled),.split-button--warning .split-button__dropdown:active:not(:disabled){background-color:var(--color-warning-active)}.split-button--warning.split-button--disabled .split-button__action,.split-button--warning.split-button--disabled .split-button__dropdown,.split-button--warning .split-button__action:disabled,.split-button--warning .split-button__dropdown:disabled{background-color:var(--color-warning-disabled)}.split-button__panel{position:fixed;z-index:var(--z-index-dropdown);min-width:160px;background-color:var(--color-body-bg);border:1px solid var(--color-border);border-radius:var(--radius-base);box-shadow:var(--shadow-lg);padding:var(--spacing-1) 0;outline:none}.split-button__panel-item{display:flex;align-items:center;gap:var(--spacing-2);width:100%;padding:var(--spacing-2) var(--spacing-3);background:none;border:none;cursor:pointer;font-family:var(--font-family-base);font-size:var(--font-size-sm);font-weight:var(--font-weight-regular);color:var(--color-body-color);text-align:left;white-space:nowrap;transition:background-color var(--transition-speed-fast) var(--transition-timing);box-sizing:border-box}.split-button__panel-item:hover:not(:disabled){background-color:var(--color-body-bg-hover)}.split-button__panel-item:active:not(:disabled){background-color:var(--color-body-bg-active)}.split-button__panel-item--disabled,.split-button__panel-item:disabled{color:var(--color-secondary-disabled);cursor:not-allowed;pointer-events:none}.split-button__panel-divider{height:1px;background-color:var(--color-border);margin:var(--spacing-1) 0}";var fa=Object.defineProperty,_a=Object.getOwnPropertyDescriptor,ye=(r,e,t,o)=>{for(var i=o>1?void 0:o?_a(e,t):e,s=r.length-1,n;s>=0;s--)(n=r[s])&&(i=(o?n(e,t,i):n(i))||i);return o&&i&&fa(e,t,i),i};a.SplitButton=class extends E{constructor(){super(...arguments),this.label="Button",this.size="md",this.theme="primary",this.disabled=!1,this.dropdownDisabled=!1,this.items=[],this._open=!1,this._onDocClick=e=>{this._open&&(e.composedPath().includes(this)||this._setOpen(!1))},this._onDocKeydown=e=>{e.key==="Escape"&&this._open&&this._setOpen(!1)}}connectedCallback(){super.connectedCallback(),document.addEventListener("click",this._onDocClick,{capture:!0}),document.addEventListener("keydown",this._onDocKeydown)}disconnectedCallback(){super.disconnectedCallback(),document.removeEventListener("click",this._onDocClick,{capture:!0}),document.removeEventListener("keydown",this._onDocKeydown),this._destroyPopper()}updated(e){super.updated(e),e.has("_open")&&(this._open?this._initPopper():this._destroyPopper())}_initPopper(){!this._dropdownBtn||!this._panel||(this._popper=Mt(this._dropdownBtn,this._panel,{placement:"bottom-end",strategy:"fixed",modifiers:[{name:"offset",options:{offset:[0,4]}},{name:"preventOverflow",options:{padding:8}},{name:"flip",options:{padding:8}}]}))}_destroyPopper(){var e;(e=this._popper)==null||e.destroy(),this._popper=void 0}_setOpen(e){this._open!==e&&(this._open=e,this.dispatchEvent(new CustomEvent(e?"dropdown-open":"dropdown-close",{bubbles:!0,composed:!0})))}_onActionClick(e){e.stopPropagation(),!this.disabled&&this.dispatchEvent(new CustomEvent("action",{bubbles:!0,composed:!0}))}_onDropdownClick(e){e.stopPropagation(),!(this.disabled||this.dropdownDisabled)&&this._setOpen(!this._open)}_onItemClick(e){e.disabled||(this.dispatchEvent(new CustomEvent("item-select",{detail:{value:e.value,item:e},bubbles:!0,composed:!0})),this._setOpen(!1))}_onKeydown(e,t){(e.key==="Enter"||e.key===" ")&&(e.preventDefault(),t==="action"?this._onActionClick(e):this._onDropdownClick(e))}_renderPanel(){if(!this._open)return b;const e=this.items.length>0;return p`
|
|
725
|
+
<div
|
|
726
|
+
class="split-button__panel"
|
|
727
|
+
role="menu"
|
|
728
|
+
aria-label="${this.label} options"
|
|
729
|
+
>
|
|
730
|
+
${e?this.items.map(t=>p`
|
|
731
|
+
${t.divider?p`<div class="split-button__panel-divider" role="separator"></div>`:b}
|
|
732
|
+
<button
|
|
733
|
+
class="split-button__panel-item ${t.disabled?"split-button__panel-item--disabled":""}"
|
|
734
|
+
role="menuitem"
|
|
735
|
+
?disabled=${t.disabled}
|
|
736
|
+
@click=${()=>this._onItemClick(t)}
|
|
737
|
+
>
|
|
738
|
+
${t.icon?p`<ui-icon name=${t.icon} size="16"></ui-icon>`:b}
|
|
739
|
+
<span>${t.label}</span>
|
|
740
|
+
</button>
|
|
741
|
+
`):p`<slot name="dropdown"></slot>`}
|
|
742
|
+
</div>
|
|
743
|
+
`}render(){const e=this.disabled,t=this.disabled||this.dropdownDisabled;return p`
|
|
744
|
+
<div
|
|
745
|
+
class="split-button split-button--${this.size} split-button--${this.theme}
|
|
746
|
+
${this.disabled?"split-button--disabled":""}
|
|
747
|
+
${this._open?"split-button--open":""}"
|
|
748
|
+
role="group"
|
|
749
|
+
>
|
|
750
|
+
<!-- Main action -->
|
|
751
|
+
<button
|
|
752
|
+
class="split-button__action"
|
|
753
|
+
?disabled=${e}
|
|
754
|
+
aria-label=${this.label}
|
|
755
|
+
@click=${this._onActionClick}
|
|
756
|
+
@keydown=${o=>this._onKeydown(o,"action")}
|
|
757
|
+
type="button"
|
|
758
|
+
>
|
|
759
|
+
<slot name="prefix"></slot>
|
|
760
|
+
<span class="split-button__label">
|
|
761
|
+
<slot>${this.label}</slot>
|
|
762
|
+
</span>
|
|
763
|
+
</button>
|
|
764
|
+
|
|
765
|
+
<!-- Dropdown trigger -->
|
|
766
|
+
<button
|
|
767
|
+
class="split-button__dropdown"
|
|
768
|
+
?disabled=${t}
|
|
769
|
+
aria-label="Open dropdown"
|
|
770
|
+
aria-haspopup="menu"
|
|
771
|
+
aria-expanded=${this._open?"true":"false"}
|
|
772
|
+
@click=${this._onDropdownClick}
|
|
773
|
+
@keydown=${o=>this._onKeydown(o,"dropdown")}
|
|
774
|
+
type="button"
|
|
775
|
+
>
|
|
776
|
+
<ui-icon
|
|
777
|
+
name="uil-angle-down"
|
|
778
|
+
size="16"
|
|
779
|
+
class="split-button__chevron ${this._open?"split-button__chevron--open":""}"
|
|
780
|
+
></ui-icon>
|
|
781
|
+
</button>
|
|
782
|
+
|
|
783
|
+
<!-- Dropdown panel -->
|
|
784
|
+
${this._renderPanel()}
|
|
785
|
+
</div>
|
|
786
|
+
`}},a.SplitButton.styles=[D`${A(ba)}`],ye([d({type:String})],a.SplitButton.prototype,"label",2),ye([d({type:String})],a.SplitButton.prototype,"size",2),ye([d({type:String})],a.SplitButton.prototype,"theme",2),ye([d({type:Boolean})],a.SplitButton.prototype,"disabled",2),ye([d({type:Boolean})],a.SplitButton.prototype,"dropdownDisabled",2),ye([d({attribute:!1})],a.SplitButton.prototype,"items",2),ye([m()],a.SplitButton.prototype,"_open",2),ye([F(".split-button__dropdown")],a.SplitButton.prototype,"_dropdownBtn",2),ye([F(".split-button__panel")],a.SplitButton.prototype,"_panel",2),a.SplitButton=ye([M("logosphere-split-button")],a.SplitButton);const va=":host{display:block}.collapse{font-family:var(--font-family-base);background-color:var(--color-body-bg);overflow:hidden}.collapse--full{border:1px solid var(--color-border);border-radius:var(--radius-base)}.collapse--bottom{border-bottom:1px solid var(--color-border);border-radius:0}.collapse__header{display:flex;align-items:center;gap:var(--spacing-4);padding:var(--spacing-4) var(--spacing-4);cursor:pointer;-webkit-user-select:none;user-select:none;transition:background-color var(--transition-speed-fast) var(--transition-timing);outline:none}.collapse--small .collapse__header{padding:var(--spacing-2) var(--spacing-4)}.collapse--full .collapse__header{border-radius:calc(var(--radius-base) - 1px)}.collapse--full.collapse--expanded .collapse__header{border-radius:calc(var(--radius-base) - 1px) calc(var(--radius-base) - 1px) 0 0}.collapse--full .collapse__header:hover:not(.collapse--disabled .collapse__header){background-color:var(--color-body-bg-hover)}.collapse--bottom .collapse__header:hover:not(.collapse--disabled .collapse__header){background-color:var(--color-body-bg-hover)}.collapse__header:focus-visible{outline:2px solid var(--color-primary);outline-offset:-2px;border-radius:calc(var(--radius-base) - 1px)}.collapse__title{font-size:var(--font-size-base);font-weight:var(--font-weight-semibold);line-height:1.2;letter-spacing:-.16px;color:var(--color-body-color);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.collapse__header-extra:empty{display:none}.collapse__header-extra{display:flex;align-items:center;gap:var(--spacing-2);flex-shrink:0}.collapse__header-spacer{flex:1}.collapse__icon{display:inline-flex;align-items:center;justify-content:center;flex-shrink:0;color:var(--color-secondary);transition:transform var(--transition-speed-base) var(--transition-timing)}.collapse__icon--expanded{transform:rotate(180deg)}.collapse__body{height:0;overflow:hidden;transition:height var(--transition-speed-slow) var(--transition-timing)}.collapse__body-inner{padding:0 var(--spacing-4) var(--spacing-4);font-size:var(--font-size-sm);font-weight:var(--font-weight-regular);line-height:var(--line-height-normal);color:var(--color-body-color)}.collapse--bottom .collapse__body-inner{padding-top:var(--spacing-2)}.collapse--disabled .collapse__header{cursor:not-allowed;pointer-events:none}.collapse--disabled .collapse__title,.collapse--disabled .collapse__icon{color:var(--color-secondary-disabled)}.collapse--disabled.collapse--full{border-color:var(--color-secondary-disabled);background-color:var(--color-light-bg)}.collapse--disabled.collapse--bottom{border-bottom-color:var(--color-secondary-disabled);background-color:transparent}";var ma=Object.defineProperty,ya=Object.getOwnPropertyDescriptor,Ee=(r,e,t,o)=>{for(var i=o>1?void 0:o?ya(e,t):e,s=r.length-1,n;s>=0;s--)(n=r[s])&&(i=(o?n(e,t,i):n(i))||i);return o&&i&&ma(e,t,i),i};const Xt=typeof requestAnimationFrame!="undefined"?requestAnimationFrame.bind(window):r=>setTimeout(()=>r(Date.now()),16);a.Collapse=class extends E{constructor(){super(...arguments),this.title="",this.expanded=!1,this.disabled=!1,this.iconPosition="right",this.border="full",this.size="default"}_toggle(){this.disabled||(this.expanded=!this.expanded,this.dispatchEvent(new CustomEvent("toggle",{detail:{expanded:this.expanded},bubbles:!0,composed:!0})))}_onKeydown(e){(e.key==="Enter"||e.key===" ")&&(e.preventDefault(),this._toggle())}_lockHeightForClose(){const e=this._body;if(!e)return;const t=e.getBoundingClientRect().height;e.style.height=`${t}px`,e.style.overflow="hidden"}willUpdate(e){super.willUpdate(e),e.has("expanded")&&!this.expanded&&this._lockHeightForClose()}updated(e){if(super.updated(e),!e.has("expanded")||!this._body||!this._inner)return;const t=this._body,o=this._inner;this.expanded?(t.style.height="0px",t.style.overflow="hidden",Xt(()=>{Xt(()=>{t.style.height=`${o.scrollHeight}px`,t.addEventListener("transitionend",function i(){t.style.height="auto",t.style.overflow="",t.removeEventListener("transitionend",i)},{once:!0})})})):(t.getBoundingClientRect(),Xt(()=>{Xt(()=>{t.style.height="0px"})}))}_renderIcon(){return p`
|
|
787
|
+
<span class="collapse__icon ${this.expanded?"collapse__icon--expanded":""}">
|
|
788
|
+
<ui-icon name="uil-angle-down" size="22"></ui-icon>
|
|
789
|
+
</span>
|
|
790
|
+
`}render(){return p`
|
|
791
|
+
<div
|
|
792
|
+
class="collapse
|
|
793
|
+
collapse--${this.border}
|
|
794
|
+
collapse--${this.size}
|
|
795
|
+
${this.expanded?"collapse--expanded":""}
|
|
796
|
+
${this.disabled?"collapse--disabled":""}"
|
|
797
|
+
>
|
|
798
|
+
<!-- Header -->
|
|
799
|
+
<div
|
|
800
|
+
class="collapse__header"
|
|
801
|
+
role="button"
|
|
802
|
+
tabindex=${this.disabled?"-1":"0"}
|
|
803
|
+
aria-expanded=${this.expanded?"true":"false"}
|
|
804
|
+
aria-disabled=${this.disabled?"true":b}
|
|
805
|
+
@click=${this._toggle}
|
|
806
|
+
@keydown=${this._onKeydown}
|
|
807
|
+
>
|
|
808
|
+
${this.iconPosition==="left"?this._renderIcon():b}
|
|
809
|
+
|
|
810
|
+
<div class="collapse__title">
|
|
811
|
+
<slot name="title">${this.title}</slot>
|
|
812
|
+
</div>
|
|
813
|
+
|
|
814
|
+
<div class="collapse__header-extra">
|
|
815
|
+
<slot name="extra"></slot>
|
|
816
|
+
</div>
|
|
817
|
+
|
|
818
|
+
<!-- pushes extra to title side, icon stays at far right -->
|
|
819
|
+
<span class="collapse__header-spacer"></span>
|
|
820
|
+
|
|
821
|
+
${this.iconPosition==="right"?this._renderIcon():b}
|
|
822
|
+
</div>
|
|
823
|
+
|
|
824
|
+
<!-- Body (animated) -->
|
|
825
|
+
<div class="collapse__body ${this.expanded?"collapse__body--visible":""}">
|
|
826
|
+
<div class="collapse__body-inner">
|
|
827
|
+
<!-- slot="body" for explicit usage; default slot as fallback -->
|
|
828
|
+
<slot name="body"><slot></slot></slot>
|
|
829
|
+
</div>
|
|
830
|
+
</div>
|
|
831
|
+
</div>
|
|
832
|
+
`}},a.Collapse.styles=[D`${A(va)}`],Ee([d({type:String})],a.Collapse.prototype,"title",2),Ee([d({type:Boolean,reflect:!0})],a.Collapse.prototype,"expanded",2),Ee([d({type:Boolean,reflect:!0})],a.Collapse.prototype,"disabled",2),Ee([d({type:String})],a.Collapse.prototype,"iconPosition",2),Ee([d({type:String})],a.Collapse.prototype,"border",2),Ee([d({type:String})],a.Collapse.prototype,"size",2),Ee([F(".collapse__body-inner")],a.Collapse.prototype,"_inner",2),Ee([F(".collapse__body")],a.Collapse.prototype,"_body",2),a.Collapse=Ee([M("logosphere-collapse")],a.Collapse);const wa=":host{display:block}.input-group{display:inline-flex;align-items:center;font-family:var(--font-family-base)}.input-group--stretch>::slotted(*){align-self:stretch}.input-group>::slotted(*){flex-shrink:0}:host([block]){display:block}:host([block]) .input-group{display:flex;width:100%}:host([block]) .input-group>::slotted(*){flex:1;min-width:0}";var xa=Object.defineProperty,$a=Object.getOwnPropertyDescriptor,wi=(r,e,t,o)=>{for(var i=o>1?void 0:o?$a(e,t):e,s=r.length-1,n;s>=0;s--)(n=r[s])&&(i=(o?n(e,t,i):n(i))||i);return o&&i&&xa(e,t,i),i};a.InputGroup=class extends E{constructor(){super(...arguments),this.stretch=!0,this._onFocusIn=e=>{const t=e.composedPath();this._getChildren().forEach(i=>{const s=t.includes(i);i.style.zIndex=s?"1":"0",i.style.position="relative"})},this._onFocusOut=e=>{const t=e.relatedTarget;t&&this.contains(t)||this._getChildren().forEach(o=>{o.style.zIndex="",o.style.position=""})}}firstUpdated(){this._applyGroupStyles(),this.addEventListener("focusin",this._onFocusIn),this.addEventListener("focusout",this._onFocusOut)}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("focusin",this._onFocusIn),this.removeEventListener("focusout",this._onFocusOut)}_onSlotChange(){this._applyGroupStyles()}_getChildren(){var t,o;const e=(t=this.shadowRoot)==null?void 0:t.querySelector("slot");return(o=e==null?void 0:e.assignedElements())!=null?o:[]}_applyGroupStyles(){const e=this._getChildren(),t=e.length;t!==0&&e.forEach((o,i)=>{const s=i===0,n=i===t-1;let l;t===1?l="var(--radius-base)":s?l="var(--radius-base) 0 0 var(--radius-base)":n?l="0 var(--radius-base) var(--radius-base) 0":l="0",o.style.setProperty("--formfield-border-radius",l),o.style.marginLeft=s?"":"-1px"})}render(){return p`
|
|
833
|
+
<div class="input-group${this.stretch?" input-group--stretch":""}">
|
|
834
|
+
<slot @slotchange=${this._onSlotChange}></slot>
|
|
835
|
+
</div>
|
|
836
|
+
`}},a.InputGroup.styles=[D`${A(wa)}`],wi([d({type:Boolean})],a.InputGroup.prototype,"stretch",2),a.InputGroup=wi([M("logosphere-input-group")],a.InputGroup);const ka=":host{display:block}.accordion{display:flex;flex-direction:column}.accordion--full{gap:var(--spacing-2)}.accordion--bottom{gap:0}.accordion--full ::slotted(logosphere-collapse),.accordion--full logosphere-collapse{width:100%}";var Ca=Object.defineProperty,Sa=Object.getOwnPropertyDescriptor,Ie=(r,e,t,o)=>{for(var i=o>1?void 0:o?Sa(e,t):e,s=r.length-1,n;s>=0;s--)(n=r[s])&&(i=(o?n(e,t,i):n(i))||i);return o&&i&&Ca(e,t,i),i};a.Accordion=class extends E{constructor(){super(...arguments),this.items=[],this.multiple=!1,this.defaultOpen=[],this.border="full",this.iconPosition="right",this.size="default",this._openSet=new Set,this._onSlottedToggle=e=>{if(this.items.length>0||this.multiple)return;const t=e.target;e.detail.expanded&&this.querySelectorAll("logosphere-collapse").forEach(o=>{o!==t&&o.expanded&&(o.expanded=!1)})}}connectedCallback(){super.connectedCallback();const e=Array.isArray(this.defaultOpen)?this.defaultOpen:[this.defaultOpen];this._openSet=new Set(e),this.addEventListener("toggle",this._onSlottedToggle)}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("toggle",this._onSlottedToggle)}_toggle(e){const t=new Set(this._openSet);t.has(e)?t.delete(e):(this.multiple||t.clear(),t.add(e));const o=this._openSet.has(e);this._openSet=t,this.dispatchEvent(new CustomEvent("accordion-change",{detail:{index:e,expanded:!o,openIndices:[...this._openSet]},bubbles:!0,composed:!0}))}render(){return this.items.length===0?p`
|
|
837
|
+
<div class="accordion accordion--${this.border}">
|
|
838
|
+
<slot></slot>
|
|
839
|
+
</div>
|
|
840
|
+
`:p`
|
|
841
|
+
<div class="accordion accordion--${this.border}">
|
|
842
|
+
${this.items.map((e,t)=>{var o;return p`
|
|
843
|
+
<logosphere-collapse
|
|
844
|
+
title=${e.title}
|
|
845
|
+
.expanded=${this._openSet.has(t)}
|
|
846
|
+
.disabled=${(o=e.disabled)!=null?o:!1}
|
|
847
|
+
border=${this.border}
|
|
848
|
+
iconPosition=${this.iconPosition}
|
|
849
|
+
size=${this.size}
|
|
850
|
+
@toggle=${i=>{i.stopPropagation(),this._toggle(t)}}
|
|
851
|
+
>
|
|
852
|
+
<span slot="body">${e.content}</span>
|
|
853
|
+
</logosphere-collapse>
|
|
854
|
+
`})}
|
|
855
|
+
</div>
|
|
856
|
+
`}},a.Accordion.styles=[D`${A(ka)}`],Ie([d({attribute:!1})],a.Accordion.prototype,"items",2),Ie([d({type:Boolean})],a.Accordion.prototype,"multiple",2),Ie([d({attribute:!1})],a.Accordion.prototype,"defaultOpen",2),Ie([d({type:String})],a.Accordion.prototype,"border",2),Ie([d({type:String})],a.Accordion.prototype,"iconPosition",2),Ie([d({type:String})],a.Accordion.prototype,"size",2),Ie([m()],a.Accordion.prototype,"_openSet",2),a.Accordion=Ie([M("logosphere-accordion")],a.Accordion);const Ea=":host{display:block}.chip-group{display:flex;flex-wrap:wrap;align-items:center}.chip-group__chip{display:inline-flex;align-items:center;gap:var(--spacing-1);padding:6px var(--spacing-3);border-radius:1000px;border:1px solid var(--color-border);background-color:var(--color-body-bg);cursor:pointer;font-family:var(--font-family-base);font-size:var(--font-size-sm);font-weight:var(--font-weight-regular);line-height:20px;letter-spacing:-.14px;color:var(--color-secondary);white-space:nowrap;-webkit-user-select:none;user-select:none;outline:none;transition:background-color var(--transition-speed-base) var(--transition-timing),border-color var(--transition-speed-base) var(--transition-timing),color var(--transition-speed-base) var(--transition-timing)}.chip-group__chip:focus-visible{outline:2px solid var(--color-primary);outline-offset:2px}.chip-group__chip:hover:not(.chip-group__chip--disabled):not(.chip-group__chip--selected){background-color:var(--color-light)}.chip-group__chip-icon{display:inline-flex;align-items:center;flex-shrink:0;color:inherit}.chip-group__chip-label{color:inherit}.chip-group__chip--disabled{opacity:.4;cursor:not-allowed;pointer-events:none}.chip-group__chip--selected{border-color:transparent;color:#fff}.chip-group__chip--default.chip-group__chip--selected{background-color:var(--color-secondary)}.chip-group__chip--primary.chip-group__chip--selected{background-color:var(--color-primary)}.chip-group__chip--secondary.chip-group__chip--selected{background-color:var(--color-secondary)}.chip-group__chip--purple.chip-group__chip--selected{background-color:#543985}.chip-group__chip--success.chip-group__chip--selected{background-color:var(--color-success)}.chip-group__chip--danger.chip-group__chip--selected{background-color:var(--color-danger)}.chip-group__chip--info.chip-group__chip--selected{background-color:var(--color-info)}.chip-group__chip--warning.chip-group__chip--selected{background-color:var(--color-warning);color:var(--color-body-text)}";var Pa=Object.defineProperty,za=Object.getOwnPropertyDescriptor,Lt=(r,e,t,o)=>{for(var i=o>1?void 0:o?za(e,t):e,s=r.length-1,n;s>=0;s--)(n=r[s])&&(i=(o?n(e,t,i):n(i))||i);return o&&i&&Pa(e,t,i),i};a.ChipGroup=class extends E{constructor(){super(...arguments),this.items=[],this.value=[],this.theme="default",this.gap="var(--spacing-2)"}_isSelected(e){return this.value.includes(e)}_handleChipClick(e){if(e.disabled)return;const t=this._isSelected(e.value),o=t?this.value.filter(i=>i!==e.value):[...this.value,e.value];this.value=o,this.dispatchEvent(new CustomEvent("chip-group-change",{detail:{value:o,item:e,selected:!t},bubbles:!0,composed:!0}))}_onChipKeydown(e,t){(e.key==="Enter"||e.key===" ")&&(e.preventDefault(),this._handleChipClick(t))}_renderChip(e){const t=this._isSelected(e.value),o=["chip-group__chip",`chip-group__chip--${this.theme}`,t?"chip-group__chip--selected":"",e.disabled?"chip-group__chip--disabled":""].filter(Boolean).join(" ");return p`
|
|
857
|
+
<button
|
|
858
|
+
class=${o}
|
|
859
|
+
type="button"
|
|
860
|
+
role="checkbox"
|
|
861
|
+
aria-checked=${t?"true":"false"}
|
|
862
|
+
aria-disabled=${e.disabled?"true":"false"}
|
|
863
|
+
tabindex=${e.disabled?"-1":"0"}
|
|
864
|
+
@click=${()=>this._handleChipClick(e)}
|
|
865
|
+
@keydown=${i=>this._onChipKeydown(i,e)}
|
|
866
|
+
>
|
|
867
|
+
<span class="chip-group__chip-icon" aria-hidden="true">
|
|
868
|
+
${t?p`<ui-icon name="uil-check" size="16"></ui-icon>`:p`<ui-icon name="uil-plus" size="16"></ui-icon>`}
|
|
869
|
+
</span>
|
|
870
|
+
<span class="chip-group__chip-label">${e.label}</span>
|
|
871
|
+
</button>
|
|
872
|
+
`}render(){return p`
|
|
873
|
+
<div
|
|
874
|
+
class="chip-group"
|
|
875
|
+
style="gap: ${this.gap}"
|
|
876
|
+
role="group"
|
|
877
|
+
aria-label="Chip group"
|
|
878
|
+
>
|
|
879
|
+
${this.items.map(e=>this._renderChip(e))}
|
|
880
|
+
</div>
|
|
881
|
+
`}},a.ChipGroup.styles=[D`${A(Ea)}`],Lt([d({attribute:!1})],a.ChipGroup.prototype,"items",2),Lt([d({attribute:!1})],a.ChipGroup.prototype,"value",2),Lt([d({type:String})],a.ChipGroup.prototype,"theme",2),Lt([d({type:String})],a.ChipGroup.prototype,"gap",2),a.ChipGroup=Lt([M("logosphere-chip-group")],a.ChipGroup);const Aa=":host{display:block}.textarea__wrap{position:relative;flex:1;min-width:0}.textarea__field{display:block;width:100%;background:transparent;border:none;outline:none;font-size:14px;font-family:var(--font-family-base);font-weight:var(--font-weight-regular);line-height:1.25rem;letter-spacing:-.14px;color:var(--color-body-text);box-sizing:border-box}.textarea__field::placeholder{color:var(--color-tertiary)}.textarea__field:disabled{cursor:not-allowed}.textarea__field--resize-none{resize:none}.textarea__field--resize-vertical{resize:vertical}.textarea__field--resize-horizontal{resize:horizontal}.textarea__field--resize-both{resize:both}.textarea__field--auto-resize{resize:none;overflow:hidden}.textarea__counter{position:absolute;bottom:5px;right:18px;font-size:11px;font-weight:var(--font-weight-medium);line-height:1rem;letter-spacing:-.11px;color:var(--color-secondary);background-color:var(--color-light-bg-2);border-radius:var(--radius-sm, 4px);padding:0 var(--spacing-1);white-space:nowrap;-webkit-user-select:none;user-select:none;pointer-events:none}.textarea__wrap--no-grip .textarea__counter{right:4px}.textarea__clear-btn{border:none;background:transparent;color:var(--color-tertiary);cursor:pointer;padding:0;display:inline-flex;align-items:center;justify-content:center;flex-shrink:0;outline:none;line-height:0;transition:color var(--transition-speed-fast) var(--transition-timing)}.textarea__clear-btn:hover{color:var(--color-body-text)}";var Da=Object.defineProperty,Ma=Object.getOwnPropertyDescriptor,V=(r,e,t,o)=>{for(var i=o>1?void 0:o?Ma(e,t):e,s=r.length-1,n;s>=0;s--)(n=r[s])&&(i=(o?n(e,t,i):n(i))||i);return o&&i&&Da(e,t,i),i};a.TextArea=class extends E{constructor(){super(...arguments),this.value="",this.placeholder="",this.name="",this.autocomplete="",this.rows=3,this.maxRows=8,this.wrap="soft",this.resize="vertical",this.autoResize=!0,this.size="default",this.variant="default",this.label="",this.helper="",this.error="",this.required=!1,this.disabled=!1,this.readonly=!1,this._internalError="",this._charCount=0,this.handleInput=e=>{const t=e.target;this.value=t.value,this._charCount=this.value.length,this.autoResize&&this.adjustHeight(),this._internalError&&(this._internalError="",this._textareaElement.setCustomValidity("")),this.dispatchEvent(new CustomEvent("input",{bubbles:!0,composed:!0,detail:{value:this.value,originalEvent:e}}))},this.handleChange=e=>{const t=e.target;this.value=t.value,t.checkValidity()||(this._internalError=t.validationMessage),this.dispatchEvent(new CustomEvent("change",{bubbles:!0,composed:!0,detail:{value:this.value,originalEvent:e}})),this.dispatchEvent(new CustomEvent("lgsChange",{bubbles:!0,composed:!0,detail:{value:this.value}}))},this.handleKeyDown=e=>{this.dispatchEvent(new CustomEvent("keydown",{bubbles:!0,composed:!0,detail:{key:e.key,originalEvent:e}}))},this.handleKeyUp=e=>{this.dispatchEvent(new CustomEvent("keyup",{bubbles:!0,composed:!0,detail:{key:e.key,originalEvent:e}}))},this.handleClear=()=>{this.value="",this._charCount=0,this._textareaElement&&(this._textareaElement.value="",this.autoResize&&this.adjustHeight()),this.dispatchEvent(new CustomEvent("clear",{bubbles:!0,composed:!0})),this.dispatchEvent(new CustomEvent("input",{bubbles:!0,composed:!0,detail:{value:"",originalEvent:null}}))}}get textareaElement(){return this._textareaElement}focus(){var e;(e=this._textareaElement)==null||e.focus()}blur(){var e;(e=this._textareaElement)==null||e.blur()}select(){var e;(e=this._textareaElement)==null||e.select()}setSelectionRange(e,t,o){var i;(i=this._textareaElement)==null||i.setSelectionRange(e,t,o)}checkValidity(){var e,t;return(t=(e=this._textareaElement)==null?void 0:e.checkValidity())!=null?t:!0}reportValidity(){var e,t;return(t=(e=this._textareaElement)==null?void 0:e.reportValidity())!=null?t:!0}setCustomValidity(e){var t;(t=this._textareaElement)==null||t.setCustomValidity(e),this._internalError=e,this.requestUpdate()}adjustHeight(){if(!this.autoResize||!this._textareaElement)return;const e=this._textareaElement;e.style.height="",e.style.overflow="hidden";const t=e.scrollHeight;if(t!==0){if(this.maxRows>0){const o=parseFloat(getComputedStyle(e).lineHeight)||20,i=Math.round(o*this.maxRows);if(t>=i){e.style.height=`${i}px`,e.style.overflow="auto";return}}e.style.height=`${t}px`}}getResizeClass(){return this.autoResize?"textarea__field--auto-resize":{none:"textarea__field--resize-none",vertical:"textarea__field--resize-vertical",horizontal:"textarea__field--resize-horizontal",both:"textarea__field--resize-both"}[this.resize]}firstUpdated(){this._charCount=this.value.length,this.autoResize&&requestAnimationFrame(()=>this.adjustHeight())}updated(e){super.updated(e),e.has("value")&&(this._charCount=this.value.length,this.autoResize&&this.adjustHeight())}getWrapClass(){return this.autoResize||this.resize==="none"?"textarea__wrap textarea__wrap--no-grip":"textarea__wrap"}render(){var s,n,l;const e=this.error||this._internalError,t=!!this.value&&!this.disabled&&!this.readonly,o=this.maxlength!=null,i=`textarea__field ${this.getResizeClass()}`;return p`
|
|
233
882
|
<logosphere-formfield
|
|
234
|
-
.label
|
|
235
|
-
.helper
|
|
236
|
-
.error
|
|
237
|
-
.required
|
|
238
|
-
.disabled
|
|
239
|
-
.readonly
|
|
240
|
-
.
|
|
241
|
-
.
|
|
242
|
-
.
|
|
883
|
+
.label=${this.label}
|
|
884
|
+
.helper=${this.helper}
|
|
885
|
+
.error=${e}
|
|
886
|
+
.required=${this.required}
|
|
887
|
+
.disabled=${this.disabled}
|
|
888
|
+
.readonly=${this.readonly}
|
|
889
|
+
.size=${this.size}
|
|
890
|
+
.variant=${this.variant}
|
|
891
|
+
.multiline=${!0}
|
|
243
892
|
>
|
|
244
|
-
<
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
893
|
+
<slot name="prefix" slot="prefix"></slot>
|
|
894
|
+
<div class="${this.getWrapClass()}">
|
|
895
|
+
<textarea
|
|
896
|
+
class="${i}"
|
|
897
|
+
.value=${qt(this.value)}
|
|
898
|
+
placeholder=${this.placeholder||b}
|
|
899
|
+
name=${this.name||b}
|
|
900
|
+
autocomplete=${this.autocomplete||b}
|
|
901
|
+
?required=${this.required}
|
|
902
|
+
?disabled=${this.disabled}
|
|
903
|
+
?readonly=${this.readonly}
|
|
904
|
+
minlength=${(s=this.minlength)!=null?s:b}
|
|
905
|
+
maxlength=${(n=this.maxlength)!=null?n:b}
|
|
906
|
+
rows=${this.rows}
|
|
907
|
+
cols=${(l=this.cols)!=null?l:b}
|
|
908
|
+
wrap=${this.wrap}
|
|
909
|
+
@input=${this.handleInput}
|
|
910
|
+
@change=${this.handleChange}
|
|
911
|
+
@keydown=${this.handleKeyDown}
|
|
912
|
+
@keyup=${this.handleKeyUp}
|
|
913
|
+
></textarea>
|
|
914
|
+
${o?p`
|
|
915
|
+
<span class="textarea__counter">${this._charCount}/${this.maxlength}</span>
|
|
916
|
+
`:b}
|
|
917
|
+
</div>
|
|
918
|
+
${t?p`
|
|
266
919
|
<button
|
|
267
920
|
type="button"
|
|
268
|
-
slot="
|
|
921
|
+
slot="clear"
|
|
269
922
|
class="textarea__clear-btn"
|
|
270
|
-
@click
|
|
923
|
+
@click=${this.handleClear}
|
|
271
924
|
tabindex="-1"
|
|
272
925
|
>
|
|
273
926
|
<ui-icon name="uil-times" size="14"></ui-icon>
|
|
274
927
|
</button>
|
|
275
|
-
`])),this.handleClear):O)}}])})(Z),c.TextArea.styles=[ee(oo||(oo=b(["",""])),Q(ol))],G([we("textarea")],c.TextArea.prototype,"_textareaElement",2),G([f({type:String})],c.TextArea.prototype,"value",2),G([f({type:String})],c.TextArea.prototype,"placeholder",2),G([f({type:String})],c.TextArea.prototype,"name",2),G([f({type:String})],c.TextArea.prototype,"autocomplete",2),G([f({type:Number})],c.TextArea.prototype,"minlength",2),G([f({type:Number})],c.TextArea.prototype,"maxlength",2),G([f({type:Number})],c.TextArea.prototype,"rows",2),G([f({type:Number})],c.TextArea.prototype,"cols",2),G([f({type:String})],c.TextArea.prototype,"wrap",2),G([f({type:String})],c.TextArea.prototype,"resize",2),G([f({type:Boolean})],c.TextArea.prototype,"autoResize",2),G([f({type:String})],c.TextArea.prototype,"size",2),G([f({type:String})],c.TextArea.prototype,"variant",2),G([f({type:Boolean})],c.TextArea.prototype,"showClear",2),G([f({type:String})],c.TextArea.prototype,"label",2),G([f({type:String})],c.TextArea.prototype,"helper",2),G([f({type:String})],c.TextArea.prototype,"error",2),G([f({type:Boolean})],c.TextArea.prototype,"required",2),G([f({type:Boolean})],c.TextArea.prototype,"disabled",2),G([f({type:Boolean})],c.TextArea.prototype,"readonly",2),G([z()],c.TextArea.prototype,"_internalError",2),c.TextArea=G([te("logosphere-textarea")],c.TextArea);const sl='.combobox{display:flex;flex-direction:column;gap:var(--spacing-1);font-family:var(--font-family-base);width:100%}.combobox__label{display:block;font-size:var(--font-size-sm);font-weight:var(--font-weight-medium);color:var(--color-body-text)}.combobox__label--required:after{content:" *";color:var(--color-primary)}.combobox__readonly{border:none;background:transparent;font-size:var(--font-size-sm);color:var(--color-body-text);padding:0;outline:none;font-family:var(--font-family-base)}.combobox__wrapper{position:relative;width:100%}.combobox__trigger{display:flex;align-items:center;justify-content:space-between;width:100%;padding:var(--spacing-1) var(--spacing-3);border:1px solid var(--color-border);border-radius:var(--radius-base);background-color:var(--color-body-bg);cursor:pointer;overflow:hidden;font-size:var(--font-size-sm);color:var(--color-body-text);transition:border-color var(--transition-speed-fast) var(--transition-timing);box-sizing:border-box}.combobox__trigger--default{height:32px}.combobox__trigger--large{height:40px;font-size:var(--font-size-base)}.combobox__trigger--open{border-color:var(--color-secondary-hover)}.combobox__trigger--readonly{cursor:default;background-color:var(--color-tertiary-bg);color:var(--color-tertiary)}.combobox__trigger--readonly .combobox__chevron{opacity:.3}.combobox__placeholder{color:var(--color-tertiary);font-size:var(--font-size-sm);flex:1}.combobox__single-value{flex:1;font-size:var(--font-size-sm);color:var(--color-body-text)}.combobox__chevron{display:inline-flex;align-items:center;justify-content:center;color:var(--color-tertiary);flex-shrink:0;transition:transform var(--transition-speed-fast) var(--transition-timing)}.combobox__chevron--open{transform:rotate(180deg)}.combobox__tags{display:flex;flex-wrap:wrap;align-items:center;gap:var(--spacing-1);flex:1;overflow:hidden}.combobox__tag{display:inline-flex;align-items:center;gap:var(--spacing-1);padding:0 var(--spacing-2);background-color:var(--color-tertiary-bg);border-radius:var(--radius-sm);font-size:var(--font-size-xs);color:var(--color-body-text);white-space:nowrap}.combobox__tag-remove{display:inline-flex;align-items:center;justify-content:center;background:none;border:none;padding:0;cursor:pointer;color:var(--color-tertiary);line-height:1;transition:color var(--transition-speed-fast) var(--transition-timing)}.combobox__tag-remove:hover{color:var(--color-body-text)}.combobox__clear{display:inline-flex;align-items:center;justify-content:center;background:none;border:none;padding:0;cursor:pointer;color:var(--color-secondary);line-height:1;flex-shrink:0;transition:color var(--transition-speed-fast) var(--transition-timing)}.combobox__clear:hover{color:var(--color-body-text)}.combobox__filter-input{flex:1;border:none;outline:none;background:transparent;font-size:var(--font-size-sm);font-family:var(--font-family-base);color:var(--color-body-text);min-width:0;padding:0;cursor:text}.combobox__filter-input::placeholder{color:var(--color-tertiary)}.combobox__filter-input--inline{flex:1;min-width:60px}.combobox__trigger--multi-filter{flex-wrap:wrap;height:auto;min-height:32px;gap:var(--spacing-1);padding:var(--spacing-1) var(--spacing-3)}.combobox__trigger--large.combobox__trigger--multi-filter{min-height:40px}.combobox__dropdown{position:absolute;top:calc(100% + var(--spacing-1));left:0;width:100%;background-color:var(--color-body-bg);border:1px solid var(--color-border);border-radius:var(--radius-base);box-shadow:var(--shadow-base);z-index:var(--z-index-dropdown);overflow:hidden}.combobox__search{width:100%;padding:var(--spacing-1-5) var(--spacing-3);border:none;border-bottom:1px solid var(--color-border);font-size:var(--font-size-sm);color:var(--color-body-text);font-family:var(--font-family-base);outline:none;box-sizing:border-box;background-color:var(--color-body-bg)}.combobox__search::placeholder{color:var(--color-tertiary)}.combobox__list{max-height:208px;overflow-y:auto}.combobox__item{display:flex;align-items:center;gap:var(--spacing-2);padding:var(--spacing-1-5) var(--spacing-3);font-size:var(--font-size-sm);color:var(--color-body-text);cursor:pointer;transition:background-color var(--transition-speed-fast) var(--transition-timing)}.combobox__item:hover,.combobox__item--selected,.combobox__item--focused{background-color:var(--color-tertiary-bg)}.combobox__empty{padding:var(--spacing-2) var(--spacing-3);font-size:var(--font-size-sm);color:var(--color-tertiary);text-align:center}';var ao,io,so,lo,co,uo,po,ho,fo,vo,bo,go,mo,_o,yo,wo,ll=Object.defineProperty,cl=Object.getOwnPropertyDescriptor,re=function(n,e,t,r){for(var o=r>1?void 0:r?cl(e,t):e,i=n.length-1,s;i>=0;i--)(s=n[i])&&(o=(r?s(e,t,o):s(o))||o);return r&&o&&ll(e,t,o),o};c.Combobox=(function(a){function n(){var e;return j(this,n),e=H(this,n,arguments),e.inputId="combo-"+Math.random().toString(36).substring(2),e.label="",e.placeholder="Seçim yapınız",e.required=!1,e.readOnly=!1,e.multiple=!1,e.filterable=!1,e.optionLabel="label",e.optionValue="value",e.emptyMessage="Sonuç yok",e.items=[],e.size="default",e.selected=[],e.inputValue="",e.isOpen=!1,e.focusedIndex=-1,e._filteredItems=[],e._handleOutsideClick=function(t){t.composedPath().includes(e)||e._closeDropdown()},e._handleKeydown=function(t){if(!e.readOnly)switch(t.key){case"ArrowDown":t.preventDefault(),e.isOpen?e.focusedIndex=Math.min(e.focusedIndex+1,e._filteredItems.length-1):(e.isOpen=!0,e.focusedIndex=0),e._scrollFocusedIntoView();break;case"ArrowUp":t.preventDefault(),e.isOpen&&(e.focusedIndex=Math.max(e.focusedIndex-1,0),e._scrollFocusedIntoView());break;case"Enter":t.preventDefault(),e.isOpen?e.focusedIndex>=0&&e.focusedIndex<e._filteredItems.length&&e._selectItem(e._filteredItems[e.focusedIndex],t):(e.isOpen=!0,e.focusedIndex=0);break;case"Escape":t.preventDefault(),e._closeDropdown();break}},e._removeTag=function(t,r){r.stopPropagation(),e.setSelected(e.selected.filter(function(o){return o[e.optionValue]!==t[e.optionValue]}))},e._clearSelection=function(t){t.stopPropagation(),e.setSelected([]),e.inputValue=""},e._onFilterFocus=function(){e.inputValue="",e.isOpen=!0,e.focusedIndex=0},e._onFilterInput=function(t){e.inputValue=t.target.value,e.focusedIndex=0,e.isOpen||(e.isOpen=!0)},e._stopPropagation=function(t){return t.stopPropagation()},e._onTriggerClick=function(){e.readOnly||(e.filterable&&!e.multiple?e._focusFilterInput():e.isOpen=!e.isOpen)},e}return N(n,a),L(n,[{key:"willUpdate",value:function(t){var r=this;if(t.has("items")||t.has("inputValue")||t.has("optionLabel")){var o=this.inputValue.toLocaleLowerCase();this._filteredItems=this.items.filter(function(i){var s;return String((s=i[r.optionLabel])!==null&&s!==void 0?s:"").toLocaleLowerCase().includes(o)})}}},{key:"updated",value:function(t){if(t.has("isOpen")&&this.isOpen&&this.filterable&&this.multiple){var r,o;(r=this.shadowRoot)===null||r===void 0||(o=r.querySelector(".combobox__search"))===null||o===void 0||o.focus()}}},{key:"connectedCallback",value:function(){X(n,"connectedCallback",this)([]),document.addEventListener("click",this._handleOutsideClick)}},{key:"disconnectedCallback",value:function(){X(n,"disconnectedCallback",this)([]),document.removeEventListener("click",this._handleOutsideClick)}},{key:"_closeDropdown",value:function(){this.isOpen=!1,this.focusedIndex=-1,this.filterable&&(this.inputValue="")}},{key:"_filterDisplayValue",get:function(){return this.isOpen?this.inputValue:!this.multiple&&this.selected.length?String(this.selected[0][this.optionLabel]):""}},{key:"_focusFilterInput",value:function(){var t=this;this.updateComplete.then(function(){var r,o;(r=t.shadowRoot)===null||r===void 0||(o=r.querySelector(".combobox__filter-input"))===null||o===void 0||o.focus()})}},{key:"_scrollFocusedIntoView",value:function(){var t=this;this.updateComplete.then(function(){var r,o,i=(r=t.shadowRoot)===null||r===void 0?void 0:r.querySelectorAll(".combobox__item");i==null||(o=i[t.focusedIndex])===null||o===void 0||o.scrollIntoView({block:"nearest"})})}},{key:"selectedItems",value:function(){return this.selected}},{key:"isSelected",value:function(t){var r=this;return this.selected.some(function(o){return o[r.optionValue]===t[r.optionValue]})}},{key:"_selectItem",value:function(t,r){var o=this;r.stopPropagation();var i;this.multiple?i=this.isSelected(t)?this.selected.filter(function(s){return s[o.optionValue]!==t[o.optionValue]}):[].concat(ve(this.selected),[t]):(i=[t],this.isOpen=!1,this.filterable&&(this.inputValue="")),this.setSelected(i)}},{key:"setSelected",value:function(t){this.selected=t,this.dispatchEvent(new CustomEvent("selected",{detail:{selected:t},bubbles:!0,composed:!0})),this.dispatchEvent(new CustomEvent("change",{detail:{value:t},bubbles:!0,composed:!0}))}},{key:"_renderTagList",value:function(){var t=this;return m(ao||(ao=b([`
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
`])),this._filterDisplayValue,this.placeholder,this.readOnly,this._onFilterFocus,this._onFilterInput,this._handleKeydown,this._stopPropagation,!this.readOnly&&this.selected.length?m(co||(co=b([`
|
|
306
|
-
<button class="combobox__clear" @click=`,` aria-label="Clear">
|
|
307
|
-
<ui-icon name="uil-times" size="14"></ui-icon>
|
|
308
|
-
</button>
|
|
309
|
-
`])),this._clearSelection):O):this.multiple&&this.selected.length?this._renderTagList():!this.multiple&&this.selected.length?m(uo||(uo=b([`
|
|
310
|
-
<span class="combobox__single-value">`,`</span>
|
|
311
|
-
`,`
|
|
312
|
-
`])),this.selected[0][this.optionLabel],this.readOnly?O:m(po||(po=b([`
|
|
313
|
-
<button class="combobox__clear" @click=`,` aria-label="Clear">
|
|
314
|
-
<ui-icon name="uil-times" size="14"></ui-icon>
|
|
315
|
-
</button>
|
|
316
|
-
`])),this._clearSelection)):m(ho||(ho=b(['<span class="combobox__placeholder">',"</span>"])),this.placeholder)}},{key:"_renderDropdown",value:function(){var t=this;return this.isOpen?m(fo||(fo=b([`
|
|
317
|
-
<div class="combobox__dropdown">
|
|
318
|
-
`,`
|
|
928
|
+
`:b}
|
|
929
|
+
<slot name="suffix" slot="suffix"></slot>
|
|
930
|
+
</logosphere-formfield>
|
|
931
|
+
`}},a.TextArea.styles=[D`${A(Aa)}`],V([F("textarea")],a.TextArea.prototype,"_textareaElement",2),V([d({type:String})],a.TextArea.prototype,"value",2),V([d({type:String})],a.TextArea.prototype,"placeholder",2),V([d({type:String})],a.TextArea.prototype,"name",2),V([d({type:String})],a.TextArea.prototype,"autocomplete",2),V([d({type:Number})],a.TextArea.prototype,"minlength",2),V([d({type:Number})],a.TextArea.prototype,"maxlength",2),V([d({type:Number})],a.TextArea.prototype,"rows",2),V([d({type:Number})],a.TextArea.prototype,"maxRows",2),V([d({type:Number})],a.TextArea.prototype,"cols",2),V([d({type:String})],a.TextArea.prototype,"wrap",2),V([d({type:String})],a.TextArea.prototype,"resize",2),V([d({type:Boolean})],a.TextArea.prototype,"autoResize",2),V([d({type:String})],a.TextArea.prototype,"size",2),V([d({type:String})],a.TextArea.prototype,"variant",2),V([d({type:String})],a.TextArea.prototype,"label",2),V([d({type:String})],a.TextArea.prototype,"helper",2),V([d({type:String})],a.TextArea.prototype,"error",2),V([d({type:Boolean})],a.TextArea.prototype,"required",2),V([d({type:Boolean})],a.TextArea.prototype,"disabled",2),V([d({type:Boolean})],a.TextArea.prototype,"readonly",2),V([m()],a.TextArea.prototype,"_internalError",2),V([m()],a.TextArea.prototype,"_charCount",2),a.TextArea=V([M("logosphere-textarea")],a.TextArea);const Oa=":host{display:block;width:100%}.timepicker__reference{display:block;width:100%}.timepicker__trigger{border:none;background:transparent;color:var(--color-tertiary);cursor:pointer;display:inline-flex;align-items:center;justify-content:center;padding:0;flex-shrink:0;height:100%;min-height:32px;outline:none;border-radius:0 var(--radius-base) var(--radius-base) 0;transition:color var(--transition-speed-fast) var(--transition-timing),background-color var(--transition-speed-fast) var(--transition-timing)}.timepicker__trigger:hover{color:var(--color-body-text);background-color:var(--color-body-bg-hover)}.timepicker__trigger--active{color:var(--color-body-text)}.timepicker__trigger:disabled{pointer-events:none;opacity:.4}.timepicker__popup[popover]{position:fixed;inset:unset;margin:0;padding:0;border:none;width:240px;background-color:var(--color-body-bg);border-radius:12px;box-shadow:0 4px 16px #7878783d;overflow:hidden;z-index:var(--z-index-dropdown, 1000)}.timepicker__spinner{display:flex;flex-direction:row;align-items:stretch;padding:var(--spacing-1) var(--spacing-2)}.timepicker__col{flex:1;display:flex;flex-direction:column;padding:0px var(--spacing-5)}.timepicker__col--left{align-items:flex-start}.timepicker__col--right{align-items:flex-end}.timepicker__col--sep{flex:0 0 auto;display:flex;flex-direction:column;align-items:center;justify-content:center;padding:0 var(--spacing-1)}.timepicker__spin-btn{height:32px;display:flex;align-items:center;justify-content:center;border:none;padding:var(--spacing-2);background:transparent;color:var(--color-secondary);border-radius:var(--radius-base);cursor:pointer;outline:none;box-sizing:border-box;transition:background-color var(--transition-speed-fast) var(--transition-timing),color var(--transition-speed-fast) var(--transition-timing)}.timepicker__spin-btn:hover{background-color:var(--color-body-bg-hover);color:var(--color-body-text)}.timepicker__spin-btn:active{background-color:var(--color-body-bg-active)}.timepicker__time-unit{height:32px;display:flex;align-items:center;justify-content:center;font-size:14px;font-family:var(--font-family-base);font-weight:var(--font-weight-regular);line-height:1.25rem;letter-spacing:-.14px;color:var(--color-body-text);text-align:center;box-sizing:border-box;padding:var(--spacing-2)}.timepicker__colon{height:32px;display:flex;align-items:center;justify-content:center;font-size:16px;font-family:var(--font-family-base);font-weight:var(--font-weight-medium);color:var(--color-secondary)}.timepicker__actions{display:flex;align-items:center;padding:var(--spacing-2);border-top:1px solid var(--color-border);gap:var(--spacing-1)}.timepicker__action-btn{flex:1 0 0;min-width:0;height:32px;display:inline-flex;align-items:center;justify-content:center;border:none;background:transparent;color:var(--color-secondary);border-radius:var(--radius-full);cursor:pointer;padding:var(--spacing-2);outline:none;transition:background-color var(--transition-speed-fast) var(--transition-timing),color var(--transition-speed-fast) var(--transition-timing)}.timepicker__action-btn:hover{background-color:var(--color-body-bg-hover);color:var(--color-body-text)}.timepicker__action-btn:active{background-color:var(--color-body-bg-active)}";var La=Object.defineProperty,Ta=Object.getOwnPropertyDescriptor,K=(r,e,t,o)=>{for(var i=o>1?void 0:o?Ta(e,t):e,s=r.length-1,n;s>=0;s--)(n=r[s])&&(i=(o?n(e,t,i):n(i))||i);return o&&i&&La(e,t,i),i};a.TimePicker=class extends E{constructor(){super(...arguments),this.value="",this.label="",this.helper="",this.error="",this.placeholder="__:__",this.required=!1,this.disabled=!1,this.readonly=!1,this.size="default",this.variant="default",this._isOpen=!1,this._hour=0,this._minute=0,this._handleOutsideClick=e=>{this._isOpen&&!e.composedPath().includes(this)&&(this._isOpen=!1)},this._handleInputChange=e=>{var o,i;e.stopPropagation();const t=(i=(o=e.detail)==null?void 0:o.value)!=null?i:"";if(/^\d{2}:\d{2}$/.test(t)){const[s,n]=this._parseValue(t);this._hour=s,this._minute=n;const l=`${this._pad(s)}:${this._pad(n)}`;this.value=l,this._emit(l)}},this._handleInputClear=e=>{e.stopPropagation(),this.value="",this._hour=0,this._minute=0,this._emit(""),this.dispatchEvent(new CustomEvent("clear",{bubbles:!0,composed:!0})),this._isOpen=!1},this._incrementHour=()=>{this._hour=(this._hour+1)%24,this._syncValue()},this._decrementHour=()=>{this._hour=(this._hour-1+24)%24,this._syncValue()},this._incrementMinute=()=>{this._minute=(this._minute+1)%60,this._syncValue()},this._decrementMinute=()=>{this._minute=(this._minute-1+60)%60,this._syncValue()}}connectedCallback(){super.connectedCallback(),document.addEventListener("click",this._handleOutsideClick)}disconnectedCallback(){super.disconnectedCallback(),document.removeEventListener("click",this._handleOutsideClick),this._destroyPopper()}willUpdate(e){if(e.has("value")&&/^\d{1,2}:\d{2}$/.test(this.value)){const[t,o]=this._parseValue(this.value);this._hour=t,this._minute=o}}updated(e){e.has("_isOpen")&&(this._isOpen?this.updateComplete.then(()=>{this._showPopover(),this._updatePopper()}):(this._hidePopover(),this._destroyPopper()))}_parseValue(e){const t=e.match(/^(\d{1,2}):(\d{2})$/);return t?[Math.min(23,Math.max(0,parseInt(t[1],10))),Math.min(59,Math.max(0,parseInt(t[2],10)))]:[0,0]}_pad(e){return String(e).padStart(2,"0")}_updatePopper(){!this._referenceEl||!this._popupEl||(this._popperInstance=Mt(this._referenceEl,this._popupEl,{placement:"bottom-start",modifiers:[{name:"offset",options:{offset:[0,4]}},{name:"flip",options:{fallbackPlacements:["top-start"]}},{name:"preventOverflow",options:{boundary:document.documentElement,padding:8}}]}))}_destroyPopper(){var e;(e=this._popperInstance)==null||e.destroy(),this._popperInstance=void 0}_showPopover(){var t;const e=this._popupEl;(t=e==null?void 0:e.showPopover)==null||t.call(e)}_hidePopover(){var t;const e=this._popupEl;try{(t=e==null?void 0:e.hidePopover)==null||t.call(e)}catch(o){}}_togglePopup(){if(!(this.disabled||this.readonly))if(this._isOpen)this._isOpen=!1;else{const[e,t]=this._parseValue(this.value);this._hour=e,this._minute=t,this._isOpen=!0}}_clearValue(e){e==null||e.stopPropagation(),this.value="",this._hour=0,this._minute=0,this._emit(""),this.dispatchEvent(new CustomEvent("clear",{bubbles:!0,composed:!0})),this._isOpen=!1}_setNow(){const e=new Date;this._hour=e.getHours(),this._minute=e.getMinutes(),this._syncValue()}_emit(e){var t;(t=this.onChange)==null||t.call(this,e),this.dispatchEvent(new CustomEvent("change",{bubbles:!0,composed:!0,detail:{value:e}})),this.dispatchEvent(new CustomEvent("lgsChange",{bubbles:!0,composed:!0,detail:{value:e}}))}_syncValue(){const e=`${this._pad(this._hour)}:${this._pad(this._minute)}`;this.value=e,this._emit(e)}_startSpin(e){e(),this._spinInterval=setInterval(e,120)}_stopSpin(){clearInterval(this._spinInterval),this._spinInterval=void 0}_renderPopup(){return p`
|
|
932
|
+
<div data-timepicker-popup popover="manual" class="timepicker__popup">
|
|
933
|
+
<div class="timepicker__spinner">
|
|
934
|
+
<!-- Sol sütun: saat -->
|
|
935
|
+
<div class="timepicker__col timepicker__col--left">
|
|
936
|
+
<button
|
|
937
|
+
class="timepicker__spin-btn"
|
|
938
|
+
@mousedown=${()=>this._startSpin(this._incrementHour)}
|
|
939
|
+
@mouseup=${this._stopSpin}
|
|
940
|
+
@mouseleave=${this._stopSpin}
|
|
941
|
+
@touchstart=${e=>{e.preventDefault(),this._startSpin(this._incrementHour)}}
|
|
942
|
+
@touchend=${this._stopSpin}
|
|
943
|
+
tabindex="-1"
|
|
944
|
+
aria-label="Saat artır"
|
|
945
|
+
><ui-icon name="uil-arrow-up" size="16"></ui-icon></button>
|
|
946
|
+
<div class="timepicker__time-unit">${this._pad(this._hour)}</div>
|
|
947
|
+
<button
|
|
948
|
+
class="timepicker__spin-btn"
|
|
949
|
+
@mousedown=${()=>this._startSpin(this._decrementHour)}
|
|
950
|
+
@mouseup=${this._stopSpin}
|
|
951
|
+
@mouseleave=${this._stopSpin}
|
|
952
|
+
@touchstart=${e=>{e.preventDefault(),this._startSpin(this._decrementHour)}}
|
|
953
|
+
@touchend=${this._stopSpin}
|
|
954
|
+
tabindex="-1"
|
|
955
|
+
aria-label="Saat azalt"
|
|
956
|
+
><ui-icon name="uil-arrow-down" size="16"></ui-icon></button>
|
|
957
|
+
</div>
|
|
319
958
|
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
`])),this.filterable&&this.multiple?m(vo||(vo=b([`
|
|
325
|
-
<input
|
|
326
|
-
class="combobox__search"
|
|
327
|
-
type="text"
|
|
328
|
-
placeholder=`,`
|
|
329
|
-
.value=`,`
|
|
330
|
-
@input=`,`
|
|
331
|
-
@keydown=`,`
|
|
332
|
-
@click=`,`
|
|
333
|
-
/>
|
|
334
|
-
`])),this.placeholder,this.inputValue,this._onFilterInput,this._handleKeydown,this._stopPropagation):O,this._filteredItems.length===0?m(bo||(bo=b(['<div class="combobox__empty">',"</div>"])),this.emptyMessage):this._filteredItems.map(function(r,o){return m(go||(go=b([`
|
|
335
|
-
<div
|
|
336
|
-
class="combobox__item
|
|
337
|
-
`,`
|
|
338
|
-
`,`"
|
|
339
|
-
@click=`,`
|
|
340
|
-
@mouseenter=`,`
|
|
341
|
-
>
|
|
342
|
-
`,`
|
|
343
|
-
`,`
|
|
344
|
-
</div>
|
|
345
|
-
`])),!t.multiple&&t.isSelected(r)?"combobox__item--selected":"",o===t.focusedIndex?"combobox__item--focused":"",function(i){return t._selectItem(r,i)},function(){t.focusedIndex=o},t.multiple?m(mo||(mo=b([`
|
|
346
|
-
<logosphere-checkbox
|
|
347
|
-
.checked=`,`
|
|
348
|
-
.value=`,`
|
|
349
|
-
@click=`,`
|
|
350
|
-
></logosphere-checkbox>
|
|
351
|
-
`])),t.isSelected(r),r[t.optionValue],t._stopPropagation):O,r[t.optionLabel])})):O}},{key:"render",value:function(){var t=["combobox__label",this.required&&!this.readOnly?"combobox__label--required":""].filter(Boolean).join(" "),r=["combobox__trigger","combobox__trigger--".concat(this.size),this.readOnly?"combobox__trigger--readonly":"",!this.readOnly&&this.isOpen?"combobox__trigger--open":""].filter(Boolean).join(" ");return m(_o||(_o=b([`
|
|
352
|
-
<div class="combobox">
|
|
353
|
-
`,`
|
|
959
|
+
<!-- Orta sütun: iki nokta -->
|
|
960
|
+
<div class="timepicker__col timepicker__col--sep">
|
|
961
|
+
<div class="timepicker__colon">:</div>
|
|
962
|
+
</div>
|
|
354
963
|
|
|
355
|
-
|
|
356
|
-
<div
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
964
|
+
<!-- Sağ sütun: dakika -->
|
|
965
|
+
<div class="timepicker__col timepicker__col--right">
|
|
966
|
+
<button
|
|
967
|
+
class="timepicker__spin-btn"
|
|
968
|
+
@mousedown=${()=>this._startSpin(this._incrementMinute)}
|
|
969
|
+
@mouseup=${this._stopSpin}
|
|
970
|
+
@mouseleave=${this._stopSpin}
|
|
971
|
+
@touchstart=${e=>{e.preventDefault(),this._startSpin(this._incrementMinute)}}
|
|
972
|
+
@touchend=${this._stopSpin}
|
|
973
|
+
tabindex="-1"
|
|
974
|
+
aria-label="Dakika artır"
|
|
975
|
+
><ui-icon name="uil-arrow-up" size="16"></ui-icon></button>
|
|
976
|
+
<div class="timepicker__time-unit">${this._pad(this._minute)}</div>
|
|
977
|
+
<button
|
|
978
|
+
class="timepicker__spin-btn"
|
|
979
|
+
@mousedown=${()=>this._startSpin(this._decrementMinute)}
|
|
980
|
+
@mouseup=${this._stopSpin}
|
|
981
|
+
@mouseleave=${this._stopSpin}
|
|
982
|
+
@touchstart=${e=>{e.preventDefault(),this._startSpin(this._decrementMinute)}}
|
|
983
|
+
@touchend=${this._stopSpin}
|
|
984
|
+
tabindex="-1"
|
|
985
|
+
aria-label="Dakika azalt"
|
|
986
|
+
><ui-icon name="uil-arrow-down" size="16"></ui-icon></button>
|
|
366
987
|
</div>
|
|
988
|
+
</div>
|
|
367
989
|
|
|
368
|
-
|
|
990
|
+
<!-- Action buttons -->
|
|
991
|
+
<div class="timepicker__actions">
|
|
992
|
+
<button
|
|
993
|
+
class="timepicker__action-btn"
|
|
994
|
+
@click=${this._setNow}
|
|
995
|
+
title="Şu anki saati seç"
|
|
996
|
+
>
|
|
997
|
+
<ui-icon name="uil-calendar-alt" size="16"></ui-icon>
|
|
998
|
+
</button>
|
|
999
|
+
<button
|
|
1000
|
+
class="timepicker__action-btn"
|
|
1001
|
+
@click=${()=>this._clearValue()}
|
|
1002
|
+
title="Temizle"
|
|
1003
|
+
>
|
|
1004
|
+
<ui-icon name="uil-trash" size="16"></ui-icon>
|
|
1005
|
+
</button>
|
|
1006
|
+
<button
|
|
1007
|
+
class="timepicker__action-btn"
|
|
1008
|
+
@click=${()=>{this._isOpen=!1}}
|
|
1009
|
+
title="Kapat"
|
|
1010
|
+
>
|
|
1011
|
+
<ui-icon name="uil-times" size="16"></ui-icon>
|
|
1012
|
+
</button>
|
|
369
1013
|
</div>
|
|
370
1014
|
</div>
|
|
371
|
-
`
|
|
372
|
-
|
|
373
|
-
`])),this.inputId,t,this.label):O,r,this.readOnly||this.filterable?-1:0,this._onTriggerClick,this.filterable?O:this._handleKeydown,this._renderTriggerContent(),this.isOpen?"combobox__chevron--open":"",this._renderDropdown())}}])})(Z),c.Combobox.styles=[ee(wo||(wo=b(["",""])),Q(sl))],re([f({type:String})],c.Combobox.prototype,"label",2),re([f({type:String})],c.Combobox.prototype,"placeholder",2),re([f({type:Boolean})],c.Combobox.prototype,"required",2),re([f({type:Boolean})],c.Combobox.prototype,"readOnly",2),re([f({type:Boolean})],c.Combobox.prototype,"multiple",2),re([f({type:Boolean})],c.Combobox.prototype,"filterable",2),re([f({type:String})],c.Combobox.prototype,"optionLabel",2),re([f({type:String})],c.Combobox.prototype,"optionValue",2),re([f({type:String})],c.Combobox.prototype,"emptyMessage",2),re([f({type:Array})],c.Combobox.prototype,"items",2),re([f({type:String})],c.Combobox.prototype,"size",2),re([z()],c.Combobox.prototype,"selected",2),re([z()],c.Combobox.prototype,"inputValue",2),re([z()],c.Combobox.prototype,"isOpen",2),re([z()],c.Combobox.prototype,"focusedIndex",2),c.Combobox=re([te("logosphere-combobox")],c.Combobox);const dl=":host{display:block;z-index:9999}.chatbot{font-family:var(--font-family-base)}.chatbot__overlay{position:fixed;inset:0;background-color:#0003;z-index:var(--z-index-modal-backdrop)}.chatbot__launcher{position:fixed;z-index:var(--z-index-modal);display:flex;align-items:center;gap:var(--spacing-4);padding-left:var(--spacing-4);padding-right:var(--spacing-4);height:66px;color:#fff;border-radius:var(--radius-xl);cursor:pointer;box-shadow:var(--shadow-base);background-color:var(--color-body-bg);overflow:hidden;transition:box-shadow var(--transition-speed-fast) var(--transition-timing)}.chatbot__launcher:hover{box-shadow:var(--shadow-md)}.chatbot__launcher--draggable{cursor:move}.chatbot__launcher--hidden{visibility:hidden;width:72px;height:66px;justify-content:center;padding:0}.chatbot__launcher-icon{width:40px;height:34px;flex-shrink:0}.chatbot__launcher-text{display:flex;flex-direction:column}.chatbot__launcher-title{font-weight:var(--font-weight-semibold);font-size:var(--font-size-xl);margin:0;line-height:24px;white-space:nowrap;color:var(--color-body-text)}.chatbot__launcher-subtitle{font-weight:var(--font-weight-semibold);font-size:var(--font-size-sm);margin:0;line-height:20px;white-space:nowrap;color:var(--color-tertiary)}.chatbot__window{position:fixed;z-index:var(--z-index-modal);display:flex;flex-direction:column;box-shadow:var(--shadow-xl);border-radius:var(--radius-md);overflow:hidden;background-color:var(--color-body-bg)}.chatbot__window--hidden{display:none}.chatbot__window--fullscreen{inset:80px 50px;width:auto;height:auto}.chatbot__resize-top{position:absolute;top:0;left:0;right:0;height:8px;cursor:ns-resize;z-index:50;transition:background-color var(--transition-speed-fast) var(--transition-timing)}.chatbot__resize-top:hover{background-color:#0000000d}.chatbot__resize-side{position:absolute;top:0;bottom:0;width:8px;cursor:ew-resize;z-index:50;transition:background-color var(--transition-speed-fast) var(--transition-timing)}.chatbot__resize-side:hover{background-color:#0000000d}.chatbot__resize-side--left{left:0}.chatbot__resize-side--right{right:0}.chatbot__resize-corner{position:absolute;top:0;width:16px;height:16px;z-index:50;transition:background-color var(--transition-speed-fast) var(--transition-timing)}.chatbot__resize-corner:hover{background-color:#0000001a}.chatbot__resize-corner--nwse{left:0;cursor:nwse-resize}.chatbot__resize-corner--nesw{right:0;cursor:nesw-resize}.chatbot__header{height:74px;display:flex;align-items:center;justify-content:space-between;padding-left:var(--spacing-5);padding-right:var(--spacing-4);gap:var(--spacing-4);flex-shrink:0;background-color:var(--color-body-bg);border-bottom:1px solid var(--color-border)}.chatbot__header-info{display:flex;align-items:center;gap:var(--spacing-4)}.chatbot__header-logo{width:50px;height:41px}.chatbot__header-title{font-weight:var(--font-weight-semibold);font-size:var(--font-size-xl);margin:0;line-height:24px;color:var(--color-body-text)}.chatbot__header-subtitle{font-weight:var(--font-weight-semibold);font-size:var(--font-size-sm);margin:0;line-height:20px;color:var(--color-tertiary)}.chatbot__header-actions{display:flex;align-items:center;gap:var(--spacing-2)}.chatbot__body{flex:1;display:flex;flex-direction:column;background-color:var(--color-body-bg);position:relative;overflow:hidden}.chatbot__product{padding:var(--spacing-3);padding-bottom:0;flex-shrink:0;margin:0 var(--spacing-3)}.chatbot__messages{flex:1;display:flex;flex-direction:column;gap:var(--spacing-3);margin-top:var(--spacing-4);padding:var(--spacing-4);overflow-y:auto;scrollbar-width:none;-ms-overflow-style:none}.chatbot__messages::-webkit-scrollbar{display:none}.chatbot__message{display:flex}.chatbot__message--user{justify-content:flex-end}.chatbot__message--assistant,.chatbot__message--system{justify-content:flex-start}.chatbot__bubble{position:relative;color:var(--color-body-text);max-width:85%;border-radius:var(--radius-md);padding:var(--spacing-4);font-size:var(--font-size-sm);line-height:20px;font-weight:var(--font-weight-medium)}.chatbot__bubble--user{background-color:var(--color-primary);color:#fff;border-bottom-right-radius:0;border-top-right-radius:var(--radius-xl);border-top-left-radius:var(--radius-xl);border-bottom-left-radius:var(--radius-xl)}.chatbot__bubble--user a{color:#ffffffe6}.chatbot__bubble--assistant,.chatbot__bubble--system{background-color:var(--color-tertiary-bg);border-bottom-left-radius:0;border-top-right-radius:var(--radius-xl);border-top-left-radius:var(--radius-xl);border-bottom-right-radius:var(--radius-xl)}.chatbot__message-content p{margin:0}.chatbot__message-content ol{list-style-type:decimal;margin:0;padding-left:var(--spacing-5)}.chatbot__message-content ul{list-style-type:disc;margin:0;padding-left:var(--spacing-5)}.chatbot__message-content li{padding-left:var(--spacing-1)}.chatbot__message-content a{color:var(--color-primary);text-decoration:underline;transition:color var(--transition-speed-fast) var(--transition-timing)}.chatbot__message-content a:hover{color:var(--color-primary-hover)}.chatbot__feedback{display:flex;align-items:center;gap:var(--spacing-2);padding-top:var(--spacing-2)}.chatbot__typing-wrapper{display:flex;justify-content:flex-start}.chatbot__typing{background-color:var(--color-tertiary-bg);padding:var(--spacing-3);border-radius:var(--radius-xl);border-bottom-left-radius:0;display:inline-flex;align-items:center;gap:2px}.chatbot__typing-dot{display:inline-block;width:6px;height:6px;background-color:var(--color-gray-300);border-radius:var(--radius-full);animation:chatbot-typing 1.4s infinite ease-in-out both;margin:0 2px}.chatbot__typing-dot:nth-child(1){animation-delay:-.32s}.chatbot__typing-dot:nth-child(2){animation-delay:-.16s}@keyframes chatbot-typing{0%,80%,to{transform:scale(0)}40%{transform:scale(1)}}.chatbot__input-area{padding:var(--spacing-4);padding-top:var(--spacing-2);padding-bottom:var(--spacing-1);background-color:var(--color-body-bg)}.chatbot__input-wrapper{position:relative;display:flex;align-items:center;gap:var(--spacing-2);background-color:var(--color-tertiary-bg);border-radius:var(--radius-md);padding:var(--spacing-2);border:1px solid transparent;transition:background-color var(--transition-speed-fast) var(--transition-timing),border-color var(--transition-speed-fast) var(--transition-timing)}.chatbot__input-wrapper:focus-within{background-color:var(--color-body-bg);border-color:var(--color-border)}.chatbot__input{flex:1;background:transparent;border:none;outline:none;font-family:var(--font-family-base);font-size:var(--font-size-sm);color:var(--color-body-text)}.chatbot__input::placeholder{color:var(--color-tertiary)}.chatbot__input:disabled{opacity:.5;cursor:not-allowed}.chatbot__footer{display:flex;align-items:center;justify-content:center;padding-bottom:var(--spacing-2)}.chatbot__footer-text{margin:0;padding:0;color:var(--color-secondary);font-size:var(--font-size-xs);font-family:var(--font-family-base)}";var ko,xo,Co,$o,Oo,Eo,So,Do,zo,Ao,Mo,Po,To,jo,Lo,Bo,ul=Object.defineProperty,pl=Object.getOwnPropertyDescriptor,q=function(n,e,t,r){for(var o=r>1?void 0:r?pl(e,t):e,i=n.length-1,s;i>=0;i--)(s=n[i])&&(o=(r?s(e,t,o):s(o))||o);return r&&o&&ul(e,t,o),o};c.LedsUiChatbot=(function(a){function n(){var e;return j(this,n),e=H(this,n,arguments),e.returnUri="",e.questionPrompt="",e.minimizedIconOnly=!1,e.draggable=!1,e.resizable=!1,e.products=[],e.openInitially=!1,e.showFeedbackButtons=!1,e.open=!1,e.fullscreen=!1,e.messages=[],e.isLoading=!1,e.inputText="",e.selectedProductId="",e.windowWidth=440,e.windowHeight=Math.min(700,window.innerHeight-40),e.position={right:20,bottom:20},e.isDragging=!1,e.screenWidth=window.innerWidth,e.dragStartPos={x:0,y:0},e.initialPosition={right:0,bottom:0},e.isResizing=!1,e.resizeDirection="horizontal",e.resizeStartWidth=0,e.resizeStartHeight=0,e.onWindowResize=function(){e.screenWidth=window.innerWidth;var t=window.innerHeight-40;e.windowHeight>t&&(e.windowHeight=t)},e.onToggle=function(){e.open=!e.open,e.scrollToBottom()},e.onClose=function(){e.open=!1,e.fullscreen=!1},e.onToggleFullscreen=function(){e.fullscreen=!e.fullscreen},e.onMouseMove=function(t){if(e.isDragging){var r,o=e.dragStartPos.x-t.clientX,i=e.dragStartPos.y-t.clientY,s=(r=e.shadowRoot)===null||r===void 0?void 0:r.querySelector(".chatbot__launcher"),l=s==null?void 0:s.getBoundingClientRect(),d=(l==null?void 0:l.width)||72,u=(l==null?void 0:l.height)||66;e.position={right:Math.max(0,Math.min(window.innerWidth-d,e.initialPosition.right+o)),bottom:Math.max(0,Math.min(window.innerHeight-u,e.initialPosition.bottom+i))}}else if(e.isResizing){var p=e.dragStartPos.x-t.clientX,h=e.dragStartPos.y-t.clientY;if(e.resizeDirection==="horizontal"||e.resizeDirection==="both"){var g=e.position.right<e.screenWidth/2;e.windowWidth=Math.max(300,e.resizeStartWidth+(g?p:-p))}(e.resizeDirection==="vertical"||e.resizeDirection==="both")&&(e.windowHeight=Math.max(400,e.resizeStartHeight+h))}},e.onMouseUp=function(t){if(e.isDragging){e.isDragging=!1,window.removeEventListener("mousemove",e.onMouseMove),window.removeEventListener("mouseup",e.onMouseUp);var r=Math.hypot(t.clientX-e.dragStartPos.x,t.clientY-e.dragStartPos.y);r<5&&e.onToggle()}else e.isResizing&&(e.isResizing=!1,window.removeEventListener("mousemove",e.onMouseMove),window.removeEventListener("mouseup",e.onMouseUp))},e.handleKeyDown=function(t){t.key==="Enter"&&!t.shiftKey&&(t.preventDefault(),e.sendMessage())},e.onInput=function(t){var r=t.target;e.inputText=r?r.value:t.detail},e.onCopyMessage=function(t){navigator.clipboard.writeText(t)},e}return N(n,a),L(n,[{key:"connectedCallback",value:function(){X(n,"connectedCallback",this)([]),window.addEventListener("resize",this.onWindowResize)}},{key:"disconnectedCallback",value:function(){X(n,"disconnectedCallback",this)([]),window.removeEventListener("resize",this.onWindowResize),window.removeEventListener("mousemove",this.onMouseMove),window.removeEventListener("mouseup",this.onMouseUp)}},{key:"firstUpdated",value:(function(){var e=de(F().m(function r(){return F().w(function(o){for(;;)switch(o.n){case 0:if(this.products.length===1&&(this.selectedProductId=this.products[0].id),this.open=this.openInitially,!this.open){o.n=1;break}return o.n=1,this.initConversation();case 1:return o.a(2)}},r,this)}));function t(){return e.apply(this,arguments)}return t})()},{key:"updated",value:function(t){t.has("products")&&this.handleProductUpdate(),t.has("messages")&&this.scrollToBottom(),t.has("open")&&this.open&&!this.conversationId&&this.initConversation()}},{key:"handleProductUpdate",value:function(){var t=this;if(this.products.length){var r=this.products.some(function(o){return o.id===t.selectedProductId});this.products.length===1&&(this.selectedProductId=this.products[0].id),r||(this.messages=[],this.conversationId=void 0,this.open&&this.initConversation()),requestAnimationFrame(function(){return t.updateComboboxItems()})}}},{key:"updateComboboxItems",value:function(){var t,r,o=this.productEl;if(!(!o||((t=this.products)===null||t===void 0?void 0:t.length)<=1)){var i=this.products.map(function(p){return{value:p.id,label:p.name}});o.items=i;var s=((r=o.selectedItems)===null||r===void 0?void 0:r.call(o))||[];if(s.length>0){var l,d=(l=s[0])===null||l===void 0?void 0:l.value,u=this.products.some(function(p){return p.id===d});!u&&o.setSelected&&o.setSelected([])}}}},{key:"onProductChange",value:(function(){var e=de(F().m(function r(o){var i,s,l,d;return F().w(function(u){for(;;)switch(u.n){case 0:d=(i=o.detail)===null||i===void 0||(s=i.selected)===null||s===void 0||(l=s[0])===null||l===void 0?void 0:l.value,d&&d!==this.selectedProductId&&(this.selectedProductId=d);case 1:return u.a(2)}},r,this)}));function t(r){return e.apply(this,arguments)}return t})()},{key:"onMouseDown",value:function(t){this.draggable&&(t.preventDefault(),this.isDragging=!0,this.dragStartPos={x:t.clientX,y:t.clientY},this.initialPosition=ct({},this.position),window.addEventListener("mousemove",this.onMouseMove),window.addEventListener("mouseup",this.onMouseUp))}},{key:"startResize",value:function(t,r){this.resizable&&(t.preventDefault(),t.stopPropagation(),this.isResizing=!0,this.resizeDirection=r,this.dragStartPos={x:t.clientX,y:t.clientY},this.resizeStartWidth=this.windowWidth,this.resizeStartHeight=this.windowHeight,window.addEventListener("mousemove",this.onMouseMove),window.addEventListener("mouseup",this.onMouseUp))}},{key:"ensureToken",value:(function(){var e=de(F().m(function r(){var o,i,s,l,d,u,p=arguments;return F().w(function(h){for(;;)switch(h.n){case 0:if(i=p.length>0&&p[0]!==void 0?p[0]:!1,s="logosphere_chatbot_token",i&&(this.assertionToken=void 0,localStorage.removeItem(s)),i){h.n=1;break}if(l=localStorage.getItem(s),!l){h.n=1;break}return this.assertionToken=l,h.a(2);case 1:return h.n=2,fetch("".concat(this.returnUri,"/api/chat/start"));case 2:return d=h.v,h.n=3,d.json();case 3:if(u=h.v,!(!u.Success||!((o=u.Data)!==null&&o!==void 0&&o.Token))){h.n=4;break}throw new Error("Token alınamadı");case 4:this.assertionToken=u.Data.Token,localStorage.setItem(s,this.assertionToken);case 5:return h.a(2)}},r,this)}));function t(){return e.apply(this,arguments)}return t})()},{key:"postChat",value:(function(){var e=de(F().m(function r(o){var i=this,s,l,d;return F().w(function(u){for(;;)switch(u.n){case 0:return u.n=1,this.ensureToken();case 1:return s="".concat(this.returnUri,"/api/chat/completions"),l=function(){return fetch(s,{method:"POST",headers:{"Content-Type":"application/json",client_assertion:i.assertionToken,client_assertion_type:"urn:ietf:params:oauth:client-assertion-type:jwt-bearer"},body:JSON.stringify(o)})},u.n=2,l();case 2:if(d=u.v,d.status!==401){u.n=5;break}return u.n=3,this.ensureToken(!0);case 3:return u.n=4,l();case 4:d=u.v;case 5:if(d.ok){u.n=6;break}throw new Error("HTTP ".concat(d.status));case 6:return u.a(2,d.json())}},r,this)}));function t(r){return e.apply(this,arguments)}return t})()},{key:"initConversation",value:(function(){var e=de(F().m(function r(){var o,i,s,l,d;return F().w(function(u){for(;;)switch(u.p=u.n){case 0:if(!this.isLoading){u.n=1;break}return u.a(2);case 1:return this.isLoading=!0,u.p=2,u.n=3,this.ensureToken();case 3:return u.n=4,this.postChat({ChatCompletionType:"NewConversation",Context:this.selectedProductId,QuestionPrompt:this.questionPrompt});case 4:l=u.v,this.conversationId=l.Data.ConversationId,d=(o=l.Data.Choices)===null||o===void 0||(i=o[0])===null||i===void 0||(s=i.Message)===null||s===void 0?void 0:s.Content,d&&this.addMessage(d,"assistant"),u.n=6;break;case 5:u.p=5,u.v,this.addMessage("Bir hata oluştu, lütfen tekrar deneyiniz.","system");case 6:return u.p=6,this.isLoading=!1,u.f(6);case 7:return u.a(2)}},r,this,[[2,5,6,7]])}));function t(){return e.apply(this,arguments)}return t})()},{key:"sendMessage",value:(function(){var e=de(F().m(function r(){var o,i,s,l,d,u,p;return F().w(function(h){for(;;)switch(h.p=h.n){case 0:if(o=this.inputText.trim(),!(!o||!this.conversationId||this.isLoading)){h.n=1;break}return h.a(2);case 1:if(this.selectedProductId){h.n=2;break}return this.addMessage("Lütfen önce bir ürün seçiniz.","system"),h.a(2);case 2:return this.addMessage(o,"user"),this.inputText="",this.isLoading=!0,h.p=3,h.n=4,this.postChat({ChatCompletionType:"ConversationUpdate",Content:o,Context:this.selectedProductId,ConversationId:this.conversationId,QuestionPrompt:this.questionPrompt});case 4:u=h.v,p=(i=u.Data)===null||i===void 0||(s=i.Choices)===null||s===void 0||(l=s[0])===null||l===void 0||(d=l.Message)===null||d===void 0?void 0:d.Content,this.addMessage(p||"Cevap alınamadı.","assistant"),h.n=6;break;case 5:h.p=5,h.v,this.addMessage("Bağlantı hatası.","system");case 6:return h.p=6,this.isLoading=!1,h.f(6);case 7:return h.a(2)}},r,this,[[3,5,6,7]])}));function t(){return e.apply(this,arguments)}return t})()},{key:"addMessage",value:function(t,r){this.messages=[].concat(ve(this.messages),[{content:t,role:r,timestamp:Date.now()}])}},{key:"scrollToBottom",value:function(){var t=this;setTimeout(function(){t.chatContainer&&(t.chatContainer.scrollTop=t.chatContainer.scrollHeight)},0)}},{key:"formatContent",value:function(t){if(!t)return"";var r=t.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">"),o=r.split(`
|
|
374
|
-
|
|
1015
|
+
`}render(){return p`
|
|
1016
|
+
<div class="timepicker__reference">
|
|
1017
|
+
<logosphere-input
|
|
1018
|
+
.label=${this.label}
|
|
1019
|
+
.helper=${this.helper}
|
|
1020
|
+
.error=${this.error}
|
|
1021
|
+
.required=${this.required}
|
|
1022
|
+
.disabled=${this.disabled}
|
|
1023
|
+
.readonly=${this.readonly}
|
|
1024
|
+
.size=${this.size}
|
|
1025
|
+
.variant=${this.variant}
|
|
1026
|
+
.placeholder=${this.placeholder}
|
|
1027
|
+
.value=${this.value}
|
|
1028
|
+
mask="00:00"
|
|
1029
|
+
@input=${this._handleInputChange}
|
|
1030
|
+
@clear=${this._handleInputClear}
|
|
1031
|
+
@change=${e=>e.stopPropagation()}
|
|
1032
|
+
>
|
|
1033
|
+
<button
|
|
1034
|
+
slot="suffix"
|
|
1035
|
+
type="button"
|
|
1036
|
+
class="timepicker__trigger ${this._isOpen?"timepicker__trigger--active":""}"
|
|
1037
|
+
@click=${this._togglePopup}
|
|
1038
|
+
?disabled=${this.disabled}
|
|
1039
|
+
tabindex=${this.disabled?"-1":"0"}
|
|
1040
|
+
aria-label="Saat seç"
|
|
1041
|
+
aria-expanded=${this._isOpen?"true":"false"}
|
|
1042
|
+
>
|
|
1043
|
+
<ui-icon name="uil-clock" size="16"></ui-icon>
|
|
1044
|
+
</button>
|
|
1045
|
+
</logosphere-input>
|
|
1046
|
+
</div>
|
|
1047
|
+
|
|
1048
|
+
${this._renderPopup()}
|
|
1049
|
+
`}},a.TimePicker.styles=[D`${A(Oa)}`],K([d({type:String})],a.TimePicker.prototype,"value",2),K([d({type:String})],a.TimePicker.prototype,"label",2),K([d({type:String})],a.TimePicker.prototype,"helper",2),K([d({type:String})],a.TimePicker.prototype,"error",2),K([d({type:String})],a.TimePicker.prototype,"placeholder",2),K([d({type:Boolean})],a.TimePicker.prototype,"required",2),K([d({type:Boolean})],a.TimePicker.prototype,"disabled",2),K([d({type:Boolean})],a.TimePicker.prototype,"readonly",2),K([d({type:String})],a.TimePicker.prototype,"size",2),K([d({type:String})],a.TimePicker.prototype,"variant",2),K([d({attribute:!1})],a.TimePicker.prototype,"onChange",2),K([m()],a.TimePicker.prototype,"_isOpen",2),K([m()],a.TimePicker.prototype,"_hour",2),K([m()],a.TimePicker.prototype,"_minute",2),K([F(".timepicker__reference")],a.TimePicker.prototype,"_referenceEl",2),K([F("[data-timepicker-popup]")],a.TimePicker.prototype,"_popupEl",2),a.TimePicker=K([M("logosphere-timepicker")],a.TimePicker);const Ba=":host{display:block;z-index:9999}.chatbot{font-family:var(--font-family-base)}.chatbot__overlay{position:fixed;top:0;right:0;bottom:0;left:0;background-color:#0003;z-index:var(--z-index-modal-backdrop)}.chatbot__launcher{position:fixed;z-index:var(--z-index-modal);display:flex;align-items:center;gap:var(--spacing-4);padding-left:var(--spacing-4);padding-right:var(--spacing-4);height:66px;color:#fff;border-radius:var(--radius-xl);cursor:pointer;box-shadow:var(--shadow-md);background-color:var(--chatbot-bg, var(--color-body-bg));overflow:hidden;transition:box-shadow var(--transition-speed-fast) var(--transition-timing)}.chatbot__launcher:hover{box-shadow:var(--shadow-md)}.chatbot__launcher--draggable{cursor:move}.chatbot__launcher--hidden{visibility:hidden;width:72px;height:66px;justify-content:center;padding:0}.chatbot__launcher-icon{width:40px;height:34px;flex-shrink:0}.chatbot__launcher-text{display:flex;flex-direction:column}.chatbot__launcher-title{font-weight:var(--font-weight-semibold);font-size:var(--font-size-xl);margin:0;line-height:24px;white-space:nowrap;color:var(--color-body-color)}.chatbot__launcher-subtitle{font-weight:var(--font-weight-semibold);font-size:var(--font-size-sm);margin:0;line-height:20px;white-space:nowrap;color:var(--color-tertiary)}.chatbot__window{position:fixed;z-index:var(--z-index-modal);display:flex;flex-direction:column;box-shadow:var(--shadow-xl);border-radius:var(--radius-md);overflow:hidden;background-color:var(--chatbot-bg, var(--color-body-bg))}.chatbot__window--hidden{display:none}.chatbot__window--fullscreen{left:50px;right:50px;top:80px;bottom:80px;width:auto;height:auto}.chatbot__resize-top{position:absolute;top:0;left:0;right:0;height:8px;cursor:ns-resize;z-index:50;transition:background-color var(--transition-speed-fast) var(--transition-timing)}.chatbot__resize-top:hover{background-color:#0000000d}.chatbot__resize-side{position:absolute;top:0;bottom:0;width:8px;cursor:ew-resize;z-index:50;transition:background-color var(--transition-speed-fast) var(--transition-timing)}.chatbot__resize-side:hover{background-color:#0000000d}.chatbot__resize-side--left{left:0}.chatbot__resize-side--right{right:0}.chatbot__resize-corner{position:absolute;top:0;width:16px;height:16px;z-index:50;transition:background-color var(--transition-speed-fast) var(--transition-timing)}.chatbot__resize-corner:hover{background-color:#0000001a}.chatbot__resize-corner--nwse{left:0;cursor:nwse-resize}.chatbot__resize-corner--nesw{right:0;cursor:nesw-resize}.chatbot__header{height:74px;display:flex;align-items:center;justify-content:space-between;padding-left:var(--spacing-5);padding-right:var(--spacing-4);gap:var(--spacing-4);flex-shrink:0;background-color:var(--chatbot-bg, var(--color-body-bg));border-bottom:1px solid var(--color-border)}.chatbot__header-info{display:flex;align-items:center;gap:var(--spacing-4)}.chatbot__header-logo{width:50px;height:41px}.chatbot__header-title{font-weight:var(--font-weight-semibold);font-size:var(--font-size-xl);margin:0;line-height:24px;color:var(--color-body-text)}.chatbot__header-subtitle{font-weight:var(--font-weight-semibold);font-size:var(--font-size-sm);margin:0;line-height:20px;color:var(--color-tertiary)}.chatbot__header-actions{display:flex;align-items:center;gap:var(--spacing-2)}.chatbot__body{flex:1;display:flex;flex-direction:column;background-color:var(--chatbot-bg, var(--color-body-bg));position:relative;overflow:hidden}.chatbot__product{padding:var(--spacing-3);padding-bottom:0;flex-shrink:0;margin:0 var(--spacing-3)}.chatbot__messages{flex:1;display:flex;flex-direction:column;gap:var(--spacing-3);margin-top:var(--spacing-4);padding:var(--spacing-4);overflow-y:auto;scrollbar-width:none;-ms-overflow-style:none}.chatbot__messages::-webkit-scrollbar{display:none}.chatbot__messages-wrapper{position:relative;flex:1;display:flex;flex-direction:column;overflow:hidden}.chatbot__scroll-down{position:absolute;bottom:8px;left:50%;transform:translate(-50%);width:36px;height:36px;border-radius:var(--radius-full);background-color:var(--chatbot-bg, var(--color-body-bg));border:1px solid var(--color-border);box-shadow:var(--shadow-md);cursor:pointer;display:flex;align-items:center;justify-content:center;color:var(--color-body-text);z-index:10;transition:background-color var(--transition-speed-fast) var(--transition-timing),box-shadow var(--transition-speed-fast) var(--transition-timing);padding:0}.chatbot__scroll-down:hover{background-color:var(--color-light);box-shadow:var(--shadow-lg)}.chatbot__message{display:flex}.chatbot__message--user{justify-content:flex-end}.chatbot__message--assistant{display:block}.chatbot__message--system{justify-content:flex-start}.chatbot__bubble{position:relative;color:var(--color-body-text);max-width:85%;border-radius:var(--radius-md);padding:var(--spacing-4);font-size:var(--font-size-sm);line-height:20px;font-weight:var(--font-weight-medium)}.chatbot__bubble--user{background-color:var(--color-primary);color:#fff;border-bottom-right-radius:0;border-top-right-radius:var(--radius-xl);border-top-left-radius:var(--radius-xl);border-bottom-left-radius:var(--radius-xl)}.chatbot__bubble--user a{color:#ffffffe6}.chatbot__bubble--assistant,.chatbot__bubble--system{background-color:var(--color-light);border-bottom-left-radius:0;border-top-right-radius:var(--radius-xl);border-top-left-radius:var(--radius-xl);border-bottom-right-radius:var(--radius-xl)}.chatbot__message-content p{margin:0}.chatbot__message-content ol{list-style-type:decimal;margin:0;padding-left:var(--spacing-5)}.chatbot__message-content ul{list-style-type:disc;margin:0;padding-left:var(--spacing-5)}.chatbot__message-content li>ol,.chatbot__message-content li>ul{margin-top:var(--spacing-1);margin-bottom:var(--spacing-1)}.chatbot__message-content ol ol{list-style-type:lower-alpha}.chatbot__message-content ol ol ol{list-style-type:lower-roman}.chatbot__message-content ul ul{list-style-type:circle}.chatbot__message-content ul ul ul{list-style-type:square}.chatbot__message-content li{padding-left:var(--spacing-1)}.chatbot__message-content a{color:var(--color-primary);text-decoration:underline;transition:color var(--transition-speed-fast) var(--transition-timing)}.chatbot__message-content a:hover{color:var(--color-primary-hover)}.chatbot__feedback{display:flex;align-items:center;gap:var(--spacing-2);padding-top:var(--spacing-2)}.chatbot__typing-wrapper{display:flex;justify-content:flex-start}.chatbot__typing{background-color:var(--color-light);padding:var(--spacing-3);border-radius:var(--radius-xl);border-bottom-left-radius:0;display:inline-flex;align-items:center;gap:2px}.chatbot__typing-dot{display:inline-block;width:6px;height:6px;background-color:var(--color-gray-300);border-radius:var(--radius-full);animation:chatbot-typing 1.4s infinite ease-in-out both;margin:0 2px}.chatbot__typing-dot:nth-child(1){animation-delay:-.32s}.chatbot__typing-dot:nth-child(2){animation-delay:-.16s}@keyframes chatbot-typing{0%,80%,to{transform:scale(0)}40%{transform:scale(1)}}.chatbot__input-area{padding:var(--spacing-4);padding-top:var(--spacing-2);padding-bottom:var(--spacing-1);background-color:var(--chatbot-bg, var(--color-body-bg))}.chatbot__input-wrapper{position:relative;display:flex;align-items:center;gap:var(--spacing-2);background-color:var(--color-light);border-radius:var(--radius-md);padding:var(--spacing-2);border:1px solid transparent;transition:background-color var(--transition-speed-fast) var(--transition-timing),border-color var(--transition-speed-fast) var(--transition-timing)}.chatbot__input-wrapper:focus-within{background-color:var(--chatbot-bg, var(--color-body-bg));border-color:var(--color-border)}.chatbot__input{flex:1;background:transparent;border:none;outline:none;font-family:var(--font-family-base);font-size:var(--font-size-sm);color:var(--color-body-text)}.chatbot__input::placeholder{color:var(--color-tertiary)}.chatbot__input:disabled{opacity:.5;cursor:not-allowed}.chatbot__footer{display:flex;align-items:center;justify-content:center;padding-bottom:var(--spacing-2)}.chatbot__footer-text{margin:0;padding:0;color:var(--chatbot-color, var(--color-secondary));font-size:var(--font-size-xs);font-family:var(--font-family-base)}.chatbot__product-selector{padding:var(--spacing-3) var(--spacing-3) 0;flex-shrink:0}.chatbot__product-input{display:block;width:100%;height:24px;padding-left:var(--spacing-1);border:1px solid var(--color-border);border-radius:var(--radius-md);background:transparent;color:var(--color-body-color);font-size:var(--font-size-md);outline:none}";var Ia=Object.defineProperty,Ra=Object.getOwnPropertyDescriptor,N=(r,e,t,o)=>{for(var i=o>1?void 0:o?Ra(e,t):e,s=r.length-1,n;s>=0;s--)(n=r[s])&&(i=(o?n(e,t,i):n(i))||i);return o&&i&&Ia(e,t,i),i};a.LogosphereChatBot=class extends E{constructor(){super(...arguments),this.returnUri="",this.questionPrompt="",this.minimizedIconOnly=!1,this.draggable=!1,this.resizable=!1,this.products=[],this.openInitially=!1,this.showFeedbackButtons=!1,this.open=!1,this.fullscreen=!1,this.messages=[],this.isLoading=!1,this.inputText="",this.selectedProductId="",this.windowWidth=440,this.windowHeight=700,this.position={right:20,bottom:20},this.isDragging=!1,this.screenWidth=1024,this.userAtBottom=!0,this.showScrollDown=!1,this.dragStartPos={x:0,y:0},this.initialPosition={right:0,bottom:0},this.isResizing=!1,this.resizeDirection="horizontal",this.resizeStartWidth=0,this.resizeStartHeight=0,this.onWindowResize=()=>{this.screenWidth=window.innerWidth;const e=window.innerHeight-40;this.windowHeight>e&&(this.windowHeight=e)},this.onToggle=()=>{this.open=!this.open,this.open&&this.scrollToBottom(!0)},this.onClose=()=>{this.open=!1,this.fullscreen=!1},this.onToggleFullscreen=()=>{this.fullscreen=!this.fullscreen},this.onMouseMove=e=>{var t;if(this.isDragging){const o=this.dragStartPos.x-e.clientX,i=this.dragStartPos.y-e.clientY,s=(t=this.shadowRoot)==null?void 0:t.querySelector(".chatbot__launcher"),n=s==null?void 0:s.getBoundingClientRect(),l=(n==null?void 0:n.width)||72,c=(n==null?void 0:n.height)||66;this.position={right:Math.max(0,Math.min(window.innerWidth-l,this.initialPosition.right+o)),bottom:Math.max(0,Math.min(window.innerHeight-c,this.initialPosition.bottom+i))}}else if(this.isResizing){const o=this.dragStartPos.x-e.clientX,i=this.dragStartPos.y-e.clientY;if(this.resizeDirection==="horizontal"||this.resizeDirection==="both"){const s=this.position.right<this.screenWidth/2;this.windowWidth=Math.max(300,this.resizeStartWidth+(s?o:-o))}(this.resizeDirection==="vertical"||this.resizeDirection==="both")&&(this.windowHeight=Math.max(400,this.resizeStartHeight+i))}},this.onMouseUp=e=>{this.isDragging?(this.isDragging=!1,window.removeEventListener("mousemove",this.onMouseMove),window.removeEventListener("mouseup",this.onMouseUp),Math.hypot(e.clientX-this.dragStartPos.x,e.clientY-this.dragStartPos.y)<5&&this.onToggle()):this.isResizing&&(this.isResizing=!1,window.removeEventListener("mousemove",this.onMouseMove),window.removeEventListener("mouseup",this.onMouseUp))},this.handleKeyDown=e=>{e.key==="Enter"&&!e.shiftKey&&(e.preventDefault(),this.sendMessage())},this.onInput=e=>{const t=e.target;this.inputText=t?t.value:e.detail},this.onChatScroll=()=>{const e=this.isNearBottom();this.userAtBottom=e,e&&(this.showScrollDown=!1)},this.onScrollToBottomClick=()=>{this.scrollToBottom(!0)},this.onRate=async(e,t)=>{if(!(!e.eventId||e.rating===t))try{await this.rateMessage(e.eventId,t),this.messages=this.messages.map(o=>o===e?Me($e({},o),{rating:t}):o)}catch(o){}},this.onCopyMessage=e=>{navigator.clipboard.writeText(e)}}connectedCallback(){super.connectedCallback(),this.screenWidth=window.innerWidth,this.windowHeight=Math.min(700,window.innerHeight-40),window.addEventListener("resize",this.onWindowResize)}disconnectedCallback(){super.disconnectedCallback(),window.removeEventListener("resize",this.onWindowResize),window.removeEventListener("mousemove",this.onMouseMove),window.removeEventListener("mouseup",this.onMouseUp)}async firstUpdated(){this.selectedProductId=this._resolveInitialProduct(),this.open=this.openInitially,this.open&&await this.initConversation()}updated(e){e.has("products")&&this.handleProductUpdate(),e.has("messages")&&this.scrollToBottom(),e.has("open")&&this.open&&!this.conversationId&&this.initConversation()}_resolveInitialProduct(){if(!this.products.length)return"";const e=this.products.find(t=>t.selected);return e?e.id:this.products.length===1?this.products[0].id:""}handleProductUpdate(){if(!this.products.length)return;const e=this.products.find(o=>o.selected),t=this.products.some(o=>o.id===this.selectedProductId);e&&e.id!==this.selectedProductId?(this.selectedProductId=e.id,this.messages=[],this.conversationId=void 0,this.open&&this.initConversation()):t||(this.selectedProductId=this._resolveInitialProduct(),this.messages=[],this.conversationId=void 0,this.open&&this.initConversation()),requestAnimationFrame(()=>this.updateComboboxItems())}updateComboboxItems(){var i,s,n;const e=this.productEl;if(!e||((i=this.products)==null?void 0:i.length)<=1)return;const t=this.products.map(l=>({value:l.id,label:l.name}));if(e.items=t,((n=(((s=e.selectedItems)==null?void 0:s.call(e))||[])[0])==null?void 0:n.value)!==this.selectedProductId){const l=t.find(c=>c.value===this.selectedProductId);e.setSelected&&e.setSelected(l?[l]:[])}}async onProductChange(e){var o,i,s;const t=(s=(i=(o=e.detail)==null?void 0:o.selected)==null?void 0:i[0])==null?void 0:s.value;t&&t!==this.selectedProductId&&(this.selectedProductId=t)}onMouseDown(e){this.draggable&&(e.preventDefault(),this.isDragging=!0,this.dragStartPos={x:e.clientX,y:e.clientY},this.initialPosition=$e({},this.position),window.addEventListener("mousemove",this.onMouseMove),window.addEventListener("mouseup",this.onMouseUp))}startResize(e,t){this.resizable&&(e.preventDefault(),e.stopPropagation(),this.isResizing=!0,this.resizeDirection=t,this.dragStartPos={x:e.clientX,y:e.clientY},this.resizeStartWidth=this.windowWidth,this.resizeStartHeight=this.windowHeight,window.addEventListener("mousemove",this.onMouseMove),window.addEventListener("mouseup",this.onMouseUp))}async ensureToken(e=!1){var s;const t="logosphere_chatbot_token";if(e&&(this.assertionToken=void 0,localStorage.removeItem(t)),!e){const n=localStorage.getItem(t);if(n){this.assertionToken=n;return}}const i=await(await fetch(`${this.returnUri}/api/chat/start`)).json();if(!i.Success||!((s=i.Data)!=null&&s.Token))throw new Error("Token alınamadı");this.assertionToken=i.Data.Token,localStorage.setItem(t,this.assertionToken)}async postChat(e){await this.ensureToken();const t=`${this.returnUri}/api/chat/completions`,o=()=>fetch(t,{method:"POST",headers:{"Content-Type":"application/json",client_assertion:this.assertionToken,client_assertion_type:"urn:ietf:params:oauth:client-assertion-type:jwt-bearer"},body:JSON.stringify(e)});let i=await o();if(i.status===401&&(await this.ensureToken(!0),i=await o()),!i.ok)throw new Error(`HTTP ${i.status}`);return i.json()}async initConversation(){var e,t,o;if(!this.isLoading){this.isLoading=!0;try{await this.ensureToken();const i=await this.postChat({ChatCompletionType:"NewConversation",Context:this.selectedProductId,QuestionPrompt:this.questionPrompt});this.conversationId=i.Data.ConversationId;const s=(o=(t=(e=i.Data.Choices)==null?void 0:e[0])==null?void 0:t.Message)==null?void 0:o.Content;s&&this.addMessage(s,"assistant",void 0,!0)}catch(i){this.addMessage("Bir hata oluştu, lütfen tekrar deneyiniz.","system")}finally{this.isLoading=!1}}}async sendMessage(){var t,o,i,s,n;const e=this.inputText.trim();if(!(!e||!this.conversationId||this.isLoading)){if(!this.selectedProductId){this.addMessage("Lütfen önce bir ürün seçiniz.","system");return}this.addMessage(e,"user"),this.inputText="",this.scrollToBottom(),this.isLoading=!0;try{const l=await this.postChat({ChatCompletionType:"ConversationUpdate",Content:e,Context:this.selectedProductId,ConversationId:this.conversationId,QuestionPrompt:this.questionPrompt}),c=(s=(i=(o=(t=l.Data)==null?void 0:t.Choices)==null?void 0:o[0])==null?void 0:i.Message)==null?void 0:s.Content,u=(n=l.Data)==null?void 0:n.EventId;this.addMessage(c||"Cevap alınamadı.","assistant",u)}catch(l){this.addMessage("Bağlantı hatası.","system")}finally{this.isLoading=!1}}}addMessage(e,t,o,i=!1){this.messages=[...this.messages,{content:e,role:t,timestamp:Date.now(),eventId:o,isWelcome:i}]}isNearBottom(e=50){const t=this.chatContainer;return t?t.scrollHeight-t.scrollTop-t.clientHeight<=e:!0}scrollToBottom(e=!1){if(!e&&!this.userAtBottom){this.showScrollDown=!0;return}setTimeout(()=>{this.chatContainer&&(this.chatContainer.scrollTop=this.chatContainer.scrollHeight,this.showScrollDown=!1,this.userAtBottom=!0)},0)}async rateMessage(e,t,o=null){await this.ensureToken();const i=`${this.returnUri}/api/chat/completion/rate`;await fetch(i,{method:"POST",headers:{"Content-Type":"application/json",client_assertion:this.assertionToken,client_assertion_type:"urn:ietf:params:oauth:client-assertion-type:jwt-bearer"},body:JSON.stringify({EventId:e,Rate:t,Comment:o})})}formatContent(e){if(!e)return"";const o=e.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").split(`
|
|
1050
|
+
`);let i="";const s=[];let n=!1;const l=()=>{n&&(i+="</li>",n=!1)},c=h=>{for(;s.length>0&&s[s.length-1].indent>=h;)l(),i+=`</${s.pop().type}>`,s.length>0&&(n=!0)},u=()=>c(-1);for(const h of o){const g=h.match(/^(\s*)\d+\.\s+(.*)/),f=h.match(/^(\s*)[-*]\s+(.*)/);if(g||f){const v=(g?g[1]:f[1]).length,w=g?"ol":"ul",C=g?g[2]:f[2];if(s.length===0)i+=`<${w}>`,s.push({type:w,indent:v});else{const _=s[s.length-1];v>_.indent?(i+=`<${w}>`,s.push({type:w,indent:v})):v===_.indent?l():(c(v+1),s.length>0&&s[s.length-1].indent===v?l():(u(),i+=`<${w}>`,s.push({type:w,indent:v})))}i+=`<li>${C}`,n=!0}else h.trim()===""?s.length===0&&(i+="<br>"):(u(),i+=`<p>${h}</p>`)}return u(),i.replace(/\*\*(.*?)\*\*/g,"<strong>$1</strong>").replace(/\*(.*?)\*/g,"<em>$1</em>").replace(/\[([^\]]+)\]\(([^)]+)\)/g,'<a href="$2" target="_blank" rel="noopener noreferrer">$1</a>')}render(){const e=this.position.right<this.screenWidth/2;return p`
|
|
375
1051
|
<div class="chatbot">
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
1052
|
+
${this.renderOverlay()}
|
|
1053
|
+
${this.renderLauncher()}
|
|
1054
|
+
${this.renderWindow(e)}
|
|
379
1055
|
</div>
|
|
380
|
-
`
|
|
1056
|
+
`}renderOverlay(){return this.open||this.fullscreen?p`<div class="chatbot__overlay" @click=${this.onToggle}></div>`:""}renderLauncher(){const e=["chatbot__launcher",this.draggable?"chatbot__launcher--draggable":"",this.open?"chatbot__launcher--hidden":""].filter(Boolean).join(" ");return p`
|
|
381
1057
|
<div
|
|
382
|
-
class="
|
|
383
|
-
style="right:
|
|
384
|
-
@mousedown
|
|
385
|
-
@click
|
|
386
|
-
aria-expanded
|
|
1058
|
+
class="${e}"
|
|
1059
|
+
style="right: ${this.position.right}px; bottom: ${this.position.bottom}px;"
|
|
1060
|
+
@mousedown=${this.onMouseDown}
|
|
1061
|
+
@click=${this.draggable?null:this.onToggle}
|
|
1062
|
+
aria-expanded=${this.open?"true":"false"}
|
|
387
1063
|
>
|
|
388
|
-
<img class="chatbot__launcher-icon" src="
|
|
389
|
-
|
|
390
|
-
</div>
|
|
391
|
-
`])),t,this.position.right,this.position.bottom,this.onMouseDown,this.draggable?null:this.onToggle,this.open?"true":"false",c.LedsUiChatbot.ICONS.launcher,!this.open&&!this.minimizedIconOnly?m($o||($o=b([`
|
|
1064
|
+
<img class="chatbot__launcher-icon" src="${a.LogosphereChatBot.ICONS.launcher}" alt="chatbot" />
|
|
1065
|
+
${!this.open&&!this.minimizedIconOnly?p`
|
|
392
1066
|
<div class="chatbot__launcher-text">
|
|
393
1067
|
<p class="chatbot__launcher-title">Logo</p>
|
|
394
1068
|
<p class="chatbot__launcher-subtitle">Dijital Danışman</p>
|
|
395
1069
|
</div>
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
1070
|
+
`:""}
|
|
1071
|
+
</div>
|
|
1072
|
+
`}renderWindow(e){const t=["chatbot__window",this.open?"":"chatbot__window--hidden",this.fullscreen?"chatbot__window--fullscreen":""].filter(Boolean).join(" "),o=this.fullscreen?"":`bottom: 20px; height: ${this.windowHeight}px; width: ${this.windowWidth}px; ${e?"right: 20px;":"left: 20px;"}`;return p`
|
|
1073
|
+
<div class="${t}" style="${o}">
|
|
1074
|
+
${this.renderResizeHandles(e)}
|
|
1075
|
+
${this.renderHeader()}
|
|
400
1076
|
<div class="chatbot__body">
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
1077
|
+
${this.renderProductSelector()}
|
|
1078
|
+
${this.renderChatArea()}
|
|
1079
|
+
${this.renderInputArea()}
|
|
404
1080
|
</div>
|
|
405
1081
|
</div>
|
|
406
|
-
`
|
|
1082
|
+
`}renderResizeHandles(e){return this.fullscreen||!this.resizable?"":p`
|
|
407
1083
|
<div class="chatbot__resize-top"
|
|
408
|
-
@mousedown
|
|
409
|
-
<div class="chatbot__resize-side
|
|
410
|
-
@mousedown
|
|
411
|
-
<div class="chatbot__resize-corner
|
|
412
|
-
@mousedown
|
|
413
|
-
`
|
|
1084
|
+
@mousedown=${t=>this.startResize(t,"vertical")}></div>
|
|
1085
|
+
<div class="chatbot__resize-side ${e?"chatbot__resize-side--left":"chatbot__resize-side--right"}"
|
|
1086
|
+
@mousedown=${t=>this.startResize(t,"horizontal")}></div>
|
|
1087
|
+
<div class="chatbot__resize-corner ${e?"chatbot__resize-corner--nwse":"chatbot__resize-corner--nesw"}"
|
|
1088
|
+
@mousedown=${t=>this.startResize(t,"both")}></div>
|
|
1089
|
+
`}renderHeader(){return p`
|
|
414
1090
|
<div class="chatbot__header">
|
|
415
1091
|
<div class="chatbot__header-info">
|
|
416
|
-
<img class="chatbot__header-logo" alt="logo" src="
|
|
1092
|
+
<img class="chatbot__header-logo" alt="logo" src="${a.LogosphereChatBot.ICONS.launcher}" />
|
|
417
1093
|
<div>
|
|
418
1094
|
<p class="chatbot__header-title">Logo</p>
|
|
419
1095
|
<p class="chatbot__header-subtitle">Dijital Danışman</p>
|
|
@@ -423,78 +1099,101 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
423
1099
|
<logosphere-button
|
|
424
1100
|
iconOnly="true"
|
|
425
1101
|
size="sm"
|
|
426
|
-
variant="
|
|
1102
|
+
variant="solid"
|
|
427
1103
|
theme="--color-light-rgb"
|
|
428
|
-
title
|
|
429
|
-
@click
|
|
1104
|
+
title=${this.fullscreen?"Küçült":"Tam Ekran"}
|
|
1105
|
+
@click=${this.onToggleFullscreen}
|
|
430
1106
|
>
|
|
431
|
-
<ui-icon name="
|
|
1107
|
+
<ui-icon name="${this.fullscreen?"uil-compress-alt":"uil-expand-alt"}" size="16"></ui-icon>
|
|
432
1108
|
</logosphere-button>
|
|
433
1109
|
<logosphere-button
|
|
434
1110
|
iconOnly="true"
|
|
435
1111
|
size="sm"
|
|
436
1112
|
variant="text"
|
|
437
|
-
theme="
|
|
1113
|
+
theme="secondary"
|
|
438
1114
|
title="Kapat"
|
|
439
|
-
@click
|
|
1115
|
+
@click=${this.onClose}
|
|
440
1116
|
>
|
|
441
1117
|
<ui-icon name="uil-times" size="16"></ui-icon>
|
|
442
1118
|
</logosphere-button>
|
|
443
1119
|
</div>
|
|
444
1120
|
</div>
|
|
445
|
-
`
|
|
446
|
-
<div class="chatbot__product">
|
|
447
|
-
|
|
448
|
-
</div>
|
|
449
|
-
`])),this.products.length>1?m(zo||(zo=b([`
|
|
1121
|
+
`}renderProductSelector(){return p`
|
|
1122
|
+
<div class="chatbot__product-selector">
|
|
1123
|
+
${this.products.length>1?p`
|
|
450
1124
|
<logosphere-combobox
|
|
451
1125
|
id="product"
|
|
452
|
-
.items
|
|
1126
|
+
.items=${this.products.map(e=>({value:e.id,label:e.name}))}
|
|
453
1127
|
optionValue="value"
|
|
454
1128
|
optionLabel="label"
|
|
455
1129
|
placeholder="Ürün seçiniz"
|
|
456
|
-
@selected
|
|
1130
|
+
@selected=${this.onProductChange}
|
|
457
1131
|
></logosphere-combobox>
|
|
458
|
-
`
|
|
459
|
-
<
|
|
1132
|
+
`:p`
|
|
1133
|
+
<input
|
|
460
1134
|
id="product"
|
|
1135
|
+
class="chatbot__product-input"
|
|
461
1136
|
placeholder="Ürün seçiniz"
|
|
462
|
-
.value
|
|
1137
|
+
.value=${this.products.length===1?this.products[0].name:""}
|
|
463
1138
|
readOnly="true"
|
|
464
|
-
|
|
465
|
-
`
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
1139
|
+
>
|
|
1140
|
+
`}
|
|
1141
|
+
</div>
|
|
1142
|
+
`}renderChatArea(){return p`
|
|
1143
|
+
<div class="chatbot__messages-wrapper">
|
|
1144
|
+
<div id="chat-container" class="chatbot__messages" @scroll=${this.onChatScroll}>
|
|
1145
|
+
${this.messages.map(e=>this.renderMessage(e))}
|
|
1146
|
+
${this.isLoading?this.renderTypingIndicator():""}
|
|
1147
|
+
</div>
|
|
1148
|
+
${this.showScrollDown?p`
|
|
1149
|
+
<button class="chatbot__scroll-down" @click=${this.onScrollToBottomClick} title="Aşağı kaydır">
|
|
1150
|
+
<ui-icon name="uil-angle-down" size="20"></ui-icon>
|
|
1151
|
+
</button>
|
|
1152
|
+
`:""}
|
|
469
1153
|
</div>
|
|
470
|
-
`
|
|
471
|
-
<div class="chatbot__message chatbot__message
|
|
472
|
-
<div class="
|
|
1154
|
+
`}renderMessage(e){const t=["chatbot__bubble",`chatbot__bubble--${e.role}`].join(" ");return p`
|
|
1155
|
+
<div class="chatbot__message chatbot__message--${e.role}">
|
|
1156
|
+
<div class="${t}">
|
|
473
1157
|
<div class="chatbot__message-content">
|
|
474
|
-
|
|
1158
|
+
${_o(this.formatContent(e.content))}
|
|
475
1159
|
</div>
|
|
476
|
-
`,`
|
|
477
1160
|
</div>
|
|
1161
|
+
${this.showFeedbackButtons&&e.role==="assistant"&&!e.isWelcome?this.renderFeedbackButtons(e):""}
|
|
478
1162
|
</div>
|
|
479
|
-
`
|
|
1163
|
+
`}renderFeedbackButtons(e){return p`
|
|
480
1164
|
<div class="chatbot__feedback">
|
|
481
1165
|
<logosphere-button
|
|
482
|
-
@click
|
|
1166
|
+
@click=${()=>this.onCopyMessage(e.content)}
|
|
483
1167
|
title="Kopyala"
|
|
484
1168
|
iconOnly="true"
|
|
485
1169
|
size="sm"
|
|
486
|
-
|
|
1170
|
+
variant="text"
|
|
1171
|
+
theme="secondary"
|
|
487
1172
|
>
|
|
488
|
-
<ui-icon name="uil-copy" size="
|
|
1173
|
+
<ui-icon name="uil-copy" size="16"></ui-icon>
|
|
489
1174
|
</logosphere-button>
|
|
490
|
-
<logosphere-button
|
|
491
|
-
|
|
1175
|
+
<logosphere-button
|
|
1176
|
+
title="Like"
|
|
1177
|
+
iconOnly="true"
|
|
1178
|
+
size="sm"
|
|
1179
|
+
variant="text"
|
|
1180
|
+
theme=${e.rating===5?"primary":"secondary"}
|
|
1181
|
+
@click=${()=>this.onRate(e,5)}
|
|
1182
|
+
>
|
|
1183
|
+
<ui-icon name="uil-thumbs-up" size="16"></ui-icon>
|
|
492
1184
|
</logosphere-button>
|
|
493
|
-
<logosphere-button
|
|
494
|
-
|
|
1185
|
+
<logosphere-button
|
|
1186
|
+
title="Dislike"
|
|
1187
|
+
iconOnly="true"
|
|
1188
|
+
size="sm"
|
|
1189
|
+
variant="text"
|
|
1190
|
+
theme=${e.rating===1?"primary":"secondary"}
|
|
1191
|
+
@click=${()=>this.onRate(e,1)}
|
|
1192
|
+
>
|
|
1193
|
+
<ui-icon name="uil-thumbs-down" size="16"></ui-icon>
|
|
495
1194
|
</logosphere-button>
|
|
496
1195
|
</div>
|
|
497
|
-
`
|
|
1196
|
+
`}renderTypingIndicator(){return p`
|
|
498
1197
|
<div class="chatbot__typing-wrapper">
|
|
499
1198
|
<div class="chatbot__typing">
|
|
500
1199
|
<span class="chatbot__typing-dot"></span>
|
|
@@ -502,36 +1201,36 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
502
1201
|
<span class="chatbot__typing-dot"></span>
|
|
503
1202
|
</div>
|
|
504
1203
|
</div>
|
|
505
|
-
`
|
|
1204
|
+
`}renderInputArea(){return p`
|
|
506
1205
|
<div class="chatbot__input-area">
|
|
507
1206
|
<div class="chatbot__input-wrapper">
|
|
508
1207
|
<input
|
|
509
1208
|
class="chatbot__input"
|
|
510
|
-
placeholder
|
|
511
|
-
.value
|
|
512
|
-
@input
|
|
513
|
-
@keydown
|
|
514
|
-
?disabled
|
|
1209
|
+
placeholder=${this.selectedProductId?"Bir şeyler yazın...":"Lütfen ürün seçiniz..."}
|
|
1210
|
+
.value=${this.inputText}
|
|
1211
|
+
@input=${this.onInput}
|
|
1212
|
+
@keydown=${this.handleKeyDown}
|
|
1213
|
+
?disabled=${!this.selectedProductId}
|
|
515
1214
|
/>
|
|
516
1215
|
<logosphere-button
|
|
517
1216
|
iconOnly="true"
|
|
518
|
-
size="
|
|
519
|
-
variant="
|
|
520
|
-
theme="
|
|
1217
|
+
size="sm"
|
|
1218
|
+
variant="solid"
|
|
1219
|
+
theme="primary"
|
|
521
1220
|
title="Gönder"
|
|
522
|
-
@click
|
|
523
|
-
?disabled
|
|
1221
|
+
@click=${this.sendMessage}
|
|
1222
|
+
?disabled=${!this.selectedProductId||!this.inputText.trim()}
|
|
524
1223
|
>
|
|
525
|
-
<ui-icon name="uil-arrow-circle-right" size="
|
|
1224
|
+
<ui-icon name="uil-arrow-circle-right" size="16"></ui-icon>
|
|
526
1225
|
</logosphere-button>
|
|
527
1226
|
</div>
|
|
528
1227
|
</div>
|
|
529
1228
|
<div class="chatbot__footer">
|
|
530
1229
|
<p class="chatbot__footer-text">İçerik Yapay Zeka ile Üretilmiştir</p>
|
|
531
1230
|
</div>
|
|
532
|
-
`])),this.selectedProductId?"Bir şeyler yazın...":"Lütfen ürün seçiniz...",this.inputText,this.onInput,this.handleKeyDown,!this.selectedProductId,this.sendMessage,!this.selectedProductId||!this.inputText.trim())}}])})(Z),c.LedsUiChatbot.styles=[ee(Bo||(Bo=b(["",""])),Q(dl))],c.LedsUiChatbot.ICONS={launcher:"data:image/svg+xml,%3Csvg%20width%3D%2251%22%20height%3D%2242%22%20viewBox%3D%220%200%2051%2042%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20fill-rule%3D%22evenodd%22%20clip-rule%3D%22evenodd%22%20d%3D%22M38.457%200C40.0338%200%2041.542%200.293293%2042.9302%200.8283L49.15%206.07675C50.2611%207.93912%2050.8994%2010.1162%2050.8994%2012.4424V23.084C50.8994%2024.4858%2050.6676%2025.8334%2050.2402%2027.0907L43.1534%2034.6096C41.7043%2035.2006%2040.1187%2035.5264%2038.457%2035.5264H30.7605L38.5805%2027.2296C40.814%2027.1643%2042.6045%2025.3332%2042.6045%2023.084V12.4424C42.6045%2010.1518%2040.7476%208.29492%2038.457%208.29492H12.4424C10.1518%208.29492%208.29492%2010.1518%208.29492%2012.4424V23.084C8.29492%2025.3746%2010.1518%2027.2314%2012.4424%2027.2314H33.5078L20.4487%2041.0866C17.7992%2042.5379%2014.3381%2040.2741%2014.7842%2036.7803C14.8402%2036.3421%2014.9629%2035.9194%2015.1416%2035.5264H12.4424C10.9217%2035.5264%209.46472%2035.2536%208.11774%2034.7542L0.610679%2026.945C0.214298%2025.7295%200%2024.4318%200%2023.084V12.4424C0%2010.8011%200.317794%209.23402%200.895207%207.79935L7.12424%201.19058C8.73679%200.427072%2010.5397%200%2012.4424%200H38.457ZM23.1357%2017.7881C23.1357%2015.4815%2021.2656%2013.6113%2018.959%2013.6113C16.6525%2013.6114%2014.7822%2015.4815%2014.7822%2017.7881C14.7824%2020.0945%2016.6526%2021.9638%2018.959%2021.9639C21.2655%2021.9639%2023.1356%2020.0945%2023.1357%2017.7881ZM36.2344%2017.7881C36.2344%2015.4815%2034.3642%2013.6113%2032.0576%2013.6113C29.7511%2013.6114%2027.8809%2015.4815%2027.8809%2017.7881C27.881%2020.0945%2029.7512%2021.9638%2032.0576%2021.9639C34.3641%2021.9639%2036.2342%2020.0945%2036.2344%2017.7881Z%22%20fill%3D%22url(%23paint0_linear_97_4585)%22%2F%3E%3Cdefs%3E%3ClinearGradient%20id%3D%22paint0_linear_97_4585%22%20x1%3D%2231.662%22%20y1%3D%224.88016%22%20x2%3D%2214.4119%22%20y2%3D%2237.9167%22%20gradientUnits%3D%22userSpaceOnUse%22%3E%3Cstop%20stop-color%3D%22%23F22727%22%2F%3E%3Cstop%20offset%3D%221%22%20stop-color%3D%22%23CA0D0D%22%2F%3E%3C%2FlinearGradient%3E%3C%2Fdefs%3E%3C%2Fsvg%3E"},q([f({type:String,attribute:"return-uri"})],c.LedsUiChatbot.prototype,"returnUri",2),q([f({type:String,attribute:"question-prompt"})],c.LedsUiChatbot.prototype,"questionPrompt",2),q([f({type:Boolean,attribute:"minimized-icon-only"})],c.LedsUiChatbot.prototype,"minimizedIconOnly",2),q([f({type:Boolean,attribute:"draggable"})],c.LedsUiChatbot.prototype,"draggable",2),q([f({type:Boolean,attribute:"resizable"})],c.LedsUiChatbot.prototype,"resizable",2),q([f({type:Array,hasChanged:function(n,e){return n===e?!1:!e||!n||n.length!==e.length?!0:JSON.stringify(n)!==JSON.stringify(e)}}),f({type:Array})],c.LedsUiChatbot.prototype,"products",2),q([f({type:Boolean,attribute:"open-initially"})],c.LedsUiChatbot.prototype,"openInitially",2),q([f({type:Boolean,attribute:"show-feedback-buttons"})],c.LedsUiChatbot.prototype,"showFeedbackButtons",2),q([z()],c.LedsUiChatbot.prototype,"open",2),q([z()],c.LedsUiChatbot.prototype,"fullscreen",2),q([z()],c.LedsUiChatbot.prototype,"messages",2),q([z()],c.LedsUiChatbot.prototype,"conversationId",2),q([z()],c.LedsUiChatbot.prototype,"assertionToken",2),q([z()],c.LedsUiChatbot.prototype,"isLoading",2),q([z()],c.LedsUiChatbot.prototype,"inputText",2),q([z()],c.LedsUiChatbot.prototype,"selectedProductId",2),q([z()],c.LedsUiChatbot.prototype,"windowWidth",2),q([z()],c.LedsUiChatbot.prototype,"windowHeight",2),q([z()],c.LedsUiChatbot.prototype,"position",2),q([z()],c.LedsUiChatbot.prototype,"isDragging",2),q([z()],c.LedsUiChatbot.prototype,"screenWidth",2),q([we("#chat-container")],c.LedsUiChatbot.prototype,"chatContainer",2),q([we("#product")],c.LedsUiChatbot.prototype,"productEl",2),c.LedsUiChatbot=q([te("logosphere-chatbot")],c.LedsUiChatbot);function $t(a){return a&&a.__esModule&&Object.prototype.hasOwnProperty.call(a,"default")?a.default:a}var Yt={exports:{}},hl=Yt.exports,Io;function fl(){return Io||(Io=1,(function(a,n){(function(e,t){a.exports=t()})(hl,(function(){var e={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"};return function(t,r,o){var i=r.prototype,s=i.format;o.en.formats=e,i.format=function(l){l===void 0&&(l="YYYY-MM-DDTHH:mm:ssZ");var d=this.$locale().formats,u=(function(p,h){return p.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,(function(g,y,w){var v=w&&w.toUpperCase();return y||h[w]||e[w]||h[v].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,(function(_,k,$){return k||$.slice(1)}))}))})(l,d===void 0?{}:d);return s.call(this,u)}}}))})(Yt)),Yt.exports}var vl=fl();const bl=$t(vl);var Rt={exports:{}},gl=Rt.exports,Yo;function ml(){return Yo||(Yo=1,(function(a,n){(function(e,t){a.exports=t()})(gl,(function(){var e={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},t=/(\[[^[]*\])|([-_:/.,()\s]+)|(A|a|Q|YYYY|YY?|ww?|MM?M?M?|Do|DD?|hh?|HH?|mm?|ss?|S{1,3}|z|ZZ?)/g,r=/\d/,o=/\d\d/,i=/\d\d?/,s=/\d*[^-_:/,()\s\d]+/,l={},d=function(v){return(v=+v)+(v>68?1900:2e3)},u=function(v){return function(_){this[v]=+_}},p=[/[+-]\d\d:?(\d\d)?|Z/,function(v){(this.zone||(this.zone={})).offset=(function(_){if(!_||_==="Z")return 0;var k=_.match(/([+-]|\d\d)/g),$=60*k[1]+(+k[2]||0);return $===0?0:k[0]==="+"?-$:$})(v)}],h=function(v){var _=l[v];return _&&(_.indexOf?_:_.s.concat(_.f))},g=function(v,_){var k,$=l.meridiem;if($){for(var x=1;x<=24;x+=1)if(v.indexOf($(x,0,_))>-1){k=x>12;break}}else k=v===(_?"pm":"PM");return k},y={A:[s,function(v){this.afternoon=g(v,!1)}],a:[s,function(v){this.afternoon=g(v,!0)}],Q:[r,function(v){this.month=3*(v-1)+1}],S:[r,function(v){this.milliseconds=100*+v}],SS:[o,function(v){this.milliseconds=10*+v}],SSS:[/\d{3}/,function(v){this.milliseconds=+v}],s:[i,u("seconds")],ss:[i,u("seconds")],m:[i,u("minutes")],mm:[i,u("minutes")],H:[i,u("hours")],h:[i,u("hours")],HH:[i,u("hours")],hh:[i,u("hours")],D:[i,u("day")],DD:[o,u("day")],Do:[s,function(v){var _=l.ordinal,k=v.match(/\d+/);if(this.day=k[0],_)for(var $=1;$<=31;$+=1)_($).replace(/\[|\]/g,"")===v&&(this.day=$)}],w:[i,u("week")],ww:[o,u("week")],M:[i,u("month")],MM:[o,u("month")],MMM:[s,function(v){var _=h("months"),k=(h("monthsShort")||_.map((function($){return $.slice(0,3)}))).indexOf(v)+1;if(k<1)throw new Error;this.month=k%12||k}],MMMM:[s,function(v){var _=h("months").indexOf(v)+1;if(_<1)throw new Error;this.month=_%12||_}],Y:[/[+-]?\d+/,u("year")],YY:[o,function(v){this.year=d(v)}],YYYY:[/\d{4}/,u("year")],Z:p,ZZ:p};function w(v){var _,k;_=v,k=l&&l.formats;for(var $=(v=_.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,(function(B,P,M){var T=M&&M.toUpperCase();return P||k[M]||e[M]||k[T].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,(function(U,I,Y){return I||Y.slice(1)}))}))).match(t),x=$.length,E=0;E<x;E+=1){var C=$[E],S=y[C],D=S&&S[0],A=S&&S[1];$[E]=A?{regex:D,parser:A}:C.replace(/^\[|\]$/g,"")}return function(B){for(var P={},M=0,T=0;M<x;M+=1){var U=$[M];if(typeof U=="string")T+=U.length;else{var I=U.regex,Y=U.parser,R=B.slice(T),oe=I.exec(R)[0];Y.call(P,oe),B=B.replace(oe,"")}}return(function(J){var Ce=J.afternoon;if(Ce!==void 0){var ne=J.hours;Ce?ne<12&&(J.hours+=12):ne===12&&(J.hours=0),delete J.afternoon}})(P),P}}return function(v,_,k){k.p.customParseFormat=!0,v&&v.parseTwoDigitYear&&(d=v.parseTwoDigitYear);var $=_.prototype,x=$.parse;$.parse=function(E){var C=E.date,S=E.utc,D=E.args;this.$u=S;var A=D[1];if(typeof A=="string"){var B=D[2]===!0,P=D[3]===!0,M=B||P,T=D[2];P&&(T=D[2]),l=this.$locale(),!B&&T&&(l=k.Ls[T]),this.$d=(function(R,oe,J,Ce){try{if(["x","X"].indexOf(oe)>-1)return new Date((oe==="X"?1e3:1)*R);var ne=w(oe)(R),$e=ne.year,Oe=ne.month,Te=ne.day,ye=ne.hours,qe=ne.minutes,rt=ne.seconds,Ee=ne.milliseconds,nt=ne.zone,qt=ne.week,Ve=new Date,Ot=Te||($e||Oe?1:Ve.getDate()),ot=$e||Ve.getFullYear(),at=0;$e&&!Oe||(at=Oe>0?Oe-1:Ve.getMonth());var it,st=ye||0,lt=qe||0,Et=rt||0,St=Ee||0;return nt?new Date(Date.UTC(ot,at,Ot,st,lt,Et,St+60*nt.offset*1e3)):J?new Date(Date.UTC(ot,at,Ot,st,lt,Et,St)):(it=new Date(ot,at,Ot,st,lt,Et,St),qt&&(it=Ce(it).week(qt).toDate()),it)}catch(je){return new Date("")}})(C,A,S,k),this.init(),T&&T!==!0&&(this.$L=this.locale(T).$L),M&&C!=this.format(A)&&(this.$d=new Date("")),l={}}else if(A instanceof Array)for(var U=A.length,I=1;I<=U;I+=1){D[1]=A[I-1];var Y=k.apply(this,D);if(Y.isValid()){this.$d=Y.$d,this.$L=Y.$L,this.init();break}I===U&&(this.$d=new Date(""))}else x.call(this,E)}}}))})(Rt)),Rt.exports}var _l=ml();const yl=$t(_l);var Ut={exports:{}},wl=Ut.exports,Ro;function kl(){return Ro||(Ro=1,(function(a,n){(function(e,t){a.exports=t()})(wl,(function(){return function(e,t,r){t.prototype.isBetween=function(o,i,s,l){var d=r(o),u=r(i),p=(l=l||"()")[0]==="(",h=l[1]===")";return(p?this.isAfter(d,s):!this.isBefore(d,s))&&(h?this.isBefore(u,s):!this.isAfter(u,s))||(p?this.isBefore(d,s):!this.isAfter(d,s))&&(h?this.isAfter(u,s):!this.isBefore(u,s))}}}))})(Ut)),Ut.exports}var xl=kl();const Cl=$t(xl);var Ft={exports:{}},$l=Ft.exports,Uo;function Ol(){return Uo||(Uo=1,(function(a,n){(function(e,t){a.exports=t()})($l,(function(){var e="week",t="year";return function(r,o,i){var s=o.prototype;s.week=function(l){if(l===void 0&&(l=null),l!==null)return this.add(7*(l-this.week()),"day");var d=this.$locale().yearStart||1;if(this.month()===11&&this.date()>25){var u=i(this).startOf(t).add(1,t).date(d),p=i(this).endOf(e);if(u.isBefore(p))return 1}var h=i(this).startOf(t).date(d).startOf(e).subtract(1,"millisecond"),g=this.diff(h,e,!0);return g<0?i(this).startOf("week").week():Math.ceil(g)},s.weeks=function(l){return l===void 0&&(l=null),this.week(l)}}}))})(Ft)),Ft.exports}var El=Ol();const Sl=$t(El);var Ht={exports:{}},Dl=Ht.exports,Fo;function zl(){return Fo||(Fo=1,(function(a,n){(function(e,t){a.exports=t()})(Dl,(function(){return function(e,t,r){var o=t.prototype,i=function(p){return p&&(p.indexOf?p:p.s)},s=function(p,h,g,y,w){var v=p.name?p:p.$locale(),_=i(v[h]),k=i(v[g]),$=_||k.map((function(E){return E.slice(0,y)}));if(!w)return $;var x=v.weekStart;return $.map((function(E,C){return $[(C+(x||0))%7]}))},l=function(){return r.Ls[r.locale()]},d=function(p,h){return p.formats[h]||(function(g){return g.replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,(function(y,w,v){return w||v.slice(1)}))})(p.formats[h.toUpperCase()])},u=function(){var p=this;return{months:function(h){return h?h.format("MMMM"):s(p,"months")},monthsShort:function(h){return h?h.format("MMM"):s(p,"monthsShort","months",3)},firstDayOfWeek:function(){return p.$locale().weekStart||0},weekdays:function(h){return h?h.format("dddd"):s(p,"weekdays")},weekdaysMin:function(h){return h?h.format("dd"):s(p,"weekdaysMin","weekdays",2)},weekdaysShort:function(h){return h?h.format("ddd"):s(p,"weekdaysShort","weekdays",3)},longDateFormat:function(h){return d(p.$locale(),h)},meridiem:this.$locale().meridiem,ordinal:this.$locale().ordinal}};o.localeData=function(){return u.bind(this)()},r.localeData=function(){var p=l();return{firstDayOfWeek:function(){return p.weekStart||0},weekdays:function(){return r.weekdays()},weekdaysShort:function(){return r.weekdaysShort()},weekdaysMin:function(){return r.weekdaysMin()},months:function(){return r.months()},monthsShort:function(){return r.monthsShort()},longDateFormat:function(h){return d(p,h)},meridiem:p.meridiem,ordinal:p.ordinal}},r.months=function(){return s(l(),"months")},r.monthsShort=function(){return s(l(),"monthsShort","months",3)},r.weekdays=function(p){return s(l(),"weekdays",null,null,p)},r.weekdaysShort=function(p){return s(l(),"weekdaysShort","weekdays",3,p)},r.weekdaysMin=function(p){return s(l(),"weekdaysMin","weekdays",2,p)}}}))})(Ht)),Ht.exports}var Al=zl();const Ml=$t(Al);var Nt={exports:{}},Pl=Nt.exports,Ho;function Tl(){return Ho||(Ho=1,(function(a,n){(function(e,t){a.exports=t(V)})(Pl,(function(e){function t(i){return i&&typeof i=="object"&&"default"in i?i:{default:i}}var r=t(e),o={name:"tr",weekdays:"Pazar_Pazartesi_Salı_Çarşamba_Perşembe_Cuma_Cumartesi".split("_"),weekdaysShort:"Paz_Pts_Sal_Çar_Per_Cum_Cts".split("_"),weekdaysMin:"Pz_Pt_Sa_Ça_Pe_Cu_Ct".split("_"),months:"Ocak_Şubat_Mart_Nisan_Mayıs_Haziran_Temmuz_Ağustos_Eylül_Ekim_Kasım_Aralık".split("_"),monthsShort:"Oca_Şub_Mar_Nis_May_Haz_Tem_Ağu_Eyl_Eki_Kas_Ara".split("_"),weekStart:1,formats:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},relativeTime:{future:"%s sonra",past:"%s önce",s:"birkaç saniye",m:"bir dakika",mm:"%d dakika",h:"bir saat",hh:"%d saat",d:"bir gün",dd:"%d gün",M:"bir ay",MM:"%d ay",y:"bir yıl",yy:"%d yıl"},ordinal:function(i){return i+"."}};return r.default.locale(o,null,!0),o}))})(Nt)),Nt.exports}Tl();const jl='.dp{display:block;position:relative;font-family:var(--font-family-base);width:100%}.dp__input-wrapper{position:relative;width:100%}.dp__input{width:100%;height:40px;padding:0 var(--spacing-10) 0 var(--spacing-3);border:1px solid var(--color-border);border-radius:var(--radius-base);outline:none;font-size:var(--font-size-sm);font-family:var(--font-family-base);color:var(--color-body-text);background-color:var(--color-body-bg);transition:border-color var(--transition-speed-fast) var(--transition-timing);box-sizing:border-box}.dp__input::placeholder{color:var(--color-tertiary)}.dp__input:focus,.dp__input--open{border-color:var(--color-primary)}.dp__input:disabled{opacity:.5;cursor:not-allowed;background-color:var(--color-tertiary-bg)}.dp__input--error{border-color:var(--color-danger);background-color:var(--color-danger-bg-subtle)}.dp__input--required{border-color:var(--color-danger)}.dp__icon-btn{position:absolute;right:var(--spacing-2);top:50%;transform:translateY(-50%);background:none;border:none;cursor:pointer;color:var(--color-tertiary);display:inline-flex;align-items:center;justify-content:center;padding:0;line-height:1;transition:color var(--transition-speed-fast) var(--transition-timing)}.dp__icon-btn:hover{color:var(--color-body-text)}.dp__error-tooltip{position:absolute;top:calc(100% + var(--spacing-1));left:0;z-index:var(--z-index-tooltip);padding:var(--spacing-1) var(--spacing-2);font-size:var(--font-size-xs);color:var(--color-body-bg);background-color:var(--color-danger);border-radius:var(--radius-sm);box-shadow:var(--shadow-sm);pointer-events:none;white-space:nowrap;font-family:var(--font-family-base)}.dp__popup{position:fixed;background-color:var(--color-body-bg);border:1px solid var(--color-border);border-radius:var(--radius-lg);box-shadow:var(--shadow-md);z-index:var(--z-index-dropdown);padding:var(--spacing-4);box-sizing:border-box;overflow:hidden}.dp__header{display:flex;align-items:center;justify-content:space-between;margin-bottom:var(--spacing-3)}.dp__nav-btn{display:inline-flex;align-items:center;justify-content:center;padding:var(--spacing-2);border:none;background:none;border-radius:var(--radius-base);cursor:pointer;color:var(--color-body-text);transition:background-color var(--transition-speed-fast) var(--transition-timing)}.dp__nav-btn:hover{background-color:var(--color-tertiary-bg)}.dp__header-label{font-size:var(--font-size-xl);font-weight:var(--font-weight-semibold);letter-spacing:-.025em;user-select:none;cursor:pointer;color:var(--color-body-text);transition:color var(--transition-speed-fast) var(--transition-timing)}.dp__header-label:hover{color:var(--color-primary)}.dp__weekdays{display:grid;grid-template-columns:repeat(7,1fr);text-align:center;font-size:var(--font-size-sm);color:var(--color-tertiary);margin-bottom:var(--spacing-1);user-select:none}.dp__weekday{padding:var(--spacing-1) 0}.dp__grid{display:grid;grid-template-columns:repeat(7,1fr);row-gap:2px;outline:none}.dp__day{position:relative;height:36px;display:flex;align-items:center;justify-content:center;border:none;background:transparent;cursor:pointer;padding:0;min-width:0;border-radius:0;color:var(--color-body-text);font-family:var(--font-family-base)}.dp__day-num{position:relative;z-index:1;width:32px;height:32px;display:flex;align-items:center;justify-content:center;border-radius:var(--radius-full);font-size:var(--font-size-sm);flex-shrink:0;transition:background-color var(--transition-speed-fast) var(--transition-timing),color var(--transition-speed-fast) var(--transition-timing)}.dp__day--range-start:before,.dp__day--range-end:before,.dp__day--range-between:before{content:"";position:absolute;top:2px;bottom:2px;background-color:color-mix(in srgb,var(--color-primary) 15%,transparent);z-index:0;pointer-events:none}.dp__day--range-start:before{left:50%;right:0}.dp__day--range-end:before{left:0;right:50%}.dp__day--range-between:before{left:0;right:0}.dp__day--out-of-month{opacity:.4}.dp__day--focused .dp__day-num{background-color:var(--color-tertiary-bg)}.dp__day--disabled{cursor:not-allowed;pointer-events:none}.dp__day--disabled .dp__day-num{color:var(--color-gray-300);background-color:var(--color-gray-50)}.dp__day--disabled-weekday{cursor:not-allowed;pointer-events:none}.dp__day--disabled-weekday .dp__day-num{color:var(--color-gray-300)}.dp__day--today .dp__day-num{background-color:var(--color-gray-200);color:var(--color-gray-800)}.dp__day--selected .dp__day-num{background-color:var(--color-primary);color:#fff}.dp__day--default:hover .dp__day-num{background-color:var(--color-tertiary-bg)}.dp__day--range-pending .dp__day-num,.dp__day--range-start .dp__day-num,.dp__day--range-end .dp__day-num{background-color:var(--color-primary);color:#fff}.dp__day--range-between .dp__day-num{color:var(--color-primary);background:transparent}.dp__month-grid,.dp__year-grid{display:grid;grid-template-columns:repeat(3,1fr);grid-template-rows:repeat(4,1fr);gap:10px;margin-top:var(--spacing-3)}.dp__month-btn,.dp__year-btn{height:48px;display:flex;align-items:center;justify-content:center;border:none;border-radius:var(--radius-base);font-size:var(--font-size-sm);font-weight:var(--font-weight-medium);font-family:var(--font-family-base);cursor:pointer;background:none;color:var(--color-body-text);transition:background-color var(--transition-speed-fast) var(--transition-timing),color var(--transition-speed-fast) var(--transition-timing)}.dp__month-btn:hover:not(.dp__month-btn--selected),.dp__year-btn:hover:not(.dp__year-btn--selected){background-color:var(--color-tertiary-bg)}.dp__month-btn--selected,.dp__year-btn--selected{background-color:var(--color-primary);color:#fff}.dp__month-btn--current:not(.dp__month-btn--selected),.dp__year-btn--current:not(.dp__year-btn--selected){background-color:var(--color-gray-200);color:var(--color-gray-800)}.dp__footer{display:flex;align-items:center;justify-content:space-evenly;margin-top:var(--spacing-4);padding-bottom:var(--spacing-3)}.dp__footer-btn{display:inline-flex;align-items:center;gap:var(--spacing-2);padding:var(--spacing-1) var(--spacing-2);font-size:var(--font-size-sm);color:var(--color-tertiary);border:none;border-radius:var(--radius-sm);background:none;cursor:pointer;font-family:var(--font-family-base);transition:background-color var(--transition-speed-fast) var(--transition-timing),color var(--transition-speed-fast) var(--transition-timing)}.dp__footer-btn:hover{background-color:var(--color-tertiary-bg);color:var(--color-body-text)}';var No,qo,Vo,Wo,Go,Ko,Xo,Zo,Jo,Qo,ea,Ll=Object.defineProperty,Bl=Object.getOwnPropertyDescriptor,K=function(n,e,t,r){for(var o=r>1?void 0:r?Bl(e,t):e,i=n.length-1,s;i>=0;i--)(s=n[i])&&(o=(r?s(e,t,o):s(o))||o);return r&&o&&Ll(e,t,o),o};V.extend(bl),V.extend(yl),V.extend(Cl),V.extend(Sl),V.extend(Ml),V.locale("tr");var Il=["DD/MM/YYYY","DD.MM.YYYY","DD MM YYYY","DD-MM-YYYY","DD/MM/YY","DD.MM.YY","DD MM YY","DD-MM-YY","YYYY-MM-DD","YYYY/MM/DD","YYYY.MM.DD","YYYY MM DD"],Yl=V.months(),ta=V.weekdaysShort(),Rl=[].concat(ve(ta.slice(1)),[ta[0]]),Ul=0,Fl=function(){return"dp-".concat(++Ul)};c.LedsDatePicker=(function(a){function n(){var e;return j(this,n),e=H(this,n,arguments),e.value=null,e.min=null,e.max=null,e.required=!1,e.disabled=!1,e.expandFactor=1.05,e.placeholder="GG/AA/YYYY veya GG.AA.YYYY",e.rangeMode=!1,e.disabledDays=[],e.rangeStart=null,e.rangeEnd=null,e._open=!1,e._cursor=V(),e._popupPos=null,e._rangeStart=null,e._rangeEnd=null,e._hoverDate=null,e._viewMode="calendar",e._hasError=!1,e._errorMsg="",e._errorTimer=null,e.inputId=Fl(),e._outsideClick=function(t){e._open&&(t.composedPath().includes(e)||(e._parseAndSetDate(),e._viewMode="calendar",e._toggleOpen(!1)))},e._onScrollOrResize=function(){e._open&&e._recalcPopupPos()},e._clear=function(){e._emitChange(null),e.rangeMode&&(e._rangeStart=null,e._rangeEnd=null)},e._today=function(){var t=V();e._withinBounds(t)&&e._select(t)},e._navigatePrevious=function(){switch(e._viewMode){case"calendar":e._cursor=e._cursor.subtract(1,"month");break;case"month":e._cursor=e._cursor.subtract(1,"year");break;case"year":e._cursor=e._cursor.subtract(12,"year");break}},e._navigateNext=function(){switch(e._viewMode){case"calendar":e._cursor=e._cursor.add(1,"month");break;case"month":e._cursor=e._cursor.add(1,"year");break;case"year":e._cursor=e._cursor.add(12,"year");break}},e._handleHeaderClick=function(){e._viewMode==="calendar"?e._viewMode="month":e._viewMode==="month"&&(e._viewMode="year")},e._recalcPopupPos=function(){var t=e.renderRoot.querySelector("#"+e.inputId);if(t){var r=t.getBoundingClientRect(),o=e.renderRoot.querySelector("#"+e.inputId+"-ico"),i=window.innerWidth,s=window.innerHeight,l=8,d=o?o.getBoundingClientRect().left:r.left+r.width,u=Math.round(Math.max(0,d-r.left-l)*(e.expandFactor||1)),p=Math.round(r.right-r.left-l),h=Math.max(220,Math.min(u,p)),g=Math.round(r.left);g+h>i-l&&(g=Math.max(l,Math.round(i-h-l)));var y=Math.max(0,s-r.bottom-l*2),w=Math.max(0,r.top-l*2),v=260,_,k;y>=v||y>=w?(_=Math.round(r.bottom+l),k=Math.max(v,y)):(k=Math.max(v,w),_=Math.max(l,Math.round(r.top-l-k))),e._popupPos={left:g,top:_,width:h,maxH:k}}},e}return N(n,a),L(n,[{key:"willUpdate",value:function(t){if(t.has("value")&&!this._open&&!this.rangeMode){var r=this._safeDay(this.value);r&&(this._cursor=r)}t.has("rangeStart")&&(this._rangeStart=this.rangeStart),t.has("rangeEnd")&&(this._rangeEnd=this.rangeEnd)}},{key:"connectedCallback",value:function(){X(n,"connectedCallback",this)([]),window.addEventListener("click",this._outsideClick,!0),window.addEventListener("scroll",this._onScrollOrResize,!0),window.addEventListener("resize",this._onScrollOrResize)}},{key:"disconnectedCallback",value:function(){window.removeEventListener("click",this._outsideClick,!0),window.removeEventListener("scroll",this._onScrollOrResize,!0),window.removeEventListener("resize",this._onScrollOrResize),this._errorTimer&&clearTimeout(this._errorTimer),X(n,"disconnectedCallback",this)([])}},{key:"_safeDay",value:function(t){if(!t)return null;for(var r=0,o=Il;r<o.length;r++){var i=o[r],s=V(t,i,!0);if(s.isValid())return s}var l=V(t);return l.isValid()?l:null}},{key:"_withinBounds",value:function(t){var r=this._safeDay(this.min),o=this._safeDay(this.max);return!(r&&t.isBefore(r,"day")||o&&t.isAfter(o,"day")||this.disabledDays.includes(t.day()))}},{key:"_displayValue",value:function(){if(this.rangeMode&&this._rangeStart&&this._rangeEnd){var t=this._safeDay(this._rangeStart),r=this._safeDay(this._rangeEnd);if(t&&r)return"".concat(t.format("DD/MM/YYYY")," - ").concat(r.format("DD/MM/YYYY"))}var o=this._safeDay(this.value);return o?o.format("DD/MM/YYYY"):""}},{key:"_getYears",value:function(){var t=this._cursor.year()-6;return Array.from({length:12},function(r,o){return t+o})}},{key:"_getHeaderLabel",value:function(){switch(this._viewMode){case"calendar":return this._cursor.format("MMMM YYYY");case"month":return this._cursor.format("YYYY");case"year":{var t=this._getYears();return"".concat(t[0],"-").concat(t[t.length-1])}}}},{key:"_daysInGrid",value:function(){var t=this._cursor.startOf("month"),r=t.subtract((t.day()+6)%7,"day");return Array.from({length:42},function(o,i){return r.add(i,"day")})}},{key:"_isInRange",value:function(t){if(!this.rangeMode||!this._rangeStart||!this._rangeEnd)return null;var r=this._safeDay(this._rangeStart),o=this._safeDay(this._rangeEnd);return!r||!o?null:t.isSame(r,"day")?"start":t.isSame(o,"day")?"end":t.isBetween(r,o,"day","[]")?"between":null}},{key:"_getHoverPreview",value:function(t){if(!this.rangeMode||!this._rangeStart||this._rangeEnd||!this._hoverDate)return null;var r=this._safeDay(this._rangeStart);if(!r)return null;var o=this._hoverDate,i=o.isAfter(r,"day"),s=i?r:o,l=i?o:r;return t.isSame(r,"day")?"preview-start":t.isSame(o,"day")?"preview-end":t.isAfter(s,"day")&&t.isBefore(l,"day")?"preview-between":null}},{key:"_getDayClasses",value:function(t){var r=["dp__day"];if(!this._withinBounds(t))return r.push(this.disabledDays.includes(t.day())?"dp__day--disabled-weekday":"dp__day--disabled"),r.join(" ");var o=this._isInRange(t);if(o==="start")return r.push("dp__day--range-start"),r.join(" ");if(o==="end")return r.push("dp__day--range-end"),r.join(" ");if(o==="between")return r.push("dp__day--range-between"),r.join(" ");var i=this._getHoverPreview(t);return i==="preview-start"?(r.push("dp__day--range-start"),r.join(" ")):i==="preview-end"?(r.push("dp__day--range-end"),r.join(" ")):i==="preview-between"?(r.push("dp__day--range-between"),r.join(" ")):this.rangeMode&&this._rangeStart&&!this._rangeEnd&&t.isSame(this._safeDay(this._rangeStart),"day")?(r.push("dp__day--range-pending"),r.join(" ")):(t.isSame(this._safeDay(this.value),"day")?r.push("dp__day--selected"):t.isSame(V(),"day")?r.push("dp__day--today"):r.push("dp__day--default"),r.join(" "))}},{key:"_emitChange",value:function(t){var r;this.value=t,this.dispatchEvent(new CustomEvent("change",{detail:{value:t}})),(r=this.onChange)===null||r===void 0||r.call(this,t)}},{key:"_emitRangeChange",value:function(){if(this._rangeStart&&this._rangeEnd){var t,r={start:this._rangeStart,end:this._rangeEnd};this.dispatchEvent(new CustomEvent("rangeChange",{detail:r})),(t=this.onRangeChange)===null||t===void 0||t.call(this,r)}}},{key:"_showInputError",value:function(t){var r=this;this._errorTimer&&clearTimeout(this._errorTimer),this._hasError=!0,this._errorMsg=t,this._errorTimer=setTimeout(function(){return r._clearInputError()},3e3)}},{key:"_clearInputError",value:function(){this._hasError=!1,this._errorMsg="",this._errorTimer&&(clearTimeout(this._errorTimer),this._errorTimer=null)}},{key:"_toggleOpen",value:function(t){var r=this;if(!this.disabled){var o=t!=null?t:!this._open;if(this._open=o,o||(this._hoverDate=null),o){if(this.rangeMode){var i,s,l,d;this._cursor=(i=(s=(l=this._safeDay(this._rangeEnd))===null||l===void 0?void 0:l.clone())!==null&&s!==void 0?s:(d=this._safeDay(this._rangeStart))===null||d===void 0?void 0:d.clone())!==null&&i!==void 0?i:V()}else{var u,p;this._cursor=(u=(p=this._safeDay(this.value))===null||p===void 0?void 0:p.clone())!==null&&u!==void 0?u:V()}this._viewMode="calendar",this.updateComplete.then(function(){r._recalcPopupPos(),window.requestAnimationFrame(function(){r._recalcPopupPos();var h=r.renderRoot.querySelector("#grid");h==null||h.focus()})})}}}},{key:"_onInput",value:function(t){var r=t.target.value.trim();r||(this._emitChange(null),this.rangeMode&&(this._rangeStart=null,this._rangeEnd=null)),this._clearInputError()}},{key:"_onKeydown",value:function(t){(t.key==="Tab"||t.key==="Enter")&&this._parseAndSetDate()}},{key:"_parseAndSetDate",value:function(){var t=this.renderRoot.querySelector("#"+this.inputId);if(t){var r=t.value.trim();if(!r){if(this.rangeMode&&this._rangeStart&&!this._rangeEnd)return;this._emitChange(null),this.rangeMode&&(this._rangeStart=null,this._rangeEnd=null);return}if(!(this.rangeMode&&this._rangeStart&&this._rangeEnd)){var o=this._safeDay(r);o&&this._withinBounds(o)?(this._emitChange(o.format("YYYY-MM-DD")),this._cursor=o,this.rangeMode&&(this._rangeStart=null,this._rangeEnd=null),this._clearInputError()):this._showInputError("Geçersiz tarih formatı. Örnek: 19/09/2025")}}}},{key:"_select",value:function(t){if(this._withinBounds(t))if(this.rangeMode)if(!this._rangeStart)this._rangeStart=t.format("YYYY-MM-DD"),this._cursor=t;else if(this._rangeEnd)this._rangeStart=t.format("YYYY-MM-DD"),this._rangeEnd=null,this._cursor=t;else{var r=this._safeDay(this._rangeStart);r&&t.isBefore(r,"day")?(this._rangeEnd=this._rangeStart,this._rangeStart=t.format("YYYY-MM-DD")):this._rangeEnd=t.format("YYYY-MM-DD"),this._cursor=t,this._viewMode="calendar",this._toggleOpen(!1),this._emitRangeChange()}else this._emitChange(t.format("YYYY-MM-DD")),this._cursor=t,this._viewMode="calendar",this._toggleOpen(!1)}},{key:"_selectMonth",value:function(t){this._cursor=this._cursor.month(t),this._viewMode="calendar"}},{key:"_selectYear",value:function(t){this._cursor=this._cursor.year(t),this._viewMode="month"}},{key:"_keydownGrid",value:function(t){var r={ArrowLeft:-1,ArrowRight:1,ArrowUp:-7,ArrowDown:7};t.key in r?(t.preventDefault(),this._cursor=this._cursor.add(r[t.key],"day")):t.key==="Enter"||t.key===" "?(t.preventDefault(),this._select(this._cursor)):t.key==="Escape"?(t.preventDefault(),this._toggleOpen(!1)):t.key==="PageUp"?(t.preventDefault(),this._cursor=t.shiftKey?this._cursor.subtract(1,"year"):this._cursor.subtract(1,"month")):t.key==="PageDown"?(t.preventDefault(),this._cursor=t.shiftKey?this._cursor.add(1,"year"):this._cursor.add(1,"month")):t.key==="Home"?(t.preventDefault(),this._cursor=this._cursor.startOf("month")):t.key==="End"&&(t.preventDefault(),this._cursor=this._cursor.endOf("month"))}},{key:"_renderCalendar",value:function(t){var r=this,o=this._daysInGrid();return m(No||(No=b([`
|
|
1231
|
+
`}},a.LogosphereChatBot.styles=[D`${A(Ba)}`],a.LogosphereChatBot.ICONS={launcher:"data:image/svg+xml,%3Csvg%20width%3D%2251%22%20height%3D%2242%22%20viewBox%3D%220%200%2051%2042%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20fill-rule%3D%22evenodd%22%20clip-rule%3D%22evenodd%22%20d%3D%22M38.457%200C40.0338%200%2041.542%200.293293%2042.9302%200.8283L49.15%206.07675C50.2611%207.93912%2050.8994%2010.1162%2050.8994%2012.4424V23.084C50.8994%2024.4858%2050.6676%2025.8334%2050.2402%2027.0907L43.1534%2034.6096C41.7043%2035.2006%2040.1187%2035.5264%2038.457%2035.5264H30.7605L38.5805%2027.2296C40.814%2027.1643%2042.6045%2025.3332%2042.6045%2023.084V12.4424C42.6045%2010.1518%2040.7476%208.29492%2038.457%208.29492H12.4424C10.1518%208.29492%208.29492%2010.1518%208.29492%2012.4424V23.084C8.29492%2025.3746%2010.1518%2027.2314%2012.4424%2027.2314H33.5078L20.4487%2041.0866C17.7992%2042.5379%2014.3381%2040.2741%2014.7842%2036.7803C14.8402%2036.3421%2014.9629%2035.9194%2015.1416%2035.5264H12.4424C10.9217%2035.5264%209.46472%2035.2536%208.11774%2034.7542L0.610679%2026.945C0.214298%2025.7295%200%2024.4318%200%2023.084V12.4424C0%2010.8011%200.317794%209.23402%200.895207%207.79935L7.12424%201.19058C8.73679%200.427072%2010.5397%200%2012.4424%200H38.457ZM23.1357%2017.7881C23.1357%2015.4815%2021.2656%2013.6113%2018.959%2013.6113C16.6525%2013.6114%2014.7822%2015.4815%2014.7822%2017.7881C14.7824%2020.0945%2016.6526%2021.9638%2018.959%2021.9639C21.2655%2021.9639%2023.1356%2020.0945%2023.1357%2017.7881ZM36.2344%2017.7881C36.2344%2015.4815%2034.3642%2013.6113%2032.0576%2013.6113C29.7511%2013.6114%2027.8809%2015.4815%2027.8809%2017.7881C27.881%2020.0945%2029.7512%2021.9638%2032.0576%2021.9639C34.3641%2021.9639%2036.2342%2020.0945%2036.2344%2017.7881Z%22%20fill%3D%22url(%23paint0_linear_97_4585)%22%2F%3E%3Cdefs%3E%3ClinearGradient%20id%3D%22paint0_linear_97_4585%22%20x1%3D%2231.662%22%20y1%3D%224.88016%22%20x2%3D%2214.4119%22%20y2%3D%2237.9167%22%20gradientUnits%3D%22userSpaceOnUse%22%3E%3Cstop%20stop-color%3D%22%23F22727%22%2F%3E%3Cstop%20offset%3D%221%22%20stop-color%3D%22%23CA0D0D%22%2F%3E%3C%2FlinearGradient%3E%3C%2Fdefs%3E%3C%2Fsvg%3E"},N([d({type:String,attribute:"return-uri"})],a.LogosphereChatBot.prototype,"returnUri",2),N([d({type:String,attribute:"question-prompt"})],a.LogosphereChatBot.prototype,"questionPrompt",2),N([d({type:Boolean,attribute:"minimized-icon-only"})],a.LogosphereChatBot.prototype,"minimizedIconOnly",2),N([d({type:Boolean,attribute:"draggable"})],a.LogosphereChatBot.prototype,"draggable",2),N([d({type:Boolean,attribute:"resizable"})],a.LogosphereChatBot.prototype,"resizable",2),N([d({type:Array,hasChanged:(r,e)=>r===e?!1:!e||!r||r.length!==e.length?!0:JSON.stringify(r)!==JSON.stringify(e)}),d({type:Array})],a.LogosphereChatBot.prototype,"products",2),N([d({type:Boolean,attribute:"open-initially"})],a.LogosphereChatBot.prototype,"openInitially",2),N([d({type:Boolean,attribute:"show-feedback-buttons"})],a.LogosphereChatBot.prototype,"showFeedbackButtons",2),N([m()],a.LogosphereChatBot.prototype,"open",2),N([m()],a.LogosphereChatBot.prototype,"fullscreen",2),N([m()],a.LogosphereChatBot.prototype,"messages",2),N([m()],a.LogosphereChatBot.prototype,"conversationId",2),N([m()],a.LogosphereChatBot.prototype,"assertionToken",2),N([m()],a.LogosphereChatBot.prototype,"isLoading",2),N([m()],a.LogosphereChatBot.prototype,"inputText",2),N([m()],a.LogosphereChatBot.prototype,"selectedProductId",2),N([m()],a.LogosphereChatBot.prototype,"windowWidth",2),N([m()],a.LogosphereChatBot.prototype,"windowHeight",2),N([m()],a.LogosphereChatBot.prototype,"position",2),N([m()],a.LogosphereChatBot.prototype,"isDragging",2),N([m()],a.LogosphereChatBot.prototype,"screenWidth",2),N([m()],a.LogosphereChatBot.prototype,"userAtBottom",2),N([m()],a.LogosphereChatBot.prototype,"showScrollDown",2),N([F("#chat-container")],a.LogosphereChatBot.prototype,"chatContainer",2),N([F("#product")],a.LogosphereChatBot.prototype,"productEl",2),a.LogosphereChatBot=N([M("logosphere-chatbot")],a.LogosphereChatBot);const Ha=':host{display:block;font-family:var(--font-family-base)}.dp__calendar{display:block}.dp__header{display:flex;align-items:center;justify-content:space-between;margin-bottom:var(--spacing-3)}.dp__nav-btn{display:inline-flex;align-items:center;justify-content:center;padding:var(--spacing-2);border:none;background:none;border-radius:var(--radius-base);cursor:pointer;color:var(--color-body-text);transition:background-color var(--transition-speed-fast) var(--transition-timing)}.dp__nav-btn:hover{background-color:var(--color-light)}.dp__header-label{font-size:var(--font-size-xl);font-weight:var(--font-weight-semibold);letter-spacing:-.025em;-webkit-user-select:none;user-select:none;cursor:pointer;color:var(--color-body-text);transition:color var(--transition-speed-fast) var(--transition-timing)}.dp__header-label:hover{color:var(--color-primary)}.dp__weekdays{display:grid;grid-template-columns:repeat(7,1fr);text-align:center;font-size:var(--font-size-sm);color:var(--color-tertiary);margin-bottom:var(--spacing-1);-webkit-user-select:none;user-select:none}.dp__weekday{padding:var(--spacing-1) 0}.dp__grid{display:grid;grid-template-columns:repeat(7,1fr);row-gap:2px;outline:none}.dp__day{position:relative;height:36px;display:flex;align-items:center;justify-content:center;border:none;background:transparent;cursor:pointer;padding:0;min-width:0;border-radius:0;color:var(--color-body-text);font-family:var(--font-family-base)}.dp__day-num{position:relative;z-index:1;width:32px;height:32px;display:flex;align-items:center;justify-content:center;border-radius:var(--radius-full);font-size:var(--font-size-sm);flex-shrink:0;transition:background-color var(--transition-speed-fast) var(--transition-timing),color var(--transition-speed-fast) var(--transition-timing)}.dp__day--range-start:before,.dp__day--range-end:before,.dp__day--range-between:before{content:"";position:absolute;top:2px;bottom:2px;background-color:color-mix(in srgb,var(--color-primary) 15%,transparent);z-index:0;pointer-events:none}.dp__day--range-start:before{left:50%;right:0}.dp__day--range-end:before{left:0;right:50%}.dp__day--range-between:before{left:0;right:0}.dp__day--out-of-month{opacity:.4}.dp__day--focused .dp__day-num{background-color:var(--color-light)}.dp__day--disabled{cursor:not-allowed;pointer-events:none}.dp__day--disabled .dp__day-num{color:var(--color-gray-300);background-color:var(--color-gray-50)}.dp__day--disabled-weekday{cursor:not-allowed;pointer-events:none}.dp__day--disabled-weekday .dp__day-num{color:var(--color-gray-300)}.dp__day--today .dp__day-num{background-color:var(--color-gray-200);color:var(--color-gray-800)}.dp__day--selected .dp__day-num{background-color:var(--color-primary);color:#fff}.dp__day--default:hover .dp__day-num{background-color:var(--color-light)}.dp__day--range-pending .dp__day-num,.dp__day--range-start .dp__day-num,.dp__day--range-end .dp__day-num{background-color:var(--color-primary);color:#fff}.dp__day--range-between .dp__day-num{color:var(--color-primary);background:transparent}.dp__month-grid,.dp__year-grid{display:grid;grid-template-columns:repeat(3,1fr);grid-template-rows:repeat(4,1fr);gap:10px;margin-top:var(--spacing-3)}.dp__month-btn,.dp__year-btn{height:48px;display:flex;align-items:center;justify-content:center;border:none;border-radius:var(--radius-base);font-size:var(--font-size-sm);font-weight:var(--font-weight-medium);font-family:var(--font-family-base);cursor:pointer;background:none;color:var(--color-body-text);transition:background-color var(--transition-speed-fast) var(--transition-timing),color var(--transition-speed-fast) var(--transition-timing)}.dp__month-btn:hover:not(.dp__month-btn--selected),.dp__year-btn:hover:not(.dp__year-btn--selected){background-color:var(--color-light)}.dp__month-btn--selected,.dp__year-btn--selected{background-color:var(--color-primary);color:#fff}.dp__month-btn--current:not(.dp__month-btn--selected),.dp__year-btn--current:not(.dp__year-btn--selected){background-color:var(--color-gray-200);color:var(--color-gray-800)}.dp__footer{display:flex;align-items:center;justify-content:space-evenly;margin-top:var(--spacing-4);padding-bottom:var(--spacing-3)}.dp__footer-btn{display:inline-flex;align-items:center;gap:var(--spacing-2);padding:var(--spacing-1) var(--spacing-2);font-size:var(--font-size-sm);color:var(--color-tertiary);border:none;border-radius:var(--radius-sm);background:none;cursor:pointer;font-family:var(--font-family-base);transition:background-color var(--transition-speed-fast) var(--transition-timing),color var(--transition-speed-fast) var(--transition-timing)}.dp__footer-btn:hover{background-color:var(--color-light);color:var(--color-body-text)}';function Tt(r){return r&&r.__esModule&&Object.prototype.hasOwnProperty.call(r,"default")?r.default:r}var Jt={exports:{}},ja=Jt.exports,xi;function Na(){return xi||(xi=1,(function(r,e){(function(t,o){r.exports=o()})(ja,(function(){var t={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"};return function(o,i,s){var n=i.prototype,l=n.format;s.en.formats=t,n.format=function(c){c===void 0&&(c="YYYY-MM-DDTHH:mm:ssZ");var u=this.$locale().formats,h=(function(g,f){return g.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,(function(v,w,C){var _=C&&C.toUpperCase();return w||f[C]||t[C]||f[_].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,(function(y,x,$){return x||$.slice(1)}))}))})(c,u===void 0?{}:u);return l.call(this,h)}}}))})(Jt)),Jt.exports}var Ya=Na();const Va=Tt(Ya);var Qt={exports:{}},Fa=Qt.exports,$i;function Ua(){return $i||($i=1,(function(r,e){(function(t,o){r.exports=o()})(Fa,(function(){var t={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},o=/(\[[^[]*\])|([-_:/.,()\s]+)|(A|a|Q|YYYY|YY?|ww?|MM?M?M?|Do|DD?|hh?|HH?|mm?|ss?|S{1,3}|z|ZZ?)/g,i=/\d/,s=/\d\d/,n=/\d\d?/,l=/\d*[^-_:/,()\s\d]+/,c={},u=function(_){return(_=+_)+(_>68?1900:2e3)},h=function(_){return function(y){this[_]=+y}},g=[/[+-]\d\d:?(\d\d)?|Z/,function(_){(this.zone||(this.zone={})).offset=(function(y){if(!y||y==="Z")return 0;var x=y.match(/([+-]|\d\d)/g),$=60*x[1]+(+x[2]||0);return $===0?0:x[0]==="+"?-$:$})(_)}],f=function(_){var y=c[_];return y&&(y.indexOf?y:y.s.concat(y.f))},v=function(_,y){var x,$=c.meridiem;if($){for(var k=1;k<=24;k+=1)if(_.indexOf($(k,0,y))>-1){x=k>12;break}}else x=_===(y?"pm":"PM");return x},w={A:[l,function(_){this.afternoon=v(_,!1)}],a:[l,function(_){this.afternoon=v(_,!0)}],Q:[i,function(_){this.month=3*(_-1)+1}],S:[i,function(_){this.milliseconds=100*+_}],SS:[s,function(_){this.milliseconds=10*+_}],SSS:[/\d{3}/,function(_){this.milliseconds=+_}],s:[n,h("seconds")],ss:[n,h("seconds")],m:[n,h("minutes")],mm:[n,h("minutes")],H:[n,h("hours")],h:[n,h("hours")],HH:[n,h("hours")],hh:[n,h("hours")],D:[n,h("day")],DD:[s,h("day")],Do:[l,function(_){var y=c.ordinal,x=_.match(/\d+/);if(this.day=x[0],y)for(var $=1;$<=31;$+=1)y($).replace(/\[|\]/g,"")===_&&(this.day=$)}],w:[n,h("week")],ww:[s,h("week")],M:[n,h("month")],MM:[s,h("month")],MMM:[l,function(_){var y=f("months"),x=(f("monthsShort")||y.map((function($){return $.slice(0,3)}))).indexOf(_)+1;if(x<1)throw new Error;this.month=x%12||x}],MMMM:[l,function(_){var y=f("months").indexOf(_)+1;if(y<1)throw new Error;this.month=y%12||y}],Y:[/[+-]?\d+/,h("year")],YY:[s,function(_){this.year=u(_)}],YYYY:[/\d{4}/,h("year")],Z:g,ZZ:g};function C(_){var y,x;y=_,x=c&&c.formats;for(var $=(_=y.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,(function(R,Y,U){var H=U&&U.toUpperCase();return Y||x[U]||t[U]||x[H].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,(function(ee,te,Z){return te||Z.slice(1)}))}))).match(o),k=$.length,S=0;S<k;S+=1){var P=$[S],L=w[P],I=L&&L[0],B=L&&L[1];$[S]=B?{regex:I,parser:B}:P.replace(/^\[|\]$/g,"")}return function(R){for(var Y={},U=0,H=0;U<k;U+=1){var ee=$[U];if(typeof ee=="string")H+=ee.length;else{var te=ee.regex,Z=ee.parser,oe=R.slice(H),_e=te.exec(oe)[0];Z.call(Y,_e),R=R.replace(_e,"")}}return(function(ae){var Pe=ae.afternoon;if(Pe!==void 0){var ie=ae.hours;Pe?ie<12&&(ae.hours+=12):ie===12&&(ae.hours=0),delete ae.afternoon}})(Y),Y}}return function(_,y,x){x.p.customParseFormat=!0,_&&_.parseTwoDigitYear&&(u=_.parseTwoDigitYear);var $=y.prototype,k=$.parse;$.parse=function(S){var P=S.date,L=S.utc,I=S.args;this.$u=L;var B=I[1];if(typeof B=="string"){var R=I[2]===!0,Y=I[3]===!0,U=R||Y,H=I[2];Y&&(H=I[2]),c=this.$locale(),!R&&H&&(c=x.Ls[H]),this.$d=(function(oe,_e,ae,Pe){try{if(["x","X"].indexOf(_e)>-1)return new Date((_e==="X"?1e3:1)*oe);var ie=C(_e)(oe),ze=ie.year,Ae=ie.month,je=ie.day,xe=ie.hours,Xe=ie.minutes,dt=ie.seconds,De=ie.milliseconds,ct=ie.zone,so=ie.week,Je=new Date,Bt=je||(ze||Ae?1:Je.getDate()),pt=ze||Je.getFullYear(),ht=0;ze&&!Ae||(ht=Ae>0?Ae-1:Je.getMonth());var ut,gt=xe||0,bt=Xe||0,It=dt||0,Rt=De||0;return ct?new Date(Date.UTC(pt,ht,Bt,gt,bt,It,Rt+60*ct.offset*1e3)):ae?new Date(Date.UTC(pt,ht,Bt,gt,bt,It,Rt)):(ut=new Date(pt,ht,Bt,gt,bt,It,Rt),so&&(ut=Pe(ut).week(so).toDate()),ut)}catch(Ne){return new Date("")}})(P,B,L,x),this.init(),H&&H!==!0&&(this.$L=this.locale(H).$L),U&&P!=this.format(B)&&(this.$d=new Date("")),c={}}else if(B instanceof Array)for(var ee=B.length,te=1;te<=ee;te+=1){I[1]=B[te-1];var Z=x.apply(this,I);if(Z.isValid()){this.$d=Z.$d,this.$L=Z.$L,this.init();break}te===ee&&(this.$d=new Date(""))}else k.call(this,S)}}}))})(Qt)),Qt.exports}var qa=Ua();const Za=Tt(qa);var eo={exports:{}},Wa=eo.exports,ki;function Ga(){return ki||(ki=1,(function(r,e){(function(t,o){r.exports=o()})(Wa,(function(){return function(t,o,i){o.prototype.isBetween=function(s,n,l,c){var u=i(s),h=i(n),g=(c=c||"()")[0]==="(",f=c[1]===")";return(g?this.isAfter(u,l):!this.isBefore(u,l))&&(f?this.isBefore(h,l):!this.isAfter(h,l))||(g?this.isBefore(u,l):!this.isAfter(u,l))&&(f?this.isAfter(h,l):!this.isBefore(h,l))}}}))})(eo)),eo.exports}var Ka=Ga();const Xa=Tt(Ka);var to={exports:{}},Ja=to.exports,Ci;function Qa(){return Ci||(Ci=1,(function(r,e){(function(t,o){r.exports=o()})(Ja,(function(){var t="week",o="year";return function(i,s,n){var l=s.prototype;l.week=function(c){if(c===void 0&&(c=null),c!==null)return this.add(7*(c-this.week()),"day");var u=this.$locale().yearStart||1;if(this.month()===11&&this.date()>25){var h=n(this).startOf(o).add(1,o).date(u),g=n(this).endOf(t);if(h.isBefore(g))return 1}var f=n(this).startOf(o).date(u).startOf(t).subtract(1,"millisecond"),v=this.diff(f,t,!0);return v<0?n(this).startOf("week").week():Math.ceil(v)},l.weeks=function(c){return c===void 0&&(c=null),this.week(c)}}}))})(to)),to.exports}var en=Qa();const tn=Tt(en);var oo={exports:{}},on=oo.exports,Si;function rn(){return Si||(Si=1,(function(r,e){(function(t,o){r.exports=o()})(on,(function(){return function(t,o,i){var s=o.prototype,n=function(g){return g&&(g.indexOf?g:g.s)},l=function(g,f,v,w,C){var _=g.name?g:g.$locale(),y=n(_[f]),x=n(_[v]),$=y||x.map((function(S){return S.slice(0,w)}));if(!C)return $;var k=_.weekStart;return $.map((function(S,P){return $[(P+(k||0))%7]}))},c=function(){return i.Ls[i.locale()]},u=function(g,f){return g.formats[f]||(function(v){return v.replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,(function(w,C,_){return C||_.slice(1)}))})(g.formats[f.toUpperCase()])},h=function(){var g=this;return{months:function(f){return f?f.format("MMMM"):l(g,"months")},monthsShort:function(f){return f?f.format("MMM"):l(g,"monthsShort","months",3)},firstDayOfWeek:function(){return g.$locale().weekStart||0},weekdays:function(f){return f?f.format("dddd"):l(g,"weekdays")},weekdaysMin:function(f){return f?f.format("dd"):l(g,"weekdaysMin","weekdays",2)},weekdaysShort:function(f){return f?f.format("ddd"):l(g,"weekdaysShort","weekdays",3)},longDateFormat:function(f){return u(g.$locale(),f)},meridiem:this.$locale().meridiem,ordinal:this.$locale().ordinal}};s.localeData=function(){return h.bind(this)()},i.localeData=function(){var g=c();return{firstDayOfWeek:function(){return g.weekStart||0},weekdays:function(){return i.weekdays()},weekdaysShort:function(){return i.weekdaysShort()},weekdaysMin:function(){return i.weekdaysMin()},months:function(){return i.months()},monthsShort:function(){return i.monthsShort()},longDateFormat:function(f){return u(g,f)},meridiem:g.meridiem,ordinal:g.ordinal}},i.months=function(){return l(c(),"months")},i.monthsShort=function(){return l(c(),"monthsShort","months",3)},i.weekdays=function(g){return l(c(),"weekdays",null,null,g)},i.weekdaysShort=function(g){return l(c(),"weekdaysShort","weekdays",3,g)},i.weekdaysMin=function(g){return l(c(),"weekdaysMin","weekdays",2,g)}}}))})(oo)),oo.exports}var sn=rn();const an=Tt(sn);var io={exports:{}},nn=io.exports,Ei;function ln(){return Ei||(Ei=1,(function(r,e){(function(t,o){r.exports=o(z)})(nn,(function(t){function o(n){return n&&typeof n=="object"&&"default"in n?n:{default:n}}var i=o(t),s={name:"tr",weekdays:"Pazar_Pazartesi_Salı_Çarşamba_Perşembe_Cuma_Cumartesi".split("_"),weekdaysShort:"Paz_Pts_Sal_Çar_Per_Cum_Cts".split("_"),weekdaysMin:"Pz_Pt_Sa_Ça_Pe_Cu_Ct".split("_"),months:"Ocak_Şubat_Mart_Nisan_Mayıs_Haziran_Temmuz_Ağustos_Eylül_Ekim_Kasım_Aralık".split("_"),monthsShort:"Oca_Şub_Mar_Nis_May_Haz_Tem_Ağu_Eyl_Eki_Kas_Ara".split("_"),weekStart:1,formats:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},relativeTime:{future:"%s sonra",past:"%s önce",s:"birkaç saniye",m:"bir dakika",mm:"%d dakika",h:"bir saat",hh:"%d saat",d:"bir gün",dd:"%d gün",M:"bir ay",MM:"%d ay",y:"bir yıl",yy:"%d yıl"},ordinal:function(n){return n+"."}};return i.default.locale(s,null,!0),s}))})(io)),io.exports}ln(),z.extend(Va),z.extend(Za),z.extend(Xa),z.extend(tn),z.extend(an),z.locale("tr");const Pi=["DD/MM/YYYY","DD.MM.YYYY","DD MM YYYY","DD-MM-YYYY","DD/MM/YY","DD.MM.YY","DD MM YY","DD-MM-YY","YYYY-MM-DD","YYYY/MM/DD","YYYY.MM.DD","YYYY MM DD"],zi=z.weekdaysShort(),dn=z.months(),cn=[...zi.slice(1),zi[0]];function ce(r){if(!r)return null;for(const t of Pi){const o=z(r,t,!0);if(o.isValid())return o}const e=z(r);return e.isValid()?e:null}var pn=Object.defineProperty,hn=Object.getOwnPropertyDescriptor,X=(r,e,t,o)=>{for(var i=o>1?void 0:o?hn(e,t):e,s=r.length-1,n;s>=0;s--)(n=r[s])&&(i=(o?n(e,t,i):n(i))||i);return o&&i&&pn(e,t,i),i};a.LogosphereCalendar=class extends E{constructor(){super(...arguments),this.value=null,this.min=null,this.max=null,this.disabled=!1,this.rangeMode=!1,this.disabledDays=[],this.rangeStart=null,this.rangeEnd=null,this.closable=!1,this._cursor=z(),this._rangeStart=null,this._rangeEnd=null,this._hoverDate=null,this._viewMode="calendar",this._clear=()=>{this._emitChange(null),this.rangeMode&&(this._rangeStart=null,this._rangeEnd=null,this._emitStateChange())},this._today=()=>{const e=z();this._withinBounds(e)&&this._select(e)},this._navigatePrevious=()=>{switch(this._viewMode){case"calendar":this._cursor=this._cursor.subtract(1,"month");break;case"month":this._cursor=this._cursor.subtract(1,"year");break;case"year":this._cursor=this._cursor.subtract(12,"year");break}},this._navigateNext=()=>{switch(this._viewMode){case"calendar":this._cursor=this._cursor.add(1,"month");break;case"month":this._cursor=this._cursor.add(1,"year");break;case"year":this._cursor=this._cursor.add(12,"year");break}},this._handleHeaderClick=()=>{this._viewMode==="calendar"?this._viewMode="month":this._viewMode==="month"&&(this._viewMode="year")}}willUpdate(e){var t,o,i,s;if(e.has("value")&&!this.rangeMode){const n=ce(this.value);n&&(this._cursor=n)}e.has("rangeStart")&&(this._rangeStart=this.rangeStart),e.has("rangeEnd")&&(this._rangeEnd=this.rangeEnd),(e.has("rangeStart")||e.has("rangeEnd"))&&this.rangeMode&&(this._cursor=(s=(i=(t=ce(this.rangeEnd))==null?void 0:t.clone())!=null?i:(o=ce(this.rangeStart))==null?void 0:o.clone())!=null?s:this._cursor)}focusGrid(){var e;(e=this.renderRoot.querySelector("#grid"))==null||e.focus()}_emitStateChange(){this.dispatchEvent(new CustomEvent("calendar-state-change",{detail:{rangeStart:this._rangeStart,rangeEnd:this._rangeEnd}}))}_emitChange(e){var t;this.value=e,this.dispatchEvent(new CustomEvent("change",{detail:{value:e}})),(t=this.onChange)==null||t.call(this,e)}_emitRangeChange(){var t;if(!this._rangeStart||!this._rangeEnd)return;const e={start:this._rangeStart,end:this._rangeEnd};this.dispatchEvent(new CustomEvent("rangeChange",{detail:e})),(t=this.onRangeChange)==null||t.call(this,e)}_withinBounds(e){const t=ce(this.min),o=ce(this.max);return!(t&&e.isBefore(t,"day")||o&&e.isAfter(o,"day")||this.disabledDays.includes(e.day()))}_getYears(){const e=this._cursor.year()-6;return Array.from({length:12},(t,o)=>e+o)}_getHeaderLabel(){switch(this._viewMode){case"calendar":return this._cursor.format("MMMM YYYY");case"month":return this._cursor.format("YYYY");case"year":{const e=this._getYears();return`${e[0]}-${e[e.length-1]}`}}}_daysInGrid(){const e=this._cursor.startOf("month"),t=e.subtract((e.day()+6)%7,"day");return Array.from({length:42},(o,i)=>t.add(i,"day"))}_isInRange(e){if(!this.rangeMode||!this._rangeStart||!this._rangeEnd)return null;const t=ce(this._rangeStart),o=ce(this._rangeEnd);return!t||!o?null:e.isSame(t,"day")?"start":e.isSame(o,"day")?"end":e.isBetween(t,o,"day","[]")?"between":null}_getHoverPreview(e){if(!this.rangeMode||!this._rangeStart||this._rangeEnd||!this._hoverDate)return null;const t=ce(this._rangeStart);if(!t)return null;const o=this._hoverDate,i=o.isAfter(t,"day"),s=i?t:o,n=i?o:t;return e.isSame(t,"day")?"preview-start":e.isSame(o,"day")?"preview-end":e.isAfter(s,"day")&&e.isBefore(n,"day")?"preview-between":null}_getDayClasses(e){const t=["dp__day"];if(!this._withinBounds(e))return t.push(this.disabledDays.includes(e.day())?"dp__day--disabled-weekday":"dp__day--disabled"),t.join(" ");const o=this._isInRange(e);if(o==="start")return t.push("dp__day--range-start"),t.join(" ");if(o==="end")return t.push("dp__day--range-end"),t.join(" ");if(o==="between")return t.push("dp__day--range-between"),t.join(" ");const i=this._getHoverPreview(e);return i==="preview-start"?(t.push("dp__day--range-start"),t.join(" ")):i==="preview-end"?(t.push("dp__day--range-end"),t.join(" ")):i==="preview-between"?(t.push("dp__day--range-between"),t.join(" ")):this.rangeMode&&this._rangeStart&&!this._rangeEnd&&e.isSame(ce(this._rangeStart),"day")?(t.push("dp__day--range-pending"),t.join(" ")):(e.isSame(ce(this.value),"day")?t.push("dp__day--selected"):e.isSame(z(),"day")?t.push("dp__day--today"):t.push("dp__day--default"),t.join(" "))}_select(e){if(!(this.disabled||!this._withinBounds(e))){if(this.rangeMode){if(!this._rangeStart){this._rangeStart=e.format("YYYY-MM-DD"),this._cursor=e,this._emitStateChange();return}if(!this._rangeEnd){const t=ce(this._rangeStart);t&&e.isBefore(t,"day")?(this._rangeEnd=this._rangeStart,this._rangeStart=e.format("YYYY-MM-DD")):this._rangeEnd=e.format("YYYY-MM-DD"),this._cursor=e,this._viewMode="calendar",this._emitStateChange(),this._emitRangeChange();return}this._rangeStart=e.format("YYYY-MM-DD"),this._rangeEnd=null,this._cursor=e,this._emitStateChange();return}this._emitChange(e.format("YYYY-MM-DD")),this._cursor=e,this._viewMode="calendar"}}_selectMonth(e){this._cursor=this._cursor.month(e),this._viewMode="calendar"}_selectYear(e){this._cursor=this._cursor.year(e),this._viewMode="month"}_keydownGrid(e){const t={ArrowLeft:-1,ArrowRight:1,ArrowUp:-7,ArrowDown:7};e.key in t?(e.preventDefault(),this._cursor=this._cursor.add(t[e.key],"day")):e.key==="Enter"||e.key===" "?(e.preventDefault(),this._select(this._cursor)):e.key==="Escape"&&this.closable?(e.preventDefault(),this.dispatchEvent(new CustomEvent("close-request"))):e.key==="PageUp"?(e.preventDefault(),this._cursor=e.shiftKey?this._cursor.subtract(1,"year"):this._cursor.subtract(1,"month")):e.key==="PageDown"?(e.preventDefault(),this._cursor=e.shiftKey?this._cursor.add(1,"year"):this._cursor.add(1,"month")):e.key==="Home"?(e.preventDefault(),this._cursor=this._cursor.startOf("month")):e.key==="End"&&(e.preventDefault(),this._cursor=this._cursor.endOf("month"))}_renderCalendar(e){const t=this._daysInGrid();return p`
|
|
533
1232
|
<div class="dp__weekdays" role="row">
|
|
534
|
-
|
|
1233
|
+
${cn.map(o=>p`<div class="dp__weekday" role="columnheader" aria-label=${o}>${o}</div>`)}
|
|
535
1234
|
</div>
|
|
536
1235
|
<div
|
|
537
1236
|
id="grid"
|
|
@@ -539,124 +1238,212 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
539
1238
|
class="dp__grid"
|
|
540
1239
|
role="grid"
|
|
541
1240
|
aria-label="Takvim"
|
|
542
|
-
@keydown
|
|
543
|
-
@mouseleave
|
|
1241
|
+
@keydown=${this._keydownGrid}
|
|
1242
|
+
@mouseleave=${()=>{this._hoverDate=null}}
|
|
544
1243
|
>
|
|
545
|
-
|
|
546
|
-
</div>
|
|
547
|
-
`])),Rl.map(function(i){return m(qo||(qo=b(['<div class="dp__weekday" role="columnheader" aria-label=',">","</div>"])),i,i)}),this._keydownGrid,function(){r._hoverDate=null},o.map(function(i){var s=i.month()===r._cursor.month(),l=t?i.isSame(t,"day"):!1,d=i.isSame(r._cursor,"day"),u=!r._withinBounds(i),p=[r._getDayClasses(i),s?"":"dp__day--out-of-month",d?"dp__day--focused":""].filter(Boolean).join(" ");return m(Vo||(Vo=b([`
|
|
1244
|
+
${t.map(o=>{const i=o.month()===this._cursor.month(),s=e?o.isSame(e,"day"):!1,n=o.isSame(this._cursor,"day"),l=!this._withinBounds(o),c=[this._getDayClasses(o),i?"":"dp__day--out-of-month",n?"dp__day--focused":""].filter(Boolean).join(" ");return p`
|
|
548
1245
|
<button
|
|
549
|
-
class
|
|
1246
|
+
class=${c}
|
|
550
1247
|
role="gridcell"
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
1248
|
+
aria-selected=${s?"true":"false"}
|
|
1249
|
+
aria-disabled=${l?"true":"false"}
|
|
1250
|
+
tabindex=${n?"0":"-1"}
|
|
1251
|
+
@click=${()=>!l&&this._select(o)}
|
|
1252
|
+
@mouseenter=${()=>{this.rangeMode&&this._rangeStart&&!this._rangeEnd&&(this._hoverDate=o)}}
|
|
556
1253
|
>
|
|
557
|
-
<span class="dp__day-num"
|
|
1254
|
+
<span class="dp__day-num">${o.date()}</span>
|
|
558
1255
|
</button>
|
|
559
|
-
`
|
|
560
|
-
<div class="dp__month-grid" role="grid" aria-label="Ay seçimi">
|
|
561
|
-
`,`
|
|
1256
|
+
`})}
|
|
562
1257
|
</div>
|
|
563
|
-
`
|
|
1258
|
+
`}_renderMonthGrid(){return p`
|
|
1259
|
+
<div class="dp__month-grid" role="grid" aria-label="Ay seçimi">
|
|
1260
|
+
${dn.map((e,t)=>{const o=t===this._cursor.month(),i=t===z().month()&&this._cursor.year()===z().year();return p`
|
|
564
1261
|
<button
|
|
565
|
-
class="dp__month-btn
|
|
1262
|
+
class="dp__month-btn ${o?"dp__month-btn--selected":""} ${i&&!o?"dp__month-btn--current":""}"
|
|
566
1263
|
role="gridcell"
|
|
567
|
-
aria-selected
|
|
568
|
-
@click
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
1264
|
+
aria-selected=${o?"true":"false"}
|
|
1265
|
+
@click=${()=>this._selectMonth(t)}
|
|
1266
|
+
>
|
|
1267
|
+
${e}
|
|
1268
|
+
</button>
|
|
1269
|
+
`})}
|
|
573
1270
|
</div>
|
|
574
|
-
`
|
|
1271
|
+
`}_renderYearGrid(){return p`
|
|
1272
|
+
<div class="dp__year-grid" role="grid" aria-label="Yıl seçimi">
|
|
1273
|
+
${this._getYears().map(e=>{const t=e===this._cursor.year(),o=e===z().year();return p`
|
|
575
1274
|
<button
|
|
576
|
-
class="dp__year-btn
|
|
1275
|
+
class="dp__year-btn ${t?"dp__year-btn--selected":""} ${o&&!t?"dp__year-btn--current":""}"
|
|
577
1276
|
role="gridcell"
|
|
578
|
-
aria-selected
|
|
579
|
-
@click
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
id=`,`
|
|
597
|
-
class="dp__icon-btn"
|
|
598
|
-
aria-label=`,`
|
|
599
|
-
aria-expanded=`,`
|
|
600
|
-
aria-haspopup="dialog"
|
|
601
|
-
@click=`,`
|
|
602
|
-
>
|
|
603
|
-
<ui-icon name="uil-calendar" size="16"></ui-icon>
|
|
1277
|
+
aria-selected=${t?"true":"false"}
|
|
1278
|
+
@click=${()=>this._selectYear(e)}
|
|
1279
|
+
>
|
|
1280
|
+
${e}
|
|
1281
|
+
</button>
|
|
1282
|
+
`})}
|
|
1283
|
+
</div>
|
|
1284
|
+
`}render(){const e=ce(this.value);return p`
|
|
1285
|
+
<div class="dp__calendar">
|
|
1286
|
+
<div class="dp__header">
|
|
1287
|
+
<button class="dp__nav-btn" @click=${this._navigatePrevious} aria-label="Önceki">
|
|
1288
|
+
<ui-icon name="uil-arrow-left" size="16"></ui-icon>
|
|
1289
|
+
</button>
|
|
1290
|
+
<span class="dp__header-label" @click=${this._handleHeaderClick} role="button" tabindex="0">
|
|
1291
|
+
${this._getHeaderLabel()}
|
|
1292
|
+
</span>
|
|
1293
|
+
<button class="dp__nav-btn" @click=${this._navigateNext} aria-label="Sonraki">
|
|
1294
|
+
<ui-icon name="uil-arrow-right" size="16"></ui-icon>
|
|
604
1295
|
</button>
|
|
605
|
-
`,`
|
|
606
1296
|
</div>
|
|
607
1297
|
|
|
608
|
-
|
|
1298
|
+
${this._viewMode==="calendar"?this._renderCalendar(e):this._viewMode==="month"?this._renderMonthGrid():this._renderYearGrid()}
|
|
1299
|
+
|
|
1300
|
+
<div class="dp__footer">
|
|
1301
|
+
<button class="dp__footer-btn" @click=${this._today} aria-label="Bugün">
|
|
1302
|
+
<ui-icon name="uil-calendar" size="14"></ui-icon>
|
|
1303
|
+
</button>
|
|
1304
|
+
<button class="dp__footer-btn" @click=${this._clear} aria-label="Temizle">
|
|
1305
|
+
<ui-icon name="uil-trash" size="14"></ui-icon>
|
|
1306
|
+
</button>
|
|
1307
|
+
${this.closable?p`
|
|
1308
|
+
<button
|
|
1309
|
+
class="dp__footer-btn"
|
|
1310
|
+
@click=${()=>this.dispatchEvent(new CustomEvent("close-request"))}
|
|
1311
|
+
aria-label="Kapat"
|
|
1312
|
+
>
|
|
1313
|
+
<ui-icon name="uil-times" size="14"></ui-icon>
|
|
1314
|
+
</button>
|
|
1315
|
+
`:null}
|
|
1316
|
+
</div>
|
|
609
1317
|
</div>
|
|
610
|
-
`])),this.
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
<
|
|
614
|
-
class="
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
1318
|
+
`}},a.LogosphereCalendar.styles=[D`${A(Ha)}`],X([d({type:String})],a.LogosphereCalendar.prototype,"value",2),X([d({type:String})],a.LogosphereCalendar.prototype,"min",2),X([d({type:String})],a.LogosphereCalendar.prototype,"max",2),X([d({type:Boolean})],a.LogosphereCalendar.prototype,"disabled",2),X([d({type:Boolean})],a.LogosphereCalendar.prototype,"rangeMode",2),X([d({type:Array})],a.LogosphereCalendar.prototype,"disabledDays",2),X([d({type:String})],a.LogosphereCalendar.prototype,"rangeStart",2),X([d({type:String})],a.LogosphereCalendar.prototype,"rangeEnd",2),X([d({type:Boolean})],a.LogosphereCalendar.prototype,"closable",2),X([d({attribute:!1})],a.LogosphereCalendar.prototype,"onChange",2),X([d({attribute:!1})],a.LogosphereCalendar.prototype,"onRangeChange",2),X([m()],a.LogosphereCalendar.prototype,"_cursor",2),X([m()],a.LogosphereCalendar.prototype,"_rangeStart",2),X([m()],a.LogosphereCalendar.prototype,"_rangeEnd",2),X([m()],a.LogosphereCalendar.prototype,"_hoverDate",2),X([m()],a.LogosphereCalendar.prototype,"_viewMode",2),a.LogosphereCalendar=X([M("logosphere-calendar")],a.LogosphereCalendar);const un=":host{display:block}.dp{display:block;position:relative;width:100%;font-family:var(--font-family-base)}.dp__field,.dp__reference{width:100%}.dp__input{width:100%;border:none;outline:none;background:transparent;font-size:var(--font-size-sm);font-family:var(--font-family-base);color:var(--color-body-text);line-height:1.5}.dp__input::placeholder{color:var(--color-tertiary)}.dp__input:disabled{cursor:not-allowed}.dp__icon-btn{border:none;background:transparent;color:var(--color-gray-400);cursor:pointer;padding:0;display:inline-flex;align-items:center;justify-content:center;line-height:1;transition:color var(--transition-speed-fast) var(--transition-timing)}.dp__icon-btn_suffix{padding-right:var(--spacing-1)}.dp__icon-btn:hover{color:var(--color-gray-600)}.dp__icon-btn:disabled{cursor:not-allowed;opacity:.5}.dp__popup{background-color:var(--datepicker-popup-bg, var(--color-body-bg));border:1px solid var(--datepicker-popup-border-color, var(--color-border));border-radius:var(--radius-lg);box-shadow:var(--shadow-md);z-index:var(--z-index-dropdown);padding:var(--spacing-4);box-sizing:border-box;overflow:hidden;max-height:calc(100vh - 16px)}";var gn=Object.defineProperty,bn=Object.getOwnPropertyDescriptor,O=(r,e,t,o)=>{for(var i=o>1?void 0:o?bn(e,t):e,s=r.length-1,n;s>=0;s--)(n=r[s])&&(i=(o?n(e,t,i):n(i))||i);return o&&i&&gn(e,t,i),i};let fn=0;const _n=()=>`dp-${++fn}`;a.LogosphereDatePicker=class extends E{constructor(){super(...arguments),this.value=null,this.min=null,this.max=null,this.required=!1,this.disabled=!1,this.readonly=!1,this.expandFactor=1.05,this.placeholder="GG/AA/YYYY veya GG.AA.YYYY",this.displayFormat="DD/MM/YYYY",this.label="",this.helper="",this.error="",this.size="default",this.variant="default",this.rangeMode=!1,this.disabledDays=[],this.rangeStart=null,this.rangeEnd=null,this._open=!1,this._rangeStart=null,this._rangeEnd=null,this._hasError=!1,this._errorMsg="",this._inputDraft=null,this._errorTimer=null,this.inputId=_n(),this._outsideClick=e=>{this._open&&(e.composedPath().includes(this)||(this._parseAndSetDate(),this._toggleOpen(!1)))},this._openDropdown=()=>{this._toggleOpen(!0)},this._onBlur=()=>{this._parseAndSetDate()}}willUpdate(e){e.has("rangeStart")&&(this._rangeStart=this.rangeStart),e.has("rangeEnd")&&(this._rangeEnd=this.rangeEnd),e.has("value")&&!this._isInputFocused()&&(this._inputDraft=null)}connectedCallback(){super.connectedCallback(),window.addEventListener("click",this._outsideClick,!0)}disconnectedCallback(){window.removeEventListener("click",this._outsideClick,!0),this._destroyPopper(),this._errorTimer&&clearTimeout(this._errorTimer),super.disconnectedCallback()}updated(e){if(super.updated(e),e.has("_open")){this._open?this._updatePopper():this._destroyPopper();return}this._open&&this._updatePopper()}_safeDay(e){return ce(e)}_isInputFocused(){var e;return((e=this.shadowRoot)==null?void 0:e.activeElement)===this._inputElement}_withinBounds(e){const t=this._safeDay(this.min),o=this._safeDay(this.max);return!(t&&e.isBefore(t,"day")||o&&e.isAfter(o,"day")||this.disabledDays.includes(e.day()))}_displayValue(){if(this.rangeMode&&this._rangeStart&&this._rangeEnd){const t=this._safeDay(this._rangeStart),o=this._safeDay(this._rangeEnd);if(t&&o)return`${t.format(this.displayFormat)} - ${o.format(this.displayFormat)}`}const e=this._safeDay(this.value);return e?e.format(this.displayFormat):""}_inputValue(){var e;return(e=this._inputDraft)!=null?e:this._displayValue()}_emitChange(e){var t;this.value=e,this.dispatchEvent(new CustomEvent("change",{detail:{value:e}})),this.dispatchEvent(new CustomEvent("lgsChange",{bubbles:!0,composed:!0,detail:{value:e}})),(t=this.onChange)==null||t.call(this,e)}_emitRangeChange(){var t;if(!this._rangeStart||!this._rangeEnd)return;const e={start:this._rangeStart,end:this._rangeEnd};this.dispatchEvent(new CustomEvent("rangeChange",{detail:e})),(t=this.onRangeChange)==null||t.call(this,e)}_showInputError(e){this._errorTimer&&clearTimeout(this._errorTimer),this._hasError=!0,this._errorMsg=e,this._errorTimer=setTimeout(()=>this._clearInputError(),3e3)}_clearInputError(){this._hasError=!1,this._errorMsg="",this._errorTimer&&(clearTimeout(this._errorTimer),this._errorTimer=null)}_toggleOpen(e){if(this.disabled)return;const t=e!=null?e:!this._open;this._open=t,t&&this.updateComplete.then(()=>this._updatePopper())}_onInput(e){const t=e.target.value;this._inputDraft=t,t.trim()||(this._emitChange(null),this.rangeMode&&(this._rangeStart=null,this._rangeEnd=null)),this._clearInputError()}_parseSingleDate(e){for(const t of[this.displayFormat,...Pi]){const o=z(e,t,!0);if(o.isValid())return o}return this._safeDay(e)}_parseRangeInput(e){const t=e.split(/\s+-\s+/);if(t.length!==2)return null;const o=this._parseSingleDate(t[0].trim()),i=this._parseSingleDate(t[1].trim());return!o||!i?null:o.isAfter(i,"day")?{start:i,end:o}:{start:o,end:i}}_onKeydown(e){(e.key==="Tab"||e.key==="Enter")&&this._parseAndSetDate()}_parseAndSetDate(){const e=this._inputElement;if(!e)return;const t=e.value.trim();if(!t){if(this.rangeMode&&this._rangeStart&&!this._rangeEnd)return;this._emitChange(null),this.rangeMode&&(this._rangeStart=null,this._rangeEnd=null),this._inputDraft=null;return}if(this.rangeMode){const i=this._parseRangeInput(t);if(i){if(this._withinBounds(i.start)&&this._withinBounds(i.end)){this._rangeStart=i.start.format("YYYY-MM-DD"),this._rangeEnd=i.end.format("YYYY-MM-DD"),this._inputDraft=null,this._clearInputError(),this._emitRangeChange();return}this._showInputError("Seçilen aralık sınırlar dışında.");return}const s=this._parseSingleDate(t);if(s&&this._withinBounds(s)){this._rangeStart=s.format("YYYY-MM-DD"),this._rangeEnd=null,this._inputDraft=null,this._clearInputError();return}this._showInputError("Geçersiz aralık formatı. Örnek: 19/09/2025 - 25/09/2025");return}const o=this._parseSingleDate(t);o&&this._withinBounds(o)?(this._emitChange(o.format("YYYY-MM-DD")),this._inputDraft=null,this._clearInputError()):this._showInputError("Geçersiz tarih formatı. Örnek: 19/09/2025")}_updatePopper(){if(!this._open||!this.isConnected)return;const e=this._referenceElement,t=this._popupElement;if(!e||!t)return;const o=Math.max(270,Math.round(e.getBoundingClientRect().width*(this.expandFactor||1)));if(t.style.width=`${o}px`,this._popperInstance){this._popperInstance.setOptions({placement:"bottom",strategy:"fixed",modifiers:this._getPopperModifiers()}),this._popperInstance.update();return}this._popperInstance=Mt(e,t,{placement:"bottom",strategy:"fixed",modifiers:this._getPopperModifiers()})}_getPopperModifiers(){return[{name:"offset",options:{offset:[0,8]}},{name:"preventOverflow",options:{padding:8}},{name:"flip",options:{padding:8,fallbackPlacements:["top-start","right-start","left-start","bottom-end","top-end","right-end","left-end"]}}]}_destroyPopper(){this._popperInstance&&(this._popperInstance.destroy(),this._popperInstance=void 0)}_handleCalendarChange(e){this._emitChange(e.detail.value),this._inputDraft=null,this._toggleOpen(!1)}_handleCalendarRangeChange(e){this._rangeStart=e.detail.start,this._rangeEnd=e.detail.end,this._inputDraft=null,this._emitRangeChange(),this._toggleOpen(!1)}_handleCalendarStateChange(e){this._rangeStart=e.detail.rangeStart,this._rangeEnd=e.detail.rangeEnd}_handleSuffixClick(e){var t;e.stopPropagation(),this._openDropdown(),(t=this._inputElement)==null||t.focus()}_handleClearClick(e){var t;e.stopPropagation(),this._emitChange(null),this._rangeStart=null,this._rangeEnd=null,this._inputDraft=null,this._clearInputError(),(t=this._inputElement)==null||t.focus()}render(){const e=this.error||(this._hasError?this._errorMsg:""),t=!!this._displayValue();return p`
|
|
1319
|
+
<div class="dp">
|
|
1320
|
+
<div class="dp__reference">
|
|
1321
|
+
<logosphere-formfield
|
|
1322
|
+
class="dp__field"
|
|
1323
|
+
.label=${this.label}
|
|
1324
|
+
.helper=${this.helper}
|
|
1325
|
+
.error=${e}
|
|
1326
|
+
.required=${this.required}
|
|
1327
|
+
.disabled=${this.disabled}
|
|
1328
|
+
.readonly=${this.readonly}
|
|
1329
|
+
.placeholder=${this.placeholder}
|
|
1330
|
+
.size=${this.size}
|
|
1331
|
+
.variant=${this.variant}
|
|
1332
|
+
@click=${this._openDropdown}
|
|
619
1333
|
>
|
|
620
|
-
<
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
1334
|
+
<input
|
|
1335
|
+
id=${this.inputId}
|
|
1336
|
+
class="dp__input"
|
|
1337
|
+
.value=${qt(this._inputValue())}
|
|
1338
|
+
?disabled=${this.disabled}
|
|
1339
|
+
?readonly=${this.readonly}
|
|
1340
|
+
placeholder=${this.placeholder}
|
|
1341
|
+
aria-label="Tarih girin"
|
|
1342
|
+
aria-invalid=${e?"true":"false"}
|
|
1343
|
+
@focus=${this._openDropdown}
|
|
1344
|
+
@input=${this._onInput}
|
|
1345
|
+
@keydown=${this._onKeydown}
|
|
1346
|
+
@blur=${this._onBlur}
|
|
1347
|
+
/>
|
|
1348
|
+
${t?p`
|
|
1349
|
+
<button
|
|
1350
|
+
slot="clear"
|
|
1351
|
+
class="dp__icon-btn dp__icon-btn_suffix"
|
|
1352
|
+
type="button"
|
|
1353
|
+
aria-label="Temizle"
|
|
1354
|
+
@click=${this._handleClearClick}
|
|
1355
|
+
>
|
|
1356
|
+
<ui-icon name="uil-times" size="14"></ui-icon>
|
|
1357
|
+
</button>
|
|
1358
|
+
`:b}
|
|
1359
|
+
<button
|
|
1360
|
+
id=${this.inputId+"-ico"}
|
|
1361
|
+
slot="suffix"
|
|
1362
|
+
class="dp__icon-btn"
|
|
1363
|
+
type="button"
|
|
1364
|
+
aria-label=${this._open?"Takvimi kapat":"Takvimi aç"}
|
|
1365
|
+
aria-expanded=${this._open?"true":"false"}
|
|
1366
|
+
aria-haspopup="dialog"
|
|
1367
|
+
@click=${this._handleSuffixClick}
|
|
1368
|
+
>
|
|
1369
|
+
<ui-icon name="uil-calendar" size="16"></ui-icon>
|
|
1370
|
+
</button>
|
|
1371
|
+
</logosphere-formfield>
|
|
1372
|
+
</div>
|
|
631
1373
|
|
|
632
|
-
|
|
1374
|
+
${this._open?p`
|
|
1375
|
+
<div
|
|
1376
|
+
data-datepicker-popper
|
|
1377
|
+
class="dp__popup"
|
|
1378
|
+
role="dialog"
|
|
1379
|
+
aria-modal="true"
|
|
1380
|
+
aria-label="Tarih seçici"
|
|
1381
|
+
>
|
|
1382
|
+
<logosphere-calendar
|
|
1383
|
+
.value=${this.value}
|
|
1384
|
+
.min=${this.min}
|
|
1385
|
+
.max=${this.max}
|
|
1386
|
+
.disabled=${this.disabled}
|
|
1387
|
+
.rangeMode=${this.rangeMode}
|
|
1388
|
+
.disabledDays=${this.disabledDays}
|
|
1389
|
+
.rangeStart=${this._rangeStart}
|
|
1390
|
+
.rangeEnd=${this._rangeEnd}
|
|
1391
|
+
.closable=${!0}
|
|
1392
|
+
@change=${this._handleCalendarChange}
|
|
1393
|
+
@rangeChange=${this._handleCalendarRangeChange}
|
|
1394
|
+
@calendar-state-change=${this._handleCalendarStateChange}
|
|
1395
|
+
@close-request=${()=>this._toggleOpen(!1)}
|
|
1396
|
+
></logosphere-calendar>
|
|
1397
|
+
</div>
|
|
1398
|
+
`:b}
|
|
1399
|
+
</div>
|
|
1400
|
+
`}},a.LogosphereDatePicker.styles=[D`
|
|
1401
|
+
${A(un)}
|
|
1402
|
+
`],O([d({type:String})],a.LogosphereDatePicker.prototype,"value",2),O([d({type:String})],a.LogosphereDatePicker.prototype,"min",2),O([d({type:String})],a.LogosphereDatePicker.prototype,"max",2),O([d({type:Boolean})],a.LogosphereDatePicker.prototype,"required",2),O([d({type:Boolean})],a.LogosphereDatePicker.prototype,"disabled",2),O([d({type:Boolean})],a.LogosphereDatePicker.prototype,"readonly",2),O([d({type:Number})],a.LogosphereDatePicker.prototype,"expandFactor",2),O([d({type:String})],a.LogosphereDatePicker.prototype,"placeholder",2),O([d({type:String,attribute:"display-format"})],a.LogosphereDatePicker.prototype,"displayFormat",2),O([d({type:String})],a.LogosphereDatePicker.prototype,"label",2),O([d({type:String})],a.LogosphereDatePicker.prototype,"helper",2),O([d({type:String})],a.LogosphereDatePicker.prototype,"error",2),O([d({type:String})],a.LogosphereDatePicker.prototype,"size",2),O([d({type:String})],a.LogosphereDatePicker.prototype,"variant",2),O([d({type:Boolean})],a.LogosphereDatePicker.prototype,"rangeMode",2),O([d({type:Array})],a.LogosphereDatePicker.prototype,"disabledDays",2),O([d({type:String})],a.LogosphereDatePicker.prototype,"rangeStart",2),O([d({type:String})],a.LogosphereDatePicker.prototype,"rangeEnd",2),O([d({attribute:!1})],a.LogosphereDatePicker.prototype,"onChange",2),O([d({attribute:!1})],a.LogosphereDatePicker.prototype,"onRangeChange",2),O([m()],a.LogosphereDatePicker.prototype,"_open",2),O([m()],a.LogosphereDatePicker.prototype,"_rangeStart",2),O([m()],a.LogosphereDatePicker.prototype,"_rangeEnd",2),O([m()],a.LogosphereDatePicker.prototype,"_hasError",2),O([m()],a.LogosphereDatePicker.prototype,"_errorMsg",2),O([m()],a.LogosphereDatePicker.prototype,"_inputDraft",2),O([F(".dp__reference")],a.LogosphereDatePicker.prototype,"_referenceElement",2),O([F("[data-datepicker-popper]")],a.LogosphereDatePicker.prototype,"_popupElement",2),O([F("input")],a.LogosphereDatePicker.prototype,"_inputElement",2),a.LogosphereDatePicker=O([M("logosphere-datepicker")],a.LogosphereDatePicker);const vn=":host{display:block}.drawer{position:relative;font-family:var(--font-family-base)}.drawer__trigger{display:inline-flex}.drawer__panel{position:fixed;top:0;bottom:0;width:var(--drawer-width, 360px);max-width:min(100vw,var(--drawer-width, 360px));background:var(--color-body-bg);border-left:1px solid var(--color-border);box-shadow:var(--shadow-lg);z-index:var(--z-index-modal);display:flex;flex-direction:column;pointer-events:none;opacity:0;transition:transform var(--transition-speed-slow) var(--transition-timing),opacity var(--transition-speed-slow) linear}.drawer__panel--right{right:0;transform:translate(100%)}.drawer__panel--left{left:0;transform:translate(-100%);border-left:none;border-right:1px solid var(--color-border)}.drawer__panel--open{transform:translate(0);pointer-events:auto;opacity:1}.drawer__header{padding:var(--spacing-3) var(--spacing-4);border-bottom:1px solid var(--color-border);display:flex;align-items:center;justify-content:space-between;gap:var(--spacing-2)}.drawer__title{margin:0;font-size:var(--font-size-base);font-weight:var(--font-weight-semibold);color:var(--color-body-color);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.drawer__close{width:28px;height:28px;border:1px solid var(--color-border);border-radius:var(--radius-sm);background:var(--color-body-bg);display:inline-flex;align-items:center;justify-content:center;color:var(--color-body-color);cursor:pointer}.drawer__close:hover{background:var(--color-tertiary)}.drawer__body{flex:1;overflow:auto;padding:var(--spacing-4)}";var mn=Object.defineProperty,yn=Object.getOwnPropertyDescriptor,Ke=(r,e,t,o)=>{for(var i=o>1?void 0:o?yn(e,t):e,s=r.length-1,n;s>=0;s--)(n=r[s])&&(i=(o?n(e,t,i):n(i))||i);return o&&i&&mn(e,t,i),i};a.Drawer=class extends E{constructor(){super(...arguments),this.open=!1,this.title="",this.position="right",this.width=360,this.closeOnEsc=!0,this.containerSelector="",this._frameStyle="",this._onKeyDown=e=>{!this.open||!this.closeOnEsc||(e.key==="Escape"||e.key==="Esc")&&this._setOpen(!1)},this._onTriggerClick=()=>this._setOpen(!0),this._onCloseClick=()=>this._setOpen(!1),this._syncFrame=()=>{const e=this._resolveContainer().getBoundingClientRect(),t=Math.max(0,e.top),o=Math.max(0,window.innerHeight-e.bottom),i=Math.max(0,e.left),s=Math.max(0,window.innerWidth-e.right),n=Math.max(0,e.width);this._frameStyle=this.position==="right"?`top:${t}px;bottom:${o}px;right:${s}px;max-width:${n}px;`:`top:${t}px;bottom:${o}px;left:${i}px;max-width:${n}px;`}}connectedCallback(){super.connectedCallback(),window.addEventListener("keydown",this._onKeyDown,!0),window.addEventListener("resize",this._syncFrame),window.addEventListener("scroll",this._syncFrame,!0),this.updateComplete.then(()=>this._syncFrame())}disconnectedCallback(){super.disconnectedCallback(),window.removeEventListener("keydown",this._onKeyDown,!0),window.removeEventListener("resize",this._syncFrame),window.removeEventListener("scroll",this._syncFrame,!0)}updated(e){(e.has("open")||e.has("position")||e.has("width")||e.has("containerSelector"))&&this._syncFrame()}openDrawer(){this._setOpen(!0)}closeDrawer(){this._setOpen(!1)}_setOpen(e){this.open!==e&&(this.open=e,this.dispatchEvent(new CustomEvent(e?"drawer-open":"drawer-close",{bubbles:!0,composed:!0})))}_resolveContainer(){var e;if(this.containerSelector){const t=this.getRootNode();if("querySelector"in t){const i=t.querySelector(this.containerSelector);if(i)return i}const o=document.querySelector(this.containerSelector);if(o)return o}return(e=this.parentElement)!=null?e:this}render(){return p`
|
|
1403
|
+
<div class="drawer">
|
|
1404
|
+
<div class="drawer__trigger" @click=${this._onTriggerClick}>
|
|
1405
|
+
<slot name="trigger"></slot>
|
|
1406
|
+
</div>
|
|
633
1407
|
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
1408
|
+
<aside
|
|
1409
|
+
class="drawer__panel drawer__panel--${this.position} ${this.open?"drawer__panel--open":""}"
|
|
1410
|
+
style=${`--drawer-width:${this.width}px;${this._frameStyle}`}
|
|
1411
|
+
role="dialog"
|
|
1412
|
+
aria-modal="false"
|
|
1413
|
+
aria-hidden=${this.open?"false":"true"}
|
|
1414
|
+
>
|
|
1415
|
+
<div class="drawer__header">
|
|
1416
|
+
<h3 class="drawer__title">${this.title}</h3>
|
|
1417
|
+
<logosphere-button
|
|
1418
|
+
variant="outline"
|
|
1419
|
+
theme="secondary"
|
|
1420
|
+
size="md"
|
|
1421
|
+
iconOnly
|
|
1422
|
+
aria-label="Close drawer"
|
|
1423
|
+
@click=${this._onCloseClick}
|
|
1424
|
+
>
|
|
1425
|
+
<ui-icon name="uil-times" size="16"></ui-icon>
|
|
1426
|
+
</logosphere-button>
|
|
1427
|
+
</div>
|
|
1428
|
+
<div class="drawer__body">
|
|
1429
|
+
<slot></slot>
|
|
645
1430
|
</div>
|
|
646
|
-
`])),(r=(o=this._popupPos)===null||o===void 0?void 0:o.left)!==null&&r!==void 0?r:0,(i=(s=this._popupPos)===null||s===void 0?void 0:s.top)!==null&&i!==void 0?i:0,(l=(d=this._popupPos)===null||d===void 0?void 0:d.width)!==null&&l!==void 0?l:320,(u=(p=this._popupPos)===null||p===void 0?void 0:p.maxH)!==null&&u!==void 0?u:420,this._navigatePrevious,this._handleHeaderClick,this._getHeaderLabel(),this._navigateNext,this._viewMode==="calendar"?this._renderCalendar(g):this._viewMode==="month"?this._renderMonthGrid():this._renderYearGrid(),this._today,this._clear,function(){return t._toggleOpen(!1)}):O)}}])})(Z),c.LedsDatePicker.styles=[ee(ea||(ea=b(["",""])),Q(jl))],K([f({type:String})],c.LedsDatePicker.prototype,"value",2),K([f({type:String})],c.LedsDatePicker.prototype,"min",2),K([f({type:String})],c.LedsDatePicker.prototype,"max",2),K([f({type:Boolean})],c.LedsDatePicker.prototype,"required",2),K([f({type:Boolean})],c.LedsDatePicker.prototype,"disabled",2),K([f({type:Number})],c.LedsDatePicker.prototype,"expandFactor",2),K([f({type:String})],c.LedsDatePicker.prototype,"placeholder",2),K([f({type:Boolean})],c.LedsDatePicker.prototype,"rangeMode",2),K([f({type:Array})],c.LedsDatePicker.prototype,"disabledDays",2),K([f({type:String})],c.LedsDatePicker.prototype,"rangeStart",2),K([f({type:String})],c.LedsDatePicker.prototype,"rangeEnd",2),K([f({attribute:!1})],c.LedsDatePicker.prototype,"onChange",2),K([f({attribute:!1})],c.LedsDatePicker.prototype,"onRangeChange",2),K([z()],c.LedsDatePicker.prototype,"_open",2),K([z()],c.LedsDatePicker.prototype,"_cursor",2),K([z()],c.LedsDatePicker.prototype,"_popupPos",2),K([z()],c.LedsDatePicker.prototype,"_rangeStart",2),K([z()],c.LedsDatePicker.prototype,"_rangeEnd",2),K([z()],c.LedsDatePicker.prototype,"_hoverDate",2),K([z()],c.LedsDatePicker.prototype,"_viewMode",2),K([z()],c.LedsDatePicker.prototype,"_hasError",2),K([z()],c.LedsDatePicker.prototype,"_errorMsg",2),c.LedsDatePicker=K([te("logosphere-datepicker")],c.LedsDatePicker);const Hl=":host{display:block}.dm{font-family:var(--font-family-base)}.dm__container{width:100%;max-width:896px;margin:0 auto;padding:var(--spacing-6);background-color:var(--color-body-bg);border-radius:var(--radius-base);box-shadow:var(--shadow-md)}.dm__header{margin-bottom:var(--spacing-6)}.dm__title{font-size:var(--font-size-2xl);font-weight:var(--font-weight-bold);color:var(--color-body-text);margin:0 0 var(--spacing-2) 0}.dm__stats{display:flex;gap:var(--spacing-4);font-size:var(--font-size-sm);color:var(--color-tertiary)}.dm__form{margin-bottom:var(--spacing-6);padding:var(--spacing-4);background-color:var(--color-tertiary-bg);border-radius:var(--radius-base)}.dm__form-row{display:flex;gap:var(--spacing-4)}.dm__form-field{flex:1}.dm__form-field--filename{width:192px;flex:none}.dm__input{width:100%;padding:var(--spacing-2) var(--spacing-3);border:1px solid var(--color-border);border-radius:var(--radius-sm);outline:none;font-family:var(--font-family-base);font-size:var(--font-size-sm);background-color:var(--color-body-bg);color:var(--color-body-text);box-sizing:border-box;transition:border-color var(--transition-speed-fast) var(--transition-timing)}.dm__input:focus{border-color:var(--color-primary)}.dm__submit-btn{display:inline-flex;align-items:center;gap:var(--spacing-2);padding:var(--spacing-2) var(--spacing-4);background-color:var(--color-primary);color:#fff;border:none;border-radius:var(--radius-sm);cursor:pointer;font-family:var(--font-family-base);font-size:var(--font-size-sm);font-weight:var(--font-weight-medium);transition:background-color var(--transition-speed-fast) var(--transition-timing);white-space:nowrap}.dm__submit-btn:hover:not(:disabled){background-color:var(--color-primary-hover)}.dm__submit-btn:disabled{opacity:.5;cursor:not-allowed}.dm__form-note{margin-top:var(--spacing-3);font-size:var(--font-size-xs);color:var(--color-tertiary)}.dm__form-note p{margin:0}.dm__spinner{display:inline-block;width:16px;height:16px;border:2px solid rgba(255,255,255,.3);border-bottom-color:#fff;border-radius:var(--radius-full);animation:dm-spin .8s linear infinite}.dm__spinner--sm{width:12px;height:12px;border-color:#3b82f64d;border-bottom-color:#3b82f6}@keyframes dm-spin{to{transform:rotate(360deg)}}@keyframes dm-pulse{0%,to{opacity:1}50%{opacity:.5}}.dm__list{display:flex;flex-direction:column;gap:var(--spacing-4)}.dm__empty{text-align:center;padding:var(--spacing-8) 0;color:var(--color-tertiary);font-size:var(--font-size-sm)}.dm__item{border:1px solid var(--color-border);border-radius:var(--radius-base);padding:var(--spacing-4)}.dm__item--error{border-color:var(--color-primary-border-subtle);background-color:var(--color-danger-bg-subtle)}.dm__item-header{display:flex;align-items:center;justify-content:space-between;margin-bottom:var(--spacing-3)}.dm__item-info{flex:1;min-width:0}.dm__item-name{font-size:var(--font-size-sm);font-weight:var(--font-weight-medium);color:var(--color-body-text);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;margin:0}.dm__item-url{font-size:var(--font-size-xs);color:var(--color-tertiary);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;margin:0}.dm__item-controls{display:flex;align-items:center;gap:var(--spacing-2)}.dm__status{font-size:var(--font-size-xs);padding:var(--spacing-1) var(--spacing-2);border-radius:var(--radius-full);font-weight:var(--font-weight-medium)}.dm__status--downloading{background-color:var(--color-info-bg-subtle);color:var(--color-info-text-emphasis)}.dm__status--paused{background-color:var(--color-warning-bg-subtle);color:var(--color-warning-text-emphasis)}.dm__status--completed{background-color:var(--color-success-bg-subtle);color:var(--color-success-text-emphasis)}.dm__status--error{background-color:var(--color-danger-bg-subtle);color:var(--color-danger-text-emphasis)}.dm__status--pending{background-color:var(--color-gray-100);color:var(--color-gray-800)}.dm__remove-btn{background:none;border:none;cursor:pointer;color:var(--color-tertiary);padding:var(--spacing-1);line-height:1;font-size:var(--font-size-sm);border-radius:var(--radius-sm);transition:color var(--transition-speed-fast) var(--transition-timing)}.dm__remove-btn:hover{color:var(--color-danger)}.dm__progress{margin-bottom:var(--spacing-3)}.dm__progress-labels{display:flex;justify-content:space-between;font-size:var(--font-size-xs);color:var(--color-tertiary);margin-bottom:var(--spacing-1)}.dm__progress-track{width:100%;background-color:var(--color-gray-200);border-radius:var(--radius-full);height:8px;overflow:hidden}.dm__progress-bar{height:8px;border-radius:var(--radius-full);transition:width .3s ease}.dm__progress-bar--downloading{background-color:var(--color-info-active)}.dm__progress-bar--paused{background-color:var(--color-warning-active)}.dm__progress-bar--completed{background-color:var(--color-success)}.dm__progress-bar--error{background-color:var(--color-danger)}.dm__progress-bar--pending{background-color:var(--color-gray-400)}.dm__progress-bar--indeterminate{width:100%;animation:dm-pulse 1.5s ease-in-out infinite}.dm__item-footer{display:flex;justify-content:space-between;font-size:var(--font-size-xs);color:var(--color-tertiary)}.dm__item-speeds{display:flex;gap:var(--spacing-4)}.dm__item-actions{display:flex;gap:var(--spacing-2)}.dm__action-btn{display:inline-flex;align-items:center;gap:var(--spacing-1);padding:var(--spacing-1) var(--spacing-2);border:none;border-radius:var(--radius-sm);background:none;cursor:pointer;font-family:var(--font-family-base);font-size:var(--font-size-xs);transition:background-color var(--transition-speed-fast) var(--transition-timing),color var(--transition-speed-fast) var(--transition-timing)}.dm__action-btn--pause{color:var(--color-info-active)}.dm__action-btn--pause:hover{background-color:var(--color-info-bg-subtle);color:var(--color-info-text-emphasis)}.dm__action-btn--resume{color:var(--color-success)}.dm__action-btn--resume:hover{background-color:var(--color-success-bg-subtle);color:var(--color-success-text-emphasis)}.dm__status-completed{color:var(--color-success)}.dm__error-info{color:var(--color-danger)}.dm__error-label{font-weight:var(--font-weight-medium)}.dm__error-detail{font-size:var(--font-size-xs)}.dm__chunks{margin-top:var(--spacing-3);font-size:var(--font-size-xs);color:var(--color-tertiary);display:flex;flex-direction:column;gap:2px}.dm__actions{margin-top:var(--spacing-6);display:flex;justify-content:space-between;align-items:center}.dm__clear-btn{padding:var(--spacing-2) var(--spacing-4);font-size:var(--font-size-sm);color:var(--color-tertiary);background:none;border:none;cursor:pointer;font-family:var(--font-family-base);transition:color var(--transition-speed-fast) var(--transition-timing)}.dm__clear-btn:hover{color:var(--color-body-text)}.dm__persist-note{font-size:var(--font-size-sm);color:var(--color-tertiary)}";var ra,na,oa,aa,ia,sa,la,ca,da,ua,pa,ha,fa,Nl=Object.defineProperty,ql=Object.getOwnPropertyDescriptor,tt=function(n,e,t,r){for(var o=r>1?void 0:r?ql(e,t):e,i=n.length-1,s;i>=0;i--)(s=n[i])&&(o=(r?s(e,t,o):s(o))||o);return r&&o&&Nl(e,t,o),o};c.DownloadManager=(function(a){function n(){var e;return j(this,n),e=H(this,n,arguments),e.chunkSize=2*1024*1024,e.maxConcurrentDownloads=3,e.maxConcurrentChunks=4,e.downloads=[],e.isAddingFiles=!1,e.activeDownloads=new Map,e.storageKey="download-manager-state",e.clearCompleted=function(){e.downloads=e.downloads.filter(function(t){return t.status!=="completed"}),e.requestUpdate(),e.saveState()},e.handleAddDownload=function(t){t.preventDefault();var r=t.target,o=new globalThis.FormData(r),i=o.get("url"),s=o.get("filename");if(i!=null&&i.trim()){var l=e.downloads.find(function(d){return d.url===i.trim()});l&&l.status!=="error"||(e.addDownload(i.trim(),(s==null?void 0:s.trim())||void 0),r.reset())}},e}return N(n,a),L(n,[{key:"connectedCallback",value:function(){X(n,"connectedCallback",this)([]),this.loadState(),this.setupVisibilityChangeHandler()}},{key:"disconnectedCallback",value:function(){X(n,"disconnectedCallback",this)([]),this.saveState()}},{key:"setupVisibilityChangeHandler",value:function(){var t=this;document.addEventListener("visibilitychange",function(){document.hidden&&t.saveState()})}},{key:"loadState",value:function(){try{var t=globalThis.localStorage.getItem(this.storageKey);if(t){var r=JSON.parse(t);this.downloads=r.downloads||[],this.downloads.forEach(function(o){var i;o.status==="downloading"&&(o.status="paused"),o.status==="error"&&(i=o.error)!==null&&i!==void 0&&i.includes("Failed to fetch")&&(o.status="paused",o.error=void 0)})}}catch(o){console.error("Failed to load download state:",o)}}},{key:"saveState",value:function(){try{var t={downloads:this.downloads.map(function(r){return ct(ct({},r),{},{status:r.status==="downloading"?"paused":r.status})})};globalThis.localStorage.setItem(this.storageKey,JSON.stringify(t))}catch(r){console.error("Failed to save download state:",r)}}},{key:"getFileSize",value:(function(){var e=de(F().m(function r(o){var i,s,l,d,u,p,h,g,y,w;return F().w(function(v){for(;;)switch(v.p=v.n){case 0:return v.p=0,v.n=1,globalThis.fetch(o,{method:"HEAD",mode:"cors",credentials:"omit",signal:globalThis.AbortSignal.timeout(1e4)});case 1:if(i=v.v,!i.ok){v.n=2;break}if(s=i.headers.get("content-length"),!s){v.n=2;break}if(l=parseInt(s),!(!isNaN(l)&&l>0)){v.n=2;break}return v.a(2,l);case 2:return v.p=2,v.n=3,globalThis.fetch(o,{method:"GET",headers:{Range:"bytes=0-0"},mode:"cors",credentials:"omit",signal:globalThis.AbortSignal.timeout(1e4)});case 3:if(d=v.v,!d.ok){v.n=5;break}if(u=d.headers.get("content-range"),!u){v.n=4;break}if(p=u.match(/\/(\d+)/),!p){v.n=4;break}if(h=parseInt(p[1]),!(!isNaN(h)&&h>0)){v.n=4;break}return v.a(2,h);case 4:if(g=d.headers.get("content-length"),!g){v.n=5;break}if(y=parseInt(g),!(!isNaN(y)&&y>0)){v.n=5;break}return v.a(2,y);case 5:v.n=7;break;case 6:v.p=6,v.v;case 7:return v.a(2,0);case 8:return v.p=8,w=v.v,(!(w instanceof Error)||!["AbortError","ERR_EMPTY_RESPONSE","Failed to fetch"].some(function(_){return w.message.includes(_)}))&&console.warn("Failed to get file size:",w),v.a(2,0)}},r,null,[[2,6],[0,8]])}));function t(r){return e.apply(this,arguments)}return t})()},{key:"createChunks",value:function(t){if(t===0)return[{start:0,end:this.chunkSize-1,downloaded:0,status:"pending"}];for(var r=[],o=0;o<t;o+=this.chunkSize)r.push({start:o,end:Math.min(o+this.chunkSize-1,t-1),downloaded:0,status:"pending"});return r}},{key:"downloadChunk",value:(function(){var e=de(F().m(function r(o,i){var s,l,d,u,p,h,g,y,w,v;return F().w(function(_){for(;;)switch(_.n){case 0:return s=i.end>i.start?"bytes=".concat(i.start+i.downloaded,"-").concat(i.end):"bytes=".concat(i.start+i.downloaded,"-"),_.n=1,globalThis.fetch(o,{headers:{Range:s},signal:globalThis.AbortSignal.any([new globalThis.AbortController().signal,globalThis.AbortSignal.timeout(6e4)]),mode:"cors",credentials:"omit"});case 1:if(l=_.v,l.ok){_.n=3;break}if(l.status!==416){_.n=2;break}return _.a(2,{data:new Uint8Array(0),isComplete:!0});case 2:throw new Error("HTTP ".concat(l.status,": ").concat(l.statusText));case 3:return w=Uint8Array,_.n=4,l.arrayBuffer();case 4:return v=_.v,d=new w(v),u=l.headers.get("content-range"),p=!1,u?(g=u.match(/\/(\d+)/),g&&(h=parseInt(g[1]),y=u.match(/(\d+)-(\d+)/),y&&(p=parseInt(y[2])>=h-1))):d.length===0&&(p=!0),_.a(2,{data:d,isComplete:p,actualSize:h})}},r)}));function t(r,o){return e.apply(this,arguments)}return t})()},{key:"downloadFile",value:(function(){var e=de(F().m(function r(o){var i=this,s,l,d,u,p,h,g;return F().w(function(y){for(;;)switch(y.p=y.n){case 0:s=new globalThis.AbortController,this.activeDownloads.set(o.id,s),y.p=1,o.status="downloading",o.startTime=Date.now(),this.requestUpdate(),l=o.chunks.filter(function(w){return w.status==="pending"}),d=new Set,u=(function(){var w=de(F().m(function v(_){var k,$,x,E;return F().w(function(C){for(;;)switch(C.p=C.n){case 0:if(k=o.chunks[_],!(!k||k.status!=="pending")){C.n=1;break}return C.a(2);case 1:if(k.status="downloading",d.add(_),i.requestUpdate(),C.p=2,o.status==="downloading"){C.n=3;break}return C.a(2);case 3:return C.n=4,i.downloadChunk(o.url,k);case 4:if($=C.v,o.status==="downloading"){C.n=5;break}return C.a(2);case 5:k.downloaded=$.data.length,k.status="completed",o.downloaded+=k.downloaded,$.actualSize&&o.size===0&&(o.size=$.actualSize,o.size>i.chunkSize&&(x=o.chunks).push.apply(x,ve(i.createChunks(o.size).slice(1)))),d.delete(_),i.requestUpdate(),i.saveState(),($.isComplete||o.chunks.every(function(S){return S.status==="completed"}))&&(o.status="completed",o.endTime=Date.now(),i.requestUpdate(),i.saveState()),C.n=7;break;case 6:C.p=6,E=C.v,k.status="error",d.delete(_),o.chunks.filter(function(S){return S.status==="error"}).length===o.chunks.length&&(o.status="error",o.error=E instanceof Error?E.message:"All chunks failed"),i.requestUpdate(),i.saveState();case 7:return C.n=8,new Promise(function(S){return setTimeout(S,1)});case 8:return C.a(2)}},v,null,[[2,6]])}));return function(_){return w.apply(this,arguments)}})(),p=[],h=0;case 2:if(!(h<l.length||d.size>0)){y.n=9;break}if(o.status==="downloading"){y.n=3;break}return y.a(3,9);case 3:for(;d.size<this.maxConcurrentChunks&&h<l.length&&o.status==="downloading";)p.push(u(h)),h++;if(!(d.size>0)){y.n=7;break}return y.p=4,y.n=5,Promise.race([Promise.race(p),new Promise(function(w){return setTimeout(w,100)})]);case 5:y.n=7;break;case 6:y.p=6,y.v;case 7:return y.n=8,new Promise(function(w){return setTimeout(w,10)});case 8:y.n=2;break;case 9:y.n=11;break;case 10:y.p=10,g=y.v,(!(g instanceof Error)||g.name!=="AbortError")&&(o.status="error",o.error=g instanceof Error?g.message:"Unknown error",this.requestUpdate());case 11:return y.p=11,this.activeDownloads.delete(o.id),this.saveState(),y.f(11);case 12:return y.a(2)}},r,this,[[4,6],[1,10,11,12]])}));function t(r){return e.apply(this,arguments)}return t})()},{key:"pauseDownload",value:function(t){var r=this.activeDownloads.get(t);r&&(r.abort(),this.activeDownloads.delete(t));var o=this.downloads.find(function(i){return i.id===t});(o==null?void 0:o.status)==="downloading"&&(o.status="paused",this.requestUpdate(),this.saveState())}},{key:"resumeDownload",value:function(t){var r=this.downloads.find(function(o){return o.id===t});(r==null?void 0:r.status)==="paused"&&this.downloadFile(r)}},{key:"removeDownload",value:function(t){this.pauseDownload(t),this.downloads=this.downloads.filter(function(r){return r.id!==t}),this.requestUpdate(),this.saveState()}},{key:"formatBytes",value:function(t){if(t===0)return"0 Bytes";var r=1024,o=["Bytes","KB","MB","GB"],i=Math.floor(Math.log(t)/Math.log(r));return parseFloat((t/Math.pow(r,i)).toFixed(2))+" "+o[i]}},{key:"formatDuration",value:function(t){var r=Math.floor(t/1e3),o=Math.floor(r/60),i=Math.floor(o/60);return i>0?"".concat(i,"h ").concat(o%60,"m ").concat(r%60,"s"):o>0?"".concat(o,"m ").concat(r%60,"s"):"".concat(r,"s")}},{key:"getProgressPercentage",value:function(t){return t.size===0?t.status==="completed"?100:0:Math.round(t.downloaded/t.size*100)}},{key:"getDownloadSpeed",value:function(t){if(!t.startTime)return"0 KB/s";var r=(Date.now()-t.startTime)/1e3;return r===0?"0 KB/s":this.formatBytes(t.downloaded/r)+"/s"}},{key:"getETA",value:function(t){if(!t.startTime||t.downloaded===0||t.size===0)return"Unknown";var r=(Date.now()-t.startTime)/1e3;return this.formatDuration((t.size-t.downloaded)/(t.downloaded/r)*1e3)}},{key:"addDownload",value:(function(){var e=de(F().m(function r(o,i){var s,l,d,u,p;return F().w(function(h){for(;;)switch(h.p=h.n){case 0:h.p=0,this.isAddingFiles=!0,this.requestUpdate(),h.p=1,new globalThis.URL(o),h.n=3;break;case 2:throw h.p=2,h.v,new Error("Invalid URL format");case 3:return h.n=4,this.getFileSize(o);case 4:s=h.v,l="download_".concat(Date.now(),"_").concat(Math.random().toString(36).substr(2,9)),d={id:l,url:o,filename:i||o.split("/").pop()||"unknown",size:s,downloaded:0,status:"pending",chunks:this.createChunks(s)},this.downloads.push(d),this.requestUpdate(),this.saveState(),this.downloadFile(d),h.n=6;break;case 5:h.p=5,p=h.v,u=p instanceof Error?p.message:"Unknown error occurred",this.downloads.push({id:"error_".concat(Date.now()),url:o,filename:i||o.split("/").pop()||"unknown",size:0,downloaded:0,status:"error",chunks:[],error:u}),this.requestUpdate(),this.saveState();case 6:return h.p=6,this.isAddingFiles=!1,this.requestUpdate(),h.f(6);case 7:return h.a(2)}},r,this,[[1,2],[0,5,6,7]])}));function t(r,o){return e.apply(this,arguments)}return t})()},{key:"getStatusClass",value:function(t){var r,o={downloading:"dm__status--downloading",paused:"dm__status--paused",completed:"dm__status--completed",error:"dm__status--error"};return(r=o[t])!==null&&r!==void 0?r:"dm__status--pending"}},{key:"getProgressBarClass",value:function(t){var r,o={downloading:"dm__progress-bar--downloading",paused:"dm__progress-bar--paused",completed:"dm__progress-bar--completed",error:"dm__progress-bar--error"};return(r=o[t])!==null&&r!==void 0?r:"dm__progress-bar--pending"}},{key:"render",value:function(){var t=this,r=this.downloads.filter(function(s){return s.status==="downloading"}).length,o=this.downloads.filter(function(s){return s.status==="completed"}).length,i=this.downloads.filter(function(s){return s.status==="paused"}).length;return m(ra||(ra=b([`
|
|
1431
|
+
</aside>
|
|
1432
|
+
</div>
|
|
1433
|
+
`}},a.Drawer.styles=[D`${A(vn)}`],Ke([d({type:Boolean,reflect:!0})],a.Drawer.prototype,"open",2),Ke([d({type:String})],a.Drawer.prototype,"title",2),Ke([d({type:String})],a.Drawer.prototype,"position",2),Ke([d({type:Number})],a.Drawer.prototype,"width",2),Ke([d({type:Boolean})],a.Drawer.prototype,"closeOnEsc",2),Ke([d({type:String})],a.Drawer.prototype,"containerSelector",2),a.Drawer=Ke([M("logosphere-drawer")],a.Drawer);const wn=":host{display:block}.dm{font-family:var(--font-family-base)}.dm__container{width:100%;max-width:896px;margin:0 auto;padding:var(--spacing-6);background-color:var(--color-body-bg);border-radius:var(--radius-base);box-shadow:var(--shadow-md)}.dm__header{margin-bottom:var(--spacing-6)}.dm__title{font-size:var(--font-size-2xl);font-weight:var(--font-weight-bold);color:var(--color-body-text);margin:0 0 var(--spacing-2) 0}.dm__stats{display:flex;gap:var(--spacing-4);font-size:var(--font-size-sm);color:var(--color-tertiary)}.dm__form{margin-bottom:var(--spacing-6);padding:var(--spacing-4);background-color:var(--color-light);border-radius:var(--radius-base)}.dm__form-row{display:flex;gap:var(--spacing-4)}.dm__form-field{flex:1}.dm__form-field--filename{width:192px;flex:none}.dm__input{width:100%;padding:var(--spacing-2) var(--spacing-3);border:1px solid var(--color-border);border-radius:var(--radius-sm);outline:none;font-family:var(--font-family-base);font-size:var(--font-size-sm);background-color:var(--color-body-bg);color:var(--color-body-text);box-sizing:border-box;transition:border-color var(--transition-speed-fast) var(--transition-timing)}.dm__input:focus{border-color:var(--color-primary)}.dm__submit-btn{display:inline-flex;align-items:center;gap:var(--spacing-2);padding:var(--spacing-2) var(--spacing-4);background-color:var(--color-primary);color:#fff;border:none;border-radius:var(--radius-sm);cursor:pointer;font-family:var(--font-family-base);font-size:var(--font-size-sm);font-weight:var(--font-weight-medium);transition:background-color var(--transition-speed-fast) var(--transition-timing);white-space:nowrap}.dm__submit-btn:hover:not(:disabled){background-color:var(--color-primary-hover)}.dm__submit-btn:disabled{opacity:.5;cursor:not-allowed}.dm__form-note{margin-top:var(--spacing-3);font-size:var(--font-size-xs);color:var(--color-tertiary)}.dm__form-note p{margin:0}.dm__spinner{display:inline-block;width:16px;height:16px;border:2px solid rgba(255,255,255,.3);border-bottom-color:#fff;border-radius:var(--radius-full);animation:dm-spin .8s linear infinite}.dm__spinner--sm{width:12px;height:12px;border-color:#3b82f64d;border-bottom-color:#3b82f6}@keyframes dm-spin{to{transform:rotate(360deg)}}@keyframes dm-pulse{0%,to{opacity:1}50%{opacity:.5}}.dm__list{display:flex;flex-direction:column;gap:var(--spacing-4)}.dm__empty{text-align:center;padding:var(--spacing-8) 0;color:var(--color-tertiary);font-size:var(--font-size-sm)}.dm__item{border:1px solid var(--color-border);border-radius:var(--radius-base);padding:var(--spacing-4)}.dm__item--error{border-color:var(--color-primary-border-subtle);background-color:var(--color-danger-bg-subtle)}.dm__item-header{display:flex;align-items:center;justify-content:space-between;margin-bottom:var(--spacing-3)}.dm__item-info{flex:1;min-width:0}.dm__item-name{font-size:var(--font-size-sm);font-weight:var(--font-weight-medium);color:var(--color-body-text);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;margin:0}.dm__item-url{font-size:var(--font-size-xs);color:var(--color-tertiary);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;margin:0}.dm__item-controls{display:flex;align-items:center;gap:var(--spacing-2)}.dm__status{font-size:var(--font-size-xs);padding:var(--spacing-1) var(--spacing-2);border-radius:var(--radius-full);font-weight:var(--font-weight-medium)}.dm__status--downloading{background-color:var(--color-info-bg-subtle);color:var(--color-info-text-emphasis)}.dm__status--paused{background-color:var(--color-warning-bg-subtle);color:var(--color-warning-text-emphasis)}.dm__status--completed{background-color:var(--color-success-bg-subtle);color:var(--color-success-text-emphasis)}.dm__status--error{background-color:var(--color-danger-bg-subtle);color:var(--color-danger-text-emphasis)}.dm__status--pending{background-color:var(--color-gray-100);color:var(--color-gray-800)}.dm__remove-btn{background:none;border:none;cursor:pointer;color:var(--color-tertiary);padding:var(--spacing-1);line-height:1;font-size:var(--font-size-sm);border-radius:var(--radius-sm);transition:color var(--transition-speed-fast) var(--transition-timing)}.dm__remove-btn:hover{color:var(--color-danger)}.dm__progress{margin-bottom:var(--spacing-3)}.dm__progress-labels{display:flex;justify-content:space-between;font-size:var(--font-size-xs);color:var(--color-tertiary);margin-bottom:var(--spacing-1)}.dm__progress-track{width:100%;background-color:var(--color-gray-200);border-radius:var(--radius-full);height:8px;overflow:hidden}.dm__progress-bar{height:8px;border-radius:var(--radius-full);transition:width .3s ease}.dm__progress-bar--downloading{background-color:var(--color-info-active)}.dm__progress-bar--paused{background-color:var(--color-warning-active)}.dm__progress-bar--completed{background-color:var(--color-success)}.dm__progress-bar--error{background-color:var(--color-danger)}.dm__progress-bar--pending{background-color:var(--color-gray-400)}.dm__progress-bar--indeterminate{width:100%;animation:dm-pulse 1.5s ease-in-out infinite}.dm__item-footer{display:flex;justify-content:space-between;font-size:var(--font-size-xs);color:var(--color-tertiary)}.dm__item-speeds{display:flex;gap:var(--spacing-4)}.dm__item-actions{display:flex;gap:var(--spacing-2)}.dm__action-btn{display:inline-flex;align-items:center;gap:var(--spacing-1);padding:var(--spacing-1) var(--spacing-2);border:none;border-radius:var(--radius-sm);background:none;cursor:pointer;font-family:var(--font-family-base);font-size:var(--font-size-xs);transition:background-color var(--transition-speed-fast) var(--transition-timing),color var(--transition-speed-fast) var(--transition-timing)}.dm__action-btn--pause{color:var(--color-info-active)}.dm__action-btn--pause:hover{background-color:var(--color-info-bg-subtle);color:var(--color-info-text-emphasis)}.dm__action-btn--resume{color:var(--color-success)}.dm__action-btn--resume:hover{background-color:var(--color-success-bg-subtle);color:var(--color-success-text-emphasis)}.dm__status-completed{color:var(--color-success)}.dm__error-info{color:var(--color-danger)}.dm__error-label{font-weight:var(--font-weight-medium)}.dm__error-detail{font-size:var(--font-size-xs)}.dm__chunks{margin-top:var(--spacing-3);font-size:var(--font-size-xs);color:var(--color-tertiary);display:flex;flex-direction:column;gap:2px}.dm__actions{margin-top:var(--spacing-6);display:flex;justify-content:space-between;align-items:center}.dm__clear-btn{padding:var(--spacing-2) var(--spacing-4);font-size:var(--font-size-sm);color:var(--color-tertiary);background:none;border:none;cursor:pointer;font-family:var(--font-family-base);transition:color var(--transition-speed-fast) var(--transition-timing)}.dm__clear-btn:hover{color:var(--color-body-text)}.dm__persist-note{font-size:var(--font-size-sm);color:var(--color-tertiary)}";var xn=Object.defineProperty,$n=Object.getOwnPropertyDescriptor,nt=(r,e,t,o)=>{for(var i=o>1?void 0:o?$n(e,t):e,s=r.length-1,n;s>=0;s--)(n=r[s])&&(i=(o?n(e,t,i):n(i))||i);return o&&i&&xn(e,t,i),i};a.DownloadManager=class extends E{constructor(){super(...arguments),this.chunkSize=2*1024*1024,this.maxConcurrentDownloads=3,this.maxConcurrentChunks=4,this.downloads=[],this.isAddingFiles=!1,this.activeDownloads=new Map,this.storageKey="download-manager-state",this.clearCompleted=()=>{this.downloads=this.downloads.filter(e=>e.status!=="completed"),this.requestUpdate(),this.saveState()},this.handleAddDownload=e=>{e.preventDefault();const t=e.target,o=new globalThis.FormData(t),i=o.get("url"),s=o.get("filename");if(!(i!=null&&i.trim()))return;const n=this.downloads.find(l=>l.url===i.trim());n&&n.status!=="error"||(this.addDownload(i.trim(),(s==null?void 0:s.trim())||void 0),t.reset())}}connectedCallback(){super.connectedCallback(),this.loadState(),this.setupVisibilityChangeHandler()}disconnectedCallback(){super.disconnectedCallback(),this.saveState()}setupVisibilityChangeHandler(){document.addEventListener("visibilitychange",()=>{document.hidden&&this.saveState()})}loadState(){try{const e=globalThis.localStorage.getItem(this.storageKey);if(e){const t=JSON.parse(e);this.downloads=t.downloads||[],this.downloads.forEach(o=>{var i;o.status==="downloading"&&(o.status="paused"),o.status==="error"&&((i=o.error)!=null&&i.includes("Failed to fetch"))&&(o.status="paused",o.error=void 0)})}}catch(e){console.error("Failed to load download state:",e)}}saveState(){try{const e={downloads:this.downloads.map(t=>Me($e({},t),{status:t.status==="downloading"?"paused":t.status}))};globalThis.localStorage.setItem(this.storageKey,JSON.stringify(e))}catch(e){console.error("Failed to save download state:",e)}}async getFileSize(e){try{const t=await globalThis.fetch(e,{method:"HEAD",mode:"cors",credentials:"omit",signal:globalThis.AbortSignal.timeout(1e4)});if(t.ok){const o=t.headers.get("content-length");if(o){const i=parseInt(o);if(!isNaN(i)&&i>0)return i}}try{const o=await globalThis.fetch(e,{method:"GET",headers:{Range:"bytes=0-0"},mode:"cors",credentials:"omit",signal:globalThis.AbortSignal.timeout(1e4)});if(o.ok){const i=o.headers.get("content-range");if(i){const n=i.match(/\/(\d+)/);if(n){const l=parseInt(n[1]);if(!isNaN(l)&&l>0)return l}}const s=o.headers.get("content-length");if(s){const n=parseInt(s);if(!isNaN(n)&&n>0)return n}}}catch(o){}return 0}catch(t){return(!(t instanceof Error)||!["AbortError","ERR_EMPTY_RESPONSE","Failed to fetch"].some(o=>t.message.includes(o)))&&console.warn("Failed to get file size:",t),0}}createChunks(e){if(e===0)return[{start:0,end:this.chunkSize-1,downloaded:0,status:"pending"}];const t=[];for(let o=0;o<e;o+=this.chunkSize)t.push({start:o,end:Math.min(o+this.chunkSize-1,e-1),downloaded:0,status:"pending"});return t}async downloadChunk(e,t){const o=t.end>t.start?`bytes=${t.start+t.downloaded}-${t.end}`:`bytes=${t.start+t.downloaded}-`,i=await globalThis.fetch(e,{headers:{Range:o},signal:globalThis.AbortSignal.any([new globalThis.AbortController().signal,globalThis.AbortSignal.timeout(6e4)]),mode:"cors",credentials:"omit"});if(!i.ok){if(i.status===416)return{data:new Uint8Array(0),isComplete:!0};throw new Error(`HTTP ${i.status}: ${i.statusText}`)}const s=new Uint8Array(await i.arrayBuffer()),n=i.headers.get("content-range");let l=!1,c;if(n){const u=n.match(/\/(\d+)/);if(u){c=parseInt(u[1]);const h=n.match(/(\d+)-(\d+)/);h&&(l=parseInt(h[2])>=c-1)}}else s.length===0&&(l=!0);return{data:s,isComplete:l,actualSize:c}}async downloadFile(e){const t=new globalThis.AbortController;this.activeDownloads.set(e.id,t);try{e.status="downloading",e.startTime=Date.now(),this.requestUpdate();const o=e.chunks.filter(c=>c.status==="pending"),i=new Set,s=async c=>{const u=e.chunks[c];if(!(!u||u.status!=="pending")){u.status="downloading",i.add(c),this.requestUpdate();try{if(e.status!=="downloading")return;const h=await this.downloadChunk(e.url,u);if(e.status!=="downloading")return;u.downloaded=h.data.length,u.status="completed",e.downloaded+=u.downloaded,h.actualSize&&e.size===0&&(e.size=h.actualSize,e.size>this.chunkSize&&e.chunks.push(...this.createChunks(e.size).slice(1))),i.delete(c),this.requestUpdate(),this.saveState(),(h.isComplete||e.chunks.every(g=>g.status==="completed"))&&(e.status="completed",e.endTime=Date.now(),this.requestUpdate(),this.saveState())}catch(h){u.status="error",i.delete(c),e.chunks.filter(g=>g.status==="error").length===e.chunks.length&&(e.status="error",e.error=h instanceof Error?h.message:"All chunks failed"),this.requestUpdate(),this.saveState()}await new Promise(h=>setTimeout(h,1))}},n=[];let l=0;for(;(l<o.length||i.size>0)&&e.status==="downloading";){for(;i.size<this.maxConcurrentChunks&&l<o.length&&e.status==="downloading";)n.push(s(l)),l++;if(i.size>0)try{await Promise.race([Promise.race(n),new Promise(c=>setTimeout(c,100))])}catch(c){}await new Promise(c=>setTimeout(c,10))}}catch(o){(!(o instanceof Error)||o.name!=="AbortError")&&(e.status="error",e.error=o instanceof Error?o.message:"Unknown error",this.requestUpdate())}finally{this.activeDownloads.delete(e.id),this.saveState()}}pauseDownload(e){const t=this.activeDownloads.get(e);t&&(t.abort(),this.activeDownloads.delete(e));const o=this.downloads.find(i=>i.id===e);(o==null?void 0:o.status)==="downloading"&&(o.status="paused",this.requestUpdate(),this.saveState())}resumeDownload(e){const t=this.downloads.find(o=>o.id===e);(t==null?void 0:t.status)==="paused"&&this.downloadFile(t)}removeDownload(e){this.pauseDownload(e),this.downloads=this.downloads.filter(t=>t.id!==e),this.requestUpdate(),this.saveState()}formatBytes(e){if(e===0)return"0 Bytes";const t=1024,o=["Bytes","KB","MB","GB"],i=Math.floor(Math.log(e)/Math.log(t));return parseFloat((e/Math.pow(t,i)).toFixed(2))+" "+o[i]}formatDuration(e){const t=Math.floor(e/1e3),o=Math.floor(t/60),i=Math.floor(o/60);return i>0?`${i}h ${o%60}m ${t%60}s`:o>0?`${o}m ${t%60}s`:`${t}s`}getProgressPercentage(e){return e.size===0?e.status==="completed"?100:0:Math.round(e.downloaded/e.size*100)}getDownloadSpeed(e){if(!e.startTime)return"0 KB/s";const t=(Date.now()-e.startTime)/1e3;return t===0?"0 KB/s":this.formatBytes(e.downloaded/t)+"/s"}getETA(e){if(!e.startTime||e.downloaded===0||e.size===0)return"Unknown";const t=(Date.now()-e.startTime)/1e3;return this.formatDuration((e.size-e.downloaded)/(e.downloaded/t)*1e3)}async addDownload(e,t){try{this.isAddingFiles=!0,this.requestUpdate();try{new globalThis.URL(e)}catch(n){throw new Error("Invalid URL format")}const o=await this.getFileSize(e),s={id:`download_${Date.now()}_${Math.random().toString(36).substr(2,9)}`,url:e,filename:t||e.split("/").pop()||"unknown",size:o,downloaded:0,status:"pending",chunks:this.createChunks(o)};this.downloads.push(s),this.requestUpdate(),this.saveState(),this.downloadFile(s)}catch(o){const i=o instanceof Error?o.message:"Unknown error occurred";this.downloads.push({id:`error_${Date.now()}`,url:e,filename:t||e.split("/").pop()||"unknown",size:0,downloaded:0,status:"error",chunks:[],error:i}),this.requestUpdate(),this.saveState()}finally{this.isAddingFiles=!1,this.requestUpdate()}}getStatusClass(e){var o;return(o={downloading:"dm__status--downloading",paused:"dm__status--paused",completed:"dm__status--completed",error:"dm__status--error"}[e])!=null?o:"dm__status--pending"}getProgressBarClass(e){var o;return(o={downloading:"dm__progress-bar--downloading",paused:"dm__progress-bar--paused",completed:"dm__progress-bar--completed",error:"dm__progress-bar--error"}[e])!=null?o:"dm__progress-bar--pending"}render(){const e=this.downloads.filter(i=>i.status==="downloading").length,t=this.downloads.filter(i=>i.status==="completed").length,o=this.downloads.filter(i=>i.status==="paused").length;return p`
|
|
647
1434
|
<div class="dm">
|
|
648
1435
|
<div class="dm__container">
|
|
649
1436
|
<div class="dm__header">
|
|
650
1437
|
<h2 class="dm__title">Download Manager</h2>
|
|
651
1438
|
<div class="dm__stats">
|
|
652
|
-
<span>Active:
|
|
653
|
-
<span>Paused:
|
|
654
|
-
<span>Completed:
|
|
655
|
-
<span>Total:
|
|
1439
|
+
<span>Active: ${e}</span>
|
|
1440
|
+
<span>Paused: ${o}</span>
|
|
1441
|
+
<span>Completed: ${t}</span>
|
|
1442
|
+
<span>Total: ${this.downloads.length}</span>
|
|
656
1443
|
</div>
|
|
657
1444
|
</div>
|
|
658
1445
|
|
|
659
|
-
<form @submit
|
|
1446
|
+
<form @submit=${this.handleAddDownload} class="dm__form">
|
|
660
1447
|
<div class="dm__form-row">
|
|
661
1448
|
<div class="dm__form-field">
|
|
662
1449
|
<input type="url" name="url" placeholder="Enter download URL" required class="dm__input" />
|
|
@@ -664,8 +1451,8 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
664
1451
|
<div class="dm__form-field--filename">
|
|
665
1452
|
<input type="text" name="filename" placeholder="Custom filename (optional)" class="dm__input" />
|
|
666
1453
|
</div>
|
|
667
|
-
<button type="submit" ?disabled
|
|
668
|
-
|
|
1454
|
+
<button type="submit" ?disabled=${this.isAddingFiles} class="dm__submit-btn">
|
|
1455
|
+
${this.isAddingFiles?p`<span class="dm__spinner"></span> Adding...`:"Add Download"}
|
|
669
1456
|
</button>
|
|
670
1457
|
</div>
|
|
671
1458
|
<div class="dm__form-note">
|
|
@@ -674,146 +1461,383 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
674
1461
|
</form>
|
|
675
1462
|
|
|
676
1463
|
<div class="dm__list">
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
`,`
|
|
681
|
-
</div>
|
|
682
|
-
</div>
|
|
683
|
-
`])),r,i,o,this.downloads.length,this.handleAddDownload,this.isAddingFiles,this.isAddingFiles?m(na||(na=b(['<span class="dm__spinner"></span> Adding...']))):"Add Download",this.downloads.length===0?m(oa||(oa=b(['<div class="dm__empty">No downloads yet. Add a URL to get started.</div>']))):this.downloads.map(function(s){return m(aa||(aa=b([`
|
|
684
|
-
<div class="dm__item `,`">
|
|
1464
|
+
${this.downloads.length===0?p`<div class="dm__empty">No downloads yet. Add a URL to get started.</div>`:this.downloads.map(i=>p`
|
|
1465
|
+
<div class="dm__item ${i.status==="error"?"dm__item--error":""}">
|
|
685
1466
|
<div class="dm__item-header">
|
|
686
1467
|
<div class="dm__item-info">
|
|
687
|
-
<p class="dm__item-name"
|
|
688
|
-
<p class="dm__item-url"
|
|
1468
|
+
<p class="dm__item-name">${i.filename}</p>
|
|
1469
|
+
<p class="dm__item-url">${i.url}</p>
|
|
689
1470
|
</div>
|
|
690
1471
|
<div class="dm__item-controls">
|
|
691
|
-
<span class="dm__status
|
|
692
|
-
<button class="dm__remove-btn" @click
|
|
1472
|
+
<span class="dm__status ${this.getStatusClass(i.status)}">${i.status}</span>
|
|
1473
|
+
<button class="dm__remove-btn" @click=${()=>this.removeDownload(i.id)} title="Remove download">✕</button>
|
|
693
1474
|
</div>
|
|
694
1475
|
</div>
|
|
695
1476
|
|
|
696
1477
|
<div class="dm__progress">
|
|
697
1478
|
<div class="dm__progress-labels">
|
|
698
|
-
<span
|
|
699
|
-
<span
|
|
1479
|
+
<span>${this.formatBytes(i.downloaded)}${i.size>0?` / ${this.formatBytes(i.size)}`:" (unknown size)"}</span>
|
|
1480
|
+
<span>${i.size>0?`${this.getProgressPercentage(i)}%`:"Downloading..."}</span>
|
|
700
1481
|
</div>
|
|
701
1482
|
<div class="dm__progress-track">
|
|
702
|
-
|
|
1483
|
+
${i.size>0?p`<div class="dm__progress-bar ${this.getProgressBarClass(i.status)}" style="width: ${this.getProgressPercentage(i)}%"></div>`:p`<div class="dm__progress-bar ${this.getProgressBarClass(i.status)} dm__progress-bar--indeterminate"></div>`}
|
|
703
1484
|
</div>
|
|
704
1485
|
</div>
|
|
705
1486
|
|
|
706
1487
|
<div class="dm__item-footer">
|
|
707
1488
|
<div class="dm__item-speeds">
|
|
708
|
-
<span>Speed:
|
|
709
|
-
<span>ETA:
|
|
1489
|
+
<span>Speed: ${i.status==="downloading"?this.getDownloadSpeed(i):"0 KB/s"}</span>
|
|
1490
|
+
<span>ETA: ${i.status==="downloading"?this.getETA(i):"Unknown"}</span>
|
|
710
1491
|
</div>
|
|
711
1492
|
<div class="dm__item-actions">
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
</div>
|
|
715
|
-
|
|
716
|
-
`,`
|
|
717
|
-
</div>
|
|
718
|
-
`])),s.status==="error"?"dm__item--error":"",s.filename,s.url,t.getStatusClass(s.status),s.status,function(){return t.removeDownload(s.id)},t.formatBytes(s.downloaded),s.size>0?" / ".concat(t.formatBytes(s.size)):" (unknown size)",s.size>0?"".concat(t.getProgressPercentage(s),"%"):"Downloading...",s.size>0?m(ia||(ia=b(['<div class="dm__progress-bar ','" style="width: ','%"></div>'])),t.getProgressBarClass(s.status),t.getProgressPercentage(s)):m(sa||(sa=b(['<div class="dm__progress-bar ',' dm__progress-bar--indeterminate"></div>'])),t.getProgressBarClass(s.status)),s.status==="downloading"?t.getDownloadSpeed(s):"0 KB/s",s.status==="downloading"?t.getETA(s):"Unknown",s.status==="downloading"?m(la||(la=b([`
|
|
719
|
-
<button class="dm__action-btn dm__action-btn--pause" @click=`,`>
|
|
1493
|
+
${i.status==="downloading"?p`
|
|
1494
|
+
<button class="dm__action-btn dm__action-btn--pause" @click=${()=>this.pauseDownload(i.id)}>
|
|
720
1495
|
<span class="dm__spinner dm__spinner--sm"></span> Pause
|
|
721
1496
|
</button>
|
|
722
|
-
|
|
723
|
-
<button class="dm__action-btn dm__action-btn--resume" @click
|
|
724
|
-
|
|
1497
|
+
`:i.status==="paused"?p`
|
|
1498
|
+
<button class="dm__action-btn dm__action-btn--resume" @click=${()=>this.resumeDownload(i.id)}>Resume</button>
|
|
1499
|
+
`:i.status==="completed"?p`
|
|
725
1500
|
<span class="dm__status-completed">Completed</span>
|
|
726
|
-
|
|
1501
|
+
`:i.status==="error"?p`
|
|
727
1502
|
<div class="dm__error-info">
|
|
728
1503
|
<div class="dm__error-label">Error</div>
|
|
729
|
-
<div class="dm__error-detail"
|
|
1504
|
+
<div class="dm__error-detail">${i.error}</div>
|
|
730
1505
|
</div>
|
|
731
|
-
|
|
1506
|
+
`:""}
|
|
1507
|
+
</div>
|
|
1508
|
+
</div>
|
|
1509
|
+
|
|
1510
|
+
${i.status==="downloading"?p`
|
|
732
1511
|
<div class="dm__chunks">
|
|
733
|
-
<div>Chunks:
|
|
734
|
-
<div>Chunk size:
|
|
735
|
-
<div>Downloaded:
|
|
1512
|
+
<div>Chunks: ${i.chunks.filter(s=>s.status==="completed").length}/${i.chunks.length} completed</div>
|
|
1513
|
+
<div>Chunk size: ${this.formatBytes(this.chunkSize)}</div>
|
|
1514
|
+
<div>Downloaded: ${this.formatBytes(i.downloaded)}${i.size>0?` / ${this.formatBytes(i.size)}`:""}</div>
|
|
736
1515
|
</div>
|
|
737
|
-
|
|
1516
|
+
`:""}
|
|
1517
|
+
</div>
|
|
1518
|
+
`)}
|
|
1519
|
+
</div>
|
|
1520
|
+
|
|
1521
|
+
${this.downloads.length>0?p`
|
|
738
1522
|
<div class="dm__actions">
|
|
739
|
-
<button class="dm__clear-btn" @click
|
|
1523
|
+
<button class="dm__clear-btn" @click=${this.clearCompleted}>Clear Completed</button>
|
|
740
1524
|
<div class="dm__persist-note">State is automatically saved and will persist across browser sessions</div>
|
|
741
1525
|
</div>
|
|
742
|
-
|
|
1526
|
+
`:""}
|
|
1527
|
+
</div>
|
|
1528
|
+
</div>
|
|
1529
|
+
`}},a.DownloadManager.styles=[D`${A(wn)}`],nt([d({type:Number})],a.DownloadManager.prototype,"chunkSize",2),nt([d({type:Number})],a.DownloadManager.prototype,"maxConcurrentDownloads",2),nt([d({type:Number})],a.DownloadManager.prototype,"maxConcurrentChunks",2),nt([m()],a.DownloadManager.prototype,"downloads",2),nt([m()],a.DownloadManager.prototype,"isAddingFiles",2),a.DownloadManager=nt([M("download-manager")],a.DownloadManager);const kn=":host{display:block}.tree{width:100%;font-family:var(--font-family-base)}.tree__list,.tree__children{list-style:none;margin:0;padding:0}.tree__item{margin:0;padding:0}.tree__row{display:flex;align-items:center;gap:var(--spacing-1);padding:var(--spacing-2) var(--spacing-3);padding-left:calc(var(--spacing-3) + (var(--tree-level, 0) * 14px));border-radius:var(--radius-sm);color:var(--color-body-color);cursor:pointer;-webkit-user-select:none;user-select:none;transition:background-color var(--transition-speed-fast) var(--transition-timing)}.tree--icons .tree__row{justify-content:center;padding:0;width:44px;height:44px;min-height:44px;margin:0 auto}.tree__row:hover{background-color:var(--color-light)}.tree__row:focus-visible{outline:2px solid var(--color-secondary);outline-offset:1px}.tree__row--disabled{opacity:.5;cursor:not-allowed}.tree__row--active .tree__label,.tree__row--active .tree__icon{color:var(--color-primary)}.tree:not(.tree--icons) .tree__row--active{background-color:var(--color-light)}.tree__icon{width:20px;min-width:20px;display:inline-flex;align-items:center;justify-content:center;color:inherit}.tree--icons .tree__icon{width:20px;min-width:20px;height:20px}.tree--icons .tree__row--active{background-color:var(--color-primary)}.tree--icons .tree__row--active .tree__icon{color:#fff}.tree--icons .tree__row--active:hover{background-color:var(--color-primary-hover)}.tree__chevron-btn{display:inline-flex;align-items:center;justify-content:center;width:20px;height:20px;border:none;background:transparent;color:var(--color-tertiary);cursor:pointer;padding:0;flex-shrink:0}.tree__chevron-btn--right{margin-left:auto}.tree__chevron{transform:rotate(-90deg);transition:transform var(--transition-speed-fast) var(--transition-timing)}.tree__chevron--open{transform:rotate(0)}.tree__chevron-spacer{width:20px;height:20px;flex-shrink:0}.tree__label{display:inline-flex;align-items:center;font-size:var(--font-size-sm);color:inherit}";var Cn=Object.defineProperty,Sn=Object.getOwnPropertyDescriptor,Re=(r,e,t,o)=>{for(var i=o>1?void 0:o?Sn(e,t):e,s=r.length-1,n;s>=0;s--)(n=r[s])&&(i=(o?n(e,t,i):n(i))||i);return o&&i&&Cn(e,t,i),i};a.TreeMenu=class extends E{constructor(){super(...arguments),this.items=[],this.expandedIds=[],this.expandOnLabelClick=!0,this.chevronPosition="left",this.showLabels=!0,this.iconSize=16,this._expandedSet=new Set}willUpdate(e){var t;e.has("expandedIds")&&(this._expandedSet=new Set((t=this.expandedIds)!=null?t:[]))}_isExpanded(e){return this._expandedSet.has(e)}_emitToggle(e,t){this.dispatchEvent(new CustomEvent("toggle",{detail:{item:e,expanded:t},bubbles:!0,composed:!0}))}_emitItemClick(e){this.dispatchEvent(new CustomEvent("item-click",{detail:{item:e},bubbles:!0,composed:!0}))}_emitNodeClick(e,t){this.dispatchEvent(new CustomEvent("node-click",{detail:{item:e,hasChildren:t},bubbles:!0,composed:!0}))}_setExpanded(e,t){t?this._expandedSet.add(e.id):this._expandedSet.delete(e.id),this.expandedIds=Array.from(this._expandedSet),this._emitToggle(e,t)}_toggle(e,t){var o;t.stopPropagation(),!(e.disabled||!((o=e.children)!=null&&o.length))&&this._setExpanded(e,!this._isExpanded(e.id))}_handleItemClick(e,t){var i,s;if(t.stopPropagation(),e.disabled)return;const o=!!((i=e.children)!=null&&i.length);if(this._emitNodeClick(e,o),o&&this.expandOnLabelClick){this._setExpanded(e,!this._isExpanded(e.id));return}o||((s=e.onClick)==null||s.call(e,e),this._emitItemClick(e))}_handleRowKeydown(e,t){t.key!=="Enter"&&t.key!==" "||(t.preventDefault(),this._handleItemClick(e,t))}_renderIcon(e){return e.iconName?p`
|
|
1530
|
+
<span class="tree__icon">
|
|
1531
|
+
<ui-icon name=${e.iconName} .size=${this.iconSize}></ui-icon>
|
|
1532
|
+
</span>
|
|
1533
|
+
`:e.iconHtml?p`<span class="tree__icon">${_o(e.iconHtml)}</span>`:b}_renderChevron(e,t){var i;const o=!!((i=e.children)!=null&&i.length);return this.showLabels?o?p`
|
|
1534
|
+
<button
|
|
1535
|
+
type="button"
|
|
1536
|
+
class="tree__chevron-btn ${this.chevronPosition==="right"?"tree__chevron-btn--right":""}"
|
|
1537
|
+
aria-label=${t?"Collapse":"Expand"}
|
|
1538
|
+
@click=${s=>this._toggle(e,s)}
|
|
1539
|
+
>
|
|
1540
|
+
<ui-icon
|
|
1541
|
+
class="tree__chevron ${t?"tree__chevron--open":""}"
|
|
1542
|
+
name="uil-angle-down"
|
|
1543
|
+
size="20"
|
|
1544
|
+
></ui-icon>
|
|
1545
|
+
</button>
|
|
1546
|
+
`:p`<span class="tree__chevron-spacer"></span>`:b}_renderNode(e,t){var n;const o=!!((n=e.children)!=null&&n.length),i=o?this._isExpanded(e.id):!1,s=this.showLabels?`--tree-level:${t};`:"--tree-level:0;";return p`
|
|
1547
|
+
<li class="tree__item">
|
|
1548
|
+
<div
|
|
1549
|
+
class="tree__row ${e.disabled?"tree__row--disabled":""} ${e.active?"tree__row--active":""}"
|
|
1550
|
+
style=${s}
|
|
1551
|
+
role="button"
|
|
1552
|
+
tabindex=${e.disabled?-1:0}
|
|
1553
|
+
@click=${l=>this._handleItemClick(e,l)}
|
|
1554
|
+
@keydown=${l=>this._handleRowKeydown(e,l)}
|
|
1555
|
+
title=${this.showLabels?"":e.label}
|
|
1556
|
+
>
|
|
1557
|
+
${this.chevronPosition==="left"?this._renderChevron(e,i):b}
|
|
1558
|
+
${this._renderIcon(e)}
|
|
1559
|
+
${this.showLabels?p`<span class="tree__label">${e.label}</span>`:b}
|
|
1560
|
+
${this.chevronPosition==="right"?this._renderChevron(e,i):b}
|
|
1561
|
+
</div>
|
|
1562
|
+
|
|
1563
|
+
${this.showLabels&&o&&i?p`
|
|
1564
|
+
<ul class="tree__children">
|
|
1565
|
+
${e.children.map(l=>this._renderNode(l,t+1))}
|
|
1566
|
+
</ul>
|
|
1567
|
+
`:b}
|
|
1568
|
+
</li>
|
|
1569
|
+
`}render(){return p`
|
|
1570
|
+
<nav class="tree ${this.showLabels?"":"tree--icons"}" aria-label="Tree Menu">
|
|
1571
|
+
<ul class="tree__list">
|
|
1572
|
+
${this.items.map(e=>this._renderNode(e,0))}
|
|
1573
|
+
</ul>
|
|
1574
|
+
</nav>
|
|
1575
|
+
`}},a.TreeMenu.styles=[D`${A(kn)}`],Re([d({attribute:!1})],a.TreeMenu.prototype,"items",2),Re([d({type:Array})],a.TreeMenu.prototype,"expandedIds",2),Re([d({type:Boolean})],a.TreeMenu.prototype,"expandOnLabelClick",2),Re([d({type:String})],a.TreeMenu.prototype,"chevronPosition",2),Re([d({type:Boolean})],a.TreeMenu.prototype,"showLabels",2),Re([d({type:Number})],a.TreeMenu.prototype,"iconSize",2),Re([m()],a.TreeMenu.prototype,"_expandedSet",2),a.TreeMenu=Re([M("logosphere-tree-menu")],a.TreeMenu);var En=Object.defineProperty,Pn=Object.getOwnPropertyDescriptor,lt=(r,e,t,o)=>{for(var i=o>1?void 0:o?Pn(e,t):e,s=r.length-1,n;s>=0;s--)(n=r[s])&&(i=(o?n(e,t,i):n(i))||i);return o&&i&&En(e,t,i),i};a.LeftMenuItemElement=class extends E{constructor(){super(...arguments),this.itemId="",this.label="",this.disabled=!1,this.active=!1}render(){return p`<slot></slot>`}},lt([d({type:String})],a.LeftMenuItemElement.prototype,"itemId",2),lt([d({type:String})],a.LeftMenuItemElement.prototype,"label",2),lt([d({type:Boolean})],a.LeftMenuItemElement.prototype,"disabled",2),lt([d({type:Boolean})],a.LeftMenuItemElement.prototype,"active",2),lt([d({attribute:!1})],a.LeftMenuItemElement.prototype,"onClick",2),a.LeftMenuItemElement=lt([M("leftmenu-item")],a.LeftMenuItemElement);const zn=':host{display:block;position:relative;height:100%;font-family:var(--font-family-base)}.lm{position:relative;height:100%;transition:width var(--transition-speed-base) var(--transition-timing)}.lm__panel{width:var(--lm-closed-width);min-width:var(--lm-closed-width);height:100%;background:var(--color-body-bg);border-right:1px solid var(--color-border);display:flex;flex-direction:column;overflow:hidden;overflow-x:hidden;box-sizing:border-box;transition:width var(--transition-speed-base) var(--transition-timing),min-width var(--transition-speed-base) var(--transition-timing),box-shadow var(--transition-speed-base) var(--transition-timing)}.lm--open .lm__panel{width:var(--lm-open-width);min-width:var(--lm-open-width)}.lm--overlay.lm--open .lm__panel{position:absolute;left:0;top:0;box-shadow:var(--shadow-md);z-index:var(--z-index-dropdown)}.lm__brand{padding:var(--spacing-3);border-bottom:1px solid var(--color-border);display:flex;align-items:center;justify-content:center;box-sizing:border-box}.lm--closed .lm__brand{width:64px;height:64px;padding:0}.lm__search{padding:var(--spacing-4) var(--spacing-3)}.lm__nav{flex:1;overflow-y:auto;overflow-x:hidden;padding:var(--spacing-3);scrollbar-width:thin}.lm__nav logosphere-tree-menu{width:100%}.lm__custom{border-top:1px solid var(--color-border);margin-top:var(--spacing-4);padding:var(--spacing-2)}.lm--closed .lm__custom{padding:var(--spacing-2) 0}.lm__custom--hidden{display:none}.lm--closed .lm__nav{padding-left:0;padding-right:0;scrollbar-gutter:auto;scrollbar-color:var(--color-border) transparent}.lm--closed .lm__nav::-webkit-scrollbar{width:4px;height:4px}.lm--closed .lm__nav::-webkit-scrollbar-track{background:transparent}.lm--closed .lm__nav::-webkit-scrollbar-thumb{background-color:var(--color-border);border-radius:999px}.lm--closed .lm__nav:hover::-webkit-scrollbar-thumb{background-color:var(--color-tertiary)}.lm__footer{margin-top:auto;border-top:1px solid var(--color-border);padding:var(--spacing-2);display:flex;align-items:center;justify-content:center;gap:var(--spacing-2)}.lm--closed .lm__footer{flex-direction:column;justify-content:center}.lm__ctrl{width:32px;height:32px;border:1px solid var(--color-border);background:var(--color-body-bg);border-radius:var(--radius-sm);display:inline-flex;align-items:center;justify-content:center;cursor:pointer;color:var(--color-body-color)}.lm__ctrl:hover{background:var(--color-tertiary)}.lm__pin-icon--inactive{color:var(--color-tertiary)}.lm__pin-icon--active{color:var(--color-body-color)}.lm__toggle-icon{transform:rotate(180deg);transition:transform var(--transition-speed-base) var(--transition-timing)}.lm__toggle-icon--open{transform:rotate(0)}::slotted(leftmenu-item){display:none!important}::slotted([slot="logo-open"]),::slotted([slot="logo-closed"]){display:inline-flex;align-items:center;justify-content:center;width:100%;height:100%}::slotted([slot="custom-open"]),::slotted([slot="custom-closed"]){display:block;width:100%}';var An=Object.defineProperty,Dn=Object.getOwnPropertyDescriptor,be=(r,e,t,o)=>{for(var i=o>1?void 0:o?Dn(e,t):e,s=r.length-1,n;s>=0;s--)(n=r[s])&&(i=(o?n(e,t,i):n(i))||i);return o&&i&&An(e,t,i),i};a.LeftMenu=class extends E{constructor(){super(...arguments),this.open=!1,this.pinned=!1,this.closedWidth=64,this.openWidth=248,this.storageKey="logosphere-leftmenu-state",this._nodes=[],this._expandedIds=new Set,this._search="",this._searchExpandedIds=new Set,this._hasCustomOpen=!1,this._hasCustomClosed=!1,this._isHydratingState=!1,this._onSlotChange=e=>{const o=e.target.assignedElements({flatten:!0}).filter(i=>i.tagName==="LEFTMENU-ITEM");this._nodes=o.map((i,s)=>this._mapItemElement(i,`root-${s}`))},this._onCustomOpenSlotChange=e=>{const t=e.target;this._hasCustomOpen=t.assignedElements({flatten:!0}).length>0},this._onCustomClosedSlotChange=e=>{const t=e.target;this._hasCustomClosed=t.assignedElements({flatten:!0}).length>0},this._handleSearchInput=e=>{var i;const o=(i=e.detail)==null?void 0:i.value;typeof o=="string"&&this._setSearch(o)},this._toggleOpen=()=>{this.open=!this.open},this._togglePin=()=>{this.pinned=!this.pinned,this.dispatchEvent(new CustomEvent("pin-change",{detail:{pinned:this.pinned},bubbles:!0,composed:!0}))},this._handleTreeToggle=e=>{e.stopPropagation();const{item:t,expanded:o}=e.detail;o?this._expandedIds.add(t.id):this._expandedIds.delete(t.id),this._expandedIds=new Set(this._expandedIds)},this._handleTreeNodeClick=e=>{this.open||!e.detail.hasChildren||(this.open=!0,this._expandedIds.add(e.detail.item.id),this._expandedIds=new Set(this._expandedIds))},this._handleTreeItemClick=e=>{e.stopPropagation();const t=e.detail.item.data;this.dispatchEvent(new CustomEvent("item-click",{detail:{item:t!=null?t:e.detail.item},bubbles:!0,composed:!0}))}}connectedCallback(){super.connectedCallback(),this._loadPersistedState()}updated(e){this._isHydratingState||(e.has("open")||e.has("pinned"))&&this._persistState()}_loadPersistedState(){if(typeof window!="undefined")try{const e=window.localStorage.getItem(this.storageKey);if(!e)return;const t=JSON.parse(e);this._isHydratingState=!0,typeof t.open=="boolean"&&(this.open=t.open),typeof t.pinned=="boolean"&&(this.pinned=t.pinned),this._isHydratingState=!1}catch(e){this._isHydratingState=!1}}_persistState(){if(typeof window!="undefined")try{window.localStorage.setItem(this.storageKey,JSON.stringify({open:this.open,pinned:this.pinned}))}catch(e){}}_mapItemElement(e,t){var c;const o=e.itemId||e.id||t,i=Array.from(e.children).find(u=>u.getAttribute("slot")==="icon"),s=i==null?void 0:i.querySelector("ui-icon"),n=Array.from(e.children).filter(u=>u.tagName==="LEFTMENU-ITEM"&&u.getAttribute("slot")==="children"),l=Array.from(e.childNodes).filter(u=>u.nodeType===Node.TEXT_NODE).map(u=>{var h;return(h=u.textContent)!=null?h:""}).join(" ").replace(/\s+/g," ").trim();return{id:o,label:(e.label||l||o).trim(),disabled:e.disabled,active:e.active,iconName:(c=s==null?void 0:s.getAttribute("name"))!=null?c:null,iconHtml:i?i.innerHTML:null,onClick:e.onClick?()=>{var u;return(u=e.onClick)==null?void 0:u.call(e,e)}:void 0,children:n.map((u,h)=>this._mapItemElement(u,`${o}-${h}`))}}_setSearch(e){if(this._search=e,!e){this._searchExpandedIds=new Set;return}const t=new Set,o=i=>{let s=!1;return i.forEach(n=>{const l=n.label.toLocaleLowerCase().includes(e.toLocaleLowerCase()),c=o(n.children);c&&t.add(n.id),l&&n.children.length&&t.add(n.id),s=s||l||c}),s};o(this._nodes),this._searchExpandedIds=t}_filterNodes(e,t){if(!t)return e;const o=t.toLocaleLowerCase(),i=s=>{const n=s.children.map(i).filter(Boolean);return!s.label.toLocaleLowerCase().includes(o)&&n.length===0?null:Me($e({},s),{children:n})};return e.map(i).filter(Boolean)}_toTreeItems(e){return e.map(t=>{var o;return{id:t.id,label:t.label,disabled:t.disabled,active:t.active,iconName:(o=t.iconName)!=null?o:void 0,iconHtml:t.iconHtml,onClick:t.onClick?()=>{var i;(i=t.onClick)==null||i.call(t,t)}:void 0,data:t,children:this._toTreeItems(t.children)}})}_effectiveExpandedIds(){const e=new Set(this._expandedIds);return this._search&&this._searchExpandedIds.forEach(t=>e.add(t)),Array.from(e)}render(){const e=this._filterNodes(this._nodes,this._search),t=this._toTreeItems(e),o=this.pinned?this.open?this.openWidth:this.closedWidth:this.closedWidth;return p`
|
|
1576
|
+
<aside
|
|
1577
|
+
class="lm ${this.open?"lm--open":"lm--closed"} ${this.pinned?"lm--pinned":"lm--overlay"}"
|
|
1578
|
+
style=${`--lm-open-width:${this.openWidth}px; --lm-closed-width:${this.closedWidth}px; width:${o}px;`}
|
|
1579
|
+
>
|
|
1580
|
+
<slot @slotchange=${this._onSlotChange}></slot>
|
|
1581
|
+
|
|
1582
|
+
<div class="lm__panel">
|
|
1583
|
+
<div class="lm__brand">
|
|
1584
|
+
${this.open?p`<slot name="logo-open"></slot>`:p`<slot name="logo-closed"></slot>`}
|
|
1585
|
+
</div>
|
|
1586
|
+
|
|
1587
|
+
${this.open?p`
|
|
1588
|
+
<div class="lm__search">
|
|
1589
|
+
<logosphere-input
|
|
1590
|
+
placeholder="Arayın..."
|
|
1591
|
+
.value=${this._search}
|
|
1592
|
+
@input=${this._handleSearchInput}
|
|
1593
|
+
>
|
|
1594
|
+
<ui-icon slot="prefix" name="uil-search" size="16"></ui-icon>
|
|
1595
|
+
</logosphere-input>
|
|
1596
|
+
</div>
|
|
1597
|
+
`:b}
|
|
1598
|
+
|
|
1599
|
+
<nav class="lm__nav">
|
|
1600
|
+
<logosphere-tree-menu
|
|
1601
|
+
.items=${t}
|
|
1602
|
+
.expandedIds=${this._effectiveExpandedIds()}
|
|
1603
|
+
.expandOnLabelClick=${this.open}
|
|
1604
|
+
chevronPosition="right"
|
|
1605
|
+
.showLabels=${this.open}
|
|
1606
|
+
.iconSize=${this.open?16:20}
|
|
1607
|
+
@toggle=${this._handleTreeToggle}
|
|
1608
|
+
@node-click=${this._handleTreeNodeClick}
|
|
1609
|
+
@item-click=${this._handleTreeItemClick}
|
|
1610
|
+
></logosphere-tree-menu>
|
|
1611
|
+
|
|
1612
|
+
${this.open?p`
|
|
1613
|
+
<div class="lm__custom ${this._hasCustomOpen?"":"lm__custom--hidden"}">
|
|
1614
|
+
<slot name="custom-open" @slotchange=${this._onCustomOpenSlotChange}></slot>
|
|
1615
|
+
</div>
|
|
1616
|
+
`:p`
|
|
1617
|
+
<div class="lm__custom ${this._hasCustomClosed?"":"lm__custom--hidden"}">
|
|
1618
|
+
<slot name="custom-closed" @slotchange=${this._onCustomClosedSlotChange}></slot>
|
|
1619
|
+
</div>
|
|
1620
|
+
`}
|
|
1621
|
+
</nav>
|
|
1622
|
+
|
|
1623
|
+
<div class="lm__footer">
|
|
1624
|
+
<logosphere-button
|
|
1625
|
+
variant="outline"
|
|
1626
|
+
theme="secondary"
|
|
1627
|
+
size="md"
|
|
1628
|
+
iconOnly
|
|
1629
|
+
@click=${this._toggleOpen}
|
|
1630
|
+
aria-label="Toggle Menu"
|
|
1631
|
+
>
|
|
1632
|
+
<ui-icon
|
|
1633
|
+
class="lm__toggle-icon ${this.open?"lm__toggle-icon--open":""}"
|
|
1634
|
+
name="uil-left-arrow-to-left"
|
|
1635
|
+
size="16"
|
|
1636
|
+
></ui-icon>
|
|
1637
|
+
</logosphere-button>
|
|
1638
|
+
<logosphere-button
|
|
1639
|
+
variant="outline"
|
|
1640
|
+
theme="secondary"
|
|
1641
|
+
size="md"
|
|
1642
|
+
iconOnly
|
|
1643
|
+
@click=${this._togglePin}
|
|
1644
|
+
aria-label="Pin Menu"
|
|
1645
|
+
>
|
|
1646
|
+
<ui-icon
|
|
1647
|
+
class=${this.pinned?"lm__pin-icon--active":"lm__pin-icon--inactive"}
|
|
1648
|
+
name="uil-pin"
|
|
1649
|
+
size="16"
|
|
1650
|
+
></ui-icon>
|
|
1651
|
+
</logosphere-button>
|
|
1652
|
+
</div>
|
|
1653
|
+
</div>
|
|
1654
|
+
</aside>
|
|
1655
|
+
`}},a.LeftMenu.styles=[D`
|
|
1656
|
+
${A(zn)}
|
|
1657
|
+
`],be([d({type:Boolean,reflect:!0})],a.LeftMenu.prototype,"open",2),be([d({type:Boolean,reflect:!0})],a.LeftMenu.prototype,"pinned",2),be([d({type:Number})],a.LeftMenu.prototype,"closedWidth",2),be([d({type:Number})],a.LeftMenu.prototype,"openWidth",2),be([d({type:String})],a.LeftMenu.prototype,"storageKey",2),be([m()],a.LeftMenu.prototype,"_nodes",2),be([m()],a.LeftMenu.prototype,"_expandedIds",2),be([m()],a.LeftMenu.prototype,"_search",2),be([m()],a.LeftMenu.prototype,"_searchExpandedIds",2),be([m()],a.LeftMenu.prototype,"_hasCustomOpen",2),be([m()],a.LeftMenu.prototype,"_hasCustomClosed",2),a.LeftMenu=be([M("logosphere-leftmenu")],a.LeftMenu);const Mn=':host{display:block}.modal__backdrop{position:fixed;top:0;right:0;bottom:0;left:0;z-index:var(--z-index-modal-backdrop, 1050);display:flex;align-items:center;justify-content:center;background-color:#00000080;padding:var(--spacing-4, 16px);font-family:var(--font-family-base, "Inter", sans-serif);animation:modal-backdrop-fade-in .15s ease-out}@keyframes modal-backdrop-fade-in{0%{opacity:0}to{opacity:1}}.modal__dialog{width:100%;max-width:500px;max-height:calc(100vh - 48px);border-radius:var(--radius-lg, 12px);border:1px solid var(--color-border, #e0e0e0);overflow:hidden;box-shadow:0 8px 8px -4px #0000000a,0 20px 24px -4px #0000001a;background-color:var(--color-body-bg, white);display:flex;flex-direction:column;animation:modal-dialog-scale-in .15s ease-out}@keyframes modal-dialog-scale-in{0%{opacity:0;transform:scale(.95)}to{opacity:1;transform:scale(1)}}.modal__dialog:focus{outline:none}.modal__dialog--sm{max-width:400px}.modal__dialog--md{max-width:500px}.modal__dialog--lg{max-width:720px}.modal__dialog--xl{max-width:900px}.modal__dialog--full{max-width:calc(100vw - 48px);max-height:calc(100vh - 48px)}.modal__header{padding:var(--spacing-4, 16px) var(--spacing-2, 8px);border-bottom:1px solid var(--color-border, #e0e0e0);display:flex;align-items:center;flex-shrink:0}.modal__header-content{flex:1;min-width:0;display:flex;align-items:center;gap:var(--spacing-2, 8px);padding:0 var(--spacing-2, 8px)}.modal__header-icon{display:flex;align-items:center;justify-content:center;flex-shrink:0;color:var(--color-body-text, #2b2b2b)}.modal__title{font-size:var(--font-size-md, 16px);font-weight:var(--font-weight-semibold, 600);color:var(--color-emphasis, black);margin:0;line-height:1.2;letter-spacing:-.16px}.modal__header-btn{display:flex;align-items:center;justify-content:center;width:32px;height:32px;padding:var(--spacing-2, 8px);border:none;background:transparent;border-radius:var(--radius-base, 8px);cursor:pointer;color:var(--color-secondary, #565656);transition:background-color .15s ease,color .15s ease;flex-shrink:0}.modal__header-btn:hover{background-color:var(--color-body-bg-hover, #f5f5f5);color:var(--color-body-text, #2b2b2b)}.modal__header-btn:focus-visible{outline:2px solid var(--color-primary, #c8102e);outline-offset:2px}.modal__body{padding:var(--spacing-6, 24px) var(--spacing-4, 16px);overflow-y:auto;flex:1;min-height:0;font-size:var(--font-size-sm, 14px);line-height:20px;color:var(--color-body-text, #2b2b2b);letter-spacing:-.14px}.modal__body::-webkit-scrollbar{width:6px}.modal__body::-webkit-scrollbar-track{background:transparent}.modal__body::-webkit-scrollbar-thumb{background-color:var(--color-border, #e0e0e0);border-radius:3px}.modal__body::-webkit-scrollbar-thumb:hover{background-color:var(--color-secondary, #565656)}.modal__footer{padding:var(--spacing-4, 16px) var(--spacing-6, 24px);display:flex;flex-wrap:wrap;gap:var(--spacing-2, 8px);justify-content:flex-end;align-items:center;border-top:1px solid var(--color-border, #e0e0e0);flex-shrink:0}@media(max-width:576px){.modal__backdrop{padding:var(--spacing-3, 12px)}.modal__dialog{max-height:calc(100vh - 24px)}.modal__dialog--sm,.modal__dialog--md,.modal__dialog--lg,.modal__dialog--xl{max-width:100%}.modal__footer{flex-direction:column}.modal__footer ::slotted(*){width:100%}}';var On=Object.defineProperty,J=(r,e,t,o)=>{for(var i=void 0,s=r.length-1,n;s>=0;s--)(n=r[s])&&(i=n(e,t,i)||i);return i&&On(e,t,i),i};const Mo=class Mo extends E{constructor(){super(...arguments),this.open=!1,this.title="",this.size="md",this.closeOnEsc=!0,this.closeOnBackdrop=!0,this.showBack=!1,this.showClose=!0,this.showIcon=!1,this.footer=!0,this.okLabel="Tamam",this.cancelLabel="İptal",this.showCancel=!0,this.hasFooterSlot=!1,this.hasHeaderSlot=!1,this.previousActiveElement=null,this.focusableElements=[],this.onKeyDown=e=>{if(this.open){if(this.closeOnEsc&&e.key==="Escape"){e.preventDefault(),this.setOpen(!1);return}e.key==="Tab"&&this.handleTabKey(e)}},this.onBackdropClick=e=>{var o;if(!this.closeOnBackdrop)return;const t=(o=this.shadowRoot)==null?void 0:o.querySelector(".__modal-content");t&&!e.composedPath().includes(t)&&this.setOpen(!1)},this.handleOk=()=>{var e;(e=this.onOk)==null||e.call(this),this.dispatchEvent(new CustomEvent("ok",{bubbles:!0,composed:!0})),this.setOpen(!1)},this.handleCancel=()=>{var e;(e=this.onCancel)==null||e.call(this),this.dispatchEvent(new CustomEvent("cancel",{bubbles:!0,composed:!0})),this.setOpen(!1)}}connectedCallback(){super.connectedCallback(),document.addEventListener("keydown",this.onKeyDown)}disconnectedCallback(){super.disconnectedCallback(),document.removeEventListener("keydown",this.onKeyDown),this.unlockBodyScroll()}openModal(){this.setOpen(!0)}closeModal(){this.setOpen(!1)}setOpen(e){var t;this.open!==e&&(this.open=e,e?(this.lockBodyScroll(),this.previousActiveElement=document.activeElement,requestAnimationFrame(()=>{this.trapFocus()})):(this.unlockBodyScroll(),(t=this.previousActiveElement)==null||t.focus()),this.dispatchEvent(new CustomEvent(e?"modal-open":"modal-close",{bubbles:!0,composed:!0})))}lockBodyScroll(){document.body.style.overflow="hidden",document.body.style.paddingRight=`${window.innerWidth-document.documentElement.clientWidth}px`}unlockBodyScroll(){document.body.style.overflow="",document.body.style.paddingRight=""}trapFocus(){if(!this.dialogElement)return;const e=["button:not([disabled])","[href]","input:not([disabled])","select:not([disabled])","textarea:not([disabled])",'[tabindex]:not([tabindex="-1"])'].join(", ");this.focusableElements=Array.from(this.dialogElement.querySelectorAll(e));const t=this.querySelectorAll(e);this.focusableElements.push(...Array.from(t)),this.focusableElements.length>0?this.focusableElements[0].focus():this.dialogElement.focus()}handleTabKey(e){var i,s;if(this.focusableElements.length===0){e.preventDefault();return}const t=this.focusableElements[0],o=this.focusableElements[this.focusableElements.length-1];e.shiftKey?(document.activeElement===t||((i=this.shadowRoot)==null?void 0:i.activeElement)===t)&&(e.preventDefault(),o.focus()):(document.activeElement===o||((s=this.shadowRoot)==null?void 0:s.activeElement)===o)&&(e.preventDefault(),t.focus())}checkSlotContent(){this.hasFooterSlot=this.querySelector('[slot="footer"]')!==null,this.hasHeaderSlot=this.querySelector('[slot="header"]')!==null}updated(e){super.updated(e),this.checkSlotContent(),e.has("open")&&this.open&&requestAnimationFrame(()=>{this.trapFocus()})}get modalId(){var e;return`modal-${((e=this.title)==null?void 0:e.replace(/\s+/g,"-").toLowerCase())||"dialog"}`}get sizeClass(){const e={sm:"modal__dialog--sm",md:"modal__dialog--md",lg:"modal__dialog--lg",xl:"modal__dialog--xl",full:"modal__dialog--full"};return e[this.size]||e.md}get showHeader(){return this.showBack||this.showClose||this.title||this.hasHeaderSlot||this.showIcon}render(){if(!this.open)return b;const e=`${this.modalId}-title`,t=`${this.modalId}-desc`;return p`
|
|
743
1658
|
<div
|
|
744
1659
|
class="modal__backdrop"
|
|
745
1660
|
role="presentation"
|
|
746
1661
|
aria-hidden="false"
|
|
747
|
-
@mousedown
|
|
1662
|
+
@mousedown=${this.onBackdropClick}
|
|
748
1663
|
>
|
|
749
1664
|
<div
|
|
750
|
-
class="__modal-content modal__dialog"
|
|
1665
|
+
class="__modal-content modal__dialog ${this.sizeClass}"
|
|
751
1666
|
role="dialog"
|
|
752
1667
|
aria-modal="true"
|
|
1668
|
+
aria-labelledby=${this.title?e:b}
|
|
1669
|
+
aria-describedby=${t}
|
|
1670
|
+
tabindex="-1"
|
|
753
1671
|
>
|
|
754
|
-
|
|
1672
|
+
${this.showHeader?p`
|
|
1673
|
+
<div class="modal__header">
|
|
1674
|
+
${this.showBack?p`
|
|
1675
|
+
<button
|
|
1676
|
+
type="button"
|
|
1677
|
+
class="modal__header-btn"
|
|
1678
|
+
@click=${()=>this.setOpen(!1)}
|
|
1679
|
+
aria-label="Geri"
|
|
1680
|
+
>
|
|
1681
|
+
<ui-icon name="uil-arrow-left" size="16"></ui-icon>
|
|
1682
|
+
</button>
|
|
1683
|
+
`:b}
|
|
1684
|
+
<div class="modal__header-content">
|
|
1685
|
+
${this.showIcon?p`
|
|
1686
|
+
<span class="modal__header-icon">
|
|
1687
|
+
<slot name="icon">
|
|
1688
|
+
<ui-icon name="uil-exclamation-triangle" size="16"></ui-icon>
|
|
1689
|
+
</slot>
|
|
1690
|
+
</span>
|
|
1691
|
+
`:b}
|
|
1692
|
+
${this.title?p`<h2 id=${e} class="modal__title">${this.title}</h2>`:b}
|
|
1693
|
+
<slot name="header"></slot>
|
|
1694
|
+
</div>
|
|
1695
|
+
${this.showClose?p`
|
|
1696
|
+
<button
|
|
1697
|
+
type="button"
|
|
1698
|
+
class="modal__header-btn modal__close-btn"
|
|
1699
|
+
@click=${()=>this.setOpen(!1)}
|
|
1700
|
+
aria-label="Kapat"
|
|
1701
|
+
>
|
|
1702
|
+
<ui-icon name="uil-times" size="16"></ui-icon>
|
|
1703
|
+
</button>
|
|
1704
|
+
`:b}
|
|
1705
|
+
</div>
|
|
1706
|
+
`:b}
|
|
755
1707
|
|
|
756
|
-
<div class="modal__body">
|
|
1708
|
+
<div id=${t} class="modal__body">
|
|
757
1709
|
<slot></slot>
|
|
758
1710
|
</div>
|
|
759
1711
|
|
|
760
|
-
|
|
1712
|
+
${this.renderFooter()}
|
|
761
1713
|
</div>
|
|
762
1714
|
</div>
|
|
763
|
-
`
|
|
764
|
-
|
|
765
|
-
|
|
766
|
-
|
|
767
|
-
|
|
768
|
-
|
|
769
|
-
|
|
770
|
-
|
|
771
|
-
|
|
772
|
-
|
|
773
|
-
|
|
774
|
-
|
|
775
|
-
|
|
776
|
-
|
|
777
|
-
|
|
778
|
-
|
|
779
|
-
|
|
780
|
-
|
|
1715
|
+
`}renderFooter(){return this.footer?this.hasFooterSlot?p`
|
|
1716
|
+
<div class="modal__footer">
|
|
1717
|
+
<slot name="footer"></slot>
|
|
1718
|
+
</div>
|
|
1719
|
+
`:p`
|
|
1720
|
+
<div class="modal__footer">
|
|
1721
|
+
${this.showCancel?p`
|
|
1722
|
+
<logosphere-button
|
|
1723
|
+
variant="outline"
|
|
1724
|
+
theme="primary"
|
|
1725
|
+
size="md"
|
|
1726
|
+
@click=${this.handleCancel}
|
|
1727
|
+
>
|
|
1728
|
+
${this.cancelLabel}
|
|
1729
|
+
</logosphere-button>
|
|
1730
|
+
`:b}
|
|
1731
|
+
<logosphere-button
|
|
1732
|
+
variant="solid"
|
|
1733
|
+
theme="primary"
|
|
1734
|
+
size="md"
|
|
1735
|
+
@click=${this.handleOk}
|
|
1736
|
+
>
|
|
1737
|
+
${this.okLabel}
|
|
1738
|
+
</logosphere-button>
|
|
1739
|
+
</div>
|
|
1740
|
+
`:b}};Mo.styles=[D`${A(Mn)}`];let q=Mo;J([d({type:Boolean,reflect:!0})],q.prototype,"open"),J([d({type:String})],q.prototype,"title"),J([d({type:String})],q.prototype,"size"),J([d({type:Boolean})],q.prototype,"closeOnEsc"),J([d({type:Boolean})],q.prototype,"closeOnBackdrop"),J([d({type:Boolean})],q.prototype,"showBack"),J([d({type:Boolean})],q.prototype,"showClose"),J([d({type:Boolean})],q.prototype,"showIcon"),J([d({type:Boolean})],q.prototype,"footer"),J([d({type:String})],q.prototype,"okLabel"),J([d({type:String})],q.prototype,"cancelLabel"),J([d({type:Boolean})],q.prototype,"showCancel"),J([d({attribute:!1})],q.prototype,"onOk"),J([d({attribute:!1})],q.prototype,"onCancel"),J([m()],q.prototype,"hasFooterSlot"),J([m()],q.prototype,"hasHeaderSlot"),J([F(".modal__dialog")],q.prototype,"dialogElement"),customElements.get("logosphere-modal")||customElements.define("logosphere-modal",q);const Ln=":host{display:block}.toast{position:relative;display:grid;grid-template-columns:auto 1fr auto;gap:12px;align-items:start;width:100%;box-sizing:border-box;border-radius:var(--radius-md);border-left:4px solid var(--toast-accent);background:#fff;box-shadow:var(--shadow-md);padding:var(--spacing-4);color:#3d3d3d;font-family:var(--font-family-base);animation:toast-enter .22s cubic-bezier(.2,.8,.2,1);transform-origin:top right}.toast__icon{display:inline-flex;margin-top:2px;color:var(--toast-accent)}.toast__content{min-width:0}.toast__title{margin:0;font-size:var(--font-size-lg);line-height:var(--line-height-tight);font-weight:var(--font-weight-semibold)}.toast__title--as-text{font-size:var(--font-size-base);line-height:var(--line-height-normal);font-weight:var(--font-weight-regular);color:#555}.toast__text{margin:4px 0 0;font-size:var(--font-size-base);line-height:var(--line-height-normal);color:#555}.toast__actions{display:flex;gap:10px;margin-top:12px}.toast__close{border:0;background:transparent;color:#5a5a5a;cursor:pointer;display:inline-flex;align-items:center;justify-content:center;margin-top:2px}.toast__close:hover{color:#2f2f2f}.toast--success{--toast-accent: var(--color-success-active)}.toast--danger{--toast-accent: var(--color-danger-active)}.toast--warning{--toast-accent: var(--color-warning-active)}.toast--info{--toast-accent: var(--color-info-active)}.toast[data-closing=true]{pointer-events:none;animation:toast-exit .22s cubic-bezier(.4,0,1,1) forwards}@keyframes toast-enter{0%{opacity:0;transform:translate3d(18px,-8px,0) scale(.98)}to{opacity:1;transform:translateZ(0) scale(1)}}@keyframes toast-exit{0%{opacity:1;transform:translateZ(0) scale(1);max-height:240px;margin-bottom:0}to{opacity:0;transform:translate3d(20px,-6px,0) scale(.97);max-height:0;margin-bottom:-12px}}";var Tn=Object.defineProperty,Bn=Object.getOwnPropertyDescriptor,we=(r,e,t,o)=>{for(var i=o>1?void 0:o?Bn(e,t):e,s=r.length-1,n;s>=0;s--)(n=r[s])&&(i=(o?n(e,t,i):n(i))||i);return o&&i&&Tn(e,t,i),i};const Ai=6e3,In=220,Rn={success:"uil-check-circle",danger:"uil-exclamation-octagon",warning:"uil-exclamation-triangle",info:"uil-info-circle"};a.LogosphereToast=class extends E{constructor(){super(...arguments),this.type="info",this.title="",this.text="",this.icon="",this.closeable=!0,this.duration=Ai,this.autoDismiss=!0,this.isClosing=!1,this.remainingMs=Ai,this.startedAt=0}connectedCallback(){super.connectedCallback(),this.remainingMs=this.duration,this.startTimer()}disconnectedCallback(){super.disconnectedCallback(),this.clearTimer(),this.closeTimerId&&(clearTimeout(this.closeTimerId),this.closeTimerId=void 0)}updated(e){e.has("duration")&&(this.remainingMs=this.duration,this.restartTimer()),(e.has("action")||e.has("autoDismiss")||e.has("type"))&&this.restartTimer()}close(e="manual"){this.isClosing||(this.clearTimer(),this.isClosing=!0,this.closeTimerId=setTimeout(()=>{this.dispatchEvent(new CustomEvent("toast-close",{detail:{reason:e},bubbles:!0,composed:!0}))},In))}get canAutoDismiss(){return this.autoDismiss&&this.type!=="danger"&&!this.hasActions}get resolvedTitle(){return this.title||this.text}get resolvedText(){return this.title?this.text:""}get resolvedIcon(){return this.icon||Rn[this.type]}get hasActions(){return!!this.action}onActionClick(e){var t,o,i,s,n;this.action&&(e==="okay"?(o=(t=this.action).onOkay)==null||o.call(t):(s=(i=this.action).onCancel)==null||s.call(i),((n=this.action.closeOnAction)==null||n)&&this.close("manual"))}clearTimer(){this.timerId&&(clearTimeout(this.timerId),this.timerId=void 0)}startTimer(){this.clearTimer(),!(!this.canAutoDismiss||this.remainingMs<=0)&&(this.startedAt=Date.now(),this.timerId=setTimeout(()=>this.close("auto"),this.remainingMs))}pauseTimer(){this.timerId&&(this.clearTimer(),this.remainingMs=Math.max(0,this.remainingMs-(Date.now()-this.startedAt)))}resumeTimer(){this.canAutoDismiss&&this.startTimer()}restartTimer(){this.clearTimer(),this.startTimer()}render(){var e,t;return p`
|
|
1741
|
+
<article
|
|
1742
|
+
class="toast toast--${this.type}"
|
|
1743
|
+
data-closing=${this.isClosing?"true":"false"}
|
|
1744
|
+
role="status"
|
|
1745
|
+
aria-live=${this.type==="danger"?"assertive":"polite"}
|
|
1746
|
+
@mouseenter=${this.pauseTimer}
|
|
1747
|
+
@mouseleave=${this.resumeTimer}
|
|
1748
|
+
>
|
|
1749
|
+
<span class="toast__icon">
|
|
1750
|
+
<ui-icon name=${this.resolvedIcon} size="20"></ui-icon>
|
|
1751
|
+
</span>
|
|
1752
|
+
|
|
1753
|
+
<div class="toast__content">
|
|
1754
|
+
<h4 class=${this.title?"toast__title":"toast__title toast__title--as-text"}>
|
|
1755
|
+
${this.resolvedTitle}
|
|
1756
|
+
</h4>
|
|
1757
|
+
${this.resolvedText?p`<p class="toast__text">${this.resolvedText}</p>`:b}
|
|
1758
|
+
${this.hasActions?p`
|
|
1759
|
+
<div class="toast__actions">
|
|
1760
|
+
<logosphere-button
|
|
1761
|
+
variant="outline"
|
|
1762
|
+
theme="primary"
|
|
1763
|
+
@click=${()=>this.onActionClick("okay")}
|
|
1764
|
+
>
|
|
1765
|
+
${((e=this.action)==null?void 0:e.okayLabel)||"Tamam"}
|
|
1766
|
+
</logosphere-button>
|
|
1767
|
+
<logosphere-button
|
|
1768
|
+
variant="text"
|
|
1769
|
+
theme="secondary"
|
|
1770
|
+
@click=${()=>this.onActionClick("cancel")}
|
|
1771
|
+
>
|
|
1772
|
+
${((t=this.action)==null?void 0:t.cancelLabel)||"İptal"}
|
|
1773
|
+
</logosphere-button>
|
|
1774
|
+
</div>
|
|
1775
|
+
`:b}
|
|
1776
|
+
</div>
|
|
1777
|
+
|
|
1778
|
+
${this.closeable?p`
|
|
1779
|
+
<button class="toast__close" @click=${()=>this.close("manual")} aria-label="Close">
|
|
1780
|
+
<ui-icon name="uil-times" size="20"></ui-icon>
|
|
1781
|
+
</button>
|
|
1782
|
+
`:b}
|
|
1783
|
+
</article>
|
|
1784
|
+
`}},a.LogosphereToast.styles=[D`
|
|
1785
|
+
${A(Ln)}
|
|
1786
|
+
`],we([d({type:String})],a.LogosphereToast.prototype,"type",2),we([d({type:String})],a.LogosphereToast.prototype,"title",2),we([d({type:String})],a.LogosphereToast.prototype,"text",2),we([d({type:String})],a.LogosphereToast.prototype,"icon",2),we([d({type:Boolean})],a.LogosphereToast.prototype,"closeable",2),we([d({type:Number})],a.LogosphereToast.prototype,"duration",2),we([d({type:Boolean})],a.LogosphereToast.prototype,"autoDismiss",2),we([d({attribute:!1})],a.LogosphereToast.prototype,"action",2),we([m()],a.LogosphereToast.prototype,"isClosing",2),a.LogosphereToast=we([M("logosphere-toast")],a.LogosphereToast);const Di=(r,e,t)=>{const o=new Map;for(let i=e;i<=t;i++)o.set(r[i],i);return o},Hn=Yt(class extends Vt{constructor(r){if(super(r),r.type!==ke.CHILD)throw Error("repeat() can only be used in text expressions")}dt(r,e,t){let o;t===void 0?t=e:e!==void 0&&(o=e);const i=[],s=[];let n=0;for(const l of r)i[n]=o?o(l,n):n,s[n]=t(l,n),n++;return{values:s,keys:i}}render(r,e,t){return this.dt(r,e,t).values}update(r,[e,t,o]){var C;const i=Cr(r),{values:s,keys:n}=this.dt(e,t,o);if(!Array.isArray(i))return this.ut=n,s;const l=(C=this.ut)!=null?C:this.ut=[],c=[];let u,h,g=0,f=i.length-1,v=0,w=s.length-1;for(;g<=f&&v<=w;)if(i[g]===null)g++;else if(i[f]===null)f--;else if(l[g]===n[v])c[v]=Ze(i[g],s[v]),g++,v++;else if(l[f]===n[w])c[w]=Ze(i[f],s[w]),f--,w--;else if(l[g]===n[w])c[w]=Ze(i[g],s[w]),xt(r,c[w+1],i[g]),g++,w--;else if(l[f]===n[v])c[v]=Ze(i[f],s[v]),xt(r,i[g],i[f]),f--,v++;else if(u===void 0&&(u=Di(n,v,w),h=Di(l,g,f)),u.has(l[g]))if(u.has(l[f])){const _=h.get(n[v]),y=_!==void 0?i[_]:null;if(y===null){const x=xt(r,i[g]);Ze(x,s[v]),c[v]=x}else c[v]=Ze(y,s[v]),xt(r,i[g],y),i[_]=null;v++}else vo(i[f]),f--;else vo(i[g]),g++;for(;v<=w;){const _=xt(r,c[w+1]);Ze(_,s[v]),c[v++]=_}for(;g<=f;){const _=i[g++];_!==null&&vo(_)}return this.ut=n,Qo(r,c),pe}}),jn=":host{position:fixed;top:16px;right:16px;z-index:9999;width:min(420px,calc(100vw - 24px));box-sizing:border-box}.toast-container{display:flex;flex-direction:column;gap:12px}";var Nn=Object.defineProperty,Yn=Object.getOwnPropertyDescriptor,Mi=(r,e,t,o)=>{for(var i=o>1?void 0:o?Yn(e,t):e,s=r.length-1,n;s>=0;s--)(n=r[s])&&(i=(o?n(e,t,i):n(i))||i);return o&&i&&Nn(e,t,i),i};const Oi=4;a.LogosphereToastContainer=class extends E{constructor(){super(...arguments),this.visibleToasts=[],this.queuedToasts=[]}show(e){const t=this.toToast(e);return this.visibleToasts.length<Oi?(this.visibleToasts=[t,...this.visibleToasts],t.id):(this.queuedToasts.push(t),t.id)}close(e){const t=this.visibleToasts.findIndex(o=>o.id===e);if(t!==-1){const o=this.visibleToasts.slice();o.splice(t,1),this.visibleToasts=o,this.dequeue();return}this.queuedToasts=this.queuedToasts.filter(o=>o.id!==e)}clear(){this.visibleToasts=[],this.queuedToasts=[]}dequeue(){if(!this.queuedToasts.length||this.visibleToasts.length>=Oi)return;const e=this.queuedToasts.shift();e&&(this.visibleToasts=[e,...this.visibleToasts])}toToast(e){var t,o,i;return{id:e.id||this.createId(),type:e.type||"info",title:e.title||"",text:e.text,icon:e.icon||"",closeable:(t=e.closeable)!=null?t:!0,autoDismiss:(o=e.autoDismiss)!=null?o:!0,duration:(i=e.duration)!=null?i:6e3,action:e.action}}createId(){return`toast-${Date.now()}-${Math.random().toString(36).slice(2,8)}`}render(){return p`
|
|
1787
|
+
<div class="toast-container" role="region" aria-label="Notifications">
|
|
1788
|
+
${Hn(this.visibleToasts,e=>e.id,e=>p`
|
|
1789
|
+
<logosphere-toast
|
|
1790
|
+
.type=${e.type}
|
|
1791
|
+
.title=${e.title}
|
|
1792
|
+
.text=${e.text}
|
|
1793
|
+
.icon=${e.icon}
|
|
1794
|
+
.closeable=${e.closeable}
|
|
1795
|
+
.autoDismiss=${e.autoDismiss}
|
|
1796
|
+
.duration=${e.duration}
|
|
1797
|
+
.action=${e.action}
|
|
1798
|
+
@toast-close=${()=>this.close(e.id)}
|
|
1799
|
+
>
|
|
1800
|
+
</logosphere-toast>
|
|
1801
|
+
`)}
|
|
1802
|
+
</div>
|
|
1803
|
+
`}},a.LogosphereToastContainer.styles=[D`${A(jn)}`],Mi([m()],a.LogosphereToastContainer.prototype,"visibleToasts",2),a.LogosphereToastContainer=Mi([M("logosphere-toast-container")],a.LogosphereToastContainer);class Vn{static show(e){return this.getContainer().show(e)}static success(e){return this.show(Me($e({},e),{type:"success"}))}static danger(e){return this.show(Me($e({},e),{type:"danger",autoDismiss:!1}))}static warning(e){return this.show(Me($e({},e),{type:"warning"}))}static info(e){return this.show(Me($e({},e),{type:"info"}))}static close(e){this.getContainer().close(e)}static clear(){this.getContainer().clear()}static getContainer(){if(this.container&&document.body.contains(this.container))return this.container;const e=document.querySelector("logosphere-toast-container");if(e&&e instanceof a.LogosphereToastContainer)return this.container=e,e;const t=document.createElement("logosphere-toast-container");return document.body.appendChild(t),this.container=t,t}}const Fn=":host{display:block}.tab{width:100%;font-family:var(--font-family-base)}.tab__list{display:flex;overflow-x:auto;overflow-y:hidden;border-bottom:1px solid var(--color-border);scroll-behavior:smooth;-webkit-overflow-scrolling:touch;scrollbar-width:none;-ms-overflow-style:none}.tab__list::-webkit-scrollbar{display:none}.tab__button{display:inline-flex;flex-direction:row;align-items:center;gap:var(--spacing-2);padding:var(--spacing-3) var(--spacing-4);min-width:120px;position:relative;cursor:pointer;border:none;border-bottom:2px solid transparent;background:transparent;font-family:var(--font-family-base);white-space:nowrap;transition:background-color var(--transition-speed-base) var(--transition-timing),border-color var(--transition-speed-base) var(--transition-timing)}.tab__button:hover:not(.tab__button--disabled):not(.tab__button--active){background-color:var(--color-light)}.tab__button--active{border-bottom-color:var(--color-primary)}.tab__button--disabled{cursor:not-allowed;opacity:.4;pointer-events:none}.tab__icon{font-size:var(--font-size-xl);flex-shrink:0;color:inherit;line-height:1}.tab__content{display:flex;flex-direction:column;align-items:flex-start}.tab__label{font-weight:var(--font-weight-medium);font-size:var(--font-size-sm);color:var(--color-body-text)}.tab__label--inactive{color:var(--color-tertiary)}.tab__description{font-size:var(--font-size-xs);text-align:left;color:var(--color-tertiary)}.tab__description--active{color:var(--color-secondary)}.tab__panel{padding:var(--spacing-4);outline:none}.tab__panel--hidden{display:none}.tab--segmented .tab__list{display:inline-flex;position:relative;border-bottom:none;background-color:var(--color-light);border-radius:var(--radius-base);padding:0;gap:0;overflow:visible}.tab__segment-pill{position:absolute;top:0;bottom:0;left:0;width:0;background-color:var(--color-white, #ffffff);border:1px solid var(--color-border);border-radius:var(--radius-base);pointer-events:none;z-index:0;transition:transform .22s cubic-bezier(.35,0,.25,1),width .22s cubic-bezier(.35,0,.25,1)}.tab--segmented .tab__button{position:relative;z-index:1;min-width:unset;height:32px;padding:var(--spacing-1) var(--spacing-3);border:1px solid transparent;border-bottom:1px solid transparent;border-radius:var(--radius-base);background:transparent;transition:color var(--transition-speed-base) var(--transition-timing)}.tab--segmented .tab__button:hover:not(.tab__button--disabled):not(.tab__button--active){background-color:transparent}.tab--segmented .tab__button--active{background-color:transparent;border-color:transparent}.tab--segmented .tab__label{color:var(--color-secondary);font-size:var(--font-size-sm);font-weight:var(--font-weight-medium);line-height:20px;letter-spacing:-.14px}.tab--segmented .tab__label--inactive{color:var(--color-secondary)}.tab--segmented .tab__button--active .tab__label,.tab--segmented .tab__button--active .tab__label--inactive{color:var(--color-primary)}.tab--segmented .tab__icon{color:inherit;font-size:var(--font-size-base)}.tab--segmented .tab__panels{margin-top:var(--spacing-3)}.tab--segmented .tab__panel{padding:0}";var Un=Object.defineProperty,qn=Object.getOwnPropertyDescriptor,He=(r,e,t,o)=>{for(var i=o>1?void 0:o?qn(e,t):e,s=r.length-1,n;s>=0;s--)(n=r[s])&&(i=(o?n(e,t,i):n(i))||i);return o&&i&&Un(e,t,i),i};a.LogosphereTab=class extends E{constructor(){super(...arguments),this.tabs=[],this.activeTab="",this.lazy=!0,this.variant="default",this._focusedIndex=0,this._renderedTabs=new Set,this._pillInitialized=!1}connectedCallback(){super.connectedCallback(),!this.activeTab&&this.tabs.length>0&&(this.activeTab=this.tabs[0].id)}disconnectedCallback(){var e;super.disconnectedCallback(),(e=this._pillResizeObserver)==null||e.disconnect(),this._pillResizeObserver=void 0}willUpdate(e){if(super.willUpdate(e),e.has("activeTab")&&this.activeTab){this._renderedTabs.add(this.activeTab);const t=this.tabs.findIndex(o=>o.id===this.activeTab);t!==-1&&(this._focusedIndex=t)}e.has("tabs")&&this.tabs.length>0&&(this.tabs.some(o=>o.id===this.activeTab)||(this.activeTab=this.tabs[0].id),this._focusedIndex=this.tabs.findIndex(o=>o.id===this.activeTab))}handleTabClick(e,t){if(t)return;const o=this.activeTab;this.activeTab=e,this._focusedIndex=this.tabs.findIndex(i=>i.id===e),this.dispatchEvent(new CustomEvent("tab-change",{detail:{oldTab:o,newTab:e},bubbles:!0,composed:!0}))}handleKeyDown(e){var s,n,l,c,u;const{tabs:t}=this;if(t.filter(h=>!h.disabled).length===0)return;let o=this._focusedIndex;const i=this._focusedIndex;switch(e.key){case"ArrowLeft":e.preventDefault();do o=o>0?o-1:t.length-1;while((s=t[o])!=null&&s.disabled&&o!==i);break;case"ArrowRight":e.preventDefault();do o=o<t.length-1?o+1:0;while((n=t[o])!=null&&n.disabled&&o!==i);break;case"Home":for(e.preventDefault(),o=0;(l=t[o])!=null&&l.disabled&&o<t.length-1;)o++;break;case"End":for(e.preventDefault(),o=t.length-1;(c=t[o])!=null&&c.disabled&&o>0;)o--;break;default:return}if(o!==this._focusedIndex&&!((u=t[o])!=null&&u.disabled)){const h=this.activeTab;this._focusedIndex=o,this.activeTab=t[o].id,this.updateComplete.then(()=>{var f;const g=(f=this.shadowRoot)==null?void 0:f.querySelector(`[role="tab"][data-tab-id="${t[o].id}"]`);g==null||g.focus()}),this.dispatchEvent(new CustomEvent("tab-change",{detail:{oldTab:h,newTab:t[o].id},bubbles:!0,composed:!0}))}}updated(e){super.updated(e),this.variant==="segmented"&&(this._ensurePillObserver(),this._updateSegmentPill())}_ensurePillObserver(){var t;if(this._pillResizeObserver)return;const e=(t=this.shadowRoot)==null?void 0:t.querySelector(".tab__list");!e||typeof ResizeObserver=="undefined"||(this._pillResizeObserver=new ResizeObserver(()=>this._updateSegmentPill()),this._pillResizeObserver.observe(e))}_updateSegmentPill(){var u,h,g;const e=(u=this.shadowRoot)==null?void 0:u.querySelector(".tab__segment-pill"),t=(h=this.shadowRoot)==null?void 0:h.querySelector(".tab__button--active"),o=(g=this.shadowRoot)==null?void 0:g.querySelector(".tab__list");if(!e||!t||!o)return;const i=o.getBoundingClientRect(),s=t.getBoundingClientRect();if(s.width===0)return;const n=parseFloat(getComputedStyle(o).paddingLeft)||0,l=s.left-i.left-o.clientLeft-n+o.scrollLeft,c=s.width;this._pillInitialized?(e.style.transform=`translateX(${l}px)`,e.style.width=`${c}px`):(e.style.transition="none",e.style.transform=`translateX(${l}px)`,e.style.width=`${c}px`,requestAnimationFrame(()=>{e.style.transition=""}),this._pillInitialized=!0)}scrollTabIntoView(e){this.updateComplete.then(()=>{var o;const t=(o=this.shadowRoot)==null?void 0:o.querySelector(`[role="tab"][data-tab-id="${e}"]`);if(t&&this.tablist){const i=this.tablist.getBoundingClientRect(),s=t.getBoundingClientRect();s.left<i.left?this.tablist.scrollLeft-=i.left-s.left+16:s.right>i.right&&(this.tablist.scrollLeft+=s.right-i.right+16)}})}renderTabButton(e,t){const o=this.activeTab===e.id,i=this._focusedIndex===t,s=["tab__button",o?"tab__button--active":"",e.disabled?"tab__button--disabled":""].filter(Boolean).join(" "),n=["tab__label",o?"":"tab__label--inactive"].filter(Boolean).join(" "),l=["tab__description",o?"tab__description--active":""].filter(Boolean).join(" ");return p`
|
|
781
1804
|
<button
|
|
782
1805
|
role="tab"
|
|
783
|
-
class
|
|
784
|
-
data-tab-id
|
|
785
|
-
aria-selected
|
|
786
|
-
aria-controls="panel
|
|
787
|
-
tabindex
|
|
788
|
-
?disabled
|
|
789
|
-
@click
|
|
790
|
-
@focus
|
|
1806
|
+
class=${s}
|
|
1807
|
+
data-tab-id=${e.id}
|
|
1808
|
+
aria-selected=${o?"true":"false"}
|
|
1809
|
+
aria-controls="panel-${e.id}"
|
|
1810
|
+
tabindex=${o||i?"0":"-1"}
|
|
1811
|
+
?disabled=${e.disabled}
|
|
1812
|
+
@click=${()=>this.handleTabClick(e.id,e.disabled)}
|
|
1813
|
+
@focus=${()=>this.scrollTabIntoView(e.id)}
|
|
791
1814
|
>
|
|
792
|
-
|
|
1815
|
+
${e.icon?p`<i class="${e.icon} tab__icon"></i>`:b}
|
|
793
1816
|
<div class="tab__content">
|
|
794
|
-
<span class
|
|
795
|
-
|
|
1817
|
+
<span class=${n}>${e.label}</span>
|
|
1818
|
+
${e.description?p`<span class=${l}>${e.description}</span>`:b}
|
|
796
1819
|
</div>
|
|
797
1820
|
</button>
|
|
798
|
-
`
|
|
1821
|
+
`}renderTabPanel(e){const t=this.activeTab===e.id;if(!(!this.lazy||this._renderedTabs.has(e.id)))return b;const i=["tab__panel",t?"":"tab__panel--hidden"].filter(Boolean).join(" ");return p`
|
|
799
1822
|
<div
|
|
800
1823
|
role="tabpanel"
|
|
801
|
-
id="panel
|
|
802
|
-
aria-labelledby="tab
|
|
803
|
-
class
|
|
1824
|
+
id="panel-${e.id}"
|
|
1825
|
+
aria-labelledby="tab-${e.id}"
|
|
1826
|
+
class=${i}
|
|
804
1827
|
tabindex="0"
|
|
805
1828
|
>
|
|
806
|
-
<slot name
|
|
807
|
-
|
|
1829
|
+
<slot name=${`panel-${e.id}`}>
|
|
1830
|
+
${typeof e.content=="string"?p`${e.content}`:b}
|
|
808
1831
|
</slot>
|
|
809
1832
|
</div>
|
|
810
|
-
`
|
|
811
|
-
<div class="tab">
|
|
812
|
-
<div role="tablist" aria-label="Tabs" class="tab__list" @keydown
|
|
813
|
-
|
|
1833
|
+
`}render(){return p`
|
|
1834
|
+
<div class="tab tab--${this.variant}">
|
|
1835
|
+
<div role="tablist" aria-label="Tabs" class="tab__list" @keydown=${this.handleKeyDown}>
|
|
1836
|
+
${this.variant==="segmented"?p`<span class="tab__segment-pill" aria-hidden="true"></span>`:b}
|
|
1837
|
+
${this.tabs.map((e,t)=>this.renderTabButton(e,t))}
|
|
814
1838
|
</div>
|
|
815
|
-
<div class="tab__panels"
|
|
1839
|
+
<div class="tab__panels">${this.tabs.map(e=>this.renderTabPanel(e))}</div>
|
|
816
1840
|
</div>
|
|
817
|
-
`
|
|
818
|
-
|
|
819
|
-
`]
|
|
1841
|
+
`}},a.LogosphereTab.styles=[D`
|
|
1842
|
+
${A(Fn)}
|
|
1843
|
+
`],He([d({type:Array})],a.LogosphereTab.prototype,"tabs",2),He([d({type:String})],a.LogosphereTab.prototype,"activeTab",2),He([d({type:Boolean})],a.LogosphereTab.prototype,"lazy",2),He([d({type:String})],a.LogosphereTab.prototype,"variant",2),He([m()],a.LogosphereTab.prototype,"_focusedIndex",2),He([m()],a.LogosphereTab.prototype,"_renderedTabs",2),He([F('[role="tablist"]')],a.LogosphereTab.prototype,"tablist",2),a.LogosphereTab=He([M("logosphere-tab")],a.LogosphereTab),a.Modal=q,a.Pagination=W,a.ToastService=Vn,a.UiIcon=Ft,Object.defineProperty(a,Symbol.toStringTag,{value:"Module"})}));
|