lew-ui 1.0.21 → 1.0.24

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/lew.umd.ts CHANGED
@@ -1 +1 @@
1
- !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("vue")):"function"==typeof define&&define.amd?define(["exports","vue"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self)["lew-ui"]={},e.Vue)}(this,(function(e,t){"use strict";var i=(e,t)=>{const i=e.__vccOpts||e;for(const[n,o]of t)i[n]=o;return i};var n=i(t.defineComponent({__name:"LewFlex",props:{direction:{type:String,default:"row"},x:{type:String,default:"center"},y:{type:String,default:"center"},wrap:{type:Boolean,default:!1},mode:{type:String,default:""},gap:{type:String,default:"10px"},width:{type:String,default:""}},setup:e=>(i,n)=>(t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass(["lew-flex",`${e.direction?"lew-flex-"+e.direction:""} ${e.wrap?"lew-flex-wrap":""} ${e.x?"lew-flex-x-"+e.x:""} ${e.y?"lew-flex-y-"+e.y:""} ${e.mode?"lew-flex-mode-"+e.mode:""} \n `]),style:t.normalizeStyle(`gap: ${e.gap}; width:${e.width}`)},[t.renderSlot(i.$slots,"default",{},void 0,!0)],6))}),[["__scopeId","data-v-0a8a3e9b"],["__file","C:/Users/10570/Desktop/30secWorkSpace/Lew-UI/packages/components/flex/src/LewFlex.vue"]]);const o={class:"lew-space"};var s=i(t.defineComponent({__name:"LewSpace",props:{direction:{type:String,default:"row"}},setup:e=>(e,i)=>(t.openBlock(),t.createElementBlock("div",o,[t.renderSlot(e.$slots,"default")]))}),[["__file","C:/Users/10570/Desktop/30secWorkSpace/Lew-UI/packages/components/space/src/LewSpace.vue"]]);var a=i(t.defineComponent({__name:"LewLayout",props:{direction:{type:String,default:"row"},x:{type:String,default:"center"},y:{type:String,default:"center"},mode:{type:String,default:""}},setup:e=>(i,n)=>(t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass(["lew-flex",`${e.direction?"lew-flex-"+e.direction:""} ${e.x?"lew-flex-x-"+e.x:""} ${e.y?"lew-flex-y-"+e.y:""} ${e.mode?"lew-flex-mode-"+e.mode:""} `])},[t.renderSlot(i.$slots,"default",{},void 0,!0)],2))}),[["__scopeId","data-v-38cc287d"],["__file","C:/Users/10570/Desktop/30secWorkSpace/Lew-UI/packages/components/layout/src/LewLayout.vue"]]);function r(e){const i=document.createElement("div");i.id=e,document.body.appendChild(i),t.onUnmounted((()=>{document.body.removeChild(i)}))}let l;function c(){return t.onMounted((()=>{l=t.getCurrentInstance()})),{lewTo:e=>{var t;const i=null==(t=l.appContext.config)?void 0:t.globalProperties.$router;e&&(e&&e.startsWith("http")?window.open(e):i.push(e))}}}var d=i(t.defineComponent({__name:"LewMark",props:{type:{type:String,default:"normal"},round:{type:Boolean,default:!1},to:{type:String,default:""},bold:{type:Number,default:400}},setup(e){const{lewTo:i}=c();return(n,o)=>(t.openBlock(),t.createElementBlock("span",{class:t.normalizeClass(["lew-mark",`lew-mark-${e.type} ${e.round?"lew-mark-round":""} ${e.to?"lew-mark-to":""}`]),style:t.normalizeStyle(`font-weight:${e.bold};`),onClick:o[0]||(o[0]=n=>t.unref(i)(e.to))},[t.renderSlot(n.$slots,"default")],6))}}),[["__file","C:/Users/10570/Desktop/30secWorkSpace/Lew-UI/packages/components/mark/src/LewMark.vue"]]);const u={modelValue:{type:String,default:""},options:{type:Array,default:()=>[]},width:{type:String,default:""},itemWidth:{type:String,default:()=>""},round:{type:Boolean,default:!1},type:{type:String,default:"block"}};const h=["onClick"],p=t.defineComponent({__name:"LewTabs",props:u,emits:["change","update:modelValue"],setup(e,{emit:i}){const n=e;let o=t.ref(""),s=t.ref(n.modelValue),a=t.ref([]);t.watch((()=>n.modelValue),(()=>{s.value=n.modelValue,c(s.value)}));const r=()=>{let e=n.options.findIndex((e=>e.value==s.value));e<0&&(e=0),o.value=`width:${a.value[e].offsetWidth}px;transform: translateX(${a.value[e].offsetLeft}px);`};let l=n.options.findIndex((e=>s.value==e.value));const c=e=>{let t=n.options.findIndex((t=>e==t.value));if(l!=t){let e=n.options[t];s.value!=e.value&&(s.value=e.value);let r=a.value[t];o.value=`width:${r.offsetWidth}px;transform: translate(${r.offsetLeft}px);`,s.value!=n.modelValue&&(i("change",{label:e.label,value:e.value,activeIndex:t}),i("update:modelValue",s.value)),l=t}};let d;const u=()=>{clearTimeout(d),d=setTimeout((()=>{r()}),250)};return t.onMounted((()=>{""==n.modelValue&&(s.value=n.options[0].value),r(),window.addEventListener("resize",u,!1)})),t.onUnmounted((()=>{window.removeEventListener("resize",u)})),(e,i)=>(t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass(["lew-tabs",`\n ${e.type?"lew-tabs-"+e.type:""} \n ${e.round?"lew-tabs-round":""}\n `]),style:t.normalizeStyle(`width:${e.width}`)},[t.createElementVNode("div",{style:t.normalizeStyle(t.unref(o)),class:"lew-tabs-item-animation-active"},null,4),(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.options,((i,n)=>(t.openBlock(),t.createElementBlock("div",{key:i.value,ref_for:!0,ref:e=>t.unref(a).push(e),class:t.normalizeClass(["lew-tabs-item",{"lew-tabs-item-active":t.unref(s)==i.value}]),style:t.normalizeStyle(`width:${e.itemWidth}`),onClick:e=>c(i.value)},t.toDisplayString(i.label),15,h)))),128))],6))}});var m=i(p,[["__scopeId","data-v-6111b125"],["__file","C:/Users/10570/Desktop/30secWorkSpace/Lew-UI/packages/components/tabs/src/LewTabs.vue"]]);const f={class:"lew-breadcrumb"};var g=i(t.defineComponent({__name:"LewSteps",props:{},setup:e=>(e,i)=>(t.openBlock(),t.createElementBlock("div",f))}),[["__scopeId","data-v-5e4b1dfe"],["__file","C:/Users/10570/Desktop/30secWorkSpace/Lew-UI/packages/components/steps/src/LewSteps.vue"]]);const y=e=>(t.pushScopeId("data-v-5303b0ef"),e=e(),t.popScopeId(),e),v={class:"lew-breadcrumb"},b=["onClick"],w={key:0,class:"lew-breadcrumb-parting"},k={key:0,viewBox:"0 0 48 48",fill:"none",xmlns:"http://www.w3.org/2000/svg",stroke:"currentColor",class:"arco-icon arco-icon-oblique-line","stroke-width":"4","stroke-linecap":"butt","stroke-linejoin":"miter"},x=[y((()=>t.createElementVNode("path",{d:"M29.506 6.502 18.493 41.498"},null,-1)))],C={key:1,viewBox:"0 0 48 48",fill:"none",xmlns:"http://www.w3.org/2000/svg",stroke:"currentColor",class:"arco-icon arco-icon-right","stroke-width":"4","stroke-linecap":"butt","stroke-linejoin":"miter"},S=[y((()=>t.createElementVNode("path",{d:"m16 39.513 15.556-15.557L16 8.4"},null,-1)))];var E=i(t.defineComponent({__name:"LewBreadcrumb",props:{options:{type:Array,default:()=>[]},iconType:{type:String,default:()=>"sprit"}},setup(e){const{lewTo:i}=c();return(n,o)=>(t.openBlock(),t.createElementBlock("div",v,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.options,((n,o)=>(t.openBlock(),t.createElementBlock("div",{key:o,class:t.normalizeClass(["lew-breadcrumb-item",{"lew-breadcrumb-active":n.active}])},[t.createElementVNode("span",{class:t.normalizeClass({"lew-breadcrumb-isPath":!!n.to}),onClick:e=>t.unref(i)(n.to)},t.toDisplayString(n.label),11,b),o!=e.options.length-1?(t.openBlock(),t.createElementBlock("div",w,["sprit"==e.iconType?(t.openBlock(),t.createElementBlock("svg",k,x)):t.createCommentVNode("v-if",!0),"shoulder"==e.iconType?(t.openBlock(),t.createElementBlock("svg",C,S)):t.createCommentVNode("v-if",!0)])):t.createCommentVNode("v-if",!0)],2)))),128))]))}}),[["__scopeId","data-v-5303b0ef"],["__file","C:/Users/10570/Desktop/30secWorkSpace/Lew-UI/packages/components/breadcrumb/src/LewBreadcrumb.vue"]]);const T=["onClick"],L=t.defineComponent({__name:"LewDropdown",props:{options:{type:Array,default:()=>[],required:!0,validator:e=>e.length>=0},trigger:{type:String,default:"hover"},placement:{type:String,default:"bottom"},arrow:{type:Boolean,default:!0},width:{type:String,default:""},maxHeight:{type:String,default:"300px"},align:{type:String,default:"left"}},emits:["change"],setup(e,{expose:i,emit:n}){const o=e;let s=t.ref(),a=()=>{s.value.show()},r=()=>{s.value.hide()};i({show:a,hide:r});const l=t.computed((()=>Array.isArray(o.options)&&"[object Object]"!=Object.prototype.toString.call(o.options[0])?o.options.map((e=>({label:e,value:e}))):o.options));return(i,o)=>{const c=t.resolveComponent("lew-popover");return t.openBlock(),t.createBlock(c,{ref_key:"lewPopoverRef",ref:s,trigger:e.trigger,arrow:e.arrow,placement:e.placement},{trigger:t.withCtx((()=>[t.renderSlot(i.$slots,"default",{},void 0,!0)])),"popover-body":t.withCtx((()=>[t.unref(l).length>0?(t.openBlock(),t.createElementBlock("div",{key:0,class:"lew-dropdown-body",style:t.normalizeStyle(`width:${e.width};max-height:${e.maxHeight}`)},[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(t.unref(l),((i,o)=>(t.openBlock(),t.createElementBlock("div",{key:o,class:"lew-dropdown-option",style:t.normalizeStyle(`text-align:${e.align}`),onClick:e=>(e=>{n("change",{show:a,hide:r,value:e}),setTimeout((()=>{s.value.hide()}),80)})(i)},t.toDisplayString(i.label),13,T)))),128))],4)):t.createCommentVNode("v-if",!0)])),_:3},8,["trigger","arrow","placement"])}}});var $=i(L,[["__scopeId","data-v-9869e96a"],["__file","C:/Users/10570/Desktop/30secWorkSpace/Lew-UI/packages/components/dropdown/src/LewDropdown.vue"]]);const _={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 512 512"},A=[t.createElementVNode("path",{d:"M414 321.94L274.22 158.82a24 24 0 0 0-36.44 0L98 321.94c-13.34 15.57-2.28 39.62 18.22 39.62h279.6c20.5 0 31.56-24.05 18.18-39.62z",fill:"currentColor"},null,-1)];var N=t.defineComponent({name:"CaretUp",render:function(e,i){return t.openBlock(),t.createElementBlock("svg",_,A)}});const P={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 512 512"},B=[t.createElementVNode("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"48",d:"M328 112L184 256l144 144"},null,-1)];var M=t.defineComponent({name:"ChevronBack",render:function(e,i){return t.openBlock(),t.createElementBlock("svg",P,B)}});const V={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 512 512"},O=[t.createElementVNode("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"48",d:"M328 112L184 256l144 144"},null,-1)];var I=t.defineComponent({name:"ChevronBackOutline",render:function(e,i){return t.openBlock(),t.createElementBlock("svg",V,O)}});const z={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 512 512"},D=[t.createElementVNode("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"48",d:"M112 184l144 144l144-144"},null,-1)];var R=t.defineComponent({name:"ChevronDown",render:function(e,i){return t.openBlock(),t.createElementBlock("svg",z,D)}});const F={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 512 512"},j=[t.createElementVNode("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"48",d:"M184 112l144 144l-144 144"},null,-1)];var W=t.defineComponent({name:"ChevronForward",render:function(e,i){return t.openBlock(),t.createElementBlock("svg",F,j)}});const H={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 512 512"},U=[t.createElementVNode("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"48",d:"M184 112l144 144l-144 144"},null,-1)];var q=t.defineComponent({name:"ChevronForwardOutline",render:function(e,i){return t.openBlock(),t.createElementBlock("svg",H,U)}});const X={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 512 512"},Y=[t.createElementVNode("path",{d:"M448 256c0-106-86-192-192-192S64 150 64 256s86 192 192 192s192-86 192-192z",fill:"none",stroke:"currentColor","stroke-miterlimit":"10","stroke-width":"32"},null,-1),t.createElementVNode("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"32",d:"M320 320L192 192"},null,-1),t.createElementVNode("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"32",d:"M192 320l128-128"},null,-1)];var K=t.defineComponent({name:"CloseCircleOutline",render:function(e,i){return t.openBlock(),t.createElementBlock("svg",X,Y)}});const G={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 512 512"},Z=[t.createElementVNode("circle",{cx:"256",cy:"256",r:"48",fill:"currentColor"},null,-1),t.createElementVNode("circle",{cx:"416",cy:"256",r:"48",fill:"currentColor"},null,-1),t.createElementVNode("circle",{cx:"96",cy:"256",r:"48",fill:"currentColor"},null,-1)];var J=t.defineComponent({name:"EllipsisHorizontal",render:function(e,i){return t.openBlock(),t.createElementBlock("svg",G,Z)}});const Q={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 512 512"},ee=[t.createStaticVNode('<path d="M432 448a15.92 15.92 0 0 1-11.31-4.69l-352-352a16 16 0 0 1 22.62-22.62l352 352A16 16 0 0 1 432 448z" fill="currentColor"></path><path d="M255.66 384c-41.49 0-81.5-12.28-118.92-36.5c-34.07-22-64.74-53.51-88.7-91v-.08c19.94-28.57 41.78-52.73 65.24-72.21a2 2 0 0 0 .14-2.94L93.5 161.38a2 2 0 0 0-2.71-.12c-24.92 21-48.05 46.76-69.08 76.92a31.92 31.92 0 0 0-.64 35.54c26.41 41.33 60.4 76.14 98.28 100.65C162 402 207.9 416 255.66 416a239.13 239.13 0 0 0 75.8-12.58a2 2 0 0 0 .77-3.31l-21.58-21.58a4 4 0 0 0-3.83-1a204.8 204.8 0 0 1-51.16 6.47z" fill="currentColor"></path><path d="M490.84 238.6c-26.46-40.92-60.79-75.68-99.27-100.53C349 110.55 302 96 255.66 96a227.34 227.34 0 0 0-74.89 12.83a2 2 0 0 0-.75 3.31l21.55 21.55a4 4 0 0 0 3.88 1a192.82 192.82 0 0 1 50.21-6.69c40.69 0 80.58 12.43 118.55 37c34.71 22.4 65.74 53.88 89.76 91a.13.13 0 0 1 0 .16a310.72 310.72 0 0 1-64.12 72.73a2 2 0 0 0-.15 2.95l19.9 19.89a2 2 0 0 0 2.7.13a343.49 343.49 0 0 0 68.64-78.48a32.2 32.2 0 0 0-.1-34.78z" fill="currentColor"></path><path d="M256 160a95.88 95.88 0 0 0-21.37 2.4a2 2 0 0 0-1 3.38l112.59 112.56a2 2 0 0 0 3.38-1A96 96 0 0 0 256 160z" fill="currentColor"></path><path d="M165.78 233.66a2 2 0 0 0-3.38 1a96 96 0 0 0 115 115a2 2 0 0 0 1-3.38z" fill="currentColor"></path>',5)];var te=t.defineComponent({name:"EyeOffOutline",render:function(e,i){return t.openBlock(),t.createElementBlock("svg",Q,ee)}});const ie={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 512 512"},ne=[t.createElementVNode("path",{d:"M255.66 112c-77.94 0-157.89 45.11-220.83 135.33a16 16 0 0 0-.27 17.77C82.92 340.8 161.8 400 255.66 400c92.84 0 173.34-59.38 221.79-135.25a16.14 16.14 0 0 0 0-17.47C428.89 172.28 347.8 112 255.66 112z",fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"32"},null,-1),t.createElementVNode("circle",{cx:"256",cy:"256",r:"80",fill:"none",stroke:"currentColor","stroke-miterlimit":"10","stroke-width":"32"},null,-1)];var oe=t.defineComponent({name:"EyeOutline",render:function(e,i){return t.openBlock(),t.createElementBlock("svg",ie,ne)}});const se=/\s*,(?![^(]*\))\s*/g,ae=/\s+/g;function re(e){let t=[""];return e.forEach((e=>{(e=e&&e.trim())&&(t=e.includes("&")?function(e,t){const i=[];return t.split(se).forEach((t=>{let n=function(e){let t=0;for(let i=0;i<e.length;++i)"&"===e[i]&&++t;return t}(t);if(!n)return void e.forEach((e=>{i.push((e&&e+" ")+t)}));if(1===n)return void e.forEach((e=>{i.push(t.replace("&",e))}));let o=[t];for(;n--;){const t=[];o.forEach((i=>{e.forEach((e=>{t.push(i.replace("&",e))}))})),o=t}o.forEach((e=>i.push(e)))})),i}(t,e):function(e,t){const i=[];return t.split(se).forEach((t=>{e.forEach((e=>{i.push((e&&e+" ")+t)}))})),i}(t,e))})),t.join(", ").replace(ae," ")}const le=/[A-Z]/g;function ce(e){return e.replace(le,(e=>"-"+e.toLowerCase()))}function de(e,t,i,n){if(!t)return"";const o=function(e,t,i){return"function"==typeof e?e({context:t.context,props:i}):e}(t,i,n);if(!o)return"";if("string"==typeof o)return`${e} {\n${o}\n}`;const s=Object.keys(o);if(0===s.length)return i.config.keepEmptyBlock?e+" {\n}":"";const a=e?[e+" {"]:[];return s.forEach((e=>{const t=o[e];"raw"!==e?(e=ce(e),null!=t&&a.push(` ${e}${function(e,t=" "){return"object"==typeof e&&null!==e?" {\n"+Object.entries(e).map((e=>t+` ${ce(e[0])}: ${e[1]};`)).join("\n")+"\n"+t+"}":`: ${e};`}(t)}`)):a.push("\n"+t+"\n")})),e&&a.push("}"),a.join("\n")}function ue(e,t,i){e&&e.forEach((e=>{if(Array.isArray(e))ue(e,t,i);else if("function"==typeof e){const n=e(t);Array.isArray(n)?ue(n,t,i):n&&i(n)}else e&&i(e)}))}function he(e,t,i,n,o,s){const a=e.$;a&&"string"!=typeof a?"function"==typeof a?t.push(a({context:n.context,props:o})):(a.before&&a.before(n.context),a.$&&"string"!=typeof a.$?a.$&&t.push(a.$({context:n.context,props:o})):t.push(a.$)):t.push(a);const r=re(t),l=de(r,e.props,n,o);s&&l&&s.insertRule(l),!s&&l.length&&i.push(l),e.children&&ue(e.children,{context:n.context,props:o},(e=>{if("string"==typeof e){const t=de(r,{raw:e},n,o);s?s.insertRule(t):i.push(t)}else he(e,t,i,n,o,s)})),t.pop(),a&&a.after&&a.after(n.context)}function pe(e,t,i,n=!1){const o=[];return he(e,[],o,t,i,n?e.instance.__styleSheet:void 0),n?"":o.join("\n\n")}function me(e){if(!e)return;const t=e.parentElement;t&&t.removeChild(e)}function fe(e){return document.querySelector(`style[cssr-id="${e}"]`)}function ge(e){const t=e.getAttribute("mount-count");return null===t?null:Number(t)}function ye(e,t){e.setAttribute("mount-count",String(t))}function ve(e,t,i,n){const{els:o}=t;if(void 0===i)o.forEach(me),t.els=[];else{const e=fe(i);if(e&&o.includes(e)){const i=ge(e);n?null===i||(i<=1?(me(e),t.els=o.filter((t=>t!==e))):ye(e,i-1)):null!==i||(me(e),t.els=o.filter((t=>t!==e)))}}}function be(e,t,i,n,o,s,a,r,l){if(a&&!l){if(void 0===i)return;const o=window.__cssrContext;return void(o[i]||(o[i]=!0,pe(t,e,n,a)))}let c;const{els:d}=t;let u;if(void 0===i&&(u=t.render(n),i=function(e){for(var t,i=0,n=0,o=e.length;o>=4;++n,o-=4)t=1540483477*(65535&(t=255&e.charCodeAt(n)|(255&e.charCodeAt(++n))<<8|(255&e.charCodeAt(++n))<<16|(255&e.charCodeAt(++n))<<24))+(59797*(t>>>16)<<16),i=1540483477*(65535&(t^=t>>>24))+(59797*(t>>>16)<<16)^1540483477*(65535&i)+(59797*(i>>>16)<<16);switch(o){case 3:i^=(255&e.charCodeAt(n+2))<<16;case 2:i^=(255&e.charCodeAt(n+1))<<8;case 1:i=1540483477*(65535&(i^=255&e.charCodeAt(n)))+(59797*(i>>>16)<<16)}return(((i=1540483477*(65535&(i^=i>>>13))+(59797*(i>>>16)<<16))^i>>>15)>>>0).toString(36)}(u)),l)return void l(i,null!=u?u:t.render(n));const h=fe(i);if(r||null===h){if(c=null===h?function(e){const t=document.createElement("style");return t.setAttribute("cssr-id",e),t}(i):h,void 0===u&&(u=t.render(n)),c.textContent=u,null!==h)return;if(o){const e=document.head.getElementsByTagName("style")[0]||null;document.head.insertBefore(c,e)}else document.head.appendChild(c);s&&ye(c,1),function(e,t){e.push(t)}(d,c)}else{const e=ge(h);s&&(null===e||ye(h,e+1))}return null!=h?h:c}function we(e){return pe(this,this.instance,e)}function ke(e={}){const{target:t,id:i,ssr:n,props:o,count:s=!1,head:a=!1,boost:r=!1,force:l=!1}=e;return be(this.instance,this,null!=i?i:t,o,a,s,r,l,n)}function xe(e={}){const{id:t,target:i,delay:n=0,count:o=!1}=e;0===n?ve(this.instance,this,null!=t?t:i,o):setTimeout((()=>ve(this.instance,this,null!=t?t:i,o)),n)}window&&(window.__cssrContext={});const Ce=function(e,t,i,n){return{instance:e,$:t,props:i,children:n,els:[],render:we,mount:ke,unmount:xe}};const{c:Se}=function(e={}){let t=null;const i={c:(...e)=>function(e,t,i,n){return Array.isArray(t)?Ce(e,{$:null},null,t):Array.isArray(i)?Ce(e,t,null,i):Array.isArray(n)?Ce(e,t,i,n):Ce(e,t,i,null)}(i,...e),use:(e,...t)=>e.install(i,...t),find:fe,context:{},config:e,get __styleSheet(){if(!t){const e=document.createElement("style");return document.head.appendChild(e),t=document.styleSheets[document.styleSheets.length-1],t}return t}};return i}(),Ee=Se(".xicon",{width:"1em",height:"1em",display:"inline-flex"},[Se("svg",{width:"1em",height:"1em"}),Se("svg:not([fill])",{fill:"currentColor"})]),Te={size:[String,Number],color:String,tag:String},Le=Symbol("IconConfigInjection");t.defineComponent({name:"IconConfigProvider",props:Te,setup:(e,{slots:i})=>(t.provide(Le,e),()=>t.renderSlot(i,"default"))});const $e=t.defineComponent({name:"Icon",props:Te,setup(e,{slots:i}){const n=t.inject(Le,null),o=t.computed((()=>{var t;const i=null!==(t=e.size)&&void 0!==t?t:null==n?void 0:n.size;if(void 0!==i)return"number"==typeof i||/^\d+$/.test(i)?`${i}px`:i})),s=t.computed((()=>{const{color:t}=e;return void 0===t?n?n.color:void 0:t})),a=t.computed((()=>{var t;const{tag:i}=e;return void 0===i?null!==(t=null==n?void 0:n.tag)&&void 0!==t?t:"span":i}));return t.onBeforeMount((()=>{Ee.mount({id:"xicons-icon"})})),()=>t.h(a.value,{class:"xicon",style:{color:s.value,fontSize:o.value}},[t.renderSlot(i,"default")])}}),_e={type:{type:String,default:""},modelValue:{type:[Number,String],default:""},size:{type:String,default:"medium"},align:{type:String,default:"left"},disabled:{type:Boolean,default:!1},clearable:{type:Boolean,default:!1},placeholder:{type:String,default:"请输入"},readonly:{type:Boolean,default:!1},showPassword:{type:Boolean,default:!1},resize:{type:String,default:"none"},autoWidth:{type:Boolean,default:!1},maxLength:{type:Number,default:null},showCount:{type:Boolean,default:!1},niceCount:{type:Boolean,default:!1}};const Ae=["disabled","readonly","placeholder"],Ne=["disabled","placeholder","type","readonly"],Pe={key:2,class:"input-auto-width"},Be={key:0,class:"lew-input-show-count"},Me={key:1,class:"lew-input-show-password"},Ve={key:2,class:"lew-input-clear"};var Oe=i(t.defineComponent({__name:"LewInput",props:_e,emits:["update:modelValue","clear","blur","focus","change","input"],setup(e,{emit:i}){const n=e,o=t.ref(n.modelValue);t.watch((()=>n.modelValue),(()=>{o.value=n.modelValue}));const s=()=>{if(n.maxLength)for(let e=0;e<=o.value.length-1;e++)d(o.value.slice(0,e))>=n.maxLength&&(o.value=o.value.slice(0,e));i("update:modelValue",o.value),i("input",o.value)},a=()=>{i("clear",o.value),o.value="",i("update:modelValue",o.value)};let r=t.ref(n.type);const l=()=>{"text"==r.value?r.value="password":r.value="text"};let c=t.computed((()=>n.showCount&&n.maxLength?d(o.value)+" / "+n.maxLength:!!n.showCount&&d(o.value)));const d=e=>{if(n.niceCount){let t=0;for(let i=0;i<=e.length-1;i++){let n=e.charCodeAt(i);t+=n>=0&&n<=128?1:2}return Math.trunc(t)}return e.length};return(e,n)=>(t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass(["lew-input-view",`\n lew-input-view-${e.size} \n ${"textarea"==t.unref(r)?"lew-input-view-textarea":""}\n ${e.readonly?"lew-input-view-readonly":""} \n ${e.disabled?"lew-input-view-disabled":""}\n ${e.align?"lew-input-view-align-"+e.align:""}\n ${e.autoWidth?"lew-input-view-auto-width":""}\n `])},["textarea"==t.unref(r)?t.withDirectives((t.openBlock(),t.createElementBlock("textarea",{key:0,"onUpdate:modelValue":n[0]||(n[0]=e=>o.value=e),class:t.normalizeClass(["btf-scrollbar",`lew-textarea-resize-${e.resize}`]),rows:"3",cols:"3",disabled:e.disabled,readonly:e.readonly,placeholder:e.placeholder,onInput:s,onChange:n[1]||(n[1]=e=>i("change",o.value)),onBlur:n[2]||(n[2]=e=>i("blur",o.value)),onFocus:n[3]||(n[3]=e=>i("focus",o.value))},null,42,Ae)),[[t.vModelText,o.value]]):t.withDirectives((t.openBlock(),t.createElementBlock("input",{key:1,"onUpdate:modelValue":n[4]||(n[4]=e=>o.value=e),disabled:e.disabled,placeholder:e.placeholder,type:t.unref(r),readonly:e.readonly,onkeypress:"if(window.event.keyCode==13) this.blur()",onInput:s,onChange:n[5]||(n[5]=e=>i("change",o.value)),onBlur:n[6]||(n[6]=e=>i("blur",o.value)),onFocus:n[7]||(n[7]=e=>i("focus",o.value))},null,40,Ne)),[[t.vModelDynamic,o.value]]),e.autoWidth?(t.openBlock(),t.createElementBlock("label",Pe,t.toDisplayString(o.value),1)):t.createCommentVNode("v-if",!0),e.showPassword||e.clearable||e.showCount?(t.openBlock(),t.createElementBlock("div",{key:3,class:t.normalizeClass(["lew-input-controls",{"lew-input-controls-show":o.value&&e.showPassword||o.value&&e.clearable||e.showCount&&!e.clearable&&!e.showPassword||e.showCount&&e.maxLength}])},[t.unref(c)?(t.openBlock(),t.createElementBlock("div",Be,t.toDisplayString(t.unref(c)),1)):t.createCommentVNode("v-if",!0),e.showPassword?(t.openBlock(),t.createElementBlock("div",Me,[t.createVNode(t.unref($e),{class:"eye-icon-view",size:"18",onMousedown:n[8]||(n[8]=t.withModifiers((()=>{}),["prevent"])),onClick:l},{default:t.withCtx((()=>[t.withDirectives(t.createVNode(t.unref(oe),null,null,512),[[t.vShow,"text"==t.unref(r)]]),t.withDirectives(t.createVNode(t.unref(te),null,null,512),[[t.vShow,"password"==t.unref(r)]])])),_:1})])):t.createCommentVNode("v-if",!0),e.clearable?(t.openBlock(),t.createElementBlock("div",Ve,[t.createVNode(t.unref($e),{class:"close-icon-view",size:"18",onMousedown:n[9]||(n[9]=t.withModifiers((()=>{}),["prevent"])),onClick:a},{default:t.withCtx((()=>[t.createVNode(t.unref(K))])),_:1})])):t.createCommentVNode("v-if",!0)],2)):t.createCommentVNode("v-if",!0)],2))}}),[["__scopeId","data-v-156ce1e1"],["__file","C:/Users/10570/Desktop/30secWorkSpace/Lew-UI/packages/components/input/src/LewInput.vue"]]);const Ie={type:{type:String,default:""},modelValue:{type:[Number,String],default:""},autoWidth:{type:Boolean,default:!1},options:{type:Array,default:()=>[]},align:{type:String,default:"left"},disabled:{type:Boolean,default:!1},clearable:{type:Boolean,default:!1},placeholder:{type:String,default:"请输入"},readonly:{type:Boolean,default:!1},showPassword:{type:Boolean,default:!1},maxLength:{type:Number,default:null},showCount:{type:Boolean,default:!1},niceCount:{type:Boolean,default:!1},size:{type:String,default:"medium"},popoverWidth:{type:String,default:"auto"},trigger:{type:String,default:"click"},placement:{type:String,default:"bottom-start"},arrow:{type:Boolean,default:!0}};const ze={class:"lew-input-pro"},De=t.defineComponent({__name:"LewInputPro",props:Ie,emits:["update:modelValue","clear","blur","focus","change","input"],setup(e,{emit:i}){const n=e,o=t.ref(n.modelValue);t.watch((()=>n.modelValue),(()=>{o.value=n.modelValue}));let s=t.ref(),a=t.ref();const r=e=>{i("update:modelValue",e),i("input",e)},l=()=>{i("clear",o.value),o.value="",i("update:modelValue",o.value)},c=e=>{o.value=e.value.value,i("update:modelValue",o.value),i("input",o.value),i("change",o.value),setTimeout((()=>{d()}),120)},d=()=>{s.value.hide()};return(e,u)=>{const h=t.resolveComponent("lew-input"),p=t.resolveComponent("lew-dropdown");return t.openBlock(),t.createElementBlock("div",ze,[t.renderSlot(e.$slots,"left",{},void 0,!0),t.createVNode(p,{ref_key:"lewDropdownRef",ref:s,style:{width:"100%"},trigger:e.trigger,arrow:e.arrow,placement:e.placement,align:e.align,width:parseFloat(e.popoverWidth)-12+"px",options:e.options,onChange:c},{default:t.withCtx((()=>[t.createVNode(h,{ref_key:"lewInputProRef",ref:a,modelValue:o.value,"onUpdate:modelValue":u[0]||(u[0]=e=>o.value=e),type:e.type,autoWidth:e.autoWidth,size:e.size,align:e.align,placeholder:e.placeholder,clearable:e.clearable,onClick:u[1]||(u[1]=t.withModifiers((()=>{}),["stop"])),onInput:r,onChange:u[2]||(u[2]=e=>i("change",o.value)),onBlur:u[3]||(u[3]=e=>(i("blur",o.value),void setTimeout((()=>{d()}),120))),onFocus:u[4]||(u[4]=e=>(0!=n.options.length&&s.value.show(),i("focus",o.value))),onClear:l},null,8,["modelValue","type","autoWidth","size","align","placeholder","clearable"])])),_:1},8,["trigger","arrow","placement","align","width","options"]),t.renderSlot(e.$slots,"right",{},void 0,!0)])}}});var Re=i(De,[["__scopeId","data-v-1e1e8f9c"],["__file","C:/Users/10570/Desktop/30secWorkSpace/Lew-UI/packages/components/input-pro/src/LewInputPro.vue"]]);const Fe={class:"title-label"};var je=i(t.defineComponent({__name:"LewFormItem",props:{title:{type:String,default:"标题"},direction:{type:String,default:"x"}},setup(e){const i=e;return(n,o)=>(t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass(["lew-form-item",`lew-form-item-${e.direction}`])},[t.createElementVNode("label",Fe,t.toDisplayString(i.title),1),t.renderSlot(n.$slots,"default",{},void 0,!0)],2))}}),[["__scopeId","data-v-441b5c62"],["__file","C:/Users/10570/Desktop/30secWorkSpace/Lew-UI/packages/components/form-item/src/LewFormItem.vue"]]);const We={key:0,class:"icon-checkbox-box"},He=[(e=>(t.pushScopeId("data-v-5594c4af"),e=e(),t.popScopeId(),e))((()=>t.createElementVNode("svg",{class:"icon-checkbox",viewBox:"0 0 24 24",width:"24",height:"24",stroke:"currentColor","stroke-width":"4",fill:"none","stroke-linecap":"round","stroke-linejoin":"round"},[t.createElementVNode("polyline",{points:"20 6 9 17 4 12"})],-1)))],Ue=["checked"],qe={key:1,class:"lew-checkbox-label"},Xe=t.defineComponent({__name:"LewCheckbox",props:{label:{type:String,default:()=>""},block:{type:Boolean,default:()=>!1},round:{type:Boolean,default:()=>!1},iconable:{type:Boolean,default:!0},checked:{type:Boolean,default:()=>!1}},emits:["change"],setup(e,{emit:i}){const n=e;t.watch((()=>n.checked),(e=>{e!=o.value&&(o.value=e)}));let o=t.ref(n.checked||!1);const s=e=>{o.value=e.target.checked,i("change",o.value)};return(i,n)=>(t.openBlock(),t.createElementBlock("label",{class:t.normalizeClass(["lew-checkbox",`${e.block?"lew-checkbox-block":""} ${e.round?"lew-checkbox-round":""} ${t.unref(o)?"lew-checkbox-checked":""} \n ${e.iconable?"":"lew-checkbox-unicon"}\n `])},[e.iconable?(t.openBlock(),t.createElementBlock("div",We,He)):t.createCommentVNode("v-if",!0),t.withDirectives(t.createElementVNode("input",{type:"checkbox",checked:t.unref(o),onInput:s},null,40,Ue),[[t.vShow,!1]]),e.label?(t.openBlock(),t.createElementBlock("span",qe,t.toDisplayString(e.label),1)):t.createCommentVNode("v-if",!0)],2))}});var Ye=i(Xe,[["__scopeId","data-v-5594c4af"],["__file","C:/Users/10570/Desktop/30secWorkSpace/Lew-UI/packages/components/checkbox/src/LewCheckbox.vue"]]);var Ke=i(t.defineComponent({__name:"LewCheckboxGroup",props:{modelValue:{type:Array,default:()=>[],required:!0},block:{type:Boolean,default:()=>!1},round:{type:Boolean,default:()=>!1},direction:{type:String,default:"x"},iconable:{type:Boolean,default:!0},options:{type:Array,default:()=>[],required:!0,validator:e=>{const t=e.every((e=>Object.keys(e).includes("name"))),i=e.every((e=>Object.keys(e).includes("id")));return t&&i}}},emits:["update:modelValue"],setup(e,{emit:i}){const n=e;return(o,s)=>{const a=t.resolveComponent("lew-flex");return t.openBlock(),t.createBlock(a,{x:"start",gap:"15px",class:t.normalizeClass(["lew-checkbox-group",`lew-checkbox-group-${e.direction}`])},{default:t.withCtx((()=>[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.options,(o=>{return t.openBlock(),t.createBlock(Ye,{key:o.id,block:e.block,iconable:e.iconable,round:e.round,label:o.name,checked:(s=o.id,s=Number(s),n.modelValue.includes(s)),onChange:e=>((e,t)=>{let o=[...n.modelValue];e=Number(e),t?o.push(e):o.splice(o.indexOf(e),1),i("update:modelValue",o)})(o.id,e)},null,8,["block","iconable","round","label","checked","onChange"]);var s})),128))])),_:1},8,["class"])}}}),[["__scopeId","data-v-66b915c0"],["__file","C:/Users/10570/Desktop/30secWorkSpace/Lew-UI/packages/components/checkbox/src/LewCheckboxGroup.vue"]]);const Ge={key:0,class:"icon-radio-box"},Ze=[(e=>(t.pushScopeId("data-v-365d2981"),e=e(),t.popScopeId(),e))((()=>t.createElementVNode("div",{class:"icon-radio"},null,-1)))],Je=["checked"],Qe={key:1,class:"lew-radio-label"};var et=i(t.defineComponent({__name:"LewRadio",props:{label:{type:String,required:!0},block:{type:Boolean,default:()=>!1},iconable:{type:Boolean,default:!0},checked:{type:Boolean}},emits:["update:checked"],setup(e,{emit:i}){const n=()=>{i("update:checked")};return(i,o)=>(t.openBlock(),t.createElementBlock("label",{class:t.normalizeClass(["lew-radio",`\n ${e.block?"lew-radio-block":""} \n ${e.checked?"lew-radio-checked":""} \n ${e.iconable?"":"lew-radio-unicon"}`])},[e.iconable?(t.openBlock(),t.createElementBlock("div",Ge,Ze)):t.createCommentVNode("v-if",!0),t.withDirectives(t.createElementVNode("input",{type:"radio",checked:e.checked,onInput:n},null,40,Je),[[t.vShow,!1]]),e.label?(t.openBlock(),t.createElementBlock("span",Qe,t.toDisplayString(e.label),1)):t.createCommentVNode("v-if",!0)],2))}}),[["__scopeId","data-v-365d2981"],["__file","C:/Users/10570/Desktop/30secWorkSpace/Lew-UI/packages/components/radio/src/LewRadio.vue"]]);var tt=i(t.defineComponent({__name:"LewRadioboxGroup",props:{modelValue:{type:Number,default:()=>0,required:!0},block:{type:Boolean,default:()=>!1},iconable:{type:Boolean,default:!0},direction:{type:String,default:"x"},options:{type:Array,default:()=>[],required:!0,validator:e=>{const t=e.every((e=>Object.keys(e).includes("name"))),i=e.every((e=>Object.keys(e).includes("id")));return t&&i}}},emits:["update:modelValue"],setup:(e,{emit:i})=>(n,o)=>{const s=t.resolveComponent("lew-flex");return t.openBlock(),t.createBlock(s,{x:"start",gap:"15px",class:t.normalizeClass(["lew-radio-group",`lew-radio-group-${e.direction}`])},{default:t.withCtx((()=>[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.options,(n=>(t.openBlock(),t.createBlock(et,{key:n.id,block:e.block,iconable:e.iconable,label:n.name,checked:e.modelValue==n.id,"onUpdate:checked":e=>{return t=n.id,void i("update:modelValue",Number(t));var t}},null,8,["block","iconable","label","checked","onUpdate:checked"])))),128))])),_:1},8,["class"])}}),[["__scopeId","data-v-304dc5f5"],["__file","C:/Users/10570/Desktop/30secWorkSpace/Lew-UI/packages/components/radio/src/LewRadioboxGroup.vue"]]);const it={modelValue:{type:[String,Array],required:!0},options:{type:Array,default:()=>[],required:!0,validator:e=>e.length>0},placement:{type:String,default:"bottom-start"},trigger:{type:String,default:"click",validator:e=>["click","hover"].includes(e)},multiple:{type:Boolean,default:!1},size:{type:String,default:"medium"}};const nt={key:0,class:"lew-select-placeholder"},ot={class:"lew-select-label-multiple"},st={style:{"margin-left":"5px"},class:"lew-isSelect-label-num"},at={class:"options-box"},rt=["onClick"],lt={class:"lew-selcet-label"},ct=t.defineComponent({__name:"LewSelect",props:it,emits:["update:modelValue","change"],setup(e,{expose:i,emit:n}){const o=e,s=t.ref(""),a=t.ref([]),r=t.ref(""),l=t.ref([]);t.watch((()=>o.modelValue),(()=>{o.multiple?(a.value=o.modelValue,l.value=d(o.modelValue,o.options)):(s.value=o.modelValue,r.value=d([o.modelValue],o.options)[0]||"")}),{deep:!0});let c=t.ref();t.onMounted((()=>{o.multiple?l.value=d(o.modelValue,o.options):r.value=d([o.modelValue],o.options)[0]||""}));const d=(e,t)=>{let i=[];return e&&t&&e.map((e=>{t.map((t=>{e==t.value&&i.push(t.label)}))})),i};let u=t.ref(!1),h=t.ref(),p=t.ref();const m=e=>{a.value.splice(e,1),l.value.splice(e,1),n("update:modelValue",a.value),n("change",{value:a.value,show:g,hide:y}),0==e&&0==a.value.length&&p.value.hide()},f=t.computed((()=>{var e;return(null==(e=c.value)?void 0:e.offsetWidth)-12+"px"})),g=()=>{h.value.show()},y=()=>{h.value.hide()};return i({show:g,hide:y}),(e,i)=>{const d=t.resolveComponent("lew-tag"),g=t.resolveComponent("lew-flex");return t.openBlock(),t.createBlock(t.unref(Go),{ref_key:"lewPopverRef1",ref:h,class:t.normalizeClass(["lew-select-view",{"lew-select-foucs":t.unref(u)}]),trigger:e.trigger,placement:e.placement,arrow:!1,style:{width:"100%"},onOnShow:i[1]||(i[1]=e=>t.isRef(u)?u.value=!0:u=!0),onOnHide:i[2]||(i[2]=e=>t.isRef(u)?u.value=!1:u=!1)},{trigger:t.withCtx((()=>[t.createElementVNode("div",{ref_key:"lewSelectRef",ref:c,class:t.normalizeClass(["lew-select",`lew-select-${e.size}`])},[t.createVNode(t.unref($e),{size:"16px",class:"lew-select-icon"},{default:t.withCtx((()=>[t.createVNode(t.unref(R))])),_:1}),!e.multiple&&0==r.value.length||e.multiple&&0==l.value.length?(t.openBlock(),t.createElementBlock("div",nt," 请选择 ")):t.createCommentVNode("v-if",!0),t.createCommentVNode(" 单选 "),t.withDirectives(t.createElementVNode("div",{class:"lew-select-label-single"},t.toDisplayString(r.value),513),[[t.vShow,!e.multiple]]),t.createCommentVNode(" 多选 "),t.withDirectives(t.createElementVNode("div",ot,[t.withDirectives(t.createVNode(d,{type:"primary",size:e.size,closable:"",onClose:i[0]||(i[0]=e=>m(0))},{default:t.withCtx((()=>[t.createTextVNode(t.toDisplayString(l.value[0]),1)])),_:1},8,["size"]),[[t.vShow,l.value.length>0]]),t.withDirectives(t.createVNode(t.unref(Go),{ref_key:"lewPopverRef2",ref:p,trigger:"hover",placement:"top"},{trigger:t.withCtx((()=>[t.createElementVNode("div",st,[t.withDirectives(t.createVNode(d,{size:e.size,type:"primary"},{default:t.withCtx((()=>[t.createTextVNode(" +"+t.toDisplayString(l.value.length-1),1)])),_:1},8,["size"]),[[t.vShow,l.value.length>1]])])])),"popover-body":t.withCtx((()=>[t.createVNode(g,{wrap:"",gap:"5px",x:"start",class:"lew-isSelect-label-box"},{default:t.withCtx((()=>[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(l.value,((i,n)=>(t.openBlock(),t.createBlock(d,{key:`multipleLabelStr${n}`,type:"primary",closable:"",size:e.size,onClose:e=>m(n)},{default:t.withCtx((()=>[t.createTextVNode(t.toDisplayString(i),1)])),_:2},1032,["size","onClose"])))),128))])),_:1})])),_:1},512),[[t.vShow,l.value.length>1]])],512),[[t.vShow,e.multiple]])],2)])),"popover-body":t.withCtx((()=>[t.createElementVNode("div",{class:t.normalizeClass(["lew-select-body",{"lew-select-multiple-body":e.multiple}]),style:t.normalizeStyle(`width:${t.unref(f)}`)},[t.createElementVNode("div",at,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.options,(i=>(t.openBlock(),t.createElementBlock("div",{key:i.value,class:t.normalizeClass(["item",{"lew-select-checked":e.multiple?a.value.includes(i.value):s.value==i.value}]),onClick:e=>(e=>{if(o.multiple){let t=a.value.indexOf(e.value);t>=0?(l.value.splice(t,1),a.value.splice(t,1)):(l.value.push(e.label),a.value.push(e.value)),n("update:modelValue",a.value),n("change",a.value)}else s.value==e.value?(r.value="",s.value=""):(r.value=e.label,s.value=e.value),setTimeout((()=>{y()}),150),n("update:modelValue",s.value),n("change",s.value)})(i)},[e.multiple?(t.openBlock(),t.createBlock(t.unref(Ye),{key:0,class:"lew-selcet-checkbox",label:"",checked:a.value.includes(i.value)},null,8,["checked"])):t.createCommentVNode("v-if",!0),t.createElementVNode("div",lt,t.toDisplayString(i.label),1)],10,rt)))),128))])],6)])),_:1},8,["class","trigger","placement"])}}});var dt=i(ct,[["__scopeId","data-v-326752a1"],["__file","C:/Users/10570/Desktop/30secWorkSpace/Lew-UI/packages/components/select/src/LewSelect.vue"]]);const ut=["disabled"];var ht=i(t.defineComponent({__name:"LewSwitch",props:{modelValue:{type:Boolean,default:()=>!1},round:{type:Boolean,default:!0},disabled:{type:Boolean,default:!1}},emits:["update:modelValue"],setup(e,{emit:i}){const n=e,o=t.ref(n.modelValue);t.watch((()=>n.modelValue),(()=>{o.value=n.modelValue}));const s=()=>{i("update:modelValue",o.value)};return(i,a)=>t.withDirectives((t.openBlock(),t.createElementBlock("input",{"onUpdate:modelValue":a[0]||(a[0]=e=>o.value=e),class:t.normalizeClass({round:e.round}),type:"checkbox",disabled:n.disabled,onChange:s},null,42,ut)),[[t.vModelCheckbox,o.value]])}}),[["__scopeId","data-v-3d4d5d11"],["__file","C:/Users/10570/Desktop/30secWorkSpace/Lew-UI/packages/components/switch/src/LewSwitch.vue"]]);const pt=["一","二","三","四","五","六","日"],mt=(e,t)=>{const i=[];if(!e&&!t){const i=new Date;e=i.getFullYear(),t=i.getMonth()+1}const n=new Date(e,t-1,1);let o=n.getDay();0===o&&(o=7),e=n.getFullYear(),t=n.getMonth()+1;const s=new Date(e,t-1,0).getDate(),a=o-1,r=new Date(e,t,0).getDate();for(let l=0;l<42;l++){const e=l+1-a;let n=e,o=t;e<=0?(o=t-1,n=s+e):e>r&&(o=t+1,n-=r),13===o&&(o=1),0===o&&(o=12),i.push({date:e,month:o,showDate:n})}return i},ft={modelValue:{type:String,required:!0},multiple:{type:Boolean,default:!1},autoClose:{type:Boolean,default:!1}},gt={modelValue:{type:String,required:!0},multiple:{type:Boolean,default:!1}};const yt={class:"lew-date"},vt={class:"cur-date"},bt={class:"lew-date-control-right"},wt={class:"lew-date-box"},kt={class:"lew-date-num"},xt=["onClick"],Ct={class:"lew-date-num"};var St=i(t.defineComponent({__name:"LewDate",props:gt,emits:["change","update:modelValue"],setup(e,{emit:i}){var n;const o=e;let s=t.ref(o.modelValue),a=null==(n=s.value)?void 0:n.split("-"),r=new Date,l=t.ref(r.getFullYear()),c=t.ref(r.getMonth()+1),d=t.ref(r.getDate()),u=t.ref(parseInt(a[0])||r.getFullYear()),h=t.ref(parseInt(a[1])||r.getMonth()+1),p=t.ref(mt());const m=()=>{h.value>1?h.value-=1:(u.value-=1,h.value=12),p.value=mt(u.value,h.value)},f=()=>{h.value<12?h.value+=1:(u.value+=1,h.value=1),p.value=mt(u.value,h.value)},g=e=>e<10?"0"+e:e,y=t.computed((()=>e=>{if(e.date>0&&e.date<=e.showDate){let t=`${u.value}-${g(h.value)}-${g(e.showDate)}`;return s.value==t}}));return(e,n)=>{const o=t.resolveComponent("lew-button"),a=t.resolveComponent("lew-flex");return t.openBlock(),t.createElementBlock("div",yt,[t.createVNode(a,{x:"start",mode:"between",class:"lew-date-control"},{default:t.withCtx((()=>[t.createElementVNode("div",vt,t.toDisplayString(t.unref(u))+" / "+t.toDisplayString(g(t.unref(h))),1),t.createElementVNode("div",bt,[t.createVNode(o,{type:"normal",size:"small",onClick:m},{default:t.withCtx((()=>[t.createVNode(t.unref(M))])),_:1}),t.createVNode(o,{type:"normal",size:"small",onClick:f},{default:t.withCtx((()=>[t.createVNode(t.unref(W))])),_:1})])])),_:1}),t.createElementVNode("div",wt,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(t.unref(pt),((e,i)=>(t.openBlock(),t.createElementBlock("div",{key:`h${i}`,class:"lew-date-item"},[t.createElementVNode("div",kt,t.toDisplayString(e),1)])))),128)),(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(t.unref(p),((e,n)=>(t.openBlock(),t.createElementBlock("div",{key:`d${n}`,class:t.normalizeClass(["lew-date-item",{"lew-date-item-e":e.date>0&&e.date<=e.showDate,"lew-date-item-cur":t.unref(d)==e.showDate&&t.unref(l)==t.unref(u)&&t.unref(c)==t.unref(h),"lew-date-item-select":t.unref(y)(e)}]),onClick:t=>(e=>{let t={year:u.value,month:h.value,day:e.showDate,value:`${u.value}-${g(h.value)}-${g(e.showDate)}`};s.value=t.value,i("update:modelValue",s.value),i("change",t)})(e)},[t.createElementVNode("div",Ct,t.toDisplayString(e.showDate),1)],10,xt)))),128))])])}}}),[["__scopeId","data-v-29f4866a"],["__file","C:/Users/10570/Desktop/30secWorkSpace/Lew-UI/packages/components/date-picker/src/LewDate.vue"]]);const Et={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 24 24"},Tt=[t.createElementVNode("g",{fill:"none"},[t.createElementVNode("path",{d:"M12 1.996a7.49 7.49 0 0 1 7.496 7.25l.004.25v4.097l1.38 3.156a1.249 1.249 0 0 1-1.145 1.75L15 18.502a3 3 0 0 1-5.995.177L9 18.499H4.275a1.251 1.251 0 0 1-1.147-1.747L4.5 13.594V9.496c0-4.155 3.352-7.5 7.5-7.5zM13.5 18.5l-3 .002a1.5 1.5 0 0 0 2.993.145l.007-.147zM12 3.496c-3.32 0-6 2.674-6 6v4.41L4.656 17h14.697L18 13.907V9.509l-.003-.225A5.988 5.988 0 0 0 12 3.496z",fill:"currentColor"})],-1)];var Lt=t.defineComponent({name:"Alert24Regular",render:function(e,i){return t.openBlock(),t.createElementBlock("svg",Et,Tt)}});const $t={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 12 12"},_t=[t.createElementVNode("g",{fill:"none"},[t.createElementVNode("path",{d:"M3 5.5a.5.5 0 1 1 1 0a.5.5 0 0 1-1 0zM3.5 7a.5.5 0 1 0 0 1a.5.5 0 0 0 0-1zM5 5.5a.5.5 0 1 1 1 0a.5.5 0 0 1-1 0zM5.5 7a.5.5 0 1 0 0 1a.5.5 0 0 0 0-1zM7 5.5a.5.5 0 1 1 1 0a.5.5 0 0 1-1 0zm-6-2A2.5 2.5 0 0 1 3.5 1h5A2.5 2.5 0 0 1 11 3.5v5A2.5 2.5 0 0 1 8.5 11h-5A2.5 2.5 0 0 1 1 8.5v-5zM3.5 2a1.5 1.5 0 0 0-1.415 1h7.83A1.5 1.5 0 0 0 8.5 2h-5zM10 4H2v4.5A1.5 1.5 0 0 0 3.5 10h5A1.5 1.5 0 0 0 10 8.5V4z",fill:"currentColor"})],-1)];var At=t.defineComponent({name:"CalendarLtr12Regular",render:function(e,i){return t.openBlock(),t.createElementBlock("svg",$t,_t)}});const Nt={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 24 24"},Pt=[t.createElementVNode("g",{fill:"none"},[t.createElementVNode("path",{d:"M12 2c5.523 0 10 4.477 10 10s-4.477 10-10 10S2 17.523 2 12S6.477 2 12 2zm0 1.5a8.5 8.5 0 1 0 0 17a8.5 8.5 0 0 0 0-17zm-1.25 9.94l4.47-4.47a.75.75 0 0 1 1.133.976l-.073.084l-5 5a.75.75 0 0 1-.976.073l-.084-.073l-2.5-2.5a.75.75 0 0 1 .976-1.133l.084.073l1.97 1.97l4.47-4.47l-4.47 4.47z",fill:"currentColor"})],-1)];var Bt=t.defineComponent({name:"CheckmarkCircle24Regular",render:function(e,i){return t.openBlock(),t.createElementBlock("svg",Nt,Pt)}});const Mt={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 24 24"},Vt=[t.createElementVNode("g",{fill:"none"},[t.createElementVNode("path",{d:"M4.22 15.53a.75.75 0 0 0 1.06 0L12 8.81l6.72 6.72a.75.75 0 1 0 1.06-1.06l-7.25-7.25a.75.75 0 0 0-1.06 0l-7.25 7.25a.75.75 0 0 0 0 1.06z",fill:"currentColor"})],-1)];var Ot=t.defineComponent({name:"ChevronUp24Regular",render:function(e,i){return t.openBlock(),t.createElementBlock("svg",Mt,Vt)}});const It={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 24 24"},zt=[t.createElementVNode("g",{fill:"none"},[t.createElementVNode("path",{d:"M8.066 18.943l6.5-14.5a.75.75 0 0 1 1.404.518l-.036.096l-6.5 14.5a.75.75 0 0 1-1.404-.518l.036-.096l6.5-14.5l-6.5 14.5zM2.22 11.47l4.25-4.25a.75.75 0 0 1 1.133.976l-.073.085L3.81 12l3.72 3.719a.75.75 0 0 1-.976 1.133l-.084-.073l-4.25-4.25a.75.75 0 0 1-.073-.976l.073-.084l4.25-4.25l-4.25 4.25zm14.25-4.25a.75.75 0 0 1 .976-.073l.084.073l4.25 4.25a.75.75 0 0 1 .073.976l-.073.085l-4.25 4.25a.75.75 0 0 1-1.133-.977l.073-.084L20.19 12l-3.72-3.72a.75.75 0 0 1 0-1.06z",fill:"currentColor"})],-1)];var Dt=t.defineComponent({name:"Code24Regular",render:function(e,i){return t.openBlock(),t.createElementBlock("svg",It,zt)}});const Rt={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 24 24"},Ft=[t.createElementVNode("g",{fill:"none"},[t.createElementVNode("path",{d:"M4.21 4.387l.083-.094a1 1 0 0 1 1.32-.083l.094.083L12 10.585l6.293-6.292a1 1 0 1 1 1.414 1.414L13.415 12l6.292 6.293a1 1 0 0 1 .083 1.32l-.083.094a1 1 0 0 1-1.32.083l-.094-.083L12 13.415l-6.293 6.292a1 1 0 0 1-1.414-1.414L10.585 12L4.293 5.707a1 1 0 0 1-.083-1.32l.083-.094l-.083.094z",fill:"currentColor"})],-1)];var jt=t.defineComponent({name:"Dismiss24Filled",render:function(e,i){return t.openBlock(),t.createElementBlock("svg",Rt,Ft)}});const Wt={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 24 24"},Ht=[t.createElementVNode("g",{fill:"none"},[t.createElementVNode("path",{d:"M12 2c5.523 0 10 4.478 10 10s-4.477 10-10 10S2 17.522 2 12S6.477 2 12 2zm0 1.667c-4.595 0-8.333 3.738-8.333 8.333c0 4.595 3.738 8.333 8.333 8.333c4.595 0 8.333-3.738 8.333-8.333c0-4.595-3.738-8.333-8.333-8.333zm-.001 10.835a.999.999 0 1 1 0 1.998a.999.999 0 0 1 0-1.998zM11.994 7a.75.75 0 0 1 .744.648l.007.101l.004 4.502a.75.75 0 0 1-1.493.103l-.007-.102l-.004-4.501a.75.75 0 0 1 .75-.751z",fill:"currentColor"})],-1)];var Ut=t.defineComponent({name:"ErrorCircle24Regular",render:function(e,i){return t.openBlock(),t.createElementBlock("svg",Wt,Ht)}});const qt={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 24 24"},Xt=[t.createElementVNode("g",{fill:"none"},[t.createElementVNode("path",{d:"M12 1.999c5.524 0 10.002 4.478 10.002 10.002c0 5.523-4.478 10.001-10.002 10.001C6.476 22.002 2 17.524 2 12.001C1.999 6.477 6.476 1.999 12 1.999zm0 1.5a8.502 8.502 0 1 0 0 17.003A8.502 8.502 0 0 0 12 3.5zm-.004 7a.75.75 0 0 1 .744.648l.007.102l.004 5.502a.75.75 0 0 1-1.494.102l-.006-.101l-.004-5.502a.75.75 0 0 1 .75-.75zm.005-3.497a.999.999 0 1 1 0 1.997a.999.999 0 0 1 0-1.997z",fill:"currentColor"})],-1)];var Yt=t.defineComponent({name:"Info24Regular",render:function(e,i){return t.openBlock(),t.createElementBlock("svg",qt,Xt)}});const Kt={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 24 24"},Gt=[t.createElementVNode("g",{fill:"none"},[t.createElementVNode("path",{d:"M10.91 2.782a2.25 2.25 0 0 1 2.975.74l.083.138l7.759 14.009a2.25 2.25 0 0 1-1.814 3.334l-.154.006H4.243a2.25 2.25 0 0 1-2.041-3.197l.072-.143L10.031 3.66a2.25 2.25 0 0 1 .878-.878zm9.505 15.613l-7.76-14.008a.75.75 0 0 0-1.254-.088l-.057.088l-7.757 14.008a.75.75 0 0 0 .561 1.108l.095.006h15.516a.75.75 0 0 0 .696-1.028l-.04-.086l-7.76-14.008l7.76 14.008zM12 16.002a.999.999 0 1 1 0 1.997a.999.999 0 0 1 0-1.997zM11.995 8.5a.75.75 0 0 1 .744.647l.007.102l.004 4.502a.75.75 0 0 1-1.494.103l-.006-.102l-.004-4.502a.75.75 0 0 1 .75-.75z",fill:"currentColor"})],-1)];var Zt=t.defineComponent({name:"Warning24Regular",render:function(e,i){return t.openBlock(),t.createElementBlock("svg",Kt,Gt)}});const Jt={class:"lew-date-picker-placeholder"};var Qt=i(t.defineComponent({__name:"LewDatePicker",props:ft,emits:["change","update:modelValue"],setup(e,{expose:i,emit:n}){const o=e;let s=t.ref(!1),a=t.ref(o.modelValue),r=t.ref();const l=()=>{r.value.show()},c=()=>{r.value.hide()},d=e=>{n("update:modelValue",e.value),n("change",{date:e,show:l,hide:c}),o.autoClose&&c()};return i({show:l,hide:c}),(e,i)=>{const n=t.resolveComponent("Lew-date"),o=t.resolveComponent("lew-popover");return t.openBlock(),t.createBlock(o,{ref_key:"lewPopoverRef",ref:r,trigger:"click",placement:"bottom-start",arrow:!1,onOnShow:i[1]||(i[1]=e=>t.isRef(s)?s.value=!0:s=!0),onOnHide:i[2]||(i[2]=e=>t.isRef(s)?s.value=!1:s=!1)},{trigger:t.withCtx((()=>[t.createElementVNode("div",{class:t.normalizeClass(["lew-date-picker-input",{"lew-date-picker-foucs":t.unref(s)}])},[t.withDirectives(t.createElementVNode("div",Jt," 请选择日期 ",512),[[t.vShow,!t.unref(a)]]),t.withDirectives(t.createElementVNode("div",{class:"lew-date-picker-dateValue"},t.toDisplayString(t.unref(a)),513),[[t.vShow,t.unref(a)]]),t.createVNode(t.unref($e),{size:"16px",class:"lew-date-picker-icon"},{default:t.withCtx((()=>[t.createVNode(t.unref(At))])),_:1})],2)])),"popover-body":t.withCtx((()=>[t.createVNode(n,{modelValue:t.unref(a),"onUpdate:modelValue":i[0]||(i[0]=e=>t.isRef(a)?a.value=e:a=e),multiple:e.multiple,onChange:d},null,8,["modelValue","multiple"])])),_:1},512)}}}),[["__scopeId","data-v-4c4a62d0"],["__file","C:/Users/10570/Desktop/30secWorkSpace/Lew-UI/packages/components/date-picker/src/LewDatePicker.vue"]]);const ei={columns:{type:Array,default:()=>[]},width:{type:String,default:()=>""},height:{type:String,default:()=>""},data:{type:Array,default:()=>[]}};const ti={class:"lew-table-head"},ii=t.defineComponent({__name:"LewTable",props:ei,setup(e){const i=e;let n=t.ref(null),o=t.ref(null),s=t.ref(-1),a=t.ref(-1);let r=t.ref(!1),l=t.ref(!1);const c=e=>"left"==e.sticky?`position: sticky;left:${e.offsetX||"0px"};z-index:1;`:"right"==e.sticky?`position: sticky;right:${e.offsetX||"0px"};z-index:1;`:void 0;let d=t.ref("");let u=!1;const h=(e,t)=>{-1==s.value&&-1==a.value||u||(u=!0,setTimeout((()=>{(e=>{e.target.scrollWidth!=e.target.offsetWidth&&(r.value=e.target.scrollLeft>=5,l.value=e.target.scrollLeft<=e.target.scrollWidth-e.target.offsetWidth-5)})(e),u=!1}),t))};return t.onMounted((()=>{(()=>{var e,t;let o=null==(e=n.value)?void 0:e.scrollWidth,s=null==(t=n.value)?void 0:t.offsetWidth;if(s>=o){let e=i.columns.filter((e=>"auto"==e.width)).length,t=0;i.columns.filter((e=>"auto"!=e.width)).map((e=>{t+=parseFloat(e.width)})),d.value=(s-t)/e-3+"px"}})(),t.nextTick((()=>{i.columns.map(((e,t)=>{"left"==e.sticky?s.value=t:"right"==e.sticky&&-1==a.value&&(a.value=t,n.value.scrollWidth!=n.value.offsetWidth&&(l.value=!0))})),(()=>{let e=o.value.children;e=Array.from(e);let t=0;e.map((e=>{t+=e.offsetHeight-.3})),o.value.style.height=t+"px"})()}))})),(e,i)=>{var u,p,m;const f=t.resolveComponent("lew-flex");return t.openBlock(),t.createElementBlock("div",{ref_key:"lewTableRef",ref:n,class:"lew-table",style:t.normalizeStyle(`height:${e.height};width:${e.width};`),onScroll:i[0]||(i[0]=e=>h(e,200))},[t.createElementVNode("div",ti,[t.createElementVNode("div",{class:"lew-table-tr",style:t.normalizeStyle(`width:${(null==(u=t.unref(n))?void 0:u.scrollWidth)>(null==(p=t.unref(n))?void 0:p.offsetWidth)?null==(m=t.unref(n))?void 0:m.scrollWidth:""}px`)},[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.columns,((e,i)=>(t.openBlock(),t.createBlock(f,{key:`columns${i}`,class:t.normalizeClass(["lew-table-td",{"lew-table-left-subline":i==t.unref(s),"lew-table-right-subline":i==t.unref(a),"lew-table-left-subline-show":i==t.unref(s)&&t.unref(r),"lew-table-right-subline-show":i==t.unref(a)&&t.unref(l)}]),style:t.normalizeStyle(`\n ${e.columnStyle?e.columnStyle:""};\n ${c(e)}; \n width:${"auto"!=e.width?e.width:t.unref(d)||"100px"};\n `),x:e.x||"start",y:e.y},{default:t.withCtx((()=>[t.createTextVNode(t.toDisplayString(e.title),1)])),_:2},1032,["class","style","x","y"])))),128))],4)]),t.createElementVNode("div",{ref_key:"lewTableBodyRef",ref:o,class:"lew-table-body"},[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.data,((i,o)=>{var u,h,p;return t.openBlock(),t.createElementBlock("div",{key:`data${o}`,class:"lew-table-tr",style:t.normalizeStyle(`width:${(null==(u=t.unref(n))?void 0:u.scrollWidth)>(null==(h=t.unref(n))?void 0:h.offsetWidth)?null==(p=t.unref(n))?void 0:p.scrollWidth:""}px`)},[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.columns,((n,o)=>{var u;return t.openBlock(),t.createBlock(f,{key:`col${o}`,class:t.normalizeClass(["lew-table-td",{"lew-table-left-subline":o==t.unref(s),"lew-table-right-subline":o==t.unref(a),"lew-table-left-subline-show":o==t.unref(s)&&t.unref(r),"lew-table-right-subline-show":o==t.unref(a)&&t.unref(l)}]),style:t.normalizeStyle(` \n ${n.columnStyle?n.columnStyle:""};\n ${i.rowStyle};\n ${(null==(u=i.tdStyle)?void 0:u[n.field])?i.tdStyle[n.field]:""};\n ${c(n)};\n width:${"auto"!=n.width?n.width:t.unref(d)||"100px"};\n `),x:n.x||"start",y:n.y},{default:t.withCtx((()=>[t.createCommentVNode(" 模板 "),t.renderSlot(e.$slots,n.field,{row:i,column:n})])),_:2},1032,["class","style","x","y"])})),128))],4)})),128))],512)],36)}}});var ni=i(ii,[["__file","C:/Users/10570/Desktop/30secWorkSpace/Lew-UI/packages/components/table/src/LewTable.vue"]]);const oi={total:{type:Number,default:100},pageNum:{type:Number,default:1},pageSize:{type:Number,default:20},pageShowSize:{type:Number,default:2},round:{type:Boolean,default:!1},pageSizeOptions:{type:Array,default:()=>[{label:"10 / 页",value:10},{label:"20 / 页",value:20},{label:"30 / 页",value:30},{label:"50 / 页",value:30},{label:"100 / 页",value:100}]}};const si=["onClick"],ai=t.createElementVNode("div",{class:"page-label"},"/ 页",-1),ri=t.createElementVNode("div",{class:"page-label"},"跳转至",-1),li=t.createElementVNode("div",{class:"page-label"},"页",-1),ci=t.defineComponent({__name:"LewPagination",props:oi,emits:["update:pageNum","update:pageSize","update:pageTotal","change"],setup(e,{emit:i}){const n=e;let o=t.ref(n.pageNum),s=t.ref(n.pageSize),a=t.ref(n.total);t.watch((()=>n.pageNum),(e=>{c(!1,e)})),t.watch((()=>n.pageSize),(e=>{s.value=e}));let r=t.computed((()=>Math.floor(a.value/s.value))),l=t.computed((()=>{let e=o.value-n.pageShowSize,t=o.value+n.pageShowSize;return o.value<=n.pageShowSize&&(e=1,t=2*n.pageShowSize+1),o.value>=r.value-n.pageShowSize&&(e=r.value-2*n.pageShowSize,t=r.value),((e,t)=>Array.from(new Array(t+1).keys()).slice(e))(e,t)}));const c=(e,t)=>{"next"==e?o.value+=t:"prve"==e?o.value-=t:o.value=t,o.value<1?o.value=1:o.value>a.value/s.value&&(o.value=r.value),d.value=o.value,i("change",{pageNum:o.value,pageSize:s.value,total:a.value,pageShowSize:n.pageShowSize}),i("update:pageNum",o.value)};let d=t.ref(1);const u=e=>{e=String(e),d.value=Number(e.replace(/[^\d]/g,"")),c(!1,d.value)};return(e,i)=>{const n=t.resolveComponent("lew-flex"),h=t.resolveComponent("lew-input-pro");return t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass(["lew-pagination",{"lew-pagination-round":e.round}])},[t.createVNode(n,{class:"lew-pagination-control",gap:"5px"},{default:t.withCtx((()=>[t.createVNode(n,{class:"lew-pagination-page-box",gap:"5px"},{default:t.withCtx((()=>[t.createVNode(t.unref($e),{size:"14",class:"lew-pagination-page-btn lew-pagination-control-btn",onClick:i[0]||(i[0]=e=>c("prve",1))},{default:t.withCtx((()=>[t.createVNode(t.unref(I))])),_:1}),t.withDirectives(t.createElementVNode("div",{class:"lew-pagination-page-btn",onClick:i[1]||(i[1]=e=>c(!1,1))}," 1 ",512),[[t.vShow,t.unref(o)-1>e.pageShowSize]]),t.withDirectives(t.createVNode(t.unref($e),{size:"14",class:"lew-pagination-page-btn lew-pagination-control-btn",onClick:i[2]||(i[2]=t=>c("prve",2*e.pageShowSize))},{default:t.withCtx((()=>[t.createVNode(t.unref(J))])),_:1},512),[[t.vShow,t.unref(o)-1>e.pageShowSize]]),(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(t.unref(l),((e,i)=>(t.openBlock(),t.createElementBlock("div",{key:i,class:t.normalizeClass(["lew-pagination-page-btn",{active:e==t.unref(o)}]),onClick:t=>c(!1,e)},t.toDisplayString(e),11,si)))),128)),t.withDirectives(t.createVNode(t.unref($e),{size:"14",class:"lew-pagination-page-btn lew-pagination-control-btn",onClick:i[3]||(i[3]=t=>c("next",2*e.pageShowSize))},{default:t.withCtx((()=>[t.createVNode(t.unref(J))])),_:1},512),[[t.vShow,t.unref(o)<t.unref(a)/t.unref(s)-e.pageShowSize]]),t.withDirectives(t.createElementVNode("div",{class:"lew-pagination-page-btn",onClick:i[4]||(i[4]=e=>c(!1,t.unref(r)))},t.toDisplayString(t.unref(r)),513),[[t.vShow,t.unref(o)<t.unref(a)/t.unref(s)-e.pageShowSize]]),t.createVNode(t.unref($e),{size:"14",class:"lew-pagination-page-btn lew-pagination-control-btn",onClick:i[5]||(i[5]=e=>c("next",1))},{default:t.withCtx((()=>[t.createVNode(t.unref(q))])),_:1})])),_:1}),t.createVNode(h,{modelValue:t.unref(s),"onUpdate:modelValue":i[6]||(i[6]=e=>t.isRef(s)?s.value=e:s=e),size:"small",align:"center",placeholder:"",arrow:!1,options:e.pageSizeOptions,"auto-width":"",onBlur:i[7]||(i[7]=e=>c(!1,t.unref(d))),onChange:i[8]||(i[8]=e=>c(!1,t.unref(d)))},{right:t.withCtx((()=>[ai])),_:1},8,["modelValue","options"]),t.createVNode(h,{modelValue:t.unref(d),"onUpdate:modelValue":i[9]||(i[9]=e=>t.isRef(d)?d.value=e:d=e),style:{"margin-left":"20px"},size:"small",align:"center",placeholder:"",arrow:!1,"auto-width":"",onBlur:u,onChange:u},{left:t.withCtx((()=>[ri])),right:t.withCtx((()=>[li])),_:1},8,["modelValue"])])),_:1})],2)}}});var di=i(ci,[["__file","C:/Users/10570/Desktop/30secWorkSpace/Lew-UI/packages/components/pagination/src/LewPagination.vue"]]);const ui={class:"lew-avatar"},hi=["src","alt"];var pi=i(t.defineComponent({__name:"LewAvatar",props:{round:{type:Boolean,default:!1},status:{type:String,default:""},statusPosition:{type:String,default:""},src:{type:String,default:""},alt:{type:String,default:""}},setup:e=>(i,n)=>(t.openBlock(),t.createElementBlock("div",ui,[t.createElementVNode("img",{src:e.src,alt:e.alt,class:t.normalizeClass(e.round?"lew-avarar-round":"")},null,10,hi),e.status?(t.openBlock(),t.createElementBlock("span",{key:0,class:t.normalizeClass(["dot",`dot-${e.status} dot-${e.statusPosition}`])},null,2)):t.createCommentVNode("v-if",!0)]))}),[["__scopeId","data-v-3ce1779b"],["__file","C:/Users/10570/Desktop/30secWorkSpace/Lew-UI/packages/components/avatar/src/LewAvatar.vue"]]);var mi=i(t.defineComponent({__name:"LewTitle",props:{bold:{type:Number,default:800},size:{type:String,default:"24px"}},setup:e=>(i,n)=>(t.openBlock(),t.createElementBlock("div",{class:"lew-title",style:t.normalizeStyle(`font-weight:${e.bold};font-size:${e.size}`)},[t.renderSlot(i.$slots,"default",{},void 0,!0)],4))}),[["__scopeId","data-v-cfbccebe"],["__file","C:/Users/10570/Desktop/30secWorkSpace/Lew-UI/packages/components/title/src/LewTitle.vue"]]);var fi=i(t.defineComponent({__name:"LewButton",props:{type:{type:String,default:"primary"},size:{type:String,default:"medium"},loading:{type:Boolean,default:!1},round:{type:Boolean,default:!1},isText:{type:Boolean,default:!1}},setup:e=>(i,n)=>(t.openBlock(),t.createElementBlock("button",{class:t.normalizeClass(["lew-button",`\n ${e.isText?"lew-button-text":""}\n lew-button-${e.type} lew-button-${e.size} ${e.round?"lew-button-round":""} \n ${e.loading?"lew-button-loading":""}`])},[t.renderSlot(i.$slots,"default",{},void 0,!0)],2))}),[["__scopeId","data-v-e7956ae6"],["__file","C:/Users/10570/Desktop/30secWorkSpace/Lew-UI/packages/components/button/src/LewButton.vue"]]);const gi={key:0,class:"lew-badge-value"},yi={key:1,class:"lew-badge-dot"};var vi=i(t.defineComponent({__name:"LewBadge",props:{type:{type:String,default:"normal"},round:{type:Boolean,default:!1},value:{type:String,default:""}},setup:e=>(i,n)=>(t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass(["lew-badge",`lew-badge-${e.type} ${e.round?"lew-badge-round":""}`])},[e.value?(t.openBlock(),t.createElementBlock("div",gi,t.toDisplayString(e.value),1)):t.createCommentVNode("v-if",!0),e.value?t.createCommentVNode("v-if",!0):(t.openBlock(),t.createElementBlock("div",yi)),t.renderSlot(i.$slots,"default")],2))}),[["__file","C:/Users/10570/Desktop/30secWorkSpace/Lew-UI/packages/components/badge/src/LewBadge.vue"]]);let bi=["small","medium","large"],wi=["primary","info","success","error","warning","normal"];const ki={type:{type:String,default:"normal",validator:e=>wi.includes(e)},size:{type:String,default:"medium",validator:e=>bi.includes(e)},maxWidth:{type:String,default:"120px"},round:{type:Boolean,default:!1},closable:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},to:{type:String,default:""}};const xi={class:"lew-tag-left"},Ci={class:"lew-tag-value"},Si={class:"lew-tag-right"},Ei=["onClick"];var Ti=i(t.defineComponent({__name:"LewTag",props:ki,emits:["close"],setup(e,{emit:i}){const n=e,{lewTo:o}=c(),s=()=>{n.disabled||i("close")};return(e,i)=>(t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass(["lew-tag",`lew-tag-${e.size} lew-tag-${e.type} ${e.round?"lew-tag-round":""} ${e.disabled?"lew-tag-disabled":""} ${e.to?"lew-tag-to":""}`]),style:t.normalizeStyle(`max-width:${e.maxWidth}`),onClick:i[0]||(i[0]=i=>t.unref(o)(e.to))},[t.createElementVNode("div",xi,[t.renderSlot(e.$slots,"left")]),t.createElementVNode("div",Ci,[t.renderSlot(e.$slots,"default")]),t.createElementVNode("div",Si,[t.renderSlot(e.$slots,"right")]),e.closable?(t.openBlock(),t.createElementBlock("div",{key:0,class:"lew-tag-close",onClick:t.withModifiers(s,["stop"])},[t.createVNode(t.unref($e),null,{default:t.withCtx((()=>[t.createVNode(t.unref(jt))])),_:1})],8,Ei)):t.createCommentVNode("v-if",!0)],6))}}),[["__file","C:/Users/10570/Desktop/30secWorkSpace/Lew-UI/packages/components/tag/src/LewTag.vue"]]);const Li={class:"lew-alert-group"},$i={class:"alert-icon"},_i={class:"message"},Ai={class:"title"},Ni=["onClick"];var Pi=i(t.defineComponent({__name:"LewAlert",props:{list:{type:Array,default:()=>[]}},emits:["close"],setup:(e,{emit:i})=>(n,o)=>(t.openBlock(),t.createElementBlock("div",Li,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.list,((e,n)=>(t.openBlock(),t.createElementBlock("div",{key:n,class:t.normalizeClass(["lew-alert",`lew-alert-${e.type}`])},[t.createElementVNode("div",$i,[t.createVNode(t.unref($e),{size:"20"},{default:t.withCtx((()=>["normal"==e.type?(t.openBlock(),t.createBlock(t.unref(Yt),{key:0})):t.createCommentVNode("v-if",!0),"warning"==e.type?(t.openBlock(),t.createBlock(t.unref(Zt),{key:1})):t.createCommentVNode("v-if",!0),"success"==e.type?(t.openBlock(),t.createBlock(t.unref(Bt),{key:2})):t.createCommentVNode("v-if",!0),"error"==e.type?(t.openBlock(),t.createBlock(t.unref(Ut),{key:3})):t.createCommentVNode("v-if",!0),"info"==e.type?(t.openBlock(),t.createBlock(t.unref(Lt),{key:4})):t.createCommentVNode("v-if",!0)])),_:2},1024)]),t.createElementVNode("div",_i,[t.createElementVNode("div",Ai,t.toDisplayString(e.title),1),t.withDirectives(t.createElementVNode("div",{class:"content"},t.toDisplayString(e.content),513),[[t.vShow,e.content]])]),t.createElementVNode("div",{class:"btn-close",onClick:e=>i("close",n)},[t.createVNode(t.unref($e),{size:"16"},{default:t.withCtx((()=>[t.createVNode(t.unref(jt))])),_:1})],8,Ni)],2)))),128))]))}),[["__scopeId","data-v-a39e41be"],["__file","C:/Users/10570/Desktop/30secWorkSpace/Lew-UI/packages/components/alert/src/LewAlert.vue"]]);var Bi=i(t.defineComponent({__name:"LewModal",props:{title:{type:String,default:""},width:{type:String,default:""},height:{type:String,default:""},visible:{type:Boolean,default:!1}},emits:["maskClick","confirm"],setup(e,{emit:i}){r("lew-modal");const n=()=>{i("maskClick")};return(i,o)=>(t.openBlock(),t.createBlock(t.Teleport,{to:"#lew-modal"},[t.createVNode(t.Transition,{name:"lew-modal"},{default:t.withCtx((()=>[e.visible?(t.openBlock(),t.createElementBlock("div",{key:0,class:"lew-modal",onClick:n},[e.visible?(t.openBlock(),t.createElementBlock("div",{key:0,class:"lew-modal-box",style:t.normalizeStyle(`width:${e.width};height:${e.height}`),onClick:o[0]||(o[0]=t.withModifiers((()=>{}),["stop"]))},[t.renderSlot(i.$slots,"default",{},void 0,!0)],4)):t.createCommentVNode("v-if",!0)])):t.createCommentVNode("v-if",!0)])),_:3})]))}}),[["__scopeId","data-v-463e7ac1"],["__file","C:/Users/10570/Desktop/30secWorkSpace/Lew-UI/packages/components/modal/src/LewModal.vue"]]);const Mi={class:"left"},Vi={class:"right"},Oi={key:0,class:"title"},Ii={key:1,class:"content"},zi={class:"footer"},Di=t.createTextVNode("取消 "),Ri=t.createTextVNode("确定");var Fi=i(t.defineComponent({__name:"LewPopok",props:{type:{type:String,default:"warning"},width:{type:String,default:"250px"},trigger:{type:String,default:"click"},title:{type:String,default:""},content:{type:String,default:""},placement:{type:String,default:"top"}},emits:["ok","cancel"],setup(e,{expose:i,emit:n}){let o=t.ref(),s=()=>{o.value.show()},a=()=>{o.value.hide()};return i({show:s,hide:a}),(i,r)=>{const l=t.resolveComponent("lew-popover");return t.openBlock(),t.createBlock(l,{ref_key:"lewPopoverRef",ref:o,class:"lew-popok",trigger:e.trigger,placement:e.placement},{trigger:t.withCtx((()=>[t.renderSlot(i.$slots,"default",{},void 0,!0)])),"popover-body":t.withCtx((()=>[t.createElementVNode("div",{class:"lew-popok-body",style:t.normalizeStyle(`width:${e.width}`)},[t.createElementVNode("div",Mi,[t.createVNode(t.unref($e),{size:"22",class:t.normalizeClass(`icon-${e.type}`)},{default:t.withCtx((()=>["normal"==e.type?(t.openBlock(),t.createBlock(t.unref(Yt),{key:0})):t.createCommentVNode("v-if",!0),"warning"==e.type?(t.openBlock(),t.createBlock(t.unref(Zt),{key:1})):t.createCommentVNode("v-if",!0),"success"==e.type?(t.openBlock(),t.createBlock(t.unref(Bt),{key:2})):t.createCommentVNode("v-if",!0),"error"==e.type?(t.openBlock(),t.createBlock(t.unref(Ut),{key:3})):t.createCommentVNode("v-if",!0),"info"==e.type?(t.openBlock(),t.createBlock(t.unref(Lt),{key:4})):t.createCommentVNode("v-if",!0)])),_:1},8,["class"])]),t.createElementVNode("div",Vi,[e.title?(t.openBlock(),t.createElementBlock("div",Oi,t.toDisplayString(e.title),1)):t.createCommentVNode("v-if",!0),e.content?(t.openBlock(),t.createElementBlock("div",Ii,t.toDisplayString(e.content),1)):t.createCommentVNode("v-if",!0),t.createElementVNode("div",zi,[t.createVNode(t.unref(fi),{size:"small",type:"blank",onClick:r[0]||(r[0]=e=>n("cancel",{show:t.unref(s),hide:t.unref(a)}))},{default:t.withCtx((()=>[Di])),_:1}),t.createVNode(t.unref(fi),{size:"small",onClick:r[1]||(r[1]=e=>n("ok",{show:t.unref(s),hide:t.unref(a)}))},{default:t.withCtx((()=>[Ri])),_:1})])])],4)])),_:3},8,["trigger","placement"])}}}),[["__scopeId","data-v-7f9302c1"],["__file","C:/Users/10570/Desktop/30secWorkSpace/Lew-UI/packages/components/popok/src/LewPopok.vue"]]),ji="top",Wi="bottom",Hi="right",Ui="left",qi="auto",Xi=[ji,Wi,Hi,Ui],Yi="start",Ki="end",Gi="viewport",Zi="popper",Ji=Xi.reduce((function(e,t){return e.concat([t+"-"+Yi,t+"-"+Ki])}),[]),Qi=[].concat(Xi,[qi]).reduce((function(e,t){return e.concat([t,t+"-"+Yi,t+"-"+Ki])}),[]),en=["beforeRead","read","afterRead","beforeMain","main","afterMain","beforeWrite","write","afterWrite"];function tn(e){return e?(e.nodeName||"").toLowerCase():null}function nn(e){if(null==e)return window;if("[object Window]"!==e.toString()){var t=e.ownerDocument;return t&&t.defaultView||window}return e}function on(e){return e instanceof nn(e).Element||e instanceof Element}function sn(e){return e instanceof nn(e).HTMLElement||e instanceof HTMLElement}function an(e){return"undefined"!=typeof ShadowRoot&&(e instanceof nn(e).ShadowRoot||e instanceof ShadowRoot)}var rn={name:"applyStyles",enabled:!0,phase:"write",fn:function(e){var t=e.state;Object.keys(t.elements).forEach((function(e){var i=t.styles[e]||{},n=t.attributes[e]||{},o=t.elements[e];sn(o)&&tn(o)&&(Object.assign(o.style,i),Object.keys(n).forEach((function(e){var t=n[e];!1===t?o.removeAttribute(e):o.setAttribute(e,!0===t?"":t)})))}))},effect:function(e){var t=e.state,i={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(t.elements.popper.style,i.popper),t.styles=i,t.elements.arrow&&Object.assign(t.elements.arrow.style,i.arrow),function(){Object.keys(t.elements).forEach((function(e){var n=t.elements[e],o=t.attributes[e]||{},s=Object.keys(t.styles.hasOwnProperty(e)?t.styles[e]:i[e]).reduce((function(e,t){return e[t]="",e}),{});sn(n)&&tn(n)&&(Object.assign(n.style,s),Object.keys(o).forEach((function(e){n.removeAttribute(e)})))}))}},requires:["computeStyles"]};function ln(e){return e.split("-")[0]}var cn=Math.max,dn=Math.min,un=Math.round;function hn(e,t){void 0===t&&(t=!1);var i=e.getBoundingClientRect(),n=1,o=1;if(sn(e)&&t){var s=e.offsetHeight,a=e.offsetWidth;a>0&&(n=un(i.width)/a||1),s>0&&(o=un(i.height)/s||1)}return{width:i.width/n,height:i.height/o,top:i.top/o,right:i.right/n,bottom:i.bottom/o,left:i.left/n,x:i.left/n,y:i.top/o}}function pn(e){var t=hn(e),i=e.offsetWidth,n=e.offsetHeight;return Math.abs(t.width-i)<=1&&(i=t.width),Math.abs(t.height-n)<=1&&(n=t.height),{x:e.offsetLeft,y:e.offsetTop,width:i,height:n}}function mn(e,t){var i=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(i&&an(i)){var n=t;do{if(n&&e.isSameNode(n))return!0;n=n.parentNode||n.host}while(n)}return!1}function fn(e){return nn(e).getComputedStyle(e)}function gn(e){return["table","td","th"].indexOf(tn(e))>=0}function yn(e){return((on(e)?e.ownerDocument:e.document)||window.document).documentElement}function vn(e){return"html"===tn(e)?e:e.assignedSlot||e.parentNode||(an(e)?e.host:null)||yn(e)}function bn(e){return sn(e)&&"fixed"!==fn(e).position?e.offsetParent:null}function wn(e){for(var t=nn(e),i=bn(e);i&&gn(i)&&"static"===fn(i).position;)i=bn(i);return i&&("html"===tn(i)||"body"===tn(i)&&"static"===fn(i).position)?t:i||function(e){var t=-1!==navigator.userAgent.toLowerCase().indexOf("firefox");if(-1!==navigator.userAgent.indexOf("Trident")&&sn(e)&&"fixed"===fn(e).position)return null;var i=vn(e);for(an(i)&&(i=i.host);sn(i)&&["html","body"].indexOf(tn(i))<0;){var n=fn(i);if("none"!==n.transform||"none"!==n.perspective||"paint"===n.contain||-1!==["transform","perspective"].indexOf(n.willChange)||t&&"filter"===n.willChange||t&&n.filter&&"none"!==n.filter)return i;i=i.parentNode}return null}(e)||t}function kn(e){return["top","bottom"].indexOf(e)>=0?"x":"y"}function xn(e,t,i){return cn(e,dn(t,i))}function Cn(e){return Object.assign({},{top:0,right:0,bottom:0,left:0},e)}function Sn(e,t){return t.reduce((function(t,i){return t[i]=e,t}),{})}function En(e){return e.split("-")[1]}var Tn={top:"auto",right:"auto",bottom:"auto",left:"auto"};function Ln(e){var t,i=e.popper,n=e.popperRect,o=e.placement,s=e.variation,a=e.offsets,r=e.position,l=e.gpuAcceleration,c=e.adaptive,d=e.roundOffsets,u=e.isFixed,h=a.x,p=void 0===h?0:h,m=a.y,f=void 0===m?0:m,g="function"==typeof d?d({x:p,y:f}):{x:p,y:f};p=g.x,f=g.y;var y=a.hasOwnProperty("x"),v=a.hasOwnProperty("y"),b=Ui,w=ji,k=window;if(c){var x=wn(i),C="clientHeight",S="clientWidth";if(x===nn(i)&&"static"!==fn(x=yn(i)).position&&"absolute"===r&&(C="scrollHeight",S="scrollWidth"),o===ji||(o===Ui||o===Hi)&&s===Ki)w=Wi,f-=(u&&x===k&&k.visualViewport?k.visualViewport.height:x[C])-n.height,f*=l?1:-1;if(o===Ui||(o===ji||o===Wi)&&s===Ki)b=Hi,p-=(u&&x===k&&k.visualViewport?k.visualViewport.width:x[S])-n.width,p*=l?1:-1}var E,T=Object.assign({position:r},c&&Tn),L=!0===d?function(e){var t=e.x,i=e.y,n=window.devicePixelRatio||1;return{x:un(t*n)/n||0,y:un(i*n)/n||0}}({x:p,y:f}):{x:p,y:f};return p=L.x,f=L.y,l?Object.assign({},T,((E={})[w]=v?"0":"",E[b]=y?"0":"",E.transform=(k.devicePixelRatio||1)<=1?"translate("+p+"px, "+f+"px)":"translate3d("+p+"px, "+f+"px, 0)",E)):Object.assign({},T,((t={})[w]=v?f+"px":"",t[b]=y?p+"px":"",t.transform="",t))}var $n={passive:!0};var _n={left:"right",right:"left",bottom:"top",top:"bottom"};function An(e){return e.replace(/left|right|bottom|top/g,(function(e){return _n[e]}))}var Nn={start:"end",end:"start"};function Pn(e){return e.replace(/start|end/g,(function(e){return Nn[e]}))}function Bn(e){var t=nn(e);return{scrollLeft:t.pageXOffset,scrollTop:t.pageYOffset}}function Mn(e){return hn(yn(e)).left+Bn(e).scrollLeft}function Vn(e){var t=fn(e),i=t.overflow,n=t.overflowX,o=t.overflowY;return/auto|scroll|overlay|hidden/.test(i+o+n)}function On(e){return["html","body","#document"].indexOf(tn(e))>=0?e.ownerDocument.body:sn(e)&&Vn(e)?e:On(vn(e))}function In(e,t){var i;void 0===t&&(t=[]);var n=On(e),o=n===(null==(i=e.ownerDocument)?void 0:i.body),s=nn(n),a=o?[s].concat(s.visualViewport||[],Vn(n)?n:[]):n,r=t.concat(a);return o?r:r.concat(In(vn(a)))}function zn(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function Dn(e,t){return t===Gi?zn(function(e){var t=nn(e),i=yn(e),n=t.visualViewport,o=i.clientWidth,s=i.clientHeight,a=0,r=0;return n&&(o=n.width,s=n.height,/^((?!chrome|android).)*safari/i.test(navigator.userAgent)||(a=n.offsetLeft,r=n.offsetTop)),{width:o,height:s,x:a+Mn(e),y:r}}(e)):on(t)?function(e){var t=hn(e);return t.top=t.top+e.clientTop,t.left=t.left+e.clientLeft,t.bottom=t.top+e.clientHeight,t.right=t.left+e.clientWidth,t.width=e.clientWidth,t.height=e.clientHeight,t.x=t.left,t.y=t.top,t}(t):zn(function(e){var t,i=yn(e),n=Bn(e),o=null==(t=e.ownerDocument)?void 0:t.body,s=cn(i.scrollWidth,i.clientWidth,o?o.scrollWidth:0,o?o.clientWidth:0),a=cn(i.scrollHeight,i.clientHeight,o?o.scrollHeight:0,o?o.clientHeight:0),r=-n.scrollLeft+Mn(e),l=-n.scrollTop;return"rtl"===fn(o||i).direction&&(r+=cn(i.clientWidth,o?o.clientWidth:0)-s),{width:s,height:a,x:r,y:l}}(yn(e)))}function Rn(e,t,i){var n="clippingParents"===t?function(e){var t=In(vn(e)),i=["absolute","fixed"].indexOf(fn(e).position)>=0&&sn(e)?wn(e):e;return on(i)?t.filter((function(e){return on(e)&&mn(e,i)&&"body"!==tn(e)})):[]}(e):[].concat(t),o=[].concat(n,[i]),s=o[0],a=o.reduce((function(t,i){var n=Dn(e,i);return t.top=cn(n.top,t.top),t.right=dn(n.right,t.right),t.bottom=dn(n.bottom,t.bottom),t.left=cn(n.left,t.left),t}),Dn(e,s));return a.width=a.right-a.left,a.height=a.bottom-a.top,a.x=a.left,a.y=a.top,a}function Fn(e){var t,i=e.reference,n=e.element,o=e.placement,s=o?ln(o):null,a=o?En(o):null,r=i.x+i.width/2-n.width/2,l=i.y+i.height/2-n.height/2;switch(s){case ji:t={x:r,y:i.y-n.height};break;case Wi:t={x:r,y:i.y+i.height};break;case Hi:t={x:i.x+i.width,y:l};break;case Ui:t={x:i.x-n.width,y:l};break;default:t={x:i.x,y:i.y}}var c=s?kn(s):null;if(null!=c){var d="y"===c?"height":"width";switch(a){case Yi:t[c]=t[c]-(i[d]/2-n[d]/2);break;case Ki:t[c]=t[c]+(i[d]/2-n[d]/2)}}return t}function jn(e,t){void 0===t&&(t={});var i=t,n=i.placement,o=void 0===n?e.placement:n,s=i.boundary,a=void 0===s?"clippingParents":s,r=i.rootBoundary,l=void 0===r?Gi:r,c=i.elementContext,d=void 0===c?Zi:c,u=i.altBoundary,h=void 0!==u&&u,p=i.padding,m=void 0===p?0:p,f=Cn("number"!=typeof m?m:Sn(m,Xi)),g=d===Zi?"reference":Zi,y=e.rects.popper,v=e.elements[h?g:d],b=Rn(on(v)?v:v.contextElement||yn(e.elements.popper),a,l),w=hn(e.elements.reference),k=Fn({reference:w,element:y,strategy:"absolute",placement:o}),x=zn(Object.assign({},y,k)),C=d===Zi?x:w,S={top:b.top-C.top+f.top,bottom:C.bottom-b.bottom+f.bottom,left:b.left-C.left+f.left,right:C.right-b.right+f.right},E=e.modifiersData.offset;if(d===Zi&&E){var T=E[o];Object.keys(S).forEach((function(e){var t=[Hi,Wi].indexOf(e)>=0?1:-1,i=[ji,Wi].indexOf(e)>=0?"y":"x";S[e]+=T[i]*t}))}return S}function Wn(e,t,i){return void 0===i&&(i={x:0,y:0}),{top:e.top-t.height-i.y,right:e.right-t.width+i.x,bottom:e.bottom-t.height+i.y,left:e.left-t.width-i.x}}function Hn(e){return[ji,Hi,Wi,Ui].some((function(t){return e[t]>=0}))}function Un(e,t,i){void 0===i&&(i=!1);var n,o,s=sn(t),a=sn(t)&&function(e){var t=e.getBoundingClientRect(),i=un(t.width)/e.offsetWidth||1,n=un(t.height)/e.offsetHeight||1;return 1!==i||1!==n}(t),r=yn(t),l=hn(e,a),c={scrollLeft:0,scrollTop:0},d={x:0,y:0};return(s||!s&&!i)&&(("body"!==tn(t)||Vn(r))&&(c=(n=t)!==nn(n)&&sn(n)?{scrollLeft:(o=n).scrollLeft,scrollTop:o.scrollTop}:Bn(n)),sn(t)?((d=hn(t,!0)).x+=t.clientLeft,d.y+=t.clientTop):r&&(d.x=Mn(r))),{x:l.left+c.scrollLeft-d.x,y:l.top+c.scrollTop-d.y,width:l.width,height:l.height}}function qn(e){var t=new Map,i=new Set,n=[];function o(e){i.add(e.name),[].concat(e.requires||[],e.requiresIfExists||[]).forEach((function(e){if(!i.has(e)){var n=t.get(e);n&&o(n)}})),n.push(e)}return e.forEach((function(e){t.set(e.name,e)})),e.forEach((function(e){i.has(e.name)||o(e)})),n}var Xn=["name","enabled","phase","fn","effect","requires","options"];var Yn={placement:"bottom",modifiers:[],strategy:"absolute"};function Kn(){for(var e=arguments.length,t=new Array(e),i=0;i<e;i++)t[i]=arguments[i];return!t.some((function(e){return!(e&&"function"==typeof e.getBoundingClientRect)}))}function Gn(e){void 0===e&&(e={});var t=e,i=t.defaultModifiers,n=void 0===i?[]:i,o=t.defaultOptions,s=void 0===o?Yn:o;return function(e,t,i){void 0===i&&(i=s);var o,a,r={placement:"bottom",orderedModifiers:[],options:Object.assign({},Yn,s),modifiersData:{},elements:{reference:e,popper:t},attributes:{},styles:{}},l=[],c=!1,d={state:r,setOptions:function(i){var o="function"==typeof i?i(r.options):i;u(),r.options=Object.assign({},s,r.options,o),r.scrollParents={reference:on(e)?In(e):e.contextElement?In(e.contextElement):[],popper:In(t)};var a=function(e){var t=qn(e);return en.reduce((function(e,i){return e.concat(t.filter((function(e){return e.phase===i})))}),[])}(function(e){var t=e.reduce((function(e,t){var i=e[t.name];return e[t.name]=i?Object.assign({},i,t,{options:Object.assign({},i.options,t.options),data:Object.assign({},i.data,t.data)}):t,e}),{});return Object.keys(t).map((function(e){return t[e]}))}([].concat(n,r.options.modifiers)));if(r.orderedModifiers=a.filter((function(e){return e.enabled})),function(e){e.forEach((function(t){[].concat(Object.keys(t),Xn).filter((function(e,t,i){return i.indexOf(e)===t})).forEach((function(i){switch(i){case"name":t.name;break;case"enabled":t.enabled;break;case"phase":en.indexOf(t.phase);break;case"fn":t.fn;break;case"effect":null!=t.effect&&t.effect;break;case"requires":null!=t.requires&&Array.isArray(t.requires);break;case"requiresIfExists":Array.isArray(t.requiresIfExists)}t.requires&&t.requires.forEach((function(t){e.find((function(e){return e.name===t}))}))}))}))}((c=[].concat(a,r.options.modifiers),h=function(e){return e.name},p=new Set,c.filter((function(e){var t=h(e);if(!p.has(t))return p.add(t),!0})))),ln(r.options.placement)===qi)r.orderedModifiers.find((function(e){return"flip"===e.name}));var c,h,p,m=fn(t);return[m.marginTop,m.marginRight,m.marginBottom,m.marginLeft].some((function(e){return parseFloat(e)})),r.orderedModifiers.forEach((function(e){var t=e.name,i=e.options,n=void 0===i?{}:i,o=e.effect;if("function"==typeof o){var s=o({state:r,name:t,instance:d,options:n}),a=function(){};l.push(s||a)}})),d.update()},forceUpdate:function(){if(!c){var e=r.elements,t=e.reference,i=e.popper;if(Kn(t,i)){r.rects={reference:Un(t,wn(i),"fixed"===r.options.strategy),popper:pn(i)},r.reset=!1,r.placement=r.options.placement,r.orderedModifiers.forEach((function(e){return r.modifiersData[e.name]=Object.assign({},e.data)}));for(var n=0,o=0;o<r.orderedModifiers.length&&!((n+=1)>100);o++)if(!0!==r.reset){var s=r.orderedModifiers[o],a=s.fn,l=s.options,u=void 0===l?{}:l,h=s.name;"function"==typeof a&&(r=a({state:r,options:u,name:h,instance:d})||r)}else r.reset=!1,o=-1}}},update:(o=function(){return new Promise((function(e){d.forceUpdate(),e(r)}))},function(){return a||(a=new Promise((function(e){Promise.resolve().then((function(){a=void 0,e(o())}))}))),a}),destroy:function(){u(),c=!0}};if(!Kn(e,t))return d;function u(){l.forEach((function(e){return e()})),l=[]}return d.setOptions(i).then((function(e){!c&&i.onFirstUpdate&&i.onFirstUpdate(e)})),d}}var Zn=Gn({defaultModifiers:[{name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:function(e){var t=e.state,i=e.instance,n=e.options,o=n.scroll,s=void 0===o||o,a=n.resize,r=void 0===a||a,l=nn(t.elements.popper),c=[].concat(t.scrollParents.reference,t.scrollParents.popper);return s&&c.forEach((function(e){e.addEventListener("scroll",i.update,$n)})),r&&l.addEventListener("resize",i.update,$n),function(){s&&c.forEach((function(e){e.removeEventListener("scroll",i.update,$n)})),r&&l.removeEventListener("resize",i.update,$n)}},data:{}},{name:"popperOffsets",enabled:!0,phase:"read",fn:function(e){var t=e.state,i=e.name;t.modifiersData[i]=Fn({reference:t.rects.reference,element:t.rects.popper,strategy:"absolute",placement:t.placement})},data:{}},{name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:function(e){var t=e.state,i=e.options,n=i.gpuAcceleration,o=void 0===n||n,s=i.adaptive,a=void 0===s||s,r=i.roundOffsets,l=void 0===r||r,c=fn(t.elements.popper).transitionProperty||"";a&&["transform","top","right","bottom","left"].some((function(e){return c.indexOf(e)>=0}));var d={placement:ln(t.placement),variation:En(t.placement),popper:t.elements.popper,popperRect:t.rects.popper,gpuAcceleration:o,isFixed:"fixed"===t.options.strategy};null!=t.modifiersData.popperOffsets&&(t.styles.popper=Object.assign({},t.styles.popper,Ln(Object.assign({},d,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:a,roundOffsets:l})))),null!=t.modifiersData.arrow&&(t.styles.arrow=Object.assign({},t.styles.arrow,Ln(Object.assign({},d,{offsets:t.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:l})))),t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-placement":t.placement})},data:{}},rn,{name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:function(e){var t=e.state,i=e.options,n=e.name,o=i.offset,s=void 0===o?[0,0]:o,a=Qi.reduce((function(e,i){return e[i]=function(e,t,i){var n=ln(e),o=[Ui,ji].indexOf(n)>=0?-1:1,s="function"==typeof i?i(Object.assign({},t,{placement:e})):i,a=s[0],r=s[1];return a=a||0,r=(r||0)*o,[Ui,Hi].indexOf(n)>=0?{x:r,y:a}:{x:a,y:r}}(i,t.rects,s),e}),{}),r=a[t.placement],l=r.x,c=r.y;null!=t.modifiersData.popperOffsets&&(t.modifiersData.popperOffsets.x+=l,t.modifiersData.popperOffsets.y+=c),t.modifiersData[n]=a}},{name:"flip",enabled:!0,phase:"main",fn:function(e){var t=e.state,i=e.options,n=e.name;if(!t.modifiersData[n]._skip){for(var o=i.mainAxis,s=void 0===o||o,a=i.altAxis,r=void 0===a||a,l=i.fallbackPlacements,c=i.padding,d=i.boundary,u=i.rootBoundary,h=i.altBoundary,p=i.flipVariations,m=void 0===p||p,f=i.allowedAutoPlacements,g=t.options.placement,y=ln(g),v=l||(y===g||!m?[An(g)]:function(e){if(ln(e)===qi)return[];var t=An(e);return[Pn(e),t,Pn(t)]}(g)),b=[g].concat(v).reduce((function(e,i){return e.concat(ln(i)===qi?function(e,t){void 0===t&&(t={});var i=t,n=i.placement,o=i.boundary,s=i.rootBoundary,a=i.padding,r=i.flipVariations,l=i.allowedAutoPlacements,c=void 0===l?Qi:l,d=En(n),u=d?r?Ji:Ji.filter((function(e){return En(e)===d})):Xi,h=u.filter((function(e){return c.indexOf(e)>=0}));0===h.length&&(h=u);var p=h.reduce((function(t,i){return t[i]=jn(e,{placement:i,boundary:o,rootBoundary:s,padding:a})[ln(i)],t}),{});return Object.keys(p).sort((function(e,t){return p[e]-p[t]}))}(t,{placement:i,boundary:d,rootBoundary:u,padding:c,flipVariations:m,allowedAutoPlacements:f}):i)}),[]),w=t.rects.reference,k=t.rects.popper,x=new Map,C=!0,S=b[0],E=0;E<b.length;E++){var T=b[E],L=ln(T),$=En(T)===Yi,_=[ji,Wi].indexOf(L)>=0,A=_?"width":"height",N=jn(t,{placement:T,boundary:d,rootBoundary:u,altBoundary:h,padding:c}),P=_?$?Hi:Ui:$?Wi:ji;w[A]>k[A]&&(P=An(P));var B=An(P),M=[];if(s&&M.push(N[L]<=0),r&&M.push(N[P]<=0,N[B]<=0),M.every((function(e){return e}))){S=T,C=!1;break}x.set(T,M)}if(C)for(var V=function(e){var t=b.find((function(t){var i=x.get(t);if(i)return i.slice(0,e).every((function(e){return e}))}));if(t)return S=t,"break"},O=m?3:1;O>0;O--){if("break"===V(O))break}t.placement!==S&&(t.modifiersData[n]._skip=!0,t.placement=S,t.reset=!0)}},requiresIfExists:["offset"],data:{_skip:!1}},{name:"preventOverflow",enabled:!0,phase:"main",fn:function(e){var t=e.state,i=e.options,n=e.name,o=i.mainAxis,s=void 0===o||o,a=i.altAxis,r=void 0!==a&&a,l=i.boundary,c=i.rootBoundary,d=i.altBoundary,u=i.padding,h=i.tether,p=void 0===h||h,m=i.tetherOffset,f=void 0===m?0:m,g=jn(t,{boundary:l,rootBoundary:c,padding:u,altBoundary:d}),y=ln(t.placement),v=En(t.placement),b=!v,w=kn(y),k="x"===w?"y":"x",x=t.modifiersData.popperOffsets,C=t.rects.reference,S=t.rects.popper,E="function"==typeof f?f(Object.assign({},t.rects,{placement:t.placement})):f,T="number"==typeof E?{mainAxis:E,altAxis:E}:Object.assign({mainAxis:0,altAxis:0},E),L=t.modifiersData.offset?t.modifiersData.offset[t.placement]:null,$={x:0,y:0};if(x){if(s){var _,A="y"===w?ji:Ui,N="y"===w?Wi:Hi,P="y"===w?"height":"width",B=x[w],M=B+g[A],V=B-g[N],O=p?-S[P]/2:0,I=v===Yi?C[P]:S[P],z=v===Yi?-S[P]:-C[P],D=t.elements.arrow,R=p&&D?pn(D):{width:0,height:0},F=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:{top:0,right:0,bottom:0,left:0},j=F[A],W=F[N],H=xn(0,C[P],R[P]),U=b?C[P]/2-O-H-j-T.mainAxis:I-H-j-T.mainAxis,q=b?-C[P]/2+O+H+W+T.mainAxis:z+H+W+T.mainAxis,X=t.elements.arrow&&wn(t.elements.arrow),Y=X?"y"===w?X.clientTop||0:X.clientLeft||0:0,K=null!=(_=null==L?void 0:L[w])?_:0,G=B+q-K,Z=xn(p?dn(M,B+U-K-Y):M,B,p?cn(V,G):V);x[w]=Z,$[w]=Z-B}if(r){var J,Q="x"===w?ji:Ui,ee="x"===w?Wi:Hi,te=x[k],ie="y"===k?"height":"width",ne=te+g[Q],oe=te-g[ee],se=-1!==[ji,Ui].indexOf(y),ae=null!=(J=null==L?void 0:L[k])?J:0,re=se?ne:te-C[ie]-S[ie]-ae+T.altAxis,le=se?te+C[ie]+S[ie]-ae-T.altAxis:oe,ce=p&&se?(ue=xn(re,te,de=le))>de?de:ue:xn(p?re:ne,te,p?le:oe);x[k]=ce,$[k]=ce-te}var de,ue;t.modifiersData[n]=$}},requiresIfExists:["offset"]},{name:"arrow",enabled:!0,phase:"main",fn:function(e){var t,i=e.state,n=e.name,o=e.options,s=i.elements.arrow,a=i.modifiersData.popperOffsets,r=ln(i.placement),l=kn(r),c=[Ui,Hi].indexOf(r)>=0?"height":"width";if(s&&a){var d=function(e,t){return Cn("number"!=typeof(e="function"==typeof e?e(Object.assign({},t.rects,{placement:t.placement})):e)?e:Sn(e,Xi))}(o.padding,i),u=pn(s),h="y"===l?ji:Ui,p="y"===l?Wi:Hi,m=i.rects.reference[c]+i.rects.reference[l]-a[l]-i.rects.popper[c],f=a[l]-i.rects.reference[l],g=wn(s),y=g?"y"===l?g.clientHeight||0:g.clientWidth||0:0,v=m/2-f/2,b=d[h],w=y-u[c]-d[p],k=y/2-u[c]/2+v,x=xn(b,k,w),C=l;i.modifiersData[n]=((t={})[C]=x,t.centerOffset=x-k,t)}},effect:function(e){var t=e.state,i=e.options.element,n=void 0===i?"[data-popper-arrow]":i;null!=n&&("string"!=typeof n||(n=t.elements.popper.querySelector(n)))&&(sn(n),mn(t.elements.popper,n)&&(t.elements.arrow=n))},requires:["popperOffsets"],requiresIfExists:["preventOverflow"]},{name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:function(e){var t=e.state,i=e.name,n=t.rects.reference,o=t.rects.popper,s=t.modifiersData.preventOverflow,a=jn(t,{elementContext:"reference"}),r=jn(t,{altBoundary:!0}),l=Wn(a,n),c=Wn(r,o,s),d=Hn(l),u=Hn(c);t.modifiersData[i]={referenceClippingOffsets:l,popperEscapeOffsets:c,isReferenceHidden:d,hasPopperEscaped:u},t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-reference-hidden":d,"data-popper-escaped":u})}}]}),Jn="tippy-content",Qn="tippy-arrow",eo="tippy-svg-arrow",to={passive:!0,capture:!0},io=function(){return document.body};function no(e,t,i){if(Array.isArray(e)){var n=e[t];return null==n?Array.isArray(i)?i[t]:i:n}return e}function oo(e,t){var i={}.toString.call(e);return 0===i.indexOf("[object")&&i.indexOf(t+"]")>-1}function so(e,t){return"function"==typeof e?e.apply(void 0,t):e}function ao(e,t){return 0===t?e:function(n){clearTimeout(i),i=setTimeout((function(){e(n)}),t)};var i}function ro(e){return[].concat(e)}function lo(e,t){-1===e.indexOf(t)&&e.push(t)}function co(e){return[].slice.call(e)}function uo(e){return Object.keys(e).reduce((function(t,i){return void 0!==e[i]&&(t[i]=e[i]),t}),{})}function ho(){return document.createElement("div")}function po(e){return["Element","Fragment"].some((function(t){return oo(e,t)}))}function mo(e){return po(e)?[e]:function(e){return oo(e,"NodeList")}(e)?co(e):Array.isArray(e)?e:co(document.querySelectorAll(e))}function fo(e,t){e.forEach((function(e){e&&(e.style.transitionDuration=t+"ms")}))}function go(e,t){e.forEach((function(e){e&&e.setAttribute("data-state",t)}))}function yo(e,t,i){var n=t+"EventListener";["transitionend","webkitTransitionEnd"].forEach((function(t){e[n](t,i)}))}function vo(e,t){for(var i=t;i;){var n;if(e.contains(i))return!0;i=null==i.getRootNode||null==(n=i.getRootNode())?void 0:n.host}return!1}var bo={isTouch:!1},wo=0;function ko(){bo.isTouch||(bo.isTouch=!0,window.performance&&document.addEventListener("mousemove",xo))}function xo(){var e=performance.now();e-wo<20&&(bo.isTouch=!1,document.removeEventListener("mousemove",xo)),wo=e}function Co(){var e,t=document.activeElement;if((e=t)&&e._tippy&&e._tippy.reference===e){var i=t._tippy;t.blur&&!i.state.isVisible&&t.blur()}}var So,Eo=!!("undefined"!=typeof window&&"undefined"!=typeof document)&&!!window.msCrypto;function To(e){return[e+"() was called on a"+("destroy"===e?"n already-":" ")+"destroyed instance. This is a no-op but","indicates a potential memory leak."].join(" ")}function Lo(e){return e.replace(/[ \t]{2,}/g," ").replace(/^[ \t]*/gm,"").trim()}function $o(e){return Lo("\n %ctippy.js\n\n %c"+Lo(e)+"\n\n %c👷‍ This is a development-only message. It will be removed in production.\n ")}function _o(e){return[$o(e),"color: #00C584; font-size: 1.3em; font-weight: bold;","line-height: 1.5","color: #a6a095;"]}function Ao(e,t){var i;e&&!So.has(t)&&(So.add(t),(i=console).warn.apply(i,_o(t)))}function No(e,t){var i;e&&!So.has(t)&&(So.add(t),(i=console).error.apply(i,_o(t)))}So=new Set;var Po={animateFill:!1,followCursor:!1,inlinePositioning:!1,sticky:!1},Bo=Object.assign({appendTo:io,aria:{content:"auto",expanded:"auto"},delay:0,duration:[300,250],getReferenceClientRect:null,hideOnClick:!0,ignoreAttributes:!1,interactive:!1,interactiveBorder:2,interactiveDebounce:0,moveTransition:"",offset:[0,10],onAfterUpdate:function(){},onBeforeUpdate:function(){},onCreate:function(){},onDestroy:function(){},onHidden:function(){},onHide:function(){},onMount:function(){},onShow:function(){},onShown:function(){},onTrigger:function(){},onUntrigger:function(){},onClickOutside:function(){},placement:"top",plugins:[],popperOptions:{},render:null,showOnCreate:!1,touch:!0,trigger:"mouseenter focus",triggerTarget:null},Po,{allowHTML:!1,animation:"fade",arrow:!0,content:"",inertia:!1,maxWidth:350,role:"tooltip",theme:"",zIndex:9999}),Mo=Object.keys(Bo);function Vo(e){var t=(e.plugins||[]).reduce((function(t,i){var n,o=i.name,s=i.defaultValue;o&&(t[o]=void 0!==e[o]?e[o]:null!=(n=Bo[o])?n:s);return t}),{});return Object.assign({},e,t)}function Oo(e,t){var i=Object.assign({},t,{content:so(t.content,[e])},t.ignoreAttributes?{}:function(e,t){return(t?Object.keys(Vo(Object.assign({},Bo,{plugins:t}))):Mo).reduce((function(t,i){var n=(e.getAttribute("data-tippy-"+i)||"").trim();if(!n)return t;if("content"===i)t[i]=n;else try{t[i]=JSON.parse(n)}catch(o){t[i]=n}return t}),{})}(e,t.plugins));return i.aria=Object.assign({},Bo.aria,i.aria),i.aria={expanded:"auto"===i.aria.expanded?t.interactive:i.aria.expanded,content:"auto"===i.aria.content?t.interactive?null:"describedby":i.aria.content},i}function Io(e,t){void 0===e&&(e={}),void 0===t&&(t=[]),Object.keys(e).forEach((function(e){var i,n,o=function(e,t){var i=Object.assign({},e);return t.forEach((function(e){delete i[e]})),i}(Bo,Object.keys(Po)),s=(i=o,n=e,!{}.hasOwnProperty.call(i,n));s&&(s=0===t.filter((function(t){return t.name===e})).length),Ao(s,["`"+e+"`","is not a valid prop. You may have spelled it incorrectly, or if it's","a plugin, forgot to pass it in an array as props.plugins.","\n\n","All props: https://atomiks.github.io/tippyjs/v6/all-props/\n","Plugins: https://atomiks.github.io/tippyjs/v6/plugins/"].join(" "))}))}function zo(e,t){e.innerHTML=t}function Do(e){var t=ho();return!0===e?t.className=Qn:(t.className=eo,po(e)?t.appendChild(e):zo(t,e)),t}function Ro(e,t){po(t.content)?(zo(e,""),e.appendChild(t.content)):"function"!=typeof t.content&&(t.allowHTML?zo(e,t.content):e.textContent=t.content)}function Fo(e){var t=e.firstElementChild,i=co(t.children);return{box:t,content:i.find((function(e){return e.classList.contains(Jn)})),arrow:i.find((function(e){return e.classList.contains(Qn)||e.classList.contains(eo)})),backdrop:i.find((function(e){return e.classList.contains("tippy-backdrop")}))}}function jo(e){var t=ho(),i=ho();i.className="tippy-box",i.setAttribute("data-state","hidden"),i.setAttribute("tabindex","-1");var n=ho();function o(i,n){var o=Fo(t),s=o.box,a=o.content,r=o.arrow;n.theme?s.setAttribute("data-theme",n.theme):s.removeAttribute("data-theme"),"string"==typeof n.animation?s.setAttribute("data-animation",n.animation):s.removeAttribute("data-animation"),n.inertia?s.setAttribute("data-inertia",""):s.removeAttribute("data-inertia"),s.style.maxWidth="number"==typeof n.maxWidth?n.maxWidth+"px":n.maxWidth,n.role?s.setAttribute("role",n.role):s.removeAttribute("role"),i.content===n.content&&i.allowHTML===n.allowHTML||Ro(a,e.props),n.arrow?r?i.arrow!==n.arrow&&(s.removeChild(r),s.appendChild(Do(n.arrow))):s.appendChild(Do(n.arrow)):r&&s.removeChild(r)}return n.className=Jn,n.setAttribute("data-state","hidden"),Ro(n,e.props),t.appendChild(i),i.appendChild(n),o(e.props,e.props),{popper:t,onUpdate:o}}jo.$$tippy=!0;var Wo=1,Ho=[],Uo=[];function qo(e,t){var i,n,o,s,a,r,l,c,d=Oo(e,Object.assign({},Bo,Vo(uo(t)))),u=!1,h=!1,p=!1,m=!1,f=[],g=ao(X,d.interactiveDebounce),y=Wo++,v=(c=d.plugins).filter((function(e,t){return c.indexOf(e)===t})),b={id:y,reference:e,popper:ho(),popperInstance:null,props:d,state:{isEnabled:!0,isVisible:!1,isDestroyed:!1,isMounted:!1,isShown:!1},plugins:v,clearDelayTimeouts:function(){clearTimeout(i),clearTimeout(n),cancelAnimationFrame(o)},setProps:function(t){if(Ao(b.state.isDestroyed,To("setProps")),b.state.isDestroyed)return;B("onBeforeUpdate",[b,t]),U();var i=b.props,n=Oo(e,Object.assign({},i,uo(t),{ignoreAttributes:!0}));b.props=n,H(),i.interactiveDebounce!==n.interactiveDebounce&&(O(),g=ao(X,n.interactiveDebounce));i.triggerTarget&&!n.triggerTarget?ro(i.triggerTarget).forEach((function(e){e.removeAttribute("aria-expanded")})):n.triggerTarget&&e.removeAttribute("aria-expanded");V(),P(),x&&x(i,n);b.popperInstance&&(Z(),Q().forEach((function(e){requestAnimationFrame(e._tippy.popperInstance.forceUpdate)})));B("onAfterUpdate",[b,t])},setContent:function(e){b.setProps({content:e})},show:function(){Ao(b.state.isDestroyed,To("show"));var e=b.state.isVisible,t=b.state.isDestroyed,i=!b.state.isEnabled,n=bo.isTouch&&!b.props.touch,o=no(b.props.duration,0,Bo.duration);if(e||t||i||n)return;if($().hasAttribute("disabled"))return;if(B("onShow",[b],!1),!1===b.props.onShow(b))return;b.state.isVisible=!0,L()&&(k.style.visibility="visible");P(),R(),b.state.isMounted||(k.style.transition="none");if(L()){var s=A(),a=s.box,l=s.content;fo([a,l],0)}r=function(){var e;if(b.state.isVisible&&!m){if(m=!0,k.offsetHeight,k.style.transition=b.props.moveTransition,L()&&b.props.animation){var t=A(),i=t.box,n=t.content;fo([i,n],o),go([i,n],"visible")}M(),V(),lo(Uo,b),null==(e=b.popperInstance)||e.forceUpdate(),B("onMount",[b]),b.props.animation&&L()&&function(e,t){j(e,t)}(o,(function(){b.state.isShown=!0,B("onShown",[b])}))}},function(){var e,t=b.props.appendTo,i=$();e=b.props.interactive&&t===io||"parent"===t?i.parentNode:so(t,[i]);e.contains(k)||e.appendChild(k);b.state.isMounted=!0,Z(),Ao(b.props.interactive&&t===Bo.appendTo&&i.nextElementSibling!==k,["Interactive tippy element may not be accessible via keyboard","navigation because it is not directly after the reference element","in the DOM source order.","\n\n","Using a wrapper <div> or <span> tag around the reference element","solves this by creating a new parentNode context.","\n\n","Specifying `appendTo: document.body` silences this warning, but it","assumes you are using a focus management solution to handle","keyboard navigation.","\n\n","See: https://atomiks.github.io/tippyjs/v6/accessibility/#interactivity"].join(" "))}()},hide:function(){Ao(b.state.isDestroyed,To("hide"));var e=!b.state.isVisible,t=b.state.isDestroyed,i=!b.state.isEnabled,n=no(b.props.duration,1,Bo.duration);if(e||t||i)return;if(B("onHide",[b],!1),!1===b.props.onHide(b))return;b.state.isVisible=!1,b.state.isShown=!1,m=!1,u=!1,L()&&(k.style.visibility="hidden");if(O(),F(),P(!0),L()){var o=A(),s=o.box,a=o.content;b.props.animation&&(fo([s,a],n),go([s,a],"hidden"))}M(),V(),b.props.animation?L()&&function(e,t){j(e,(function(){!b.state.isVisible&&k.parentNode&&k.parentNode.contains(k)&&t()}))}(n,b.unmount):b.unmount()},hideWithInteractivity:function(e){Ao(b.state.isDestroyed,To("hideWithInteractivity")),_().addEventListener("mousemove",g),lo(Ho,g),g(e)},enable:function(){b.state.isEnabled=!0},disable:function(){b.hide(),b.state.isEnabled=!1},unmount:function(){Ao(b.state.isDestroyed,To("unmount")),b.state.isVisible&&b.hide();if(!b.state.isMounted)return;J(),Q().forEach((function(e){e._tippy.unmount()})),k.parentNode&&k.parentNode.removeChild(k);Uo=Uo.filter((function(e){return e!==b})),b.state.isMounted=!1,B("onHidden",[b])},destroy:function(){if(Ao(b.state.isDestroyed,To("destroy")),b.state.isDestroyed)return;b.clearDelayTimeouts(),b.unmount(),U(),delete e._tippy,b.state.isDestroyed=!0,B("onDestroy",[b])}};if(!d.render)return No(!0,"render() function has not been supplied."),b;var w=d.render(b),k=w.popper,x=w.onUpdate;k.setAttribute("data-tippy-root",""),k.id="tippy-"+b.id,b.popper=k,e._tippy=b,k._tippy=b;var C=v.map((function(e){return e.fn(b)})),S=e.hasAttribute("aria-expanded");return H(),V(),P(),B("onCreate",[b]),d.showOnCreate&&ee(),k.addEventListener("mouseenter",(function(){b.props.interactive&&b.state.isVisible&&b.clearDelayTimeouts()})),k.addEventListener("mouseleave",(function(){b.props.interactive&&b.props.trigger.indexOf("mouseenter")>=0&&_().addEventListener("mousemove",g)})),b;function E(){var e=b.props.touch;return Array.isArray(e)?e:[e,0]}function T(){return"hold"===E()[0]}function L(){var e;return!(null==(e=b.props.render)||!e.$$tippy)}function $(){return l||e}function _(){var e,t,i=$().parentNode;return i?null!=(t=ro(i)[0])&&null!=(e=t.ownerDocument)&&e.body?t.ownerDocument:document:document}function A(){return Fo(k)}function N(e){return b.state.isMounted&&!b.state.isVisible||bo.isTouch||s&&"focus"===s.type?0:no(b.props.delay,e?0:1,Bo.delay)}function P(e){void 0===e&&(e=!1),k.style.pointerEvents=b.props.interactive&&!e?"":"none",k.style.zIndex=""+b.props.zIndex}function B(e,t,i){var n;(void 0===i&&(i=!0),C.forEach((function(i){i[e]&&i[e].apply(i,t)})),i)&&(n=b.props)[e].apply(n,t)}function M(){var t=b.props.aria;if(t.content){var i="aria-"+t.content,n=k.id;ro(b.props.triggerTarget||e).forEach((function(e){var t=e.getAttribute(i);if(b.state.isVisible)e.setAttribute(i,t?t+" "+n:n);else{var o=t&&t.replace(n,"").trim();o?e.setAttribute(i,o):e.removeAttribute(i)}}))}}function V(){!S&&b.props.aria.expanded&&ro(b.props.triggerTarget||e).forEach((function(e){b.props.interactive?e.setAttribute("aria-expanded",b.state.isVisible&&e===$()?"true":"false"):e.removeAttribute("aria-expanded")}))}function O(){_().removeEventListener("mousemove",g),Ho=Ho.filter((function(e){return e!==g}))}function I(t){if(!bo.isTouch||!p&&"mousedown"!==t.type){var i=t.composedPath&&t.composedPath()[0]||t.target;if(!b.props.interactive||!vo(k,i)){if(ro(b.props.triggerTarget||e).some((function(e){return vo(e,i)}))){if(bo.isTouch)return;if(b.state.isVisible&&b.props.trigger.indexOf("click")>=0)return}else B("onClickOutside",[b,t]);!0===b.props.hideOnClick&&(b.clearDelayTimeouts(),b.hide(),h=!0,setTimeout((function(){h=!1})),b.state.isMounted||F())}}}function z(){p=!0}function D(){p=!1}function R(){var e=_();e.addEventListener("mousedown",I,!0),e.addEventListener("touchend",I,to),e.addEventListener("touchstart",D,to),e.addEventListener("touchmove",z,to)}function F(){var e=_();e.removeEventListener("mousedown",I,!0),e.removeEventListener("touchend",I,to),e.removeEventListener("touchstart",D,to),e.removeEventListener("touchmove",z,to)}function j(e,t){var i=A().box;function n(e){e.target===i&&(yo(i,"remove",n),t())}if(0===e)return t();yo(i,"remove",a),yo(i,"add",n),a=n}function W(t,i,n){void 0===n&&(n=!1),ro(b.props.triggerTarget||e).forEach((function(e){e.addEventListener(t,i,n),f.push({node:e,eventType:t,handler:i,options:n})}))}function H(){var e;T()&&(W("touchstart",q,{passive:!0}),W("touchend",Y,{passive:!0})),(e=b.props.trigger,e.split(/\s+/).filter(Boolean)).forEach((function(e){if("manual"!==e)switch(W(e,q),e){case"mouseenter":W("mouseleave",Y);break;case"focus":W(Eo?"focusout":"blur",K);break;case"focusin":W("focusout",K)}}))}function U(){f.forEach((function(e){var t=e.node,i=e.eventType,n=e.handler,o=e.options;t.removeEventListener(i,n,o)})),f=[]}function q(e){var t,i=!1;if(b.state.isEnabled&&!G(e)&&!h){var n="focus"===(null==(t=s)?void 0:t.type);s=e,l=e.currentTarget,V(),!b.state.isVisible&&oo(e,"MouseEvent")&&Ho.forEach((function(t){return t(e)})),"click"===e.type&&(b.props.trigger.indexOf("mouseenter")<0||u)&&!1!==b.props.hideOnClick&&b.state.isVisible?i=!0:ee(e),"click"===e.type&&(u=!i),i&&!n&&te(e)}}function X(e){var t=e.target,i=$().contains(t)||k.contains(t);"mousemove"===e.type&&i||function(e,t){var i=t.clientX,n=t.clientY;return e.every((function(e){var t=e.popperRect,o=e.popperState,s=e.props.interactiveBorder,a=o.placement.split("-")[0],r=o.modifiersData.offset;if(!r)return!0;var l="bottom"===a?r.top.y:0,c="top"===a?r.bottom.y:0,d="right"===a?r.left.x:0,u="left"===a?r.right.x:0,h=t.top-n+l>s,p=n-t.bottom-c>s,m=t.left-i+d>s,f=i-t.right-u>s;return h||p||m||f}))}(Q().concat(k).map((function(e){var t,i=null==(t=e._tippy.popperInstance)?void 0:t.state;return i?{popperRect:e.getBoundingClientRect(),popperState:i,props:d}:null})).filter(Boolean),e)&&(O(),te(e))}function Y(e){G(e)||b.props.trigger.indexOf("click")>=0&&u||(b.props.interactive?b.hideWithInteractivity(e):te(e))}function K(e){b.props.trigger.indexOf("focusin")<0&&e.target!==$()||b.props.interactive&&e.relatedTarget&&k.contains(e.relatedTarget)||te(e)}function G(e){return!!bo.isTouch&&T()!==e.type.indexOf("touch")>=0}function Z(){J();var t=b.props,i=t.popperOptions,n=t.placement,o=t.offset,s=t.getReferenceClientRect,a=t.moveTransition,l=L()?Fo(k).arrow:null,c=s?{getBoundingClientRect:s,contextElement:s.contextElement||$()}:e,d=[{name:"offset",options:{offset:o}},{name:"preventOverflow",options:{padding:{top:2,bottom:2,left:5,right:5}}},{name:"flip",options:{padding:5}},{name:"computeStyles",options:{adaptive:!a}},{name:"$$tippy",enabled:!0,phase:"beforeWrite",requires:["computeStyles"],fn:function(e){var t=e.state;if(L()){var i=A().box;["placement","reference-hidden","escaped"].forEach((function(e){"placement"===e?i.setAttribute("data-placement",t.placement):t.attributes.popper["data-popper-"+e]?i.setAttribute("data-"+e,""):i.removeAttribute("data-"+e)})),t.attributes.popper={}}}}];L()&&l&&d.push({name:"arrow",options:{element:l,padding:3}}),d.push.apply(d,(null==i?void 0:i.modifiers)||[]),b.popperInstance=Zn(c,k,Object.assign({},i,{placement:n,onFirstUpdate:r,modifiers:d}))}function J(){b.popperInstance&&(b.popperInstance.destroy(),b.popperInstance=null)}function Q(){return co(k.querySelectorAll("[data-tippy-root]"))}function ee(e){b.clearDelayTimeouts(),e&&B("onTrigger",[b,e]),R();var t=N(!0),n=E(),o=n[0],s=n[1];bo.isTouch&&"hold"===o&&s&&(t=s),t?i=setTimeout((function(){b.show()}),t):b.show()}function te(e){if(b.clearDelayTimeouts(),B("onUntrigger",[b,e]),b.state.isVisible){if(!(b.props.trigger.indexOf("mouseenter")>=0&&b.props.trigger.indexOf("click")>=0&&["mouseleave","mousemove"].indexOf(e.type)>=0&&u)){var t=N(!1);t?n=setTimeout((function(){b.state.isVisible&&b.hide()}),t):o=requestAnimationFrame((function(){b.hide()}))}}else F()}}function Xo(e,t){void 0===t&&(t={});var i=Bo.plugins.concat(t.plugins||[]);!function(e){var t=!e,i="[object Object]"===Object.prototype.toString.call(e)&&!e.addEventListener;No(t,["tippy() was passed","`"+String(e)+"`","as its targets (first) argument. Valid types are: String, Element,","Element[], or NodeList."].join(" ")),No(i,["tippy() was passed a plain object which is not supported as an argument","for virtual positioning. Use props.getReferenceClientRect instead."].join(" "))}(e),Io(t,i),document.addEventListener("touchstart",ko,to),window.addEventListener("blur",Co);var n=Object.assign({},t,{plugins:i}),o=mo(e),s=po(n.content),a=o.length>1;Ao(s&&a,["tippy() was passed an Element as the `content` prop, but more than","one tippy instance was created by this invocation. This means the","content element will only be appended to the last tippy instance.","\n\n","Instead, pass the .innerHTML of the element, or use a function that","returns a cloned version of the element instead.","\n\n","1) content: element.innerHTML\n","2) content: () => element.cloneNode(true)"].join(" "));var r=o.reduce((function(e,t){var i=t&&qo(t,n);return i&&e.push(i),e}),[]);return po(e)?r[0]:r}Xo.defaultProps=Bo,Xo.setDefaultProps=function(e){Io(e,[]),Object.keys(e).forEach((function(t){Bo[t]=e[t]}))},Xo.currentInput=bo,Object.assign({},rn,{effect:function(e){var t=e.state,i={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};Object.assign(t.elements.popper.style,i.popper),t.styles=i,t.elements.arrow&&Object.assign(t.elements.arrow.style,i.arrow)}}),Xo.setDefaultProps({render:jo});const Yo={class:"lew-popover"},Ko={class:"trigger"};var Go=i(t.defineComponent({__name:"LewPopover",props:{trigger:{type:String,default:"click"},placement:{type:String,default:"top"},arrow:{type:Boolean,default:!0}},emits:["onShow","onHide"],setup(e,{expose:i,emit:n}){const o=e;let s,a=t.ref(null),r=t.ref(null);t.onMounted((()=>{let e=o.trigger,t=o.placement;"hover"==e&&(e="mouseenter"),s=Xo(a.value,{theme:"light",trigger:e,content:r.value,animation:"shift-away-subtle",interactive:!0,placement:t,arrow:o.arrow,appendTo:()=>document.body,allowHTML:!0,maxWidth:"none",onShow(e){document.getElementsByTagName("html")[0].classList.contains("lew-dark")?e.popper.children[0].setAttribute("data-theme","dark"):e.popper.children[0].setAttribute("data-theme","light"),n("onShow")},onHide(){n("onHide")}}),s.popper.children[0].setAttribute("data-lew","popover")}));const l=()=>{s.show()},c=()=>{s.hide()};return i({show:l,hide:c}),(e,i)=>(t.openBlock(),t.createElementBlock("div",Yo,[t.createElementVNode("div",{ref_key:"triggerRef",ref:a},[t.createElementVNode("div",Ko,[t.renderSlot(e.$slots,"trigger")])],512),t.createElementVNode("div",{ref_key:"bodyRef",ref:r,class:"lew-popover-body"},[t.renderSlot(e.$slots,"popover-body",{show:l,hide:c})],512)]))}}),[["__file","C:/Users/10570/Desktop/30secWorkSpace/Lew-UI/packages/components/popover/src/LewPopover.vue"]]);const Zo={visible:{type:Boolean,default:!1},width:{type:Number,default:30},height:{type:Number,default:30},position:{type:String,default:""}},Jo=(e,t,i)=>{switch(!0){case!e:return"width:30%;height:100%";case"left"==e:case"right"==e:return`width:${t}%;height:100%`;case"top"==e:case"bottom"==e:return`width:100%;height:${i}%`}},Qo=e=>e?"lew-drawer-main-"+e:"lew-drawer-main-right";var es=i(t.defineComponent({__name:"LewDrawer",props:Zo,emits:["update:visible"],setup(e,{emit:i}){const n=e;r("lew-drawer");let o=t.ref(n.visible),s=t.ref(!1);t.watch((()=>n.visible),(e=>{o.value=e,setTimeout((()=>{s.value=e}),100)}));const a=()=>{s.value=!1,setTimeout((()=>{i("update:visible",!1)}),100)};return(e,i)=>(t.openBlock(),t.createBlock(t.Teleport,{to:"#lew-drawer"},[t.createVNode(t.Transition,{name:"fade"},{default:t.withCtx((()=>[t.unref(o)?(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass(["lew-drawer",{"lew-drawer-show":t.unref(s)}]),onClick:a},[t.createElementVNode("div",{style:t.normalizeStyle(t.unref(Jo)(e.position,e.width,e.height)),class:t.normalizeClass(["lew-drawer-main",t.unref(Qo)(e.position)]),onClick:i[0]||(i[0]=t.withModifiers((()=>{}),["stop"]))},[t.renderSlot(e.$slots,"default")],6)],2)):t.createCommentVNode("v-if",!0)])),_:3})]))}}),[["__file","C:/Users/10570/Desktop/30secWorkSpace/Lew-UI/packages/components/drawer/src/LewDrawer.vue"]]);const ts=["href"],is=["round","src"];var ns=i(t.defineComponent({__name:"LewFancyImage",props:{round:{type:Boolean,default:!1},src:{type:String,default:""},alt:{type:String,default:""}},setup:e=>(i,n)=>(t.openBlock(),t.createElementBlock("a",{class:"lew-fancy-img","data-fancybox":"gallery",href:e.src},[t.createElementVNode("img",{round:e.round,src:e.src},null,8,is)],8,ts))}),[["__scopeId","data-v-68377446"],["__file","C:/Users/10570/Desktop/30secWorkSpace/Lew-UI/packages/components/fancybox/src/LewFancyImage.vue"]]);const os=e=>"object"==typeof e&&null!==e&&e.constructor===Object&&"[object Object]"===Object.prototype.toString.call(e),ss=(...e)=>{let t=!1;"boolean"==typeof e[0]&&(t=e.shift());let i=e[0];if(!i||"object"!=typeof i)throw new Error("extendee must be an object");const n=e.slice(1),o=n.length;for(let s=0;s<o;s++){const e=n[s];for(let n in e)if(e.hasOwnProperty(n)){const o=e[n];if(t&&(Array.isArray(o)||os(o))){const e=Array.isArray(o)?[]:{};i[n]=ss(!0,i.hasOwnProperty(n)?i[n]:e,o)}else i[n]=o}}return i},as=(e,t=1e4)=>(e=parseFloat(e)||0,Math.round((e+Number.EPSILON)*t)/t),rs=function(e){return!!(e&&"object"==typeof e&&e instanceof Element&&e!==document.body)&&!e.__Panzoom&&(function(e){const t=getComputedStyle(e)["overflow-y"],i=getComputedStyle(e)["overflow-x"],n=("scroll"===t||"auto"===t)&&Math.abs(e.scrollHeight-e.clientHeight)>1,o=("scroll"===i||"auto"===i)&&Math.abs(e.scrollWidth-e.clientWidth)>1;return n||o}(e)?e:rs(e.parentNode))},ls="undefined"!=typeof window&&window.ResizeObserver||class{constructor(e){this.observables=[],this.boundCheck=this.check.bind(this),this.boundCheck(),this.callback=e}observe(e){if(this.observables.some((t=>t.el===e)))return;const t={el:e,size:{height:e.clientHeight,width:e.clientWidth}};this.observables.push(t)}unobserve(e){this.observables=this.observables.filter((t=>t.el!==e))}disconnect(){this.observables=[]}check(){const e=this.observables.filter((e=>{const t=e.el.clientHeight,i=e.el.clientWidth;if(e.size.height!==t||e.size.width!==i)return e.size.height=t,e.size.width=i,!0})).map((e=>e.el));e.length>0&&this.callback(e),window.requestAnimationFrame(this.boundCheck)}};class cs{constructor(e){this.id=self.Touch&&e instanceof Touch?e.identifier:-1,this.pageX=e.pageX,this.pageY=e.pageY,this.clientX=e.clientX,this.clientY=e.clientY}}const ds=(e,t)=>t?Math.sqrt((t.clientX-e.clientX)**2+(t.clientY-e.clientY)**2):0,us=(e,t)=>t?{clientX:(e.clientX+t.clientX)/2,clientY:(e.clientY+t.clientY)/2}:e;class hs{constructor(e,{start:t=(()=>!0),move:i=(()=>{}),end:n=(()=>{})}={}){this._element=e,this.startPointers=[],this.currentPointers=[],this._pointerStart=e=>{if(e.buttons>0&&0!==e.button)return;const t=new cs(e);this.currentPointers.some((e=>e.id===t.id))||this._triggerPointerStart(t,e)&&(window.addEventListener("mousemove",this._move),window.addEventListener("mouseup",this._pointerEnd))},this._touchStart=e=>{for(const t of Array.from(e.changedTouches||[]))this._triggerPointerStart(new cs(t),e)},this._move=e=>{const t=this.currentPointers.slice(),i="changedTouches"in e?Array.from(e.changedTouches).map((e=>new cs(e))):[new cs(e)];for(const n of i){const e=this.currentPointers.findIndex((e=>e.id===n.id));e<0||(this.currentPointers[e]=n)}this._moveCallback(t,this.currentPointers.slice(),e)},this._triggerPointerEnd=(e,t)=>{const i=this.currentPointers.findIndex((t=>t.id===e.id));return!(i<0||(this.currentPointers.splice(i,1),this.startPointers.splice(i,1),this._endCallback(e,t),0))},this._pointerEnd=e=>{e.buttons>0&&0!==e.button||this._triggerPointerEnd(new cs(e),e)&&(window.removeEventListener("mousemove",this._move,{passive:!1}),window.removeEventListener("mouseup",this._pointerEnd,{passive:!1}))},this._touchEnd=e=>{for(const t of Array.from(e.changedTouches||[]))this._triggerPointerEnd(new cs(t),e)},this._startCallback=t,this._moveCallback=i,this._endCallback=n,this._element.addEventListener("mousedown",this._pointerStart,{passive:!1}),this._element.addEventListener("touchstart",this._touchStart,{passive:!1}),this._element.addEventListener("touchmove",this._move,{passive:!1}),this._element.addEventListener("touchend",this._touchEnd),this._element.addEventListener("touchcancel",this._touchEnd)}stop(){this._element.removeEventListener("mousedown",this._pointerStart,{passive:!1}),this._element.removeEventListener("touchstart",this._touchStart,{passive:!1}),this._element.removeEventListener("touchmove",this._move,{passive:!1}),this._element.removeEventListener("touchend",this._touchEnd),this._element.removeEventListener("touchcancel",this._touchEnd),window.removeEventListener("mousemove",this._move),window.removeEventListener("mouseup",this._pointerEnd)}_triggerPointerStart(e,t){return!!this._startCallback(e,t)&&(this.currentPointers.push(e),this.startPointers.push(e),!0)}}class ps{constructor(e={}){this.options=ss(!0,{},e),this.plugins=[],this.events={};for(const t of["on","once"])for(const e of Object.entries(this.options[t]||{}))this[t](...e)}option(e,t,...i){let n=(o=e=String(e),s=this.options,o.split(".").reduce((function(e,t){return e&&e[t]}),s));var o,s;return"function"==typeof n&&(n=n.call(this,this,...i)),void 0===n?t:n}localize(e,t=[]){return(e=String(e).replace(/\{\{(\w+).?(\w+)?\}\}/g,((e,i,n)=>{let o="";n?o=this.option(`${i[0]+i.toLowerCase().substring(1)}.l10n.${n}`):i&&(o=this.option(`l10n.${i}`)),o||(o=e);for(let s=0;s<t.length;s++)o=o.split(t[s][0]).join(t[s][1]);return o}))).replace(/\{\{(.*)\}\}/,((e,t)=>t))}on(e,t){if(os(e)){for(const t of Object.entries(e))this.on(...t);return this}return String(e).split(" ").forEach((e=>{const i=this.events[e]=this.events[e]||[];-1==i.indexOf(t)&&i.push(t)})),this}once(e,t){if(os(e)){for(const t of Object.entries(e))this.once(...t);return this}return String(e).split(" ").forEach((e=>{const i=(...n)=>{this.off(e,i),t.call(this,this,...n)};i._=t,this.on(e,i)})),this}off(e,t){if(!os(e))return e.split(" ").forEach((e=>{const i=this.events[e];if(!i||!i.length)return this;let n=-1;for(let o=0,s=i.length;o<s;o++){const e=i[o];if(e&&(e===t||e._===t)){n=o;break}}-1!=n&&i.splice(n,1)})),this;for(const i of Object.entries(e))this.off(...i)}trigger(e,...t){for(const i of[...this.events[e]||[]].slice())if(i&&!1===i.call(this,this,...t))return!1;for(const i of[...this.events["*"]||[]].slice())if(i&&!1===i.call(this,e,this,...t))return!1;return!0}attachPlugins(e){const t={};for(const[i,n]of Object.entries(e||{}))!1===this.options[i]||this.plugins[i]||(this.options[i]=ss({},n.defaults||{},this.options[i]),t[i]=new n(this));for(const[i,n]of Object.entries(t))n.attach(this);return this.plugins=Object.assign({},this.plugins,t),this}detachPlugins(){for(const e in this.plugins){let t;(t=this.plugins[e])&&"function"==typeof t.detach&&t.detach(this)}return this.plugins={},this}}const ms={touch:!0,zoom:!0,pinchToZoom:!0,panOnlyZoomed:!1,lockAxis:!1,friction:.64,decelFriction:.88,zoomFriction:.74,bounceForce:.2,baseScale:1,minScale:1,maxScale:2,step:.5,textSelection:!1,click:"toggleZoom",wheel:"zoom",wheelFactor:42,wheelLimit:5,draggableClass:"is-draggable",draggingClass:"is-dragging",ratio:1};class fs extends ps{constructor(e,t={}){super(ss(!0,{},ms,t)),this.state="init",this.$container=e;for(const i of["onLoad","onWheel","onClick"])this[i]=this[i].bind(this);this.initLayout(),this.resetValues(),this.attachPlugins(fs.Plugins),this.trigger("init"),this.updateMetrics(),this.attachEvents(),this.trigger("ready"),!1===this.option("centerOnStart")?this.state="ready":this.panTo({friction:0}),e.__Panzoom=this}initLayout(){const e=this.$container;if(!(e instanceof HTMLElement))throw new Error("Panzoom: Container not found");const t=this.option("content")||e.querySelector(".panzoom__content");if(!t)throw new Error("Panzoom: Content not found");this.$content=t;let i=this.option("viewport")||e.querySelector(".panzoom__viewport");i||!1===this.option("wrapInner")||(i=document.createElement("div"),i.classList.add("panzoom__viewport"),i.append(...e.childNodes),e.appendChild(i)),this.$viewport=i||t.parentNode}resetValues(){this.updateRate=this.option("updateRate",/iPhone|iPad|iPod|Android/i.test(navigator.userAgent)?250:24),this.container={width:0,height:0},this.viewport={width:0,height:0},this.content={origWidth:0,origHeight:0,width:0,height:0,x:this.option("x",0),y:this.option("y",0),scale:this.option("baseScale")},this.transform={x:0,y:0,scale:1},this.resetDragPosition()}onLoad(e){this.updateMetrics(),this.panTo({scale:this.option("baseScale"),friction:0}),this.trigger("load",e)}onClick(e){if(e.defaultPrevented)return;if(document.activeElement&&document.activeElement.closest("[contenteditable]"))return;if(this.option("textSelection")&&window.getSelection().toString().length&&(!e.target||!e.target.hasAttribute("data-fancybox-close")))return void e.stopPropagation();const t=this.$content.getClientRects()[0];if("ready"!==this.state&&(this.dragPosition.midPoint||Math.abs(t.top-this.dragStart.rect.top)>1||Math.abs(t.left-this.dragStart.rect.left)>1))return e.preventDefault(),void e.stopPropagation();!1!==this.trigger("click",e)&&this.option("zoom")&&"toggleZoom"===this.option("click")&&(e.preventDefault(),e.stopPropagation(),this.zoomWithClick(e))}onWheel(e){!1!==this.trigger("wheel",e)&&this.option("zoom")&&this.option("wheel")&&this.zoomWithWheel(e)}zoomWithWheel(e){void 0===this.changedDelta&&(this.changedDelta=0);const t=Math.max(-1,Math.min(1,-e.deltaY||-e.deltaX||e.wheelDelta||-e.detail)),i=this.content.scale;let n=i*(100+t*this.option("wheelFactor"))/100;if(t<0&&Math.abs(i-this.option("minScale"))<.01||t>0&&Math.abs(i-this.option("maxScale"))<.01?(this.changedDelta+=Math.abs(t),n=i):(this.changedDelta=0,n=Math.max(Math.min(n,this.option("maxScale")),this.option("minScale"))),this.changedDelta>this.option("wheelLimit"))return;if(e.preventDefault(),n===i)return;const o=this.$content.getBoundingClientRect(),s=e.clientX-o.left,a=e.clientY-o.top;this.zoomTo(n,{x:s,y:a})}zoomWithClick(e){const t=this.$content.getClientRects()[0],i=e.clientX-t.left,n=e.clientY-t.top;this.toggleZoom({x:i,y:n})}attachEvents(){this.$content.addEventListener("load",this.onLoad),this.$container.addEventListener("wheel",this.onWheel,{passive:!1}),this.$container.addEventListener("click",this.onClick,{passive:!1}),this.initObserver();const e=new hs(this.$container,{start:(t,i)=>{if(!this.option("touch"))return!1;if(this.velocity.scale<0)return!1;const n=i.composedPath()[0];if(!e.currentPointers.length){if(-1!==["BUTTON","TEXTAREA","OPTION","INPUT","SELECT","VIDEO"].indexOf(n.nodeName))return!1;if(this.option("textSelection")&&((e,t,i)=>{const n=e.childNodes,o=document.createRange();for(let s=0;s<n.length;s++){const e=n[s];if(e.nodeType!==Node.TEXT_NODE)continue;o.selectNodeContents(e);const a=o.getBoundingClientRect();if(t>=a.left&&i>=a.top&&t<=a.right&&i<=a.bottom)return e}return!1})(n,t.clientX,t.clientY))return!1}return!rs(n)&&!1!==this.trigger("touchStart",i)&&("mousedown"===i.type&&i.preventDefault(),this.state="pointerdown",this.resetDragPosition(),this.dragPosition.midPoint=null,this.dragPosition.time=Date.now(),!0)},move:(t,i,n)=>{if("pointerdown"!==this.state)return;if(!1===this.trigger("touchMove",n))return void n.preventDefault();if(i.length<2&&!0===this.option("panOnlyZoomed")&&this.content.width<=this.viewport.width&&this.content.height<=this.viewport.height&&this.transform.scale<=this.option("baseScale"))return;if(i.length>1&&(!this.option("zoom")||!1===this.option("pinchToZoom")))return;const o=us(t[0],t[1]),s=us(i[0],i[1]),a=s.clientX-o.clientX,r=s.clientY-o.clientY,l=ds(t[0],t[1]),c=ds(i[0],i[1]),d=l&&c?c/l:1;this.dragOffset.x+=a,this.dragOffset.y+=r,this.dragOffset.scale*=d,this.dragOffset.time=Date.now()-this.dragPosition.time;const u=1===this.dragStart.scale&&this.option("lockAxis");if(u&&!this.lockAxis){if(Math.abs(this.dragOffset.x)<6&&Math.abs(this.dragOffset.y)<6)return void n.preventDefault();const e=Math.abs(180*Math.atan2(this.dragOffset.y,this.dragOffset.x)/Math.PI);this.lockAxis=e>45&&e<135?"y":"x"}if("xy"===u||"y"!==this.lockAxis){if(n.preventDefault(),n.stopPropagation(),n.stopImmediatePropagation(),this.lockAxis&&(this.dragOffset["x"===this.lockAxis?"y":"x"]=0),this.$container.classList.add(this.option("draggingClass")),this.transform.scale===this.option("baseScale")&&"y"===this.lockAxis||(this.dragPosition.x=this.dragStart.x+this.dragOffset.x),this.transform.scale===this.option("baseScale")&&"x"===this.lockAxis||(this.dragPosition.y=this.dragStart.y+this.dragOffset.y),this.dragPosition.scale=this.dragStart.scale*this.dragOffset.scale,i.length>1){const t=us(e.startPointers[0],e.startPointers[1]),i=t.clientX-this.dragStart.rect.x,n=t.clientY-this.dragStart.rect.y,{deltaX:o,deltaY:a}=this.getZoomDelta(this.content.scale*this.dragOffset.scale,i,n);this.dragPosition.x-=o,this.dragPosition.y-=a,this.dragPosition.midPoint=s}else this.setDragResistance();this.transform={x:this.dragPosition.x,y:this.dragPosition.y,scale:this.dragPosition.scale},this.startAnimation()}},end:(t,i)=>{if("pointerdown"!==this.state)return;if(this._dragOffset={...this.dragOffset},e.currentPointers.length)return void this.resetDragPosition();if(this.state="decel",this.friction=this.option("decelFriction"),this.recalculateTransform(),this.$container.classList.remove(this.option("draggingClass")),!1===this.trigger("touchEnd",i))return;if("decel"!==this.state)return;const n=this.option("minScale");if(this.transform.scale<n)return void this.zoomTo(n,{friction:.64});const o=this.option("maxScale");if(this.transform.scale-o>.01){const e=this.dragPosition.midPoint||t,i=this.$content.getClientRects()[0];this.zoomTo(o,{friction:.64,x:e.clientX-i.left,y:e.clientY-i.top})}}});this.pointerTracker=e}initObserver(){this.resizeObserver||(this.resizeObserver=new ls((()=>{this.updateTimer||(this.updateTimer=setTimeout((()=>{const e=this.$container.getBoundingClientRect();e.width&&e.height?((Math.abs(e.width-this.container.width)>1||Math.abs(e.height-this.container.height)>1)&&(this.isAnimating()&&this.endAnimation(!0),this.updateMetrics(),this.panTo({x:this.content.x,y:this.content.y,scale:this.option("baseScale"),friction:0})),this.updateTimer=null):this.updateTimer=null}),this.updateRate))})),this.resizeObserver.observe(this.$container))}resetDragPosition(){this.lockAxis=null,this.friction=this.option("friction"),this.velocity={x:0,y:0,scale:0};const{x:e,y:t,scale:i}=this.content;this.dragStart={rect:this.$content.getBoundingClientRect(),x:e,y:t,scale:i},this.dragPosition={...this.dragPosition,x:e,y:t,scale:i},this.dragOffset={x:0,y:0,scale:1,time:0}}updateMetrics(e){!0!==e&&this.trigger("beforeUpdate");const t=this.$container,i=this.$content,n=this.$viewport,o=i instanceof HTMLImageElement,s=this.option("zoom"),a=this.option("resizeParent",s);let r=this.option("width"),l=this.option("height"),c=r||(d=i,Math.max(parseFloat(d.naturalWidth||0),parseFloat(d.width&&d.width.baseVal&&d.width.baseVal.value||0),parseFloat(d.offsetWidth||0),parseFloat(d.scrollWidth||0)));var d;let u=l||(h=i,Math.max(parseFloat(h.naturalHeight||0),parseFloat(h.height&&h.height.baseVal&&h.height.baseVal.value||0),parseFloat(h.offsetHeight||0),parseFloat(h.scrollHeight||0)));var h;Object.assign(i.style,{width:r?`${r}px`:"",height:l?`${l}px`:"",maxWidth:"",maxHeight:""}),a&&Object.assign(n.style,{width:"",height:""});const p=this.option("ratio");c=as(c*p),u=as(u*p),r=c,l=u;const m=i.getBoundingClientRect(),f=n.getBoundingClientRect(),g=n==t?f:t.getBoundingClientRect();let y=Math.max(n.offsetWidth,as(f.width)),v=Math.max(n.offsetHeight,as(f.height)),b=window.getComputedStyle(n);if(y-=parseFloat(b.paddingLeft)+parseFloat(b.paddingRight),v-=parseFloat(b.paddingTop)+parseFloat(b.paddingBottom),this.viewport.width=y,this.viewport.height=v,s){if(Math.abs(c-m.width)>.1||Math.abs(u-m.height)>.1){const e=((e,t,i,n)=>{const o=Math.min(i/e||0,n/t);return{width:e*o||0,height:t*o||0}})(c,u,Math.min(c,m.width),Math.min(u,m.height));r=as(e.width),l=as(e.height)}Object.assign(i.style,{width:`${r}px`,height:`${l}px`,transform:""})}if(a&&(Object.assign(n.style,{width:`${r}px`,height:`${l}px`}),this.viewport={...this.viewport,width:r,height:l}),o&&s&&"function"!=typeof this.options.maxScale){const e=this.option("maxScale");this.options.maxScale=function(){return this.content.origWidth>0&&this.content.fitWidth>0?this.content.origWidth/this.content.fitWidth:e}}this.content={...this.content,origWidth:c,origHeight:u,fitWidth:r,fitHeight:l,width:r,height:l,scale:1,isZoomable:s},this.container={width:g.width,height:g.height},!0!==e&&this.trigger("afterUpdate")}zoomIn(e){this.zoomTo(this.content.scale+(e||this.option("step")))}zoomOut(e){this.zoomTo(this.content.scale-(e||this.option("step")))}toggleZoom(e={}){const t=this.option("maxScale"),i=this.option("baseScale"),n=this.content.scale>i+.5*(t-i)?i:t;this.zoomTo(n,e)}zoomTo(e=this.option("baseScale"),{x:t=null,y:i=null}={}){e=Math.max(Math.min(e,this.option("maxScale")),this.option("minScale"));const n=as(this.content.scale/(this.content.width/this.content.fitWidth),1e7);null===t&&(t=this.content.width*n*.5),null===i&&(i=this.content.height*n*.5);const{deltaX:o,deltaY:s}=this.getZoomDelta(e,t,i);t=this.content.x-o,i=this.content.y-s,this.panTo({x:t,y:i,scale:e,friction:this.option("zoomFriction")})}getZoomDelta(e,t=0,i=0){const n=this.content.fitWidth*this.content.scale,o=this.content.fitHeight*this.content.scale,s=t>0&&n?t/n:0,a=i>0&&o?i/o:0;return{deltaX:(this.content.fitWidth*e-n)*s,deltaY:(this.content.fitHeight*e-o)*a}}panTo({x:e=this.content.x,y:t=this.content.y,scale:i,friction:n=this.option("friction"),ignoreBounds:o=!1}={}){if(i=i||this.content.scale||1,!o){const{boundX:n,boundY:o}=this.getBounds(i);n&&(e=Math.max(Math.min(e,n.to),n.from)),o&&(t=Math.max(Math.min(t,o.to),o.from))}this.friction=n,this.transform={...this.transform,x:e,y:t,scale:i},n?(this.state="panning",this.velocity={x:(1/this.friction-1)*(e-this.content.x),y:(1/this.friction-1)*(t-this.content.y),scale:(1/this.friction-1)*(i-this.content.scale)},this.startAnimation()):this.endAnimation()}startAnimation(){this.rAF?cancelAnimationFrame(this.rAF):this.trigger("startAnimation"),this.rAF=requestAnimationFrame((()=>this.animate()))}animate(){if(this.setEdgeForce(),this.setDragForce(),this.velocity.x*=this.friction,this.velocity.y*=this.friction,this.velocity.scale*=this.friction,this.content.x+=this.velocity.x,this.content.y+=this.velocity.y,this.content.scale+=this.velocity.scale,this.isAnimating())this.setTransform();else if("pointerdown"!==this.state)return void this.endAnimation();this.rAF=requestAnimationFrame((()=>this.animate()))}getBounds(e){let t=this.boundX,i=this.boundY;if(void 0!==t&&void 0!==i)return{boundX:t,boundY:i};t={from:0,to:0},i={from:0,to:0},e=e||this.transform.scale;const n=this.content.fitWidth*e,o=this.content.fitHeight*e,s=this.viewport.width,a=this.viewport.height;if(n<s){const e=as(.5*(s-n));t.from=e,t.to=e}else t.from=as(s-n);if(o<a){const e=.5*(a-o);i.from=e,i.to=e}else i.from=as(a-o);return{boundX:t,boundY:i}}setEdgeForce(){if("decel"!==this.state)return;const e=this.option("bounceForce"),{boundX:t,boundY:i}=this.getBounds(Math.max(this.transform.scale,this.content.scale));let n,o,s,a;if(t&&(n=this.content.x<t.from,o=this.content.x>t.to),i&&(s=this.content.y<i.from,a=this.content.y>i.to),n||o){let i=((n?t.from:t.to)-this.content.x)*e;const o=this.content.x+(this.velocity.x+i)/this.friction;o>=t.from&&o<=t.to&&(i+=this.velocity.x),this.velocity.x=i,this.recalculateTransform()}if(s||a){let t=((s?i.from:i.to)-this.content.y)*e;const n=this.content.y+(t+this.velocity.y)/this.friction;n>=i.from&&n<=i.to&&(t+=this.velocity.y),this.velocity.y=t,this.recalculateTransform()}}setDragResistance(){if("pointerdown"!==this.state)return;const{boundX:e,boundY:t}=this.getBounds(this.dragPosition.scale);let i,n,o,s;if(e&&(i=this.dragPosition.x<e.from,n=this.dragPosition.x>e.to),t&&(o=this.dragPosition.y<t.from,s=this.dragPosition.y>t.to),(i||n)&&(!i||!n)){const t=i?e.from:e.to,n=t-this.dragPosition.x;this.dragPosition.x=t-.3*n}if((o||s)&&(!o||!s)){const e=o?t.from:t.to,i=e-this.dragPosition.y;this.dragPosition.y=e-.3*i}}setDragForce(){"pointerdown"===this.state&&(this.velocity.x=this.dragPosition.x-this.content.x,this.velocity.y=this.dragPosition.y-this.content.y,this.velocity.scale=this.dragPosition.scale-this.content.scale)}recalculateTransform(){this.transform.x=this.content.x+this.velocity.x/(1/this.friction-1),this.transform.y=this.content.y+this.velocity.y/(1/this.friction-1),this.transform.scale=this.content.scale+this.velocity.scale/(1/this.friction-1)}isAnimating(){return!(!this.friction||!(Math.abs(this.velocity.x)>.05||Math.abs(this.velocity.y)>.05||Math.abs(this.velocity.scale)>.05))}setTransform(e){let t,i,n;if(e?(t=as(this.transform.x),i=as(this.transform.y),n=this.transform.scale,this.content={...this.content,x:t,y:i,scale:n}):(t=as(this.content.x),i=as(this.content.y),n=this.content.scale/(this.content.width/this.content.fitWidth),this.content={...this.content,x:t,y:i}),this.trigger("beforeTransform"),t=as(this.content.x),i=as(this.content.y),e&&this.option("zoom")){let e,o;e=as(this.content.fitWidth*n),o=as(this.content.fitHeight*n),this.content.width=e,this.content.height=o,this.transform={...this.transform,width:e,height:o,scale:n},Object.assign(this.$content.style,{width:`${e}px`,height:`${o}px`,maxWidth:"none",maxHeight:"none",transform:`translate3d(${t}px, ${i}px, 0) scale(1)`})}else this.$content.style.transform=`translate3d(${t}px, ${i}px, 0) scale(${n})`;this.trigger("afterTransform")}endAnimation(e){cancelAnimationFrame(this.rAF),this.rAF=null,this.velocity={x:0,y:0,scale:0},this.setTransform(!0),this.state="ready",this.handleCursor(),!0!==e&&this.trigger("endAnimation")}handleCursor(){const e=this.option("draggableClass");e&&this.option("touch")&&(1==this.option("panOnlyZoomed")&&this.content.width<=this.viewport.width&&this.content.height<=this.viewport.height&&this.transform.scale<=this.option("baseScale")?this.$container.classList.remove(e):this.$container.classList.add(e))}detachEvents(){this.$content.removeEventListener("load",this.onLoad),this.$container.removeEventListener("wheel",this.onWheel,{passive:!1}),this.$container.removeEventListener("click",this.onClick,{passive:!1}),this.pointerTracker&&(this.pointerTracker.stop(),this.pointerTracker=null),this.resizeObserver&&(this.resizeObserver.disconnect(),this.resizeObserver=null)}destroy(){"destroy"!==this.state&&(this.state="destroy",clearTimeout(this.updateTimer),this.updateTimer=null,cancelAnimationFrame(this.rAF),this.rAF=null,this.detachEvents(),this.detachPlugins(),this.resetDragPosition())}}fs.version="4.0.29",fs.Plugins={};const gs=(e,t)=>{let i=0;return function(...n){const o=(new Date).getTime();if(!(o-i<t))return i=o,e(...n)}};class ys{constructor(e){this.$container=null,this.$prev=null,this.$next=null,this.carousel=e,this.onRefresh=this.onRefresh.bind(this)}option(e){return this.carousel.option(`Navigation.${e}`)}createButton(e){const t=document.createElement("button");t.setAttribute("title",this.carousel.localize(`{{${e.toUpperCase()}}}`));const i=this.option("classNames.button")+" "+this.option(`classNames.${e}`);return t.classList.add(...i.split(" ")),t.setAttribute("tabindex","0"),t.innerHTML=this.carousel.localize(this.option(`${e}Tpl`)),t.addEventListener("click",(t=>{t.preventDefault(),t.stopPropagation(),this.carousel["slide"+("next"===e?"Next":"Prev")]()})),t}build(){this.$container||(this.$container=document.createElement("div"),this.$container.classList.add(...this.option("classNames.main").split(" ")),this.carousel.$container.appendChild(this.$container)),this.$next||(this.$next=this.createButton("next"),this.$container.appendChild(this.$next)),this.$prev||(this.$prev=this.createButton("prev"),this.$container.appendChild(this.$prev))}onRefresh(){const e=this.carousel.pages.length;e<=1||e>1&&this.carousel.elemDimWidth<this.carousel.wrapDimWidth&&!Number.isInteger(this.carousel.option("slidesPerPage"))?this.cleanup():(this.build(),this.$prev.removeAttribute("disabled"),this.$next.removeAttribute("disabled"),this.carousel.option("infiniteX",this.carousel.option("infinite"))||(this.carousel.page<=0&&this.$prev.setAttribute("disabled",""),this.carousel.page>=e-1&&this.$next.setAttribute("disabled","")))}cleanup(){this.$prev&&this.$prev.remove(),this.$prev=null,this.$next&&this.$next.remove(),this.$next=null,this.$container&&this.$container.remove(),this.$container=null}attach(){this.carousel.on("refresh change",this.onRefresh)}detach(){this.carousel.off("refresh change",this.onRefresh),this.cleanup()}}ys.defaults={prevTpl:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" tabindex="-1"><path d="M15 3l-9 9 9 9"/></svg>',nextTpl:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" tabindex="-1"><path d="M9 3l9 9-9 9"/></svg>',classNames:{main:"carousel__nav",button:"carousel__button",next:"is-next",prev:"is-prev"}};class vs{constructor(e){this.carousel=e,this.selectedIndex=null,this.friction=0,this.onNavReady=this.onNavReady.bind(this),this.onNavClick=this.onNavClick.bind(this),this.onNavCreateSlide=this.onNavCreateSlide.bind(this),this.onTargetChange=this.onTargetChange.bind(this)}addAsTargetFor(e){this.target=this.carousel,this.nav=e,this.attachEvents()}addAsNavFor(e){this.target=e,this.nav=this.carousel,this.attachEvents()}attachEvents(){this.nav.options.initialSlide=this.target.options.initialPage,this.nav.on("ready",this.onNavReady),this.nav.on("createSlide",this.onNavCreateSlide),this.nav.on("Panzoom.click",this.onNavClick),this.target.on("change",this.onTargetChange),this.target.on("Panzoom.afterUpdate",this.onTargetChange)}onNavReady(){this.onTargetChange(!0)}onNavClick(e,t,i){const n=i.target.closest(".carousel__slide");if(!n)return;i.stopPropagation();const o=parseInt(n.dataset.index,10),s=this.target.findPageForSlide(o);this.target.page!==s&&this.target.slideTo(s,{friction:this.friction}),this.markSelectedSlide(o)}onNavCreateSlide(e,t){t.index===this.selectedIndex&&this.markSelectedSlide(t.index)}onTargetChange(){const e=this.target.pages[this.target.page].indexes[0],t=this.nav.findPageForSlide(e);this.nav.slideTo(t),this.markSelectedSlide(e)}markSelectedSlide(e){this.selectedIndex=e,[...this.nav.slides].filter((e=>e.$el&&e.$el.classList.remove("is-nav-selected")));const t=this.nav.slides[e];t&&t.$el&&t.$el.classList.add("is-nav-selected")}attach(e){const t=e.options.Sync;(t.target||t.nav)&&(t.target?this.addAsNavFor(t.target):t.nav&&this.addAsTargetFor(t.nav),this.friction=t.friction)}detach(){this.nav&&(this.nav.off("ready",this.onNavReady),this.nav.off("Panzoom.click",this.onNavClick),this.nav.off("createSlide",this.onNavCreateSlide)),this.target&&(this.target.off("Panzoom.afterUpdate",this.onTargetChange),this.target.off("change",this.onTargetChange))}}vs.defaults={friction:.92};const bs={Navigation:ys,Dots:class{constructor(e){this.carousel=e,this.$list=null,this.events={change:this.onChange.bind(this),refresh:this.onRefresh.bind(this)}}buildList(){if(this.carousel.pages.length<this.carousel.option("Dots.minSlideCount"))return;const e=document.createElement("ol");return e.classList.add("carousel__dots"),e.addEventListener("click",(e=>{if(!("page"in e.target.dataset))return;e.preventDefault(),e.stopPropagation();const t=parseInt(e.target.dataset.page,10),i=this.carousel;t!==i.page&&(i.pages.length<3&&i.option("infinite")?i[0==t?"slidePrev":"slideNext"]():i.slideTo(t))})),this.$list=e,this.carousel.$container.appendChild(e),this.carousel.$container.classList.add("has-dots"),e}removeList(){this.$list&&(this.$list.parentNode.removeChild(this.$list),this.$list=null),this.carousel.$container.classList.remove("has-dots")}rebuildDots(){let e=this.$list;const t=!!e,i=this.carousel.pages.length;if(i<2)return void(t&&this.removeList());t||(e=this.buildList());const n=this.$list.children.length;if(n>i)for(let o=i;o<n;o++)this.$list.removeChild(this.$list.lastChild);else{for(let e=n;e<i;e++){const t=document.createElement("li");t.classList.add("carousel__dot"),t.dataset.page=e,t.setAttribute("role","button"),t.setAttribute("tabindex","0"),t.setAttribute("title",this.carousel.localize("{{GOTO}}",[["%d",e+1]])),t.addEventListener("keydown",(e=>{const i=e.code;let n;"Enter"===i||"NumpadEnter"===i?n=t:"ArrowRight"===i?n=t.nextSibling:"ArrowLeft"===i&&(n=t.previousSibling),n&&n.click()})),this.$list.appendChild(t)}this.setActiveDot()}}setActiveDot(){if(!this.$list)return;this.$list.childNodes.forEach((e=>{e.classList.remove("is-selected")}));const e=this.$list.childNodes[this.carousel.page];e&&e.classList.add("is-selected")}onChange(){this.setActiveDot()}onRefresh(){this.rebuildDots()}attach(){this.carousel.on(this.events)}detach(){this.removeList(),this.carousel.off(this.events),this.carousel=null}},Sync:vs},ws={slides:[],preload:0,slidesPerPage:"auto",initialPage:null,initialSlide:null,friction:.92,center:!0,infinite:!0,fill:!0,dragFree:!1,prefix:"",classNames:{viewport:"carousel__viewport",track:"carousel__track",slide:"carousel__slide",slideSelected:"is-selected"},l10n:{NEXT:"Next slide",PREV:"Previous slide",GOTO:"Go to slide #%d"}};class ks extends ps{constructor(e,t={}){if(super(t=ss(!0,{},ws,t)),this.state="init",this.$container=e,!(this.$container instanceof HTMLElement))throw new Error("No root element provided");this.slideNext=gs(this.slideNext.bind(this),250),this.slidePrev=gs(this.slidePrev.bind(this),250),this.init(),e.__Carousel=this}init(){this.pages=[],this.page=this.pageIndex=null,this.prevPage=this.prevPageIndex=null,this.attachPlugins(ks.Plugins),this.trigger("init"),this.initLayout(),this.initSlides(),this.updateMetrics(),this.$track&&this.pages.length&&(this.$track.style.transform=`translate3d(${-1*this.pages[this.page].left}px, 0px, 0) scale(1)`),this.manageSlideVisiblity(),this.initPanzoom(),this.state="ready",this.trigger("ready")}initLayout(){const e=this.option("prefix"),t=this.option("classNames");this.$viewport=this.option("viewport")||this.$container.querySelector(`.${e}${t.viewport}`),this.$viewport||(this.$viewport=document.createElement("div"),this.$viewport.classList.add(...(e+t.viewport).split(" ")),this.$viewport.append(...this.$container.childNodes),this.$container.appendChild(this.$viewport)),this.$track=this.option("track")||this.$container.querySelector(`.${e}${t.track}`),this.$track||(this.$track=document.createElement("div"),this.$track.classList.add(...(e+t.track).split(" ")),this.$track.append(...this.$viewport.childNodes),this.$viewport.appendChild(this.$track))}initSlides(){this.slides=[],this.$viewport.querySelectorAll(`.${this.option("prefix")}${this.option("classNames.slide")}`).forEach((e=>{const t={$el:e,isDom:!0};this.slides.push(t),this.trigger("createSlide",t,this.slides.length)})),Array.isArray(this.options.slides)&&(this.slides=ss(!0,[...this.slides],this.options.slides))}updateMetrics(){let e,t=0,i=[];this.slides.forEach(((n,o)=>{const s=n.$el,a=n.isDom||!e?this.getSlideMetrics(s):e;n.index=o,n.width=a,n.left=t,e=a,t+=a,i.push(o)}));let n=Math.max(this.$track.offsetWidth,as(this.$track.getBoundingClientRect().width)),o=getComputedStyle(this.$track);n-=parseFloat(o.paddingLeft)+parseFloat(o.paddingRight),this.contentWidth=t,this.viewportWidth=n;const s=[],a=this.option("slidesPerPage");if(Number.isInteger(a)&&t>n)for(let h=0;h<this.slides.length;h+=a)s.push({indexes:i.slice(h,h+a),slides:this.slides.slice(h,h+a)});else{let e=0,t=0;for(let i=0;i<this.slides.length;i+=1){let o=this.slides[i];(!s.length||t+o.width>n)&&(s.push({indexes:[],slides:[]}),e=s.length-1,t=0),t+=o.width,s[e].indexes.push(i),s[e].slides.push(o)}}const r=this.option("center"),l=this.option("fill");s.forEach(((e,i)=>{e.index=i,e.width=e.slides.reduce(((e,t)=>e+t.width),0),e.left=e.slides[0].left,r&&(e.left+=.5*(n-e.width)*-1),l&&!this.option("infiniteX",this.option("infinite"))&&t>n&&(e.left=Math.max(e.left,0),e.left=Math.min(e.left,t-n))}));const c=[];let d;s.forEach((e=>{const t={...e};d&&t.left===d.left?(d.width+=t.width,d.slides=[...d.slides,...t.slides],d.indexes=[...d.indexes,...t.indexes]):(t.index=c.length,d=t,c.push(t))})),this.pages=c;let u=this.page;if(null===u){const e=this.option("initialSlide");u=null!==e?this.findPageForSlide(e):parseInt(this.option("initialPage",0),10)||0,c[u]||(u=c.length&&u>c.length?c[c.length-1].index:0),this.page=u,this.pageIndex=u}this.updatePanzoom(),this.trigger("refresh")}getSlideMetrics(e){if(!e){const t=this.slides[0];(e=document.createElement("div")).dataset.isTestEl=1,e.style.visibility="hidden",e.classList.add(...(this.option("prefix")+this.option("classNames.slide")).split(" ")),t.customClass&&e.classList.add(...t.customClass.split(" ")),this.$track.prepend(e)}let t=Math.max(e.offsetWidth,as(e.getBoundingClientRect().width));const i=e.currentStyle||window.getComputedStyle(e);return t=t+(parseFloat(i.marginLeft)||0)+(parseFloat(i.marginRight)||0),e.dataset.isTestEl&&e.remove(),t}findPageForSlide(e){e=parseInt(e,10)||0;const t=this.pages.find((t=>t.indexes.indexOf(e)>-1));return t?t.index:null}slideNext(){this.slideTo(this.pageIndex+1)}slidePrev(){this.slideTo(this.pageIndex-1)}slideTo(e,t={}){const{x:i=-1*this.setPage(e,!0),y:n=0,friction:o=this.option("friction")}=t;this.Panzoom.content.x===i&&!this.Panzoom.velocity.x&&o||(this.Panzoom.panTo({x:i,y:n,friction:o,ignoreBounds:!0}),"ready"===this.state&&"ready"===this.Panzoom.state&&this.trigger("settle"))}initPanzoom(){this.Panzoom&&this.Panzoom.destroy();const e=ss(!0,{},{content:this.$track,wrapInner:!1,resizeParent:!1,zoom:!1,click:!1,lockAxis:"x",x:this.pages.length?-1*this.pages[this.page].left:0,centerOnStart:!1,textSelection:()=>this.option("textSelection",!1),panOnlyZoomed:function(){return this.content.width<=this.viewport.width}},this.option("Panzoom"));this.Panzoom=new fs(this.$container,e),this.Panzoom.on({"*":(e,...t)=>this.trigger(`Panzoom.${e}`,...t),afterUpdate:()=>{this.updatePage()},beforeTransform:this.onBeforeTransform.bind(this),touchEnd:this.onTouchEnd.bind(this),endAnimation:()=>{this.trigger("settle")}}),this.updateMetrics(),this.manageSlideVisiblity()}updatePanzoom(){this.Panzoom&&(this.Panzoom.content={...this.Panzoom.content,fitWidth:this.contentWidth,origWidth:this.contentWidth,width:this.contentWidth},this.pages.length>1&&this.option("infiniteX",this.option("infinite"))?this.Panzoom.boundX=null:this.pages.length&&(this.Panzoom.boundX={from:-1*this.pages[this.pages.length-1].left,to:-1*this.pages[0].left}),this.option("infiniteY",this.option("infinite"))?this.Panzoom.boundY=null:this.Panzoom.boundY={from:0,to:0},this.Panzoom.handleCursor())}manageSlideVisiblity(){const e=this.contentWidth,t=this.viewportWidth;let i=this.Panzoom?-1*this.Panzoom.content.x:this.pages.length?this.pages[this.page].left:0;const n=this.option("preload"),o=this.option("infiniteX",this.option("infinite")),s=parseFloat(getComputedStyle(this.$viewport,null).getPropertyValue("padding-left")),a=parseFloat(getComputedStyle(this.$viewport,null).getPropertyValue("padding-right"));this.slides.forEach((r=>{let l,c,d=0;l=i-s,c=i+t+a,l-=n*(t+s+a),c+=n*(t+s+a);const u=r.left+r.width>l&&r.left<c;l=i+e-s,c=i+e+t+a,l-=n*(t+s+a);const h=o&&r.left+r.width>l&&r.left<c;l=i-e-s,c=i-e+t+a,l-=n*(t+s+a);const p=o&&r.left+r.width>l&&r.left<c;h||u||p?(this.createSlideEl(r),u&&(d=0),h&&(d=-1),p&&(d=1),r.left+r.width>i&&r.left<=i+t+a&&(d=0)):this.removeSlideEl(r),r.hasDiff=d}));let r=0,l=0;this.slides.forEach(((t,i)=>{let n=0;t.$el?(i!==r||t.hasDiff?n=l+t.hasDiff*e:l=0,t.$el.style.left=Math.abs(n)>.1?`${l+t.hasDiff*e}px`:"",r++):l+=t.width})),this.markSelectedSlides()}createSlideEl(e){if(!e)return;if(e.$el){let t=e.$el.dataset.index;if(!t||parseInt(t,10)!==e.index){let t;e.$el.dataset.index=e.index,e.$el.querySelectorAll("[data-lazy-srcset]").forEach((e=>{e.srcset=e.dataset.lazySrcset})),e.$el.querySelectorAll("[data-lazy-src]").forEach((e=>{let t=e.dataset.lazySrc;e instanceof HTMLImageElement?e.src=t:e.style.backgroundImage=`url('${t}')`})),(t=e.$el.dataset.lazySrc)&&(e.$el.style.backgroundImage=`url('${t}')`),e.state="ready"}return}const t=document.createElement("div");t.dataset.index=e.index,t.classList.add(...(this.option("prefix")+this.option("classNames.slide")).split(" ")),e.customClass&&t.classList.add(...e.customClass.split(" ")),e.html&&(t.innerHTML=e.html);const i=[];this.slides.forEach(((e,t)=>{e.$el&&i.push(t)}));const n=e.index;let o=null;if(i.length){let e=i.reduce(((e,t)=>Math.abs(t-n)<Math.abs(e-n)?t:e));o=this.slides[e]}return this.$track.insertBefore(t,o&&o.$el?o.index<e.index?o.$el.nextSibling:o.$el:null),e.$el=t,this.trigger("createSlide",e,n),e}removeSlideEl(e){e.$el&&!e.isDom&&(this.trigger("removeSlide",e),e.$el.remove(),e.$el=null)}markSelectedSlides(){const e=this.option("classNames.slideSelected"),t="aria-hidden";this.slides.forEach(((i,n)=>{const o=i.$el;if(!o)return;const s=this.pages[this.page];s&&s.indexes&&s.indexes.indexOf(n)>-1?(e&&!o.classList.contains(e)&&(o.classList.add(e),this.trigger("selectSlide",i)),o.removeAttribute(t)):(e&&o.classList.contains(e)&&(o.classList.remove(e),this.trigger("unselectSlide",i)),o.setAttribute(t,!0))}))}updatePage(){this.updateMetrics(),this.slideTo(this.page,{friction:0})}onBeforeTransform(){this.option("infiniteX",this.option("infinite"))&&this.manageInfiniteTrack(),this.manageSlideVisiblity()}manageInfiniteTrack(){const e=this.contentWidth,t=this.viewportWidth;if(!this.option("infiniteX",this.option("infinite"))||this.pages.length<2||e<t)return;const i=this.Panzoom;let n=!1;return i.content.x<-1*(e-t)&&(i.content.x+=e,this.pageIndex=this.pageIndex-this.pages.length,n=!0),i.content.x>t&&(i.content.x-=e,this.pageIndex=this.pageIndex+this.pages.length,n=!0),n&&"pointerdown"===i.state&&i.resetDragPosition(),n}onTouchEnd(e,t){const i=this.option("dragFree");if(!i&&this.pages.length>1&&e.dragOffset.time<350&&Math.abs(e.dragOffset.y)<1&&Math.abs(e.dragOffset.x)>5)this[e.dragOffset.x<0?"slideNext":"slidePrev"]();else if(i){const[,t]=this.getPageFromPosition(-1*e.transform.x);this.setPage(t)}else this.slideToClosest()}slideToClosest(e={}){let[,t]=this.getPageFromPosition(-1*this.Panzoom.content.x);this.slideTo(t,e)}getPageFromPosition(e){const t=this.pages.length;this.option("center")&&(e+=.5*this.viewportWidth);const i=Math.floor(e/this.contentWidth);e-=i*this.contentWidth;let n=this.slides.find((t=>t.left<=e&&t.left+t.width>e));if(n){let e=this.findPageForSlide(n.index);return[e,e+i*t]}return[0,0]}setPage(e,t){let i=0,n=parseInt(e,10)||0;const o=this.page,s=this.pageIndex,a=this.pages.length,r=this.contentWidth,l=this.viewportWidth;if(e=(n%a+a)%a,this.option("infiniteX",this.option("infinite"))&&r>l){const o=Math.floor(n/a)||0,s=r;if(i=this.pages[e].left+o*s,!0===t&&a>2){let e=-1*this.Panzoom.content.x;const t=i-s,o=i+s,r=Math.abs(e-i),l=Math.abs(e-t),c=Math.abs(e-o);c<r&&c<=l?(i=o,n+=a):l<r&&l<c&&(i=t,n-=a)}}else e=n=Math.max(0,Math.min(n,a-1)),i=this.pages.length?this.pages[e].left:0;return this.page=e,this.pageIndex=n,null!==o&&e!==o&&(this.prevPage=o,this.prevPageIndex=s,this.trigger("change",e,o)),i}destroy(){this.state="destroy",this.slides.forEach((e=>{this.removeSlideEl(e)})),this.slides=[],this.Panzoom.destroy(),this.detachPlugins()}}ks.version="4.0.29",ks.Plugins=bs;const xs=!("undefined"==typeof window||!window.document||!window.document.createElement);let Cs=null;const Ss=["a[href]","area[href]",'input:not([disabled]):not([type="hidden"]):not([aria-hidden])',"select:not([disabled]):not([aria-hidden])","textarea:not([disabled]):not([aria-hidden])","button:not([disabled]):not([aria-hidden])","iframe","object","embed","video","audio","[contenteditable]",'[tabindex]:not([tabindex^="-"]):not([disabled]):not([aria-hidden])'],Es=e=>{if(e&&xs){null===Cs&&document.createElement("div").focus({get preventScroll(){return Cs=!0,!1}});try{if(e.setActive)e.setActive();else if(Cs)e.focus({preventScroll:!0});else{const t=window.pageXOffset||document.body.scrollTop,i=window.pageYOffset||document.body.scrollLeft;e.focus(),document.body.scrollTo({top:t,left:i,behavior:"auto"})}}catch(t){}}};class Ts{constructor(e){this.fancybox=e,this.$container=null,this.state="init";for(const t of["onPrepare","onClosing","onKeydown"])this[t]=this[t].bind(this);this.events={prepare:this.onPrepare,closing:this.onClosing,keydown:this.onKeydown}}onPrepare(){this.getSlides().length<this.fancybox.option("Thumbs.minSlideCount")?this.state="disabled":!0===this.fancybox.option("Thumbs.autoStart")&&this.fancybox.Carousel.Panzoom.content.height>=this.fancybox.option("Thumbs.minScreenHeight")&&this.build()}onClosing(){this.Carousel&&this.Carousel.Panzoom.detachEvents()}onKeydown(e,t){t===e.option("Thumbs.key")&&this.toggle()}build(){if(this.$container)return;const e=document.createElement("div");e.classList.add("fancybox__thumbs"),this.fancybox.$carousel.parentNode.insertBefore(e,this.fancybox.$carousel.nextSibling),this.Carousel=new ks(e,ss(!0,{Dots:!1,Navigation:!1,Sync:{friction:0},infinite:!1,center:!0,fill:!0,dragFree:!0,slidesPerPage:1,preload:1},this.fancybox.option("Thumbs.Carousel"),{Sync:{target:this.fancybox.Carousel},slides:this.getSlides()})),this.Carousel.Panzoom.on("wheel",((e,t)=>{t.preventDefault(),this.fancybox[t.deltaY<0?"prev":"next"]()})),this.$container=e,this.state="visible"}getSlides(){const e=[];for(const t of this.fancybox.items){const i=t.thumb;i&&e.push({html:`<div class="fancybox__thumb" style="background-image:url('${i}')"></div>`,customClass:`has-thumb has-${t.type||"image"}`})}return e}toggle(){"visible"===this.state?this.hide():"hidden"===this.state?this.show():this.build()}show(){"hidden"===this.state&&(this.$container.style.display="",this.Carousel.Panzoom.attachEvents(),this.state="visible")}hide(){"visible"===this.state&&(this.Carousel.Panzoom.detachEvents(),this.$container.style.display="none",this.state="hidden")}cleanup(){this.Carousel&&(this.Carousel.destroy(),this.Carousel=null),this.$container&&(this.$container.remove(),this.$container=null),this.state="init"}attach(){this.fancybox.on(this.events)}detach(){this.fancybox.off(this.events),this.cleanup()}}Ts.defaults={minSlideCount:2,minScreenHeight:500,autoStart:!0,key:"t",Carousel:{}};const Ls=(e,t)=>{const i=new URL(e),n=new URLSearchParams(i.search);let o=new URLSearchParams;for(const[a,r]of[...n,...Object.entries(t)])"t"===a?o.set("start",parseInt(r)):o.set(a,r);o=o.toString();let s=e.match(/#t=((.*)?\d+s)/);return s&&(o+=`#t=${s[1]}`),o},$s={video:{autoplay:!0,ratio:16/9},youtube:{autohide:1,fs:1,rel:0,hd:1,wmode:"transparent",enablejsapi:1,html5:1},vimeo:{hd:1,show_title:1,show_byline:1,show_portrait:0,fullscreen:1},html5video:{tpl:'<video class="fancybox__html5video" playsinline controls controlsList="nodownload" poster="{{poster}}">\n <source src="{{src}}" type="{{format}}" />Sorry, your browser doesn\'t support embedded videos.</video>',format:""}};class _s{constructor(e){this.fancybox=e;for(const t of["onInit","onReady","onCreateSlide","onRemoveSlide","onSelectSlide","onUnselectSlide","onRefresh","onMessage"])this[t]=this[t].bind(this);this.events={init:this.onInit,ready:this.onReady,"Carousel.createSlide":this.onCreateSlide,"Carousel.removeSlide":this.onRemoveSlide,"Carousel.selectSlide":this.onSelectSlide,"Carousel.unselectSlide":this.onUnselectSlide,"Carousel.refresh":this.onRefresh}}onInit(){for(const e of this.fancybox.items)this.processType(e)}processType(e){if(e.html)return e.src=e.html,e.type="html",void delete e.html;const t=e.src||"";let i=e.type||this.fancybox.options.type,n=null;if(!t||"string"==typeof t){if(n=t.match(/(?:youtube\.com|youtu\.be|youtube\-nocookie\.com)\/(?:watch\?(?:.*&)?v=|v\/|u\/|embed\/?)?(videoseries\?list=(?:.*)|[\w-]{11}|\?listType=(?:.*)&list=(?:.*))(?:.*)/i)){const o=Ls(t,this.fancybox.option("Html.youtube")),s=encodeURIComponent(n[1]);e.videoId=s,e.src=`https://www.youtube-nocookie.com/embed/${s}?${o}`,e.thumb=e.thumb||`https://i.ytimg.com/vi/${s}/mqdefault.jpg`,e.vendor="youtube",i="video"}else if(n=t.match(/^.+vimeo.com\/(?:\/)?([\d]+)(.*)?/)){const o=Ls(t,this.fancybox.option("Html.vimeo")),s=encodeURIComponent(n[1]);e.videoId=s,e.src=`https://player.vimeo.com/video/${s}?${o}`,e.vendor="vimeo",i="video"}else(n=t.match(/(?:maps\.)?google\.([a-z]{2,3}(?:\.[a-z]{2})?)\/(?:(?:(?:maps\/(?:place\/(?:.*)\/)?\@(.*),(\d+.?\d+?)z))|(?:\?ll=))(.*)?/i))?(e.src=`//maps.google.${n[1]}/?ll=${(n[2]?n[2]+"&z="+Math.floor(n[3])+(n[4]?n[4].replace(/^\//,"&"):""):n[4]+"").replace(/\?/,"&")}&output=${n[4]&&n[4].indexOf("layer=c")>0?"svembed":"embed"}`,i="map"):(n=t.match(/(?:maps\.)?google\.([a-z]{2,3}(?:\.[a-z]{2})?)\/(?:maps\/search\/)(.*)/i))&&(e.src=`//maps.google.${n[1]}/maps?q=${n[2].replace("query=","q=").replace("api=1","")}&output=embed`,i="map");i||("#"===t.charAt(0)?i="inline":(n=t.match(/\.(mp4|mov|ogv|webm)((\?|#).*)?$/i))?(i="html5video",e.format=e.format||"video/"+("ogv"===n[1]?"ogg":n[1])):t.match(/(^data:image\/[a-z0-9+\/=]*,)|(\.(jp(e|g|eg)|gif|png|bmp|webp|svg|ico)((\?|#).*)?$)/i)?i="image":t.match(/\.(pdf)((\?|#).*)?$/i)&&(i="pdf")),e.type=i||this.fancybox.option("defaultType","image"),"html5video"!==i&&"video"!==i||(e.video=ss({},this.fancybox.option("Html.video"),e.video),e._width&&e._height?e.ratio=parseFloat(e._width)/parseFloat(e._height):e.ratio=e.ratio||e.video.ratio||$s.video.ratio)}}onReady(){this.fancybox.Carousel.slides.forEach((e=>{e.$el&&(this.setContent(e),e.index===this.fancybox.getSlide().index&&this.playVideo(e))}))}onCreateSlide(e,t,i){"ready"===this.fancybox.state&&this.setContent(i)}loadInlineContent(e){let t;if(e.src instanceof HTMLElement)t=e.src;else if("string"==typeof e.src){const i=e.src.split("#",2),n=2===i.length&&""===i[0]?i[1]:i[0];t=document.getElementById(n)}if(t){if("clone"===e.type||t.$placeHolder){t=t.cloneNode(!0);let i=t.getAttribute("id");i=i?`${i}--clone`:`clone-${this.fancybox.id}-${e.index}`,t.setAttribute("id",i)}else{const e=document.createElement("div");e.classList.add("fancybox-placeholder"),t.parentNode.insertBefore(e,t),t.$placeHolder=e}this.fancybox.setContent(e,t)}else this.fancybox.setError(e,"{{ELEMENT_NOT_FOUND}}")}loadAjaxContent(e){const t=this.fancybox,i=new XMLHttpRequest;t.showLoading(e),i.onreadystatechange=function(){i.readyState===XMLHttpRequest.DONE&&"ready"===t.state&&(t.hideLoading(e),200===i.status?t.setContent(e,i.responseText):t.setError(e,404===i.status?"{{AJAX_NOT_FOUND}}":"{{AJAX_FORBIDDEN}}"))};const n=e.ajax||null;i.open(n?"POST":"GET",e.src),i.setRequestHeader("Content-Type","application/x-www-form-urlencoded"),i.setRequestHeader("X-Requested-With","XMLHttpRequest"),i.send(n),e.xhr=i}loadIframeContent(e){const t=this.fancybox,i=document.createElement("iframe");if(i.className="fancybox__iframe",i.setAttribute("id",`fancybox__iframe_${t.id}_${e.index}`),i.setAttribute("allow","autoplay; fullscreen"),i.setAttribute("scrolling","auto"),e.$iframe=i,"iframe"!==e.type||!1===e.preload)return i.setAttribute("src",e.src),this.fancybox.setContent(e,i),void this.resizeIframe(e);t.showLoading(e);const n=document.createElement("div");n.style.visibility="hidden",this.fancybox.setContent(e,n),n.appendChild(i),i.onerror=()=>{t.setError(e,"{{IFRAME_ERROR}}")},i.onload=()=>{t.hideLoading(e);let n=!1;i.isReady||(i.isReady=!0,n=!0),i.src.length&&(i.parentNode.style.visibility="",this.resizeIframe(e),n&&t.revealContent(e))},i.setAttribute("src",e.src)}setAspectRatio(e){const t=e.$content,i=e.ratio;if(!t)return;let n=e._width,o=e._height;if(i||n&&o){Object.assign(t.style,{width:n&&o?"100%":"",height:n&&o?"100%":"",maxWidth:"",maxHeight:""});let e=t.offsetWidth,s=t.offsetHeight;if(n=n||e,o=o||s,n>e||o>s){let t=Math.min(e/n,s/o);n*=t,o*=t}Math.abs(n/o-i)>.01&&(i<n/o?n=o*i:o=n/i),Object.assign(t.style,{width:`${n}px`,height:`${o}px`})}}resizeIframe(e){const t=e.$iframe;if(!t)return;let i=e._width||0,n=e._height||0;i&&n&&(e.autoSize=!1);const o=t.parentNode,s=o&&o.style;if(!1!==e.preload&&!1!==e.autoSize&&s)try{const e=window.getComputedStyle(o),a=parseFloat(e.paddingLeft)+parseFloat(e.paddingRight),r=parseFloat(e.paddingTop)+parseFloat(e.paddingBottom),l=t.contentWindow.document,c=l.getElementsByTagName("html")[0],d=l.body;s.width="",d.style.overflow="hidden",i=i||c.scrollWidth+a,s.width=`${i}px`,d.style.overflow="",s.flex="0 0 auto",s.height=`${d.scrollHeight}px`,n=c.scrollHeight+r}catch(a){}if(i||n){const e={flex:"0 1 auto"};i&&(e.width=`${i}px`),n&&(e.height=`${n}px`),Object.assign(s,e)}}onRefresh(e,t){t.slides.forEach((e=>{e.$el&&(e.$iframe&&this.resizeIframe(e),e.ratio&&this.setAspectRatio(e))}))}setContent(e){if(e&&!e.isDom){switch(e.type){case"html":this.fancybox.setContent(e,e.src);break;case"html5video":this.fancybox.setContent(e,this.fancybox.option("Html.html5video.tpl").replace(/\{\{src\}\}/gi,e.src).replace("{{format}}",e.format||e.html5video&&e.html5video.format||"").replace("{{poster}}",e.poster||e.thumb||""));break;case"inline":case"clone":this.loadInlineContent(e);break;case"ajax":this.loadAjaxContent(e);break;case"pdf":case"video":case"map":e.preload=!1;case"iframe":this.loadIframeContent(e)}e.ratio&&this.setAspectRatio(e)}}onSelectSlide(e,t,i){"ready"===e.state&&this.playVideo(i)}playVideo(e){if("html5video"===e.type&&e.video.autoplay)try{const t=e.$el.querySelector("video");if(t){const e=t.play();void 0!==e&&e.then((()=>{})).catch((e=>{t.muted=!0,t.play()}))}}catch(i){}if("video"!==e.type||!e.$iframe||!e.$iframe.contentWindow)return;const t=()=>{if("done"===e.state&&e.$iframe&&e.$iframe.contentWindow){let t;if(e.$iframe.isReady)return e.video&&e.video.autoplay&&(t="youtube"==e.vendor?{event:"command",func:"playVideo"}:{method:"play",value:"true"}),void(t&&e.$iframe.contentWindow.postMessage(JSON.stringify(t),"*"));"youtube"===e.vendor&&(t={event:"listening",id:e.$iframe.getAttribute("id")},e.$iframe.contentWindow.postMessage(JSON.stringify(t),"*"))}e.poller=setTimeout(t,250)};t()}onUnselectSlide(e,t,i){if("html5video"===i.type){try{i.$el.querySelector("video").pause()}catch(o){}return}let n=!1;"vimeo"==i.vendor?n={method:"pause",value:"true"}:"youtube"===i.vendor&&(n={event:"command",func:"pauseVideo"}),n&&i.$iframe&&i.$iframe.contentWindow&&i.$iframe.contentWindow.postMessage(JSON.stringify(n),"*"),clearTimeout(i.poller)}onRemoveSlide(e,t,i){i.xhr&&(i.xhr.abort(),i.xhr=null),i.$iframe&&(i.$iframe.onload=i.$iframe.onerror=null,i.$iframe.src="//about:blank",i.$iframe=null);const n=i.$content;"inline"===i.type&&n&&(n.classList.remove("fancybox__content"),"none"!==n.style.display&&(n.style.display="none")),i.$closeButton&&(i.$closeButton.remove(),i.$closeButton=null);const o=n&&n.$placeHolder;o&&(o.parentNode.insertBefore(n,o),o.remove(),n.$placeHolder=null)}onMessage(e){try{let t=JSON.parse(e.data);if("https://player.vimeo.com"===e.origin){if("ready"===t.event)for(let i of document.getElementsByClassName("fancybox__iframe"))i.contentWindow===e.source&&(i.isReady=1)}else"https://www.youtube-nocookie.com"===e.origin&&"onReady"===t.event&&(document.getElementById(t.id).isReady=1)}catch(t){}}attach(){this.fancybox.on(this.events),window.addEventListener("message",this.onMessage,!1)}detach(){this.fancybox.off(this.events),window.removeEventListener("message",this.onMessage,!1)}}_s.defaults=$s;class As{constructor(e){this.fancybox=e;for(const t of["onReady","onClosing","onDone","onPageChange","onCreateSlide","onRemoveSlide","onImageStatusChange"])this[t]=this[t].bind(this);this.events={ready:this.onReady,closing:this.onClosing,done:this.onDone,"Carousel.change":this.onPageChange,"Carousel.createSlide":this.onCreateSlide,"Carousel.removeSlide":this.onRemoveSlide}}onReady(){this.fancybox.Carousel.slides.forEach((e=>{e.$el&&this.setContent(e)}))}onDone(e,t){this.handleCursor(t)}onClosing(e){clearTimeout(this.clickTimer),this.clickTimer=null,e.Carousel.slides.forEach((e=>{e.$image&&(e.state="destroy"),e.Panzoom&&e.Panzoom.detachEvents()})),"closing"===this.fancybox.state&&this.canZoom(e.getSlide())&&this.zoomOut()}onCreateSlide(e,t,i){"ready"===this.fancybox.state&&this.setContent(i)}onRemoveSlide(e,t,i){i.$image&&(i.$el.classList.remove(e.option("Image.canZoomInClass")),i.$image.remove(),i.$image=null),i.Panzoom&&(i.Panzoom.destroy(),i.Panzoom=null),i.$el&&i.$el.dataset&&delete i.$el.dataset.imageFit}setContent(e){if(e.isDom||e.html||e.type&&"image"!==e.type)return;if(e.$image)return;e.type="image",e.state="loading";const t=document.createElement("div");t.style.visibility="hidden";const i=document.createElement("img");i.addEventListener("load",(t=>{t.stopImmediatePropagation(),this.onImageStatusChange(e)})),i.addEventListener("error",(()=>{this.onImageStatusChange(e)})),i.src=e.src,i.alt="",i.draggable=!1,i.classList.add("fancybox__image"),e.srcset&&i.setAttribute("srcset",e.srcset),e.sizes&&i.setAttribute("sizes",e.sizes),e.$image=i;const n=this.fancybox.option("Image.wrap");if(n){const o=document.createElement("div");o.classList.add("string"==typeof n?n:"fancybox__image-wrap"),o.appendChild(i),t.appendChild(o),e.$wrap=o}else t.appendChild(i);e.$el.dataset.imageFit=this.fancybox.option("Image.fit"),this.fancybox.setContent(e,t),i.complete||i.error?this.onImageStatusChange(e):this.fancybox.showLoading(e)}onImageStatusChange(e){const t=e.$image;t&&"loading"===e.state&&(t.complete&&t.naturalWidth&&t.naturalHeight?(this.fancybox.hideLoading(e),"contain"===this.fancybox.option("Image.fit")&&this.initSlidePanzoom(e),e.$el.addEventListener("wheel",(t=>this.onWheel(e,t)),{passive:!1}),e.$content.addEventListener("click",(t=>this.onClick(e,t)),{passive:!1}),this.revealContent(e)):this.fancybox.setError(e,"{{IMAGE_ERROR}}"))}initSlidePanzoom(e){e.Panzoom||(e.Panzoom=new fs(e.$el,ss(!0,this.fancybox.option("Image.Panzoom",{}),{viewport:e.$wrap,content:e.$image,width:e._width,height:e._height,wrapInner:!1,textSelection:!0,touch:this.fancybox.option("Image.touch"),panOnlyZoomed:!0,click:!1,wheel:!1})),e.Panzoom.on("startAnimation",(()=>{this.fancybox.trigger("Image.startAnimation",e)})),e.Panzoom.on("endAnimation",(()=>{"zoomIn"===e.state&&this.fancybox.done(e),this.handleCursor(e),this.fancybox.trigger("Image.endAnimation",e)})),e.Panzoom.on("afterUpdate",(()=>{this.handleCursor(e),this.fancybox.trigger("Image.afterUpdate",e)})))}revealContent(e){null===this.fancybox.Carousel.prevPage&&e.index===this.fancybox.options.startIndex&&this.canZoom(e)?this.zoomIn():this.fancybox.revealContent(e)}getZoomInfo(e){const t=e.$thumb.getBoundingClientRect(),i=t.width,n=t.height,o=e.$content.getBoundingClientRect(),s=o.width,a=o.height,r=o.top-t.top,l=o.left-t.left;let c=this.fancybox.option("Image.zoomOpacity");return"auto"===c&&(c=Math.abs(i/n-s/a)>.1),{top:r,left:l,scale:s&&i?i/s:1,opacity:c}}canZoom(e){const t=this.fancybox,i=t.$container;if(window.visualViewport&&1!==window.visualViewport.scale)return!1;if(e.Panzoom&&!e.Panzoom.content.width)return!1;if(!t.option("Image.zoom")||"contain"!==t.option("Image.fit"))return!1;const n=e.$thumb;if(!n||"loading"===e.state)return!1;i.classList.add("fancybox__no-click");const o=n.getBoundingClientRect();let s;if(this.fancybox.option("Image.ignoreCoveredThumbnail")){const e=document.elementFromPoint(o.left+1,o.top+1)===n,t=document.elementFromPoint(o.right-1,o.bottom-1)===n;s=e&&t}else s=document.elementFromPoint(o.left+.5*o.width,o.top+.5*o.height)===n;return i.classList.remove("fancybox__no-click"),s}zoomIn(){const e=this.fancybox,t=e.getSlide(),i=t.Panzoom,{top:n,left:o,scale:s,opacity:a}=this.getZoomInfo(t);e.trigger("reveal",t),i.panTo({x:-1*o,y:-1*n,scale:s,friction:0,ignoreBounds:!0}),t.$content.style.visibility="",t.state="zoomIn",!0===a&&i.on("afterTransform",(e=>{"zoomIn"!==t.state&&"zoomOut"!==t.state||(e.$content.style.opacity=Math.min(1,1-(1-e.content.scale)/(1-s)))})),i.panTo({x:0,y:0,scale:1,friction:this.fancybox.option("Image.zoomFriction")})}zoomOut(){const e=this.fancybox,t=e.getSlide(),i=t.Panzoom;if(!i)return;t.state="zoomOut",e.state="customClosing",t.$caption&&(t.$caption.style.visibility="hidden");let n=this.fancybox.option("Image.zoomFriction");const o=e=>{const{top:o,left:s,scale:a,opacity:r}=this.getZoomInfo(t);e||r||(n*=.82),i.panTo({x:-1*s,y:-1*o,scale:a,friction:n,ignoreBounds:!0}),n*=.98};window.addEventListener("scroll",o),i.once("endAnimation",(()=>{window.removeEventListener("scroll",o),e.destroy()})),o()}handleCursor(e){if("image"!==e.type||!e.$el)return;const t=e.Panzoom,i=this.fancybox.option("Image.click",!1,e),n=this.fancybox.option("Image.touch"),o=e.$el.classList,s=this.fancybox.option("Image.canZoomInClass"),a=this.fancybox.option("Image.canZoomOutClass");o.remove(a),o.remove(s),t&&"toggleZoom"===i?t&&1===t.content.scale&&t.option("maxScale")-t.content.scale>.01?o.add(s):t.content.scale>1&&!n&&o.add(a):"close"===i&&o.add(a)}onWheel(e,t){if("ready"===this.fancybox.state&&!1!==this.fancybox.trigger("Image.wheel",t))switch(this.fancybox.option("Image.wheel")){case"zoom":"done"===e.state&&e.Panzoom&&e.Panzoom.zoomWithWheel(t);break;case"close":this.fancybox.close();break;case"slide":this.fancybox[t.deltaY<0?"prev":"next"]()}}onClick(e,t){if("ready"!==this.fancybox.state)return;const i=e.Panzoom;if(i&&(i.dragPosition.midPoint||0!==i.dragOffset.x||0!==i.dragOffset.y||1!==i.dragOffset.scale))return;if(this.fancybox.Carousel.Panzoom.lockAxis)return!1;const n=i=>{switch(i){case"toggleZoom":t.stopPropagation(),e.Panzoom&&e.Panzoom.zoomWithClick(t);break;case"close":this.fancybox.close();break;case"next":t.stopPropagation(),this.fancybox.next()}},o=this.fancybox.option("Image.click"),s=this.fancybox.option("Image.doubleClick");s?this.clickTimer?(clearTimeout(this.clickTimer),this.clickTimer=null,n(s)):this.clickTimer=setTimeout((()=>{this.clickTimer=null,n(o)}),300):n(o)}onPageChange(e,t){const i=e.getSlide();t.slides.forEach((e=>{e.Panzoom&&"done"===e.state&&e.index!==i.index&&e.Panzoom.panTo({x:0,y:0,scale:1,friction:.8})}))}attach(){this.fancybox.on(this.events)}detach(){this.fancybox.off(this.events)}}As.defaults={canZoomInClass:"can-zoom_in",canZoomOutClass:"can-zoom_out",zoom:!0,zoomOpacity:"auto",zoomFriction:.82,ignoreCoveredThumbnail:!1,touch:!0,click:"toggleZoom",doubleClick:null,wheel:"zoom",fit:"contain",wrap:!1,Panzoom:{ratio:1}};class Ns{constructor(e){this.fancybox=e;for(const t of["onChange","onClosing"])this[t]=this[t].bind(this);this.events={initCarousel:this.onChange,"Carousel.change":this.onChange,closing:this.onClosing},this.hasCreatedHistory=!1,this.origHash="",this.timer=null}onChange(e){const t=e.Carousel;this.timer&&clearTimeout(this.timer);const i=null===t.prevPage,n=e.getSlide(),o=new URL(document.URL).hash;let s=!1;if(n.slug)s="#"+n.slug;else{const i=n.$trigger&&n.$trigger.dataset,o=e.option("slug")||i&&i.fancybox;o&&o.length&&"true"!==o&&(s="#"+o+(t.slides.length>1?"-"+(n.index+1):""))}i&&(this.origHash=o!==s?o:""),s&&o!==s&&(this.timer=setTimeout((()=>{try{window.history[i?"pushState":"replaceState"]({},document.title,window.location.pathname+window.location.search+s),i&&(this.hasCreatedHistory=!0)}catch(e){}}),300))}onClosing(){if(this.timer&&clearTimeout(this.timer),!0!==this.hasSilentClose)try{return void window.history.replaceState({},document.title,window.location.pathname+window.location.search+(this.origHash||""))}catch(Gr){}}attach(e){e.on(this.events)}detach(e){e.off(this.events)}static startFromUrl(){const e=Ns.Fancybox;if(!e||e.getInstance()||!1===e.defaults.Hash)return;const{hash:t,slug:i,index:n}=Ns.getParsedURL();if(!i)return;let o=document.querySelector(`[data-slug="${t}"]`);if(o&&o.dispatchEvent(new CustomEvent("click",{bubbles:!0,cancelable:!0})),e.getInstance())return;const s=document.querySelectorAll(`[data-fancybox="${i}"]`);s.length&&(null===n&&1===s.length?o=s[0]:n&&(o=s[n-1]),o&&o.dispatchEvent(new CustomEvent("click",{bubbles:!0,cancelable:!0})))}static onHashChange(){const{slug:e,index:t}=Ns.getParsedURL(),i=Ns.Fancybox,n=i&&i.getInstance();if(n&&n.plugins.Hash){if(e){const i=n.Carousel;if(e===n.option("slug"))return i.slideTo(t-1);for(let t of i.slides)if(t.slug&&t.slug===e)return i.slideTo(t.index);const o=n.getSlide(),s=o.$trigger&&o.$trigger.dataset;if(s&&s.fancybox===e)return i.slideTo(t-1)}n.plugins.Hash.hasSilentClose=!0,n.close()}Ns.startFromUrl()}static create(e){function t(){window.addEventListener("hashchange",Ns.onHashChange,!1),Ns.startFromUrl()}Ns.Fancybox=e,xs&&window.requestAnimationFrame((()=>{/complete|interactive|loaded/.test(document.readyState)?t():document.addEventListener("DOMContentLoaded",t)}))}static destroy(){window.removeEventListener("hashchange",Ns.onHashChange,!1)}static getParsedURL(){const e=window.location.hash.substr(1),t=e.split("-"),i=t.length>1&&/^\+?\d+$/.test(t[t.length-1])&&parseInt(t.pop(-1),10)||null;return{hash:e,slug:t.join("-"),index:i}}}const Ps={pageXOffset:0,pageYOffset:0,element:()=>document.fullscreenElement||document.mozFullScreenElement||document.webkitFullscreenElement,activate(e){Ps.pageXOffset=window.pageXOffset,Ps.pageYOffset=window.pageYOffset,e.requestFullscreen?e.requestFullscreen():e.mozRequestFullScreen?e.mozRequestFullScreen():e.webkitRequestFullscreen?e.webkitRequestFullscreen():e.msRequestFullscreen&&e.msRequestFullscreen()},deactivate(){document.exitFullscreen?document.exitFullscreen():document.mozCancelFullScreen?document.mozCancelFullScreen():document.webkitExitFullscreen&&document.webkitExitFullscreen()}};class Bs{constructor(e){this.fancybox=e,this.active=!1,this.handleVisibilityChange=this.handleVisibilityChange.bind(this)}isActive(){return this.active}setTimer(){if(!this.active||this.timer)return;const e=this.fancybox.option("slideshow.delay",3e3);this.timer=setTimeout((()=>{this.timer=null,this.fancybox.option("infinite")||this.fancybox.getSlide().index!==this.fancybox.Carousel.slides.length-1?this.fancybox.next():this.fancybox.jumpTo(0,{friction:0})}),e);let t=this.$progress;t||(t=document.createElement("div"),t.classList.add("fancybox__progress"),this.fancybox.$carousel.parentNode.insertBefore(t,this.fancybox.$carousel),this.$progress=t,t.offsetHeight),t.style.transitionDuration=`${e}ms`,t.style.transform="scaleX(1)"}clearTimer(){clearTimeout(this.timer),this.timer=null,this.$progress&&(this.$progress.style.transitionDuration="",this.$progress.style.transform="",this.$progress.offsetHeight)}activate(){this.active||(this.active=!0,this.fancybox.$container.classList.add("has-slideshow"),"done"===this.fancybox.getSlide().state&&this.setTimer(),document.addEventListener("visibilitychange",this.handleVisibilityChange,!1))}handleVisibilityChange(){this.deactivate()}deactivate(){this.active=!1,this.clearTimer(),this.fancybox.$container.classList.remove("has-slideshow"),document.removeEventListener("visibilitychange",this.handleVisibilityChange,!1)}toggle(){this.active?this.deactivate():this.fancybox.Carousel.slides.length>1&&this.activate()}}const Ms={display:["counter","zoom","slideshow","fullscreen","thumbs","close"],autoEnable:!0,items:{counter:{position:"left",type:"div",class:"fancybox__counter",html:'<span data-fancybox-index=""></span>&nbsp;/&nbsp;<span data-fancybox-count=""></span>',attr:{tabindex:-1}},prev:{type:"button",class:"fancybox__button--prev",label:"PREV",html:'<svg viewBox="0 0 24 24"><path d="M15 4l-8 8 8 8"/></svg>',attr:{"data-fancybox-prev":""}},next:{type:"button",class:"fancybox__button--next",label:"NEXT",html:'<svg viewBox="0 0 24 24"><path d="M8 4l8 8-8 8"/></svg>',attr:{"data-fancybox-next":""}},fullscreen:{type:"button",class:"fancybox__button--fullscreen",label:"TOGGLE_FULLSCREEN",html:'<svg viewBox="0 0 24 24">\n <g><path d="M3 8 V3h5"></path><path d="M21 8V3h-5"></path><path d="M8 21H3v-5"></path><path d="M16 21h5v-5"></path></g>\n <g><path d="M7 2v5H2M17 2v5h5M2 17h5v5M22 17h-5v5"/></g>\n </svg>',click:function(e){e.preventDefault(),Ps.element()?Ps.deactivate():Ps.activate(this.fancybox.$container)}},slideshow:{type:"button",class:"fancybox__button--slideshow",label:"TOGGLE_SLIDESHOW",html:'<svg viewBox="0 0 24 24">\n <g><path d="M6 4v16"/><path d="M20 12L6 20"/><path d="M20 12L6 4"/></g>\n <g><path d="M7 4v15M17 4v15"/></g>\n </svg>',click:function(e){e.preventDefault(),this.Slideshow.toggle()}},zoom:{type:"button",class:"fancybox__button--zoom",label:"TOGGLE_ZOOM",html:'<svg viewBox="0 0 24 24"><circle cx="10" cy="10" r="7"></circle><path d="M16 16 L21 21"></svg>',click:function(e){e.preventDefault();const t=this.fancybox.getSlide().Panzoom;t&&t.toggleZoom()}},download:{type:"link",label:"DOWNLOAD",class:"fancybox__button--download",html:'<svg viewBox="0 0 24 24"><path d="M12 15V3m0 12l-4-4m4 4l4-4M2 17l.62 2.48A2 2 0 004.56 21h14.88a2 2 0 001.94-1.51L22 17"/></svg>',click:function(e){e.stopPropagation()}},thumbs:{type:"button",label:"TOGGLE_THUMBS",class:"fancybox__button--thumbs",html:'<svg viewBox="0 0 24 24"><circle cx="4" cy="4" r="1" /><circle cx="12" cy="4" r="1" transform="rotate(90 12 4)"/><circle cx="20" cy="4" r="1" transform="rotate(90 20 4)"/><circle cx="4" cy="12" r="1" transform="rotate(90 4 12)"/><circle cx="12" cy="12" r="1" transform="rotate(90 12 12)"/><circle cx="20" cy="12" r="1" transform="rotate(90 20 12)"/><circle cx="4" cy="20" r="1" transform="rotate(90 4 20)"/><circle cx="12" cy="20" r="1" transform="rotate(90 12 20)"/><circle cx="20" cy="20" r="1" transform="rotate(90 20 20)"/></svg>',click:function(e){e.stopPropagation();const t=this.fancybox.plugins.Thumbs;t&&t.toggle()}},close:{type:"button",label:"CLOSE",class:"fancybox__button--close",html:'<svg viewBox="0 0 24 24"><path d="M20 20L4 4m16 0L4 20"></path></svg>',attr:{"data-fancybox-close":"",tabindex:0}}}};class Vs{constructor(e){this.fancybox=e,this.$container=null,this.state="init";for(const t of["onInit","onPrepare","onDone","onKeydown","onClosing","onChange","onSettle","onRefresh"])this[t]=this[t].bind(this);this.events={init:this.onInit,prepare:this.onPrepare,done:this.onDone,keydown:this.onKeydown,closing:this.onClosing,"Carousel.change":this.onChange,"Carousel.settle":this.onSettle,"Carousel.Panzoom.touchStart":()=>this.onRefresh(),"Image.startAnimation":(e,t)=>this.onRefresh(t),"Image.afterUpdate":(e,t)=>this.onRefresh(t)}}onInit(){if(this.fancybox.option("Toolbar.autoEnable")){let e=!1;for(const t of this.fancybox.items)if("image"===t.type){e=!0;break}if(!e)return void(this.state="disabled")}for(const e of this.fancybox.option("Toolbar.display"))if("close"===(os(e)?e.id:e)){this.fancybox.options.closeButton=!1;break}}onPrepare(){const e=this.fancybox;if("init"===this.state&&(this.build(),this.update(),this.Slideshow=new Bs(e),!e.Carousel.prevPage&&(e.option("slideshow.autoStart")&&this.Slideshow.activate(),e.option("fullscreen.autoStart")&&!Ps.element())))try{Ps.activate(e.$container)}catch(t){}}onFsChange(){window.scrollTo(Ps.pageXOffset,Ps.pageYOffset)}onSettle(){const e=this.fancybox,t=this.Slideshow;t&&t.isActive()&&(e.getSlide().index!==e.Carousel.slides.length-1||e.option("infinite")?"done"===e.getSlide().state&&t.setTimer():t.deactivate())}onChange(){this.update(),this.Slideshow&&this.Slideshow.isActive()&&this.Slideshow.clearTimer()}onDone(e,t){const i=this.Slideshow;t.index===e.getSlide().index&&(this.update(),i&&i.isActive()&&(e.option("infinite")||t.index!==e.Carousel.slides.length-1?i.setTimer():i.deactivate()))}onRefresh(e){e&&e.index!==this.fancybox.getSlide().index||(this.update(),!this.Slideshow||!this.Slideshow.isActive()||e&&"done"!==e.state||this.Slideshow.deactivate())}onKeydown(e,t,i){" "===t&&this.Slideshow&&(this.Slideshow.toggle(),i.preventDefault())}onClosing(){this.Slideshow&&this.Slideshow.deactivate(),document.removeEventListener("fullscreenchange",this.onFsChange)}createElement(e){let t;"div"===e.type?t=document.createElement("div"):(t=document.createElement("link"===e.type?"a":"button"),t.classList.add("carousel__button")),t.innerHTML=e.html,t.setAttribute("tabindex",e.tabindex||0),e.class&&t.classList.add(...e.class.split(" "));for(const n in e.attr)t.setAttribute(n,e.attr[n]);e.label&&t.setAttribute("title",this.fancybox.localize(`{{${e.label}}}`)),e.click&&t.addEventListener("click",e.click.bind(this)),"prev"===e.id&&t.setAttribute("data-fancybox-prev",""),"next"===e.id&&t.setAttribute("data-fancybox-next","");const i=t.querySelector("svg");return i&&(i.setAttribute("role","img"),i.setAttribute("tabindex","-1"),i.setAttribute("xmlns","http://www.w3.org/2000/svg")),t}build(){this.cleanup();const e=this.fancybox.option("Toolbar.items"),t=[{position:"left",items:[]},{position:"center",items:[]},{position:"right",items:[]}],i=this.fancybox.plugins.Thumbs;for(const o of this.fancybox.option("Toolbar.display")){let n,s;if(os(o)?(n=o.id,s=ss({},e[n],o)):(n=o,s=e[n]),["counter","next","prev","slideshow"].includes(n)&&this.fancybox.items.length<2)continue;if("fullscreen"===n){if(!document.fullscreenEnabled||window.fullScreen)continue;document.addEventListener("fullscreenchange",this.onFsChange)}if("thumbs"===n&&(!i||"disabled"===i.state))continue;if(!s)continue;let a=s.position||"right",r=t.find((e=>e.position===a));r&&r.items.push(s)}const n=document.createElement("div");n.classList.add("fancybox__toolbar");for(const o of t)if(o.items.length){const e=document.createElement("div");e.classList.add("fancybox__toolbar__items"),e.classList.add(`fancybox__toolbar__items--${o.position}`);for(const t of o.items)e.appendChild(this.createElement(t));n.appendChild(e)}this.fancybox.$carousel.parentNode.insertBefore(n,this.fancybox.$carousel),this.$container=n}update(){const e=this.fancybox.getSlide(),t=e.index,i=this.fancybox.items.length,n=e.downloadSrc||("image"!==e.type||e.error?null:e.src);for(const a of this.fancybox.$container.querySelectorAll("a.fancybox__button--download"))n?(a.removeAttribute("disabled"),a.removeAttribute("tabindex"),a.setAttribute("href",n),a.setAttribute("download",n),a.setAttribute("target","_blank")):(a.setAttribute("disabled",""),a.setAttribute("tabindex",-1),a.removeAttribute("href"),a.removeAttribute("download"));const o=e.Panzoom,s=o&&o.option("maxScale")>o.option("baseScale");for(const a of this.fancybox.$container.querySelectorAll(".fancybox__button--zoom"))s?a.removeAttribute("disabled"):a.setAttribute("disabled","");for(const a of this.fancybox.$container.querySelectorAll("[data-fancybox-index]"))a.innerHTML=e.index+1;for(const a of this.fancybox.$container.querySelectorAll("[data-fancybox-count]"))a.innerHTML=i;if(!this.fancybox.option("infinite")){for(const e of this.fancybox.$container.querySelectorAll("[data-fancybox-prev]"))0===t?e.setAttribute("disabled",""):e.removeAttribute("disabled");for(const e of this.fancybox.$container.querySelectorAll("[data-fancybox-next]"))t===i-1?e.setAttribute("disabled",""):e.removeAttribute("disabled")}}cleanup(){this.Slideshow&&this.Slideshow.isActive()&&this.Slideshow.clearTimer(),this.$container&&this.$container.remove(),this.$container=null}attach(){this.fancybox.on(this.events)}detach(){this.fancybox.off(this.events),this.cleanup()}}Vs.defaults=Ms;const Os={ScrollLock:class{constructor(e){this.fancybox=e,this.viewport=null,this.pendingUpdate=null;for(const t of["onReady","onResize","onTouchstart","onTouchmove"])this[t]=this[t].bind(this)}onReady(){const e=window.visualViewport;e&&(this.viewport=e,this.startY=0,e.addEventListener("resize",this.onResize),this.updateViewport()),window.addEventListener("touchstart",this.onTouchstart,{passive:!1}),window.addEventListener("touchmove",this.onTouchmove,{passive:!1}),window.addEventListener("wheel",this.onWheel,{passive:!1})}onResize(){this.updateViewport()}updateViewport(){const e=this.fancybox,t=this.viewport,i=t.scale||1,n=e.$container;if(!n)return;let o="",s="",a="";i-1>.1&&(o=t.width*i+"px",s=t.height*i+"px",a=`translate3d(${t.offsetLeft}px, ${t.offsetTop}px, 0) scale(${1/i})`),n.style.width=o,n.style.height=s,n.style.transform=a}onTouchstart(e){this.startY=e.touches?e.touches[0].screenY:e.screenY}onTouchmove(e){const t=this.startY,i=window.innerWidth/window.document.documentElement.clientWidth;if(!e.cancelable)return;if(e.touches.length>1||1!==i)return;const n=rs(e.composedPath()[0]);if(!n)return void e.preventDefault();const o=window.getComputedStyle(n),s=parseInt(o.getPropertyValue("height"),10),a=e.touches?e.touches[0].screenY:e.screenY,r=t<=a&&0===n.scrollTop,l=t>=a&&n.scrollHeight-n.scrollTop===s;(r||l)&&e.preventDefault()}onWheel(e){rs(e.composedPath()[0])||e.preventDefault()}cleanup(){this.pendingUpdate&&(cancelAnimationFrame(this.pendingUpdate),this.pendingUpdate=null);const e=this.viewport;e&&(e.removeEventListener("resize",this.onResize),this.viewport=null),window.removeEventListener("touchstart",this.onTouchstart,!1),window.removeEventListener("touchmove",this.onTouchmove,!1),window.removeEventListener("wheel",this.onWheel,{passive:!1})}attach(){this.fancybox.on("initLayout",this.onReady)}detach(){this.fancybox.off("initLayout",this.onReady),this.cleanup()}},Thumbs:Ts,Html:_s,Toolbar:Vs,Image:As,Hash:Ns},Is={startIndex:0,preload:1,infinite:!0,showClass:"fancybox-zoomInUp",hideClass:"fancybox-fadeOut",animated:!0,hideScrollbar:!0,parentEl:null,mainClass:null,autoFocus:!0,trapFocus:!0,placeFocusBack:!0,click:"close",closeButton:"inside",dragToClose:!0,keyboard:{Escape:"close",Delete:"close",Backspace:"close",PageUp:"next",PageDown:"prev",ArrowUp:"next",ArrowDown:"prev",ArrowRight:"next",ArrowLeft:"prev"},template:{closeButton:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" tabindex="-1"><path d="M20 20L4 4m16 0L4 20"/></svg>',spinner:'<svg xmlns="http://www.w3.org/2000/svg" width="50" height="50" viewBox="25 25 50 50" tabindex="-1"><circle cx="50" cy="50" r="20"/></svg>',main:null},l10n:{CLOSE:"Close",NEXT:"Next",PREV:"Previous",MODAL:"You can close this modal content with the ESC key",ERROR:"Something Went Wrong, Please Try Again Later",IMAGE_ERROR:"Image Not Found",ELEMENT_NOT_FOUND:"HTML Element Not Found",AJAX_NOT_FOUND:"Error Loading AJAX : Not Found",AJAX_FORBIDDEN:"Error Loading AJAX : Forbidden",IFRAME_ERROR:"Error Loading Page",TOGGLE_ZOOM:"Toggle zoom level",TOGGLE_THUMBS:"Toggle thumbnails",TOGGLE_SLIDESHOW:"Toggle slideshow",TOGGLE_FULLSCREEN:"Toggle full-screen mode",DOWNLOAD:"Download"}},zs=new Map;let Ds=0;class Rs extends ps{constructor(e,t={}){e=e.map((e=>(e.width&&(e._width=e.width),e.height&&(e._height=e.height),e))),super(ss(!0,{},Is,t)),this.bindHandlers(),this.state="init",this.setItems(e),this.attachPlugins(Rs.Plugins),this.trigger("init"),!0===this.option("hideScrollbar")&&this.hideScrollbar(),this.initLayout(),this.initCarousel(),this.attachEvents(),zs.set(this.id,this),this.trigger("prepare"),this.state="ready",this.trigger("ready"),this.$container.setAttribute("aria-hidden","false"),this.option("trapFocus")&&this.focus()}option(e,...t){const i=this.getSlide();let n=i?i[e]:void 0;return void 0!==n?("function"==typeof n&&(n=n.call(this,this,...t)),n):super.option(e,...t)}bindHandlers(){for(const e of["onMousedown","onKeydown","onClick","onFocus","onCreateSlide","onSettle","onTouchMove","onTouchEnd","onTransform"])this[e]=this[e].bind(this)}attachEvents(){document.addEventListener("mousedown",this.onMousedown),document.addEventListener("keydown",this.onKeydown,!0),this.option("trapFocus")&&document.addEventListener("focus",this.onFocus,!0),this.$container.addEventListener("click",this.onClick)}detachEvents(){document.removeEventListener("mousedown",this.onMousedown),document.removeEventListener("keydown",this.onKeydown,!0),document.removeEventListener("focus",this.onFocus,!0),this.$container.removeEventListener("click",this.onClick)}initLayout(){this.$root=this.option("parentEl")||document.body;let e=this.option("template.main");e&&(this.$root.insertAdjacentHTML("beforeend",this.localize(e)),this.$container=this.$root.querySelector(".fancybox__container")),this.$container||(this.$container=document.createElement("div"),this.$root.appendChild(this.$container)),this.$container.onscroll=()=>(this.$container.scrollLeft=0,!1),Object.entries({class:"fancybox__container",role:"dialog",tabIndex:"-1","aria-modal":"true","aria-hidden":"true","aria-label":this.localize("{{MODAL}}")}).forEach((e=>this.$container.setAttribute(...e))),this.option("animated")&&this.$container.classList.add("is-animated"),this.$backdrop=this.$container.querySelector(".fancybox__backdrop"),this.$backdrop||(this.$backdrop=document.createElement("div"),this.$backdrop.classList.add("fancybox__backdrop"),this.$container.appendChild(this.$backdrop)),this.$carousel=this.$container.querySelector(".fancybox__carousel"),this.$carousel||(this.$carousel=document.createElement("div"),this.$carousel.classList.add("fancybox__carousel"),this.$container.appendChild(this.$carousel)),this.$container.Fancybox=this,this.id=this.$container.getAttribute("id"),this.id||(this.id=this.options.id||++Ds,this.$container.setAttribute("id","fancybox-"+this.id));const t=this.option("mainClass");return t&&this.$container.classList.add(...t.split(" ")),document.documentElement.classList.add("with-fancybox"),this.trigger("initLayout"),this}setItems(e){const t=[];for(const i of e){const e=i.$trigger;if(e){const t=e.dataset||{};i.src=t.src||e.getAttribute("href")||i.src,i.type=t.type||i.type,!i.src&&e instanceof HTMLImageElement&&(i.src=e.currentSrc||i.$trigger.src)}let n=i.$thumb;if(!n){let e=i.$trigger&&i.$trigger.origTarget;e&&(n=e instanceof HTMLImageElement?e:e.querySelector("img:not([aria-hidden])")),!n&&i.$trigger&&(n=i.$trigger instanceof HTMLImageElement?i.$trigger:i.$trigger.querySelector("img:not([aria-hidden])"))}i.$thumb=n||null;let o=i.thumb;!o&&n&&(o=n.currentSrc||n.src,!o&&n.dataset&&(o=n.dataset.lazySrc||n.dataset.src)),o||"image"!==i.type||(o=i.src),i.thumb=o||null,i.caption=i.caption||"",t.push(i)}this.items=t}initCarousel(){return this.Carousel=new ks(this.$carousel,ss(!0,{},{prefix:"",classNames:{viewport:"fancybox__viewport",track:"fancybox__track",slide:"fancybox__slide"},textSelection:!0,preload:this.option("preload"),friction:.88,slides:this.items,initialPage:this.options.startIndex,slidesPerPage:1,infiniteX:this.option("infinite"),infiniteY:!0,l10n:this.option("l10n"),Dots:!1,Navigation:{classNames:{main:"fancybox__nav",button:"carousel__button",next:"is-next",prev:"is-prev"}},Panzoom:{textSelection:!0,panOnlyZoomed:()=>this.Carousel&&this.Carousel.pages&&this.Carousel.pages.length<2&&!this.option("dragToClose"),lockAxis:()=>{if(this.Carousel){let e="x";return this.option("dragToClose")&&(e+="y"),e}}},on:{"*":(e,...t)=>this.trigger(`Carousel.${e}`,...t),init:e=>this.Carousel=e,createSlide:this.onCreateSlide,settle:this.onSettle}},this.option("Carousel"))),this.option("dragToClose")&&this.Carousel.Panzoom.on({touchMove:this.onTouchMove,afterTransform:this.onTransform,touchEnd:this.onTouchEnd}),this.trigger("initCarousel"),this}onCreateSlide(e,t){let i=t.caption||"";if("function"==typeof this.options.caption&&(i=this.options.caption.call(this,this,this.Carousel,t)),"string"==typeof i&&i.length){const e=document.createElement("div"),n=`fancybox__caption_${this.id}_${t.index}`;e.className="fancybox__caption",e.innerHTML=i,e.setAttribute("id",n),t.$caption=t.$el.appendChild(e),t.$el.classList.add("has-caption"),t.$el.setAttribute("aria-labelledby",n)}}onSettle(){this.option("autoFocus")&&this.focus()}onFocus(e){this.focus(e)}onClick(e){if(e.defaultPrevented)return;let t=e.composedPath()[0];if(t.matches("[data-fancybox-close]"))return e.preventDefault(),void Rs.close(!1,e);if(t.matches("[data-fancybox-next]"))return e.preventDefault(),void Rs.next();if(t.matches("[data-fancybox-prev]"))return e.preventDefault(),void Rs.prev();const i=document.activeElement;if(i){if(i.closest("[contenteditable]"))return;t.matches(Ss)||i.blur()}if(!t.closest(".fancybox__content")&&!getSelection().toString().length&&!1!==this.trigger("click",e))switch(this.option("click")){case"close":this.close();break;case"next":this.next()}}onTouchMove(){const e=this.getSlide().Panzoom;return!e||1===e.content.scale}onTouchEnd(e){const t=e.dragOffset.y;Math.abs(t)>=150||Math.abs(t)>=35&&e.dragOffset.time<350?(this.option("hideClass")&&(this.getSlide().hideClass="fancybox-throwOut"+(e.content.y<0?"Up":"Down")),this.close()):"y"===e.lockAxis&&e.panTo({y:0})}onTransform(e){if(this.$backdrop){const t=Math.abs(e.content.y),i=t<1?"":Math.max(.33,Math.min(1,1-t/e.content.fitHeight*1.5));this.$container.style.setProperty("--fancybox-ts",i?"0s":""),this.$container.style.setProperty("--fancybox-opacity",i)}}onMousedown(){"ready"===this.state&&document.body.classList.add("is-using-mouse")}onKeydown(e){if(Rs.getInstance().id!==this.id)return;document.body.classList.remove("is-using-mouse");const t=e.key,i=this.option("keyboard");if(!i||e.ctrlKey||e.altKey||e.shiftKey)return;const n=e.composedPath()[0],o=document.activeElement&&document.activeElement.classList,s=o&&o.contains("carousel__button");if("Escape"!==t&&!s&&(e.target.isContentEditable||-1!==["BUTTON","TEXTAREA","OPTION","INPUT","SELECT","VIDEO"].indexOf(n.nodeName)))return;if(!1===this.trigger("keydown",t,e))return;const a=i[t];"function"==typeof this[a]&&this[a]()}getSlide(){const e=this.Carousel;if(!e)return null;const t=null===e.page?e.option("initialPage"):e.page,i=e.pages||[];return i.length&&i[t]?i[t].slides[0]:null}focus(e){if(Rs.ignoreFocusChange)return;if(["init","closing","customClosing","destroy"].indexOf(this.state)>-1)return;const t=this.$container,i=this.getSlide(),n="done"===i.state?i.$el:null;if(n&&n.contains(document.activeElement))return;e&&e.preventDefault(),Rs.ignoreFocusChange=!0;const o=Array.from(t.querySelectorAll(Ss));let s,a=[];for(let r of o){const e=r.offsetParent,t=n&&n.contains(r),i=!this.Carousel.$viewport.contains(r);e&&(t||i)?(a.push(r),void 0!==r.dataset.origTabindex&&(r.tabIndex=r.dataset.origTabindex,r.removeAttribute("data-orig-tabindex")),(r.hasAttribute("autoFocus")||!s&&t&&!r.classList.contains("carousel__button"))&&(s=r)):(r.dataset.origTabindex=void 0===r.dataset.origTabindex?r.getAttribute("tabindex"):r.dataset.origTabindex,r.tabIndex=-1)}e?a.indexOf(e.target)>-1?this.lastFocus=e.target:this.lastFocus===t?Es(a[a.length-1]):Es(t):this.option("autoFocus")&&s?Es(s):a.indexOf(document.activeElement)<0&&Es(t),this.lastFocus=document.activeElement,Rs.ignoreFocusChange=!1}hideScrollbar(){if(!xs)return;const e=window.innerWidth-document.documentElement.getBoundingClientRect().width,t="fancybox-style-noscroll";let i=document.getElementById(t);i||e>0&&(i=document.createElement("style"),i.id=t,i.type="text/css",i.innerHTML=`.compensate-for-scrollbar {padding-right: ${e}px;}`,document.getElementsByTagName("head")[0].appendChild(i),document.body.classList.add("compensate-for-scrollbar"))}revealScrollbar(){document.body.classList.remove("compensate-for-scrollbar");const e=document.getElementById("fancybox-style-noscroll");e&&e.remove()}clearContent(e){this.Carousel.trigger("removeSlide",e),e.$content&&(e.$content.remove(),e.$content=null),e.$closeButton&&(e.$closeButton.remove(),e.$closeButton=null),e._className&&e.$el.classList.remove(e._className)}setContent(e,t,i={}){let n;const o=e.$el;if(t instanceof HTMLElement)["img","iframe","video","audio"].indexOf(t.nodeName.toLowerCase())>-1?(n=document.createElement("div"),n.appendChild(t)):n=t;else{const e=document.createRange().createContextualFragment(t);n=document.createElement("div"),n.appendChild(e)}if(e.filter&&!e.error&&(n=n.querySelector(e.filter)),n instanceof Element)return e._className=`has-${i.suffix||e.type||"unknown"}`,o.classList.add(e._className),n.classList.add("fancybox__content"),"none"!==n.style.display&&"none"!==getComputedStyle(n).getPropertyValue("display")||(n.style.display=e.display||this.option("defaultDisplay")||"flex"),e.id&&n.setAttribute("id",e.id),e.$content=n,o.prepend(n),this.manageCloseButton(e),"loading"!==e.state&&this.revealContent(e),n;this.setError(e,"{{ELEMENT_NOT_FOUND}}")}manageCloseButton(e){const t=void 0===e.closeButton?this.option("closeButton"):e.closeButton;if(!t||"top"===t&&this.$closeButton)return;const i=document.createElement("button");i.classList.add("carousel__button","is-close"),i.setAttribute("title",this.options.l10n.CLOSE),i.innerHTML=this.option("template.closeButton"),i.addEventListener("click",(e=>this.close(e))),"inside"===t?(e.$closeButton&&e.$closeButton.remove(),e.$closeButton=e.$content.appendChild(i)):this.$closeButton=this.$container.insertBefore(i,this.$container.firstChild)}revealContent(e){this.trigger("reveal",e),e.$content.style.visibility="";let t=!1;e.error||"loading"===e.state||null!==this.Carousel.prevPage||e.index!==this.options.startIndex||(t=void 0===e.showClass?this.option("showClass"):e.showClass),t?(e.state="animating",this.animateCSS(e.$content,t,(()=>{this.done(e)}))):this.done(e)}animateCSS(e,t,i){if(e&&e.dispatchEvent(new CustomEvent("animationend",{bubbles:!0,cancelable:!0})),!e||!t)return void("function"==typeof i&&i());const n=function(o){o.currentTarget===this&&(e.removeEventListener("animationend",n),i&&i(),e.classList.remove(t))};e.addEventListener("animationend",n),e.classList.add(t)}done(e){e.state="done",this.trigger("done",e);const t=this.getSlide();t&&e.index===t.index&&this.option("autoFocus")&&this.focus()}setError(e,t){e.error=t,this.hideLoading(e),this.clearContent(e);const i=document.createElement("div");i.classList.add("fancybox-error"),i.innerHTML=this.localize(t||"<p>{{ERROR}}</p>"),this.setContent(e,i,{suffix:"error"})}showLoading(e){e.state="loading",e.$el.classList.add("is-loading");let t=e.$el.querySelector(".fancybox__spinner");t||(t=document.createElement("div"),t.classList.add("fancybox__spinner"),t.innerHTML=this.option("template.spinner"),t.addEventListener("click",(()=>{this.Carousel.Panzoom.velocity||this.close()})),e.$el.prepend(t))}hideLoading(e){const t=e.$el&&e.$el.querySelector(".fancybox__spinner");t&&(t.remove(),e.$el.classList.remove("is-loading")),"loading"===e.state&&(this.trigger("load",e),e.state="ready")}next(){const e=this.Carousel;e&&e.pages.length>1&&e.slideNext()}prev(){const e=this.Carousel;e&&e.pages.length>1&&e.slidePrev()}jumpTo(...e){this.Carousel&&this.Carousel.slideTo(...e)}close(e){if(e&&e.preventDefault(),["closing","customClosing","destroy"].includes(this.state))return;if(!1===this.trigger("shouldClose",e))return;if(this.state="closing",this.Carousel.Panzoom.destroy(),this.detachEvents(),this.trigger("closing",e),"destroy"===this.state)return;this.$container.setAttribute("aria-hidden","true"),this.$container.classList.add("is-closing");const t=this.getSlide();if(this.Carousel.slides.forEach((e=>{e.$content&&e.index!==t.index&&this.Carousel.trigger("removeSlide",e)})),"closing"===this.state){const e=void 0===t.hideClass?this.option("hideClass"):t.hideClass;this.animateCSS(t.$content,e,(()=>{this.destroy()}),!0)}}destroy(){if("destroy"===this.state)return;this.state="destroy",this.trigger("destroy");const e=this.option("placeFocusBack")?this.getSlide().$trigger:null;this.Carousel.destroy(),this.detachPlugins(),this.Carousel=null,this.options={},this.events={},this.$container.remove(),this.$container=this.$backdrop=this.$carousel=null,e&&Es(e),zs.delete(this.id);const t=Rs.getInstance();t?t.focus():(document.documentElement.classList.remove("with-fancybox"),document.body.classList.remove("is-using-mouse"),this.revealScrollbar())}static show(e,t={}){return new Rs(e,t)}static fromEvent(e,t={}){if(e.defaultPrevented)return;if(e.button&&0!==e.button)return;if(e.ctrlKey||e.metaKey||e.shiftKey)return;const i=e.composedPath()[0];let n,o,s,a=i;if((a.matches("[data-fancybox-trigger]")||(a=a.closest("[data-fancybox-trigger]")))&&(n=a&&a.dataset&&a.dataset.fancyboxTrigger),n){const e=document.querySelectorAll(`[data-fancybox="${n}"]`),t=parseInt(a.dataset.fancyboxIndex,10)||0;a=e.length?e[t]:a}a||(a=i),Array.from(Rs.openers.keys()).reverse().some((t=>{s=a;let i=!1;try{s instanceof Element&&("string"==typeof t||t instanceof String)&&(i=s.matches(t)||(s=s.closest(t)))}catch(n){}return!!i&&(e.preventDefault(),o=t,!0)}));let r=!1;if(o){t.event=e,t.target=s,s.origTarget=i,r=Rs.fromOpener(o,t);const n=Rs.getInstance();n&&"ready"===n.state&&e.detail&&document.body.classList.add("is-using-mouse")}return r}static fromOpener(e,t={}){let i=[],n=t.startIndex||0,o=t.target||null;const s=void 0!==(t=ss({},t,Rs.openers.get(e))).groupAll&&t.groupAll,a=void 0===t.groupAttr?"data-fancybox":t.groupAttr,r=a&&o?o.getAttribute(`${a}`):"";if(!o||r||s){const n=t.root||(o?o.getRootNode():document.body);i=[].slice.call(n.querySelectorAll(e))}if(o&&!s&&(i=r?i.filter((e=>e.getAttribute(`${a}`)===r)):[o]),!i.length)return!1;const l=Rs.getInstance();return!(l&&i.indexOf(l.options.$trigger)>-1)&&(n=o?i.indexOf(o):n,i=i.map((function(e){const t=["false","0","no","null","undefined"],i=["true","1","yes"],n=Object.assign({},e.dataset),o={};for(let[a,r]of Object.entries(n))if("fancybox"!==a)if("width"===a||"height"===a)o[`_${a}`]=r;else if("string"==typeof r||r instanceof String)if(t.indexOf(r)>-1)o[a]=!1;else if(i.indexOf(o[a])>-1)o[a]=!0;else try{o[a]=JSON.parse(r)}catch(s){o[a]=r}else o[a]=r;return e instanceof Element&&(o.$trigger=e),o})),new Rs(i,ss({},t,{startIndex:n,$trigger:o})))}static bind(e,t={}){function i(){document.body.addEventListener("click",Rs.fromEvent,!1)}xs&&(Rs.openers.size||(/complete|interactive|loaded/.test(document.readyState)?i():document.addEventListener("DOMContentLoaded",i)),Rs.openers.set(e,t))}static unbind(e){Rs.openers.delete(e),Rs.openers.size||Rs.destroy()}static destroy(){let e;for(;e=Rs.getInstance();)e.destroy();Rs.openers=new Map,document.body.removeEventListener("click",Rs.fromEvent,!1)}static getInstance(e){return e?zs.get(e):Array.from(zs.values()).reverse().find((e=>!["closing","customClosing","destroy"].includes(e.state)&&e))||null}static close(e=!0,t){if(e)for(const i of zs.values())i.close(t);else{const e=Rs.getInstance();e&&e.close(t)}}static next(){const e=Rs.getInstance();e&&e.next()}static prev(){const e=Rs.getInstance();e&&e.prev()}}Rs.version="4.0.29",Rs.defaults=Is,Rs.openers=new Map,Rs.Plugins=Os,Rs.bind("[data-fancybox]");for(const[Ql,ec]of Object.entries(Rs.Plugins||{}))"function"==typeof ec.create&&ec.create(Rs);var Fs={install(){Rs.bind('[data-fancybox="gallery"]',{})}};function js(e,t,i){return t in e?Object.defineProperty(e,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[t]=i,e}function Ws(e,t){for(var i=0;i<t.length;i++){var n=t[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function Hs(e,t,i){return t in e?Object.defineProperty(e,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[t]=i,e}function Us(e,t){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),i.push.apply(i,n)}return i}function qs(e){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?Us(Object(i),!0).forEach((function(t){Hs(e,t,i[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):Us(Object(i)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(i,t))}))}return e}var Xs={addCSS:!0,thumbWidth:15,watch:!0};function Ys(e,t){return function(){return Array.from(document.querySelectorAll(t)).includes(this)}.call(e,t)}var Ks=function(e){return null!=e?e.constructor:null},Gs=function(e,t){return!!(e&&t&&e instanceof t)},Zs=function(e){return null==e},Js=function(e){return Ks(e)===Object},Qs=function(e){return Ks(e)===String},ea=function(e){return Array.isArray(e)},ta=function(e){return Gs(e,NodeList)},ia=Qs,na=ea,oa=ta,sa=function(e){return Gs(e,Element)},aa=function(e){return Gs(e,Event)},ra=function(e){return Zs(e)||(Qs(e)||ea(e)||ta(e))&&!e.length||Js(e)&&!Object.keys(e).length};function la(e,t){if(1>t){var i=function(e){var t="".concat(e).match(/(?:\.(\d+))?(?:[eE]([+-]?\d+))?$/);return t?Math.max(0,(t[1]?t[1].length:0)-(t[2]?+t[2]:0)):0}(t);return parseFloat(e.toFixed(i))}return Math.round(e/t)*t}var ca=function(){function e(t,i){(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")})(this,e),sa(t)?this.element=t:ia(t)&&(this.element=document.querySelector(t)),sa(this.element)&&ra(this.element.rangeTouch)&&(this.config=qs({},Xs,{},i),this.init())}return function(e,t,i){t&&Ws(e.prototype,t),i&&Ws(e,i)}(e,[{key:"init",value:function(){e.enabled&&(this.config.addCSS&&(this.element.style.userSelect="none",this.element.style.webKitUserSelect="none",this.element.style.touchAction="manipulation"),this.listeners(!0),this.element.rangeTouch=this)}},{key:"destroy",value:function(){e.enabled&&(this.config.addCSS&&(this.element.style.userSelect="",this.element.style.webKitUserSelect="",this.element.style.touchAction=""),this.listeners(!1),this.element.rangeTouch=null)}},{key:"listeners",value:function(e){var t=this,i=e?"addEventListener":"removeEventListener";["touchstart","touchmove","touchend"].forEach((function(e){t.element[i](e,(function(e){return t.set(e)}),!1)}))}},{key:"get",value:function(t){if(!e.enabled||!aa(t))return null;var i,n=t.target,o=t.changedTouches[0],s=parseFloat(n.getAttribute("min"))||0,a=parseFloat(n.getAttribute("max"))||100,r=parseFloat(n.getAttribute("step"))||1,l=n.getBoundingClientRect(),c=100/l.width*(this.config.thumbWidth/2)/100;return 0>(i=100/l.width*(o.clientX-l.left))?i=0:100<i&&(i=100),50>i?i-=(100-2*i)*c:50<i&&(i+=2*(i-50)*c),s+la(i/100*(a-s),r)}},{key:"set",value:function(t){e.enabled&&aa(t)&&!t.target.disabled&&(t.preventDefault(),t.target.value=this.get(t),function(e,t){if(e&&t){var i=new Event(t,{bubbles:!0});e.dispatchEvent(i)}}(t.target,"touchend"===t.type?"change":"input"))}}],[{key:"setup",value:function(t){var i=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{},n=null;if(ra(t)||ia(t)?n=Array.from(document.querySelectorAll(ia(t)?t:'input[type="range"]')):sa(t)?n=[t]:oa(t)?n=Array.from(t):na(t)&&(n=t.filter(sa)),ra(n))return null;var o=qs({},Xs,{},i);if(ia(t)&&o.watch){var s=new MutationObserver((function(i){Array.from(i).forEach((function(i){Array.from(i.addedNodes).forEach((function(i){sa(i)&&Ys(i,t)&&new e(i,o)}))}))}));s.observe(document.body,{childList:!0,subtree:!0})}return n.map((function(t){return new e(t,i)}))}},{key:"enabled",get:function(){return"ontouchstart"in document.documentElement}}]),e}();const da=e=>null!=e?e.constructor:null,ua=(e,t)=>Boolean(e&&t&&e instanceof t),ha=e=>null==e,pa=e=>da(e)===Object,ma=e=>da(e)===String,fa=e=>da(e)===Function,ga=e=>Array.isArray(e),ya=e=>ua(e,NodeList),va=e=>ha(e)||(ma(e)||ga(e)||ya(e))&&!e.length||pa(e)&&!Object.keys(e).length;var ba=ha,wa=pa,ka=e=>da(e)===Number&&!Number.isNaN(e),xa=ma,Ca=e=>da(e)===Boolean,Sa=fa,Ea=ga,Ta=ya,La=e=>null!==e&&"object"==typeof e&&1===e.nodeType&&"object"==typeof e.style&&"object"==typeof e.ownerDocument,$a=e=>ua(e,Event),_a=e=>ua(e,KeyboardEvent),Aa=e=>ua(e,TextTrack)||!ha(e)&&ma(e.kind),Na=e=>ua(e,Promise)&&fa(e.then),Pa=e=>{if(ua(e,window.URL))return!0;if(!ma(e))return!1;let t=e;e.startsWith("http://")&&e.startsWith("https://")||(t=`http://${e}`);try{return!va(new URL(t).hostname)}catch(i){return!1}},Ba=va;const Ma=(()=>{const e=document.createElement("span"),t={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend",transition:"transitionend"},i=Object.keys(t).find((t=>void 0!==e.style[t]));return!!xa(i)&&t[i]})();function Va(e,t){setTimeout((()=>{try{e.hidden=!0,e.offsetHeight,e.hidden=!1}catch(t){}}),t)}const Oa={isIE:Boolean(window.document.documentMode),isEdge:window.navigator.userAgent.includes("Edge"),isWebkit:"WebkitAppearance"in document.documentElement.style&&!/Edge/.test(navigator.userAgent),isIPhone:/(iPhone|iPod)/gi.test(navigator.platform),isIos:"MacIntel"===navigator.platform&&navigator.maxTouchPoints>1||/(iPad|iPhone|iPod)/gi.test(navigator.platform)};function Ia(e,t){return t.split(".").reduce(((e,t)=>e&&e[t]),e)}function za(e={},...t){if(!t.length)return e;const i=t.shift();return wa(i)?(Object.keys(i).forEach((t=>{wa(i[t])?(Object.keys(e).includes(t)||Object.assign(e,{[t]:{}}),za(e[t],i[t])):Object.assign(e,{[t]:i[t]})})),za(e,...t)):e}function Da(e,t){const i=e.length?e:[e];Array.from(i).reverse().forEach(((e,i)=>{const n=i>0?t.cloneNode(!0):t,o=e.parentNode,s=e.nextSibling;n.appendChild(e),s?o.insertBefore(n,s):o.appendChild(n)}))}function Ra(e,t){La(e)&&!Ba(t)&&Object.entries(t).filter((([,e])=>!ba(e))).forEach((([t,i])=>e.setAttribute(t,i)))}function Fa(e,t,i){const n=document.createElement(e);return wa(t)&&Ra(n,t),xa(i)&&(n.innerText=i),n}function ja(e,t,i,n){La(t)&&t.appendChild(Fa(e,i,n))}function Wa(e){Ta(e)||Ea(e)?Array.from(e).forEach(Wa):La(e)&&La(e.parentNode)&&e.parentNode.removeChild(e)}function Ha(e){if(!La(e))return;let{length:t}=e.childNodes;for(;t>0;)e.removeChild(e.lastChild),t-=1}function Ua(e,t){return La(t)&&La(t.parentNode)&&La(e)?(t.parentNode.replaceChild(e,t),e):null}function qa(e,t){if(!xa(e)||Ba(e))return{};const i={},n=za({},t);return e.split(",").forEach((e=>{const t=e.trim(),o=t.replace(".",""),s=t.replace(/[[\]]/g,"").split("="),[a]=s,r=s.length>1?s[1].replace(/["']/g,""):"";switch(t.charAt(0)){case".":xa(n.class)?i.class=`${n.class} ${o}`:i.class=o;break;case"#":i.id=t.replace("#","");break;case"[":i[a]=r}})),za(n,i)}function Xa(e,t){if(!La(e))return;let i=t;Ca(i)||(i=!e.hidden),e.hidden=i}function Ya(e,t,i){if(Ta(e))return Array.from(e).map((e=>Ya(e,t,i)));if(La(e)){let n="toggle";return void 0!==i&&(n=i?"add":"remove"),e.classList[n](t),e.classList.contains(t)}return!1}function Ka(e,t){return La(e)&&e.classList.contains(t)}function Ga(e,t){const{prototype:i}=Element;return(i.matches||i.webkitMatchesSelector||i.mozMatchesSelector||i.msMatchesSelector||function(){return Array.from(document.querySelectorAll(t)).includes(this)}).call(e,t)}function Za(e){return this.elements.container.querySelectorAll(e)}function Ja(e){return this.elements.container.querySelector(e)}function Qa(e=null,t=!1){La(e)&&(e.focus({preventScroll:!0}),t&&Ya(e,this.config.classNames.tabFocus))}const er={"audio/ogg":"vorbis","audio/wav":"1","video/webm":"vp8, vorbis","video/mp4":"avc1.42E01E, mp4a.40.2","video/ogg":"theora"},tr={audio:"canPlayType"in document.createElement("audio"),video:"canPlayType"in document.createElement("video"),check(e,t,i){const n=Oa.isIPhone&&i&&tr.playsinline,o=tr[e]||"html5"!==t;return{api:o,ui:o&&tr.rangeInput&&("video"!==e||!Oa.isIPhone||n)}},pip:!(Oa.isIPhone||!Sa(Fa("video").webkitSetPresentationMode)&&(!document.pictureInPictureEnabled||Fa("video").disablePictureInPicture)),airplay:Sa(window.WebKitPlaybackTargetAvailabilityEvent),playsinline:"playsInline"in document.createElement("video"),mime(e){if(Ba(e))return!1;const[t]=e.split("/");let i=e;if(!this.isHTML5||t!==this.type)return!1;Object.keys(er).includes(i)&&(i+=`; codecs="${er[e]}"`);try{return Boolean(i&&this.media.canPlayType(i).replace(/no/,""))}catch(n){return!1}},textTracks:"textTracks"in document.createElement("video"),rangeInput:(()=>{const e=document.createElement("input");return e.type="range","range"===e.type})(),touch:"ontouchstart"in document.documentElement,transitions:!1!==Ma,reducedMotion:"matchMedia"in window&&window.matchMedia("(prefers-reduced-motion)").matches},ir=(()=>{let e=!1;try{const t=Object.defineProperty({},"passive",{get:()=>(e=!0,null)});window.addEventListener("test",null,t),window.removeEventListener("test",null,t)}catch(t){}return e})();function nr(e,t,i,n=!1,o=!0,s=!1){if(!e||!("addEventListener"in e)||Ba(t)||!Sa(i))return;const a=t.split(" ");let r=s;ir&&(r={passive:o,capture:s}),a.forEach((t=>{this&&this.eventListeners&&n&&this.eventListeners.push({element:e,type:t,callback:i,options:r}),e[n?"addEventListener":"removeEventListener"](t,i,r)}))}function or(e,t="",i,n=!0,o=!1){nr.call(this,e,t,i,!0,n,o)}function sr(e,t="",i,n=!0,o=!1){nr.call(this,e,t,i,!1,n,o)}function ar(e,t="",i,n=!0,o=!1){const s=(...a)=>{sr(e,t,s,n,o),i.apply(this,a)};nr.call(this,e,t,s,!0,n,o)}function rr(e,t="",i=!1,n={}){if(!La(e)||Ba(t))return;const o=new CustomEvent(t,{bubbles:i,detail:{...n,plyr:this}});e.dispatchEvent(o)}function lr(){this&&this.eventListeners&&(this.eventListeners.forEach((e=>{const{element:t,type:i,callback:n,options:o}=e;t.removeEventListener(i,n,o)})),this.eventListeners=[])}function cr(){return new Promise((e=>this.ready?setTimeout(e,0):or.call(this,this.elements.container,"ready",e))).then((()=>{}))}function dr(e){Na(e)&&e.then(null,(()=>{}))}function ur(e){return Ea(e)?e.filter(((t,i)=>e.indexOf(t)===i)):e}function hr(e,t){return Ea(e)&&e.length?e.reduce(((e,i)=>Math.abs(i-t)<Math.abs(e-t)?i:e)):null}function pr(e){return!(!window||!window.CSS)&&window.CSS.supports(e)}const mr=[[1,1],[4,3],[3,4],[5,4],[4,5],[3,2],[2,3],[16,10],[10,16],[16,9],[9,16],[21,9],[9,21],[32,9],[9,32]].reduce(((e,[t,i])=>({...e,[t/i]:[t,i]})),{});function fr(e){return!!(Ea(e)||xa(e)&&e.includes(":"))&&(Ea(e)?e:e.split(":")).map(Number).every(ka)}function gr(e){if(!Ea(e)||!e.every(ka))return null;const[t,i]=e,n=(e,t)=>0===t?e:n(t,e%t),o=n(t,i);return[t/o,i/o]}function yr(e){const t=e=>fr(e)?e.split(":").map(Number):null;let i=t(e);if(null===i&&(i=t(this.config.ratio)),null===i&&!Ba(this.embed)&&Ea(this.embed.ratio)&&({ratio:i}=this.embed),null===i&&this.isHTML5){const{videoWidth:e,videoHeight:t}=this.media;i=[e,t]}return gr(i)}function vr(e){if(!this.isVideo)return{};const{wrapper:t}=this.elements,i=yr.call(this,e);if(!Ea(i))return{};const[n,o]=gr(i),s=100/n*o;if(pr(`aspect-ratio: ${n}/${o}`)?t.style.aspectRatio=`${n}/${o}`:t.style.paddingBottom=`${s}%`,this.isVimeo&&!this.config.vimeo.premium&&this.supported.ui){const e=100/this.media.offsetWidth*parseInt(window.getComputedStyle(this.media).paddingBottom,10),i=(e-s)/(e/50);this.fullscreen.active?t.style.paddingBottom=null:this.media.style.transform=`translateY(-${i}%)`}else this.isHTML5&&t.classList.add(this.config.classNames.videoFixedRatio);return{padding:s,ratio:i}}function br(e,t,i=.05){const n=e/t,o=hr(Object.keys(mr),n);return Math.abs(o-n)<=i?mr[o]:[e,t]}const wr={getSources(){return this.isHTML5?Array.from(this.media.querySelectorAll("source")).filter((e=>{const t=e.getAttribute("type");return!!Ba(t)||tr.mime.call(this,t)})):[]},getQualityOptions(){return this.config.quality.forced?this.config.quality.options:wr.getSources.call(this).map((e=>Number(e.getAttribute("size")))).filter(Boolean)},setup(){if(!this.isHTML5)return;const e=this;e.options.speed=e.config.speed.options,Ba(this.config.ratio)||vr.call(e),Object.defineProperty(e.media,"quality",{get(){const t=wr.getSources.call(e).find((t=>t.getAttribute("src")===e.source));return t&&Number(t.getAttribute("size"))},set(t){if(e.quality!==t){if(e.config.quality.forced&&Sa(e.config.quality.onChange))e.config.quality.onChange(t);else{const i=wr.getSources.call(e).find((e=>Number(e.getAttribute("size"))===t));if(!i)return;const{currentTime:n,paused:o,preload:s,readyState:a,playbackRate:r}=e.media;e.media.src=i.getAttribute("src"),("none"!==s||a)&&(e.once("loadedmetadata",(()=>{e.speed=r,e.currentTime=n,o||dr(e.play())})),e.media.load())}rr.call(e,e.media,"qualitychange",!1,{quality:t})}}})},cancelRequests(){this.isHTML5&&(Wa(wr.getSources.call(this)),this.media.setAttribute("src",this.config.blankVideo),this.media.load(),this.debug.log("Cancelled network requests"))}};function kr(e){return`${e}-${Math.floor(1e4*Math.random())}`}function xr(e,...t){return Ba(e)?e:e.toString().replace(/{(\d+)}/g,((e,i)=>t[i].toString()))}const Cr=(e="",t="",i="")=>e.replace(new RegExp(t.toString().replace(/([.*+?^=!:${}()|[\]/\\])/g,"\\$1"),"g"),i.toString()),Sr=(e="")=>e.toString().replace(/\w\S*/g,(e=>e.charAt(0).toUpperCase()+e.slice(1).toLowerCase()));function Er(e=""){let t=e.toString();return t=function(e=""){let t=e.toString();return t=Cr(t,"-"," "),t=Cr(t,"_"," "),t=Sr(t),Cr(t," ","")}(t),t.charAt(0).toLowerCase()+t.slice(1)}function Tr(e){const t=document.createElement("div");return t.appendChild(e),t.innerHTML}const Lr={pip:"PIP",airplay:"AirPlay",html5:"HTML5",vimeo:"Vimeo",youtube:"YouTube"},$r={get(e="",t={}){if(Ba(e)||Ba(t))return"";let i=Ia(t.i18n,e);if(Ba(i))return Object.keys(Lr).includes(e)?Lr[e]:"";const n={"{seektime}":t.seekTime,"{title}":t.title};return Object.entries(n).forEach((([e,t])=>{i=Cr(i,e,t)})),i}};class _r{constructor(e){js(this,"get",(e=>{if(!_r.supported||!this.enabled)return null;const t=window.localStorage.getItem(this.key);if(Ba(t))return null;const i=JSON.parse(t);return xa(e)&&e.length?i[e]:i})),js(this,"set",(e=>{if(!_r.supported||!this.enabled)return;if(!wa(e))return;let t=this.get();Ba(t)&&(t={}),za(t,e);try{window.localStorage.setItem(this.key,JSON.stringify(t))}catch(i){}})),this.enabled=e.config.storage.enabled,this.key=e.config.storage.key}static get supported(){try{if(!("localStorage"in window))return!1;const e="___test";return window.localStorage.setItem(e,e),window.localStorage.removeItem(e),!0}catch(e){return!1}}}function Ar(e,t="text"){return new Promise(((i,n)=>{try{const n=new XMLHttpRequest;if(!("withCredentials"in n))return;n.addEventListener("load",(()=>{if("text"===t)try{i(JSON.parse(n.responseText))}catch(e){i(n.responseText)}else i(n.response)})),n.addEventListener("error",(()=>{throw new Error(n.status)})),n.open("GET",e,!0),n.responseType=t,n.send()}catch(o){n(o)}}))}function Nr(e,t){if(!xa(e))return;const i=xa(t);let n=!1;const o=()=>null!==document.getElementById(t),s=(e,t)=>{e.innerHTML=t,i&&o()||document.body.insertAdjacentElement("afterbegin",e)};if(!i||!o()){const o=_r.supported,a=document.createElement("div");if(a.setAttribute("hidden",""),i&&a.setAttribute("id",t),o){const e=window.localStorage.getItem(`cache-${t}`);if(n=null!==e,n){const t=JSON.parse(e);s(a,t.content)}}Ar(e).then((e=>{if(!Ba(e)){if(o)try{window.localStorage.setItem(`cache-${t}`,JSON.stringify({content:e}))}catch(i){}s(a,e)}})).catch((()=>{}))}}const Pr=e=>Math.trunc(e/60/60%60,10);function Br(e=0,t=!1,i=!1){if(!ka(e))return Br(void 0,t,i);const n=e=>`0${e}`.slice(-2);let o=Pr(e);const s=(a=e,Math.trunc(a/60%60,10));var a;const r=(e=>Math.trunc(e%60,10))(e);return o=t||o>0?`${o}:`:"",`${i&&e>0?"-":""}${o}${n(s)}:${n(r)}`}const Mr={getIconUrl(){const e=new URL(this.config.iconUrl,window.location),t=window.location.host?window.location.host:window.top.location.host,i=e.host!==t||Oa.isIE&&!window.svg4everybody;return{url:this.config.iconUrl,cors:i}},findElements(){try{return this.elements.controls=Ja.call(this,this.config.selectors.controls.wrapper),this.elements.buttons={play:Za.call(this,this.config.selectors.buttons.play),pause:Ja.call(this,this.config.selectors.buttons.pause),restart:Ja.call(this,this.config.selectors.buttons.restart),rewind:Ja.call(this,this.config.selectors.buttons.rewind),fastForward:Ja.call(this,this.config.selectors.buttons.fastForward),mute:Ja.call(this,this.config.selectors.buttons.mute),pip:Ja.call(this,this.config.selectors.buttons.pip),airplay:Ja.call(this,this.config.selectors.buttons.airplay),settings:Ja.call(this,this.config.selectors.buttons.settings),captions:Ja.call(this,this.config.selectors.buttons.captions),fullscreen:Ja.call(this,this.config.selectors.buttons.fullscreen)},this.elements.progress=Ja.call(this,this.config.selectors.progress),this.elements.inputs={seek:Ja.call(this,this.config.selectors.inputs.seek),volume:Ja.call(this,this.config.selectors.inputs.volume)},this.elements.display={buffer:Ja.call(this,this.config.selectors.display.buffer),currentTime:Ja.call(this,this.config.selectors.display.currentTime),duration:Ja.call(this,this.config.selectors.display.duration)},La(this.elements.progress)&&(this.elements.display.seekTooltip=this.elements.progress.querySelector(`.${this.config.classNames.tooltip}`)),!0}catch(e){return this.debug.warn("It looks like there is a problem with your custom controls HTML",e),this.toggleNativeControls(!0),!1}},createIcon(e,t){const i="http://www.w3.org/2000/svg",n=Mr.getIconUrl.call(this),o=`${n.cors?"":n.url}#${this.config.iconPrefix}`,s=document.createElementNS(i,"svg");Ra(s,za(t,{"aria-hidden":"true",focusable:"false"}));const a=document.createElementNS(i,"use"),r=`${o}-${e}`;return"href"in a&&a.setAttributeNS("http://www.w3.org/1999/xlink","href",r),a.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",r),s.appendChild(a),s},createLabel(e,t={}){const i=$r.get(e,this.config);return Fa("span",{...t,class:[t.class,this.config.classNames.hidden].filter(Boolean).join(" ")},i)},createBadge(e){if(Ba(e))return null;const t=Fa("span",{class:this.config.classNames.menu.value});return t.appendChild(Fa("span",{class:this.config.classNames.menu.badge},e)),t},createButton(e,t){const i=za({},t);let n=Er(e);const o={element:"button",toggle:!1,label:null,icon:null,labelPressed:null,iconPressed:null};switch(["element","icon","label"].forEach((e=>{Object.keys(i).includes(e)&&(o[e]=i[e],delete i[e])})),"button"!==o.element||Object.keys(i).includes("type")||(i.type="button"),Object.keys(i).includes("class")?i.class.split(" ").some((e=>e===this.config.classNames.control))||za(i,{class:`${i.class} ${this.config.classNames.control}`}):i.class=this.config.classNames.control,e){case"play":o.toggle=!0,o.label="play",o.labelPressed="pause",o.icon="play",o.iconPressed="pause";break;case"mute":o.toggle=!0,o.label="mute",o.labelPressed="unmute",o.icon="volume",o.iconPressed="muted";break;case"captions":o.toggle=!0,o.label="enableCaptions",o.labelPressed="disableCaptions",o.icon="captions-off",o.iconPressed="captions-on";break;case"fullscreen":o.toggle=!0,o.label="enterFullscreen",o.labelPressed="exitFullscreen",o.icon="enter-fullscreen",o.iconPressed="exit-fullscreen";break;case"play-large":i.class+=` ${this.config.classNames.control}--overlaid`,n="play",o.label="play",o.icon="play";break;default:Ba(o.label)&&(o.label=n),Ba(o.icon)&&(o.icon=e)}const s=Fa(o.element);return o.toggle?(s.appendChild(Mr.createIcon.call(this,o.iconPressed,{class:"icon--pressed"})),s.appendChild(Mr.createIcon.call(this,o.icon,{class:"icon--not-pressed"})),s.appendChild(Mr.createLabel.call(this,o.labelPressed,{class:"label--pressed"})),s.appendChild(Mr.createLabel.call(this,o.label,{class:"label--not-pressed"}))):(s.appendChild(Mr.createIcon.call(this,o.icon)),s.appendChild(Mr.createLabel.call(this,o.label))),za(i,qa(this.config.selectors.buttons[n],i)),Ra(s,i),"play"===n?(Ea(this.elements.buttons[n])||(this.elements.buttons[n]=[]),this.elements.buttons[n].push(s)):this.elements.buttons[n]=s,s},createRange(e,t){const i=Fa("input",za(qa(this.config.selectors.inputs[e]),{type:"range",min:0,max:100,step:.01,value:0,autocomplete:"off",role:"slider","aria-label":$r.get(e,this.config),"aria-valuemin":0,"aria-valuemax":100,"aria-valuenow":0},t));return this.elements.inputs[e]=i,Mr.updateRangeFill.call(this,i),ca.setup(i),i},createProgress(e,t){const i=Fa("progress",za(qa(this.config.selectors.display[e]),{min:0,max:100,value:0,role:"progressbar","aria-hidden":!0},t));if("volume"!==e){i.appendChild(Fa("span",null,"0"));const t={played:"played",buffer:"buffered"}[e],n=t?$r.get(t,this.config):"";i.innerText=`% ${n.toLowerCase()}`}return this.elements.display[e]=i,i},createTime(e,t){const i=qa(this.config.selectors.display[e],t),n=Fa("div",za(i,{class:`${i.class?i.class:""} ${this.config.classNames.display.time} `.trim(),"aria-label":$r.get(e,this.config)}),"00:00");return this.elements.display[e]=n,n},bindMenuItemShortcuts(e,t){or.call(this,e,"keydown keyup",(i=>{if(!["Space","ArrowUp","ArrowDown","ArrowRight"].includes(i.key))return;if(i.preventDefault(),i.stopPropagation(),"keydown"===i.type)return;const n=Ga(e,'[role="menuitemradio"]');if(!n&&["Space","ArrowRight"].includes(i.key))Mr.showMenuPanel.call(this,t,!0);else{let t;"Space"!==i.key&&("ArrowDown"===i.key||n&&"ArrowRight"===i.key?(t=e.nextElementSibling,La(t)||(t=e.parentNode.firstElementChild)):(t=e.previousElementSibling,La(t)||(t=e.parentNode.lastElementChild)),Qa.call(this,t,!0))}}),!1),or.call(this,e,"keyup",(e=>{"Return"===e.key&&Mr.focusFirstMenuItem.call(this,null,!0)}))},createMenuItem({value:e,list:t,type:i,title:n,badge:o=null,checked:s=!1}){const a=qa(this.config.selectors.inputs[i]),r=Fa("button",za(a,{type:"button",role:"menuitemradio",class:`${this.config.classNames.control} ${a.class?a.class:""}`.trim(),"aria-checked":s,value:e})),l=Fa("span");l.innerHTML=n,La(o)&&l.appendChild(o),r.appendChild(l),Object.defineProperty(r,"checked",{enumerable:!0,get:()=>"true"===r.getAttribute("aria-checked"),set(e){e&&Array.from(r.parentNode.children).filter((e=>Ga(e,'[role="menuitemradio"]'))).forEach((e=>e.setAttribute("aria-checked","false"))),r.setAttribute("aria-checked",e?"true":"false")}}),this.listeners.bind(r,"click keyup",(t=>{if(!_a(t)||"Space"===t.key){switch(t.preventDefault(),t.stopPropagation(),r.checked=!0,i){case"language":this.currentTrack=Number(e);break;case"quality":this.quality=e;break;case"speed":this.speed=parseFloat(e)}Mr.showMenuPanel.call(this,"home",_a(t))}}),i,!1),Mr.bindMenuItemShortcuts.call(this,r,i),t.appendChild(r)},formatTime(e=0,t=!1){return ka(e)?Br(e,Pr(this.duration)>0,t):e},updateTimeDisplay(e=null,t=0,i=!1){La(e)&&ka(t)&&(e.innerText=Mr.formatTime(t,i))},updateVolume(){this.supported.ui&&(La(this.elements.inputs.volume)&&Mr.setRange.call(this,this.elements.inputs.volume,this.muted?0:this.volume),La(this.elements.buttons.mute)&&(this.elements.buttons.mute.pressed=this.muted||0===this.volume))},setRange(e,t=0){La(e)&&(e.value=t,Mr.updateRangeFill.call(this,e))},updateProgress(e){if(!this.supported.ui||!$a(e))return;let t=0;const i=(e,t)=>{const i=ka(t)?t:0,n=La(e)?e:this.elements.display.buffer;if(La(n)){n.value=i;const e=n.getElementsByTagName("span")[0];La(e)&&(e.childNodes[0].nodeValue=i)}};if(e)switch(e.type){case"timeupdate":case"seeking":case"seeked":t=function(e,t){return 0===e||0===t||Number.isNaN(e)||Number.isNaN(t)?0:(e/t*100).toFixed(2)}(this.currentTime,this.duration),"timeupdate"===e.type&&Mr.setRange.call(this,this.elements.inputs.seek,t);break;case"playing":case"progress":i(this.elements.display.buffer,100*this.buffered)}},updateRangeFill(e){const t=$a(e)?e.target:e;if(La(t)&&"range"===t.getAttribute("type")){if(Ga(t,this.config.selectors.inputs.seek)){t.setAttribute("aria-valuenow",this.currentTime);const e=Mr.formatTime(this.currentTime),i=Mr.formatTime(this.duration),n=$r.get("seekLabel",this.config);t.setAttribute("aria-valuetext",n.replace("{currentTime}",e).replace("{duration}",i))}else if(Ga(t,this.config.selectors.inputs.volume)){const e=100*t.value;t.setAttribute("aria-valuenow",e),t.setAttribute("aria-valuetext",`${e.toFixed(1)}%`)}else t.setAttribute("aria-valuenow",t.value);Oa.isWebkit&&t.style.setProperty("--value",t.value/t.max*100+"%")}},updateSeekTooltip(e){var t,i;if(!this.config.tooltips.seek||!La(this.elements.inputs.seek)||!La(this.elements.display.seekTooltip)||0===this.duration)return;const n=this.elements.display.seekTooltip,o=`${this.config.classNames.tooltip}--visible`,s=e=>Ya(n,o,e);if(this.touch)return void s(!1);let a=0;const r=this.elements.progress.getBoundingClientRect();if($a(e))a=100/r.width*(e.pageX-r.left);else{if(!Ka(n,o))return;a=parseFloat(n.style.left,10)}a<0?a=0:a>100&&(a=100);const l=this.duration/100*a;n.innerText=Mr.formatTime(l);const c=null===(t=this.config.markers)||void 0===t||null===(i=t.points)||void 0===i?void 0:i.find((({time:e})=>e===Math.round(l)));c&&n.insertAdjacentHTML("afterbegin",`${c.label}<br>`),n.style.left=`${a}%`,$a(e)&&["mouseenter","mouseleave"].includes(e.type)&&s("mouseenter"===e.type)},timeUpdate(e){const t=!La(this.elements.display.duration)&&this.config.invertTime;Mr.updateTimeDisplay.call(this,this.elements.display.currentTime,t?this.duration-this.currentTime:this.currentTime,t),e&&"timeupdate"===e.type&&this.media.seeking||Mr.updateProgress.call(this,e)},durationUpdate(){if(!this.supported.ui||!this.config.invertTime&&this.currentTime)return;if(this.duration>=2**32)return Xa(this.elements.display.currentTime,!0),void Xa(this.elements.progress,!0);La(this.elements.inputs.seek)&&this.elements.inputs.seek.setAttribute("aria-valuemax",this.duration);const e=La(this.elements.display.duration);!e&&this.config.displayDuration&&this.paused&&Mr.updateTimeDisplay.call(this,this.elements.display.currentTime,this.duration),e&&Mr.updateTimeDisplay.call(this,this.elements.display.duration,this.duration),this.config.markers.enabled&&Mr.setMarkers.call(this),Mr.updateSeekTooltip.call(this)},toggleMenuButton(e,t){Xa(this.elements.settings.buttons[e],!t)},updateSetting(e,t,i){const n=this.elements.settings.panels[e];let o=null,s=t;if("captions"===e)o=this.currentTrack;else{if(o=Ba(i)?this[e]:i,Ba(o)&&(o=this.config[e].default),!Ba(this.options[e])&&!this.options[e].includes(o))return void this.debug.warn(`Unsupported value of '${o}' for ${e}`);if(!this.config[e].options.includes(o))return void this.debug.warn(`Disabled value of '${o}' for ${e}`)}if(La(s)||(s=n&&n.querySelector('[role="menu"]')),!La(s))return;this.elements.settings.buttons[e].querySelector(`.${this.config.classNames.menu.value}`).innerHTML=Mr.getLabel.call(this,e,o);const a=s&&s.querySelector(`[value="${o}"]`);La(a)&&(a.checked=!0)},getLabel(e,t){switch(e){case"speed":return 1===t?$r.get("normal",this.config):`${t}&times;`;case"quality":if(ka(t)){const e=$r.get(`qualityLabel.${t}`,this.config);return e.length?e:`${t}p`}return Sr(t);case"captions":return Ir.getLabel.call(this);default:return null}},setQualityMenu(e){if(!La(this.elements.settings.panels.quality))return;const t="quality",i=this.elements.settings.panels.quality.querySelector('[role="menu"]');Ea(e)&&(this.options.quality=ur(e).filter((e=>this.config.quality.options.includes(e))));const n=!Ba(this.options.quality)&&this.options.quality.length>1;if(Mr.toggleMenuButton.call(this,t,n),Ha(i),Mr.checkMenu.call(this),!n)return;const o=e=>{const t=$r.get(`qualityBadge.${e}`,this.config);return t.length?Mr.createBadge.call(this,t):null};this.options.quality.sort(((e,t)=>{const i=this.config.quality.options;return i.indexOf(e)>i.indexOf(t)?1:-1})).forEach((e=>{Mr.createMenuItem.call(this,{value:e,list:i,type:t,title:Mr.getLabel.call(this,"quality",e),badge:o(e)})})),Mr.updateSetting.call(this,t,i)},setCaptionsMenu(){if(!La(this.elements.settings.panels.captions))return;const e="captions",t=this.elements.settings.panels.captions.querySelector('[role="menu"]'),i=Ir.getTracks.call(this),n=Boolean(i.length);if(Mr.toggleMenuButton.call(this,e,n),Ha(t),Mr.checkMenu.call(this),!n)return;const o=i.map(((e,i)=>({value:i,checked:this.captions.toggled&&this.currentTrack===i,title:Ir.getLabel.call(this,e),badge:e.language&&Mr.createBadge.call(this,e.language.toUpperCase()),list:t,type:"language"})));o.unshift({value:-1,checked:!this.captions.toggled,title:$r.get("disabled",this.config),list:t,type:"language"}),o.forEach(Mr.createMenuItem.bind(this)),Mr.updateSetting.call(this,e,t)},setSpeedMenu(){if(!La(this.elements.settings.panels.speed))return;const e="speed",t=this.elements.settings.panels.speed.querySelector('[role="menu"]');this.options.speed=this.options.speed.filter((e=>e>=this.minimumSpeed&&e<=this.maximumSpeed));const i=!Ba(this.options.speed)&&this.options.speed.length>1;Mr.toggleMenuButton.call(this,e,i),Ha(t),Mr.checkMenu.call(this),i&&(this.options.speed.forEach((i=>{Mr.createMenuItem.call(this,{value:i,list:t,type:e,title:Mr.getLabel.call(this,"speed",i)})})),Mr.updateSetting.call(this,e,t))},checkMenu(){const{buttons:e}=this.elements.settings,t=!Ba(e)&&Object.values(e).some((e=>!e.hidden));Xa(this.elements.settings.menu,!t)},focusFirstMenuItem(e,t=!1){if(this.elements.settings.popup.hidden)return;let i=e;La(i)||(i=Object.values(this.elements.settings.panels).find((e=>!e.hidden)));const n=i.querySelector('[role^="menuitem"]');Qa.call(this,n,t)},toggleMenu(e){const{popup:t}=this.elements.settings,i=this.elements.buttons.settings;if(!La(t)||!La(i))return;const{hidden:n}=t;let o=n;if(Ca(e))o=e;else if(_a(e)&&"Escape"===e.key)o=!1;else if($a(e)){const n=Sa(e.composedPath)?e.composedPath()[0]:e.target,s=t.contains(n);if(s||!s&&e.target!==i&&o)return}i.setAttribute("aria-expanded",o),Xa(t,!o),Ya(this.elements.container,this.config.classNames.menu.open,o),o&&_a(e)?Mr.focusFirstMenuItem.call(this,null,!0):o||n||Qa.call(this,i,_a(e))},getMenuSize(e){const t=e.cloneNode(!0);t.style.position="absolute",t.style.opacity=0,t.removeAttribute("hidden"),e.parentNode.appendChild(t);const i=t.scrollWidth,n=t.scrollHeight;return Wa(t),{width:i,height:n}},showMenuPanel(e="",t=!1){const i=this.elements.container.querySelector(`#plyr-settings-${this.id}-${e}`);if(!La(i))return;const n=i.parentNode,o=Array.from(n.children).find((e=>!e.hidden));if(tr.transitions&&!tr.reducedMotion){n.style.width=`${o.scrollWidth}px`,n.style.height=`${o.scrollHeight}px`;const e=Mr.getMenuSize.call(this,i),t=e=>{e.target===n&&["width","height"].includes(e.propertyName)&&(n.style.width="",n.style.height="",sr.call(this,n,Ma,t))};or.call(this,n,Ma,t),n.style.width=`${e.width}px`,n.style.height=`${e.height}px`}Xa(o,!0),Xa(i,!1),Mr.focusFirstMenuItem.call(this,i,t)},setDownloadUrl(){const e=this.elements.buttons.download;La(e)&&e.setAttribute("href",this.download)},create(e){const{bindMenuItemShortcuts:t,createButton:i,createProgress:n,createRange:o,createTime:s,setQualityMenu:a,setSpeedMenu:r,showMenuPanel:l}=Mr;this.elements.controls=null,Ea(this.config.controls)&&this.config.controls.includes("play-large")&&this.elements.container.appendChild(i.call(this,"play-large"));const c=Fa("div",qa(this.config.selectors.controls.wrapper));this.elements.controls=c;const d={class:"plyr__controls__item"};return ur(Ea(this.config.controls)?this.config.controls:[]).forEach((a=>{if("restart"===a&&c.appendChild(i.call(this,"restart",d)),"rewind"===a&&c.appendChild(i.call(this,"rewind",d)),"play"===a&&c.appendChild(i.call(this,"play",d)),"fast-forward"===a&&c.appendChild(i.call(this,"fast-forward",d)),"progress"===a){const t=Fa("div",{class:`${d.class} plyr__progress__container`}),i=Fa("div",qa(this.config.selectors.progress));if(i.appendChild(o.call(this,"seek",{id:`plyr-seek-${e.id}`})),i.appendChild(n.call(this,"buffer")),this.config.tooltips.seek){const e=Fa("span",{class:this.config.classNames.tooltip},"00:00");i.appendChild(e),this.elements.display.seekTooltip=e}this.elements.progress=i,t.appendChild(this.elements.progress),c.appendChild(t)}if("current-time"===a&&c.appendChild(s.call(this,"currentTime",d)),"duration"===a&&c.appendChild(s.call(this,"duration",d)),"mute"===a||"volume"===a){let{volume:t}=this.elements;if(La(t)&&c.contains(t)||(t=Fa("div",za({},d,{class:`${d.class} plyr__volume`.trim()})),this.elements.volume=t,c.appendChild(t)),"mute"===a&&t.appendChild(i.call(this,"mute")),"volume"===a&&!Oa.isIos){const i={max:1,step:.05,value:this.config.volume};t.appendChild(o.call(this,"volume",za(i,{id:`plyr-volume-${e.id}`})))}}if("captions"===a&&c.appendChild(i.call(this,"captions",d)),"settings"===a&&!Ba(this.config.settings)){const n=Fa("div",za({},d,{class:`${d.class} plyr__menu`.trim(),hidden:""}));n.appendChild(i.call(this,"settings",{"aria-haspopup":!0,"aria-controls":`plyr-settings-${e.id}`,"aria-expanded":!1}));const o=Fa("div",{class:"plyr__menu__container",id:`plyr-settings-${e.id}`,hidden:""}),s=Fa("div"),a=Fa("div",{id:`plyr-settings-${e.id}-home`}),r=Fa("div",{role:"menu"});a.appendChild(r),s.appendChild(a),this.elements.settings.panels.home=a,this.config.settings.forEach((i=>{const n=Fa("button",za(qa(this.config.selectors.buttons.settings),{type:"button",class:`${this.config.classNames.control} ${this.config.classNames.control}--forward`,role:"menuitem","aria-haspopup":!0,hidden:""}));t.call(this,n,i),or.call(this,n,"click",(()=>{l.call(this,i,!1)}));const o=Fa("span",null,$r.get(i,this.config)),a=Fa("span",{class:this.config.classNames.menu.value});a.innerHTML=e[i],o.appendChild(a),n.appendChild(o),r.appendChild(n);const c=Fa("div",{id:`plyr-settings-${e.id}-${i}`,hidden:""}),d=Fa("button",{type:"button",class:`${this.config.classNames.control} ${this.config.classNames.control}--back`});d.appendChild(Fa("span",{"aria-hidden":!0},$r.get(i,this.config))),d.appendChild(Fa("span",{class:this.config.classNames.hidden},$r.get("menuBack",this.config))),or.call(this,c,"keydown",(e=>{"ArrowLeft"===e.key&&(e.preventDefault(),e.stopPropagation(),l.call(this,"home",!0))}),!1),or.call(this,d,"click",(()=>{l.call(this,"home",!1)})),c.appendChild(d),c.appendChild(Fa("div",{role:"menu"})),s.appendChild(c),this.elements.settings.buttons[i]=n,this.elements.settings.panels[i]=c})),o.appendChild(s),n.appendChild(o),c.appendChild(n),this.elements.settings.popup=o,this.elements.settings.menu=n}if("pip"===a&&tr.pip&&c.appendChild(i.call(this,"pip",d)),"airplay"===a&&tr.airplay&&c.appendChild(i.call(this,"airplay",d)),"download"===a){const e=za({},d,{element:"a",href:this.download,target:"_blank"});this.isHTML5&&(e.download="");const{download:t}=this.config.urls;!Pa(t)&&this.isEmbed&&za(e,{icon:`logo-${this.provider}`,label:this.provider}),c.appendChild(i.call(this,"download",e))}"fullscreen"===a&&c.appendChild(i.call(this,"fullscreen",d))})),this.isHTML5&&a.call(this,wr.getQualityOptions.call(this)),r.call(this),c},inject(){if(this.config.loadSprite){const e=Mr.getIconUrl.call(this);e.cors&&Nr(e.url,"sprite-plyr")}this.id=Math.floor(1e4*Math.random());let e=null;this.elements.controls=null;const t={id:this.id,seektime:this.config.seekTime,title:this.config.title};let i,n=!0;if(Sa(this.config.controls)&&(this.config.controls=this.config.controls.call(this,t)),this.config.controls||(this.config.controls=[]),La(this.config.controls)||xa(this.config.controls)?e=this.config.controls:(e=Mr.create.call(this,{id:this.id,seektime:this.config.seekTime,speed:this.speed,quality:this.quality,captions:Ir.getLabel.call(this)}),n=!1),n&&xa(this.config.controls)&&(e=(e=>{let i=e;return Object.entries(t).forEach((([e,t])=>{i=Cr(i,`{${e}}`,t)})),i})(e)),xa(this.config.selectors.controls.container)&&(i=document.querySelector(this.config.selectors.controls.container)),La(i)||(i=this.elements.container),i[La(e)?"insertAdjacentElement":"insertAdjacentHTML"]("afterbegin",e),La(this.elements.controls)||Mr.findElements.call(this),!Ba(this.elements.buttons)){const e=e=>{const t=this.config.classNames.controlPressed;Object.defineProperty(e,"pressed",{enumerable:!0,get:()=>Ka(e,t),set(i=!1){Ya(e,t,i)}})};Object.values(this.elements.buttons).filter(Boolean).forEach((t=>{Ea(t)||Ta(t)?Array.from(t).filter(Boolean).forEach(e):e(t)}))}if(Oa.isEdge&&Va(i),this.config.tooltips.controls){const{classNames:e,selectors:t}=this.config,i=`${t.controls.wrapper} ${t.labels} .${e.hidden}`,n=Za.call(this,i);Array.from(n).forEach((e=>{Ya(e,this.config.classNames.hidden,!1),Ya(e,this.config.classNames.tooltip,!0)}))}},setMediaMetadata(){try{"mediaSession"in navigator&&(navigator.mediaSession.metadata=new window.MediaMetadata({title:this.config.mediaMetadata.title,artist:this.config.mediaMetadata.artist,album:this.config.mediaMetadata.album,artwork:this.config.mediaMetadata.artwork}))}catch(e){}},setMarkers(){var e,t;if(!this.duration||this.elements.markers)return;const i=null===(e=this.config.markers)||void 0===e||null===(t=e.points)||void 0===t?void 0:t.filter((({time:e})=>e>0&&e<this.duration));if(null==i||!i.length)return;const n=document.createDocumentFragment(),o=document.createDocumentFragment();let s=null;const a=`${this.config.classNames.tooltip}--visible`,r=e=>Ya(s,a,e);i.forEach((e=>{const t=Fa("span",{class:this.config.classNames.marker},""),i=e.time/this.duration*100+"%";s&&(t.addEventListener("mouseenter",(()=>{e.label||(s.style.left=i,s.innerHTML=e.label,r(!0))})),t.addEventListener("mouseleave",(()=>{r(!1)}))),t.addEventListener("click",(()=>{this.currentTime=e.time})),t.style.left=i,o.appendChild(t)})),n.appendChild(o),this.config.tooltips.seek||(s=Fa("span",{class:this.config.classNames.tooltip},""),n.appendChild(s)),this.elements.markers={points:o,tip:s},this.elements.progress.appendChild(n)}};function Vr(e,t=!0){let i=e;if(t){const e=document.createElement("a");e.href=i,i=e.href}try{return new URL(i)}catch(n){return null}}function Or(e){const t=new URLSearchParams;return wa(e)&&Object.entries(e).forEach((([e,i])=>{t.set(e,i)})),t}const Ir={setup(){if(!this.supported.ui)return;if(!this.isVideo||this.isYouTube||this.isHTML5&&!tr.textTracks)return void(Ea(this.config.controls)&&this.config.controls.includes("settings")&&this.config.settings.includes("captions")&&Mr.setCaptionsMenu.call(this));if(La(this.elements.captions)||(this.elements.captions=Fa("div",qa(this.config.selectors.captions)),function(e,t){La(e)&&La(t)&&t.parentNode.insertBefore(e,t.nextSibling)}(this.elements.captions,this.elements.wrapper)),Oa.isIE&&window.URL){const e=this.media.querySelectorAll("track");Array.from(e).forEach((e=>{const t=e.getAttribute("src"),i=Vr(t);null!==i&&i.hostname!==window.location.href.hostname&&["http:","https:"].includes(i.protocol)&&Ar(t,"blob").then((t=>{e.setAttribute("src",window.URL.createObjectURL(t))})).catch((()=>{Wa(e)}))}))}const e=ur((navigator.languages||[navigator.language||navigator.userLanguage||"en"]).map((e=>e.split("-")[0])));let t=(this.storage.get("language")||this.config.captions.language||"auto").toLowerCase();"auto"===t&&([t]=e);let i=this.storage.get("captions");if(Ca(i)||({active:i}=this.config.captions),Object.assign(this.captions,{toggled:!1,active:i,language:t,languages:e}),this.isHTML5){const e=this.config.captions.update?"addtrack removetrack":"removetrack";or.call(this,this.media.textTracks,e,Ir.update.bind(this))}setTimeout(Ir.update.bind(this),0)},update(){const e=Ir.getTracks.call(this,!0),{active:t,language:i,meta:n,currentTrackNode:o}=this.captions,s=Boolean(e.find((e=>e.language===i)));this.isHTML5&&this.isVideo&&e.filter((e=>!n.get(e))).forEach((e=>{this.debug.log("Track added",e),n.set(e,{default:"showing"===e.mode}),"showing"===e.mode&&(e.mode="hidden"),or.call(this,e,"cuechange",(()=>Ir.updateCues.call(this)))})),(s&&this.language!==i||!e.includes(o))&&(Ir.setLanguage.call(this,i),Ir.toggle.call(this,t&&s)),this.elements&&Ya(this.elements.container,this.config.classNames.captions.enabled,!Ba(e)),Ea(this.config.controls)&&this.config.controls.includes("settings")&&this.config.settings.includes("captions")&&Mr.setCaptionsMenu.call(this)},toggle(e,t=!0){if(!this.supported.ui)return;const{toggled:i}=this.captions,n=this.config.classNames.captions.active,o=ba(e)?!i:e;if(o!==i){if(t||(this.captions.active=o,this.storage.set({captions:o})),!this.language&&o&&!t){const e=Ir.getTracks.call(this),t=Ir.findTrack.call(this,[this.captions.language,...this.captions.languages],!0);return this.captions.language=t.language,void Ir.set.call(this,e.indexOf(t))}this.elements.buttons.captions&&(this.elements.buttons.captions.pressed=o),Ya(this.elements.container,n,o),this.captions.toggled=o,Mr.updateSetting.call(this,"captions"),rr.call(this,this.media,o?"captionsenabled":"captionsdisabled")}setTimeout((()=>{o&&this.captions.toggled&&(this.captions.currentTrackNode.mode="hidden")}))},set(e,t=!0){const i=Ir.getTracks.call(this);if(-1!==e)if(ka(e))if(e in i){if(this.captions.currentTrack!==e){this.captions.currentTrack=e;const n=i[e],{language:o}=n||{};this.captions.currentTrackNode=n,Mr.updateSetting.call(this,"captions"),t||(this.captions.language=o,this.storage.set({language:o})),this.isVimeo&&this.embed.enableTextTrack(o),rr.call(this,this.media,"languagechange")}Ir.toggle.call(this,!0,t),this.isHTML5&&this.isVideo&&Ir.updateCues.call(this)}else this.debug.warn("Track not found",e);else this.debug.warn("Invalid caption argument",e);else Ir.toggle.call(this,!1,t)},setLanguage(e,t=!0){if(!xa(e))return void this.debug.warn("Invalid language argument",e);const i=e.toLowerCase();this.captions.language=i;const n=Ir.getTracks.call(this),o=Ir.findTrack.call(this,[i]);Ir.set.call(this,n.indexOf(o),t)},getTracks(e=!1){return Array.from((this.media||{}).textTracks||[]).filter((t=>!this.isHTML5||e||this.captions.meta.has(t))).filter((e=>["captions","subtitles"].includes(e.kind)))},findTrack(e,t=!1){const i=Ir.getTracks.call(this),n=e=>Number((this.captions.meta.get(e)||{}).default),o=Array.from(i).sort(((e,t)=>n(t)-n(e)));let s;return e.every((e=>(s=o.find((t=>t.language===e)),!s))),s||(t?o[0]:void 0)},getCurrentTrack(){return Ir.getTracks.call(this)[this.currentTrack]},getLabel(e){let t=e;return!Aa(t)&&tr.textTracks&&this.captions.toggled&&(t=Ir.getCurrentTrack.call(this)),Aa(t)?Ba(t.label)?Ba(t.language)?$r.get("enabled",this.config):e.language.toUpperCase():t.label:$r.get("disabled",this.config)},updateCues(e){if(!this.supported.ui)return;if(!La(this.elements.captions))return void this.debug.warn("No captions element to render to");if(!ba(e)&&!Array.isArray(e))return void this.debug.warn("updateCues: Invalid input",e);let t=e;if(!t){const e=Ir.getCurrentTrack.call(this);t=Array.from((e||{}).activeCues||[]).map((e=>e.getCueAsHTML())).map(Tr)}const i=t.map((e=>e.trim())).join("\n");if(i!==this.elements.captions.innerHTML){Ha(this.elements.captions);const e=Fa("span",qa(this.config.selectors.caption));e.innerHTML=i,this.elements.captions.appendChild(e),rr.call(this,this.media,"cuechange")}}},zr={enabled:!0,title:"",debug:!1,autoplay:!1,autopause:!0,playsinline:!0,seekTime:10,volume:1,muted:!1,duration:null,displayDuration:!0,invertTime:!0,toggleInvert:!0,ratio:null,clickToPlay:!0,hideControls:!0,resetOnEnd:!1,disableContextMenu:!0,loadSprite:!0,iconPrefix:"plyr",iconUrl:"https://cdn.plyr.io/3.7.2/plyr.svg",blankVideo:"https://cdn.plyr.io/static/blank.mp4",quality:{default:576,options:[4320,2880,2160,1440,1080,720,576,480,360,240],forced:!1,onChange:null},loop:{active:!1},speed:{selected:1,options:[.5,.75,1,1.25,1.5,1.75,2,4]},keyboard:{focused:!0,global:!1},tooltips:{controls:!1,seek:!0},captions:{active:!1,language:"auto",update:!1},fullscreen:{enabled:!0,fallback:!0,iosNative:!1},storage:{enabled:!0,key:"plyr"},controls:["play-large","play","progress","current-time","mute","volume","captions","settings","pip","airplay","fullscreen"],settings:["captions","quality","speed"],i18n:{restart:"Restart",rewind:"Rewind {seektime}s",play:"Play",pause:"Pause",fastForward:"Forward {seektime}s",seek:"Seek",seekLabel:"{currentTime} of {duration}",played:"Played",buffered:"Buffered",currentTime:"Current time",duration:"Duration",volume:"Volume",mute:"Mute",unmute:"Unmute",enableCaptions:"Enable captions",disableCaptions:"Disable captions",download:"Download",enterFullscreen:"Enter fullscreen",exitFullscreen:"Exit fullscreen",frameTitle:"Player for {title}",captions:"Captions",settings:"Settings",pip:"PIP",menuBack:"Go back to previous menu",speed:"Speed",normal:"Normal",quality:"Quality",loop:"Loop",start:"Start",end:"End",all:"All",reset:"Reset",disabled:"Disabled",enabled:"Enabled",advertisement:"Ad",qualityBadge:{2160:"4K",1440:"HD",1080:"HD",720:"HD",576:"SD",480:"SD"}},urls:{download:null,vimeo:{sdk:"https://player.vimeo.com/api/player.js",iframe:"https://player.vimeo.com/video/{0}?{1}",api:"https://vimeo.com/api/oembed.json?url={0}"},youtube:{sdk:"https://www.youtube.com/iframe_api",api:"https://noembed.com/embed?url=https://www.youtube.com/watch?v={0}"},googleIMA:{sdk:"https://imasdk.googleapis.com/js/sdkloader/ima3.js"}},listeners:{seek:null,play:null,pause:null,restart:null,rewind:null,fastForward:null,mute:null,volume:null,captions:null,download:null,fullscreen:null,pip:null,airplay:null,speed:null,quality:null,loop:null,language:null},events:["ended","progress","stalled","playing","waiting","canplay","canplaythrough","loadstart","loadeddata","loadedmetadata","timeupdate","volumechange","play","pause","error","seeking","seeked","emptied","ratechange","cuechange","download","enterfullscreen","exitfullscreen","captionsenabled","captionsdisabled","languagechange","controlshidden","controlsshown","ready","statechange","qualitychange","adsloaded","adscontentpause","adscontentresume","adstarted","adsmidpoint","adscomplete","adsallcomplete","adsimpression","adsclick"],selectors:{editable:"input, textarea, select, [contenteditable]",container:".plyr",controls:{container:null,wrapper:".plyr__controls"},labels:"[data-plyr]",buttons:{play:'[data-plyr="play"]',pause:'[data-plyr="pause"]',restart:'[data-plyr="restart"]',rewind:'[data-plyr="rewind"]',fastForward:'[data-plyr="fast-forward"]',mute:'[data-plyr="mute"]',captions:'[data-plyr="captions"]',download:'[data-plyr="download"]',fullscreen:'[data-plyr="fullscreen"]',pip:'[data-plyr="pip"]',airplay:'[data-plyr="airplay"]',settings:'[data-plyr="settings"]',loop:'[data-plyr="loop"]'},inputs:{seek:'[data-plyr="seek"]',volume:'[data-plyr="volume"]',speed:'[data-plyr="speed"]',language:'[data-plyr="language"]',quality:'[data-plyr="quality"]'},display:{currentTime:".plyr__time--current",duration:".plyr__time--duration",buffer:".plyr__progress__buffer",loop:".plyr__progress__loop",volume:".plyr__volume--display"},progress:".plyr__progress",captions:".plyr__captions",caption:".plyr__caption"},classNames:{type:"plyr--{0}",provider:"plyr--{0}",video:"plyr__video-wrapper",embed:"plyr__video-embed",videoFixedRatio:"plyr__video-wrapper--fixed-ratio",embedContainer:"plyr__video-embed__container",poster:"plyr__poster",posterEnabled:"plyr__poster-enabled",ads:"plyr__ads",control:"plyr__control",controlPressed:"plyr__control--pressed",playing:"plyr--playing",paused:"plyr--paused",stopped:"plyr--stopped",loading:"plyr--loading",hover:"plyr--hover",tooltip:"plyr__tooltip",cues:"plyr__cues",marker:"plyr__progress__marker",hidden:"plyr__sr-only",hideControls:"plyr--hide-controls",isIos:"plyr--is-ios",isTouch:"plyr--is-touch",uiSupported:"plyr--full-ui",noTransition:"plyr--no-transition",display:{time:"plyr__time"},menu:{value:"plyr__menu__value",badge:"plyr__badge",open:"plyr--menu-open"},captions:{enabled:"plyr--captions-enabled",active:"plyr--captions-active"},fullscreen:{enabled:"plyr--fullscreen-enabled",fallback:"plyr--fullscreen-fallback"},pip:{supported:"plyr--pip-supported",active:"plyr--pip-active"},airplay:{supported:"plyr--airplay-supported",active:"plyr--airplay-active"},tabFocus:"plyr__tab-focus",previewThumbnails:{thumbContainer:"plyr__preview-thumb",thumbContainerShown:"plyr__preview-thumb--is-shown",imageContainer:"plyr__preview-thumb__image-container",timeContainer:"plyr__preview-thumb__time-container",scrubbingContainer:"plyr__preview-scrubbing",scrubbingContainerShown:"plyr__preview-scrubbing--is-shown"}},attributes:{embed:{provider:"data-plyr-provider",id:"data-plyr-embed-id",hash:"data-plyr-embed-hash"}},ads:{enabled:!1,publisherId:"",tagUrl:""},previewThumbnails:{enabled:!1,src:""},vimeo:{byline:!1,portrait:!1,title:!1,speed:!0,transparent:!1,customControls:!0,referrerPolicy:null,premium:!1},youtube:{rel:0,showinfo:0,iv_load_policy:3,modestbranding:1,customControls:!0,noCookie:!1},mediaMetadata:{title:"",artist:"",album:"",artwork:[]},markers:{enabled:!1,points:[]}},Dr="picture-in-picture",Rr="inline",Fr={html5:"html5",youtube:"youtube",vimeo:"vimeo"},jr="audio",Wr="video";const Hr=()=>{};class Ur{constructor(e=!1){this.enabled=window.console&&e,this.enabled&&this.log("Debugging enabled")}get log(){return this.enabled?Function.prototype.bind.call(console.log,console):Hr}get warn(){return this.enabled?Function.prototype.bind.call(console.warn,console):Hr}get error(){return this.enabled?Function.prototype.bind.call(console.error,console):Hr}}class qr{constructor(e){js(this,"onChange",(()=>{if(!this.enabled)return;const e=this.player.elements.buttons.fullscreen;La(e)&&(e.pressed=this.active);const t=this.target===this.player.media?this.target:this.player.elements.container;rr.call(this.player,t,this.active?"enterfullscreen":"exitfullscreen",!0)})),js(this,"toggleFallback",((e=!1)=>{if(e?this.scrollPosition={x:window.scrollX||0,y:window.scrollY||0}:window.scrollTo(this.scrollPosition.x,this.scrollPosition.y),document.body.style.overflow=e?"hidden":"",Ya(this.target,this.player.config.classNames.fullscreen.fallback,e),Oa.isIos){let t=document.head.querySelector('meta[name="viewport"]');const i="viewport-fit=cover";t||(t=document.createElement("meta"),t.setAttribute("name","viewport"));const n=xa(t.content)&&t.content.includes(i);e?(this.cleanupViewport=!n,n||(t.content+=`,${i}`)):this.cleanupViewport&&(t.content=t.content.split(",").filter((e=>e.trim()!==i)).join(","))}this.onChange()})),js(this,"trapFocus",(e=>{if(Oa.isIos||!this.active||"Tab"!==e.key)return;const t=document.activeElement,i=Za.call(this.player,"a[href], button:not(:disabled), input:not(:disabled), [tabindex]"),[n]=i,o=i[i.length-1];t!==o||e.shiftKey?t===n&&e.shiftKey&&(o.focus(),e.preventDefault()):(n.focus(),e.preventDefault())})),js(this,"update",(()=>{if(this.enabled){let e;e=this.forceFallback?"Fallback (forced)":qr.native?"Native":"Fallback",this.player.debug.log(`${e} fullscreen enabled`)}else this.player.debug.log("Fullscreen not supported and fallback disabled");Ya(this.player.elements.container,this.player.config.classNames.fullscreen.enabled,this.enabled)})),js(this,"enter",(()=>{this.enabled&&(Oa.isIos&&this.player.config.fullscreen.iosNative?this.player.isVimeo?this.player.embed.requestFullscreen():this.target.webkitEnterFullscreen():!qr.native||this.forceFallback?this.toggleFallback(!0):this.prefix?Ba(this.prefix)||this.target[`${this.prefix}Request${this.property}`]():this.target.requestFullscreen({navigationUI:"hide"}))})),js(this,"exit",(()=>{if(this.enabled)if(Oa.isIos&&this.player.config.fullscreen.iosNative)this.target.webkitExitFullscreen(),dr(this.player.play());else if(!qr.native||this.forceFallback)this.toggleFallback(!1);else if(this.prefix){if(!Ba(this.prefix)){const e="moz"===this.prefix?"Cancel":"Exit";document[`${this.prefix}${e}${this.property}`]()}}else(document.cancelFullScreen||document.exitFullscreen).call(document)})),js(this,"toggle",(()=>{this.active?this.exit():this.enter()})),this.player=e,this.prefix=qr.prefix,this.property=qr.property,this.scrollPosition={x:0,y:0},this.forceFallback="force"===e.config.fullscreen.fallback,this.player.elements.fullscreen=e.config.fullscreen.container&&function(e,t){const{prototype:i}=Element;return(i.closest||function(){let e=this;do{if(Ga.matches(e,t))return e;e=e.parentElement||e.parentNode}while(null!==e&&1===e.nodeType);return null}).call(e,t)}(this.player.elements.container,e.config.fullscreen.container),or.call(this.player,document,"ms"===this.prefix?"MSFullscreenChange":`${this.prefix}fullscreenchange`,(()=>{this.onChange()})),or.call(this.player,this.player.elements.container,"dblclick",(e=>{La(this.player.elements.controls)&&this.player.elements.controls.contains(e.target)||this.player.listeners.proxy(e,this.toggle,"fullscreen")})),or.call(this,this.player.elements.container,"keydown",(e=>this.trapFocus(e))),this.update()}static get native(){return!!(document.fullscreenEnabled||document.webkitFullscreenEnabled||document.mozFullScreenEnabled||document.msFullscreenEnabled)}get usingNative(){return qr.native&&!this.forceFallback}static get prefix(){if(Sa(document.exitFullscreen))return"";let e="";return["webkit","moz","ms"].some((t=>!(!Sa(document[`${t}ExitFullscreen`])&&!Sa(document[`${t}CancelFullScreen`])||(e=t,0)))),e}static get property(){return"moz"===this.prefix?"FullScreen":"Fullscreen"}get enabled(){return(qr.native||this.player.config.fullscreen.fallback)&&this.player.config.fullscreen.enabled&&this.player.supported.ui&&this.player.isVideo}get active(){if(!this.enabled)return!1;if(!qr.native||this.forceFallback)return Ka(this.target,this.player.config.classNames.fullscreen.fallback);const e=this.prefix?this.target.getRootNode()[`${this.prefix}${this.property}Element`]:this.target.getRootNode().fullscreenElement;return e&&e.shadowRoot?e===this.target.getRootNode().host:e===this.target}get target(){return Oa.isIos&&this.player.config.fullscreen.iosNative?this.player.media:this.player.elements.fullscreen||this.player.elements.container}}function Xr(e,t=1){return new Promise(((i,n)=>{const o=new Image,s=()=>{delete o.onload,delete o.onerror,(o.naturalWidth>=t?i:n)(o)};Object.assign(o,{onload:s,onerror:s,src:e})}))}const Yr={addStyleHook(){Ya(this.elements.container,this.config.selectors.container.replace(".",""),!0),Ya(this.elements.container,this.config.classNames.uiSupported,this.supported.ui)},toggleNativeControls(e=!1){e&&this.isHTML5?this.media.setAttribute("controls",""):this.media.removeAttribute("controls")},build(){if(this.listeners.media(),!this.supported.ui)return this.debug.warn(`Basic support only for ${this.provider} ${this.type}`),void Yr.toggleNativeControls.call(this,!0);La(this.elements.controls)||(Mr.inject.call(this),this.listeners.controls()),Yr.toggleNativeControls.call(this),this.isHTML5&&Ir.setup.call(this),this.volume=null,this.muted=null,this.loop=null,this.quality=null,this.speed=null,Mr.updateVolume.call(this),Mr.timeUpdate.call(this),Mr.durationUpdate.call(this),Yr.checkPlaying.call(this),Ya(this.elements.container,this.config.classNames.pip.supported,tr.pip&&this.isHTML5&&this.isVideo),Ya(this.elements.container,this.config.classNames.airplay.supported,tr.airplay&&this.isHTML5),Ya(this.elements.container,this.config.classNames.isIos,Oa.isIos),Ya(this.elements.container,this.config.classNames.isTouch,this.touch),this.ready=!0,setTimeout((()=>{rr.call(this,this.media,"ready")}),0),Yr.setTitle.call(this),this.poster&&Yr.setPoster.call(this,this.poster,!1).catch((()=>{})),this.config.duration&&Mr.durationUpdate.call(this),this.config.mediaMetadata&&Mr.setMediaMetadata.call(this)},setTitle(){let e=$r.get("play",this.config);if(xa(this.config.title)&&!Ba(this.config.title)&&(e+=`, ${this.config.title}`),Array.from(this.elements.buttons.play||[]).forEach((t=>{t.setAttribute("aria-label",e)})),this.isEmbed){const e=Ja.call(this,"iframe");if(!La(e))return;const t=Ba(this.config.title)?"video":this.config.title,i=$r.get("frameTitle",this.config);e.setAttribute("title",i.replace("{title}",t))}},togglePoster(e){Ya(this.elements.container,this.config.classNames.posterEnabled,e)},setPoster(e,t=!0){return t&&this.poster?Promise.reject(new Error("Poster already set")):(this.media.setAttribute("data-poster",e),this.elements.poster.removeAttribute("hidden"),cr.call(this).then((()=>Xr(e))).catch((t=>{throw e===this.poster&&Yr.togglePoster.call(this,!1),t})).then((()=>{if(e!==this.poster)throw new Error("setPoster cancelled by later call to setPoster")})).then((()=>(Object.assign(this.elements.poster.style,{backgroundImage:`url('${e}')`,backgroundSize:""}),Yr.togglePoster.call(this,!0),e))))},checkPlaying(e){Ya(this.elements.container,this.config.classNames.playing,this.playing),Ya(this.elements.container,this.config.classNames.paused,this.paused),Ya(this.elements.container,this.config.classNames.stopped,this.stopped),Array.from(this.elements.buttons.play||[]).forEach((e=>{Object.assign(e,{pressed:this.playing}),e.setAttribute("aria-label",$r.get(this.playing?"pause":"play",this.config))})),$a(e)&&"timeupdate"===e.type||Yr.toggleControls.call(this)},checkLoading(e){this.loading=["stalled","waiting"].includes(e.type),clearTimeout(this.timers.loading),this.timers.loading=setTimeout((()=>{Ya(this.elements.container,this.config.classNames.loading,this.loading),Yr.toggleControls.call(this)}),this.loading?250:0)},toggleControls(e){const{controls:t}=this.elements;if(t&&this.config.hideControls){const i=this.touch&&this.lastSeekTime+2e3>Date.now();this.toggleControls(Boolean(e||this.loading||this.paused||t.pressed||t.hover||i))}},migrateStyles(){Object.values({...this.media.style}).filter((e=>!Ba(e)&&xa(e)&&e.startsWith("--plyr"))).forEach((e=>{this.elements.container.style.setProperty(e,this.media.style.getPropertyValue(e)),this.media.style.removeProperty(e)})),Ba(this.media.style)&&this.media.removeAttribute("style")}};class Kr{constructor(e){js(this,"firstTouch",(()=>{const{player:e}=this,{elements:t}=e;e.touch=!0,Ya(t.container,e.config.classNames.isTouch,!0)})),js(this,"setTabFocus",(e=>{const{player:t}=this,{elements:i}=t,{key:n,type:o,timeStamp:s}=e;if(clearTimeout(this.focusTimer),"keydown"===o&&"Tab"!==n)return;"keydown"===o&&(this.lastKeyDown=s);const a=s-this.lastKeyDown<=20;("focus"!==o||a)&&((()=>{const e=t.config.classNames.tabFocus;Ya(Za.call(t,`.${e}`),e,!1)})(),"focusout"!==o&&(this.focusTimer=setTimeout((()=>{const e=document.activeElement;i.container.contains(e)&&Ya(document.activeElement,t.config.classNames.tabFocus,!0)}),10)))})),js(this,"global",((e=!0)=>{const{player:t}=this;t.config.keyboard.global&&nr.call(t,window,"keydown keyup",this.handleKey,e,!1),nr.call(t,document.body,"click",this.toggleMenu,e),ar.call(t,document.body,"touchstart",this.firstTouch),nr.call(t,document.body,"keydown focus blur focusout",this.setTabFocus,e,!1,!0)})),js(this,"container",(()=>{const{player:e}=this,{config:t,elements:i,timers:n}=e;!t.keyboard.global&&t.keyboard.focused&&or.call(e,i.container,"keydown keyup",this.handleKey,!1),or.call(e,i.container,"mousemove mouseleave touchstart touchmove enterfullscreen exitfullscreen",(t=>{const{controls:o}=i;o&&"enterfullscreen"===t.type&&(o.pressed=!1,o.hover=!1);let s=0;["touchstart","touchmove","mousemove"].includes(t.type)&&(Yr.toggleControls.call(e,!0),s=e.touch?3e3:2e3),clearTimeout(n.controls),n.controls=setTimeout((()=>Yr.toggleControls.call(e,!1)),s)}));const o=()=>{if(!e.isVimeo||e.config.vimeo.premium)return;const t=i.wrapper,{active:n}=e.fullscreen,[o,s]=yr.call(e),a=pr(`aspect-ratio: ${o} / ${s}`);if(!n)return void(a?(t.style.width=null,t.style.height=null):(t.style.maxWidth=null,t.style.margin=null));const[r,l]=[Math.max(document.documentElement.clientWidth||0,window.innerWidth||0),Math.max(document.documentElement.clientHeight||0,window.innerHeight||0)],c=r/l>o/s;a?(t.style.width=c?"auto":"100%",t.style.height=c?"100%":"auto"):(t.style.maxWidth=c?l/s*o+"px":null,t.style.margin=c?"0 auto":null)},s=()=>{clearTimeout(n.resized),n.resized=setTimeout(o,50)};or.call(e,i.container,"enterfullscreen exitfullscreen",(t=>{const{target:n}=e.fullscreen;n===i.container&&(!e.isEmbed&&Ba(e.config.ratio)||(o(),("enterfullscreen"===t.type?or:sr).call(e,window,"resize",s)))}))})),js(this,"media",(()=>{const{player:e}=this,{elements:t}=e;if(or.call(e,e.media,"timeupdate seeking seeked",(t=>Mr.timeUpdate.call(e,t))),or.call(e,e.media,"durationchange loadeddata loadedmetadata",(t=>Mr.durationUpdate.call(e,t))),or.call(e,e.media,"ended",(()=>{e.isHTML5&&e.isVideo&&e.config.resetOnEnd&&(e.restart(),e.pause())})),or.call(e,e.media,"progress playing seeking seeked",(t=>Mr.updateProgress.call(e,t))),or.call(e,e.media,"volumechange",(t=>Mr.updateVolume.call(e,t))),or.call(e,e.media,"playing play pause ended emptied timeupdate",(t=>Yr.checkPlaying.call(e,t))),or.call(e,e.media,"waiting canplay seeked playing",(t=>Yr.checkLoading.call(e,t))),e.supported.ui&&e.config.clickToPlay&&!e.isAudio){const i=Ja.call(e,`.${e.config.classNames.video}`);if(!La(i))return;or.call(e,t.container,"click",(n=>{([t.container,i].includes(n.target)||i.contains(n.target))&&(e.touch&&e.config.hideControls||(e.ended?(this.proxy(n,e.restart,"restart"),this.proxy(n,(()=>{dr(e.play())}),"play")):this.proxy(n,(()=>{dr(e.togglePlay())}),"play")))}))}e.supported.ui&&e.config.disableContextMenu&&or.call(e,t.wrapper,"contextmenu",(e=>{e.preventDefault()}),!1),or.call(e,e.media,"volumechange",(()=>{e.storage.set({volume:e.volume,muted:e.muted})})),or.call(e,e.media,"ratechange",(()=>{Mr.updateSetting.call(e,"speed"),e.storage.set({speed:e.speed})})),or.call(e,e.media,"qualitychange",(t=>{Mr.updateSetting.call(e,"quality",null,t.detail.quality)})),or.call(e,e.media,"ready qualitychange",(()=>{Mr.setDownloadUrl.call(e)}));const i=e.config.events.concat(["keyup","keydown"]).join(" ");or.call(e,e.media,i,(i=>{let{detail:n={}}=i;"error"===i.type&&(n=e.media.error),rr.call(e,t.container,i.type,!0,n)}))})),js(this,"proxy",((e,t,i)=>{const{player:n}=this,o=n.config.listeners[i];let s=!0;Sa(o)&&(s=o.call(n,e)),!1!==s&&Sa(t)&&t.call(n,e)})),js(this,"bind",((e,t,i,n,o=!0)=>{const{player:s}=this,a=s.config.listeners[n],r=Sa(a);or.call(s,e,t,(e=>this.proxy(e,i,n)),o&&!r)})),js(this,"controls",(()=>{const{player:e}=this,{elements:t}=e,i=Oa.isIE?"change":"input";if(t.buttons.play&&Array.from(t.buttons.play).forEach((t=>{this.bind(t,"click",(()=>{dr(e.togglePlay())}),"play")})),this.bind(t.buttons.restart,"click",e.restart,"restart"),this.bind(t.buttons.rewind,"click",(()=>{e.lastSeekTime=Date.now(),e.rewind()}),"rewind"),this.bind(t.buttons.fastForward,"click",(()=>{e.lastSeekTime=Date.now(),e.forward()}),"fastForward"),this.bind(t.buttons.mute,"click",(()=>{e.muted=!e.muted}),"mute"),this.bind(t.buttons.captions,"click",(()=>e.toggleCaptions())),this.bind(t.buttons.download,"click",(()=>{rr.call(e,e.media,"download")}),"download"),this.bind(t.buttons.fullscreen,"click",(()=>{e.fullscreen.toggle()}),"fullscreen"),this.bind(t.buttons.pip,"click",(()=>{e.pip="toggle"}),"pip"),this.bind(t.buttons.airplay,"click",e.airplay,"airplay"),this.bind(t.buttons.settings,"click",(t=>{t.stopPropagation(),t.preventDefault(),Mr.toggleMenu.call(e,t)}),null,!1),this.bind(t.buttons.settings,"keyup",(t=>{["Space","Enter"].includes(t.key)&&("Enter"!==t.key?(t.preventDefault(),t.stopPropagation(),Mr.toggleMenu.call(e,t)):Mr.focusFirstMenuItem.call(e,null,!0))}),null,!1),this.bind(t.settings.menu,"keydown",(t=>{"Escape"===t.key&&Mr.toggleMenu.call(e,t)})),this.bind(t.inputs.seek,"mousedown mousemove",(e=>{const i=t.progress.getBoundingClientRect(),n=100/i.width*(e.pageX-i.left);e.currentTarget.setAttribute("seek-value",n)})),this.bind(t.inputs.seek,"mousedown mouseup keydown keyup touchstart touchend",(t=>{const i=t.currentTarget,n="play-on-seeked";if(_a(t)&&!["ArrowLeft","ArrowRight"].includes(t.key))return;e.lastSeekTime=Date.now();const o=i.hasAttribute(n),s=["mouseup","touchend","keyup"].includes(t.type);o&&s?(i.removeAttribute(n),dr(e.play())):!s&&e.playing&&(i.setAttribute(n,""),e.pause())})),Oa.isIos){const t=Za.call(e,'input[type="range"]');Array.from(t).forEach((e=>this.bind(e,i,(e=>Va(e.target)))))}this.bind(t.inputs.seek,i,(t=>{const i=t.currentTarget;let n=i.getAttribute("seek-value");Ba(n)&&(n=i.value),i.removeAttribute("seek-value"),e.currentTime=n/i.max*e.duration}),"seek"),this.bind(t.progress,"mouseenter mouseleave mousemove",(t=>Mr.updateSeekTooltip.call(e,t))),this.bind(t.progress,"mousemove touchmove",(t=>{const{previewThumbnails:i}=e;i&&i.loaded&&i.startMove(t)})),this.bind(t.progress,"mouseleave touchend click",(()=>{const{previewThumbnails:t}=e;t&&t.loaded&&t.endMove(!1,!0)})),this.bind(t.progress,"mousedown touchstart",(t=>{const{previewThumbnails:i}=e;i&&i.loaded&&i.startScrubbing(t)})),this.bind(t.progress,"mouseup touchend",(t=>{const{previewThumbnails:i}=e;i&&i.loaded&&i.endScrubbing(t)})),Oa.isWebkit&&Array.from(Za.call(e,'input[type="range"]')).forEach((t=>{this.bind(t,"input",(t=>Mr.updateRangeFill.call(e,t.target)))})),e.config.toggleInvert&&!La(t.display.duration)&&this.bind(t.display.currentTime,"click",(()=>{0!==e.currentTime&&(e.config.invertTime=!e.config.invertTime,Mr.timeUpdate.call(e))})),this.bind(t.inputs.volume,i,(t=>{e.volume=t.target.value}),"volume"),this.bind(t.controls,"mouseenter mouseleave",(i=>{t.controls.hover=!e.touch&&"mouseenter"===i.type})),t.fullscreen&&Array.from(t.fullscreen.children).filter((e=>!e.contains(t.container))).forEach((i=>{this.bind(i,"mouseenter mouseleave",(i=>{t.controls&&(t.controls.hover=!e.touch&&"mouseenter"===i.type)}))})),this.bind(t.controls,"mousedown mouseup touchstart touchend touchcancel",(e=>{t.controls.pressed=["mousedown","touchstart"].includes(e.type)})),this.bind(t.controls,"focusin",(()=>{const{config:i,timers:n}=e;Ya(t.controls,i.classNames.noTransition,!0),Yr.toggleControls.call(e,!0),setTimeout((()=>{Ya(t.controls,i.classNames.noTransition,!1)}),0);const o=this.touch?3e3:4e3;clearTimeout(n.controls),n.controls=setTimeout((()=>Yr.toggleControls.call(e,!1)),o)})),this.bind(t.inputs.volume,"wheel",(t=>{const i=t.webkitDirectionInvertedFromDevice,[n,o]=[t.deltaX,-t.deltaY].map((e=>i?-e:e)),s=Math.sign(Math.abs(n)>Math.abs(o)?n:o);e.increaseVolume(s/50);const{volume:a}=e.media;(1===s&&a<1||-1===s&&a>0)&&t.preventDefault()}),"volume",!1)})),this.player=e,this.lastKey=null,this.focusTimer=null,this.lastKeyDown=null,this.handleKey=this.handleKey.bind(this),this.toggleMenu=this.toggleMenu.bind(this),this.setTabFocus=this.setTabFocus.bind(this),this.firstTouch=this.firstTouch.bind(this)}handleKey(e){const{player:t}=this,{elements:i}=t,{key:n,type:o,altKey:s,ctrlKey:a,metaKey:r,shiftKey:l}=e,c="keydown"===o,d=c&&n===this.lastKey;var u;if(!(s||a||r||l)&&n)if(c){const o=document.activeElement;if(La(o)){const{editable:n}=t.config.selectors,{seek:s}=i.inputs;if(o!==s&&Ga(o,n))return;if("Space"===e.key&&Ga(o,'button, [role^="menuitem"]'))return}switch(["Space","ArrowLeft","ArrowUp","ArrowRight","ArrowDown","0","1","2","3","4","5","6","7","8","9","c","f","k","l","m"].includes(n)&&(e.preventDefault(),e.stopPropagation()),n){case"0":case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":d||(u=parseInt(n,10),t.currentTime=t.duration/10*u);break;case"Space":case"k":d||dr(t.togglePlay());break;case"ArrowUp":t.increaseVolume(.1);break;case"ArrowDown":t.decreaseVolume(.1);break;case"m":d||(t.muted=!t.muted);break;case"ArrowRight":t.forward();break;case"ArrowLeft":t.rewind();break;case"f":t.fullscreen.toggle();break;case"c":d||t.toggleCaptions();break;case"l":t.loop=!t.loop}"Escape"===n&&!t.fullscreen.usingNative&&t.fullscreen.active&&t.fullscreen.toggle(),this.lastKey=n}else this.lastKey=null}toggleMenu(e){Mr.toggleMenu.call(this.player,e)}}var Gr,Zr=(function(e,t){e.exports=function(){var e=function(){},t={},i={},n={};function o(e,t){if(e){var o=n[e];if(i[e]=t,o)for(;o.length;)o[0](e,t),o.splice(0,1)}}function s(t,i){t.call&&(t={success:t}),i.length?(t.error||e)(i):(t.success||e)(t)}function a(t,i,n,o){var s,r,l=document,c=n.async,d=(n.numRetries||0)+1,u=n.before||e,h=t.replace(/[\?|#].*$/,""),p=t.replace(/^(css|img)!/,"");o=o||0,/(^css!|\.css$)/.test(h)?((r=l.createElement("link")).rel="stylesheet",r.href=p,(s="hideFocus"in r)&&r.relList&&(s=0,r.rel="preload",r.as="style")):/(^img!|\.(png|gif|jpg|svg|webp)$)/.test(h)?(r=l.createElement("img")).src=p:((r=l.createElement("script")).src=t,r.async=void 0===c||c),r.onload=r.onerror=r.onbeforeload=function(e){var l=e.type[0];if(s)try{r.sheet.cssText.length||(l="e")}catch(c){18!=c.code&&(l="e")}if("e"==l){if((o+=1)<d)return a(t,i,n,o)}else if("preload"==r.rel&&"style"==r.as)return r.rel="stylesheet";i(t,l,e.defaultPrevented)},!1!==u(t,r)&&l.head.appendChild(r)}function r(e,i,n){var r,l;if(i&&i.trim&&(r=i),l=(r?n:i)||{},r){if(r in t)throw"LoadJS";t[r]=!0}function c(t,i){!function(e,t,i){var n,o,s=(e=e.push?e:[e]).length,r=s,l=[];for(n=function(e,i,n){if("e"==i&&l.push(e),"b"==i){if(!n)return;l.push(e)}--s||t(l)},o=0;o<r;o++)a(e[o],n,i)}(e,(function(e){s(l,e),t&&s({success:t,error:i},e),o(r,e)}),l)}if(l.returnPromise)return new Promise(c);c()}return r.ready=function(e,t){return function(e,t){e=e.push?e:[e];var o,s,a,r=[],l=e.length,c=l;for(o=function(e,i){i.length&&r.push(e),--c||t(r)};l--;)s=e[l],(a=i[s])?o(s,a):(n[s]=n[s]||[]).push(o)}(e,(function(e){s(t,e)})),r},r.done=function(e){o(e,[])},r.reset=function(){t={},i={},n={}},r.isDefined=function(e){return e in t},r}()}(Gr={exports:{}},Gr.exports),Gr.exports);function Jr(e){return new Promise(((t,i)=>{Zr(e,{success:t,error:i})}))}function Qr(e){e&&!this.embed.hasPlayed&&(this.embed.hasPlayed=!0),this.media.paused===e&&(this.media.paused=!e,rr.call(this,this.media,e?"play":"pause"))}const el={setup(){const e=this;Ya(e.elements.wrapper,e.config.classNames.embed,!0),e.options.speed=e.config.speed.options,vr.call(e),wa(window.Vimeo)?el.ready.call(e):Jr(e.config.urls.vimeo.sdk).then((()=>{el.ready.call(e)})).catch((t=>{e.debug.warn("Vimeo SDK (player.js) failed to load",t)}))},ready(){const e=this,t=e.config.vimeo,{premium:i,referrerPolicy:n,...o}=t;let s=e.media.getAttribute("src"),a="";Ba(s)?(s=e.media.getAttribute(e.config.attributes.embed.id),a=e.media.getAttribute(e.config.attributes.embed.hash)):a=function(e){const t=e.match(/^.*(vimeo.com\/|video\/)(\d+)(\?.*&*h=|\/)+([\d,a-f]+)/);return t&&5===t.length?t[4]:null}(s);const r=a?{h:a}:{};i&&Object.assign(o,{controls:!1,sidedock:!1});const l=Or({loop:e.config.loop.active,autoplay:e.autoplay,muted:e.muted,gesture:"media",playsinline:!this.config.fullscreen.iosNative,...r,...o}),c=function(e){return Ba(e)?null:ka(Number(e))?e:e.match(/^.*(vimeo.com\/|video\/)(\d+).*/)?RegExp.$2:e}(s),d=Fa("iframe"),u=xr(e.config.urls.vimeo.iframe,c,l);if(d.setAttribute("src",u),d.setAttribute("allowfullscreen",""),d.setAttribute("allow",["autoplay","fullscreen","picture-in-picture","encrypted-media","accelerometer","gyroscope"].join("; ")),Ba(n)||d.setAttribute("referrerPolicy",n),i||!t.customControls)d.setAttribute("data-poster",e.poster),e.media=Ua(d,e.media);else{const t=Fa("div",{class:e.config.classNames.embedContainer,"data-poster":e.poster});t.appendChild(d),e.media=Ua(t,e.media)}t.customControls||Ar(xr(e.config.urls.vimeo.api,u)).then((t=>{!Ba(t)&&t.thumbnail_url&&Yr.setPoster.call(e,t.thumbnail_url).catch((()=>{}))})),e.embed=new window.Vimeo.Player(d,{autopause:e.config.autopause,muted:e.muted}),e.media.paused=!0,e.media.currentTime=0,e.supported.ui&&e.embed.disableTextTrack(),e.media.play=()=>(Qr.call(e,!0),e.embed.play()),e.media.pause=()=>(Qr.call(e,!1),e.embed.pause()),e.media.stop=()=>{e.pause(),e.currentTime=0};let{currentTime:h}=e.media;Object.defineProperty(e.media,"currentTime",{get:()=>h,set(t){const{embed:i,media:n,paused:o,volume:s}=e,a=o&&!i.hasPlayed;n.seeking=!0,rr.call(e,n,"seeking"),Promise.resolve(a&&i.setVolume(0)).then((()=>i.setCurrentTime(t))).then((()=>a&&i.pause())).then((()=>a&&i.setVolume(s))).catch((()=>{}))}});let p=e.config.speed.selected;Object.defineProperty(e.media,"playbackRate",{get:()=>p,set(t){e.embed.setPlaybackRate(t).then((()=>{p=t,rr.call(e,e.media,"ratechange")})).catch((()=>{e.options.speed=[1]}))}});let{volume:m}=e.config;Object.defineProperty(e.media,"volume",{get:()=>m,set(t){e.embed.setVolume(t).then((()=>{m=t,rr.call(e,e.media,"volumechange")}))}});let{muted:f}=e.config;Object.defineProperty(e.media,"muted",{get:()=>f,set(t){const i=!!Ca(t)&&t;e.embed.setVolume(i?0:e.config.volume).then((()=>{f=i,rr.call(e,e.media,"volumechange")}))}});let g,{loop:y}=e.config;Object.defineProperty(e.media,"loop",{get:()=>y,set(t){const i=Ca(t)?t:e.config.loop.active;e.embed.setLoop(i).then((()=>{y=i}))}}),e.embed.getVideoUrl().then((t=>{g=t,Mr.setDownloadUrl.call(e)})).catch((e=>{this.debug.warn(e)})),Object.defineProperty(e.media,"currentSrc",{get:()=>g}),Object.defineProperty(e.media,"ended",{get:()=>e.currentTime===e.duration}),Promise.all([e.embed.getVideoWidth(),e.embed.getVideoHeight()]).then((t=>{const[i,n]=t;e.embed.ratio=br(i,n),vr.call(this)})),e.embed.setAutopause(e.config.autopause).then((t=>{e.config.autopause=t})),e.embed.getVideoTitle().then((t=>{e.config.title=t,Yr.setTitle.call(this)})),e.embed.getCurrentTime().then((t=>{h=t,rr.call(e,e.media,"timeupdate")})),e.embed.getDuration().then((t=>{e.media.duration=t,rr.call(e,e.media,"durationchange")})),e.embed.getTextTracks().then((t=>{e.media.textTracks=t,Ir.setup.call(e)})),e.embed.on("cuechange",(({cues:t=[]})=>{const i=t.map((e=>function(e){const t=document.createDocumentFragment(),i=document.createElement("div");return t.appendChild(i),i.innerHTML=e,t.firstChild.innerText}(e.text)));Ir.updateCues.call(e,i)})),e.embed.on("loaded",(()=>{e.embed.getPaused().then((t=>{Qr.call(e,!t),t||rr.call(e,e.media,"playing")})),La(e.embed.element)&&e.supported.ui&&e.embed.element.setAttribute("tabindex",-1)})),e.embed.on("bufferstart",(()=>{rr.call(e,e.media,"waiting")})),e.embed.on("bufferend",(()=>{rr.call(e,e.media,"playing")})),e.embed.on("play",(()=>{Qr.call(e,!0),rr.call(e,e.media,"playing")})),e.embed.on("pause",(()=>{Qr.call(e,!1)})),e.embed.on("timeupdate",(t=>{e.media.seeking=!1,h=t.seconds,rr.call(e,e.media,"timeupdate")})),e.embed.on("progress",(t=>{e.media.buffered=t.percent,rr.call(e,e.media,"progress"),1===parseInt(t.percent,10)&&rr.call(e,e.media,"canplaythrough"),e.embed.getDuration().then((t=>{t!==e.media.duration&&(e.media.duration=t,rr.call(e,e.media,"durationchange"))}))})),e.embed.on("seeked",(()=>{e.media.seeking=!1,rr.call(e,e.media,"seeked")})),e.embed.on("ended",(()=>{e.media.paused=!0,rr.call(e,e.media,"ended")})),e.embed.on("error",(t=>{e.media.error=t,rr.call(e,e.media,"error")})),t.customControls&&setTimeout((()=>Yr.build.call(e)),0)}};function tl(e){e&&!this.embed.hasPlayed&&(this.embed.hasPlayed=!0),this.media.paused===e&&(this.media.paused=!e,rr.call(this,this.media,e?"play":"pause"))}function il(e){return e.noCookie?"https://www.youtube-nocookie.com":"http:"===window.location.protocol?"http://www.youtube.com":void 0}const nl={setup(){if(Ya(this.elements.wrapper,this.config.classNames.embed,!0),wa(window.YT)&&Sa(window.YT.Player))nl.ready.call(this);else{const e=window.onYouTubeIframeAPIReady;window.onYouTubeIframeAPIReady=()=>{Sa(e)&&e(),nl.ready.call(this)},Jr(this.config.urls.youtube.sdk).catch((e=>{this.debug.warn("YouTube API failed to load",e)}))}},getTitle(e){Ar(xr(this.config.urls.youtube.api,e)).then((e=>{if(wa(e)){const{title:t,height:i,width:n}=e;this.config.title=t,Yr.setTitle.call(this),this.embed.ratio=br(n,i)}vr.call(this)})).catch((()=>{vr.call(this)}))},ready(){const e=this,t=e.config.youtube,i=e.media&&e.media.getAttribute("id");if(!Ba(i)&&i.startsWith("youtube-"))return;let n=e.media.getAttribute("src");Ba(n)&&(n=e.media.getAttribute(this.config.attributes.embed.id));const o=function(e){return Ba(e)?null:e.match(/^.*(youtu.be\/|v\/|u\/\w\/|embed\/|watch\?v=|&v=)([^#&?]*).*/)?RegExp.$2:e}(n),s=Fa("div",{id:kr(e.provider),"data-poster":t.customControls?e.poster:void 0});if(e.media=Ua(s,e.media),t.customControls){const t=e=>`https://i.ytimg.com/vi/${o}/${e}default.jpg`;Xr(t("maxres"),121).catch((()=>Xr(t("sd"),121))).catch((()=>Xr(t("hq")))).then((t=>Yr.setPoster.call(e,t.src))).then((t=>{t.includes("maxres")||(e.elements.poster.style.backgroundSize="cover")})).catch((()=>{}))}e.embed=new window.YT.Player(e.media,{videoId:o,host:il(t),playerVars:za({},{autoplay:e.config.autoplay?1:0,hl:e.config.hl,controls:e.supported.ui&&t.customControls?0:1,disablekb:1,playsinline:e.config.fullscreen.iosNative?0:1,cc_load_policy:e.captions.active?1:0,cc_lang_pref:e.config.captions.language,widget_referrer:window?window.location.href:null},t),events:{onError(t){if(!e.media.error){const i=t.data,n={2:"The request contains an invalid parameter value. For example, this error occurs if you specify a video ID that does not have 11 characters, or if the video ID contains invalid characters, such as exclamation points or asterisks.",5:"The requested content cannot be played in an HTML5 player or another error related to the HTML5 player has occurred.",100:"The video requested was not found. This error occurs when a video has been removed (for any reason) or has been marked as private.",101:"The owner of the requested video does not allow it to be played in embedded players.",150:"The owner of the requested video does not allow it to be played in embedded players."}[i]||"An unknown error occured";e.media.error={code:i,message:n},rr.call(e,e.media,"error")}},onPlaybackRateChange(t){const i=t.target;e.media.playbackRate=i.getPlaybackRate(),rr.call(e,e.media,"ratechange")},onReady(i){if(Sa(e.media.play))return;const n=i.target;nl.getTitle.call(e,o),e.media.play=()=>{tl.call(e,!0),n.playVideo()},e.media.pause=()=>{tl.call(e,!1),n.pauseVideo()},e.media.stop=()=>{n.stopVideo()},e.media.duration=n.getDuration(),e.media.paused=!0,e.media.currentTime=0,Object.defineProperty(e.media,"currentTime",{get:()=>Number(n.getCurrentTime()),set(t){e.paused&&!e.embed.hasPlayed&&e.embed.mute(),e.media.seeking=!0,rr.call(e,e.media,"seeking"),n.seekTo(t)}}),Object.defineProperty(e.media,"playbackRate",{get:()=>n.getPlaybackRate(),set(e){n.setPlaybackRate(e)}});let{volume:s}=e.config;Object.defineProperty(e.media,"volume",{get:()=>s,set(t){s=t,n.setVolume(100*s),rr.call(e,e.media,"volumechange")}});let{muted:a}=e.config;Object.defineProperty(e.media,"muted",{get:()=>a,set(t){const i=Ca(t)?t:a;a=i,n[i?"mute":"unMute"](),n.setVolume(100*s),rr.call(e,e.media,"volumechange")}}),Object.defineProperty(e.media,"currentSrc",{get:()=>n.getVideoUrl()}),Object.defineProperty(e.media,"ended",{get:()=>e.currentTime===e.duration});const r=n.getAvailablePlaybackRates();e.options.speed=r.filter((t=>e.config.speed.options.includes(t))),e.supported.ui&&t.customControls&&e.media.setAttribute("tabindex",-1),rr.call(e,e.media,"timeupdate"),rr.call(e,e.media,"durationchange"),clearInterval(e.timers.buffering),e.timers.buffering=setInterval((()=>{e.media.buffered=n.getVideoLoadedFraction(),(null===e.media.lastBuffered||e.media.lastBuffered<e.media.buffered)&&rr.call(e,e.media,"progress"),e.media.lastBuffered=e.media.buffered,1===e.media.buffered&&(clearInterval(e.timers.buffering),rr.call(e,e.media,"canplaythrough"))}),200),t.customControls&&setTimeout((()=>Yr.build.call(e)),50)},onStateChange(i){const n=i.target;switch(clearInterval(e.timers.playing),e.media.seeking&&[1,2].includes(i.data)&&(e.media.seeking=!1,rr.call(e,e.media,"seeked")),i.data){case-1:rr.call(e,e.media,"timeupdate"),e.media.buffered=n.getVideoLoadedFraction(),rr.call(e,e.media,"progress");break;case 0:tl.call(e,!1),e.media.loop?(n.stopVideo(),n.playVideo()):rr.call(e,e.media,"ended");break;case 1:t.customControls&&!e.config.autoplay&&e.media.paused&&!e.embed.hasPlayed?e.media.pause():(tl.call(e,!0),rr.call(e,e.media,"playing"),e.timers.playing=setInterval((()=>{rr.call(e,e.media,"timeupdate")}),50),e.media.duration!==n.getDuration()&&(e.media.duration=n.getDuration(),rr.call(e,e.media,"durationchange")));break;case 2:e.muted||e.embed.unMute(),tl.call(e,!1);break;case 3:rr.call(e,e.media,"waiting")}rr.call(e,e.elements.container,"statechange",!1,{code:i.data})}}})}},ol={setup(){this.media?(Ya(this.elements.container,this.config.classNames.type.replace("{0}",this.type),!0),Ya(this.elements.container,this.config.classNames.provider.replace("{0}",this.provider),!0),this.isEmbed&&Ya(this.elements.container,this.config.classNames.type.replace("{0}","video"),!0),this.isVideo&&(this.elements.wrapper=Fa("div",{class:this.config.classNames.video}),Da(this.media,this.elements.wrapper),this.elements.poster=Fa("div",{class:this.config.classNames.poster}),this.elements.wrapper.appendChild(this.elements.poster)),this.isHTML5?wr.setup.call(this):this.isYouTube?nl.setup.call(this):this.isVimeo&&el.setup.call(this)):this.debug.warn("No media element found!")}};class sl{constructor(e){js(this,"load",(()=>{this.enabled&&(wa(window.google)&&wa(window.google.ima)?this.ready():Jr(this.player.config.urls.googleIMA.sdk).then((()=>{this.ready()})).catch((()=>{this.trigger("error",new Error("Google IMA SDK failed to load"))})))})),js(this,"ready",(()=>{var e;this.enabled||((e=this).manager&&e.manager.destroy(),e.elements.displayContainer&&e.elements.displayContainer.destroy(),e.elements.container.remove()),this.startSafetyTimer(12e3,"ready()"),this.managerPromise.then((()=>{this.clearSafetyTimer("onAdsManagerLoaded()")})),this.listeners(),this.setupIMA()})),js(this,"setupIMA",(()=>{this.elements.container=Fa("div",{class:this.player.config.classNames.ads}),this.player.elements.container.appendChild(this.elements.container),google.ima.settings.setVpaidMode(google.ima.ImaSdkSettings.VpaidMode.ENABLED),google.ima.settings.setLocale(this.player.config.ads.language),google.ima.settings.setDisableCustomPlaybackForIOS10Plus(this.player.config.playsinline),this.elements.displayContainer=new google.ima.AdDisplayContainer(this.elements.container,this.player.media),this.loader=new google.ima.AdsLoader(this.elements.displayContainer),this.loader.addEventListener(google.ima.AdsManagerLoadedEvent.Type.ADS_MANAGER_LOADED,(e=>this.onAdsManagerLoaded(e)),!1),this.loader.addEventListener(google.ima.AdErrorEvent.Type.AD_ERROR,(e=>this.onAdError(e)),!1),this.requestAds()})),js(this,"requestAds",(()=>{const{container:e}=this.player.elements;try{const t=new google.ima.AdsRequest;t.adTagUrl=this.tagUrl,t.linearAdSlotWidth=e.offsetWidth,t.linearAdSlotHeight=e.offsetHeight,t.nonLinearAdSlotWidth=e.offsetWidth,t.nonLinearAdSlotHeight=e.offsetHeight,t.forceNonLinearFullSlot=!1,t.setAdWillPlayMuted(!this.player.muted),this.loader.requestAds(t)}catch(t){this.onAdError(t)}})),js(this,"pollCountdown",((e=!1)=>{if(!e)return clearInterval(this.countdownTimer),void this.elements.container.removeAttribute("data-badge-text");this.countdownTimer=setInterval((()=>{const e=Br(Math.max(this.manager.getRemainingTime(),0)),t=`${$r.get("advertisement",this.player.config)} - ${e}`;this.elements.container.setAttribute("data-badge-text",t)}),100)})),js(this,"onAdsManagerLoaded",(e=>{if(!this.enabled)return;const t=new google.ima.AdsRenderingSettings;t.restoreCustomPlaybackStateOnAdBreakComplete=!0,t.enablePreloading=!0,this.manager=e.getAdsManager(this.player,t),this.cuePoints=this.manager.getCuePoints(),this.manager.addEventListener(google.ima.AdErrorEvent.Type.AD_ERROR,(e=>this.onAdError(e))),Object.keys(google.ima.AdEvent.Type).forEach((e=>{this.manager.addEventListener(google.ima.AdEvent.Type[e],(e=>this.onAdEvent(e)))})),this.trigger("loaded")})),js(this,"addCuePoints",(()=>{Ba(this.cuePoints)||this.cuePoints.forEach((e=>{if(0!==e&&-1!==e&&e<this.player.duration){const t=this.player.elements.progress;if(La(t)){const i=100/this.player.duration*e,n=Fa("span",{class:this.player.config.classNames.cues});n.style.left=`${i.toString()}%`,t.appendChild(n)}}}))})),js(this,"onAdEvent",(e=>{const{container:t}=this.player.elements,i=e.getAd(),n=e.getAdData();switch((e=>{rr.call(this.player,this.player.media,`ads${e.replace(/_/g,"").toLowerCase()}`)})(e.type),e.type){case google.ima.AdEvent.Type.LOADED:this.trigger("loaded"),this.pollCountdown(!0),i.isLinear()||(i.width=t.offsetWidth,i.height=t.offsetHeight);break;case google.ima.AdEvent.Type.STARTED:this.manager.setVolume(this.player.volume);break;case google.ima.AdEvent.Type.ALL_ADS_COMPLETED:this.player.ended?this.loadAds():this.loader.contentComplete();break;case google.ima.AdEvent.Type.CONTENT_PAUSE_REQUESTED:this.pauseContent();break;case google.ima.AdEvent.Type.CONTENT_RESUME_REQUESTED:this.pollCountdown(),this.resumeContent();break;case google.ima.AdEvent.Type.LOG:n.adError&&this.player.debug.warn(`Non-fatal ad error: ${n.adError.getMessage()}`)}})),js(this,"onAdError",(e=>{this.cancel(),this.player.debug.warn("Ads error",e)})),js(this,"listeners",(()=>{const{container:e}=this.player.elements;let t;this.player.on("canplay",(()=>{this.addCuePoints()})),this.player.on("ended",(()=>{this.loader.contentComplete()})),this.player.on("timeupdate",(()=>{t=this.player.currentTime})),this.player.on("seeked",(()=>{const e=this.player.currentTime;Ba(this.cuePoints)||this.cuePoints.forEach(((i,n)=>{t<i&&i<e&&(this.manager.discardAdBreak(),this.cuePoints.splice(n,1))}))})),window.addEventListener("resize",(()=>{this.manager&&this.manager.resize(e.offsetWidth,e.offsetHeight,google.ima.ViewMode.NORMAL)}))})),js(this,"play",(()=>{const{container:e}=this.player.elements;this.managerPromise||this.resumeContent(),this.managerPromise.then((()=>{this.manager.setVolume(this.player.volume),this.elements.displayContainer.initialize();try{this.initialized||(this.manager.init(e.offsetWidth,e.offsetHeight,google.ima.ViewMode.NORMAL),this.manager.start()),this.initialized=!0}catch(t){this.onAdError(t)}})).catch((()=>{}))})),js(this,"resumeContent",(()=>{this.elements.container.style.zIndex="",this.playing=!1,dr(this.player.media.play())})),js(this,"pauseContent",(()=>{this.elements.container.style.zIndex=3,this.playing=!0,this.player.media.pause()})),js(this,"cancel",(()=>{this.initialized&&this.resumeContent(),this.trigger("error"),this.loadAds()})),js(this,"loadAds",(()=>{this.managerPromise.then((()=>{this.manager&&this.manager.destroy(),this.managerPromise=new Promise((e=>{this.on("loaded",e),this.player.debug.log(this.manager)})),this.initialized=!1,this.requestAds()})).catch((()=>{}))})),js(this,"trigger",((e,...t)=>{const i=this.events[e];Ea(i)&&i.forEach((e=>{Sa(e)&&e.apply(this,t)}))})),js(this,"on",((e,t)=>(Ea(this.events[e])||(this.events[e]=[]),this.events[e].push(t),this))),js(this,"startSafetyTimer",((e,t)=>{this.player.debug.log(`Safety timer invoked from: ${t}`),this.safetyTimer=setTimeout((()=>{this.cancel(),this.clearSafetyTimer("startSafetyTimer()")}),e)})),js(this,"clearSafetyTimer",(e=>{ba(this.safetyTimer)||(this.player.debug.log(`Safety timer cleared from: ${e}`),clearTimeout(this.safetyTimer),this.safetyTimer=null)})),this.player=e,this.config=e.config.ads,this.playing=!1,this.initialized=!1,this.elements={container:null,displayContainer:null},this.manager=null,this.loader=null,this.cuePoints=null,this.events={},this.safetyTimer=null,this.countdownTimer=null,this.managerPromise=new Promise(((e,t)=>{this.on("loaded",e),this.on("error",t)})),this.load()}get enabled(){const{config:e}=this;return this.player.isHTML5&&this.player.isVideo&&e.enabled&&(!Ba(e.publisherId)||Pa(e.tagUrl))}get tagUrl(){const{config:e}=this;return Pa(e.tagUrl)?e.tagUrl:`https://go.aniview.com/api/adserver6/vast/?${Or({AV_PUBLISHERID:"58c25bb0073ef448b1087ad6",AV_CHANNELID:"5a0458dc28a06145e4519d21",AV_URL:window.location.hostname,cb:Date.now(),AV_WIDTH:640,AV_HEIGHT:480,AV_CDIM2:e.publisherId})}`}}function al(e=0,t=0,i=255){return Math.min(Math.max(e,t),i)}const rl=e=>{const t=[];return e.split(/\r\n\r\n|\n\n|\r\r/).forEach((e=>{const i={};e.split(/\r\n|\n|\r/).forEach((e=>{if(ka(i.startTime)){if(!Ba(e.trim())&&Ba(i.text)){const t=e.trim().split("#xywh=");[i.text]=t,t[1]&&([i.x,i.y,i.w,i.h]=t[1].split(","))}}else{const t=e.match(/([0-9]{2})?:?([0-9]{2}):([0-9]{2}).([0-9]{2,3})( ?--> ?)([0-9]{2})?:?([0-9]{2}):([0-9]{2}).([0-9]{2,3})/);t&&(i.startTime=60*Number(t[1]||0)*60+60*Number(t[2])+Number(t[3])+Number(`0.${t[4]}`),i.endTime=60*Number(t[6]||0)*60+60*Number(t[7])+Number(t[8])+Number(`0.${t[9]}`))}})),i.text&&t.push(i)})),t},ll=(e,t)=>{const i={};return e>t.width/t.height?(i.width=t.width,i.height=1/e*t.width):(i.height=t.height,i.width=e*t.height),i};class cl{constructor(e){js(this,"load",(()=>{this.player.elements.display.seekTooltip&&(this.player.elements.display.seekTooltip.hidden=this.enabled),this.enabled&&this.getThumbnails().then((()=>{this.enabled&&(this.render(),this.determineContainerAutoSizing(),this.loaded=!0)}))})),js(this,"getThumbnails",(()=>new Promise((e=>{const{src:t}=this.player.config.previewThumbnails;if(Ba(t))throw new Error("Missing previewThumbnails.src config attribute");const i=()=>{this.thumbnails.sort(((e,t)=>e.height-t.height)),this.player.debug.log("Preview thumbnails",this.thumbnails),e()};if(Sa(t))t((e=>{this.thumbnails=e,i()}));else{const e=(xa(t)?[t]:t).map((e=>this.getThumbnail(e)));Promise.all(e).then(i)}})))),js(this,"getThumbnail",(e=>new Promise((t=>{Ar(e).then((i=>{const n={frames:rl(i),height:null,urlPrefix:""};n.frames[0].text.startsWith("/")||n.frames[0].text.startsWith("http://")||n.frames[0].text.startsWith("https://")||(n.urlPrefix=e.substring(0,e.lastIndexOf("/")+1));const o=new Image;o.onload=()=>{n.height=o.naturalHeight,n.width=o.naturalWidth,this.thumbnails.push(n),t()},o.src=n.urlPrefix+n.frames[0].text}))})))),js(this,"startMove",(e=>{if(this.loaded&&$a(e)&&["touchmove","mousemove"].includes(e.type)&&this.player.media.duration){if("touchmove"===e.type)this.seekTime=this.player.media.duration*(this.player.elements.inputs.seek.value/100);else{var t,i;const n=this.player.elements.progress.getBoundingClientRect(),o=100/n.width*(e.pageX-n.left);this.seekTime=this.player.media.duration*(o/100),this.seekTime<0&&(this.seekTime=0),this.seekTime>this.player.media.duration-1&&(this.seekTime=this.player.media.duration-1),this.mousePosX=e.pageX,this.elements.thumb.time.innerText=Br(this.seekTime);const s=null===(t=this.player.config.markers)||void 0===t||null===(i=t.points)||void 0===i?void 0:i.find((({time:e})=>e===Math.round(this.seekTime)));s&&this.elements.thumb.time.insertAdjacentHTML("afterbegin",`${s.label}<br>`)}this.showImageAtCurrentTime()}})),js(this,"endMove",(()=>{this.toggleThumbContainer(!1,!0)})),js(this,"startScrubbing",(e=>{(ba(e.button)||!1===e.button||0===e.button)&&(this.mouseDown=!0,this.player.media.duration&&(this.toggleScrubbingContainer(!0),this.toggleThumbContainer(!1,!0),this.showImageAtCurrentTime()))})),js(this,"endScrubbing",(()=>{this.mouseDown=!1,Math.ceil(this.lastTime)===Math.ceil(this.player.media.currentTime)?this.toggleScrubbingContainer(!1):ar.call(this.player,this.player.media,"timeupdate",(()=>{this.mouseDown||this.toggleScrubbingContainer(!1)}))})),js(this,"listeners",(()=>{this.player.on("play",(()=>{this.toggleThumbContainer(!1,!0)})),this.player.on("seeked",(()=>{this.toggleThumbContainer(!1)})),this.player.on("timeupdate",(()=>{this.lastTime=this.player.media.currentTime}))})),js(this,"render",(()=>{this.elements.thumb.container=Fa("div",{class:this.player.config.classNames.previewThumbnails.thumbContainer}),this.elements.thumb.imageContainer=Fa("div",{class:this.player.config.classNames.previewThumbnails.imageContainer}),this.elements.thumb.container.appendChild(this.elements.thumb.imageContainer);const e=Fa("div",{class:this.player.config.classNames.previewThumbnails.timeContainer});this.elements.thumb.time=Fa("span",{},"00:00"),e.appendChild(this.elements.thumb.time),this.elements.thumb.imageContainer.appendChild(e),La(this.player.elements.progress)&&this.player.elements.progress.appendChild(this.elements.thumb.container),this.elements.scrubbing.container=Fa("div",{class:this.player.config.classNames.previewThumbnails.scrubbingContainer}),this.player.elements.wrapper.appendChild(this.elements.scrubbing.container)})),js(this,"destroy",(()=>{this.elements.thumb.container&&this.elements.thumb.container.remove(),this.elements.scrubbing.container&&this.elements.scrubbing.container.remove()})),js(this,"showImageAtCurrentTime",(()=>{this.mouseDown?this.setScrubbingContainerSize():this.setThumbContainerSizeAndPos();const e=this.thumbnails[0].frames.findIndex((e=>this.seekTime>=e.startTime&&this.seekTime<=e.endTime)),t=e>=0;let i=0;this.mouseDown||this.toggleThumbContainer(t),t&&(this.thumbnails.forEach(((t,n)=>{this.loadedImages.includes(t.frames[e].text)&&(i=n)})),e!==this.showingThumb&&(this.showingThumb=e,this.loadImage(i)))})),js(this,"loadImage",((e=0)=>{const t=this.showingThumb,i=this.thumbnails[e],{urlPrefix:n}=i,o=i.frames[t],s=i.frames[t].text,a=n+s;if(this.currentImageElement&&this.currentImageElement.dataset.filename===s)this.showImage(this.currentImageElement,o,e,t,s,!1),this.currentImageElement.dataset.index=t,this.removeOldImages(this.currentImageElement);else{this.loadingImage&&this.usingSprites&&(this.loadingImage.onload=null);const i=new Image;i.src=a,i.dataset.index=t,i.dataset.filename=s,this.showingThumbFilename=s,this.player.debug.log(`Loading image: ${a}`),i.onload=()=>this.showImage(i,o,e,t,s,!0),this.loadingImage=i,this.removeOldImages(i)}})),js(this,"showImage",((e,t,i,n,o,s=!0)=>{this.player.debug.log(`Showing thumb: ${o}. num: ${n}. qual: ${i}. newimg: ${s}`),this.setImageSizeAndOffset(e,t),s&&(this.currentImageContainer.appendChild(e),this.currentImageElement=e,this.loadedImages.includes(o)||this.loadedImages.push(o)),this.preloadNearby(n,!0).then(this.preloadNearby(n,!1)).then(this.getHigherQuality(i,e,t,o))})),js(this,"removeOldImages",(e=>{Array.from(this.currentImageContainer.children).forEach((t=>{if("img"!==t.tagName.toLowerCase())return;const i=this.usingSprites?500:1e3;if(t.dataset.index!==e.dataset.index&&!t.dataset.deleting){t.dataset.deleting=!0;const{currentImageContainer:e}=this;setTimeout((()=>{e.removeChild(t),this.player.debug.log(`Removing thumb: ${t.dataset.filename}`)}),i)}}))})),js(this,"preloadNearby",((e,t=!0)=>new Promise((i=>{setTimeout((()=>{const n=this.thumbnails[0].frames[e].text;if(this.showingThumbFilename===n){let o;o=t?this.thumbnails[0].frames.slice(e):this.thumbnails[0].frames.slice(0,e).reverse();let s=!1;o.forEach((e=>{const t=e.text;if(t!==n&&!this.loadedImages.includes(t)){s=!0,this.player.debug.log(`Preloading thumb filename: ${t}`);const{urlPrefix:e}=this.thumbnails[0],n=e+t,o=new Image;o.src=n,o.onload=()=>{this.player.debug.log(`Preloaded thumb filename: ${t}`),this.loadedImages.includes(t)||this.loadedImages.push(t),i()}}})),s||i()}}),300)})))),js(this,"getHigherQuality",((e,t,i,n)=>{if(e<this.thumbnails.length-1){let o=t.naturalHeight;this.usingSprites&&(o=i.h),o<this.thumbContainerHeight&&setTimeout((()=>{this.showingThumbFilename===n&&(this.player.debug.log(`Showing higher quality thumb for: ${n}`),this.loadImage(e+1))}),300)}})),js(this,"toggleThumbContainer",((e=!1,t=!1)=>{const i=this.player.config.classNames.previewThumbnails.thumbContainerShown;this.elements.thumb.container.classList.toggle(i,e),!e&&t&&(this.showingThumb=null,this.showingThumbFilename=null)})),js(this,"toggleScrubbingContainer",((e=!1)=>{const t=this.player.config.classNames.previewThumbnails.scrubbingContainerShown;this.elements.scrubbing.container.classList.toggle(t,e),e||(this.showingThumb=null,this.showingThumbFilename=null)})),js(this,"determineContainerAutoSizing",(()=>{(this.elements.thumb.imageContainer.clientHeight>20||this.elements.thumb.imageContainer.clientWidth>20)&&(this.sizeSpecifiedInCSS=!0)})),js(this,"setThumbContainerSizeAndPos",(()=>{const{imageContainer:e}=this.elements.thumb;if(this.sizeSpecifiedInCSS){if(e.clientHeight>20&&e.clientWidth<20){const t=Math.floor(e.clientHeight*this.thumbAspectRatio);e.style.width=`${t}px`}else if(e.clientHeight<20&&e.clientWidth>20){const t=Math.floor(e.clientWidth/this.thumbAspectRatio);e.style.height=`${t}px`}}else{const t=Math.floor(this.thumbContainerHeight*this.thumbAspectRatio);e.style.height=`${this.thumbContainerHeight}px`,e.style.width=`${t}px`}this.setThumbContainerPos()})),js(this,"setThumbContainerPos",(()=>{const e=this.player.elements.progress.getBoundingClientRect(),t=this.player.elements.container.getBoundingClientRect(),{container:i}=this.elements.thumb,n=t.left-e.left+10,o=t.right-e.left-i.clientWidth-10,s=this.mousePosX-e.left-i.clientWidth/2,a=al(s,n,o);i.style.left=`${a}px`,i.style.setProperty("--preview-arrow-offset",s-a+"px")})),js(this,"setScrubbingContainerSize",(()=>{const{width:e,height:t}=ll(this.thumbAspectRatio,{width:this.player.media.clientWidth,height:this.player.media.clientHeight});this.elements.scrubbing.container.style.width=`${e}px`,this.elements.scrubbing.container.style.height=`${t}px`})),js(this,"setImageSizeAndOffset",((e,t)=>{if(!this.usingSprites)return;const i=this.thumbContainerHeight/t.h;e.style.height=e.naturalHeight*i+"px",e.style.width=e.naturalWidth*i+"px",e.style.left=`-${t.x*i}px`,e.style.top=`-${t.y*i}px`})),this.player=e,this.thumbnails=[],this.loaded=!1,this.lastMouseMoveTime=Date.now(),this.mouseDown=!1,this.loadedImages=[],this.elements={thumb:{},scrubbing:{}},this.load()}get enabled(){return this.player.isHTML5&&this.player.isVideo&&this.player.config.previewThumbnails.enabled}get currentImageContainer(){return this.mouseDown?this.elements.scrubbing.container:this.elements.thumb.imageContainer}get usingSprites(){return Object.keys(this.thumbnails[0].frames[0]).includes("w")}get thumbAspectRatio(){return this.usingSprites?this.thumbnails[0].frames[0].w/this.thumbnails[0].frames[0].h:this.thumbnails[0].width/this.thumbnails[0].height}get thumbContainerHeight(){if(this.mouseDown){const{height:e}=ll(this.thumbAspectRatio,{width:this.player.media.clientWidth,height:this.player.media.clientHeight});return e}return this.sizeSpecifiedInCSS?this.elements.thumb.imageContainer.clientHeight:Math.floor(this.player.media.clientWidth/this.thumbAspectRatio/4)}get currentImageElement(){return this.mouseDown?this.currentScrubbingImageElement:this.currentThumbnailImageElement}set currentImageElement(e){this.mouseDown?this.currentScrubbingImageElement=e:this.currentThumbnailImageElement=e}}const dl={insertElements(e,t){xa(t)?ja(e,this.media,{src:t}):Ea(t)&&t.forEach((t=>{ja(e,this.media,t)}))},change(e){Ia(e,"sources.length")?(wr.cancelRequests.call(this),this.destroy.call(this,(()=>{this.options.quality=[],Wa(this.media),this.media=null,La(this.elements.container)&&this.elements.container.removeAttribute("class");const{sources:t,type:i}=e,[{provider:n=Fr.html5,src:o}]=t,s="html5"===n?i:"div",a="html5"===n?{}:{src:o};Object.assign(this,{provider:n,type:i,supported:tr.check(i,n,this.config.playsinline),media:Fa(s,a)}),this.elements.container.appendChild(this.media),Ca(e.autoplay)&&(this.config.autoplay=e.autoplay),this.isHTML5&&(this.config.crossorigin&&this.media.setAttribute("crossorigin",""),this.config.autoplay&&this.media.setAttribute("autoplay",""),Ba(e.poster)||(this.poster=e.poster),this.config.loop.active&&this.media.setAttribute("loop",""),this.config.muted&&this.media.setAttribute("muted",""),this.config.playsinline&&this.media.setAttribute("playsinline","")),Yr.addStyleHook.call(this),this.isHTML5&&dl.insertElements.call(this,"source",t),this.config.title=e.title,ol.setup.call(this),this.isHTML5&&Object.keys(e).includes("tracks")&&dl.insertElements.call(this,"track",e.tracks),(this.isHTML5||this.isEmbed&&!this.supported.ui)&&Yr.build.call(this),this.isHTML5&&this.media.load(),Ba(e.previewThumbnails)||(Object.assign(this.config.previewThumbnails,e.previewThumbnails),this.previewThumbnails&&this.previewThumbnails.loaded&&(this.previewThumbnails.destroy(),this.previewThumbnails=null),this.config.previewThumbnails.enabled&&(this.previewThumbnails=new cl(this))),this.fullscreen.update()}),!0)):this.debug.warn("Invalid source format")}};class ul{constructor(e,t){if(js(this,"play",(()=>Sa(this.media.play)?(this.ads&&this.ads.enabled&&this.ads.managerPromise.then((()=>this.ads.play())).catch((()=>dr(this.media.play()))),this.media.play()):null)),js(this,"pause",(()=>this.playing&&Sa(this.media.pause)?this.media.pause():null)),js(this,"togglePlay",(e=>(Ca(e)?e:!this.playing)?this.play():this.pause())),js(this,"stop",(()=>{this.isHTML5?(this.pause(),this.restart()):Sa(this.media.stop)&&this.media.stop()})),js(this,"restart",(()=>{this.currentTime=0})),js(this,"rewind",(e=>{this.currentTime-=ka(e)?e:this.config.seekTime})),js(this,"forward",(e=>{this.currentTime+=ka(e)?e:this.config.seekTime})),js(this,"increaseVolume",(e=>{const t=this.media.muted?0:this.volume;this.volume=t+(ka(e)?e:0)})),js(this,"decreaseVolume",(e=>{this.increaseVolume(-e)})),js(this,"airplay",(()=>{tr.airplay&&this.media.webkitShowPlaybackTargetPicker()})),js(this,"toggleControls",(e=>{if(this.supported.ui&&!this.isAudio){const t=Ka(this.elements.container,this.config.classNames.hideControls),i=void 0===e?void 0:!e,n=Ya(this.elements.container,this.config.classNames.hideControls,i);if(n&&Ea(this.config.controls)&&this.config.controls.includes("settings")&&!Ba(this.config.settings)&&Mr.toggleMenu.call(this,!1),n!==t){const e=n?"controlshidden":"controlsshown";rr.call(this,this.media,e)}return!n}return!1})),js(this,"on",((e,t)=>{or.call(this,this.elements.container,e,t)})),js(this,"once",((e,t)=>{ar.call(this,this.elements.container,e,t)})),js(this,"off",((e,t)=>{sr(this.elements.container,e,t)})),js(this,"destroy",((e,t=!1)=>{if(!this.ready)return;const i=()=>{document.body.style.overflow="",this.embed=null,t?(Object.keys(this.elements).length&&(Wa(this.elements.buttons.play),Wa(this.elements.captions),Wa(this.elements.controls),Wa(this.elements.wrapper),this.elements.buttons.play=null,this.elements.captions=null,this.elements.controls=null,this.elements.wrapper=null),Sa(e)&&e()):(lr.call(this),wr.cancelRequests.call(this),Ua(this.elements.original,this.elements.container),rr.call(this,this.elements.original,"destroyed",!0),Sa(e)&&e.call(this.elements.original),this.ready=!1,setTimeout((()=>{this.elements=null,this.media=null}),200))};this.stop(),clearTimeout(this.timers.loading),clearTimeout(this.timers.controls),clearTimeout(this.timers.resized),this.isHTML5?(Yr.toggleNativeControls.call(this,!0),i()):this.isYouTube?(clearInterval(this.timers.buffering),clearInterval(this.timers.playing),null!==this.embed&&Sa(this.embed.destroy)&&this.embed.destroy(),i()):this.isVimeo&&(null!==this.embed&&this.embed.unload().then(i),setTimeout(i,200))})),js(this,"supports",(e=>tr.mime.call(this,e))),this.timers={},this.ready=!1,this.loading=!1,this.failed=!1,this.touch=tr.touch,this.media=e,xa(this.media)&&(this.media=document.querySelectorAll(this.media)),(window.jQuery&&this.media instanceof jQuery||Ta(this.media)||Ea(this.media))&&(this.media=this.media[0]),this.config=za({},zr,ul.defaults,t||{},(()=>{try{return JSON.parse(this.media.getAttribute("data-plyr-config"))}catch(e){return{}}})()),this.elements={container:null,fullscreen:null,captions:null,buttons:{},display:{},progress:{},inputs:{},settings:{popup:null,menu:null,panels:{},buttons:{}}},this.captions={active:null,currentTrack:-1,meta:new WeakMap},this.fullscreen={active:!1},this.options={speed:[],quality:[]},this.debug=new Ur(this.config.debug),this.debug.log("Config",this.config),this.debug.log("Support",tr),ba(this.media)||!La(this.media))return void this.debug.error("Setup failed: no suitable element passed");if(this.media.plyr)return void this.debug.warn("Target already setup");if(!this.config.enabled)return void this.debug.error("Setup failed: disabled by config");if(!tr.check().api)return void this.debug.error("Setup failed: no support");const i=this.media.cloneNode(!0);i.autoplay=!1,this.elements.original=i;const n=this.media.tagName.toLowerCase();let o=null,s=null;switch(n){case"div":if(o=this.media.querySelector("iframe"),La(o)){if(s=Vr(o.getAttribute("src")),this.provider=function(e){return/^(https?:\/\/)?(www\.)?(youtube\.com|youtube-nocookie\.com|youtu\.?be)\/.+$/.test(e)?Fr.youtube:/^https?:\/\/player.vimeo.com\/video\/\d{0,9}(?=\b|\/)/.test(e)?Fr.vimeo:null}(s.toString()),this.elements.container=this.media,this.media=o,this.elements.container.className="",s.search.length){const e=["1","true"];e.includes(s.searchParams.get("autoplay"))&&(this.config.autoplay=!0),e.includes(s.searchParams.get("loop"))&&(this.config.loop.active=!0),this.isYouTube?(this.config.playsinline=e.includes(s.searchParams.get("playsinline")),this.config.youtube.hl=s.searchParams.get("hl")):this.config.playsinline=!0}}else this.provider=this.media.getAttribute(this.config.attributes.embed.provider),this.media.removeAttribute(this.config.attributes.embed.provider);if(Ba(this.provider)||!Object.values(Fr).includes(this.provider))return void this.debug.error("Setup failed: Invalid provider");this.type=Wr;break;case"video":case"audio":this.type=n,this.provider=Fr.html5,this.media.hasAttribute("crossorigin")&&(this.config.crossorigin=!0),this.media.hasAttribute("autoplay")&&(this.config.autoplay=!0),(this.media.hasAttribute("playsinline")||this.media.hasAttribute("webkit-playsinline"))&&(this.config.playsinline=!0),this.media.hasAttribute("muted")&&(this.config.muted=!0),this.media.hasAttribute("loop")&&(this.config.loop.active=!0);break;default:return void this.debug.error("Setup failed: unsupported type")}this.supported=tr.check(this.type,this.provider,this.config.playsinline),this.supported.api?(this.eventListeners=[],this.listeners=new Kr(this),this.storage=new _r(this),this.media.plyr=this,La(this.elements.container)||(this.elements.container=Fa("div",{tabindex:0}),Da(this.media,this.elements.container)),Yr.migrateStyles.call(this),Yr.addStyleHook.call(this),ol.setup.call(this),this.config.debug&&or.call(this,this.elements.container,this.config.events.join(" "),(e=>{this.debug.log(`event: ${e.type}`)})),this.fullscreen=new qr(this),(this.isHTML5||this.isEmbed&&!this.supported.ui)&&Yr.build.call(this),this.listeners.container(),this.listeners.global(),this.config.ads.enabled&&(this.ads=new sl(this)),this.isHTML5&&this.config.autoplay&&this.once("canplay",(()=>dr(this.play()))),this.lastSeekTime=0,this.config.previewThumbnails.enabled&&(this.previewThumbnails=new cl(this))):this.debug.error("Setup failed: no support")}get isHTML5(){return this.provider===Fr.html5}get isEmbed(){return this.isYouTube||this.isVimeo}get isYouTube(){return this.provider===Fr.youtube}get isVimeo(){return this.provider===Fr.vimeo}get isVideo(){return this.type===Wr}get isAudio(){return this.type===jr}get playing(){return Boolean(this.ready&&!this.paused&&!this.ended)}get paused(){return Boolean(this.media.paused)}get stopped(){return Boolean(this.paused&&0===this.currentTime)}get ended(){return Boolean(this.media.ended)}set currentTime(e){if(!this.duration)return;const t=ka(e)&&e>0;this.media.currentTime=t?Math.min(e,this.duration):0,this.debug.log(`Seeking to ${this.currentTime} seconds`)}get currentTime(){return Number(this.media.currentTime)}get buffered(){const{buffered:e}=this.media;return ka(e)?e:e&&e.length&&this.duration>0?e.end(0)/this.duration:0}get seeking(){return Boolean(this.media.seeking)}get duration(){const e=parseFloat(this.config.duration),t=(this.media||{}).duration,i=ka(t)&&t!==1/0?t:0;return e||i}set volume(e){let t=e;xa(t)&&(t=Number(t)),ka(t)||(t=this.storage.get("volume")),ka(t)||({volume:t}=this.config),t>1&&(t=1),t<0&&(t=0),this.config.volume=t,this.media.volume=t,!Ba(e)&&this.muted&&t>0&&(this.muted=!1)}get volume(){return Number(this.media.volume)}set muted(e){let t=e;Ca(t)||(t=this.storage.get("muted")),Ca(t)||(t=this.config.muted),this.config.muted=t,this.media.muted=t}get muted(){return Boolean(this.media.muted)}get hasAudio(){return!this.isHTML5||!!this.isAudio||Boolean(this.media.mozHasAudio)||Boolean(this.media.webkitAudioDecodedByteCount)||Boolean(this.media.audioTracks&&this.media.audioTracks.length)}set speed(e){let t=null;ka(e)&&(t=e),ka(t)||(t=this.storage.get("speed")),ka(t)||(t=this.config.speed.selected);const{minimumSpeed:i,maximumSpeed:n}=this;t=al(t,i,n),this.config.speed.selected=t,setTimeout((()=>{this.media&&(this.media.playbackRate=t)}),0)}get speed(){return Number(this.media.playbackRate)}get minimumSpeed(){return this.isYouTube?Math.min(...this.options.speed):this.isVimeo?.5:.0625}get maximumSpeed(){return this.isYouTube?Math.max(...this.options.speed):this.isVimeo?2:16}set quality(e){const t=this.config.quality,i=this.options.quality;if(!i.length)return;let n=[!Ba(e)&&Number(e),this.storage.get("quality"),t.selected,t.default].find(ka),o=!0;if(!i.includes(n)){const e=hr(i,n);this.debug.warn(`Unsupported quality option: ${n}, using ${e} instead`),n=e,o=!1}t.selected=n,this.media.quality=n,o&&this.storage.set({quality:n})}get quality(){return this.media.quality}set loop(e){const t=Ca(e)?e:this.config.loop.active;this.config.loop.active=t,this.media.loop=t}get loop(){return Boolean(this.media.loop)}set source(e){dl.change.call(this,e)}get source(){return this.media.currentSrc}get download(){const{download:e}=this.config.urls;return Pa(e)?e:this.source}set download(e){Pa(e)&&(this.config.urls.download=e,Mr.setDownloadUrl.call(this))}set poster(e){this.isVideo?Yr.setPoster.call(this,e,!1).catch((()=>{})):this.debug.warn("Poster can only be set for video")}get poster(){return this.isVideo?this.media.getAttribute("poster")||this.media.getAttribute("data-poster"):null}get ratio(){if(!this.isVideo)return null;const e=gr(yr.call(this));return Ea(e)?e.join(":"):e}set ratio(e){this.isVideo?xa(e)&&fr(e)?(this.config.ratio=gr(e),vr.call(this)):this.debug.error(`Invalid aspect ratio specified (${e})`):this.debug.warn("Aspect ratio can only be set for video")}set autoplay(e){this.config.autoplay=Ca(e)?e:this.config.autoplay}get autoplay(){return Boolean(this.config.autoplay)}toggleCaptions(e){Ir.toggle.call(this,e,!1)}set currentTrack(e){Ir.set.call(this,e,!1),Ir.setup.call(this)}get currentTrack(){const{toggled:e,currentTrack:t}=this.captions;return e?t:-1}set language(e){Ir.setLanguage.call(this,e,!1)}get language(){return(Ir.getCurrentTrack.call(this)||{}).language}set pip(e){if(!tr.pip)return;const t=Ca(e)?e:!this.pip;Sa(this.media.webkitSetPresentationMode)&&this.media.webkitSetPresentationMode(t?Dr:Rr),Sa(this.media.requestPictureInPicture)&&(!this.pip&&t?this.media.requestPictureInPicture():this.pip&&!t&&document.exitPictureInPicture())}get pip(){return tr.pip?Ba(this.media.webkitPresentationMode)?this.media===document.pictureInPictureElement:this.media.webkitPresentationMode===Dr:null}setPreviewThumbnails(e){this.previewThumbnails&&this.previewThumbnails.loaded&&(this.previewThumbnails.destroy(),this.previewThumbnails=null),Object.assign(this.config.previewThumbnails,e),this.config.previewThumbnails.enabled&&(this.previewThumbnails=new cl(this))}static supported(e,t,i){return tr.check(e,t,i)}static loadSprite(e,t){return Nr(e,t)}static setup(e,t={}){let i=null;return xa(e)?i=Array.from(document.querySelectorAll(e)):Ta(e)?i=Array.from(e):Ea(e)&&(i=e.filter(La)),Ba(i)?null:i.map((e=>new ul(e,t)))}}ul.defaults=function(e){return JSON.parse(JSON.stringify(e))}(zr);const hl=["src"],pl=["src"],ml=(e=>(t.pushScopeId("data-v-3fbadc18"),e=e(),t.popScopeId(),e))((()=>t.createElementVNode("track",{kind:"captions",label:"English captions",src:"/path/to/captions.vtt",srclang:"en",default:""},null,-1)));var fl=i(t.defineComponent({__name:"LewPlyrVideo",props:{url:{type:String,default:"https://cdn.plyr.io/static/demo/View_From_A_Blue_Moon_Trailer-1080p.mp4"}},setup(e){let i,n=t.ref(null);return t.onMounted((()=>{i=new ul(n.value,{settings:["quality","speed","loop"],controls:["play-large","play","progress","current-time","mute","volume","settings","pip","airplay","fullscreen"],keyboard:{focused:!0,global:!1}})})),t.onUnmounted((()=>{i.destroy()})),(i,o)=>(t.openBlock(),t.createElementBlock("video",{id:"player",ref_key:"playerRef",ref:n,playsinline:"",controls:"","data-poster":"/path/to/poster.jpg"},[t.createElementVNode("source",{src:e.url,type:"video/mp4"},null,8,hl),t.createElementVNode("source",{src:e.url,type:"video/webm"},null,8,pl),t.createCommentVNode(" Captions are optional "),ml],512))}}),[["__scopeId","data-v-3fbadc18"],["__file","C:/Users/10570/Desktop/30secWorkSpace/Lew-UI/packages/components/plyr/src/LewPlyrVideo.vue"]]);const gl={class:"demo-box"},yl={class:"demo-item"},vl={class:"demo-cp"},bl={class:"hl-pre"},wl={class:"pre-box"},kl=["textContent"],xl={class:"icon"};var Cl=i(t.defineComponent({__name:"LewDemoBox",props:{title:{type:String,default:()=>""},tag:{type:String,default:()=>""},code:{type:String,default:()=>""}},setup(e){let i=t.ref(!1);return(n,o)=>{const s=t.resolveComponent("lew-tag"),a=t.resolveComponent("lew-title"),r=t.resolveDirective("highlight");return t.openBlock(),t.createElementBlock("div",gl,[t.createVNode(a,{size:"16px",bold:800},{default:t.withCtx((()=>[t.createTextVNode(t.toDisplayString(e.title)+" ",1),e.tag?(t.openBlock(),t.createBlock(s,{key:0,type:"info",style:{margin:"2px 0px 0px 5px"}},{default:t.withCtx((()=>[t.createTextVNode(t.toDisplayString(e.tag),1)])),_:1})):t.createCommentVNode("v-if",!0)])),_:1}),t.createElementVNode("div",yl,[t.createElementVNode("div",vl,[t.renderSlot(n.$slots,"default")]),t.withDirectives((t.openBlock(),t.createElementBlock("div",bl,[t.createElementVNode("div",wl,[t.createElementVNode("pre",null,[t.createElementVNode("code",{textContent:t.toDisplayString(e.code)},null,8,kl)])])])),[[t.vShow,t.unref(i)],[r]]),t.createElementVNode("div",{class:"show-bar",onClick:o[0]||(o[0]=e=>t.isRef(i)?i.value=!t.unref(i):i=!t.unref(i))},[t.createElementVNode("div",xl,[t.unref(i)?t.createCommentVNode("v-if",!0):(t.openBlock(),t.createBlock(t.unref($e),{key:0,size:"20"},{default:t.withCtx((()=>[t.createVNode(t.unref(Dt))])),_:1})),t.unref(i)?(t.openBlock(),t.createBlock(t.unref($e),{key:1,size:"20"},{default:t.withCtx((()=>[t.createVNode(t.unref(Ot))])),_:1})):t.createCommentVNode("v-if",!0)]),t.createTextVNode(" "+t.toDisplayString(t.unref(i)?"关闭":"显示源码"),1)])])])}}}),[["__file","C:/Users/10570/Desktop/30secWorkSpace/Lew-UI/packages/components/demo-box/src/LewDemoBox.vue"]]);const Sl={right:{type:String,default:"40px"},bottom:{type:String,default:"40px"},valveHeight:{type:String,default:"50px"},target:{type:String,default:""}};var El=i(t.defineComponent({__name:"LewBackTop",props:Sl,emits:["click"],setup(e,{emit:i}){const n=e,o=t.shallowRef(),s=t.ref(!1),a=t.computed((()=>({right:`${n.right}`,bottom:`${n.bottom}`}))),r=()=>{if(!o.value)return;i("click");let e=setInterval((()=>{let t=o.value,i=Math.floor(-t.scrollTop/5);t.scrollTop=t.scrollTop+i,0===t.scrollTop&&clearInterval(e)}),20)};var l,c,d;return l=window,c="scroll",d=()=>{o.value&&(s.value=o.value.scrollTop>=parseFloat(n.valveHeight))},t.onMounted((()=>l.addEventListener(c,d,!0))),t.onUnmounted((()=>l.removeEventListener(c,d,!0))),t.onMounted((()=>{var e;if(o.value=document.documentElement,n.target&&(o.value=null!=(e=document.querySelector(`.${n.target}`))?e:void 0,!o.value))throw new Error(`target is not existed: ${n.target}`)})),(e,i)=>(t.openBlock(),t.createBlock(t.Transition,{name:"fade"},{default:t.withCtx((()=>[s.value?(t.openBlock(),t.createElementBlock("div",{key:0,class:"backTop",style:t.normalizeStyle(t.unref(a)),onClick:r},[t.renderSlot(e.$slots,"default",{},(()=>[t.createVNode(t.unref($e),{size:"20"},{default:t.withCtx((()=>[t.createVNode(t.unref(N))])),_:1})]),!0)],4)):t.createCommentVNode("v-if",!0)])),_:3}))}}),[["__scopeId","data-v-36ae6e41"],["__file","C:/Users/10570/Desktop/30secWorkSpace/Lew-UI/packages/components/backtop/src/LewBackTop.vue"]]),Tl=Object.freeze(Object.defineProperty({__proto__:null,LewFlex:n,LewSpace:s,LewLayout:a,LewMark:d,LewTabs:m,LewSteps:g,LewBreadcrumb:E,LewDropdown:$,LewInput:Oe,LewInputPro:Re,LewFormItem:je,LewCheckbox:Ye,LewCheckboxGroup:Ke,LewRadioboxGroup:tt,LewSelect:dt,LewSwitch:ht,LewDate:St,LewDatePicker:Qt,LewTable:ni,LewPagination:di,LewAvatar:pi,LewTitle:mi,LewButton:fi,LewBadge:vi,LewTag:Ti,LewAlert:Pi,LewModal:Bi,LewPopok:Fi,LewPopover:Go,LewDrawer:es,LewFancybox:Fs,LewFancyImage:ns,LewPlyrVideo:fl,LewDemoBox:Cl,LewBackTop:El},Symbol.toStringTag,{value:"Module"}));const Ll=(e,t)=>{document.getElementById("lew-message")?$l(e,t):((()=>{const e=document.createElement("div");e.setAttribute("id","lew-message"),document.body.appendChild(e)})(),Ll(e,t))},$l=(e,t)=>{const i=document.getElementById("lew-message"),n=document.createElement("div"),o={success:'<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 24 24"><g fill="none"><path d="M12 2c5.523 0 10 4.477 10 10s-4.477 10-10 10S2 17.523 2 12S6.477 2 12 2zm0 1.5a8.5 8.5 0 1 0 0 17a8.5 8.5 0 0 0 0-17zm-1.25 9.94l4.47-4.47a.75.75 0 0 1 1.133.976l-.073.084l-5 5a.75.75 0 0 1-.976.073l-.084-.073l-2.5-2.5a.75.75 0 0 1 .976-1.133l.084.073l1.97 1.97l4.47-4.47l-4.47 4.47z" fill="currentColor"></path></g></svg>',warning:'<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 24 24"><g fill="none"><path d="M10.91 2.782a2.25 2.25 0 0 1 2.975.74l.083.138l7.759 14.009a2.25 2.25 0 0 1-1.814 3.334l-.154.006H4.243a2.25 2.25 0 0 1-2.041-3.197l.072-.143L10.031 3.66a2.25 2.25 0 0 1 .878-.878zm9.505 15.613l-7.76-14.008a.75.75 0 0 0-1.254-.088l-.057.088l-7.757 14.008a.75.75 0 0 0 .561 1.108l.095.006h15.516a.75.75 0 0 0 .696-1.028l-.04-.086l-7.76-14.008l7.76 14.008zM12 16.002a.999.999 0 1 1 0 1.997a.999.999 0 0 1 0-1.997zM11.995 8.5a.75.75 0 0 1 .744.647l.007.102l.004 4.502a.75.75 0 0 1-1.494.103l-.006-.102l-.004-4.502a.75.75 0 0 1 .75-.75z" fill="currentColor"></path></g></svg>',error:'<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 24 24"><g fill="none"><path d="M12 2c5.523 0 10 4.478 10 10s-4.477 10-10 10S2 17.522 2 12S6.477 2 12 2zm0 1.667c-4.595 0-8.333 3.738-8.333 8.333c0 4.595 3.738 8.333 8.333 8.333c4.595 0 8.333-3.738 8.333-8.333c0-4.595-3.738-8.333-8.333-8.333zm-.001 10.835a.999.999 0 1 1 0 1.998a.999.999 0 0 1 0-1.998zM11.994 7a.75.75 0 0 1 .744.648l.007.101l.004 4.502a.75.75 0 0 1-1.493.103l-.007-.102l-.004-4.501a.75.75 0 0 1 .75-.751z" fill="currentColor"></path></g></svg>',normal:'<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 24 24"><g fill="none"><path d="M12 1.999c5.524 0 10.002 4.478 10.002 10.002c0 5.523-4.478 10.001-10.002 10.001C6.476 22.002 2 17.524 2 12.001C1.999 6.477 6.476 1.999 12 1.999zm0 1.5a8.502 8.502 0 1 0 0 17.003A8.502 8.502 0 0 0 12 3.5zm-.004 7a.75.75 0 0 1 .744.648l.007.102l.004 5.502a.75.75 0 0 1-1.494.102l-.006-.101l-.004-5.502a.75.75 0 0 1 .75-.75zm.005-3.497a.999.999 0 1 1 0 1.997a.999.999 0 0 1 0-1.997z" fill="currentColor"></path></g></svg>',info:'<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 24 24"><g fill="none"><path d="M12 1.996a7.49 7.49 0 0 1 7.496 7.25l.004.25v4.097l1.38 3.156a1.249 1.249 0 0 1-1.145 1.75L15 18.502a3 3 0 0 1-5.995.177L9 18.499H4.275a1.251 1.251 0 0 1-1.147-1.747L4.5 13.594V9.496c0-4.155 3.352-7.5 7.5-7.5zM13.5 18.5l-3 .002a1.5 1.5 0 0 0 2.993.145l.007-.147zM12 3.496c-3.32 0-6 2.674-6 6v4.41L4.656 17h14.697L18 13.907V9.509l-.003-.225A5.988 5.988 0 0 0 12 3.496z" fill="currentColor"></path></g></svg>'};n.innerHTML=`${o[e]}<div class="content">${t}</div>`,null==i||i.appendChild(n,null==i?void 0:i.childNodes[0]),n.setAttribute("class",`message message-${e}`),setTimeout((()=>{n.setAttribute("class",`message message-${e} message-show`),setTimeout((()=>{n.setAttribute("class",`message message-${e} message-hidden`),setTimeout((()=>{null==i||i.removeChild(n)}),250)}),3e3)}),10)};var _l={name:"LewMessage",warning:e=>{Ll("warning",e)},info:e=>{Ll("info",e)},normal:e=>{Ll("normal",e)},success:e=>{Ll("success",e)},error:e=>{Ll("error",e)}};const Al={key:0,class:"lew-dialog-box lew-dialog-box-normal"},Nl={class:"left"},Pl={class:"right"},Bl=t.createTextVNode("取消"),Ml=t.createTextVNode("确认"),Vl={key:1,class:"lew-dialog-box lew-dialog-box-easy"},Ol={class:"left"},Il={class:"right"},zl=t.createTextVNode("取消"),Dl=t.createTextVNode("确认");var Rl=i(t.defineComponent({__name:"LewDialog",props:{visible:{type:Boolean,default:!1},closeOnClickOverlay:{type:Boolean,default:!0},type:{type:String,default:""},ok:{type:Function},cancel:{type:Function},layout:{type:String,default:"normal"}},emits:["update:visible"],setup(e,{emit:i}){const n=e,o=()=>{n.closeOnClickOverlay&&a()};let s=t.ref(!0);const a=()=>{s.value=!1,setTimeout((()=>{i("update:visible",!1)}),245)},r=()=>{"function"==typeof n.ok&&n.ok(),a()},l=()=>{"function"==typeof n.cancel&&n.cancel(),a()};return(i,n)=>(t.openBlock(),t.createBlock(t.Teleport,{to:"body"},[e.visible?(t.openBlock(),t.createElementBlock("div",{key:0,class:"lew-dialog",style:t.normalizeStyle(t.unref(s)?"animation: lewDialogOpen 0.25s;":"animation: lewDialogClose 0.25s;"),onClick:o},["normal"==e.layout?(t.openBlock(),t.createElementBlock("div",Al,[t.createElementVNode("div",{class:"btn-close",onClick:l},[t.createVNode(t.unref($e),{size:"18"},{default:t.withCtx((()=>[t.createVNode(t.unref(jt))])),_:1})]),t.createElementVNode("div",Nl,[t.createVNode(t.unref($e),{size:"32",class:t.normalizeClass(`icon-${e.type}`)},{default:t.withCtx((()=>["normal"==e.type?(t.openBlock(),t.createBlock(t.unref(Yt),{key:0})):t.createCommentVNode("v-if",!0),"warning"==e.type?(t.openBlock(),t.createBlock(t.unref(Zt),{key:1})):t.createCommentVNode("v-if",!0),"success"==e.type?(t.openBlock(),t.createBlock(t.unref(Bt),{key:2})):t.createCommentVNode("v-if",!0),"error"==e.type?(t.openBlock(),t.createBlock(t.unref(Ut),{key:3})):t.createCommentVNode("v-if",!0),"info"==e.type?(t.openBlock(),t.createBlock(t.unref(Lt),{key:4})):t.createCommentVNode("v-if",!0)])),_:1},8,["class"])]),t.createElementVNode("div",Pl,[t.createElementVNode("header",null,[t.renderSlot(i.$slots,"title",{},void 0,!0),t.createElementVNode("span",{class:"gulu-dialog-close",onClick:a})]),t.createElementVNode("main",null,[t.renderSlot(i.$slots,"content",{},void 0,!0)]),t.createElementVNode("footer",null,[t.createVNode(t.unref(fi),{size:"small",type:"blank",onClick:l},{default:t.withCtx((()=>[Bl])),_:1}),t.createVNode(t.unref(fi),{size:"small",onClick:r},{default:t.withCtx((()=>[Ml])),_:1})])])])):t.createCommentVNode("v-if",!0),"easy"==e.layout?(t.openBlock(),t.createElementBlock("div",Vl,[t.createElementVNode("div",Ol,[t.createVNode(t.unref($e),{size:"22",class:t.normalizeClass(`icon-${e.type}`)},{default:t.withCtx((()=>["normal"==e.type?(t.openBlock(),t.createBlock(t.unref(Yt),{key:0})):t.createCommentVNode("v-if",!0),"warning"==e.type?(t.openBlock(),t.createBlock(t.unref(Zt),{key:1})):t.createCommentVNode("v-if",!0),"success"==e.type?(t.openBlock(),t.createBlock(t.unref(Bt),{key:2})):t.createCommentVNode("v-if",!0),"error"==e.type?(t.openBlock(),t.createBlock(t.unref(Ut),{key:3})):t.createCommentVNode("v-if",!0),"info"==e.type?(t.openBlock(),t.createBlock(t.unref(Lt),{key:4})):t.createCommentVNode("v-if",!0)])),_:1},8,["class"])]),t.createElementVNode("div",Il,[t.createElementVNode("main",null,[t.renderSlot(i.$slots,"content",{},void 0,!0)]),t.createVNode(t.unref(fi),{style:{"margin-right":"10px"},type:"normal",size:"small",onClick:l},{default:t.withCtx((()=>[zl])),_:1}),t.createVNode(t.unref(fi),{size:"small",onClick:r},{default:t.withCtx((()=>[Dl])),_:1})])])):t.createCommentVNode("v-if",!0)],4)):t.createCommentVNode("v-if",!0)]))}}),[["__scopeId","data-v-0e036b0b"],["__file","C:/Users/10570/Desktop/30secWorkSpace/Lew-UI/packages/directives/dialog/src/LewDialog.vue"]]);const Fl=(e,i)=>{const{title:n,content:o,ok:s,cancel:a,layout:r}=i,l=document.createElement("div");document.body.appendChild(l);const c=t.createApp({render:()=>t.h(Rl,{closeOnClickOverlay:!1,type:e,layout:r,visible:!0,"onUpdate:visible":e=>{!1===e&&(c.unmount(l),l.remove())},ok:s,cancel:a},{title:()=>n,content:()=>o})});c.mount(l)};var jl={name:"LewDialog",warning:e=>{Fl("warning",e)},info:e=>{Fl("info",e)},normal:e=>{Fl("normal",e)},success:e=>{Fl("success",e)},error:e=>{Fl("error",e)}};let Wl;var Hl={install(e){e.directive("tooltip",{mounted(e,t){let i=t.value.trigger;"hover"==i&&(i="mouseenter"),Wl=Xo(e,{trigger:i||"mouseenter",content:t.value.content,animation:"shift-away-subtle",interactive:!0,appendTo:()=>document.body,placement:t.value.placement,allowHTML:t.value.allowHTML,arrow:t.value.arrow,maxWidth:250,onShow(e){document.getElementsByTagName("html")[0].classList.contains("lew-dark")?e.popper.children[0].setAttribute("data-theme","dark"):e.popper.children[0].setAttribute("data-theme","light")}}),Wl.popper.children[0].setAttribute("data-lew","tooltip")},updated(e,t){Wl.setContent(t.value.content)},unmounted(){Wl=null}})}};let Ul;var ql={install(e){e.directive("backtop",{mounted(e,i){var n;const o=i.value,s=t.shallowRef();if(s.value=document.documentElement,o&&(s.value=null!=(n=document.querySelector(`.${o}`))?n:void 0,!s.value))throw new Error(`target is not existed: ${o}`);Ul=()=>{if(!s.value)return;const e=setInterval((()=>{const t=s.value,i=Math.floor(-t.scrollTop/5);t.scrollTop=t.scrollTop+i,0===t.scrollTop&&clearInterval(e)}),20)},e.addEventListener("click",Ul)},unmounted(e){e.removeEventListener("click",Ul)}})}};const Xl=(e,t,i)=>{document.getElementById("lew-notification")?Yl(e,t,i):((()=>{const e=document.createElement("div");e.setAttribute("id","lew-notification"),document.body.appendChild(e)})(),Xl(e,t,i))},Yl=(e,t,i)=>{const n=document.getElementById("lew-notification"),o=document.createElement("div");o.innerHTML=`\n <div class="main">\n <div class="lew-notification-title">${t}</div>\n ${i?'<div class="lew-notification-content">'+i+"</div>":""} \n </div>\n `,null==n||n.appendChild(o,null==n?void 0:n.childNodes[0]),o.setAttribute("class",`notification notification-${e}`),setTimeout((()=>{o.setAttribute("class",`notification notification-${e} notification-show`),setTimeout((()=>{o.setAttribute("class",`notification notification-${e} notification-hidden`),setTimeout((()=>{null==n||n.removeChild(o)}),250)}),3e3)}),10)};var Kl={name:"LewNotification",warning:({title:e,content:t})=>{Xl("warning",e,t)},info:({title:e,content:t})=>{Xl("info",e,t)},normal:({title:e,content:t})=>{Xl("normal",e,t)},success:({title:e,content:t})=>{Xl("success",e,t)},error:({title:e,content:t})=>{Xl("error",e,t)}},Gl=Object.freeze(Object.defineProperty({__proto__:null,LewMessage:_l,LewDialog:jl,LewVTooltip:Hl,LewVBacktop:ql,LewNotification:Kl},Symbol.toStringTag,{value:"Module"}));const Zl=function(e){if(Zl.installed)return;const t=Object.keys(Tl).map((e=>Tl[e])),i=Object.keys(Gl).map((e=>Gl[e]));t.forEach((t=>{(t.hasOwnProperty("name")||t.hasOwnProperty("__name"))&&t.hasOwnProperty("setup")&&e.component(t.name||t.__name,t)})),i.forEach((t=>{t.hasOwnProperty("install")?e.use(t):t.hasOwnProperty("name")&&(window[t.name]=t,e.config.globalProperties[t.name]=t)}))};var Jl={install:Zl};e.LewAlert=Pi,e.LewAvatar=pi,e.LewBackTop=El,e.LewBadge=vi,e.LewBreadcrumb=E,e.LewButton=fi,e.LewCheckbox=Ye,e.LewCheckboxGroup=Ke,e.LewDate=St,e.LewDatePicker=Qt,e.LewDemoBox=Cl,e.LewDialog=jl,e.LewDrawer=es,e.LewDropdown=$,e.LewFancyImage=ns,e.LewFancybox=Fs,e.LewFlex=n,e.LewFormItem=je,e.LewInput=Oe,e.LewInputPro=Re,e.LewLayout=a,e.LewMark=d,e.LewMessage=_l,e.LewModal=Bi,e.LewNotification=Kl,e.LewPagination=di,e.LewPlyrVideo=fl,e.LewPopok=Fi,e.LewPopover=Go,e.LewRadioboxGroup=tt,e.LewSelect=dt,e.LewSpace=s,e.LewSteps=g,e.LewSwitch=ht,e.LewTable=ni,e.LewTabs=m,e.LewTag=Ti,e.LewTitle=mi,e.LewVBacktop=ql,e.LewVTooltip=Hl,e.default=Jl,Object.defineProperties(e,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})}));
1
+ !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("vue")):"function"==typeof define&&define.amd?define(["exports","vue"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self)["lew-ui"]={},e.Vue)}(this,(function(e,t){"use strict";var i=(e,t)=>{const i=e.__vccOpts||e;for(const[n,o]of t)i[n]=o;return i};var n=i(t.defineComponent({__name:"LewFlex",props:{direction:{type:String,default:"row"},x:{type:String,default:"center"},y:{type:String,default:"center"},wrap:{type:Boolean,default:!1},mode:{type:String,default:""},gap:{type:String,default:"10px"},width:{type:String,default:""}},setup:e=>(i,n)=>(t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass(["lew-flex",`${e.direction?"lew-flex-"+e.direction:""} ${e.wrap?"lew-flex-wrap":""} ${e.x?"lew-flex-x-"+e.x:""} ${e.y?"lew-flex-y-"+e.y:""} ${e.mode?"lew-flex-mode-"+e.mode:""} \n `]),style:t.normalizeStyle(`gap: ${e.gap}; width:${e.width}`)},[t.renderSlot(i.$slots,"default",{},void 0,!0)],6))}),[["__scopeId","data-v-0a8a3e9b"],["__file","C:/Users/10570/Desktop/30secWorkSpace/Lew-UI/packages/components/flex/src/LewFlex.vue"]]);const o={class:"lew-space"};var s=i(t.defineComponent({__name:"LewSpace",props:{direction:{type:String,default:"row"}},setup:e=>(e,i)=>(t.openBlock(),t.createElementBlock("div",o,[t.renderSlot(e.$slots,"default")]))}),[["__file","C:/Users/10570/Desktop/30secWorkSpace/Lew-UI/packages/components/space/src/LewSpace.vue"]]);var a=i(t.defineComponent({__name:"LewLayout",props:{direction:{type:String,default:"row"},x:{type:String,default:"center"},y:{type:String,default:"center"},mode:{type:String,default:""}},setup:e=>(i,n)=>(t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass(["lew-flex",`${e.direction?"lew-flex-"+e.direction:""} ${e.x?"lew-flex-x-"+e.x:""} ${e.y?"lew-flex-y-"+e.y:""} ${e.mode?"lew-flex-mode-"+e.mode:""} `])},[t.renderSlot(i.$slots,"default",{},void 0,!0)],2))}),[["__scopeId","data-v-38cc287d"],["__file","C:/Users/10570/Desktop/30secWorkSpace/Lew-UI/packages/components/layout/src/LewLayout.vue"]]);function r(e){const i=document.createElement("div");i.id=e,document.body.appendChild(i),t.onUnmounted((()=>{document.body.removeChild(i)}))}let l;function c(){return t.onMounted((()=>{l=t.getCurrentInstance()})),{lewTo:e=>{var t;const i=null==(t=l.appContext.config)?void 0:t.globalProperties.$router;e&&(e&&e.startsWith("http")?window.open(e):i.push(e))}}}var d=i(t.defineComponent({__name:"LewMark",props:{type:{type:String,default:"normal"},round:{type:Boolean,default:!1},to:{type:String,default:""},bold:{type:Number,default:400}},setup(e){const{lewTo:i}=c();return(n,o)=>(t.openBlock(),t.createElementBlock("span",{class:t.normalizeClass(["lew-mark",`lew-mark-${e.type} ${e.round?"lew-mark-round":""} ${e.to?"lew-mark-to":""}`]),style:t.normalizeStyle(`font-weight:${e.bold};`),onClick:o[0]||(o[0]=n=>t.unref(i)(e.to))},[t.renderSlot(n.$slots,"default")],6))}}),[["__file","C:/Users/10570/Desktop/30secWorkSpace/Lew-UI/packages/components/mark/src/LewMark.vue"]]);const u={modelValue:{type:String,default:""},options:{type:Array,default:()=>[]},width:{type:String,default:""},itemWidth:{type:String,default:()=>""},round:{type:Boolean,default:!1},type:{type:String,default:"block"}};const h=["onClick"],p=t.defineComponent({__name:"LewTabs",props:u,emits:["change","update:modelValue"],setup(e,{emit:i}){const n=e;let o=t.ref(""),s=t.ref(n.modelValue),a=t.ref([]);t.watch((()=>n.modelValue),(()=>{s.value=n.modelValue,c(s.value)}));const r=()=>{let e=n.options.findIndex((e=>e.value==s.value));e<0&&(e=0),o.value=`width:${a.value[e].offsetWidth}px;transform: translateX(${a.value[e].offsetLeft}px);`};let l=n.options.findIndex((e=>s.value==e.value));const c=e=>{let t=n.options.findIndex((t=>e==t.value));if(l!=t){let e=n.options[t];s.value!=e.value&&(s.value=e.value);let r=a.value[t];o.value=`width:${r.offsetWidth}px;transform: translate(${r.offsetLeft}px);`,s.value!=n.modelValue&&(i("change",{label:e.label,value:e.value,activeIndex:t}),i("update:modelValue",s.value)),l=t}};let d;const u=()=>{clearTimeout(d),d=setTimeout((()=>{r()}),250)};return t.onMounted((()=>{""==n.modelValue&&(s.value=n.options[0].value),r(),window.addEventListener("resize",u,!1)})),t.onUnmounted((()=>{window.removeEventListener("resize",u)})),(e,i)=>(t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass(["lew-tabs",`\n ${e.type?"lew-tabs-"+e.type:""} \n ${e.round?"lew-tabs-round":""}\n `]),style:t.normalizeStyle(`width:${e.width}`)},[t.createElementVNode("div",{style:t.normalizeStyle(t.unref(o)),class:"lew-tabs-item-animation-active"},null,4),(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.options,((i,n)=>(t.openBlock(),t.createElementBlock("div",{key:i.value,ref_for:!0,ref:e=>t.unref(a).push(e),class:t.normalizeClass(["lew-tabs-item",{"lew-tabs-item-active":t.unref(s)==i.value}]),style:t.normalizeStyle(`width:${e.itemWidth}`),onClick:e=>c(i.value)},t.toDisplayString(i.label),15,h)))),128))],6))}});var m=i(p,[["__scopeId","data-v-6111b125"],["__file","C:/Users/10570/Desktop/30secWorkSpace/Lew-UI/packages/components/tabs/src/LewTabs.vue"]]);const f={class:"lew-breadcrumb"};var g=i(t.defineComponent({__name:"LewSteps",props:{},setup:e=>(e,i)=>(t.openBlock(),t.createElementBlock("div",f))}),[["__scopeId","data-v-5e4b1dfe"],["__file","C:/Users/10570/Desktop/30secWorkSpace/Lew-UI/packages/components/steps/src/LewSteps.vue"]]);const y=e=>(t.pushScopeId("data-v-5303b0ef"),e=e(),t.popScopeId(),e),v={class:"lew-breadcrumb"},b=["onClick"],w={key:0,class:"lew-breadcrumb-parting"},k={key:0,viewBox:"0 0 48 48",fill:"none",xmlns:"http://www.w3.org/2000/svg",stroke:"currentColor",class:"arco-icon arco-icon-oblique-line","stroke-width":"4","stroke-linecap":"butt","stroke-linejoin":"miter"},x=[y((()=>t.createElementVNode("path",{d:"M29.506 6.502 18.493 41.498"},null,-1)))],C={key:1,viewBox:"0 0 48 48",fill:"none",xmlns:"http://www.w3.org/2000/svg",stroke:"currentColor",class:"arco-icon arco-icon-right","stroke-width":"4","stroke-linecap":"butt","stroke-linejoin":"miter"},S=[y((()=>t.createElementVNode("path",{d:"m16 39.513 15.556-15.557L16 8.4"},null,-1)))];var E=i(t.defineComponent({__name:"LewBreadcrumb",props:{options:{type:Array,default:()=>[]},iconType:{type:String,default:()=>"sprit"}},setup(e){const{lewTo:i}=c();return(n,o)=>(t.openBlock(),t.createElementBlock("div",v,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.options,((n,o)=>(t.openBlock(),t.createElementBlock("div",{key:o,class:t.normalizeClass(["lew-breadcrumb-item",{"lew-breadcrumb-active":n.active}])},[t.createElementVNode("span",{class:t.normalizeClass({"lew-breadcrumb-isPath":!!n.to}),onClick:e=>t.unref(i)(n.to)},t.toDisplayString(n.label),11,b),o!=e.options.length-1?(t.openBlock(),t.createElementBlock("div",w,["sprit"==e.iconType?(t.openBlock(),t.createElementBlock("svg",k,x)):t.createCommentVNode("v-if",!0),"shoulder"==e.iconType?(t.openBlock(),t.createElementBlock("svg",C,S)):t.createCommentVNode("v-if",!0)])):t.createCommentVNode("v-if",!0)],2)))),128))]))}}),[["__scopeId","data-v-5303b0ef"],["__file","C:/Users/10570/Desktop/30secWorkSpace/Lew-UI/packages/components/breadcrumb/src/LewBreadcrumb.vue"]]);const T=["onClick"],L=t.defineComponent({__name:"LewDropdown",props:{options:{type:Array,default:()=>[],required:!0,validator:e=>e.length>=0},trigger:{type:String,default:"hover"},placement:{type:String,default:"bottom"},arrow:{type:Boolean,default:!0},width:{type:String,default:""},maxHeight:{type:String,default:"300px"},align:{type:String,default:"left"}},emits:["change"],setup(e,{expose:i,emit:n}){const o=e;let s=t.ref(),a=()=>{s.value.show()},r=()=>{s.value.hide()};i({show:a,hide:r});const l=t.computed((()=>Array.isArray(o.options)&&"[object Object]"!=Object.prototype.toString.call(o.options[0])?o.options.map((e=>({label:e,value:e}))):o.options));return(i,o)=>{const c=t.resolveComponent("lew-popover");return t.openBlock(),t.createBlock(c,{ref_key:"lewPopoverRef",ref:s,trigger:e.trigger,arrow:e.arrow,placement:e.placement},{trigger:t.withCtx((()=>[t.renderSlot(i.$slots,"default",{},void 0,!0)])),"popover-body":t.withCtx((()=>[t.unref(l).length>0?(t.openBlock(),t.createElementBlock("div",{key:0,class:"lew-dropdown-body",style:t.normalizeStyle(`width:${e.width};max-height:${e.maxHeight}`)},[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(t.unref(l),((i,o)=>(t.openBlock(),t.createElementBlock("div",{key:o,class:"lew-dropdown-option",style:t.normalizeStyle(`text-align:${e.align}`),onClick:e=>(e=>{n("change",{show:a,hide:r,value:e}),setTimeout((()=>{s.value.hide()}),80)})(i)},t.toDisplayString(i.label),13,T)))),128))],4)):t.createCommentVNode("v-if",!0)])),_:3},8,["trigger","arrow","placement"])}}});var $=i(L,[["__scopeId","data-v-9869e96a"],["__file","C:/Users/10570/Desktop/30secWorkSpace/Lew-UI/packages/components/dropdown/src/LewDropdown.vue"]]);const _={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 512 512"},A=[t.createElementVNode("path",{d:"M414 321.94L274.22 158.82a24 24 0 0 0-36.44 0L98 321.94c-13.34 15.57-2.28 39.62 18.22 39.62h279.6c20.5 0 31.56-24.05 18.18-39.62z",fill:"currentColor"},null,-1)];var N=t.defineComponent({name:"CaretUp",render:function(e,i){return t.openBlock(),t.createElementBlock("svg",_,A)}});const P={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 512 512"},B=[t.createElementVNode("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"48",d:"M328 112L184 256l144 144"},null,-1)];var M=t.defineComponent({name:"ChevronBack",render:function(e,i){return t.openBlock(),t.createElementBlock("svg",P,B)}});const V={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 512 512"},O=[t.createElementVNode("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"48",d:"M328 112L184 256l144 144"},null,-1)];var I=t.defineComponent({name:"ChevronBackOutline",render:function(e,i){return t.openBlock(),t.createElementBlock("svg",V,O)}});const z={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 512 512"},D=[t.createElementVNode("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"48",d:"M112 184l144 144l144-144"},null,-1)];var R=t.defineComponent({name:"ChevronDown",render:function(e,i){return t.openBlock(),t.createElementBlock("svg",z,D)}});const F={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 512 512"},j=[t.createElementVNode("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"48",d:"M184 112l144 144l-144 144"},null,-1)];var W=t.defineComponent({name:"ChevronForward",render:function(e,i){return t.openBlock(),t.createElementBlock("svg",F,j)}});const H={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 512 512"},U=[t.createElementVNode("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"48",d:"M184 112l144 144l-144 144"},null,-1)];var q=t.defineComponent({name:"ChevronForwardOutline",render:function(e,i){return t.openBlock(),t.createElementBlock("svg",H,U)}});const X={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 512 512"},Y=[t.createElementVNode("path",{d:"M448 256c0-106-86-192-192-192S64 150 64 256s86 192 192 192s192-86 192-192z",fill:"none",stroke:"currentColor","stroke-miterlimit":"10","stroke-width":"32"},null,-1),t.createElementVNode("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"32",d:"M320 320L192 192"},null,-1),t.createElementVNode("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"32",d:"M192 320l128-128"},null,-1)];var K=t.defineComponent({name:"CloseCircleOutline",render:function(e,i){return t.openBlock(),t.createElementBlock("svg",X,Y)}});const G={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 512 512"},Z=[t.createElementVNode("circle",{cx:"256",cy:"256",r:"48",fill:"currentColor"},null,-1),t.createElementVNode("circle",{cx:"416",cy:"256",r:"48",fill:"currentColor"},null,-1),t.createElementVNode("circle",{cx:"96",cy:"256",r:"48",fill:"currentColor"},null,-1)];var J=t.defineComponent({name:"EllipsisHorizontal",render:function(e,i){return t.openBlock(),t.createElementBlock("svg",G,Z)}});const Q={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 512 512"},ee=[t.createStaticVNode('<path d="M432 448a15.92 15.92 0 0 1-11.31-4.69l-352-352a16 16 0 0 1 22.62-22.62l352 352A16 16 0 0 1 432 448z" fill="currentColor"></path><path d="M255.66 384c-41.49 0-81.5-12.28-118.92-36.5c-34.07-22-64.74-53.51-88.7-91v-.08c19.94-28.57 41.78-52.73 65.24-72.21a2 2 0 0 0 .14-2.94L93.5 161.38a2 2 0 0 0-2.71-.12c-24.92 21-48.05 46.76-69.08 76.92a31.92 31.92 0 0 0-.64 35.54c26.41 41.33 60.4 76.14 98.28 100.65C162 402 207.9 416 255.66 416a239.13 239.13 0 0 0 75.8-12.58a2 2 0 0 0 .77-3.31l-21.58-21.58a4 4 0 0 0-3.83-1a204.8 204.8 0 0 1-51.16 6.47z" fill="currentColor"></path><path d="M490.84 238.6c-26.46-40.92-60.79-75.68-99.27-100.53C349 110.55 302 96 255.66 96a227.34 227.34 0 0 0-74.89 12.83a2 2 0 0 0-.75 3.31l21.55 21.55a4 4 0 0 0 3.88 1a192.82 192.82 0 0 1 50.21-6.69c40.69 0 80.58 12.43 118.55 37c34.71 22.4 65.74 53.88 89.76 91a.13.13 0 0 1 0 .16a310.72 310.72 0 0 1-64.12 72.73a2 2 0 0 0-.15 2.95l19.9 19.89a2 2 0 0 0 2.7.13a343.49 343.49 0 0 0 68.64-78.48a32.2 32.2 0 0 0-.1-34.78z" fill="currentColor"></path><path d="M256 160a95.88 95.88 0 0 0-21.37 2.4a2 2 0 0 0-1 3.38l112.59 112.56a2 2 0 0 0 3.38-1A96 96 0 0 0 256 160z" fill="currentColor"></path><path d="M165.78 233.66a2 2 0 0 0-3.38 1a96 96 0 0 0 115 115a2 2 0 0 0 1-3.38z" fill="currentColor"></path>',5)];var te=t.defineComponent({name:"EyeOffOutline",render:function(e,i){return t.openBlock(),t.createElementBlock("svg",Q,ee)}});const ie={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 512 512"},ne=[t.createElementVNode("path",{d:"M255.66 112c-77.94 0-157.89 45.11-220.83 135.33a16 16 0 0 0-.27 17.77C82.92 340.8 161.8 400 255.66 400c92.84 0 173.34-59.38 221.79-135.25a16.14 16.14 0 0 0 0-17.47C428.89 172.28 347.8 112 255.66 112z",fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"32"},null,-1),t.createElementVNode("circle",{cx:"256",cy:"256",r:"80",fill:"none",stroke:"currentColor","stroke-miterlimit":"10","stroke-width":"32"},null,-1)];var oe=t.defineComponent({name:"EyeOutline",render:function(e,i){return t.openBlock(),t.createElementBlock("svg",ie,ne)}});const se=/\s*,(?![^(]*\))\s*/g,ae=/\s+/g;function re(e){let t=[""];return e.forEach((e=>{(e=e&&e.trim())&&(t=e.includes("&")?function(e,t){const i=[];return t.split(se).forEach((t=>{let n=function(e){let t=0;for(let i=0;i<e.length;++i)"&"===e[i]&&++t;return t}(t);if(!n)return void e.forEach((e=>{i.push((e&&e+" ")+t)}));if(1===n)return void e.forEach((e=>{i.push(t.replace("&",e))}));let o=[t];for(;n--;){const t=[];o.forEach((i=>{e.forEach((e=>{t.push(i.replace("&",e))}))})),o=t}o.forEach((e=>i.push(e)))})),i}(t,e):function(e,t){const i=[];return t.split(se).forEach((t=>{e.forEach((e=>{i.push((e&&e+" ")+t)}))})),i}(t,e))})),t.join(", ").replace(ae," ")}const le=/[A-Z]/g;function ce(e){return e.replace(le,(e=>"-"+e.toLowerCase()))}function de(e,t,i,n){if(!t)return"";const o=function(e,t,i){return"function"==typeof e?e({context:t.context,props:i}):e}(t,i,n);if(!o)return"";if("string"==typeof o)return`${e} {\n${o}\n}`;const s=Object.keys(o);if(0===s.length)return i.config.keepEmptyBlock?e+" {\n}":"";const a=e?[e+" {"]:[];return s.forEach((e=>{const t=o[e];"raw"!==e?(e=ce(e),null!=t&&a.push(` ${e}${function(e,t=" "){return"object"==typeof e&&null!==e?" {\n"+Object.entries(e).map((e=>t+` ${ce(e[0])}: ${e[1]};`)).join("\n")+"\n"+t+"}":`: ${e};`}(t)}`)):a.push("\n"+t+"\n")})),e&&a.push("}"),a.join("\n")}function ue(e,t,i){e&&e.forEach((e=>{if(Array.isArray(e))ue(e,t,i);else if("function"==typeof e){const n=e(t);Array.isArray(n)?ue(n,t,i):n&&i(n)}else e&&i(e)}))}function he(e,t,i,n,o,s){const a=e.$;a&&"string"!=typeof a?"function"==typeof a?t.push(a({context:n.context,props:o})):(a.before&&a.before(n.context),a.$&&"string"!=typeof a.$?a.$&&t.push(a.$({context:n.context,props:o})):t.push(a.$)):t.push(a);const r=re(t),l=de(r,e.props,n,o);s&&l&&s.insertRule(l),!s&&l.length&&i.push(l),e.children&&ue(e.children,{context:n.context,props:o},(e=>{if("string"==typeof e){const t=de(r,{raw:e},n,o);s?s.insertRule(t):i.push(t)}else he(e,t,i,n,o,s)})),t.pop(),a&&a.after&&a.after(n.context)}function pe(e,t,i,n=!1){const o=[];return he(e,[],o,t,i,n?e.instance.__styleSheet:void 0),n?"":o.join("\n\n")}function me(e){if(!e)return;const t=e.parentElement;t&&t.removeChild(e)}function fe(e){return document.querySelector(`style[cssr-id="${e}"]`)}function ge(e){const t=e.getAttribute("mount-count");return null===t?null:Number(t)}function ye(e,t){e.setAttribute("mount-count",String(t))}function ve(e,t,i,n){const{els:o}=t;if(void 0===i)o.forEach(me),t.els=[];else{const e=fe(i);if(e&&o.includes(e)){const i=ge(e);n?null===i||(i<=1?(me(e),t.els=o.filter((t=>t!==e))):ye(e,i-1)):null!==i||(me(e),t.els=o.filter((t=>t!==e)))}}}function be(e,t,i,n,o,s,a,r,l){if(a&&!l){if(void 0===i)return;const o=window.__cssrContext;return void(o[i]||(o[i]=!0,pe(t,e,n,a)))}let c;const{els:d}=t;let u;if(void 0===i&&(u=t.render(n),i=function(e){for(var t,i=0,n=0,o=e.length;o>=4;++n,o-=4)t=1540483477*(65535&(t=255&e.charCodeAt(n)|(255&e.charCodeAt(++n))<<8|(255&e.charCodeAt(++n))<<16|(255&e.charCodeAt(++n))<<24))+(59797*(t>>>16)<<16),i=1540483477*(65535&(t^=t>>>24))+(59797*(t>>>16)<<16)^1540483477*(65535&i)+(59797*(i>>>16)<<16);switch(o){case 3:i^=(255&e.charCodeAt(n+2))<<16;case 2:i^=(255&e.charCodeAt(n+1))<<8;case 1:i=1540483477*(65535&(i^=255&e.charCodeAt(n)))+(59797*(i>>>16)<<16)}return(((i=1540483477*(65535&(i^=i>>>13))+(59797*(i>>>16)<<16))^i>>>15)>>>0).toString(36)}(u)),l)return void l(i,null!=u?u:t.render(n));const h=fe(i);if(r||null===h){if(c=null===h?function(e){const t=document.createElement("style");return t.setAttribute("cssr-id",e),t}(i):h,void 0===u&&(u=t.render(n)),c.textContent=u,null!==h)return;if(o){const e=document.head.getElementsByTagName("style")[0]||null;document.head.insertBefore(c,e)}else document.head.appendChild(c);s&&ye(c,1),function(e,t){e.push(t)}(d,c)}else{const e=ge(h);s&&(null===e||ye(h,e+1))}return null!=h?h:c}function we(e){return pe(this,this.instance,e)}function ke(e={}){const{target:t,id:i,ssr:n,props:o,count:s=!1,head:a=!1,boost:r=!1,force:l=!1}=e;return be(this.instance,this,null!=i?i:t,o,a,s,r,l,n)}function xe(e={}){const{id:t,target:i,delay:n=0,count:o=!1}=e;0===n?ve(this.instance,this,null!=t?t:i,o):setTimeout((()=>ve(this.instance,this,null!=t?t:i,o)),n)}window&&(window.__cssrContext={});const Ce=function(e,t,i,n){return{instance:e,$:t,props:i,children:n,els:[],render:we,mount:ke,unmount:xe}};const{c:Se}=function(e={}){let t=null;const i={c:(...e)=>function(e,t,i,n){return Array.isArray(t)?Ce(e,{$:null},null,t):Array.isArray(i)?Ce(e,t,null,i):Array.isArray(n)?Ce(e,t,i,n):Ce(e,t,i,null)}(i,...e),use:(e,...t)=>e.install(i,...t),find:fe,context:{},config:e,get __styleSheet(){if(!t){const e=document.createElement("style");return document.head.appendChild(e),t=document.styleSheets[document.styleSheets.length-1],t}return t}};return i}(),Ee=Se(".xicon",{width:"1em",height:"1em",display:"inline-flex"},[Se("svg",{width:"1em",height:"1em"}),Se("svg:not([fill])",{fill:"currentColor"})]),Te={size:[String,Number],color:String,tag:String},Le=Symbol("IconConfigInjection");t.defineComponent({name:"IconConfigProvider",props:Te,setup:(e,{slots:i})=>(t.provide(Le,e),()=>t.renderSlot(i,"default"))});const $e=t.defineComponent({name:"Icon",props:Te,setup(e,{slots:i}){const n=t.inject(Le,null),o=t.computed((()=>{var t;const i=null!==(t=e.size)&&void 0!==t?t:null==n?void 0:n.size;if(void 0!==i)return"number"==typeof i||/^\d+$/.test(i)?`${i}px`:i})),s=t.computed((()=>{const{color:t}=e;return void 0===t?n?n.color:void 0:t})),a=t.computed((()=>{var t;const{tag:i}=e;return void 0===i?null!==(t=null==n?void 0:n.tag)&&void 0!==t?t:"span":i}));return t.onBeforeMount((()=>{Ee.mount({id:"xicons-icon"})})),()=>t.h(a.value,{class:"xicon",style:{color:s.value,fontSize:o.value}},[t.renderSlot(i,"default")])}}),_e={type:{type:String,default:""},modelValue:{type:[Number,String],default:""},size:{type:String,default:"medium"},align:{type:String,default:"left"},disabled:{type:Boolean,default:!1},clearable:{type:Boolean,default:!1},placeholder:{type:String,default:"请输入"},readonly:{type:Boolean,default:!1},showPassword:{type:Boolean,default:!1},resize:{type:String,default:"none"},autoWidth:{type:Boolean,default:!1},maxLength:{type:Number,default:null},showCount:{type:Boolean,default:!1},niceCount:{type:Boolean,default:!1}};const Ae=["disabled","readonly","placeholder"],Ne=["disabled","placeholder","type","readonly"],Pe={key:2,class:"input-auto-width"},Be={key:0,class:"lew-input-show-count"},Me={key:1,class:"lew-input-show-password"},Ve={key:2,class:"lew-input-clear"};var Oe=i(t.defineComponent({__name:"LewInput",props:_e,emits:["update:modelValue","clear","blur","focus","change","input"],setup(e,{emit:i}){const n=e,o=t.ref(n.modelValue);t.watch((()=>n.modelValue),(()=>{o.value=n.modelValue}));const s=()=>{if(n.maxLength)for(let e=0;e<=o.value.length-1;e++)d(o.value.slice(0,e))>=n.maxLength&&(o.value=o.value.slice(0,e));i("update:modelValue",o.value),i("input",o.value)},a=()=>{i("clear",o.value),o.value="",i("update:modelValue",o.value)};let r=t.ref(n.type);const l=()=>{"text"==r.value?r.value="password":r.value="text"};let c=t.computed((()=>n.showCount&&n.maxLength?d(o.value)+" / "+n.maxLength:!!n.showCount&&d(o.value)));const d=e=>{if(n.niceCount){let t=0;for(let i=0;i<=e.length-1;i++){let n=e.charCodeAt(i);t+=n>=0&&n<=128?.5:1}return Math.trunc(t)}return e.length};return(e,n)=>(t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass(["lew-input-view",`\n lew-input-view-${e.size} \n ${"textarea"==t.unref(r)?"lew-input-view-textarea":""}\n ${e.readonly?"lew-input-view-readonly":""} \n ${e.disabled?"lew-input-view-disabled":""}\n ${e.align?"lew-input-view-align-"+e.align:""}\n ${e.autoWidth?"lew-input-view-auto-width":""}\n `])},["textarea"==t.unref(r)?t.withDirectives((t.openBlock(),t.createElementBlock("textarea",{key:0,"onUpdate:modelValue":n[0]||(n[0]=e=>o.value=e),class:t.normalizeClass(["btf-scrollbar",`lew-textarea-resize-${e.resize}`]),rows:"3",cols:"3",disabled:e.disabled,readonly:e.readonly,placeholder:e.placeholder,onInput:s,onChange:n[1]||(n[1]=e=>i("change",o.value)),onBlur:n[2]||(n[2]=e=>i("blur",o.value)),onFocus:n[3]||(n[3]=e=>i("focus",o.value))},null,42,Ae)),[[t.vModelText,o.value]]):t.withDirectives((t.openBlock(),t.createElementBlock("input",{key:1,"onUpdate:modelValue":n[4]||(n[4]=e=>o.value=e),disabled:e.disabled,placeholder:e.placeholder,type:t.unref(r),readonly:e.readonly,onkeypress:"if(window.event.keyCode==13) this.blur()",onInput:s,onChange:n[5]||(n[5]=e=>i("change",o.value)),onBlur:n[6]||(n[6]=e=>i("blur",o.value)),onFocus:n[7]||(n[7]=e=>i("focus",o.value))},null,40,Ne)),[[t.vModelDynamic,o.value]]),e.autoWidth?(t.openBlock(),t.createElementBlock("label",Pe,t.toDisplayString(o.value),1)):t.createCommentVNode("v-if",!0),e.showPassword||e.clearable||e.showCount?(t.openBlock(),t.createElementBlock("div",{key:3,class:t.normalizeClass(["lew-input-controls",{"lew-input-controls-show":o.value&&e.showPassword||o.value&&e.clearable||e.showCount&&!e.clearable&&!e.showPassword||e.showCount&&e.maxLength}])},[t.unref(c)?(t.openBlock(),t.createElementBlock("div",Be,t.toDisplayString(t.unref(c)),1)):t.createCommentVNode("v-if",!0),e.showPassword?(t.openBlock(),t.createElementBlock("div",Me,[t.createVNode(t.unref($e),{class:"eye-icon-view",size:"18",onMousedown:n[8]||(n[8]=t.withModifiers((()=>{}),["prevent"])),onClick:l},{default:t.withCtx((()=>[t.withDirectives(t.createVNode(t.unref(oe),null,null,512),[[t.vShow,"text"==t.unref(r)]]),t.withDirectives(t.createVNode(t.unref(te),null,null,512),[[t.vShow,"password"==t.unref(r)]])])),_:1})])):t.createCommentVNode("v-if",!0),e.clearable?(t.openBlock(),t.createElementBlock("div",Ve,[t.createVNode(t.unref($e),{class:"close-icon-view",size:"18",onMousedown:n[9]||(n[9]=t.withModifiers((()=>{}),["prevent"])),onClick:a},{default:t.withCtx((()=>[t.createVNode(t.unref(K))])),_:1})])):t.createCommentVNode("v-if",!0)],2)):t.createCommentVNode("v-if",!0)],2))}}),[["__scopeId","data-v-156ce1e1"],["__file","C:/Users/10570/Desktop/30secWorkSpace/Lew-UI/packages/components/input/src/LewInput.vue"]]);const Ie={type:{type:String,default:""},modelValue:{type:[Number,String],default:""},autoWidth:{type:Boolean,default:!1},options:{type:Array,default:()=>[]},align:{type:String,default:"left"},disabled:{type:Boolean,default:!1},clearable:{type:Boolean,default:!1},placeholder:{type:String,default:"请输入"},readonly:{type:Boolean,default:!1},showPassword:{type:Boolean,default:!1},maxLength:{type:Number,default:null},showCount:{type:Boolean,default:!1},niceCount:{type:Boolean,default:!1},size:{type:String,default:"medium"},popoverWidth:{type:String,default:"auto"},trigger:{type:String,default:"click"},placement:{type:String,default:"bottom-start"},arrow:{type:Boolean,default:!0}};const ze={class:"lew-input-pro"},De=t.defineComponent({__name:"LewInputPro",props:Ie,emits:["update:modelValue","clear","blur","focus","change","input"],setup(e,{emit:i}){const n=e,o=t.ref(n.modelValue);t.watch((()=>n.modelValue),(()=>{o.value=n.modelValue}));let s=t.ref(),a=t.ref();const r=e=>{i("update:modelValue",e),i("input",e)},l=()=>{i("clear",o.value),o.value="",i("update:modelValue",o.value)},c=e=>{o.value=e.value.value,i("update:modelValue",o.value),i("input",o.value),i("change",o.value),setTimeout((()=>{d()}),120)},d=()=>{s.value.hide()};return(e,u)=>{const h=t.resolveComponent("lew-input"),p=t.resolveComponent("lew-dropdown");return t.openBlock(),t.createElementBlock("div",ze,[t.renderSlot(e.$slots,"left",{},void 0,!0),t.createVNode(p,{ref_key:"lewDropdownRef",ref:s,style:{width:"100%"},trigger:e.trigger,arrow:e.arrow,placement:e.placement,align:e.align,width:parseFloat(e.popoverWidth)-12+"px",options:e.options,onChange:c},{default:t.withCtx((()=>[t.createVNode(h,{ref_key:"lewInputProRef",ref:a,modelValue:o.value,"onUpdate:modelValue":u[0]||(u[0]=e=>o.value=e),type:e.type,autoWidth:e.autoWidth,size:e.size,align:e.align,placeholder:e.placeholder,clearable:e.clearable,onClick:u[1]||(u[1]=t.withModifiers((()=>{}),["stop"])),onInput:r,onChange:u[2]||(u[2]=e=>i("change",o.value)),onBlur:u[3]||(u[3]=e=>(i("blur",o.value),void setTimeout((()=>{d()}),120))),onFocus:u[4]||(u[4]=e=>(0!=n.options.length&&s.value.show(),i("focus",o.value))),onClear:l},null,8,["modelValue","type","autoWidth","size","align","placeholder","clearable"])])),_:1},8,["trigger","arrow","placement","align","width","options"]),t.renderSlot(e.$slots,"right",{},void 0,!0)])}}});var Re=i(De,[["__scopeId","data-v-1e1e8f9c"],["__file","C:/Users/10570/Desktop/30secWorkSpace/Lew-UI/packages/components/input-pro/src/LewInputPro.vue"]]);const Fe={class:"title-label"};var je=i(t.defineComponent({__name:"LewFormItem",props:{title:{type:String,default:"标题"},direction:{type:String,default:"x"}},setup(e){const i=e;return(n,o)=>(t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass(["lew-form-item",`lew-form-item-${e.direction}`])},[t.createElementVNode("label",Fe,t.toDisplayString(i.title),1),t.renderSlot(n.$slots,"default",{},void 0,!0)],2))}}),[["__scopeId","data-v-441b5c62"],["__file","C:/Users/10570/Desktop/30secWorkSpace/Lew-UI/packages/components/form-item/src/LewFormItem.vue"]]);const We={key:0,class:"icon-checkbox-box"},He=[(e=>(t.pushScopeId("data-v-5594c4af"),e=e(),t.popScopeId(),e))((()=>t.createElementVNode("svg",{class:"icon-checkbox",viewBox:"0 0 24 24",width:"24",height:"24",stroke:"currentColor","stroke-width":"4",fill:"none","stroke-linecap":"round","stroke-linejoin":"round"},[t.createElementVNode("polyline",{points:"20 6 9 17 4 12"})],-1)))],Ue=["checked"],qe={key:1,class:"lew-checkbox-label"},Xe=t.defineComponent({__name:"LewCheckbox",props:{label:{type:String,default:()=>""},block:{type:Boolean,default:()=>!1},round:{type:Boolean,default:()=>!1},iconable:{type:Boolean,default:!0},checked:{type:Boolean,default:()=>!1}},emits:["change"],setup(e,{emit:i}){const n=e;t.watch((()=>n.checked),(e=>{e!=o.value&&(o.value=e)}));let o=t.ref(n.checked||!1);const s=e=>{o.value=e.target.checked,i("change",o.value)};return(i,n)=>(t.openBlock(),t.createElementBlock("label",{class:t.normalizeClass(["lew-checkbox",`${e.block?"lew-checkbox-block":""} ${e.round?"lew-checkbox-round":""} ${t.unref(o)?"lew-checkbox-checked":""} \n ${e.iconable?"":"lew-checkbox-unicon"}\n `])},[e.iconable?(t.openBlock(),t.createElementBlock("div",We,He)):t.createCommentVNode("v-if",!0),t.withDirectives(t.createElementVNode("input",{type:"checkbox",checked:t.unref(o),onInput:s},null,40,Ue),[[t.vShow,!1]]),e.label?(t.openBlock(),t.createElementBlock("span",qe,t.toDisplayString(e.label),1)):t.createCommentVNode("v-if",!0)],2))}});var Ye=i(Xe,[["__scopeId","data-v-5594c4af"],["__file","C:/Users/10570/Desktop/30secWorkSpace/Lew-UI/packages/components/checkbox/src/LewCheckbox.vue"]]);var Ke=i(t.defineComponent({__name:"LewCheckboxGroup",props:{modelValue:{type:Array,default:()=>[],required:!0},block:{type:Boolean,default:()=>!1},round:{type:Boolean,default:()=>!1},direction:{type:String,default:"x"},iconable:{type:Boolean,default:!0},options:{type:Array,default:()=>[],required:!0,validator:e=>{const t=e.every((e=>Object.keys(e).includes("label"))),i=e.every((e=>Object.keys(e).includes("value")));return t&&i}}},emits:["update:modelValue"],setup(e,{emit:i}){const n=e;return(o,s)=>{const a=t.resolveComponent("lew-flex");return t.openBlock(),t.createBlock(a,{x:"start",gap:"15px",class:t.normalizeClass(["lew-checkbox-group",`lew-checkbox-group-${e.direction}`])},{default:t.withCtx((()=>[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.options,(o=>{return t.openBlock(),t.createBlock(Ye,{key:o.value,block:e.block,iconable:e.iconable,round:e.round,label:o.label,checked:(s=o.value,n.modelValue.includes(s)),onChange:e=>((e,t)=>{let o=[...n.modelValue];t?o.push(e):o.splice(o.indexOf(e),1),i("update:modelValue",o)})(o.value,e)},null,8,["block","iconable","round","label","checked","onChange"]);var s})),128))])),_:1},8,["class"])}}}),[["__scopeId","data-v-66b915c0"],["__file","C:/Users/10570/Desktop/30secWorkSpace/Lew-UI/packages/components/checkbox/src/LewCheckboxGroup.vue"]]);const Ge={key:0,class:"icon-radio-box"},Ze=[(e=>(t.pushScopeId("data-v-365d2981"),e=e(),t.popScopeId(),e))((()=>t.createElementVNode("div",{class:"icon-radio"},null,-1)))],Je=["checked"],Qe={key:1,class:"lew-radio-label"};var et=i(t.defineComponent({__name:"LewRadio",props:{label:{type:String,required:!0},block:{type:Boolean,default:()=>!1},iconable:{type:Boolean,default:!0},checked:{type:Boolean}},emits:["update:checked"],setup(e,{emit:i}){const n=()=>{i("update:checked")};return(i,o)=>(t.openBlock(),t.createElementBlock("label",{class:t.normalizeClass(["lew-radio",`\n ${e.block?"lew-radio-block":""} \n ${e.checked?"lew-radio-checked":""} \n ${e.iconable?"":"lew-radio-unicon"}`])},[e.iconable?(t.openBlock(),t.createElementBlock("div",Ge,Ze)):t.createCommentVNode("v-if",!0),t.withDirectives(t.createElementVNode("input",{type:"radio",checked:e.checked,onInput:n},null,40,Je),[[t.vShow,!1]]),e.label?(t.openBlock(),t.createElementBlock("span",Qe,t.toDisplayString(e.label),1)):t.createCommentVNode("v-if",!0)],2))}}),[["__scopeId","data-v-365d2981"],["__file","C:/Users/10570/Desktop/30secWorkSpace/Lew-UI/packages/components/radio/src/LewRadio.vue"]]);var tt=i(t.defineComponent({__name:"LewRadioboxGroup",props:{modelValue:{type:String,default:()=>"",required:!0},block:{type:Boolean,default:()=>!1},iconable:{type:Boolean,default:!0},direction:{type:String,default:"x"},options:{type:Array,default:()=>[],required:!0,validator:e=>{const t=e.every((e=>Object.keys(e).includes("label"))),i=e.every((e=>Object.keys(e).includes("value")));return t&&i}}},emits:["update:modelValue"],setup:(e,{emit:i})=>(n,o)=>{const s=t.resolveComponent("lew-flex");return t.openBlock(),t.createBlock(s,{x:"start",gap:"15px",class:t.normalizeClass(["lew-radio-group",`lew-radio-group-${e.direction}`])},{default:t.withCtx((()=>[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.options,(n=>(t.openBlock(),t.createBlock(et,{key:n.value,block:e.block,iconable:e.iconable,label:n.label,checked:e.modelValue==n.value,"onUpdate:checked":e=>{return t=n.value,void i("update:modelValue",t);var t}},null,8,["block","iconable","label","checked","onUpdate:checked"])))),128))])),_:1},8,["class"])}}),[["__scopeId","data-v-304dc5f5"],["__file","C:/Users/10570/Desktop/30secWorkSpace/Lew-UI/packages/components/radio/src/LewRadioboxGroup.vue"]]);const it={modelValue:{type:[String,Array],required:!0},options:{type:Array,default:()=>[],required:!0,validator:e=>e.length>0},placement:{type:String,default:"bottom-start"},trigger:{type:String,default:"click",validator:e=>["click","hover"].includes(e)},multiple:{type:Boolean,default:!1},size:{type:String,default:"medium"}};const nt={key:0,class:"lew-select-placeholder"},ot={class:"lew-select-label-multiple"},st={style:{"margin-left":"5px"},class:"lew-isSelect-label-num"},at={class:"options-box"},rt=["onClick"],lt={class:"lew-selcet-label"},ct=t.defineComponent({__name:"LewSelect",props:it,emits:["update:modelValue","change"],setup(e,{expose:i,emit:n}){const o=e,s=t.ref(""),a=t.ref([]),r=t.ref(""),l=t.ref([]);t.watch((()=>o.modelValue),(()=>{o.multiple?(a.value=o.modelValue,l.value=d(o.modelValue,o.options)):(s.value=o.modelValue,r.value=d([o.modelValue],o.options)[0]||"")}),{deep:!0});let c=t.ref();t.onMounted((()=>{o.multiple?l.value=d(o.modelValue,o.options):r.value=d([o.modelValue],o.options)[0]||""}));const d=(e,t)=>{let i=[];return e&&t&&e.map((e=>{t.map((t=>{e==t.value&&i.push(t.label)}))})),i};let u=t.ref(!1),h=t.ref(),p=t.ref();const m=e=>{a.value.splice(e,1),l.value.splice(e,1),n("update:modelValue",a.value),n("change",{value:a.value,show:g,hide:y}),0==e&&0==a.value.length&&p.value.hide()},f=t.computed((()=>{var e;return(null==(e=c.value)?void 0:e.offsetWidth)-12+"px"})),g=()=>{h.value.show()},y=()=>{h.value.hide()};return i({show:g,hide:y}),(e,i)=>{const d=t.resolveComponent("lew-tag"),g=t.resolveComponent("lew-flex");return t.openBlock(),t.createBlock(t.unref(Go),{ref_key:"lewPopverRef1",ref:h,class:t.normalizeClass(["lew-select-view",{"lew-select-foucs":t.unref(u)}]),trigger:e.trigger,placement:e.placement,arrow:!1,style:{width:"100%"},onOnShow:i[1]||(i[1]=e=>t.isRef(u)?u.value=!0:u=!0),onOnHide:i[2]||(i[2]=e=>t.isRef(u)?u.value=!1:u=!1)},{trigger:t.withCtx((()=>[t.createElementVNode("div",{ref_key:"lewSelectRef",ref:c,class:t.normalizeClass(["lew-select",`lew-select-${e.size}`])},[t.createVNode(t.unref($e),{size:"16px",class:"lew-select-icon"},{default:t.withCtx((()=>[t.createVNode(t.unref(R))])),_:1}),!e.multiple&&0==r.value.length||e.multiple&&0==l.value.length?(t.openBlock(),t.createElementBlock("div",nt," 请选择 ")):t.createCommentVNode("v-if",!0),t.createCommentVNode(" 单选 "),t.withDirectives(t.createElementVNode("div",{class:"lew-select-label-single"},t.toDisplayString(r.value),513),[[t.vShow,!e.multiple]]),t.createCommentVNode(" 多选 "),t.withDirectives(t.createElementVNode("div",ot,[t.withDirectives(t.createVNode(d,{type:"primary",size:e.size,closable:"",onClose:i[0]||(i[0]=e=>m(0))},{default:t.withCtx((()=>[t.createTextVNode(t.toDisplayString(l.value[0]),1)])),_:1},8,["size"]),[[t.vShow,l.value.length>0]]),t.withDirectives(t.createVNode(t.unref(Go),{ref_key:"lewPopverRef2",ref:p,trigger:"hover",placement:"top"},{trigger:t.withCtx((()=>[t.createElementVNode("div",st,[t.withDirectives(t.createVNode(d,{size:e.size,type:"primary"},{default:t.withCtx((()=>[t.createTextVNode(" +"+t.toDisplayString(l.value.length-1),1)])),_:1},8,["size"]),[[t.vShow,l.value.length>1]])])])),"popover-body":t.withCtx((()=>[t.createVNode(g,{wrap:"",gap:"5px",x:"start",class:"lew-isSelect-label-box"},{default:t.withCtx((()=>[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(l.value,((i,n)=>(t.openBlock(),t.createBlock(d,{key:`multipleLabelStr${n}`,type:"primary",closable:"",size:e.size,onClose:e=>m(n)},{default:t.withCtx((()=>[t.createTextVNode(t.toDisplayString(i),1)])),_:2},1032,["size","onClose"])))),128))])),_:1})])),_:1},512),[[t.vShow,l.value.length>1]])],512),[[t.vShow,e.multiple]])],2)])),"popover-body":t.withCtx((()=>[t.createElementVNode("div",{class:t.normalizeClass(["lew-select-body",{"lew-select-multiple-body":e.multiple}]),style:t.normalizeStyle(`width:${t.unref(f)}`)},[t.createElementVNode("div",at,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.options,(i=>(t.openBlock(),t.createElementBlock("div",{key:i.value,class:t.normalizeClass(["item",{"lew-select-checked":e.multiple?a.value.includes(i.value):s.value==i.value}]),onClick:e=>(e=>{if(o.multiple){let t=a.value.indexOf(e.value);t>=0?(l.value.splice(t,1),a.value.splice(t,1)):(l.value.push(e.label),a.value.push(e.value)),n("update:modelValue",a.value),n("change",a.value)}else s.value==e.value?(r.value="",s.value=""):(r.value=e.label,s.value=e.value),setTimeout((()=>{y()}),150),n("update:modelValue",s.value),n("change",s.value)})(i)},[e.multiple?(t.openBlock(),t.createBlock(t.unref(Ye),{key:0,class:"lew-selcet-checkbox",label:"",checked:a.value.includes(i.value)},null,8,["checked"])):t.createCommentVNode("v-if",!0),t.createElementVNode("div",lt,t.toDisplayString(i.label),1)],10,rt)))),128))])],6)])),_:1},8,["class","trigger","placement"])}}});var dt=i(ct,[["__scopeId","data-v-326752a1"],["__file","C:/Users/10570/Desktop/30secWorkSpace/Lew-UI/packages/components/select/src/LewSelect.vue"]]);const ut=["disabled"];var ht=i(t.defineComponent({__name:"LewSwitch",props:{modelValue:{type:Boolean,default:()=>!1},round:{type:Boolean,default:!0},disabled:{type:Boolean,default:!1}},emits:["update:modelValue"],setup(e,{emit:i}){const n=e,o=t.ref(n.modelValue);t.watch((()=>n.modelValue),(()=>{o.value=n.modelValue}));const s=()=>{i("update:modelValue",o.value)};return(i,a)=>t.withDirectives((t.openBlock(),t.createElementBlock("input",{"onUpdate:modelValue":a[0]||(a[0]=e=>o.value=e),class:t.normalizeClass({round:e.round}),type:"checkbox",disabled:n.disabled,onChange:s},null,42,ut)),[[t.vModelCheckbox,o.value]])}}),[["__scopeId","data-v-3d4d5d11"],["__file","C:/Users/10570/Desktop/30secWorkSpace/Lew-UI/packages/components/switch/src/LewSwitch.vue"]]);const pt=["一","二","三","四","五","六","日"],mt=(e,t)=>{const i=[];if(!e&&!t){const i=new Date;e=i.getFullYear(),t=i.getMonth()+1}const n=new Date(e,t-1,1);let o=n.getDay();0===o&&(o=7),e=n.getFullYear(),t=n.getMonth()+1;const s=new Date(e,t-1,0).getDate(),a=o-1,r=new Date(e,t,0).getDate();for(let l=0;l<42;l++){const e=l+1-a;let n=e,o=t;e<=0?(o=t-1,n=s+e):e>r&&(o=t+1,n-=r),13===o&&(o=1),0===o&&(o=12),i.push({date:e,month:o,showDate:n})}return i},ft={modelValue:{type:String,required:!0},multiple:{type:Boolean,default:!1},autoClose:{type:Boolean,default:!1}},gt={modelValue:{type:String,required:!0},multiple:{type:Boolean,default:!1}};const yt={class:"lew-date"},vt={class:"cur-date"},bt={class:"lew-date-control-right"},wt={class:"lew-date-box"},kt={class:"lew-date-num"},xt=["onClick"],Ct={class:"lew-date-num"};var St=i(t.defineComponent({__name:"LewDate",props:gt,emits:["change","update:modelValue"],setup(e,{emit:i}){var n;const o=e;let s=t.ref(o.modelValue),a=null==(n=s.value)?void 0:n.split("-"),r=new Date,l=t.ref(r.getFullYear()),c=t.ref(r.getMonth()+1),d=t.ref(r.getDate()),u=t.ref(parseInt(a[0])||r.getFullYear()),h=t.ref(parseInt(a[1])||r.getMonth()+1),p=t.ref(mt());const m=()=>{h.value>1?h.value-=1:(u.value-=1,h.value=12),p.value=mt(u.value,h.value)},f=()=>{h.value<12?h.value+=1:(u.value+=1,h.value=1),p.value=mt(u.value,h.value)},g=e=>e<10?"0"+e:e,y=t.computed((()=>e=>{if(e.date>0&&e.date<=e.showDate){let t=`${u.value}-${g(h.value)}-${g(e.showDate)}`;return s.value==t}}));return(e,n)=>{const o=t.resolveComponent("lew-button"),a=t.resolveComponent("lew-flex");return t.openBlock(),t.createElementBlock("div",yt,[t.createVNode(a,{x:"start",mode:"between",class:"lew-date-control"},{default:t.withCtx((()=>[t.createElementVNode("div",vt,t.toDisplayString(t.unref(u))+" / "+t.toDisplayString(g(t.unref(h))),1),t.createElementVNode("div",bt,[t.createVNode(o,{type:"normal",size:"small",onClick:m},{default:t.withCtx((()=>[t.createVNode(t.unref(M))])),_:1}),t.createVNode(o,{type:"normal",size:"small",onClick:f},{default:t.withCtx((()=>[t.createVNode(t.unref(W))])),_:1})])])),_:1}),t.createElementVNode("div",wt,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(t.unref(pt),((e,i)=>(t.openBlock(),t.createElementBlock("div",{key:`h${i}`,class:"lew-date-item"},[t.createElementVNode("div",kt,t.toDisplayString(e),1)])))),128)),(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(t.unref(p),((e,n)=>(t.openBlock(),t.createElementBlock("div",{key:`d${n}`,class:t.normalizeClass(["lew-date-item",{"lew-date-item-e":e.date>0&&e.date<=e.showDate,"lew-date-item-cur":t.unref(d)==e.showDate&&t.unref(l)==t.unref(u)&&t.unref(c)==t.unref(h),"lew-date-item-select":t.unref(y)(e)}]),onClick:t=>(e=>{let t={year:u.value,month:h.value,day:e.showDate,value:`${u.value}-${g(h.value)}-${g(e.showDate)}`};s.value=t.value,i("update:modelValue",s.value),i("change",t)})(e)},[t.createElementVNode("div",Ct,t.toDisplayString(e.showDate),1)],10,xt)))),128))])])}}}),[["__scopeId","data-v-29f4866a"],["__file","C:/Users/10570/Desktop/30secWorkSpace/Lew-UI/packages/components/date-picker/src/LewDate.vue"]]);const Et={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 24 24"},Tt=[t.createElementVNode("g",{fill:"none"},[t.createElementVNode("path",{d:"M12 1.996a7.49 7.49 0 0 1 7.496 7.25l.004.25v4.097l1.38 3.156a1.249 1.249 0 0 1-1.145 1.75L15 18.502a3 3 0 0 1-5.995.177L9 18.499H4.275a1.251 1.251 0 0 1-1.147-1.747L4.5 13.594V9.496c0-4.155 3.352-7.5 7.5-7.5zM13.5 18.5l-3 .002a1.5 1.5 0 0 0 2.993.145l.007-.147zM12 3.496c-3.32 0-6 2.674-6 6v4.41L4.656 17h14.697L18 13.907V9.509l-.003-.225A5.988 5.988 0 0 0 12 3.496z",fill:"currentColor"})],-1)];var Lt=t.defineComponent({name:"Alert24Regular",render:function(e,i){return t.openBlock(),t.createElementBlock("svg",Et,Tt)}});const $t={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 12 12"},_t=[t.createElementVNode("g",{fill:"none"},[t.createElementVNode("path",{d:"M3 5.5a.5.5 0 1 1 1 0a.5.5 0 0 1-1 0zM3.5 7a.5.5 0 1 0 0 1a.5.5 0 0 0 0-1zM5 5.5a.5.5 0 1 1 1 0a.5.5 0 0 1-1 0zM5.5 7a.5.5 0 1 0 0 1a.5.5 0 0 0 0-1zM7 5.5a.5.5 0 1 1 1 0a.5.5 0 0 1-1 0zm-6-2A2.5 2.5 0 0 1 3.5 1h5A2.5 2.5 0 0 1 11 3.5v5A2.5 2.5 0 0 1 8.5 11h-5A2.5 2.5 0 0 1 1 8.5v-5zM3.5 2a1.5 1.5 0 0 0-1.415 1h7.83A1.5 1.5 0 0 0 8.5 2h-5zM10 4H2v4.5A1.5 1.5 0 0 0 3.5 10h5A1.5 1.5 0 0 0 10 8.5V4z",fill:"currentColor"})],-1)];var At=t.defineComponent({name:"CalendarLtr12Regular",render:function(e,i){return t.openBlock(),t.createElementBlock("svg",$t,_t)}});const Nt={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 24 24"},Pt=[t.createElementVNode("g",{fill:"none"},[t.createElementVNode("path",{d:"M12 2c5.523 0 10 4.477 10 10s-4.477 10-10 10S2 17.523 2 12S6.477 2 12 2zm0 1.5a8.5 8.5 0 1 0 0 17a8.5 8.5 0 0 0 0-17zm-1.25 9.94l4.47-4.47a.75.75 0 0 1 1.133.976l-.073.084l-5 5a.75.75 0 0 1-.976.073l-.084-.073l-2.5-2.5a.75.75 0 0 1 .976-1.133l.084.073l1.97 1.97l4.47-4.47l-4.47 4.47z",fill:"currentColor"})],-1)];var Bt=t.defineComponent({name:"CheckmarkCircle24Regular",render:function(e,i){return t.openBlock(),t.createElementBlock("svg",Nt,Pt)}});const Mt={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 24 24"},Vt=[t.createElementVNode("g",{fill:"none"},[t.createElementVNode("path",{d:"M4.22 15.53a.75.75 0 0 0 1.06 0L12 8.81l6.72 6.72a.75.75 0 1 0 1.06-1.06l-7.25-7.25a.75.75 0 0 0-1.06 0l-7.25 7.25a.75.75 0 0 0 0 1.06z",fill:"currentColor"})],-1)];var Ot=t.defineComponent({name:"ChevronUp24Regular",render:function(e,i){return t.openBlock(),t.createElementBlock("svg",Mt,Vt)}});const It={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 24 24"},zt=[t.createElementVNode("g",{fill:"none"},[t.createElementVNode("path",{d:"M8.066 18.943l6.5-14.5a.75.75 0 0 1 1.404.518l-.036.096l-6.5 14.5a.75.75 0 0 1-1.404-.518l.036-.096l6.5-14.5l-6.5 14.5zM2.22 11.47l4.25-4.25a.75.75 0 0 1 1.133.976l-.073.085L3.81 12l3.72 3.719a.75.75 0 0 1-.976 1.133l-.084-.073l-4.25-4.25a.75.75 0 0 1-.073-.976l.073-.084l4.25-4.25l-4.25 4.25zm14.25-4.25a.75.75 0 0 1 .976-.073l.084.073l4.25 4.25a.75.75 0 0 1 .073.976l-.073.085l-4.25 4.25a.75.75 0 0 1-1.133-.977l.073-.084L20.19 12l-3.72-3.72a.75.75 0 0 1 0-1.06z",fill:"currentColor"})],-1)];var Dt=t.defineComponent({name:"Code24Regular",render:function(e,i){return t.openBlock(),t.createElementBlock("svg",It,zt)}});const Rt={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 24 24"},Ft=[t.createElementVNode("g",{fill:"none"},[t.createElementVNode("path",{d:"M4.21 4.387l.083-.094a1 1 0 0 1 1.32-.083l.094.083L12 10.585l6.293-6.292a1 1 0 1 1 1.414 1.414L13.415 12l6.292 6.293a1 1 0 0 1 .083 1.32l-.083.094a1 1 0 0 1-1.32.083l-.094-.083L12 13.415l-6.293 6.292a1 1 0 0 1-1.414-1.414L10.585 12L4.293 5.707a1 1 0 0 1-.083-1.32l.083-.094l-.083.094z",fill:"currentColor"})],-1)];var jt=t.defineComponent({name:"Dismiss24Filled",render:function(e,i){return t.openBlock(),t.createElementBlock("svg",Rt,Ft)}});const Wt={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 24 24"},Ht=[t.createElementVNode("g",{fill:"none"},[t.createElementVNode("path",{d:"M12 2c5.523 0 10 4.478 10 10s-4.477 10-10 10S2 17.522 2 12S6.477 2 12 2zm0 1.667c-4.595 0-8.333 3.738-8.333 8.333c0 4.595 3.738 8.333 8.333 8.333c4.595 0 8.333-3.738 8.333-8.333c0-4.595-3.738-8.333-8.333-8.333zm-.001 10.835a.999.999 0 1 1 0 1.998a.999.999 0 0 1 0-1.998zM11.994 7a.75.75 0 0 1 .744.648l.007.101l.004 4.502a.75.75 0 0 1-1.493.103l-.007-.102l-.004-4.501a.75.75 0 0 1 .75-.751z",fill:"currentColor"})],-1)];var Ut=t.defineComponent({name:"ErrorCircle24Regular",render:function(e,i){return t.openBlock(),t.createElementBlock("svg",Wt,Ht)}});const qt={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 24 24"},Xt=[t.createElementVNode("g",{fill:"none"},[t.createElementVNode("path",{d:"M12 1.999c5.524 0 10.002 4.478 10.002 10.002c0 5.523-4.478 10.001-10.002 10.001C6.476 22.002 2 17.524 2 12.001C1.999 6.477 6.476 1.999 12 1.999zm0 1.5a8.502 8.502 0 1 0 0 17.003A8.502 8.502 0 0 0 12 3.5zm-.004 7a.75.75 0 0 1 .744.648l.007.102l.004 5.502a.75.75 0 0 1-1.494.102l-.006-.101l-.004-5.502a.75.75 0 0 1 .75-.75zm.005-3.497a.999.999 0 1 1 0 1.997a.999.999 0 0 1 0-1.997z",fill:"currentColor"})],-1)];var Yt=t.defineComponent({name:"Info24Regular",render:function(e,i){return t.openBlock(),t.createElementBlock("svg",qt,Xt)}});const Kt={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 24 24"},Gt=[t.createElementVNode("g",{fill:"none"},[t.createElementVNode("path",{d:"M10.91 2.782a2.25 2.25 0 0 1 2.975.74l.083.138l7.759 14.009a2.25 2.25 0 0 1-1.814 3.334l-.154.006H4.243a2.25 2.25 0 0 1-2.041-3.197l.072-.143L10.031 3.66a2.25 2.25 0 0 1 .878-.878zm9.505 15.613l-7.76-14.008a.75.75 0 0 0-1.254-.088l-.057.088l-7.757 14.008a.75.75 0 0 0 .561 1.108l.095.006h15.516a.75.75 0 0 0 .696-1.028l-.04-.086l-7.76-14.008l7.76 14.008zM12 16.002a.999.999 0 1 1 0 1.997a.999.999 0 0 1 0-1.997zM11.995 8.5a.75.75 0 0 1 .744.647l.007.102l.004 4.502a.75.75 0 0 1-1.494.103l-.006-.102l-.004-4.502a.75.75 0 0 1 .75-.75z",fill:"currentColor"})],-1)];var Zt=t.defineComponent({name:"Warning24Regular",render:function(e,i){return t.openBlock(),t.createElementBlock("svg",Kt,Gt)}});const Jt={class:"lew-date-picker-placeholder"};var Qt=i(t.defineComponent({__name:"LewDatePicker",props:ft,emits:["change","update:modelValue"],setup(e,{expose:i,emit:n}){const o=e;let s=t.ref(!1),a=t.ref(o.modelValue),r=t.ref();const l=()=>{r.value.show()},c=()=>{r.value.hide()},d=e=>{n("update:modelValue",e.value),n("change",{date:e,show:l,hide:c}),o.autoClose&&c()};return i({show:l,hide:c}),(e,i)=>{const n=t.resolveComponent("Lew-date"),o=t.resolveComponent("lew-popover");return t.openBlock(),t.createBlock(o,{ref_key:"lewPopoverRef",ref:r,trigger:"click",placement:"bottom-start",arrow:!1,onOnShow:i[1]||(i[1]=e=>t.isRef(s)?s.value=!0:s=!0),onOnHide:i[2]||(i[2]=e=>t.isRef(s)?s.value=!1:s=!1)},{trigger:t.withCtx((()=>[t.createElementVNode("div",{class:t.normalizeClass(["lew-date-picker-input",{"lew-date-picker-foucs":t.unref(s)}])},[t.withDirectives(t.createElementVNode("div",Jt," 请选择日期 ",512),[[t.vShow,!t.unref(a)]]),t.withDirectives(t.createElementVNode("div",{class:"lew-date-picker-dateValue"},t.toDisplayString(t.unref(a)),513),[[t.vShow,t.unref(a)]]),t.createVNode(t.unref($e),{size:"16px",class:"lew-date-picker-icon"},{default:t.withCtx((()=>[t.createVNode(t.unref(At))])),_:1})],2)])),"popover-body":t.withCtx((()=>[t.createVNode(n,{modelValue:t.unref(a),"onUpdate:modelValue":i[0]||(i[0]=e=>t.isRef(a)?a.value=e:a=e),multiple:e.multiple,onChange:d},null,8,["modelValue","multiple"])])),_:1},512)}}}),[["__scopeId","data-v-4c4a62d0"],["__file","C:/Users/10570/Desktop/30secWorkSpace/Lew-UI/packages/components/date-picker/src/LewDatePicker.vue"]]);const ei={columns:{type:Array,default:()=>[]},width:{type:String,default:()=>""},height:{type:String,default:()=>""},data:{type:Array,default:()=>[]}};const ti={class:"lew-table-head"},ii=t.defineComponent({__name:"LewTable",props:ei,setup(e){const i=e;let n=t.ref(null),o=t.ref(null),s=t.ref(-1),a=t.ref(-1);let r=t.ref(!1),l=t.ref(!1);const c=e=>"left"==e.sticky?`position: sticky;left:${e.offsetX||"0px"};z-index:1;`:"right"==e.sticky?`position: sticky;right:${e.offsetX||"0px"};z-index:1;`:void 0;let d=t.ref("");let u=!1;const h=(e,t)=>{-1==s.value&&-1==a.value||u||(u=!0,setTimeout((()=>{(e=>{e.target.scrollWidth!=e.target.offsetWidth&&(r.value=e.target.scrollLeft>=5,l.value=e.target.scrollLeft<=e.target.scrollWidth-e.target.offsetWidth-5)})(e),u=!1}),t))};return t.onMounted((()=>{(()=>{var e,t;let o=null==(e=n.value)?void 0:e.scrollWidth,s=null==(t=n.value)?void 0:t.offsetWidth;if(s>=o){let e=i.columns.filter((e=>"auto"==e.width)).length,t=0;i.columns.filter((e=>"auto"!=e.width)).map((e=>{t+=parseFloat(e.width)})),d.value=(s-t)/e-3+"px"}})(),t.nextTick((()=>{i.columns.map(((e,t)=>{"left"==e.sticky?s.value=t:"right"==e.sticky&&-1==a.value&&(a.value=t,n.value.scrollWidth!=n.value.offsetWidth&&(l.value=!0))})),(()=>{let e=o.value.children;e=Array.from(e);let t=0;e.map((e=>{t+=e.offsetHeight-.3})),o.value.style.height=t+"px"})()}))})),(e,i)=>{var u,p,m;const f=t.resolveComponent("lew-flex");return t.openBlock(),t.createElementBlock("div",{ref_key:"lewTableRef",ref:n,class:"lew-table",style:t.normalizeStyle(`height:${e.height};width:${e.width};`),onScroll:i[0]||(i[0]=e=>h(e,200))},[t.createElementVNode("div",ti,[t.createElementVNode("div",{class:"lew-table-tr",style:t.normalizeStyle(`width:${(null==(u=t.unref(n))?void 0:u.scrollWidth)>(null==(p=t.unref(n))?void 0:p.offsetWidth)?null==(m=t.unref(n))?void 0:m.scrollWidth:""}px`)},[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.columns,((e,i)=>(t.openBlock(),t.createBlock(f,{key:`columns${i}`,class:t.normalizeClass(["lew-table-td",{"lew-table-left-subline":i==t.unref(s),"lew-table-right-subline":i==t.unref(a),"lew-table-left-subline-show":i==t.unref(s)&&t.unref(r),"lew-table-right-subline-show":i==t.unref(a)&&t.unref(l)}]),style:t.normalizeStyle(`\n ${e.columnStyle?e.columnStyle:""};\n ${c(e)}; \n width:${"auto"!=e.width?e.width:t.unref(d)||"100px"};\n `),x:e.x||"start",y:e.y},{default:t.withCtx((()=>[t.createTextVNode(t.toDisplayString(e.title),1)])),_:2},1032,["class","style","x","y"])))),128))],4)]),t.createElementVNode("div",{ref_key:"lewTableBodyRef",ref:o,class:"lew-table-body"},[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.data,((i,o)=>{var u,h,p;return t.openBlock(),t.createElementBlock("div",{key:`data${o}`,class:"lew-table-tr",style:t.normalizeStyle(`width:${(null==(u=t.unref(n))?void 0:u.scrollWidth)>(null==(h=t.unref(n))?void 0:h.offsetWidth)?null==(p=t.unref(n))?void 0:p.scrollWidth:""}px`)},[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.columns,((n,o)=>{var u;return t.openBlock(),t.createBlock(f,{key:`col${o}`,class:t.normalizeClass(["lew-table-td",{"lew-table-left-subline":o==t.unref(s),"lew-table-right-subline":o==t.unref(a),"lew-table-left-subline-show":o==t.unref(s)&&t.unref(r),"lew-table-right-subline-show":o==t.unref(a)&&t.unref(l)}]),style:t.normalizeStyle(` \n ${n.columnStyle?n.columnStyle:""};\n ${i.rowStyle};\n ${(null==(u=i.tdStyle)?void 0:u[n.field])?i.tdStyle[n.field]:""};\n ${c(n)};\n width:${"auto"!=n.width?n.width:t.unref(d)||"100px"};\n `),x:n.x||"start",y:n.y},{default:t.withCtx((()=>[t.createCommentVNode(" 模板 "),t.renderSlot(e.$slots,n.field,{row:i,column:n})])),_:2},1032,["class","style","x","y"])})),128))],4)})),128))],512)],36)}}});var ni=i(ii,[["__file","C:/Users/10570/Desktop/30secWorkSpace/Lew-UI/packages/components/table/src/LewTable.vue"]]);const oi={total:{type:Number,default:100},pageNum:{type:Number,default:1},pageSize:{type:Number,default:20},pageShowSize:{type:Number,default:2},round:{type:Boolean,default:!1},pageSizeOptions:{type:Array,default:()=>[{label:"10 / 页",value:10},{label:"20 / 页",value:20},{label:"30 / 页",value:30},{label:"50 / 页",value:30},{label:"100 / 页",value:100}]}};const si=["onClick"],ai=t.createElementVNode("div",{class:"page-label"},"/ 页",-1),ri=t.createElementVNode("div",{class:"page-label"},"跳转至",-1),li=t.createElementVNode("div",{class:"page-label"},"页",-1),ci=t.defineComponent({__name:"LewPagination",props:oi,emits:["update:pageNum","update:pageSize","update:pageTotal","change"],setup(e,{emit:i}){const n=e;let o=t.ref(n.pageNum),s=t.ref(n.pageSize),a=t.ref(n.total);t.watch((()=>n.pageNum),(e=>{c(!1,e)})),t.watch((()=>n.pageSize),(e=>{s.value=e}));let r=t.computed((()=>Math.floor(a.value/s.value))),l=t.computed((()=>{let e=o.value-n.pageShowSize,t=o.value+n.pageShowSize;return o.value<=n.pageShowSize&&(e=1,t=2*n.pageShowSize+1),o.value>=r.value-n.pageShowSize&&(e=r.value-2*n.pageShowSize,t=r.value),((e,t)=>Array.from(new Array(t+1).keys()).slice(e))(e,t)}));const c=(e,t)=>{"next"==e?o.value+=t:"prve"==e?o.value-=t:o.value=t,o.value<1?o.value=1:o.value>a.value/s.value&&(o.value=r.value),d.value=o.value,i("change",{pageNum:o.value,pageSize:s.value,total:a.value,pageShowSize:n.pageShowSize}),i("update:pageNum",o.value)};let d=t.ref(1);const u=e=>{e=String(e),d.value=Number(e.replace(/[^\d]/g,"")),c(!1,d.value)};return(e,i)=>{const n=t.resolveComponent("lew-flex"),h=t.resolveComponent("lew-input-pro");return t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass(["lew-pagination",{"lew-pagination-round":e.round}])},[t.createVNode(n,{class:"lew-pagination-control",gap:"5px"},{default:t.withCtx((()=>[t.createVNode(n,{class:"lew-pagination-page-box",gap:"5px"},{default:t.withCtx((()=>[t.createVNode(t.unref($e),{size:"14",class:"lew-pagination-page-btn lew-pagination-control-btn",onClick:i[0]||(i[0]=e=>c("prve",1))},{default:t.withCtx((()=>[t.createVNode(t.unref(I))])),_:1}),t.withDirectives(t.createElementVNode("div",{class:"lew-pagination-page-btn",onClick:i[1]||(i[1]=e=>c(!1,1))}," 1 ",512),[[t.vShow,t.unref(o)-1>e.pageShowSize]]),t.withDirectives(t.createVNode(t.unref($e),{size:"14",class:"lew-pagination-page-btn lew-pagination-control-btn",onClick:i[2]||(i[2]=t=>c("prve",2*e.pageShowSize))},{default:t.withCtx((()=>[t.createVNode(t.unref(J))])),_:1},512),[[t.vShow,t.unref(o)-1>e.pageShowSize]]),(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(t.unref(l),((e,i)=>(t.openBlock(),t.createElementBlock("div",{key:i,class:t.normalizeClass(["lew-pagination-page-btn",{active:e==t.unref(o)}]),onClick:t=>c(!1,e)},t.toDisplayString(e),11,si)))),128)),t.withDirectives(t.createVNode(t.unref($e),{size:"14",class:"lew-pagination-page-btn lew-pagination-control-btn",onClick:i[3]||(i[3]=t=>c("next",2*e.pageShowSize))},{default:t.withCtx((()=>[t.createVNode(t.unref(J))])),_:1},512),[[t.vShow,t.unref(o)<t.unref(a)/t.unref(s)-e.pageShowSize]]),t.withDirectives(t.createElementVNode("div",{class:"lew-pagination-page-btn",onClick:i[4]||(i[4]=e=>c(!1,t.unref(r)))},t.toDisplayString(t.unref(r)),513),[[t.vShow,t.unref(o)<t.unref(a)/t.unref(s)-e.pageShowSize]]),t.createVNode(t.unref($e),{size:"14",class:"lew-pagination-page-btn lew-pagination-control-btn",onClick:i[5]||(i[5]=e=>c("next",1))},{default:t.withCtx((()=>[t.createVNode(t.unref(q))])),_:1})])),_:1}),t.createVNode(h,{modelValue:t.unref(s),"onUpdate:modelValue":i[6]||(i[6]=e=>t.isRef(s)?s.value=e:s=e),size:"small",align:"center",placeholder:"",arrow:!1,options:e.pageSizeOptions,"auto-width":"",onBlur:i[7]||(i[7]=e=>c(!1,t.unref(d))),onChange:i[8]||(i[8]=e=>c(!1,t.unref(d)))},{right:t.withCtx((()=>[ai])),_:1},8,["modelValue","options"]),t.createVNode(h,{modelValue:t.unref(d),"onUpdate:modelValue":i[9]||(i[9]=e=>t.isRef(d)?d.value=e:d=e),style:{"margin-left":"20px"},size:"small",align:"center",placeholder:"",arrow:!1,"auto-width":"",onBlur:u,onChange:u},{left:t.withCtx((()=>[ri])),right:t.withCtx((()=>[li])),_:1},8,["modelValue"])])),_:1})],2)}}});var di=i(ci,[["__file","C:/Users/10570/Desktop/30secWorkSpace/Lew-UI/packages/components/pagination/src/LewPagination.vue"]]);const ui={class:"lew-avatar"},hi=["src","alt"];var pi=i(t.defineComponent({__name:"LewAvatar",props:{round:{type:Boolean,default:!1},status:{type:String,default:""},statusPosition:{type:String,default:""},src:{type:String,default:""},alt:{type:String,default:""}},setup:e=>(i,n)=>(t.openBlock(),t.createElementBlock("div",ui,[t.createElementVNode("img",{src:e.src,alt:e.alt,class:t.normalizeClass(e.round?"lew-avarar-round":"")},null,10,hi),e.status?(t.openBlock(),t.createElementBlock("span",{key:0,class:t.normalizeClass(["dot",`dot-${e.status} dot-${e.statusPosition}`])},null,2)):t.createCommentVNode("v-if",!0)]))}),[["__scopeId","data-v-3ce1779b"],["__file","C:/Users/10570/Desktop/30secWorkSpace/Lew-UI/packages/components/avatar/src/LewAvatar.vue"]]);var mi=i(t.defineComponent({__name:"LewTitle",props:{bold:{type:Number,default:800},size:{type:String,default:"24px"}},setup:e=>(i,n)=>(t.openBlock(),t.createElementBlock("div",{class:"lew-title",style:t.normalizeStyle(`font-weight:${e.bold};font-size:${e.size}`)},[t.renderSlot(i.$slots,"default",{},void 0,!0)],4))}),[["__scopeId","data-v-cfbccebe"],["__file","C:/Users/10570/Desktop/30secWorkSpace/Lew-UI/packages/components/title/src/LewTitle.vue"]]);var fi=i(t.defineComponent({__name:"LewButton",props:{type:{type:String,default:"primary"},size:{type:String,default:"medium"},loading:{type:Boolean,default:!1},round:{type:Boolean,default:!1},isText:{type:Boolean,default:!1}},setup:e=>(i,n)=>(t.openBlock(),t.createElementBlock("button",{class:t.normalizeClass(["lew-button",`\n ${e.isText?"lew-button-text":""}\n lew-button-${e.type} lew-button-${e.size} ${e.round?"lew-button-round":""} \n ${e.loading?"lew-button-loading":""}`])},[t.renderSlot(i.$slots,"default",{},void 0,!0)],2))}),[["__scopeId","data-v-e7956ae6"],["__file","C:/Users/10570/Desktop/30secWorkSpace/Lew-UI/packages/components/button/src/LewButton.vue"]]);const gi={key:0,class:"lew-badge-value"},yi={key:1,class:"lew-badge-dot"};var vi=i(t.defineComponent({__name:"LewBadge",props:{type:{type:String,default:"normal"},round:{type:Boolean,default:!1},value:{type:String,default:""}},setup:e=>(i,n)=>(t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass(["lew-badge",`lew-badge-${e.type} ${e.round?"lew-badge-round":""}`])},[e.value?(t.openBlock(),t.createElementBlock("div",gi,t.toDisplayString(e.value),1)):t.createCommentVNode("v-if",!0),e.value?t.createCommentVNode("v-if",!0):(t.openBlock(),t.createElementBlock("div",yi)),t.renderSlot(i.$slots,"default")],2))}),[["__file","C:/Users/10570/Desktop/30secWorkSpace/Lew-UI/packages/components/badge/src/LewBadge.vue"]]);let bi=["small","medium","large"],wi=["primary","info","success","error","warning","normal"];const ki={type:{type:String,default:"normal",validator:e=>wi.includes(e)},size:{type:String,default:"medium",validator:e=>bi.includes(e)},maxWidth:{type:String,default:"120px"},round:{type:Boolean,default:!1},closable:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},to:{type:String,default:""}};const xi={class:"lew-tag-left"},Ci={class:"lew-tag-value"},Si={class:"lew-tag-right"},Ei=["onClick"];var Ti=i(t.defineComponent({__name:"LewTag",props:ki,emits:["close"],setup(e,{emit:i}){const n=e,{lewTo:o}=c(),s=()=>{n.disabled||i("close")};return(e,i)=>(t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass(["lew-tag",`lew-tag-${e.size} lew-tag-${e.type} ${e.round?"lew-tag-round":""} ${e.disabled?"lew-tag-disabled":""} ${e.to?"lew-tag-to":""}`]),style:t.normalizeStyle(`max-width:${e.maxWidth}`),onClick:i[0]||(i[0]=i=>t.unref(o)(e.to))},[t.createElementVNode("div",xi,[t.renderSlot(e.$slots,"left")]),t.createElementVNode("div",Ci,[t.renderSlot(e.$slots,"default")]),t.createElementVNode("div",Si,[t.renderSlot(e.$slots,"right")]),e.closable?(t.openBlock(),t.createElementBlock("div",{key:0,class:"lew-tag-close",onClick:t.withModifiers(s,["stop"])},[t.createVNode(t.unref($e),null,{default:t.withCtx((()=>[t.createVNode(t.unref(jt))])),_:1})],8,Ei)):t.createCommentVNode("v-if",!0)],6))}}),[["__file","C:/Users/10570/Desktop/30secWorkSpace/Lew-UI/packages/components/tag/src/LewTag.vue"]]);const Li={class:"lew-alert-group"},$i={class:"alert-icon"},_i={class:"message"},Ai={class:"title"},Ni=["onClick"];var Pi=i(t.defineComponent({__name:"LewAlert",props:{list:{type:Array,default:()=>[]}},emits:["close"],setup:(e,{emit:i})=>(n,o)=>(t.openBlock(),t.createElementBlock("div",Li,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.list,((e,n)=>(t.openBlock(),t.createElementBlock("div",{key:n,class:t.normalizeClass(["lew-alert",`lew-alert-${e.type}`])},[t.createElementVNode("div",$i,[t.createVNode(t.unref($e),{size:"20"},{default:t.withCtx((()=>["normal"==e.type?(t.openBlock(),t.createBlock(t.unref(Yt),{key:0})):t.createCommentVNode("v-if",!0),"warning"==e.type?(t.openBlock(),t.createBlock(t.unref(Zt),{key:1})):t.createCommentVNode("v-if",!0),"success"==e.type?(t.openBlock(),t.createBlock(t.unref(Bt),{key:2})):t.createCommentVNode("v-if",!0),"error"==e.type?(t.openBlock(),t.createBlock(t.unref(Ut),{key:3})):t.createCommentVNode("v-if",!0),"info"==e.type?(t.openBlock(),t.createBlock(t.unref(Lt),{key:4})):t.createCommentVNode("v-if",!0)])),_:2},1024)]),t.createElementVNode("div",_i,[t.createElementVNode("div",Ai,t.toDisplayString(e.title),1),t.withDirectives(t.createElementVNode("div",{class:"content"},t.toDisplayString(e.content),513),[[t.vShow,e.content]])]),t.createElementVNode("div",{class:"btn-close",onClick:e=>i("close",n)},[t.createVNode(t.unref($e),{size:"16"},{default:t.withCtx((()=>[t.createVNode(t.unref(jt))])),_:1})],8,Ni)],2)))),128))]))}),[["__scopeId","data-v-a39e41be"],["__file","C:/Users/10570/Desktop/30secWorkSpace/Lew-UI/packages/components/alert/src/LewAlert.vue"]]);var Bi=i(t.defineComponent({__name:"LewModal",props:{title:{type:String,default:""},width:{type:String,default:""},height:{type:String,default:""},visible:{type:Boolean,default:!1}},emits:["maskClick","confirm"],setup(e,{emit:i}){r("lew-modal");const n=()=>{i("maskClick")};return(i,o)=>(t.openBlock(),t.createBlock(t.Teleport,{to:"#lew-modal"},[t.createVNode(t.Transition,{name:"lew-modal"},{default:t.withCtx((()=>[e.visible?(t.openBlock(),t.createElementBlock("div",{key:0,class:"lew-modal",onClick:n},[e.visible?(t.openBlock(),t.createElementBlock("div",{key:0,class:"lew-modal-box",style:t.normalizeStyle(`width:${e.width};height:${e.height}`),onClick:o[0]||(o[0]=t.withModifiers((()=>{}),["stop"]))},[t.renderSlot(i.$slots,"default",{},void 0,!0)],4)):t.createCommentVNode("v-if",!0)])):t.createCommentVNode("v-if",!0)])),_:3})]))}}),[["__scopeId","data-v-463e7ac1"],["__file","C:/Users/10570/Desktop/30secWorkSpace/Lew-UI/packages/components/modal/src/LewModal.vue"]]);const Mi={class:"left"},Vi={class:"right"},Oi={key:0,class:"title"},Ii={key:1,class:"content"},zi={class:"footer"},Di=t.createTextVNode("取消 "),Ri=t.createTextVNode("确定");var Fi=i(t.defineComponent({__name:"LewPopok",props:{type:{type:String,default:"warning"},width:{type:String,default:"250px"},trigger:{type:String,default:"click"},title:{type:String,default:""},content:{type:String,default:""},placement:{type:String,default:"top"}},emits:["ok","cancel"],setup(e,{expose:i,emit:n}){let o=t.ref(),s=()=>{o.value.show()},a=()=>{o.value.hide()};return i({show:s,hide:a}),(i,r)=>{const l=t.resolveComponent("lew-popover");return t.openBlock(),t.createBlock(l,{ref_key:"lewPopoverRef",ref:o,class:"lew-popok",trigger:e.trigger,placement:e.placement},{trigger:t.withCtx((()=>[t.renderSlot(i.$slots,"default",{},void 0,!0)])),"popover-body":t.withCtx((()=>[t.createElementVNode("div",{class:"lew-popok-body",style:t.normalizeStyle(`width:${e.width}`)},[t.createElementVNode("div",Mi,[t.createVNode(t.unref($e),{size:"22",class:t.normalizeClass(`icon-${e.type}`)},{default:t.withCtx((()=>["normal"==e.type?(t.openBlock(),t.createBlock(t.unref(Yt),{key:0})):t.createCommentVNode("v-if",!0),"warning"==e.type?(t.openBlock(),t.createBlock(t.unref(Zt),{key:1})):t.createCommentVNode("v-if",!0),"success"==e.type?(t.openBlock(),t.createBlock(t.unref(Bt),{key:2})):t.createCommentVNode("v-if",!0),"error"==e.type?(t.openBlock(),t.createBlock(t.unref(Ut),{key:3})):t.createCommentVNode("v-if",!0),"info"==e.type?(t.openBlock(),t.createBlock(t.unref(Lt),{key:4})):t.createCommentVNode("v-if",!0)])),_:1},8,["class"])]),t.createElementVNode("div",Vi,[e.title?(t.openBlock(),t.createElementBlock("div",Oi,t.toDisplayString(e.title),1)):t.createCommentVNode("v-if",!0),e.content?(t.openBlock(),t.createElementBlock("div",Ii,t.toDisplayString(e.content),1)):t.createCommentVNode("v-if",!0),t.createElementVNode("div",zi,[t.createVNode(t.unref(fi),{size:"small",type:"blank",onClick:r[0]||(r[0]=e=>n("cancel",{show:t.unref(s),hide:t.unref(a)}))},{default:t.withCtx((()=>[Di])),_:1}),t.createVNode(t.unref(fi),{size:"small",onClick:r[1]||(r[1]=e=>n("ok",{show:t.unref(s),hide:t.unref(a)}))},{default:t.withCtx((()=>[Ri])),_:1})])])],4)])),_:3},8,["trigger","placement"])}}}),[["__scopeId","data-v-7f9302c1"],["__file","C:/Users/10570/Desktop/30secWorkSpace/Lew-UI/packages/components/popok/src/LewPopok.vue"]]),ji="top",Wi="bottom",Hi="right",Ui="left",qi="auto",Xi=[ji,Wi,Hi,Ui],Yi="start",Ki="end",Gi="viewport",Zi="popper",Ji=Xi.reduce((function(e,t){return e.concat([t+"-"+Yi,t+"-"+Ki])}),[]),Qi=[].concat(Xi,[qi]).reduce((function(e,t){return e.concat([t,t+"-"+Yi,t+"-"+Ki])}),[]),en=["beforeRead","read","afterRead","beforeMain","main","afterMain","beforeWrite","write","afterWrite"];function tn(e){return e?(e.nodeName||"").toLowerCase():null}function nn(e){if(null==e)return window;if("[object Window]"!==e.toString()){var t=e.ownerDocument;return t&&t.defaultView||window}return e}function on(e){return e instanceof nn(e).Element||e instanceof Element}function sn(e){return e instanceof nn(e).HTMLElement||e instanceof HTMLElement}function an(e){return"undefined"!=typeof ShadowRoot&&(e instanceof nn(e).ShadowRoot||e instanceof ShadowRoot)}var rn={name:"applyStyles",enabled:!0,phase:"write",fn:function(e){var t=e.state;Object.keys(t.elements).forEach((function(e){var i=t.styles[e]||{},n=t.attributes[e]||{},o=t.elements[e];sn(o)&&tn(o)&&(Object.assign(o.style,i),Object.keys(n).forEach((function(e){var t=n[e];!1===t?o.removeAttribute(e):o.setAttribute(e,!0===t?"":t)})))}))},effect:function(e){var t=e.state,i={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(t.elements.popper.style,i.popper),t.styles=i,t.elements.arrow&&Object.assign(t.elements.arrow.style,i.arrow),function(){Object.keys(t.elements).forEach((function(e){var n=t.elements[e],o=t.attributes[e]||{},s=Object.keys(t.styles.hasOwnProperty(e)?t.styles[e]:i[e]).reduce((function(e,t){return e[t]="",e}),{});sn(n)&&tn(n)&&(Object.assign(n.style,s),Object.keys(o).forEach((function(e){n.removeAttribute(e)})))}))}},requires:["computeStyles"]};function ln(e){return e.split("-")[0]}var cn=Math.max,dn=Math.min,un=Math.round;function hn(e,t){void 0===t&&(t=!1);var i=e.getBoundingClientRect(),n=1,o=1;if(sn(e)&&t){var s=e.offsetHeight,a=e.offsetWidth;a>0&&(n=un(i.width)/a||1),s>0&&(o=un(i.height)/s||1)}return{width:i.width/n,height:i.height/o,top:i.top/o,right:i.right/n,bottom:i.bottom/o,left:i.left/n,x:i.left/n,y:i.top/o}}function pn(e){var t=hn(e),i=e.offsetWidth,n=e.offsetHeight;return Math.abs(t.width-i)<=1&&(i=t.width),Math.abs(t.height-n)<=1&&(n=t.height),{x:e.offsetLeft,y:e.offsetTop,width:i,height:n}}function mn(e,t){var i=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(i&&an(i)){var n=t;do{if(n&&e.isSameNode(n))return!0;n=n.parentNode||n.host}while(n)}return!1}function fn(e){return nn(e).getComputedStyle(e)}function gn(e){return["table","td","th"].indexOf(tn(e))>=0}function yn(e){return((on(e)?e.ownerDocument:e.document)||window.document).documentElement}function vn(e){return"html"===tn(e)?e:e.assignedSlot||e.parentNode||(an(e)?e.host:null)||yn(e)}function bn(e){return sn(e)&&"fixed"!==fn(e).position?e.offsetParent:null}function wn(e){for(var t=nn(e),i=bn(e);i&&gn(i)&&"static"===fn(i).position;)i=bn(i);return i&&("html"===tn(i)||"body"===tn(i)&&"static"===fn(i).position)?t:i||function(e){var t=-1!==navigator.userAgent.toLowerCase().indexOf("firefox");if(-1!==navigator.userAgent.indexOf("Trident")&&sn(e)&&"fixed"===fn(e).position)return null;var i=vn(e);for(an(i)&&(i=i.host);sn(i)&&["html","body"].indexOf(tn(i))<0;){var n=fn(i);if("none"!==n.transform||"none"!==n.perspective||"paint"===n.contain||-1!==["transform","perspective"].indexOf(n.willChange)||t&&"filter"===n.willChange||t&&n.filter&&"none"!==n.filter)return i;i=i.parentNode}return null}(e)||t}function kn(e){return["top","bottom"].indexOf(e)>=0?"x":"y"}function xn(e,t,i){return cn(e,dn(t,i))}function Cn(e){return Object.assign({},{top:0,right:0,bottom:0,left:0},e)}function Sn(e,t){return t.reduce((function(t,i){return t[i]=e,t}),{})}function En(e){return e.split("-")[1]}var Tn={top:"auto",right:"auto",bottom:"auto",left:"auto"};function Ln(e){var t,i=e.popper,n=e.popperRect,o=e.placement,s=e.variation,a=e.offsets,r=e.position,l=e.gpuAcceleration,c=e.adaptive,d=e.roundOffsets,u=e.isFixed,h=a.x,p=void 0===h?0:h,m=a.y,f=void 0===m?0:m,g="function"==typeof d?d({x:p,y:f}):{x:p,y:f};p=g.x,f=g.y;var y=a.hasOwnProperty("x"),v=a.hasOwnProperty("y"),b=Ui,w=ji,k=window;if(c){var x=wn(i),C="clientHeight",S="clientWidth";if(x===nn(i)&&"static"!==fn(x=yn(i)).position&&"absolute"===r&&(C="scrollHeight",S="scrollWidth"),o===ji||(o===Ui||o===Hi)&&s===Ki)w=Wi,f-=(u&&x===k&&k.visualViewport?k.visualViewport.height:x[C])-n.height,f*=l?1:-1;if(o===Ui||(o===ji||o===Wi)&&s===Ki)b=Hi,p-=(u&&x===k&&k.visualViewport?k.visualViewport.width:x[S])-n.width,p*=l?1:-1}var E,T=Object.assign({position:r},c&&Tn),L=!0===d?function(e){var t=e.x,i=e.y,n=window.devicePixelRatio||1;return{x:un(t*n)/n||0,y:un(i*n)/n||0}}({x:p,y:f}):{x:p,y:f};return p=L.x,f=L.y,l?Object.assign({},T,((E={})[w]=v?"0":"",E[b]=y?"0":"",E.transform=(k.devicePixelRatio||1)<=1?"translate("+p+"px, "+f+"px)":"translate3d("+p+"px, "+f+"px, 0)",E)):Object.assign({},T,((t={})[w]=v?f+"px":"",t[b]=y?p+"px":"",t.transform="",t))}var $n={passive:!0};var _n={left:"right",right:"left",bottom:"top",top:"bottom"};function An(e){return e.replace(/left|right|bottom|top/g,(function(e){return _n[e]}))}var Nn={start:"end",end:"start"};function Pn(e){return e.replace(/start|end/g,(function(e){return Nn[e]}))}function Bn(e){var t=nn(e);return{scrollLeft:t.pageXOffset,scrollTop:t.pageYOffset}}function Mn(e){return hn(yn(e)).left+Bn(e).scrollLeft}function Vn(e){var t=fn(e),i=t.overflow,n=t.overflowX,o=t.overflowY;return/auto|scroll|overlay|hidden/.test(i+o+n)}function On(e){return["html","body","#document"].indexOf(tn(e))>=0?e.ownerDocument.body:sn(e)&&Vn(e)?e:On(vn(e))}function In(e,t){var i;void 0===t&&(t=[]);var n=On(e),o=n===(null==(i=e.ownerDocument)?void 0:i.body),s=nn(n),a=o?[s].concat(s.visualViewport||[],Vn(n)?n:[]):n,r=t.concat(a);return o?r:r.concat(In(vn(a)))}function zn(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function Dn(e,t){return t===Gi?zn(function(e){var t=nn(e),i=yn(e),n=t.visualViewport,o=i.clientWidth,s=i.clientHeight,a=0,r=0;return n&&(o=n.width,s=n.height,/^((?!chrome|android).)*safari/i.test(navigator.userAgent)||(a=n.offsetLeft,r=n.offsetTop)),{width:o,height:s,x:a+Mn(e),y:r}}(e)):on(t)?function(e){var t=hn(e);return t.top=t.top+e.clientTop,t.left=t.left+e.clientLeft,t.bottom=t.top+e.clientHeight,t.right=t.left+e.clientWidth,t.width=e.clientWidth,t.height=e.clientHeight,t.x=t.left,t.y=t.top,t}(t):zn(function(e){var t,i=yn(e),n=Bn(e),o=null==(t=e.ownerDocument)?void 0:t.body,s=cn(i.scrollWidth,i.clientWidth,o?o.scrollWidth:0,o?o.clientWidth:0),a=cn(i.scrollHeight,i.clientHeight,o?o.scrollHeight:0,o?o.clientHeight:0),r=-n.scrollLeft+Mn(e),l=-n.scrollTop;return"rtl"===fn(o||i).direction&&(r+=cn(i.clientWidth,o?o.clientWidth:0)-s),{width:s,height:a,x:r,y:l}}(yn(e)))}function Rn(e,t,i){var n="clippingParents"===t?function(e){var t=In(vn(e)),i=["absolute","fixed"].indexOf(fn(e).position)>=0&&sn(e)?wn(e):e;return on(i)?t.filter((function(e){return on(e)&&mn(e,i)&&"body"!==tn(e)})):[]}(e):[].concat(t),o=[].concat(n,[i]),s=o[0],a=o.reduce((function(t,i){var n=Dn(e,i);return t.top=cn(n.top,t.top),t.right=dn(n.right,t.right),t.bottom=dn(n.bottom,t.bottom),t.left=cn(n.left,t.left),t}),Dn(e,s));return a.width=a.right-a.left,a.height=a.bottom-a.top,a.x=a.left,a.y=a.top,a}function Fn(e){var t,i=e.reference,n=e.element,o=e.placement,s=o?ln(o):null,a=o?En(o):null,r=i.x+i.width/2-n.width/2,l=i.y+i.height/2-n.height/2;switch(s){case ji:t={x:r,y:i.y-n.height};break;case Wi:t={x:r,y:i.y+i.height};break;case Hi:t={x:i.x+i.width,y:l};break;case Ui:t={x:i.x-n.width,y:l};break;default:t={x:i.x,y:i.y}}var c=s?kn(s):null;if(null!=c){var d="y"===c?"height":"width";switch(a){case Yi:t[c]=t[c]-(i[d]/2-n[d]/2);break;case Ki:t[c]=t[c]+(i[d]/2-n[d]/2)}}return t}function jn(e,t){void 0===t&&(t={});var i=t,n=i.placement,o=void 0===n?e.placement:n,s=i.boundary,a=void 0===s?"clippingParents":s,r=i.rootBoundary,l=void 0===r?Gi:r,c=i.elementContext,d=void 0===c?Zi:c,u=i.altBoundary,h=void 0!==u&&u,p=i.padding,m=void 0===p?0:p,f=Cn("number"!=typeof m?m:Sn(m,Xi)),g=d===Zi?"reference":Zi,y=e.rects.popper,v=e.elements[h?g:d],b=Rn(on(v)?v:v.contextElement||yn(e.elements.popper),a,l),w=hn(e.elements.reference),k=Fn({reference:w,element:y,strategy:"absolute",placement:o}),x=zn(Object.assign({},y,k)),C=d===Zi?x:w,S={top:b.top-C.top+f.top,bottom:C.bottom-b.bottom+f.bottom,left:b.left-C.left+f.left,right:C.right-b.right+f.right},E=e.modifiersData.offset;if(d===Zi&&E){var T=E[o];Object.keys(S).forEach((function(e){var t=[Hi,Wi].indexOf(e)>=0?1:-1,i=[ji,Wi].indexOf(e)>=0?"y":"x";S[e]+=T[i]*t}))}return S}function Wn(e,t,i){return void 0===i&&(i={x:0,y:0}),{top:e.top-t.height-i.y,right:e.right-t.width+i.x,bottom:e.bottom-t.height+i.y,left:e.left-t.width-i.x}}function Hn(e){return[ji,Hi,Wi,Ui].some((function(t){return e[t]>=0}))}function Un(e,t,i){void 0===i&&(i=!1);var n,o,s=sn(t),a=sn(t)&&function(e){var t=e.getBoundingClientRect(),i=un(t.width)/e.offsetWidth||1,n=un(t.height)/e.offsetHeight||1;return 1!==i||1!==n}(t),r=yn(t),l=hn(e,a),c={scrollLeft:0,scrollTop:0},d={x:0,y:0};return(s||!s&&!i)&&(("body"!==tn(t)||Vn(r))&&(c=(n=t)!==nn(n)&&sn(n)?{scrollLeft:(o=n).scrollLeft,scrollTop:o.scrollTop}:Bn(n)),sn(t)?((d=hn(t,!0)).x+=t.clientLeft,d.y+=t.clientTop):r&&(d.x=Mn(r))),{x:l.left+c.scrollLeft-d.x,y:l.top+c.scrollTop-d.y,width:l.width,height:l.height}}function qn(e){var t=new Map,i=new Set,n=[];function o(e){i.add(e.name),[].concat(e.requires||[],e.requiresIfExists||[]).forEach((function(e){if(!i.has(e)){var n=t.get(e);n&&o(n)}})),n.push(e)}return e.forEach((function(e){t.set(e.name,e)})),e.forEach((function(e){i.has(e.name)||o(e)})),n}var Xn=["name","enabled","phase","fn","effect","requires","options"];var Yn={placement:"bottom",modifiers:[],strategy:"absolute"};function Kn(){for(var e=arguments.length,t=new Array(e),i=0;i<e;i++)t[i]=arguments[i];return!t.some((function(e){return!(e&&"function"==typeof e.getBoundingClientRect)}))}function Gn(e){void 0===e&&(e={});var t=e,i=t.defaultModifiers,n=void 0===i?[]:i,o=t.defaultOptions,s=void 0===o?Yn:o;return function(e,t,i){void 0===i&&(i=s);var o,a,r={placement:"bottom",orderedModifiers:[],options:Object.assign({},Yn,s),modifiersData:{},elements:{reference:e,popper:t},attributes:{},styles:{}},l=[],c=!1,d={state:r,setOptions:function(i){var o="function"==typeof i?i(r.options):i;u(),r.options=Object.assign({},s,r.options,o),r.scrollParents={reference:on(e)?In(e):e.contextElement?In(e.contextElement):[],popper:In(t)};var a=function(e){var t=qn(e);return en.reduce((function(e,i){return e.concat(t.filter((function(e){return e.phase===i})))}),[])}(function(e){var t=e.reduce((function(e,t){var i=e[t.name];return e[t.name]=i?Object.assign({},i,t,{options:Object.assign({},i.options,t.options),data:Object.assign({},i.data,t.data)}):t,e}),{});return Object.keys(t).map((function(e){return t[e]}))}([].concat(n,r.options.modifiers)));if(r.orderedModifiers=a.filter((function(e){return e.enabled})),function(e){e.forEach((function(t){[].concat(Object.keys(t),Xn).filter((function(e,t,i){return i.indexOf(e)===t})).forEach((function(i){switch(i){case"name":t.name;break;case"enabled":t.enabled;break;case"phase":en.indexOf(t.phase);break;case"fn":t.fn;break;case"effect":null!=t.effect&&t.effect;break;case"requires":null!=t.requires&&Array.isArray(t.requires);break;case"requiresIfExists":Array.isArray(t.requiresIfExists)}t.requires&&t.requires.forEach((function(t){e.find((function(e){return e.name===t}))}))}))}))}((c=[].concat(a,r.options.modifiers),h=function(e){return e.name},p=new Set,c.filter((function(e){var t=h(e);if(!p.has(t))return p.add(t),!0})))),ln(r.options.placement)===qi)r.orderedModifiers.find((function(e){return"flip"===e.name}));var c,h,p,m=fn(t);return[m.marginTop,m.marginRight,m.marginBottom,m.marginLeft].some((function(e){return parseFloat(e)})),r.orderedModifiers.forEach((function(e){var t=e.name,i=e.options,n=void 0===i?{}:i,o=e.effect;if("function"==typeof o){var s=o({state:r,name:t,instance:d,options:n}),a=function(){};l.push(s||a)}})),d.update()},forceUpdate:function(){if(!c){var e=r.elements,t=e.reference,i=e.popper;if(Kn(t,i)){r.rects={reference:Un(t,wn(i),"fixed"===r.options.strategy),popper:pn(i)},r.reset=!1,r.placement=r.options.placement,r.orderedModifiers.forEach((function(e){return r.modifiersData[e.name]=Object.assign({},e.data)}));for(var n=0,o=0;o<r.orderedModifiers.length&&!((n+=1)>100);o++)if(!0!==r.reset){var s=r.orderedModifiers[o],a=s.fn,l=s.options,u=void 0===l?{}:l,h=s.name;"function"==typeof a&&(r=a({state:r,options:u,name:h,instance:d})||r)}else r.reset=!1,o=-1}}},update:(o=function(){return new Promise((function(e){d.forceUpdate(),e(r)}))},function(){return a||(a=new Promise((function(e){Promise.resolve().then((function(){a=void 0,e(o())}))}))),a}),destroy:function(){u(),c=!0}};if(!Kn(e,t))return d;function u(){l.forEach((function(e){return e()})),l=[]}return d.setOptions(i).then((function(e){!c&&i.onFirstUpdate&&i.onFirstUpdate(e)})),d}}var Zn=Gn({defaultModifiers:[{name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:function(e){var t=e.state,i=e.instance,n=e.options,o=n.scroll,s=void 0===o||o,a=n.resize,r=void 0===a||a,l=nn(t.elements.popper),c=[].concat(t.scrollParents.reference,t.scrollParents.popper);return s&&c.forEach((function(e){e.addEventListener("scroll",i.update,$n)})),r&&l.addEventListener("resize",i.update,$n),function(){s&&c.forEach((function(e){e.removeEventListener("scroll",i.update,$n)})),r&&l.removeEventListener("resize",i.update,$n)}},data:{}},{name:"popperOffsets",enabled:!0,phase:"read",fn:function(e){var t=e.state,i=e.name;t.modifiersData[i]=Fn({reference:t.rects.reference,element:t.rects.popper,strategy:"absolute",placement:t.placement})},data:{}},{name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:function(e){var t=e.state,i=e.options,n=i.gpuAcceleration,o=void 0===n||n,s=i.adaptive,a=void 0===s||s,r=i.roundOffsets,l=void 0===r||r,c=fn(t.elements.popper).transitionProperty||"";a&&["transform","top","right","bottom","left"].some((function(e){return c.indexOf(e)>=0}));var d={placement:ln(t.placement),variation:En(t.placement),popper:t.elements.popper,popperRect:t.rects.popper,gpuAcceleration:o,isFixed:"fixed"===t.options.strategy};null!=t.modifiersData.popperOffsets&&(t.styles.popper=Object.assign({},t.styles.popper,Ln(Object.assign({},d,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:a,roundOffsets:l})))),null!=t.modifiersData.arrow&&(t.styles.arrow=Object.assign({},t.styles.arrow,Ln(Object.assign({},d,{offsets:t.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:l})))),t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-placement":t.placement})},data:{}},rn,{name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:function(e){var t=e.state,i=e.options,n=e.name,o=i.offset,s=void 0===o?[0,0]:o,a=Qi.reduce((function(e,i){return e[i]=function(e,t,i){var n=ln(e),o=[Ui,ji].indexOf(n)>=0?-1:1,s="function"==typeof i?i(Object.assign({},t,{placement:e})):i,a=s[0],r=s[1];return a=a||0,r=(r||0)*o,[Ui,Hi].indexOf(n)>=0?{x:r,y:a}:{x:a,y:r}}(i,t.rects,s),e}),{}),r=a[t.placement],l=r.x,c=r.y;null!=t.modifiersData.popperOffsets&&(t.modifiersData.popperOffsets.x+=l,t.modifiersData.popperOffsets.y+=c),t.modifiersData[n]=a}},{name:"flip",enabled:!0,phase:"main",fn:function(e){var t=e.state,i=e.options,n=e.name;if(!t.modifiersData[n]._skip){for(var o=i.mainAxis,s=void 0===o||o,a=i.altAxis,r=void 0===a||a,l=i.fallbackPlacements,c=i.padding,d=i.boundary,u=i.rootBoundary,h=i.altBoundary,p=i.flipVariations,m=void 0===p||p,f=i.allowedAutoPlacements,g=t.options.placement,y=ln(g),v=l||(y===g||!m?[An(g)]:function(e){if(ln(e)===qi)return[];var t=An(e);return[Pn(e),t,Pn(t)]}(g)),b=[g].concat(v).reduce((function(e,i){return e.concat(ln(i)===qi?function(e,t){void 0===t&&(t={});var i=t,n=i.placement,o=i.boundary,s=i.rootBoundary,a=i.padding,r=i.flipVariations,l=i.allowedAutoPlacements,c=void 0===l?Qi:l,d=En(n),u=d?r?Ji:Ji.filter((function(e){return En(e)===d})):Xi,h=u.filter((function(e){return c.indexOf(e)>=0}));0===h.length&&(h=u);var p=h.reduce((function(t,i){return t[i]=jn(e,{placement:i,boundary:o,rootBoundary:s,padding:a})[ln(i)],t}),{});return Object.keys(p).sort((function(e,t){return p[e]-p[t]}))}(t,{placement:i,boundary:d,rootBoundary:u,padding:c,flipVariations:m,allowedAutoPlacements:f}):i)}),[]),w=t.rects.reference,k=t.rects.popper,x=new Map,C=!0,S=b[0],E=0;E<b.length;E++){var T=b[E],L=ln(T),$=En(T)===Yi,_=[ji,Wi].indexOf(L)>=0,A=_?"width":"height",N=jn(t,{placement:T,boundary:d,rootBoundary:u,altBoundary:h,padding:c}),P=_?$?Hi:Ui:$?Wi:ji;w[A]>k[A]&&(P=An(P));var B=An(P),M=[];if(s&&M.push(N[L]<=0),r&&M.push(N[P]<=0,N[B]<=0),M.every((function(e){return e}))){S=T,C=!1;break}x.set(T,M)}if(C)for(var V=function(e){var t=b.find((function(t){var i=x.get(t);if(i)return i.slice(0,e).every((function(e){return e}))}));if(t)return S=t,"break"},O=m?3:1;O>0;O--){if("break"===V(O))break}t.placement!==S&&(t.modifiersData[n]._skip=!0,t.placement=S,t.reset=!0)}},requiresIfExists:["offset"],data:{_skip:!1}},{name:"preventOverflow",enabled:!0,phase:"main",fn:function(e){var t=e.state,i=e.options,n=e.name,o=i.mainAxis,s=void 0===o||o,a=i.altAxis,r=void 0!==a&&a,l=i.boundary,c=i.rootBoundary,d=i.altBoundary,u=i.padding,h=i.tether,p=void 0===h||h,m=i.tetherOffset,f=void 0===m?0:m,g=jn(t,{boundary:l,rootBoundary:c,padding:u,altBoundary:d}),y=ln(t.placement),v=En(t.placement),b=!v,w=kn(y),k="x"===w?"y":"x",x=t.modifiersData.popperOffsets,C=t.rects.reference,S=t.rects.popper,E="function"==typeof f?f(Object.assign({},t.rects,{placement:t.placement})):f,T="number"==typeof E?{mainAxis:E,altAxis:E}:Object.assign({mainAxis:0,altAxis:0},E),L=t.modifiersData.offset?t.modifiersData.offset[t.placement]:null,$={x:0,y:0};if(x){if(s){var _,A="y"===w?ji:Ui,N="y"===w?Wi:Hi,P="y"===w?"height":"width",B=x[w],M=B+g[A],V=B-g[N],O=p?-S[P]/2:0,I=v===Yi?C[P]:S[P],z=v===Yi?-S[P]:-C[P],D=t.elements.arrow,R=p&&D?pn(D):{width:0,height:0},F=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:{top:0,right:0,bottom:0,left:0},j=F[A],W=F[N],H=xn(0,C[P],R[P]),U=b?C[P]/2-O-H-j-T.mainAxis:I-H-j-T.mainAxis,q=b?-C[P]/2+O+H+W+T.mainAxis:z+H+W+T.mainAxis,X=t.elements.arrow&&wn(t.elements.arrow),Y=X?"y"===w?X.clientTop||0:X.clientLeft||0:0,K=null!=(_=null==L?void 0:L[w])?_:0,G=B+q-K,Z=xn(p?dn(M,B+U-K-Y):M,B,p?cn(V,G):V);x[w]=Z,$[w]=Z-B}if(r){var J,Q="x"===w?ji:Ui,ee="x"===w?Wi:Hi,te=x[k],ie="y"===k?"height":"width",ne=te+g[Q],oe=te-g[ee],se=-1!==[ji,Ui].indexOf(y),ae=null!=(J=null==L?void 0:L[k])?J:0,re=se?ne:te-C[ie]-S[ie]-ae+T.altAxis,le=se?te+C[ie]+S[ie]-ae-T.altAxis:oe,ce=p&&se?(ue=xn(re,te,de=le))>de?de:ue:xn(p?re:ne,te,p?le:oe);x[k]=ce,$[k]=ce-te}var de,ue;t.modifiersData[n]=$}},requiresIfExists:["offset"]},{name:"arrow",enabled:!0,phase:"main",fn:function(e){var t,i=e.state,n=e.name,o=e.options,s=i.elements.arrow,a=i.modifiersData.popperOffsets,r=ln(i.placement),l=kn(r),c=[Ui,Hi].indexOf(r)>=0?"height":"width";if(s&&a){var d=function(e,t){return Cn("number"!=typeof(e="function"==typeof e?e(Object.assign({},t.rects,{placement:t.placement})):e)?e:Sn(e,Xi))}(o.padding,i),u=pn(s),h="y"===l?ji:Ui,p="y"===l?Wi:Hi,m=i.rects.reference[c]+i.rects.reference[l]-a[l]-i.rects.popper[c],f=a[l]-i.rects.reference[l],g=wn(s),y=g?"y"===l?g.clientHeight||0:g.clientWidth||0:0,v=m/2-f/2,b=d[h],w=y-u[c]-d[p],k=y/2-u[c]/2+v,x=xn(b,k,w),C=l;i.modifiersData[n]=((t={})[C]=x,t.centerOffset=x-k,t)}},effect:function(e){var t=e.state,i=e.options.element,n=void 0===i?"[data-popper-arrow]":i;null!=n&&("string"!=typeof n||(n=t.elements.popper.querySelector(n)))&&(sn(n),mn(t.elements.popper,n)&&(t.elements.arrow=n))},requires:["popperOffsets"],requiresIfExists:["preventOverflow"]},{name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:function(e){var t=e.state,i=e.name,n=t.rects.reference,o=t.rects.popper,s=t.modifiersData.preventOverflow,a=jn(t,{elementContext:"reference"}),r=jn(t,{altBoundary:!0}),l=Wn(a,n),c=Wn(r,o,s),d=Hn(l),u=Hn(c);t.modifiersData[i]={referenceClippingOffsets:l,popperEscapeOffsets:c,isReferenceHidden:d,hasPopperEscaped:u},t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-reference-hidden":d,"data-popper-escaped":u})}}]}),Jn="tippy-content",Qn="tippy-arrow",eo="tippy-svg-arrow",to={passive:!0,capture:!0},io=function(){return document.body};function no(e,t,i){if(Array.isArray(e)){var n=e[t];return null==n?Array.isArray(i)?i[t]:i:n}return e}function oo(e,t){var i={}.toString.call(e);return 0===i.indexOf("[object")&&i.indexOf(t+"]")>-1}function so(e,t){return"function"==typeof e?e.apply(void 0,t):e}function ao(e,t){return 0===t?e:function(n){clearTimeout(i),i=setTimeout((function(){e(n)}),t)};var i}function ro(e){return[].concat(e)}function lo(e,t){-1===e.indexOf(t)&&e.push(t)}function co(e){return[].slice.call(e)}function uo(e){return Object.keys(e).reduce((function(t,i){return void 0!==e[i]&&(t[i]=e[i]),t}),{})}function ho(){return document.createElement("div")}function po(e){return["Element","Fragment"].some((function(t){return oo(e,t)}))}function mo(e){return po(e)?[e]:function(e){return oo(e,"NodeList")}(e)?co(e):Array.isArray(e)?e:co(document.querySelectorAll(e))}function fo(e,t){e.forEach((function(e){e&&(e.style.transitionDuration=t+"ms")}))}function go(e,t){e.forEach((function(e){e&&e.setAttribute("data-state",t)}))}function yo(e,t,i){var n=t+"EventListener";["transitionend","webkitTransitionEnd"].forEach((function(t){e[n](t,i)}))}function vo(e,t){for(var i=t;i;){var n;if(e.contains(i))return!0;i=null==i.getRootNode||null==(n=i.getRootNode())?void 0:n.host}return!1}var bo={isTouch:!1},wo=0;function ko(){bo.isTouch||(bo.isTouch=!0,window.performance&&document.addEventListener("mousemove",xo))}function xo(){var e=performance.now();e-wo<20&&(bo.isTouch=!1,document.removeEventListener("mousemove",xo)),wo=e}function Co(){var e,t=document.activeElement;if((e=t)&&e._tippy&&e._tippy.reference===e){var i=t._tippy;t.blur&&!i.state.isVisible&&t.blur()}}var So,Eo=!!("undefined"!=typeof window&&"undefined"!=typeof document)&&!!window.msCrypto;function To(e){return[e+"() was called on a"+("destroy"===e?"n already-":" ")+"destroyed instance. This is a no-op but","indicates a potential memory leak."].join(" ")}function Lo(e){return e.replace(/[ \t]{2,}/g," ").replace(/^[ \t]*/gm,"").trim()}function $o(e){return Lo("\n %ctippy.js\n\n %c"+Lo(e)+"\n\n %c👷‍ This is a development-only message. It will be removed in production.\n ")}function _o(e){return[$o(e),"color: #00C584; font-size: 1.3em; font-weight: bold;","line-height: 1.5","color: #a6a095;"]}function Ao(e,t){var i;e&&!So.has(t)&&(So.add(t),(i=console).warn.apply(i,_o(t)))}function No(e,t){var i;e&&!So.has(t)&&(So.add(t),(i=console).error.apply(i,_o(t)))}So=new Set;var Po={animateFill:!1,followCursor:!1,inlinePositioning:!1,sticky:!1},Bo=Object.assign({appendTo:io,aria:{content:"auto",expanded:"auto"},delay:0,duration:[300,250],getReferenceClientRect:null,hideOnClick:!0,ignoreAttributes:!1,interactive:!1,interactiveBorder:2,interactiveDebounce:0,moveTransition:"",offset:[0,10],onAfterUpdate:function(){},onBeforeUpdate:function(){},onCreate:function(){},onDestroy:function(){},onHidden:function(){},onHide:function(){},onMount:function(){},onShow:function(){},onShown:function(){},onTrigger:function(){},onUntrigger:function(){},onClickOutside:function(){},placement:"top",plugins:[],popperOptions:{},render:null,showOnCreate:!1,touch:!0,trigger:"mouseenter focus",triggerTarget:null},Po,{allowHTML:!1,animation:"fade",arrow:!0,content:"",inertia:!1,maxWidth:350,role:"tooltip",theme:"",zIndex:9999}),Mo=Object.keys(Bo);function Vo(e){var t=(e.plugins||[]).reduce((function(t,i){var n,o=i.name,s=i.defaultValue;o&&(t[o]=void 0!==e[o]?e[o]:null!=(n=Bo[o])?n:s);return t}),{});return Object.assign({},e,t)}function Oo(e,t){var i=Object.assign({},t,{content:so(t.content,[e])},t.ignoreAttributes?{}:function(e,t){return(t?Object.keys(Vo(Object.assign({},Bo,{plugins:t}))):Mo).reduce((function(t,i){var n=(e.getAttribute("data-tippy-"+i)||"").trim();if(!n)return t;if("content"===i)t[i]=n;else try{t[i]=JSON.parse(n)}catch(o){t[i]=n}return t}),{})}(e,t.plugins));return i.aria=Object.assign({},Bo.aria,i.aria),i.aria={expanded:"auto"===i.aria.expanded?t.interactive:i.aria.expanded,content:"auto"===i.aria.content?t.interactive?null:"describedby":i.aria.content},i}function Io(e,t){void 0===e&&(e={}),void 0===t&&(t=[]),Object.keys(e).forEach((function(e){var i,n,o=function(e,t){var i=Object.assign({},e);return t.forEach((function(e){delete i[e]})),i}(Bo,Object.keys(Po)),s=(i=o,n=e,!{}.hasOwnProperty.call(i,n));s&&(s=0===t.filter((function(t){return t.name===e})).length),Ao(s,["`"+e+"`","is not a valid prop. You may have spelled it incorrectly, or if it's","a plugin, forgot to pass it in an array as props.plugins.","\n\n","All props: https://atomiks.github.io/tippyjs/v6/all-props/\n","Plugins: https://atomiks.github.io/tippyjs/v6/plugins/"].join(" "))}))}function zo(e,t){e.innerHTML=t}function Do(e){var t=ho();return!0===e?t.className=Qn:(t.className=eo,po(e)?t.appendChild(e):zo(t,e)),t}function Ro(e,t){po(t.content)?(zo(e,""),e.appendChild(t.content)):"function"!=typeof t.content&&(t.allowHTML?zo(e,t.content):e.textContent=t.content)}function Fo(e){var t=e.firstElementChild,i=co(t.children);return{box:t,content:i.find((function(e){return e.classList.contains(Jn)})),arrow:i.find((function(e){return e.classList.contains(Qn)||e.classList.contains(eo)})),backdrop:i.find((function(e){return e.classList.contains("tippy-backdrop")}))}}function jo(e){var t=ho(),i=ho();i.className="tippy-box",i.setAttribute("data-state","hidden"),i.setAttribute("tabindex","-1");var n=ho();function o(i,n){var o=Fo(t),s=o.box,a=o.content,r=o.arrow;n.theme?s.setAttribute("data-theme",n.theme):s.removeAttribute("data-theme"),"string"==typeof n.animation?s.setAttribute("data-animation",n.animation):s.removeAttribute("data-animation"),n.inertia?s.setAttribute("data-inertia",""):s.removeAttribute("data-inertia"),s.style.maxWidth="number"==typeof n.maxWidth?n.maxWidth+"px":n.maxWidth,n.role?s.setAttribute("role",n.role):s.removeAttribute("role"),i.content===n.content&&i.allowHTML===n.allowHTML||Ro(a,e.props),n.arrow?r?i.arrow!==n.arrow&&(s.removeChild(r),s.appendChild(Do(n.arrow))):s.appendChild(Do(n.arrow)):r&&s.removeChild(r)}return n.className=Jn,n.setAttribute("data-state","hidden"),Ro(n,e.props),t.appendChild(i),i.appendChild(n),o(e.props,e.props),{popper:t,onUpdate:o}}jo.$$tippy=!0;var Wo=1,Ho=[],Uo=[];function qo(e,t){var i,n,o,s,a,r,l,c,d=Oo(e,Object.assign({},Bo,Vo(uo(t)))),u=!1,h=!1,p=!1,m=!1,f=[],g=ao(X,d.interactiveDebounce),y=Wo++,v=(c=d.plugins).filter((function(e,t){return c.indexOf(e)===t})),b={id:y,reference:e,popper:ho(),popperInstance:null,props:d,state:{isEnabled:!0,isVisible:!1,isDestroyed:!1,isMounted:!1,isShown:!1},plugins:v,clearDelayTimeouts:function(){clearTimeout(i),clearTimeout(n),cancelAnimationFrame(o)},setProps:function(t){if(Ao(b.state.isDestroyed,To("setProps")),b.state.isDestroyed)return;B("onBeforeUpdate",[b,t]),U();var i=b.props,n=Oo(e,Object.assign({},i,uo(t),{ignoreAttributes:!0}));b.props=n,H(),i.interactiveDebounce!==n.interactiveDebounce&&(O(),g=ao(X,n.interactiveDebounce));i.triggerTarget&&!n.triggerTarget?ro(i.triggerTarget).forEach((function(e){e.removeAttribute("aria-expanded")})):n.triggerTarget&&e.removeAttribute("aria-expanded");V(),P(),x&&x(i,n);b.popperInstance&&(Z(),Q().forEach((function(e){requestAnimationFrame(e._tippy.popperInstance.forceUpdate)})));B("onAfterUpdate",[b,t])},setContent:function(e){b.setProps({content:e})},show:function(){Ao(b.state.isDestroyed,To("show"));var e=b.state.isVisible,t=b.state.isDestroyed,i=!b.state.isEnabled,n=bo.isTouch&&!b.props.touch,o=no(b.props.duration,0,Bo.duration);if(e||t||i||n)return;if($().hasAttribute("disabled"))return;if(B("onShow",[b],!1),!1===b.props.onShow(b))return;b.state.isVisible=!0,L()&&(k.style.visibility="visible");P(),R(),b.state.isMounted||(k.style.transition="none");if(L()){var s=A(),a=s.box,l=s.content;fo([a,l],0)}r=function(){var e;if(b.state.isVisible&&!m){if(m=!0,k.offsetHeight,k.style.transition=b.props.moveTransition,L()&&b.props.animation){var t=A(),i=t.box,n=t.content;fo([i,n],o),go([i,n],"visible")}M(),V(),lo(Uo,b),null==(e=b.popperInstance)||e.forceUpdate(),B("onMount",[b]),b.props.animation&&L()&&function(e,t){j(e,t)}(o,(function(){b.state.isShown=!0,B("onShown",[b])}))}},function(){var e,t=b.props.appendTo,i=$();e=b.props.interactive&&t===io||"parent"===t?i.parentNode:so(t,[i]);e.contains(k)||e.appendChild(k);b.state.isMounted=!0,Z(),Ao(b.props.interactive&&t===Bo.appendTo&&i.nextElementSibling!==k,["Interactive tippy element may not be accessible via keyboard","navigation because it is not directly after the reference element","in the DOM source order.","\n\n","Using a wrapper <div> or <span> tag around the reference element","solves this by creating a new parentNode context.","\n\n","Specifying `appendTo: document.body` silences this warning, but it","assumes you are using a focus management solution to handle","keyboard navigation.","\n\n","See: https://atomiks.github.io/tippyjs/v6/accessibility/#interactivity"].join(" "))}()},hide:function(){Ao(b.state.isDestroyed,To("hide"));var e=!b.state.isVisible,t=b.state.isDestroyed,i=!b.state.isEnabled,n=no(b.props.duration,1,Bo.duration);if(e||t||i)return;if(B("onHide",[b],!1),!1===b.props.onHide(b))return;b.state.isVisible=!1,b.state.isShown=!1,m=!1,u=!1,L()&&(k.style.visibility="hidden");if(O(),F(),P(!0),L()){var o=A(),s=o.box,a=o.content;b.props.animation&&(fo([s,a],n),go([s,a],"hidden"))}M(),V(),b.props.animation?L()&&function(e,t){j(e,(function(){!b.state.isVisible&&k.parentNode&&k.parentNode.contains(k)&&t()}))}(n,b.unmount):b.unmount()},hideWithInteractivity:function(e){Ao(b.state.isDestroyed,To("hideWithInteractivity")),_().addEventListener("mousemove",g),lo(Ho,g),g(e)},enable:function(){b.state.isEnabled=!0},disable:function(){b.hide(),b.state.isEnabled=!1},unmount:function(){Ao(b.state.isDestroyed,To("unmount")),b.state.isVisible&&b.hide();if(!b.state.isMounted)return;J(),Q().forEach((function(e){e._tippy.unmount()})),k.parentNode&&k.parentNode.removeChild(k);Uo=Uo.filter((function(e){return e!==b})),b.state.isMounted=!1,B("onHidden",[b])},destroy:function(){if(Ao(b.state.isDestroyed,To("destroy")),b.state.isDestroyed)return;b.clearDelayTimeouts(),b.unmount(),U(),delete e._tippy,b.state.isDestroyed=!0,B("onDestroy",[b])}};if(!d.render)return No(!0,"render() function has not been supplied."),b;var w=d.render(b),k=w.popper,x=w.onUpdate;k.setAttribute("data-tippy-root",""),k.id="tippy-"+b.id,b.popper=k,e._tippy=b,k._tippy=b;var C=v.map((function(e){return e.fn(b)})),S=e.hasAttribute("aria-expanded");return H(),V(),P(),B("onCreate",[b]),d.showOnCreate&&ee(),k.addEventListener("mouseenter",(function(){b.props.interactive&&b.state.isVisible&&b.clearDelayTimeouts()})),k.addEventListener("mouseleave",(function(){b.props.interactive&&b.props.trigger.indexOf("mouseenter")>=0&&_().addEventListener("mousemove",g)})),b;function E(){var e=b.props.touch;return Array.isArray(e)?e:[e,0]}function T(){return"hold"===E()[0]}function L(){var e;return!(null==(e=b.props.render)||!e.$$tippy)}function $(){return l||e}function _(){var e,t,i=$().parentNode;return i?null!=(t=ro(i)[0])&&null!=(e=t.ownerDocument)&&e.body?t.ownerDocument:document:document}function A(){return Fo(k)}function N(e){return b.state.isMounted&&!b.state.isVisible||bo.isTouch||s&&"focus"===s.type?0:no(b.props.delay,e?0:1,Bo.delay)}function P(e){void 0===e&&(e=!1),k.style.pointerEvents=b.props.interactive&&!e?"":"none",k.style.zIndex=""+b.props.zIndex}function B(e,t,i){var n;(void 0===i&&(i=!0),C.forEach((function(i){i[e]&&i[e].apply(i,t)})),i)&&(n=b.props)[e].apply(n,t)}function M(){var t=b.props.aria;if(t.content){var i="aria-"+t.content,n=k.id;ro(b.props.triggerTarget||e).forEach((function(e){var t=e.getAttribute(i);if(b.state.isVisible)e.setAttribute(i,t?t+" "+n:n);else{var o=t&&t.replace(n,"").trim();o?e.setAttribute(i,o):e.removeAttribute(i)}}))}}function V(){!S&&b.props.aria.expanded&&ro(b.props.triggerTarget||e).forEach((function(e){b.props.interactive?e.setAttribute("aria-expanded",b.state.isVisible&&e===$()?"true":"false"):e.removeAttribute("aria-expanded")}))}function O(){_().removeEventListener("mousemove",g),Ho=Ho.filter((function(e){return e!==g}))}function I(t){if(!bo.isTouch||!p&&"mousedown"!==t.type){var i=t.composedPath&&t.composedPath()[0]||t.target;if(!b.props.interactive||!vo(k,i)){if(ro(b.props.triggerTarget||e).some((function(e){return vo(e,i)}))){if(bo.isTouch)return;if(b.state.isVisible&&b.props.trigger.indexOf("click")>=0)return}else B("onClickOutside",[b,t]);!0===b.props.hideOnClick&&(b.clearDelayTimeouts(),b.hide(),h=!0,setTimeout((function(){h=!1})),b.state.isMounted||F())}}}function z(){p=!0}function D(){p=!1}function R(){var e=_();e.addEventListener("mousedown",I,!0),e.addEventListener("touchend",I,to),e.addEventListener("touchstart",D,to),e.addEventListener("touchmove",z,to)}function F(){var e=_();e.removeEventListener("mousedown",I,!0),e.removeEventListener("touchend",I,to),e.removeEventListener("touchstart",D,to),e.removeEventListener("touchmove",z,to)}function j(e,t){var i=A().box;function n(e){e.target===i&&(yo(i,"remove",n),t())}if(0===e)return t();yo(i,"remove",a),yo(i,"add",n),a=n}function W(t,i,n){void 0===n&&(n=!1),ro(b.props.triggerTarget||e).forEach((function(e){e.addEventListener(t,i,n),f.push({node:e,eventType:t,handler:i,options:n})}))}function H(){var e;T()&&(W("touchstart",q,{passive:!0}),W("touchend",Y,{passive:!0})),(e=b.props.trigger,e.split(/\s+/).filter(Boolean)).forEach((function(e){if("manual"!==e)switch(W(e,q),e){case"mouseenter":W("mouseleave",Y);break;case"focus":W(Eo?"focusout":"blur",K);break;case"focusin":W("focusout",K)}}))}function U(){f.forEach((function(e){var t=e.node,i=e.eventType,n=e.handler,o=e.options;t.removeEventListener(i,n,o)})),f=[]}function q(e){var t,i=!1;if(b.state.isEnabled&&!G(e)&&!h){var n="focus"===(null==(t=s)?void 0:t.type);s=e,l=e.currentTarget,V(),!b.state.isVisible&&oo(e,"MouseEvent")&&Ho.forEach((function(t){return t(e)})),"click"===e.type&&(b.props.trigger.indexOf("mouseenter")<0||u)&&!1!==b.props.hideOnClick&&b.state.isVisible?i=!0:ee(e),"click"===e.type&&(u=!i),i&&!n&&te(e)}}function X(e){var t=e.target,i=$().contains(t)||k.contains(t);"mousemove"===e.type&&i||function(e,t){var i=t.clientX,n=t.clientY;return e.every((function(e){var t=e.popperRect,o=e.popperState,s=e.props.interactiveBorder,a=o.placement.split("-")[0],r=o.modifiersData.offset;if(!r)return!0;var l="bottom"===a?r.top.y:0,c="top"===a?r.bottom.y:0,d="right"===a?r.left.x:0,u="left"===a?r.right.x:0,h=t.top-n+l>s,p=n-t.bottom-c>s,m=t.left-i+d>s,f=i-t.right-u>s;return h||p||m||f}))}(Q().concat(k).map((function(e){var t,i=null==(t=e._tippy.popperInstance)?void 0:t.state;return i?{popperRect:e.getBoundingClientRect(),popperState:i,props:d}:null})).filter(Boolean),e)&&(O(),te(e))}function Y(e){G(e)||b.props.trigger.indexOf("click")>=0&&u||(b.props.interactive?b.hideWithInteractivity(e):te(e))}function K(e){b.props.trigger.indexOf("focusin")<0&&e.target!==$()||b.props.interactive&&e.relatedTarget&&k.contains(e.relatedTarget)||te(e)}function G(e){return!!bo.isTouch&&T()!==e.type.indexOf("touch")>=0}function Z(){J();var t=b.props,i=t.popperOptions,n=t.placement,o=t.offset,s=t.getReferenceClientRect,a=t.moveTransition,l=L()?Fo(k).arrow:null,c=s?{getBoundingClientRect:s,contextElement:s.contextElement||$()}:e,d=[{name:"offset",options:{offset:o}},{name:"preventOverflow",options:{padding:{top:2,bottom:2,left:5,right:5}}},{name:"flip",options:{padding:5}},{name:"computeStyles",options:{adaptive:!a}},{name:"$$tippy",enabled:!0,phase:"beforeWrite",requires:["computeStyles"],fn:function(e){var t=e.state;if(L()){var i=A().box;["placement","reference-hidden","escaped"].forEach((function(e){"placement"===e?i.setAttribute("data-placement",t.placement):t.attributes.popper["data-popper-"+e]?i.setAttribute("data-"+e,""):i.removeAttribute("data-"+e)})),t.attributes.popper={}}}}];L()&&l&&d.push({name:"arrow",options:{element:l,padding:3}}),d.push.apply(d,(null==i?void 0:i.modifiers)||[]),b.popperInstance=Zn(c,k,Object.assign({},i,{placement:n,onFirstUpdate:r,modifiers:d}))}function J(){b.popperInstance&&(b.popperInstance.destroy(),b.popperInstance=null)}function Q(){return co(k.querySelectorAll("[data-tippy-root]"))}function ee(e){b.clearDelayTimeouts(),e&&B("onTrigger",[b,e]),R();var t=N(!0),n=E(),o=n[0],s=n[1];bo.isTouch&&"hold"===o&&s&&(t=s),t?i=setTimeout((function(){b.show()}),t):b.show()}function te(e){if(b.clearDelayTimeouts(),B("onUntrigger",[b,e]),b.state.isVisible){if(!(b.props.trigger.indexOf("mouseenter")>=0&&b.props.trigger.indexOf("click")>=0&&["mouseleave","mousemove"].indexOf(e.type)>=0&&u)){var t=N(!1);t?n=setTimeout((function(){b.state.isVisible&&b.hide()}),t):o=requestAnimationFrame((function(){b.hide()}))}}else F()}}function Xo(e,t){void 0===t&&(t={});var i=Bo.plugins.concat(t.plugins||[]);!function(e){var t=!e,i="[object Object]"===Object.prototype.toString.call(e)&&!e.addEventListener;No(t,["tippy() was passed","`"+String(e)+"`","as its targets (first) argument. Valid types are: String, Element,","Element[], or NodeList."].join(" ")),No(i,["tippy() was passed a plain object which is not supported as an argument","for virtual positioning. Use props.getReferenceClientRect instead."].join(" "))}(e),Io(t,i),document.addEventListener("touchstart",ko,to),window.addEventListener("blur",Co);var n=Object.assign({},t,{plugins:i}),o=mo(e),s=po(n.content),a=o.length>1;Ao(s&&a,["tippy() was passed an Element as the `content` prop, but more than","one tippy instance was created by this invocation. This means the","content element will only be appended to the last tippy instance.","\n\n","Instead, pass the .innerHTML of the element, or use a function that","returns a cloned version of the element instead.","\n\n","1) content: element.innerHTML\n","2) content: () => element.cloneNode(true)"].join(" "));var r=o.reduce((function(e,t){var i=t&&qo(t,n);return i&&e.push(i),e}),[]);return po(e)?r[0]:r}Xo.defaultProps=Bo,Xo.setDefaultProps=function(e){Io(e,[]),Object.keys(e).forEach((function(t){Bo[t]=e[t]}))},Xo.currentInput=bo,Object.assign({},rn,{effect:function(e){var t=e.state,i={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};Object.assign(t.elements.popper.style,i.popper),t.styles=i,t.elements.arrow&&Object.assign(t.elements.arrow.style,i.arrow)}}),Xo.setDefaultProps({render:jo});const Yo={class:"lew-popover"},Ko={class:"trigger"};var Go=i(t.defineComponent({__name:"LewPopover",props:{trigger:{type:String,default:"click"},placement:{type:String,default:"top"},arrow:{type:Boolean,default:!0}},emits:["onShow","onHide"],setup(e,{expose:i,emit:n}){const o=e;let s,a=t.ref(null),r=t.ref(null);t.onMounted((()=>{let e=o.trigger,t=o.placement;"hover"==e&&(e="mouseenter"),s=Xo(a.value,{theme:"light",trigger:e,content:r.value,animation:"shift-away-subtle",interactive:!0,placement:t,arrow:o.arrow,appendTo:()=>document.body,allowHTML:!0,maxWidth:"none",onShow(e){document.getElementsByTagName("html")[0].classList.contains("lew-dark")?e.popper.children[0].setAttribute("data-theme","dark"):e.popper.children[0].setAttribute("data-theme","light"),n("onShow")},onHide(){n("onHide")}}),s.popper.children[0].setAttribute("data-lew","popover")}));const l=()=>{s.show()},c=()=>{s.hide()};return i({show:l,hide:c}),(e,i)=>(t.openBlock(),t.createElementBlock("div",Yo,[t.createElementVNode("div",{ref_key:"triggerRef",ref:a},[t.createElementVNode("div",Ko,[t.renderSlot(e.$slots,"trigger")])],512),t.createElementVNode("div",{ref_key:"bodyRef",ref:r,class:"lew-popover-body"},[t.renderSlot(e.$slots,"popover-body",{show:l,hide:c})],512)]))}}),[["__file","C:/Users/10570/Desktop/30secWorkSpace/Lew-UI/packages/components/popover/src/LewPopover.vue"]]);const Zo={visible:{type:Boolean,default:!1},width:{type:Number,default:30},height:{type:Number,default:30},position:{type:String,default:""}},Jo=(e,t,i)=>{switch(!0){case!e:return"width:30%;height:100%";case"left"==e:case"right"==e:return`width:${t}%;height:100%`;case"top"==e:case"bottom"==e:return`width:100%;height:${i}%`}},Qo=e=>e?"lew-drawer-main-"+e:"lew-drawer-main-right";var es=i(t.defineComponent({__name:"LewDrawer",props:Zo,emits:["update:visible"],setup(e,{emit:i}){const n=e;r("lew-drawer");let o=t.ref(n.visible),s=t.ref(!1);t.watch((()=>n.visible),(e=>{o.value=e,setTimeout((()=>{s.value=e}),100)}));const a=()=>{s.value=!1,setTimeout((()=>{i("update:visible",!1)}),100)};return(e,i)=>(t.openBlock(),t.createBlock(t.Teleport,{to:"#lew-drawer"},[t.createVNode(t.Transition,{name:"fade"},{default:t.withCtx((()=>[t.unref(o)?(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass(["lew-drawer",{"lew-drawer-show":t.unref(s)}]),onClick:a},[t.createElementVNode("div",{style:t.normalizeStyle(t.unref(Jo)(e.position,e.width,e.height)),class:t.normalizeClass(["lew-drawer-main",t.unref(Qo)(e.position)]),onClick:i[0]||(i[0]=t.withModifiers((()=>{}),["stop"]))},[t.renderSlot(e.$slots,"default")],6)],2)):t.createCommentVNode("v-if",!0)])),_:3})]))}}),[["__file","C:/Users/10570/Desktop/30secWorkSpace/Lew-UI/packages/components/drawer/src/LewDrawer.vue"]]);const ts=["href"],is=["round","src"];var ns=i(t.defineComponent({__name:"LewFancyImage",props:{round:{type:Boolean,default:!1},src:{type:String,default:""},alt:{type:String,default:""}},setup:e=>(i,n)=>(t.openBlock(),t.createElementBlock("a",{class:"lew-fancy-img","data-fancybox":"gallery",href:e.src},[t.createElementVNode("img",{round:e.round,src:e.src},null,8,is)],8,ts))}),[["__scopeId","data-v-68377446"],["__file","C:/Users/10570/Desktop/30secWorkSpace/Lew-UI/packages/components/fancybox/src/LewFancyImage.vue"]]);const os=e=>"object"==typeof e&&null!==e&&e.constructor===Object&&"[object Object]"===Object.prototype.toString.call(e),ss=(...e)=>{let t=!1;"boolean"==typeof e[0]&&(t=e.shift());let i=e[0];if(!i||"object"!=typeof i)throw new Error("extendee must be an object");const n=e.slice(1),o=n.length;for(let s=0;s<o;s++){const e=n[s];for(let n in e)if(e.hasOwnProperty(n)){const o=e[n];if(t&&(Array.isArray(o)||os(o))){const e=Array.isArray(o)?[]:{};i[n]=ss(!0,i.hasOwnProperty(n)?i[n]:e,o)}else i[n]=o}}return i},as=(e,t=1e4)=>(e=parseFloat(e)||0,Math.round((e+Number.EPSILON)*t)/t),rs=function(e){return!!(e&&"object"==typeof e&&e instanceof Element&&e!==document.body)&&!e.__Panzoom&&(function(e){const t=getComputedStyle(e)["overflow-y"],i=getComputedStyle(e)["overflow-x"],n=("scroll"===t||"auto"===t)&&Math.abs(e.scrollHeight-e.clientHeight)>1,o=("scroll"===i||"auto"===i)&&Math.abs(e.scrollWidth-e.clientWidth)>1;return n||o}(e)?e:rs(e.parentNode))},ls="undefined"!=typeof window&&window.ResizeObserver||class{constructor(e){this.observables=[],this.boundCheck=this.check.bind(this),this.boundCheck(),this.callback=e}observe(e){if(this.observables.some((t=>t.el===e)))return;const t={el:e,size:{height:e.clientHeight,width:e.clientWidth}};this.observables.push(t)}unobserve(e){this.observables=this.observables.filter((t=>t.el!==e))}disconnect(){this.observables=[]}check(){const e=this.observables.filter((e=>{const t=e.el.clientHeight,i=e.el.clientWidth;if(e.size.height!==t||e.size.width!==i)return e.size.height=t,e.size.width=i,!0})).map((e=>e.el));e.length>0&&this.callback(e),window.requestAnimationFrame(this.boundCheck)}};class cs{constructor(e){this.id=self.Touch&&e instanceof Touch?e.identifier:-1,this.pageX=e.pageX,this.pageY=e.pageY,this.clientX=e.clientX,this.clientY=e.clientY}}const ds=(e,t)=>t?Math.sqrt((t.clientX-e.clientX)**2+(t.clientY-e.clientY)**2):0,us=(e,t)=>t?{clientX:(e.clientX+t.clientX)/2,clientY:(e.clientY+t.clientY)/2}:e;class hs{constructor(e,{start:t=(()=>!0),move:i=(()=>{}),end:n=(()=>{})}={}){this._element=e,this.startPointers=[],this.currentPointers=[],this._pointerStart=e=>{if(e.buttons>0&&0!==e.button)return;const t=new cs(e);this.currentPointers.some((e=>e.id===t.id))||this._triggerPointerStart(t,e)&&(window.addEventListener("mousemove",this._move),window.addEventListener("mouseup",this._pointerEnd))},this._touchStart=e=>{for(const t of Array.from(e.changedTouches||[]))this._triggerPointerStart(new cs(t),e)},this._move=e=>{const t=this.currentPointers.slice(),i="changedTouches"in e?Array.from(e.changedTouches).map((e=>new cs(e))):[new cs(e)];for(const n of i){const e=this.currentPointers.findIndex((e=>e.id===n.id));e<0||(this.currentPointers[e]=n)}this._moveCallback(t,this.currentPointers.slice(),e)},this._triggerPointerEnd=(e,t)=>{const i=this.currentPointers.findIndex((t=>t.id===e.id));return!(i<0||(this.currentPointers.splice(i,1),this.startPointers.splice(i,1),this._endCallback(e,t),0))},this._pointerEnd=e=>{e.buttons>0&&0!==e.button||this._triggerPointerEnd(new cs(e),e)&&(window.removeEventListener("mousemove",this._move,{passive:!1}),window.removeEventListener("mouseup",this._pointerEnd,{passive:!1}))},this._touchEnd=e=>{for(const t of Array.from(e.changedTouches||[]))this._triggerPointerEnd(new cs(t),e)},this._startCallback=t,this._moveCallback=i,this._endCallback=n,this._element.addEventListener("mousedown",this._pointerStart,{passive:!1}),this._element.addEventListener("touchstart",this._touchStart,{passive:!1}),this._element.addEventListener("touchmove",this._move,{passive:!1}),this._element.addEventListener("touchend",this._touchEnd),this._element.addEventListener("touchcancel",this._touchEnd)}stop(){this._element.removeEventListener("mousedown",this._pointerStart,{passive:!1}),this._element.removeEventListener("touchstart",this._touchStart,{passive:!1}),this._element.removeEventListener("touchmove",this._move,{passive:!1}),this._element.removeEventListener("touchend",this._touchEnd),this._element.removeEventListener("touchcancel",this._touchEnd),window.removeEventListener("mousemove",this._move),window.removeEventListener("mouseup",this._pointerEnd)}_triggerPointerStart(e,t){return!!this._startCallback(e,t)&&(this.currentPointers.push(e),this.startPointers.push(e),!0)}}class ps{constructor(e={}){this.options=ss(!0,{},e),this.plugins=[],this.events={};for(const t of["on","once"])for(const e of Object.entries(this.options[t]||{}))this[t](...e)}option(e,t,...i){let n=(o=e=String(e),s=this.options,o.split(".").reduce((function(e,t){return e&&e[t]}),s));var o,s;return"function"==typeof n&&(n=n.call(this,this,...i)),void 0===n?t:n}localize(e,t=[]){return(e=String(e).replace(/\{\{(\w+).?(\w+)?\}\}/g,((e,i,n)=>{let o="";n?o=this.option(`${i[0]+i.toLowerCase().substring(1)}.l10n.${n}`):i&&(o=this.option(`l10n.${i}`)),o||(o=e);for(let s=0;s<t.length;s++)o=o.split(t[s][0]).join(t[s][1]);return o}))).replace(/\{\{(.*)\}\}/,((e,t)=>t))}on(e,t){if(os(e)){for(const t of Object.entries(e))this.on(...t);return this}return String(e).split(" ").forEach((e=>{const i=this.events[e]=this.events[e]||[];-1==i.indexOf(t)&&i.push(t)})),this}once(e,t){if(os(e)){for(const t of Object.entries(e))this.once(...t);return this}return String(e).split(" ").forEach((e=>{const i=(...n)=>{this.off(e,i),t.call(this,this,...n)};i._=t,this.on(e,i)})),this}off(e,t){if(!os(e))return e.split(" ").forEach((e=>{const i=this.events[e];if(!i||!i.length)return this;let n=-1;for(let o=0,s=i.length;o<s;o++){const e=i[o];if(e&&(e===t||e._===t)){n=o;break}}-1!=n&&i.splice(n,1)})),this;for(const i of Object.entries(e))this.off(...i)}trigger(e,...t){for(const i of[...this.events[e]||[]].slice())if(i&&!1===i.call(this,this,...t))return!1;for(const i of[...this.events["*"]||[]].slice())if(i&&!1===i.call(this,e,this,...t))return!1;return!0}attachPlugins(e){const t={};for(const[i,n]of Object.entries(e||{}))!1===this.options[i]||this.plugins[i]||(this.options[i]=ss({},n.defaults||{},this.options[i]),t[i]=new n(this));for(const[i,n]of Object.entries(t))n.attach(this);return this.plugins=Object.assign({},this.plugins,t),this}detachPlugins(){for(const e in this.plugins){let t;(t=this.plugins[e])&&"function"==typeof t.detach&&t.detach(this)}return this.plugins={},this}}const ms={touch:!0,zoom:!0,pinchToZoom:!0,panOnlyZoomed:!1,lockAxis:!1,friction:.64,decelFriction:.88,zoomFriction:.74,bounceForce:.2,baseScale:1,minScale:1,maxScale:2,step:.5,textSelection:!1,click:"toggleZoom",wheel:"zoom",wheelFactor:42,wheelLimit:5,draggableClass:"is-draggable",draggingClass:"is-dragging",ratio:1};class fs extends ps{constructor(e,t={}){super(ss(!0,{},ms,t)),this.state="init",this.$container=e;for(const i of["onLoad","onWheel","onClick"])this[i]=this[i].bind(this);this.initLayout(),this.resetValues(),this.attachPlugins(fs.Plugins),this.trigger("init"),this.updateMetrics(),this.attachEvents(),this.trigger("ready"),!1===this.option("centerOnStart")?this.state="ready":this.panTo({friction:0}),e.__Panzoom=this}initLayout(){const e=this.$container;if(!(e instanceof HTMLElement))throw new Error("Panzoom: Container not found");const t=this.option("content")||e.querySelector(".panzoom__content");if(!t)throw new Error("Panzoom: Content not found");this.$content=t;let i=this.option("viewport")||e.querySelector(".panzoom__viewport");i||!1===this.option("wrapInner")||(i=document.createElement("div"),i.classList.add("panzoom__viewport"),i.append(...e.childNodes),e.appendChild(i)),this.$viewport=i||t.parentNode}resetValues(){this.updateRate=this.option("updateRate",/iPhone|iPad|iPod|Android/i.test(navigator.userAgent)?250:24),this.container={width:0,height:0},this.viewport={width:0,height:0},this.content={origWidth:0,origHeight:0,width:0,height:0,x:this.option("x",0),y:this.option("y",0),scale:this.option("baseScale")},this.transform={x:0,y:0,scale:1},this.resetDragPosition()}onLoad(e){this.updateMetrics(),this.panTo({scale:this.option("baseScale"),friction:0}),this.trigger("load",e)}onClick(e){if(e.defaultPrevented)return;if(document.activeElement&&document.activeElement.closest("[contenteditable]"))return;if(this.option("textSelection")&&window.getSelection().toString().length&&(!e.target||!e.target.hasAttribute("data-fancybox-close")))return void e.stopPropagation();const t=this.$content.getClientRects()[0];if("ready"!==this.state&&(this.dragPosition.midPoint||Math.abs(t.top-this.dragStart.rect.top)>1||Math.abs(t.left-this.dragStart.rect.left)>1))return e.preventDefault(),void e.stopPropagation();!1!==this.trigger("click",e)&&this.option("zoom")&&"toggleZoom"===this.option("click")&&(e.preventDefault(),e.stopPropagation(),this.zoomWithClick(e))}onWheel(e){!1!==this.trigger("wheel",e)&&this.option("zoom")&&this.option("wheel")&&this.zoomWithWheel(e)}zoomWithWheel(e){void 0===this.changedDelta&&(this.changedDelta=0);const t=Math.max(-1,Math.min(1,-e.deltaY||-e.deltaX||e.wheelDelta||-e.detail)),i=this.content.scale;let n=i*(100+t*this.option("wheelFactor"))/100;if(t<0&&Math.abs(i-this.option("minScale"))<.01||t>0&&Math.abs(i-this.option("maxScale"))<.01?(this.changedDelta+=Math.abs(t),n=i):(this.changedDelta=0,n=Math.max(Math.min(n,this.option("maxScale")),this.option("minScale"))),this.changedDelta>this.option("wheelLimit"))return;if(e.preventDefault(),n===i)return;const o=this.$content.getBoundingClientRect(),s=e.clientX-o.left,a=e.clientY-o.top;this.zoomTo(n,{x:s,y:a})}zoomWithClick(e){const t=this.$content.getClientRects()[0],i=e.clientX-t.left,n=e.clientY-t.top;this.toggleZoom({x:i,y:n})}attachEvents(){this.$content.addEventListener("load",this.onLoad),this.$container.addEventListener("wheel",this.onWheel,{passive:!1}),this.$container.addEventListener("click",this.onClick,{passive:!1}),this.initObserver();const e=new hs(this.$container,{start:(t,i)=>{if(!this.option("touch"))return!1;if(this.velocity.scale<0)return!1;const n=i.composedPath()[0];if(!e.currentPointers.length){if(-1!==["BUTTON","TEXTAREA","OPTION","INPUT","SELECT","VIDEO"].indexOf(n.nodeName))return!1;if(this.option("textSelection")&&((e,t,i)=>{const n=e.childNodes,o=document.createRange();for(let s=0;s<n.length;s++){const e=n[s];if(e.nodeType!==Node.TEXT_NODE)continue;o.selectNodeContents(e);const a=o.getBoundingClientRect();if(t>=a.left&&i>=a.top&&t<=a.right&&i<=a.bottom)return e}return!1})(n,t.clientX,t.clientY))return!1}return!rs(n)&&!1!==this.trigger("touchStart",i)&&("mousedown"===i.type&&i.preventDefault(),this.state="pointerdown",this.resetDragPosition(),this.dragPosition.midPoint=null,this.dragPosition.time=Date.now(),!0)},move:(t,i,n)=>{if("pointerdown"!==this.state)return;if(!1===this.trigger("touchMove",n))return void n.preventDefault();if(i.length<2&&!0===this.option("panOnlyZoomed")&&this.content.width<=this.viewport.width&&this.content.height<=this.viewport.height&&this.transform.scale<=this.option("baseScale"))return;if(i.length>1&&(!this.option("zoom")||!1===this.option("pinchToZoom")))return;const o=us(t[0],t[1]),s=us(i[0],i[1]),a=s.clientX-o.clientX,r=s.clientY-o.clientY,l=ds(t[0],t[1]),c=ds(i[0],i[1]),d=l&&c?c/l:1;this.dragOffset.x+=a,this.dragOffset.y+=r,this.dragOffset.scale*=d,this.dragOffset.time=Date.now()-this.dragPosition.time;const u=1===this.dragStart.scale&&this.option("lockAxis");if(u&&!this.lockAxis){if(Math.abs(this.dragOffset.x)<6&&Math.abs(this.dragOffset.y)<6)return void n.preventDefault();const e=Math.abs(180*Math.atan2(this.dragOffset.y,this.dragOffset.x)/Math.PI);this.lockAxis=e>45&&e<135?"y":"x"}if("xy"===u||"y"!==this.lockAxis){if(n.preventDefault(),n.stopPropagation(),n.stopImmediatePropagation(),this.lockAxis&&(this.dragOffset["x"===this.lockAxis?"y":"x"]=0),this.$container.classList.add(this.option("draggingClass")),this.transform.scale===this.option("baseScale")&&"y"===this.lockAxis||(this.dragPosition.x=this.dragStart.x+this.dragOffset.x),this.transform.scale===this.option("baseScale")&&"x"===this.lockAxis||(this.dragPosition.y=this.dragStart.y+this.dragOffset.y),this.dragPosition.scale=this.dragStart.scale*this.dragOffset.scale,i.length>1){const t=us(e.startPointers[0],e.startPointers[1]),i=t.clientX-this.dragStart.rect.x,n=t.clientY-this.dragStart.rect.y,{deltaX:o,deltaY:a}=this.getZoomDelta(this.content.scale*this.dragOffset.scale,i,n);this.dragPosition.x-=o,this.dragPosition.y-=a,this.dragPosition.midPoint=s}else this.setDragResistance();this.transform={x:this.dragPosition.x,y:this.dragPosition.y,scale:this.dragPosition.scale},this.startAnimation()}},end:(t,i)=>{if("pointerdown"!==this.state)return;if(this._dragOffset={...this.dragOffset},e.currentPointers.length)return void this.resetDragPosition();if(this.state="decel",this.friction=this.option("decelFriction"),this.recalculateTransform(),this.$container.classList.remove(this.option("draggingClass")),!1===this.trigger("touchEnd",i))return;if("decel"!==this.state)return;const n=this.option("minScale");if(this.transform.scale<n)return void this.zoomTo(n,{friction:.64});const o=this.option("maxScale");if(this.transform.scale-o>.01){const e=this.dragPosition.midPoint||t,i=this.$content.getClientRects()[0];this.zoomTo(o,{friction:.64,x:e.clientX-i.left,y:e.clientY-i.top})}}});this.pointerTracker=e}initObserver(){this.resizeObserver||(this.resizeObserver=new ls((()=>{this.updateTimer||(this.updateTimer=setTimeout((()=>{const e=this.$container.getBoundingClientRect();e.width&&e.height?((Math.abs(e.width-this.container.width)>1||Math.abs(e.height-this.container.height)>1)&&(this.isAnimating()&&this.endAnimation(!0),this.updateMetrics(),this.panTo({x:this.content.x,y:this.content.y,scale:this.option("baseScale"),friction:0})),this.updateTimer=null):this.updateTimer=null}),this.updateRate))})),this.resizeObserver.observe(this.$container))}resetDragPosition(){this.lockAxis=null,this.friction=this.option("friction"),this.velocity={x:0,y:0,scale:0};const{x:e,y:t,scale:i}=this.content;this.dragStart={rect:this.$content.getBoundingClientRect(),x:e,y:t,scale:i},this.dragPosition={...this.dragPosition,x:e,y:t,scale:i},this.dragOffset={x:0,y:0,scale:1,time:0}}updateMetrics(e){!0!==e&&this.trigger("beforeUpdate");const t=this.$container,i=this.$content,n=this.$viewport,o=i instanceof HTMLImageElement,s=this.option("zoom"),a=this.option("resizeParent",s);let r=this.option("width"),l=this.option("height"),c=r||(d=i,Math.max(parseFloat(d.naturalWidth||0),parseFloat(d.width&&d.width.baseVal&&d.width.baseVal.value||0),parseFloat(d.offsetWidth||0),parseFloat(d.scrollWidth||0)));var d;let u=l||(h=i,Math.max(parseFloat(h.naturalHeight||0),parseFloat(h.height&&h.height.baseVal&&h.height.baseVal.value||0),parseFloat(h.offsetHeight||0),parseFloat(h.scrollHeight||0)));var h;Object.assign(i.style,{width:r?`${r}px`:"",height:l?`${l}px`:"",maxWidth:"",maxHeight:""}),a&&Object.assign(n.style,{width:"",height:""});const p=this.option("ratio");c=as(c*p),u=as(u*p),r=c,l=u;const m=i.getBoundingClientRect(),f=n.getBoundingClientRect(),g=n==t?f:t.getBoundingClientRect();let y=Math.max(n.offsetWidth,as(f.width)),v=Math.max(n.offsetHeight,as(f.height)),b=window.getComputedStyle(n);if(y-=parseFloat(b.paddingLeft)+parseFloat(b.paddingRight),v-=parseFloat(b.paddingTop)+parseFloat(b.paddingBottom),this.viewport.width=y,this.viewport.height=v,s){if(Math.abs(c-m.width)>.1||Math.abs(u-m.height)>.1){const e=((e,t,i,n)=>{const o=Math.min(i/e||0,n/t);return{width:e*o||0,height:t*o||0}})(c,u,Math.min(c,m.width),Math.min(u,m.height));r=as(e.width),l=as(e.height)}Object.assign(i.style,{width:`${r}px`,height:`${l}px`,transform:""})}if(a&&(Object.assign(n.style,{width:`${r}px`,height:`${l}px`}),this.viewport={...this.viewport,width:r,height:l}),o&&s&&"function"!=typeof this.options.maxScale){const e=this.option("maxScale");this.options.maxScale=function(){return this.content.origWidth>0&&this.content.fitWidth>0?this.content.origWidth/this.content.fitWidth:e}}this.content={...this.content,origWidth:c,origHeight:u,fitWidth:r,fitHeight:l,width:r,height:l,scale:1,isZoomable:s},this.container={width:g.width,height:g.height},!0!==e&&this.trigger("afterUpdate")}zoomIn(e){this.zoomTo(this.content.scale+(e||this.option("step")))}zoomOut(e){this.zoomTo(this.content.scale-(e||this.option("step")))}toggleZoom(e={}){const t=this.option("maxScale"),i=this.option("baseScale"),n=this.content.scale>i+.5*(t-i)?i:t;this.zoomTo(n,e)}zoomTo(e=this.option("baseScale"),{x:t=null,y:i=null}={}){e=Math.max(Math.min(e,this.option("maxScale")),this.option("minScale"));const n=as(this.content.scale/(this.content.width/this.content.fitWidth),1e7);null===t&&(t=this.content.width*n*.5),null===i&&(i=this.content.height*n*.5);const{deltaX:o,deltaY:s}=this.getZoomDelta(e,t,i);t=this.content.x-o,i=this.content.y-s,this.panTo({x:t,y:i,scale:e,friction:this.option("zoomFriction")})}getZoomDelta(e,t=0,i=0){const n=this.content.fitWidth*this.content.scale,o=this.content.fitHeight*this.content.scale,s=t>0&&n?t/n:0,a=i>0&&o?i/o:0;return{deltaX:(this.content.fitWidth*e-n)*s,deltaY:(this.content.fitHeight*e-o)*a}}panTo({x:e=this.content.x,y:t=this.content.y,scale:i,friction:n=this.option("friction"),ignoreBounds:o=!1}={}){if(i=i||this.content.scale||1,!o){const{boundX:n,boundY:o}=this.getBounds(i);n&&(e=Math.max(Math.min(e,n.to),n.from)),o&&(t=Math.max(Math.min(t,o.to),o.from))}this.friction=n,this.transform={...this.transform,x:e,y:t,scale:i},n?(this.state="panning",this.velocity={x:(1/this.friction-1)*(e-this.content.x),y:(1/this.friction-1)*(t-this.content.y),scale:(1/this.friction-1)*(i-this.content.scale)},this.startAnimation()):this.endAnimation()}startAnimation(){this.rAF?cancelAnimationFrame(this.rAF):this.trigger("startAnimation"),this.rAF=requestAnimationFrame((()=>this.animate()))}animate(){if(this.setEdgeForce(),this.setDragForce(),this.velocity.x*=this.friction,this.velocity.y*=this.friction,this.velocity.scale*=this.friction,this.content.x+=this.velocity.x,this.content.y+=this.velocity.y,this.content.scale+=this.velocity.scale,this.isAnimating())this.setTransform();else if("pointerdown"!==this.state)return void this.endAnimation();this.rAF=requestAnimationFrame((()=>this.animate()))}getBounds(e){let t=this.boundX,i=this.boundY;if(void 0!==t&&void 0!==i)return{boundX:t,boundY:i};t={from:0,to:0},i={from:0,to:0},e=e||this.transform.scale;const n=this.content.fitWidth*e,o=this.content.fitHeight*e,s=this.viewport.width,a=this.viewport.height;if(n<s){const e=as(.5*(s-n));t.from=e,t.to=e}else t.from=as(s-n);if(o<a){const e=.5*(a-o);i.from=e,i.to=e}else i.from=as(a-o);return{boundX:t,boundY:i}}setEdgeForce(){if("decel"!==this.state)return;const e=this.option("bounceForce"),{boundX:t,boundY:i}=this.getBounds(Math.max(this.transform.scale,this.content.scale));let n,o,s,a;if(t&&(n=this.content.x<t.from,o=this.content.x>t.to),i&&(s=this.content.y<i.from,a=this.content.y>i.to),n||o){let i=((n?t.from:t.to)-this.content.x)*e;const o=this.content.x+(this.velocity.x+i)/this.friction;o>=t.from&&o<=t.to&&(i+=this.velocity.x),this.velocity.x=i,this.recalculateTransform()}if(s||a){let t=((s?i.from:i.to)-this.content.y)*e;const n=this.content.y+(t+this.velocity.y)/this.friction;n>=i.from&&n<=i.to&&(t+=this.velocity.y),this.velocity.y=t,this.recalculateTransform()}}setDragResistance(){if("pointerdown"!==this.state)return;const{boundX:e,boundY:t}=this.getBounds(this.dragPosition.scale);let i,n,o,s;if(e&&(i=this.dragPosition.x<e.from,n=this.dragPosition.x>e.to),t&&(o=this.dragPosition.y<t.from,s=this.dragPosition.y>t.to),(i||n)&&(!i||!n)){const t=i?e.from:e.to,n=t-this.dragPosition.x;this.dragPosition.x=t-.3*n}if((o||s)&&(!o||!s)){const e=o?t.from:t.to,i=e-this.dragPosition.y;this.dragPosition.y=e-.3*i}}setDragForce(){"pointerdown"===this.state&&(this.velocity.x=this.dragPosition.x-this.content.x,this.velocity.y=this.dragPosition.y-this.content.y,this.velocity.scale=this.dragPosition.scale-this.content.scale)}recalculateTransform(){this.transform.x=this.content.x+this.velocity.x/(1/this.friction-1),this.transform.y=this.content.y+this.velocity.y/(1/this.friction-1),this.transform.scale=this.content.scale+this.velocity.scale/(1/this.friction-1)}isAnimating(){return!(!this.friction||!(Math.abs(this.velocity.x)>.05||Math.abs(this.velocity.y)>.05||Math.abs(this.velocity.scale)>.05))}setTransform(e){let t,i,n;if(e?(t=as(this.transform.x),i=as(this.transform.y),n=this.transform.scale,this.content={...this.content,x:t,y:i,scale:n}):(t=as(this.content.x),i=as(this.content.y),n=this.content.scale/(this.content.width/this.content.fitWidth),this.content={...this.content,x:t,y:i}),this.trigger("beforeTransform"),t=as(this.content.x),i=as(this.content.y),e&&this.option("zoom")){let e,o;e=as(this.content.fitWidth*n),o=as(this.content.fitHeight*n),this.content.width=e,this.content.height=o,this.transform={...this.transform,width:e,height:o,scale:n},Object.assign(this.$content.style,{width:`${e}px`,height:`${o}px`,maxWidth:"none",maxHeight:"none",transform:`translate3d(${t}px, ${i}px, 0) scale(1)`})}else this.$content.style.transform=`translate3d(${t}px, ${i}px, 0) scale(${n})`;this.trigger("afterTransform")}endAnimation(e){cancelAnimationFrame(this.rAF),this.rAF=null,this.velocity={x:0,y:0,scale:0},this.setTransform(!0),this.state="ready",this.handleCursor(),!0!==e&&this.trigger("endAnimation")}handleCursor(){const e=this.option("draggableClass");e&&this.option("touch")&&(1==this.option("panOnlyZoomed")&&this.content.width<=this.viewport.width&&this.content.height<=this.viewport.height&&this.transform.scale<=this.option("baseScale")?this.$container.classList.remove(e):this.$container.classList.add(e))}detachEvents(){this.$content.removeEventListener("load",this.onLoad),this.$container.removeEventListener("wheel",this.onWheel,{passive:!1}),this.$container.removeEventListener("click",this.onClick,{passive:!1}),this.pointerTracker&&(this.pointerTracker.stop(),this.pointerTracker=null),this.resizeObserver&&(this.resizeObserver.disconnect(),this.resizeObserver=null)}destroy(){"destroy"!==this.state&&(this.state="destroy",clearTimeout(this.updateTimer),this.updateTimer=null,cancelAnimationFrame(this.rAF),this.rAF=null,this.detachEvents(),this.detachPlugins(),this.resetDragPosition())}}fs.version="4.0.29",fs.Plugins={};const gs=(e,t)=>{let i=0;return function(...n){const o=(new Date).getTime();if(!(o-i<t))return i=o,e(...n)}};class ys{constructor(e){this.$container=null,this.$prev=null,this.$next=null,this.carousel=e,this.onRefresh=this.onRefresh.bind(this)}option(e){return this.carousel.option(`Navigation.${e}`)}createButton(e){const t=document.createElement("button");t.setAttribute("title",this.carousel.localize(`{{${e.toUpperCase()}}}`));const i=this.option("classNames.button")+" "+this.option(`classNames.${e}`);return t.classList.add(...i.split(" ")),t.setAttribute("tabindex","0"),t.innerHTML=this.carousel.localize(this.option(`${e}Tpl`)),t.addEventListener("click",(t=>{t.preventDefault(),t.stopPropagation(),this.carousel["slide"+("next"===e?"Next":"Prev")]()})),t}build(){this.$container||(this.$container=document.createElement("div"),this.$container.classList.add(...this.option("classNames.main").split(" ")),this.carousel.$container.appendChild(this.$container)),this.$next||(this.$next=this.createButton("next"),this.$container.appendChild(this.$next)),this.$prev||(this.$prev=this.createButton("prev"),this.$container.appendChild(this.$prev))}onRefresh(){const e=this.carousel.pages.length;e<=1||e>1&&this.carousel.elemDimWidth<this.carousel.wrapDimWidth&&!Number.isInteger(this.carousel.option("slidesPerPage"))?this.cleanup():(this.build(),this.$prev.removeAttribute("disabled"),this.$next.removeAttribute("disabled"),this.carousel.option("infiniteX",this.carousel.option("infinite"))||(this.carousel.page<=0&&this.$prev.setAttribute("disabled",""),this.carousel.page>=e-1&&this.$next.setAttribute("disabled","")))}cleanup(){this.$prev&&this.$prev.remove(),this.$prev=null,this.$next&&this.$next.remove(),this.$next=null,this.$container&&this.$container.remove(),this.$container=null}attach(){this.carousel.on("refresh change",this.onRefresh)}detach(){this.carousel.off("refresh change",this.onRefresh),this.cleanup()}}ys.defaults={prevTpl:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" tabindex="-1"><path d="M15 3l-9 9 9 9"/></svg>',nextTpl:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" tabindex="-1"><path d="M9 3l9 9-9 9"/></svg>',classNames:{main:"carousel__nav",button:"carousel__button",next:"is-next",prev:"is-prev"}};class vs{constructor(e){this.carousel=e,this.selectedIndex=null,this.friction=0,this.onNavReady=this.onNavReady.bind(this),this.onNavClick=this.onNavClick.bind(this),this.onNavCreateSlide=this.onNavCreateSlide.bind(this),this.onTargetChange=this.onTargetChange.bind(this)}addAsTargetFor(e){this.target=this.carousel,this.nav=e,this.attachEvents()}addAsNavFor(e){this.target=e,this.nav=this.carousel,this.attachEvents()}attachEvents(){this.nav.options.initialSlide=this.target.options.initialPage,this.nav.on("ready",this.onNavReady),this.nav.on("createSlide",this.onNavCreateSlide),this.nav.on("Panzoom.click",this.onNavClick),this.target.on("change",this.onTargetChange),this.target.on("Panzoom.afterUpdate",this.onTargetChange)}onNavReady(){this.onTargetChange(!0)}onNavClick(e,t,i){const n=i.target.closest(".carousel__slide");if(!n)return;i.stopPropagation();const o=parseInt(n.dataset.index,10),s=this.target.findPageForSlide(o);this.target.page!==s&&this.target.slideTo(s,{friction:this.friction}),this.markSelectedSlide(o)}onNavCreateSlide(e,t){t.index===this.selectedIndex&&this.markSelectedSlide(t.index)}onTargetChange(){const e=this.target.pages[this.target.page].indexes[0],t=this.nav.findPageForSlide(e);this.nav.slideTo(t),this.markSelectedSlide(e)}markSelectedSlide(e){this.selectedIndex=e,[...this.nav.slides].filter((e=>e.$el&&e.$el.classList.remove("is-nav-selected")));const t=this.nav.slides[e];t&&t.$el&&t.$el.classList.add("is-nav-selected")}attach(e){const t=e.options.Sync;(t.target||t.nav)&&(t.target?this.addAsNavFor(t.target):t.nav&&this.addAsTargetFor(t.nav),this.friction=t.friction)}detach(){this.nav&&(this.nav.off("ready",this.onNavReady),this.nav.off("Panzoom.click",this.onNavClick),this.nav.off("createSlide",this.onNavCreateSlide)),this.target&&(this.target.off("Panzoom.afterUpdate",this.onTargetChange),this.target.off("change",this.onTargetChange))}}vs.defaults={friction:.92};const bs={Navigation:ys,Dots:class{constructor(e){this.carousel=e,this.$list=null,this.events={change:this.onChange.bind(this),refresh:this.onRefresh.bind(this)}}buildList(){if(this.carousel.pages.length<this.carousel.option("Dots.minSlideCount"))return;const e=document.createElement("ol");return e.classList.add("carousel__dots"),e.addEventListener("click",(e=>{if(!("page"in e.target.dataset))return;e.preventDefault(),e.stopPropagation();const t=parseInt(e.target.dataset.page,10),i=this.carousel;t!==i.page&&(i.pages.length<3&&i.option("infinite")?i[0==t?"slidePrev":"slideNext"]():i.slideTo(t))})),this.$list=e,this.carousel.$container.appendChild(e),this.carousel.$container.classList.add("has-dots"),e}removeList(){this.$list&&(this.$list.parentNode.removeChild(this.$list),this.$list=null),this.carousel.$container.classList.remove("has-dots")}rebuildDots(){let e=this.$list;const t=!!e,i=this.carousel.pages.length;if(i<2)return void(t&&this.removeList());t||(e=this.buildList());const n=this.$list.children.length;if(n>i)for(let o=i;o<n;o++)this.$list.removeChild(this.$list.lastChild);else{for(let e=n;e<i;e++){const t=document.createElement("li");t.classList.add("carousel__dot"),t.dataset.page=e,t.setAttribute("role","button"),t.setAttribute("tabindex","0"),t.setAttribute("title",this.carousel.localize("{{GOTO}}",[["%d",e+1]])),t.addEventListener("keydown",(e=>{const i=e.code;let n;"Enter"===i||"NumpadEnter"===i?n=t:"ArrowRight"===i?n=t.nextSibling:"ArrowLeft"===i&&(n=t.previousSibling),n&&n.click()})),this.$list.appendChild(t)}this.setActiveDot()}}setActiveDot(){if(!this.$list)return;this.$list.childNodes.forEach((e=>{e.classList.remove("is-selected")}));const e=this.$list.childNodes[this.carousel.page];e&&e.classList.add("is-selected")}onChange(){this.setActiveDot()}onRefresh(){this.rebuildDots()}attach(){this.carousel.on(this.events)}detach(){this.removeList(),this.carousel.off(this.events),this.carousel=null}},Sync:vs},ws={slides:[],preload:0,slidesPerPage:"auto",initialPage:null,initialSlide:null,friction:.92,center:!0,infinite:!0,fill:!0,dragFree:!1,prefix:"",classNames:{viewport:"carousel__viewport",track:"carousel__track",slide:"carousel__slide",slideSelected:"is-selected"},l10n:{NEXT:"Next slide",PREV:"Previous slide",GOTO:"Go to slide #%d"}};class ks extends ps{constructor(e,t={}){if(super(t=ss(!0,{},ws,t)),this.state="init",this.$container=e,!(this.$container instanceof HTMLElement))throw new Error("No root element provided");this.slideNext=gs(this.slideNext.bind(this),250),this.slidePrev=gs(this.slidePrev.bind(this),250),this.init(),e.__Carousel=this}init(){this.pages=[],this.page=this.pageIndex=null,this.prevPage=this.prevPageIndex=null,this.attachPlugins(ks.Plugins),this.trigger("init"),this.initLayout(),this.initSlides(),this.updateMetrics(),this.$track&&this.pages.length&&(this.$track.style.transform=`translate3d(${-1*this.pages[this.page].left}px, 0px, 0) scale(1)`),this.manageSlideVisiblity(),this.initPanzoom(),this.state="ready",this.trigger("ready")}initLayout(){const e=this.option("prefix"),t=this.option("classNames");this.$viewport=this.option("viewport")||this.$container.querySelector(`.${e}${t.viewport}`),this.$viewport||(this.$viewport=document.createElement("div"),this.$viewport.classList.add(...(e+t.viewport).split(" ")),this.$viewport.append(...this.$container.childNodes),this.$container.appendChild(this.$viewport)),this.$track=this.option("track")||this.$container.querySelector(`.${e}${t.track}`),this.$track||(this.$track=document.createElement("div"),this.$track.classList.add(...(e+t.track).split(" ")),this.$track.append(...this.$viewport.childNodes),this.$viewport.appendChild(this.$track))}initSlides(){this.slides=[],this.$viewport.querySelectorAll(`.${this.option("prefix")}${this.option("classNames.slide")}`).forEach((e=>{const t={$el:e,isDom:!0};this.slides.push(t),this.trigger("createSlide",t,this.slides.length)})),Array.isArray(this.options.slides)&&(this.slides=ss(!0,[...this.slides],this.options.slides))}updateMetrics(){let e,t=0,i=[];this.slides.forEach(((n,o)=>{const s=n.$el,a=n.isDom||!e?this.getSlideMetrics(s):e;n.index=o,n.width=a,n.left=t,e=a,t+=a,i.push(o)}));let n=Math.max(this.$track.offsetWidth,as(this.$track.getBoundingClientRect().width)),o=getComputedStyle(this.$track);n-=parseFloat(o.paddingLeft)+parseFloat(o.paddingRight),this.contentWidth=t,this.viewportWidth=n;const s=[],a=this.option("slidesPerPage");if(Number.isInteger(a)&&t>n)for(let h=0;h<this.slides.length;h+=a)s.push({indexes:i.slice(h,h+a),slides:this.slides.slice(h,h+a)});else{let e=0,t=0;for(let i=0;i<this.slides.length;i+=1){let o=this.slides[i];(!s.length||t+o.width>n)&&(s.push({indexes:[],slides:[]}),e=s.length-1,t=0),t+=o.width,s[e].indexes.push(i),s[e].slides.push(o)}}const r=this.option("center"),l=this.option("fill");s.forEach(((e,i)=>{e.index=i,e.width=e.slides.reduce(((e,t)=>e+t.width),0),e.left=e.slides[0].left,r&&(e.left+=.5*(n-e.width)*-1),l&&!this.option("infiniteX",this.option("infinite"))&&t>n&&(e.left=Math.max(e.left,0),e.left=Math.min(e.left,t-n))}));const c=[];let d;s.forEach((e=>{const t={...e};d&&t.left===d.left?(d.width+=t.width,d.slides=[...d.slides,...t.slides],d.indexes=[...d.indexes,...t.indexes]):(t.index=c.length,d=t,c.push(t))})),this.pages=c;let u=this.page;if(null===u){const e=this.option("initialSlide");u=null!==e?this.findPageForSlide(e):parseInt(this.option("initialPage",0),10)||0,c[u]||(u=c.length&&u>c.length?c[c.length-1].index:0),this.page=u,this.pageIndex=u}this.updatePanzoom(),this.trigger("refresh")}getSlideMetrics(e){if(!e){const t=this.slides[0];(e=document.createElement("div")).dataset.isTestEl=1,e.style.visibility="hidden",e.classList.add(...(this.option("prefix")+this.option("classNames.slide")).split(" ")),t.customClass&&e.classList.add(...t.customClass.split(" ")),this.$track.prepend(e)}let t=Math.max(e.offsetWidth,as(e.getBoundingClientRect().width));const i=e.currentStyle||window.getComputedStyle(e);return t=t+(parseFloat(i.marginLeft)||0)+(parseFloat(i.marginRight)||0),e.dataset.isTestEl&&e.remove(),t}findPageForSlide(e){e=parseInt(e,10)||0;const t=this.pages.find((t=>t.indexes.indexOf(e)>-1));return t?t.index:null}slideNext(){this.slideTo(this.pageIndex+1)}slidePrev(){this.slideTo(this.pageIndex-1)}slideTo(e,t={}){const{x:i=-1*this.setPage(e,!0),y:n=0,friction:o=this.option("friction")}=t;this.Panzoom.content.x===i&&!this.Panzoom.velocity.x&&o||(this.Panzoom.panTo({x:i,y:n,friction:o,ignoreBounds:!0}),"ready"===this.state&&"ready"===this.Panzoom.state&&this.trigger("settle"))}initPanzoom(){this.Panzoom&&this.Panzoom.destroy();const e=ss(!0,{},{content:this.$track,wrapInner:!1,resizeParent:!1,zoom:!1,click:!1,lockAxis:"x",x:this.pages.length?-1*this.pages[this.page].left:0,centerOnStart:!1,textSelection:()=>this.option("textSelection",!1),panOnlyZoomed:function(){return this.content.width<=this.viewport.width}},this.option("Panzoom"));this.Panzoom=new fs(this.$container,e),this.Panzoom.on({"*":(e,...t)=>this.trigger(`Panzoom.${e}`,...t),afterUpdate:()=>{this.updatePage()},beforeTransform:this.onBeforeTransform.bind(this),touchEnd:this.onTouchEnd.bind(this),endAnimation:()=>{this.trigger("settle")}}),this.updateMetrics(),this.manageSlideVisiblity()}updatePanzoom(){this.Panzoom&&(this.Panzoom.content={...this.Panzoom.content,fitWidth:this.contentWidth,origWidth:this.contentWidth,width:this.contentWidth},this.pages.length>1&&this.option("infiniteX",this.option("infinite"))?this.Panzoom.boundX=null:this.pages.length&&(this.Panzoom.boundX={from:-1*this.pages[this.pages.length-1].left,to:-1*this.pages[0].left}),this.option("infiniteY",this.option("infinite"))?this.Panzoom.boundY=null:this.Panzoom.boundY={from:0,to:0},this.Panzoom.handleCursor())}manageSlideVisiblity(){const e=this.contentWidth,t=this.viewportWidth;let i=this.Panzoom?-1*this.Panzoom.content.x:this.pages.length?this.pages[this.page].left:0;const n=this.option("preload"),o=this.option("infiniteX",this.option("infinite")),s=parseFloat(getComputedStyle(this.$viewport,null).getPropertyValue("padding-left")),a=parseFloat(getComputedStyle(this.$viewport,null).getPropertyValue("padding-right"));this.slides.forEach((r=>{let l,c,d=0;l=i-s,c=i+t+a,l-=n*(t+s+a),c+=n*(t+s+a);const u=r.left+r.width>l&&r.left<c;l=i+e-s,c=i+e+t+a,l-=n*(t+s+a);const h=o&&r.left+r.width>l&&r.left<c;l=i-e-s,c=i-e+t+a,l-=n*(t+s+a);const p=o&&r.left+r.width>l&&r.left<c;h||u||p?(this.createSlideEl(r),u&&(d=0),h&&(d=-1),p&&(d=1),r.left+r.width>i&&r.left<=i+t+a&&(d=0)):this.removeSlideEl(r),r.hasDiff=d}));let r=0,l=0;this.slides.forEach(((t,i)=>{let n=0;t.$el?(i!==r||t.hasDiff?n=l+t.hasDiff*e:l=0,t.$el.style.left=Math.abs(n)>.1?`${l+t.hasDiff*e}px`:"",r++):l+=t.width})),this.markSelectedSlides()}createSlideEl(e){if(!e)return;if(e.$el){let t=e.$el.dataset.index;if(!t||parseInt(t,10)!==e.index){let t;e.$el.dataset.index=e.index,e.$el.querySelectorAll("[data-lazy-srcset]").forEach((e=>{e.srcset=e.dataset.lazySrcset})),e.$el.querySelectorAll("[data-lazy-src]").forEach((e=>{let t=e.dataset.lazySrc;e instanceof HTMLImageElement?e.src=t:e.style.backgroundImage=`url('${t}')`})),(t=e.$el.dataset.lazySrc)&&(e.$el.style.backgroundImage=`url('${t}')`),e.state="ready"}return}const t=document.createElement("div");t.dataset.index=e.index,t.classList.add(...(this.option("prefix")+this.option("classNames.slide")).split(" ")),e.customClass&&t.classList.add(...e.customClass.split(" ")),e.html&&(t.innerHTML=e.html);const i=[];this.slides.forEach(((e,t)=>{e.$el&&i.push(t)}));const n=e.index;let o=null;if(i.length){let e=i.reduce(((e,t)=>Math.abs(t-n)<Math.abs(e-n)?t:e));o=this.slides[e]}return this.$track.insertBefore(t,o&&o.$el?o.index<e.index?o.$el.nextSibling:o.$el:null),e.$el=t,this.trigger("createSlide",e,n),e}removeSlideEl(e){e.$el&&!e.isDom&&(this.trigger("removeSlide",e),e.$el.remove(),e.$el=null)}markSelectedSlides(){const e=this.option("classNames.slideSelected"),t="aria-hidden";this.slides.forEach(((i,n)=>{const o=i.$el;if(!o)return;const s=this.pages[this.page];s&&s.indexes&&s.indexes.indexOf(n)>-1?(e&&!o.classList.contains(e)&&(o.classList.add(e),this.trigger("selectSlide",i)),o.removeAttribute(t)):(e&&o.classList.contains(e)&&(o.classList.remove(e),this.trigger("unselectSlide",i)),o.setAttribute(t,!0))}))}updatePage(){this.updateMetrics(),this.slideTo(this.page,{friction:0})}onBeforeTransform(){this.option("infiniteX",this.option("infinite"))&&this.manageInfiniteTrack(),this.manageSlideVisiblity()}manageInfiniteTrack(){const e=this.contentWidth,t=this.viewportWidth;if(!this.option("infiniteX",this.option("infinite"))||this.pages.length<2||e<t)return;const i=this.Panzoom;let n=!1;return i.content.x<-1*(e-t)&&(i.content.x+=e,this.pageIndex=this.pageIndex-this.pages.length,n=!0),i.content.x>t&&(i.content.x-=e,this.pageIndex=this.pageIndex+this.pages.length,n=!0),n&&"pointerdown"===i.state&&i.resetDragPosition(),n}onTouchEnd(e,t){const i=this.option("dragFree");if(!i&&this.pages.length>1&&e.dragOffset.time<350&&Math.abs(e.dragOffset.y)<1&&Math.abs(e.dragOffset.x)>5)this[e.dragOffset.x<0?"slideNext":"slidePrev"]();else if(i){const[,t]=this.getPageFromPosition(-1*e.transform.x);this.setPage(t)}else this.slideToClosest()}slideToClosest(e={}){let[,t]=this.getPageFromPosition(-1*this.Panzoom.content.x);this.slideTo(t,e)}getPageFromPosition(e){const t=this.pages.length;this.option("center")&&(e+=.5*this.viewportWidth);const i=Math.floor(e/this.contentWidth);e-=i*this.contentWidth;let n=this.slides.find((t=>t.left<=e&&t.left+t.width>e));if(n){let e=this.findPageForSlide(n.index);return[e,e+i*t]}return[0,0]}setPage(e,t){let i=0,n=parseInt(e,10)||0;const o=this.page,s=this.pageIndex,a=this.pages.length,r=this.contentWidth,l=this.viewportWidth;if(e=(n%a+a)%a,this.option("infiniteX",this.option("infinite"))&&r>l){const o=Math.floor(n/a)||0,s=r;if(i=this.pages[e].left+o*s,!0===t&&a>2){let e=-1*this.Panzoom.content.x;const t=i-s,o=i+s,r=Math.abs(e-i),l=Math.abs(e-t),c=Math.abs(e-o);c<r&&c<=l?(i=o,n+=a):l<r&&l<c&&(i=t,n-=a)}}else e=n=Math.max(0,Math.min(n,a-1)),i=this.pages.length?this.pages[e].left:0;return this.page=e,this.pageIndex=n,null!==o&&e!==o&&(this.prevPage=o,this.prevPageIndex=s,this.trigger("change",e,o)),i}destroy(){this.state="destroy",this.slides.forEach((e=>{this.removeSlideEl(e)})),this.slides=[],this.Panzoom.destroy(),this.detachPlugins()}}ks.version="4.0.29",ks.Plugins=bs;const xs=!("undefined"==typeof window||!window.document||!window.document.createElement);let Cs=null;const Ss=["a[href]","area[href]",'input:not([disabled]):not([type="hidden"]):not([aria-hidden])',"select:not([disabled]):not([aria-hidden])","textarea:not([disabled]):not([aria-hidden])","button:not([disabled]):not([aria-hidden])","iframe","object","embed","video","audio","[contenteditable]",'[tabindex]:not([tabindex^="-"]):not([disabled]):not([aria-hidden])'],Es=e=>{if(e&&xs){null===Cs&&document.createElement("div").focus({get preventScroll(){return Cs=!0,!1}});try{if(e.setActive)e.setActive();else if(Cs)e.focus({preventScroll:!0});else{const t=window.pageXOffset||document.body.scrollTop,i=window.pageYOffset||document.body.scrollLeft;e.focus(),document.body.scrollTo({top:t,left:i,behavior:"auto"})}}catch(t){}}};class Ts{constructor(e){this.fancybox=e,this.$container=null,this.state="init";for(const t of["onPrepare","onClosing","onKeydown"])this[t]=this[t].bind(this);this.events={prepare:this.onPrepare,closing:this.onClosing,keydown:this.onKeydown}}onPrepare(){this.getSlides().length<this.fancybox.option("Thumbs.minSlideCount")?this.state="disabled":!0===this.fancybox.option("Thumbs.autoStart")&&this.fancybox.Carousel.Panzoom.content.height>=this.fancybox.option("Thumbs.minScreenHeight")&&this.build()}onClosing(){this.Carousel&&this.Carousel.Panzoom.detachEvents()}onKeydown(e,t){t===e.option("Thumbs.key")&&this.toggle()}build(){if(this.$container)return;const e=document.createElement("div");e.classList.add("fancybox__thumbs"),this.fancybox.$carousel.parentNode.insertBefore(e,this.fancybox.$carousel.nextSibling),this.Carousel=new ks(e,ss(!0,{Dots:!1,Navigation:!1,Sync:{friction:0},infinite:!1,center:!0,fill:!0,dragFree:!0,slidesPerPage:1,preload:1},this.fancybox.option("Thumbs.Carousel"),{Sync:{target:this.fancybox.Carousel},slides:this.getSlides()})),this.Carousel.Panzoom.on("wheel",((e,t)=>{t.preventDefault(),this.fancybox[t.deltaY<0?"prev":"next"]()})),this.$container=e,this.state="visible"}getSlides(){const e=[];for(const t of this.fancybox.items){const i=t.thumb;i&&e.push({html:`<div class="fancybox__thumb" style="background-image:url('${i}')"></div>`,customClass:`has-thumb has-${t.type||"image"}`})}return e}toggle(){"visible"===this.state?this.hide():"hidden"===this.state?this.show():this.build()}show(){"hidden"===this.state&&(this.$container.style.display="",this.Carousel.Panzoom.attachEvents(),this.state="visible")}hide(){"visible"===this.state&&(this.Carousel.Panzoom.detachEvents(),this.$container.style.display="none",this.state="hidden")}cleanup(){this.Carousel&&(this.Carousel.destroy(),this.Carousel=null),this.$container&&(this.$container.remove(),this.$container=null),this.state="init"}attach(){this.fancybox.on(this.events)}detach(){this.fancybox.off(this.events),this.cleanup()}}Ts.defaults={minSlideCount:2,minScreenHeight:500,autoStart:!0,key:"t",Carousel:{}};const Ls=(e,t)=>{const i=new URL(e),n=new URLSearchParams(i.search);let o=new URLSearchParams;for(const[a,r]of[...n,...Object.entries(t)])"t"===a?o.set("start",parseInt(r)):o.set(a,r);o=o.toString();let s=e.match(/#t=((.*)?\d+s)/);return s&&(o+=`#t=${s[1]}`),o},$s={video:{autoplay:!0,ratio:16/9},youtube:{autohide:1,fs:1,rel:0,hd:1,wmode:"transparent",enablejsapi:1,html5:1},vimeo:{hd:1,show_title:1,show_byline:1,show_portrait:0,fullscreen:1},html5video:{tpl:'<video class="fancybox__html5video" playsinline controls controlsList="nodownload" poster="{{poster}}">\n <source src="{{src}}" type="{{format}}" />Sorry, your browser doesn\'t support embedded videos.</video>',format:""}};class _s{constructor(e){this.fancybox=e;for(const t of["onInit","onReady","onCreateSlide","onRemoveSlide","onSelectSlide","onUnselectSlide","onRefresh","onMessage"])this[t]=this[t].bind(this);this.events={init:this.onInit,ready:this.onReady,"Carousel.createSlide":this.onCreateSlide,"Carousel.removeSlide":this.onRemoveSlide,"Carousel.selectSlide":this.onSelectSlide,"Carousel.unselectSlide":this.onUnselectSlide,"Carousel.refresh":this.onRefresh}}onInit(){for(const e of this.fancybox.items)this.processType(e)}processType(e){if(e.html)return e.src=e.html,e.type="html",void delete e.html;const t=e.src||"";let i=e.type||this.fancybox.options.type,n=null;if(!t||"string"==typeof t){if(n=t.match(/(?:youtube\.com|youtu\.be|youtube\-nocookie\.com)\/(?:watch\?(?:.*&)?v=|v\/|u\/|embed\/?)?(videoseries\?list=(?:.*)|[\w-]{11}|\?listType=(?:.*)&list=(?:.*))(?:.*)/i)){const o=Ls(t,this.fancybox.option("Html.youtube")),s=encodeURIComponent(n[1]);e.videoId=s,e.src=`https://www.youtube-nocookie.com/embed/${s}?${o}`,e.thumb=e.thumb||`https://i.ytimg.com/vi/${s}/mqdefault.jpg`,e.vendor="youtube",i="video"}else if(n=t.match(/^.+vimeo.com\/(?:\/)?([\d]+)(.*)?/)){const o=Ls(t,this.fancybox.option("Html.vimeo")),s=encodeURIComponent(n[1]);e.videoId=s,e.src=`https://player.vimeo.com/video/${s}?${o}`,e.vendor="vimeo",i="video"}else(n=t.match(/(?:maps\.)?google\.([a-z]{2,3}(?:\.[a-z]{2})?)\/(?:(?:(?:maps\/(?:place\/(?:.*)\/)?\@(.*),(\d+.?\d+?)z))|(?:\?ll=))(.*)?/i))?(e.src=`//maps.google.${n[1]}/?ll=${(n[2]?n[2]+"&z="+Math.floor(n[3])+(n[4]?n[4].replace(/^\//,"&"):""):n[4]+"").replace(/\?/,"&")}&output=${n[4]&&n[4].indexOf("layer=c")>0?"svembed":"embed"}`,i="map"):(n=t.match(/(?:maps\.)?google\.([a-z]{2,3}(?:\.[a-z]{2})?)\/(?:maps\/search\/)(.*)/i))&&(e.src=`//maps.google.${n[1]}/maps?q=${n[2].replace("query=","q=").replace("api=1","")}&output=embed`,i="map");i||("#"===t.charAt(0)?i="inline":(n=t.match(/\.(mp4|mov|ogv|webm)((\?|#).*)?$/i))?(i="html5video",e.format=e.format||"video/"+("ogv"===n[1]?"ogg":n[1])):t.match(/(^data:image\/[a-z0-9+\/=]*,)|(\.(jp(e|g|eg)|gif|png|bmp|webp|svg|ico)((\?|#).*)?$)/i)?i="image":t.match(/\.(pdf)((\?|#).*)?$/i)&&(i="pdf")),e.type=i||this.fancybox.option("defaultType","image"),"html5video"!==i&&"video"!==i||(e.video=ss({},this.fancybox.option("Html.video"),e.video),e._width&&e._height?e.ratio=parseFloat(e._width)/parseFloat(e._height):e.ratio=e.ratio||e.video.ratio||$s.video.ratio)}}onReady(){this.fancybox.Carousel.slides.forEach((e=>{e.$el&&(this.setContent(e),e.index===this.fancybox.getSlide().index&&this.playVideo(e))}))}onCreateSlide(e,t,i){"ready"===this.fancybox.state&&this.setContent(i)}loadInlineContent(e){let t;if(e.src instanceof HTMLElement)t=e.src;else if("string"==typeof e.src){const i=e.src.split("#",2),n=2===i.length&&""===i[0]?i[1]:i[0];t=document.getElementById(n)}if(t){if("clone"===e.type||t.$placeHolder){t=t.cloneNode(!0);let i=t.getAttribute("id");i=i?`${i}--clone`:`clone-${this.fancybox.id}-${e.index}`,t.setAttribute("id",i)}else{const e=document.createElement("div");e.classList.add("fancybox-placeholder"),t.parentNode.insertBefore(e,t),t.$placeHolder=e}this.fancybox.setContent(e,t)}else this.fancybox.setError(e,"{{ELEMENT_NOT_FOUND}}")}loadAjaxContent(e){const t=this.fancybox,i=new XMLHttpRequest;t.showLoading(e),i.onreadystatechange=function(){i.readyState===XMLHttpRequest.DONE&&"ready"===t.state&&(t.hideLoading(e),200===i.status?t.setContent(e,i.responseText):t.setError(e,404===i.status?"{{AJAX_NOT_FOUND}}":"{{AJAX_FORBIDDEN}}"))};const n=e.ajax||null;i.open(n?"POST":"GET",e.src),i.setRequestHeader("Content-Type","application/x-www-form-urlencoded"),i.setRequestHeader("X-Requested-With","XMLHttpRequest"),i.send(n),e.xhr=i}loadIframeContent(e){const t=this.fancybox,i=document.createElement("iframe");if(i.className="fancybox__iframe",i.setAttribute("id",`fancybox__iframe_${t.id}_${e.index}`),i.setAttribute("allow","autoplay; fullscreen"),i.setAttribute("scrolling","auto"),e.$iframe=i,"iframe"!==e.type||!1===e.preload)return i.setAttribute("src",e.src),this.fancybox.setContent(e,i),void this.resizeIframe(e);t.showLoading(e);const n=document.createElement("div");n.style.visibility="hidden",this.fancybox.setContent(e,n),n.appendChild(i),i.onerror=()=>{t.setError(e,"{{IFRAME_ERROR}}")},i.onload=()=>{t.hideLoading(e);let n=!1;i.isReady||(i.isReady=!0,n=!0),i.src.length&&(i.parentNode.style.visibility="",this.resizeIframe(e),n&&t.revealContent(e))},i.setAttribute("src",e.src)}setAspectRatio(e){const t=e.$content,i=e.ratio;if(!t)return;let n=e._width,o=e._height;if(i||n&&o){Object.assign(t.style,{width:n&&o?"100%":"",height:n&&o?"100%":"",maxWidth:"",maxHeight:""});let e=t.offsetWidth,s=t.offsetHeight;if(n=n||e,o=o||s,n>e||o>s){let t=Math.min(e/n,s/o);n*=t,o*=t}Math.abs(n/o-i)>.01&&(i<n/o?n=o*i:o=n/i),Object.assign(t.style,{width:`${n}px`,height:`${o}px`})}}resizeIframe(e){const t=e.$iframe;if(!t)return;let i=e._width||0,n=e._height||0;i&&n&&(e.autoSize=!1);const o=t.parentNode,s=o&&o.style;if(!1!==e.preload&&!1!==e.autoSize&&s)try{const e=window.getComputedStyle(o),a=parseFloat(e.paddingLeft)+parseFloat(e.paddingRight),r=parseFloat(e.paddingTop)+parseFloat(e.paddingBottom),l=t.contentWindow.document,c=l.getElementsByTagName("html")[0],d=l.body;s.width="",d.style.overflow="hidden",i=i||c.scrollWidth+a,s.width=`${i}px`,d.style.overflow="",s.flex="0 0 auto",s.height=`${d.scrollHeight}px`,n=c.scrollHeight+r}catch(a){}if(i||n){const e={flex:"0 1 auto"};i&&(e.width=`${i}px`),n&&(e.height=`${n}px`),Object.assign(s,e)}}onRefresh(e,t){t.slides.forEach((e=>{e.$el&&(e.$iframe&&this.resizeIframe(e),e.ratio&&this.setAspectRatio(e))}))}setContent(e){if(e&&!e.isDom){switch(e.type){case"html":this.fancybox.setContent(e,e.src);break;case"html5video":this.fancybox.setContent(e,this.fancybox.option("Html.html5video.tpl").replace(/\{\{src\}\}/gi,e.src).replace("{{format}}",e.format||e.html5video&&e.html5video.format||"").replace("{{poster}}",e.poster||e.thumb||""));break;case"inline":case"clone":this.loadInlineContent(e);break;case"ajax":this.loadAjaxContent(e);break;case"pdf":case"video":case"map":e.preload=!1;case"iframe":this.loadIframeContent(e)}e.ratio&&this.setAspectRatio(e)}}onSelectSlide(e,t,i){"ready"===e.state&&this.playVideo(i)}playVideo(e){if("html5video"===e.type&&e.video.autoplay)try{const t=e.$el.querySelector("video");if(t){const e=t.play();void 0!==e&&e.then((()=>{})).catch((e=>{t.muted=!0,t.play()}))}}catch(i){}if("video"!==e.type||!e.$iframe||!e.$iframe.contentWindow)return;const t=()=>{if("done"===e.state&&e.$iframe&&e.$iframe.contentWindow){let t;if(e.$iframe.isReady)return e.video&&e.video.autoplay&&(t="youtube"==e.vendor?{event:"command",func:"playVideo"}:{method:"play",value:"true"}),void(t&&e.$iframe.contentWindow.postMessage(JSON.stringify(t),"*"));"youtube"===e.vendor&&(t={event:"listening",id:e.$iframe.getAttribute("id")},e.$iframe.contentWindow.postMessage(JSON.stringify(t),"*"))}e.poller=setTimeout(t,250)};t()}onUnselectSlide(e,t,i){if("html5video"===i.type){try{i.$el.querySelector("video").pause()}catch(o){}return}let n=!1;"vimeo"==i.vendor?n={method:"pause",value:"true"}:"youtube"===i.vendor&&(n={event:"command",func:"pauseVideo"}),n&&i.$iframe&&i.$iframe.contentWindow&&i.$iframe.contentWindow.postMessage(JSON.stringify(n),"*"),clearTimeout(i.poller)}onRemoveSlide(e,t,i){i.xhr&&(i.xhr.abort(),i.xhr=null),i.$iframe&&(i.$iframe.onload=i.$iframe.onerror=null,i.$iframe.src="//about:blank",i.$iframe=null);const n=i.$content;"inline"===i.type&&n&&(n.classList.remove("fancybox__content"),"none"!==n.style.display&&(n.style.display="none")),i.$closeButton&&(i.$closeButton.remove(),i.$closeButton=null);const o=n&&n.$placeHolder;o&&(o.parentNode.insertBefore(n,o),o.remove(),n.$placeHolder=null)}onMessage(e){try{let t=JSON.parse(e.data);if("https://player.vimeo.com"===e.origin){if("ready"===t.event)for(let i of document.getElementsByClassName("fancybox__iframe"))i.contentWindow===e.source&&(i.isReady=1)}else"https://www.youtube-nocookie.com"===e.origin&&"onReady"===t.event&&(document.getElementById(t.id).isReady=1)}catch(t){}}attach(){this.fancybox.on(this.events),window.addEventListener("message",this.onMessage,!1)}detach(){this.fancybox.off(this.events),window.removeEventListener("message",this.onMessage,!1)}}_s.defaults=$s;class As{constructor(e){this.fancybox=e;for(const t of["onReady","onClosing","onDone","onPageChange","onCreateSlide","onRemoveSlide","onImageStatusChange"])this[t]=this[t].bind(this);this.events={ready:this.onReady,closing:this.onClosing,done:this.onDone,"Carousel.change":this.onPageChange,"Carousel.createSlide":this.onCreateSlide,"Carousel.removeSlide":this.onRemoveSlide}}onReady(){this.fancybox.Carousel.slides.forEach((e=>{e.$el&&this.setContent(e)}))}onDone(e,t){this.handleCursor(t)}onClosing(e){clearTimeout(this.clickTimer),this.clickTimer=null,e.Carousel.slides.forEach((e=>{e.$image&&(e.state="destroy"),e.Panzoom&&e.Panzoom.detachEvents()})),"closing"===this.fancybox.state&&this.canZoom(e.getSlide())&&this.zoomOut()}onCreateSlide(e,t,i){"ready"===this.fancybox.state&&this.setContent(i)}onRemoveSlide(e,t,i){i.$image&&(i.$el.classList.remove(e.option("Image.canZoomInClass")),i.$image.remove(),i.$image=null),i.Panzoom&&(i.Panzoom.destroy(),i.Panzoom=null),i.$el&&i.$el.dataset&&delete i.$el.dataset.imageFit}setContent(e){if(e.isDom||e.html||e.type&&"image"!==e.type)return;if(e.$image)return;e.type="image",e.state="loading";const t=document.createElement("div");t.style.visibility="hidden";const i=document.createElement("img");i.addEventListener("load",(t=>{t.stopImmediatePropagation(),this.onImageStatusChange(e)})),i.addEventListener("error",(()=>{this.onImageStatusChange(e)})),i.src=e.src,i.alt="",i.draggable=!1,i.classList.add("fancybox__image"),e.srcset&&i.setAttribute("srcset",e.srcset),e.sizes&&i.setAttribute("sizes",e.sizes),e.$image=i;const n=this.fancybox.option("Image.wrap");if(n){const o=document.createElement("div");o.classList.add("string"==typeof n?n:"fancybox__image-wrap"),o.appendChild(i),t.appendChild(o),e.$wrap=o}else t.appendChild(i);e.$el.dataset.imageFit=this.fancybox.option("Image.fit"),this.fancybox.setContent(e,t),i.complete||i.error?this.onImageStatusChange(e):this.fancybox.showLoading(e)}onImageStatusChange(e){const t=e.$image;t&&"loading"===e.state&&(t.complete&&t.naturalWidth&&t.naturalHeight?(this.fancybox.hideLoading(e),"contain"===this.fancybox.option("Image.fit")&&this.initSlidePanzoom(e),e.$el.addEventListener("wheel",(t=>this.onWheel(e,t)),{passive:!1}),e.$content.addEventListener("click",(t=>this.onClick(e,t)),{passive:!1}),this.revealContent(e)):this.fancybox.setError(e,"{{IMAGE_ERROR}}"))}initSlidePanzoom(e){e.Panzoom||(e.Panzoom=new fs(e.$el,ss(!0,this.fancybox.option("Image.Panzoom",{}),{viewport:e.$wrap,content:e.$image,width:e._width,height:e._height,wrapInner:!1,textSelection:!0,touch:this.fancybox.option("Image.touch"),panOnlyZoomed:!0,click:!1,wheel:!1})),e.Panzoom.on("startAnimation",(()=>{this.fancybox.trigger("Image.startAnimation",e)})),e.Panzoom.on("endAnimation",(()=>{"zoomIn"===e.state&&this.fancybox.done(e),this.handleCursor(e),this.fancybox.trigger("Image.endAnimation",e)})),e.Panzoom.on("afterUpdate",(()=>{this.handleCursor(e),this.fancybox.trigger("Image.afterUpdate",e)})))}revealContent(e){null===this.fancybox.Carousel.prevPage&&e.index===this.fancybox.options.startIndex&&this.canZoom(e)?this.zoomIn():this.fancybox.revealContent(e)}getZoomInfo(e){const t=e.$thumb.getBoundingClientRect(),i=t.width,n=t.height,o=e.$content.getBoundingClientRect(),s=o.width,a=o.height,r=o.top-t.top,l=o.left-t.left;let c=this.fancybox.option("Image.zoomOpacity");return"auto"===c&&(c=Math.abs(i/n-s/a)>.1),{top:r,left:l,scale:s&&i?i/s:1,opacity:c}}canZoom(e){const t=this.fancybox,i=t.$container;if(window.visualViewport&&1!==window.visualViewport.scale)return!1;if(e.Panzoom&&!e.Panzoom.content.width)return!1;if(!t.option("Image.zoom")||"contain"!==t.option("Image.fit"))return!1;const n=e.$thumb;if(!n||"loading"===e.state)return!1;i.classList.add("fancybox__no-click");const o=n.getBoundingClientRect();let s;if(this.fancybox.option("Image.ignoreCoveredThumbnail")){const e=document.elementFromPoint(o.left+1,o.top+1)===n,t=document.elementFromPoint(o.right-1,o.bottom-1)===n;s=e&&t}else s=document.elementFromPoint(o.left+.5*o.width,o.top+.5*o.height)===n;return i.classList.remove("fancybox__no-click"),s}zoomIn(){const e=this.fancybox,t=e.getSlide(),i=t.Panzoom,{top:n,left:o,scale:s,opacity:a}=this.getZoomInfo(t);e.trigger("reveal",t),i.panTo({x:-1*o,y:-1*n,scale:s,friction:0,ignoreBounds:!0}),t.$content.style.visibility="",t.state="zoomIn",!0===a&&i.on("afterTransform",(e=>{"zoomIn"!==t.state&&"zoomOut"!==t.state||(e.$content.style.opacity=Math.min(1,1-(1-e.content.scale)/(1-s)))})),i.panTo({x:0,y:0,scale:1,friction:this.fancybox.option("Image.zoomFriction")})}zoomOut(){const e=this.fancybox,t=e.getSlide(),i=t.Panzoom;if(!i)return;t.state="zoomOut",e.state="customClosing",t.$caption&&(t.$caption.style.visibility="hidden");let n=this.fancybox.option("Image.zoomFriction");const o=e=>{const{top:o,left:s,scale:a,opacity:r}=this.getZoomInfo(t);e||r||(n*=.82),i.panTo({x:-1*s,y:-1*o,scale:a,friction:n,ignoreBounds:!0}),n*=.98};window.addEventListener("scroll",o),i.once("endAnimation",(()=>{window.removeEventListener("scroll",o),e.destroy()})),o()}handleCursor(e){if("image"!==e.type||!e.$el)return;const t=e.Panzoom,i=this.fancybox.option("Image.click",!1,e),n=this.fancybox.option("Image.touch"),o=e.$el.classList,s=this.fancybox.option("Image.canZoomInClass"),a=this.fancybox.option("Image.canZoomOutClass");o.remove(a),o.remove(s),t&&"toggleZoom"===i?t&&1===t.content.scale&&t.option("maxScale")-t.content.scale>.01?o.add(s):t.content.scale>1&&!n&&o.add(a):"close"===i&&o.add(a)}onWheel(e,t){if("ready"===this.fancybox.state&&!1!==this.fancybox.trigger("Image.wheel",t))switch(this.fancybox.option("Image.wheel")){case"zoom":"done"===e.state&&e.Panzoom&&e.Panzoom.zoomWithWheel(t);break;case"close":this.fancybox.close();break;case"slide":this.fancybox[t.deltaY<0?"prev":"next"]()}}onClick(e,t){if("ready"!==this.fancybox.state)return;const i=e.Panzoom;if(i&&(i.dragPosition.midPoint||0!==i.dragOffset.x||0!==i.dragOffset.y||1!==i.dragOffset.scale))return;if(this.fancybox.Carousel.Panzoom.lockAxis)return!1;const n=i=>{switch(i){case"toggleZoom":t.stopPropagation(),e.Panzoom&&e.Panzoom.zoomWithClick(t);break;case"close":this.fancybox.close();break;case"next":t.stopPropagation(),this.fancybox.next()}},o=this.fancybox.option("Image.click"),s=this.fancybox.option("Image.doubleClick");s?this.clickTimer?(clearTimeout(this.clickTimer),this.clickTimer=null,n(s)):this.clickTimer=setTimeout((()=>{this.clickTimer=null,n(o)}),300):n(o)}onPageChange(e,t){const i=e.getSlide();t.slides.forEach((e=>{e.Panzoom&&"done"===e.state&&e.index!==i.index&&e.Panzoom.panTo({x:0,y:0,scale:1,friction:.8})}))}attach(){this.fancybox.on(this.events)}detach(){this.fancybox.off(this.events)}}As.defaults={canZoomInClass:"can-zoom_in",canZoomOutClass:"can-zoom_out",zoom:!0,zoomOpacity:"auto",zoomFriction:.82,ignoreCoveredThumbnail:!1,touch:!0,click:"toggleZoom",doubleClick:null,wheel:"zoom",fit:"contain",wrap:!1,Panzoom:{ratio:1}};class Ns{constructor(e){this.fancybox=e;for(const t of["onChange","onClosing"])this[t]=this[t].bind(this);this.events={initCarousel:this.onChange,"Carousel.change":this.onChange,closing:this.onClosing},this.hasCreatedHistory=!1,this.origHash="",this.timer=null}onChange(e){const t=e.Carousel;this.timer&&clearTimeout(this.timer);const i=null===t.prevPage,n=e.getSlide(),o=new URL(document.URL).hash;let s=!1;if(n.slug)s="#"+n.slug;else{const i=n.$trigger&&n.$trigger.dataset,o=e.option("slug")||i&&i.fancybox;o&&o.length&&"true"!==o&&(s="#"+o+(t.slides.length>1?"-"+(n.index+1):""))}i&&(this.origHash=o!==s?o:""),s&&o!==s&&(this.timer=setTimeout((()=>{try{window.history[i?"pushState":"replaceState"]({},document.title,window.location.pathname+window.location.search+s),i&&(this.hasCreatedHistory=!0)}catch(e){}}),300))}onClosing(){if(this.timer&&clearTimeout(this.timer),!0!==this.hasSilentClose)try{return void window.history.replaceState({},document.title,window.location.pathname+window.location.search+(this.origHash||""))}catch(Gr){}}attach(e){e.on(this.events)}detach(e){e.off(this.events)}static startFromUrl(){const e=Ns.Fancybox;if(!e||e.getInstance()||!1===e.defaults.Hash)return;const{hash:t,slug:i,index:n}=Ns.getParsedURL();if(!i)return;let o=document.querySelector(`[data-slug="${t}"]`);if(o&&o.dispatchEvent(new CustomEvent("click",{bubbles:!0,cancelable:!0})),e.getInstance())return;const s=document.querySelectorAll(`[data-fancybox="${i}"]`);s.length&&(null===n&&1===s.length?o=s[0]:n&&(o=s[n-1]),o&&o.dispatchEvent(new CustomEvent("click",{bubbles:!0,cancelable:!0})))}static onHashChange(){const{slug:e,index:t}=Ns.getParsedURL(),i=Ns.Fancybox,n=i&&i.getInstance();if(n&&n.plugins.Hash){if(e){const i=n.Carousel;if(e===n.option("slug"))return i.slideTo(t-1);for(let t of i.slides)if(t.slug&&t.slug===e)return i.slideTo(t.index);const o=n.getSlide(),s=o.$trigger&&o.$trigger.dataset;if(s&&s.fancybox===e)return i.slideTo(t-1)}n.plugins.Hash.hasSilentClose=!0,n.close()}Ns.startFromUrl()}static create(e){function t(){window.addEventListener("hashchange",Ns.onHashChange,!1),Ns.startFromUrl()}Ns.Fancybox=e,xs&&window.requestAnimationFrame((()=>{/complete|interactive|loaded/.test(document.readyState)?t():document.addEventListener("DOMContentLoaded",t)}))}static destroy(){window.removeEventListener("hashchange",Ns.onHashChange,!1)}static getParsedURL(){const e=window.location.hash.substr(1),t=e.split("-"),i=t.length>1&&/^\+?\d+$/.test(t[t.length-1])&&parseInt(t.pop(-1),10)||null;return{hash:e,slug:t.join("-"),index:i}}}const Ps={pageXOffset:0,pageYOffset:0,element:()=>document.fullscreenElement||document.mozFullScreenElement||document.webkitFullscreenElement,activate(e){Ps.pageXOffset=window.pageXOffset,Ps.pageYOffset=window.pageYOffset,e.requestFullscreen?e.requestFullscreen():e.mozRequestFullScreen?e.mozRequestFullScreen():e.webkitRequestFullscreen?e.webkitRequestFullscreen():e.msRequestFullscreen&&e.msRequestFullscreen()},deactivate(){document.exitFullscreen?document.exitFullscreen():document.mozCancelFullScreen?document.mozCancelFullScreen():document.webkitExitFullscreen&&document.webkitExitFullscreen()}};class Bs{constructor(e){this.fancybox=e,this.active=!1,this.handleVisibilityChange=this.handleVisibilityChange.bind(this)}isActive(){return this.active}setTimer(){if(!this.active||this.timer)return;const e=this.fancybox.option("slideshow.delay",3e3);this.timer=setTimeout((()=>{this.timer=null,this.fancybox.option("infinite")||this.fancybox.getSlide().index!==this.fancybox.Carousel.slides.length-1?this.fancybox.next():this.fancybox.jumpTo(0,{friction:0})}),e);let t=this.$progress;t||(t=document.createElement("div"),t.classList.add("fancybox__progress"),this.fancybox.$carousel.parentNode.insertBefore(t,this.fancybox.$carousel),this.$progress=t,t.offsetHeight),t.style.transitionDuration=`${e}ms`,t.style.transform="scaleX(1)"}clearTimer(){clearTimeout(this.timer),this.timer=null,this.$progress&&(this.$progress.style.transitionDuration="",this.$progress.style.transform="",this.$progress.offsetHeight)}activate(){this.active||(this.active=!0,this.fancybox.$container.classList.add("has-slideshow"),"done"===this.fancybox.getSlide().state&&this.setTimer(),document.addEventListener("visibilitychange",this.handleVisibilityChange,!1))}handleVisibilityChange(){this.deactivate()}deactivate(){this.active=!1,this.clearTimer(),this.fancybox.$container.classList.remove("has-slideshow"),document.removeEventListener("visibilitychange",this.handleVisibilityChange,!1)}toggle(){this.active?this.deactivate():this.fancybox.Carousel.slides.length>1&&this.activate()}}const Ms={display:["counter","zoom","slideshow","fullscreen","thumbs","close"],autoEnable:!0,items:{counter:{position:"left",type:"div",class:"fancybox__counter",html:'<span data-fancybox-index=""></span>&nbsp;/&nbsp;<span data-fancybox-count=""></span>',attr:{tabindex:-1}},prev:{type:"button",class:"fancybox__button--prev",label:"PREV",html:'<svg viewBox="0 0 24 24"><path d="M15 4l-8 8 8 8"/></svg>',attr:{"data-fancybox-prev":""}},next:{type:"button",class:"fancybox__button--next",label:"NEXT",html:'<svg viewBox="0 0 24 24"><path d="M8 4l8 8-8 8"/></svg>',attr:{"data-fancybox-next":""}},fullscreen:{type:"button",class:"fancybox__button--fullscreen",label:"TOGGLE_FULLSCREEN",html:'<svg viewBox="0 0 24 24">\n <g><path d="M3 8 V3h5"></path><path d="M21 8V3h-5"></path><path d="M8 21H3v-5"></path><path d="M16 21h5v-5"></path></g>\n <g><path d="M7 2v5H2M17 2v5h5M2 17h5v5M22 17h-5v5"/></g>\n </svg>',click:function(e){e.preventDefault(),Ps.element()?Ps.deactivate():Ps.activate(this.fancybox.$container)}},slideshow:{type:"button",class:"fancybox__button--slideshow",label:"TOGGLE_SLIDESHOW",html:'<svg viewBox="0 0 24 24">\n <g><path d="M6 4v16"/><path d="M20 12L6 20"/><path d="M20 12L6 4"/></g>\n <g><path d="M7 4v15M17 4v15"/></g>\n </svg>',click:function(e){e.preventDefault(),this.Slideshow.toggle()}},zoom:{type:"button",class:"fancybox__button--zoom",label:"TOGGLE_ZOOM",html:'<svg viewBox="0 0 24 24"><circle cx="10" cy="10" r="7"></circle><path d="M16 16 L21 21"></svg>',click:function(e){e.preventDefault();const t=this.fancybox.getSlide().Panzoom;t&&t.toggleZoom()}},download:{type:"link",label:"DOWNLOAD",class:"fancybox__button--download",html:'<svg viewBox="0 0 24 24"><path d="M12 15V3m0 12l-4-4m4 4l4-4M2 17l.62 2.48A2 2 0 004.56 21h14.88a2 2 0 001.94-1.51L22 17"/></svg>',click:function(e){e.stopPropagation()}},thumbs:{type:"button",label:"TOGGLE_THUMBS",class:"fancybox__button--thumbs",html:'<svg viewBox="0 0 24 24"><circle cx="4" cy="4" r="1" /><circle cx="12" cy="4" r="1" transform="rotate(90 12 4)"/><circle cx="20" cy="4" r="1" transform="rotate(90 20 4)"/><circle cx="4" cy="12" r="1" transform="rotate(90 4 12)"/><circle cx="12" cy="12" r="1" transform="rotate(90 12 12)"/><circle cx="20" cy="12" r="1" transform="rotate(90 20 12)"/><circle cx="4" cy="20" r="1" transform="rotate(90 4 20)"/><circle cx="12" cy="20" r="1" transform="rotate(90 12 20)"/><circle cx="20" cy="20" r="1" transform="rotate(90 20 20)"/></svg>',click:function(e){e.stopPropagation();const t=this.fancybox.plugins.Thumbs;t&&t.toggle()}},close:{type:"button",label:"CLOSE",class:"fancybox__button--close",html:'<svg viewBox="0 0 24 24"><path d="M20 20L4 4m16 0L4 20"></path></svg>',attr:{"data-fancybox-close":"",tabindex:0}}}};class Vs{constructor(e){this.fancybox=e,this.$container=null,this.state="init";for(const t of["onInit","onPrepare","onDone","onKeydown","onClosing","onChange","onSettle","onRefresh"])this[t]=this[t].bind(this);this.events={init:this.onInit,prepare:this.onPrepare,done:this.onDone,keydown:this.onKeydown,closing:this.onClosing,"Carousel.change":this.onChange,"Carousel.settle":this.onSettle,"Carousel.Panzoom.touchStart":()=>this.onRefresh(),"Image.startAnimation":(e,t)=>this.onRefresh(t),"Image.afterUpdate":(e,t)=>this.onRefresh(t)}}onInit(){if(this.fancybox.option("Toolbar.autoEnable")){let e=!1;for(const t of this.fancybox.items)if("image"===t.type){e=!0;break}if(!e)return void(this.state="disabled")}for(const e of this.fancybox.option("Toolbar.display"))if("close"===(os(e)?e.id:e)){this.fancybox.options.closeButton=!1;break}}onPrepare(){const e=this.fancybox;if("init"===this.state&&(this.build(),this.update(),this.Slideshow=new Bs(e),!e.Carousel.prevPage&&(e.option("slideshow.autoStart")&&this.Slideshow.activate(),e.option("fullscreen.autoStart")&&!Ps.element())))try{Ps.activate(e.$container)}catch(t){}}onFsChange(){window.scrollTo(Ps.pageXOffset,Ps.pageYOffset)}onSettle(){const e=this.fancybox,t=this.Slideshow;t&&t.isActive()&&(e.getSlide().index!==e.Carousel.slides.length-1||e.option("infinite")?"done"===e.getSlide().state&&t.setTimer():t.deactivate())}onChange(){this.update(),this.Slideshow&&this.Slideshow.isActive()&&this.Slideshow.clearTimer()}onDone(e,t){const i=this.Slideshow;t.index===e.getSlide().index&&(this.update(),i&&i.isActive()&&(e.option("infinite")||t.index!==e.Carousel.slides.length-1?i.setTimer():i.deactivate()))}onRefresh(e){e&&e.index!==this.fancybox.getSlide().index||(this.update(),!this.Slideshow||!this.Slideshow.isActive()||e&&"done"!==e.state||this.Slideshow.deactivate())}onKeydown(e,t,i){" "===t&&this.Slideshow&&(this.Slideshow.toggle(),i.preventDefault())}onClosing(){this.Slideshow&&this.Slideshow.deactivate(),document.removeEventListener("fullscreenchange",this.onFsChange)}createElement(e){let t;"div"===e.type?t=document.createElement("div"):(t=document.createElement("link"===e.type?"a":"button"),t.classList.add("carousel__button")),t.innerHTML=e.html,t.setAttribute("tabindex",e.tabindex||0),e.class&&t.classList.add(...e.class.split(" "));for(const n in e.attr)t.setAttribute(n,e.attr[n]);e.label&&t.setAttribute("title",this.fancybox.localize(`{{${e.label}}}`)),e.click&&t.addEventListener("click",e.click.bind(this)),"prev"===e.id&&t.setAttribute("data-fancybox-prev",""),"next"===e.id&&t.setAttribute("data-fancybox-next","");const i=t.querySelector("svg");return i&&(i.setAttribute("role","img"),i.setAttribute("tabindex","-1"),i.setAttribute("xmlns","http://www.w3.org/2000/svg")),t}build(){this.cleanup();const e=this.fancybox.option("Toolbar.items"),t=[{position:"left",items:[]},{position:"center",items:[]},{position:"right",items:[]}],i=this.fancybox.plugins.Thumbs;for(const o of this.fancybox.option("Toolbar.display")){let n,s;if(os(o)?(n=o.id,s=ss({},e[n],o)):(n=o,s=e[n]),["counter","next","prev","slideshow"].includes(n)&&this.fancybox.items.length<2)continue;if("fullscreen"===n){if(!document.fullscreenEnabled||window.fullScreen)continue;document.addEventListener("fullscreenchange",this.onFsChange)}if("thumbs"===n&&(!i||"disabled"===i.state))continue;if(!s)continue;let a=s.position||"right",r=t.find((e=>e.position===a));r&&r.items.push(s)}const n=document.createElement("div");n.classList.add("fancybox__toolbar");for(const o of t)if(o.items.length){const e=document.createElement("div");e.classList.add("fancybox__toolbar__items"),e.classList.add(`fancybox__toolbar__items--${o.position}`);for(const t of o.items)e.appendChild(this.createElement(t));n.appendChild(e)}this.fancybox.$carousel.parentNode.insertBefore(n,this.fancybox.$carousel),this.$container=n}update(){const e=this.fancybox.getSlide(),t=e.index,i=this.fancybox.items.length,n=e.downloadSrc||("image"!==e.type||e.error?null:e.src);for(const a of this.fancybox.$container.querySelectorAll("a.fancybox__button--download"))n?(a.removeAttribute("disabled"),a.removeAttribute("tabindex"),a.setAttribute("href",n),a.setAttribute("download",n),a.setAttribute("target","_blank")):(a.setAttribute("disabled",""),a.setAttribute("tabindex",-1),a.removeAttribute("href"),a.removeAttribute("download"));const o=e.Panzoom,s=o&&o.option("maxScale")>o.option("baseScale");for(const a of this.fancybox.$container.querySelectorAll(".fancybox__button--zoom"))s?a.removeAttribute("disabled"):a.setAttribute("disabled","");for(const a of this.fancybox.$container.querySelectorAll("[data-fancybox-index]"))a.innerHTML=e.index+1;for(const a of this.fancybox.$container.querySelectorAll("[data-fancybox-count]"))a.innerHTML=i;if(!this.fancybox.option("infinite")){for(const e of this.fancybox.$container.querySelectorAll("[data-fancybox-prev]"))0===t?e.setAttribute("disabled",""):e.removeAttribute("disabled");for(const e of this.fancybox.$container.querySelectorAll("[data-fancybox-next]"))t===i-1?e.setAttribute("disabled",""):e.removeAttribute("disabled")}}cleanup(){this.Slideshow&&this.Slideshow.isActive()&&this.Slideshow.clearTimer(),this.$container&&this.$container.remove(),this.$container=null}attach(){this.fancybox.on(this.events)}detach(){this.fancybox.off(this.events),this.cleanup()}}Vs.defaults=Ms;const Os={ScrollLock:class{constructor(e){this.fancybox=e,this.viewport=null,this.pendingUpdate=null;for(const t of["onReady","onResize","onTouchstart","onTouchmove"])this[t]=this[t].bind(this)}onReady(){const e=window.visualViewport;e&&(this.viewport=e,this.startY=0,e.addEventListener("resize",this.onResize),this.updateViewport()),window.addEventListener("touchstart",this.onTouchstart,{passive:!1}),window.addEventListener("touchmove",this.onTouchmove,{passive:!1}),window.addEventListener("wheel",this.onWheel,{passive:!1})}onResize(){this.updateViewport()}updateViewport(){const e=this.fancybox,t=this.viewport,i=t.scale||1,n=e.$container;if(!n)return;let o="",s="",a="";i-1>.1&&(o=t.width*i+"px",s=t.height*i+"px",a=`translate3d(${t.offsetLeft}px, ${t.offsetTop}px, 0) scale(${1/i})`),n.style.width=o,n.style.height=s,n.style.transform=a}onTouchstart(e){this.startY=e.touches?e.touches[0].screenY:e.screenY}onTouchmove(e){const t=this.startY,i=window.innerWidth/window.document.documentElement.clientWidth;if(!e.cancelable)return;if(e.touches.length>1||1!==i)return;const n=rs(e.composedPath()[0]);if(!n)return void e.preventDefault();const o=window.getComputedStyle(n),s=parseInt(o.getPropertyValue("height"),10),a=e.touches?e.touches[0].screenY:e.screenY,r=t<=a&&0===n.scrollTop,l=t>=a&&n.scrollHeight-n.scrollTop===s;(r||l)&&e.preventDefault()}onWheel(e){rs(e.composedPath()[0])||e.preventDefault()}cleanup(){this.pendingUpdate&&(cancelAnimationFrame(this.pendingUpdate),this.pendingUpdate=null);const e=this.viewport;e&&(e.removeEventListener("resize",this.onResize),this.viewport=null),window.removeEventListener("touchstart",this.onTouchstart,!1),window.removeEventListener("touchmove",this.onTouchmove,!1),window.removeEventListener("wheel",this.onWheel,{passive:!1})}attach(){this.fancybox.on("initLayout",this.onReady)}detach(){this.fancybox.off("initLayout",this.onReady),this.cleanup()}},Thumbs:Ts,Html:_s,Toolbar:Vs,Image:As,Hash:Ns},Is={startIndex:0,preload:1,infinite:!0,showClass:"fancybox-zoomInUp",hideClass:"fancybox-fadeOut",animated:!0,hideScrollbar:!0,parentEl:null,mainClass:null,autoFocus:!0,trapFocus:!0,placeFocusBack:!0,click:"close",closeButton:"inside",dragToClose:!0,keyboard:{Escape:"close",Delete:"close",Backspace:"close",PageUp:"next",PageDown:"prev",ArrowUp:"next",ArrowDown:"prev",ArrowRight:"next",ArrowLeft:"prev"},template:{closeButton:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" tabindex="-1"><path d="M20 20L4 4m16 0L4 20"/></svg>',spinner:'<svg xmlns="http://www.w3.org/2000/svg" width="50" height="50" viewBox="25 25 50 50" tabindex="-1"><circle cx="50" cy="50" r="20"/></svg>',main:null},l10n:{CLOSE:"Close",NEXT:"Next",PREV:"Previous",MODAL:"You can close this modal content with the ESC key",ERROR:"Something Went Wrong, Please Try Again Later",IMAGE_ERROR:"Image Not Found",ELEMENT_NOT_FOUND:"HTML Element Not Found",AJAX_NOT_FOUND:"Error Loading AJAX : Not Found",AJAX_FORBIDDEN:"Error Loading AJAX : Forbidden",IFRAME_ERROR:"Error Loading Page",TOGGLE_ZOOM:"Toggle zoom level",TOGGLE_THUMBS:"Toggle thumbnails",TOGGLE_SLIDESHOW:"Toggle slideshow",TOGGLE_FULLSCREEN:"Toggle full-screen mode",DOWNLOAD:"Download"}},zs=new Map;let Ds=0;class Rs extends ps{constructor(e,t={}){e=e.map((e=>(e.width&&(e._width=e.width),e.height&&(e._height=e.height),e))),super(ss(!0,{},Is,t)),this.bindHandlers(),this.state="init",this.setItems(e),this.attachPlugins(Rs.Plugins),this.trigger("init"),!0===this.option("hideScrollbar")&&this.hideScrollbar(),this.initLayout(),this.initCarousel(),this.attachEvents(),zs.set(this.id,this),this.trigger("prepare"),this.state="ready",this.trigger("ready"),this.$container.setAttribute("aria-hidden","false"),this.option("trapFocus")&&this.focus()}option(e,...t){const i=this.getSlide();let n=i?i[e]:void 0;return void 0!==n?("function"==typeof n&&(n=n.call(this,this,...t)),n):super.option(e,...t)}bindHandlers(){for(const e of["onMousedown","onKeydown","onClick","onFocus","onCreateSlide","onSettle","onTouchMove","onTouchEnd","onTransform"])this[e]=this[e].bind(this)}attachEvents(){document.addEventListener("mousedown",this.onMousedown),document.addEventListener("keydown",this.onKeydown,!0),this.option("trapFocus")&&document.addEventListener("focus",this.onFocus,!0),this.$container.addEventListener("click",this.onClick)}detachEvents(){document.removeEventListener("mousedown",this.onMousedown),document.removeEventListener("keydown",this.onKeydown,!0),document.removeEventListener("focus",this.onFocus,!0),this.$container.removeEventListener("click",this.onClick)}initLayout(){this.$root=this.option("parentEl")||document.body;let e=this.option("template.main");e&&(this.$root.insertAdjacentHTML("beforeend",this.localize(e)),this.$container=this.$root.querySelector(".fancybox__container")),this.$container||(this.$container=document.createElement("div"),this.$root.appendChild(this.$container)),this.$container.onscroll=()=>(this.$container.scrollLeft=0,!1),Object.entries({class:"fancybox__container",role:"dialog",tabIndex:"-1","aria-modal":"true","aria-hidden":"true","aria-label":this.localize("{{MODAL}}")}).forEach((e=>this.$container.setAttribute(...e))),this.option("animated")&&this.$container.classList.add("is-animated"),this.$backdrop=this.$container.querySelector(".fancybox__backdrop"),this.$backdrop||(this.$backdrop=document.createElement("div"),this.$backdrop.classList.add("fancybox__backdrop"),this.$container.appendChild(this.$backdrop)),this.$carousel=this.$container.querySelector(".fancybox__carousel"),this.$carousel||(this.$carousel=document.createElement("div"),this.$carousel.classList.add("fancybox__carousel"),this.$container.appendChild(this.$carousel)),this.$container.Fancybox=this,this.id=this.$container.getAttribute("id"),this.id||(this.id=this.options.id||++Ds,this.$container.setAttribute("id","fancybox-"+this.id));const t=this.option("mainClass");return t&&this.$container.classList.add(...t.split(" ")),document.documentElement.classList.add("with-fancybox"),this.trigger("initLayout"),this}setItems(e){const t=[];for(const i of e){const e=i.$trigger;if(e){const t=e.dataset||{};i.src=t.src||e.getAttribute("href")||i.src,i.type=t.type||i.type,!i.src&&e instanceof HTMLImageElement&&(i.src=e.currentSrc||i.$trigger.src)}let n=i.$thumb;if(!n){let e=i.$trigger&&i.$trigger.origTarget;e&&(n=e instanceof HTMLImageElement?e:e.querySelector("img:not([aria-hidden])")),!n&&i.$trigger&&(n=i.$trigger instanceof HTMLImageElement?i.$trigger:i.$trigger.querySelector("img:not([aria-hidden])"))}i.$thumb=n||null;let o=i.thumb;!o&&n&&(o=n.currentSrc||n.src,!o&&n.dataset&&(o=n.dataset.lazySrc||n.dataset.src)),o||"image"!==i.type||(o=i.src),i.thumb=o||null,i.caption=i.caption||"",t.push(i)}this.items=t}initCarousel(){return this.Carousel=new ks(this.$carousel,ss(!0,{},{prefix:"",classNames:{viewport:"fancybox__viewport",track:"fancybox__track",slide:"fancybox__slide"},textSelection:!0,preload:this.option("preload"),friction:.88,slides:this.items,initialPage:this.options.startIndex,slidesPerPage:1,infiniteX:this.option("infinite"),infiniteY:!0,l10n:this.option("l10n"),Dots:!1,Navigation:{classNames:{main:"fancybox__nav",button:"carousel__button",next:"is-next",prev:"is-prev"}},Panzoom:{textSelection:!0,panOnlyZoomed:()=>this.Carousel&&this.Carousel.pages&&this.Carousel.pages.length<2&&!this.option("dragToClose"),lockAxis:()=>{if(this.Carousel){let e="x";return this.option("dragToClose")&&(e+="y"),e}}},on:{"*":(e,...t)=>this.trigger(`Carousel.${e}`,...t),init:e=>this.Carousel=e,createSlide:this.onCreateSlide,settle:this.onSettle}},this.option("Carousel"))),this.option("dragToClose")&&this.Carousel.Panzoom.on({touchMove:this.onTouchMove,afterTransform:this.onTransform,touchEnd:this.onTouchEnd}),this.trigger("initCarousel"),this}onCreateSlide(e,t){let i=t.caption||"";if("function"==typeof this.options.caption&&(i=this.options.caption.call(this,this,this.Carousel,t)),"string"==typeof i&&i.length){const e=document.createElement("div"),n=`fancybox__caption_${this.id}_${t.index}`;e.className="fancybox__caption",e.innerHTML=i,e.setAttribute("id",n),t.$caption=t.$el.appendChild(e),t.$el.classList.add("has-caption"),t.$el.setAttribute("aria-labelledby",n)}}onSettle(){this.option("autoFocus")&&this.focus()}onFocus(e){this.focus(e)}onClick(e){if(e.defaultPrevented)return;let t=e.composedPath()[0];if(t.matches("[data-fancybox-close]"))return e.preventDefault(),void Rs.close(!1,e);if(t.matches("[data-fancybox-next]"))return e.preventDefault(),void Rs.next();if(t.matches("[data-fancybox-prev]"))return e.preventDefault(),void Rs.prev();const i=document.activeElement;if(i){if(i.closest("[contenteditable]"))return;t.matches(Ss)||i.blur()}if(!t.closest(".fancybox__content")&&!getSelection().toString().length&&!1!==this.trigger("click",e))switch(this.option("click")){case"close":this.close();break;case"next":this.next()}}onTouchMove(){const e=this.getSlide().Panzoom;return!e||1===e.content.scale}onTouchEnd(e){const t=e.dragOffset.y;Math.abs(t)>=150||Math.abs(t)>=35&&e.dragOffset.time<350?(this.option("hideClass")&&(this.getSlide().hideClass="fancybox-throwOut"+(e.content.y<0?"Up":"Down")),this.close()):"y"===e.lockAxis&&e.panTo({y:0})}onTransform(e){if(this.$backdrop){const t=Math.abs(e.content.y),i=t<1?"":Math.max(.33,Math.min(1,1-t/e.content.fitHeight*1.5));this.$container.style.setProperty("--fancybox-ts",i?"0s":""),this.$container.style.setProperty("--fancybox-opacity",i)}}onMousedown(){"ready"===this.state&&document.body.classList.add("is-using-mouse")}onKeydown(e){if(Rs.getInstance().id!==this.id)return;document.body.classList.remove("is-using-mouse");const t=e.key,i=this.option("keyboard");if(!i||e.ctrlKey||e.altKey||e.shiftKey)return;const n=e.composedPath()[0],o=document.activeElement&&document.activeElement.classList,s=o&&o.contains("carousel__button");if("Escape"!==t&&!s&&(e.target.isContentEditable||-1!==["BUTTON","TEXTAREA","OPTION","INPUT","SELECT","VIDEO"].indexOf(n.nodeName)))return;if(!1===this.trigger("keydown",t,e))return;const a=i[t];"function"==typeof this[a]&&this[a]()}getSlide(){const e=this.Carousel;if(!e)return null;const t=null===e.page?e.option("initialPage"):e.page,i=e.pages||[];return i.length&&i[t]?i[t].slides[0]:null}focus(e){if(Rs.ignoreFocusChange)return;if(["init","closing","customClosing","destroy"].indexOf(this.state)>-1)return;const t=this.$container,i=this.getSlide(),n="done"===i.state?i.$el:null;if(n&&n.contains(document.activeElement))return;e&&e.preventDefault(),Rs.ignoreFocusChange=!0;const o=Array.from(t.querySelectorAll(Ss));let s,a=[];for(let r of o){const e=r.offsetParent,t=n&&n.contains(r),i=!this.Carousel.$viewport.contains(r);e&&(t||i)?(a.push(r),void 0!==r.dataset.origTabindex&&(r.tabIndex=r.dataset.origTabindex,r.removeAttribute("data-orig-tabindex")),(r.hasAttribute("autoFocus")||!s&&t&&!r.classList.contains("carousel__button"))&&(s=r)):(r.dataset.origTabindex=void 0===r.dataset.origTabindex?r.getAttribute("tabindex"):r.dataset.origTabindex,r.tabIndex=-1)}e?a.indexOf(e.target)>-1?this.lastFocus=e.target:this.lastFocus===t?Es(a[a.length-1]):Es(t):this.option("autoFocus")&&s?Es(s):a.indexOf(document.activeElement)<0&&Es(t),this.lastFocus=document.activeElement,Rs.ignoreFocusChange=!1}hideScrollbar(){if(!xs)return;const e=window.innerWidth-document.documentElement.getBoundingClientRect().width,t="fancybox-style-noscroll";let i=document.getElementById(t);i||e>0&&(i=document.createElement("style"),i.id=t,i.type="text/css",i.innerHTML=`.compensate-for-scrollbar {padding-right: ${e}px;}`,document.getElementsByTagName("head")[0].appendChild(i),document.body.classList.add("compensate-for-scrollbar"))}revealScrollbar(){document.body.classList.remove("compensate-for-scrollbar");const e=document.getElementById("fancybox-style-noscroll");e&&e.remove()}clearContent(e){this.Carousel.trigger("removeSlide",e),e.$content&&(e.$content.remove(),e.$content=null),e.$closeButton&&(e.$closeButton.remove(),e.$closeButton=null),e._className&&e.$el.classList.remove(e._className)}setContent(e,t,i={}){let n;const o=e.$el;if(t instanceof HTMLElement)["img","iframe","video","audio"].indexOf(t.nodeName.toLowerCase())>-1?(n=document.createElement("div"),n.appendChild(t)):n=t;else{const e=document.createRange().createContextualFragment(t);n=document.createElement("div"),n.appendChild(e)}if(e.filter&&!e.error&&(n=n.querySelector(e.filter)),n instanceof Element)return e._className=`has-${i.suffix||e.type||"unknown"}`,o.classList.add(e._className),n.classList.add("fancybox__content"),"none"!==n.style.display&&"none"!==getComputedStyle(n).getPropertyValue("display")||(n.style.display=e.display||this.option("defaultDisplay")||"flex"),e.id&&n.setAttribute("id",e.id),e.$content=n,o.prepend(n),this.manageCloseButton(e),"loading"!==e.state&&this.revealContent(e),n;this.setError(e,"{{ELEMENT_NOT_FOUND}}")}manageCloseButton(e){const t=void 0===e.closeButton?this.option("closeButton"):e.closeButton;if(!t||"top"===t&&this.$closeButton)return;const i=document.createElement("button");i.classList.add("carousel__button","is-close"),i.setAttribute("title",this.options.l10n.CLOSE),i.innerHTML=this.option("template.closeButton"),i.addEventListener("click",(e=>this.close(e))),"inside"===t?(e.$closeButton&&e.$closeButton.remove(),e.$closeButton=e.$content.appendChild(i)):this.$closeButton=this.$container.insertBefore(i,this.$container.firstChild)}revealContent(e){this.trigger("reveal",e),e.$content.style.visibility="";let t=!1;e.error||"loading"===e.state||null!==this.Carousel.prevPage||e.index!==this.options.startIndex||(t=void 0===e.showClass?this.option("showClass"):e.showClass),t?(e.state="animating",this.animateCSS(e.$content,t,(()=>{this.done(e)}))):this.done(e)}animateCSS(e,t,i){if(e&&e.dispatchEvent(new CustomEvent("animationend",{bubbles:!0,cancelable:!0})),!e||!t)return void("function"==typeof i&&i());const n=function(o){o.currentTarget===this&&(e.removeEventListener("animationend",n),i&&i(),e.classList.remove(t))};e.addEventListener("animationend",n),e.classList.add(t)}done(e){e.state="done",this.trigger("done",e);const t=this.getSlide();t&&e.index===t.index&&this.option("autoFocus")&&this.focus()}setError(e,t){e.error=t,this.hideLoading(e),this.clearContent(e);const i=document.createElement("div");i.classList.add("fancybox-error"),i.innerHTML=this.localize(t||"<p>{{ERROR}}</p>"),this.setContent(e,i,{suffix:"error"})}showLoading(e){e.state="loading",e.$el.classList.add("is-loading");let t=e.$el.querySelector(".fancybox__spinner");t||(t=document.createElement("div"),t.classList.add("fancybox__spinner"),t.innerHTML=this.option("template.spinner"),t.addEventListener("click",(()=>{this.Carousel.Panzoom.velocity||this.close()})),e.$el.prepend(t))}hideLoading(e){const t=e.$el&&e.$el.querySelector(".fancybox__spinner");t&&(t.remove(),e.$el.classList.remove("is-loading")),"loading"===e.state&&(this.trigger("load",e),e.state="ready")}next(){const e=this.Carousel;e&&e.pages.length>1&&e.slideNext()}prev(){const e=this.Carousel;e&&e.pages.length>1&&e.slidePrev()}jumpTo(...e){this.Carousel&&this.Carousel.slideTo(...e)}close(e){if(e&&e.preventDefault(),["closing","customClosing","destroy"].includes(this.state))return;if(!1===this.trigger("shouldClose",e))return;if(this.state="closing",this.Carousel.Panzoom.destroy(),this.detachEvents(),this.trigger("closing",e),"destroy"===this.state)return;this.$container.setAttribute("aria-hidden","true"),this.$container.classList.add("is-closing");const t=this.getSlide();if(this.Carousel.slides.forEach((e=>{e.$content&&e.index!==t.index&&this.Carousel.trigger("removeSlide",e)})),"closing"===this.state){const e=void 0===t.hideClass?this.option("hideClass"):t.hideClass;this.animateCSS(t.$content,e,(()=>{this.destroy()}),!0)}}destroy(){if("destroy"===this.state)return;this.state="destroy",this.trigger("destroy");const e=this.option("placeFocusBack")?this.getSlide().$trigger:null;this.Carousel.destroy(),this.detachPlugins(),this.Carousel=null,this.options={},this.events={},this.$container.remove(),this.$container=this.$backdrop=this.$carousel=null,e&&Es(e),zs.delete(this.id);const t=Rs.getInstance();t?t.focus():(document.documentElement.classList.remove("with-fancybox"),document.body.classList.remove("is-using-mouse"),this.revealScrollbar())}static show(e,t={}){return new Rs(e,t)}static fromEvent(e,t={}){if(e.defaultPrevented)return;if(e.button&&0!==e.button)return;if(e.ctrlKey||e.metaKey||e.shiftKey)return;const i=e.composedPath()[0];let n,o,s,a=i;if((a.matches("[data-fancybox-trigger]")||(a=a.closest("[data-fancybox-trigger]")))&&(n=a&&a.dataset&&a.dataset.fancyboxTrigger),n){const e=document.querySelectorAll(`[data-fancybox="${n}"]`),t=parseInt(a.dataset.fancyboxIndex,10)||0;a=e.length?e[t]:a}a||(a=i),Array.from(Rs.openers.keys()).reverse().some((t=>{s=a;let i=!1;try{s instanceof Element&&("string"==typeof t||t instanceof String)&&(i=s.matches(t)||(s=s.closest(t)))}catch(n){}return!!i&&(e.preventDefault(),o=t,!0)}));let r=!1;if(o){t.event=e,t.target=s,s.origTarget=i,r=Rs.fromOpener(o,t);const n=Rs.getInstance();n&&"ready"===n.state&&e.detail&&document.body.classList.add("is-using-mouse")}return r}static fromOpener(e,t={}){let i=[],n=t.startIndex||0,o=t.target||null;const s=void 0!==(t=ss({},t,Rs.openers.get(e))).groupAll&&t.groupAll,a=void 0===t.groupAttr?"data-fancybox":t.groupAttr,r=a&&o?o.getAttribute(`${a}`):"";if(!o||r||s){const n=t.root||(o?o.getRootNode():document.body);i=[].slice.call(n.querySelectorAll(e))}if(o&&!s&&(i=r?i.filter((e=>e.getAttribute(`${a}`)===r)):[o]),!i.length)return!1;const l=Rs.getInstance();return!(l&&i.indexOf(l.options.$trigger)>-1)&&(n=o?i.indexOf(o):n,i=i.map((function(e){const t=["false","0","no","null","undefined"],i=["true","1","yes"],n=Object.assign({},e.dataset),o={};for(let[a,r]of Object.entries(n))if("fancybox"!==a)if("width"===a||"height"===a)o[`_${a}`]=r;else if("string"==typeof r||r instanceof String)if(t.indexOf(r)>-1)o[a]=!1;else if(i.indexOf(o[a])>-1)o[a]=!0;else try{o[a]=JSON.parse(r)}catch(s){o[a]=r}else o[a]=r;return e instanceof Element&&(o.$trigger=e),o})),new Rs(i,ss({},t,{startIndex:n,$trigger:o})))}static bind(e,t={}){function i(){document.body.addEventListener("click",Rs.fromEvent,!1)}xs&&(Rs.openers.size||(/complete|interactive|loaded/.test(document.readyState)?i():document.addEventListener("DOMContentLoaded",i)),Rs.openers.set(e,t))}static unbind(e){Rs.openers.delete(e),Rs.openers.size||Rs.destroy()}static destroy(){let e;for(;e=Rs.getInstance();)e.destroy();Rs.openers=new Map,document.body.removeEventListener("click",Rs.fromEvent,!1)}static getInstance(e){return e?zs.get(e):Array.from(zs.values()).reverse().find((e=>!["closing","customClosing","destroy"].includes(e.state)&&e))||null}static close(e=!0,t){if(e)for(const i of zs.values())i.close(t);else{const e=Rs.getInstance();e&&e.close(t)}}static next(){const e=Rs.getInstance();e&&e.next()}static prev(){const e=Rs.getInstance();e&&e.prev()}}Rs.version="4.0.29",Rs.defaults=Is,Rs.openers=new Map,Rs.Plugins=Os,Rs.bind("[data-fancybox]");for(const[Ql,ec]of Object.entries(Rs.Plugins||{}))"function"==typeof ec.create&&ec.create(Rs);var Fs={install(){Rs.bind('[data-fancybox="gallery"]',{})}};function js(e,t,i){return t in e?Object.defineProperty(e,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[t]=i,e}function Ws(e,t){for(var i=0;i<t.length;i++){var n=t[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function Hs(e,t,i){return t in e?Object.defineProperty(e,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[t]=i,e}function Us(e,t){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),i.push.apply(i,n)}return i}function qs(e){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?Us(Object(i),!0).forEach((function(t){Hs(e,t,i[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):Us(Object(i)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(i,t))}))}return e}var Xs={addCSS:!0,thumbWidth:15,watch:!0};function Ys(e,t){return function(){return Array.from(document.querySelectorAll(t)).includes(this)}.call(e,t)}var Ks=function(e){return null!=e?e.constructor:null},Gs=function(e,t){return!!(e&&t&&e instanceof t)},Zs=function(e){return null==e},Js=function(e){return Ks(e)===Object},Qs=function(e){return Ks(e)===String},ea=function(e){return Array.isArray(e)},ta=function(e){return Gs(e,NodeList)},ia=Qs,na=ea,oa=ta,sa=function(e){return Gs(e,Element)},aa=function(e){return Gs(e,Event)},ra=function(e){return Zs(e)||(Qs(e)||ea(e)||ta(e))&&!e.length||Js(e)&&!Object.keys(e).length};function la(e,t){if(1>t){var i=function(e){var t="".concat(e).match(/(?:\.(\d+))?(?:[eE]([+-]?\d+))?$/);return t?Math.max(0,(t[1]?t[1].length:0)-(t[2]?+t[2]:0)):0}(t);return parseFloat(e.toFixed(i))}return Math.round(e/t)*t}var ca=function(){function e(t,i){(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")})(this,e),sa(t)?this.element=t:ia(t)&&(this.element=document.querySelector(t)),sa(this.element)&&ra(this.element.rangeTouch)&&(this.config=qs({},Xs,{},i),this.init())}return function(e,t,i){t&&Ws(e.prototype,t),i&&Ws(e,i)}(e,[{key:"init",value:function(){e.enabled&&(this.config.addCSS&&(this.element.style.userSelect="none",this.element.style.webKitUserSelect="none",this.element.style.touchAction="manipulation"),this.listeners(!0),this.element.rangeTouch=this)}},{key:"destroy",value:function(){e.enabled&&(this.config.addCSS&&(this.element.style.userSelect="",this.element.style.webKitUserSelect="",this.element.style.touchAction=""),this.listeners(!1),this.element.rangeTouch=null)}},{key:"listeners",value:function(e){var t=this,i=e?"addEventListener":"removeEventListener";["touchstart","touchmove","touchend"].forEach((function(e){t.element[i](e,(function(e){return t.set(e)}),!1)}))}},{key:"get",value:function(t){if(!e.enabled||!aa(t))return null;var i,n=t.target,o=t.changedTouches[0],s=parseFloat(n.getAttribute("min"))||0,a=parseFloat(n.getAttribute("max"))||100,r=parseFloat(n.getAttribute("step"))||1,l=n.getBoundingClientRect(),c=100/l.width*(this.config.thumbWidth/2)/100;return 0>(i=100/l.width*(o.clientX-l.left))?i=0:100<i&&(i=100),50>i?i-=(100-2*i)*c:50<i&&(i+=2*(i-50)*c),s+la(i/100*(a-s),r)}},{key:"set",value:function(t){e.enabled&&aa(t)&&!t.target.disabled&&(t.preventDefault(),t.target.value=this.get(t),function(e,t){if(e&&t){var i=new Event(t,{bubbles:!0});e.dispatchEvent(i)}}(t.target,"touchend"===t.type?"change":"input"))}}],[{key:"setup",value:function(t){var i=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{},n=null;if(ra(t)||ia(t)?n=Array.from(document.querySelectorAll(ia(t)?t:'input[type="range"]')):sa(t)?n=[t]:oa(t)?n=Array.from(t):na(t)&&(n=t.filter(sa)),ra(n))return null;var o=qs({},Xs,{},i);if(ia(t)&&o.watch){var s=new MutationObserver((function(i){Array.from(i).forEach((function(i){Array.from(i.addedNodes).forEach((function(i){sa(i)&&Ys(i,t)&&new e(i,o)}))}))}));s.observe(document.body,{childList:!0,subtree:!0})}return n.map((function(t){return new e(t,i)}))}},{key:"enabled",get:function(){return"ontouchstart"in document.documentElement}}]),e}();const da=e=>null!=e?e.constructor:null,ua=(e,t)=>Boolean(e&&t&&e instanceof t),ha=e=>null==e,pa=e=>da(e)===Object,ma=e=>da(e)===String,fa=e=>da(e)===Function,ga=e=>Array.isArray(e),ya=e=>ua(e,NodeList),va=e=>ha(e)||(ma(e)||ga(e)||ya(e))&&!e.length||pa(e)&&!Object.keys(e).length;var ba=ha,wa=pa,ka=e=>da(e)===Number&&!Number.isNaN(e),xa=ma,Ca=e=>da(e)===Boolean,Sa=fa,Ea=ga,Ta=ya,La=e=>null!==e&&"object"==typeof e&&1===e.nodeType&&"object"==typeof e.style&&"object"==typeof e.ownerDocument,$a=e=>ua(e,Event),_a=e=>ua(e,KeyboardEvent),Aa=e=>ua(e,TextTrack)||!ha(e)&&ma(e.kind),Na=e=>ua(e,Promise)&&fa(e.then),Pa=e=>{if(ua(e,window.URL))return!0;if(!ma(e))return!1;let t=e;e.startsWith("http://")&&e.startsWith("https://")||(t=`http://${e}`);try{return!va(new URL(t).hostname)}catch(i){return!1}},Ba=va;const Ma=(()=>{const e=document.createElement("span"),t={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend",transition:"transitionend"},i=Object.keys(t).find((t=>void 0!==e.style[t]));return!!xa(i)&&t[i]})();function Va(e,t){setTimeout((()=>{try{e.hidden=!0,e.offsetHeight,e.hidden=!1}catch(t){}}),t)}const Oa={isIE:Boolean(window.document.documentMode),isEdge:window.navigator.userAgent.includes("Edge"),isWebkit:"WebkitAppearance"in document.documentElement.style&&!/Edge/.test(navigator.userAgent),isIPhone:/(iPhone|iPod)/gi.test(navigator.platform),isIos:"MacIntel"===navigator.platform&&navigator.maxTouchPoints>1||/(iPad|iPhone|iPod)/gi.test(navigator.platform)};function Ia(e,t){return t.split(".").reduce(((e,t)=>e&&e[t]),e)}function za(e={},...t){if(!t.length)return e;const i=t.shift();return wa(i)?(Object.keys(i).forEach((t=>{wa(i[t])?(Object.keys(e).includes(t)||Object.assign(e,{[t]:{}}),za(e[t],i[t])):Object.assign(e,{[t]:i[t]})})),za(e,...t)):e}function Da(e,t){const i=e.length?e:[e];Array.from(i).reverse().forEach(((e,i)=>{const n=i>0?t.cloneNode(!0):t,o=e.parentNode,s=e.nextSibling;n.appendChild(e),s?o.insertBefore(n,s):o.appendChild(n)}))}function Ra(e,t){La(e)&&!Ba(t)&&Object.entries(t).filter((([,e])=>!ba(e))).forEach((([t,i])=>e.setAttribute(t,i)))}function Fa(e,t,i){const n=document.createElement(e);return wa(t)&&Ra(n,t),xa(i)&&(n.innerText=i),n}function ja(e,t,i,n){La(t)&&t.appendChild(Fa(e,i,n))}function Wa(e){Ta(e)||Ea(e)?Array.from(e).forEach(Wa):La(e)&&La(e.parentNode)&&e.parentNode.removeChild(e)}function Ha(e){if(!La(e))return;let{length:t}=e.childNodes;for(;t>0;)e.removeChild(e.lastChild),t-=1}function Ua(e,t){return La(t)&&La(t.parentNode)&&La(e)?(t.parentNode.replaceChild(e,t),e):null}function qa(e,t){if(!xa(e)||Ba(e))return{};const i={},n=za({},t);return e.split(",").forEach((e=>{const t=e.trim(),o=t.replace(".",""),s=t.replace(/[[\]]/g,"").split("="),[a]=s,r=s.length>1?s[1].replace(/["']/g,""):"";switch(t.charAt(0)){case".":xa(n.class)?i.class=`${n.class} ${o}`:i.class=o;break;case"#":i.id=t.replace("#","");break;case"[":i[a]=r}})),za(n,i)}function Xa(e,t){if(!La(e))return;let i=t;Ca(i)||(i=!e.hidden),e.hidden=i}function Ya(e,t,i){if(Ta(e))return Array.from(e).map((e=>Ya(e,t,i)));if(La(e)){let n="toggle";return void 0!==i&&(n=i?"add":"remove"),e.classList[n](t),e.classList.contains(t)}return!1}function Ka(e,t){return La(e)&&e.classList.contains(t)}function Ga(e,t){const{prototype:i}=Element;return(i.matches||i.webkitMatchesSelector||i.mozMatchesSelector||i.msMatchesSelector||function(){return Array.from(document.querySelectorAll(t)).includes(this)}).call(e,t)}function Za(e){return this.elements.container.querySelectorAll(e)}function Ja(e){return this.elements.container.querySelector(e)}function Qa(e=null,t=!1){La(e)&&(e.focus({preventScroll:!0}),t&&Ya(e,this.config.classNames.tabFocus))}const er={"audio/ogg":"vorbis","audio/wav":"1","video/webm":"vp8, vorbis","video/mp4":"avc1.42E01E, mp4a.40.2","video/ogg":"theora"},tr={audio:"canPlayType"in document.createElement("audio"),video:"canPlayType"in document.createElement("video"),check(e,t,i){const n=Oa.isIPhone&&i&&tr.playsinline,o=tr[e]||"html5"!==t;return{api:o,ui:o&&tr.rangeInput&&("video"!==e||!Oa.isIPhone||n)}},pip:!(Oa.isIPhone||!Sa(Fa("video").webkitSetPresentationMode)&&(!document.pictureInPictureEnabled||Fa("video").disablePictureInPicture)),airplay:Sa(window.WebKitPlaybackTargetAvailabilityEvent),playsinline:"playsInline"in document.createElement("video"),mime(e){if(Ba(e))return!1;const[t]=e.split("/");let i=e;if(!this.isHTML5||t!==this.type)return!1;Object.keys(er).includes(i)&&(i+=`; codecs="${er[e]}"`);try{return Boolean(i&&this.media.canPlayType(i).replace(/no/,""))}catch(n){return!1}},textTracks:"textTracks"in document.createElement("video"),rangeInput:(()=>{const e=document.createElement("input");return e.type="range","range"===e.type})(),touch:"ontouchstart"in document.documentElement,transitions:!1!==Ma,reducedMotion:"matchMedia"in window&&window.matchMedia("(prefers-reduced-motion)").matches},ir=(()=>{let e=!1;try{const t=Object.defineProperty({},"passive",{get:()=>(e=!0,null)});window.addEventListener("test",null,t),window.removeEventListener("test",null,t)}catch(t){}return e})();function nr(e,t,i,n=!1,o=!0,s=!1){if(!e||!("addEventListener"in e)||Ba(t)||!Sa(i))return;const a=t.split(" ");let r=s;ir&&(r={passive:o,capture:s}),a.forEach((t=>{this&&this.eventListeners&&n&&this.eventListeners.push({element:e,type:t,callback:i,options:r}),e[n?"addEventListener":"removeEventListener"](t,i,r)}))}function or(e,t="",i,n=!0,o=!1){nr.call(this,e,t,i,!0,n,o)}function sr(e,t="",i,n=!0,o=!1){nr.call(this,e,t,i,!1,n,o)}function ar(e,t="",i,n=!0,o=!1){const s=(...a)=>{sr(e,t,s,n,o),i.apply(this,a)};nr.call(this,e,t,s,!0,n,o)}function rr(e,t="",i=!1,n={}){if(!La(e)||Ba(t))return;const o=new CustomEvent(t,{bubbles:i,detail:{...n,plyr:this}});e.dispatchEvent(o)}function lr(){this&&this.eventListeners&&(this.eventListeners.forEach((e=>{const{element:t,type:i,callback:n,options:o}=e;t.removeEventListener(i,n,o)})),this.eventListeners=[])}function cr(){return new Promise((e=>this.ready?setTimeout(e,0):or.call(this,this.elements.container,"ready",e))).then((()=>{}))}function dr(e){Na(e)&&e.then(null,(()=>{}))}function ur(e){return Ea(e)?e.filter(((t,i)=>e.indexOf(t)===i)):e}function hr(e,t){return Ea(e)&&e.length?e.reduce(((e,i)=>Math.abs(i-t)<Math.abs(e-t)?i:e)):null}function pr(e){return!(!window||!window.CSS)&&window.CSS.supports(e)}const mr=[[1,1],[4,3],[3,4],[5,4],[4,5],[3,2],[2,3],[16,10],[10,16],[16,9],[9,16],[21,9],[9,21],[32,9],[9,32]].reduce(((e,[t,i])=>({...e,[t/i]:[t,i]})),{});function fr(e){return!!(Ea(e)||xa(e)&&e.includes(":"))&&(Ea(e)?e:e.split(":")).map(Number).every(ka)}function gr(e){if(!Ea(e)||!e.every(ka))return null;const[t,i]=e,n=(e,t)=>0===t?e:n(t,e%t),o=n(t,i);return[t/o,i/o]}function yr(e){const t=e=>fr(e)?e.split(":").map(Number):null;let i=t(e);if(null===i&&(i=t(this.config.ratio)),null===i&&!Ba(this.embed)&&Ea(this.embed.ratio)&&({ratio:i}=this.embed),null===i&&this.isHTML5){const{videoWidth:e,videoHeight:t}=this.media;i=[e,t]}return gr(i)}function vr(e){if(!this.isVideo)return{};const{wrapper:t}=this.elements,i=yr.call(this,e);if(!Ea(i))return{};const[n,o]=gr(i),s=100/n*o;if(pr(`aspect-ratio: ${n}/${o}`)?t.style.aspectRatio=`${n}/${o}`:t.style.paddingBottom=`${s}%`,this.isVimeo&&!this.config.vimeo.premium&&this.supported.ui){const e=100/this.media.offsetWidth*parseInt(window.getComputedStyle(this.media).paddingBottom,10),i=(e-s)/(e/50);this.fullscreen.active?t.style.paddingBottom=null:this.media.style.transform=`translateY(-${i}%)`}else this.isHTML5&&t.classList.add(this.config.classNames.videoFixedRatio);return{padding:s,ratio:i}}function br(e,t,i=.05){const n=e/t,o=hr(Object.keys(mr),n);return Math.abs(o-n)<=i?mr[o]:[e,t]}const wr={getSources(){return this.isHTML5?Array.from(this.media.querySelectorAll("source")).filter((e=>{const t=e.getAttribute("type");return!!Ba(t)||tr.mime.call(this,t)})):[]},getQualityOptions(){return this.config.quality.forced?this.config.quality.options:wr.getSources.call(this).map((e=>Number(e.getAttribute("size")))).filter(Boolean)},setup(){if(!this.isHTML5)return;const e=this;e.options.speed=e.config.speed.options,Ba(this.config.ratio)||vr.call(e),Object.defineProperty(e.media,"quality",{get(){const t=wr.getSources.call(e).find((t=>t.getAttribute("src")===e.source));return t&&Number(t.getAttribute("size"))},set(t){if(e.quality!==t){if(e.config.quality.forced&&Sa(e.config.quality.onChange))e.config.quality.onChange(t);else{const i=wr.getSources.call(e).find((e=>Number(e.getAttribute("size"))===t));if(!i)return;const{currentTime:n,paused:o,preload:s,readyState:a,playbackRate:r}=e.media;e.media.src=i.getAttribute("src"),("none"!==s||a)&&(e.once("loadedmetadata",(()=>{e.speed=r,e.currentTime=n,o||dr(e.play())})),e.media.load())}rr.call(e,e.media,"qualitychange",!1,{quality:t})}}})},cancelRequests(){this.isHTML5&&(Wa(wr.getSources.call(this)),this.media.setAttribute("src",this.config.blankVideo),this.media.load(),this.debug.log("Cancelled network requests"))}};function kr(e){return`${e}-${Math.floor(1e4*Math.random())}`}function xr(e,...t){return Ba(e)?e:e.toString().replace(/{(\d+)}/g,((e,i)=>t[i].toString()))}const Cr=(e="",t="",i="")=>e.replace(new RegExp(t.toString().replace(/([.*+?^=!:${}()|[\]/\\])/g,"\\$1"),"g"),i.toString()),Sr=(e="")=>e.toString().replace(/\w\S*/g,(e=>e.charAt(0).toUpperCase()+e.slice(1).toLowerCase()));function Er(e=""){let t=e.toString();return t=function(e=""){let t=e.toString();return t=Cr(t,"-"," "),t=Cr(t,"_"," "),t=Sr(t),Cr(t," ","")}(t),t.charAt(0).toLowerCase()+t.slice(1)}function Tr(e){const t=document.createElement("div");return t.appendChild(e),t.innerHTML}const Lr={pip:"PIP",airplay:"AirPlay",html5:"HTML5",vimeo:"Vimeo",youtube:"YouTube"},$r={get(e="",t={}){if(Ba(e)||Ba(t))return"";let i=Ia(t.i18n,e);if(Ba(i))return Object.keys(Lr).includes(e)?Lr[e]:"";const n={"{seektime}":t.seekTime,"{title}":t.title};return Object.entries(n).forEach((([e,t])=>{i=Cr(i,e,t)})),i}};class _r{constructor(e){js(this,"get",(e=>{if(!_r.supported||!this.enabled)return null;const t=window.localStorage.getItem(this.key);if(Ba(t))return null;const i=JSON.parse(t);return xa(e)&&e.length?i[e]:i})),js(this,"set",(e=>{if(!_r.supported||!this.enabled)return;if(!wa(e))return;let t=this.get();Ba(t)&&(t={}),za(t,e);try{window.localStorage.setItem(this.key,JSON.stringify(t))}catch(i){}})),this.enabled=e.config.storage.enabled,this.key=e.config.storage.key}static get supported(){try{if(!("localStorage"in window))return!1;const e="___test";return window.localStorage.setItem(e,e),window.localStorage.removeItem(e),!0}catch(e){return!1}}}function Ar(e,t="text"){return new Promise(((i,n)=>{try{const n=new XMLHttpRequest;if(!("withCredentials"in n))return;n.addEventListener("load",(()=>{if("text"===t)try{i(JSON.parse(n.responseText))}catch(e){i(n.responseText)}else i(n.response)})),n.addEventListener("error",(()=>{throw new Error(n.status)})),n.open("GET",e,!0),n.responseType=t,n.send()}catch(o){n(o)}}))}function Nr(e,t){if(!xa(e))return;const i=xa(t);let n=!1;const o=()=>null!==document.getElementById(t),s=(e,t)=>{e.innerHTML=t,i&&o()||document.body.insertAdjacentElement("afterbegin",e)};if(!i||!o()){const o=_r.supported,a=document.createElement("div");if(a.setAttribute("hidden",""),i&&a.setAttribute("id",t),o){const e=window.localStorage.getItem(`cache-${t}`);if(n=null!==e,n){const t=JSON.parse(e);s(a,t.content)}}Ar(e).then((e=>{if(!Ba(e)){if(o)try{window.localStorage.setItem(`cache-${t}`,JSON.stringify({content:e}))}catch(i){}s(a,e)}})).catch((()=>{}))}}const Pr=e=>Math.trunc(e/60/60%60,10);function Br(e=0,t=!1,i=!1){if(!ka(e))return Br(void 0,t,i);const n=e=>`0${e}`.slice(-2);let o=Pr(e);const s=(a=e,Math.trunc(a/60%60,10));var a;const r=(e=>Math.trunc(e%60,10))(e);return o=t||o>0?`${o}:`:"",`${i&&e>0?"-":""}${o}${n(s)}:${n(r)}`}const Mr={getIconUrl(){const e=new URL(this.config.iconUrl,window.location),t=window.location.host?window.location.host:window.top.location.host,i=e.host!==t||Oa.isIE&&!window.svg4everybody;return{url:this.config.iconUrl,cors:i}},findElements(){try{return this.elements.controls=Ja.call(this,this.config.selectors.controls.wrapper),this.elements.buttons={play:Za.call(this,this.config.selectors.buttons.play),pause:Ja.call(this,this.config.selectors.buttons.pause),restart:Ja.call(this,this.config.selectors.buttons.restart),rewind:Ja.call(this,this.config.selectors.buttons.rewind),fastForward:Ja.call(this,this.config.selectors.buttons.fastForward),mute:Ja.call(this,this.config.selectors.buttons.mute),pip:Ja.call(this,this.config.selectors.buttons.pip),airplay:Ja.call(this,this.config.selectors.buttons.airplay),settings:Ja.call(this,this.config.selectors.buttons.settings),captions:Ja.call(this,this.config.selectors.buttons.captions),fullscreen:Ja.call(this,this.config.selectors.buttons.fullscreen)},this.elements.progress=Ja.call(this,this.config.selectors.progress),this.elements.inputs={seek:Ja.call(this,this.config.selectors.inputs.seek),volume:Ja.call(this,this.config.selectors.inputs.volume)},this.elements.display={buffer:Ja.call(this,this.config.selectors.display.buffer),currentTime:Ja.call(this,this.config.selectors.display.currentTime),duration:Ja.call(this,this.config.selectors.display.duration)},La(this.elements.progress)&&(this.elements.display.seekTooltip=this.elements.progress.querySelector(`.${this.config.classNames.tooltip}`)),!0}catch(e){return this.debug.warn("It looks like there is a problem with your custom controls HTML",e),this.toggleNativeControls(!0),!1}},createIcon(e,t){const i="http://www.w3.org/2000/svg",n=Mr.getIconUrl.call(this),o=`${n.cors?"":n.url}#${this.config.iconPrefix}`,s=document.createElementNS(i,"svg");Ra(s,za(t,{"aria-hidden":"true",focusable:"false"}));const a=document.createElementNS(i,"use"),r=`${o}-${e}`;return"href"in a&&a.setAttributeNS("http://www.w3.org/1999/xlink","href",r),a.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",r),s.appendChild(a),s},createLabel(e,t={}){const i=$r.get(e,this.config);return Fa("span",{...t,class:[t.class,this.config.classNames.hidden].filter(Boolean).join(" ")},i)},createBadge(e){if(Ba(e))return null;const t=Fa("span",{class:this.config.classNames.menu.value});return t.appendChild(Fa("span",{class:this.config.classNames.menu.badge},e)),t},createButton(e,t){const i=za({},t);let n=Er(e);const o={element:"button",toggle:!1,label:null,icon:null,labelPressed:null,iconPressed:null};switch(["element","icon","label"].forEach((e=>{Object.keys(i).includes(e)&&(o[e]=i[e],delete i[e])})),"button"!==o.element||Object.keys(i).includes("type")||(i.type="button"),Object.keys(i).includes("class")?i.class.split(" ").some((e=>e===this.config.classNames.control))||za(i,{class:`${i.class} ${this.config.classNames.control}`}):i.class=this.config.classNames.control,e){case"play":o.toggle=!0,o.label="play",o.labelPressed="pause",o.icon="play",o.iconPressed="pause";break;case"mute":o.toggle=!0,o.label="mute",o.labelPressed="unmute",o.icon="volume",o.iconPressed="muted";break;case"captions":o.toggle=!0,o.label="enableCaptions",o.labelPressed="disableCaptions",o.icon="captions-off",o.iconPressed="captions-on";break;case"fullscreen":o.toggle=!0,o.label="enterFullscreen",o.labelPressed="exitFullscreen",o.icon="enter-fullscreen",o.iconPressed="exit-fullscreen";break;case"play-large":i.class+=` ${this.config.classNames.control}--overlaid`,n="play",o.label="play",o.icon="play";break;default:Ba(o.label)&&(o.label=n),Ba(o.icon)&&(o.icon=e)}const s=Fa(o.element);return o.toggle?(s.appendChild(Mr.createIcon.call(this,o.iconPressed,{class:"icon--pressed"})),s.appendChild(Mr.createIcon.call(this,o.icon,{class:"icon--not-pressed"})),s.appendChild(Mr.createLabel.call(this,o.labelPressed,{class:"label--pressed"})),s.appendChild(Mr.createLabel.call(this,o.label,{class:"label--not-pressed"}))):(s.appendChild(Mr.createIcon.call(this,o.icon)),s.appendChild(Mr.createLabel.call(this,o.label))),za(i,qa(this.config.selectors.buttons[n],i)),Ra(s,i),"play"===n?(Ea(this.elements.buttons[n])||(this.elements.buttons[n]=[]),this.elements.buttons[n].push(s)):this.elements.buttons[n]=s,s},createRange(e,t){const i=Fa("input",za(qa(this.config.selectors.inputs[e]),{type:"range",min:0,max:100,step:.01,value:0,autocomplete:"off",role:"slider","aria-label":$r.get(e,this.config),"aria-valuemin":0,"aria-valuemax":100,"aria-valuenow":0},t));return this.elements.inputs[e]=i,Mr.updateRangeFill.call(this,i),ca.setup(i),i},createProgress(e,t){const i=Fa("progress",za(qa(this.config.selectors.display[e]),{min:0,max:100,value:0,role:"progressbar","aria-hidden":!0},t));if("volume"!==e){i.appendChild(Fa("span",null,"0"));const t={played:"played",buffer:"buffered"}[e],n=t?$r.get(t,this.config):"";i.innerText=`% ${n.toLowerCase()}`}return this.elements.display[e]=i,i},createTime(e,t){const i=qa(this.config.selectors.display[e],t),n=Fa("div",za(i,{class:`${i.class?i.class:""} ${this.config.classNames.display.time} `.trim(),"aria-label":$r.get(e,this.config)}),"00:00");return this.elements.display[e]=n,n},bindMenuItemShortcuts(e,t){or.call(this,e,"keydown keyup",(i=>{if(!["Space","ArrowUp","ArrowDown","ArrowRight"].includes(i.key))return;if(i.preventDefault(),i.stopPropagation(),"keydown"===i.type)return;const n=Ga(e,'[role="menuitemradio"]');if(!n&&["Space","ArrowRight"].includes(i.key))Mr.showMenuPanel.call(this,t,!0);else{let t;"Space"!==i.key&&("ArrowDown"===i.key||n&&"ArrowRight"===i.key?(t=e.nextElementSibling,La(t)||(t=e.parentNode.firstElementChild)):(t=e.previousElementSibling,La(t)||(t=e.parentNode.lastElementChild)),Qa.call(this,t,!0))}}),!1),or.call(this,e,"keyup",(e=>{"Return"===e.key&&Mr.focusFirstMenuItem.call(this,null,!0)}))},createMenuItem({value:e,list:t,type:i,title:n,badge:o=null,checked:s=!1}){const a=qa(this.config.selectors.inputs[i]),r=Fa("button",za(a,{type:"button",role:"menuitemradio",class:`${this.config.classNames.control} ${a.class?a.class:""}`.trim(),"aria-checked":s,value:e})),l=Fa("span");l.innerHTML=n,La(o)&&l.appendChild(o),r.appendChild(l),Object.defineProperty(r,"checked",{enumerable:!0,get:()=>"true"===r.getAttribute("aria-checked"),set(e){e&&Array.from(r.parentNode.children).filter((e=>Ga(e,'[role="menuitemradio"]'))).forEach((e=>e.setAttribute("aria-checked","false"))),r.setAttribute("aria-checked",e?"true":"false")}}),this.listeners.bind(r,"click keyup",(t=>{if(!_a(t)||"Space"===t.key){switch(t.preventDefault(),t.stopPropagation(),r.checked=!0,i){case"language":this.currentTrack=Number(e);break;case"quality":this.quality=e;break;case"speed":this.speed=parseFloat(e)}Mr.showMenuPanel.call(this,"home",_a(t))}}),i,!1),Mr.bindMenuItemShortcuts.call(this,r,i),t.appendChild(r)},formatTime(e=0,t=!1){return ka(e)?Br(e,Pr(this.duration)>0,t):e},updateTimeDisplay(e=null,t=0,i=!1){La(e)&&ka(t)&&(e.innerText=Mr.formatTime(t,i))},updateVolume(){this.supported.ui&&(La(this.elements.inputs.volume)&&Mr.setRange.call(this,this.elements.inputs.volume,this.muted?0:this.volume),La(this.elements.buttons.mute)&&(this.elements.buttons.mute.pressed=this.muted||0===this.volume))},setRange(e,t=0){La(e)&&(e.value=t,Mr.updateRangeFill.call(this,e))},updateProgress(e){if(!this.supported.ui||!$a(e))return;let t=0;const i=(e,t)=>{const i=ka(t)?t:0,n=La(e)?e:this.elements.display.buffer;if(La(n)){n.value=i;const e=n.getElementsByTagName("span")[0];La(e)&&(e.childNodes[0].nodeValue=i)}};if(e)switch(e.type){case"timeupdate":case"seeking":case"seeked":t=function(e,t){return 0===e||0===t||Number.isNaN(e)||Number.isNaN(t)?0:(e/t*100).toFixed(2)}(this.currentTime,this.duration),"timeupdate"===e.type&&Mr.setRange.call(this,this.elements.inputs.seek,t);break;case"playing":case"progress":i(this.elements.display.buffer,100*this.buffered)}},updateRangeFill(e){const t=$a(e)?e.target:e;if(La(t)&&"range"===t.getAttribute("type")){if(Ga(t,this.config.selectors.inputs.seek)){t.setAttribute("aria-valuenow",this.currentTime);const e=Mr.formatTime(this.currentTime),i=Mr.formatTime(this.duration),n=$r.get("seekLabel",this.config);t.setAttribute("aria-valuetext",n.replace("{currentTime}",e).replace("{duration}",i))}else if(Ga(t,this.config.selectors.inputs.volume)){const e=100*t.value;t.setAttribute("aria-valuenow",e),t.setAttribute("aria-valuetext",`${e.toFixed(1)}%`)}else t.setAttribute("aria-valuenow",t.value);Oa.isWebkit&&t.style.setProperty("--value",t.value/t.max*100+"%")}},updateSeekTooltip(e){var t,i;if(!this.config.tooltips.seek||!La(this.elements.inputs.seek)||!La(this.elements.display.seekTooltip)||0===this.duration)return;const n=this.elements.display.seekTooltip,o=`${this.config.classNames.tooltip}--visible`,s=e=>Ya(n,o,e);if(this.touch)return void s(!1);let a=0;const r=this.elements.progress.getBoundingClientRect();if($a(e))a=100/r.width*(e.pageX-r.left);else{if(!Ka(n,o))return;a=parseFloat(n.style.left,10)}a<0?a=0:a>100&&(a=100);const l=this.duration/100*a;n.innerText=Mr.formatTime(l);const c=null===(t=this.config.markers)||void 0===t||null===(i=t.points)||void 0===i?void 0:i.find((({time:e})=>e===Math.round(l)));c&&n.insertAdjacentHTML("afterbegin",`${c.label}<br>`),n.style.left=`${a}%`,$a(e)&&["mouseenter","mouseleave"].includes(e.type)&&s("mouseenter"===e.type)},timeUpdate(e){const t=!La(this.elements.display.duration)&&this.config.invertTime;Mr.updateTimeDisplay.call(this,this.elements.display.currentTime,t?this.duration-this.currentTime:this.currentTime,t),e&&"timeupdate"===e.type&&this.media.seeking||Mr.updateProgress.call(this,e)},durationUpdate(){if(!this.supported.ui||!this.config.invertTime&&this.currentTime)return;if(this.duration>=2**32)return Xa(this.elements.display.currentTime,!0),void Xa(this.elements.progress,!0);La(this.elements.inputs.seek)&&this.elements.inputs.seek.setAttribute("aria-valuemax",this.duration);const e=La(this.elements.display.duration);!e&&this.config.displayDuration&&this.paused&&Mr.updateTimeDisplay.call(this,this.elements.display.currentTime,this.duration),e&&Mr.updateTimeDisplay.call(this,this.elements.display.duration,this.duration),this.config.markers.enabled&&Mr.setMarkers.call(this),Mr.updateSeekTooltip.call(this)},toggleMenuButton(e,t){Xa(this.elements.settings.buttons[e],!t)},updateSetting(e,t,i){const n=this.elements.settings.panels[e];let o=null,s=t;if("captions"===e)o=this.currentTrack;else{if(o=Ba(i)?this[e]:i,Ba(o)&&(o=this.config[e].default),!Ba(this.options[e])&&!this.options[e].includes(o))return void this.debug.warn(`Unsupported value of '${o}' for ${e}`);if(!this.config[e].options.includes(o))return void this.debug.warn(`Disabled value of '${o}' for ${e}`)}if(La(s)||(s=n&&n.querySelector('[role="menu"]')),!La(s))return;this.elements.settings.buttons[e].querySelector(`.${this.config.classNames.menu.value}`).innerHTML=Mr.getLabel.call(this,e,o);const a=s&&s.querySelector(`[value="${o}"]`);La(a)&&(a.checked=!0)},getLabel(e,t){switch(e){case"speed":return 1===t?$r.get("normal",this.config):`${t}&times;`;case"quality":if(ka(t)){const e=$r.get(`qualityLabel.${t}`,this.config);return e.length?e:`${t}p`}return Sr(t);case"captions":return Ir.getLabel.call(this);default:return null}},setQualityMenu(e){if(!La(this.elements.settings.panels.quality))return;const t="quality",i=this.elements.settings.panels.quality.querySelector('[role="menu"]');Ea(e)&&(this.options.quality=ur(e).filter((e=>this.config.quality.options.includes(e))));const n=!Ba(this.options.quality)&&this.options.quality.length>1;if(Mr.toggleMenuButton.call(this,t,n),Ha(i),Mr.checkMenu.call(this),!n)return;const o=e=>{const t=$r.get(`qualityBadge.${e}`,this.config);return t.length?Mr.createBadge.call(this,t):null};this.options.quality.sort(((e,t)=>{const i=this.config.quality.options;return i.indexOf(e)>i.indexOf(t)?1:-1})).forEach((e=>{Mr.createMenuItem.call(this,{value:e,list:i,type:t,title:Mr.getLabel.call(this,"quality",e),badge:o(e)})})),Mr.updateSetting.call(this,t,i)},setCaptionsMenu(){if(!La(this.elements.settings.panels.captions))return;const e="captions",t=this.elements.settings.panels.captions.querySelector('[role="menu"]'),i=Ir.getTracks.call(this),n=Boolean(i.length);if(Mr.toggleMenuButton.call(this,e,n),Ha(t),Mr.checkMenu.call(this),!n)return;const o=i.map(((e,i)=>({value:i,checked:this.captions.toggled&&this.currentTrack===i,title:Ir.getLabel.call(this,e),badge:e.language&&Mr.createBadge.call(this,e.language.toUpperCase()),list:t,type:"language"})));o.unshift({value:-1,checked:!this.captions.toggled,title:$r.get("disabled",this.config),list:t,type:"language"}),o.forEach(Mr.createMenuItem.bind(this)),Mr.updateSetting.call(this,e,t)},setSpeedMenu(){if(!La(this.elements.settings.panels.speed))return;const e="speed",t=this.elements.settings.panels.speed.querySelector('[role="menu"]');this.options.speed=this.options.speed.filter((e=>e>=this.minimumSpeed&&e<=this.maximumSpeed));const i=!Ba(this.options.speed)&&this.options.speed.length>1;Mr.toggleMenuButton.call(this,e,i),Ha(t),Mr.checkMenu.call(this),i&&(this.options.speed.forEach((i=>{Mr.createMenuItem.call(this,{value:i,list:t,type:e,title:Mr.getLabel.call(this,"speed",i)})})),Mr.updateSetting.call(this,e,t))},checkMenu(){const{buttons:e}=this.elements.settings,t=!Ba(e)&&Object.values(e).some((e=>!e.hidden));Xa(this.elements.settings.menu,!t)},focusFirstMenuItem(e,t=!1){if(this.elements.settings.popup.hidden)return;let i=e;La(i)||(i=Object.values(this.elements.settings.panels).find((e=>!e.hidden)));const n=i.querySelector('[role^="menuitem"]');Qa.call(this,n,t)},toggleMenu(e){const{popup:t}=this.elements.settings,i=this.elements.buttons.settings;if(!La(t)||!La(i))return;const{hidden:n}=t;let o=n;if(Ca(e))o=e;else if(_a(e)&&"Escape"===e.key)o=!1;else if($a(e)){const n=Sa(e.composedPath)?e.composedPath()[0]:e.target,s=t.contains(n);if(s||!s&&e.target!==i&&o)return}i.setAttribute("aria-expanded",o),Xa(t,!o),Ya(this.elements.container,this.config.classNames.menu.open,o),o&&_a(e)?Mr.focusFirstMenuItem.call(this,null,!0):o||n||Qa.call(this,i,_a(e))},getMenuSize(e){const t=e.cloneNode(!0);t.style.position="absolute",t.style.opacity=0,t.removeAttribute("hidden"),e.parentNode.appendChild(t);const i=t.scrollWidth,n=t.scrollHeight;return Wa(t),{width:i,height:n}},showMenuPanel(e="",t=!1){const i=this.elements.container.querySelector(`#plyr-settings-${this.id}-${e}`);if(!La(i))return;const n=i.parentNode,o=Array.from(n.children).find((e=>!e.hidden));if(tr.transitions&&!tr.reducedMotion){n.style.width=`${o.scrollWidth}px`,n.style.height=`${o.scrollHeight}px`;const e=Mr.getMenuSize.call(this,i),t=e=>{e.target===n&&["width","height"].includes(e.propertyName)&&(n.style.width="",n.style.height="",sr.call(this,n,Ma,t))};or.call(this,n,Ma,t),n.style.width=`${e.width}px`,n.style.height=`${e.height}px`}Xa(o,!0),Xa(i,!1),Mr.focusFirstMenuItem.call(this,i,t)},setDownloadUrl(){const e=this.elements.buttons.download;La(e)&&e.setAttribute("href",this.download)},create(e){const{bindMenuItemShortcuts:t,createButton:i,createProgress:n,createRange:o,createTime:s,setQualityMenu:a,setSpeedMenu:r,showMenuPanel:l}=Mr;this.elements.controls=null,Ea(this.config.controls)&&this.config.controls.includes("play-large")&&this.elements.container.appendChild(i.call(this,"play-large"));const c=Fa("div",qa(this.config.selectors.controls.wrapper));this.elements.controls=c;const d={class:"plyr__controls__item"};return ur(Ea(this.config.controls)?this.config.controls:[]).forEach((a=>{if("restart"===a&&c.appendChild(i.call(this,"restart",d)),"rewind"===a&&c.appendChild(i.call(this,"rewind",d)),"play"===a&&c.appendChild(i.call(this,"play",d)),"fast-forward"===a&&c.appendChild(i.call(this,"fast-forward",d)),"progress"===a){const t=Fa("div",{class:`${d.class} plyr__progress__container`}),i=Fa("div",qa(this.config.selectors.progress));if(i.appendChild(o.call(this,"seek",{id:`plyr-seek-${e.id}`})),i.appendChild(n.call(this,"buffer")),this.config.tooltips.seek){const e=Fa("span",{class:this.config.classNames.tooltip},"00:00");i.appendChild(e),this.elements.display.seekTooltip=e}this.elements.progress=i,t.appendChild(this.elements.progress),c.appendChild(t)}if("current-time"===a&&c.appendChild(s.call(this,"currentTime",d)),"duration"===a&&c.appendChild(s.call(this,"duration",d)),"mute"===a||"volume"===a){let{volume:t}=this.elements;if(La(t)&&c.contains(t)||(t=Fa("div",za({},d,{class:`${d.class} plyr__volume`.trim()})),this.elements.volume=t,c.appendChild(t)),"mute"===a&&t.appendChild(i.call(this,"mute")),"volume"===a&&!Oa.isIos){const i={max:1,step:.05,value:this.config.volume};t.appendChild(o.call(this,"volume",za(i,{id:`plyr-volume-${e.id}`})))}}if("captions"===a&&c.appendChild(i.call(this,"captions",d)),"settings"===a&&!Ba(this.config.settings)){const n=Fa("div",za({},d,{class:`${d.class} plyr__menu`.trim(),hidden:""}));n.appendChild(i.call(this,"settings",{"aria-haspopup":!0,"aria-controls":`plyr-settings-${e.id}`,"aria-expanded":!1}));const o=Fa("div",{class:"plyr__menu__container",id:`plyr-settings-${e.id}`,hidden:""}),s=Fa("div"),a=Fa("div",{id:`plyr-settings-${e.id}-home`}),r=Fa("div",{role:"menu"});a.appendChild(r),s.appendChild(a),this.elements.settings.panels.home=a,this.config.settings.forEach((i=>{const n=Fa("button",za(qa(this.config.selectors.buttons.settings),{type:"button",class:`${this.config.classNames.control} ${this.config.classNames.control}--forward`,role:"menuitem","aria-haspopup":!0,hidden:""}));t.call(this,n,i),or.call(this,n,"click",(()=>{l.call(this,i,!1)}));const o=Fa("span",null,$r.get(i,this.config)),a=Fa("span",{class:this.config.classNames.menu.value});a.innerHTML=e[i],o.appendChild(a),n.appendChild(o),r.appendChild(n);const c=Fa("div",{id:`plyr-settings-${e.id}-${i}`,hidden:""}),d=Fa("button",{type:"button",class:`${this.config.classNames.control} ${this.config.classNames.control}--back`});d.appendChild(Fa("span",{"aria-hidden":!0},$r.get(i,this.config))),d.appendChild(Fa("span",{class:this.config.classNames.hidden},$r.get("menuBack",this.config))),or.call(this,c,"keydown",(e=>{"ArrowLeft"===e.key&&(e.preventDefault(),e.stopPropagation(),l.call(this,"home",!0))}),!1),or.call(this,d,"click",(()=>{l.call(this,"home",!1)})),c.appendChild(d),c.appendChild(Fa("div",{role:"menu"})),s.appendChild(c),this.elements.settings.buttons[i]=n,this.elements.settings.panels[i]=c})),o.appendChild(s),n.appendChild(o),c.appendChild(n),this.elements.settings.popup=o,this.elements.settings.menu=n}if("pip"===a&&tr.pip&&c.appendChild(i.call(this,"pip",d)),"airplay"===a&&tr.airplay&&c.appendChild(i.call(this,"airplay",d)),"download"===a){const e=za({},d,{element:"a",href:this.download,target:"_blank"});this.isHTML5&&(e.download="");const{download:t}=this.config.urls;!Pa(t)&&this.isEmbed&&za(e,{icon:`logo-${this.provider}`,label:this.provider}),c.appendChild(i.call(this,"download",e))}"fullscreen"===a&&c.appendChild(i.call(this,"fullscreen",d))})),this.isHTML5&&a.call(this,wr.getQualityOptions.call(this)),r.call(this),c},inject(){if(this.config.loadSprite){const e=Mr.getIconUrl.call(this);e.cors&&Nr(e.url,"sprite-plyr")}this.id=Math.floor(1e4*Math.random());let e=null;this.elements.controls=null;const t={id:this.id,seektime:this.config.seekTime,title:this.config.title};let i,n=!0;if(Sa(this.config.controls)&&(this.config.controls=this.config.controls.call(this,t)),this.config.controls||(this.config.controls=[]),La(this.config.controls)||xa(this.config.controls)?e=this.config.controls:(e=Mr.create.call(this,{id:this.id,seektime:this.config.seekTime,speed:this.speed,quality:this.quality,captions:Ir.getLabel.call(this)}),n=!1),n&&xa(this.config.controls)&&(e=(e=>{let i=e;return Object.entries(t).forEach((([e,t])=>{i=Cr(i,`{${e}}`,t)})),i})(e)),xa(this.config.selectors.controls.container)&&(i=document.querySelector(this.config.selectors.controls.container)),La(i)||(i=this.elements.container),i[La(e)?"insertAdjacentElement":"insertAdjacentHTML"]("afterbegin",e),La(this.elements.controls)||Mr.findElements.call(this),!Ba(this.elements.buttons)){const e=e=>{const t=this.config.classNames.controlPressed;Object.defineProperty(e,"pressed",{enumerable:!0,get:()=>Ka(e,t),set(i=!1){Ya(e,t,i)}})};Object.values(this.elements.buttons).filter(Boolean).forEach((t=>{Ea(t)||Ta(t)?Array.from(t).filter(Boolean).forEach(e):e(t)}))}if(Oa.isEdge&&Va(i),this.config.tooltips.controls){const{classNames:e,selectors:t}=this.config,i=`${t.controls.wrapper} ${t.labels} .${e.hidden}`,n=Za.call(this,i);Array.from(n).forEach((e=>{Ya(e,this.config.classNames.hidden,!1),Ya(e,this.config.classNames.tooltip,!0)}))}},setMediaMetadata(){try{"mediaSession"in navigator&&(navigator.mediaSession.metadata=new window.MediaMetadata({title:this.config.mediaMetadata.title,artist:this.config.mediaMetadata.artist,album:this.config.mediaMetadata.album,artwork:this.config.mediaMetadata.artwork}))}catch(e){}},setMarkers(){var e,t;if(!this.duration||this.elements.markers)return;const i=null===(e=this.config.markers)||void 0===e||null===(t=e.points)||void 0===t?void 0:t.filter((({time:e})=>e>0&&e<this.duration));if(null==i||!i.length)return;const n=document.createDocumentFragment(),o=document.createDocumentFragment();let s=null;const a=`${this.config.classNames.tooltip}--visible`,r=e=>Ya(s,a,e);i.forEach((e=>{const t=Fa("span",{class:this.config.classNames.marker},""),i=e.time/this.duration*100+"%";s&&(t.addEventListener("mouseenter",(()=>{e.label||(s.style.left=i,s.innerHTML=e.label,r(!0))})),t.addEventListener("mouseleave",(()=>{r(!1)}))),t.addEventListener("click",(()=>{this.currentTime=e.time})),t.style.left=i,o.appendChild(t)})),n.appendChild(o),this.config.tooltips.seek||(s=Fa("span",{class:this.config.classNames.tooltip},""),n.appendChild(s)),this.elements.markers={points:o,tip:s},this.elements.progress.appendChild(n)}};function Vr(e,t=!0){let i=e;if(t){const e=document.createElement("a");e.href=i,i=e.href}try{return new URL(i)}catch(n){return null}}function Or(e){const t=new URLSearchParams;return wa(e)&&Object.entries(e).forEach((([e,i])=>{t.set(e,i)})),t}const Ir={setup(){if(!this.supported.ui)return;if(!this.isVideo||this.isYouTube||this.isHTML5&&!tr.textTracks)return void(Ea(this.config.controls)&&this.config.controls.includes("settings")&&this.config.settings.includes("captions")&&Mr.setCaptionsMenu.call(this));if(La(this.elements.captions)||(this.elements.captions=Fa("div",qa(this.config.selectors.captions)),function(e,t){La(e)&&La(t)&&t.parentNode.insertBefore(e,t.nextSibling)}(this.elements.captions,this.elements.wrapper)),Oa.isIE&&window.URL){const e=this.media.querySelectorAll("track");Array.from(e).forEach((e=>{const t=e.getAttribute("src"),i=Vr(t);null!==i&&i.hostname!==window.location.href.hostname&&["http:","https:"].includes(i.protocol)&&Ar(t,"blob").then((t=>{e.setAttribute("src",window.URL.createObjectURL(t))})).catch((()=>{Wa(e)}))}))}const e=ur((navigator.languages||[navigator.language||navigator.userLanguage||"en"]).map((e=>e.split("-")[0])));let t=(this.storage.get("language")||this.config.captions.language||"auto").toLowerCase();"auto"===t&&([t]=e);let i=this.storage.get("captions");if(Ca(i)||({active:i}=this.config.captions),Object.assign(this.captions,{toggled:!1,active:i,language:t,languages:e}),this.isHTML5){const e=this.config.captions.update?"addtrack removetrack":"removetrack";or.call(this,this.media.textTracks,e,Ir.update.bind(this))}setTimeout(Ir.update.bind(this),0)},update(){const e=Ir.getTracks.call(this,!0),{active:t,language:i,meta:n,currentTrackNode:o}=this.captions,s=Boolean(e.find((e=>e.language===i)));this.isHTML5&&this.isVideo&&e.filter((e=>!n.get(e))).forEach((e=>{this.debug.log("Track added",e),n.set(e,{default:"showing"===e.mode}),"showing"===e.mode&&(e.mode="hidden"),or.call(this,e,"cuechange",(()=>Ir.updateCues.call(this)))})),(s&&this.language!==i||!e.includes(o))&&(Ir.setLanguage.call(this,i),Ir.toggle.call(this,t&&s)),this.elements&&Ya(this.elements.container,this.config.classNames.captions.enabled,!Ba(e)),Ea(this.config.controls)&&this.config.controls.includes("settings")&&this.config.settings.includes("captions")&&Mr.setCaptionsMenu.call(this)},toggle(e,t=!0){if(!this.supported.ui)return;const{toggled:i}=this.captions,n=this.config.classNames.captions.active,o=ba(e)?!i:e;if(o!==i){if(t||(this.captions.active=o,this.storage.set({captions:o})),!this.language&&o&&!t){const e=Ir.getTracks.call(this),t=Ir.findTrack.call(this,[this.captions.language,...this.captions.languages],!0);return this.captions.language=t.language,void Ir.set.call(this,e.indexOf(t))}this.elements.buttons.captions&&(this.elements.buttons.captions.pressed=o),Ya(this.elements.container,n,o),this.captions.toggled=o,Mr.updateSetting.call(this,"captions"),rr.call(this,this.media,o?"captionsenabled":"captionsdisabled")}setTimeout((()=>{o&&this.captions.toggled&&(this.captions.currentTrackNode.mode="hidden")}))},set(e,t=!0){const i=Ir.getTracks.call(this);if(-1!==e)if(ka(e))if(e in i){if(this.captions.currentTrack!==e){this.captions.currentTrack=e;const n=i[e],{language:o}=n||{};this.captions.currentTrackNode=n,Mr.updateSetting.call(this,"captions"),t||(this.captions.language=o,this.storage.set({language:o})),this.isVimeo&&this.embed.enableTextTrack(o),rr.call(this,this.media,"languagechange")}Ir.toggle.call(this,!0,t),this.isHTML5&&this.isVideo&&Ir.updateCues.call(this)}else this.debug.warn("Track not found",e);else this.debug.warn("Invalid caption argument",e);else Ir.toggle.call(this,!1,t)},setLanguage(e,t=!0){if(!xa(e))return void this.debug.warn("Invalid language argument",e);const i=e.toLowerCase();this.captions.language=i;const n=Ir.getTracks.call(this),o=Ir.findTrack.call(this,[i]);Ir.set.call(this,n.indexOf(o),t)},getTracks(e=!1){return Array.from((this.media||{}).textTracks||[]).filter((t=>!this.isHTML5||e||this.captions.meta.has(t))).filter((e=>["captions","subtitles"].includes(e.kind)))},findTrack(e,t=!1){const i=Ir.getTracks.call(this),n=e=>Number((this.captions.meta.get(e)||{}).default),o=Array.from(i).sort(((e,t)=>n(t)-n(e)));let s;return e.every((e=>(s=o.find((t=>t.language===e)),!s))),s||(t?o[0]:void 0)},getCurrentTrack(){return Ir.getTracks.call(this)[this.currentTrack]},getLabel(e){let t=e;return!Aa(t)&&tr.textTracks&&this.captions.toggled&&(t=Ir.getCurrentTrack.call(this)),Aa(t)?Ba(t.label)?Ba(t.language)?$r.get("enabled",this.config):e.language.toUpperCase():t.label:$r.get("disabled",this.config)},updateCues(e){if(!this.supported.ui)return;if(!La(this.elements.captions))return void this.debug.warn("No captions element to render to");if(!ba(e)&&!Array.isArray(e))return void this.debug.warn("updateCues: Invalid input",e);let t=e;if(!t){const e=Ir.getCurrentTrack.call(this);t=Array.from((e||{}).activeCues||[]).map((e=>e.getCueAsHTML())).map(Tr)}const i=t.map((e=>e.trim())).join("\n");if(i!==this.elements.captions.innerHTML){Ha(this.elements.captions);const e=Fa("span",qa(this.config.selectors.caption));e.innerHTML=i,this.elements.captions.appendChild(e),rr.call(this,this.media,"cuechange")}}},zr={enabled:!0,title:"",debug:!1,autoplay:!1,autopause:!0,playsinline:!0,seekTime:10,volume:1,muted:!1,duration:null,displayDuration:!0,invertTime:!0,toggleInvert:!0,ratio:null,clickToPlay:!0,hideControls:!0,resetOnEnd:!1,disableContextMenu:!0,loadSprite:!0,iconPrefix:"plyr",iconUrl:"https://cdn.plyr.io/3.7.2/plyr.svg",blankVideo:"https://cdn.plyr.io/static/blank.mp4",quality:{default:576,options:[4320,2880,2160,1440,1080,720,576,480,360,240],forced:!1,onChange:null},loop:{active:!1},speed:{selected:1,options:[.5,.75,1,1.25,1.5,1.75,2,4]},keyboard:{focused:!0,global:!1},tooltips:{controls:!1,seek:!0},captions:{active:!1,language:"auto",update:!1},fullscreen:{enabled:!0,fallback:!0,iosNative:!1},storage:{enabled:!0,key:"plyr"},controls:["play-large","play","progress","current-time","mute","volume","captions","settings","pip","airplay","fullscreen"],settings:["captions","quality","speed"],i18n:{restart:"Restart",rewind:"Rewind {seektime}s",play:"Play",pause:"Pause",fastForward:"Forward {seektime}s",seek:"Seek",seekLabel:"{currentTime} of {duration}",played:"Played",buffered:"Buffered",currentTime:"Current time",duration:"Duration",volume:"Volume",mute:"Mute",unmute:"Unmute",enableCaptions:"Enable captions",disableCaptions:"Disable captions",download:"Download",enterFullscreen:"Enter fullscreen",exitFullscreen:"Exit fullscreen",frameTitle:"Player for {title}",captions:"Captions",settings:"Settings",pip:"PIP",menuBack:"Go back to previous menu",speed:"Speed",normal:"Normal",quality:"Quality",loop:"Loop",start:"Start",end:"End",all:"All",reset:"Reset",disabled:"Disabled",enabled:"Enabled",advertisement:"Ad",qualityBadge:{2160:"4K",1440:"HD",1080:"HD",720:"HD",576:"SD",480:"SD"}},urls:{download:null,vimeo:{sdk:"https://player.vimeo.com/api/player.js",iframe:"https://player.vimeo.com/video/{0}?{1}",api:"https://vimeo.com/api/oembed.json?url={0}"},youtube:{sdk:"https://www.youtube.com/iframe_api",api:"https://noembed.com/embed?url=https://www.youtube.com/watch?v={0}"},googleIMA:{sdk:"https://imasdk.googleapis.com/js/sdkloader/ima3.js"}},listeners:{seek:null,play:null,pause:null,restart:null,rewind:null,fastForward:null,mute:null,volume:null,captions:null,download:null,fullscreen:null,pip:null,airplay:null,speed:null,quality:null,loop:null,language:null},events:["ended","progress","stalled","playing","waiting","canplay","canplaythrough","loadstart","loadeddata","loadedmetadata","timeupdate","volumechange","play","pause","error","seeking","seeked","emptied","ratechange","cuechange","download","enterfullscreen","exitfullscreen","captionsenabled","captionsdisabled","languagechange","controlshidden","controlsshown","ready","statechange","qualitychange","adsloaded","adscontentpause","adscontentresume","adstarted","adsmidpoint","adscomplete","adsallcomplete","adsimpression","adsclick"],selectors:{editable:"input, textarea, select, [contenteditable]",container:".plyr",controls:{container:null,wrapper:".plyr__controls"},labels:"[data-plyr]",buttons:{play:'[data-plyr="play"]',pause:'[data-plyr="pause"]',restart:'[data-plyr="restart"]',rewind:'[data-plyr="rewind"]',fastForward:'[data-plyr="fast-forward"]',mute:'[data-plyr="mute"]',captions:'[data-plyr="captions"]',download:'[data-plyr="download"]',fullscreen:'[data-plyr="fullscreen"]',pip:'[data-plyr="pip"]',airplay:'[data-plyr="airplay"]',settings:'[data-plyr="settings"]',loop:'[data-plyr="loop"]'},inputs:{seek:'[data-plyr="seek"]',volume:'[data-plyr="volume"]',speed:'[data-plyr="speed"]',language:'[data-plyr="language"]',quality:'[data-plyr="quality"]'},display:{currentTime:".plyr__time--current",duration:".plyr__time--duration",buffer:".plyr__progress__buffer",loop:".plyr__progress__loop",volume:".plyr__volume--display"},progress:".plyr__progress",captions:".plyr__captions",caption:".plyr__caption"},classNames:{type:"plyr--{0}",provider:"plyr--{0}",video:"plyr__video-wrapper",embed:"plyr__video-embed",videoFixedRatio:"plyr__video-wrapper--fixed-ratio",embedContainer:"plyr__video-embed__container",poster:"plyr__poster",posterEnabled:"plyr__poster-enabled",ads:"plyr__ads",control:"plyr__control",controlPressed:"plyr__control--pressed",playing:"plyr--playing",paused:"plyr--paused",stopped:"plyr--stopped",loading:"plyr--loading",hover:"plyr--hover",tooltip:"plyr__tooltip",cues:"plyr__cues",marker:"plyr__progress__marker",hidden:"plyr__sr-only",hideControls:"plyr--hide-controls",isIos:"plyr--is-ios",isTouch:"plyr--is-touch",uiSupported:"plyr--full-ui",noTransition:"plyr--no-transition",display:{time:"plyr__time"},menu:{value:"plyr__menu__value",badge:"plyr__badge",open:"plyr--menu-open"},captions:{enabled:"plyr--captions-enabled",active:"plyr--captions-active"},fullscreen:{enabled:"plyr--fullscreen-enabled",fallback:"plyr--fullscreen-fallback"},pip:{supported:"plyr--pip-supported",active:"plyr--pip-active"},airplay:{supported:"plyr--airplay-supported",active:"plyr--airplay-active"},tabFocus:"plyr__tab-focus",previewThumbnails:{thumbContainer:"plyr__preview-thumb",thumbContainerShown:"plyr__preview-thumb--is-shown",imageContainer:"plyr__preview-thumb__image-container",timeContainer:"plyr__preview-thumb__time-container",scrubbingContainer:"plyr__preview-scrubbing",scrubbingContainerShown:"plyr__preview-scrubbing--is-shown"}},attributes:{embed:{provider:"data-plyr-provider",id:"data-plyr-embed-id",hash:"data-plyr-embed-hash"}},ads:{enabled:!1,publisherId:"",tagUrl:""},previewThumbnails:{enabled:!1,src:""},vimeo:{byline:!1,portrait:!1,title:!1,speed:!0,transparent:!1,customControls:!0,referrerPolicy:null,premium:!1},youtube:{rel:0,showinfo:0,iv_load_policy:3,modestbranding:1,customControls:!0,noCookie:!1},mediaMetadata:{title:"",artist:"",album:"",artwork:[]},markers:{enabled:!1,points:[]}},Dr="picture-in-picture",Rr="inline",Fr={html5:"html5",youtube:"youtube",vimeo:"vimeo"},jr="audio",Wr="video";const Hr=()=>{};class Ur{constructor(e=!1){this.enabled=window.console&&e,this.enabled&&this.log("Debugging enabled")}get log(){return this.enabled?Function.prototype.bind.call(console.log,console):Hr}get warn(){return this.enabled?Function.prototype.bind.call(console.warn,console):Hr}get error(){return this.enabled?Function.prototype.bind.call(console.error,console):Hr}}class qr{constructor(e){js(this,"onChange",(()=>{if(!this.enabled)return;const e=this.player.elements.buttons.fullscreen;La(e)&&(e.pressed=this.active);const t=this.target===this.player.media?this.target:this.player.elements.container;rr.call(this.player,t,this.active?"enterfullscreen":"exitfullscreen",!0)})),js(this,"toggleFallback",((e=!1)=>{if(e?this.scrollPosition={x:window.scrollX||0,y:window.scrollY||0}:window.scrollTo(this.scrollPosition.x,this.scrollPosition.y),document.body.style.overflow=e?"hidden":"",Ya(this.target,this.player.config.classNames.fullscreen.fallback,e),Oa.isIos){let t=document.head.querySelector('meta[name="viewport"]');const i="viewport-fit=cover";t||(t=document.createElement("meta"),t.setAttribute("name","viewport"));const n=xa(t.content)&&t.content.includes(i);e?(this.cleanupViewport=!n,n||(t.content+=`,${i}`)):this.cleanupViewport&&(t.content=t.content.split(",").filter((e=>e.trim()!==i)).join(","))}this.onChange()})),js(this,"trapFocus",(e=>{if(Oa.isIos||!this.active||"Tab"!==e.key)return;const t=document.activeElement,i=Za.call(this.player,"a[href], button:not(:disabled), input:not(:disabled), [tabindex]"),[n]=i,o=i[i.length-1];t!==o||e.shiftKey?t===n&&e.shiftKey&&(o.focus(),e.preventDefault()):(n.focus(),e.preventDefault())})),js(this,"update",(()=>{if(this.enabled){let e;e=this.forceFallback?"Fallback (forced)":qr.native?"Native":"Fallback",this.player.debug.log(`${e} fullscreen enabled`)}else this.player.debug.log("Fullscreen not supported and fallback disabled");Ya(this.player.elements.container,this.player.config.classNames.fullscreen.enabled,this.enabled)})),js(this,"enter",(()=>{this.enabled&&(Oa.isIos&&this.player.config.fullscreen.iosNative?this.player.isVimeo?this.player.embed.requestFullscreen():this.target.webkitEnterFullscreen():!qr.native||this.forceFallback?this.toggleFallback(!0):this.prefix?Ba(this.prefix)||this.target[`${this.prefix}Request${this.property}`]():this.target.requestFullscreen({navigationUI:"hide"}))})),js(this,"exit",(()=>{if(this.enabled)if(Oa.isIos&&this.player.config.fullscreen.iosNative)this.target.webkitExitFullscreen(),dr(this.player.play());else if(!qr.native||this.forceFallback)this.toggleFallback(!1);else if(this.prefix){if(!Ba(this.prefix)){const e="moz"===this.prefix?"Cancel":"Exit";document[`${this.prefix}${e}${this.property}`]()}}else(document.cancelFullScreen||document.exitFullscreen).call(document)})),js(this,"toggle",(()=>{this.active?this.exit():this.enter()})),this.player=e,this.prefix=qr.prefix,this.property=qr.property,this.scrollPosition={x:0,y:0},this.forceFallback="force"===e.config.fullscreen.fallback,this.player.elements.fullscreen=e.config.fullscreen.container&&function(e,t){const{prototype:i}=Element;return(i.closest||function(){let e=this;do{if(Ga.matches(e,t))return e;e=e.parentElement||e.parentNode}while(null!==e&&1===e.nodeType);return null}).call(e,t)}(this.player.elements.container,e.config.fullscreen.container),or.call(this.player,document,"ms"===this.prefix?"MSFullscreenChange":`${this.prefix}fullscreenchange`,(()=>{this.onChange()})),or.call(this.player,this.player.elements.container,"dblclick",(e=>{La(this.player.elements.controls)&&this.player.elements.controls.contains(e.target)||this.player.listeners.proxy(e,this.toggle,"fullscreen")})),or.call(this,this.player.elements.container,"keydown",(e=>this.trapFocus(e))),this.update()}static get native(){return!!(document.fullscreenEnabled||document.webkitFullscreenEnabled||document.mozFullScreenEnabled||document.msFullscreenEnabled)}get usingNative(){return qr.native&&!this.forceFallback}static get prefix(){if(Sa(document.exitFullscreen))return"";let e="";return["webkit","moz","ms"].some((t=>!(!Sa(document[`${t}ExitFullscreen`])&&!Sa(document[`${t}CancelFullScreen`])||(e=t,0)))),e}static get property(){return"moz"===this.prefix?"FullScreen":"Fullscreen"}get enabled(){return(qr.native||this.player.config.fullscreen.fallback)&&this.player.config.fullscreen.enabled&&this.player.supported.ui&&this.player.isVideo}get active(){if(!this.enabled)return!1;if(!qr.native||this.forceFallback)return Ka(this.target,this.player.config.classNames.fullscreen.fallback);const e=this.prefix?this.target.getRootNode()[`${this.prefix}${this.property}Element`]:this.target.getRootNode().fullscreenElement;return e&&e.shadowRoot?e===this.target.getRootNode().host:e===this.target}get target(){return Oa.isIos&&this.player.config.fullscreen.iosNative?this.player.media:this.player.elements.fullscreen||this.player.elements.container}}function Xr(e,t=1){return new Promise(((i,n)=>{const o=new Image,s=()=>{delete o.onload,delete o.onerror,(o.naturalWidth>=t?i:n)(o)};Object.assign(o,{onload:s,onerror:s,src:e})}))}const Yr={addStyleHook(){Ya(this.elements.container,this.config.selectors.container.replace(".",""),!0),Ya(this.elements.container,this.config.classNames.uiSupported,this.supported.ui)},toggleNativeControls(e=!1){e&&this.isHTML5?this.media.setAttribute("controls",""):this.media.removeAttribute("controls")},build(){if(this.listeners.media(),!this.supported.ui)return this.debug.warn(`Basic support only for ${this.provider} ${this.type}`),void Yr.toggleNativeControls.call(this,!0);La(this.elements.controls)||(Mr.inject.call(this),this.listeners.controls()),Yr.toggleNativeControls.call(this),this.isHTML5&&Ir.setup.call(this),this.volume=null,this.muted=null,this.loop=null,this.quality=null,this.speed=null,Mr.updateVolume.call(this),Mr.timeUpdate.call(this),Mr.durationUpdate.call(this),Yr.checkPlaying.call(this),Ya(this.elements.container,this.config.classNames.pip.supported,tr.pip&&this.isHTML5&&this.isVideo),Ya(this.elements.container,this.config.classNames.airplay.supported,tr.airplay&&this.isHTML5),Ya(this.elements.container,this.config.classNames.isIos,Oa.isIos),Ya(this.elements.container,this.config.classNames.isTouch,this.touch),this.ready=!0,setTimeout((()=>{rr.call(this,this.media,"ready")}),0),Yr.setTitle.call(this),this.poster&&Yr.setPoster.call(this,this.poster,!1).catch((()=>{})),this.config.duration&&Mr.durationUpdate.call(this),this.config.mediaMetadata&&Mr.setMediaMetadata.call(this)},setTitle(){let e=$r.get("play",this.config);if(xa(this.config.title)&&!Ba(this.config.title)&&(e+=`, ${this.config.title}`),Array.from(this.elements.buttons.play||[]).forEach((t=>{t.setAttribute("aria-label",e)})),this.isEmbed){const e=Ja.call(this,"iframe");if(!La(e))return;const t=Ba(this.config.title)?"video":this.config.title,i=$r.get("frameTitle",this.config);e.setAttribute("title",i.replace("{title}",t))}},togglePoster(e){Ya(this.elements.container,this.config.classNames.posterEnabled,e)},setPoster(e,t=!0){return t&&this.poster?Promise.reject(new Error("Poster already set")):(this.media.setAttribute("data-poster",e),this.elements.poster.removeAttribute("hidden"),cr.call(this).then((()=>Xr(e))).catch((t=>{throw e===this.poster&&Yr.togglePoster.call(this,!1),t})).then((()=>{if(e!==this.poster)throw new Error("setPoster cancelled by later call to setPoster")})).then((()=>(Object.assign(this.elements.poster.style,{backgroundImage:`url('${e}')`,backgroundSize:""}),Yr.togglePoster.call(this,!0),e))))},checkPlaying(e){Ya(this.elements.container,this.config.classNames.playing,this.playing),Ya(this.elements.container,this.config.classNames.paused,this.paused),Ya(this.elements.container,this.config.classNames.stopped,this.stopped),Array.from(this.elements.buttons.play||[]).forEach((e=>{Object.assign(e,{pressed:this.playing}),e.setAttribute("aria-label",$r.get(this.playing?"pause":"play",this.config))})),$a(e)&&"timeupdate"===e.type||Yr.toggleControls.call(this)},checkLoading(e){this.loading=["stalled","waiting"].includes(e.type),clearTimeout(this.timers.loading),this.timers.loading=setTimeout((()=>{Ya(this.elements.container,this.config.classNames.loading,this.loading),Yr.toggleControls.call(this)}),this.loading?250:0)},toggleControls(e){const{controls:t}=this.elements;if(t&&this.config.hideControls){const i=this.touch&&this.lastSeekTime+2e3>Date.now();this.toggleControls(Boolean(e||this.loading||this.paused||t.pressed||t.hover||i))}},migrateStyles(){Object.values({...this.media.style}).filter((e=>!Ba(e)&&xa(e)&&e.startsWith("--plyr"))).forEach((e=>{this.elements.container.style.setProperty(e,this.media.style.getPropertyValue(e)),this.media.style.removeProperty(e)})),Ba(this.media.style)&&this.media.removeAttribute("style")}};class Kr{constructor(e){js(this,"firstTouch",(()=>{const{player:e}=this,{elements:t}=e;e.touch=!0,Ya(t.container,e.config.classNames.isTouch,!0)})),js(this,"setTabFocus",(e=>{const{player:t}=this,{elements:i}=t,{key:n,type:o,timeStamp:s}=e;if(clearTimeout(this.focusTimer),"keydown"===o&&"Tab"!==n)return;"keydown"===o&&(this.lastKeyDown=s);const a=s-this.lastKeyDown<=20;("focus"!==o||a)&&((()=>{const e=t.config.classNames.tabFocus;Ya(Za.call(t,`.${e}`),e,!1)})(),"focusout"!==o&&(this.focusTimer=setTimeout((()=>{const e=document.activeElement;i.container.contains(e)&&Ya(document.activeElement,t.config.classNames.tabFocus,!0)}),10)))})),js(this,"global",((e=!0)=>{const{player:t}=this;t.config.keyboard.global&&nr.call(t,window,"keydown keyup",this.handleKey,e,!1),nr.call(t,document.body,"click",this.toggleMenu,e),ar.call(t,document.body,"touchstart",this.firstTouch),nr.call(t,document.body,"keydown focus blur focusout",this.setTabFocus,e,!1,!0)})),js(this,"container",(()=>{const{player:e}=this,{config:t,elements:i,timers:n}=e;!t.keyboard.global&&t.keyboard.focused&&or.call(e,i.container,"keydown keyup",this.handleKey,!1),or.call(e,i.container,"mousemove mouseleave touchstart touchmove enterfullscreen exitfullscreen",(t=>{const{controls:o}=i;o&&"enterfullscreen"===t.type&&(o.pressed=!1,o.hover=!1);let s=0;["touchstart","touchmove","mousemove"].includes(t.type)&&(Yr.toggleControls.call(e,!0),s=e.touch?3e3:2e3),clearTimeout(n.controls),n.controls=setTimeout((()=>Yr.toggleControls.call(e,!1)),s)}));const o=()=>{if(!e.isVimeo||e.config.vimeo.premium)return;const t=i.wrapper,{active:n}=e.fullscreen,[o,s]=yr.call(e),a=pr(`aspect-ratio: ${o} / ${s}`);if(!n)return void(a?(t.style.width=null,t.style.height=null):(t.style.maxWidth=null,t.style.margin=null));const[r,l]=[Math.max(document.documentElement.clientWidth||0,window.innerWidth||0),Math.max(document.documentElement.clientHeight||0,window.innerHeight||0)],c=r/l>o/s;a?(t.style.width=c?"auto":"100%",t.style.height=c?"100%":"auto"):(t.style.maxWidth=c?l/s*o+"px":null,t.style.margin=c?"0 auto":null)},s=()=>{clearTimeout(n.resized),n.resized=setTimeout(o,50)};or.call(e,i.container,"enterfullscreen exitfullscreen",(t=>{const{target:n}=e.fullscreen;n===i.container&&(!e.isEmbed&&Ba(e.config.ratio)||(o(),("enterfullscreen"===t.type?or:sr).call(e,window,"resize",s)))}))})),js(this,"media",(()=>{const{player:e}=this,{elements:t}=e;if(or.call(e,e.media,"timeupdate seeking seeked",(t=>Mr.timeUpdate.call(e,t))),or.call(e,e.media,"durationchange loadeddata loadedmetadata",(t=>Mr.durationUpdate.call(e,t))),or.call(e,e.media,"ended",(()=>{e.isHTML5&&e.isVideo&&e.config.resetOnEnd&&(e.restart(),e.pause())})),or.call(e,e.media,"progress playing seeking seeked",(t=>Mr.updateProgress.call(e,t))),or.call(e,e.media,"volumechange",(t=>Mr.updateVolume.call(e,t))),or.call(e,e.media,"playing play pause ended emptied timeupdate",(t=>Yr.checkPlaying.call(e,t))),or.call(e,e.media,"waiting canplay seeked playing",(t=>Yr.checkLoading.call(e,t))),e.supported.ui&&e.config.clickToPlay&&!e.isAudio){const i=Ja.call(e,`.${e.config.classNames.video}`);if(!La(i))return;or.call(e,t.container,"click",(n=>{([t.container,i].includes(n.target)||i.contains(n.target))&&(e.touch&&e.config.hideControls||(e.ended?(this.proxy(n,e.restart,"restart"),this.proxy(n,(()=>{dr(e.play())}),"play")):this.proxy(n,(()=>{dr(e.togglePlay())}),"play")))}))}e.supported.ui&&e.config.disableContextMenu&&or.call(e,t.wrapper,"contextmenu",(e=>{e.preventDefault()}),!1),or.call(e,e.media,"volumechange",(()=>{e.storage.set({volume:e.volume,muted:e.muted})})),or.call(e,e.media,"ratechange",(()=>{Mr.updateSetting.call(e,"speed"),e.storage.set({speed:e.speed})})),or.call(e,e.media,"qualitychange",(t=>{Mr.updateSetting.call(e,"quality",null,t.detail.quality)})),or.call(e,e.media,"ready qualitychange",(()=>{Mr.setDownloadUrl.call(e)}));const i=e.config.events.concat(["keyup","keydown"]).join(" ");or.call(e,e.media,i,(i=>{let{detail:n={}}=i;"error"===i.type&&(n=e.media.error),rr.call(e,t.container,i.type,!0,n)}))})),js(this,"proxy",((e,t,i)=>{const{player:n}=this,o=n.config.listeners[i];let s=!0;Sa(o)&&(s=o.call(n,e)),!1!==s&&Sa(t)&&t.call(n,e)})),js(this,"bind",((e,t,i,n,o=!0)=>{const{player:s}=this,a=s.config.listeners[n],r=Sa(a);or.call(s,e,t,(e=>this.proxy(e,i,n)),o&&!r)})),js(this,"controls",(()=>{const{player:e}=this,{elements:t}=e,i=Oa.isIE?"change":"input";if(t.buttons.play&&Array.from(t.buttons.play).forEach((t=>{this.bind(t,"click",(()=>{dr(e.togglePlay())}),"play")})),this.bind(t.buttons.restart,"click",e.restart,"restart"),this.bind(t.buttons.rewind,"click",(()=>{e.lastSeekTime=Date.now(),e.rewind()}),"rewind"),this.bind(t.buttons.fastForward,"click",(()=>{e.lastSeekTime=Date.now(),e.forward()}),"fastForward"),this.bind(t.buttons.mute,"click",(()=>{e.muted=!e.muted}),"mute"),this.bind(t.buttons.captions,"click",(()=>e.toggleCaptions())),this.bind(t.buttons.download,"click",(()=>{rr.call(e,e.media,"download")}),"download"),this.bind(t.buttons.fullscreen,"click",(()=>{e.fullscreen.toggle()}),"fullscreen"),this.bind(t.buttons.pip,"click",(()=>{e.pip="toggle"}),"pip"),this.bind(t.buttons.airplay,"click",e.airplay,"airplay"),this.bind(t.buttons.settings,"click",(t=>{t.stopPropagation(),t.preventDefault(),Mr.toggleMenu.call(e,t)}),null,!1),this.bind(t.buttons.settings,"keyup",(t=>{["Space","Enter"].includes(t.key)&&("Enter"!==t.key?(t.preventDefault(),t.stopPropagation(),Mr.toggleMenu.call(e,t)):Mr.focusFirstMenuItem.call(e,null,!0))}),null,!1),this.bind(t.settings.menu,"keydown",(t=>{"Escape"===t.key&&Mr.toggleMenu.call(e,t)})),this.bind(t.inputs.seek,"mousedown mousemove",(e=>{const i=t.progress.getBoundingClientRect(),n=100/i.width*(e.pageX-i.left);e.currentTarget.setAttribute("seek-value",n)})),this.bind(t.inputs.seek,"mousedown mouseup keydown keyup touchstart touchend",(t=>{const i=t.currentTarget,n="play-on-seeked";if(_a(t)&&!["ArrowLeft","ArrowRight"].includes(t.key))return;e.lastSeekTime=Date.now();const o=i.hasAttribute(n),s=["mouseup","touchend","keyup"].includes(t.type);o&&s?(i.removeAttribute(n),dr(e.play())):!s&&e.playing&&(i.setAttribute(n,""),e.pause())})),Oa.isIos){const t=Za.call(e,'input[type="range"]');Array.from(t).forEach((e=>this.bind(e,i,(e=>Va(e.target)))))}this.bind(t.inputs.seek,i,(t=>{const i=t.currentTarget;let n=i.getAttribute("seek-value");Ba(n)&&(n=i.value),i.removeAttribute("seek-value"),e.currentTime=n/i.max*e.duration}),"seek"),this.bind(t.progress,"mouseenter mouseleave mousemove",(t=>Mr.updateSeekTooltip.call(e,t))),this.bind(t.progress,"mousemove touchmove",(t=>{const{previewThumbnails:i}=e;i&&i.loaded&&i.startMove(t)})),this.bind(t.progress,"mouseleave touchend click",(()=>{const{previewThumbnails:t}=e;t&&t.loaded&&t.endMove(!1,!0)})),this.bind(t.progress,"mousedown touchstart",(t=>{const{previewThumbnails:i}=e;i&&i.loaded&&i.startScrubbing(t)})),this.bind(t.progress,"mouseup touchend",(t=>{const{previewThumbnails:i}=e;i&&i.loaded&&i.endScrubbing(t)})),Oa.isWebkit&&Array.from(Za.call(e,'input[type="range"]')).forEach((t=>{this.bind(t,"input",(t=>Mr.updateRangeFill.call(e,t.target)))})),e.config.toggleInvert&&!La(t.display.duration)&&this.bind(t.display.currentTime,"click",(()=>{0!==e.currentTime&&(e.config.invertTime=!e.config.invertTime,Mr.timeUpdate.call(e))})),this.bind(t.inputs.volume,i,(t=>{e.volume=t.target.value}),"volume"),this.bind(t.controls,"mouseenter mouseleave",(i=>{t.controls.hover=!e.touch&&"mouseenter"===i.type})),t.fullscreen&&Array.from(t.fullscreen.children).filter((e=>!e.contains(t.container))).forEach((i=>{this.bind(i,"mouseenter mouseleave",(i=>{t.controls&&(t.controls.hover=!e.touch&&"mouseenter"===i.type)}))})),this.bind(t.controls,"mousedown mouseup touchstart touchend touchcancel",(e=>{t.controls.pressed=["mousedown","touchstart"].includes(e.type)})),this.bind(t.controls,"focusin",(()=>{const{config:i,timers:n}=e;Ya(t.controls,i.classNames.noTransition,!0),Yr.toggleControls.call(e,!0),setTimeout((()=>{Ya(t.controls,i.classNames.noTransition,!1)}),0);const o=this.touch?3e3:4e3;clearTimeout(n.controls),n.controls=setTimeout((()=>Yr.toggleControls.call(e,!1)),o)})),this.bind(t.inputs.volume,"wheel",(t=>{const i=t.webkitDirectionInvertedFromDevice,[n,o]=[t.deltaX,-t.deltaY].map((e=>i?-e:e)),s=Math.sign(Math.abs(n)>Math.abs(o)?n:o);e.increaseVolume(s/50);const{volume:a}=e.media;(1===s&&a<1||-1===s&&a>0)&&t.preventDefault()}),"volume",!1)})),this.player=e,this.lastKey=null,this.focusTimer=null,this.lastKeyDown=null,this.handleKey=this.handleKey.bind(this),this.toggleMenu=this.toggleMenu.bind(this),this.setTabFocus=this.setTabFocus.bind(this),this.firstTouch=this.firstTouch.bind(this)}handleKey(e){const{player:t}=this,{elements:i}=t,{key:n,type:o,altKey:s,ctrlKey:a,metaKey:r,shiftKey:l}=e,c="keydown"===o,d=c&&n===this.lastKey;var u;if(!(s||a||r||l)&&n)if(c){const o=document.activeElement;if(La(o)){const{editable:n}=t.config.selectors,{seek:s}=i.inputs;if(o!==s&&Ga(o,n))return;if("Space"===e.key&&Ga(o,'button, [role^="menuitem"]'))return}switch(["Space","ArrowLeft","ArrowUp","ArrowRight","ArrowDown","0","1","2","3","4","5","6","7","8","9","c","f","k","l","m"].includes(n)&&(e.preventDefault(),e.stopPropagation()),n){case"0":case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":d||(u=parseInt(n,10),t.currentTime=t.duration/10*u);break;case"Space":case"k":d||dr(t.togglePlay());break;case"ArrowUp":t.increaseVolume(.1);break;case"ArrowDown":t.decreaseVolume(.1);break;case"m":d||(t.muted=!t.muted);break;case"ArrowRight":t.forward();break;case"ArrowLeft":t.rewind();break;case"f":t.fullscreen.toggle();break;case"c":d||t.toggleCaptions();break;case"l":t.loop=!t.loop}"Escape"===n&&!t.fullscreen.usingNative&&t.fullscreen.active&&t.fullscreen.toggle(),this.lastKey=n}else this.lastKey=null}toggleMenu(e){Mr.toggleMenu.call(this.player,e)}}var Gr,Zr=(function(e,t){e.exports=function(){var e=function(){},t={},i={},n={};function o(e,t){if(e){var o=n[e];if(i[e]=t,o)for(;o.length;)o[0](e,t),o.splice(0,1)}}function s(t,i){t.call&&(t={success:t}),i.length?(t.error||e)(i):(t.success||e)(t)}function a(t,i,n,o){var s,r,l=document,c=n.async,d=(n.numRetries||0)+1,u=n.before||e,h=t.replace(/[\?|#].*$/,""),p=t.replace(/^(css|img)!/,"");o=o||0,/(^css!|\.css$)/.test(h)?((r=l.createElement("link")).rel="stylesheet",r.href=p,(s="hideFocus"in r)&&r.relList&&(s=0,r.rel="preload",r.as="style")):/(^img!|\.(png|gif|jpg|svg|webp)$)/.test(h)?(r=l.createElement("img")).src=p:((r=l.createElement("script")).src=t,r.async=void 0===c||c),r.onload=r.onerror=r.onbeforeload=function(e){var l=e.type[0];if(s)try{r.sheet.cssText.length||(l="e")}catch(c){18!=c.code&&(l="e")}if("e"==l){if((o+=1)<d)return a(t,i,n,o)}else if("preload"==r.rel&&"style"==r.as)return r.rel="stylesheet";i(t,l,e.defaultPrevented)},!1!==u(t,r)&&l.head.appendChild(r)}function r(e,i,n){var r,l;if(i&&i.trim&&(r=i),l=(r?n:i)||{},r){if(r in t)throw"LoadJS";t[r]=!0}function c(t,i){!function(e,t,i){var n,o,s=(e=e.push?e:[e]).length,r=s,l=[];for(n=function(e,i,n){if("e"==i&&l.push(e),"b"==i){if(!n)return;l.push(e)}--s||t(l)},o=0;o<r;o++)a(e[o],n,i)}(e,(function(e){s(l,e),t&&s({success:t,error:i},e),o(r,e)}),l)}if(l.returnPromise)return new Promise(c);c()}return r.ready=function(e,t){return function(e,t){e=e.push?e:[e];var o,s,a,r=[],l=e.length,c=l;for(o=function(e,i){i.length&&r.push(e),--c||t(r)};l--;)s=e[l],(a=i[s])?o(s,a):(n[s]=n[s]||[]).push(o)}(e,(function(e){s(t,e)})),r},r.done=function(e){o(e,[])},r.reset=function(){t={},i={},n={}},r.isDefined=function(e){return e in t},r}()}(Gr={exports:{}},Gr.exports),Gr.exports);function Jr(e){return new Promise(((t,i)=>{Zr(e,{success:t,error:i})}))}function Qr(e){e&&!this.embed.hasPlayed&&(this.embed.hasPlayed=!0),this.media.paused===e&&(this.media.paused=!e,rr.call(this,this.media,e?"play":"pause"))}const el={setup(){const e=this;Ya(e.elements.wrapper,e.config.classNames.embed,!0),e.options.speed=e.config.speed.options,vr.call(e),wa(window.Vimeo)?el.ready.call(e):Jr(e.config.urls.vimeo.sdk).then((()=>{el.ready.call(e)})).catch((t=>{e.debug.warn("Vimeo SDK (player.js) failed to load",t)}))},ready(){const e=this,t=e.config.vimeo,{premium:i,referrerPolicy:n,...o}=t;let s=e.media.getAttribute("src"),a="";Ba(s)?(s=e.media.getAttribute(e.config.attributes.embed.id),a=e.media.getAttribute(e.config.attributes.embed.hash)):a=function(e){const t=e.match(/^.*(vimeo.com\/|video\/)(\d+)(\?.*&*h=|\/)+([\d,a-f]+)/);return t&&5===t.length?t[4]:null}(s);const r=a?{h:a}:{};i&&Object.assign(o,{controls:!1,sidedock:!1});const l=Or({loop:e.config.loop.active,autoplay:e.autoplay,muted:e.muted,gesture:"media",playsinline:!this.config.fullscreen.iosNative,...r,...o}),c=function(e){return Ba(e)?null:ka(Number(e))?e:e.match(/^.*(vimeo.com\/|video\/)(\d+).*/)?RegExp.$2:e}(s),d=Fa("iframe"),u=xr(e.config.urls.vimeo.iframe,c,l);if(d.setAttribute("src",u),d.setAttribute("allowfullscreen",""),d.setAttribute("allow",["autoplay","fullscreen","picture-in-picture","encrypted-media","accelerometer","gyroscope"].join("; ")),Ba(n)||d.setAttribute("referrerPolicy",n),i||!t.customControls)d.setAttribute("data-poster",e.poster),e.media=Ua(d,e.media);else{const t=Fa("div",{class:e.config.classNames.embedContainer,"data-poster":e.poster});t.appendChild(d),e.media=Ua(t,e.media)}t.customControls||Ar(xr(e.config.urls.vimeo.api,u)).then((t=>{!Ba(t)&&t.thumbnail_url&&Yr.setPoster.call(e,t.thumbnail_url).catch((()=>{}))})),e.embed=new window.Vimeo.Player(d,{autopause:e.config.autopause,muted:e.muted}),e.media.paused=!0,e.media.currentTime=0,e.supported.ui&&e.embed.disableTextTrack(),e.media.play=()=>(Qr.call(e,!0),e.embed.play()),e.media.pause=()=>(Qr.call(e,!1),e.embed.pause()),e.media.stop=()=>{e.pause(),e.currentTime=0};let{currentTime:h}=e.media;Object.defineProperty(e.media,"currentTime",{get:()=>h,set(t){const{embed:i,media:n,paused:o,volume:s}=e,a=o&&!i.hasPlayed;n.seeking=!0,rr.call(e,n,"seeking"),Promise.resolve(a&&i.setVolume(0)).then((()=>i.setCurrentTime(t))).then((()=>a&&i.pause())).then((()=>a&&i.setVolume(s))).catch((()=>{}))}});let p=e.config.speed.selected;Object.defineProperty(e.media,"playbackRate",{get:()=>p,set(t){e.embed.setPlaybackRate(t).then((()=>{p=t,rr.call(e,e.media,"ratechange")})).catch((()=>{e.options.speed=[1]}))}});let{volume:m}=e.config;Object.defineProperty(e.media,"volume",{get:()=>m,set(t){e.embed.setVolume(t).then((()=>{m=t,rr.call(e,e.media,"volumechange")}))}});let{muted:f}=e.config;Object.defineProperty(e.media,"muted",{get:()=>f,set(t){const i=!!Ca(t)&&t;e.embed.setVolume(i?0:e.config.volume).then((()=>{f=i,rr.call(e,e.media,"volumechange")}))}});let g,{loop:y}=e.config;Object.defineProperty(e.media,"loop",{get:()=>y,set(t){const i=Ca(t)?t:e.config.loop.active;e.embed.setLoop(i).then((()=>{y=i}))}}),e.embed.getVideoUrl().then((t=>{g=t,Mr.setDownloadUrl.call(e)})).catch((e=>{this.debug.warn(e)})),Object.defineProperty(e.media,"currentSrc",{get:()=>g}),Object.defineProperty(e.media,"ended",{get:()=>e.currentTime===e.duration}),Promise.all([e.embed.getVideoWidth(),e.embed.getVideoHeight()]).then((t=>{const[i,n]=t;e.embed.ratio=br(i,n),vr.call(this)})),e.embed.setAutopause(e.config.autopause).then((t=>{e.config.autopause=t})),e.embed.getVideoTitle().then((t=>{e.config.title=t,Yr.setTitle.call(this)})),e.embed.getCurrentTime().then((t=>{h=t,rr.call(e,e.media,"timeupdate")})),e.embed.getDuration().then((t=>{e.media.duration=t,rr.call(e,e.media,"durationchange")})),e.embed.getTextTracks().then((t=>{e.media.textTracks=t,Ir.setup.call(e)})),e.embed.on("cuechange",(({cues:t=[]})=>{const i=t.map((e=>function(e){const t=document.createDocumentFragment(),i=document.createElement("div");return t.appendChild(i),i.innerHTML=e,t.firstChild.innerText}(e.text)));Ir.updateCues.call(e,i)})),e.embed.on("loaded",(()=>{e.embed.getPaused().then((t=>{Qr.call(e,!t),t||rr.call(e,e.media,"playing")})),La(e.embed.element)&&e.supported.ui&&e.embed.element.setAttribute("tabindex",-1)})),e.embed.on("bufferstart",(()=>{rr.call(e,e.media,"waiting")})),e.embed.on("bufferend",(()=>{rr.call(e,e.media,"playing")})),e.embed.on("play",(()=>{Qr.call(e,!0),rr.call(e,e.media,"playing")})),e.embed.on("pause",(()=>{Qr.call(e,!1)})),e.embed.on("timeupdate",(t=>{e.media.seeking=!1,h=t.seconds,rr.call(e,e.media,"timeupdate")})),e.embed.on("progress",(t=>{e.media.buffered=t.percent,rr.call(e,e.media,"progress"),1===parseInt(t.percent,10)&&rr.call(e,e.media,"canplaythrough"),e.embed.getDuration().then((t=>{t!==e.media.duration&&(e.media.duration=t,rr.call(e,e.media,"durationchange"))}))})),e.embed.on("seeked",(()=>{e.media.seeking=!1,rr.call(e,e.media,"seeked")})),e.embed.on("ended",(()=>{e.media.paused=!0,rr.call(e,e.media,"ended")})),e.embed.on("error",(t=>{e.media.error=t,rr.call(e,e.media,"error")})),t.customControls&&setTimeout((()=>Yr.build.call(e)),0)}};function tl(e){e&&!this.embed.hasPlayed&&(this.embed.hasPlayed=!0),this.media.paused===e&&(this.media.paused=!e,rr.call(this,this.media,e?"play":"pause"))}function il(e){return e.noCookie?"https://www.youtube-nocookie.com":"http:"===window.location.protocol?"http://www.youtube.com":void 0}const nl={setup(){if(Ya(this.elements.wrapper,this.config.classNames.embed,!0),wa(window.YT)&&Sa(window.YT.Player))nl.ready.call(this);else{const e=window.onYouTubeIframeAPIReady;window.onYouTubeIframeAPIReady=()=>{Sa(e)&&e(),nl.ready.call(this)},Jr(this.config.urls.youtube.sdk).catch((e=>{this.debug.warn("YouTube API failed to load",e)}))}},getTitle(e){Ar(xr(this.config.urls.youtube.api,e)).then((e=>{if(wa(e)){const{title:t,height:i,width:n}=e;this.config.title=t,Yr.setTitle.call(this),this.embed.ratio=br(n,i)}vr.call(this)})).catch((()=>{vr.call(this)}))},ready(){const e=this,t=e.config.youtube,i=e.media&&e.media.getAttribute("id");if(!Ba(i)&&i.startsWith("youtube-"))return;let n=e.media.getAttribute("src");Ba(n)&&(n=e.media.getAttribute(this.config.attributes.embed.id));const o=function(e){return Ba(e)?null:e.match(/^.*(youtu.be\/|v\/|u\/\w\/|embed\/|watch\?v=|&v=)([^#&?]*).*/)?RegExp.$2:e}(n),s=Fa("div",{id:kr(e.provider),"data-poster":t.customControls?e.poster:void 0});if(e.media=Ua(s,e.media),t.customControls){const t=e=>`https://i.ytimg.com/vi/${o}/${e}default.jpg`;Xr(t("maxres"),121).catch((()=>Xr(t("sd"),121))).catch((()=>Xr(t("hq")))).then((t=>Yr.setPoster.call(e,t.src))).then((t=>{t.includes("maxres")||(e.elements.poster.style.backgroundSize="cover")})).catch((()=>{}))}e.embed=new window.YT.Player(e.media,{videoId:o,host:il(t),playerVars:za({},{autoplay:e.config.autoplay?1:0,hl:e.config.hl,controls:e.supported.ui&&t.customControls?0:1,disablekb:1,playsinline:e.config.fullscreen.iosNative?0:1,cc_load_policy:e.captions.active?1:0,cc_lang_pref:e.config.captions.language,widget_referrer:window?window.location.href:null},t),events:{onError(t){if(!e.media.error){const i=t.data,n={2:"The request contains an invalid parameter value. For example, this error occurs if you specify a video ID that does not have 11 characters, or if the video ID contains invalid characters, such as exclamation points or asterisks.",5:"The requested content cannot be played in an HTML5 player or another error related to the HTML5 player has occurred.",100:"The video requested was not found. This error occurs when a video has been removed (for any reason) or has been marked as private.",101:"The owner of the requested video does not allow it to be played in embedded players.",150:"The owner of the requested video does not allow it to be played in embedded players."}[i]||"An unknown error occured";e.media.error={code:i,message:n},rr.call(e,e.media,"error")}},onPlaybackRateChange(t){const i=t.target;e.media.playbackRate=i.getPlaybackRate(),rr.call(e,e.media,"ratechange")},onReady(i){if(Sa(e.media.play))return;const n=i.target;nl.getTitle.call(e,o),e.media.play=()=>{tl.call(e,!0),n.playVideo()},e.media.pause=()=>{tl.call(e,!1),n.pauseVideo()},e.media.stop=()=>{n.stopVideo()},e.media.duration=n.getDuration(),e.media.paused=!0,e.media.currentTime=0,Object.defineProperty(e.media,"currentTime",{get:()=>Number(n.getCurrentTime()),set(t){e.paused&&!e.embed.hasPlayed&&e.embed.mute(),e.media.seeking=!0,rr.call(e,e.media,"seeking"),n.seekTo(t)}}),Object.defineProperty(e.media,"playbackRate",{get:()=>n.getPlaybackRate(),set(e){n.setPlaybackRate(e)}});let{volume:s}=e.config;Object.defineProperty(e.media,"volume",{get:()=>s,set(t){s=t,n.setVolume(100*s),rr.call(e,e.media,"volumechange")}});let{muted:a}=e.config;Object.defineProperty(e.media,"muted",{get:()=>a,set(t){const i=Ca(t)?t:a;a=i,n[i?"mute":"unMute"](),n.setVolume(100*s),rr.call(e,e.media,"volumechange")}}),Object.defineProperty(e.media,"currentSrc",{get:()=>n.getVideoUrl()}),Object.defineProperty(e.media,"ended",{get:()=>e.currentTime===e.duration});const r=n.getAvailablePlaybackRates();e.options.speed=r.filter((t=>e.config.speed.options.includes(t))),e.supported.ui&&t.customControls&&e.media.setAttribute("tabindex",-1),rr.call(e,e.media,"timeupdate"),rr.call(e,e.media,"durationchange"),clearInterval(e.timers.buffering),e.timers.buffering=setInterval((()=>{e.media.buffered=n.getVideoLoadedFraction(),(null===e.media.lastBuffered||e.media.lastBuffered<e.media.buffered)&&rr.call(e,e.media,"progress"),e.media.lastBuffered=e.media.buffered,1===e.media.buffered&&(clearInterval(e.timers.buffering),rr.call(e,e.media,"canplaythrough"))}),200),t.customControls&&setTimeout((()=>Yr.build.call(e)),50)},onStateChange(i){const n=i.target;switch(clearInterval(e.timers.playing),e.media.seeking&&[1,2].includes(i.data)&&(e.media.seeking=!1,rr.call(e,e.media,"seeked")),i.data){case-1:rr.call(e,e.media,"timeupdate"),e.media.buffered=n.getVideoLoadedFraction(),rr.call(e,e.media,"progress");break;case 0:tl.call(e,!1),e.media.loop?(n.stopVideo(),n.playVideo()):rr.call(e,e.media,"ended");break;case 1:t.customControls&&!e.config.autoplay&&e.media.paused&&!e.embed.hasPlayed?e.media.pause():(tl.call(e,!0),rr.call(e,e.media,"playing"),e.timers.playing=setInterval((()=>{rr.call(e,e.media,"timeupdate")}),50),e.media.duration!==n.getDuration()&&(e.media.duration=n.getDuration(),rr.call(e,e.media,"durationchange")));break;case 2:e.muted||e.embed.unMute(),tl.call(e,!1);break;case 3:rr.call(e,e.media,"waiting")}rr.call(e,e.elements.container,"statechange",!1,{code:i.data})}}})}},ol={setup(){this.media?(Ya(this.elements.container,this.config.classNames.type.replace("{0}",this.type),!0),Ya(this.elements.container,this.config.classNames.provider.replace("{0}",this.provider),!0),this.isEmbed&&Ya(this.elements.container,this.config.classNames.type.replace("{0}","video"),!0),this.isVideo&&(this.elements.wrapper=Fa("div",{class:this.config.classNames.video}),Da(this.media,this.elements.wrapper),this.elements.poster=Fa("div",{class:this.config.classNames.poster}),this.elements.wrapper.appendChild(this.elements.poster)),this.isHTML5?wr.setup.call(this):this.isYouTube?nl.setup.call(this):this.isVimeo&&el.setup.call(this)):this.debug.warn("No media element found!")}};class sl{constructor(e){js(this,"load",(()=>{this.enabled&&(wa(window.google)&&wa(window.google.ima)?this.ready():Jr(this.player.config.urls.googleIMA.sdk).then((()=>{this.ready()})).catch((()=>{this.trigger("error",new Error("Google IMA SDK failed to load"))})))})),js(this,"ready",(()=>{var e;this.enabled||((e=this).manager&&e.manager.destroy(),e.elements.displayContainer&&e.elements.displayContainer.destroy(),e.elements.container.remove()),this.startSafetyTimer(12e3,"ready()"),this.managerPromise.then((()=>{this.clearSafetyTimer("onAdsManagerLoaded()")})),this.listeners(),this.setupIMA()})),js(this,"setupIMA",(()=>{this.elements.container=Fa("div",{class:this.player.config.classNames.ads}),this.player.elements.container.appendChild(this.elements.container),google.ima.settings.setVpaidMode(google.ima.ImaSdkSettings.VpaidMode.ENABLED),google.ima.settings.setLocale(this.player.config.ads.language),google.ima.settings.setDisableCustomPlaybackForIOS10Plus(this.player.config.playsinline),this.elements.displayContainer=new google.ima.AdDisplayContainer(this.elements.container,this.player.media),this.loader=new google.ima.AdsLoader(this.elements.displayContainer),this.loader.addEventListener(google.ima.AdsManagerLoadedEvent.Type.ADS_MANAGER_LOADED,(e=>this.onAdsManagerLoaded(e)),!1),this.loader.addEventListener(google.ima.AdErrorEvent.Type.AD_ERROR,(e=>this.onAdError(e)),!1),this.requestAds()})),js(this,"requestAds",(()=>{const{container:e}=this.player.elements;try{const t=new google.ima.AdsRequest;t.adTagUrl=this.tagUrl,t.linearAdSlotWidth=e.offsetWidth,t.linearAdSlotHeight=e.offsetHeight,t.nonLinearAdSlotWidth=e.offsetWidth,t.nonLinearAdSlotHeight=e.offsetHeight,t.forceNonLinearFullSlot=!1,t.setAdWillPlayMuted(!this.player.muted),this.loader.requestAds(t)}catch(t){this.onAdError(t)}})),js(this,"pollCountdown",((e=!1)=>{if(!e)return clearInterval(this.countdownTimer),void this.elements.container.removeAttribute("data-badge-text");this.countdownTimer=setInterval((()=>{const e=Br(Math.max(this.manager.getRemainingTime(),0)),t=`${$r.get("advertisement",this.player.config)} - ${e}`;this.elements.container.setAttribute("data-badge-text",t)}),100)})),js(this,"onAdsManagerLoaded",(e=>{if(!this.enabled)return;const t=new google.ima.AdsRenderingSettings;t.restoreCustomPlaybackStateOnAdBreakComplete=!0,t.enablePreloading=!0,this.manager=e.getAdsManager(this.player,t),this.cuePoints=this.manager.getCuePoints(),this.manager.addEventListener(google.ima.AdErrorEvent.Type.AD_ERROR,(e=>this.onAdError(e))),Object.keys(google.ima.AdEvent.Type).forEach((e=>{this.manager.addEventListener(google.ima.AdEvent.Type[e],(e=>this.onAdEvent(e)))})),this.trigger("loaded")})),js(this,"addCuePoints",(()=>{Ba(this.cuePoints)||this.cuePoints.forEach((e=>{if(0!==e&&-1!==e&&e<this.player.duration){const t=this.player.elements.progress;if(La(t)){const i=100/this.player.duration*e,n=Fa("span",{class:this.player.config.classNames.cues});n.style.left=`${i.toString()}%`,t.appendChild(n)}}}))})),js(this,"onAdEvent",(e=>{const{container:t}=this.player.elements,i=e.getAd(),n=e.getAdData();switch((e=>{rr.call(this.player,this.player.media,`ads${e.replace(/_/g,"").toLowerCase()}`)})(e.type),e.type){case google.ima.AdEvent.Type.LOADED:this.trigger("loaded"),this.pollCountdown(!0),i.isLinear()||(i.width=t.offsetWidth,i.height=t.offsetHeight);break;case google.ima.AdEvent.Type.STARTED:this.manager.setVolume(this.player.volume);break;case google.ima.AdEvent.Type.ALL_ADS_COMPLETED:this.player.ended?this.loadAds():this.loader.contentComplete();break;case google.ima.AdEvent.Type.CONTENT_PAUSE_REQUESTED:this.pauseContent();break;case google.ima.AdEvent.Type.CONTENT_RESUME_REQUESTED:this.pollCountdown(),this.resumeContent();break;case google.ima.AdEvent.Type.LOG:n.adError&&this.player.debug.warn(`Non-fatal ad error: ${n.adError.getMessage()}`)}})),js(this,"onAdError",(e=>{this.cancel(),this.player.debug.warn("Ads error",e)})),js(this,"listeners",(()=>{const{container:e}=this.player.elements;let t;this.player.on("canplay",(()=>{this.addCuePoints()})),this.player.on("ended",(()=>{this.loader.contentComplete()})),this.player.on("timeupdate",(()=>{t=this.player.currentTime})),this.player.on("seeked",(()=>{const e=this.player.currentTime;Ba(this.cuePoints)||this.cuePoints.forEach(((i,n)=>{t<i&&i<e&&(this.manager.discardAdBreak(),this.cuePoints.splice(n,1))}))})),window.addEventListener("resize",(()=>{this.manager&&this.manager.resize(e.offsetWidth,e.offsetHeight,google.ima.ViewMode.NORMAL)}))})),js(this,"play",(()=>{const{container:e}=this.player.elements;this.managerPromise||this.resumeContent(),this.managerPromise.then((()=>{this.manager.setVolume(this.player.volume),this.elements.displayContainer.initialize();try{this.initialized||(this.manager.init(e.offsetWidth,e.offsetHeight,google.ima.ViewMode.NORMAL),this.manager.start()),this.initialized=!0}catch(t){this.onAdError(t)}})).catch((()=>{}))})),js(this,"resumeContent",(()=>{this.elements.container.style.zIndex="",this.playing=!1,dr(this.player.media.play())})),js(this,"pauseContent",(()=>{this.elements.container.style.zIndex=3,this.playing=!0,this.player.media.pause()})),js(this,"cancel",(()=>{this.initialized&&this.resumeContent(),this.trigger("error"),this.loadAds()})),js(this,"loadAds",(()=>{this.managerPromise.then((()=>{this.manager&&this.manager.destroy(),this.managerPromise=new Promise((e=>{this.on("loaded",e),this.player.debug.log(this.manager)})),this.initialized=!1,this.requestAds()})).catch((()=>{}))})),js(this,"trigger",((e,...t)=>{const i=this.events[e];Ea(i)&&i.forEach((e=>{Sa(e)&&e.apply(this,t)}))})),js(this,"on",((e,t)=>(Ea(this.events[e])||(this.events[e]=[]),this.events[e].push(t),this))),js(this,"startSafetyTimer",((e,t)=>{this.player.debug.log(`Safety timer invoked from: ${t}`),this.safetyTimer=setTimeout((()=>{this.cancel(),this.clearSafetyTimer("startSafetyTimer()")}),e)})),js(this,"clearSafetyTimer",(e=>{ba(this.safetyTimer)||(this.player.debug.log(`Safety timer cleared from: ${e}`),clearTimeout(this.safetyTimer),this.safetyTimer=null)})),this.player=e,this.config=e.config.ads,this.playing=!1,this.initialized=!1,this.elements={container:null,displayContainer:null},this.manager=null,this.loader=null,this.cuePoints=null,this.events={},this.safetyTimer=null,this.countdownTimer=null,this.managerPromise=new Promise(((e,t)=>{this.on("loaded",e),this.on("error",t)})),this.load()}get enabled(){const{config:e}=this;return this.player.isHTML5&&this.player.isVideo&&e.enabled&&(!Ba(e.publisherId)||Pa(e.tagUrl))}get tagUrl(){const{config:e}=this;return Pa(e.tagUrl)?e.tagUrl:`https://go.aniview.com/api/adserver6/vast/?${Or({AV_PUBLISHERID:"58c25bb0073ef448b1087ad6",AV_CHANNELID:"5a0458dc28a06145e4519d21",AV_URL:window.location.hostname,cb:Date.now(),AV_WIDTH:640,AV_HEIGHT:480,AV_CDIM2:e.publisherId})}`}}function al(e=0,t=0,i=255){return Math.min(Math.max(e,t),i)}const rl=e=>{const t=[];return e.split(/\r\n\r\n|\n\n|\r\r/).forEach((e=>{const i={};e.split(/\r\n|\n|\r/).forEach((e=>{if(ka(i.startTime)){if(!Ba(e.trim())&&Ba(i.text)){const t=e.trim().split("#xywh=");[i.text]=t,t[1]&&([i.x,i.y,i.w,i.h]=t[1].split(","))}}else{const t=e.match(/([0-9]{2})?:?([0-9]{2}):([0-9]{2}).([0-9]{2,3})( ?--> ?)([0-9]{2})?:?([0-9]{2}):([0-9]{2}).([0-9]{2,3})/);t&&(i.startTime=60*Number(t[1]||0)*60+60*Number(t[2])+Number(t[3])+Number(`0.${t[4]}`),i.endTime=60*Number(t[6]||0)*60+60*Number(t[7])+Number(t[8])+Number(`0.${t[9]}`))}})),i.text&&t.push(i)})),t},ll=(e,t)=>{const i={};return e>t.width/t.height?(i.width=t.width,i.height=1/e*t.width):(i.height=t.height,i.width=e*t.height),i};class cl{constructor(e){js(this,"load",(()=>{this.player.elements.display.seekTooltip&&(this.player.elements.display.seekTooltip.hidden=this.enabled),this.enabled&&this.getThumbnails().then((()=>{this.enabled&&(this.render(),this.determineContainerAutoSizing(),this.loaded=!0)}))})),js(this,"getThumbnails",(()=>new Promise((e=>{const{src:t}=this.player.config.previewThumbnails;if(Ba(t))throw new Error("Missing previewThumbnails.src config attribute");const i=()=>{this.thumbnails.sort(((e,t)=>e.height-t.height)),this.player.debug.log("Preview thumbnails",this.thumbnails),e()};if(Sa(t))t((e=>{this.thumbnails=e,i()}));else{const e=(xa(t)?[t]:t).map((e=>this.getThumbnail(e)));Promise.all(e).then(i)}})))),js(this,"getThumbnail",(e=>new Promise((t=>{Ar(e).then((i=>{const n={frames:rl(i),height:null,urlPrefix:""};n.frames[0].text.startsWith("/")||n.frames[0].text.startsWith("http://")||n.frames[0].text.startsWith("https://")||(n.urlPrefix=e.substring(0,e.lastIndexOf("/")+1));const o=new Image;o.onload=()=>{n.height=o.naturalHeight,n.width=o.naturalWidth,this.thumbnails.push(n),t()},o.src=n.urlPrefix+n.frames[0].text}))})))),js(this,"startMove",(e=>{if(this.loaded&&$a(e)&&["touchmove","mousemove"].includes(e.type)&&this.player.media.duration){if("touchmove"===e.type)this.seekTime=this.player.media.duration*(this.player.elements.inputs.seek.value/100);else{var t,i;const n=this.player.elements.progress.getBoundingClientRect(),o=100/n.width*(e.pageX-n.left);this.seekTime=this.player.media.duration*(o/100),this.seekTime<0&&(this.seekTime=0),this.seekTime>this.player.media.duration-1&&(this.seekTime=this.player.media.duration-1),this.mousePosX=e.pageX,this.elements.thumb.time.innerText=Br(this.seekTime);const s=null===(t=this.player.config.markers)||void 0===t||null===(i=t.points)||void 0===i?void 0:i.find((({time:e})=>e===Math.round(this.seekTime)));s&&this.elements.thumb.time.insertAdjacentHTML("afterbegin",`${s.label}<br>`)}this.showImageAtCurrentTime()}})),js(this,"endMove",(()=>{this.toggleThumbContainer(!1,!0)})),js(this,"startScrubbing",(e=>{(ba(e.button)||!1===e.button||0===e.button)&&(this.mouseDown=!0,this.player.media.duration&&(this.toggleScrubbingContainer(!0),this.toggleThumbContainer(!1,!0),this.showImageAtCurrentTime()))})),js(this,"endScrubbing",(()=>{this.mouseDown=!1,Math.ceil(this.lastTime)===Math.ceil(this.player.media.currentTime)?this.toggleScrubbingContainer(!1):ar.call(this.player,this.player.media,"timeupdate",(()=>{this.mouseDown||this.toggleScrubbingContainer(!1)}))})),js(this,"listeners",(()=>{this.player.on("play",(()=>{this.toggleThumbContainer(!1,!0)})),this.player.on("seeked",(()=>{this.toggleThumbContainer(!1)})),this.player.on("timeupdate",(()=>{this.lastTime=this.player.media.currentTime}))})),js(this,"render",(()=>{this.elements.thumb.container=Fa("div",{class:this.player.config.classNames.previewThumbnails.thumbContainer}),this.elements.thumb.imageContainer=Fa("div",{class:this.player.config.classNames.previewThumbnails.imageContainer}),this.elements.thumb.container.appendChild(this.elements.thumb.imageContainer);const e=Fa("div",{class:this.player.config.classNames.previewThumbnails.timeContainer});this.elements.thumb.time=Fa("span",{},"00:00"),e.appendChild(this.elements.thumb.time),this.elements.thumb.imageContainer.appendChild(e),La(this.player.elements.progress)&&this.player.elements.progress.appendChild(this.elements.thumb.container),this.elements.scrubbing.container=Fa("div",{class:this.player.config.classNames.previewThumbnails.scrubbingContainer}),this.player.elements.wrapper.appendChild(this.elements.scrubbing.container)})),js(this,"destroy",(()=>{this.elements.thumb.container&&this.elements.thumb.container.remove(),this.elements.scrubbing.container&&this.elements.scrubbing.container.remove()})),js(this,"showImageAtCurrentTime",(()=>{this.mouseDown?this.setScrubbingContainerSize():this.setThumbContainerSizeAndPos();const e=this.thumbnails[0].frames.findIndex((e=>this.seekTime>=e.startTime&&this.seekTime<=e.endTime)),t=e>=0;let i=0;this.mouseDown||this.toggleThumbContainer(t),t&&(this.thumbnails.forEach(((t,n)=>{this.loadedImages.includes(t.frames[e].text)&&(i=n)})),e!==this.showingThumb&&(this.showingThumb=e,this.loadImage(i)))})),js(this,"loadImage",((e=0)=>{const t=this.showingThumb,i=this.thumbnails[e],{urlPrefix:n}=i,o=i.frames[t],s=i.frames[t].text,a=n+s;if(this.currentImageElement&&this.currentImageElement.dataset.filename===s)this.showImage(this.currentImageElement,o,e,t,s,!1),this.currentImageElement.dataset.index=t,this.removeOldImages(this.currentImageElement);else{this.loadingImage&&this.usingSprites&&(this.loadingImage.onload=null);const i=new Image;i.src=a,i.dataset.index=t,i.dataset.filename=s,this.showingThumbFilename=s,this.player.debug.log(`Loading image: ${a}`),i.onload=()=>this.showImage(i,o,e,t,s,!0),this.loadingImage=i,this.removeOldImages(i)}})),js(this,"showImage",((e,t,i,n,o,s=!0)=>{this.player.debug.log(`Showing thumb: ${o}. num: ${n}. qual: ${i}. newimg: ${s}`),this.setImageSizeAndOffset(e,t),s&&(this.currentImageContainer.appendChild(e),this.currentImageElement=e,this.loadedImages.includes(o)||this.loadedImages.push(o)),this.preloadNearby(n,!0).then(this.preloadNearby(n,!1)).then(this.getHigherQuality(i,e,t,o))})),js(this,"removeOldImages",(e=>{Array.from(this.currentImageContainer.children).forEach((t=>{if("img"!==t.tagName.toLowerCase())return;const i=this.usingSprites?500:1e3;if(t.dataset.index!==e.dataset.index&&!t.dataset.deleting){t.dataset.deleting=!0;const{currentImageContainer:e}=this;setTimeout((()=>{e.removeChild(t),this.player.debug.log(`Removing thumb: ${t.dataset.filename}`)}),i)}}))})),js(this,"preloadNearby",((e,t=!0)=>new Promise((i=>{setTimeout((()=>{const n=this.thumbnails[0].frames[e].text;if(this.showingThumbFilename===n){let o;o=t?this.thumbnails[0].frames.slice(e):this.thumbnails[0].frames.slice(0,e).reverse();let s=!1;o.forEach((e=>{const t=e.text;if(t!==n&&!this.loadedImages.includes(t)){s=!0,this.player.debug.log(`Preloading thumb filename: ${t}`);const{urlPrefix:e}=this.thumbnails[0],n=e+t,o=new Image;o.src=n,o.onload=()=>{this.player.debug.log(`Preloaded thumb filename: ${t}`),this.loadedImages.includes(t)||this.loadedImages.push(t),i()}}})),s||i()}}),300)})))),js(this,"getHigherQuality",((e,t,i,n)=>{if(e<this.thumbnails.length-1){let o=t.naturalHeight;this.usingSprites&&(o=i.h),o<this.thumbContainerHeight&&setTimeout((()=>{this.showingThumbFilename===n&&(this.player.debug.log(`Showing higher quality thumb for: ${n}`),this.loadImage(e+1))}),300)}})),js(this,"toggleThumbContainer",((e=!1,t=!1)=>{const i=this.player.config.classNames.previewThumbnails.thumbContainerShown;this.elements.thumb.container.classList.toggle(i,e),!e&&t&&(this.showingThumb=null,this.showingThumbFilename=null)})),js(this,"toggleScrubbingContainer",((e=!1)=>{const t=this.player.config.classNames.previewThumbnails.scrubbingContainerShown;this.elements.scrubbing.container.classList.toggle(t,e),e||(this.showingThumb=null,this.showingThumbFilename=null)})),js(this,"determineContainerAutoSizing",(()=>{(this.elements.thumb.imageContainer.clientHeight>20||this.elements.thumb.imageContainer.clientWidth>20)&&(this.sizeSpecifiedInCSS=!0)})),js(this,"setThumbContainerSizeAndPos",(()=>{const{imageContainer:e}=this.elements.thumb;if(this.sizeSpecifiedInCSS){if(e.clientHeight>20&&e.clientWidth<20){const t=Math.floor(e.clientHeight*this.thumbAspectRatio);e.style.width=`${t}px`}else if(e.clientHeight<20&&e.clientWidth>20){const t=Math.floor(e.clientWidth/this.thumbAspectRatio);e.style.height=`${t}px`}}else{const t=Math.floor(this.thumbContainerHeight*this.thumbAspectRatio);e.style.height=`${this.thumbContainerHeight}px`,e.style.width=`${t}px`}this.setThumbContainerPos()})),js(this,"setThumbContainerPos",(()=>{const e=this.player.elements.progress.getBoundingClientRect(),t=this.player.elements.container.getBoundingClientRect(),{container:i}=this.elements.thumb,n=t.left-e.left+10,o=t.right-e.left-i.clientWidth-10,s=this.mousePosX-e.left-i.clientWidth/2,a=al(s,n,o);i.style.left=`${a}px`,i.style.setProperty("--preview-arrow-offset",s-a+"px")})),js(this,"setScrubbingContainerSize",(()=>{const{width:e,height:t}=ll(this.thumbAspectRatio,{width:this.player.media.clientWidth,height:this.player.media.clientHeight});this.elements.scrubbing.container.style.width=`${e}px`,this.elements.scrubbing.container.style.height=`${t}px`})),js(this,"setImageSizeAndOffset",((e,t)=>{if(!this.usingSprites)return;const i=this.thumbContainerHeight/t.h;e.style.height=e.naturalHeight*i+"px",e.style.width=e.naturalWidth*i+"px",e.style.left=`-${t.x*i}px`,e.style.top=`-${t.y*i}px`})),this.player=e,this.thumbnails=[],this.loaded=!1,this.lastMouseMoveTime=Date.now(),this.mouseDown=!1,this.loadedImages=[],this.elements={thumb:{},scrubbing:{}},this.load()}get enabled(){return this.player.isHTML5&&this.player.isVideo&&this.player.config.previewThumbnails.enabled}get currentImageContainer(){return this.mouseDown?this.elements.scrubbing.container:this.elements.thumb.imageContainer}get usingSprites(){return Object.keys(this.thumbnails[0].frames[0]).includes("w")}get thumbAspectRatio(){return this.usingSprites?this.thumbnails[0].frames[0].w/this.thumbnails[0].frames[0].h:this.thumbnails[0].width/this.thumbnails[0].height}get thumbContainerHeight(){if(this.mouseDown){const{height:e}=ll(this.thumbAspectRatio,{width:this.player.media.clientWidth,height:this.player.media.clientHeight});return e}return this.sizeSpecifiedInCSS?this.elements.thumb.imageContainer.clientHeight:Math.floor(this.player.media.clientWidth/this.thumbAspectRatio/4)}get currentImageElement(){return this.mouseDown?this.currentScrubbingImageElement:this.currentThumbnailImageElement}set currentImageElement(e){this.mouseDown?this.currentScrubbingImageElement=e:this.currentThumbnailImageElement=e}}const dl={insertElements(e,t){xa(t)?ja(e,this.media,{src:t}):Ea(t)&&t.forEach((t=>{ja(e,this.media,t)}))},change(e){Ia(e,"sources.length")?(wr.cancelRequests.call(this),this.destroy.call(this,(()=>{this.options.quality=[],Wa(this.media),this.media=null,La(this.elements.container)&&this.elements.container.removeAttribute("class");const{sources:t,type:i}=e,[{provider:n=Fr.html5,src:o}]=t,s="html5"===n?i:"div",a="html5"===n?{}:{src:o};Object.assign(this,{provider:n,type:i,supported:tr.check(i,n,this.config.playsinline),media:Fa(s,a)}),this.elements.container.appendChild(this.media),Ca(e.autoplay)&&(this.config.autoplay=e.autoplay),this.isHTML5&&(this.config.crossorigin&&this.media.setAttribute("crossorigin",""),this.config.autoplay&&this.media.setAttribute("autoplay",""),Ba(e.poster)||(this.poster=e.poster),this.config.loop.active&&this.media.setAttribute("loop",""),this.config.muted&&this.media.setAttribute("muted",""),this.config.playsinline&&this.media.setAttribute("playsinline","")),Yr.addStyleHook.call(this),this.isHTML5&&dl.insertElements.call(this,"source",t),this.config.title=e.title,ol.setup.call(this),this.isHTML5&&Object.keys(e).includes("tracks")&&dl.insertElements.call(this,"track",e.tracks),(this.isHTML5||this.isEmbed&&!this.supported.ui)&&Yr.build.call(this),this.isHTML5&&this.media.load(),Ba(e.previewThumbnails)||(Object.assign(this.config.previewThumbnails,e.previewThumbnails),this.previewThumbnails&&this.previewThumbnails.loaded&&(this.previewThumbnails.destroy(),this.previewThumbnails=null),this.config.previewThumbnails.enabled&&(this.previewThumbnails=new cl(this))),this.fullscreen.update()}),!0)):this.debug.warn("Invalid source format")}};class ul{constructor(e,t){if(js(this,"play",(()=>Sa(this.media.play)?(this.ads&&this.ads.enabled&&this.ads.managerPromise.then((()=>this.ads.play())).catch((()=>dr(this.media.play()))),this.media.play()):null)),js(this,"pause",(()=>this.playing&&Sa(this.media.pause)?this.media.pause():null)),js(this,"togglePlay",(e=>(Ca(e)?e:!this.playing)?this.play():this.pause())),js(this,"stop",(()=>{this.isHTML5?(this.pause(),this.restart()):Sa(this.media.stop)&&this.media.stop()})),js(this,"restart",(()=>{this.currentTime=0})),js(this,"rewind",(e=>{this.currentTime-=ka(e)?e:this.config.seekTime})),js(this,"forward",(e=>{this.currentTime+=ka(e)?e:this.config.seekTime})),js(this,"increaseVolume",(e=>{const t=this.media.muted?0:this.volume;this.volume=t+(ka(e)?e:0)})),js(this,"decreaseVolume",(e=>{this.increaseVolume(-e)})),js(this,"airplay",(()=>{tr.airplay&&this.media.webkitShowPlaybackTargetPicker()})),js(this,"toggleControls",(e=>{if(this.supported.ui&&!this.isAudio){const t=Ka(this.elements.container,this.config.classNames.hideControls),i=void 0===e?void 0:!e,n=Ya(this.elements.container,this.config.classNames.hideControls,i);if(n&&Ea(this.config.controls)&&this.config.controls.includes("settings")&&!Ba(this.config.settings)&&Mr.toggleMenu.call(this,!1),n!==t){const e=n?"controlshidden":"controlsshown";rr.call(this,this.media,e)}return!n}return!1})),js(this,"on",((e,t)=>{or.call(this,this.elements.container,e,t)})),js(this,"once",((e,t)=>{ar.call(this,this.elements.container,e,t)})),js(this,"off",((e,t)=>{sr(this.elements.container,e,t)})),js(this,"destroy",((e,t=!1)=>{if(!this.ready)return;const i=()=>{document.body.style.overflow="",this.embed=null,t?(Object.keys(this.elements).length&&(Wa(this.elements.buttons.play),Wa(this.elements.captions),Wa(this.elements.controls),Wa(this.elements.wrapper),this.elements.buttons.play=null,this.elements.captions=null,this.elements.controls=null,this.elements.wrapper=null),Sa(e)&&e()):(lr.call(this),wr.cancelRequests.call(this),Ua(this.elements.original,this.elements.container),rr.call(this,this.elements.original,"destroyed",!0),Sa(e)&&e.call(this.elements.original),this.ready=!1,setTimeout((()=>{this.elements=null,this.media=null}),200))};this.stop(),clearTimeout(this.timers.loading),clearTimeout(this.timers.controls),clearTimeout(this.timers.resized),this.isHTML5?(Yr.toggleNativeControls.call(this,!0),i()):this.isYouTube?(clearInterval(this.timers.buffering),clearInterval(this.timers.playing),null!==this.embed&&Sa(this.embed.destroy)&&this.embed.destroy(),i()):this.isVimeo&&(null!==this.embed&&this.embed.unload().then(i),setTimeout(i,200))})),js(this,"supports",(e=>tr.mime.call(this,e))),this.timers={},this.ready=!1,this.loading=!1,this.failed=!1,this.touch=tr.touch,this.media=e,xa(this.media)&&(this.media=document.querySelectorAll(this.media)),(window.jQuery&&this.media instanceof jQuery||Ta(this.media)||Ea(this.media))&&(this.media=this.media[0]),this.config=za({},zr,ul.defaults,t||{},(()=>{try{return JSON.parse(this.media.getAttribute("data-plyr-config"))}catch(e){return{}}})()),this.elements={container:null,fullscreen:null,captions:null,buttons:{},display:{},progress:{},inputs:{},settings:{popup:null,menu:null,panels:{},buttons:{}}},this.captions={active:null,currentTrack:-1,meta:new WeakMap},this.fullscreen={active:!1},this.options={speed:[],quality:[]},this.debug=new Ur(this.config.debug),this.debug.log("Config",this.config),this.debug.log("Support",tr),ba(this.media)||!La(this.media))return void this.debug.error("Setup failed: no suitable element passed");if(this.media.plyr)return void this.debug.warn("Target already setup");if(!this.config.enabled)return void this.debug.error("Setup failed: disabled by config");if(!tr.check().api)return void this.debug.error("Setup failed: no support");const i=this.media.cloneNode(!0);i.autoplay=!1,this.elements.original=i;const n=this.media.tagName.toLowerCase();let o=null,s=null;switch(n){case"div":if(o=this.media.querySelector("iframe"),La(o)){if(s=Vr(o.getAttribute("src")),this.provider=function(e){return/^(https?:\/\/)?(www\.)?(youtube\.com|youtube-nocookie\.com|youtu\.?be)\/.+$/.test(e)?Fr.youtube:/^https?:\/\/player.vimeo.com\/video\/\d{0,9}(?=\b|\/)/.test(e)?Fr.vimeo:null}(s.toString()),this.elements.container=this.media,this.media=o,this.elements.container.className="",s.search.length){const e=["1","true"];e.includes(s.searchParams.get("autoplay"))&&(this.config.autoplay=!0),e.includes(s.searchParams.get("loop"))&&(this.config.loop.active=!0),this.isYouTube?(this.config.playsinline=e.includes(s.searchParams.get("playsinline")),this.config.youtube.hl=s.searchParams.get("hl")):this.config.playsinline=!0}}else this.provider=this.media.getAttribute(this.config.attributes.embed.provider),this.media.removeAttribute(this.config.attributes.embed.provider);if(Ba(this.provider)||!Object.values(Fr).includes(this.provider))return void this.debug.error("Setup failed: Invalid provider");this.type=Wr;break;case"video":case"audio":this.type=n,this.provider=Fr.html5,this.media.hasAttribute("crossorigin")&&(this.config.crossorigin=!0),this.media.hasAttribute("autoplay")&&(this.config.autoplay=!0),(this.media.hasAttribute("playsinline")||this.media.hasAttribute("webkit-playsinline"))&&(this.config.playsinline=!0),this.media.hasAttribute("muted")&&(this.config.muted=!0),this.media.hasAttribute("loop")&&(this.config.loop.active=!0);break;default:return void this.debug.error("Setup failed: unsupported type")}this.supported=tr.check(this.type,this.provider,this.config.playsinline),this.supported.api?(this.eventListeners=[],this.listeners=new Kr(this),this.storage=new _r(this),this.media.plyr=this,La(this.elements.container)||(this.elements.container=Fa("div",{tabindex:0}),Da(this.media,this.elements.container)),Yr.migrateStyles.call(this),Yr.addStyleHook.call(this),ol.setup.call(this),this.config.debug&&or.call(this,this.elements.container,this.config.events.join(" "),(e=>{this.debug.log(`event: ${e.type}`)})),this.fullscreen=new qr(this),(this.isHTML5||this.isEmbed&&!this.supported.ui)&&Yr.build.call(this),this.listeners.container(),this.listeners.global(),this.config.ads.enabled&&(this.ads=new sl(this)),this.isHTML5&&this.config.autoplay&&this.once("canplay",(()=>dr(this.play()))),this.lastSeekTime=0,this.config.previewThumbnails.enabled&&(this.previewThumbnails=new cl(this))):this.debug.error("Setup failed: no support")}get isHTML5(){return this.provider===Fr.html5}get isEmbed(){return this.isYouTube||this.isVimeo}get isYouTube(){return this.provider===Fr.youtube}get isVimeo(){return this.provider===Fr.vimeo}get isVideo(){return this.type===Wr}get isAudio(){return this.type===jr}get playing(){return Boolean(this.ready&&!this.paused&&!this.ended)}get paused(){return Boolean(this.media.paused)}get stopped(){return Boolean(this.paused&&0===this.currentTime)}get ended(){return Boolean(this.media.ended)}set currentTime(e){if(!this.duration)return;const t=ka(e)&&e>0;this.media.currentTime=t?Math.min(e,this.duration):0,this.debug.log(`Seeking to ${this.currentTime} seconds`)}get currentTime(){return Number(this.media.currentTime)}get buffered(){const{buffered:e}=this.media;return ka(e)?e:e&&e.length&&this.duration>0?e.end(0)/this.duration:0}get seeking(){return Boolean(this.media.seeking)}get duration(){const e=parseFloat(this.config.duration),t=(this.media||{}).duration,i=ka(t)&&t!==1/0?t:0;return e||i}set volume(e){let t=e;xa(t)&&(t=Number(t)),ka(t)||(t=this.storage.get("volume")),ka(t)||({volume:t}=this.config),t>1&&(t=1),t<0&&(t=0),this.config.volume=t,this.media.volume=t,!Ba(e)&&this.muted&&t>0&&(this.muted=!1)}get volume(){return Number(this.media.volume)}set muted(e){let t=e;Ca(t)||(t=this.storage.get("muted")),Ca(t)||(t=this.config.muted),this.config.muted=t,this.media.muted=t}get muted(){return Boolean(this.media.muted)}get hasAudio(){return!this.isHTML5||!!this.isAudio||Boolean(this.media.mozHasAudio)||Boolean(this.media.webkitAudioDecodedByteCount)||Boolean(this.media.audioTracks&&this.media.audioTracks.length)}set speed(e){let t=null;ka(e)&&(t=e),ka(t)||(t=this.storage.get("speed")),ka(t)||(t=this.config.speed.selected);const{minimumSpeed:i,maximumSpeed:n}=this;t=al(t,i,n),this.config.speed.selected=t,setTimeout((()=>{this.media&&(this.media.playbackRate=t)}),0)}get speed(){return Number(this.media.playbackRate)}get minimumSpeed(){return this.isYouTube?Math.min(...this.options.speed):this.isVimeo?.5:.0625}get maximumSpeed(){return this.isYouTube?Math.max(...this.options.speed):this.isVimeo?2:16}set quality(e){const t=this.config.quality,i=this.options.quality;if(!i.length)return;let n=[!Ba(e)&&Number(e),this.storage.get("quality"),t.selected,t.default].find(ka),o=!0;if(!i.includes(n)){const e=hr(i,n);this.debug.warn(`Unsupported quality option: ${n}, using ${e} instead`),n=e,o=!1}t.selected=n,this.media.quality=n,o&&this.storage.set({quality:n})}get quality(){return this.media.quality}set loop(e){const t=Ca(e)?e:this.config.loop.active;this.config.loop.active=t,this.media.loop=t}get loop(){return Boolean(this.media.loop)}set source(e){dl.change.call(this,e)}get source(){return this.media.currentSrc}get download(){const{download:e}=this.config.urls;return Pa(e)?e:this.source}set download(e){Pa(e)&&(this.config.urls.download=e,Mr.setDownloadUrl.call(this))}set poster(e){this.isVideo?Yr.setPoster.call(this,e,!1).catch((()=>{})):this.debug.warn("Poster can only be set for video")}get poster(){return this.isVideo?this.media.getAttribute("poster")||this.media.getAttribute("data-poster"):null}get ratio(){if(!this.isVideo)return null;const e=gr(yr.call(this));return Ea(e)?e.join(":"):e}set ratio(e){this.isVideo?xa(e)&&fr(e)?(this.config.ratio=gr(e),vr.call(this)):this.debug.error(`Invalid aspect ratio specified (${e})`):this.debug.warn("Aspect ratio can only be set for video")}set autoplay(e){this.config.autoplay=Ca(e)?e:this.config.autoplay}get autoplay(){return Boolean(this.config.autoplay)}toggleCaptions(e){Ir.toggle.call(this,e,!1)}set currentTrack(e){Ir.set.call(this,e,!1),Ir.setup.call(this)}get currentTrack(){const{toggled:e,currentTrack:t}=this.captions;return e?t:-1}set language(e){Ir.setLanguage.call(this,e,!1)}get language(){return(Ir.getCurrentTrack.call(this)||{}).language}set pip(e){if(!tr.pip)return;const t=Ca(e)?e:!this.pip;Sa(this.media.webkitSetPresentationMode)&&this.media.webkitSetPresentationMode(t?Dr:Rr),Sa(this.media.requestPictureInPicture)&&(!this.pip&&t?this.media.requestPictureInPicture():this.pip&&!t&&document.exitPictureInPicture())}get pip(){return tr.pip?Ba(this.media.webkitPresentationMode)?this.media===document.pictureInPictureElement:this.media.webkitPresentationMode===Dr:null}setPreviewThumbnails(e){this.previewThumbnails&&this.previewThumbnails.loaded&&(this.previewThumbnails.destroy(),this.previewThumbnails=null),Object.assign(this.config.previewThumbnails,e),this.config.previewThumbnails.enabled&&(this.previewThumbnails=new cl(this))}static supported(e,t,i){return tr.check(e,t,i)}static loadSprite(e,t){return Nr(e,t)}static setup(e,t={}){let i=null;return xa(e)?i=Array.from(document.querySelectorAll(e)):Ta(e)?i=Array.from(e):Ea(e)&&(i=e.filter(La)),Ba(i)?null:i.map((e=>new ul(e,t)))}}ul.defaults=function(e){return JSON.parse(JSON.stringify(e))}(zr);const hl=["src"],pl=["src"],ml=(e=>(t.pushScopeId("data-v-3fbadc18"),e=e(),t.popScopeId(),e))((()=>t.createElementVNode("track",{kind:"captions",label:"English captions",src:"/path/to/captions.vtt",srclang:"en",default:""},null,-1)));var fl=i(t.defineComponent({__name:"LewPlyrVideo",props:{url:{type:String,default:"https://cdn.plyr.io/static/demo/View_From_A_Blue_Moon_Trailer-1080p.mp4"}},setup(e){let i,n=t.ref(null);return t.onMounted((()=>{i=new ul(n.value,{settings:["quality","speed","loop"],controls:["play-large","play","progress","current-time","mute","volume","settings","pip","airplay","fullscreen"],keyboard:{focused:!0,global:!1}})})),t.onUnmounted((()=>{i.destroy()})),(i,o)=>(t.openBlock(),t.createElementBlock("video",{id:"player",ref_key:"playerRef",ref:n,playsinline:"",controls:"","data-poster":"/path/to/poster.jpg"},[t.createElementVNode("source",{src:e.url,type:"video/mp4"},null,8,hl),t.createElementVNode("source",{src:e.url,type:"video/webm"},null,8,pl),t.createCommentVNode(" Captions are optional "),ml],512))}}),[["__scopeId","data-v-3fbadc18"],["__file","C:/Users/10570/Desktop/30secWorkSpace/Lew-UI/packages/components/plyr/src/LewPlyrVideo.vue"]]);const gl={class:"demo-box"},yl={class:"demo-item"},vl={class:"demo-cp"},bl={class:"hl-pre"},wl={class:"pre-box"},kl=["textContent"],xl={class:"icon"};var Cl=i(t.defineComponent({__name:"LewDemoBox",props:{title:{type:String,default:()=>""},tag:{type:String,default:()=>""},code:{type:String,default:()=>""}},setup(e){let i=t.ref(!1);return(n,o)=>{const s=t.resolveComponent("lew-tag"),a=t.resolveComponent("lew-title"),r=t.resolveDirective("highlight");return t.openBlock(),t.createElementBlock("div",gl,[t.createVNode(a,{size:"16px",bold:800},{default:t.withCtx((()=>[t.createTextVNode(t.toDisplayString(e.title)+" ",1),e.tag?(t.openBlock(),t.createBlock(s,{key:0,type:"info",style:{margin:"2px 0px 0px 5px"}},{default:t.withCtx((()=>[t.createTextVNode(t.toDisplayString(e.tag),1)])),_:1})):t.createCommentVNode("v-if",!0)])),_:1}),t.createElementVNode("div",yl,[t.createElementVNode("div",vl,[t.renderSlot(n.$slots,"default")]),t.withDirectives((t.openBlock(),t.createElementBlock("div",bl,[t.createElementVNode("div",wl,[t.createElementVNode("pre",null,[t.createElementVNode("code",{textContent:t.toDisplayString(e.code)},null,8,kl)])])])),[[t.vShow,t.unref(i)],[r]]),t.createElementVNode("div",{class:"show-bar",onClick:o[0]||(o[0]=e=>t.isRef(i)?i.value=!t.unref(i):i=!t.unref(i))},[t.createElementVNode("div",xl,[t.unref(i)?t.createCommentVNode("v-if",!0):(t.openBlock(),t.createBlock(t.unref($e),{key:0,size:"20"},{default:t.withCtx((()=>[t.createVNode(t.unref(Dt))])),_:1})),t.unref(i)?(t.openBlock(),t.createBlock(t.unref($e),{key:1,size:"20"},{default:t.withCtx((()=>[t.createVNode(t.unref(Ot))])),_:1})):t.createCommentVNode("v-if",!0)]),t.createTextVNode(" "+t.toDisplayString(t.unref(i)?"关闭":"显示源码"),1)])])])}}}),[["__file","C:/Users/10570/Desktop/30secWorkSpace/Lew-UI/packages/components/demo-box/src/LewDemoBox.vue"]]);const Sl={right:{type:String,default:"40px"},bottom:{type:String,default:"40px"},valveHeight:{type:String,default:"50px"},target:{type:String,default:""}};var El=i(t.defineComponent({__name:"LewBackTop",props:Sl,emits:["click"],setup(e,{emit:i}){const n=e,o=t.shallowRef(),s=t.ref(!1),a=t.computed((()=>({right:`${n.right}`,bottom:`${n.bottom}`}))),r=()=>{if(!o.value)return;i("click");let e=setInterval((()=>{let t=o.value,i=Math.floor(-t.scrollTop/5);t.scrollTop=t.scrollTop+i,0===t.scrollTop&&clearInterval(e)}),20)};var l,c,d;return l=window,c="scroll",d=()=>{o.value&&(s.value=o.value.scrollTop>=parseFloat(n.valveHeight))},t.onMounted((()=>l.addEventListener(c,d,!0))),t.onUnmounted((()=>l.removeEventListener(c,d,!0))),t.onMounted((()=>{var e;if(o.value=document.documentElement,n.target&&(o.value=null!=(e=document.querySelector(`.${n.target}`))?e:void 0,!o.value))throw new Error(`target is not existed: ${n.target}`)})),(e,i)=>(t.openBlock(),t.createBlock(t.Transition,{name:"fade"},{default:t.withCtx((()=>[s.value?(t.openBlock(),t.createElementBlock("div",{key:0,class:"backTop",style:t.normalizeStyle(t.unref(a)),onClick:r},[t.renderSlot(e.$slots,"default",{},(()=>[t.createVNode(t.unref($e),{size:"20"},{default:t.withCtx((()=>[t.createVNode(t.unref(N))])),_:1})]),!0)],4)):t.createCommentVNode("v-if",!0)])),_:3}))}}),[["__scopeId","data-v-36ae6e41"],["__file","C:/Users/10570/Desktop/30secWorkSpace/Lew-UI/packages/components/backtop/src/LewBackTop.vue"]]),Tl=Object.freeze(Object.defineProperty({__proto__:null,LewFlex:n,LewSpace:s,LewLayout:a,LewMark:d,LewTabs:m,LewSteps:g,LewBreadcrumb:E,LewDropdown:$,LewInput:Oe,LewInputPro:Re,LewFormItem:je,LewCheckbox:Ye,LewCheckboxGroup:Ke,LewRadioboxGroup:tt,LewSelect:dt,LewSwitch:ht,LewDate:St,LewDatePicker:Qt,LewTable:ni,LewPagination:di,LewAvatar:pi,LewTitle:mi,LewButton:fi,LewBadge:vi,LewTag:Ti,LewAlert:Pi,LewModal:Bi,LewPopok:Fi,LewPopover:Go,LewDrawer:es,LewFancybox:Fs,LewFancyImage:ns,LewPlyrVideo:fl,LewDemoBox:Cl,LewBackTop:El},Symbol.toStringTag,{value:"Module"}));const Ll=(e,t)=>{document.getElementById("lew-message")?$l(e,t):((()=>{const e=document.createElement("div");e.setAttribute("id","lew-message"),document.body.appendChild(e)})(),Ll(e,t))},$l=(e,t)=>{const i=document.getElementById("lew-message"),n=document.createElement("div"),o={success:'<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 24 24"><g fill="none"><path d="M12 2c5.523 0 10 4.477 10 10s-4.477 10-10 10S2 17.523 2 12S6.477 2 12 2zm0 1.5a8.5 8.5 0 1 0 0 17a8.5 8.5 0 0 0 0-17zm-1.25 9.94l4.47-4.47a.75.75 0 0 1 1.133.976l-.073.084l-5 5a.75.75 0 0 1-.976.073l-.084-.073l-2.5-2.5a.75.75 0 0 1 .976-1.133l.084.073l1.97 1.97l4.47-4.47l-4.47 4.47z" fill="currentColor"></path></g></svg>',warning:'<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 24 24"><g fill="none"><path d="M10.91 2.782a2.25 2.25 0 0 1 2.975.74l.083.138l7.759 14.009a2.25 2.25 0 0 1-1.814 3.334l-.154.006H4.243a2.25 2.25 0 0 1-2.041-3.197l.072-.143L10.031 3.66a2.25 2.25 0 0 1 .878-.878zm9.505 15.613l-7.76-14.008a.75.75 0 0 0-1.254-.088l-.057.088l-7.757 14.008a.75.75 0 0 0 .561 1.108l.095.006h15.516a.75.75 0 0 0 .696-1.028l-.04-.086l-7.76-14.008l7.76 14.008zM12 16.002a.999.999 0 1 1 0 1.997a.999.999 0 0 1 0-1.997zM11.995 8.5a.75.75 0 0 1 .744.647l.007.102l.004 4.502a.75.75 0 0 1-1.494.103l-.006-.102l-.004-4.502a.75.75 0 0 1 .75-.75z" fill="currentColor"></path></g></svg>',error:'<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 24 24"><g fill="none"><path d="M12 2c5.523 0 10 4.478 10 10s-4.477 10-10 10S2 17.522 2 12S6.477 2 12 2zm0 1.667c-4.595 0-8.333 3.738-8.333 8.333c0 4.595 3.738 8.333 8.333 8.333c4.595 0 8.333-3.738 8.333-8.333c0-4.595-3.738-8.333-8.333-8.333zm-.001 10.835a.999.999 0 1 1 0 1.998a.999.999 0 0 1 0-1.998zM11.994 7a.75.75 0 0 1 .744.648l.007.101l.004 4.502a.75.75 0 0 1-1.493.103l-.007-.102l-.004-4.501a.75.75 0 0 1 .75-.751z" fill="currentColor"></path></g></svg>',normal:'<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 24 24"><g fill="none"><path d="M12 1.999c5.524 0 10.002 4.478 10.002 10.002c0 5.523-4.478 10.001-10.002 10.001C6.476 22.002 2 17.524 2 12.001C1.999 6.477 6.476 1.999 12 1.999zm0 1.5a8.502 8.502 0 1 0 0 17.003A8.502 8.502 0 0 0 12 3.5zm-.004 7a.75.75 0 0 1 .744.648l.007.102l.004 5.502a.75.75 0 0 1-1.494.102l-.006-.101l-.004-5.502a.75.75 0 0 1 .75-.75zm.005-3.497a.999.999 0 1 1 0 1.997a.999.999 0 0 1 0-1.997z" fill="currentColor"></path></g></svg>',info:'<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 24 24"><g fill="none"><path d="M12 1.996a7.49 7.49 0 0 1 7.496 7.25l.004.25v4.097l1.38 3.156a1.249 1.249 0 0 1-1.145 1.75L15 18.502a3 3 0 0 1-5.995.177L9 18.499H4.275a1.251 1.251 0 0 1-1.147-1.747L4.5 13.594V9.496c0-4.155 3.352-7.5 7.5-7.5zM13.5 18.5l-3 .002a1.5 1.5 0 0 0 2.993.145l.007-.147zM12 3.496c-3.32 0-6 2.674-6 6v4.41L4.656 17h14.697L18 13.907V9.509l-.003-.225A5.988 5.988 0 0 0 12 3.496z" fill="currentColor"></path></g></svg>'};n.innerHTML=`${o[e]}<div class="content">${t}</div>`,null==i||i.appendChild(n,null==i?void 0:i.childNodes[0]),n.setAttribute("class",`message message-${e}`),setTimeout((()=>{n.setAttribute("class",`message message-${e} message-show`),setTimeout((()=>{n.setAttribute("class",`message message-${e} message-hidden`),setTimeout((()=>{null==i||i.removeChild(n)}),250)}),3e3)}),10)};var _l={name:"LewMessage",warning:e=>{Ll("warning",e)},info:e=>{Ll("info",e)},normal:e=>{Ll("normal",e)},success:e=>{Ll("success",e)},error:e=>{Ll("error",e)}};const Al={key:0,class:"lew-dialog-box lew-dialog-box-normal"},Nl={class:"left"},Pl={class:"right"},Bl=t.createTextVNode("取消"),Ml=t.createTextVNode("确认"),Vl={key:1,class:"lew-dialog-box lew-dialog-box-easy"},Ol={class:"left"},Il={class:"right"},zl=t.createTextVNode("取消"),Dl=t.createTextVNode("确认");var Rl=i(t.defineComponent({__name:"LewDialog",props:{visible:{type:Boolean,default:!1},closeOnClickOverlay:{type:Boolean,default:!0},type:{type:String,default:""},ok:{type:Function},cancel:{type:Function},layout:{type:String,default:"normal"}},emits:["update:visible"],setup(e,{emit:i}){const n=e,o=()=>{n.closeOnClickOverlay&&a()};let s=t.ref(!0);const a=()=>{s.value=!1,setTimeout((()=>{i("update:visible",!1)}),245)},r=()=>{"function"==typeof n.ok&&n.ok(),a()},l=()=>{"function"==typeof n.cancel&&n.cancel(),a()};return(i,n)=>(t.openBlock(),t.createBlock(t.Teleport,{to:"body"},[e.visible?(t.openBlock(),t.createElementBlock("div",{key:0,class:"lew-dialog",style:t.normalizeStyle(t.unref(s)?"animation: lewDialogOpen 0.25s;":"animation: lewDialogClose 0.25s;"),onClick:o},["normal"==e.layout?(t.openBlock(),t.createElementBlock("div",Al,[t.createElementVNode("div",{class:"btn-close",onClick:l},[t.createVNode(t.unref($e),{size:"18"},{default:t.withCtx((()=>[t.createVNode(t.unref(jt))])),_:1})]),t.createElementVNode("div",Nl,[t.createVNode(t.unref($e),{size:"32",class:t.normalizeClass(`icon-${e.type}`)},{default:t.withCtx((()=>["normal"==e.type?(t.openBlock(),t.createBlock(t.unref(Yt),{key:0})):t.createCommentVNode("v-if",!0),"warning"==e.type?(t.openBlock(),t.createBlock(t.unref(Zt),{key:1})):t.createCommentVNode("v-if",!0),"success"==e.type?(t.openBlock(),t.createBlock(t.unref(Bt),{key:2})):t.createCommentVNode("v-if",!0),"error"==e.type?(t.openBlock(),t.createBlock(t.unref(Ut),{key:3})):t.createCommentVNode("v-if",!0),"info"==e.type?(t.openBlock(),t.createBlock(t.unref(Lt),{key:4})):t.createCommentVNode("v-if",!0)])),_:1},8,["class"])]),t.createElementVNode("div",Pl,[t.createElementVNode("header",null,[t.renderSlot(i.$slots,"title",{},void 0,!0),t.createElementVNode("span",{class:"gulu-dialog-close",onClick:a})]),t.createElementVNode("main",null,[t.renderSlot(i.$slots,"content",{},void 0,!0)]),t.createElementVNode("footer",null,[t.createVNode(t.unref(fi),{size:"small",type:"blank",onClick:l},{default:t.withCtx((()=>[Bl])),_:1}),t.createVNode(t.unref(fi),{size:"small",onClick:r},{default:t.withCtx((()=>[Ml])),_:1})])])])):t.createCommentVNode("v-if",!0),"easy"==e.layout?(t.openBlock(),t.createElementBlock("div",Vl,[t.createElementVNode("div",Ol,[t.createVNode(t.unref($e),{size:"22",class:t.normalizeClass(`icon-${e.type}`)},{default:t.withCtx((()=>["normal"==e.type?(t.openBlock(),t.createBlock(t.unref(Yt),{key:0})):t.createCommentVNode("v-if",!0),"warning"==e.type?(t.openBlock(),t.createBlock(t.unref(Zt),{key:1})):t.createCommentVNode("v-if",!0),"success"==e.type?(t.openBlock(),t.createBlock(t.unref(Bt),{key:2})):t.createCommentVNode("v-if",!0),"error"==e.type?(t.openBlock(),t.createBlock(t.unref(Ut),{key:3})):t.createCommentVNode("v-if",!0),"info"==e.type?(t.openBlock(),t.createBlock(t.unref(Lt),{key:4})):t.createCommentVNode("v-if",!0)])),_:1},8,["class"])]),t.createElementVNode("div",Il,[t.createElementVNode("main",null,[t.renderSlot(i.$slots,"content",{},void 0,!0)]),t.createVNode(t.unref(fi),{style:{"margin-right":"10px"},type:"normal",size:"small",onClick:l},{default:t.withCtx((()=>[zl])),_:1}),t.createVNode(t.unref(fi),{size:"small",onClick:r},{default:t.withCtx((()=>[Dl])),_:1})])])):t.createCommentVNode("v-if",!0)],4)):t.createCommentVNode("v-if",!0)]))}}),[["__scopeId","data-v-0e036b0b"],["__file","C:/Users/10570/Desktop/30secWorkSpace/Lew-UI/packages/directives/dialog/src/LewDialog.vue"]]);const Fl=(e,i)=>{const{title:n,content:o,ok:s,cancel:a,layout:r}=i,l=document.createElement("div");document.body.appendChild(l);const c=t.createApp({render:()=>t.h(Rl,{closeOnClickOverlay:!1,type:e,layout:r,visible:!0,"onUpdate:visible":e=>{!1===e&&(c.unmount(l),l.remove())},ok:s,cancel:a},{title:()=>n,content:()=>o})});c.mount(l)};var jl={name:"LewDialog",warning:e=>{Fl("warning",e)},info:e=>{Fl("info",e)},normal:e=>{Fl("normal",e)},success:e=>{Fl("success",e)},error:e=>{Fl("error",e)}};let Wl;var Hl={install(e){e.directive("tooltip",{mounted(e,t){let i=t.value.trigger;"hover"==i&&(i="mouseenter"),Wl=Xo(e,{trigger:i||"mouseenter",content:t.value.content,animation:"shift-away-subtle",interactive:!0,appendTo:()=>document.body,placement:t.value.placement,allowHTML:t.value.allowHTML,arrow:t.value.arrow,maxWidth:250,onShow(e){document.getElementsByTagName("html")[0].classList.contains("lew-dark")?e.popper.children[0].setAttribute("data-theme","dark"):e.popper.children[0].setAttribute("data-theme","light")}}),Wl.popper.children[0].setAttribute("data-lew","tooltip")},updated(e,t){Wl.setContent(t.value.content)},unmounted(){Wl=null}})}};let Ul;var ql={install(e){e.directive("backtop",{mounted(e,i){var n;const o=i.value,s=t.shallowRef();if(s.value=document.documentElement,o&&(s.value=null!=(n=document.querySelector(`.${o}`))?n:void 0,!s.value))throw new Error(`target is not existed: ${o}`);Ul=()=>{if(!s.value)return;const e=setInterval((()=>{const t=s.value,i=Math.floor(-t.scrollTop/5);t.scrollTop=t.scrollTop+i,0===t.scrollTop&&clearInterval(e)}),20)},e.addEventListener("click",Ul)},unmounted(e){e.removeEventListener("click",Ul)}})}};const Xl=(e,t,i)=>{document.getElementById("lew-notification")?Yl(e,t,i):((()=>{const e=document.createElement("div");e.setAttribute("id","lew-notification"),document.body.appendChild(e)})(),Xl(e,t,i))},Yl=(e,t,i)=>{const n=document.getElementById("lew-notification"),o=document.createElement("div");o.innerHTML=`\n <div class="main">\n <div class="lew-notification-title">${t}</div>\n ${i?'<div class="lew-notification-content">'+i+"</div>":""} \n </div>\n `,null==n||n.appendChild(o,null==n?void 0:n.childNodes[0]),o.setAttribute("class",`notification notification-${e}`),setTimeout((()=>{o.setAttribute("class",`notification notification-${e} notification-show`),setTimeout((()=>{o.setAttribute("class",`notification notification-${e} notification-hidden`),setTimeout((()=>{null==n||n.removeChild(o)}),250)}),3e3)}),10)};var Kl={name:"LewNotification",warning:({title:e,content:t})=>{Xl("warning",e,t)},info:({title:e,content:t})=>{Xl("info",e,t)},normal:({title:e,content:t})=>{Xl("normal",e,t)},success:({title:e,content:t})=>{Xl("success",e,t)},error:({title:e,content:t})=>{Xl("error",e,t)}},Gl=Object.freeze(Object.defineProperty({__proto__:null,LewMessage:_l,LewDialog:jl,LewVTooltip:Hl,LewVBacktop:ql,LewNotification:Kl},Symbol.toStringTag,{value:"Module"}));const Zl=function(e){if(Zl.installed)return;const t=Object.keys(Tl).map((e=>Tl[e])),i=Object.keys(Gl).map((e=>Gl[e]));t.forEach((t=>{(t.hasOwnProperty("name")||t.hasOwnProperty("__name"))&&t.hasOwnProperty("setup")&&e.component(t.name||t.__name,t)})),i.forEach((t=>{t.hasOwnProperty("install")?e.use(t):t.hasOwnProperty("name")&&(window[t.name]=t,e.config.globalProperties[t.name]=t)}))};var Jl={install:Zl};e.LewAlert=Pi,e.LewAvatar=pi,e.LewBackTop=El,e.LewBadge=vi,e.LewBreadcrumb=E,e.LewButton=fi,e.LewCheckbox=Ye,e.LewCheckboxGroup=Ke,e.LewDate=St,e.LewDatePicker=Qt,e.LewDemoBox=Cl,e.LewDialog=jl,e.LewDrawer=es,e.LewDropdown=$,e.LewFancyImage=ns,e.LewFancybox=Fs,e.LewFlex=n,e.LewFormItem=je,e.LewInput=Oe,e.LewInputPro=Re,e.LewLayout=a,e.LewMark=d,e.LewMessage=_l,e.LewModal=Bi,e.LewNotification=Kl,e.LewPagination=di,e.LewPlyrVideo=fl,e.LewPopok=Fi,e.LewPopover=Go,e.LewRadioboxGroup=tt,e.LewSelect=dt,e.LewSpace=s,e.LewSteps=g,e.LewSwitch=ht,e.LewTable=ni,e.LewTabs=m,e.LewTag=Ti,e.LewTitle=mi,e.LewVBacktop=ql,e.LewVTooltip=Hl,e.default=Jl,Object.defineProperties(e,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})}));