officialblock 2.1.5 → 2.1.7
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/{index-DGvRy0FG.js → index-2XnP91cX.js} +1 -1
- package/dist/{index-DuMXP10V.mjs → index-8NPUdCwO.mjs} +1 -1
- package/dist/{index-BLL7s823.mjs → index-B3tXZSRg.mjs} +1 -1
- package/dist/{index-Bf8pSKt6.js → index-BBefhQHG.js} +1 -1
- package/dist/{index-CYJDfNO2.mjs → index-BLMXunT4.mjs} +1 -1
- package/dist/{index-Byrk1Mlt.js → index-BSRuOxk5.js} +1 -1
- package/dist/{index-Bq7PruNu.mjs → index-BaRF1B0Z.mjs} +1 -1
- package/dist/index-By-W0Ito.mjs +4 -0
- package/dist/index-By5KQYOh.js +243 -0
- package/dist/{index-D_wawBrn.mjs → index-C3To7mAV.mjs} +1 -1
- package/dist/{index-ChMoNeEO.js → index-CQgB-NyR.js} +1 -1
- package/dist/{index-Dag86dDG.js → index-DFuCM6Sl.js} +1 -1
- package/dist/{index-ByHLUvb4.mjs → index-DV6KnqfT.mjs} +17111 -16866
- package/dist/{index-DLh3Q6AQ.mjs → index-Dz7lJgfd.mjs} +1 -1
- package/dist/{index-CY_5stdH.js → index-N0gGt0kx.js} +1 -1
- package/dist/{index-J8LamgdJ.js → index-QFpkZqlg.js} +1 -1
- package/dist/official-block.cjs.js +1 -1
- package/dist/official-block.es.js +19 -17
- package/dist/official-block.umd.js +45 -40
- package/dist/style.css +1 -1
- package/package.json +3 -1
- package/dist/index-CdyHd9C0.mjs +0 -4
- package/dist/index-DKFNhqPK.js +0 -238
|
@@ -0,0 +1,243 @@
|
|
|
1
|
+
"use strict";var w_=Object.create;var Ju=Object.defineProperty;var x_=Object.getOwnPropertyDescriptor;var V_=Object.getOwnPropertyNames;var C_=Object.getPrototypeOf,k_=Object.prototype.hasOwnProperty;var E_=(n,t,o)=>t in n?Ju(n,t,{enumerable:!0,configurable:!0,writable:!0,value:o}):n[t]=o;var T_=(n,t,o,a)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of V_(t))!k_.call(n,i)&&i!==o&&Ju(n,i,{get:()=>t[i],enumerable:!(a=x_(t,i))||a.enumerable});return n};var Ue=(n,t,o)=>(o=n!=null?w_(C_(n)):{},T_(t||!n||!n.__esModule?Ju(o,"default",{value:n,enumerable:!0}):o,n));var Zu=(n,t,o)=>E_(n,typeof t!="symbol"?t+"":t,o);const e=require("vue"),N_=require("simplebar-vue"),Sr=require("gsap"),Et=require("swiper/vue"),ct=require("swiper/modules"),bh=require("@splidejs/vue-splide"),Vn={width:e.ref(0),scrollY:e.ref(0),offsetBottom:e.ref(0)},Dg=()=>typeof window<"u"?window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth:0,xm=()=>typeof window<"u"?Math.round(window.pageYOffset):0,Vm=()=>typeof window<"u"?Math.round(document.documentElement.offsetHeight-window.pageYOffset-window.innerHeight):0,Pg=()=>{Vn.width.value=Dg(),Vn.scrollY.value=xm(),Vn.offsetBottom.value=Vm()};let Bc;const wh=()=>{clearTimeout(Bc),Bc=setTimeout(Pg,100)},xh=()=>{Vn.scrollY.value=xm(),Vn.offsetBottom.value=Vm()};function S_(){const n=e.computed(()=>Vn.width.value),t=e.computed(()=>Vn.scrollY.value),o=e.computed(()=>Vn.offsetBottom.value);return{$_vsWidth:n,$_vsScrollY:t,$_vsOffsetBottom:o,getScreenWidth:Dg,getScreenScrollY:xm,getScreenOffsetBottom:Vm}}const $g={install(n){Pg(),typeof window<"u"&&(window.addEventListener("resize",wh),window.addEventListener("scroll",xh)),n.config.globalProperties.$_vsWidth=e.computed(()=>Vn.width.value),n.config.globalProperties.$_vsScrollY=e.computed(()=>Vn.scrollY.value),n.config.globalProperties.$_vsOffsetBottom=e.computed(()=>Vn.offsetBottom.value),n.provide("vueScreen",{$_vsWidth:e.computed(()=>Vn.width.value),$_vsScrollY:e.computed(()=>Vn.scrollY.value),$_vsOffsetBottom:e.computed(()=>Vn.offsetBottom.value)});const t=n.unmount;n.unmount=function(){typeof window<"u"&&(window.removeEventListener("resize",wh),window.removeEventListener("scroll",xh),clearTimeout(Bc)),t&&t.call(this)}}};function R(n=16){const t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";let o="";for(let a=0;a<n;a++)o+=t.charAt(Math.floor(Math.random()*t.length));return o}function Ne(){const n=navigator.userAgent,t=/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(n),o=window.innerWidth<=768;return t||o&&!/iPad/.test(n)}function qs(n){let t=0,o=0;for(;n;)t+=n.offsetLeft-n.scrollLeft+n.clientLeft,o+=n.offsetTop-n.scrollTop+n.clientTop,n=n.offsetParent;return{x:t,y:o}}function yr(n="Publications",t="section",o=10,a=8){const i="abcdefghijklmnopqrstuvwxyz0123456789",s=i.length;function l(d){if(typeof crypto<"u"&&crypto.getRandomValues){const h=new Uint32Array(d);crypto.getRandomValues(h);let g="";for(let p=0;p<d;p++)g+=i[h[p]%s];return g}else{let h="";for(let g=0;g<d;g++)h+=i.charAt(Math.floor(Math.random()*s));return h}}function r(d){const h=Date.now().toString();if(h.length>=d)return h.slice(0,d);{const g=l(d-h.length).replace(/[^0-9]/g,"");return h+g}}const u=r(o),c=l(a),f=r(o),m=l(a);return`${n}-${u}-${c}-${t}-${f}-${m}`}const B_={class:"button-text"},D_={class:"link-text"},P_=e.defineComponent({__name:"index",props:{type:{type:String,default:"button"},data:{type:Object,default:()=>{}},hasHoverBg:{type:Boolean,default:!0},isPreview:{type:Boolean,default:!0}},emits:["handleClick"],setup(n,{emit:t}){const o=n,a=t,i=()=>{!o.data.url||!o.isPreview||(o.data.url.startsWith("http")?typeof window<"u"&&window.open(o.data.url,"_blank"):a("handleClick",o.data.url))};return(s,l)=>n.type==="button"?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(["button-primary flex-inline flex-center",[n.hasHoverBg&&"button-hover-bg"]]),onClick:i},[e.createElementVNode("span",B_,e.toDisplayString(n.data.text),1),l[0]||(l[0]=e.createElementVNode("span",{class:"button-icon"},null,-1))],2)):(e.openBlock(),e.createElementBlock("div",{key:1,class:"link-button flex-inline flex-center",onClick:i},[e.createElementVNode("span",D_,e.toDisplayString(n.data.text),1),l[1]||(l[1]=e.createElementVNode("span",{class:"button-icon link-icon"},null,-1))]))}}),ne=(n,t)=>{const o=n.__vccOpts||n;for(const[a,i]of t)o[a]=i;return o},qo=ne(P_,[["__scopeId","data-v-d185f3a2"]]),$_={class:"article-item"},A_={class:"article-item-title"},L_=["innerHTML"],I_={key:0,class:"article-item-button"},O_={key:1,class:"article-item-link"},M_=e.defineComponent({__name:"article",props:{article:{type:Object,default:()=>{}},isPreview:{type:Boolean,default:!0}},emits:["handleClick"],setup(n,{emit:t}){const o=t,a=i=>{o("handleClick",i)};return(i,s)=>{var l,r;return e.openBlock(),e.createElementBlock("div",$_,[e.createElementVNode("h4",A_,e.toDisplayString(n.article.title),1),e.createElementVNode("div",{class:"editor-content",innerHTML:n.article.content},null,8,L_),(l=n.article.buttonList)!=null&&l.length?(e.openBlock(),e.createElementBlock("div",I_,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.article.buttonList,u=>(e.openBlock(),e.createBlock(qo,{key:u.id,data:u,isPreview:n.isPreview,onHandleClick:a},null,8,["data","isPreview"]))),128))])):e.createCommentVNode("",!0),(r=n.article.linkList)!=null&&r.length?(e.openBlock(),e.createElementBlock("div",O_,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.article.linkList,u=>(e.openBlock(),e.createBlock(qo,{key:u.id,data:u,isPreview:n.isPreview,type:"link",onHandleClick:a},null,8,["data","isPreview"]))),128))])):e.createCommentVNode("",!0)])}}}),U_=ne(M_,[["__scopeId","data-v-0f1ff48c"]]),R_={class:"contact-item"},F_={class:"contact-item-categories"},H_={class:"contact-item-title"},j_=["innerHTML"],z_={class:"contact-item-link"},q_=e.defineComponent({__name:"contact",props:{contact:{type:Object,default:()=>{}},isPreview:{type:Boolean,default:!0}},setup(n){return(t,o)=>(e.openBlock(),e.createElementBlock("div",R_,[e.createElementVNode("div",F_,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.contact.categories,a=>(e.openBlock(),e.createElementBlock("p",{class:"categories",key:a.id},e.toDisplayString(a.text),1))),128))]),e.createElementVNode("h4",H_,e.toDisplayString(n.contact.title),1),e.createElementVNode("div",{class:"editor-content",innerHTML:n.contact.content},null,8,j_),e.createElementVNode("div",z_,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.contact.linkList,a=>(e.openBlock(),e.createBlock(qo,{key:a.id,data:a,isPreview:n.isPreview,type:"link"},null,8,["data","isPreview"]))),128))])]))}}),W_=ne(q_,[["__scopeId","data-v-355d27bb"]]),G_={key:0,class:"image-desc"},X_={key:1,class:"video-container flex-inline flex-center"},Y_=["src"],K_={class:"video-thumbnail flex flex-center"},Q_=["src"],J_={key:2,class:"image-list-container"},Z_={key:0,class:"image-preview"},eb={class:"image-list-wrapper"},tb=["src","onClick"],nb=e.defineComponent({__name:"index",props:{type:{type:String,default:"Image"},data:{type:Object,default:()=>{}},preview:{type:Boolean,default:!0}},setup(n){var g,p,b;const t=n,o=e.ref(),a=e.ref(!1),i=()=>{var _;(_=o.value)==null||_.play(),a.value=!0},s=e.ref(((b=(p=(g=t.data)==null?void 0:g.imageList)==null?void 0:p[0])==null?void 0:b.src)||""),l=_=>{s.value=_},r=e.ref(null),u=e.ref(!1),c=e.ref(!1),f=()=>{const _=r.value;_&&(u.value=_.scrollLeft>0,c.value=_.scrollLeft+_.clientWidth<_.scrollWidth)},m=()=>{const _=r.value;_&&_.scrollBy({left:-_.clientWidth/1.5,behavior:"smooth"})},d=()=>{const _=r.value;_&&_.scrollBy({left:_.clientWidth/1.5,behavior:"smooth"})},h=()=>{f()};return e.watch(()=>{var _;return(_=t.data)==null?void 0:_.imageList},async()=>{await e.nextTick(),f()}),e.onMounted(()=>{typeof window<"u"&&window.addEventListener("resize",f),e.nextTick(f)}),e.onUnmounted(()=>{typeof window<"u"&&window.removeEventListener("resize",f)}),(_,w)=>{const v=e.resolveComponent("a-image"),V=e.resolveComponent("icon-caret-right");return e.openBlock(),e.createElementBlock(e.Fragment,null,[n.type==="Image"?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(["image-container",[n.data.isRound?"round":""]])},[e.createVNode(v,{class:"image",src:n.data.imgSrc,preview:n.preview,alt:n.data.alt,fit:"contain",width:"100%",height:"100%"},null,8,["src","preview","alt"]),n.data.caption?(e.openBlock(),e.createElementBlock("p",G_,e.toDisplayString(n.data.caption),1)):e.createCommentVNode("",!0)],2)):e.createCommentVNode("",!0),n.type==="Video"?(e.openBlock(),e.createElementBlock("div",X_,[e.createElementVNode("video",{class:"video",ref_key:"videoElement",ref:o,src:n.data.videoSrc,controls:""},null,8,Y_),a.value?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createElementVNode("div",K_,[e.createElementVNode("img",{src:n.data.imgSrc},null,8,Q_)]),e.createElementVNode("div",{class:"play-button flex flex-center",onClick:i},[e.createVNode(V,{style:{color:"#fff"}})])],64))])):e.createCommentVNode("",!0),n.type==="ImageList"?(e.openBlock(),e.createElementBlock("div",J_,[s.value?(e.openBlock(),e.createElementBlock("div",Z_,[e.createVNode(v,{class:"image",src:s.value,preview:n.preview,fit:"contain",width:"100%",height:"100%"},null,8,["src","preview"])])):e.createCommentVNode("",!0),e.createElementVNode("div",eb,[e.withDirectives(e.createElementVNode("div",{class:"thumbnail__nav__prev",onClick:m}," ‹ ",512),[[e.vShow,u.value]]),e.createElementVNode("div",{class:"image-list",ref_key:"imageListRef",ref:r,onScroll:h},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.data.imageList,C=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:C.id},[C.src?(e.openBlock(),e.createElementBlock("img",{key:0,class:"image",src:C.src,onClick:S=>l(C.src)},null,8,tb)):e.createCommentVNode("",!0)],64))),128))],544),e.withDirectives(e.createElementVNode("div",{class:"thumbnail__nav__next",onClick:d}," › ",512),[[e.vShow,c.value]])])])):e.createCommentVNode("",!0)],64)}}}),ob=ne(nb,[["__scopeId","data-v-b44a0369"]]),ab=e.defineComponent({__name:"index",props:{modelValue:{type:String,default:""},name:{type:String,default:""},buttonText:{type:String,default:"点击上传"},buttonClass:{type:String,default:"fit-content"}},emits:["update:modelValue"],setup(n,{emit:t}){const o=n,a=t,i=e.inject("handleUpload",()=>{}),s=e.inject("fileUrl",null),l=e.inject("chooseName",null),r=()=>{if(!i){console.warn("Upload: handleUpload function not provided by ancestor");return}i(!0,o.name)};return e.watch(()=>o.name,()=>{s.value=null},{deep:!0,immediate:!0}),e.watch(()=>[s==null?void 0:s.value],([u])=>{!u||!l.value||l.value!==o.name||a("update:modelValue",u)},{immediate:!1}),(u,c)=>{const f=e.resolveComponent("icon-upload"),m=e.resolveComponent("a-button");return e.openBlock(),e.createBlock(m,{type:"primary",onClick:r,class:e.normalizeClass(n.buttonClass)},{icon:e.withCtx(()=>[e.createVNode(f)]),default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(n.buttonText),1)]),_:1},8,["class"])}}}),ze=ne(ab,[["__scopeId","data-v-9c42bf8b"]]),ib={class:"setting-content"},sb={class:"setting-header flex items-center"},lb={class:"setting-header flex items-center"},rb={class:"setting-header flex items-center"},db={class:"setting-body"},ub={class:"setting-item"},cb={class:"item-name"},mb={class:"btn-group"},pb={class:"drag-handle"},hb={class:"btn-group"},fb={key:0,class:"drag-handle"},gb={class:"item-action flex items-center"},vb=["onClick"],yb={class:"btn-group"},_b={key:0,class:"drag-handle"},bb={class:"item-action flex items-center"},wb=["onClick"],xb={class:"btn-group"},Vb={key:0,class:"drag-handle"},Cb={class:"item-action flex items-center"},kb=["onClick"],Eb={class:"btn-group"},Tb={key:0,class:"drag-handle"},Nb={class:"item-action flex items-center"},Sb=["onClick"],Bb=["src"],Db={class:"item-uplaod flex items-center"},Pb={class:"item-img-list"},$b={class:"btn-group"},Ab={key:0,class:"drag-handle"},Lb={key:0,class:"item-img-box"},Ib=["src"],Ob={class:"item-right flex-1"},Mb=["onClick"],Ub=["src"],Rb={class:"item-uplaod flex items-center"},Fb=["src"],Hb={class:"item-uplaod flex items-center"},jb=e.defineComponent({__name:"setting",props:{show:{type:Boolean,default:!1},data:{type:Object,default:()=>{}}},emits:["update:show"],setup(n,{emit:t}){const o=e.defineAsyncComponent(()=>import("vuedraggable")),a=e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./index-QFpkZqlg.js"))),i=e.ref(!1),s=e.computed(()=>({animation:200,group:"item",disabled:!1,ghostClass:"ghost",handle:".drag-handle",filter:".rich-text-editor, .arco-input, .arco-select, .arco-checkbox",preventOnFilter:!1})),l=e.computed(()=>({animation:200,group:"buttons",disabled:!1,ghostClass:"ghost",handle:".drag-handle",filter:".arco-input, .arco-select, .arco-checkbox",preventOnFilter:!1})),r=e.computed(()=>({animation:200,group:"links",disabled:!1,ghostClass:"ghost",handle:".drag-handle",filter:".arco-input, .arco-select, .arco-checkbox",preventOnFilter:!1})),u=e.computed(()=>({animation:200,group:"categories",disabled:!1,ghostClass:"ghost",handle:".drag-handle",filter:".arco-input, .arco-select, .arco-checkbox",preventOnFilter:!1})),c=e.computed(()=>({animation:200,group:"images",disabled:!1,ghostClass:"ghost",handle:".drag-handle",filter:".arco-input, .arco-select, .arco-checkbox",preventOnFilter:!1})),f=D=>D&&D.length>1,m=n,d=t,h=()=>{d("update:show",!1)},g=D=>{const $=m.data;D==="Article"?$.data.push({id:R(),type:"Article",title:"",content:"",buttonList:[],linkList:[]}):D==="Contact"?$.data.push({id:R(),type:"Contact",title:"",content:"",categories:[],linkList:[]}):D==="Image"?$.data.push({id:R(),type:"Image",imgSrc:"",caption:"",alt:"",isRound:!1}):D==="ImageList"?$.data.push({id:R(),type:"ImageList",imageList:[]}):D==="Video"&&$.data.push({id:R(),type:"Video",videoSrc:"",imgSrc:""})},p=D=>{m.data.data=m.data.data.filter($=>$.id!==D)},b=D=>{D.push({id:R(),text:"查看更多",url:void 0,isExternal:!1})},_=(D,$)=>{D.splice(D.findIndex(k=>k.id===$),1)},w=D=>{D.push({id:R(),text:"查看更多",url:void 0,isExternal:!1})},v=(D,$)=>{D.splice(D.findIndex(k=>k.id===$),1)},V=D=>{D.push({id:R(),text:"分类"})},C=(D,$)=>{D.splice(D.findIndex(k=>k.id===$),1)},S=D=>{D.push({id:R(),src:""})},N=(D,$)=>{D.splice(D.findIndex(k=>k.id===$),1)};return(D,$)=>{const k=e.resolveComponent("a-switch"),A=e.resolveComponent("a-option"),B=e.resolveComponent("a-select"),I=e.resolveComponent("icon-plus"),z=e.resolveComponent("a-button"),Y=e.resolveComponent("a-button-group"),H=e.resolveComponent("icon-drag-arrow"),q=e.resolveComponent("icon-delete"),O=e.resolveComponent("a-input"),J=e.resolveComponent("a-checkbox"),F=e.resolveComponent("a-link"),M=e.resolveComponent("a-drawer");return e.openBlock(),e.createBlock(M,{width:500,visible:n.show,footer:!1,onCancel:h,unmountOnClose:""},{title:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(n.data.type)+"组件编辑 ",1)]),default:e.withCtx(()=>[e.createElementVNode("div",ib,[e.createElementVNode("div",sb,[$[21]||($[21]=e.createElementVNode("span",{class:"header-title"},"仅显示PC端",-1)),e.createVNode(k,{modelValue:n.data.onlyShowPc,"onUpdate:modelValue":$[0]||($[0]=Q=>n.data.onlyShowPc=Q)},null,8,["modelValue"])]),e.createElementVNode("div",lb,[$[26]||($[26]=e.createElementVNode("span",{class:"header-title"},"组件宽度",-1)),e.createVNode(B,{modelValue:n.data.width,"onUpdate:modelValue":$[1]||($[1]=Q=>n.data.width=Q),placeholder:"请选择","allow-clear":""},{default:e.withCtx(()=>[e.createVNode(A,{value:"default"},{default:e.withCtx(()=>[...$[22]||($[22]=[e.createTextVNode("默认",-1)])]),_:1}),e.createVNode(A,{value:"small"},{default:e.withCtx(()=>[...$[23]||($[23]=[e.createTextVNode("小",-1)])]),_:1}),e.createVNode(A,{value:"middle"},{default:e.withCtx(()=>[...$[24]||($[24]=[e.createTextVNode("中",-1)])]),_:1}),e.createVNode(A,{value:"max"},{default:e.withCtx(()=>[...$[25]||($[25]=[e.createTextVNode("大",-1)])]),_:1})]),_:1},8,["modelValue"])]),e.createElementVNode("div",rb,[$[29]||($[29]=e.createElementVNode("span",{class:"header-title"},"组件背景",-1)),e.createVNode(B,{modelValue:n.data.bgColor,"onUpdate:modelValue":$[2]||($[2]=Q=>n.data.bgColor=Q),placeholder:"请选择","allow-clear":""},{default:e.withCtx(()=>[e.createVNode(A,{value:"#ffffff"},{default:e.withCtx(()=>[...$[27]||($[27]=[e.createTextVNode("白色",-1)])]),_:1}),e.createVNode(A,{value:"#F7F7FA"},{default:e.withCtx(()=>[...$[28]||($[28]=[e.createTextVNode("灰色",-1)])]),_:1})]),_:1},8,["modelValue"])]),e.createVNode(Y,{type:"primary"},{default:e.withCtx(()=>[e.createVNode(z,{size:"mini",onClick:$[3]||($[3]=Q=>g("Article"))},{icon:e.withCtx(()=>[e.createVNode(I)]),default:e.withCtx(()=>[$[30]||($[30]=e.createTextVNode(" Article ",-1))]),_:1}),e.createVNode(z,{size:"mini",onClick:$[4]||($[4]=Q=>g("Contact"))},{icon:e.withCtx(()=>[e.createVNode(I)]),default:e.withCtx(()=>[$[31]||($[31]=e.createTextVNode(" Contact ",-1))]),_:1}),e.createVNode(z,{size:"mini",onClick:$[5]||($[5]=Q=>g("Image"))},{icon:e.withCtx(()=>[e.createVNode(I)]),default:e.withCtx(()=>[$[32]||($[32]=e.createTextVNode(" Image ",-1))]),_:1}),e.createVNode(z,{size:"mini",onClick:$[6]||($[6]=Q=>g("ImageList"))},{icon:e.withCtx(()=>[e.createVNode(I)]),default:e.withCtx(()=>[$[33]||($[33]=e.createTextVNode(" ImageList ",-1))]),_:1}),e.createVNode(z,{size:"mini",onClick:$[7]||($[7]=Q=>g("Video"))},{icon:e.withCtx(()=>[e.createVNode(I)]),default:e.withCtx(()=>[$[34]||($[34]=e.createTextVNode(" Video ",-1))]),_:1})]),_:1}),e.createElementVNode("div",db,[e.createVNode(e.unref(o),e.mergeProps({modelValue:n.data.data,"onUpdate:modelValue":$[18]||($[18]=Q=>n.data.data=Q),"component-data":{tag:"div",type:"transition-group",name:i.value?null:"flip-list"}},s.value,{onStart:$[19]||($[19]=Q=>i.value=!0),onEnd:$[20]||($[20]=Q=>i.value=!1),"item-key":"id"}),{item:e.withCtx(({element:Q})=>[e.createElementVNode("div",ub,[e.createElementVNode("p",cb,e.toDisplayString(Q.type),1),e.createElementVNode("div",mb,[e.createElementVNode("div",pb,[e.createVNode(H,{class:"drag-icon"})]),e.createVNode(q,{class:"btn-delete",onClick:W=>p(Q.id)},null,8,["onClick"])]),Q.type==="Article"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[$[39]||($[39]=e.createElementVNode("p",{class:"item-title"},"标题",-1)),e.createVNode(O,{modelValue:Q.title,"onUpdate:modelValue":W=>Q.title=W,placeholder:"请输入标题","allow-clear":""},null,8,["modelValue","onUpdate:modelValue"]),$[40]||($[40]=e.createElementVNode("p",{class:"item-title"},"内容",-1)),e.createVNode(e.unref(a),{modelValue:Q.content,"onUpdate:modelValue":W=>Q.content=W,name:`ArticleList_editor_${Q.id}`},null,8,["modelValue","onUpdate:modelValue","name"]),$[41]||($[41]=e.createElementVNode("p",{class:"item-title"},"按钮",-1)),e.createVNode(e.unref(o),e.mergeProps({modelValue:Q.buttonList,"onUpdate:modelValue":W=>Q.buttonList=W,"component-data":{tag:"div",type:"transition-group",name:i.value?null:"flip-list"}},l.value,{disabled:!f(Q.buttonList),onStart:$[8]||($[8]=W=>i.value=!0),onEnd:$[9]||($[9]=W=>i.value=!1),"item-key":"id"}),{item:e.withCtx(({element:W})=>[(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["item-button draggable-item",{"sortable-disabled":!f(Q.buttonList)}]),key:W.id},[e.createElementVNode("div",hb,[f(Q.buttonList)?(e.openBlock(),e.createElementBlock("div",fb,[e.createVNode(H,{class:"drag-icon"})])):e.createCommentVNode("",!0),e.createVNode(q,{class:"btn-delete",onClick:Z=>_(Q.buttonList,W.id)},null,8,["onClick"])]),e.createVNode(z,{type:"primary"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(W.text),1)]),_:2},1024),e.createElementVNode("div",gb,[e.createVNode(O,{class:"action-text",modelValue:W.text,"onUpdate:modelValue":Z=>W.text=Z,placeholder:"按钮文本","allow-clear":""},null,8,["modelValue","onUpdate:modelValue"]),e.createVNode(O,{modelValue:W.url,"onUpdate:modelValue":Z=>W.url=Z,placeholder:"按钮链接","allow-clear":""},null,8,["modelValue","onUpdate:modelValue"])]),e.createVNode(J,{modelValue:W.isExternal,"onUpdate:modelValue":Z=>W.isExternal=Z},{default:e.withCtx(()=>[...$[35]||($[35]=[e.createTextVNode("是否外部链接",-1)])]),_:1},8,["modelValue","onUpdate:modelValue"])],2))]),_:2},1040,["modelValue","onUpdate:modelValue","component-data","disabled"]),e.createElementVNode("div",{class:"item-add-btn flex items-center",onClick:W=>b(Q.buttonList)},[e.createVNode(I),$[36]||($[36]=e.createElementVNode("span",{class:"btn-text"},"添加按钮",-1))],8,vb),$[42]||($[42]=e.createElementVNode("p",{class:"item-title"},"链接",-1)),e.createVNode(e.unref(o),e.mergeProps({modelValue:Q.linkList,"onUpdate:modelValue":W=>Q.linkList=W,"component-data":{tag:"div",type:"transition-group",name:i.value?null:"flip-list"}},r.value,{disabled:!f(Q.linkList),onStart:$[10]||($[10]=W=>i.value=!0),onEnd:$[11]||($[11]=W=>i.value=!1),"item-key":"id"}),{item:e.withCtx(({element:W})=>[(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["item-button draggable-item",{"sortable-disabled":!f(Q.linkList)}]),key:W.id},[e.createElementVNode("div",yb,[f(Q.linkList)?(e.openBlock(),e.createElementBlock("div",_b,[e.createVNode(H,{class:"drag-icon"})])):e.createCommentVNode("",!0),e.createVNode(q,{class:"btn-delete",onClick:Z=>v(Q.linkList,W.id)},null,8,["onClick"])]),e.createVNode(F,{href:"link"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(W.text),1)]),_:2},1024),e.createElementVNode("div",bb,[e.createVNode(O,{class:"action-text",modelValue:W.text,"onUpdate:modelValue":Z=>W.text=Z,placeholder:"按钮文本","allow-clear":""},null,8,["modelValue","onUpdate:modelValue"]),e.createVNode(O,{modelValue:W.url,"onUpdate:modelValue":Z=>W.url=Z,placeholder:"按钮链接","allow-clear":""},null,8,["modelValue","onUpdate:modelValue"])]),e.createVNode(J,{modelValue:W.isExternal,"onUpdate:modelValue":Z=>W.isExternal=Z},{default:e.withCtx(()=>[...$[37]||($[37]=[e.createTextVNode("是否外部链接",-1)])]),_:1},8,["modelValue","onUpdate:modelValue"])],2))]),_:2},1040,["modelValue","onUpdate:modelValue","component-data","disabled"]),e.createElementVNode("div",{class:"item-add-btn flex items-center",onClick:W=>w(Q.linkList)},[e.createVNode(I),$[38]||($[38]=e.createElementVNode("span",{class:"btn-text"},"添加链接",-1))],8,wb)],64)):e.createCommentVNode("",!0),Q.type==="Contact"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[$[46]||($[46]=e.createElementVNode("p",{class:"item-title"},"标题",-1)),e.createVNode(O,{modelValue:Q.title,"onUpdate:modelValue":W=>Q.title=W,placeholder:"请输入标题","allow-clear":""},null,8,["modelValue","onUpdate:modelValue"]),$[47]||($[47]=e.createElementVNode("p",{class:"item-title"},"内容",-1)),e.createVNode(e.unref(a),{modelValue:Q.content,"onUpdate:modelValue":W=>Q.content=W,name:`ArticleList_editor_${Q.id}`},null,8,["modelValue","onUpdate:modelValue","name"]),$[48]||($[48]=e.createElementVNode("p",{class:"item-title"},"分类",-1)),e.createVNode(e.unref(o),e.mergeProps({modelValue:Q.categories,"onUpdate:modelValue":W=>Q.categories=W,"component-data":{tag:"div",type:"transition-group",name:i.value?null:"flip-list"}},u.value,{disabled:!f(Q.categories),onStart:$[12]||($[12]=W=>i.value=!0),onEnd:$[13]||($[13]=W=>i.value=!1),"item-key":"id"}),{item:e.withCtx(({element:W})=>[(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["item-button draggable-item",{"sortable-disabled":!f(Q.categories)}]),key:W.id},[e.createElementVNode("div",xb,[f(Q.categories)?(e.openBlock(),e.createElementBlock("div",Vb,[e.createVNode(H,{class:"drag-icon"})])):e.createCommentVNode("",!0),e.createVNode(q,{class:"btn-delete",onClick:Z=>C(Q.categories,W.id)},null,8,["onClick"])]),e.createVNode(q,{class:"btn-delete",onClick:Z=>C(Q.categories,W.id)},null,8,["onClick"]),e.createVNode(F,{href:"link"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(W.text),1)]),_:2},1024),e.createElementVNode("div",Cb,[e.createVNode(O,{modelValue:W.text,"onUpdate:modelValue":Z=>W.text=Z,placeholder:"分类名称","allow-clear":""},null,8,["modelValue","onUpdate:modelValue"])])],2))]),_:2},1040,["modelValue","onUpdate:modelValue","component-data","disabled"]),e.createElementVNode("div",{class:"item-add-btn flex items-center",onClick:W=>V(Q.categories)},[e.createVNode(I),$[43]||($[43]=e.createElementVNode("span",{class:"btn-text"},"添加分类",-1))],8,kb),$[49]||($[49]=e.createElementVNode("p",{class:"item-title"},"链接",-1)),e.createVNode(e.unref(o),e.mergeProps({modelValue:Q.linkList,"onUpdate:modelValue":W=>Q.linkList=W,"component-data":{tag:"div",type:"transition-group",name:i.value?null:"flip-list"}},r.value,{disabled:!f(Q.linkList),onStart:$[14]||($[14]=W=>i.value=!0),onEnd:$[15]||($[15]=W=>i.value=!1),"item-key":"id"}),{item:e.withCtx(({element:W})=>[(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["item-button draggable-item",{"sortable-disabled":!f(Q.linkList)}]),key:W.id},[e.createElementVNode("div",Eb,[f(Q.linkList)?(e.openBlock(),e.createElementBlock("div",Tb,[e.createVNode(H,{class:"drag-icon"})])):e.createCommentVNode("",!0),e.createVNode(q,{class:"btn-delete",onClick:Z=>v(Q.linkList,W.id)},null,8,["onClick"])]),e.createVNode(F,{href:"link"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(W.text),1)]),_:2},1024),e.createElementVNode("div",Nb,[e.createVNode(O,{class:"action-text",modelValue:W.text,"onUpdate:modelValue":Z=>W.text=Z,placeholder:"按钮文本","allow-clear":""},null,8,["modelValue","onUpdate:modelValue"]),e.createVNode(O,{modelValue:W.url,"onUpdate:modelValue":Z=>W.url=Z,placeholder:"按钮链接","allow-clear":""},null,8,["modelValue","onUpdate:modelValue"])]),e.createVNode(J,{modelValue:W.isExternal,"onUpdate:modelValue":Z=>W.isExternal=Z},{default:e.withCtx(()=>[...$[44]||($[44]=[e.createTextVNode("是否外部链接",-1)])]),_:1},8,["modelValue","onUpdate:modelValue"])],2))]),_:2},1040,["modelValue","onUpdate:modelValue","component-data","disabled"]),e.createElementVNode("div",{class:"item-add-btn flex items-center",onClick:W=>w(Q.linkList)},[e.createVNode(I),$[45]||($[45]=e.createElementVNode("span",{class:"btn-text"},"添加链接",-1))],8,Sb)],64)):e.createCommentVNode("",!0),Q.type==="Image"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:2},[e.createElementVNode("img",{class:"item-img",src:Q.imgSrc},null,8,Bb),e.createElementVNode("div",Db,[e.createVNode(O,{modelValue:Q.imgSrc,"onUpdate:modelValue":W=>Q.imgSrc=W,placeholder:"请输入标题","allow-clear":""},null,8,["modelValue","onUpdate:modelValue"]),e.createVNode(ze,{modelValue:Q.imgSrc,"onUpdate:modelValue":W=>Q.imgSrc=W,name:`ArticleList_${Q.id}`,"button-class":"fit-content"},null,8,["modelValue","onUpdate:modelValue","name"])]),e.createVNode(O,{class:"mt-2",modelValue:Q.caption,"onUpdate:modelValue":W=>Q.caption=W,placeholder:"图片描述","allow-clear":""},null,8,["modelValue","onUpdate:modelValue"]),e.createVNode(O,{class:"mt-2",modelValue:Q.alt,"onUpdate:modelValue":W=>Q.alt=W,placeholder:"图片alt","allow-clear":""},null,8,["modelValue","onUpdate:modelValue"]),e.createVNode(J,{class:"pt-2",modelValue:Q.isRound,"onUpdate:modelValue":W=>Q.isRound=W},{default:e.withCtx(()=>[...$[50]||($[50]=[e.createTextVNode("圆角",-1)])]),_:1},8,["modelValue","onUpdate:modelValue"])],64)):e.createCommentVNode("",!0),Q.type==="ImageList"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:3},[$[52]||($[52]=e.createElementVNode("p",{class:"item-title"},"图片组",-1)),e.createElementVNode("div",Pb,[e.createVNode(e.unref(o),e.mergeProps({modelValue:Q.imageList,"onUpdate:modelValue":W=>Q.imageList=W,"component-data":{tag:"div",type:"transition-group",name:i.value?null:"flip-list"}},c.value,{disabled:!f(Q.imageList),onStart:$[16]||($[16]=W=>i.value=!0),onEnd:$[17]||($[17]=W=>i.value=!1),"item-key":"id"}),{item:e.withCtx(({element:W})=>[(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["img-list-item flex draggable-item",{"sortable-disabled":!f(Q.imageList)}]),key:W.id},[e.createElementVNode("div",$b,[f(Q.imageList)?(e.openBlock(),e.createElementBlock("div",Ab,[e.createVNode(H,{class:"drag-icon"})])):e.createCommentVNode("",!0),e.createVNode(q,{class:"btn-delete",onClick:Z=>N(Q.imageList,W.id)},null,8,["onClick"])]),W.src?(e.openBlock(),e.createElementBlock("div",Lb,[e.createElementVNode("img",{class:"item-img small-img",src:W.src},null,8,Ib)])):e.createCommentVNode("",!0),e.createElementVNode("div",Ob,[e.createVNode(O,{style:{"margin-bottom":"12px"},modelValue:W.src,"onUpdate:modelValue":Z=>W.src=Z,placeholder:"请输入图片路径","allow-clear":""},null,8,["modelValue","onUpdate:modelValue"]),e.createVNode(ze,{modelValue:W.src,"onUpdate:modelValue":Z=>W.src=Z,name:`ArticleList_${W.id}`,"button-class":"fit-content"},null,8,["modelValue","onUpdate:modelValue","name"])])],2))]),_:2},1040,["modelValue","onUpdate:modelValue","component-data","disabled"])]),e.createElementVNode("div",{class:"item-add-btn flex items-center",onClick:W=>S(Q.imageList)},[e.createVNode(I),$[51]||($[51]=e.createElementVNode("span",{class:"btn-text"},"添加图片",-1))],8,Mb)],64)):e.createCommentVNode("",!0),Q.type==="Video"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:4},[$[53]||($[53]=e.createElementVNode("p",{class:"item-title"},"视频",-1)),e.createElementVNode("video",{class:"item-img",src:Q.videoSrc,controls:""},null,8,Ub),e.createElementVNode("div",Rb,[e.createVNode(O,{modelValue:Q.videoSrc,"onUpdate:modelValue":W=>Q.videoSrc=W,placeholder:"请输入视频链接","allow-clear":""},null,8,["modelValue","onUpdate:modelValue"]),e.createVNode(ze,{modelValue:Q.videoSrc,"onUpdate:modelValue":W=>Q.videoSrc=W,name:`ArticleList_${Q.id}`,"button-class":"fit-content"},null,8,["modelValue","onUpdate:modelValue","name"])]),e.createElementVNode("img",{class:"item-img",src:Q.imgSrc},null,8,Fb),e.createElementVNode("div",Hb,[e.createVNode(O,{modelValue:Q.imgSrc,"onUpdate:modelValue":W=>Q.imgSrc=W,placeholder:"视频封面","allow-clear":""},null,8,["modelValue","onUpdate:modelValue"]),e.createVNode(ze,{modelValue:Q.imgSrc,"onUpdate:modelValue":W=>Q.imgSrc=W,name:`ArticleList_${Q.id}`,"button-class":"fit-content"},null,8,["modelValue","onUpdate:modelValue","name"])])],64)):e.createCommentVNode("",!0)])]),_:1},16,["modelValue","component-data"])])])]),_:1},8,["visible"])}}}),zb=ne(jb,[["__scopeId","data-v-63109128"]]),qb={class:"operate-page operate-component"},Wb={class:"operate-btn d-flex justify-end"},Gb=e.defineComponent({__name:"index",props:{show:{type:Boolean,default:!1}},emits:["handleCopy","handleDelete","handleEdit","handlePaste"],setup(n,{emit:t}){const o=t,a=()=>{o("handleCopy")},i=()=>{o("handleDelete")},s=()=>{o("handleEdit")},l=r=>{o("handlePaste",r)};return(r,u)=>{const c=e.resolveComponent("icon-copy"),f=e.resolveComponent("a-tooltip"),m=e.resolveComponent("icon-delete"),d=e.resolveComponent("icon-edit"),h=e.resolveComponent("icon-arrow-up"),g=e.resolveComponent("icon-arrow-down");return e.withDirectives((e.openBlock(),e.createElementBlock("div",qb,[e.createElementVNode("div",Wb,[e.createElementVNode("div",{class:"btn-item btn-copy d-flex align-center fs-10",onClick:e.withModifiers(a,["stop"])},[e.createVNode(f,{content:"复制",position:"bottom"},{default:e.withCtx(()=>[e.createVNode(c)]),_:1})]),e.createElementVNode("div",{class:"btn-item btn-delete d-flex align-center fs-10",onClick:e.withModifiers(i,["stop"])},[e.createVNode(f,{content:"删除",position:"bottom"},{default:e.withCtx(()=>[e.createVNode(m)]),_:1})]),e.createElementVNode("div",{class:"btn-item btn-edit d-flex align-center fs-10",onClick:e.withModifiers(s,["stop"])},[e.createVNode(f,{content:"编辑",position:"bottom"},{default:e.withCtx(()=>[e.createVNode(d)]),_:1})]),e.createElementVNode("div",{class:"btn-item btn-paste d-flex align-center fs-10",onClick:u[0]||(u[0]=e.withModifiers(p=>l("top"),["stop"]))},[e.createVNode(f,{content:"向上粘贴",position:"bottom"},{default:e.withCtx(()=>[e.createVNode(h)]),_:1})]),e.createElementVNode("div",{class:"btn-item btn-paste d-flex align-center fs-10",onClick:u[1]||(u[1]=e.withModifiers(p=>l("bottom"),["stop"]))},[e.createVNode(f,{content:"向下粘贴",position:"bottom"},{default:e.withCtx(()=>[e.createVNode(g)]),_:1})])])],512)),[[e.vShow,n.show]])}}}),Te=ne(Gb,[["__scopeId","data-v-5773d529"]]),Xb={class:"article-list-left"},Yb={class:"article-list-right"},Kb=e.defineComponent({name:"ArticleList",__name:"index",props:{modelValue:{type:Object,default:()=>{}},isPreview:{type:Boolean,default:!0}},emits:["update:modelValue","handleDelete","handleCopy","handlePaste"],setup(n,{emit:t}){const o=n,a=t,i=e.computed(()=>o.modelValue&&o.modelValue.data&&o.modelValue.data.length?o.modelValue.data.some(d=>d.type==="Image"||d.type==="Video"||d.type==="ImageList"):!1),s=()=>{var h;if(o.modelValue&&o.modelValue.data)return;const d={id:((h=o.modelValue)==null?void 0:h.id)||R(),type:"ArticleList",onlyShowPc:!1,width:"",bgColor:"",data:[{id:R(),type:"Article",title:"这里是标题",content:"这里是内容",buttonList:[],linkList:[{id:R(),text:"链接名称",url:"",isExternal:!1}]},{id:R(),type:"Image",imgSrc:"https://osswebsite.ycyw.com/media-library/ywies-bj/images/home/ywies-tx.jpg",caption:"",alt:"",isRound:!1}]};a("update:modelValue",d)},l=e.computed(()=>{var d;return o.isPreview?!((d=o.modelValue)!=null&&d.onlyShowPc)||!Ne():!0}),r=e.ref(!1),u=e.ref(!1),c=()=>{a("handleDelete",o.modelValue.id)},f=()=>{a("handleCopy",o.modelValue)},m=d=>{a("handlePaste",d)};return s(),(d,h)=>{var b,_,w;const g=e.resolveComponent("a-col"),p=e.resolveComponent("a-row");return e.openBlock(),e.createElementBlock(e.Fragment,null,[l.value?(e.openBlock(),e.createElementBlock("div",{key:0,class:"article-list-container",style:e.normalizeStyle({backgroundColor:(b=n.modelValue)==null?void 0:b.bgColor}),onMouseenter:h[2]||(h[2]=v=>r.value=!0),onMouseleave:h[3]||(h[3]=v=>r.value=!1)},[e.createVNode(p,{class:e.normalizeClass(["article-list",[(_=n.modelValue)!=null&&_.width?`container-content-${(w=n.modelValue)==null?void 0:w.width}`:"container-content"]])},{default:e.withCtx(()=>[e.createVNode(g,{sm:{span:24},md:{span:i.value?12:24}},{default:e.withCtx(()=>{var v;return[e.createElementVNode("div",Xb,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList((v=n.modelValue)==null?void 0:v.data,V=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:V.id},[V.type==="Article"?(e.openBlock(),e.createBlock(U_,{key:0,article:V,isPreview:n.isPreview},null,8,["article","isPreview"])):e.createCommentVNode("",!0),V.type==="Contact"?(e.openBlock(),e.createBlock(W_,{key:1,contact:V,isPreview:n.isPreview},null,8,["contact","isPreview"])):e.createCommentVNode("",!0)],64))),128))])]}),_:1},8,["md"]),i.value?(e.openBlock(),e.createBlock(g,{key:0,sm:{span:24},md:{span:12}},{default:e.withCtx(()=>{var v;return[e.createElementVNode("div",Yb,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList((v=n.modelValue)==null?void 0:v.data,V=>(e.openBlock(),e.createBlock(ob,{key:V.id,type:V.type,data:V,preview:n.modelValue.isPreview},null,8,["type","data","preview"]))),128))])]}),_:1})):e.createCommentVNode("",!0),n.isPreview?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(Te,{key:1,show:r.value,"onUpdate:show":h[0]||(h[0]=v=>r.value=v),onHandleEdit:h[1]||(h[1]=v=>u.value=!0),onHandleDelete:c,onHandleCopy:f,onHandlePaste:m},null,8,["show"]))]),_:1},8,["class"])],36)):e.createCommentVNode("",!0),n.isPreview?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(zb,{key:1,show:u.value,"onUpdate:show":h[4]||(h[4]=v=>u.value=v),data:n.modelValue},null,8,["show","data"]))],64)}}}),xl=ne(Kb,[["__scopeId","data-v-680c5288"]]),Qb=Object.freeze(Object.defineProperty({__proto__:null,default:xl},Symbol.toStringTag,{value:"Module"})),Jb={class:"setting-header flex items-center"},Zb={class:"setting-content"},ew=["src"],tw={class:"item-uplaod flex items-center"},nw=e.defineComponent({__name:"setting",props:{show:{type:Boolean,default:!1},data:{type:Object,default:()=>{}}},emits:["update:show"],setup(n,{emit:t}){const o=t,a=()=>{o("update:show",!1)};return(i,s)=>{const l=e.resolveComponent("a-switch"),r=e.resolveComponent("a-input"),u=e.resolveComponent("a-drawer");return e.openBlock(),e.createBlock(u,{width:500,visible:n.show,footer:!1,onCancel:a,unmountOnClose:""},{title:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(n.data.type)+"组件编辑 ",1)]),default:e.withCtx(()=>{var c,f;return[e.createElementVNode("div",Jb,[s[4]||(s[4]=e.createElementVNode("span",{class:"header-title"},"仅显示PC端",-1)),e.createVNode(l,{modelValue:n.data.onlyShowPc,"onUpdate:modelValue":s[0]||(s[0]=m=>n.data.onlyShowPc=m)},null,8,["modelValue"])]),e.createElementVNode("div",Zb,[s[5]||(s[5]=e.createElementVNode("p",{class:"item-title"},"标题",-1)),e.createVNode(r,{modelValue:n.data.data.title,"onUpdate:modelValue":s[1]||(s[1]=m=>n.data.data.title=m),placeholder:"请输入标题","allow-clear":""},null,8,["modelValue"]),s[6]||(s[6]=e.createElementVNode("p",{class:"item-title"},"图片",-1)),e.createElementVNode("img",{class:"item-img",src:(f=(c=n.data)==null?void 0:c.data)==null?void 0:f.imgSrc},null,8,ew),e.createElementVNode("div",tw,[e.createVNode(r,{modelValue:n.data.data.imgSrc,"onUpdate:modelValue":s[2]||(s[2]=m=>n.data.data.imgSrc=m),placeholder:"请输入图片链接","allow-clear":""},null,8,["modelValue"]),e.createVNode(ze,{modelValue:n.data.data.imgSrc,"onUpdate:modelValue":s[3]||(s[3]=m=>n.data.data.imgSrc=m),name:"bannerImage"},null,8,["modelValue"])])])]}),_:1},8,["visible"])}}}),ow=ne(nw,[["__scopeId","data-v-51efabf7"]]),aw={class:"banner-image__title is-zh"},iw=e.defineComponent({name:"BannerImage",__name:"index",props:{modelValue:{type:Object,default:()=>{}},isPreview:{type:Boolean,default:!0}},emits:["update:modelValue","handleDelete","handleCopy","handlePaste"],setup(n,{emit:t}){const o=n,a=t,i=()=>{var d;if(o.modelValue&&o.modelValue.data)return;const m={id:((d=o.modelValue)==null?void 0:d.id)||R(),type:"BannerImage",onlyShowPc:!1,data:{title:"这里是标题",imgSrc:"https://osswebsite-test.cedim.cn/ywies-tx/static-images/about-ywies/01_About_YWIES_1_Header.jpg"}};a("update:modelValue",m)},s=e.computed(()=>{var m;return o.isPreview?!((m=o.modelValue)!=null&&m.onlyShowPc)||!Ne():!0}),l=e.ref(!1),r=e.ref(!1),u=()=>{a("handleDelete",o.modelValue.id)},c=()=>{a("handleCopy",o.modelValue)},f=m=>{a("handlePaste",m)};return i(),(m,d)=>{var h,g,p,b;return e.openBlock(),e.createElementBlock(e.Fragment,null,[s.value?(e.openBlock(),e.createElementBlock("div",{key:0,class:"banner-image",onMouseenter:d[2]||(d[2]=_=>l.value=!0),onMouseleave:d[3]||(d[3]=_=>l.value=!1)},[e.createElementVNode("div",{class:"banner-image__image",style:e.normalizeStyle({backgroundImage:"url("+((g=(h=n.modelValue)==null?void 0:h.data)==null?void 0:g.imgSrc)+")","background-position":"center"})},[e.createElementVNode("div",aw,e.toDisplayString((b=(p=n.modelValue)==null?void 0:p.data)==null?void 0:b.title),1)],4),n.isPreview?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(Te,{key:0,show:l.value,"onUpdate:show":d[0]||(d[0]=_=>l.value=_),onHandleEdit:d[1]||(d[1]=_=>r.value=!0),onHandleDelete:u,onHandleCopy:c,onHandlePaste:f},null,8,["show"]))],32)):e.createCommentVNode("",!0),n.isPreview?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(ow,{key:1,show:r.value,"onUpdate:show":d[4]||(d[4]=_=>r.value=_),data:n.modelValue},null,8,["show","data"]))],64)}}}),sd=ne(iw,[["__scopeId","data-v-595156d3"]]),sw=Object.freeze(Object.defineProperty({__proto__:null,default:sd},Symbol.toStringTag,{value:"Module"})),lw={class:"setting-header flex items-center"},rw={class:"setting-content"},dw=["src"],uw={class:"item-uplaod flex items-center"},cw=e.defineComponent({__name:"setting",props:{show:{type:Boolean,default:!1},data:{type:Object,default:()=>{}}},emits:["update:show"],setup(n,{emit:t}){const o=t,a=()=>{o("update:show",!1)};return(i,s)=>{const l=e.resolveComponent("a-switch"),r=e.resolveComponent("a-input"),u=e.resolveComponent("a-drawer");return e.openBlock(),e.createBlock(u,{width:500,visible:n.show,footer:!1,onCancel:a,unmountOnClose:""},{title:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(n.data.type)+"组件编辑 ",1)]),default:e.withCtx(()=>{var c,f;return[e.createElementVNode("div",lw,[s[4]||(s[4]=e.createElementVNode("span",{class:"header-title"},"仅显示PC端",-1)),e.createVNode(l,{modelValue:n.data.onlyShowPc,"onUpdate:modelValue":s[0]||(s[0]=m=>n.data.onlyShowPc=m)},null,8,["modelValue"])]),e.createElementVNode("div",rw,[s[5]||(s[5]=e.createElementVNode("p",{class:"item-title"},"标题",-1)),e.createVNode(r,{modelValue:n.data.data.title,"onUpdate:modelValue":s[1]||(s[1]=m=>n.data.data.title=m),placeholder:"请输入标题","allow-clear":""},null,8,["modelValue"]),s[6]||(s[6]=e.createElementVNode("p",{class:"item-title"},"图片",-1)),e.createElementVNode("img",{class:"item-img",src:(f=(c=n.data)==null?void 0:c.data)==null?void 0:f.imgSrc},null,8,dw),e.createElementVNode("div",uw,[e.createVNode(r,{modelValue:n.data.data.imgSrc,"onUpdate:modelValue":s[2]||(s[2]=m=>n.data.data.imgSrc=m),placeholder:"请输入图片链接","allow-clear":""},null,8,["modelValue"]),e.createVNode(ze,{modelValue:n.data.data.imgSrc,"onUpdate:modelValue":s[3]||(s[3]=m=>n.data.data.imgSrc=m),name:"BannerPage","button-class":"fit-content"},null,8,["modelValue"])])])]}),_:1},8,["visible"])}}}),mw=ne(cw,[["__scopeId","data-v-581a3505"]]),pw={class:"red"},hw={class:"banner-page__title"},fw={class:"position-absolute triangle-position"},gw={class:"position-relative h-100 banner-strips"},vw=e.defineComponent({name:"BannerPage",__name:"index",props:{modelValue:{type:Object,default:()=>{}},isPreview:{type:Boolean,default:!0}},emits:["update:modelValue","handleDelete","handleCopy","handlePaste"],setup(n,{emit:t}){const o=n,a=t,i=()=>{var d;if(o.modelValue&&o.modelValue.data)return;const m={id:((d=o.modelValue)==null?void 0:d.id)||R(),type:"BannerPage",onlyShowPc:!1,data:{title:"这里是标题",imgSrc:"https://osswebsite.ycyw.com/media-library/ywies-bj/images/home/ywies-tx.jpg"}};a("update:modelValue",m)},s=e.computed(()=>{var m;return o.isPreview?!((m=o.modelValue)!=null&&m.onlyShowPc)||!Ne():!0}),l=e.ref(!1),r=e.ref(!1),u=()=>{a("handleDelete",o.modelValue.id)},c=()=>{a("handleCopy",o.modelValue)},f=m=>{a("handlePaste",m)};return i(),(m,d)=>{var h,g,p,b;return e.openBlock(),e.createElementBlock(e.Fragment,null,[s.value?(e.openBlock(),e.createElementBlock("div",{key:0,class:"banner-page",onMouseenter:d[2]||(d[2]=_=>l.value=!0),onMouseleave:d[3]||(d[3]=_=>l.value=!1)},[e.createElementVNode("div",pw,[e.createElementVNode("p",hw,e.toDisplayString((g=(h=n.modelValue)==null?void 0:h.data)==null?void 0:g.title),1)]),d[6]||(d[6]=e.createElementVNode("div",{class:"orange"},null,-1)),e.createElementVNode("div",fw,[e.createElementVNode("div",gw,[d[5]||(d[5]=e.createElementVNode("img",{src:"https://ywies-tx.cedim.cn/images/material/banner-strips.png",alt:""},null,-1)),e.createElementVNode("div",{class:"triangle",style:e.normalizeStyle({backgroundImage:"url("+((b=(p=n.modelValue)==null?void 0:p.data)==null?void 0:b.imgSrc)+")"}),"data-v-24231ec2":""},null,4)])]),n.isPreview?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(Te,{key:0,show:l.value,"onUpdate:show":d[0]||(d[0]=_=>l.value=_),onHandleEdit:d[1]||(d[1]=_=>r.value=!0),onHandleDelete:u,onHandleCopy:c,onHandlePaste:f},null,8,["show"]))],32)):e.createCommentVNode("",!0),n.isPreview?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(mw,{key:1,show:r.value,"onUpdate:show":d[4]||(d[4]=_=>r.value=_),data:n.modelValue},null,8,["show","data"]))],64)}}}),ld=ne(vw,[["__scopeId","data-v-19493f57"]]),yw=Object.freeze(Object.defineProperty({__proto__:null,default:ld},Symbol.toStringTag,{value:"Module"})),_w={class:"setting-content"},bw={class:"setting-header flex items-center"},ww={class:"setting-header flex items-center"},xw={class:"setting-header flex items-center"},Vw={class:"setting-body"},Cw={class:"setting-item"},kw={class:"btn-group"},Ew={key:0,class:"drag-handle"},Tw={class:"item-action flex items-center"},Nw=e.defineComponent({__name:"setting",props:{show:{type:Boolean,default:!1},data:{type:Object,default:()=>{}}},emits:["update:show"],setup(n,{emit:t}){const o=e.defineAsyncComponent(()=>import("vuedraggable")),a=e.ref(!1),i=e.computed(()=>({animation:200,group:"buttons",disabled:!1,ghostClass:"ghost",handle:".drag-handle",filter:".arco-input, .arco-select, .arco-checkbox",preventOnFilter:!1})),s=m=>m&&m.length>1,l=n,r=t,u=()=>{r("update:show",!1)},c=m=>{l.data.data.push({id:R(),type:m,text:"查看更多",url:void 0,isExternal:!1})},f=m=>{l.data.data=l.data.data.filter(d=>d.id!==m)};return(m,d)=>{const h=e.resolveComponent("a-switch"),g=e.resolveComponent("a-option"),p=e.resolveComponent("a-select"),b=e.resolveComponent("icon-plus"),_=e.resolveComponent("a-button"),w=e.resolveComponent("a-button-group"),v=e.resolveComponent("icon-drag-arrow"),V=e.resolveComponent("icon-delete"),C=e.resolveComponent("a-input"),S=e.resolveComponent("a-checkbox"),N=e.resolveComponent("a-drawer");return e.openBlock(),e.createBlock(N,{width:500,visible:n.show,footer:!1,onCancel:u,unmountOnClose:""},{title:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(n.data.type)+"组件编辑 ",1)]),default:e.withCtx(()=>[e.createElementVNode("div",_w,[e.createElementVNode("div",bw,[d[10]||(d[10]=e.createElementVNode("span",{class:"header-title"},"仅显示PC端",-1)),e.createVNode(h,{modelValue:n.data.onlyShowPc,"onUpdate:modelValue":d[0]||(d[0]=D=>n.data.onlyShowPc=D)},null,8,["modelValue"])]),e.createElementVNode("div",ww,[d[15]||(d[15]=e.createElementVNode("span",{class:"header-title"},"组件宽度",-1)),e.createVNode(p,{modelValue:n.data.width,"onUpdate:modelValue":d[1]||(d[1]=D=>n.data.width=D),placeholder:"请选择","allow-clear":""},{default:e.withCtx(()=>[e.createVNode(g,{value:""},{default:e.withCtx(()=>[...d[11]||(d[11]=[e.createTextVNode("默认",-1)])]),_:1}),e.createVNode(g,{value:"small"},{default:e.withCtx(()=>[...d[12]||(d[12]=[e.createTextVNode("小",-1)])]),_:1}),e.createVNode(g,{value:"middle"},{default:e.withCtx(()=>[...d[13]||(d[13]=[e.createTextVNode("中",-1)])]),_:1}),e.createVNode(g,{value:"max"},{default:e.withCtx(()=>[...d[14]||(d[14]=[e.createTextVNode("大",-1)])]),_:1})]),_:1},8,["modelValue"])]),e.createElementVNode("div",xw,[d[18]||(d[18]=e.createElementVNode("span",{class:"header-title"},"组件背景",-1)),e.createVNode(p,{modelValue:n.data.bgColor,"onUpdate:modelValue":d[2]||(d[2]=D=>n.data.bgColor=D),placeholder:"请选择","allow-clear":""},{default:e.withCtx(()=>[e.createVNode(g,{value:"#ffffff"},{default:e.withCtx(()=>[...d[16]||(d[16]=[e.createTextVNode("白色",-1)])]),_:1}),e.createVNode(g,{value:"#F7F7FA"},{default:e.withCtx(()=>[...d[17]||(d[17]=[e.createTextVNode("灰色",-1)])]),_:1})]),_:1},8,["modelValue"])]),e.createVNode(w,{type:"primary"},{default:e.withCtx(()=>[e.createVNode(_,{size:"mini",onClick:d[3]||(d[3]=D=>c(""))},{icon:e.withCtx(()=>[e.createVNode(b)]),default:e.withCtx(()=>[d[19]||(d[19]=e.createTextVNode(" 默认按钮 ",-1))]),_:1}),e.createVNode(_,{size:"mini",onClick:d[4]||(d[4]=D=>c("white"))},{icon:e.withCtx(()=>[e.createVNode(b)]),default:e.withCtx(()=>[d[20]||(d[20]=e.createTextVNode(" 白色按钮 ",-1))]),_:1}),e.createVNode(_,{size:"mini",onClick:d[5]||(d[5]=D=>c("light"))},{icon:e.withCtx(()=>[e.createVNode(b)]),default:e.withCtx(()=>[d[21]||(d[21]=e.createTextVNode(" 亮色按钮 ",-1))]),_:1}),e.createVNode(_,{size:"mini",onClick:d[6]||(d[6]=D=>c("blue"))},{icon:e.withCtx(()=>[e.createVNode(b)]),default:e.withCtx(()=>[d[22]||(d[22]=e.createTextVNode(" 蓝色按钮 ",-1))]),_:1})]),_:1}),e.createElementVNode("div",Vw,[e.createElementVNode("div",Cw,[d[24]||(d[24]=e.createElementVNode("p",{class:"item-name"},"按钮",-1)),e.createVNode(e.unref(o),e.mergeProps({modelValue:n.data.data,"onUpdate:modelValue":d[7]||(d[7]=D=>n.data.data=D),"component-data":{tag:"div",type:"transition-group",name:a.value?null:"flip-list"}},i.value,{disabled:!s(n.data.data),onStart:d[8]||(d[8]=D=>a.value=!0),onEnd:d[9]||(d[9]=D=>a.value=!1),"item-key":"id"}),{item:e.withCtx(({element:D})=>[(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["item-button draggable-item",{"sortable-disabled":!s(n.data.data)}]),key:D.id},[e.createElementVNode("div",kw,[s(n.data.data)?(e.openBlock(),e.createElementBlock("div",Ew,[e.createVNode(v,{class:"drag-icon"})])):e.createCommentVNode("",!0),e.createVNode(V,{class:"btn-delete",onClick:$=>f(D.id)},null,8,["onClick"])]),e.createVNode(_,{type:"primary"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(D.text),1)]),_:2},1024),e.createElementVNode("div",Tw,[e.createVNode(C,{class:"action-text",modelValue:D.text,"onUpdate:modelValue":$=>D.text=$,placeholder:"按钮文本","allow-clear":""},null,8,["modelValue","onUpdate:modelValue"]),e.createVNode(C,{modelValue:D.url,"onUpdate:modelValue":$=>D.url=$,placeholder:"按钮链接","allow-clear":""},null,8,["modelValue","onUpdate:modelValue"])]),e.createVNode(S,{modelValue:D.isExternal,"onUpdate:modelValue":$=>D.isExternal=$},{default:e.withCtx(()=>[...d[23]||(d[23]=[e.createTextVNode("是否外部链接",-1)])]),_:1},8,["modelValue","onUpdate:modelValue"])],2))]),_:1},16,["modelValue","component-data","disabled"])])])])]),_:1},8,["visible"])}}}),Sw=ne(Nw,[["__scopeId","data-v-c293b690"]]),Bw={class:"btn-list__row"},Dw=["href"],Pw={class:"btn-primary__text"},$w=["onClick"],Aw={class:"btn-primary__text"},Lw=e.defineComponent({__name:"btnList",props:{list:{},isPreview:{}},emits:["handleClick"],setup(n,{emit:t}){const o=n,a=t,i=s=>{!s||!o.isPreview||(s.startsWith("http")?typeof window<"u"&&window.open(s,"_blank"):a("handleClick",s))};return(s,l)=>(e.openBlock(),e.createElementBlock("div",Bw,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.list,r=>(e.openBlock(),e.createElementBlock("div",{class:"btn-list__item",key:r.id},[r.url&&r.url.includes("http")&&n.isPreview?(e.openBlock(),e.createElementBlock("a",{key:0,href:r.url,class:e.normalizeClass(["size-normal btn-primary",[r.type?`btn-primary--${r.type}`:""]])},[e.createElementVNode("div",Pw,e.toDisplayString(r.text),1),l[0]||(l[0]=e.createElementVNode("span",{class:"btn-primary__icon"},null,-1))],10,Dw)):(e.openBlock(),e.createElementBlock("button",{key:1,onClick:u=>i(r.url||""),class:e.normalizeClass(["size-normal btn-primary",[r.type?`btn-primary--${r.type}`:""]])},[e.createElementVNode("div",Aw,e.toDisplayString(r.text),1),l[1]||(l[1]=e.createElementVNode("span",{class:"btn-primary__icon"},null,-1))],10,$w))]))),128))]))}}),Cm=ne(Lw,[["__scopeId","data-v-15cf07ab"]]),Iw=e.defineComponent({name:"BtnList",__name:"index",props:{modelValue:{type:Object,default:()=>{}},isPreview:{type:Boolean,default:!0}},emits:["update:modelValue","handleDelete","handleCopy","handlePaste","handleClick"],setup(n,{emit:t}){const o=n,a=t,i=()=>{var h;if(o.modelValue&&o.modelValue.data)return;const d={id:((h=o.modelValue)==null?void 0:h.id)||R(),type:"BtnList",onlyShowPc:!1,width:"",bgColor:"",data:[{id:R(),type:"",text:"按钮名称",url:"",isExternal:!1},{id:R(),type:"white",text:"按钮名称",url:"",isExternal:!1},{id:R(),type:"light",text:"按钮名称",url:"",isExternal:!1},{id:R(),type:"blue",text:"按钮名称",url:"",isExternal:!1}]};a("update:modelValue",d)},s=e.computed(()=>{var d,h;return o.isPreview?!0:!((d=o.modelValue)!=null&&d.onlyShowPc)||((h=o.modelValue)==null?void 0:h.onlyShowPc)&&!Ne()}),l=e.ref(!1),r=e.ref(!1),u=()=>{a("handleDelete",o.modelValue.id)},c=()=>{a("handleCopy",o.modelValue)},f=d=>{a("handlePaste",d)},m=d=>{a("handleClick",d)};return i(),(d,h)=>{var g,p,b,_;return e.openBlock(),e.createElementBlock(e.Fragment,null,[s.value?(e.openBlock(),e.createElementBlock("div",{key:0,class:"btn-list center",style:e.normalizeStyle({backgroundColor:(g=n.modelValue)==null?void 0:g.bgColor}),onMouseenter:h[2]||(h[2]=w=>l.value=!0),onMouseleave:h[3]||(h[3]=w=>l.value=!1)},[e.createElementVNode("div",{class:e.normalizeClass(["btn-list__container",[(p=n.modelValue)!=null&&p.width?`container-content-${(b=n.modelValue)==null?void 0:b.width}`:"container-content"]])},[e.createVNode(Cm,{list:(_=n.modelValue)==null?void 0:_.data,isPreview:n.isPreview,onHandleClick:m},null,8,["list","isPreview"])],2),n.isPreview?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(Te,{key:0,show:l.value,"onUpdate:show":h[0]||(h[0]=w=>l.value=w),onHandleEdit:h[1]||(h[1]=w=>r.value=!0),onHandleDelete:u,onHandleCopy:c,onHandlePaste:f},null,8,["show"]))],36)):e.createCommentVNode("",!0),n.isPreview?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(Sw,{key:1,show:r.value,"onUpdate:show":h[4]||(h[4]=w=>r.value=w),data:n.modelValue},null,8,["show","data"]))],64)}}}),Vl=ne(Iw,[["__scopeId","data-v-3957db98"]]),Ow=Object.freeze(Object.defineProperty({__proto__:null,default:Vl},Symbol.toStringTag,{value:"Module"})),Mw={class:"setting-content"},Uw={class:"setting-header flex items-center"},Rw={class:"setting-header flex items-center"},Fw={class:"setting-header flex items-center"},Hw={class:"setting-header flex items-center"},jw={class:"setting-body"},zw={class:"setting-item"},qw={class:"btn-group"},Ww={key:0,class:"drag-handle"},Gw=["src"],Xw={class:"item-uplaod flex items-center"},Yw=e.defineComponent({__name:"setting",props:{show:{type:Boolean,default:!1},data:{type:Object,default:()=>{}}},emits:["update:show"],setup(n,{emit:t}){const o=e.defineAsyncComponent(()=>import("vuedraggable")),a=e.ref(!1),i=e.computed(()=>({animation:200,group:"gallerys",disabled:!1,ghostClass:"ghost",handle:".drag-handle",filter:".arco-input, .arco-select, .arco-checkbox",preventOnFilter:!1})),s=m=>m&&m.length>1,l=n,r=t,u=()=>{r("update:show",!1)},c=()=>{l.data.data.push({id:R(),title:"标题",subtitle:"副标题",imgSrc:void 0,alt:""})},f=m=>{l.data.data=l.data.data.filter(d=>d.id!==m)};return(m,d)=>{const h=e.resolveComponent("a-switch"),g=e.resolveComponent("a-option"),p=e.resolveComponent("a-select"),b=e.resolveComponent("a-input"),_=e.resolveComponent("icon-drag-arrow"),w=e.resolveComponent("icon-delete"),v=e.resolveComponent("icon-plus"),V=e.resolveComponent("a-drawer");return e.openBlock(),e.createBlock(V,{width:500,visible:n.show,footer:!1,onCancel:u,unmountOnClose:""},{title:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(n.data.type)+"组件编辑 ",1)]),default:e.withCtx(()=>[e.createElementVNode("div",Mw,[e.createElementVNode("div",Uw,[d[8]||(d[8]=e.createElementVNode("span",{class:"header-title"},"仅显示PC端",-1)),e.createVNode(h,{modelValue:n.data.onlyShowPc,"onUpdate:modelValue":d[0]||(d[0]=C=>n.data.onlyShowPc=C)},null,8,["modelValue"])]),e.createElementVNode("div",Rw,[d[11]||(d[11]=e.createElementVNode("span",{class:"header-title"},"组件背景",-1)),e.createVNode(p,{modelValue:n.data.bgColor,"onUpdate:modelValue":d[1]||(d[1]=C=>n.data.bgColor=C),placeholder:"请选择","allow-clear":""},{default:e.withCtx(()=>[e.createVNode(g,{value:"#ffffff"},{default:e.withCtx(()=>[...d[9]||(d[9]=[e.createTextVNode("白色",-1)])]),_:1}),e.createVNode(g,{value:"#F7F7FA"},{default:e.withCtx(()=>[...d[10]||(d[10]=[e.createTextVNode("灰色",-1)])]),_:1})]),_:1},8,["modelValue"])]),e.createElementVNode("div",Fw,[d[12]||(d[12]=e.createElementVNode("span",{class:"header-title"},"pc列数",-1)),e.createVNode(b,{modelValue:n.data.desktopCol,"onUpdate:modelValue":d[2]||(d[2]=C=>n.data.desktopCol=C),placeholder:"请输入","allow-clear":""},null,8,["modelValue"])]),e.createElementVNode("div",Hw,[d[13]||(d[13]=e.createElementVNode("span",{class:"header-title"},"移动端列数",-1)),e.createVNode(b,{modelValue:n.data.mobileCol,"onUpdate:modelValue":d[3]||(d[3]=C=>n.data.mobileCol=C),placeholder:"请输入","allow-clear":""},null,8,["modelValue"])]),e.createElementVNode("div",jw,[e.createElementVNode("div",zw,[e.createVNode(e.unref(o),e.mergeProps({modelValue:n.data.data,"onUpdate:modelValue":d[4]||(d[4]=C=>n.data.data=C),"component-data":{tag:"div",type:"transition-group",name:a.value?null:"flip-list"}},i.value,{disabled:!s(n.data.data),onStart:d[5]||(d[5]=C=>a.value=!0),onEnd:d[6]||(d[6]=C=>a.value=!1),"item-key":"id"}),{item:e.withCtx(({element:C})=>[(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["item-button draggable-item",{"sortable-disabled":!s(n.data.data)}]),key:C.id},[e.createElementVNode("div",qw,[s(n.data.data)?(e.openBlock(),e.createElementBlock("div",Ww,[e.createVNode(_,{class:"drag-icon"})])):e.createCommentVNode("",!0),e.createVNode(w,{class:"btn-delete",onClick:S=>f(C.id)},null,8,["onClick"])]),d[14]||(d[14]=e.createElementVNode("p",{class:"item-title"},"标题",-1)),e.createVNode(b,{modelValue:C.title,"onUpdate:modelValue":S=>C.title=S,placeholder:"请输入标题","allow-clear":""},null,8,["modelValue","onUpdate:modelValue"]),d[15]||(d[15]=e.createElementVNode("p",{class:"item-title"},"副标题",-1)),e.createVNode(b,{modelValue:C.subtitle,"onUpdate:modelValue":S=>C.subtitle=S,placeholder:"请输入文本","allow-clear":""},null,8,["modelValue","onUpdate:modelValue"]),d[16]||(d[16]=e.createElementVNode("p",{class:"item-title"},"图片",-1)),e.createElementVNode("img",{class:"item-img",src:C.imgSrc},null,8,Gw),e.createElementVNode("div",Xw,[e.createVNode(b,{modelValue:C.imgSrc,"onUpdate:modelValue":S=>C.imgSrc=S,placeholder:"请输入图片链接","allow-clear":""},null,8,["modelValue","onUpdate:modelValue"]),e.createVNode(ze,{modelValue:C.imgSrc,"onUpdate:modelValue":S=>C.imgSrc=S,name:`GalleryDefault_${C.id}`,"button-class":"fit-content"},null,8,["modelValue","onUpdate:modelValue","name"])]),e.createVNode(b,{class:"mt-2",modelValue:C.alt,"onUpdate:modelValue":S=>C.alt=S,placeholder:"图片alt","allow-clear":""},null,8,["modelValue","onUpdate:modelValue"])],2))]),_:1},16,["modelValue","component-data","disabled"]),e.createElementVNode("div",{class:"item-add-btn flex items-center",onClick:d[7]||(d[7]=C=>c())},[e.createVNode(v),d[17]||(d[17]=e.createElementVNode("span",{class:"btn-text"},"添加",-1))])])])])]),_:1},8,["visible"])}}}),Kw=ne(Yw,[["__scopeId","data-v-80f24166"]]),Qw={class:"gallery-default"},Jw={class:"img-wrapper need-mask"},Zw=["src","alt"],ex={class:"img-wrapper__content"},tx={class:"img-wrapper__content__title"},nx={class:"img-wrapper__content__subtitle"},ox=e.defineComponent({name:"GalleryDefault",__name:"index",props:{modelValue:{type:Object,default:()=>{}},isPreview:{type:Boolean,default:!0}},emits:["update:modelValue","handleDelete","handleCopy","handlePaste"],setup(n,{emit:t}){const o=n,a=t,i=()=>{var d;if(o.modelValue&&o.modelValue.data)return;const m={id:((d=o.modelValue)==null?void 0:d.id)||R(),type:"GalleryDefault",onlyShowPc:!1,bgColor:"",desktopCol:3,mobileCol:2,data:[{id:R(),title:"标题",subtitle:"副标题",imgSrc:"https://osswebsite-test.cedim.cn/media-library/ywies-bj/images/home/ywies-tx.jpg",alt:""},{id:R(),title:"标题",subtitle:"副标题",imgSrc:"https://osswebsite-test.cedim.cn/media-library/ywies-bj/images/home/ywies-tx.jpg",alt:""}]};a("update:modelValue",m)},s=e.computed(()=>{var m;return o.isPreview?!((m=o.modelValue)!=null&&m.onlyShowPc)||!Ne():!0}),l=e.ref(!1),r=e.ref(!1),u=()=>{a("handleDelete",o.modelValue.id)},c=()=>{a("handleCopy",o.modelValue)},f=m=>{a("handlePaste",m)};return i(),(m,d)=>{var h,g,p,b;return e.openBlock(),e.createElementBlock(e.Fragment,null,[s.value?(e.openBlock(),e.createElementBlock("div",{key:0,class:"gallery-list",onMouseenter:d[2]||(d[2]=_=>l.value=!0),onMouseleave:d[3]||(d[3]=_=>l.value=!1)},[e.createElementVNode("div",{class:"container-content",style:e.normalizeStyle({backgroundColor:(h=n.modelValue)==null?void 0:h.bgColor})},[e.createElementVNode("div",{class:e.normalizeClass(["default-row row",[`row-cols-${(g=n.modelValue)==null?void 0:g.mobileCol}`,`row-cols-md-${(p=n.modelValue)==null?void 0:p.desktopCol}`]])},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList((b=n.modelValue)==null?void 0:b.data,_=>(e.openBlock(),e.createElementBlock("div",{key:_.id,class:"col"},[e.createElementVNode("div",Qw,[e.createElementVNode("div",Jw,[e.createElementVNode("img",{src:_.imgSrc,alt:_.alt},null,8,Zw),e.createElementVNode("div",ex,[e.createElementVNode("div",tx,e.toDisplayString(_.title),1),e.createElementVNode("h5",nx,e.toDisplayString(_.subtitle),1)])])])]))),128))],2)],4),n.isPreview?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(Te,{key:0,show:l.value,"onUpdate:show":d[0]||(d[0]=_=>l.value=_),onHandleEdit:d[1]||(d[1]=_=>r.value=!0),onHandleDelete:u,onHandleCopy:c,onHandlePaste:f},null,8,["show"]))],32)):e.createCommentVNode("",!0),n.isPreview?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(Kw,{key:1,show:r.value,"onUpdate:show":d[4]||(d[4]=_=>r.value=_),data:n.modelValue},null,8,["show","data"]))],64)}}}),rd=ne(ox,[["__scopeId","data-v-a71950a3"]]),ax=Object.freeze(Object.defineProperty({__proto__:null,default:rd},Symbol.toStringTag,{value:"Module"})),ix={class:"setting-content"},sx={class:"setting-header flex items-center"},lx={class:"setting-header flex items-center"},rx={class:"setting-header flex items-center"},dx={class:"setting-header flex items-center"},ux={class:"setting-header flex items-center"},cx={class:"setting-body"},mx={class:"setting-item"},px={class:"btn-group"},hx={key:0,class:"drag-handle"},fx=["src"],gx={class:"item-uplaod flex items-center"},vx=e.defineComponent({__name:"setting",props:{show:{type:Boolean,default:!1},data:{type:Object,default:()=>{}}},emits:["update:show"],setup(n,{emit:t}){const o=e.defineAsyncComponent(()=>import("vuedraggable")),a=e.ref(!1),i=e.computed(()=>({animation:200,group:"gallerys",disabled:!1,ghostClass:"ghost",handle:".drag-handle",filter:".arco-input, .arco-select, .arco-checkbox",preventOnFilter:!1})),s=m=>m&&m.length>1,l=n,r=t,u=()=>{r("update:show",!1)},c=()=>{l.data.data.push({id:R(),title:"标题",url:"",imgSrc:void 0,alt:""})},f=m=>{l.data.data=l.data.data.filter(d=>d.id!==m)};return(m,d)=>{const h=e.resolveComponent("a-switch"),g=e.resolveComponent("a-option"),p=e.resolveComponent("a-select"),b=e.resolveComponent("a-input"),_=e.resolveComponent("icon-drag-arrow"),w=e.resolveComponent("icon-delete"),v=e.resolveComponent("icon-plus"),V=e.resolveComponent("a-drawer");return e.openBlock(),e.createBlock(V,{width:500,visible:n.show,footer:!1,onCancel:u,unmountOnClose:""},{title:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(n.data.type)+"组件编辑 ",1)]),default:e.withCtx(()=>[e.createElementVNode("div",ix,[e.createElementVNode("div",sx,[d[9]||(d[9]=e.createElementVNode("span",{class:"header-title"},"仅显示PC端",-1)),e.createVNode(h,{modelValue:n.data.onlyShowPc,"onUpdate:modelValue":d[0]||(d[0]=C=>n.data.onlyShowPc=C)},null,8,["modelValue"])]),e.createElementVNode("div",lx,[d[12]||(d[12]=e.createElementVNode("span",{class:"header-title"},"组件背景",-1)),e.createVNode(p,{modelValue:n.data.bgColor,"onUpdate:modelValue":d[1]||(d[1]=C=>n.data.bgColor=C),placeholder:"请选择","allow-clear":""},{default:e.withCtx(()=>[e.createVNode(g,{value:"#ffffff"},{default:e.withCtx(()=>[...d[10]||(d[10]=[e.createTextVNode("白色",-1)])]),_:1}),e.createVNode(g,{value:"#F7F7FA"},{default:e.withCtx(()=>[...d[11]||(d[11]=[e.createTextVNode("灰色",-1)])]),_:1})]),_:1},8,["modelValue"])]),e.createElementVNode("div",rx,[d[13]||(d[13]=e.createElementVNode("span",{class:"header-title"},"pc列数",-1)),e.createVNode(b,{modelValue:n.data.desktopCol,"onUpdate:modelValue":d[2]||(d[2]=C=>n.data.desktopCol=C),placeholder:"请输入","allow-clear":""},null,8,["modelValue"])]),e.createElementVNode("div",dx,[d[14]||(d[14]=e.createElementVNode("span",{class:"header-title"},"移动端列数",-1)),e.createVNode(b,{modelValue:n.data.mobileCol,"onUpdate:modelValue":d[3]||(d[3]=C=>n.data.mobileCol=C),placeholder:"请输入","allow-clear":""},null,8,["modelValue"])]),e.createElementVNode("div",ux,[d[17]||(d[17]=e.createElementVNode("span",{class:"header-title"},"是否居中",-1)),e.createVNode(p,{modelValue:n.data.center,"onUpdate:modelValue":d[4]||(d[4]=C=>n.data.center=C),placeholder:"请选择","allow-clear":""},{default:e.withCtx(()=>[e.createVNode(g,{value:!0},{default:e.withCtx(()=>[...d[15]||(d[15]=[e.createTextVNode("是",-1)])]),_:1}),e.createVNode(g,{value:!1},{default:e.withCtx(()=>[...d[16]||(d[16]=[e.createTextVNode("否",-1)])]),_:1})]),_:1},8,["modelValue"])]),e.createElementVNode("div",cx,[e.createElementVNode("div",mx,[e.createVNode(e.unref(o),e.mergeProps({modelValue:n.data.data,"onUpdate:modelValue":d[5]||(d[5]=C=>n.data.data=C),"component-data":{tag:"div",type:"transition-group",name:a.value?null:"flip-list"}},i.value,{disabled:!s(n.data.data),onStart:d[6]||(d[6]=C=>a.value=!0),onEnd:d[7]||(d[7]=C=>a.value=!1),"item-key":"id"}),{item:e.withCtx(({element:C})=>[(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["item-button draggable-item",{"sortable-disabled":!s(n.data.data)}]),key:C.id},[e.createElementVNode("div",px,[s(n.data.data)?(e.openBlock(),e.createElementBlock("div",hx,[e.createVNode(_,{class:"drag-icon"})])):e.createCommentVNode("",!0),e.createVNode(w,{class:"btn-delete",onClick:S=>f(C.id)},null,8,["onClick"])]),d[18]||(d[18]=e.createElementVNode("p",{class:"item-title"},"标题",-1)),e.createVNode(b,{modelValue:C.title,"onUpdate:modelValue":S=>C.title=S,placeholder:"请输入标题","allow-clear":""},null,8,["modelValue","onUpdate:modelValue"]),d[19]||(d[19]=e.createElementVNode("p",{class:"item-title"},"跳转链接",-1)),e.createVNode(b,{modelValue:C.url,"onUpdate:modelValue":S=>C.url=S,placeholder:"请输入跳转链接","allow-clear":""},null,8,["modelValue","onUpdate:modelValue"]),d[20]||(d[20]=e.createElementVNode("p",{class:"item-title"},"图片",-1)),e.createElementVNode("img",{class:"item-img",src:C.imgSrc},null,8,fx),e.createElementVNode("div",gx,[e.createVNode(b,{modelValue:C.imgSrc,"onUpdate:modelValue":S=>C.imgSrc=S,placeholder:"请输入图片链接","allow-clear":""},null,8,["modelValue","onUpdate:modelValue"]),e.createVNode(ze,{modelValue:C.imgSrc,"onUpdate:modelValue":S=>C.imgSrc=S,name:`GalleryCaptionRound_${C.id}`,"button-class":"fit-content"},null,8,["modelValue","onUpdate:modelValue","name"])]),e.createVNode(b,{class:"mt-2",modelValue:C.alt,"onUpdate:modelValue":S=>C.alt=S,placeholder:"图片alt","allow-clear":""},null,8,["modelValue","onUpdate:modelValue"])],2))]),_:1},16,["modelValue","component-data","disabled"]),e.createElementVNode("div",{class:"item-add-btn flex items-center",onClick:d[8]||(d[8]=C=>c())},[e.createVNode(v),d[21]||(d[21]=e.createElementVNode("span",{class:"btn-text"},"添加",-1))])])])])]),_:1},8,["visible"])}}}),yx=ne(vx,[["__scopeId","data-v-dac08a4d"]]),_x=["href"],bx=["src","alt"],wx=["onClick"],xx=["src","alt"],Vx={key:2,class:"gallery-caption__img"},Cx=["src","alt"],kx=["href"],Ex=["onClick"],Tx=["innerHTML"],Nx=e.defineComponent({name:"GalleryCaptionRound",__name:"index",props:{modelValue:{type:Object,default:()=>{}},isPreview:{type:Boolean,default:!0}},emits:["update:modelValue","handleDelete","handleCopy","handlePaste","handleClick"],setup(n,{emit:t}){const o=n,a=t,i=()=>{var h;if(o.modelValue&&o.modelValue.data)return;const d={id:((h=o.modelValue)==null?void 0:h.id)||R(),type:"GalleryCaptionRound",onlyShowPc:!1,bgColor:"",desktopCol:3,mobileCol:2,center:!1,data:[{id:R(),title:"标题",imgSrc:"https://osswebsite-test.cedim.cn/media-library/ywies-bj/images/home/ywies-tx.jpg",alt:"",url:""},{id:R(),title:"标题",imgSrc:"https://osswebsite-test.cedim.cn/media-library/ywies-bj/images/home/ywies-tx.jpg",alt:"",url:""}]};a("update:modelValue",d)},s=e.computed(()=>{var d;return o.isPreview?!((d=o.modelValue)!=null&&d.onlyShowPc)||!Ne():!0}),l=e.ref(!1),r=e.ref(!1),u=()=>{a("handleDelete",o.modelValue.id)},c=()=>{a("handleCopy",o.modelValue)},f=d=>{a("handlePaste",d)},m=d=>{a("handleClick",d)};return i(),(d,h)=>{var g,p,b,_,w;return e.openBlock(),e.createElementBlock(e.Fragment,null,[s.value?(e.openBlock(),e.createElementBlock("div",{key:0,class:"gallery-list",onMouseenter:h[2]||(h[2]=v=>l.value=!0),onMouseleave:h[3]||(h[3]=v=>l.value=!1)},[e.createElementVNode("div",{class:"gallery-container gallery-caption-round container-content",style:e.normalizeStyle({backgroundColor:(g=n.modelValue)==null?void 0:g.bgColor})},[e.createElementVNode("div",{class:e.normalizeClass(["default-row row",[`row-cols-${(p=n.modelValue)==null?void 0:p.mobileCol}`,`row-cols-md-${(b=n.modelValue)==null?void 0:b.desktopCol}`,((_=n.modelValue)==null?void 0:_.center)&&"row-center"]])},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList((w=n.modelValue)==null?void 0:w.data,v=>(e.openBlock(),e.createElementBlock("div",{key:v.id,class:"col"},[e.createElementVNode("div",{class:e.normalizeClass(["gallery-caption-round gallery-caption",[v.url&&"has-url"]])},[v.url&&v.url.includes("http")&&n.isPreview?(e.openBlock(),e.createElementBlock("a",{key:0,href:v.url,target:"_blank",class:"gallery-caption__img"},[e.createElementVNode("img",{src:v.imgSrc,alt:v.alt},null,8,bx)],8,_x)):v.url?(e.openBlock(),e.createElementBlock("button",{key:1,onClick:V=>m(v.url),class:"gallery-caption__img"},[e.createElementVNode("img",{src:v.imgSrc,alt:v.alt},null,8,xx)],8,wx)):(e.openBlock(),e.createElementBlock("div",Vx,[e.createElementVNode("img",{src:v.imgSrc,alt:v.alt},null,8,Cx)])),v.url&&v.url.includes("http")&&n.isPreview?(e.openBlock(),e.createElementBlock("a",{key:3,href:v.url,target:"_blank",class:"gallery-caption__title tx-subtitle text-blue text-center"},e.toDisplayString(v.title),9,kx)):v.url?(e.openBlock(),e.createElementBlock("button",{key:4,onClick:V=>m(v.url),class:"gallery-caption__title tx-subtitle text-blue text-center"},e.toDisplayString(v.title),9,Ex)):(e.openBlock(),e.createElementBlock("div",{key:5,class:"tx-subtitle text-blue text-center",innerHTML:v.title},null,8,Tx))],2)]))),128))],2)],4),n.isPreview?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(Te,{key:0,show:l.value,"onUpdate:show":h[0]||(h[0]=v=>l.value=v),onHandleEdit:h[1]||(h[1]=v=>r.value=!0),onHandleDelete:u,onHandleCopy:c,onHandlePaste:f},null,8,["show"]))],32)):e.createCommentVNode("",!0),n.isPreview?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(yx,{key:1,show:r.value,"onUpdate:show":h[4]||(h[4]=v=>r.value=v),data:n.modelValue},null,8,["show","data"]))],64)}}}),dd=ne(Nx,[["__scopeId","data-v-aa6eac27"]]),Sx=Object.freeze(Object.defineProperty({__proto__:null,default:dd},Symbol.toStringTag,{value:"Module"})),Bx={class:"setting-content"},Dx={class:"setting-header flex items-center"},Px={class:"setting-header flex items-center"},$x={class:"setting-body"},Ax={class:"setting-item"},Lx={class:"btn-group"},Ix={key:0,class:"drag-handle"},Ox=["src"],Mx={class:"item-uplaod flex items-center"},Ux={class:"item-action flex items-center"},Rx=e.defineComponent({__name:"setting",props:{show:{type:Boolean,default:!1},data:{type:Object,default:()=>{}}},emits:["update:show"],setup(n,{emit:t}){const o=e.defineAsyncComponent(()=>import("vuedraggable")),a=e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./index-QFpkZqlg.js"))),i=e.ref(!1),s=e.computed(()=>({animation:200,group:"gallerys",disabled:!1,ghostClass:"ghost",handle:".drag-handle",filter:".arco-input, .arco-select, .arco-checkbox",preventOnFilter:!1})),l=d=>d&&d.length>1,r=n,u=t,c=()=>{u("update:show",!1)},f=()=>{r.data.data.push({id:R(),title:"标题",text:"内容",date:"",imgSrc:"",alt:"",url:"",btnText:""})},m=d=>{r.data.data=r.data.data.filter(h=>h.id!==d)};return(d,h)=>{const g=e.resolveComponent("a-switch"),p=e.resolveComponent("a-option"),b=e.resolveComponent("a-select"),_=e.resolveComponent("icon-drag-arrow"),w=e.resolveComponent("icon-delete"),v=e.resolveComponent("a-input"),V=e.resolveComponent("a-button"),C=e.resolveComponent("icon-plus"),S=e.resolveComponent("a-drawer");return e.openBlock(),e.createBlock(S,{width:500,visible:n.show,footer:!1,onCancel:c,unmountOnClose:""},{title:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(n.data.type)+"组件编辑 ",1)]),default:e.withCtx(()=>[e.createElementVNode("div",Bx,[e.createElementVNode("div",Dx,[h[6]||(h[6]=e.createElementVNode("span",{class:"header-title"},"仅显示PC端",-1)),e.createVNode(g,{modelValue:n.data.onlyShowPc,"onUpdate:modelValue":h[0]||(h[0]=N=>n.data.onlyShowPc=N)},null,8,["modelValue"])]),e.createElementVNode("div",Px,[h[9]||(h[9]=e.createElementVNode("span",{class:"header-title"},"组件背景",-1)),e.createVNode(b,{modelValue:n.data.bgColor,"onUpdate:modelValue":h[1]||(h[1]=N=>n.data.bgColor=N),placeholder:"请选择","allow-clear":""},{default:e.withCtx(()=>[e.createVNode(p,{value:"#ffffff"},{default:e.withCtx(()=>[...h[7]||(h[7]=[e.createTextVNode("白色",-1)])]),_:1}),e.createVNode(p,{value:"#F7F7FA"},{default:e.withCtx(()=>[...h[8]||(h[8]=[e.createTextVNode("灰色",-1)])]),_:1})]),_:1},8,["modelValue"])]),e.createElementVNode("div",$x,[e.createElementVNode("div",Ax,[e.createVNode(e.unref(o),e.mergeProps({modelValue:n.data.data,"onUpdate:modelValue":h[2]||(h[2]=N=>n.data.data=N),"component-data":{tag:"div",type:"transition-group",name:i.value?null:"flip-list"}},s.value,{disabled:!l(n.data.data),onStart:h[3]||(h[3]=N=>i.value=!0),onEnd:h[4]||(h[4]=N=>i.value=!1),"item-key":"id"}),{item:e.withCtx(({element:N})=>[(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["item-button draggable-item",{"sortable-disabled":!l(n.data.data)}]),key:N.id},[e.createElementVNode("div",Lx,[l(n.data.data)?(e.openBlock(),e.createElementBlock("div",Ix,[e.createVNode(_,{class:"drag-icon"})])):e.createCommentVNode("",!0),e.createVNode(w,{class:"btn-delete",onClick:D=>m(N.id)},null,8,["onClick"])]),h[10]||(h[10]=e.createElementVNode("p",{class:"item-title"},"标题",-1)),e.createVNode(v,{modelValue:N.title,"onUpdate:modelValue":D=>N.title=D,placeholder:"请输入标题","allow-clear":""},null,8,["modelValue","onUpdate:modelValue"]),h[11]||(h[11]=e.createElementVNode("p",{class:"item-title"},"文本",-1)),e.createVNode(e.unref(a),{modelValue:N.text,"onUpdate:modelValue":D=>N.text=D,name:`GalleryTimeline_editor_${N.id}`},null,8,["modelValue","onUpdate:modelValue","name"]),h[12]||(h[12]=e.createElementVNode("p",{class:"item-title"},"日期",-1)),e.createVNode(v,{modelValue:N.date,"onUpdate:modelValue":D=>N.date=D,placeholder:"请输入日期","allow-clear":""},null,8,["modelValue","onUpdate:modelValue"]),h[13]||(h[13]=e.createElementVNode("p",{class:"item-title"},"图片",-1)),e.createElementVNode("img",{class:"item-img",src:N.imgSrc},null,8,Ox),e.createElementVNode("div",Mx,[e.createVNode(v,{modelValue:N.imgSrc,"onUpdate:modelValue":D=>N.imgSrc=D,placeholder:"请输入图片链接","allow-clear":""},null,8,["modelValue","onUpdate:modelValue"]),e.createVNode(ze,{modelValue:N.imgSrc,"onUpdate:modelValue":D=>N.imgSrc=D,name:`GalleryTimeline_${N.id}`,"button-class":"fit-content"},null,8,["modelValue","onUpdate:modelValue","name"])]),e.createVNode(v,{class:"mt-2",modelValue:N.alt,"onUpdate:modelValue":D=>N.alt=D,placeholder:"图片alt","allow-clear":""},null,8,["modelValue","onUpdate:modelValue"]),e.createVNode(V,{style:{"margin-top":"10px"},type:"primary"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(N.btnText),1)]),_:2},1024),e.createElementVNode("div",Ux,[e.createVNode(v,{class:"action-text",modelValue:N.btnText,"onUpdate:modelValue":D=>N.btnText=D,placeholder:"按钮文本","allow-clear":""},null,8,["modelValue","onUpdate:modelValue"]),e.createVNode(v,{modelValue:N.url,"onUpdate:modelValue":D=>N.url=D,placeholder:"按钮链接","allow-clear":""},null,8,["modelValue","onUpdate:modelValue"])])],2))]),_:1},16,["modelValue","component-data","disabled"]),e.createElementVNode("div",{class:"item-add-btn flex items-center",onClick:h[5]||(h[5]=N=>f())},[e.createVNode(C),h[14]||(h[14]=e.createElementVNode("span",{class:"btn-text"},"添加",-1))])])])])]),_:1},8,["visible"])}}}),Fx=ne(Rx,[["__scopeId","data-v-f412ee94"]]),Zi=e.defineComponent({name:"ScrollBar",__name:"index",props:{hideScrollbar:{type:Boolean,default:!1},light:{type:Boolean,default:!1}},setup(n){return(t,o)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["scroll-bar",{"scroll-bar--is-light":n.light}])},[n.hideScrollbar?e.renderSlot(t.$slots,"default",{key:1}):(e.openBlock(),e.createBlock(e.unref(N_),{key:0,"data-simplebar-auto-hide":"false",class:"simple-bar"},{default:e.withCtx(()=>[e.renderSlot(t.$slots,"default")]),_:3}))],2))}});function Hx(n,t){for(var o=0;o<t.length;o++){var a=t[o];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(n,a.key,a)}}function jx(n,t,o){return t&&Hx(n.prototype,t),n}/*!
|
|
2
|
+
* Observer 3.13.0
|
|
3
|
+
* https://gsap.com
|
|
4
|
+
*
|
|
5
|
+
* @license Copyright 2008-2025, GreenSock. All rights reserved.
|
|
6
|
+
* Subject to the terms at https://gsap.com/standard-license
|
|
7
|
+
* @author: Jack Doyle, jack@greensock.com
|
|
8
|
+
*/var Yt,_r,jn,ya,_a,Ti,Ag,$a,Ws,Lg,jo,co,Ig,Og=function(){return Yt||typeof window<"u"&&(Yt=window.gsap)&&Yt.registerPlugin&&Yt},Mg=1,xi=[],Ye=[],So=[],Gs=Date.now,Dc=function(t,o){return o},zx=function(){var t=Ws.core,o=t.bridge||{},a=t._scrollers,i=t._proxies;a.push.apply(a,Ye),i.push.apply(i,So),Ye=a,So=i,Dc=function(l,r){return o[l](r)}},ba=function(t,o){return~So.indexOf(t)&&So[So.indexOf(t)+1][o]},Xs=function(t){return!!~Lg.indexOf(t)},cn=function(t,o,a,i,s){return t.addEventListener(o,a,{passive:i!==!1,capture:!!s})},rn=function(t,o,a,i){return t.removeEventListener(o,a,!!i)},Zl="scrollLeft",er="scrollTop",Pc=function(){return jo&&jo.isPressed||Ye.cache++},Br=function(t,o){var a=function i(s){if(s||s===0){Mg&&(jn.history.scrollRestoration="manual");var l=jo&&jo.isPressed;s=i.v=Math.round(s)||(jo&&jo.iOS?1:0),t(s),i.cacheID=Ye.cache,l&&Dc("ss",s)}else(o||Ye.cache!==i.cacheID||Dc("ref"))&&(i.cacheID=Ye.cache,i.v=t());return i.v+i.offset};return a.offset=0,t&&a},gn={s:Zl,p:"left",p2:"Left",os:"right",os2:"Right",d:"width",d2:"Width",a:"x",sc:Br(function(n){return arguments.length?jn.scrollTo(n,Mt.sc()):jn.pageXOffset||ya[Zl]||_a[Zl]||Ti[Zl]||0})},Mt={s:er,p:"top",p2:"Top",os:"bottom",os2:"Bottom",d:"height",d2:"Height",a:"y",op:gn,sc:Br(function(n){return arguments.length?jn.scrollTo(gn.sc(),n):jn.pageYOffset||ya[er]||_a[er]||Ti[er]||0})},xn=function(t,o){return(o&&o._ctx&&o._ctx.selector||Yt.utils.toArray)(t)[0]||(typeof t=="string"&&Yt.config().nullTargetWarn!==!1?console.warn("Element not found:",t):null)},qx=function(t,o){for(var a=o.length;a--;)if(o[a]===t||o[a].contains(t))return!0;return!1},wa=function(t,o){var a=o.s,i=o.sc;Xs(t)&&(t=ya.scrollingElement||_a);var s=Ye.indexOf(t),l=i===Mt.sc?1:2;!~s&&(s=Ye.push(t)-1),Ye[s+l]||cn(t,"scroll",Pc);var r=Ye[s+l],u=r||(Ye[s+l]=Br(ba(t,a),!0)||(Xs(t)?i:Br(function(c){return arguments.length?t[a]=c:t[a]})));return u.target=t,r||(u.smooth=Yt.getProperty(t,"scrollBehavior")==="smooth"),u},$c=function(t,o,a){var i=t,s=t,l=Gs(),r=l,u=o||50,c=Math.max(500,u*3),f=function(g,p){var b=Gs();p||b-l>u?(s=i,i=g,r=l,l=b):a?i+=g:i=s+(g-s)/(b-r)*(l-r)},m=function(){s=i=a?0:i,r=l=0},d=function(g){var p=r,b=s,_=Gs();return(g||g===0)&&g!==i&&f(g),l===r||_-r>c?0:(i+(a?b:-b))/((a?_:l)-p)*1e3};return{update:f,reset:m,getVelocity:d}},ks=function(t,o){return o&&!t._gsapAllow&&t.preventDefault(),t.changedTouches?t.changedTouches[0]:t},Vh=function(t){var o=Math.max.apply(Math,t),a=Math.min.apply(Math,t);return Math.abs(o)>=Math.abs(a)?o:a},Ug=function(){Ws=Yt.core.globals().ScrollTrigger,Ws&&Ws.core&&zx()},Rg=function(t){return Yt=t||Og(),!_r&&Yt&&typeof document<"u"&&document.body&&(jn=window,ya=document,_a=ya.documentElement,Ti=ya.body,Lg=[jn,ya,_a,Ti],Yt.utils.clamp,Ig=Yt.core.context||function(){},$a="onpointerenter"in Ti?"pointer":"mouse",Ag=Pt.isTouch=jn.matchMedia&&jn.matchMedia("(hover: none), (pointer: coarse)").matches?1:"ontouchstart"in jn||navigator.maxTouchPoints>0||navigator.msMaxTouchPoints>0?2:0,co=Pt.eventTypes=("ontouchstart"in _a?"touchstart,touchmove,touchcancel,touchend":"onpointerdown"in _a?"pointerdown,pointermove,pointercancel,pointerup":"mousedown,mousemove,mouseup,mouseup").split(","),setTimeout(function(){return Mg=0},500),Ug(),_r=1),_r};gn.op=Mt;Ye.cache=0;var Pt=function(){function n(o){this.init(o)}var t=n.prototype;return t.init=function(a){_r||Rg(Yt)||console.warn("Please gsap.registerPlugin(Observer)"),Ws||Ug();var i=a.tolerance,s=a.dragMinimum,l=a.type,r=a.target,u=a.lineHeight,c=a.debounce,f=a.preventDefault,m=a.onStop,d=a.onStopDelay,h=a.ignore,g=a.wheelSpeed,p=a.event,b=a.onDragStart,_=a.onDragEnd,w=a.onDrag,v=a.onPress,V=a.onRelease,C=a.onRight,S=a.onLeft,N=a.onUp,D=a.onDown,$=a.onChangeX,k=a.onChangeY,A=a.onChange,B=a.onToggleX,I=a.onToggleY,z=a.onHover,Y=a.onHoverEnd,H=a.onMove,q=a.ignoreCheck,O=a.isNormalizer,J=a.onGestureStart,F=a.onGestureEnd,M=a.onWheel,Q=a.onEnable,W=a.onDisable,Z=a.onClick,de=a.scrollSpeed,Ve=a.capture,oe=a.allowClicks,fe=a.lockAxis,Ce=a.onLockAxis;this.target=r=xn(r)||_a,this.vars=a,h&&(h=Yt.utils.toArray(h)),i=i||1e-9,s=s||0,g=g||1,de=de||1,l=l||"wheel,touch,pointer",c=c!==!1,u||(u=parseFloat(jn.getComputedStyle(Ti).lineHeight)||22);var Se,ae,ce,se,he,we,ke,te=this,ue=0,pe=0,ve=a.passive||!f&&a.passive!==!1,_e=wa(r,gn),Je=wa(r,Mt),bt=_e(),Bn=Je(),gt=~l.indexOf("touch")&&!~l.indexOf("pointer")&&co[0]==="pointerdown",an=Xs(r),it=r.ownerDocument||ya,vt=[0,0,0],sn=[0,0,0],Gn=0,ta=function(){return Gn=Gs()},Oe=function(Ae,Ze){return(te.event=Ae)&&h&&qx(Ae.target,h)||Ze&>&&Ae.pointerType!=="touch"||q&&q(Ae,Ze)},oi=function(){te._vx.reset(),te._vy.reset(),ae.pause(),m&&m(te)},_n=function(){var Ae=te.deltaX=Vh(vt),Ze=te.deltaY=Vh(sn),be=Math.abs(Ae)>=i,Me=Math.abs(Ze)>=i;A&&(be||Me)&&A(te,Ae,Ze,vt,sn),be&&(C&&te.deltaX>0&&C(te),S&&te.deltaX<0&&S(te),$&&$(te),B&&te.deltaX<0!=ue<0&&B(te),ue=te.deltaX,vt[0]=vt[1]=vt[2]=0),Me&&(D&&te.deltaY>0&&D(te),N&&te.deltaY<0&&N(te),k&&k(te),I&&te.deltaY<0!=pe<0&&I(te),pe=te.deltaY,sn[0]=sn[1]=sn[2]=0),(se||ce)&&(H&&H(te),ce&&(b&&ce===1&&b(te),w&&w(te),ce=0),se=!1),we&&!(we=!1)&&Ce&&Ce(te),he&&(M(te),he=!1),Se=0},na=function(Ae,Ze,be){vt[be]+=Ae,sn[be]+=Ze,te._vx.update(Ae),te._vy.update(Ze),c?Se||(Se=requestAnimationFrame(_n)):_n()},oa=function(Ae,Ze){fe&&!ke&&(te.axis=ke=Math.abs(Ae)>Math.abs(Ze)?"x":"y",we=!0),ke!=="y"&&(vt[2]+=Ae,te._vx.update(Ae,!0)),ke!=="x"&&(sn[2]+=Ze,te._vy.update(Ze,!0)),c?Se||(Se=requestAnimationFrame(_n)):_n()},fo=function(Ae){if(!Oe(Ae,1)){Ae=ks(Ae,f);var Ze=Ae.clientX,be=Ae.clientY,Me=Ze-te.x,Be=be-te.y,Ie=te.isDragging;te.x=Ze,te.y=be,(Ie||(Me||Be)&&(Math.abs(te.startX-Ze)>=s||Math.abs(te.startY-be)>=s))&&(ce=Ie?2:1,Ie||(te.isDragging=!0),oa(Me,Be))}},Lo=te.onPress=function(Re){Oe(Re,1)||Re&&Re.button||(te.axis=ke=null,ae.pause(),te.isPressed=!0,Re=ks(Re),ue=pe=0,te.startX=te.x=Re.clientX,te.startY=te.y=Re.clientY,te._vx.reset(),te._vy.reset(),cn(O?r:it,co[1],fo,ve,!0),te.deltaX=te.deltaY=0,v&&v(te))},qe=te.onRelease=function(Re){if(!Oe(Re,1)){rn(O?r:it,co[1],fo,!0);var Ae=!isNaN(te.y-te.startY),Ze=te.isDragging,be=Ze&&(Math.abs(te.x-te.startX)>3||Math.abs(te.y-te.startY)>3),Me=ks(Re);!be&&Ae&&(te._vx.reset(),te._vy.reset(),f&&oe&&Yt.delayedCall(.08,function(){if(Gs()-Gn>300&&!Re.defaultPrevented){if(Re.target.click)Re.target.click();else if(it.createEvent){var Be=it.createEvent("MouseEvents");Be.initMouseEvent("click",!0,!0,jn,1,Me.screenX,Me.screenY,Me.clientX,Me.clientY,!1,!1,!1,!1,0,null),Re.target.dispatchEvent(Be)}}})),te.isDragging=te.isGesturing=te.isPressed=!1,m&&Ze&&!O&&ae.restart(!0),ce&&_n(),_&&Ze&&_(te),V&&V(te,be)}},Io=function(Ae){return Ae.touches&&Ae.touches.length>1&&(te.isGesturing=!0)&&J(Ae,te.isDragging)},Dn=function(){return(te.isGesturing=!1)||F(te)},Pn=function(Ae){if(!Oe(Ae)){var Ze=_e(),be=Je();na((Ze-bt)*de,(be-Bn)*de,1),bt=Ze,Bn=be,m&&ae.restart(!0)}},$n=function(Ae){if(!Oe(Ae)){Ae=ks(Ae,f),M&&(he=!0);var Ze=(Ae.deltaMode===1?u:Ae.deltaMode===2?jn.innerHeight:1)*g;na(Ae.deltaX*Ze,Ae.deltaY*Ze,0),m&&!O&&ae.restart(!0)}},Oo=function(Ae){if(!Oe(Ae)){var Ze=Ae.clientX,be=Ae.clientY,Me=Ze-te.x,Be=be-te.y;te.x=Ze,te.y=be,se=!0,m&&ae.restart(!0),(Me||Be)&&oa(Me,Be)}},aa=function(Ae){te.event=Ae,z(te)},Xn=function(Ae){te.event=Ae,Y(te)},Ta=function(Ae){return Oe(Ae)||ks(Ae,f)&&Z(te)};ae=te._dc=Yt.delayedCall(d||.25,oi).pause(),te.deltaX=te.deltaY=0,te._vx=$c(0,50,!0),te._vy=$c(0,50,!0),te.scrollX=_e,te.scrollY=Je,te.isDragging=te.isGesturing=te.isPressed=!1,Ig(this),te.enable=function(Re){return te.isEnabled||(cn(an?it:r,"scroll",Pc),l.indexOf("scroll")>=0&&cn(an?it:r,"scroll",Pn,ve,Ve),l.indexOf("wheel")>=0&&cn(r,"wheel",$n,ve,Ve),(l.indexOf("touch")>=0&&Ag||l.indexOf("pointer")>=0)&&(cn(r,co[0],Lo,ve,Ve),cn(it,co[2],qe),cn(it,co[3],qe),oe&&cn(r,"click",ta,!0,!0),Z&&cn(r,"click",Ta),J&&cn(it,"gesturestart",Io),F&&cn(it,"gestureend",Dn),z&&cn(r,$a+"enter",aa),Y&&cn(r,$a+"leave",Xn),H&&cn(r,$a+"move",Oo)),te.isEnabled=!0,te.isDragging=te.isGesturing=te.isPressed=se=ce=!1,te._vx.reset(),te._vy.reset(),bt=_e(),Bn=Je(),Re&&Re.type&&Lo(Re),Q&&Q(te)),te},te.disable=function(){te.isEnabled&&(xi.filter(function(Re){return Re!==te&&Xs(Re.target)}).length||rn(an?it:r,"scroll",Pc),te.isPressed&&(te._vx.reset(),te._vy.reset(),rn(O?r:it,co[1],fo,!0)),rn(an?it:r,"scroll",Pn,Ve),rn(r,"wheel",$n,Ve),rn(r,co[0],Lo,Ve),rn(it,co[2],qe),rn(it,co[3],qe),rn(r,"click",ta,!0),rn(r,"click",Ta),rn(it,"gesturestart",Io),rn(it,"gestureend",Dn),rn(r,$a+"enter",aa),rn(r,$a+"leave",Xn),rn(r,$a+"move",Oo),te.isEnabled=te.isPressed=te.isDragging=!1,W&&W(te))},te.kill=te.revert=function(){te.disable();var Re=xi.indexOf(te);Re>=0&&xi.splice(Re,1),jo===te&&(jo=0)},xi.push(te),O&&Xs(r)&&(jo=te),te.enable(p)},jx(n,[{key:"velocityX",get:function(){return this._vx.getVelocity()}},{key:"velocityY",get:function(){return this._vy.getVelocity()}}]),n}();Pt.version="3.13.0";Pt.create=function(n){return new Pt(n)};Pt.register=Rg;Pt.getAll=function(){return xi.slice()};Pt.getById=function(n){return xi.filter(function(t){return t.vars.id===n})[0]};Og()&&Yt.registerPlugin(Pt);/*!
|
|
9
|
+
* ScrollTrigger 3.13.0
|
|
10
|
+
* https://gsap.com
|
|
11
|
+
*
|
|
12
|
+
* @license Copyright 2008-2025, GreenSock. All rights reserved.
|
|
13
|
+
* Subject to the terms at https://gsap.com/standard-license
|
|
14
|
+
* @author: Jack Doyle, jack@greensock.com
|
|
15
|
+
*/var Ee,bi,Xe,mt,Hn,nt,km,Dr,rl,Ys,As,tr,Kt,ud,Ac,pn,Ch,kh,wi,Fg,ec,Hg,mn,Lc,jg,zg,ha,Ic,Em,Ni,Tm,Pr,Oc,tc,nr=1,Qt=Date.now,nc=Qt(),to=0,Ls=0,Eh=function(t,o,a){var i=Fn(t)&&(t.substr(0,6)==="clamp("||t.indexOf("max")>-1);return a["_"+o+"Clamp"]=i,i?t.substr(6,t.length-7):t},Th=function(t,o){return o&&(!Fn(t)||t.substr(0,6)!=="clamp(")?"clamp("+t+")":t},Wx=function n(){return Ls&&requestAnimationFrame(n)},Nh=function(){return ud=1},Sh=function(){return ud=0},_o=function(t){return t},Is=function(t){return Math.round(t*1e5)/1e5||0},qg=function(){return typeof window<"u"},Wg=function(){return Ee||qg()&&(Ee=window.gsap)&&Ee.registerPlugin&&Ee},Ya=function(t){return!!~km.indexOf(t)},Gg=function(t){return(t==="Height"?Tm:Xe["inner"+t])||Hn["client"+t]||nt["client"+t]},Xg=function(t){return ba(t,"getBoundingClientRect")||(Ya(t)?function(){return Cr.width=Xe.innerWidth,Cr.height=Tm,Cr}:function(){return Ro(t)})},Gx=function(t,o,a){var i=a.d,s=a.d2,l=a.a;return(l=ba(t,"getBoundingClientRect"))?function(){return l()[i]}:function(){return(o?Gg(s):t["client"+s])||0}},Xx=function(t,o){return!o||~So.indexOf(t)?Xg(t):function(){return Cr}},Co=function(t,o){var a=o.s,i=o.d2,s=o.d,l=o.a;return Math.max(0,(a="scroll"+i)&&(l=ba(t,a))?l()-Xg(t)()[s]:Ya(t)?(Hn[a]||nt[a])-Gg(i):t[a]-t["offset"+i])},or=function(t,o){for(var a=0;a<wi.length;a+=3)(!o||~o.indexOf(wi[a+1]))&&t(wi[a],wi[a+1],wi[a+2])},Fn=function(t){return typeof t=="string"},Jt=function(t){return typeof t=="function"},Os=function(t){return typeof t=="number"},Aa=function(t){return typeof t=="object"},Es=function(t,o,a){return t&&t.progress(o?0:1)&&a&&t.pause()},oc=function(t,o){if(t.enabled){var a=t._ctx?t._ctx.add(function(){return o(t)}):o(t);a&&a.totalTime&&(t.callbackAnimation=a)}},di=Math.abs,Yg="left",Kg="top",Nm="right",Sm="bottom",Fa="width",Ha="height",Ks="Right",Qs="Left",Js="Top",Zs="Bottom",At="padding",Zn="margin",Ri="Width",Bm="Height",Ot="px",eo=function(t){return Xe.getComputedStyle(t)},Yx=function(t){var o=eo(t).position;t.style.position=o==="absolute"||o==="fixed"?o:"relative"},Bh=function(t,o){for(var a in o)a in t||(t[a]=o[a]);return t},Ro=function(t,o){var a=o&&eo(t)[Ac]!=="matrix(1, 0, 0, 1, 0, 0)"&&Ee.to(t,{x:0,y:0,xPercent:0,yPercent:0,rotation:0,rotationX:0,rotationY:0,scale:1,skewX:0,skewY:0}).progress(1),i=t.getBoundingClientRect();return a&&a.progress(0).kill(),i},$r=function(t,o){var a=o.d2;return t["offset"+a]||t["client"+a]||0},Qg=function(t){var o=[],a=t.labels,i=t.duration(),s;for(s in a)o.push(a[s]/i);return o},Kx=function(t){return function(o){return Ee.utils.snap(Qg(t),o)}},Dm=function(t){var o=Ee.utils.snap(t),a=Array.isArray(t)&&t.slice(0).sort(function(i,s){return i-s});return a?function(i,s,l){l===void 0&&(l=.001);var r;if(!s)return o(i);if(s>0){for(i-=l,r=0;r<a.length;r++)if(a[r]>=i)return a[r];return a[r-1]}else for(r=a.length,i+=l;r--;)if(a[r]<=i)return a[r];return a[0]}:function(i,s,l){l===void 0&&(l=.001);var r=o(i);return!s||Math.abs(r-i)<l||r-i<0==s<0?r:o(s<0?i-t:i+t)}},Qx=function(t){return function(o,a){return Dm(Qg(t))(o,a.direction)}},ar=function(t,o,a,i){return a.split(",").forEach(function(s){return t(o,s,i)})},jt=function(t,o,a,i,s){return t.addEventListener(o,a,{passive:!i,capture:!!s})},Ht=function(t,o,a,i){return t.removeEventListener(o,a,!!i)},ir=function(t,o,a){a=a&&a.wheelHandler,a&&(t(o,"wheel",a),t(o,"touchmove",a))},Dh={startColor:"green",endColor:"red",indent:0,fontSize:"16px",fontWeight:"normal"},sr={toggleActions:"play",anticipatePin:0},Ar={top:0,left:0,center:.5,bottom:1,right:1},br=function(t,o){if(Fn(t)){var a=t.indexOf("="),i=~a?+(t.charAt(a-1)+1)*parseFloat(t.substr(a+1)):0;~a&&(t.indexOf("%")>a&&(i*=o/100),t=t.substr(0,a-1)),t=i+(t in Ar?Ar[t]*o:~t.indexOf("%")?parseFloat(t)*o/100:parseFloat(t)||0)}return t},lr=function(t,o,a,i,s,l,r,u){var c=s.startColor,f=s.endColor,m=s.fontSize,d=s.indent,h=s.fontWeight,g=mt.createElement("div"),p=Ya(a)||ba(a,"pinType")==="fixed",b=t.indexOf("scroller")!==-1,_=p?nt:a,w=t.indexOf("start")!==-1,v=w?c:f,V="border-color:"+v+";font-size:"+m+";color:"+v+";font-weight:"+h+";pointer-events:none;white-space:nowrap;font-family:sans-serif,Arial;z-index:1000;padding:4px 8px;border-width:0;border-style:solid;";return V+="position:"+((b||u)&&p?"fixed;":"absolute;"),(b||u||!p)&&(V+=(i===Mt?Nm:Sm)+":"+(l+parseFloat(d))+"px;"),r&&(V+="box-sizing:border-box;text-align:left;width:"+r.offsetWidth+"px;"),g._isStart=w,g.setAttribute("class","gsap-marker-"+t+(o?" marker-"+o:"")),g.style.cssText=V,g.innerText=o||o===0?t+"-"+o:t,_.children[0]?_.insertBefore(g,_.children[0]):_.appendChild(g),g._offset=g["offset"+i.op.d2],wr(g,0,i,w),g},wr=function(t,o,a,i){var s={display:"block"},l=a[i?"os2":"p2"],r=a[i?"p2":"os2"];t._isFlipped=i,s[a.a+"Percent"]=i?-100:0,s[a.a]=i?"1px":0,s["border"+l+Ri]=1,s["border"+r+Ri]=0,s[a.p]=o+"px",Ee.set(t,s)},We=[],Mc={},dl,Ph=function(){return Qt()-to>34&&(dl||(dl=requestAnimationFrame(Wo)))},ui=function(){(!mn||!mn.isPressed||mn.startX>nt.clientWidth)&&(Ye.cache++,mn?dl||(dl=requestAnimationFrame(Wo)):Wo(),to||Qa("scrollStart"),to=Qt())},ac=function(){zg=Xe.innerWidth,jg=Xe.innerHeight},Ms=function(t){Ye.cache++,(t===!0||!Kt&&!Hg&&!mt.fullscreenElement&&!mt.webkitFullscreenElement&&(!Lc||zg!==Xe.innerWidth||Math.abs(Xe.innerHeight-jg)>Xe.innerHeight*.25))&&Dr.restart(!0)},Ka={},Jx=[],Jg=function n(){return Ht(Ke,"scrollEnd",n)||Oa(!0)},Qa=function(t){return Ka[t]&&Ka[t].map(function(o){return o()})||Jx},Rn=[],Zg=function(t){for(var o=0;o<Rn.length;o+=5)(!t||Rn[o+4]&&Rn[o+4].query===t)&&(Rn[o].style.cssText=Rn[o+1],Rn[o].getBBox&&Rn[o].setAttribute("transform",Rn[o+2]||""),Rn[o+3].uncache=1)},Pm=function(t,o){var a;for(pn=0;pn<We.length;pn++)a=We[pn],a&&(!o||a._ctx===o)&&(t?a.kill(1):a.revert(!0,!0));Pr=!0,o&&Zg(o),o||Qa("revert")},ev=function(t,o){Ye.cache++,(o||!hn)&&Ye.forEach(function(a){return Jt(a)&&a.cacheID++&&(a.rec=0)}),Fn(t)&&(Xe.history.scrollRestoration=Em=t)},hn,ja=0,$h,Zx=function(){if($h!==ja){var t=$h=ja;requestAnimationFrame(function(){return t===ja&&Oa(!0)})}},tv=function(){nt.appendChild(Ni),Tm=!mn&&Ni.offsetHeight||Xe.innerHeight,nt.removeChild(Ni)},Ah=function(t){return rl(".gsap-marker-start, .gsap-marker-end, .gsap-marker-scroller-start, .gsap-marker-scroller-end").forEach(function(o){return o.style.display=t?"none":"block"})},Oa=function(t,o){if(Hn=mt.documentElement,nt=mt.body,km=[Xe,mt,Hn,nt],to&&!t&&!Pr){jt(Ke,"scrollEnd",Jg);return}tv(),hn=Ke.isRefreshing=!0,Ye.forEach(function(i){return Jt(i)&&++i.cacheID&&(i.rec=i())});var a=Qa("refreshInit");Fg&&Ke.sort(),o||Pm(),Ye.forEach(function(i){Jt(i)&&(i.smooth&&(i.target.style.scrollBehavior="auto"),i(0))}),We.slice(0).forEach(function(i){return i.refresh()}),Pr=!1,We.forEach(function(i){if(i._subPinOffset&&i.pin){var s=i.vars.horizontal?"offsetWidth":"offsetHeight",l=i.pin[s];i.revert(!0,1),i.adjustPinSpacing(i.pin[s]-l),i.refresh()}}),Oc=1,Ah(!0),We.forEach(function(i){var s=Co(i.scroller,i._dir),l=i.vars.end==="max"||i._endClamp&&i.end>s,r=i._startClamp&&i.start>=s;(l||r)&&i.setPositions(r?s-1:i.start,l?Math.max(r?s:i.start+1,s):i.end,!0)}),Ah(!1),Oc=0,a.forEach(function(i){return i&&i.render&&i.render(-1)}),Ye.forEach(function(i){Jt(i)&&(i.smooth&&requestAnimationFrame(function(){return i.target.style.scrollBehavior="smooth"}),i.rec&&i(i.rec))}),ev(Em,1),Dr.pause(),ja++,hn=2,Wo(2),We.forEach(function(i){return Jt(i.vars.onRefresh)&&i.vars.onRefresh(i)}),hn=Ke.isRefreshing=!1,Qa("refresh")},Uc=0,xr=1,el,Wo=function(t){if(t===2||!hn&&!Pr){Ke.isUpdating=!0,el&&el.update(0);var o=We.length,a=Qt(),i=a-nc>=50,s=o&&We[0].scroll();if(xr=Uc>s?-1:1,hn||(Uc=s),i&&(to&&!ud&&a-to>200&&(to=0,Qa("scrollEnd")),As=nc,nc=a),xr<0){for(pn=o;pn-- >0;)We[pn]&&We[pn].update(0,i);xr=1}else for(pn=0;pn<o;pn++)We[pn]&&We[pn].update(0,i);Ke.isUpdating=!1}dl=0},Rc=[Yg,Kg,Sm,Nm,Zn+Zs,Zn+Ks,Zn+Js,Zn+Qs,"display","flexShrink","float","zIndex","gridColumnStart","gridColumnEnd","gridRowStart","gridRowEnd","gridArea","justifySelf","alignSelf","placeSelf","order"],Vr=Rc.concat([Fa,Ha,"boxSizing","max"+Ri,"max"+Bm,"position",Zn,At,At+Js,At+Ks,At+Zs,At+Qs]),eV=function(t,o,a){Si(a);var i=t._gsap;if(i.spacerIsNative)Si(i.spacerState);else if(t._gsap.swappedIn){var s=o.parentNode;s&&(s.insertBefore(t,o),s.removeChild(o))}t._gsap.swappedIn=!1},ic=function(t,o,a,i){if(!t._gsap.swappedIn){for(var s=Rc.length,l=o.style,r=t.style,u;s--;)u=Rc[s],l[u]=a[u];l.position=a.position==="absolute"?"absolute":"relative",a.display==="inline"&&(l.display="inline-block"),r[Sm]=r[Nm]="auto",l.flexBasis=a.flexBasis||"auto",l.overflow="visible",l.boxSizing="border-box",l[Fa]=$r(t,gn)+Ot,l[Ha]=$r(t,Mt)+Ot,l[At]=r[Zn]=r[Kg]=r[Yg]="0",Si(i),r[Fa]=r["max"+Ri]=a[Fa],r[Ha]=r["max"+Bm]=a[Ha],r[At]=a[At],t.parentNode!==o&&(t.parentNode.insertBefore(o,t),o.appendChild(t)),t._gsap.swappedIn=!0}},tV=/([A-Z])/g,Si=function(t){if(t){var o=t.t.style,a=t.length,i=0,s,l;for((t.t._gsap||Ee.core.getCache(t.t)).uncache=1;i<a;i+=2)l=t[i+1],s=t[i],l?o[s]=l:o[s]&&o.removeProperty(s.replace(tV,"-$1").toLowerCase())}},rr=function(t){for(var o=Vr.length,a=t.style,i=[],s=0;s<o;s++)i.push(Vr[s],a[Vr[s]]);return i.t=t,i},nV=function(t,o,a){for(var i=[],s=t.length,l=a?8:0,r;l<s;l+=2)r=t[l],i.push(r,r in o?o[r]:t[l+1]);return i.t=t.t,i},Cr={left:0,top:0},Lh=function(t,o,a,i,s,l,r,u,c,f,m,d,h,g){Jt(t)&&(t=t(u)),Fn(t)&&t.substr(0,3)==="max"&&(t=d+(t.charAt(4)==="="?br("0"+t.substr(3),a):0));var p=h?h.time():0,b,_,w;if(h&&h.seek(0),isNaN(t)||(t=+t),Os(t))h&&(t=Ee.utils.mapRange(h.scrollTrigger.start,h.scrollTrigger.end,0,d,t)),r&&wr(r,a,i,!0);else{Jt(o)&&(o=o(u));var v=(t||"0").split(" "),V,C,S,N;w=xn(o,u)||nt,V=Ro(w)||{},(!V||!V.left&&!V.top)&&eo(w).display==="none"&&(N=w.style.display,w.style.display="block",V=Ro(w),N?w.style.display=N:w.style.removeProperty("display")),C=br(v[0],V[i.d]),S=br(v[1]||"0",a),t=V[i.p]-c[i.p]-f+C+s-S,r&&wr(r,S,i,a-S<20||r._isStart&&S>20),a-=a-S}if(g&&(u[g]=t||-.001,t<0&&(t=0)),l){var D=t+a,$=l._isStart;b="scroll"+i.d2,wr(l,D,i,$&&D>20||!$&&(m?Math.max(nt[b],Hn[b]):l.parentNode[b])<=D+1),m&&(c=Ro(r),m&&(l.style[i.op.p]=c[i.op.p]-i.op.m-l._offset+Ot))}return h&&w&&(b=Ro(w),h.seek(d),_=Ro(w),h._caScrollDist=b[i.p]-_[i.p],t=t/h._caScrollDist*d),h&&h.seek(p),h?t:Math.round(t)},oV=/(webkit|moz|length|cssText|inset)/i,Ih=function(t,o,a,i){if(t.parentNode!==o){var s=t.style,l,r;if(o===nt){t._stOrig=s.cssText,r=eo(t);for(l in r)!+l&&!oV.test(l)&&r[l]&&typeof s[l]=="string"&&l!=="0"&&(s[l]=r[l]);s.top=a,s.left=i}else s.cssText=t._stOrig;Ee.core.getCache(t).uncache=1,o.appendChild(t)}},nv=function(t,o,a){var i=o,s=i;return function(l){var r=Math.round(t());return r!==i&&r!==s&&Math.abs(r-i)>3&&Math.abs(r-s)>3&&(l=r,a&&a()),s=i,i=Math.round(l),i}},dr=function(t,o,a){var i={};i[o.p]="+="+a,Ee.set(t,i)},Oh=function(t,o){var a=wa(t,o),i="_scroll"+o.p2,s=function l(r,u,c,f,m){var d=l.tween,h=u.onComplete,g={};c=c||a();var p=nv(a,c,function(){d.kill(),l.tween=0});return m=f&&m||0,f=f||r-c,d&&d.kill(),u[i]=r,u.inherit=!1,u.modifiers=g,g[i]=function(){return p(c+f*d.ratio+m*d.ratio*d.ratio)},u.onUpdate=function(){Ye.cache++,l.tween&&Wo()},u.onComplete=function(){l.tween=0,h&&h.call(d)},d=l.tween=Ee.to(t,u),d};return t[i]=a,a.wheelHandler=function(){return s.tween&&s.tween.kill()&&(s.tween=0)},jt(t,"wheel",a.wheelHandler),Ke.isTouch&&jt(t,"touchmove",a.wheelHandler),s},Ke=function(){function n(o,a){bi||n.register(Ee)||console.warn("Please gsap.registerPlugin(ScrollTrigger)"),Ic(this),this.init(o,a)}var t=n.prototype;return t.init=function(a,i){if(this.progress=this.start=0,this.vars&&this.kill(!0,!0),!Ls){this.update=this.refresh=this.kill=_o;return}a=Bh(Fn(a)||Os(a)||a.nodeType?{trigger:a}:a,sr);var s=a,l=s.onUpdate,r=s.toggleClass,u=s.id,c=s.onToggle,f=s.onRefresh,m=s.scrub,d=s.trigger,h=s.pin,g=s.pinSpacing,p=s.invalidateOnRefresh,b=s.anticipatePin,_=s.onScrubComplete,w=s.onSnapComplete,v=s.once,V=s.snap,C=s.pinReparent,S=s.pinSpacer,N=s.containerAnimation,D=s.fastScrollEnd,$=s.preventOverlaps,k=a.horizontal||a.containerAnimation&&a.horizontal!==!1?gn:Mt,A=!m&&m!==0,B=xn(a.scroller||Xe),I=Ee.core.getCache(B),z=Ya(B),Y=("pinType"in a?a.pinType:ba(B,"pinType")||z&&"fixed")==="fixed",H=[a.onEnter,a.onLeave,a.onEnterBack,a.onLeaveBack],q=A&&a.toggleActions.split(" "),O="markers"in a?a.markers:sr.markers,J=z?0:parseFloat(eo(B)["border"+k.p2+Ri])||0,F=this,M=a.onRefreshInit&&function(){return a.onRefreshInit(F)},Q=Gx(B,z,k),W=Xx(B,z),Z=0,de=0,Ve=0,oe=wa(B,k),fe,Ce,Se,ae,ce,se,he,we,ke,te,ue,pe,ve,_e,Je,bt,Bn,gt,an,it,vt,sn,Gn,ta,Oe,oi,_n,na,oa,fo,Lo,qe,Io,Dn,Pn,$n,Oo,aa,Xn;if(F._startClamp=F._endClamp=!1,F._dir=k,b*=45,F.scroller=B,F.scroll=N?N.time.bind(N):oe,ae=oe(),F.vars=a,i=i||a.animation,"refreshPriority"in a&&(Fg=1,a.refreshPriority===-9999&&(el=F)),I.tweenScroll=I.tweenScroll||{top:Oh(B,Mt),left:Oh(B,gn)},F.tweenTo=fe=I.tweenScroll[k.p],F.scrubDuration=function(be){Io=Os(be)&&be,Io?qe?qe.duration(be):qe=Ee.to(i,{ease:"expo",totalProgress:"+=0",inherit:!1,duration:Io,paused:!0,onComplete:function(){return _&&_(F)}}):(qe&&qe.progress(1).kill(),qe=0)},i&&(i.vars.lazy=!1,i._initted&&!F.isReverted||i.vars.immediateRender!==!1&&a.immediateRender!==!1&&i.duration()&&i.render(0,!0,!0),F.animation=i.pause(),i.scrollTrigger=F,F.scrubDuration(m),fo=0,u||(u=i.vars.id)),V&&((!Aa(V)||V.push)&&(V={snapTo:V}),"scrollBehavior"in nt.style&&Ee.set(z?[nt,Hn]:B,{scrollBehavior:"auto"}),Ye.forEach(function(be){return Jt(be)&&be.target===(z?mt.scrollingElement||Hn:B)&&(be.smooth=!1)}),Se=Jt(V.snapTo)?V.snapTo:V.snapTo==="labels"?Kx(i):V.snapTo==="labelsDirectional"?Qx(i):V.directional!==!1?function(be,Me){return Dm(V.snapTo)(be,Qt()-de<500?0:Me.direction)}:Ee.utils.snap(V.snapTo),Dn=V.duration||{min:.1,max:2},Dn=Aa(Dn)?Ys(Dn.min,Dn.max):Ys(Dn,Dn),Pn=Ee.delayedCall(V.delay||Io/2||.1,function(){var be=oe(),Me=Qt()-de<500,Be=fe.tween;if((Me||Math.abs(F.getVelocity())<10)&&!Be&&!ud&&Z!==be){var Ie=(be-se)/_e,et=i&&!A?i.totalProgress():Ie,Qe=Me?0:(et-Lo)/(Qt()-As)*1e3||0,wt=Ee.utils.clamp(-Ie,1-Ie,di(Qe/2)*Qe/.185),Tt=Ie+(V.inertia===!1?0:wt),tt,st,De=V,An=De.onStart,dt=De.onInterrupt,Ut=De.onComplete;if(tt=Se(Tt,F),Os(tt)||(tt=Tt),st=Math.max(0,Math.round(se+tt*_e)),be<=he&&be>=se&&st!==be){if(Be&&!Be._initted&&Be.data<=di(st-be))return;V.inertia===!1&&(wt=tt-Ie),fe(st,{duration:Dn(di(Math.max(di(Tt-et),di(tt-et))*.185/Qe/.05||0)),ease:V.ease||"power3",data:di(st-be),onInterrupt:function(){return Pn.restart(!0)&&dt&&dt(F)},onComplete:function(){F.update(),Z=oe(),i&&!A&&(qe?qe.resetTo("totalProgress",tt,i._tTime/i._tDur):i.progress(tt)),fo=Lo=i&&!A?i.totalProgress():F.progress,w&&w(F),Ut&&Ut(F)}},be,wt*_e,st-be-wt*_e),An&&An(F,fe.tween)}}else F.isActive&&Z!==be&&Pn.restart(!0)}).pause()),u&&(Mc[u]=F),d=F.trigger=xn(d||h!==!0&&h),Xn=d&&d._gsap&&d._gsap.stRevert,Xn&&(Xn=Xn(F)),h=h===!0?d:xn(h),Fn(r)&&(r={targets:d,className:r}),h&&(g===!1||g===Zn||(g=!g&&h.parentNode&&h.parentNode.style&&eo(h.parentNode).display==="flex"?!1:At),F.pin=h,Ce=Ee.core.getCache(h),Ce.spacer?Je=Ce.pinState:(S&&(S=xn(S),S&&!S.nodeType&&(S=S.current||S.nativeElement),Ce.spacerIsNative=!!S,S&&(Ce.spacerState=rr(S))),Ce.spacer=gt=S||mt.createElement("div"),gt.classList.add("pin-spacer"),u&>.classList.add("pin-spacer-"+u),Ce.pinState=Je=rr(h)),a.force3D!==!1&&Ee.set(h,{force3D:!0}),F.spacer=gt=Ce.spacer,oa=eo(h),ta=oa[g+k.os2],it=Ee.getProperty(h),vt=Ee.quickSetter(h,k.a,Ot),ic(h,gt,oa),Bn=rr(h)),O){pe=Aa(O)?Bh(O,Dh):Dh,te=lr("scroller-start",u,B,k,pe,0),ue=lr("scroller-end",u,B,k,pe,0,te),an=te["offset"+k.op.d2];var Ta=xn(ba(B,"content")||B);we=this.markerStart=lr("start",u,Ta,k,pe,an,0,N),ke=this.markerEnd=lr("end",u,Ta,k,pe,an,0,N),N&&(aa=Ee.quickSetter([we,ke],k.a,Ot)),!Y&&!(So.length&&ba(B,"fixedMarkers")===!0)&&(Yx(z?nt:B),Ee.set([te,ue],{force3D:!0}),oi=Ee.quickSetter(te,k.a,Ot),na=Ee.quickSetter(ue,k.a,Ot))}if(N){var Re=N.vars.onUpdate,Ae=N.vars.onUpdateParams;N.eventCallback("onUpdate",function(){F.update(0,0,1),Re&&Re.apply(N,Ae||[])})}if(F.previous=function(){return We[We.indexOf(F)-1]},F.next=function(){return We[We.indexOf(F)+1]},F.revert=function(be,Me){if(!Me)return F.kill(!0);var Be=be!==!1||!F.enabled,Ie=Kt;Be!==F.isReverted&&(Be&&($n=Math.max(oe(),F.scroll.rec||0),Ve=F.progress,Oo=i&&i.progress()),we&&[we,ke,te,ue].forEach(function(et){return et.style.display=Be?"none":"block"}),Be&&(Kt=F,F.update(Be)),h&&(!C||!F.isActive)&&(Be?eV(h,gt,Je):ic(h,gt,eo(h),Oe)),Be||F.update(Be),Kt=Ie,F.isReverted=Be)},F.refresh=function(be,Me,Be,Ie){if(!((Kt||!F.enabled)&&!Me)){if(h&&be&&to){jt(n,"scrollEnd",Jg);return}!hn&&M&&M(F),Kt=F,fe.tween&&!Be&&(fe.tween.kill(),fe.tween=0),qe&&qe.pause(),p&&i&&(i.revert({kill:!1}).invalidate(),i.getChildren&&i.getChildren(!0,!0,!1).forEach(function(In){return In.vars.immediateRender&&In.render(0,!0,!0)})),F.isReverted||F.revert(!0,!0),F._subPinOffset=!1;var et=Q(),Qe=W(),wt=N?N.duration():Co(B,k),Tt=_e<=.01||!_e,tt=0,st=Ie||0,De=Aa(Be)?Be.end:a.end,An=a.endTrigger||d,dt=Aa(Be)?Be.start:a.start||(a.start===0||!d?0:h?"0 0":"0 100%"),Ut=F.pinnedContainer=a.pinnedContainer&&xn(a.pinnedContainer,F),Yn=d&&Math.max(0,We.indexOf(F))||0,ht=Yn,He,It,Kn,ai,Rt,Nt,Ln,Na,ii,ia,Qn,Sa,Mo;for(O&&Aa(Be)&&(Sa=Ee.getProperty(te,k.p),Mo=Ee.getProperty(ue,k.p));ht-- >0;)Nt=We[ht],Nt.end||Nt.refresh(0,1)||(Kt=F),Ln=Nt.pin,Ln&&(Ln===d||Ln===h||Ln===Ut)&&!Nt.isReverted&&(ia||(ia=[]),ia.unshift(Nt),Nt.revert(!0,!0)),Nt!==We[ht]&&(Yn--,ht--);for(Jt(dt)&&(dt=dt(F)),dt=Eh(dt,"start",F),se=Lh(dt,d,et,k,oe(),we,te,F,Qe,J,Y,wt,N,F._startClamp&&"_startClamp")||(h?-.001:0),Jt(De)&&(De=De(F)),Fn(De)&&!De.indexOf("+=")&&(~De.indexOf(" ")?De=(Fn(dt)?dt.split(" ")[0]:"")+De:(tt=br(De.substr(2),et),De=Fn(dt)?dt:(N?Ee.utils.mapRange(0,N.duration(),N.scrollTrigger.start,N.scrollTrigger.end,se):se)+tt,An=d)),De=Eh(De,"end",F),he=Math.max(se,Lh(De||(An?"100% 0":wt),An,et,k,oe()+tt,ke,ue,F,Qe,J,Y,wt,N,F._endClamp&&"_endClamp"))||-.001,tt=0,ht=Yn;ht--;)Nt=We[ht],Ln=Nt.pin,Ln&&Nt.start-Nt._pinPush<=se&&!N&&Nt.end>0&&(He=Nt.end-(F._startClamp?Math.max(0,Nt.start):Nt.start),(Ln===d&&Nt.start-Nt._pinPush<se||Ln===Ut)&&isNaN(dt)&&(tt+=He*(1-Nt.progress)),Ln===h&&(st+=He));if(se+=tt,he+=tt,F._startClamp&&(F._startClamp+=tt),F._endClamp&&!hn&&(F._endClamp=he||-.001,he=Math.min(he,Co(B,k))),_e=he-se||(se-=.01)&&.001,Tt&&(Ve=Ee.utils.clamp(0,1,Ee.utils.normalize(se,he,$n))),F._pinPush=st,we&&tt&&(He={},He[k.a]="+="+tt,Ut&&(He[k.p]="-="+oe()),Ee.set([we,ke],He)),h&&!(Oc&&F.end>=Co(B,k)))He=eo(h),ai=k===Mt,Kn=oe(),sn=parseFloat(it(k.a))+st,!wt&&he>1&&(Qn=(z?mt.scrollingElement||Hn:B).style,Qn={style:Qn,value:Qn["overflow"+k.a.toUpperCase()]},z&&eo(nt)["overflow"+k.a.toUpperCase()]!=="scroll"&&(Qn.style["overflow"+k.a.toUpperCase()]="scroll")),ic(h,gt,He),Bn=rr(h),It=Ro(h,!0),Na=Y&&wa(B,ai?gn:Mt)(),g?(Oe=[g+k.os2,_e+st+Ot],Oe.t=gt,ht=g===At?$r(h,k)+_e+st:0,ht&&(Oe.push(k.d,ht+Ot),gt.style.flexBasis!=="auto"&&(gt.style.flexBasis=ht+Ot)),Si(Oe),Ut&&We.forEach(function(In){In.pin===Ut&&In.vars.pinSpacing!==!1&&(In._subPinOffset=!0)}),Y&&oe($n)):(ht=$r(h,k),ht&>.style.flexBasis!=="auto"&&(gt.style.flexBasis=ht+Ot)),Y&&(Rt={top:It.top+(ai?Kn-se:Na)+Ot,left:It.left+(ai?Na:Kn-se)+Ot,boxSizing:"border-box",position:"fixed"},Rt[Fa]=Rt["max"+Ri]=Math.ceil(It.width)+Ot,Rt[Ha]=Rt["max"+Bm]=Math.ceil(It.height)+Ot,Rt[Zn]=Rt[Zn+Js]=Rt[Zn+Ks]=Rt[Zn+Zs]=Rt[Zn+Qs]="0",Rt[At]=He[At],Rt[At+Js]=He[At+Js],Rt[At+Ks]=He[At+Ks],Rt[At+Zs]=He[At+Zs],Rt[At+Qs]=He[At+Qs],bt=nV(Je,Rt,C),hn&&oe(0)),i?(ii=i._initted,ec(1),i.render(i.duration(),!0,!0),Gn=it(k.a)-sn+_e+st,_n=Math.abs(_e-Gn)>1,Y&&_n&&bt.splice(bt.length-2,2),i.render(0,!0,!0),ii||i.invalidate(!0),i.parent||i.totalTime(i.totalTime()),ec(0)):Gn=_e,Qn&&(Qn.value?Qn.style["overflow"+k.a.toUpperCase()]=Qn.value:Qn.style.removeProperty("overflow-"+k.a));else if(d&&oe()&&!N)for(It=d.parentNode;It&&It!==nt;)It._pinOffset&&(se-=It._pinOffset,he-=It._pinOffset),It=It.parentNode;ia&&ia.forEach(function(In){return In.revert(!1,!0)}),F.start=se,F.end=he,ae=ce=hn?$n:oe(),!N&&!hn&&(ae<$n&&oe($n),F.scroll.rec=0),F.revert(!1,!0),de=Qt(),Pn&&(Z=-1,Pn.restart(!0)),Kt=0,i&&A&&(i._initted||Oo)&&i.progress()!==Oo&&i.progress(Oo||0,!0).render(i.time(),!0,!0),(Tt||Ve!==F.progress||N||p||i&&!i._initted)&&(i&&!A&&(i._initted||Ve||i.vars.immediateRender!==!1)&&i.totalProgress(N&&se<-.001&&!Ve?Ee.utils.normalize(se,he,0):Ve,!0),F.progress=Tt||(ae-se)/_e===Ve?0:Ve),h&&g&&(gt._pinOffset=Math.round(F.progress*Gn)),qe&&qe.invalidate(),isNaN(Sa)||(Sa-=Ee.getProperty(te,k.p),Mo-=Ee.getProperty(ue,k.p),dr(te,k,Sa),dr(we,k,Sa-(Ie||0)),dr(ue,k,Mo),dr(ke,k,Mo-(Ie||0))),Tt&&!hn&&F.update(),f&&!hn&&!ve&&(ve=!0,f(F),ve=!1)}},F.getVelocity=function(){return(oe()-ce)/(Qt()-As)*1e3||0},F.endAnimation=function(){Es(F.callbackAnimation),i&&(qe?qe.progress(1):i.paused()?A||Es(i,F.direction<0,1):Es(i,i.reversed()))},F.labelToScroll=function(be){return i&&i.labels&&(se||F.refresh()||se)+i.labels[be]/i.duration()*_e||0},F.getTrailing=function(be){var Me=We.indexOf(F),Be=F.direction>0?We.slice(0,Me).reverse():We.slice(Me+1);return(Fn(be)?Be.filter(function(Ie){return Ie.vars.preventOverlaps===be}):Be).filter(function(Ie){return F.direction>0?Ie.end<=se:Ie.start>=he})},F.update=function(be,Me,Be){if(!(N&&!Be&&!be)){var Ie=hn===!0?$n:F.scroll(),et=be?0:(Ie-se)/_e,Qe=et<0?0:et>1?1:et||0,wt=F.progress,Tt,tt,st,De,An,dt,Ut,Yn;if(Me&&(ce=ae,ae=N?oe():Ie,V&&(Lo=fo,fo=i&&!A?i.totalProgress():Qe)),b&&h&&!Kt&&!nr&&to&&(!Qe&&se<Ie+(Ie-ce)/(Qt()-As)*b?Qe=1e-4:Qe===1&&he>Ie+(Ie-ce)/(Qt()-As)*b&&(Qe=.9999)),Qe!==wt&&F.enabled){if(Tt=F.isActive=!!Qe&&Qe<1,tt=!!wt&&wt<1,dt=Tt!==tt,An=dt||!!Qe!=!!wt,F.direction=Qe>wt?1:-1,F.progress=Qe,An&&!Kt&&(st=Qe&&!wt?0:Qe===1?1:wt===1?2:3,A&&(De=!dt&&q[st+1]!=="none"&&q[st+1]||q[st],Yn=i&&(De==="complete"||De==="reset"||De in i))),$&&(dt||Yn)&&(Yn||m||!i)&&(Jt($)?$(F):F.getTrailing($).forEach(function(Kn){return Kn.endAnimation()})),A||(qe&&!Kt&&!nr?(qe._dp._time-qe._start!==qe._time&&qe.render(qe._dp._time-qe._start),qe.resetTo?qe.resetTo("totalProgress",Qe,i._tTime/i._tDur):(qe.vars.totalProgress=Qe,qe.invalidate().restart())):i&&i.totalProgress(Qe,!!(Kt&&(de||be)))),h){if(be&&g&&(gt.style[g+k.os2]=ta),!Y)vt(Is(sn+Gn*Qe));else if(An){if(Ut=!be&&Qe>wt&&he+1>Ie&&Ie+1>=Co(B,k),C)if(!be&&(Tt||Ut)){var ht=Ro(h,!0),He=Ie-se;Ih(h,nt,ht.top+(k===Mt?He:0)+Ot,ht.left+(k===Mt?0:He)+Ot)}else Ih(h,gt);Si(Tt||Ut?bt:Bn),_n&&Qe<1&&Tt||vt(sn+(Qe===1&&!Ut?Gn:0))}}V&&!fe.tween&&!Kt&&!nr&&Pn.restart(!0),r&&(dt||v&&Qe&&(Qe<1||!tc))&&rl(r.targets).forEach(function(Kn){return Kn.classList[Tt||v?"add":"remove"](r.className)}),l&&!A&&!be&&l(F),An&&!Kt?(A&&(Yn&&(De==="complete"?i.pause().totalProgress(1):De==="reset"?i.restart(!0).pause():De==="restart"?i.restart(!0):i[De]()),l&&l(F)),(dt||!tc)&&(c&&dt&&oc(F,c),H[st]&&oc(F,H[st]),v&&(Qe===1?F.kill(!1,1):H[st]=0),dt||(st=Qe===1?1:3,H[st]&&oc(F,H[st]))),D&&!Tt&&Math.abs(F.getVelocity())>(Os(D)?D:2500)&&(Es(F.callbackAnimation),qe?qe.progress(1):Es(i,De==="reverse"?1:!Qe,1))):A&&l&&!Kt&&l(F)}if(na){var It=N?Ie/N.duration()*(N._caScrollDist||0):Ie;oi(It+(te._isFlipped?1:0)),na(It)}aa&&aa(-Ie/N.duration()*(N._caScrollDist||0))}},F.enable=function(be,Me){F.enabled||(F.enabled=!0,jt(B,"resize",Ms),z||jt(B,"scroll",ui),M&&jt(n,"refreshInit",M),be!==!1&&(F.progress=Ve=0,ae=ce=Z=oe()),Me!==!1&&F.refresh())},F.getTween=function(be){return be&&fe?fe.tween:qe},F.setPositions=function(be,Me,Be,Ie){if(N){var et=N.scrollTrigger,Qe=N.duration(),wt=et.end-et.start;be=et.start+wt*be/Qe,Me=et.start+wt*Me/Qe}F.refresh(!1,!1,{start:Th(be,Be&&!!F._startClamp),end:Th(Me,Be&&!!F._endClamp)},Ie),F.update()},F.adjustPinSpacing=function(be){if(Oe&&be){var Me=Oe.indexOf(k.d)+1;Oe[Me]=parseFloat(Oe[Me])+be+Ot,Oe[1]=parseFloat(Oe[1])+be+Ot,Si(Oe)}},F.disable=function(be,Me){if(F.enabled&&(be!==!1&&F.revert(!0,!0),F.enabled=F.isActive=!1,Me||qe&&qe.pause(),$n=0,Ce&&(Ce.uncache=1),M&&Ht(n,"refreshInit",M),Pn&&(Pn.pause(),fe.tween&&fe.tween.kill()&&(fe.tween=0)),!z)){for(var Be=We.length;Be--;)if(We[Be].scroller===B&&We[Be]!==F)return;Ht(B,"resize",Ms),z||Ht(B,"scroll",ui)}},F.kill=function(be,Me){F.disable(be,Me),qe&&!Me&&qe.kill(),u&&delete Mc[u];var Be=We.indexOf(F);Be>=0&&We.splice(Be,1),Be===pn&&xr>0&&pn--,Be=0,We.forEach(function(Ie){return Ie.scroller===F.scroller&&(Be=1)}),Be||hn||(F.scroll.rec=0),i&&(i.scrollTrigger=null,be&&i.revert({kill:!1}),Me||i.kill()),we&&[we,ke,te,ue].forEach(function(Ie){return Ie.parentNode&&Ie.parentNode.removeChild(Ie)}),el===F&&(el=0),h&&(Ce&&(Ce.uncache=1),Be=0,We.forEach(function(Ie){return Ie.pin===h&&Be++}),Be||(Ce.spacer=0)),a.onKill&&a.onKill(F)},We.push(F),F.enable(!1,!1),Xn&&Xn(F),i&&i.add&&!_e){var Ze=F.update;F.update=function(){F.update=Ze,Ye.cache++,se||he||F.refresh()},Ee.delayedCall(.01,F.update),_e=.01,se=he=0}else F.refresh();h&&Zx()},n.register=function(a){return bi||(Ee=a||Wg(),qg()&&window.document&&n.enable(),bi=Ls),bi},n.defaults=function(a){if(a)for(var i in a)sr[i]=a[i];return sr},n.disable=function(a,i){Ls=0,We.forEach(function(l){return l[i?"kill":"disable"](a)}),Ht(Xe,"wheel",ui),Ht(mt,"scroll",ui),clearInterval(tr),Ht(mt,"touchcancel",_o),Ht(nt,"touchstart",_o),ar(Ht,mt,"pointerdown,touchstart,mousedown",Nh),ar(Ht,mt,"pointerup,touchend,mouseup",Sh),Dr.kill(),or(Ht);for(var s=0;s<Ye.length;s+=3)ir(Ht,Ye[s],Ye[s+1]),ir(Ht,Ye[s],Ye[s+2])},n.enable=function(){if(Xe=window,mt=document,Hn=mt.documentElement,nt=mt.body,Ee&&(rl=Ee.utils.toArray,Ys=Ee.utils.clamp,Ic=Ee.core.context||_o,ec=Ee.core.suppressOverwrites||_o,Em=Xe.history.scrollRestoration||"auto",Uc=Xe.pageYOffset||0,Ee.core.globals("ScrollTrigger",n),nt)){Ls=1,Ni=document.createElement("div"),Ni.style.height="100vh",Ni.style.position="absolute",tv(),Wx(),Pt.register(Ee),n.isTouch=Pt.isTouch,ha=Pt.isTouch&&/(iPad|iPhone|iPod|Mac)/g.test(navigator.userAgent),Lc=Pt.isTouch===1,jt(Xe,"wheel",ui),km=[Xe,mt,Hn,nt],Ee.matchMedia?(n.matchMedia=function(c){var f=Ee.matchMedia(),m;for(m in c)f.add(m,c[m]);return f},Ee.addEventListener("matchMediaInit",function(){return Pm()}),Ee.addEventListener("matchMediaRevert",function(){return Zg()}),Ee.addEventListener("matchMedia",function(){Oa(0,1),Qa("matchMedia")}),Ee.matchMedia().add("(orientation: portrait)",function(){return ac(),ac})):console.warn("Requires GSAP 3.11.0 or later"),ac(),jt(mt,"scroll",ui);var a=nt.hasAttribute("style"),i=nt.style,s=i.borderTopStyle,l=Ee.core.Animation.prototype,r,u;for(l.revert||Object.defineProperty(l,"revert",{value:function(){return this.time(-.01,!0)}}),i.borderTopStyle="solid",r=Ro(nt),Mt.m=Math.round(r.top+Mt.sc())||0,gn.m=Math.round(r.left+gn.sc())||0,s?i.borderTopStyle=s:i.removeProperty("border-top-style"),a||(nt.setAttribute("style",""),nt.removeAttribute("style")),tr=setInterval(Ph,250),Ee.delayedCall(.5,function(){return nr=0}),jt(mt,"touchcancel",_o),jt(nt,"touchstart",_o),ar(jt,mt,"pointerdown,touchstart,mousedown",Nh),ar(jt,mt,"pointerup,touchend,mouseup",Sh),Ac=Ee.utils.checkPrefix("transform"),Vr.push(Ac),bi=Qt(),Dr=Ee.delayedCall(.2,Oa).pause(),wi=[mt,"visibilitychange",function(){var c=Xe.innerWidth,f=Xe.innerHeight;mt.hidden?(Ch=c,kh=f):(Ch!==c||kh!==f)&&Ms()},mt,"DOMContentLoaded",Oa,Xe,"load",Oa,Xe,"resize",Ms],or(jt),We.forEach(function(c){return c.enable(0,1)}),u=0;u<Ye.length;u+=3)ir(Ht,Ye[u],Ye[u+1]),ir(Ht,Ye[u],Ye[u+2])}},n.config=function(a){"limitCallbacks"in a&&(tc=!!a.limitCallbacks);var i=a.syncInterval;i&&clearInterval(tr)||(tr=i)&&setInterval(Ph,i),"ignoreMobileResize"in a&&(Lc=n.isTouch===1&&a.ignoreMobileResize),"autoRefreshEvents"in a&&(or(Ht)||or(jt,a.autoRefreshEvents||"none"),Hg=(a.autoRefreshEvents+"").indexOf("resize")===-1)},n.scrollerProxy=function(a,i){var s=xn(a),l=Ye.indexOf(s),r=Ya(s);~l&&Ye.splice(l,r?6:2),i&&(r?So.unshift(Xe,i,nt,i,Hn,i):So.unshift(s,i))},n.clearMatchMedia=function(a){We.forEach(function(i){return i._ctx&&i._ctx.query===a&&i._ctx.kill(!0,!0)})},n.isInViewport=function(a,i,s){var l=(Fn(a)?xn(a):a).getBoundingClientRect(),r=l[s?Fa:Ha]*i||0;return s?l.right-r>0&&l.left+r<Xe.innerWidth:l.bottom-r>0&&l.top+r<Xe.innerHeight},n.positionInViewport=function(a,i,s){Fn(a)&&(a=xn(a));var l=a.getBoundingClientRect(),r=l[s?Fa:Ha],u=i==null?r/2:i in Ar?Ar[i]*r:~i.indexOf("%")?parseFloat(i)*r/100:parseFloat(i)||0;return s?(l.left+u)/Xe.innerWidth:(l.top+u)/Xe.innerHeight},n.killAll=function(a){if(We.slice(0).forEach(function(s){return s.vars.id!=="ScrollSmoother"&&s.kill()}),a!==!0){var i=Ka.killAll||[];Ka={},i.forEach(function(s){return s()})}},n}();Ke.version="3.13.0";Ke.saveStyles=function(n){return n?rl(n).forEach(function(t){if(t&&t.style){var o=Rn.indexOf(t);o>=0&&Rn.splice(o,5),Rn.push(t,t.style.cssText,t.getBBox&&t.getAttribute("transform"),Ee.core.getCache(t),Ic())}}):Rn};Ke.revert=function(n,t){return Pm(!n,t)};Ke.create=function(n,t){return new Ke(n,t)};Ke.refresh=function(n){return n?Ms(!0):(bi||Ke.register())&&Oa(!0)};Ke.update=function(n){return++Ye.cache&&Wo(n===!0?2:0)};Ke.clearScrollMemory=ev;Ke.maxScroll=function(n,t){return Co(n,t?gn:Mt)};Ke.getScrollFunc=function(n,t){return wa(xn(n),t?gn:Mt)};Ke.getById=function(n){return Mc[n]};Ke.getAll=function(){return We.filter(function(n){return n.vars.id!=="ScrollSmoother"})};Ke.isScrolling=function(){return!!to};Ke.snapDirectional=Dm;Ke.addEventListener=function(n,t){var o=Ka[n]||(Ka[n]=[]);~o.indexOf(t)||o.push(t)};Ke.removeEventListener=function(n,t){var o=Ka[n],a=o&&o.indexOf(t);a>=0&&o.splice(a,1)};Ke.batch=function(n,t){var o=[],a={},i=t.interval||.016,s=t.batchMax||1e9,l=function(c,f){var m=[],d=[],h=Ee.delayedCall(i,function(){f(m,d),m=[],d=[]}).pause();return function(g){m.length||h.restart(!0),m.push(g.trigger),d.push(g),s<=m.length&&h.progress(1)}},r;for(r in t)a[r]=r.substr(0,2)==="on"&&Jt(t[r])&&r!=="onRefreshInit"?l(r,t[r]):t[r];return Jt(s)&&(s=s(),jt(Ke,"refresh",function(){return s=t.batchMax()})),rl(n).forEach(function(u){var c={};for(r in a)c[r]=a[r];c.trigger=u,o.push(Ke.create(c))}),o};var Mh=function(t,o,a,i){return o>i?t(i):o<0&&t(0),a>i?(i-o)/(a-o):a<0?o/(o-a):1},sc=function n(t,o){o===!0?t.style.removeProperty("touch-action"):t.style.touchAction=o===!0?"auto":o?"pan-"+o+(Pt.isTouch?" pinch-zoom":""):"none",t===Hn&&n(nt,o)},ur={auto:1,scroll:1},aV=function(t){var o=t.event,a=t.target,i=t.axis,s=(o.changedTouches?o.changedTouches[0]:o).target,l=s._gsap||Ee.core.getCache(s),r=Qt(),u;if(!l._isScrollT||r-l._isScrollT>2e3){for(;s&&s!==nt&&(s.scrollHeight<=s.clientHeight&&s.scrollWidth<=s.clientWidth||!(ur[(u=eo(s)).overflowY]||ur[u.overflowX]));)s=s.parentNode;l._isScroll=s&&s!==a&&!Ya(s)&&(ur[(u=eo(s)).overflowY]||ur[u.overflowX]),l._isScrollT=r}(l._isScroll||i==="x")&&(o.stopPropagation(),o._gsapAllow=!0)},ov=function(t,o,a,i){return Pt.create({target:t,capture:!0,debounce:!1,lockAxis:!0,type:o,onWheel:i=i&&aV,onPress:i,onDrag:i,onScroll:i,onEnable:function(){return a&&jt(mt,Pt.eventTypes[0],Rh,!1,!0)},onDisable:function(){return Ht(mt,Pt.eventTypes[0],Rh,!0)}})},iV=/(input|label|select|textarea)/i,Uh,Rh=function(t){var o=iV.test(t.target.tagName);(o||Uh)&&(t._gsapAllow=!0,Uh=o)},sV=function(t){Aa(t)||(t={}),t.preventDefault=t.isNormalizer=t.allowClicks=!0,t.type||(t.type="wheel,touch"),t.debounce=!!t.debounce,t.id=t.id||"normalizer";var o=t,a=o.normalizeScrollX,i=o.momentum,s=o.allowNestedScroll,l=o.onRelease,r,u,c=xn(t.target)||Hn,f=Ee.core.globals().ScrollSmoother,m=f&&f.get(),d=ha&&(t.content&&xn(t.content)||m&&t.content!==!1&&!m.smooth()&&m.content()),h=wa(c,Mt),g=wa(c,gn),p=1,b=(Pt.isTouch&&Xe.visualViewport?Xe.visualViewport.scale*Xe.visualViewport.width:Xe.outerWidth)/Xe.innerWidth,_=0,w=Jt(i)?function(){return i(r)}:function(){return i||2.8},v,V,C=ov(c,t.type,!0,s),S=function(){return V=!1},N=_o,D=_o,$=function(){u=Co(c,Mt),D=Ys(ha?1:0,u),a&&(N=Ys(0,Co(c,gn))),v=ja},k=function(){d._gsap.y=Is(parseFloat(d._gsap.y)+h.offset)+"px",d.style.transform="matrix3d(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, "+parseFloat(d._gsap.y)+", 0, 1)",h.offset=h.cacheID=0},A=function(){if(V){requestAnimationFrame(S);var O=Is(r.deltaY/2),J=D(h.v-O);if(d&&J!==h.v+h.offset){h.offset=J-h.v;var F=Is((parseFloat(d&&d._gsap.y)||0)-h.offset);d.style.transform="matrix3d(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, "+F+", 0, 1)",d._gsap.y=F+"px",h.cacheID=Ye.cache,Wo()}return!0}h.offset&&k(),V=!0},B,I,z,Y,H=function(){$(),B.isActive()&&B.vars.scrollY>u&&(h()>u?B.progress(1)&&h(u):B.resetTo("scrollY",u))};return d&&Ee.set(d,{y:"+=0"}),t.ignoreCheck=function(q){return ha&&q.type==="touchmove"&&A()||p>1.05&&q.type!=="touchstart"||r.isGesturing||q.touches&&q.touches.length>1},t.onPress=function(){V=!1;var q=p;p=Is((Xe.visualViewport&&Xe.visualViewport.scale||1)/b),B.pause(),q!==p&&sc(c,p>1.01?!0:a?!1:"x"),I=g(),z=h(),$(),v=ja},t.onRelease=t.onGestureStart=function(q,O){if(h.offset&&k(),!O)Y.restart(!0);else{Ye.cache++;var J=w(),F,M;a&&(F=g(),M=F+J*.05*-q.velocityX/.227,J*=Mh(g,F,M,Co(c,gn)),B.vars.scrollX=N(M)),F=h(),M=F+J*.05*-q.velocityY/.227,J*=Mh(h,F,M,Co(c,Mt)),B.vars.scrollY=D(M),B.invalidate().duration(J).play(.01),(ha&&B.vars.scrollY>=u||F>=u-1)&&Ee.to({},{onUpdate:H,duration:J})}l&&l(q)},t.onWheel=function(){B._ts&&B.pause(),Qt()-_>1e3&&(v=0,_=Qt())},t.onChange=function(q,O,J,F,M){if(ja!==v&&$(),O&&a&&g(N(F[2]===O?I+(q.startX-q.x):g()+O-F[1])),J){h.offset&&k();var Q=M[2]===J,W=Q?z+q.startY-q.y:h()+J-M[1],Z=D(W);Q&&W!==Z&&(z+=Z-W),h(Z)}(J||O)&&Wo()},t.onEnable=function(){sc(c,a?!1:"x"),Ke.addEventListener("refresh",H),jt(Xe,"resize",H),h.smooth&&(h.target.style.scrollBehavior="auto",h.smooth=g.smooth=!1),C.enable()},t.onDisable=function(){sc(c,!0),Ht(Xe,"resize",H),Ke.removeEventListener("refresh",H),C.kill()},t.lockAxis=t.lockAxis!==!1,r=new Pt(t),r.iOS=ha,ha&&!h()&&h(1),ha&&Ee.ticker.add(_o),Y=r._dc,B=Ee.to(r,{ease:"power4",paused:!0,inherit:!1,scrollX:a?"+=0.1":"+=0",scrollY:"+=0.1",modifiers:{scrollY:nv(h,h(),function(){return B.pause()})},onUpdate:Wo,onComplete:Y.vars.onComplete}),r};Ke.sort=function(n){if(Jt(n))return We.sort(n);var t=Xe.pageYOffset||0;return Ke.getAll().forEach(function(o){return o._sortY=o.trigger?t+o.trigger.getBoundingClientRect().top:o.start+Xe.innerHeight}),We.sort(n||function(o,a){return(o.vars.refreshPriority||0)*-1e6+(o.vars.containerAnimation?1e6:o._sortY)-((a.vars.containerAnimation?1e6:a._sortY)+(a.vars.refreshPriority||0)*-1e6)})};Ke.observe=function(n){return new Pt(n)};Ke.normalizeScroll=function(n){if(typeof n>"u")return mn;if(n===!0&&mn)return mn.enable();if(n===!1){mn&&mn.kill(),mn=n;return}var t=n instanceof Pt?n:sV(n);return mn&&mn.target===t.target&&mn.kill(),Ya(t.target)&&(mn=t),t};Ke.core={_getVelocityProp:$c,_inputObserver:ov,_scrollers:Ye,_proxies:So,bridge:{ss:function(){to||Qa("scrollStart"),to=Qt()},ref:function(){return Kt}}};Wg()&&Ee.registerPlugin(Ke);const lV={class:"gallery-timeline"},rV={class:"gallery-timeline__list"},dV={class:"list__wrapper"},uV={class:"timeline__list"},cV=["innerHTML"],mV=["innerHTML"],pV=["innerHTML"],hV=["innerHTML"],fV={key:2,class:"my-3 my-md-5 pe-4"},gV=["href"],vV={class:"timeline__item__button__text"},yV={key:1,class:"timeline__item__button d-inline-block"},_V={class:"timeline__item__button__text"},bV={key:0,class:"d-flex justify-content-center mt-6"},wV=e.defineComponent({name:"GalleryTimeline",__name:"index",props:{modelValue:{type:Object,default:()=>{}},isPreview:{type:Boolean,default:!0}},emits:["update:modelValue","handleDelete","handleCopy","handlePaste"],setup(n,{emit:t}){if(typeof window<"u")try{Sr.gsap.registerPlugin(Ke)}catch{}const o=n,a=t,i=e.computed(()=>typeof window>"u"?1024:window.innerWidth),s=()=>{var B;if(o.modelValue&&o.modelValue.data)return;const A={id:((B=o.modelValue)==null?void 0:B.id)||R(),type:"GalleryTimeline",onlyShowPc:!1,bgColor:"",data:[{id:R(),title:"标题",text:"内容",date:"1990",imgSrc:"https://osswebsite-test.cedim.cn/media-library/ywies-bj/images/home/ywies-tx.jpg",alt:"",url:"",btnText:"按钮"},{id:R(),title:"标题",text:"内容",date:"2000",imgSrc:"https://osswebsite-test.cedim.cn/media-library/ywies-bj/images/home/ywies-tx.jpg",alt:"",url:"",btnText:"按钮"}]};a("update:modelValue",A)},l=e.computed(()=>{var A;return o.isPreview?!((A=o.modelValue)!=null&&A.onlyShowPc)||!Ne():!0}),r=e.ref(!1),u=e.ref(!1),c=()=>{a("handleDelete",o.modelValue.id)},f=()=>{a("handleCopy",o.modelValue)},m=A=>{a("handlePaste",A)};s();let d=null;const h=e.ref(5),g=e.ref(5);let p=null;const b=e.computed(()=>{var A;return((A=o.modelValue)==null?void 0:A.data)??null}),_=e.computed(()=>{var A;return i.value>=768?b.value:(A=b.value)==null?void 0:A.slice(0,h.value)}),w=e.computed(()=>{var A;return i.value<=767.98&&h.value<((A=b.value)==null?void 0:A.length)}),v=()=>typeof window<"u"?Math.round(window.pageYOffset):0,V=e.computed(()=>v());e.watch(()=>V.value,()=>{i.value>=768||k(D,5e3)}),e.watch(()=>_.value,()=>{D()});const C=e.ref([]),S=e.ref([]),N=e.ref(null),D=()=>{d=null,e.nextTick($)},$=()=>{var z,Y;d=Sr.gsap.timeline();const A=C.value,B=S.value,I=(Y=(z=N.value)==null?void 0:z.$el)==null?void 0:Y.querySelector(".simplebar-content-wrapper");!A||!B||A.forEach((H,q)=>{d.fromTo(H,{"--line-height":"0%"},{"--line-height":"100%",scrollTrigger:{start:()=>(typeof window>"u"?1024:window.innerWidth)<768?"top center":`top top+=${50+q*35}px`,end:()=>(typeof window>"u"?1024:window.innerWidth)<768?"center center":`bottom center+=${q*25}px`,scrub:1,trigger:B[q],scroller:I,onEnter:O=>{O.trigger.classList.add("is-enter")},onEnterBack:O=>{O.trigger.classList.remove("is-enter")},onLeaveBack:O=>{O.trigger.classList.remove("is-enter")}}})})},k=(A,B)=>{p?p+B<Date.now()&&(A(),p=Date.now()):(A(),p=Date.now())};return e.onMounted(()=>{e.nextTick($)}),(A,B)=>{var z;const I=e.resolveComponent("a-image");return e.openBlock(),e.createElementBlock(e.Fragment,null,[l.value?(e.openBlock(),e.createElementBlock("div",{key:0,class:"gallery-list",onMouseenter:B[3]||(B[3]=Y=>r.value=!0),onMouseleave:B[4]||(B[4]=Y=>r.value=!1)},[e.createElementVNode("div",{class:"gallery-container gallery-timeline container-content",style:e.normalizeStyle({backgroundColor:(z=n.modelValue)==null?void 0:z.bgColor})},[e.createElementVNode("div",lV,[e.createElementVNode("div",rV,[e.createVNode(Zi,{hideScrollbar:i.value<768,ref_key:"scroller",ref:N},{default:e.withCtx(()=>{var Y;return[e.createElementVNode("div",dV,[e.createElementVNode("ul",uV,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList((Y=n.modelValue)==null?void 0:Y.data,H=>(e.openBlock(),e.createElementBlock("li",{class:"timeline__item",key:H.id,ref_for:!0,ref:q=>{q&&S.value.push(q)}},[e.createElementVNode("div",{class:"item__line",ref_for:!0,ref:q=>{q&&C.value.push(q)}},[...B[6]||(B[6]=[e.createElementVNode("div",{class:"item__line__mobile"},null,-1),e.createElementVNode("div",{class:"item__dot"},null,-1)])],512),e.createElementVNode("div",{class:e.normalizeClass(["d-flex flex-column flex-md-row justify-content-between",{"has-date":!!H.date}])},[e.createElementVNode("div",null,[H.date?e.withDirectives((e.openBlock(),e.createElementBlock("h4",{key:1,class:"text-blue-dark",innerHTML:H.title},null,8,mV)),[[e.vShow,H.title]]):e.withDirectives((e.openBlock(),e.createElementBlock("h6",{key:0,class:"text-blue-dark",innerHTML:H.title},null,8,cV)),[[e.vShow,H.title]]),e.withDirectives(e.createElementVNode("div",{class:"tx-body-big text-blue-dark mb-3 mb-md-5 pe-3",innerHTML:H.date},null,8,pV),[[e.vShow,H.date]]),e.withDirectives(e.createElementVNode("div",{class:"tx-body-p text-teal-darkest mb-3 mb-md-5 pe-3",innerHTML:H.text},null,8,hV),[[e.vShow,H.text]]),H.url?(e.openBlock(),e.createElementBlock("div",fV,[n.isPreview?(e.openBlock(),e.createElementBlock("a",{key:0,href:H.url,target:"_blank",class:"timeline__item__button d-inline-block"},[e.createElementVNode("div",vV,e.toDisplayString(H.btnText),1)],8,gV)):(e.openBlock(),e.createElementBlock("button",yV,[e.createElementVNode("div",_V,e.toDisplayString(H.btnText),1)]))])):e.createCommentVNode("",!0)]),H.imgSrc?(e.openBlock(),e.createBlock(I,{key:0,class:"flex-shrink-0 img-fit mb-8 mb-md-0 ms-md-15 mt-md-2 pe-4 cursor-pointer w-md-30",src:H.imgSrc,alt:H.alt,preview:!0},null,8,["src","alt"])):e.createCommentVNode("",!0)],2)]))),128))]),w.value?(e.openBlock(),e.createElementBlock("div",bV,[e.createElementVNode("button",{type:"button",class:"btn btn__load-more",onClick:B[0]||(B[0]=H=>h.value+=g.value)},[...B[7]||(B[7]=[e.createElementVNode("div",{class:"btn--udrline"}," 更多 ",-1),e.createElementVNode("span",{class:"i i-load-more"},null,-1)])])])):e.createCommentVNode("",!0)])]}),_:1},8,["hideScrollbar"])])])],4),n.isPreview?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(Te,{key:0,show:r.value,"onUpdate:show":B[1]||(B[1]=Y=>r.value=Y),onHandleEdit:B[2]||(B[2]=Y=>u.value=!0),onHandleDelete:c,onHandleCopy:f,onHandlePaste:m},null,8,["show"]))],32)):e.createCommentVNode("",!0),n.isPreview?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(Fx,{key:1,show:u.value,"onUpdate:show":B[5]||(B[5]=Y=>u.value=Y),data:n.modelValue},null,8,["show","data"]))],64)}}}),cd=ne(wV,[["__scopeId","data-v-9d2d002f"]]),xV=Object.freeze(Object.defineProperty({__proto__:null,default:cd},Symbol.toStringTag,{value:"Module"})),VV={class:"setting-content"},CV={class:"setting-header flex items-center"},kV={class:"setting-header flex items-center"},EV={class:"setting-body"},TV={class:"setting-item"},NV={class:"btn-group"},SV={key:0,class:"drag-handle"},BV={class:"item-schedule-list"},DV={class:"btn-group"},PV={key:0,class:"drag-handle"},$V=["src"],AV={class:"item-uplaod flex items-center"},LV={class:"item-action flex items-center"},IV=["onClick"],OV=e.defineComponent({__name:"setting",props:{show:{type:Boolean,default:!1},data:{type:Object,default:()=>{}}},emits:["update:show"],setup(n,{emit:t}){const o=e.defineAsyncComponent(()=>import("vuedraggable")),a=e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./index-QFpkZqlg.js"))),i=e.ref(!1),s=e.computed(()=>({animation:200,group:"gallerys",disabled:!1,ghostClass:"ghost",handle:".drag-handle",filter:".arco-input, .arco-select, .arco-checkbox",preventOnFilter:!1})),l=e.computed(()=>({animation:200,group:"schedules",disabled:!1,ghostClass:"ghost",handle:".drag-handle",filter:".arco-input, .arco-select, .arco-checkbox",preventOnFilter:!1})),r=p=>p&&p.length>1,u=n,c=t,f=()=>{c("update:show",!1)},m=()=>{if(u.data.length>=2){alert("最多只能添加2个");return}u.data.data.push({id:R(),title:"标题",desc:"描述",schedule:[]})},d=p=>{p.schedule.push({id:R(),title:"标题",text:"内容",date:"",imgSrc:"",alt:"",url:"",btnText:""})},h=p=>{u.data.data=u.data.data.filter(b=>b.id!==p)},g=(p,b)=>{p.schedule=p.schedule.filter(_=>_.id!==b)};return(p,b)=>{const _=e.resolveComponent("a-switch"),w=e.resolveComponent("a-option"),v=e.resolveComponent("a-select"),V=e.resolveComponent("icon-drag-arrow"),C=e.resolveComponent("icon-delete"),S=e.resolveComponent("a-input"),N=e.resolveComponent("a-button"),D=e.resolveComponent("icon-plus"),$=e.resolveComponent("a-drawer");return e.openBlock(),e.createBlock($,{width:500,visible:n.show,footer:!1,onCancel:f,unmountOnClose:""},{title:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(n.data.type)+"组件编辑 ",1)]),default:e.withCtx(()=>[e.createElementVNode("div",VV,[e.createElementVNode("div",CV,[b[8]||(b[8]=e.createElementVNode("span",{class:"header-title"},"仅显示PC端",-1)),e.createVNode(_,{modelValue:n.data.onlyShowPc,"onUpdate:modelValue":b[0]||(b[0]=k=>n.data.onlyShowPc=k)},null,8,["modelValue"])]),e.createElementVNode("div",kV,[b[11]||(b[11]=e.createElementVNode("span",{class:"header-title"},"组件背景",-1)),e.createVNode(v,{modelValue:n.data.bgColor,"onUpdate:modelValue":b[1]||(b[1]=k=>n.data.bgColor=k),placeholder:"请选择","allow-clear":""},{default:e.withCtx(()=>[e.createVNode(w,{value:"#ffffff"},{default:e.withCtx(()=>[...b[9]||(b[9]=[e.createTextVNode("白色",-1)])]),_:1}),e.createVNode(w,{value:"#F7F7FA"},{default:e.withCtx(()=>[...b[10]||(b[10]=[e.createTextVNode("灰色",-1)])]),_:1})]),_:1},8,["modelValue"])]),e.createElementVNode("div",EV,[e.createElementVNode("div",TV,[e.createVNode(e.unref(o),e.mergeProps({modelValue:n.data.data,"onUpdate:modelValue":b[4]||(b[4]=k=>n.data.data=k),"component-data":{tag:"div",type:"transition-group",name:i.value?null:"flip-list"}},s.value,{disabled:!r(n.data.data),onStart:b[5]||(b[5]=k=>i.value=!0),onEnd:b[6]||(b[6]=k=>i.value=!1),"item-key":"id"}),{item:e.withCtx(({element:k})=>[(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["item-button draggable-item",{"sortable-disabled":!r(n.data.data)}]),key:k.id},[e.createElementVNode("div",NV,[r(n.data.data)?(e.openBlock(),e.createElementBlock("div",SV,[e.createVNode(V,{class:"drag-icon"})])):e.createCommentVNode("",!0),e.createVNode(C,{class:"btn-delete",onClick:A=>h(k.id)},null,8,["onClick"])]),b[17]||(b[17]=e.createElementVNode("p",{class:"item-title"},"标题",-1)),e.createVNode(e.unref(a),{modelValue:k.title,"onUpdate:modelValue":A=>k.title=A,name:`GalleryTimelineCol_editor_${k.id}`},null,8,["modelValue","onUpdate:modelValue","name"]),b[18]||(b[18]=e.createElementVNode("p",{class:"item-title"},"描述",-1)),e.createVNode(S,{modelValue:k.desc,"onUpdate:modelValue":A=>k.desc=A,placeholder:"请输入文本","allow-clear":""},null,8,["modelValue","onUpdate:modelValue"]),b[19]||(b[19]=e.createElementVNode("p",{class:"item-title"},"schedule",-1)),e.createElementVNode("div",BV,[e.createVNode(e.unref(o),e.mergeProps({modelValue:k.schedule,"onUpdate:modelValue":A=>k.schedule=A,"component-data":{tag:"div",type:"transition-group",name:i.value?null:"flip-list"}},l.value,{disabled:!r(k.schedule),onStart:b[2]||(b[2]=A=>i.value=!0),onEnd:b[3]||(b[3]=A=>i.value=!1),"item-key":"id"}),{item:e.withCtx(({element:A})=>[(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["item-schedule draggable-item",{"sortable-disabled":!r(k.schedule)}]),key:A.id},[e.createElementVNode("div",DV,[r(k.schedule)?(e.openBlock(),e.createElementBlock("div",PV,[e.createVNode(V,{class:"drag-icon"})])):e.createCommentVNode("",!0),e.createVNode(C,{class:"btn-delete",onClick:B=>g(k,A.id)},null,8,["onClick"])]),b[12]||(b[12]=e.createElementVNode("p",{class:"item-title"},"标题",-1)),e.createVNode(S,{modelValue:A.title,"onUpdate:modelValue":B=>A.title=B,placeholder:"请输入标题","allow-clear":""},null,8,["modelValue","onUpdate:modelValue"]),b[13]||(b[13]=e.createElementVNode("p",{class:"item-title"},"文本",-1)),e.createVNode(e.unref(a),{modelValue:A.text,"onUpdate:modelValue":B=>A.text=B,name:`GalleryTimelineCol_editor_${A.id}`},null,8,["modelValue","onUpdate:modelValue","name"]),b[14]||(b[14]=e.createElementVNode("p",{class:"item-title"},"日期",-1)),e.createVNode(S,{modelValue:A.date,"onUpdate:modelValue":B=>A.date=B,placeholder:"请输入日期","allow-clear":""},null,8,["modelValue","onUpdate:modelValue"]),b[15]||(b[15]=e.createElementVNode("p",{class:"item-title"},"图片",-1)),e.createElementVNode("img",{class:"item-img",src:A.imgSrc},null,8,$V),e.createElementVNode("div",AV,[e.createVNode(S,{modelValue:A.imgSrc,"onUpdate:modelValue":B=>A.imgSrc=B,placeholder:"请输入图片链接","allow-clear":""},null,8,["modelValue","onUpdate:modelValue"]),e.createVNode(ze,{modelValue:A.imgSrc,"onUpdate:modelValue":B=>A.imgSrc=B,name:`GalleryTimelineCol_${A.id}`,"button-class":"fit-content"},null,8,["modelValue","onUpdate:modelValue","name"])]),e.createVNode(S,{class:"mt-2",modelValue:A.alt,"onUpdate:modelValue":B=>A.alt=B,placeholder:"图片alt","allow-clear":""},null,8,["modelValue","onUpdate:modelValue"]),e.createVNode(N,{style:{"margin-top":"10px"},type:"primary"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(A.btnText),1)]),_:2},1024),e.createElementVNode("div",LV,[e.createVNode(S,{class:"action-text",modelValue:A.btnText,"onUpdate:modelValue":B=>A.btnText=B,placeholder:"按钮文本","allow-clear":""},null,8,["modelValue","onUpdate:modelValue"]),e.createVNode(S,{modelValue:A.url,"onUpdate:modelValue":B=>A.url=B,placeholder:"按钮链接","allow-clear":""},null,8,["modelValue","onUpdate:modelValue"])])],2))]),_:2},1040,["modelValue","onUpdate:modelValue","component-data","disabled"]),e.createElementVNode("div",{class:"item-add-btn flex items-center",onClick:A=>d(k)},[e.createVNode(D),b[16]||(b[16]=e.createElementVNode("span",{class:"btn-text"},"添加schedule",-1))],8,IV)])],2))]),_:1},16,["modelValue","component-data","disabled"]),e.createElementVNode("div",{class:"item-add-btn flex items-center",onClick:b[7]||(b[7]=k=>m())},[e.createVNode(D),b[20]||(b[20]=e.createElementVNode("span",{class:"btn-text"},"添加",-1))])])])])]),_:1},8,["visible"])}}}),MV=ne(OV,[["__scopeId","data-v-78e17ef6"]]),UV={class:"row row-cols-1 row-cols-md-2"},RV={class:"gallery-timeline"},FV={class:"mb-6 mb-md-8"},HV=["innerHTML"],jV={key:1,class:"gallery-timeline__desc text-center"},zV={class:"gallery-timeline__list"},qV={class:"list__wrapper"},WV={class:"timeline__list"},GV=["innerHTML"],XV=["innerHTML"],YV=["innerHTML"],KV=["innerHTML"],QV={key:2,class:"my-3 my-md-5 pe-4"},JV=["href"],ZV={class:"timeline__item__button__text"},eC={key:1,class:"timeline__item__button d-inline-block"},tC={class:"timeline__item__button__text"},nC={key:0,class:"d-flex justify-content-center mt-6"},oC=e.defineComponent({name:"GalleryTimelineCol",__name:"index",props:{modelValue:{type:Object,default:()=>{}},isPreview:{type:Boolean,default:!0}},emits:["update:modelValue","handleDelete","handleCopy","handlePaste"],setup(n,{emit:t}){if(typeof window<"u")try{Sr.gsap.registerPlugin(Ke)}catch{}const o=n,a=t,i=e.computed(()=>typeof window>"u"?1024:window.innerWidth),s=()=>{var B;if(o.modelValue&&o.modelValue.data)return;const A={id:((B=o.modelValue)==null?void 0:B.id)||R(),type:"GalleryTimelineCol",onlyShowPc:!1,bgColor:"",data:[{id:R(),title:"标题",desc:"描述",schedule:[{id:R(),title:"标题",text:"内容",date:"1990",imgSrc:"https://osswebsite-test.cedim.cn/media-library/ywies-bj/images/home/ywies-tx.jpg",alt:"",url:"",btnText:"按钮"},{id:R(),title:"标题",text:"内容",date:"2000",imgSrc:"https://osswebsite-test.cedim.cn/media-library/ywies-bj/images/home/ywies-tx.jpg",alt:"",url:"",btnText:"按钮"}]},{id:R(),title:"标题",desc:"描述",schedule:[{id:R(),title:"标题",text:"内容",date:"2010",imgSrc:"https://osswebsite-test.cedim.cn/media-library/ywies-bj/images/home/ywies-tx.jpg",alt:"",url:"",btnText:"按钮"},{id:R(),title:"标题",text:"内容",date:"2020",imgSrc:"https://osswebsite-test.cedim.cn/media-library/ywies-bj/images/home/ywies-tx.jpg",alt:"",url:"",btnText:"按钮"}]}]};a("update:modelValue",A)},l=e.computed(()=>{var A;return o.isPreview?!((A=o.modelValue)!=null&&A.onlyShowPc)||!Ne():!0}),r=e.ref(!1),u=e.ref(!1),c=()=>{a("handleDelete",o.modelValue.id)},f=()=>{a("handleCopy",o.modelValue)},m=A=>{a("handlePaste",A)};s();let d=null;const h=e.ref(5),g=e.ref(5);let p=null;const b=e.computed(()=>{var A;return((A=o.modelValue)==null?void 0:A.data)??null}),_=e.computed(()=>{var A;return i.value>=768?b.value:(A=b.value)==null?void 0:A.slice(0,h.value)}),w=e.computed(()=>{var A;return i.value<=767.98&&h.value<((A=b.value)==null?void 0:A.length)}),v=()=>typeof window<"u"?Math.round(window.pageYOffset):0,V=e.computed(()=>v());e.watch(()=>V.value,()=>{i.value>=768||k(D,5e3)}),e.watch(()=>_.value,()=>{D()});const C=e.ref([]),S=e.ref([]),N=e.ref(null),D=()=>{d=null,e.nextTick($)},$=()=>{var z,Y;d=Sr.gsap.timeline();const A=C.value,B=S.value,I=(Y=(z=N.value)==null?void 0:z.$el)==null?void 0:Y.querySelector(".simplebar-content-wrapper");!A||!B||A.forEach((H,q)=>{d.fromTo(H,{"--line-height":"0%"},{"--line-height":"100%",scrollTrigger:{start:()=>(typeof window>"u"?1024:window.innerWidth)<768?"top center":`top top+=${50+q*35}px`,end:()=>(typeof window>"u"?1024:window.innerWidth)<768?"center center":`bottom center+=${q*25}px`,scrub:1,trigger:B[q],scroller:I,onEnter:O=>{O.trigger.classList.add("is-enter")},onEnterBack:O=>{O.trigger.classList.remove("is-enter")},onLeaveBack:O=>{O.trigger.classList.remove("is-enter")}}})})},k=(A,B)=>{p?p+B<Date.now()&&(A(),p=Date.now()):(A(),p=Date.now())};return e.onMounted(()=>{e.nextTick($)}),(A,B)=>{var z,Y;const I=e.resolveComponent("a-image");return e.openBlock(),e.createElementBlock(e.Fragment,null,[l.value?(e.openBlock(),e.createElementBlock("div",{key:0,class:"gallery-list",onMouseenter:B[3]||(B[3]=H=>r.value=!0),onMouseleave:B[4]||(B[4]=H=>r.value=!1)},[e.createElementVNode("div",{class:"gallery-container gallery-timeline-col container-content",style:e.normalizeStyle({backgroundColor:(z=n.modelValue)==null?void 0:z.bgColor})},[e.createElementVNode("div",UV,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList((Y=n.modelValue)==null?void 0:Y.data,H=>(e.openBlock(),e.createElementBlock("div",{class:"col",key:H.id},[e.createElementVNode("div",RV,[e.createElementVNode("div",FV,[H.title?(e.openBlock(),e.createElementBlock("div",{key:0,class:"gallery-timeline__title text-center",innerHTML:H.title},null,8,HV)):e.createCommentVNode("",!0),H.desc?(e.openBlock(),e.createElementBlock("div",jV,e.toDisplayString(H.desc),1)):e.createCommentVNode("",!0)]),e.createElementVNode("div",zV,[e.createVNode(Zi,{hideScrollbar:i.value<768,ref_for:!0,ref_key:"scroller",ref:N},{default:e.withCtx(()=>[e.createElementVNode("div",qV,[e.createElementVNode("ul",WV,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(H.schedule,q=>(e.openBlock(),e.createElementBlock("li",{class:"timeline__item",key:q.id,ref_for:!0,ref:O=>{O&&S.value.push(O)}},[e.createElementVNode("div",{class:"item__line",ref_for:!0,ref:O=>{O&&C.value.push(O)}},[...B[6]||(B[6]=[e.createElementVNode("div",{class:"item__line__mobile"},null,-1),e.createElementVNode("div",{class:"item__dot"},null,-1)])],512),e.createElementVNode("div",{class:e.normalizeClass(["d-flex flex-column flex-md-row justify-content-between",{"has-date":!!q.date}])},[e.createElementVNode("div",null,[q.date?e.withDirectives((e.openBlock(),e.createElementBlock("h4",{key:1,class:"text-blue-dark",innerHTML:q.title},null,8,XV)),[[e.vShow,q.title]]):e.withDirectives((e.openBlock(),e.createElementBlock("h6",{key:0,class:"text-blue-dark",innerHTML:q.title},null,8,GV)),[[e.vShow,q.title]]),e.withDirectives(e.createElementVNode("div",{class:"tx-body-big text-blue-dark mb-3 mb-md-5 pe-3",innerHTML:q.date},null,8,YV),[[e.vShow,q.date]]),e.withDirectives(e.createElementVNode("div",{class:"tx-body-p text-teal-darkest mb-3 mb-md-5 pe-3",innerHTML:q.text},null,8,KV),[[e.vShow,q.text]]),q.url?(e.openBlock(),e.createElementBlock("div",QV,[n.isPreview?(e.openBlock(),e.createElementBlock("a",{key:0,href:q.url,target:"_blank",class:"timeline__item__button d-inline-block"},[e.createElementVNode("div",ZV,e.toDisplayString(q.btnText),1)],8,JV)):(e.openBlock(),e.createElementBlock("button",eC,[e.createElementVNode("div",tC,e.toDisplayString(q.btnText),1)]))])):e.createCommentVNode("",!0)]),q.imgSrc?(e.openBlock(),e.createBlock(I,{key:0,class:"flex-shrink-0 img-fit mb-8 mb-md-0 ms-md-15 mt-md-2 pe-4 cursor-pointer w-md-30",src:q.imgSrc,alt:q.alt,preview:!0},null,8,["src","alt"])):e.createCommentVNode("",!0)],2)]))),128))]),w.value?(e.openBlock(),e.createElementBlock("div",nC,[e.createElementVNode("button",{type:"button",class:"btn btn__load-more",onClick:B[0]||(B[0]=q=>h.value+=g.value)},[...B[7]||(B[7]=[e.createElementVNode("div",{class:"btn--udrline"}," 更多 ",-1),e.createElementVNode("span",{class:"i i-load-more"},null,-1)])])])):e.createCommentVNode("",!0)])]),_:2},1032,["hideScrollbar"])])])]))),128))])],4),n.isPreview?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(Te,{key:0,show:r.value,"onUpdate:show":B[1]||(B[1]=H=>r.value=H),onHandleEdit:B[2]||(B[2]=H=>u.value=!0),onHandleDelete:c,onHandleCopy:f,onHandlePaste:m},null,8,["show"]))],32)):e.createCommentVNode("",!0),n.isPreview?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(MV,{key:1,show:u.value,"onUpdate:show":B[5]||(B[5]=H=>u.value=H),data:n.modelValue},null,8,["show","data"]))],64)}}}),md=ne(oC,[["__scopeId","data-v-9873a288"]]),aC=Object.freeze(Object.defineProperty({__proto__:null,default:md},Symbol.toStringTag,{value:"Module"})),iC=["href"],sC=["onClick"],lC={key:1,class:"text-link"},rC=["onClick"],dC={class:"text-link__text"},uC=e.defineComponent({__name:"linkList",props:{list:{},isPreview:{}},emits:["handleClick"],setup(n,{emit:t}){const o=t,a=i=>{i.type==="circle"&&i.url&&!i.url.includes("http")?o("handleClick",i.url):i.type==="text"&&o("handleClick",i)};return(i,s)=>(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.list,l=>(e.openBlock(),e.createElementBlock("div",{class:"link-list__item",key:l.id},[l.type==="circle"?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(["circle-link",[l.isLight?"circle-link--light":""]])},[l.url&&l.url.includes("http")&&n.isPreview?(e.openBlock(),e.createElementBlock("a",{key:0,href:l.url,class:e.normalizeClass([l.isLight?"nuxt-link-exact-active nuxt-link-active":""])},[e.createElementVNode("div",null,e.toDisplayString(l.text),1),e.createElementVNode("span",{class:e.normalizeClass(["circle-link__icon",[l.isLight?"circle-link__icon--light":""]])},null,2)],10,iC)):(e.openBlock(),e.createElementBlock("button",{key:1,onClick:r=>a(l),class:e.normalizeClass([l.isLight?"nuxt-link-exact-active nuxt-link-active":""])},[e.createElementVNode("div",null,e.toDisplayString(l.text),1),e.createElementVNode("span",{class:e.normalizeClass(["circle-link__icon",[l.isLight?"circle-link__icon--light":""]])},null,2)],10,sC))],2)):(e.openBlock(),e.createElementBlock("div",lC,[e.createElementVNode("button",{type:"button",class:"text-link__wrapper link link--udrline-2",onClick:r=>a(l)},[e.createElementVNode("span",dC,e.toDisplayString(l.text),1)],8,rC)]))]))),128))}}),$m=ne(uC,[["__scopeId","data-v-4d541128"]]),cC={class:"process-desktop"},mC={class:"process__left"},pC={class:"text-blue-dark"},hC={class:"process-list my-10"},fC=["onClick"],gC={class:"item-date tx-body-big"},vC={class:"item-title"},yC={class:"process__right"},_C={class:"process__info__num"},bC={class:"process__info__title"},wC=["innerHTML"],xC={class:"process__info__link"},VC={key:0,class:"process__img"},CC={class:"img-wrapper"},kC=["src","alt"],EC=e.defineComponent({name:"ProcessDesktop",__name:"ProcessDesktop",props:{data:Object,activeIdx:Number},emits:["updateIdx"],setup(n,{emit:t}){const o=n,a=t,i=e.ref(72),s=e.ref(250),l=e.ref(typeof window>"u"?1024:window.innerWidth),r=e.ref([]),u=e.computed(()=>{var h,g;const d=(g=(h=o.data)==null?void 0:h.processes)==null?void 0:g.length;return!d||d<=1?"0%":`${c.value/(d-1)*100}%`}),c=e.computed({get(){return o.activeIdx??0},set(d){a("updateIdx",d)}}),f=()=>{l.value=typeof window>"u"?1024:window.innerWidth},m=()=>{const d=r.value;if(!d||d.length===0)return;const h=d[0];if(!h)return;const g=h.offsetLeft,p=h.clientWidth/2;i.value=g+p};return e.watch(l,()=>{m()}),e.onMounted(()=>{typeof window<"u"&&window.addEventListener("resize",f),f(),r.value=[],e.nextTick(()=>{m()})}),e.onBeforeUnmount(()=>{typeof window<"u"&&window.removeEventListener("resize",f)}),(d,h)=>{var g,p,b,_;return e.openBlock(),e.createElementBlock("div",cC,[e.createElementVNode("div",mC,[e.createElementVNode("h2",pC,e.toDisplayString((g=n.data)==null?void 0:g.title),1),e.createElementVNode("ul",hC,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList((p=n.data)==null?void 0:p.processes,(w,v)=>(e.openBlock(),e.createElementBlock("li",{key:w.id,class:e.normalizeClass(["process-item",{"is-active":v==c.value}]),onClick:V=>c.value=v},[e.createElementVNode("div",gC,e.toDisplayString(w.date),1),e.createElementVNode("div",{class:"item-num",ref_for:!0,ref:V=>{V&&r.value.push(V)}},e.toDisplayString(v+1),513),e.createElementVNode("h6",vC,e.toDisplayString(w.title),1)],10,fC))),128)),e.createElementVNode("div",{class:"progress",style:e.normalizeStyle([{"--bar-height":u.value},{"--bar-left":`${i.value}px`}])},[...h[0]||(h[0]=[e.createElementVNode("div",{class:"progress-bar",role:"progressbar","aria-valuenow":"0","aria-valuemin":"0","aria-valuemax":"100"},null,-1)])],4)]),e.createElementVNode("div",null,[e.createVNode(Cm,{list:(b=n.data)==null?void 0:b.btnList},null,8,["list"])])]),e.createElementVNode("div",yC,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList((_=n.data)==null?void 0:_.processes,(w,v)=>(e.openBlock(),e.createElementBlock("div",{key:w.id,class:e.normalizeClass(["process__right__wrapper",{"is-active":c.value==v}])},[e.createElementVNode("div",{class:"process__info",style:e.normalizeStyle({"--scroll-bar-height":`${s.value}px`})},[e.createElementVNode("div",_C,e.toDisplayString(v+1),1),e.createElementVNode("div",bC,e.toDisplayString(w.title),1),e.createVNode(Zi,{light:""},{default:e.withCtx(()=>[e.createElementVNode("div",{class:"process__info__text",innerHTML:w.desc},null,8,wC),e.createElementVNode("div",xC,[e.createVNode($m,{list:w.linkList},null,8,["list"])])]),_:2},1024)],4),w.imgSrc?(e.openBlock(),e.createElementBlock("div",VC,[e.createElementVNode("div",CC,[e.createElementVNode("img",{src:w.imgSrc,alt:w.alt||w.title},null,8,kC)])])):e.createCommentVNode("",!0)],2))),128))])])}}}),TC=ne(EC,[["__scopeId","data-v-2ab4c48d"]]),NC={class:"process-accordion"},SC={class:"text-blue-dark"},BC={class:"process-list my-6"},DC=["onClick"],PC={class:"item-date tx-body-p"},$C={class:"item-line"},AC={class:"item-collapse__header flex-between"},LC={class:"collapse__header__title"},IC=["innerHTML"],OC={class:"item__link mt-1"},MC={class:"link-list__container"},UC=e.defineComponent({name:"ProcessAccordion",__name:"ProcessAccordion",props:{data:Object,activeIdx:Number},emits:["updateIdx"],setup(n,{emit:t}){const o=n,a=t;e.watch(()=>o.data,()=>{var m,d;(d=(m=o.data)==null?void 0:m.processes)==null||d.forEach(h=>{var g;(g=h.linkList)==null||g.forEach(p=>{p.isLight=!1})})});const i=e.ref(typeof window>"u"?1024:window.innerWidth),s=e.ref([]),l=e.ref([]),r=e.computed({get(){return o.activeIdx??NaN},set(m){a("updateIdx",m)}}),u=()=>{i.value=typeof window>"u"?1024:window.innerWidth},c=()=>{l.value.forEach(d=>{d.style.setProperty("--max-height",`${d.scrollHeight}px`)})},f=m=>{r.value===m?r.value=NaN:r.value=m};return e.watch(i,()=>{c()}),e.onMounted(()=>{typeof window<"u"&&window.addEventListener("resize",u),u(),s.value=[],l.value=[],e.nextTick(()=>{c()})}),e.onBeforeUnmount(()=>{typeof window<"u"&&window.removeEventListener("resize",u)}),(m,d)=>{var h,g,p;return e.openBlock(),e.createElementBlock("div",NC,[e.createElementVNode("h2",SC,e.toDisplayString((h=n.data)==null?void 0:h.title),1),e.createElementVNode("ul",BC,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList((g=n.data)==null?void 0:g.processes,(b,_)=>(e.openBlock(),e.createElementBlock("li",{key:b.id,class:e.normalizeClass(["process-item",[{"is-active":_==r.value},{"is-active-past":_<r.value}]]),onClick:w=>f(_)},[e.createElementVNode("div",PC,e.toDisplayString(b.date),1),e.createElementVNode("div",$C,[e.createElementVNode("div",{class:"item-num",ref_for:!0,ref:w=>{w&&s.value.push(w)}},e.toDisplayString(_+1),513)]),e.createElementVNode("div",{class:e.normalizeClass(["item-collapse",{"is-open":_==r.value}])},[e.createElementVNode("div",AC,[e.createElementVNode("h6",LC,e.toDisplayString(b.title),1),d[0]||(d[0]=e.createElementVNode("div",{class:"collapse__header__btn"},null,-1))]),e.createElementVNode("div",{class:"item-collapse__body",ref_for:!0,ref:w=>{w&&l.value.push(w)}},[e.createElementVNode("div",{class:"item-desc",innerHTML:b.desc},null,8,IC),e.createElementVNode("div",OC,[e.createElementVNode("div",MC,[e.createVNode($m,{list:b.linkList},null,8,["list"])])])],512)],2)],10,DC))),128))]),e.createElementVNode("div",null,[e.createVNode(Cm,{list:(p=n.data)==null?void 0:p.btnList},null,8,["list"])])])}}}),RC=ne(UC,[["__scopeId","data-v-5d2b3cf9"]]),FC={class:"setting-content"},HC={class:"setting-header flex items-center"},jC={class:"setting-header flex items-center"},zC={class:"setting-header flex items-center"},qC={class:"setting-body"},WC={class:"btn-group"},GC={key:0,class:"drag-handle"},XC={class:"item-action flex items-center mt-2"},YC={class:"setting-body mt-2"},KC={class:"btn-group"},QC={key:0,class:"drag-handle"},JC=["src"],ZC={class:"item-uplaod flex items-center"},ek={class:"section-item section-link"},tk={class:"btn-group"},nk={key:0,class:"drag-handle"},ok={class:"item-action flex items-center"},ak=["onClick"],ik=e.defineComponent({__name:"setting",props:{show:{type:Boolean,default:!1},data:{type:Object,default:()=>{}}},emits:["update:show"],setup(n,{emit:t}){const o=e.defineAsyncComponent(()=>import("vuedraggable")),a=e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./index-QFpkZqlg.js"))),i=e.ref(!1),s=e.computed(()=>({animation:200,group:"btns",disabled:!1,ghostClass:"ghost",handle:".drag-handle",filter:".rich-text-editor, .arco-input, .arco-select, .arco-checkbox",preventOnFilter:!1})),l=e.computed(()=>({animation:200,group:"gallerys",disabled:!1,ghostClass:"ghost",handle:".drag-handle",filter:".rich-text-editor, .arco-input, .arco-select, .arco-checkbox",preventOnFilter:!1})),r=e.computed(()=>({animation:200,group:"sections",disabled:!1,ghostClass:"ghost",handle:".drag-handle",filter:".rich-text-editor, .arco-input, .arco-select, .arco-checkbox",preventOnFilter:!1})),u=w=>w&&w.length>1,c=n,f=t,m=()=>{f("update:show",!1)},d=()=>{c.data.data.btnList.push({id:R(),type:"",text:"了解更多",url:"/",isExternal:!1})},h=w=>{c.data.data.btnList=c.data.data.btnList.filter(v=>v.id!==w)},g=()=>{c.data.data.processes.push({id:R(),title:"标题",date:"",desc:"",linkList:[]})},p=w=>{c.data.data.processes=c.data.data.processes.filter(v=>v.id!==w)},b=w=>{w.push({id:R(),type:"circle",text:"了解更多",url:"/",isExternal:!1,isLight:!1})},_=(w,v)=>{w.splice(w.findIndex(V=>V.id===v),1)};return(w,v)=>{const V=e.resolveComponent("a-switch"),C=e.resolveComponent("a-option"),S=e.resolveComponent("a-select"),N=e.resolveComponent("a-input"),D=e.resolveComponent("icon-drag-arrow"),$=e.resolveComponent("icon-delete"),k=e.resolveComponent("a-button"),A=e.resolveComponent("a-checkbox"),B=e.resolveComponent("icon-plus"),I=e.resolveComponent("a-link"),z=e.resolveComponent("a-drawer");return e.openBlock(),e.createBlock(z,{width:500,visible:n.show,footer:!1,onCancel:m,unmountOnClose:""},{title:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(n.data.type)+"组件编辑 ",1)]),default:e.withCtx(()=>[e.createElementVNode("div",FC,[e.createElementVNode("div",HC,[v[13]||(v[13]=e.createElementVNode("span",{class:"header-title"},"仅显示PC端",-1)),e.createVNode(V,{modelValue:n.data.onlyShowPc,"onUpdate:modelValue":v[0]||(v[0]=Y=>n.data.onlyShowPc=Y)},null,8,["modelValue"])]),e.createElementVNode("div",jC,[v[18]||(v[18]=e.createElementVNode("span",{class:"header-title"},"组件宽度",-1)),e.createVNode(S,{modelValue:n.data.width,"onUpdate:modelValue":v[1]||(v[1]=Y=>n.data.width=Y),placeholder:"请选择","allow-clear":""},{default:e.withCtx(()=>[e.createVNode(C,{value:"default"},{default:e.withCtx(()=>[...v[14]||(v[14]=[e.createTextVNode("默认",-1)])]),_:1}),e.createVNode(C,{value:"small"},{default:e.withCtx(()=>[...v[15]||(v[15]=[e.createTextVNode("小",-1)])]),_:1}),e.createVNode(C,{value:"middle"},{default:e.withCtx(()=>[...v[16]||(v[16]=[e.createTextVNode("中",-1)])]),_:1}),e.createVNode(C,{value:"max"},{default:e.withCtx(()=>[...v[17]||(v[17]=[e.createTextVNode("大",-1)])]),_:1})]),_:1},8,["modelValue"])]),e.createElementVNode("div",zC,[v[19]||(v[19]=e.createElementVNode("span",{class:"header-title"},"标题",-1)),e.createVNode(N,{modelValue:n.data.data.title,"onUpdate:modelValue":v[2]||(v[2]=Y=>n.data.data.title=Y),placeholder:"请输入标题","allow-clear":""},null,8,["modelValue"])]),e.createElementVNode("div",qC,[e.createVNode(e.unref(o),e.mergeProps({modelValue:n.data.data.btnList,"onUpdate:modelValue":v[3]||(v[3]=Y=>n.data.data.btnList=Y),"component-data":{tag:"div",type:"transition-group",name:i.value?null:"flip-list"}},s.value,{disabled:!u(n.data.data),onStart:v[4]||(v[4]=Y=>i.value=!0),onEnd:v[5]||(v[5]=Y=>i.value=!1),"item-key":"id"}),{item:e.withCtx(({element:Y})=>[(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["item-section draggable-item",{"sortable-disabled":!u(n.data.data.btnList)}]),key:Y.id},[e.createElementVNode("div",WC,[u(n.data.data)?(e.openBlock(),e.createElementBlock("div",GC,[e.createVNode(D,{class:"drag-icon"})])):e.createCommentVNode("",!0),e.createVNode($,{class:"btn-delete",onClick:H=>h(Y.id)},null,8,["onClick"])]),e.createVNode(k,{type:"primary"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(Y.text),1)]),_:2},1024),e.createElementVNode("div",XC,[e.createVNode(N,{class:"action-text",modelValue:Y.text,"onUpdate:modelValue":H=>Y.text=H,placeholder:"按钮文本","allow-clear":""},null,8,["modelValue","onUpdate:modelValue"]),e.createVNode(N,{modelValue:Y.url,"onUpdate:modelValue":H=>Y.url=H,placeholder:"按钮链接","allow-clear":""},null,8,["modelValue","onUpdate:modelValue"])]),e.createVNode(A,{modelValue:Y.isExternal,"onUpdate:modelValue":H=>Y.isExternal=H},{default:e.withCtx(()=>[...v[20]||(v[20]=[e.createTextVNode("是否外部链接",-1)])]),_:1},8,["modelValue","onUpdate:modelValue"])],2))]),_:1},16,["modelValue","component-data","disabled"]),e.createElementVNode("div",{class:"item-add-btn flex items-center",onClick:v[6]||(v[6]=Y=>d())},[e.createVNode(B),v[21]||(v[21]=e.createElementVNode("span",{class:"btn-text"},"添加按钮",-1))])]),e.createElementVNode("div",YC,[v[30]||(v[30]=e.createElementVNode("p",{class:"item-title"},"Process",-1)),e.createVNode(e.unref(o),e.mergeProps({modelValue:n.data.data.processes,"onUpdate:modelValue":v[9]||(v[9]=Y=>n.data.data.processes=Y),"component-data":{tag:"div",type:"transition-group",name:i.value?null:"flip-list"}},l.value,{disabled:!u(n.data.data.processes),onStart:v[10]||(v[10]=Y=>i.value=!0),onEnd:v[11]||(v[11]=Y=>i.value=!1),"item-key":"id"}),{item:e.withCtx(({element:Y})=>[(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["item-section draggable-item",{"sortable-disabled":!u(n.data.data.processes)}]),key:Y.id},[e.createElementVNode("div",KC,[u(n.data.data.processes)?(e.openBlock(),e.createElementBlock("div",QC,[e.createVNode(D,{class:"drag-icon"})])):e.createCommentVNode("",!0),e.createVNode($,{class:"btn-delete",onClick:H=>p(Y.id)},null,8,["onClick"])]),v[25]||(v[25]=e.createElementVNode("p",{class:"item-title"},"标题",-1)),e.createVNode(N,{modelValue:Y.title,"onUpdate:modelValue":H=>Y.title=H,placeholder:"请输入标题","allow-clear":""},null,8,["modelValue","onUpdate:modelValue"]),v[26]||(v[26]=e.createElementVNode("p",{class:"item-title"},"描述",-1)),e.createVNode(e.unref(a),{modelValue:Y.desc,"onUpdate:modelValue":H=>Y.desc=H,name:`Process_editor_${Y.id}`},null,8,["modelValue","onUpdate:modelValue","name"]),v[27]||(v[27]=e.createElementVNode("p",{class:"item-title"},"日期",-1)),e.createVNode(N,{modelValue:Y.date,"onUpdate:modelValue":H=>Y.date=H,placeholder:"请输入日期","allow-clear":""},null,8,["modelValue","onUpdate:modelValue"]),v[28]||(v[28]=e.createElementVNode("p",{class:"item-title"},"图片",-1)),e.createElementVNode("img",{class:"item-img",src:Y.imgSrc},null,8,JC),e.createElementVNode("div",ZC,[e.createVNode(N,{modelValue:Y.imgSrc,"onUpdate:modelValue":H=>Y.imgSrc=H,placeholder:"请输入图片链接","allow-clear":""},null,8,["modelValue","onUpdate:modelValue"]),e.createVNode(ze,{modelValue:Y.imgSrc,"onUpdate:modelValue":H=>Y.imgSrc=H,name:`Process_${Y.id}`,"button-class":"fit-content"},null,8,["modelValue","onUpdate:modelValue","name"])]),e.createElementVNode("div",ek,[e.createVNode(e.unref(o),e.mergeProps({modelValue:Y.linkList,"onUpdate:modelValue":H=>Y.linkList=H,"component-data":{tag:"div",type:"transition-group",name:i.value?null:"flip-list"}},r.value,{disabled:!u(Y.linkList),onStart:v[7]||(v[7]=H=>i.value=!0),onEnd:v[8]||(v[8]=H=>i.value=!1),"item-key":"id"}),{item:e.withCtx(({element:H})=>[(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["item-button draggable-item",{"sortable-disabled":!u(Y.linkList)}]),key:H.id},[e.createElementVNode("div",tk,[u(Y.linkList)?(e.openBlock(),e.createElementBlock("div",nk,[e.createVNode(D,{class:"drag-icon"})])):e.createCommentVNode("",!0),e.createVNode($,{class:"btn-delete",onClick:q=>_(Y.linkList,H.id)},null,8,["onClick"])]),e.createVNode(I,{href:"link"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(H.text),1)]),_:2},1024),H.type==="circle"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createElementVNode("div",ok,[e.createVNode(N,{class:"action-text",modelValue:H.text,"onUpdate:modelValue":q=>H.text=q,placeholder:"链接文本","allow-clear":""},null,8,["modelValue","onUpdate:modelValue"]),e.createVNode(N,{modelValue:H.url,"onUpdate:modelValue":q=>H.url=q,placeholder:"链接链接","allow-clear":""},null,8,["modelValue","onUpdate:modelValue"])]),e.createVNode(A,{modelValue:H.isExternal,"onUpdate:modelValue":q=>H.isExternal=q},{default:e.withCtx(()=>[...v[22]||(v[22]=[e.createTextVNode("是否外部链接",-1)])]),_:1},8,["modelValue","onUpdate:modelValue"]),e.createVNode(A,{style:{"padding-left":"10px"},modelValue:H.isLight,"onUpdate:modelValue":q=>H.isLight=q},{default:e.withCtx(()=>[...v[23]||(v[23]=[e.createTextVNode("是否亮色",-1)])]),_:1},8,["modelValue","onUpdate:modelValue"])],64)):e.createCommentVNode("",!0)],2))]),_:2},1040,["modelValue","onUpdate:modelValue","component-data","disabled"]),e.createElementVNode("div",{class:"item-add-btn flex items-center",onClick:H=>b(Y.linkList)},[e.createVNode(B),v[24]||(v[24]=e.createElementVNode("span",{class:"btn-text"},"添加链接",-1))],8,ak)])],2))]),_:1},16,["modelValue","component-data","disabled"]),e.createElementVNode("div",{class:"item-add-btn flex items-center",onClick:v[12]||(v[12]=Y=>g())},[e.createVNode(B),v[29]||(v[29]=e.createElementVNode("span",{class:"btn-text"},"添加Process",-1))])])])]),_:1},8,["visible"])}}}),sk=ne(ik,[["__scopeId","data-v-a1335b9d"]]),lk={key:0,class:"process__desktop"},rk={key:1,class:"process__mobile"},dk=e.defineComponent({name:"Process",__name:"index",props:{modelValue:{type:Object,default:()=>{}},isPreview:{type:Boolean,default:!0}},emits:["update:modelValue","handleDelete","handleCopy","handlePaste"],setup(n,{emit:t}){const o=n,a=t,i=()=>{var p;if(o.modelValue&&o.modelValue.data)return;const g={id:((p=o.modelValue)==null?void 0:p.id)||R(),type:"Process",onlyShowPc:!1,width:"",data:{id:R(),title:"这里是标题",noWrap:!1,btnList:[{id:R(),type:"",text:"按钮名称",url:"",isExternal:!1},{id:R(),type:"",text:"按钮名称",url:"",isExternal:!1}],processes:[{id:R(),date:"1900",title:"标题1",desc:"<p>这里是描述</p>",imgSrc:"https://osswebsite.ycyw.com/media-library/ywies-bj/images/home/ywies-tx.jpg",linkList:[{id:R(),type:"circle",text:"链接名称",url:"",isExternal:!1,isLight:!1}]},{id:R(),date:"2000",title:"标题2",desc:"<p>这里是描述</p>",imgSrc:"https://osswebsite.ycyw.com/media-library/ywies-bj/images/home/ywies-tx.jpg",linkList:[{id:R(),type:"circle",text:"链接名称",url:"",isExternal:!1,isLight:!1}]}]}};a("update:modelValue",g)},s=e.computed(()=>{var g;return o.isPreview?!((g=o.modelValue)!=null&&g.onlyShowPc)||!Ne():!0}),l=e.ref(!1),r=e.ref(!1),u=()=>{a("handleDelete",o.modelValue.id)},c=()=>{a("handleCopy",o.modelValue)},f=g=>{a("handlePaste",g)};i();const m=e.ref(0),d=e.ref(typeof window<"u"?window.innerWidth:1024),h=()=>{typeof window<"u"&&(d.value=window.innerWidth)};return e.onMounted(()=>{typeof window<"u"&&(window.addEventListener("resize",h),h())}),e.onBeforeUnmount(()=>{typeof window<"u"&&window.removeEventListener("resize",h)}),(g,p)=>{var b,_,w,v;return e.openBlock(),e.createElementBlock(e.Fragment,null,[s.value?(e.openBlock(),e.createElementBlock("div",{key:0,class:"process",onMouseenter:p[4]||(p[4]=V=>l.value=!0),onMouseleave:p[5]||(p[5]=V=>l.value=!1)},[e.createElementVNode("div",{class:e.normalizeClass(["process__container",[(b=n.modelValue)!=null&&b.width?`container-content-${(_=n.modelValue)==null?void 0:_.width}`:"container-content"]])},[d.value>=768?(e.openBlock(),e.createElementBlock("div",lk,[e.createVNode(TC,{data:(w=n.modelValue)==null?void 0:w.data,activeIdx:m.value,onUpdateIdx:p[0]||(p[0]=V=>m.value=V)},null,8,["data","activeIdx"])])):(e.openBlock(),e.createElementBlock("div",rk,[e.createVNode(RC,{data:(v=n.modelValue)==null?void 0:v.data,activeIdx:m.value,onUpdateIdx:p[1]||(p[1]=V=>m.value=V)},null,8,["data","activeIdx"])]))],2),n.isPreview?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(Te,{key:0,show:l.value,"onUpdate:show":p[2]||(p[2]=V=>l.value=V),onHandleEdit:p[3]||(p[3]=V=>r.value=!0),onHandleDelete:u,onHandleCopy:c,onHandlePaste:f},null,8,["show"]))],32)):e.createCommentVNode("",!0),n.isPreview?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(sk,{key:1,show:r.value,"onUpdate:show":p[6]||(p[6]=V=>r.value=V),data:n.modelValue},null,8,["show","data"]))],64)}}}),pd=ne(dk,[["__scopeId","data-v-16a15091"]]),uk=Object.freeze(Object.defineProperty({__proto__:null,default:pd},Symbol.toStringTag,{value:"Module"})),ck={class:"setting-header flex items-center"},mk={class:"setting-content"},pk=e.defineComponent({__name:"setting",props:{show:{type:Boolean,default:!1},data:{type:Object,default:()=>{}}},emits:["update:show"],setup(n,{emit:t}){const o=n,a=t,i=()=>{a("update:show",!1)},s=e.ref(1),l=r=>{r===1?(o.data.data.desktopHeight=49,o.data.data.mobileHeight=24):r===2?(o.data.data.desktopHeight=80,o.data.data.mobileHeight=40):r===3?(o.data.data.desktopHeight=32,o.data.data.mobileHeight=40):r===4?(o.data.data.desktopHeight=16,o.data.data.mobileHeight=16):r===5&&(o.data.data.desktopHeight=160,o.data.data.mobileHeight=80)};return(r,u)=>{const c=e.resolveComponent("a-switch"),f=e.resolveComponent("a-option"),m=e.resolveComponent("a-select"),d=e.resolveComponent("a-input"),h=e.resolveComponent("a-drawer");return e.openBlock(),e.createBlock(h,{width:500,visible:n.show,footer:!1,onCancel:i,unmountOnClose:""},{title:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(n.data.type)+"组件编辑 ",1)]),default:e.withCtx(()=>[e.createElementVNode("div",ck,[u[6]||(u[6]=e.createElementVNode("span",{class:"header-title"},"仅显示PC端",-1)),e.createVNode(c,{modelValue:n.data.onlyShowPc,"onUpdate:modelValue":u[0]||(u[0]=g=>n.data.onlyShowPc=g)},null,8,["modelValue"])]),e.createElementVNode("div",mk,[u[14]||(u[14]=e.createElementVNode("p",{class:"item-title"},"背景颜色",-1)),e.createVNode(m,{modelValue:n.data.data.bgColor,"onUpdate:modelValue":u[1]||(u[1]=g=>n.data.data.bgColor=g),placeholder:"请选择","allow-clear":""},{default:e.withCtx(()=>[e.createVNode(f,{value:"#ffffff"},{default:e.withCtx(()=>[...u[7]||(u[7]=[e.createTextVNode("白色",-1)])]),_:1}),e.createVNode(f,{value:"#F7F7FA"},{default:e.withCtx(()=>[...u[8]||(u[8]=[e.createTextVNode("灰色",-1)])]),_:1})]),_:1},8,["modelValue"]),u[15]||(u[15]=e.createElementVNode("p",{class:"item-title"},"间距设置",-1)),e.createVNode(m,{modelValue:s.value,"onUpdate:modelValue":u[2]||(u[2]=g=>s.value=g),placeholder:"请选择",onChange:l,"allow-clear":""},{default:e.withCtx(()=>[e.createVNode(f,{value:1},{default:e.withCtx(()=>[...u[9]||(u[9]=[e.createTextVNode("制表符起始间距(49px,24px)",-1)])]),_:1}),e.createVNode(f,{value:2},{default:e.withCtx(()=>[...u[10]||(u[10]=[e.createTextVNode("部分间距(80px,40px)",-1)])]),_:1}),e.createVNode(f,{value:3},{default:e.withCtx(()=>[...u[11]||(u[11]=[e.createTextVNode("组件间距(32px,40px)",-1)])]),_:1}),e.createVNode(f,{value:4},{default:e.withCtx(()=>[...u[12]||(u[12]=[e.createTextVNode("链接间距(16px,16px)",-1)])]),_:1}),e.createVNode(f,{value:5},{default:e.withCtx(()=>[...u[13]||(u[13]=[e.createTextVNode("页末间距(160px,80px)",-1)])]),_:1})]),_:1},8,["modelValue"]),u[16]||(u[16]=e.createElementVNode("p",{class:"item-title"},"PC高度(单位:px)",-1)),e.createVNode(d,{modelValue:n.data.data.desktopHeight,"onUpdate:modelValue":u[3]||(u[3]=g=>n.data.data.desktopHeight=g),disabled:""},null,8,["modelValue"]),u[17]||(u[17]=e.createElementVNode("p",{class:"item-title"},"移动端高度(单位:px)",-1)),e.createVNode(d,{modelValue:n.data.data.mobileHeight,"onUpdate:modelValue":u[4]||(u[4]=g=>n.data.data.mobileHeight=g),disabled:""},null,8,["modelValue"]),u[18]||(u[18]=e.createElementVNode("p",{class:"item-title"},"唯一标识",-1)),e.createVNode(d,{modelValue:n.data.data.id,"onUpdate:modelValue":u[5]||(u[5]=g=>n.data.data.id=g),placeholder:"请输入唯一标识","allow-clear":""},null,8,["modelValue"])])]),_:1},8,["visible"])}}}),hk=ne(pk,[["__scopeId","data-v-7411f7da"]]),fk=["id"],gk=e.defineComponent({name:"CustomSpace",__name:"index",props:{modelValue:{type:Object,default:()=>{}},isPreview:{type:Boolean,default:!0}},emits:["update:modelValue","handleDelete","handleCopy","handlePaste"],setup(n,{emit:t}){const o=n,a=t,i=()=>{var d;if(o.modelValue&&o.modelValue.data)return;const m={id:((d=o.modelValue)==null?void 0:d.id)||R(),type:"CustomSpace",onlyShowPc:!1,data:{desktopHeight:"49",mobileHeight:"24",bgColor:""}};a("update:modelValue",m)},s=e.computed(()=>{var m;return o.isPreview?!0:!((m=o.modelValue)!=null&&m.onlyShowPc)||!Ne()}),l=e.ref(!1),r=e.ref(!1),u=()=>{a("handleDelete",o.modelValue.id)},c=()=>{a("handleCopy",o.modelValue)},f=m=>{a("handlePaste",m)};return i(),(m,d)=>{var h,g,p,b,_,w,v,V;return e.openBlock(),e.createElementBlock(e.Fragment,null,[s.value?(e.openBlock(),e.createElementBlock("div",{key:0,id:(g=(h=n.modelValue)==null?void 0:h.data)==null?void 0:g.id,class:"custom-space",style:e.normalizeStyle({"background-color":(b=(p=n.modelValue)==null?void 0:p.data)==null?void 0:b.bgColor,"--desktop-height":((w=(_=n.modelValue)==null?void 0:_.data)==null?void 0:w.desktopHeight)+"px","--mobile-height":((V=(v=n.modelValue)==null?void 0:v.data)==null?void 0:V.mobileHeight)+"px"}),onMouseenter:d[2]||(d[2]=C=>l.value=!0),onMouseleave:d[3]||(d[3]=C=>l.value=!1)},[n.isPreview?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(Te,{key:0,show:l.value,"onUpdate:show":d[0]||(d[0]=C=>l.value=C),onHandleEdit:d[1]||(d[1]=C=>r.value=!0),onHandleDelete:u,onHandleCopy:c,onHandlePaste:f},null,8,["show"]))],44,fk)):e.createCommentVNode("",!0),n.isPreview?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(hk,{key:1,show:r.value,"onUpdate:show":d[4]||(d[4]=C=>r.value=C),data:n.modelValue},null,8,["show","data"]))],64)}}}),hd=ne(gk,[["__scopeId","data-v-83778e6b"]]),vk=Object.freeze(Object.defineProperty({__proto__:null,default:hd},Symbol.toStringTag,{value:"Module"})),yk=["src"],_k={class:"item-uplaod flex items-center"},bk=["src"],wk={class:"item-uplaod flex items-center"},xk={class:"item-title pt-2"},Vk={class:"btn-group"},Ck={key:0,class:"drag-handle"},kk={class:"item-action flex items-center"},Ek={class:"btn-group"},Tk={key:0,class:"drag-handle"},Nk=e.defineComponent({__name:"setting",props:{data:{type:Object,default:()=>{}},showLogo:{type:Boolean,default:!0},maxNum:{type:Number,default:2},canAddParagraph:{type:Boolean,default:!1},name:{type:String,default:""}},setup(n){const t=e.defineAsyncComponent(()=>import("vuedraggable")),o=e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./index-QFpkZqlg.js"))),a=e.ref(!1),i=e.computed(()=>({animation:200,group:"buttons",disabled:!1,ghostClass:"ghost",handle:".drag-handle",filter:".rich-text-editor, .arco-input, .arco-select, .arco-checkbox",preventOnFilter:!1})),s=e.computed(()=>({animation:200,group:"paragraphs",disabled:!1,ghostClass:"ghost",handle:".drag-handle",filter:".rich-text-editor, .arco-input, .arco-select, .arco-checkbox",preventOnFilter:!1})),l=m=>m&&m.length>1,r=n,u=(m,d)=>{d.length>=r.maxNum||d.push({id:R(),type:m,text:"查看更多",url:void 0,isExternal:!1})},c=(m,d)=>{m.splice(m.findIndex(h=>h.id===d),1)},f=m=>{m.push({title:"耀华国际教育学校浙江桐乡",subTitle:"耀华国际教育学校浙江桐乡",name:"耀华国际教育学校浙江桐乡",label:"123",imgSrc:"https://osswebsite.ycyw.com/media-library/ywies-bj/images/home/ywies-tx.jpg",alt:"",buttonList:{id:R(),type:"BtnList",readOnly:!0,width:"",bgColor:"",data:[]},paragraphs:{title:"",content:""}})};return(m,d)=>{const h=e.resolveComponent("a-input"),g=e.resolveComponent("icon-drag-arrow"),p=e.resolveComponent("icon-delete"),b=e.resolveComponent("a-button"),_=e.resolveComponent("a-checkbox"),w=e.resolveComponent("icon-plus"),v=e.resolveComponent("a-button-group");return e.openBlock(),e.createElementBlock(e.Fragment,null,[n.showLogo?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[d[20]||(d[20]=e.createElementVNode("p",{class:"item-title"},"学校logo",-1)),e.createElementVNode("img",{class:"item-img",src:n.data.logo},null,8,yk),e.createElementVNode("div",_k,[e.createVNode(h,{modelValue:n.data.logo,"onUpdate:modelValue":d[0]||(d[0]=V=>n.data.logo=V),placeholder:"请输入图片链接","allow-clear":""},null,8,["modelValue"]),e.createVNode(ze,{modelValue:n.data.logo,"onUpdate:modelValue":d[1]||(d[1]=V=>n.data.logo=V),name:`${n.name}_logo`},null,8,["modelValue","name"])])],64)):e.createCommentVNode("",!0),d[29]||(d[29]=e.createElementVNode("p",{class:"item-title"},"标题",-1)),e.createVNode(h,{modelValue:n.data.title,"onUpdate:modelValue":d[2]||(d[2]=V=>n.data.title=V),placeholder:"请输入标题","allow-clear":""},null,8,["modelValue"]),d[30]||(d[30]=e.createElementVNode("p",{class:"item-title"},"子标题",-1)),e.createVNode(h,{modelValue:n.data.subTitle,"onUpdate:modelValue":d[3]||(d[3]=V=>n.data.subTitle=V),placeholder:"请输入子标题","allow-clear":""},null,8,["modelValue"]),d[31]||(d[31]=e.createElementVNode("p",{class:"item-title"},"名称",-1)),e.createVNode(h,{modelValue:n.data.name,"onUpdate:modelValue":d[4]||(d[4]=V=>n.data.name=V),placeholder:"请输入名称","allow-clear":""},null,8,["modelValue"]),d[32]||(d[32]=e.createElementVNode("p",{class:"item-title"},"标签",-1)),e.createVNode(h,{modelValue:n.data.label,"onUpdate:modelValue":d[5]||(d[5]=V=>n.data.label=V),placeholder:"请输入标签","allow-clear":""},null,8,["modelValue"]),d[33]||(d[33]=e.createElementVNode("p",{class:"item-title"},"图片",-1)),e.createElementVNode("img",{class:"item-img",src:n.data.imgSrc},null,8,bk),e.createElementVNode("div",wk,[e.createVNode(h,{modelValue:n.data.imgSrc,"onUpdate:modelValue":d[6]||(d[6]=V=>n.data.imgSrc=V),placeholder:"请输入图片链接","allow-clear":""},null,8,["modelValue"]),e.createVNode(ze,{modelValue:n.data.imgSrc,"onUpdate:modelValue":d[7]||(d[7]=V=>n.data.imgSrc=V),name:`${n.name}_imgSrc`},null,8,["modelValue","name"])]),e.createVNode(h,{class:"mt-2",modelValue:n.data.alt,"onUpdate:modelValue":d[8]||(d[8]=V=>n.data.alt=V),placeholder:"图片alt","allow-clear":""},null,8,["modelValue"]),e.createElementVNode("p",xk,"按钮(最多"+e.toDisplayString(n.maxNum)+"个)",1),e.createVNode(e.unref(t),e.mergeProps({modelValue:n.data.buttonList.data,"onUpdate:modelValue":d[9]||(d[9]=V=>n.data.buttonList.data=V),"component-data":{tag:"div",type:"transition-group",name:a.value?null:"flip-list"}},i.value,{disabled:!l(n.data.buttonList.data),onStart:d[10]||(d[10]=V=>a.value=!0),onEnd:d[11]||(d[11]=V=>a.value=!1),"item-key":"id"}),{item:e.withCtx(({element:V})=>[(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["item-button item-link draggable-item",{"sortable-disabled":!l(n.data.buttonList.data)}]),key:V.id},[e.createElementVNode("div",Vk,[l(n.data.buttonList.data)?(e.openBlock(),e.createElementBlock("div",Ck,[e.createVNode(g,{class:"drag-icon"})])):e.createCommentVNode("",!0),e.createVNode(p,{class:"btn-delete",onClick:C=>c(n.data.buttonList.data,V.id)},null,8,["onClick"])]),e.createVNode(b,{type:"primary"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(V.text),1)]),_:2},1024),e.createElementVNode("div",kk,[e.createVNode(h,{class:"action-text",modelValue:V.text,"onUpdate:modelValue":C=>V.text=C,placeholder:"按钮文本","allow-clear":""},null,8,["modelValue","onUpdate:modelValue"]),e.createVNode(h,{modelValue:V.url,"onUpdate:modelValue":C=>V.url=C,placeholder:"按钮链接","allow-clear":""},null,8,["modelValue","onUpdate:modelValue"])]),e.createVNode(_,{"model-value":V.isExternal},{default:e.withCtx(()=>[...d[21]||(d[21]=[e.createTextVNode("是否外部链接",-1)])]),_:1},8,["model-value"])],2))]),_:1},16,["modelValue","component-data","disabled"]),n.data.buttonList.data.length<n.maxNum?(e.openBlock(),e.createBlock(v,{key:1,class:"mt-2",type:"primary"},{default:e.withCtx(()=>[e.createVNode(b,{size:"mini",onClick:d[12]||(d[12]=V=>u("default",n.data.buttonList.data))},{icon:e.withCtx(()=>[e.createVNode(w)]),default:e.withCtx(()=>[d[22]||(d[22]=e.createTextVNode(" 默认按钮 ",-1))]),_:1}),e.createVNode(b,{size:"mini",onClick:d[13]||(d[13]=V=>u("white",n.data.buttonList.data))},{icon:e.withCtx(()=>[e.createVNode(w)]),default:e.withCtx(()=>[d[23]||(d[23]=e.createTextVNode(" 白色按钮 ",-1))]),_:1}),e.createVNode(b,{size:"mini",onClick:d[14]||(d[14]=V=>u("light",n.data.buttonList.data))},{icon:e.withCtx(()=>[e.createVNode(w)]),default:e.withCtx(()=>[d[24]||(d[24]=e.createTextVNode(" 亮色按钮 ",-1))]),_:1}),e.createVNode(b,{size:"mini",onClick:d[15]||(d[15]=V=>u("blue",n.data.buttonList.data))},{icon:e.withCtx(()=>[e.createVNode(w)]),default:e.withCtx(()=>[d[25]||(d[25]=e.createTextVNode(" 蓝色按钮 ",-1))]),_:1})]),_:1})):e.createCommentVNode("",!0),d[34]||(d[34]=e.createElementVNode("p",{class:"item-name mt-2"},"段落",-1)),e.createVNode(e.unref(t),e.mergeProps({modelValue:n.data.paragraphs,"onUpdate:modelValue":d[16]||(d[16]=V=>n.data.paragraphs=V),"component-data":{tag:"div",type:"transition-group",name:a.value?null:"flip-list"}},s.value,{disabled:!l(n.data.paragraphs),onStart:d[17]||(d[17]=V=>a.value=!0),onEnd:d[18]||(d[18]=V=>a.value=!1),"item-key":"id"}),{item:e.withCtx(({element:V})=>[(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["item-button item-link draggable-item",{"sortable-disabled":!l(n.data.paragraphs)}]),key:V.id},[e.createElementVNode("div",Ek,[l(n.data.paragraphs)?(e.openBlock(),e.createElementBlock("div",Tk,[e.createVNode(g,{class:"drag-icon"})])):e.createCommentVNode("",!0),n.canAddParagraph?(e.openBlock(),e.createBlock(p,{key:1,class:"btn-delete",onClick:C=>c(n.data.paragraphs,V.id)},null,8,["onClick"])):e.createCommentVNode("",!0)]),d[26]||(d[26]=e.createElementVNode("p",{class:"item-title"},"标题",-1)),e.createVNode(h,{modelValue:V.title,"onUpdate:modelValue":C=>V.title=C,placeholder:"请输入标题","allow-clear":""},null,8,["modelValue","onUpdate:modelValue"]),d[27]||(d[27]=e.createElementVNode("p",{class:"item-title mt-2"},"内容",-1)),e.createVNode(e.unref(o),{name:`${n.name}_editor_${V.id}`,modelValue:V.content,"onUpdate:modelValue":C=>V.content=C},null,8,["name","modelValue","onUpdate:modelValue"])],2))]),_:1},16,["modelValue","component-data","disabled"]),n.canAddParagraph?(e.openBlock(),e.createElementBlock("div",{key:2,class:"item-add-btn flex items-center",onClick:d[19]||(d[19]=V=>f(n.data.paragraphs))},[e.createVNode(w),d[28]||(d[28]=e.createElementVNode("span",{class:"btn-text"},"添加段落",-1))])):e.createCommentVNode("",!0)],64)}}}),fd=ne(Nk,[["__scopeId","data-v-93679f12"]]),Sk={class:"setting-content"},Bk={class:"setting-header flex items-center"},Dk={class:"setting-header flex items-center"},Pk={class:"setting-header flex items-center"},$k={class:"setting-header flex items-center"},Ak={class:"setting-body"},Lk={class:"setting-item"},Ik={class:"btn-group"},Ok={key:0,class:"drag-handle"},Mk=["src"],Uk={class:"item-uplaod flex items-center"},Rk=e.defineComponent({__name:"setting",props:{show:{type:Boolean,default:!1},data:{type:Object,default:()=>{}}},emits:["update:show"],setup(n,{emit:t}){const o=e.defineAsyncComponent(()=>import("vuedraggable")),a=e.ref(!1),i=e.computed(()=>({animation:200,group:"gallerys",disabled:!1,ghostClass:"ghost",handle:".drag-handle",filter:".arco-input, .arco-select, .arco-checkbox",preventOnFilter:!1})),s=m=>m&&m.length>1,l=n,r=t,u=()=>{r("update:show",!1)},c=m=>{l.data.data.push({id:R(),type:m,text:"查看更多",url:void 0,isExternal:!1,isLight:!1})},f=m=>{l.data.data=l.data.data.filter(d=>d.id!==m)};return(m,d)=>{const h=e.resolveComponent("a-switch"),g=e.resolveComponent("a-option"),p=e.resolveComponent("a-select"),b=e.resolveComponent("a-input"),_=e.resolveComponent("icon-plus"),w=e.resolveComponent("a-button"),v=e.resolveComponent("a-button-group"),V=e.resolveComponent("icon-drag-arrow"),C=e.resolveComponent("icon-delete"),S=e.resolveComponent("a-drawer");return e.openBlock(),e.createBlock(S,{width:500,visible:n.show,footer:!1,onCancel:u,unmountOnClose:""},{title:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(n.data.type)+"组件编辑 ",1)]),default:e.withCtx(()=>[e.createElementVNode("div",Sk,[e.createElementVNode("div",Bk,[d[9]||(d[9]=e.createElementVNode("span",{class:"header-title"},"仅显示PC端",-1)),e.createVNode(h,{modelValue:n.data.onlyShowPc,"onUpdate:modelValue":d[0]||(d[0]=N=>n.data.onlyShowPc=N)},null,8,["modelValue"])]),e.createElementVNode("div",Dk,[d[12]||(d[12]=e.createElementVNode("span",{class:"header-title"},"组件背景",-1)),e.createVNode(p,{modelValue:n.data.bgColor,"onUpdate:modelValue":d[1]||(d[1]=N=>n.data.bgColor=N),placeholder:"请选择","allow-clear":""},{default:e.withCtx(()=>[e.createVNode(g,{value:"#ffffff"},{default:e.withCtx(()=>[...d[10]||(d[10]=[e.createTextVNode("白色",-1)])]),_:1}),e.createVNode(g,{value:"#F7F7FA"},{default:e.withCtx(()=>[...d[11]||(d[11]=[e.createTextVNode("灰色",-1)])]),_:1})]),_:1},8,["modelValue"])]),e.createElementVNode("div",Pk,[d[13]||(d[13]=e.createElementVNode("span",{class:"header-title"},"pc列数",-1)),e.createVNode(b,{modelValue:n.data.desktopCol,"onUpdate:modelValue":d[2]||(d[2]=N=>n.data.desktopCol=N),placeholder:"请输入","allow-clear":""},null,8,["modelValue"])]),e.createElementVNode("div",$k,[d[14]||(d[14]=e.createElementVNode("span",{class:"header-title"},"移动端列数",-1)),e.createVNode(b,{modelValue:n.data.mobileCol,"onUpdate:modelValue":d[3]||(d[3]=N=>n.data.mobileCol=N),placeholder:"请输入","allow-clear":""},null,8,["modelValue"])]),e.createVNode(v,{type:"primary"},{default:e.withCtx(()=>[e.createVNode(w,{size:"mini",onClick:d[4]||(d[4]=N=>c("GalleryListItem"))},{icon:e.withCtx(()=>[e.createVNode(_)]),default:e.withCtx(()=>[d[15]||(d[15]=e.createTextVNode(" 普通项目 ",-1))]),_:1}),e.createVNode(w,{size:"mini",onClick:d[5]||(d[5]=N=>c("GalleryListProfile"))},{icon:e.withCtx(()=>[e.createVNode(_)]),default:e.withCtx(()=>[d[16]||(d[16]=e.createTextVNode(" 文章项目 ",-1))]),_:1})]),_:1}),e.createElementVNode("div",Ak,[e.createElementVNode("div",Lk,[e.createVNode(e.unref(o),e.mergeProps({modelValue:n.data.data,"onUpdate:modelValue":d[6]||(d[6]=N=>n.data.data=N),"component-data":{tag:"div",type:"transition-group",name:a.value?null:"flip-list"}},i.value,{disabled:!s(n.data.data),onStart:d[7]||(d[7]=N=>a.value=!0),onEnd:d[8]||(d[8]=N=>a.value=!1),"item-key":"id"}),{item:e.withCtx(({element:N})=>[(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["item-button draggable-item",{"sortable-disabled":!s(n.data.data)}]),key:N.id},[e.createElementVNode("div",Ik,[s(n.data.data)?(e.openBlock(),e.createElementBlock("div",Ok,[e.createVNode(V,{class:"drag-icon"})])):e.createCommentVNode("",!0),e.createVNode(C,{class:"btn-delete",onClick:D=>f(N.id)},null,8,["onClick"])]),d[17]||(d[17]=e.createElementVNode("p",{class:"item-title"},"标题",-1)),e.createVNode(b,{modelValue:N.title,"onUpdate:modelValue":D=>N.title=D,placeholder:"请输入标题","allow-clear":""},null,8,["modelValue","onUpdate:modelValue"]),d[18]||(d[18]=e.createElementVNode("p",{class:"item-title"},"文本",-1)),e.createVNode(b,{modelValue:N.text,"onUpdate:modelValue":D=>N.text=D,placeholder:"请输入文本","allow-clear":""},null,8,["modelValue","onUpdate:modelValue"]),d[19]||(d[19]=e.createElementVNode("p",{class:"item-title"},"图片",-1)),e.createElementVNode("img",{class:"item-img",src:N.imgSrc},null,8,Mk),e.createElementVNode("div",Uk,[e.createVNode(b,{modelValue:N.imgSrc,"onUpdate:modelValue":D=>N.imgSrc=D,placeholder:"请输入图片链接","allow-clear":""},null,8,["modelValue","onUpdate:modelValue"]),e.createVNode(ze,{modelValue:N.imgSrc,"onUpdate:modelValue":D=>N.imgSrc=D,name:`GalleryList_${N.id}`,"button-class":"fit-content"},null,8,["modelValue","onUpdate:modelValue","name"])]),e.createVNode(b,{class:"mt-2",modelValue:N.alt,"onUpdate:modelValue":D=>N.alt=D,placeholder:"图片alt","allow-clear":""},null,8,["modelValue","onUpdate:modelValue"]),d[20]||(d[20]=e.createElementVNode("p",{class:"item-title"},"网址",-1)),e.createVNode(b,{modelValue:N.url,"onUpdate:modelValue":D=>N.url=D,placeholder:"请输入网址","allow-clear":""},null,8,["modelValue","onUpdate:modelValue"]),d[21]||(d[21]=e.createElementVNode("p",{class:"item-title"},"Profile Information",-1)),N.profile?(e.openBlock(),e.createBlock(fd,{key:0,data:N.profile,showLogo:!1,canAddParagraph:!0,name:`GalleryList_${N.id}`},null,8,["data","name"])):e.createCommentVNode("",!0)],2))]),_:1},16,["modelValue","component-data","disabled"])])])])]),_:1},8,["visible"])}}}),Fk=ne(Rk,[["__scopeId","data-v-8b6e58e3"]]),Hk={class:"lightbox__content"},jk={class:"lightbox__content__head"},zk={class:"lightbox__content__head__image"},qk=["src","alt"],Wk={class:"lightbox__content__head__info"},Gk={class:"lightbox__content__head__info__title"},Xk={class:"lightbox__content__head__info__subtitle"},Yk={class:"lightbox__content__head__info__label"},Kk={class:"lightbox__content__head__info__btn"},Qk={class:"lightbox__content__main",style:{"--head-height":"297px"}},Jk={class:"scroll-bar"},Zk={"data-simplebar-auto-hide":"false",class:"simple-bar","data-simplebar":"init"},eE={class:"simplebar-wrapper",style:{margin:"0px -24px 0px 0px"}},tE={class:"simplebar-mask"},nE={class:"simplebar-offset",style:{right:"0px",bottom:"0px"}},oE={class:"simplebar-content-wrapper",tabindex:"0",role:"region","aria-label":"scrollable content",style:{overflow:"auto"}},aE={class:"simplebar-content",style:{padding:"0px 24px 0px 0px"}},iE={class:"lightbox__content__body"},sE={class:"lightbox__content__body__title"},lE=["innerHTML"],rE={class:"lightbox__content__footer"},dE={class:"lightbox__content__footer__logo"},uE=["src"],cE=e.defineComponent({__name:"index",props:{data:{type:Object,default:()=>{}}},emits:["close"],setup(n,{emit:t}){const o=t,a=()=>{o("close")},i=()=>(window==null?void 0:window.innerWidth)>767.98?"720px":"100%";return(s,l)=>{var r,u,c,f,m,d;return e.openBlock(),e.createElementBlock("div",{class:"lightbox__wrapper",style:e.normalizeStyle({width:i()})},[e.createElementVNode("div",Hk,[e.createElementVNode("div",{class:"lightbox__content__cross i i-cross-modal",onClick:a}),e.createElementVNode("div",{class:"lightbox__content__prev i i-arrow-prev",onClick:a}),e.createElementVNode("div",jk,[e.createElementVNode("div",zk,[e.createElementVNode("img",{src:(r=n.data)==null?void 0:r.imgSrc,alt:(u=n.data)==null?void 0:u.alt},null,8,qk)]),e.createElementVNode("div",Wk,[e.createElementVNode("h2",Gk,e.toDisplayString((c=n.data)==null?void 0:c.title),1),e.createElementVNode("h6",Xk,e.toDisplayString((f=n.data)==null?void 0:f.subTitle),1),e.createElementVNode("div",Yk,e.toDisplayString((m=n.data)==null?void 0:m.label),1),e.createElementVNode("div",Kk,[e.createVNode(Vl,{modelValue:n.data.buttonList,"onUpdate:modelValue":l[0]||(l[0]=h=>n.data.buttonList=h)},null,8,["modelValue"])])])]),e.createElementVNode("div",Qk,[e.createElementVNode("div",Jk,[e.createElementVNode("div",Zk,[e.createElementVNode("div",eE,[l[1]||(l[1]=e.createElementVNode("div",{class:"simplebar-height-auto-observer-wrapper"},[e.createElementVNode("div",{class:"simplebar-height-auto-observer"})],-1)),e.createElementVNode("div",tE,[e.createElementVNode("div",nE,[e.createElementVNode("div",oE,[e.createElementVNode("div",aE,[e.createElementVNode("div",iE,[e.createElementVNode("ul",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList((d=n.data)==null?void 0:d.paragraphs,h=>(e.openBlock(),e.createElementBlock("li",{class:"lightbox__content__body__list",key:h.id},[e.createElementVNode("div",sE,e.toDisplayString(h.title),1),e.createElementVNode("div",{class:"lightbox__content__body__text",innerHTML:h.content},null,8,lE)]))),128))])]),e.createElementVNode("div",rE,[e.createElementVNode("div",dE,[e.createElementVNode("img",{src:n.data.logo||"https://ywies-tx.cedim/images/logo/logo-ycyw.png",alt:"school logo"},null,8,uE)])])])])])]),l[2]||(l[2]=e.createElementVNode("div",{class:"simplebar-placeholder",style:{width:"auto",height:"300px"}},null,-1))]),l[3]||(l[3]=e.createElementVNode("div",{class:"simplebar-track simplebar-horizontal",style:{visibility:"hidden"}},[e.createElementVNode("div",{class:"simplebar-scrollbar simplebar-visible",style:{width:"0px",display:"none"}})],-1)),l[4]||(l[4]=e.createElementVNode("div",{class:"simplebar-track simplebar-vertical",style:{visibility:"hidden"}},[e.createElementVNode("div",{class:"simplebar-scrollbar simplebar-visible",style:{height:"0px",display:"none"}})],-1))])])])])],4)}}}),mE=ne(cE,[["__scopeId","data-v-5ea336d6"]]),gd=e.defineComponent({__name:"modal",props:{show:{type:Boolean,default:!1},data:{type:Object,default:()=>{}}},emits:["update:show"],setup(n,{emit:t}){const o=n,a=e.computed(()=>o.show),i=t,s=()=>{i("update:show",!1)};return(l,r)=>{const u=e.resolveComponent("a-modal");return e.openBlock(),e.createBlock(u,{visible:a.value,"onUpdate:visible":r[0]||(r[0]=c=>a.value=c),hideTitle:!0,footer:!1,bodyClass:"profile-model",onCancel:s},{default:e.withCtx(()=>[e.createVNode(mE,{data:n.data,onClose:s},null,8,["data"])]),_:1},8,["visible"])}}}),pE=["onClick"],hE={class:"gallery-caption__img"},fE=["src","alt"],gE={class:"gallery-caption__title tx-subtitle text-blue text-center mt-3 mt-md-4 px-3"},vE={key:0,class:"tx-body text-teal-darkest text-center mt-2 mt-md-3 mb-3"},yE=e.defineComponent({name:"GalleryList",__name:"index",props:{modelValue:{type:Object,default:()=>{}},isPreview:{type:Boolean,default:!0}},emits:["update:modelValue","handleDelete","handleCopy","handlePaste"],setup(n,{emit:t}){const o=n,a=t,i=()=>{var p;if(o.modelValue&&o.modelValue.data)return;const g={id:((p=o.modelValue)==null?void 0:p.id)||R(),type:"GalleryList",onlyShowPc:!1,bgColor:"",desktopCol:4,mobileCol:2,data:[{id:R(),type:"GalleryListItem",title:"这里是标题",text:"这里是文本",imgSrc:"https://osswebsite-test.cedim.cn/media-library/ywies-tx/images/high-school-test/home/different_1_optim.png",alt:"",url:""},{id:R(),type:"GalleryListProfile",title:"这里是标题",text:"这里是文本",imgSrc:"https://osswebsite-test.cedim.cn/media-library/ywies-tx/images/high-school-test/home/different_1_optim.png",alt:"",url:"",profile:{title:"这里是标题",subTitle:"这里是副标题",name:"这里是名称",label:"这里是标签",imgSrc:"https://osswebsite.ycyw.com/media-library/ywies-bj/images/home/ywies-tx.jpg",alt:"",buttonList:{id:R(),type:"BtnList",readOnly:!0,width:"",bgColor:"",data:[{id:R(),type:"white",text:"按钮名称",url:"",isExternal:!1}]},paragraphs:[{id:R(),title:"这里是文章标题",content:"这里是文章内容"}]}}]};a("update:modelValue",g)},s=e.computed(()=>{var g;return o.isPreview?!((g=o.modelValue)!=null&&g.onlyShowPc)||!Ne():!0}),l=e.ref(!1),r=e.ref(!1),u=()=>{a("handleDelete",o.modelValue.id)},c=()=>{a("handleCopy",o.modelValue)},f=g=>{a("handlePaste",g)},m=e.ref(!1),d=e.ref({}),h=g=>{g.type==="GalleryListProfile"&&(d.value=g.profile,m.value=!0)};return i(),(g,p)=>{var w;const b=e.resolveComponent("a-col"),_=e.resolveComponent("a-row");return e.openBlock(),e.createElementBlock(e.Fragment,null,[s.value?(e.openBlock(),e.createElementBlock("div",{key:0,class:"gallery-list",onMouseenter:p[2]||(p[2]=v=>l.value=!0),onMouseleave:p[3]||(p[3]=v=>l.value=!1)},[e.createElementVNode("div",{class:"gallery-container gallery-caption container-content",style:e.normalizeStyle({backgroundColor:(w=n.modelValue)==null?void 0:w.bgColor})},[e.createVNode(_,{class:"caption-row"},{default:e.withCtx(()=>{var v;return[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList((v=n.modelValue)==null?void 0:v.data,V=>{var C,S;return e.openBlock(),e.createBlock(b,{key:V.id,sm:{span:24/((C=n.modelValue)==null?void 0:C.mobileCol)},md:{span:24/((S=n.modelValue)==null?void 0:S.desktopCol)}},{default:e.withCtx(()=>[e.createElementVNode("div",{class:e.normalizeClass(["gallery-caption",[V.url&&"has-url",V.profile&&"has-profile"]]),onClick:N=>h(V)},[e.createElementVNode("div",hE,[e.createElementVNode("img",{src:V.imgSrc,alt:V.alt},null,8,fE)]),e.createElementVNode("div",gE,e.toDisplayString(V.title),1),V.text?(e.openBlock(),e.createElementBlock("div",vE,e.toDisplayString(V.text),1)):e.createCommentVNode("",!0)],10,pE)]),_:2},1032,["sm","md"])}),128))]}),_:1})],4),n.isPreview?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(Te,{key:0,show:l.value,"onUpdate:show":p[0]||(p[0]=v=>l.value=v),onHandleEdit:p[1]||(p[1]=v=>r.value=!0),onHandleDelete:u,onHandleCopy:c,onHandlePaste:f},null,8,["show"]))],32)):e.createCommentVNode("",!0),n.isPreview?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(Fk,{key:1,show:r.value,"onUpdate:show":p[4]||(p[4]=v=>r.value=v),data:n.modelValue},null,8,["show","data"])),e.createVNode(gd,{show:m.value,"onUpdate:show":p[5]||(p[5]=v=>m.value=v),data:d.value},null,8,["show","data"])],64)}}}),vd=ne(yE,[["__scopeId","data-v-aee47744"]]),_E=Object.freeze(Object.defineProperty({__proto__:null,default:vd},Symbol.toStringTag,{value:"Module"})),bE={class:"setting-header flex items-center"},wE={class:"setting-content"},xE={class:"setting-body"},VE={class:"item-name"},CE={class:"btn-group"},kE={key:0,class:"drag-handle"},EE={class:"item-name"},TE=["src"],NE={class:"mt-2 flex items-center"},SE=["src"],BE={class:"mt-2 flex items-center"},DE=["src"],PE={class:"mt-2 flex items-center"},$E={class:"btn-group"},AE={key:0,class:"drag-handle"},LE={class:"item-action flex items-center"},IE=["onClick"],OE=e.defineComponent({__name:"setting",props:{show:{type:Boolean,default:!1},data:{type:Object,default:()=>{}}},emits:["update:show","updateSwiper"],setup(n,{emit:t}){const o=e.defineAsyncComponent(()=>import("vuedraggable")),a=e.ref(!1),i=e.computed(()=>({animation:200,group:"banners",disabled:!1,ghostClass:"ghost",handle:".drag-handle",filter:".arco-input, .arco-select, .arco-checkbox",preventOnFilter:!1})),s=e.computed(()=>({animation:200,group:"links",disabled:!1,ghostClass:"ghost",handle:".drag-handle",filter:".arco-input, .arco-select, .arco-checkbox",preventOnFilter:!1})),l=h=>h&&h.length>1,r=t,u=()=>{r("update:show",!1)},c=(h,g)=>{h.push({id:R(),type:g,imgSrc:"",title:"",alt:"",link:"",videoSrc:g==="Video"?"":void 0}),r("updateSwiper")},f=(h,g)=>{h.splice(h.findIndex(p=>p.id===g),1),r("updateSwiper")},m=h=>{h.push({id:R(),text:"查看更多",url:void 0,isExternal:!1})},d=(h,g)=>{h.splice(h.findIndex(p=>p.id===g),1)};return(h,g)=>{const p=e.resolveComponent("a-switch"),b=e.resolveComponent("icon-drag-arrow"),_=e.resolveComponent("icon-delete"),w=e.resolveComponent("a-input"),v=e.resolveComponent("a-checkbox"),V=e.resolveComponent("icon-plus"),C=e.resolveComponent("a-button"),S=e.resolveComponent("a-button-group"),N=e.resolveComponent("a-link"),D=e.resolveComponent("a-drawer");return e.openBlock(),e.createBlock(D,{width:500,visible:n.show,footer:!1,onCancel:u,unmountOnClose:""},{title:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(n.data.type)+"组件编辑 ",1)]),default:e.withCtx(()=>[e.createElementVNode("div",bE,[g[5]||(g[5]=e.createElementVNode("span",{class:"header-title"},"仅显示PC端",-1)),e.createVNode(p,{modelValue:n.data.onlyShowPc,"onUpdate:modelValue":g[0]||(g[0]=$=>n.data.onlyShowPc=$)},null,8,["modelValue"])]),e.createElementVNode("div",wE,[e.createElementVNode("div",xE,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.data.data,$=>(e.openBlock(),e.createElementBlock("div",{class:"setting-item",key:$.id},[e.createElementVNode("p",VE,e.toDisplayString($.type),1),$.type==="Banners"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createVNode(e.unref(o),e.mergeProps({modelValue:$.data,"onUpdate:modelValue":k=>$.data=k,"component-data":{tag:"div",type:"transition-group",name:a.value?null:"flip-list"}},{ref_for:!0},i.value,{disabled:!l($.data),onStart:g[1]||(g[1]=k=>a.value=!0),onEnd:g[2]||(g[2]=k=>a.value=!1),"item-key":"id"}),{item:e.withCtx(({element:k})=>[(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["item-button draggable-item",{"sortable-disabled":!l($.data)}]),key:k.id},[e.createElementVNode("div",CE,[l($.data)?(e.openBlock(),e.createElementBlock("div",kE,[e.createVNode(b,{class:"drag-icon"})])):e.createCommentVNode("",!0),e.createVNode(_,{class:"btn-delete",onClick:A=>f($.data,$.id)},null,8,["onClick"])]),e.createElementVNode("p",EE,e.toDisplayString(k.type),1),e.createVNode(w,{class:"mt-2",modelValue:k.title,"onUpdate:modelValue":A=>k.title=A,placeholder:"标题","allow-clear":""},null,8,["modelValue","onUpdate:modelValue"]),e.createVNode(w,{class:"mt-2",modelValue:k.alt,"onUpdate:modelValue":A=>k.alt=A,placeholder:"图片alt","allow-clear":""},null,8,["modelValue","onUpdate:modelValue"]),e.createVNode(w,{class:"mt-2",modelValue:k.link,"onUpdate:modelValue":A=>k.link=A,placeholder:"链接","allow-clear":""},null,8,["modelValue","onUpdate:modelValue"]),k.type==="Image"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createElementVNode("img",{class:"item-img",src:k.imgSrc},null,8,TE),e.createElementVNode("div",NE,[e.createVNode(w,{modelValue:k.imgSrc,"onUpdate:modelValue":A=>k.imgSrc=A,placeholder:"请输入图片链接","allow-clear":""},null,8,["modelValue","onUpdate:modelValue"]),e.createVNode(ze,{modelValue:k.imgSrc,"onUpdate:modelValue":A=>k.imgSrc=A,name:`HeroSlide_${k.id}`,"button-class":"fit-content"},null,8,["modelValue","onUpdate:modelValue","name"])])],64)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createElementVNode("video",{class:"item-img",src:k.videoSrc,controls:""},null,8,SE),e.createElementVNode("div",BE,[e.createVNode(w,{modelValue:k.videoSrc,"onUpdate:modelValue":A=>k.videoSrc=A,placeholder:"请输入视频链接","allow-clear":""},null,8,["modelValue","onUpdate:modelValue"]),e.createVNode(ze,{modelValue:k.videoSrc,"onUpdate:modelValue":A=>k.videoSrc=A,name:`HeroSlide_${k.id}`,"button-class":"fit-content"},null,8,["modelValue","onUpdate:modelValue","name"])]),e.createElementVNode("img",{class:"item-img",src:k.imgSrc},null,8,DE),e.createElementVNode("div",PE,[e.createVNode(w,{modelValue:k.imgSrc,"onUpdate:modelValue":A=>k.imgSrc=A,placeholder:"视频封面","allow-clear":""},null,8,["modelValue","onUpdate:modelValue"]),e.createVNode(ze,{modelValue:k.imgSrc,"onUpdate:modelValue":A=>k.imgSrc=A,name:`HeroSlide_${k.id}`,"button-class":"fit-content"},null,8,["modelValue","onUpdate:modelValue","name"])])],64)),e.createVNode(v,{class:"mt-2",modelValue:k.isExternal,"onUpdate:modelValue":A=>k.isExternal=A},{default:e.withCtx(()=>[...g[6]||(g[6]=[e.createTextVNode("是否外部链接",-1)])]),_:1},8,["modelValue","onUpdate:modelValue"])],2))]),_:2},1040,["modelValue","onUpdate:modelValue","component-data","disabled"]),e.createVNode(S,{class:"mt-2",type:"primary"},{default:e.withCtx(()=>[e.createVNode(C,{size:"mini",type:"outline",onClick:k=>c($.data,"Image")},{icon:e.withCtx(()=>[e.createVNode(V)]),default:e.withCtx(()=>[g[7]||(g[7]=e.createTextVNode(" 图片 ",-1))]),_:1},8,["onClick"]),e.createVNode(C,{size:"mini",type:"outline",onClick:k=>c($.data,"Video")},{icon:e.withCtx(()=>[e.createVNode(V)]),default:e.withCtx(()=>[g[8]||(g[8]=e.createTextVNode(" 视频 ",-1))]),_:1},8,["onClick"])]),_:2},1024)],64)):e.createCommentVNode("",!0),$.type==="Links"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createVNode(e.unref(o),e.mergeProps({modelValue:$.data,"onUpdate:modelValue":k=>$.data=k,"component-data":{tag:"div",type:"transition-group",name:a.value?null:"flip-list"}},{ref_for:!0},s.value,{disabled:!l($.data),onStart:g[3]||(g[3]=k=>a.value=!0),onEnd:g[4]||(g[4]=k=>a.value=!1),"item-key":"id"}),{item:e.withCtx(({element:k})=>[(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["item-button draggable-item",{"sortable-disabled":!l($.data)}]),key:k.id},[e.createElementVNode("div",$E,[l($.data)?(e.openBlock(),e.createElementBlock("div",AE,[e.createVNode(b,{class:"drag-icon"})])):e.createCommentVNode("",!0),e.createVNode(_,{class:"btn-delete",onClick:A=>d($.data,k.id)},null,8,["onClick"])]),e.createVNode(N,{href:"link"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(k.text),1)]),_:2},1024),e.createElementVNode("div",LE,[e.createVNode(w,{class:"action-text",modelValue:k.text,"onUpdate:modelValue":A=>k.text=A,placeholder:"按钮文本","allow-clear":""},null,8,["modelValue","onUpdate:modelValue"]),e.createVNode(w,{modelValue:k.url,"onUpdate:modelValue":A=>k.url=A,placeholder:"按钮链接","allow-clear":""},null,8,["modelValue","onUpdate:modelValue"])]),e.createVNode(v,{modelValue:k.isExternal,"onUpdate:modelValue":A=>k.isExternal=A},{default:e.withCtx(()=>[...g[9]||(g[9]=[e.createTextVNode("是否外部链接",-1)])]),_:1},8,["modelValue","onUpdate:modelValue"])],2))]),_:2},1040,["modelValue","onUpdate:modelValue","component-data","disabled"]),e.createElementVNode("div",{class:"item-add-btn flex items-center",onClick:k=>m($.data)},[e.createVNode(V),g[10]||(g[10]=e.createElementVNode("span",{class:"btn-text"},"添加链接",-1))],8,IE)],64)):e.createCommentVNode("",!0)]))),128))])])]),_:1},8,["visible"])}}}),ME=ne(OE,[["__scopeId","data-v-23227712"]]),UE={class:"banner-quicklinks"},RE={class:"quick-links__list"},FE=e.defineComponent({__name:"index",props:{data:{type:Array,default:()=>[]},isPreview:{type:Boolean,default:!0}},emits:["handleClick"],setup(n,{emit:t}){const o=n,a=t,i=d=>{a("handleClick",d)},s=e.ref(null),l=e.ref(!1),r=e.ref(!1),u=()=>{const d=s.value;d&&(l.value=d.scrollLeft>0,r.value=d.scrollLeft+d.clientWidth<d.scrollWidth)},c=()=>{const d=s.value;d&&d.scrollBy({left:-d.clientWidth/1.5,behavior:"smooth"})},f=()=>{const d=s.value;d&&d.scrollBy({left:d.clientWidth/1.5,behavior:"smooth"})},m=()=>{u()};return e.watch(()=>o.data,async()=>{await e.nextTick(),u()}),e.onMounted(()=>{typeof window<"u"&&window.addEventListener("resize",u),e.nextTick(u)}),e.onUnmounted(()=>{typeof window<"u"&&window.removeEventListener("resize",u)}),(d,h)=>(e.openBlock(),e.createElementBlock("div",UE,[e.withDirectives(e.createElementVNode("div",{class:"quick-links__nav__prev",onClick:c},null,512),[[e.vShow,l.value]]),e.createElementVNode("div",{class:"quick-links__wrapper",ref_key:"quickLinksWrapperRef",ref:s,onScroll:m},[e.createElementVNode("div",RE,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.data,g=>(e.openBlock(),e.createBlock(qo,{key:g.id,data:g,hasHoverBg:!1,isPreview:n.isPreview,onHandleClick:i},null,8,["data","isPreview"]))),128))])],544),e.withDirectives(e.createElementVNode("div",{class:"quick-links__nav__next",onClick:f},null,512),[[e.vShow,r.value]])]))}}),HE=ne(FE,[["__scopeId","data-v-240a14db"]]),jE={class:"swiper-wrapper"},zE={class:"swiper-slide__media"},qE=["src","alt"],WE={key:1,class:"video-player"},GE=["poster"],XE=["src"],YE=["href"],KE={class:"swiper-slide__body"},QE={class:"swiper-slide__body__title text-center"},JE={class:"video-box"},ZE=["src"],eT=e.defineComponent({__name:"index",props:{data:{},imageInterval:{},videoAutoNext:{type:Boolean},isPreview:{type:Boolean}},setup(n,{expose:t}){const o=n,a=e.ref();let i=null,s=0,l=null,r=null,u=null,c=null,f=null;const m=async()=>{try{const A=await import("swiper"),{Navigation:B,Pagination:I,Autoplay:z}=await import("swiper/modules");r=A.Swiper,u=B,c=I,f=z,a.value&&(i=new r(a.value,{modules:[u,c,f],autoHeight:!1,speed:1e3,effect:"fade",fadeEffect:{crossFade:!0},navigation:{nextEl:".swiper-button-next",prevEl:".swiper-button-prev"},pagination:{el:".swiper-pagination",clickable:!0},on:{slideChange:Y=>{s=Y.activeIndex,p(s)},touchStart:()=>{h()},touchEnd:()=>{setTimeout(()=>{const Y=o.data[d.value];Y&&Y.type==="Image"&&g()},100)}}}))}catch(A){console.error("❌ Swiper组件: 初始化失败:",A)}},d=e.ref(0),h=()=>{l&&(clearTimeout(l),l=null)},g=()=>{h();const A=o.data[d.value];if(A&&A.type==="Image"){const B=o.imageInterval||5e3;l=setTimeout(()=>{i&&i.slideNext()},B)}},p=A=>{if(h(),C(),d.value=A,!o.isPreview)return;const B=o.data[d.value];B.type==="Video"?V():B.type==="Image"&&g()},b=()=>{v.value=!1,o.videoAutoNext!==!1&&i&&setTimeout(()=>{i.slideNext()},200)},_=e.ref([]),w=(A,B)=>{const I=A&&"$el"in A?A.$el:A;I instanceof HTMLVideoElement&&(_.value[B]=I)},v=e.ref(!1),V=()=>{_.value[d.value]&&(_.value[d.value].play(),v.value=!0,h())},C=()=>{_.value[d.value]&&(_.value[d.value].pause(),v.value=!1)},S=e.ref(!1),N=e.ref(),D=e.ref(),$=()=>{C();const A=o.data[d.value];A&&A.videoSrc&&(D.value=A.videoSrc,S.value=!0,e.nextTick(()=>{N.value&&(N.value.load(),N.value.play())}))},k=()=>{N.value&&(N.value.pause(),N.value.currentTime=0),S.value=!1,D.value=void 0};return e.onMounted(async()=>{await m(),p(0)}),e.onUnmounted(()=>{h(),i&&i.destroy(!0,!0)}),t({initSwiper:m}),(A,B)=>{const I=e.resolveComponent("a-modal");return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("div",{class:"swiper-container",ref_key:"swiperContainer",ref:a},[e.createElementVNode("div",jE,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.data,(z,Y)=>(e.openBlock(),e.createElementBlock("div",{class:"swiper-slide",key:z.id},[e.createElementVNode("div",zE,[z.type==="Image"?(e.openBlock(),e.createElementBlock("img",{key:0,class:"swiper-slide__media-img",src:z.imgSrc,alt:z.alt},null,8,qE)):z.type==="Video"?(e.openBlock(),e.createElementBlock("div",WE,[e.createElementVNode("video",{ref_for:!0,ref:H=>w(H,Y),playsinline:"",poster:z.imgSrc,onEnded:b},[e.createElementVNode("source",{src:z.videoSrc,type:"video/mp4"},null,8,XE)],40,GE)])):e.createCommentVNode("",!0)]),n.isPreview&&z.link.includes("http")?(e.openBlock(),e.createElementBlock("a",{key:0,href:z.link,target:"_blank",class:"swiper-slide__link"},null,8,YE)):e.createCommentVNode("",!0),e.createElementVNode("div",KE,[e.createElementVNode("div",QE,e.toDisplayString(z.title),1),z.type==="Video"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[v.value?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("button",{key:0,type:"button",class:"swiper-slide__body__play",onClick:e.withModifiers(V,["stop"])})),e.createElementVNode("button",{type:"button",class:"swiper-slide__body__link",onClick:e.withModifiers($,["stop"])},"观看完整视频")],64)):e.createCommentVNode("",!0)])]))),128))]),B[1]||(B[1]=e.createElementVNode("div",{class:"swiper-pagination"},null,-1)),B[2]||(B[2]=e.createElementVNode("div",{class:"swiper-button-next"},null,-1)),B[3]||(B[3]=e.createElementVNode("div",{class:"swiper-button-prev"},null,-1))],512),e.createVNode(I,{visible:S.value,"onUpdate:visible":B[0]||(B[0]=z=>S.value=z),footer:!1,width:"1200px",onCancel:k},{title:e.withCtx(()=>[...B[4]||(B[4]=[e.createTextVNode(" 观看完整视频 ",-1)])]),default:e.withCtx(()=>[e.createElementVNode("div",JE,[D.value?(e.openBlock(),e.createElementBlock("video",{key:0,ref_key:"videoElement",ref:N,controls:"",playsinline:"",preload:"metadata"},[e.createElementVNode("source",{src:D.value,type:"video/mp4"},null,8,ZE),B[5]||(B[5]=e.createTextVNode(" 您的浏览器不支持 video 标签。 ",-1))],512)):e.createCommentVNode("",!0)])]),_:1},8,["visible"])],64)}}}),tT=ne(eT,[["__scopeId","data-v-703d4e5e"]]),nT=e.defineComponent({name:"HeroSlide",__name:"index",props:{modelValue:{type:Object,default:()=>{}},isPreview:{type:Boolean,default:!0}},emits:["update:modelValue","handleDelete","handleCopy","handlePaste","handleClick"],setup(n,{emit:t}){const o=n,a=t,i=()=>{var p;if(o.modelValue&&o.modelValue.data)return;const g={id:((p=o.modelValue)==null?void 0:p.id)||R(),type:"HeroSlide",onlyShowPc:!1,data:[{id:R(),type:"Banners",data:[{id:R(),type:"Image",title:"这里是标题",imgSrc:"https://osswebsite-test.cedim.cn/media-library/ywies-tx/images/high-school-test/home/different_1_optim.png",alt:"",link:""},{id:R(),type:"Video",title:"这里是标题",imgSrc:"https://osswebsite-test.cedim.cn/media-library/ywies-tx/images/high-school-test/home/different_1_optim.png",alt:"",link:"",videoSrc:"https://mvideo.ycyw.com/2e1a9441vodgzp1253458132/a31402d51397757891052265568/SW8B19vOtzMA.mp4"}]},{id:R(),type:"Links",data:[{id:R(),text:"链接名称",url:"",isExternal:!1}]}]};a("update:modelValue",g)},s=e.computed(()=>{var g;return o.isPreview?!0:!((g=o.modelValue)!=null&&g.onlyShowPc)||!Ne()}),l=g=>{a("handleClick",g)},r=e.ref(!1),u=e.ref(!1),c=()=>{a("handleDelete",o.modelValue.id)},f=()=>{a("handleCopy",o.modelValue)},m=g=>{a("handlePaste",g)},d=e.ref(),h=()=>{var g;(g=d.value)==null||g.initSwiper()};return i(),(g,p)=>{var b;return e.openBlock(),e.createElementBlock(e.Fragment,null,[s.value?(e.openBlock(),e.createElementBlock("div",{key:0,class:"hero-slide has-quick-links is-video-and-image",onMouseenter:p[2]||(p[2]=_=>r.value=!0),onMouseleave:p[3]||(p[3]=_=>r.value=!1)},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList((b=n.modelValue)==null?void 0:b.data,_=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:_.id},[_.type==="Banners"?(e.openBlock(),e.createBlock(tT,{key:0,ref_for:!0,ref_key:"swiperRef",ref:d,data:_.data,isPreview:n.isPreview},null,8,["data","isPreview"])):e.createCommentVNode("",!0),_.type==="Links"&&_.data.length?(e.openBlock(),e.createBlock(HE,{key:1,data:_.data,isPreview:n.isPreview,onHandleClick:l},null,8,["data","isPreview"])):e.createCommentVNode("",!0)],64))),128)),n.isPreview?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(Te,{key:0,show:r.value,"onUpdate:show":p[0]||(p[0]=_=>r.value=_),onHandleEdit:p[1]||(p[1]=_=>u.value=!0),onHandleDelete:c,onHandleCopy:f,onHandlePaste:m},null,8,["show"]))],32)):e.createCommentVNode("",!0),n.isPreview?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(ME,{key:1,show:u.value,"onUpdate:show":p[4]||(p[4]=_=>u.value=_),data:n.modelValue,onUpdateSwiper:h},null,8,["show","data"]))],64)}}}),yd=ne(nT,[["__scopeId","data-v-30af3403"]]),oT=Object.freeze(Object.defineProperty({__proto__:null,default:yd},Symbol.toStringTag,{value:"Module"})),aT={class:"setting-content"},iT={class:"setting-header flex items-center"},sT={class:"setting-header flex items-center"},lT={class:"setting-header flex items-center"},rT={class:"setting-body"},dT={class:"setting-item"},uT={class:"btn-group"},cT={key:0,class:"drag-handle"},mT={class:"item-action flex items-center"},pT=e.defineComponent({__name:"setting",props:{show:{type:Boolean,default:!1},data:{type:Object,default:()=>{}}},emits:["update:show"],setup(n,{emit:t}){const o=e.defineAsyncComponent(()=>import("vuedraggable")),a=e.ref(!1),i=e.computed(()=>({animation:200,group:"links",disabled:!1,ghostClass:"ghost",handle:".drag-handle",filter:".arco-input, .arco-select, .arco-checkbox",preventOnFilter:!1})),s=m=>m&&m.length>1,l=n,r=t,u=()=>{r("update:show",!1)},c=m=>{const d=l.data;m==="circle"?d.data.push({id:R(),type:m,text:"查看更多",url:void 0,isExternal:!1,isLight:!1}):d.data.push({id:R(),type:"text",text:"了解更多",profile:{logo:"",title:"",subTitle:"",name:"",label:"",imgSrc:"",alt:"",buttonList:{id:R(),type:"BtnList",readOnly:!0,width:"",bgColor:"",data:[]},paragraphs:[{id:R(),title:"",content:""}]}})},f=m=>{l.data.data=l.data.data.filter(d=>d.id!==m)};return(m,d)=>{const h=e.resolveComponent("a-switch"),g=e.resolveComponent("a-option"),p=e.resolveComponent("a-select"),b=e.resolveComponent("icon-plus"),_=e.resolveComponent("a-button"),w=e.resolveComponent("a-button-group"),v=e.resolveComponent("icon-drag-arrow"),V=e.resolveComponent("icon-delete"),C=e.resolveComponent("a-link"),S=e.resolveComponent("a-input"),N=e.resolveComponent("a-checkbox"),D=e.resolveComponent("a-drawer");return e.openBlock(),e.createBlock(D,{width:500,visible:n.show,footer:!1,onCancel:u,unmountOnClose:""},{title:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(n.data.type)+"组件编辑 ",1)]),default:e.withCtx(()=>[e.createElementVNode("div",aT,[e.createElementVNode("div",iT,[d[8]||(d[8]=e.createElementVNode("span",{class:"header-title"},"仅显示PC端",-1)),e.createVNode(h,{modelValue:n.data.onlyShowPc,"onUpdate:modelValue":d[0]||(d[0]=$=>n.data.onlyShowPc=$)},null,8,["modelValue"])]),e.createElementVNode("div",sT,[d[13]||(d[13]=e.createElementVNode("span",{class:"header-title"},"组件宽度",-1)),e.createVNode(p,{modelValue:n.data.width,"onUpdate:modelValue":d[1]||(d[1]=$=>n.data.width=$),placeholder:"请选择","allow-clear":""},{default:e.withCtx(()=>[e.createVNode(g,{value:""},{default:e.withCtx(()=>[...d[9]||(d[9]=[e.createTextVNode("默认",-1)])]),_:1}),e.createVNode(g,{value:"small"},{default:e.withCtx(()=>[...d[10]||(d[10]=[e.createTextVNode("小",-1)])]),_:1}),e.createVNode(g,{value:"middle"},{default:e.withCtx(()=>[...d[11]||(d[11]=[e.createTextVNode("中",-1)])]),_:1}),e.createVNode(g,{value:"max"},{default:e.withCtx(()=>[...d[12]||(d[12]=[e.createTextVNode("大",-1)])]),_:1})]),_:1},8,["modelValue"])]),e.createElementVNode("div",lT,[d[16]||(d[16]=e.createElementVNode("span",{class:"header-title"},"组件背景",-1)),e.createVNode(p,{modelValue:n.data.bgColor,"onUpdate:modelValue":d[2]||(d[2]=$=>n.data.bgColor=$),placeholder:"请选择","allow-clear":""},{default:e.withCtx(()=>[e.createVNode(g,{value:"#ffffff"},{default:e.withCtx(()=>[...d[14]||(d[14]=[e.createTextVNode("白色",-1)])]),_:1}),e.createVNode(g,{value:"#F7F7FA"},{default:e.withCtx(()=>[...d[15]||(d[15]=[e.createTextVNode("灰色",-1)])]),_:1})]),_:1},8,["modelValue"])]),e.createVNode(w,{type:"primary"},{default:e.withCtx(()=>[e.createVNode(_,{size:"mini",onClick:d[3]||(d[3]=$=>c("circle"))},{icon:e.withCtx(()=>[e.createVNode(b)]),default:e.withCtx(()=>[d[17]||(d[17]=e.createTextVNode(" 圆链接 ",-1))]),_:1}),e.createVNode(_,{size:"mini",onClick:d[4]||(d[4]=$=>c("text"))},{icon:e.withCtx(()=>[e.createVNode(b)]),default:e.withCtx(()=>[d[18]||(d[18]=e.createTextVNode(" 文字链接 ",-1))]),_:1})]),_:1}),e.createElementVNode("div",rT,[e.createElementVNode("div",dT,[d[22]||(d[22]=e.createElementVNode("p",{class:"item-name"},"链接",-1)),e.createVNode(e.unref(o),e.mergeProps({modelValue:n.data.data,"onUpdate:modelValue":d[5]||(d[5]=$=>n.data.data=$),"component-data":{tag:"div",type:"transition-group",name:a.value?null:"flip-list"}},i.value,{disabled:!s(n.data.data),onStart:d[6]||(d[6]=$=>a.value=!0),onEnd:d[7]||(d[7]=$=>a.value=!1),"item-key":"id"}),{item:e.withCtx(({element:$})=>[(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["item-button draggable-item",{"sortable-disabled":!s(n.data.data)}]),key:$.id},[e.createElementVNode("div",uT,[s(n.data.data)?(e.openBlock(),e.createElementBlock("div",cT,[e.createVNode(v,{class:"drag-icon"})])):e.createCommentVNode("",!0),e.createVNode(V,{class:"btn-delete",onClick:k=>f($.id)},null,8,["onClick"])]),e.createVNode(C,{href:"link"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString($.text),1)]),_:2},1024),$.type==="circle"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createElementVNode("div",mT,[e.createVNode(S,{class:"action-text",modelValue:$.text,"onUpdate:modelValue":k=>$.text=k,placeholder:"链接文本","allow-clear":""},null,8,["modelValue","onUpdate:modelValue"]),e.createVNode(S,{modelValue:$.url,"onUpdate:modelValue":k=>$.url=k,placeholder:"链接链接","allow-clear":""},null,8,["modelValue","onUpdate:modelValue"])]),e.createVNode(N,{modelValue:$.isExternal,"onUpdate:modelValue":k=>$.isExternal=k},{default:e.withCtx(()=>[...d[19]||(d[19]=[e.createTextVNode("是否外部链接",-1)])]),_:1},8,["modelValue","onUpdate:modelValue"]),e.createVNode(N,{style:{"padding-left":"10px"},modelValue:$.isLight,"onUpdate:modelValue":k=>$.isLight=k},{default:e.withCtx(()=>[...d[20]||(d[20]=[e.createTextVNode("是否亮色",-1)])]),_:1},8,["modelValue","onUpdate:modelValue"])],64)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createVNode(S,{class:"action-text m-2",modelValue:$.text,"onUpdate:modelValue":k=>$.text=k,placeholder:"链接文本","allow-clear":""},null,8,["modelValue","onUpdate:modelValue"]),d[21]||(d[21]=e.createElementVNode("p",{class:"item-name"},"Profile Information",-1)),e.createVNode(fd,{data:$.profile,name:`LinkLIst_${$.id}`},null,8,["data","name"])],64))],2))]),_:1},16,["modelValue","component-data","disabled"])])])])]),_:1},8,["visible"])}}}),hT=ne(pT,[["__scopeId","data-v-e49595de"]]),fT=e.defineComponent({name:"LinkList",__name:"index",props:{modelValue:{type:Object,default:()=>{}},isPreview:{type:Boolean,default:!0}},emits:["update:modelValue","handleDelete","handleCopy","handlePaste"],setup(n,{emit:t}){const o=n,a=t,i=()=>{var p;if(o.modelValue&&o.modelValue.data)return;const g={id:((p=o.modelValue)==null?void 0:p.id)||R(),type:"LinkList",onlyShowPc:!1,width:"",bgColor:"",data:[{id:R(),type:"circle",text:"链接名称",url:"",isExternal:!1,isLight:!1},{id:R(),type:"circle",text:"链接名称",url:"",isExternal:!1,isLight:!0},{id:R(),type:"text",text:"链接名称",profile:{logo:"https://ywies-tx.cedim.cn/images/logo/logo-ycyw.png",title:"这里是标题",subTitle:"这里是副标题",name:"这里是名称",label:"这里是标签",imgSrc:"https://osswebsite.ycyw.com/media-library/ywies-bj/images/home/ywies-tx.jpg",alt:"",buttonList:{id:R(),type:"BtnList",readOnly:!0,width:"",bgColor:"",data:[{id:R(),type:"white",text:"按钮名称",url:"",isExternal:!1},{id:R(),type:"light",text:"按钮名称",url:"",isExternal:!1}]},paragraphs:[{id:R(),title:"这里是文章标题",content:"这里是文章内容"}]}}]};a("update:modelValue",g)},s=e.computed(()=>{var g;return o.isPreview?!((g=o.modelValue)!=null&&g.onlyShowPc)||!Ne():!0}),l=e.ref(!1),r=e.ref(!1),u=()=>{a("handleDelete",o.modelValue.id)},c=()=>{a("handleCopy",o.modelValue)},f=g=>{a("handlePaste",g)},m=e.ref(!1),d=e.ref({}),h=g=>{g.type==="text"&&(d.value=g.profile,m.value=!0)};return i(),(g,p)=>{var b,_,w,v;return e.openBlock(),e.createElementBlock(e.Fragment,null,[s.value?(e.openBlock(),e.createElementBlock("div",{key:0,class:"link-list",style:e.normalizeStyle({backgroundColor:(b=n.modelValue)==null?void 0:b.bgColor}),onMouseenter:p[2]||(p[2]=V=>l.value=!0),onMouseleave:p[3]||(p[3]=V=>l.value=!1)},[e.createElementVNode("div",{class:e.normalizeClass(["link-list__container justify-content-center",[(_=n.modelValue)!=null&&_.width?`container-content-${(w=n.modelValue)==null?void 0:w.width}`:"container-content"]])},[e.createVNode($m,{list:(v=n.modelValue)==null?void 0:v.data,isPreview:n.isPreview,onHandleClick:h},null,8,["list","isPreview"])],2),n.isPreview?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(Te,{key:0,show:l.value,"onUpdate:show":p[0]||(p[0]=V=>l.value=V),onHandleEdit:p[1]||(p[1]=V=>r.value=!0),onHandleDelete:u,onHandleCopy:c,onHandlePaste:f},null,8,["show"]))],36)):e.createCommentVNode("",!0),n.isPreview?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(hT,{key:1,show:r.value,"onUpdate:show":p[4]||(p[4]=V=>r.value=V),data:n.modelValue},null,8,["show","data"])),e.createVNode(gd,{show:m.value,"onUpdate:show":p[5]||(p[5]=V=>m.value=V),data:d.value},null,8,["show","data"])],64)}}}),_d=ne(fT,[["__scopeId","data-v-14bf5917"]]),gT=Object.freeze(Object.defineProperty({__proto__:null,default:_d},Symbol.toStringTag,{value:"Module"})),vT={class:"setting-content"},yT={class:"setting-header flex items-center"},_T={class:"setting-header flex items-center"},bT={class:"setting-header flex items-center"},wT={class:"setting-header flex items-center"},xT=e.defineComponent({__name:"setting",props:{show:{type:Boolean,default:!1},data:{type:Object,default:()=>{}}},emits:["update:show"],setup(n,{emit:t}){const o=e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./index-QFpkZqlg.js"))),a=t,i=()=>{a("update:show",!1)};return(s,l)=>{const r=e.resolveComponent("a-switch"),u=e.resolveComponent("a-option"),c=e.resolveComponent("a-select"),f=e.resolveComponent("a-drawer");return e.openBlock(),e.createBlock(f,{width:500,visible:n.show,footer:!1,onCancel:i,unmountOnClose:""},{title:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(n.data.type)+"组件编辑 ",1)]),default:e.withCtx(()=>[e.createElementVNode("div",vT,[e.createElementVNode("div",yT,[l[6]||(l[6]=e.createElementVNode("span",{class:"header-title"},"仅显示PC端",-1)),e.createVNode(r,{modelValue:n.data.onlyShowPc,"onUpdate:modelValue":l[0]||(l[0]=m=>n.data.onlyShowPc=m)},null,8,["modelValue"])]),e.createElementVNode("div",_T,[l[11]||(l[11]=e.createElementVNode("span",{class:"header-title"},"组件宽度",-1)),e.createVNode(c,{modelValue:n.data.data.width,"onUpdate:modelValue":l[1]||(l[1]=m=>n.data.data.width=m),placeholder:"请选择","allow-clear":""},{default:e.withCtx(()=>[e.createVNode(u,{value:"default"},{default:e.withCtx(()=>[...l[7]||(l[7]=[e.createTextVNode("默认",-1)])]),_:1}),e.createVNode(u,{value:"small"},{default:e.withCtx(()=>[...l[8]||(l[8]=[e.createTextVNode("小",-1)])]),_:1}),e.createVNode(u,{value:"middle"},{default:e.withCtx(()=>[...l[9]||(l[9]=[e.createTextVNode("中",-1)])]),_:1}),e.createVNode(u,{value:"max"},{default:e.withCtx(()=>[...l[10]||(l[10]=[e.createTextVNode("大",-1)])]),_:1})]),_:1},8,["modelValue"])]),e.createElementVNode("div",bT,[l[14]||(l[14]=e.createElementVNode("span",{class:"header-title"},"组件背景",-1)),e.createVNode(c,{modelValue:n.data.data.bgColor,"onUpdate:modelValue":l[2]||(l[2]=m=>n.data.data.bgColor=m),placeholder:"请选择","allow-clear":""},{default:e.withCtx(()=>[e.createVNode(u,{value:"#ffffff"},{default:e.withCtx(()=>[...l[12]||(l[12]=[e.createTextVNode("白色",-1)])]),_:1}),e.createVNode(u,{value:"#F7F7FA"},{default:e.withCtx(()=>[...l[13]||(l[13]=[e.createTextVNode("灰色",-1)])]),_:1})]),_:1},8,["modelValue"])]),e.createElementVNode("div",wT,[l[17]||(l[17]=e.createElementVNode("span",{class:"header-title"},"是否显示下划线",-1)),e.createVNode(c,{modelValue:n.data.data.hasLine,"onUpdate:modelValue":l[3]||(l[3]=m=>n.data.data.hasLine=m),placeholder:"请选择","allow-clear":""},{default:e.withCtx(()=>[e.createVNode(u,{value:!0},{default:e.withCtx(()=>[...l[15]||(l[15]=[e.createTextVNode("是",-1)])]),_:1}),e.createVNode(u,{value:!1},{default:e.withCtx(()=>[...l[16]||(l[16]=[e.createTextVNode("否",-1)])]),_:1})]),_:1},8,["modelValue"])]),l[18]||(l[18]=e.createElementVNode("p",{class:"item-title"},"标题",-1)),e.createVNode(e.unref(o),{modelValue:n.data.data.text,"onUpdate:modelValue":l[4]||(l[4]=m=>n.data.data.text=m),name:"QuoteText_editor_text"},null,8,["modelValue"]),l[19]||(l[19]=e.createElementVNode("p",{class:"item-title"},"内容",-1)),e.createVNode(e.unref(o),{modelValue:n.data.data.desc,"onUpdate:modelValue":l[5]||(l[5]=m=>n.data.data.desc=m),name:"QuoteText_editor_desc"},null,8,["modelValue"])])]),_:1},8,["visible"])}}}),VT=ne(xT,[["__scopeId","data-v-fa51a862"]]),CT={key:0,class:"quote-text__line"},kT=["innerHTML"],ET=["innerHTML"],Am=e.defineComponent({name:"QuoteText",__name:"index",props:{modelValue:{type:Object,default:()=>{}},isPreview:{type:Boolean,default:!0}},emits:["update:modelValue","handleDelete","handleCopy","handlePaste"],setup(n,{emit:t}){const o=n,a=t,i=()=>{var d;if(o.modelValue&&o.modelValue.data)return;const m={id:((d=o.modelValue)==null?void 0:d.id)||R(),type:"QuoteText",onlyShowPc:!1,data:{width:"",bgColor:"",hasLine:!0,text:"这里是文本",desc:"这里是描述"}};a("update:modelValue",m)},s=e.computed(()=>{var m;return o.isPreview?!0:!((m=o.modelValue)!=null&&m.onlyShowPc)||!Ne()}),l=e.ref(!1),r=e.ref(!1),u=()=>{a("handleDelete",o.modelValue.id)},c=()=>{a("handleCopy",o.modelValue)},f=m=>{a("handlePaste",m)};return i(),(m,d)=>{var h,g,p,b,_,w,v,V;return e.openBlock(),e.createElementBlock(e.Fragment,null,[s.value?(e.openBlock(),e.createElementBlock("div",{key:0,class:"quote-text",onMouseenter:d[2]||(d[2]=C=>l.value=!0),onMouseleave:d[3]||(d[3]=C=>l.value=!1)},[e.createElementVNode("div",{class:"quote-text__container quote-text--normal container-content",style:e.normalizeStyle({background:((g=(h=n.modelValue)==null?void 0:h.data)==null?void 0:g.bgColor)||"transparent"})},[(b=(p=n.modelValue)==null?void 0:p.data)!=null&&b.hasLine?(e.openBlock(),e.createElementBlock("div",CT)):e.createCommentVNode("",!0),e.createElementVNode("div",{class:"quote-text__content",innerHTML:(w=(_=n.modelValue)==null?void 0:_.data)==null?void 0:w.text},null,8,kT),e.createElementVNode("div",{class:"quote-text__desc",innerHTML:(V=(v=n.modelValue)==null?void 0:v.data)==null?void 0:V.desc},null,8,ET)],4),n.isPreview?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(Te,{key:0,show:l.value,"onUpdate:show":d[0]||(d[0]=C=>l.value=C),onHandleEdit:d[1]||(d[1]=C=>r.value=!0),onHandleDelete:u,onHandleCopy:c,onHandlePaste:f},null,8,["show"]))],32)):e.createCommentVNode("",!0),n.isPreview?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(VT,{key:1,show:r.value,"onUpdate:show":d[4]||(d[4]=C=>r.value=C),data:n.modelValue},null,8,["show","data"]))],64)}}}),TT={class:"setting-content"},NT={class:"setting-header flex items-center"},ST={class:"setting-header flex items-center"},BT={class:"setting-body"},DT={class:"setting-item"},PT={class:"btn-group"},$T={key:0,class:"drag-handle"},AT={class:"item-action flex items-center"},LT=e.defineComponent({__name:"setting",props:{show:{type:Boolean,default:!1},data:{type:Object,default:()=>{}}},emits:["update:show"],setup(n,{emit:t}){const o=e.defineAsyncComponent(()=>import("vuedraggable")),a=e.ref(!1),i=e.computed(()=>({animation:200,group:"buttons",disabled:!1,ghostClass:"ghost",handle:".drag-handle",filter:".arco-input, .arco-select, .arco-checkbox",preventOnFilter:!1})),s=m=>m&&m.length>1,l=n,r=t,u=()=>{r("update:show",!1)},c=()=>{l.data.data.push({id:R(),title:"查看更多",link:void 0})},f=m=>{l.data.data=l.data.data.filter(d=>d.id!==m)};return(m,d)=>{const h=e.resolveComponent("a-switch"),g=e.resolveComponent("a-option"),p=e.resolveComponent("a-select"),b=e.resolveComponent("icon-drag-arrow"),_=e.resolveComponent("icon-delete"),w=e.resolveComponent("a-button"),v=e.resolveComponent("a-input"),V=e.resolveComponent("icon-plus"),C=e.resolveComponent("a-drawer");return e.openBlock(),e.createBlock(C,{width:500,visible:n.show,footer:!1,onCancel:u,unmountOnClose:""},{title:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(n.data.type)+"组件编辑 ",1)]),default:e.withCtx(()=>[e.createElementVNode("div",TT,[e.createElementVNode("div",NT,[d[6]||(d[6]=e.createElementVNode("span",{class:"header-title"},"仅显示PC端",-1)),e.createVNode(h,{modelValue:n.data.onlyShowPc,"onUpdate:modelValue":d[0]||(d[0]=S=>n.data.onlyShowPc=S)},null,8,["modelValue"])]),e.createElementVNode("div",ST,[d[11]||(d[11]=e.createElementVNode("span",{class:"header-title"},"组件宽度",-1)),e.createVNode(p,{modelValue:n.data.width,"onUpdate:modelValue":d[1]||(d[1]=S=>n.data.width=S),placeholder:"请选择","allow-clear":""},{default:e.withCtx(()=>[e.createVNode(g,{value:""},{default:e.withCtx(()=>[...d[7]||(d[7]=[e.createTextVNode("默认",-1)])]),_:1}),e.createVNode(g,{value:"small"},{default:e.withCtx(()=>[...d[8]||(d[8]=[e.createTextVNode("小",-1)])]),_:1}),e.createVNode(g,{value:"middle"},{default:e.withCtx(()=>[...d[9]||(d[9]=[e.createTextVNode("中",-1)])]),_:1}),e.createVNode(g,{value:"max"},{default:e.withCtx(()=>[...d[10]||(d[10]=[e.createTextVNode("大",-1)])]),_:1})]),_:1},8,["modelValue"])]),e.createElementVNode("div",BT,[e.createElementVNode("div",DT,[d[13]||(d[13]=e.createElementVNode("p",{class:"item-name"},"链接",-1)),e.createVNode(e.unref(o),e.mergeProps({modelValue:n.data.data,"onUpdate:modelValue":d[2]||(d[2]=S=>n.data.data=S),"component-data":{tag:"div",type:"transition-group",name:a.value?null:"flip-list"}},i.value,{disabled:!s(n.data.data),onStart:d[3]||(d[3]=S=>a.value=!0),onEnd:d[4]||(d[4]=S=>a.value=!1),"item-key":"id"}),{item:e.withCtx(({element:S})=>[(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["item-button draggable-item",{"sortable-disabled":!s(n.data.data)}]),key:S.id},[e.createElementVNode("div",PT,[s(n.data.data)?(e.openBlock(),e.createElementBlock("div",$T,[e.createVNode(b,{class:"drag-icon"})])):e.createCommentVNode("",!0),e.createVNode(_,{class:"btn-delete",onClick:N=>f(S.id)},null,8,["onClick"])]),e.createVNode(w,{type:"primary"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(S.title),1)]),_:2},1024),e.createElementVNode("div",AT,[e.createVNode(v,{class:"action-text",modelValue:S.title,"onUpdate:modelValue":N=>S.title=N,placeholder:"文本","allow-clear":""},null,8,["modelValue","onUpdate:modelValue"]),e.createVNode(v,{modelValue:S.link,"onUpdate:modelValue":N=>S.link=N,placeholder:"链接","allow-clear":""},null,8,["modelValue","onUpdate:modelValue"])])],2))]),_:1},16,["modelValue","component-data","disabled"]),e.createElementVNode("div",{class:"item-add-btn flex items-center",onClick:d[5]||(d[5]=S=>c())},[e.createVNode(V),d[12]||(d[12]=e.createElementVNode("span",{class:"btn-text"},"添加链接",-1))])])])])]),_:1},8,["visible"])}}}),IT=ne(LT,[["__scopeId","data-v-b50c960c"]]),OT={class:"donor-links__row row row-cols-1 row-cols-sm-2 row-cols-lg-3"},MT=["href"],UT={class:"donor-link__text"},RT=["onClick"],FT={class:"donor-link__text"},HT=e.defineComponent({name:"DonorLinks",__name:"index",props:{modelValue:{type:Object,default:()=>{}},isPreview:{type:Boolean,default:!0}},emits:["update:modelValue","handleDelete","handleCopy","handlePaste","handleClick"],setup(n,{emit:t}){const o=n,a=t,i=()=>{var h;if(o.modelValue&&o.modelValue.data)return;const d={id:((h=o.modelValue)==null?void 0:h.id)||R(),type:"DonorLinks",onlyShowPc:Ne(),width:"",data:[{id:R(),title:"这里是标题",link:"https://ycyw-edu.com/"},{id:R(),title:"这里是标题",link:"aaa"}]};a("update:modelValue",d)},s=e.computed(()=>{var d;return o.isPreview?!((d=o.modelValue)!=null&&d.onlyShowPc)||!Ne():!0}),l=e.ref(!1),r=e.ref(!1),u=()=>{a("handleDelete",o.modelValue.id)},c=()=>{a("handleCopy",o.modelValue)},f=d=>{a("handlePaste",d)},m=d=>{a("handleClick",d)};return i(),(d,h)=>{var g,p,b;return e.openBlock(),e.createElementBlock(e.Fragment,null,[s.value?(e.openBlock(),e.createElementBlock("div",{key:0,class:"donor-links",onMouseenter:h[2]||(h[2]=_=>l.value=!0),onMouseleave:h[3]||(h[3]=_=>l.value=!1)},[e.createElementVNode("div",{class:e.normalizeClass(["donor-links__container",[(g=n.modelValue)!=null&&g.width?`container-content-${(p=n.modelValue)==null?void 0:p.width}`:"container-content"]])},[e.createElementVNode("div",OT,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList((b=n.modelValue)==null?void 0:b.data,_=>(e.openBlock(),e.createElementBlock("div",{key:_.id},[_.link&&_.link.includes("http")&&n.isPreview?(e.openBlock(),e.createElementBlock("a",{key:0,href:_.link,class:"donor-link btn"},[e.createElementVNode("div",UT,e.toDisplayString(_.title),1),h[5]||(h[5]=e.createElementVNode("span",{class:"donor-link__icon"},null,-1))],8,MT)):_.link?(e.openBlock(),e.createElementBlock("button",{key:1,onClick:w=>m(_.link),class:"donor-link btn"},[e.createElementVNode("div",FT,e.toDisplayString(_.title),1),h[6]||(h[6]=e.createElementVNode("span",{class:"donor-link__icon"},null,-1))],8,RT)):e.createCommentVNode("",!0)]))),128))])],2),n.isPreview?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(Te,{key:0,show:l.value,"onUpdate:show":h[0]||(h[0]=_=>l.value=_),onHandleEdit:h[1]||(h[1]=_=>r.value=!0),onHandleDelete:u,onHandleCopy:c,onHandlePaste:f},null,8,["show"]))],32)):e.createCommentVNode("",!0),n.isPreview?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(IT,{key:1,show:r.value,"onUpdate:show":h[4]||(h[4]=_=>r.value=_),data:n.modelValue},null,8,["show","data"]))],64)}}}),bd=ne(HT,[["__scopeId","data-v-62b9beab"]]),jT=Object.freeze(Object.defineProperty({__proto__:null,default:bd},Symbol.toStringTag,{value:"Module"})),zT={class:"setting-content"},qT={class:"setting-header flex items-center"},WT={class:"setting-header flex items-center"},GT={class:"setting-body"},XT={class:"setting-item"},KT={class:"btn-group"},QT={key:0,class:"drag-handle"},JT=e.defineComponent({__name:"setting",props:{show:{type:Boolean,default:!1},data:{type:Object,default:()=>{}}},emits:["update:show"],setup(n,{emit:t}){const o=e.defineAsyncComponent(()=>import("vuedraggable")),a=e.ref(!1),i=e.computed(()=>({animation:200,group:"profiles",disabled:!1,ghostClass:"ghost",handle:".drag-handle",filter:".arco-input, .arco-select, .arco-checkbox",preventOnFilter:!1})),s=m=>m&&m.length>1,l=n,r=t,u=()=>{r("update:show",!1)},c=()=>{l.data.data.push({id:R(),logo:"https://ywies-tx.cedim.cn/images/logo/logo-ycyw.png",title:"耀华国际教育",subTitle:"耀华国际教育学校浙江桐乡",name:"耀华国际",label:"123",imgSrc:"https://osswebsite.ycyw.com/media-library/ywies-bj/images/home/ywies-tx.jpg",alt:"",buttonList:{id:R(),type:"BtnList",readOnly:!0,width:"",bgColor:"",data:[{id:R(),type:"white",text:"了解更多",url:"https://www.baidu.com",isExternal:!1},{id:R(),type:"light",text:"了解更多",url:"https://www.baidu.com",isExternal:!1}]},paragraphs:[{id:R(),title:"123",content:"123"}]})},f=m=>{l.data.data=l.data.data.filter(d=>d.id!==m)};return(m,d)=>{const h=e.resolveComponent("a-switch"),g=e.resolveComponent("a-option"),p=e.resolveComponent("a-select"),b=e.resolveComponent("icon-drag-arrow"),_=e.resolveComponent("icon-delete"),w=e.resolveComponent("icon-plus"),v=e.resolveComponent("a-drawer");return e.openBlock(),e.createBlock(v,{width:500,visible:n.show,footer:!1,onCancel:u,unmountOnClose:""},{title:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(n.data.type)+"组件编辑 ",1)]),default:e.withCtx(()=>[e.createElementVNode("div",zT,[e.createElementVNode("div",qT,[d[6]||(d[6]=e.createElementVNode("span",{class:"header-title"},"仅显示PC端",-1)),e.createVNode(h,{modelValue:n.data.onlyShowPc,"onUpdate:modelValue":d[0]||(d[0]=V=>n.data.onlyShowPc=V)},null,8,["modelValue"])]),e.createElementVNode("div",WT,[d[11]||(d[11]=e.createElementVNode("span",{class:"header-title"},"组件宽度",-1)),e.createVNode(p,{modelValue:n.data.width,"onUpdate:modelValue":d[1]||(d[1]=V=>n.data.width=V),placeholder:"请选择","allow-clear":""},{default:e.withCtx(()=>[e.createVNode(g,{value:""},{default:e.withCtx(()=>[...d[7]||(d[7]=[e.createTextVNode("默认",-1)])]),_:1}),e.createVNode(g,{value:"small"},{default:e.withCtx(()=>[...d[8]||(d[8]=[e.createTextVNode("小",-1)])]),_:1}),e.createVNode(g,{value:"middle"},{default:e.withCtx(()=>[...d[9]||(d[9]=[e.createTextVNode("中",-1)])]),_:1}),e.createVNode(g,{value:"max"},{default:e.withCtx(()=>[...d[10]||(d[10]=[e.createTextVNode("大",-1)])]),_:1})]),_:1},8,["modelValue"])]),e.createElementVNode("div",GT,[e.createElementVNode("div",XT,[e.createVNode(e.unref(o),e.mergeProps({modelValue:n.data.data,"onUpdate:modelValue":d[2]||(d[2]=V=>n.data.data=V),"component-data":{tag:"div",type:"transition-group",name:a.value?null:"flip-list"}},i.value,{disabled:!s(n.data.data),onStart:d[3]||(d[3]=V=>a.value=!0),onEnd:d[4]||(d[4]=V=>a.value=!1),"item-key":"id"}),{item:e.withCtx(({element:V})=>[(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["item-button draggable-item",{"sortable-disabled":!s(n.data.data)}]),key:V.id},[e.createElementVNode("div",KT,[s(n.data.data)?(e.openBlock(),e.createElementBlock("div",QT,[e.createVNode(b,{class:"drag-icon"})])):e.createCommentVNode("",!0),e.createVNode(_,{class:"btn-delete",onClick:C=>f(V.id)},null,8,["onClick"])]),e.createVNode(fd,{data:V,showLogo:!1,canAddParagraph:!0,name:`CardCarousel_${V.id}`},null,8,["data","name"])],2))]),_:1},16,["modelValue","component-data","disabled"]),e.createElementVNode("div",{class:"item-add-btn flex items-center",onClick:d[5]||(d[5]=V=>c())},[e.createVNode(w),d[12]||(d[12]=e.createElementVNode("span",{class:"btn-text"},"添加",-1))])])])])]),_:1},8,["visible"])}}}),ZT=ne(JT,[["__scopeId","data-v-5263a8e9"]]),eN={class:"slides-pagination__list"},tN=["onClick"],nN=e.defineComponent({__name:"index",props:{currentIndex:{type:Number,default:()=>0},count:{type:Number,default:()=>0},dark:{type:Boolean,default:()=>!1},hideArrow:{type:Boolean,default:()=>!1},isLoop:{type:Boolean,default:()=>!1}},emits:["updatePage","slidePrev","slideNext"],setup(n,{emit:t}){const o=n,a=t,i=e.computed(()=>o.count<6||o.currentIndex<3?5:o.currentIndex+3),s=e.computed(()=>i.value>o.count?o.count-5:i.value-5),l=(r,u)=>{if(o.isLoop){if(u=="slidePrev")return a("slidePrev",r);if(u=="slideNext")return a("slideNext",r)}else if(r<0||r>=o.count)return;a("updatePage",r)};return(r,u)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["slides-pagination",[{"slides-pagination__dark":n.dark}]])},[e.createElementVNode("div",eN,[e.withDirectives(e.createElementVNode("button",{type:"button",class:e.normalizeClass(["slides-pagination__arrow__prev",{"slides-pagination__arrow--disable":n.currentIndex===0&&!n.isLoop}]),onClick:u[0]||(u[0]=c=>l(n.currentIndex-1,"slidePrev"))},null,2),[[e.vShow,!n.hideArrow]]),e.createVNode(e.TransitionGroup,{name:"list",tag:"div"},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.count,(c,f)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[f>=s.value&&f<i.value?(e.openBlock(),e.createElementBlock("button",{key:c,type:"button",class:e.normalizeClass(["slides-pagination__dot",{"slides-pagination__dot--is-active":f===n.currentIndex}]),onClick:m=>l(f)},null,10,tN)):e.createCommentVNode("",!0)],64))),256))]),_:1}),e.withDirectives(e.createElementVNode("button",{type:"button",class:e.normalizeClass(["slides-pagination__arrow__next",{"slides-pagination__arrow--disable":n.currentIndex===n.count-1&&!n.isLoop}]),onClick:u[1]||(u[1]=c=>l(n.currentIndex+1,"slideNext"))},null,2),[[e.vShow,!n.hideArrow]])])],2))}}),es=ne(nN,[["__scopeId","data-v-8d634011"]]),oN={class:"slide-content"},aN={class:"card-profile"},iN={class:"profile__head"},sN={class:"profile__img img-fit --show-profile"},lN=["src","alt"],rN={class:"profile__body text-center --show-profile"},dN={class:"profile__title tx-subtitle mt-3 mt-md-4"},uN={class:"profile__name tx-h6 mt-md-1"},cN={class:"mt-10 mt-md-12"},mN={key:1},pN={class:"row row-cols-1 row-cols-md-3 row-cols-lg-4 justify-content-center"},hN=["onClick"],fN={class:"card-profile"},gN={class:"profile__head"},vN={class:"profile__img img-fit --show-profile"},yN=["src","alt"],_N={class:"profile__body text-center --show-profile"},bN={class:"profile__title tx-subtitle mt-3 mt-md-4"},wN={class:"profile__name tx-h6 mt-md-1"},xN=e.defineComponent({name:"CardCarousel",__name:"index",props:{modelValue:{type:Object,default:()=>{}},isPreview:{type:Boolean,default:!0}},emits:["update:modelValue","handleDelete","handleCopy","handlePaste"],setup(n,{emit:t}){const o=n,a=t,i=e.computed(()=>{var z,Y,H,q;if(typeof window>"u")return!0;const I=window.innerWidth;return((Y=(z=o.modelValue)==null?void 0:z.data)==null?void 0:Y.length)>3&&I>=1024||((q=(H=o.modelValue)==null?void 0:H.data)==null?void 0:q.length)>2&&I>=768&&I<1024||I<768}),s=e.ref(!0),l=[ct.Navigation,ct.Pagination,ct.Autoplay],r={768:{slidesPerView:3,slidesPerGroup:1,spaceBetween:16,shortSwipes:!1},1024:{slidesPerView:4,slidesPerGroup:1,spaceBetween:16}},u=e.ref(0),c=e.ref(!1),f=e.ref(),m=I=>{u.value=I.realIndex??0},d=I=>{var z,Y;A.value=(Y=(z=o.modelValue)==null?void 0:z.data)==null?void 0:Y[I],k.value=!0},h=I=>{f.value=I,c.value||e.nextTick(()=>{setTimeout(()=>{g()},100)})},g=()=>{s.value=!1,e.nextTick(()=>{s.value=!0,e.nextTick(()=>{f.value&&(f.value.update(),c.value=!0)})})},p=e.computed(()=>{var I,z;return(z=(I=o.modelValue)==null?void 0:I.data)==null?void 0:z.length}),b=I=>{f.value&&f.value.slideToLoop(I,600)},_=()=>{f.value&&f.value.slidePrev(600)},w=()=>{f.value&&f.value.slideNext(600)},v=()=>{var z,Y;if(o.modelValue&&((z=o.modelValue)!=null&&z.data))return;const I={id:((Y=o.modelValue)==null?void 0:Y.id)||R(),type:"CardCarousel",onlyShowPc:!1,width:"",data:[{id:R(),logo:"https://ywies-tx.cedim.cn/images/logo/logo-ycyw.png",title:"这里是标题",subTitle:"这里是副标题",name:"这里是名称",label:"这里是标签",imgSrc:"https://osswebsite.ycyw.com/media-library/ywies-bj/images/home/ywies-tx.jpg",alt:"",buttonList:{id:R(),type:"BtnList",readOnly:!0,width:"",bgColor:"",data:[{id:R(),type:"white",text:"按钮名称",url:"",isExternal:!1}]},paragraphs:[{id:R(),title:"这里是文章标题",content:"这里是文章内容"}]}]};a("update:modelValue",I)},V=e.computed(()=>{var I;return o.isPreview?!0:!((I=o.modelValue)!=null&&I.onlyShowPc)||!Ne()}),C=e.ref(!1),S=e.ref(!1),N=()=>{var I;a("handleDelete",(I=o.modelValue)==null?void 0:I.id)},D=()=>{a("handleCopy",o.modelValue)},$=I=>{a("handlePaste",I)},k=e.ref(!1),A=e.ref({}),B=I=>{A.value=I,k.value=!0};return e.onMounted(()=>{g()}),v(),(I,z)=>{var H,q,O;const Y=e.resolveComponent("client-only");return e.openBlock(),e.createElementBlock(e.Fragment,null,[V.value?(e.openBlock(),e.createElementBlock("div",{key:0,class:"card-carousel",onMouseenter:z[2]||(z[2]=J=>C.value=!0),onMouseleave:z[3]||(z[3]=J=>C.value=!1)},[e.createElementVNode("div",{class:e.normalizeClass(["card-carousel__wrapper",[(H=n.modelValue)!=null&&H.width?`container-content-${(q=n.modelValue)==null?void 0:q.width}`:"container-content"]])},[i.value&&s.value?(e.openBlock(),e.createBlock(Y,{key:0},{default:e.withCtx(()=>[e.createVNode(e.unref(Et.Swiper),{ref:"swiperRef",modules:l,"centered-slides":!1,speed:600,"slides-per-view":1,"slides-per-group":1,"space-between":16,"short-swipes":!0,"long-swipes-ratio":.3,loop:!0,"auto-height":!0,breakpoints:r,class:"swiper card-carousel__swiper",onSlideChange:m,onSwiper:h},{default:e.withCtx(()=>{var J;return[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList((J=n.modelValue)==null?void 0:J.data,(F,M)=>(e.openBlock(),e.createBlock(e.unref(Et.SwiperSlide),{key:F.id,class:"swiper-slide",onClick:Q=>d(M)},{default:e.withCtx(()=>[e.createElementVNode("div",oN,[e.createElementVNode("div",aN,[e.createElementVNode("div",iN,[e.createElementVNode("div",sN,[e.createElementVNode("img",{src:F.imgSrc,alt:F.alt},null,8,lN),z[6]||(z[6]=e.createElementVNode("div",{class:"profile__img__mask"},[e.createElementVNode("div",{class:"profile__img__mask__btn"}," 简介 ")],-1))])]),e.createElementVNode("div",rN,[e.createElementVNode("div",dN,e.toDisplayString(F.title),1),e.createElementVNode("h6",uN,e.toDisplayString(F.name),1)])])])]),_:2},1032,["onClick"]))),128))]}),_:1},512),e.createElementVNode("div",cN,[e.createVNode(es,{currentIndex:u.value,count:p.value,onUpdatePage:b,onSlidePrev:_,onSlideNext:w,dark:"",isLoop:!0},null,8,["currentIndex","count"])])]),_:1})):(e.openBlock(),e.createElementBlock("div",mN,[e.createElementVNode("div",pN,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList((O=n.modelValue)==null?void 0:O.data,J=>(e.openBlock(),e.createElementBlock("div",{class:"card-content",key:J.id,onClick:F=>B(J)},[e.createElementVNode("div",fN,[e.createElementVNode("div",gN,[e.createElementVNode("div",vN,[e.createElementVNode("img",{src:J.imgSrc,alt:J.alt},null,8,yN),z[7]||(z[7]=e.createElementVNode("div",{class:"profile__img__mask"},[e.createElementVNode("div",{class:"profile__img__mask__btn"}," 简介 ")],-1))])]),e.createElementVNode("div",_N,[e.createElementVNode("div",bN,e.toDisplayString(J.title),1),e.createElementVNode("h6",wN,e.toDisplayString(J.name),1)])])],8,hN))),128))])]))],2),n.isPreview?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(Te,{key:0,show:C.value,"onUpdate:show":z[0]||(z[0]=J=>C.value=J),onHandleEdit:z[1]||(z[1]=J=>S.value=!0),onHandleDelete:N,onHandleCopy:D,onHandlePaste:$},null,8,["show"]))],32)):e.createCommentVNode("",!0),n.isPreview?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(ZT,{key:1,show:S.value,"onUpdate:show":z[4]||(z[4]=J=>S.value=J),data:n.modelValue},null,8,["show","data"])),e.createVNode(gd,{show:k.value,"onUpdate:show":z[5]||(z[5]=J=>k.value=J),data:A.value},null,8,["show","data"])],64)}}}),wd=ne(xN,[["__scopeId","data-v-e083584c"]]),VN=Object.freeze(Object.defineProperty({__proto__:null,default:wd},Symbol.toStringTag,{value:"Module"})),CN={class:"setting-content"},kN={class:"setting-header flex items-center"},EN={class:"setting-header flex items-center"},TN={class:"setting-body"},NN={class:"setting-item"},SN={class:"btn-group"},BN={key:0,class:"drag-handle"},DN=e.defineComponent({__name:"setting",props:{show:{type:Boolean,default:!1},data:{type:Object,default:()=>{}}},emits:["update:show"],setup(n,{emit:t}){const o=e.defineAsyncComponent(()=>import("vuedraggable")),a=e.ref(!1),i=e.computed(()=>({animation:200,group:"profiles",disabled:!1,ghostClass:"ghost",handle:".drag-handle",filter:".arco-input, .arco-select, .arco-checkbox",preventOnFilter:!1})),s=m=>m&&m.length>1,l=n,r=t,u=()=>{r("update:show",!1)},c=()=>{l.data.data.push({id:R(),logo:"https://ywies-tx.cedim.cn/images/logo/logo-ycyw.png",title:"耀华国际教育",subTitle:"耀华国际教育学校浙江桐乡",name:"耀华国际",label:"123",imgSrc:"https://osswebsite.ycyw.com/media-library/ywies-bj/images/home/ywies-tx.jpg",alt:"",buttonList:{id:R(),type:"BtnList",readOnly:!0,width:"",bgColor:"",data:[{id:R(),type:"white",text:"了解更多",url:"https://www.baidu.com",isExternal:!1},{id:R(),type:"light",text:"了解更多",url:"https://www.baidu.com",isExternal:!1}]},paragraphs:[{id:R(),title:"123",content:"123"}]})},f=m=>{l.data.data=l.data.data.filter(d=>d.id!==m)};return(m,d)=>{const h=e.resolveComponent("a-switch"),g=e.resolveComponent("a-input"),p=e.resolveComponent("icon-drag-arrow"),b=e.resolveComponent("icon-delete"),_=e.resolveComponent("icon-plus"),w=e.resolveComponent("a-drawer");return e.openBlock(),e.createBlock(w,{width:500,visible:n.show,footer:!1,onCancel:u,unmountOnClose:""},{title:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(n.data.type)+"组件编辑 ",1)]),default:e.withCtx(()=>[e.createElementVNode("div",CN,[e.createElementVNode("div",kN,[d[6]||(d[6]=e.createElementVNode("span",{class:"header-title"},"仅显示PC端",-1)),e.createVNode(h,{modelValue:n.data.onlyShowPc,"onUpdate:modelValue":d[0]||(d[0]=v=>n.data.onlyShowPc=v)},null,8,["modelValue"])]),e.createElementVNode("div",EN,[d[7]||(d[7]=e.createElementVNode("span",{class:"header-title"},"行数",-1)),e.createVNode(g,{modelValue:n.data.rows,"onUpdate:modelValue":d[1]||(d[1]=v=>n.data.rows=v),placeholder:"输入几行","allow-clear":""},null,8,["modelValue"])]),e.createElementVNode("div",TN,[e.createElementVNode("div",NN,[e.createVNode(e.unref(o),e.mergeProps({modelValue:n.data.data,"onUpdate:modelValue":d[2]||(d[2]=v=>n.data.data=v),"component-data":{tag:"div",type:"transition-group",name:a.value?null:"flip-list"}},i.value,{disabled:!s(n.data.data),onStart:d[3]||(d[3]=v=>a.value=!0),onEnd:d[4]||(d[4]=v=>a.value=!1),"item-key":"id"}),{item:e.withCtx(({element:v})=>[(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["item-button draggable-item",{"sortable-disabled":!s(n.data.data)}]),key:v.id},[e.createElementVNode("div",SN,[s(n.data.data)?(e.openBlock(),e.createElementBlock("div",BN,[e.createVNode(p,{class:"drag-icon"})])):e.createCommentVNode("",!0),e.createVNode(b,{class:"btn-delete",onClick:V=>f(v.id)},null,8,["onClick"])]),e.createVNode(fd,{data:v,showLogo:!1,canAddParagraph:!0,name:`CardCarouselMultiRow_${v.id}`},null,8,["data","name"])],2))]),_:1},16,["modelValue","component-data","disabled"]),e.createElementVNode("div",{class:"item-add-btn flex items-center",onClick:d[5]||(d[5]=v=>c())},[e.createVNode(_),d[8]||(d[8]=e.createElementVNode("span",{class:"btn-text"},"添加",-1))])])])])]),_:1},8,["visible"])}}}),PN=ne(DN,[["__scopeId","data-v-480c3ba0"]]),$N={class:"card-carousel__wrapper container-content"},AN={class:"row row-cols-2 row-cols-md-3 row-cols-lg-4"},LN=["onClick"],IN={class:"card-profile"},ON={class:"profile__head"},MN={class:"profile__img img-fit --show-profile"},UN=["src","alt"],RN={class:"profile__body text-center --show-profile"},FN={class:"profile__title tx-subtitle mt-3 mt-md-4"},HN={class:"profile__name tx-h6 mt-md-1"},jN={class:"mt-10 mt-md-12"},zN=e.defineComponent({name:"CardCarouselMultiRow",__name:"index",props:{modelValue:{type:Object,default:()=>{}},isPreview:{type:Boolean,default:!0}},emits:["update:modelValue","handleDelete","handleCopy","handlePaste"],setup(n,{emit:t}){const o=n,a=t,i=[ct.Navigation,ct.Pagination,ct.Autoplay],s={768:{slidesPerView:"auto",slidesPerGroup:1,slidesPerGroupAuto:!0,spaceBetween:16},1024:{slidesPerView:1,slidesPerGroup:1,spaceBetween:16}},l=e.ref(0),r=e.ref([]),u=e.ref(null),c=$=>{u.value=$},f=$=>{l.value=$.realIndex},m=e.computed(()=>{var $;return(($=o.modelValue)==null?void 0:$.row)??2}),d=e.computed(()=>{const $=typeof window>"u"?1024:window.innerWidth;return($>=768&&$>=1024?4:3)*m.value}),h=()=>{var k,A,B;console.log("listChuncked",(k=o.modelValue)==null?void 0:k.data);const $=(B=(A=o.modelValue)==null?void 0:A.data)==null?void 0:B.reduce((I,z,Y)=>{const H=Math.floor(Y/d.value);return I[H]||(I[H]=[]),I[H].push(z),I},[]);console.log("listChunck",$),r.value=$},g=$=>{u.value&&u.value.slideToLoop($,600)},p=()=>{var k;if(o.modelValue&&o.modelValue.data&&o.modelValue.data.length)return;const $={id:((k=o.modelValue)==null?void 0:k.id)||R(),type:"CardCarouselMultiRow",onlyShowPc:!1,rows:2,data:[{id:R(),logo:"https://ywies-tx.cedim.cn/images/logo/logo-ycyw.png",title:"这里是标题",subTitle:"这里是副标题",name:"这里是名称",label:"这里是标签",imgSrc:"https://osswebsite.ycyw.com/media-library/ywies-bj/images/home/ywies-tx.jpg",alt:"",buttonList:{id:R(),type:"BtnList",readOnly:!0,width:"",bgColor:"",data:[{id:R(),type:"white",text:"按钮名称",url:"",isExternal:!1}]},paragraphs:[{id:R(),title:"这里是文章标题",content:"这里是文章内容"}]},{id:R(),logo:"https://ywies-tx.cedim.cn/images/logo/logo-ycyw.png",title:"这里是标题",subTitle:"这里是副标题",name:"这里是名称",label:"这里是标签",imgSrc:"https://osswebsite.ycyw.com/media-library/ywies-bj/images/home/ywies-tx.jpg",alt:"",buttonList:{id:R(),type:"BtnList",readOnly:!0,width:"",bgColor:"",data:[{id:R(),type:"light",text:"按钮名称",url:"",isExternal:!1}]},paragraphs:[{id:R(),title:"这里是文章标题"}]}]};a("update:modelValue",$)},b=e.computed(()=>{var $;return o.isPreview?!0:!(($=o.modelValue)!=null&&$.onlyShowPc)||!Ne()}),_=e.ref(!1),w=e.ref(!1),v=()=>{a("handleDelete",o.modelValue.id)},V=()=>{a("handleCopy",o.modelValue)},C=$=>{a("handlePaste",$)},S=e.ref(!1),N=e.ref({}),D=$=>{N.value=$,S.value=!0};return p(),e.nextTick(()=>{h()}),($,k)=>{var B,I;const A=e.resolveComponent("client-only");return e.openBlock(),e.createElementBlock(e.Fragment,null,[b.value?(e.openBlock(),e.createElementBlock("div",{key:0,class:"card-carousel-multi-row",ref:"parent",onMouseenter:k[2]||(k[2]=z=>_.value=!0),onMouseleave:k[3]||(k[3]=z=>_.value=!1)},[e.createElementVNode("div",$N,[(I=(B=n.modelValue)==null?void 0:B.data)!=null&&I.length?(e.openBlock(),e.createBlock(A,{key:0},{default:e.withCtx(()=>[e.createVNode(e.unref(Et.Swiper),{ref:"swiperRef",modules:i,"centered-slides":!1,speed:600,"slides-per-view":1,"slides-per-group":1,"space-between":16,loop:!0,breakpoints:s,class:"swiper card-carousel__swiper",onSwiper:c,onSlideChange:f},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(r.value,(z,Y)=>(e.openBlock(),e.createBlock(e.unref(Et.SwiperSlide),{key:Y,class:"swiper-slide"},{default:e.withCtx(()=>[e.createElementVNode("div",AN,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(z,(H,q)=>(e.openBlock(),e.createElementBlock("div",{class:"slide-content col",key:"item-"+q,onClick:O=>D(H)},[e.createElementVNode("div",IN,[e.createElementVNode("div",ON,[e.createElementVNode("div",MN,[e.createElementVNode("img",{src:H.imgSrc,alt:H.alt},null,8,UN),k[6]||(k[6]=e.createElementVNode("div",{class:"profile__img__mask"},[e.createElementVNode("div",{class:"profile__img__mask__btn"},"简介")],-1))])]),e.createElementVNode("div",RN,[e.createElementVNode("div",FN,e.toDisplayString(H.title),1),e.createElementVNode("h6",HN,e.toDisplayString(H.name),1)])])],8,LN))),128))])]),_:2},1024))),128))]),_:1},512),e.createElementVNode("div",jN,[e.createVNode(es,{currentIndex:l.value,count:r.value.length,onUpdatePage:g,dark:""},null,8,["currentIndex","count"])])]),_:1})):e.createCommentVNode("",!0)]),n.isPreview?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(Te,{key:0,show:_.value,"onUpdate:show":k[0]||(k[0]=z=>_.value=z),onHandleEdit:k[1]||(k[1]=z=>w.value=!0),onHandleDelete:v,onHandleCopy:V,onHandlePaste:C},null,8,["show"]))],544)):e.createCommentVNode("",!0),n.isPreview?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(PN,{key:1,show:w.value,"onUpdate:show":k[4]||(k[4]=z=>w.value=z),data:n.modelValue},null,8,["show","data"])),e.createVNode(gd,{show:S.value,"onUpdate:show":k[5]||(k[5]=z=>S.value=z),data:N.value},null,8,["show","data"])],64)}}}),xd=ne(zN,[["__scopeId","data-v-b8b77797"]]),qN=Object.freeze(Object.defineProperty({__proto__:null,default:xd},Symbol.toStringTag,{value:"Module"})),WN={class:"setting-header flex items-center"},GN={class:"setting-content"},XN=["src"],YN={class:"item-uplaod flex items-center"},KN=e.defineComponent({__name:"setting",props:{show:{type:Boolean,default:!1},data:{type:Object,default:()=>{}}},emits:["update:show"],setup(n,{emit:t}){const o=e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./index-QFpkZqlg.js"))),a=t,i=()=>{a("update:show",!1)};return(s,l)=>{const r=e.resolveComponent("a-switch"),u=e.resolveComponent("a-input"),c=e.resolveComponent("a-drawer");return e.openBlock(),e.createBlock(c,{width:500,visible:n.show,footer:!1,onCancel:i,unmountOnClose:""},{title:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(n.data.type)+"组件编辑 ",1)]),default:e.withCtx(()=>{var f,m;return[e.createElementVNode("div",WN,[l[6]||(l[6]=e.createElementVNode("span",{class:"header-title"},"仅显示PC端",-1)),e.createVNode(r,{modelValue:n.data.onlyShowPc,"onUpdate:modelValue":l[0]||(l[0]=d=>n.data.onlyShowPc=d)},null,8,["modelValue"])]),e.createElementVNode("div",GN,[l[7]||(l[7]=e.createElementVNode("p",{class:"item-title"},"标题",-1)),e.createVNode(e.unref(o),{modelValue:n.data.data.title,"onUpdate:modelValue":l[1]||(l[1]=d=>n.data.data.title=d),name:"BannerQuote_editor_title"},null,8,["modelValue"]),l[8]||(l[8]=e.createElementVNode("p",{class:"item-title"},"标签",-1)),e.createVNode(e.unref(o),{modelValue:n.data.data.label,"onUpdate:modelValue":l[2]||(l[2]=d=>n.data.data.label=d),name:"BannerQuote_editor_label"},null,8,["modelValue"]),l[9]||(l[9]=e.createElementVNode("p",{class:"item-title"},"图片",-1)),e.createElementVNode("img",{class:"item-img",src:(m=(f=n.data)==null?void 0:f.data)==null?void 0:m.imgSrc},null,8,XN),e.createElementVNode("div",YN,[e.createVNode(u,{modelValue:n.data.data.imgSrc,"onUpdate:modelValue":l[3]||(l[3]=d=>n.data.data.imgSrc=d),placeholder:"请输入图片链接","allow-clear":""},null,8,["modelValue"]),e.createVNode(ze,{modelValue:n.data.data.imgSrc,"onUpdate:modelValue":l[4]||(l[4]=d=>n.data.data.imgSrc=d),name:"BannerQuote","button-class":"fit-content"},null,8,["modelValue"])]),e.createVNode(u,{class:"mt-2",modelValue:n.data.data.alt,"onUpdate:modelValue":l[5]||(l[5]=d=>n.data.data.alt=d),placeholder:"图片alt","allow-clear":""},null,8,["modelValue"])])]}),_:1},8,["visible"])}}}),QN=ne(KN,[["__scopeId","data-v-2fdbddf8"]]),JN={class:"banner-quote__wrapper container-content-max"},ZN={class:"banner-quote__left"},eS=["innerHTML"],tS=["innerHTML"],nS={class:"banner-quote__right"},oS={class:"banner-quote__right__image"},aS=["src","alt"],iS=e.defineComponent({name:"BannerQuote",__name:"index",props:{modelValue:{type:Object,default:()=>{}},isPreview:{type:Boolean,default:!0}},emits:["update:modelValue","handleDelete","handleCopy","handlePaste"],setup(n,{emit:t}){const o=n,a=t,i=()=>{var d;if(o.modelValue&&o.modelValue.data)return;const m={id:((d=o.modelValue)==null?void 0:d.id)||R(),type:"BannerQuote",onlyShowPc:!1,data:{title:"<p>这里是标题</p>",label:"<p>这里是标签</p>",imgSrc:"https://osswebsite.ycyw.com/media-library/ywies-bj/images/home/ywies-tx.jpg",alt:""}};a("update:modelValue",m)},s=e.computed(()=>{var m;return o.isPreview?!0:!((m=o.modelValue)!=null&&m.onlyShowPc)||!Ne()}),l=e.ref(!1),r=e.ref(!1),u=()=>{a("handleDelete",o.modelValue.id)},c=()=>{a("handleCopy",o.modelValue)},f=m=>{a("handlePaste",m)};return i(),(m,d)=>{var h,g,p,b,_,w,v,V;return e.openBlock(),e.createElementBlock(e.Fragment,null,[s.value?(e.openBlock(),e.createElementBlock("div",{key:0,class:"banner-quote is-zh",onMouseenter:d[2]||(d[2]=C=>l.value=!0),onMouseleave:d[3]||(d[3]=C=>l.value=!1)},[e.createElementVNode("div",JN,[e.createElementVNode("div",ZN,[d[5]||(d[5]=e.createElementVNode("div",{class:"quote quote-1"},null,-1)),d[6]||(d[6]=e.createElementVNode("div",{class:"quote quote-2"},null,-1)),e.createElementVNode("div",{class:"banner-quote__title",innerHTML:(g=(h=n.modelValue)==null?void 0:h.data)==null?void 0:g.title},null,8,eS),e.createElementVNode("div",{class:"banner-quote__label",innerHTML:(b=(p=n.modelValue)==null?void 0:p.data)==null?void 0:b.label},null,8,tS)]),d[7]||(d[7]=e.createElementVNode("div",{class:"banner-quote__center"},null,-1)),e.createElementVNode("div",nS,[e.createElementVNode("div",oS,[e.createElementVNode("img",{src:(w=(_=n.modelValue)==null?void 0:_.data)==null?void 0:w.imgSrc,alt:(V=(v=n.modelValue)==null?void 0:v.data)==null?void 0:V.alt},null,8,aS)])])]),n.isPreview?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(Te,{key:0,show:l.value,"onUpdate:show":d[0]||(d[0]=C=>l.value=C),onHandleEdit:d[1]||(d[1]=C=>r.value=!0),onHandleDelete:u,onHandleCopy:c,onHandlePaste:f},null,8,["show"]))],32)):e.createCommentVNode("",!0),n.isPreview?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(QN,{key:1,show:r.value,"onUpdate:show":d[4]||(d[4]=C=>r.value=C),data:n.modelValue},null,8,["show","data"]))],64)}}}),Vd=ne(iS,[["__scopeId","data-v-47da8a09"]]),sS=Object.freeze(Object.defineProperty({__proto__:null,default:Vd},Symbol.toStringTag,{value:"Module"})),lS={class:"setting-content"},rS={class:"setting-header flex items-center"},dS={class:"setting-header flex items-center"},uS={class:"setting-header flex items-center"},cS={class:"setting-body"},mS={class:"setting-item"},pS={class:"btn-group"},hS={key:0,class:"drag-handle"},fS={class:"item-action flex items-center"},gS=e.defineComponent({__name:"setting",props:{show:{type:Boolean,default:!1},data:{type:Object,default:()=>{}}},emits:["update:show"],setup(n,{emit:t}){const o=e.defineAsyncComponent(()=>import("vuedraggable")),a=e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./index-QFpkZqlg.js"))),i=e.ref(!1),s=e.computed(()=>({animation:200,group:"links",disabled:!1,ghostClass:"ghost",handle:".drag-handle",filter:".rich-text-editor, .arco-input, .arco-select, .arco-checkbox",preventOnFilter:!1})),l=m=>m&&m.length>1,r=t,u=()=>{r("update:show",!1)},c=m=>{m.push({id:R(),text:"查看更多",url:void 0,isExternal:!1})},f=(m,d)=>{m.splice(m.findIndex(h=>h.id===d),1)};return(m,d)=>{const h=e.resolveComponent("a-switch"),g=e.resolveComponent("a-option"),p=e.resolveComponent("a-select"),b=e.resolveComponent("a-input"),_=e.resolveComponent("icon-drag-arrow"),w=e.resolveComponent("icon-delete"),v=e.resolveComponent("a-link"),V=e.resolveComponent("a-checkbox"),C=e.resolveComponent("icon-plus"),S=e.resolveComponent("a-drawer");return e.openBlock(),e.createBlock(S,{width:500,visible:n.show,footer:!1,onCancel:u,unmountOnClose:""},{title:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(n.data.type)+"组件编辑 ",1)]),default:e.withCtx(()=>[e.createElementVNode("div",lS,[e.createElementVNode("div",rS,[d[9]||(d[9]=e.createElementVNode("span",{class:"header-title"},"仅显示PC端",-1)),e.createVNode(h,{modelValue:n.data.onlyShowPc,"onUpdate:modelValue":d[0]||(d[0]=N=>n.data.onlyShowPc=N)},null,8,["modelValue"])]),e.createElementVNode("div",dS,[d[14]||(d[14]=e.createElementVNode("span",{class:"header-title"},"组件宽度",-1)),e.createVNode(p,{modelValue:n.data.width,"onUpdate:modelValue":d[1]||(d[1]=N=>n.data.width=N),placeholder:"请选择","allow-clear":""},{default:e.withCtx(()=>[e.createVNode(g,{value:"default"},{default:e.withCtx(()=>[...d[10]||(d[10]=[e.createTextVNode("默认",-1)])]),_:1}),e.createVNode(g,{value:"small"},{default:e.withCtx(()=>[...d[11]||(d[11]=[e.createTextVNode("小",-1)])]),_:1}),e.createVNode(g,{value:"middle"},{default:e.withCtx(()=>[...d[12]||(d[12]=[e.createTextVNode("中",-1)])]),_:1}),e.createVNode(g,{value:"max"},{default:e.withCtx(()=>[...d[13]||(d[13]=[e.createTextVNode("大",-1)])]),_:1})]),_:1},8,["modelValue"])]),e.createElementVNode("div",uS,[d[17]||(d[17]=e.createElementVNode("span",{class:"header-title"},"组件类型",-1)),e.createVNode(p,{modelValue:n.data.textType,"onUpdate:modelValue":d[2]||(d[2]=N=>n.data.textType=N),placeholder:"请选择","allow-clear":""},{default:e.withCtx(()=>[e.createVNode(g,{value:"default"},{default:e.withCtx(()=>[...d[15]||(d[15]=[e.createTextVNode("默认",-1)])]),_:1}),e.createVNode(g,{value:"center"},{default:e.withCtx(()=>[...d[16]||(d[16]=[e.createTextVNode("居中",-1)])]),_:1})]),_:1},8,["modelValue"])]),e.createElementVNode("div",cS,[d[20]||(d[20]=e.createElementVNode("p",{class:"item-title"},"标题",-1)),e.createVNode(b,{modelValue:n.data.data.title,"onUpdate:modelValue":d[3]||(d[3]=N=>n.data.data.title=N),placeholder:"请输入标题","allow-clear":""},null,8,["modelValue"]),d[21]||(d[21]=e.createElementVNode("p",{class:"item-title"},"内容",-1)),e.createVNode(e.unref(a),{modelValue:n.data.data.description,"onUpdate:modelValue":d[4]||(d[4]=N=>n.data.data.description=N),name:`ArticleItem_editor_${n.data.id}`},null,8,["modelValue","name"]),d[22]||(d[22]=e.createElementVNode("p",{class:"item-title"},"链接",-1)),e.createElementVNode("div",mS,[e.createVNode(e.unref(o),e.mergeProps({modelValue:n.data.data.linkList,"onUpdate:modelValue":d[5]||(d[5]=N=>n.data.data.linkList=N),"component-data":{tag:"div",type:"transition-group",name:i.value?null:"flip-list"}},s.value,{disabled:!l(n.data.data.linkList),onStart:d[6]||(d[6]=N=>i.value=!0),onEnd:d[7]||(d[7]=N=>i.value=!1),"item-key":"id"}),{item:e.withCtx(({element:N})=>[(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["item-button draggable-item",{"sortable-disabled":!l(n.data.data.linkList)}]),key:N.id},[e.createElementVNode("div",pS,[l(n.data.data.linkList)?(e.openBlock(),e.createElementBlock("div",hS,[e.createVNode(_,{class:"drag-icon"})])):e.createCommentVNode("",!0),e.createVNode(w,{class:"btn-delete",onClick:D=>f(n.data.data.linkList,N.id)},null,8,["onClick"])]),e.createVNode(v,{href:"link"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(N.text),1)]),_:2},1024),e.createElementVNode("div",fS,[e.createVNode(b,{class:"action-text",modelValue:N.text,"onUpdate:modelValue":D=>N.text=D,placeholder:"按钮文本","allow-clear":""},null,8,["modelValue","onUpdate:modelValue"]),e.createVNode(b,{modelValue:N.url,"onUpdate:modelValue":D=>N.url=D,placeholder:"按钮链接","allow-clear":""},null,8,["modelValue","onUpdate:modelValue"])]),e.createVNode(V,{modelValue:N.isExternal,"onUpdate:modelValue":D=>N.isExternal=D},{default:e.withCtx(()=>[...d[18]||(d[18]=[e.createTextVNode("是否外部链接",-1)])]),_:1},8,["modelValue","onUpdate:modelValue"])],2))]),_:1},16,["modelValue","component-data","disabled"]),e.createElementVNode("div",{class:"item-add-btn flex items-center",onClick:d[8]||(d[8]=N=>c(n.data.data.linkList))},[e.createVNode(C),d[19]||(d[19]=e.createElementVNode("span",{class:"btn-text"},"添加链接",-1))])])])])]),_:1},8,["visible"])}}}),vS=ne(gS,[["__scopeId","data-v-2da1f897"]]),yS=["innerHTML"],_S={class:"circle-link"},bS=["href"],wS=["onClick"],xS=e.defineComponent({name:"ArticleItem",__name:"index",props:{modelValue:{type:Object,default:()=>{}},isPreview:{type:Boolean,default:!0}},emits:["update:modelValue","handleDelete","handleCopy","handlePaste","handleClick"],setup(n,{emit:t}){const o=n,a=t,i=()=>{var h;if(o.modelValue&&o.modelValue.data)return;const d={id:((h=o.modelValue)==null?void 0:h.id)||R(),type:"ArticleItem",onlyShowPc:!1,width:"",textType:"default",data:{title:"这里是标题",description:"",linkList:[{id:R(),type:"link",text:"链接名称",url:"",isExternal:!1}]}};a("update:modelValue",d)},s=e.computed(()=>{var d;return o.isPreview?!0:!((d=o.modelValue)!=null&&d.onlyShowPc)||!Ne()}),l=e.ref(!1),r=e.ref(!1),u=()=>{a("handleDelete",o.modelValue.id)},c=()=>{a("handleCopy",o.modelValue)},f=d=>{a("handlePaste",d)},m=d=>{a("handleClick",d)};return i(),(d,h)=>{var g,p,b,_,w,v,V,C,S,N,D;return e.openBlock(),e.createElementBlock(e.Fragment,null,[s.value?(e.openBlock(),e.createElementBlock("div",{key:0,class:"article-item",onMouseenter:h[2]||(h[2]=$=>l.value=!0),onMouseleave:h[3]||(h[3]=$=>l.value=!1)},[e.createElementVNode("div",{class:e.normalizeClass(["article-item__container",[(g=n.modelValue)!=null&&g.width?`container-content-${(p=n.modelValue)==null?void 0:p.width}`:"container-content"]])},[e.createElementVNode("h2",{class:e.normalizeClass(["article-item__title",[((b=n.modelValue)==null?void 0:b.textType)==="center"?"text-center":""]])},e.toDisplayString((w=(_=n.modelValue)==null?void 0:_.data)==null?void 0:w.title),3),e.createElementVNode("div",{class:e.normalizeClass(["article-item__content mt-4",[((v=n.modelValue)==null?void 0:v.textType)==="center"?"text-center":""]]),innerHTML:(C=(V=n.modelValue)==null?void 0:V.data)==null?void 0:C.description},null,10,yS),e.createElementVNode("div",{class:e.normalizeClass(["article-item__link mt-4",[((S=n.modelValue)==null?void 0:S.textType)==="center"?"flex-center":""]])},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList((D=(N=n.modelValue)==null?void 0:N.data)==null?void 0:D.linkList,$=>(e.openBlock(),e.createElementBlock("div",{class:"article-item__link__col",key:$.id},[e.createElementVNode("div",_S,[$.url&&$.url.includes("http")&&n.isPreview?(e.openBlock(),e.createElementBlock("a",{key:0,href:$.url,class:"nuxt-link-active"},[e.createElementVNode("div",null,e.toDisplayString($.text),1),h[5]||(h[5]=e.createElementVNode("span",{class:"circle-link__icon"},null,-1))],8,bS)):(e.openBlock(),e.createElementBlock("button",{key:1,onClick:k=>m($.url),class:"nuxt-link-active"},[e.createElementVNode("div",null,e.toDisplayString($.text),1),h[6]||(h[6]=e.createElementVNode("span",{class:"circle-link__icon"},null,-1))],8,wS))])]))),128))],2)],2),n.isPreview?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(Te,{key:0,show:l.value,"onUpdate:show":h[0]||(h[0]=$=>l.value=$),onHandleEdit:h[1]||(h[1]=$=>r.value=!0),onHandleDelete:u,onHandleCopy:c,onHandlePaste:f},null,8,["show"]))],32)):e.createCommentVNode("",!0),n.isPreview?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(vS,{key:1,show:r.value,"onUpdate:show":h[4]||(h[4]=$=>r.value=$),data:n.modelValue},null,8,["show","data"]))],64)}}}),Cd=ne(xS,[["__scopeId","data-v-a0e67c1c"]]),VS=Object.freeze(Object.defineProperty({__proto__:null,default:Cd},Symbol.toStringTag,{value:"Module"})),CS={class:"setting-content"},kS={class:"setting-header flex items-center"},ES={class:"setting-body"},TS=e.defineComponent({__name:"setting",props:{show:{type:Boolean,default:!1},data:{type:Object,default:()=>{}}},emits:["update:show"],setup(n,{emit:t}){const o=e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./index-QFpkZqlg.js"))),a=t,i=()=>{a("update:show",!1)};return(s,l)=>{const r=e.resolveComponent("a-switch"),u=e.resolveComponent("a-drawer");return e.openBlock(),e.createBlock(u,{width:500,visible:n.show,footer:!1,onCancel:i,unmountOnClose:""},{title:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(n.data.type)+"组件编辑 ",1)]),default:e.withCtx(()=>[e.createElementVNode("div",CS,[e.createElementVNode("div",kS,[l[4]||(l[4]=e.createElementVNode("span",{class:"header-title"},"仅显示PC端",-1)),e.createVNode(r,{modelValue:n.data.onlyShowPc,"onUpdate:modelValue":l[0]||(l[0]=c=>n.data.onlyShowPc=c)},null,8,["modelValue"])]),e.createElementVNode("div",ES,[l[5]||(l[5]=e.createElementVNode("p",{class:"item-title"},"标题",-1)),e.createVNode(e.unref(o),{modelValue:n.data.data.title,"onUpdate:modelValue":l[1]||(l[1]=c=>n.data.data.title=c),name:"RibbonBlock_editor_title"},null,8,["modelValue"]),l[6]||(l[6]=e.createElementVNode("p",{class:"item-title"},"副标题",-1)),e.createVNode(e.unref(o),{modelValue:n.data.data.subTitle,"onUpdate:modelValue":l[2]||(l[2]=c=>n.data.data.subTitle=c),name:"RibbonBlock_editor_subTitle"},null,8,["modelValue"]),l[7]||(l[7]=e.createElementVNode("p",{class:"item-title"},"内容",-1)),e.createVNode(e.unref(o),{modelValue:n.data.data.description,"onUpdate:modelValue":l[3]||(l[3]=c=>n.data.data.description=c),name:"RibbonBlock_editor_description"},null,8,["modelValue"])])])]),_:1},8,["visible"])}}}),NS=ne(TS,[["__scopeId","data-v-fe9d42b1"]]),SS={key:0,class:"ribbon-block__bg"},BS=["innerHTML"],DS=["innerHTML"],PS=["innerHTML"],$S=e.defineComponent({name:"RibbonBlock",__name:"index",props:{modelValue:{type:Object,default:()=>{}},isPreview:{type:Boolean,default:!0}},emits:["update:modelValue","handleDelete","handleCopy","handlePaste"],setup(n,{emit:t}){const o=n,a=t,i=()=>{var d;if(o.modelValue&&o.modelValue.data)return;const m={id:((d=o.modelValue)==null?void 0:d.id)||R(),type:"RibbonBlock",onlyShowPc:!1,data:{title:"<p>这里是标题</p>",subTitle:"<p>这里是副标题</p>",description:"<p>这里是描述</p>"}};a("update:modelValue",m)},s=e.computed(()=>{var m;return o.isPreview?!((m=o.modelValue)!=null&&m.onlyShowPc)||!Ne():!0}),l=e.ref(!1),r=e.ref(!1),u=()=>{a("handleDelete",o.modelValue.id)},c=()=>{a("handleCopy",o.modelValue)},f=m=>{a("handlePaste",m)};return i(),(m,d)=>{var h,g,p,b,_,w,v,V,C,S,N,D,$,k,A,B,I,z;return e.openBlock(),e.createElementBlock(e.Fragment,null,[s.value?(e.openBlock(),e.createElementBlock("div",{key:0,class:"ribbon-block",onMouseenter:d[2]||(d[2]=Y=>l.value=!0),onMouseleave:d[3]||(d[3]=Y=>l.value=!1)},[e.createElementVNode("div",{class:e.normalizeClass(["ribbon-block__wrapper",[(g=(h=n.modelValue)==null?void 0:h.data)!=null&&g.title||(b=(p=n.modelValue)==null?void 0:p.data)!=null&&b.subTitle||(w=(_=n.modelValue)==null?void 0:_.data)!=null&&w.description?"has-text":""]])},[(V=(v=n.modelValue)==null?void 0:v.data)!=null&&V.title||(S=(C=n.modelValue)==null?void 0:C.data)!=null&&S.subTitle||(D=(N=n.modelValue)==null?void 0:N.data)!=null&&D.description?(e.openBlock(),e.createElementBlock("div",SS,[e.createElementVNode("div",{class:"ribbon-block__title",innerHTML:(k=($=n.modelValue)==null?void 0:$.data)==null?void 0:k.title},null,8,BS),e.createElementVNode("div",{class:"ribbon-block__text",innerHTML:(B=(A=n.modelValue)==null?void 0:A.data)==null?void 0:B.subTitle},null,8,DS),e.createElementVNode("div",{class:"ribbon-block__description",innerHTML:(z=(I=n.modelValue)==null?void 0:I.data)==null?void 0:z.description},null,8,PS),d[5]||(d[5]=e.createElementVNode("div",{class:"ribbon-block__space"},null,-1))])):e.createCommentVNode("",!0),d[6]||(d[6]=e.createElementVNode("div",{class:"ribbon-block__img"},null,-1))],2),n.isPreview?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(Te,{key:0,show:l.value,"onUpdate:show":d[0]||(d[0]=Y=>l.value=Y),onHandleEdit:d[1]||(d[1]=Y=>r.value=!0),onHandleDelete:u,onHandleCopy:c,onHandlePaste:f},null,8,["show"]))],32)):e.createCommentVNode("",!0),n.isPreview?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(NS,{key:1,show:r.value,"onUpdate:show":d[4]||(d[4]=Y=>r.value=Y),data:n.modelValue},null,8,["show","data"]))],64)}}}),kd=ne($S,[["__scopeId","data-v-30f12d22"]]),AS=Object.freeze(Object.defineProperty({__proto__:null,default:kd},Symbol.toStringTag,{value:"Module"})),LS=["id"],IS={key:0,class:"caption__display"},OS=["data-bs-target","aria-controls"],MS={key:0,class:"gallery__thumbnail"},US=["onClick"],RS=["src"],FS=e.defineComponent({name:"TimelineStoryGallery",__name:"TimelineStoryGallery",props:{gallery:{}},emits:["openCaption"],setup(n,{emit:t}){const o=t,a=e.ref(0),i=e.ref(0),s=e.ref(0),l=e.ref(0),r=e.ref(!1),u=e.ref(Date.now()),c=e.ref(null),f=e.ref(null),m=e.computed(()=>i.value>0),d=e.computed(()=>s.value-i.value>l.value);e.watch(a,()=>{r.value=!1});const h=()=>{const _=f.value;_&&(i.value=_.scrollLeft,s.value=_.scrollWidth);const w=c.value;w&&(l.value=w.getBoundingClientRect().width)},g=_=>{const w=f.value;w&&(_==="next"?w.scrollLeft+=9999:w.scrollLeft-=9999)},p=()=>{h()},b=_=>{o("openCaption",{text:_.text||"",image:_.url})};return e.onMounted(()=>{e.nextTick(()=>{setTimeout(p,300)})}),(_,w)=>{const v=e.resolveComponent("a-image");return e.openBlock(),e.createElementBlock("div",{class:"timeline-story-gallery",ref_key:"wrapper",ref:c},[e.createElementVNode("div",{class:e.normalizeClass(["gallery__large",{"gallery__large--mask":r.value}])},[e.createVNode(e.Transition,{name:"fade"},{default:e.withCtx(()=>{var V,C;return[e.createVNode(v,{src:(C=(V=n.gallery)==null?void 0:V[a.value])==null?void 0:C.imgSrc,preview:!0,fit:"contain",width:"100%"},null,8,["src"])]}),_:1}),e.createVNode(e.Transition,{name:"fade"},{default:e.withCtx(()=>{var V,C;return[(C=(V=n.gallery)==null?void 0:V[a.value])!=null&&C.text?(e.openBlock(),e.createElementBlock("div",{class:"gallery__large__caption",key:a.value},[e.createElementVNode("div",{class:"caption__collapse collapse",id:`collapse-${u.value}`},e.toDisplayString(n.gallery[a.value].text),9,LS),r.value?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",IS,e.toDisplayString(n.gallery[a.value].text),1)),e.createElementVNode("button",{class:"caption__btn caption__btn--desktop",type:"button","data-bs-toggle":"collapse","data-bs-target":`#collapse-${u.value}`,"aria-expanded":"false","aria-controls":`collapse-${u.value}`,onClick:w[0]||(w[0]=S=>r.value=!r.value)},null,8,OS),e.createElementVNode("button",{class:"caption__btn d-md-none",type:"button",onClick:w[1]||(w[1]=S=>b(n.gallery[a.value]))})])):e.createCommentVNode("",!0)]}),_:1})],2),n.gallery&&n.gallery.length>1?(e.openBlock(),e.createElementBlock("div",MS,[e.createElementVNode("ul",{class:"thumbnail__list",ref_key:"list",ref:f,onScroll:p},[e.withDirectives(e.createElementVNode("div",{class:"thumbnail__nav__prev",onClick:w[2]||(w[2]=V=>g("prev"))},null,512),[[e.vShow,m.value]]),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.gallery,(V,C)=>(e.openBlock(),e.createElementBlock("li",{class:"thumbnail__item",key:V.id,onClick:S=>a.value=C},[e.createElementVNode("img",{src:V.imgSrc},null,8,RS)],8,US))),128)),e.withDirectives(e.createElementVNode("div",{class:"thumbnail__nav__next",onClick:w[3]||(w[3]=V=>g("next"))},null,512),[[e.vShow,d.value]])],544)])):e.createCommentVNode("",!0)],512)}}}),HS=ne(FS,[["__scopeId","data-v-d53bc212"]]),jS=["onClick"],zS=e.defineComponent({name:"TimelineStoryStickybar",__name:"TimelineStoryStickybar",props:{list:{},currentIdx:{}},emits:["updateCurrentIdx"],setup(n,{emit:t}){const o=n,a=t,i=e.ref(0),s=e.ref(0),l=e.ref(0),r=e.ref(0),u=e.ref(!1),c=e.ref(typeof window>"u"?1024:window.innerWidth),f=e.ref(null),m=e.ref(null),d=e.computed(()=>i.value>40),h=e.computed(()=>s.value-40>c.value);e.watch(()=>c.value,()=>{p(),b()}),e.watch(()=>o.currentIdx,()=>{e.nextTick(C)});const g=()=>{typeof window>"u"||(c.value=window.innerWidth)},p=()=>{u.value=!0,V(),w()},b=()=>{const S=m.value;S&&(r.value=(c.value-S.getBoundingClientRect().width)/2)},_=S=>{a("updateCurrentIdx",S)},w=()=>{const S=m.value;S&&(i.value=S.scrollLeft);const N=S==null?void 0:S.querySelectorAll(".stickybar__btn");if(N&&N.length>0){const D=N[N.length-1];s.value=D.getBoundingClientRect().right}},v=S=>{const N=m.value;N&&(S==="next"?N.scrollLeft+=100:N.scrollLeft-=100)},V=()=>{var D;const S=(D=m.value)==null?void 0:D.querySelectorAll(".stickybar__btn");if(!S)return;const N=S[Number(o.currentIdx)];N&&(l.value=N.getBoundingClientRect().right)},C=()=>{var k;const S=(k=m.value)==null?void 0:k.querySelectorAll(".stickybar__btn");if(!S)return;const N=S[Number(o.currentIdx)];if(!N)return;const D=N.clientWidth/2,$=c.value/2;u.value=!1,e.nextTick(()=>{const A=m.value;A&&(A.scrollLeft-=$-N.getBoundingClientRect().right+D,setTimeout(p,100))})};return e.onMounted(()=>{typeof window<"u"&&(window.addEventListener("resize",g),g()),e.nextTick(()=>{setTimeout(p,300),b()})}),(S,N)=>(e.openBlock(),e.createElementBlock("div",{class:"timeline-story-stickybar",ref_key:"wrapper",ref:f},[e.createElementVNode("ul",{class:"stickybar__list",ref_key:"listRef",ref:m,onScroll:p},[e.withDirectives(e.createElementVNode("div",{class:"stickybar__nav__prev",onClick:N[0]||(N[0]=D=>v("prev"))},null,512),[[e.vShow,d.value]]),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.list,(D,$)=>(e.openBlock(),e.createElementBlock("li",{key:D.id,class:e.normalizeClass(["stickybar__item",[{"is-active":n.currentIdx>=Number($)}]])},[e.createElementVNode("div",{class:e.normalizeClass(["stickybar__btn",[{"is-active":n.currentIdx==Number($)}]]),onClick:k=>_(Number($))},e.toDisplayString(D.title),11,jS),e.createElementVNode("span",{class:e.normalizeClass(["stickybar__btn__line",[{"is-active":n.currentIdx>Number($)}]])},null,2)],2))),128)),e.withDirectives(e.createElementVNode("div",{class:"stickybar__nav__next",onClick:N[1]||(N[1]=D=>v("next"))},null,512),[[e.vShow,h.value]])],544),e.createElementVNode("div",{class:"stickybar__line",style:e.normalizeStyle({width:`${l.value-12}px`,transition:u.value?"width .25s linear":""})},null,4)],512))}}),qS=ne(zS,[["__scopeId","data-v-ebbc3f57"]]),WS={class:"timeline-story-caption"},GS={class:"caption__content"},XS={class:"caption__body"},YS={class:"caption__text"},KS={class:"caption__img"},QS=["src"],JS=e.defineComponent({name:"TimelineStoryCaption",__name:"TimelineStoryCaption",props:{text:{},image:{}},emits:["closeCaption"],setup(n,{emit:t}){const o=t,a=()=>{o("closeCaption")};return(i,s)=>(e.openBlock(),e.createElementBlock("div",WS,[e.createElementVNode("div",GS,[e.createElementVNode("div",{class:"caption__header"},[e.createElementVNode("button",{type:"button",class:"caption__header__btn",onClick:a})]),e.createElementVNode("div",XS,[e.createElementVNode("div",YS,e.toDisplayString(n.text),1),e.createElementVNode("div",KS,[e.createElementVNode("img",{src:n.image,alt:""},null,8,QS)])])])]))}}),ZS=ne(JS,[["__scopeId","data-v-56b82f1a"]]),e8=["onClick"],t8=e.defineComponent({name:"TimelineStoryScrollspy",__name:"TimelineStoryScrollspy",props:{list:{},activeIdx:{}},emits:["scrollToIdx"],setup(n,{emit:t}){const o=n,a=t,i=e.ref(0),s=e.ref(0),l=e.ref(0),r=e.ref(null),u=e.computed(()=>i.value>0),c=e.computed(()=>s.value-i.value>l.value);e.watch(()=>o.activeIdx,()=>{m()});const f=g=>{a("scrollToIdx",g)},m=()=>{const g=r.value;if(!g)return;const b=g.querySelectorAll(".timeline-story-scrollspy__item")[o.activeIdx];if(!b)return;const _=b.getBoundingClientRect().top,w=g.getBoundingClientRect().top,v=g.clientHeight/2;g.scrollTop-=v-_+w},d=()=>{const g=r.value;g&&(i.value=g.scrollTop,s.value=g.scrollHeight,l.value=g.clientHeight)},h=g=>{const p=r.value;p&&(g==="next"?p.scrollTop+=9999:p.scrollTop-=9999)};return(g,p)=>(e.openBlock(),e.createElementBlock("div",{class:"timeline-story-scrollspy",ref_key:"parent",ref:r,onScroll:d},[e.withDirectives(e.createElementVNode("div",{class:"scrollspy__nav__prev",onClick:p[0]||(p[0]=b=>h("prev"))},null,512),[[e.vShow,u.value]]),e.createElementVNode("ul",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.list,(b,_)=>(e.openBlock(),e.createElementBlock("li",{key:b.id,class:e.normalizeClass(["timeline-story-scrollspy__item",{"is-active":n.activeIdx==_}]),onClick:w=>f(_)},e.toDisplayString(b.title),11,e8))),128))]),e.withDirectives(e.createElementVNode("div",{class:"scrollspy__nav__next",onClick:p[1]||(p[1]=b=>h("next"))},null,512),[[e.vShow,c.value]])],544))}}),n8=ne(t8,[["__scopeId","data-v-cee1b9f5"]]),o8={class:"setting-content"},a8={class:"setting-header flex items-center"},i8={class:"setting-body"},s8={class:"btn-group"},l8={key:0,class:"drag-handle"},r8={class:"section-item gallery-item"},d8={class:"btn-group"},u8={key:0,class:"drag-handle"},c8=["src"],m8={class:"item-uplaod flex items-center"},p8=["onClick"],h8=e.defineComponent({__name:"setting",props:{show:{type:Boolean,default:!1},data:{type:Object,default:()=>{}}},emits:["update:show"],setup(n,{emit:t}){const o=e.defineAsyncComponent(()=>import("vuedraggable")),a=e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./index-QFpkZqlg.js"))),i=e.ref(!1),s=e.computed(()=>({animation:200,group:"gallerys",disabled:!1,ghostClass:"ghost",handle:".drag-handle",filter:".rich-text-editor, .arco-input, .arco-select, .arco-checkbox",preventOnFilter:!1})),l=e.computed(()=>({animation:200,group:"sections",disabled:!1,ghostClass:"ghost",handle:".drag-handle",filter:".rich-text-editor, .arco-input, .arco-select, .arco-checkbox",preventOnFilter:!1})),r=p=>p&&p.length>1,u=n,c=t,f=()=>{c("update:show",!1)},m=()=>{u.data.data.push({id:R(),title:"标题",desc:"",gallery:[]})},d=p=>{u.data.data=u.data.data.filter(b=>b.id!==p)},h=p=>{p.push({id:R(),imgSrc:""})},g=(p,b)=>{p.splice(p.findIndex(_=>_.id===b),1)};return(p,b)=>{const _=e.resolveComponent("a-switch"),w=e.resolveComponent("icon-drag-arrow"),v=e.resolveComponent("icon-delete"),V=e.resolveComponent("a-input"),C=e.resolveComponent("icon-plus"),S=e.resolveComponent("a-drawer");return e.openBlock(),e.createBlock(S,{width:500,visible:n.show,footer:!1,onCancel:f,unmountOnClose:""},{title:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(n.data.type)+"组件编辑 ",1)]),default:e.withCtx(()=>[e.createElementVNode("div",o8,[e.createElementVNode("div",a8,[b[7]||(b[7]=e.createElementVNode("span",{class:"header-title"},"仅显示PC端",-1)),e.createVNode(_,{modelValue:n.data.onlyShowPc,"onUpdate:modelValue":b[0]||(b[0]=N=>n.data.onlyShowPc=N)},null,8,["modelValue"])]),e.createElementVNode("div",i8,[e.createVNode(e.unref(o),e.mergeProps({modelValue:n.data.data,"onUpdate:modelValue":b[3]||(b[3]=N=>n.data.data=N),"component-data":{tag:"div",type:"transition-group",name:i.value?null:"flip-list"}},s.value,{disabled:!r(n.data.data),onStart:b[4]||(b[4]=N=>i.value=!0),onEnd:b[5]||(b[5]=N=>i.value=!1),"item-key":"id"}),{item:e.withCtx(({element:N})=>[(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["item-section draggable-item",{"sortable-disabled":!r(n.data.data)}]),key:N.id},[e.createElementVNode("div",s8,[r(n.data.data)?(e.openBlock(),e.createElementBlock("div",l8,[e.createVNode(w,{class:"drag-icon"})])):e.createCommentVNode("",!0),e.createVNode(v,{class:"btn-delete",onClick:D=>d(N.id)},null,8,["onClick"])]),b[10]||(b[10]=e.createElementVNode("p",{class:"item-title"},"标题",-1)),e.createVNode(V,{modelValue:N.title,"onUpdate:modelValue":D=>N.title=D,placeholder:"请输入标题","allow-clear":""},null,8,["modelValue","onUpdate:modelValue"]),b[11]||(b[11]=e.createElementVNode("p",{class:"item-title"},"描述",-1)),e.createVNode(e.unref(a),{modelValue:N.desc,"onUpdate:modelValue":D=>N.desc=D,name:`TimelineStory_editor_${N.id}`},null,8,["modelValue","onUpdate:modelValue","name"]),b[12]||(b[12]=e.createElementVNode("p",{class:"item-title"},"gallery",-1)),e.createElementVNode("div",r8,[e.createVNode(e.unref(o),e.mergeProps({modelValue:N.gallery,"onUpdate:modelValue":D=>N.gallery=D,"component-data":{tag:"div",type:"transition-group",name:i.value?null:"flip-list"}},l.value,{disabled:!r(N.gallery),onStart:b[1]||(b[1]=D=>i.value=!0),onEnd:b[2]||(b[2]=D=>i.value=!1),"item-key":"id"}),{item:e.withCtx(({element:D})=>[(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["item-button draggable-item",{"sortable-disabled":!r(N.gallery)}]),key:D.id},[e.createElementVNode("div",d8,[r(N.gallery)?(e.openBlock(),e.createElementBlock("div",u8,[e.createVNode(w,{class:"drag-icon"})])):e.createCommentVNode("",!0),e.createVNode(v,{class:"btn-delete",onClick:$=>g(N.gallery,D.id)},null,8,["onClick"])]),b[8]||(b[8]=e.createElementVNode("p",{class:"item-title"},"图片",-1)),e.createElementVNode("img",{class:"item-img",src:D.imgSrc},null,8,c8),e.createElementVNode("div",m8,[e.createVNode(V,{modelValue:D.imgSrc,"onUpdate:modelValue":$=>D.imgSrc=$,placeholder:"请输入图片链接","allow-clear":""},null,8,["modelValue","onUpdate:modelValue"]),e.createVNode(ze,{modelValue:D.imgSrc,"onUpdate:modelValue":$=>D.imgSrc=$,name:`TimelineStory_${D.id}`,"button-class":"fit-content"},null,8,["modelValue","onUpdate:modelValue","name"])])],2))]),_:2},1040,["modelValue","onUpdate:modelValue","component-data","disabled"]),e.createElementVNode("div",{class:"item-add-btn flex items-center",onClick:D=>h(N.gallery)},[e.createVNode(C),b[9]||(b[9]=e.createElementVNode("span",{class:"btn-text"},"添加gallery",-1))],8,p8)])],2))]),_:1},16,["modelValue","component-data","disabled"]),e.createElementVNode("div",{class:"item-add-btn flex items-center",onClick:b[6]||(b[6]=N=>m())},[e.createVNode(C),b[13]||(b[13]=e.createElementVNode("span",{class:"btn-text"},"添加",-1))])])])]),_:1},8,["visible"])}}}),f8=ne(h8,[["__scopeId","data-v-a79f936f"]]),g8=["id"],v8={class:"story__content container-content"},y8={class:"stroy__left"},_8={class:"story__label__title"},b8=["innerHTML"],w8={class:"stroy__right"},x8={class:"story__scrollspy"},V8=e.defineComponent({name:"TimelineStory",__name:"index",props:{modelValue:{type:Object,default:()=>{}},isPreview:{type:Boolean,default:!0}},emits:["update:modelValue","handleDelete","handleCopy","handlePaste"],setup(n,{emit:t}){const o=n,a=t,i=()=>{var he;if(o.modelValue&&o.modelValue.data)return;const se={id:((he=o.modelValue)==null?void 0:he.id)||R(),type:"TimelineStory",onlyShowPc:!1,data:[{id:R(),title:"标题",desc:"描述",gallery:[{id:R(),imgSrc:"https://osswebsite-test.cedim.cn/media-library/ywies-bj/images/home/ywies-tx.jpg"},{id:R(),imgSrc:"https://osswebsite-test.cedim.cn/media-library/ywies-tx/images/campus-life/school-facilities/05_panoramic01_origin.jpg"}]},{id:R(),title:"标题",desc:"描述",gallery:[{id:R(),imgSrc:"https://osswebsite-test.cedim.cn/media-library/ywies-bj/images/home/ywies-tx.jpg"}]}]};a("update:modelValue",se)},s=e.computed(()=>{var se;return o.isPreview?!((se=o.modelValue)!=null&&se.onlyShowPc)||!Ne():!0}),l=e.ref(!1),r=e.ref(!1),u=()=>{a("handleDelete",o.modelValue.id)},c=()=>{a("handleCopy",o.modelValue)},f=se=>{a("handlePaste",se)};i();const m=e.ref(0),d=e.ref(0),h=e.ref(0),g=e.ref(0),p=e.ref(""),b=e.ref(""),_=e.ref(!1),w=e.ref(typeof window>"u"?1024:window.innerWidth),v=e.ref(typeof window>"u"?0:window.scrollY),V=e.ref(!1),C=e.ref(null),S=e.ref(null),N=e.ref(null),D=e.ref(null),$=e.ref(null),k=e.ref(null),A=e.ref(null),B=e.ref([]),I=e.ref([]),z=e.computed(()=>w.value>1023.98?100:66),Y=e.computed(()=>V.value);e.watch(w,()=>{ae()});const H=se=>{if(!se)return 0;const he=typeof window>"u"?0:window.scrollY;return se.getBoundingClientRect().top+he},q=se=>{if(!se)return{x:0,y:0};const he=se.getBoundingClientRect(),we=typeof window>"u"?0:window.scrollX,ke=typeof window>"u"?0:window.scrollY;return{x:he.left+we,y:he.top+ke}},O=se=>{typeof document>"u"||(se?document.body.style.overflow="hidden":document.body.style.overflow="")},J=()=>{typeof window>"u"||(window.addEventListener("scroll",Q),window.addEventListener("resize",M),M())},F=()=>{typeof window>"u"||(window.removeEventListener("scroll",Q),window.removeEventListener("resize",M))},M=()=>{typeof window>"u"||(w.value=window.innerWidth,v.value=window.scrollY)},Q=()=>{var ke;typeof window<"u"&&(v.value=window.scrollY);const se=v.value+z.value+64,he=H(D.value),we=he+(((ke=D.value)==null?void 0:ke.clientHeight)||0);se<he?m.value=0:se>we&&(m.value=999),W(),Z(),de(),Ve(),oe(),Ce()},W=()=>{var ue;const se=v.value+z.value+64,he=H(D.value),we=he+(((ue=D.value)==null?void 0:ue.clientHeight)||0),ke={top:he+15,bottom:we-378},te=[$.value,k.value];!$.value||!k.value||(se<ke.top?te.forEach(pe=>{pe==null||pe.classList.add("is-top"),pe==null||pe.classList.remove("is-fixed"),pe==null||pe.classList.remove("is-bottom")}):se>ke.bottom?te.forEach(pe=>{pe==null||pe.classList.add("is-bottom"),pe==null||pe.classList.remove("is-fixed"),pe==null||pe.classList.remove("is-top")}):te.forEach(pe=>{pe==null||pe.classList.add("is-fixed"),pe==null||pe.classList.remove("is-top"),pe==null||pe.classList.remove("is-bottom")}))},Z=()=>{var ue;const se=v.value+z.value+64,he=A.value,we=H(D.value),ke=we+(((ue=D.value)==null?void 0:ue.clientHeight)||0),te={top:we-80,bottom:ke-181};he&&(se<te.top?(he.classList.add("is-top"),he.classList.remove("is-fixed"),he.classList.remove("is-bottom")):se>te.bottom?(he.classList.add("is-bottom"),he.classList.remove("is-fixed"),he.classList.remove("is-top")):(he.classList.add("is-fixed"),he.classList.remove("is-top"),he.classList.remove("is-bottom")))},de=()=>{var ke;const se=H(D.value),he=H(A.value);d.value=((ke=D.value)==null?void 0:ke.clientHeight)||0,g.value=41/d.value;const we=he<se?v.value+he-se:he-se;h.value=(we+12)/d.value},Ve=()=>{const se=v.value+z.value+64,he=B.value.length;for(let we=0;we<he;we++){const ke=B.value[we],te=H(ke),ue=ke.clientHeight,pe=H(ke)+ue,ve=I.value[we],_e=ve.clientHeight,Je=Y.value?{top:te+31,bottom:pe-_e}:{top:te-10,bottom:pe-_e-30};if(ue<_e){ve.classList.add("is-top"),ve.classList.remove("is-fixed"),ve.classList.remove("is-bottom");continue}se<Je.top?(ve.classList.add("is-top"),ve.classList.remove("is-fixed"),ve.classList.remove("is-bottom")):se>Je.bottom?(ve.classList.add("is-bottom"),ve.classList.remove("is-fixed"),ve.classList.remove("is-top")):(ve.classList.add("is-fixed"),ve.classList.remove("is-top"),ve.classList.remove("is-bottom"))}},oe=()=>{const se=v.value+z.value+64,he=B.value.length;let we=!1;for(let ke=0;ke<he;ke++){const te=B.value[ke],ue=H(te),pe=H(te)+te.clientHeight,_e=I.value[ke].clientHeight,Je={top:ue-300,bottom:pe-_e};if(se>Je.top&&se<Je.bottom){m.value=ke,we=!0;break}}if(!we&&he>0){const ke=B.value[0],te=H(ke);se<te-300&&(m.value=0)}},fe=se=>{const he=w.value<768?120:150,we=q(B.value[se]).y-he;typeof window<"u"&&window.scroll({top:we,left:0,behavior:"smooth"})},Ce=()=>{const se=C.value;if(!se)return;const he=se.getBoundingClientRect().top,we=se.getBoundingClientRect().bottom,ke=typeof window>"u"||typeof document>"u"?w.value<768?66:100:Number(window.getComputedStyle(document.body).getPropertyValue("--header-height-calc").split("px")[0]),te=N.value;te&&(he-80>ke||we<ke?(te.classList.remove("is-fixed"),te.classList.add("d-none")):(te.classList.add("is-fixed"),te.classList.remove("d-none")))},Se=se=>{p.value=se.text,b.value=se.image,O(!0),_.value=!0},ae=()=>{O(!1),_.value=!1},ce=()=>{const he=B.value.length;for(let we=0;we<he;we++){const ke=B.value[we],te=ke.clientHeight,pe=I.value[we].clientHeight,ve=ke.children[0];te<pe&&(ve.style.minHeight=`${pe}px`)}};return e.onMounted(()=>{B.value=[],I.value=[],e.nextTick(()=>{J(),Q(),ce()})}),e.onBeforeUnmount(()=>{F()}),(se,he)=>{var we,ke,te;return e.openBlock(),e.createElementBlock(e.Fragment,null,[s.value?(e.openBlock(),e.createElementBlock("div",{key:0,class:"timeline-story",ref_key:"wrapper",ref:C,onMouseenter:he[2]||(he[2]=ue=>l.value=!0),onMouseleave:he[3]||(he[3]=ue=>l.value=!1)},[e.createElementVNode("div",{class:"story__sticky-bar d-md-none",ref_key:"tab",ref:S},[e.createElementVNode("div",{class:"story__sticky-bar__content",ref_key:"stickybar",ref:N},[e.createVNode(qS,{list:(we=n.modelValue)==null?void 0:we.data,currentIdx:m.value,onUpdateCurrentIdx:fe},null,8,["list","currentIdx"])],512)],512),e.createElementVNode("ul",{class:"story__list",ref_key:"listRef",ref:D},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList((ke=n.modelValue)==null?void 0:ke.data,(ue,pe)=>(e.openBlock(),e.createElementBlock("li",{class:e.normalizeClass(["story__item",{"is-active":m.value==pe}]),key:ue.id,ref_for:!0,ref:ve=>{ve&&B.value.push(ve)},id:`${ue.id}`},[e.createElementVNode("div",v8,[e.createElementVNode("div",y8,[e.createElementVNode("div",{class:"story__label",ref_for:!0,ref:ve=>{ve&&I.value.push(ve)}},[e.createElementVNode("div",_8,e.toDisplayString(ue.title),1),e.createElementVNode("div",{class:"story__label__desc",innerHTML:ue.desc},null,8,b8)],512)]),e.createElementVNode("div",w8,[e.createElementVNode("div",{class:e.normalizeClass(["story__gallery",{"is-active":m.value==pe}])},[e.createVNode(HS,{gallery:ue.gallery,onOpenCaption:Se},null,8,["gallery"])],2)])])],10,g8))),128)),e.createElementVNode("div",{class:"story__mask",ref_key:"bg",ref:$},null,512),e.createElementVNode("div",{class:"story__line",style:e.normalizeStyle([{"--height":`${d.value}px`},{"--bottom":`${h.value*100}%`},{"--space":`${g.value*100}%`}])},null,4),e.createElementVNode("div",{class:"story__dot",ref_key:"dot",ref:A},null,512),e.createElementVNode("div",{class:"story__mask story__mask--front",ref_key:"bg2",ref:k},[e.createElementVNode("div",x8,[e.createVNode(n8,{list:(te=n.modelValue)==null?void 0:te.data,activeIdx:m.value,onScrollToIdx:fe},null,8,["list","activeIdx"])])],512)],512),e.createVNode(e.Transition,{name:"fade-right"},{default:e.withCtx(()=>[e.withDirectives(e.createVNode(ZS,{text:p.value,image:b.value,onCloseCaption:ae},null,8,["text","image"]),[[e.vShow,_.value]])]),_:1}),n.isPreview?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(Te,{key:0,show:l.value,"onUpdate:show":he[0]||(he[0]=ue=>l.value=ue),onHandleEdit:he[1]||(he[1]=ue=>r.value=!0),onHandleDelete:u,onHandleCopy:c,onHandlePaste:f},null,8,["show"]))],544)):e.createCommentVNode("",!0),n.isPreview?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(f8,{key:1,show:r.value,"onUpdate:show":he[4]||(he[4]=ue=>r.value=ue),data:n.modelValue},null,8,["show","data"]))],64)}}}),Ed=ne(V8,[["__scopeId","data-v-21f61657"]]),C8=Object.freeze(Object.defineProperty({__proto__:null,default:Ed},Symbol.toStringTag,{value:"Module"}));let ci=null;async function Fh(){return ci||(typeof window<"u"?(ci=(await import("axios")).default.create({baseURL:"http://ywtx-v2.cedim.cn/api/",timeout:3e4,headers:{"Content-Type":"application/json;charset=utf-8"}}),ci.interceptors.request.use(t=>(console.log("Request:",t),t),t=>(console.error("Request Error:",t),Promise.reject(t))),ci.interceptors.response.use(t=>{console.log("Response:",t);const{data:o}=t;return t.status===200&&o?t:(console.error("Business Error:",o.message),Promise.reject(new Error(o.message||"请求失败")))},t=>{console.error("Response Error:",t);let o="网络错误";if(t.response){const{status:a,data:i}=t.response;switch(a){case 401:o="未授权,请重新登录";break;case 403:o="拒绝访问";break;case 404:o="请求地址出错";break;case 500:o="服务器内部错误";break;default:o=(i==null?void 0:i.message)||`连接错误${a}`}}else t.request?o="网络连接异常":o=t.message||"请求失败";return console.error("HTTP Error:",o),Promise.reject(t)})):ci={get:()=>Promise.resolve({data:null,status:200}),post:()=>Promise.resolve({data:null,status:200}),put:()=>Promise.resolve({data:null,status:200}),delete:()=>Promise.resolve({data:null,status:200}),patch:()=>Promise.resolve({data:null,status:200}),request:()=>Promise.resolve({data:null,status:200}),interceptors:{request:{use:()=>{},eject:()=>{}},response:{use:()=>{},eject:()=>{}}}}),ci}let mi=null;function av(){if(!mi){if(typeof window<"u")return Fh().then(n=>{mi=n}),new Proxy({},{get:(n,t)=>mi?mi[t]:(...o)=>Fh().then(a=>a[t](...o))});mi={get:()=>Promise.resolve({data:null,status:200}),post:()=>Promise.resolve({data:null,status:200}),put:()=>Promise.resolve({data:null,status:200}),delete:()=>Promise.resolve({data:null,status:200}),patch:()=>Promise.resolve({data:null,status:200}),request:()=>Promise.resolve({data:null,status:200}),interceptors:{request:{use:()=>{},eject:()=>{}},response:{use:()=>{},eject:()=>{}}}}}return mi}const Zt=av(),k8=av(),E8={class:"list-sort"},T8=["onClick"],N8=e.defineComponent({name:"ListSort",__name:"ListSort",props:{list:{},focusKey:{},year:{type:Boolean}},emits:["updateKey"],setup(n,{emit:t}){const o=n,a=t,i=e.ref(!1),s=e.computed(()=>{var c,f,m;return o.year?o.focusKey??((c=o.list)==null?void 0:c[0]):o.focusKey??((m=(f=o.list)==null?void 0:f[0])==null?void 0:m.key)}),l=e.computed(()=>{var f,m,d,h,g;if(o.year){const p=(f=o.list)==null?void 0:f.find(b=>b==s.value);return p||((m=o.list)==null?void 0:m[0])}const c=(d=o.list)==null?void 0:d.find(p=>p.key==s.value);return c?c.name:(g=(h=o.list)==null?void 0:h[0])==null?void 0:g.name});e.watch(()=>o.focusKey,()=>{u()});const r=c=>{a("updateKey",c),i.value=!1},u=()=>{i.value=!1};return(c,f)=>(e.openBlock(),e.createElementBlock("div",E8,[e.createElementVNode("button",{type:"button",class:e.normalizeClass(["list-sort__btn",{"is-active":i.value}]),onClick:f[0]||(f[0]=m=>i.value=!i.value)},e.toDisplayString(l.value),3),e.createElementVNode("ul",{class:e.normalizeClass(["list-sort__list",{"is-active":i.value}])},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.list,m=>(e.openBlock(),e.createElementBlock("li",{key:m.key||m},[e.createElementVNode("button",{type:"button",class:e.normalizeClass(["list-sort__option",{"is-active":s.value==(m.key||m)}]),onClick:d=>r(m.key||m)},e.toDisplayString(m.name||m),11,T8)]))),128))],2)]))}}),Hh=ne(N8,[["__scopeId","data-v-2445a011"]]),S8={class:"list-filter"},B8=["data-count"],D8=["id","value"],P8=["for"],$8=e.defineComponent({name:"ListFilter",__name:"ListFilter",props:{list:{},focusKey:{},placeholder:{}},emits:["updateKey"],setup(n,{emit:t}){const o=n,a=t,i=e.ref(!1),s=e.ref(Date.now()),l=e.computed({get(){return o.focusKey??[]},set(u){a("updateKey",u)}});e.watch(()=>o.focusKey,()=>{r()});const r=()=>{i.value=!1};return(u,c)=>(e.openBlock(),e.createElementBlock("div",S8,[e.createElementVNode("button",{type:"button",class:e.normalizeClass(["list-filter__btn",{"is-active":i.value}]),onClick:c[0]||(c[0]=f=>i.value=!i.value)},[e.createElementVNode("div",{class:e.normalizeClass(["btn__text",{"show-circle":l.value.length>0}]),"data-count":l.value.length}," 筛选 ",10,B8),c[2]||(c[2]=e.createElementVNode("div",{class:"btn__expand"},null,-1))],2),e.createElementVNode("ul",{class:e.normalizeClass(["list-filter__list",{"is-active":i.value}])},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.list,(f,m)=>(e.openBlock(),e.createElementBlock("li",{key:f.key},[e.withDirectives(e.createElementVNode("input",{type:"checkbox",class:"d-none",id:`${f.key}-${s.value}`,value:f.key,"onUpdate:modelValue":c[1]||(c[1]=d=>l.value=d)},null,8,D8),[[e.vModelCheckbox,l.value]]),e.createElementVNode("label",{for:`${f.key}-${s.value}`,class:e.normalizeClass(["list-filter__option",{"is-active":l.value.includes(f.key)}])},e.toDisplayString(f.name),11,P8)]))),128))],2)]))}}),A8=ne($8,[["__scopeId","data-v-abbe0b75"]]),L8={class:"tab-blue"},I8={class:"tab-blue__wrapper flex-center"},O8=["onClick"],M8={key:0,class:"tab-blue__filter__sort"},U8={key:1,class:"tab-blue__filter__filter"},R8={key:0,class:"tab-blue__filter__filter"},F8=e.defineComponent({name:"TabBlue",__name:"TabBlue",props:{componentProps:{},currentIdx:{},keySort:{},keyFilter:{},yearList:{},keyYear:{},articleTabList:{}},emits:["updateIdx","updateSort","updateFilter","updateYear"],setup(n,{emit:t}){const o=n,a=t,i=e.ref(null),s=e.ref(null),l=e.ref([]),r=e.ref([]),u=e.ref(0),c=e.ref(0),f=e.ref(0),m=e.ref(0),d=e.ref(0),h=e.ref(!0),g=e.ref(300),p=e.ref(0),b=e.computed(()=>{var M;return Array.isArray(o.articleTabList)?o.articleTabList:((M=o.componentProps)==null?void 0:M.list)??null}),_=e.computed(()=>{var M;return((M=o.componentProps)==null?void 0:M.sort)??null}),w=e.computed(()=>{var M;return((M=o.componentProps)==null?void 0:M.filter)??[]}),v=e.computed(()=>{const M=o.yearList??[],Q="所有年份",W=[...M];return W.unshift(Q),o.yearList?W:[]}),V=e.computed({get(){return o.keySort},set(M){a("updateSort",M)}}),C=e.computed({get(){return o.keyFilter},set(M){a("updateFilter",M)}}),S=e.computed({get(){return o.keyYear},set(M){a("updateYear",M)}}),N=e.computed({get(){return o.currentIdx??0},set(M){a("updateIdx",M),e.nextTick(()=>F())}}),D=e.computed(()=>u.value-c.value),$=e.computed(()=>typeof window>"u"?!1:m.value-window.innerWidth>20),k=e.ref(typeof window<"u"?window.innerWidth:0);e.watch(()=>o.currentIdx,(M,Q)=>{h.value=(M??0)>(Q??0),e.nextTick(()=>z())}),e.watch(k,()=>{Y(),z()});const A=()=>{const M=i.value;M&&(d.value=M.getBoundingClientRect().left)},B=()=>{const M=r.value[N.value];M&&(u.value=M.getBoundingClientRect().right)},I=()=>{const M=r.value[N.value];M&&(c.value=M.getBoundingClientRect().left)};setTimeout(()=>{console.log("stripLeft=======",r.value[5].getBoundingClientRect().left)},500);const z=(M=250)=>{h.value?(B(),setTimeout(I,M)):(I(),setTimeout(B,M)),J()},Y=()=>{const M=s.value;M&&(f.value=M.scrollLeft),A(),e.nextTick(()=>z(50)),e.nextTick(H)},H=()=>{const M=l.value;if(M&&M.length>0){const Q=M[M.length-1];Q&&(m.value=Q.getBoundingClientRect().right)}},q=()=>{Y()},O=M=>{const Q=s.value;Q&&(M==="next"?Q.scrollLeft=f.value+100:Q.scrollLeft=f.value-100)},J=()=>{const M=s.value;M&&(g.value=M.clientWidth)},F=()=>{if(typeof window>"u")return;const M=r.value[N.value];if(!M)return;const Q=M.clientWidth/2,W=window.innerWidth/2;p.value=M.getBoundingClientRect().right-Q;const Z=s.value;Z&&(Z.scrollLeft-=W-p.value)};return e.onMounted(()=>{if(e.nextTick(()=>{setTimeout(q,300)}),typeof window<"u"){const M=()=>{k.value=window.innerWidth};window.addEventListener("resize",M),e.onBeforeUnmount(()=>{window.removeEventListener("resize",M)})}}),(M,Q)=>(e.openBlock(),e.createElementBlock("div",L8,[e.createElementVNode("div",I8,[e.createElementVNode("div",{class:"tab-blue__nav justify-content-center",ref_key:"nav",ref:i},[e.withDirectives(e.createElementVNode("div",{class:"tab-blue__nav__prev",onClick:Q[0]||(Q[0]=W=>O("prev"))},null,512),[[e.vShow,f.value>30]]),e.createElementVNode("ul",{class:"tab-blue__list px-4",ref_key:"list",ref:s,onScroll:q},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(b.value,(W,Z)=>(e.openBlock(),e.createElementBlock("li",{key:W.key,class:"tab-blue__list__item",ref_for:!0,ref:de=>l.value[Z]=de},[e.createElementVNode("button",{type:"button",class:e.normalizeClass(["tab-blue__btn",{"tab-blue__btn--active":N.value==Z}]),ref_for:!0,ref:de=>r.value[Z]=de,onClick:de=>N.value=Z},e.toDisplayString(W.name),11,O8)]))),128)),e.createElementVNode("span",{class:"tab-blue__strip",style:e.normalizeStyle(`--strip-width:${D.value}px;--strip-left:${c.value}px;--list-scroll-left:${f.value}px;--fix-left:${d.value}px`)},null,4)],544),e.withDirectives(e.createElementVNode("div",{class:"tab-blue__nav__next",onClick:Q[1]||(Q[1]=W=>O("next"))},null,512),[[e.vShow,$.value]])],512),_.value&&w.value?(e.openBlock(),e.createElementBlock("div",{key:0,class:"tab-blue__filter zIndex2 mt-5 mt-md-3",style:e.normalizeStyle({"--width":`${g.value}px`})},[_.value.length>0?(e.openBlock(),e.createElementBlock("div",M8,[e.createVNode(Hh,{list:_.value,focusKey:V.value,onUpdateKey:Q[2]||(Q[2]=W=>V.value=W)},null,8,["list","focusKey"])])):e.createCommentVNode("",!0),w.value.length>0?(e.openBlock(),e.createElementBlock("div",U8,[e.createVNode(A8,{list:w.value,focusKey:C.value,onUpdateKey:Q[3]||(Q[3]=W=>C.value=W)},null,8,["list","focusKey"])])):e.createCommentVNode("",!0)],4)):e.createCommentVNode("",!0),v.value.length>0?(e.openBlock(),e.createElementBlock("div",{key:1,class:"tab-blue__filter mt-5 mt-md-3",style:e.normalizeStyle({"--width":`${g.value}px`})},[v.value.length>1?(e.openBlock(),e.createElementBlock("div",R8,[e.createVNode(Hh,{list:v.value,year:!0,focusKey:S.value,onUpdateKey:Q[4]||(Q[4]=W=>S.value=W)},null,8,["list","focusKey"])])):e.createCommentVNode("",!0)],4)):e.createCommentVNode("",!0)])]))}}),H8=ne(F8,[["__scopeId","data-v-3f3e99e4"]]),j8={class:"article__head"},z8=["href"],q8=["src","alt"],W8=["src","alt"],G8=["src","alt"],X8={key:0,class:"article__title line-clamp-2 mt-3"},Y8={key:1,class:"article__desc line-clamp-4 mt-2"},K8={class:"article__footer"},Q8={key:0,class:"article__label"},J8={key:1,class:"article__date"},Z8=e.defineComponent({name:"CardArticle",__name:"index",props:{componentProps:{},singleColumn:{type:Boolean},articleCategories:{},isPreview:{}},emits:["openPopup","handleClick"],setup(n,{emit:t}){const o=n,a=t,i=e.ref(null),s=e.ref(""),l=b=>{var V;if(g.value||!b)return;let _=(V=o.componentProps)==null?void 0:V.category;typeof window<"u"&&window.scroll({top:0,left:0,behavior:"smooth"});const w=typeof window>"u"?0:window.scrollY,v=i.value?i.value.getBoundingClientRect().top+w-160:0;a("openPopup",{key:b,cat:_,positionY:v})},r=b=>{a("handleClick",b)},u=e.computed(()=>{var b;return o.componentProps?o.componentProps.image?o.componentProps.image:(b=o.componentProps.meta)!=null&&b.image?o.componentProps.meta.image:"https://ywies-tx.cedim.cn/_nuxt/img/ywies-news-logo.202e378.jpg":"https://ywies-tx.cedim.cn/_nuxt/img/ywies-news-logo.202e378.jpg"}),c=e.computed(()=>{var b;return o.componentProps?o.componentProps.title?o.componentProps.title:(b=o.componentProps.meta)==null?void 0:b.title:null}),f=e.computed(()=>{if(o.componentProps)return o.componentProps.alt??c.value??void 0}),m=e.computed(()=>{var b;return o.componentProps?o.componentProps.desc?o.componentProps.desc:(b=o.componentProps.meta)==null?void 0:b.description:null}),d=e.computed(()=>{var w;if(!o.componentProps)return null;if(o.componentProps.labelName)return o.componentProps.labelName;let b=o.componentProps.label?o.componentProps.label:o.componentProps.category;const _=o.articleCategories;if(_&&b){let v=_.filter(V=>V.key.toLowerCase()===b.toLowerCase());return s.value=(w=v[0])==null?void 0:w.name,s.value}return b}),h=e.computed(()=>{var b;return o.componentProps?o.componentProps.date?o.componentProps.date:p((b=o.componentProps)==null?void 0:b.time):null}),g=e.computed(()=>{var b;return((b=o.componentProps)==null?void 0:b.link)??null}),p=b=>{if(!b)return null;const _=new Date(b),w=_.getFullYear(),v=(_.getMonth()+1).toString().padStart(2,"0"),V=_.getDate().toString().padStart(2,"0");return`${w}年${v}月${V}日`};return(b,_)=>(e.openBlock(),e.createElementBlock("div",{class:"card-article",ref_key:"cardArticle",ref:i},[e.createElementVNode("div",j8,[g.value&&g.value.includes("http")&&n.isPreview?(e.openBlock(),e.createElementBlock("a",{key:0,href:g.value,target:"_blank",class:"article__img img-fit",onMousedown:_[0]||(_[0]=e.withModifiers(()=>{},["prevent","stop"]))},[e.createElementVNode("img",{src:u.value,alt:f.value},null,8,q8),_[4]||(_[4]=e.createElementVNode("div",{class:"article__img__mask"},[e.createElementVNode("div",{class:"article__img__mask__btn"}," 阅读 ")],-1))],40,z8)):g.value?(e.openBlock(),e.createElementBlock("button",{key:1,onClick:_[1]||(_[1]=w=>r(g.value)),class:"article__img img-fit",onMousedown:_[2]||(_[2]=e.withModifiers(()=>{},["prevent","stop"]))},[e.createElementVNode("img",{src:u.value,alt:f.value},null,8,W8),_[5]||(_[5]=e.createElementVNode("div",{class:"article__img__mask"},[e.createElementVNode("div",{class:"article__img__mask__btn"}," 阅读 ")],-1))],32)):(e.openBlock(),e.createElementBlock("div",{key:2,class:"article__img img-fit",onClick:_[3]||(_[3]=w=>{var v;return l((v=n.componentProps)==null?void 0:v.key)})},[e.createElementVNode("img",{src:u.value,alt:f.value},null,8,G8),_[6]||(_[6]=e.createElementVNode("div",{class:"article__img__mask"},[e.createElementVNode("div",{class:"article__img__mask__btn"}," 阅读 ")],-1))]))]),e.createElementVNode("div",{class:e.normalizeClass(["article__body",{"is-single-column":n.singleColumn}])},[c.value?(e.openBlock(),e.createElementBlock("h6",X8,e.toDisplayString(c.value),1)):e.createCommentVNode("",!0),m.value?(e.openBlock(),e.createElementBlock("p",Y8,e.toDisplayString(m.value),1)):e.createCommentVNode("",!0),e.createElementVNode("div",K8,[d.value?(e.openBlock(),e.createElementBlock("div",Q8,e.toDisplayString(d.value),1)):e.createCommentVNode("",!0),h.value?(e.openBlock(),e.createElementBlock("div",J8,e.toDisplayString(h.value),1)):e.createCommentVNode("",!0)])],2)],512))}}),ul=ne(Z8,[["__scopeId","data-v-56c3bb3e"]]),eB={class:"pagination"},tB={class:"d-flex align-items-center h-100 justify-content-center justify-content-md-start"},nB={key:0,class:"page-ellipsis flex-center"},oB=["onClick"],aB=e.defineComponent({name:"Pagination",__name:"Pagination",props:{totalPage:{},currentPage:{}},emits:["changePage"],setup(n,{emit:t}){const o=n,a=t,i=e.computed(()=>{let u=[],c=!1;const f=o.totalPage??1;for(let m=1;m<=f;m++)r(m)?(c=!1,u.push(m)):c||(u.push("Ellipsis"),c=!0);return u[0]==="Ellipsis"&&u.shift(),u}),s=u=>{a("changePage",u)},l=u=>{const c=o.currentPage??1,f=o.totalPage??1;u<0?c>1&&s(c+u):c<f&&s(c+u)},r=u=>{const c=o.totalPage??1,f=o.currentPage??1;return c<=6||u<=f+2&&u>=f||u===c||f>=c-3&&(u>=c-2||u===1)};return(u,c)=>(e.openBlock(),e.createElementBlock("div",eB,[e.createElementVNode("ul",tB,[e.createElementVNode("li",{class:e.normalizeClass(["page-arrow pr-3 pr-md-4",{"page-arrow--disable":n.currentPage===1}]),onClick:c[0]||(c[0]=f=>l(-1))},[...c[2]||(c[2]=[e.createElementVNode("div",{class:"i page-arrow__left"},null,-1)])],2),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(i.value,(f,m)=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:`${f}-${m}`},[f==="Ellipsis"?(e.openBlock(),e.createElementBlock("li",nB)):(e.openBlock(),e.createElementBlock("li",{key:1,class:e.normalizeClass(["page-item flex-center",{"page-item--active":f===n.currentPage}]),onClick:d=>typeof f=="number"?s(f):void 0},e.toDisplayString(f),11,oB))],64))),128)),e.createElementVNode("li",{class:e.normalizeClass(["page-arrow pl-3 pl-md-4",{"page-arrow--disable":n.currentPage===n.totalPage}]),onClick:c[1]||(c[1]=f=>l(1))},[...c[3]||(c[3]=[e.createElementVNode("div",{class:"i page-arrow__right"},null,-1)])],2)])]))}}),iB=ne(aB,[["__scopeId","data-v-d5dbf1f4"]]),sB={class:"setting-content"},lB={class:"setting-header flex items-center"},rB={class:"setting-header flex items-center"},dB={class:"setting-header flex items-center"},uB={class:"setting-header flex items-center"},cB={class:"setting-body"},mB={class:"setting-item"},pB={class:"btn-group"},hB={key:0,class:"drag-handle"},fB={class:"item-action flex items-center"},gB={class:"item-action flex items-center"},vB=e.defineComponent({__name:"setting",props:{show:{type:Boolean,default:!1},data:{type:Object,default:()=>{}},articleCategoryGroups:{type:Object,default:()=>{}}},emits:["update:show"],setup(n,{emit:t}){const o=e.defineAsyncComponent(()=>import("vuedraggable")),a=e.ref(!1),i=e.computed(()=>({animation:200,group:"links",disabled:!1,ghostClass:"ghost",handle:".drag-handle",filter:".arco-input, .arco-select, .arco-checkbox",preventOnFilter:!1})),s=f=>f&&f.length>1,l=n,r=t,u=()=>{r("update:show",!1)},c=f=>{l.data.data=l.data.data.filter(m=>m.id!==f)};return(f,m)=>{const d=e.resolveComponent("a-switch"),h=e.resolveComponent("a-option"),g=e.resolveComponent("a-select"),p=e.resolveComponent("a-input"),b=e.resolveComponent("icon-drag-arrow"),_=e.resolveComponent("icon-delete"),w=e.resolveComponent("a-drawer");return e.openBlock(),e.createBlock(w,{width:500,visible:n.show,footer:!1,onCancel:u,unmountOnClose:""},{title:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(n.data.type)+"组件编辑 ",1)]),default:e.withCtx(()=>[e.createElementVNode("div",sB,[e.createElementVNode("div",lB,[m[9]||(m[9]=e.createElementVNode("span",{class:"header-title"},"仅显示PC端",-1)),e.createVNode(d,{modelValue:n.data.onlyShowPc,"onUpdate:modelValue":m[0]||(m[0]=v=>n.data.onlyShowPc=v)},null,8,["modelValue"])]),e.createElementVNode("div",rB,[m[12]||(m[12]=e.createElementVNode("span",{class:"header-title"},"显示年份选择",-1)),e.createVNode(g,{modelValue:n.data.displayYearList,"onUpdate:modelValue":m[1]||(m[1]=v=>n.data.displayYearList=v),placeholder:"请选择","allow-clear":""},{default:e.withCtx(()=>[e.createVNode(h,{value:!0},{default:e.withCtx(()=>[...m[10]||(m[10]=[e.createTextVNode("是",-1)])]),_:1}),e.createVNode(h,{value:!1},{default:e.withCtx(()=>[...m[11]||(m[11]=[e.createTextVNode("否",-1)])]),_:1})]),_:1},8,["modelValue"])]),e.createElementVNode("div",dB,[m[13]||(m[13]=e.createElementVNode("span",{class:"header-title"},"文章分类",-1)),e.createVNode(g,{modelValue:n.data.article_category_group_id,"onUpdate:modelValue":m[2]||(m[2]=v=>n.data.article_category_group_id=v),placeholder:"请选择","allow-clear":""},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.articleCategoryGroups,v=>(e.openBlock(),e.createBlock(h,{key:v.groupId,value:v.groupId},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(v.groupName),1)]),_:2},1032,["value"]))),128))]),_:1},8,["modelValue"])]),e.createElementVNode("div",uB,[m[14]||(m[14]=e.createElementVNode("span",{class:"header-title"},"接口地址",-1)),e.createElementVNode("div",null,[e.createVNode(p,{modelValue:n.data.api,"onUpdate:modelValue":m[3]||(m[3]=v=>n.data.api=v),placeholder:"默认接口地址","allow-clear":""},null,8,["modelValue"]),e.createVNode(p,{style:{"margin-top":"8px"},modelValue:n.data.previewModeApi,"onUpdate:modelValue":m[4]||(m[4]=v=>n.data.previewModeApi=v),placeholder:"PreviewMode接口地址","allow-clear":""},null,8,["modelValue"]),e.createVNode(p,{style:{"margin-top":"8px"},modelValue:n.data.reviewModeApi,"onUpdate:modelValue":m[5]||(m[5]=v=>n.data.reviewModeApi=v),placeholder:"ReviewMode接口地址","allow-clear":""},null,8,["modelValue"])])]),e.createElementVNode("div",cB,[e.createElementVNode("div",mB,[m[17]||(m[17]=e.createElementVNode("p",{class:"item-name"},"Sort",-1)),e.createVNode(e.unref(o),e.mergeProps({modelValue:n.data.sort,"onUpdate:modelValue":m[6]||(m[6]=v=>n.data.sort=v),"component-data":{tag:"div",type:"transition-group",name:a.value?null:"flip-list"}},i.value,{disabled:!s(n.data.sort),onStart:m[7]||(m[7]=v=>a.value=!0),onEnd:m[8]||(m[8]=v=>a.value=!1),"item-key":"id"}),{item:e.withCtx(({element:v})=>[(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["item-button draggable-item",{"sortable-disabled":!s(n.data.sort)}]),key:v.key},[e.createElementVNode("div",pB,[s(n.data.sort)?(e.openBlock(),e.createElementBlock("div",hB,[e.createVNode(b,{class:"drag-icon"})])):e.createCommentVNode("",!0),e.createVNode(_,{class:"btn-delete",onClick:V=>c(v.key)},null,8,["onClick"])]),e.createElementVNode("div",fB,[m[15]||(m[15]=e.createElementVNode("p",{class:"item-name"},"Sort Behaviour",-1)),e.createVNode(p,{style:{flex:"1"},modelValue:v.key,"onUpdate:modelValue":V=>v.key=V,disabled:""},null,8,["modelValue","onUpdate:modelValue"])]),e.createElementVNode("div",gB,[m[16]||(m[16]=e.createElementVNode("p",{class:"item-name"},"Translation",-1)),e.createVNode(p,{style:{flex:"1"},modelValue:v.name,"onUpdate:modelValue":V=>v.name=V,placeholder:"翻译","allow-clear":""},null,8,["modelValue","onUpdate:modelValue"])])],2))]),_:1},16,["modelValue","component-data","disabled"])])])])]),_:1},8,["visible"])}}}),yB=ne(vB,[["__scopeId","data-v-b808ba28"]]),_B={class:"tab-default__wrapper container-content"},bB={class:"tab-default__content mt-5 mt-md-13"},wB={key:0,"data-aos":"fade-in","data-aos-duration":"1500"},xB={key:0,class:"flex-center mt-15 mt-md-20"},VB=e.defineComponent({name:"NewsList",__name:"index",props:{modelValue:{type:Object,default:()=>{}},isPreview:{type:Boolean,default:!0},host:{type:String,default:"cms-web.ycismelody.cn"},locale:{type:String,default:"sc"}},emits:["update:modelValue","handleDelete","handleCopy","handlePaste","handleClick"],setup(n,{emit:t}){const o=n,a=t,i={articleCategoryGroups:"/article/category/group/listForWeb",articleYears:"/article/years"},s=e.ref([]),l=e.ref([]),r=()=>{Promise.all([Zt.get(i.articleCategoryGroups,{params:{langCode:o.locale,host:o.host}}),Zt.get(i.articleYears,{params:{langCode:o.locale,host:o.host}})]).then(([ae,ce])=>{s.value=ae.data.data,l.value=ce.data.data})},u=()=>{var ce,se,he,we,ke,te;if(o.modelValue&&o.modelValue.data)return;const ae={id:((ce=o.modelValue)==null?void 0:ce.id)||R(),type:"NewsList",onlyShowPc:!1,api:((se=o.modelValue)==null?void 0:se.api)||"/article/newsList",previewModeApi:((he=o.modelValue)==null?void 0:he.previewModeApi)||"/component/preview/articles",reviewModeApi:((we=o.modelValue)==null?void 0:we.reviewModeApi)||"/component/review/articles",isPreviewMode:((ke=o.modelValue)==null?void 0:ke.isPreviewMode)||!1,isReviewMode:((te=o.modelValue)==null?void 0:te.isReviewMode)||!1,sort:[{key:"most-recent",name:"最新"},{key:"past-month",name:"上月"},{key:"past-year",name:"去年"}],displayYearList:!0,list:[],article_category_group_id:1,getIsPreviewMode:!1,getIsReviewMode:!1};a("update:modelValue",ae)},c=e.computed(()=>{var ae;return o.isPreview?!((ae=o.modelValue)!=null&&ae.onlyShowPc)||!Ne():!0}),f=e.ref(!1),m=e.ref(!1),d=()=>{a("handleDelete",o.modelValue.id)},h=()=>{a("handleCopy",o.modelValue)},g=ae=>{a("handlePaste",ae)},p=ae=>{a("handleClick",ae)};r(),u();const b=e.ref(null),_=e.ref(!1),w=e.ref(void 0),v=e.ref(0),V=e.ref(null),C=e.ref(null),S=e.ref("所有年份"),N=e.ref(10),D=e.ref(1),$=e.ref(12),k=e.ref([]),A=e.ref({}),B=e.ref(""),I=e.ref(typeof window>"u"?1024:window.innerWidth),z=()=>{I.value=typeof window>"u"?1024:window.innerWidth},Y=e.computed(()=>{var se,he,we,ke;if(!_.value)return Object.freeze(((se=o.modelValue)==null?void 0:se.list)??[]);const ae=JSON.parse(JSON.stringify(s.value));if(console.log("categoryGroups",ae.find(te=>te.groupId===w.value)),!ae||!w.value||!ae.find(te=>te.groupId===w.value))return Object.freeze([]);let ce=(he=ae.find(te=>te.groupId===w.value))==null?void 0:he.categoryList;return!((we=o.modelValue)!=null&&we.isPreviewMode)&&!((ke=o.modelValue)!=null&&ke.isReviewMode)&&(ce=ce.filter(function(te){return te.hasOwnProperty("hasArticles")&&te.hasArticles})),Object.freeze(ce)}),H=e.computed(()=>{let ae=[];for(const ce of Y.value)ce.key!=="all"&&ae.push(ce.key);return Object.freeze(ae)}),q=e.computed(()=>{var ae;if(_.value){let ce=[{key:"all",name:"全部",list:[]}],se=Y.value.map(function(he){return{key:he.key,name:he.name,list:[]}});return Object.freeze(ce.concat(se))}return((ae=o.modelValue)==null?void 0:ae.list)??void 0}),O=e.computed(()=>{var ae;return((ae=o.modelValue)==null?void 0:ae.colDesktop)??4}),J=e.computed(()=>{var ae;return((ae=o.modelValue)==null?void 0:ae.colTablet)??3}),F=e.computed(()=>{var ae;return((ae=o.modelValue)==null?void 0:ae.colMobile)??1}),M=e.computed(()=>{var ae,ce;return((ce=(ae=q.value)==null?void 0:ae[v.value])==null?void 0:ce.list)??null}),Q=e.computed(()=>{var ae;return!C.value||!C.value.length?M.value:((ae=M.value)==null?void 0:ae.filter(ce=>{var he;let se=!1;return(he=C.value)==null||he.forEach(we=>{se=ce&&ce.keywords&&ce.keywords.includes(we)?!0:se}),se}))??[]}),W=e.computed(()=>{if(!V.value||V.value==="most-recent")return[...Q.value].sort((ue,pe)=>new Date(pe.date).getTime()-new Date(ue.date).getTime());const ae=new Date,ce=ae.getFullYear(),se=ae.getMonth(),he=ae.getDate(),we=new Date(ce,se-1<0?11:se-1,he),ke=new Date(ce-1,se,he),te=V.value==="past-month"?we:ke;return Q.value.filter(ue=>new Date(ue.date)>te&&new Date(ue.date)<ae)}),Z=e.computed(()=>{var ae;return((ae=o.modelValue)==null?void 0:ae.displayYearList)??!0?l.value:[]}),de=e.computed(()=>{var ae,ce,se;return _.value||(ae=o.modelValue)!=null&&ae.list&&((se=(ce=o.modelValue.list[0])==null?void 0:ce.list)==null?void 0:se.length)===0?k.value:W.value.slice((D.value-1)*$.value,D.value*$.value)}),Ve=ae=>{if(!ae)return;const ce=100,se=typeof window>"u"?0:window.scrollY,we=ae.getBoundingClientRect().top+se-ce;typeof window<"u"&&window.scrollTo({top:we,behavior:"smooth"})};e.watch(V,()=>{oe(),fe()}),e.watch(C,()=>{fe()}),e.watch(S,()=>{oe(),fe()}),e.watch(D,()=>{const ae=b.value;Ve(ae),oe()}),e.watch(v,ae=>{fe(),q.value&&q.value[ae]&&(B.value=q.value[ae].key,D.value=1,oe())}),e.watch(H,(ae,ce)=>{ce.length===0&&ae.length>0&&(Ce(),oe())});const oe=async ae=>{var ce,se,he,we,ke,te,ue,pe;if(_.value||(ce=o.modelValue)!=null&&ce.list&&((he=(se=o.modelValue.list[0])==null?void 0:se.list)==null?void 0:he.length)===0){let ve=(we=o.modelValue)==null?void 0:we.api;if((ke=o.modelValue)!=null&&ke.isPreviewMode&&(ve=(te=o.modelValue)==null?void 0:te.previewModeApi),(ue=o.modelValue)!=null&&ue.isReviewMode&&(ve=(pe=o.modelValue)==null?void 0:pe.reviewModeApi),H.value.length===0)return;const Je={params:{host:o.host,langCode:o.locale,per_page:$.value,page:D.value,filter:V.value,year:Z.value.includes(Number(S.value))||Z.value.includes(String(S.value))?Number(S.value):null,pageNum:D.value,pageSize:$.value}};try{const bt=await Zt.get(ve,Je);k.value=bt.data.data.data,A.value=bt.data.data.meta,N.value=A.value.last_page}catch(bt){console.error("Error fetching articles:",bt)}}},fe=()=>{var ae,ce,se;D.value=1,$.value=I.value>=768?I.value>=1024?12:9:10,(_.value||(ae=o.modelValue)!=null&&ae.list&&((se=(ce=o.modelValue.list[0])==null?void 0:ce.list)==null?void 0:se.length)>0)&&(N.value=Math.ceil(W.value.length/$.value))},Ce=()=>{let ae=0;B.value&&q.value&&(ae=q.value.findIndex(ce=>ce.key==B.value)),v.value=ae>-1?ae:0},Se=ae=>{v.value=ae,B.value=q.value[ae].key,D.value=1,oe()};return e.onMounted(()=>{var ce;let ae=((ce=o.modelValue)==null?void 0:ce.article_category_group_id)??null;ae&&(_.value=!0,w.value=ae),typeof window<"u"&&window.addEventListener("resize",z),z(),fe(),Ce()}),e.onBeforeUnmount(()=>{typeof window<"u"&&window.removeEventListener("resize",z)}),(ae,ce)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[c.value?(e.openBlock(),e.createElementBlock("div",{key:0,class:"news-list tab-default",ref_key:"parent",ref:b,onMouseenter:ce[6]||(ce[6]=se=>f.value=!0),onMouseleave:ce[7]||(ce[7]=se=>f.value=!1)},[e.createElementVNode("div",_B,[e.createVNode(H8,{componentProps:n.modelValue,currentIdx:v.value,keySort:V.value,keyFilter:C.value??[],keyYear:S.value,yearList:l.value,articleTabList:q.value?[...q.value]:void 0,onUpdateIdx:Se,onUpdateSort:ce[0]||(ce[0]=se=>V.value=typeof se=="string"?se:null),onUpdateFilter:ce[1]||(ce[1]=se=>C.value=se),onUpdateYear:ce[2]||(ce[2]=se=>S.value=String(se))},null,8,["componentProps","currentIdx","keySort","keyFilter","keyYear","yearList","articleTabList"])]),e.createElementVNode("div",bB,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(q.value,(se,he)=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:se.key},[he==v.value?(e.openBlock(),e.createElementBlock("div",wB,[e.createElementVNode("div",{class:e.normalizeClass(["card-list row container-content-middle",[`row-cols-${F.value}`,`row-cols-md-${J.value}`,`row-cols-lg-${O.value}`]])},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(de.value,we=>(e.openBlock(),e.createElementBlock("div",{class:"card-item col",key:we.id},[e.createVNode(ul,{componentProps:we,articleCategories:Y.value,singleColumn:I.value<768,isPreview:n.isPreview,onHandleClick:p},null,8,["componentProps","articleCategories","singleColumn","isPreview"])]))),128))],2),N.value>0?(e.openBlock(),e.createElementBlock("div",xB,[e.createVNode(iB,{totalPage:N.value,currentPage:D.value,onChangePage:ce[3]||(ce[3]=we=>D.value=we)},null,8,["totalPage","currentPage"])])):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0)],64))),128))]),n.isPreview?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(Te,{key:0,show:f.value,"onUpdate:show":ce[4]||(ce[4]=se=>f.value=se),onHandleEdit:ce[5]||(ce[5]=se=>m.value=!0),onHandleDelete:d,onHandleCopy:h,onHandlePaste:g},null,8,["show"]))],544)):e.createCommentVNode("",!0),n.isPreview?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(yB,{key:1,show:m.value,"onUpdate:show":ce[8]||(ce[8]=se=>m.value=se),data:n.modelValue,articleCategoryGroups:s.value},null,8,["show","data","articleCategoryGroups"]))],64))}}),Td=ne(VB,[["__scopeId","data-v-fc019307"]]),CB=Object.freeze(Object.defineProperty({__proto__:null,default:Td},Symbol.toStringTag,{value:"Module"})),kB={class:"setting-content"},EB={class:"setting-header flex items-center"},TB={class:"setting-header flex items-center"},NB={class:"setting-header flex items-center"},SB={key:1,class:"btn-setting"},BB={class:"btn-group"},DB={class:"item-action flex items-center"},PB={class:"setting-body"},$B={class:"btn-group"},AB={key:0,class:"drag-handle"},LB={class:"section-item"},IB={class:"btn-group"},OB={key:0,class:"drag-handle"},MB=["src"],UB={class:"item-uplaod flex items-center"},RB=["onClick"],FB=e.defineComponent({__name:"setting",props:{show:{type:Boolean,default:!1},data:{type:Object,default:()=>{}}},emits:["update:show"],setup(n,{emit:t}){const o=e.defineAsyncComponent(()=>import("vuedraggable")),a=e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./index-QFpkZqlg.js"))),i=e.ref(!1),s=e.computed(()=>({animation:200,group:"gallerys",disabled:!1,ghostClass:"ghost",handle:".drag-handle",filter:".rich-text-editor, .arco-input, .arco-select, .arco-checkbox",preventOnFilter:!1})),l=e.computed(()=>({animation:200,group:"sections",disabled:!1,ghostClass:"ghost",handle:".drag-handle",filter:".rich-text-editor, .arco-input, .arco-select, .arco-checkbox",preventOnFilter:!1})),r=b=>b&&b.length>1,u=n,c=t,f=()=>{c("update:show",!1)},m=()=>{u.data.btnType="",u.data.btnText="",u.data.btnUrl="",u.data.isExternal=!1},d=()=>{u.data.data.push({id:R(),timeSection:[]})},h=b=>{u.data.data=u.data.data.filter(_=>_.id!==b)},g=b=>{b.push({id:R(),title:"标题",subtitle:"内容",year:"",imgSrc:"",alt:"",linkUrl:"",isExternal:!1})},p=(b,_)=>{b.splice(b.findIndex(w=>w.id===_),1)};return(b,_)=>{const w=e.resolveComponent("a-switch"),v=e.resolveComponent("a-input"),V=e.resolveComponent("icon-plus"),C=e.resolveComponent("a-button"),S=e.resolveComponent("a-button-group"),N=e.resolveComponent("icon-delete"),D=e.resolveComponent("a-link"),$=e.resolveComponent("a-checkbox"),k=e.resolveComponent("icon-drag-arrow"),A=e.resolveComponent("a-drawer");return e.openBlock(),e.createBlock(A,{width:500,visible:n.show,footer:!1,onCancel:f,unmountOnClose:""},{title:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(n.data.type)+"组件编辑 ",1)]),default:e.withCtx(()=>[e.createElementVNode("div",kB,[e.createElementVNode("div",EB,[_[14]||(_[14]=e.createElementVNode("span",{class:"header-title"},"仅显示PC端",-1)),e.createVNode(w,{modelValue:n.data.onlyShowPc,"onUpdate:modelValue":_[0]||(_[0]=B=>n.data.onlyShowPc=B)},null,8,["modelValue"])]),e.createElementVNode("div",TB,[_[15]||(_[15]=e.createElementVNode("span",{class:"header-title"},"标题",-1)),e.createVNode(v,{modelValue:n.data.title,"onUpdate:modelValue":_[1]||(_[1]=B=>n.data.title=B),placeholder:"请输入标题","allow-clear":""},null,8,["modelValue"])]),e.createElementVNode("div",NB,[_[16]||(_[16]=e.createElementVNode("span",{class:"header-title"},"子标题",-1)),e.createVNode(v,{modelValue:n.data.subtitle,"onUpdate:modelValue":_[2]||(_[2]=B=>n.data.subtitle=B),placeholder:"请输入子标题","allow-clear":""},null,8,["modelValue"])]),n.data.btnType?(e.openBlock(),e.createElementBlock("div",SB,[e.createElementVNode("div",BB,[e.createVNode(N,{class:"btn-delete",onClick:m})]),n.data.btnType==="btn"?(e.openBlock(),e.createBlock(C,{key:0,type:"primary"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(n.data.btnText),1)]),_:1})):(e.openBlock(),e.createBlock(D,{key:1,href:"link"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(n.data.btnText),1)]),_:1})),e.createElementVNode("div",DB,[e.createVNode(v,{class:"action-text",modelValue:n.data.btnText,"onUpdate:modelValue":_[5]||(_[5]=B=>n.data.btnText=B),placeholder:"按钮文本","allow-clear":""},null,8,["modelValue"]),e.createVNode(v,{modelValue:n.data.btnUrl,"onUpdate:modelValue":_[6]||(_[6]=B=>n.data.btnUrl=B),placeholder:"按钮链接","allow-clear":""},null,8,["modelValue"])]),e.createVNode($,{modelValue:n.data.isExternal,"onUpdate:modelValue":_[7]||(_[7]=B=>n.data.isExternal=B)},{default:e.withCtx(()=>[..._[19]||(_[19]=[e.createTextVNode("是否外部链接",-1)])]),_:1},8,["modelValue"])])):(e.openBlock(),e.createBlock(S,{key:0,type:"primary"},{default:e.withCtx(()=>[e.createVNode(C,{size:"mini",onClick:_[3]||(_[3]=B=>n.data.btnType="btn")},{icon:e.withCtx(()=>[e.createVNode(V)]),default:e.withCtx(()=>[_[17]||(_[17]=e.createTextVNode(" 按钮 ",-1))]),_:1}),e.createVNode(C,{size:"mini",onClick:_[4]||(_[4]=B=>n.data.btnType="link")},{icon:e.withCtx(()=>[e.createVNode(V)]),default:e.withCtx(()=>[_[18]||(_[18]=e.createTextVNode(" 链接 ",-1))]),_:1})]),_:1})),e.createElementVNode("div",PB,[e.createVNode(e.unref(o),e.mergeProps({modelValue:n.data.data,"onUpdate:modelValue":_[10]||(_[10]=B=>n.data.data=B),"component-data":{tag:"div",type:"transition-group",name:i.value?null:"flip-list"}},s.value,{disabled:!r(n.data.data),onStart:_[11]||(_[11]=B=>i.value=!0),onEnd:_[12]||(_[12]=B=>i.value=!1),"item-key":"id"}),{item:e.withCtx(({element:B})=>[(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["item-section draggable-item",{"sortable-disabled":!r(n.data.data)}]),key:B.id},[e.createElementVNode("div",$B,[r(n.data.data)?(e.openBlock(),e.createElementBlock("div",AB,[e.createVNode(k,{class:"drag-icon"})])):e.createCommentVNode("",!0),e.createVNode(N,{class:"btn-delete",onClick:I=>h(B.id)},null,8,["onClick"])]),e.createElementVNode("div",LB,[e.createVNode(e.unref(o),e.mergeProps({modelValue:B.timeSection,"onUpdate:modelValue":I=>B.timeSection=I,"component-data":{tag:"div",type:"transition-group",name:i.value?null:"flip-list"}},l.value,{disabled:!r(B.timeSection),onStart:_[8]||(_[8]=I=>i.value=!0),onEnd:_[9]||(_[9]=I=>i.value=!1),"item-key":"id"}),{item:e.withCtx(({element:I})=>[(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["item-button draggable-item",{"sortable-disabled":!r(B.timeSection)}]),key:I.id},[e.createElementVNode("div",IB,[r(B.timeSection)?(e.openBlock(),e.createElementBlock("div",OB,[e.createVNode(k,{class:"drag-icon"})])):e.createCommentVNode("",!0),e.createVNode(N,{class:"btn-delete",onClick:z=>p(B.timeSection,I.id)},null,8,["onClick"])]),_[20]||(_[20]=e.createElementVNode("p",{class:"item-title"},"标题",-1)),e.createVNode(v,{modelValue:I.title,"onUpdate:modelValue":z=>I.title=z,placeholder:"请输入标题","allow-clear":""},null,8,["modelValue","onUpdate:modelValue"]),_[21]||(_[21]=e.createElementVNode("p",{class:"item-title"},"内容",-1)),e.createVNode(e.unref(a),{modelValue:I.subtitle,"onUpdate:modelValue":z=>I.subtitle=z,name:`TheHistoryCarousel_editor_${I.id}`},null,8,["modelValue","onUpdate:modelValue","name"]),_[22]||(_[22]=e.createElementVNode("p",{class:"item-title"},"日期",-1)),e.createVNode(v,{modelValue:I.year,"onUpdate:modelValue":z=>I.year=z,placeholder:"请输入日期","allow-clear":""},null,8,["modelValue","onUpdate:modelValue"]),_[23]||(_[23]=e.createElementVNode("p",{class:"item-title"},"图片",-1)),e.createElementVNode("img",{class:"item-img",src:I.imgSrc},null,8,MB),e.createElementVNode("div",UB,[e.createVNode(v,{modelValue:I.imgSrc,"onUpdate:modelValue":z=>I.imgSrc=z,placeholder:"请输入图片链接","allow-clear":""},null,8,["modelValue","onUpdate:modelValue"]),e.createVNode(ze,{modelValue:I.imgSrc,"onUpdate:modelValue":z=>I.imgSrc=z,name:`TheHistoryCarousel_${I.id}`,"button-class":"fit-content"},null,8,["modelValue","onUpdate:modelValue","name"])]),e.createVNode(v,{class:"mt-2",modelValue:I.alt,"onUpdate:modelValue":z=>I.alt=z,placeholder:"图片alt","allow-clear":""},null,8,["modelValue","onUpdate:modelValue"]),e.createVNode(v,{class:"mt-2",modelValue:I.linkUrl,"onUpdate:modelValue":z=>I.linkUrl=z,placeholder:"按钮链接","allow-clear":""},null,8,["modelValue","onUpdate:modelValue"])],2))]),_:2},1040,["modelValue","onUpdate:modelValue","component-data","disabled"]),e.createElementVNode("div",{class:"item-add-btn flex items-center",onClick:I=>g(B.timeSection)},[e.createVNode(V),_[24]||(_[24]=e.createElementVNode("span",{class:"btn-text"},"添加section",-1))],8,RB)])],2))]),_:1},16,["modelValue","component-data","disabled"]),e.createElementVNode("div",{class:"item-add-btn flex items-center",onClick:_[13]||(_[13]=B=>d())},[e.createVNode(V),_[25]||(_[25]=e.createElementVNode("span",{class:"btn-text"},"添加",-1))])])])]),_:1},8,["visible"])}}}),HB=ne(FB,[["__scopeId","data-v-1cba5c8e"]]),jB={key:0,class:"popBox"},zB={class:"close-header"},qB={class:"mb-3"},WB=["innerHTML"],GB={class:"mt-5"},XB={class:"circle-link"},YB=["href","target"],KB=e.defineComponent({name:"LightHistoryPopup",__name:"index",props:{historyPopupData:{},show:{type:Boolean}},emits:["update:show"],setup(n,{emit:t}){const o=n,a=e.computed(()=>o.show),i=t,s=()=>{i("update:show",!1)};return(l,r)=>{const u=e.resolveComponent("a-button");return a.value?(e.openBlock(),e.createElementBlock("div",jB,[e.createElementVNode("div",zB,[e.createVNode(u,{type:"text",size:"small",onClick:s,class:"close-btn"},{default:e.withCtx(()=>[...r[1]||(r[1]=[e.createTextVNode(" × ",-1)])]),_:1})]),e.createElementVNode("h6",qB,e.toDisplayString(n.historyPopupData.title),1),e.createVNode(Zi,null,{default:e.withCtx(()=>[e.createElementVNode("div",{class:"popBox__subtitle tx-body-small",innerHTML:n.historyPopupData.subtitle},null,8,WB)]),_:1}),e.createElementVNode("div",GB,[e.createElementVNode("div",XB,[l.isPreview?(e.openBlock(),e.createElementBlock("a",{key:0,href:n.historyPopupData.linkUrl,target:n.historyPopupData.isExternal?"_blank":"_self",class:"nuxt-link-active"},[...r[2]||(r[2]=[e.createElementVNode("div",null,"了解更多",-1),e.createElementVNode("span",{class:"circle-link__icon"},null,-1)])],8,YB)):(e.openBlock(),e.createElementBlock("button",{key:1,onClick:r[0]||(r[0]=c=>l.handleClick(n.historyPopupData.linkUrl)),class:"nuxt-link-active"},[...r[3]||(r[3]=[e.createElementVNode("div",null,"了解更多",-1),e.createElementVNode("span",{class:"circle-link__icon"},null,-1)])]))])])])):e.createCommentVNode("",!0)}}}),QB=ne(KB,[["__scopeId","data-v-c316437f"]]),JB={class:"position-relative"},ZB=["data-swiper-parallax"],eD=["data-swiper-parallax","data-swiper-parallax-opacity"],tD=["onClick"],nD={class:"period__effect"},oD=["id"],aD=["data-swiper-parallax","data-swiper-parallax-opacity"],iD=["src","alt"],sD={class:"hisPopup"},lD={class:"swiper-bottom"},rD={class:"swiper-bottom__text"},dD={class:"tx-subtitle text-uppercase text-center"},uD={class:"position-relative w-100 celebrateTitle"},cD={class:"text-uppercase text-center"},mD=["onClick"],pD={key:0,class:"year-pagination__box__line"},hD=["href"],fD={class:"btn-primary__text"},gD={key:1,class:"btn-primary mx-auto mt-2 btn-primary--white size-normal"},vD={class:"btn-primary__text"},yD={key:1,class:"circle-link mx-auto mt-2 circle-link--light"},_D=["href"],bD={"data-v-d020e8b6":""},wD={key:1,class:"circle-link mx-auto mt-2 circle-link--light"},xD={"data-v-d020e8b6":""},VD=e.defineComponent({name:"TheHistoryCarousel",__name:"index",props:{modelValue:{type:Object,default:()=>{}},isPreview:{type:Boolean,default:!0}},emits:["update:modelValue","handleDelete","handleCopy","handlePaste"],setup(n,{emit:t}){const o=n,a=t,i=()=>{var B;if(o.modelValue&&o.modelValue.data)return;const A={id:((B=o.modelValue)==null?void 0:B.id)||R(),type:"TheHistoryCarousel",onlyShowPc:!1,title:"标题",subtitle:"副标题",btnType:"link",btnText:"按钮",btnUrl:"",isExternal:!0,data:[{id:R(),timeSection:[{id:R(),title:"标题1",subtitle:"内容",year:"1990",imgSrc:"https://osswebsite-test.cedim.cn/media-library/ywies-bj/images/home/ywies-tx.jpg",alt:"",linkUrl:"",isExternal:!0},{id:R(),title:"标题2",subtitle:"内容",year:"2000",imgSrc:"https://osswebsite-test.cedim.cn/media-library/ywies-bj/images/home/ywies-tx.jpg",alt:"",linkUrl:"",isExternal:!0}]},{id:R(),timeSection:[{id:R(),title:"标题3",subtitle:"内容",year:"2005",imgSrc:"https://osswebsite-test.cedim.cn/media-library/ywies-bj/images/home/ywies-tx.jpg",alt:"",linkUrl:"",isExternal:!0}]}]};a("update:modelValue",A)},s=e.computed(()=>{var A;return o.isPreview?!((A=o.modelValue)!=null&&A.onlyShowPc)||!Ne():!0}),l=e.ref(!1),r=e.ref(!1),u=()=>{a("handleDelete",o.modelValue.id)},c=()=>{a("handleCopy",o.modelValue)},f=A=>{a("handlePaste",A)};i();const m=e.ref(!1),d=e.ref(0),h=e.ref(!1),g=e.ref("-23%"),p=e.ref(null),b=e.ref(null),_=e.ref([]),w=[ct.Navigation,ct.Pagination,ct.Parallax];e.watch(d,(A,B)=>{if(_.value&&_.value[0]&&b.value){const I=_.value[0].clientWidth;if(B<A&&A>3){b.value.scrollLeft+=I;return}if(B>A&&A<S.value.length-4){b.value.scrollLeft-=I;return}}});const v=e.ref({title:"",subtitle:"",linkUrl:"",isExternal:!0}),V=A=>{m.value=!0,v.value={title:A.title,subtitle:A.subtitle,linkUrl:A.linkUrl,isExternal:A.isExternal}},C=e.ref(null),S=e.computed(()=>{var A;if(!((A=o.modelValue)!=null&&A.data))return[];if(typeof window<"u"&&window.innerWidth<576){let B=[];return o.modelValue.data.forEach(I=>{I.timeSection.forEach(z=>{B.push({id:R(),timeSection:[z]})})}),B}else return o.modelValue.data}),N=e.computed(()=>{if(typeof window<"u"&&window.innerWidth<576){const A=2280/S.value.length/2;return g.value=`-${A}%`,g.value}else return g.value="-23%",g.value}),D=A=>{C.value=A,h.value=!0},$=()=>{C.value&&(d.value=C.value.activeIndex,m.value=!1)},k=A=>{d.value=A,C.value&&C.value.slideTo(A)};return(A,B)=>{var I,z,Y,H,q,O,J,F,M;return e.openBlock(),e.createElementBlock(e.Fragment,null,[s.value?(e.openBlock(),e.createElementBlock("div",{key:0,class:"the-history-carousel",onMouseenter:B[3]||(B[3]=Q=>l.value=!0),onMouseleave:B[4]||(B[4]=Q=>l.value=!1)},[e.createElementVNode("div",JB,[e.createVNode(e.unref(Et.Swiper),{ref_key:"historySlide",ref:p,class:"swiper history-swiper",modules:w,"slides-per-view":1,"space-between":0,speed:2e3,parallax:!0,direction:"horizontal",loop:!1,"allow-touch-move":!0,pagination:{el:".swiper-pagination",clickable:!0},navigation:{nextEl:".swiper-button-next",prevEl:".swiper-button-prev"},onSwiper:D,onSlideChange:$},{"container-start":e.withCtx(()=>[e.createElementVNode("div",{class:"parallax-bg","data-swiper-parallax":N.value,style:e.normalizeStyle({transform:`translate3d(${N.value==="-380%"?0:N.value}, 0, 0)`,"transition-duration":"0ms"})},null,12,ZB)]),default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(S.value,Q=>(e.openBlock(),e.createBlock(e.unref(Et.SwiperSlide),{class:"slide-box",key:Q.id},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(Q.timeSection,(W,Z)=>(e.openBlock(),e.createElementBlock("div",{class:"inside-wrap leftSide",key:W.id},[e.createElementVNode("div",{style:e.normalizeStyle({zIndex:Z?1:50}),class:"period","data-swiper-parallax":Z?-300:0,"data-swiper-parallax-opacity":Z?.2:.5},[e.createElementVNode("p",null,e.toDisplayString(W.year),1),e.createElementVNode("div",{class:"period__iconPlus",onClick:de=>V(W)},[e.createElementVNode("img",{ref_for:!0,ref:W.year+Z?"right":"left",src:"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjAiIGhlaWdodD0iMjAiIHZpZXdCb3g9IjAgMCAyMCAyMCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZmlsbC1ydWxlPSJldmVub2RkIiBjbGlwLXJ1bGU9ImV2ZW5vZGQiIGQ9Ik05Ljk3OTIyIDE5Ljk1OEMxNS40OTA2IDE5Ljk1OCAxOS45NTg0IDE1LjQ5MDEgMTkuOTU4NCA5Ljk3ODczQzE5Ljk1ODQgNC40NjczNiAxNS40OTA2IC0wLjAwMDQ4ODI4MSA5Ljk3OTIyIC0wLjAwMDQ4ODI4MUM0LjQ2Nzg1IC0wLjAwMDQ4ODI4MSAwIDQuNDY3MzYgMCA5Ljk3ODczQzAgMTUuNDkwMSA0LjQ2Nzg1IDE5Ljk1OCA5Ljk3OTIyIDE5Ljk1OFpNMTQuMTczMiAxMS4wNDU0TDExLjA0NTMgMTEuMDQ1NFYxNC4xNzMzQzExLjA0NTMgMTQuNzQ5MSAxMC41Nzg0IDE1LjIxNiAxMC4wMDI2IDE1LjIxNkM5LjQyNjc3IDE1LjIxNiA4Ljk1OTk3IDE0Ljc0OTEgOC45NTk5NyAxNC4xNzMzVjExLjA0NTRMNS44MzIwMyAxMS4wNDU0QzUuMjU2MiAxMS4wNDU0IDQuNzg5MzkgMTAuNTc4NiA0Ljc4OTM5IDEwLjAwMjdDNC43ODkzOSA5LjQyNjg5IDUuMjU2MiA4Ljk2MDA4IDUuODMyMDMgOC45NjAwOEw4Ljk1OTk3IDguOTYwMDhWNS44MzIxNUM4Ljk1OTk3IDUuMjU2MzEgOS40MjY3NyA0Ljc4OTUgMTAuMDAyNiA0Ljc4OTVDMTAuNTc4NCA0Ljc4OTUgMTEuMDQ1MyA1LjI1NjMxIDExLjA0NTMgNS44MzIxNVY4Ljk2MDA4TDE0LjE3MzIgOC45NjAwOEMxNC43NDkgOC45NjAwOCAxNS4yMTU4IDkuNDI2ODkgMTUuMjE1OCAxMC4wMDI3QzE1LjIxNTggMTAuNTc4NiAxNC43NDkgMTEuMDQ1NCAxNC4xNzMyIDExLjA0NTRaIiBmaWxsPSJ3aGl0ZSIvPgo8L3N2Zz4K",alt:"了解更多"},null,512)],8,tD),e.createElementVNode("div",nD,[e.createElementVNode("div",{id:"period__effect__circle"+Z,class:"period__effect__circle"},null,8,oD)])],12,eD),e.createElementVNode("div",{class:"image","data-swiper-parallax":Z?600:-400,"data-swiper-parallax-opacity":Z?0:.2},[e.createElementVNode("img",{src:W.imgSrc,alt:W.alt},null,8,iD)],8,aD)]))),128)),e.createElementVNode("div",sD,[e.createVNode(e.Transition,{name:"fade"},{default:e.withCtx(()=>[e.createVNode(QB,{show:m.value,"onUpdate:show":B[0]||(B[0]=W=>m.value=W),historyPopupData:v.value,isPreview:n.isPreview},null,8,["show","historyPopupData","isPreview"])]),_:1})])]),_:2},1024))),128))]),_:1},512),e.createElementVNode("div",lD,[e.createElementVNode("div",rD,[e.createElementVNode("p",dD,e.toDisplayString((I=n.modelValue)==null?void 0:I.subtitle),1),e.createElementVNode("div",uD,[B[6]||(B[6]=e.createElementVNode("div",{class:"swiper-button-prev swiper-button-black swiper-position-prev"},null,-1)),e.createElementVNode("h1",cD,e.toDisplayString((z=n.modelValue)==null?void 0:z.title),1),B[7]||(B[7]=e.createElementVNode("div",{class:"swiper-button-next swiper-button-black swiper-position-next"},null,-1))]),e.createElementVNode("div",{class:"year-pagination",ref_key:"yearPagination",ref:b},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(S.value,(Q,W)=>(e.openBlock(),e.createElementBlock("div",{ref_for:!0,ref_key:"yearBlock",ref:_,class:"year-pagination__box",key:Q.timeSection[0].year+W},[e.createElementVNode("h5",{onClick:Z=>k(W),class:e.normalizeClass({pageActive:d.value===W})},e.toDisplayString(Q.timeSection[0].year),11,mD),Number(W)+1!==S.value.length?(e.openBlock(),e.createElementBlock("div",pD)):e.createCommentVNode("",!0)]))),128))],512),((Y=n.modelValue)==null?void 0:Y.btnType)==="btn"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[n.isPreview?(e.openBlock(),e.createElementBlock("a",{key:0,href:((H=n.modelValue)==null?void 0:H.btnUrl)||"#",target:"_blank",class:"btn-primary mx-auto mt-2 btn-primary--white size-normal"},[e.createElementVNode("div",fD,e.toDisplayString((q=n.modelValue)==null?void 0:q.btnText),1),B[8]||(B[8]=e.createElementVNode("span",{class:"btn-primary__icon"},null,-1))],8,hD)):(e.openBlock(),e.createElementBlock("button",gD,[e.createElementVNode("div",vD,e.toDisplayString((O=n.modelValue)==null?void 0:O.btnText),1),B[9]||(B[9]=e.createElementVNode("span",{class:"btn-primary__icon"},null,-1))]))],64)):(e.openBlock(),e.createElementBlock("div",yD,[n.isPreview?(e.openBlock(),e.createElementBlock("a",{key:0,href:((J=n.modelValue)==null?void 0:J.btnUrl)||"#",class:"nuxt-link-active"},[e.createElementVNode("div",bD,e.toDisplayString((F=n.modelValue)==null?void 0:F.btnText),1),B[10]||(B[10]=e.createElementVNode("span",{class:"circle-link__icon circle-link__icon--light"},null,-1))],8,_D)):(e.openBlock(),e.createElementBlock("button",wD,[e.createElementVNode("div",xD,e.toDisplayString((M=n.modelValue)==null?void 0:M.btnText),1),B[11]||(B[11]=e.createElementVNode("span",{class:"circle-link__icon circle-link__icon--light"},null,-1))]))]))])])]),n.isPreview?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(Te,{key:0,show:l.value,"onUpdate:show":B[1]||(B[1]=Q=>l.value=Q),onHandleEdit:B[2]||(B[2]=Q=>r.value=!0),onHandleDelete:u,onHandleCopy:c,onHandlePaste:f},null,8,["show"]))],32)):e.createCommentVNode("",!0),n.isPreview?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(HB,{key:1,show:r.value,"onUpdate:show":B[5]||(B[5]=Q=>r.value=Q),data:n.modelValue},null,8,["show","data"]))],64)}}}),Nd=ne(VD,[["__scopeId","data-v-536a39f5"]]),CD=Object.freeze(Object.defineProperty({__proto__:null,default:Nd},Symbol.toStringTag,{value:"Module"})),kD={class:"setting-content"},ED={class:"setting-header flex items-center"},TD={class:"setting-header flex items-center"},ND={class:"setting-body"},SD={class:"setting-item"},BD={class:"btn-group"},DD={key:0,class:"drag-handle"},PD=["src"],$D={class:"item-uplaod flex items-center"},AD=e.defineComponent({__name:"setting",props:{show:{type:Boolean,default:!1},data:{type:Object,default:()=>{}}},emits:["update:show"],setup(n,{emit:t}){const o=e.defineAsyncComponent(()=>import("vuedraggable")),a=e.ref(!1),i=e.computed(()=>({animation:200,group:"profiles",disabled:!1,ghostClass:"ghost",handle:".drag-handle",filter:".arco-input, .arco-select, .arco-checkbox",preventOnFilter:!1})),s=m=>m&&m.length>1,l=n,r=t,u=()=>{r("update:show",!1)},c=()=>{l.data.data.push({id:R(),title:"耀华国际教育学校浙江桐乡1",subtitle:"耀华国际教育学校",content:"耀华国际教育学校浙江桐乡校区成立于 2017 年,先进的校园设施确保学 生在安全友好的环境中学习。学校坐落于高桥镇,提供从幼儿阶段至高中 阶段 (K2 至13 年级) 的教育服务,招收2 岁至18 岁本地和外籍学生。",imgSrc:"https://osswebsite-test.cedim.cn/media-library/ywies-tx/images/high-school-test/home/different_1_optim.png",alt:""})},f=m=>{if(l.data.data.length<=3){alert("至少保留3个项目");return}l.data.data=l.data.data.filter(d=>d.id!==m)};return(m,d)=>{const h=e.resolveComponent("a-switch"),g=e.resolveComponent("a-option"),p=e.resolveComponent("a-select"),b=e.resolveComponent("icon-drag-arrow"),_=e.resolveComponent("icon-delete"),w=e.resolveComponent("a-input"),v=e.resolveComponent("icon-plus"),V=e.resolveComponent("a-drawer");return e.openBlock(),e.createBlock(V,{width:500,visible:n.show,footer:!1,onCancel:u,unmountOnClose:""},{title:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(n.data.type)+"组件编辑 ",1)]),default:e.withCtx(()=>[e.createElementVNode("div",kD,[e.createElementVNode("div",ED,[d[6]||(d[6]=e.createElementVNode("span",{class:"header-title"},"仅显示PC端",-1)),e.createVNode(h,{modelValue:n.data.onlyShowPc,"onUpdate:modelValue":d[0]||(d[0]=C=>n.data.onlyShowPc=C)},null,8,["modelValue"])]),e.createElementVNode("div",TD,[d[9]||(d[9]=e.createElementVNode("span",{class:"header-title"},"组件背景",-1)),e.createVNode(p,{modelValue:n.data.bgColor,"onUpdate:modelValue":d[1]||(d[1]=C=>n.data.bgColor=C),placeholder:"请选择","allow-clear":""},{default:e.withCtx(()=>[e.createVNode(g,{value:"#ffffff"},{default:e.withCtx(()=>[...d[7]||(d[7]=[e.createTextVNode("白色",-1)])]),_:1}),e.createVNode(g,{value:"#F7F7FA"},{default:e.withCtx(()=>[...d[8]||(d[8]=[e.createTextVNode("灰色",-1)])]),_:1})]),_:1},8,["modelValue"])]),e.createElementVNode("div",ND,[e.createElementVNode("div",SD,[e.createVNode(e.unref(o),e.mergeProps({modelValue:n.data.data,"onUpdate:modelValue":d[2]||(d[2]=C=>n.data.data=C),"component-data":{tag:"div",type:"transition-group",name:a.value?null:"flip-list"}},i.value,{disabled:!s(n.data.data),onStart:d[3]||(d[3]=C=>a.value=!0),onEnd:d[4]||(d[4]=C=>a.value=!1),"item-key":"id"}),{item:e.withCtx(({element:C})=>[(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["item-button draggable-item",{"sortable-disabled":!s(n.data.data)}]),key:C.id},[e.createElementVNode("div",BD,[s(n.data.data)?(e.openBlock(),e.createElementBlock("div",DD,[e.createVNode(b,{class:"drag-icon"})])):e.createCommentVNode("",!0),e.createVNode(_,{class:"btn-delete",onClick:S=>f(C.id)},null,8,["onClick"])]),d[10]||(d[10]=e.createElementVNode("p",{class:"item-title"},"标题",-1)),e.createVNode(w,{modelValue:C.title,"onUpdate:modelValue":S=>C.title=S,placeholder:"请输入标题","allow-clear":""},null,8,["modelValue","onUpdate:modelValue"]),d[11]||(d[11]=e.createElementVNode("p",{class:"item-title"},"子标题",-1)),e.createVNode(w,{modelValue:C.subtitle,"onUpdate:modelValue":S=>C.subtitle=S,placeholder:"请输入子标题","allow-clear":""},null,8,["modelValue","onUpdate:modelValue"]),d[12]||(d[12]=e.createElementVNode("p",{class:"item-title"},"内容",-1)),e.createVNode(w,{modelValue:C.content,"onUpdate:modelValue":S=>C.content=S,placeholder:"请输入内容","allow-clear":""},null,8,["modelValue","onUpdate:modelValue"]),d[13]||(d[13]=e.createElementVNode("p",{class:"item-title"},"图片",-1)),e.createElementVNode("img",{class:"item-img",src:C.imgSrc},null,8,PD),e.createElementVNode("div",$D,[e.createVNode(w,{modelValue:C.imgSrc,"onUpdate:modelValue":S=>C.imgSrc=S,placeholder:"请输入图片链接","allow-clear":""},null,8,["modelValue","onUpdate:modelValue"]),e.createVNode(ze,{modelValue:C.imgSrc,"onUpdate:modelValue":S=>C.imgSrc=S,name:`CardShowcaseProfile_img_${C.id}`},null,8,["modelValue","onUpdate:modelValue","name"])]),e.createVNode(w,{class:"mt-2",modelValue:C.alt,"onUpdate:modelValue":S=>C.alt=S,placeholder:"图片alt","allow-clear":""},null,8,["modelValue","onUpdate:modelValue"])],2))]),_:1},16,["modelValue","component-data","disabled"]),e.createElementVNode("div",{class:"item-add-btn flex items-center",onClick:d[5]||(d[5]=C=>c())},[e.createVNode(v),d[14]||(d[14]=e.createElementVNode("span",{class:"btn-text"},"添加",-1))])])])])]),_:1},8,["visible"])}}}),LD=ne(AD,[["__scopeId","data-v-106e50a8"]]),ID={class:"card-showcase__container container-content-middle",ref:"cardShowcase"},OD={key:0,class:"splide-wrapper-desktop"},MD={class:"slide-content"},UD={class:"slide-content__box bg-white shadow-lg"},RD={key:0,class:"img-wrapper"},FD=["src","alt"],HD={class:"slide-content__box__title"},jD=["innerHTML"],zD={key:2,class:"slide-content__box__content"},qD={class:"swiper-footer"},WD={class:"swiper-pagination"},GD=["onClick"],XD={key:1,class:"swiper-wrapper-mobile"},YD={class:"slide-content-mobile"},KD={class:"slide-content__box bg-white shadow-lg"},QD={key:0,class:"img-wrapper"},JD=["src","alt"],ZD={class:"slide-content__box__title"},e3=["innerHTML"],t3={key:2,class:"slide-content__box__content"},n3=e.defineComponent({name:"CardShowcaseProfile",__name:"index",props:{modelValue:{type:Object,default:()=>({})},isPreview:{type:Boolean,default:!1}},emits:["update:modelValue","handleDelete","handleCopy","handlePaste"],setup(n,{emit:t}){const o=n,a=t,i=()=>{var $;if(o.modelValue&&o.modelValue.data)return;const D={id:(($=o.modelValue)==null?void 0:$.id)||R(),type:"CardShowcaseProfile",onlyShowPc:!1,bgColor:"",data:[{id:R(),title:"这里是标题1",subtitle:"这里是副标题",content:"这里是内容",imgSrc:"https://osswebsite-test.cedim.cn/media-library/ywies-tx/images/high-school-test/home/different_1_optim.png",alt:""},{id:R(),title:"这里是标题2",subtitle:"这里是副标题",content:"这里是内容",imgSrc:"https://osswebsite-test.cedim.cn/media-library/ywies-tx/images/high-school-test/home/different_1_optim.png",alt:""},{id:R(),title:"这里是标题3",subtitle:"这里是副标题",content:"这里是内容",imgSrc:"https://osswebsite-test.cedim.cn/media-library/ywies-tx/images/high-school-test/home/different_1_optim.png",alt:""}]};a("update:modelValue",D)},s=e.computed(()=>{var D;return o.isPreview?!((D=o.modelValue)!=null&&D.onlyShowPc)||!Ne():!0}),l=e.ref(!1),r=e.ref(!1),u=e.ref(null),c=e.ref(null),f=e.ref(typeof window<"u"?window.innerWidth:1024),m=e.ref(0),d=[ct.Navigation,ct.Pagination,ct.EffectFade],h={type:"loop",perPage:3,perMove:1,focus:"center",gap:"0px",speed:600,arrows:!1,pagination:!1,drag:!0,updateOnMove:!0},g=()=>{var D;(D=o.modelValue)!=null&&D.id&&a("handleDelete",o.modelValue.id)},p=()=>{o.modelValue&&a("handleCopy",o.modelValue)},b=D=>{a("handlePaste",D)},_=()=>{f.value=typeof window<"u"?window.innerWidth:1024};typeof window<"u"&&window.addEventListener("resize",_);const w=D=>{console.log("Splide initialized:",{index:D.index,length:D.length})},v=(D,$)=>{m.value=$},V=()=>{var D;(D=u.value)!=null&&D.splide&&u.value.splide.go("<")},C=()=>{var D;(D=u.value)!=null&&D.splide&&u.value.splide.go(">")},S=D=>{var $;($=u.value)!=null&&$.splide&&u.value.splide.go(D)},N=D=>{c.value=D};return e.onBeforeUnmount(()=>{typeof window<"u"&&window.removeEventListener("resize",_)}),i(),(D,$)=>{var k,A;return e.openBlock(),e.createElementBlock(e.Fragment,null,[s.value?(e.openBlock(),e.createElementBlock("div",{key:0,class:"card-showcase card-showcase-profile",style:e.normalizeStyle({backgroundColor:(k=n.modelValue)==null?void 0:k.bgColor}),onMouseenter:$[2]||($[2]=B=>l.value=!0),onMouseleave:$[3]||($[3]=B=>l.value=!1)},[e.createElementVNode("div",ID,[f.value>767.98?(e.openBlock(),e.createElementBlock("div",OD,[e.createVNode(e.unref(bh.Splide),{ref_key:"splideRef",ref:u,options:h,"onSplide:mounted":w,"onSplide:move":v},{default:e.withCtx(()=>{var B;return[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList((B=n.modelValue)==null?void 0:B.data,I=>(e.openBlock(),e.createBlock(e.unref(bh.SplideSlide),{key:I.id},{default:e.withCtx(()=>[e.createElementVNode("div",MD,[e.createElementVNode("div",UD,[I.imgSrc?(e.openBlock(),e.createElementBlock("div",RD,[e.createElementVNode("img",{class:"img-static",src:I.imgSrc,alt:I.alt||I.title},null,8,FD)])):e.createCommentVNode("",!0),e.createElementVNode("div",HD,e.toDisplayString(I.title),1),I.subtitle?(e.openBlock(),e.createElementBlock("div",{key:1,class:"slide-content__box__subtitle",innerHTML:I.subtitle},null,8,jD)):e.createCommentVNode("",!0),I.content?(e.openBlock(),e.createElementBlock("div",zD,e.toDisplayString(I.content),1)):e.createCommentVNode("",!0)])])]),_:2},1024))),128))]}),_:1},512),e.createElementVNode("div",qD,[e.createElementVNode("div",{class:"swiper-button-prev",onClick:V}),e.createElementVNode("div",WD,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList((A=n.modelValue)==null?void 0:A.data,(B,I)=>(e.openBlock(),e.createElementBlock("span",{key:I,class:e.normalizeClass(["swiper-pagination-bullet",{"swiper-pagination-bullet-active":m.value===I}]),onClick:z=>S(I)},null,10,GD))),128))]),e.createElementVNode("div",{class:"swiper-button-next",onClick:C})])])):(e.openBlock(),e.createElementBlock("div",XD,[e.createVNode(e.unref(Et.Swiper),{ref_key:"showCaseSlideMobile",ref:c,modules:d,"centered-slides":!0,"slides-per-view":1,speed:600,effect:"fade",fadeEffect:{crossFade:!0},loop:!0,autoHeight:!0,navigation:{nextEl:".swiper-button-next-mobile",prevEl:".swiper-button-prev-mobile"},pagination:{el:".swiper-pagination-mobile",clickable:!0},class:"swiper showcaseSlide swiper--mobile",onSwiper:N},{default:e.withCtx(()=>{var B;return[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList((B=n.modelValue)==null?void 0:B.data,I=>(e.openBlock(),e.createBlock(e.unref(Et.SwiperSlide),{key:I.id},{default:e.withCtx(()=>[e.createElementVNode("div",YD,[e.createElementVNode("div",KD,[I.imgSrc?(e.openBlock(),e.createElementBlock("div",QD,[e.createElementVNode("img",{class:"img-static",src:I.imgSrc,alt:I.alt||I.title},null,8,JD)])):e.createCommentVNode("",!0),e.createElementVNode("h4",ZD,e.toDisplayString(I.title),1),I.subtitle?(e.openBlock(),e.createElementBlock("div",{key:1,class:"slide-content__box__subtitle",innerHTML:I.subtitle},null,8,e3)):e.createCommentVNode("",!0),I.content?(e.openBlock(),e.createElementBlock("div",t3,e.toDisplayString(I.content),1)):e.createCommentVNode("",!0)])])]),_:2},1024))),128))]}),_:1},512),$[5]||($[5]=e.createElementVNode("div",{class:"swiper-footer"},[e.createElementVNode("div",{class:"swiper-button-prev-mobile swiper-button-prev"}),e.createElementVNode("div",{class:"swiper-pagination-mobile swiper-pagination"}),e.createElementVNode("div",{class:"swiper-button-next-mobile swiper-button-next"})],-1))]))],512),n.isPreview?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(Te,{key:0,show:l.value,"onUpdate:show":$[0]||($[0]=B=>l.value=B),onHandleEdit:$[1]||($[1]=B=>r.value=!0),onHandleDelete:g,onHandleCopy:p,onHandlePaste:b},null,8,["show"]))],36)):e.createCommentVNode("",!0),n.isPreview?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(LD,{key:1,show:r.value,"onUpdate:show":$[4]||($[4]=B=>r.value=B),data:n.modelValue},null,8,["show","data"]))],64)}}}),Sd=ne(n3,[["__scopeId","data-v-fb9fd4d3"]]),o3=Object.freeze(Object.defineProperty({__proto__:null,default:Sd},Symbol.toStringTag,{value:"Module"})),a3={class:"seting-box"},i3={class:"setting-header flex items-center"},s3=["src"],l3={class:"item-uplaod flex items-center"},r3=e.defineComponent({__name:"setting",props:{show:{type:Boolean,default:!1},data:{type:Object,default:()=>{}}},emits:["update:show"],setup(n,{emit:t}){const o=e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./index-QFpkZqlg.js"))),a=t,i=e.ref({title:"",content:"",imgSrc:"https://osswebsite.ycyw.com/media-library/ywies-bj/images/home/ywies-tx.jpg"}),s=()=>{a("update:show",!1)};return(l,r)=>{const u=e.resolveComponent("a-switch"),c=e.resolveComponent("a-input"),f=e.resolveComponent("a-drawer");return e.openBlock(),e.createBlock(f,{width:500,visible:n.show,footer:!1,onCancel:s,unmountOnClose:""},{title:e.withCtx(()=>{var m;return[e.createTextVNode(e.toDisplayString((m=n.data)==null?void 0:m.type)+"组件编辑 ",1)]}),default:e.withCtx(()=>[e.createElementVNode("div",a3,[e.createElementVNode("div",i3,[r[5]||(r[5]=e.createElementVNode("span",{class:"header-title"},"仅显示PC端",-1)),e.createVNode(u,{modelValue:n.data.onlyShowPc,"onUpdate:modelValue":r[0]||(r[0]=m=>n.data.onlyShowPc=m)},null,8,["modelValue"])]),r[6]||(r[6]=e.createElementVNode("p",{class:"item-title"},"标题",-1)),e.createVNode(c,{modelValue:n.data.title,"onUpdate:modelValue":r[1]||(r[1]=m=>n.data.title=m),placeholder:"请输入标题","allow-clear":""},null,8,["modelValue"]),r[7]||(r[7]=e.createElementVNode("p",{class:"item-title mt-2"},"内容",-1)),e.createVNode(e.unref(o),{modelValue:n.data.content,"onUpdate:modelValue":r[2]||(r[2]=m=>n.data.content=m),name:"CountDown_editor"},null,8,["modelValue"]),r[8]||(r[8]=e.createElementVNode("p",{class:"item-title"},"图片",-1)),e.createElementVNode("img",{class:"item-img",src:i.value.imgSrc},null,8,s3),e.createElementVNode("div",l3,[e.createVNode(c,{modelValue:i.value.imgSrc,"onUpdate:modelValue":r[3]||(r[3]=m=>i.value.imgSrc=m),placeholder:"请输入图片链接","allow-clear":""},null,8,["modelValue"]),e.createVNode(ze,{modelValue:i.value.imgSrc,"onUpdate:modelValue":r[4]||(r[4]=m=>i.value.imgSrc=m),name:"CountDown","button-class":"fit-content"},null,8,["modelValue"])])])]),_:1},8,["visible"])}}}),d3=ne(r3,[["__scopeId","data-v-2fb4a1a4"]]),u3={class:"count-down__img"},c3=["src"],m3={class:"count-down__content"},p3=["innerHTML"],h3={class:"content__title"},f3={class:"count-down__timer"},g3={class:"count-down__timer__time"},v3={class:"count-down__timer__time"},y3={class:"count-down__timer__time"},_3={class:"count-down__timer__time"},b3=e.defineComponent({name:"CountDown",__name:"index",props:{modelValue:{type:Object,default:()=>{}},isPreview:{type:Boolean,default:!0}},emits:["update:modelValue","handleDelete","handleCopy","handlePaste"],setup(n,{emit:t}){const o=n;console.log("!!!!",o.modelValue);const a=t,i=e.ref(!1),s=e.ref(!1),l=e.ref({day:0,hour:0,min:0,sec:0}),r=e.ref(null),u=()=>{a("handleDelete",o.modelValue.id)},c=()=>{a("handleCopy",o.modelValue)},f=g=>{a("handlePaste",g)},m=()=>{var p;if(o.modelValue&&o.modelValue.content)return;const g={id:((p=o.modelValue)==null?void 0:p.id)||R(),type:"CountDown",onlyShowPc:!1,title:"title",content:"content",countTime:"2026-02-08",imgSrc:"https://osswebsite.ycyw.com/media-library/ywies-bj/images/home/ywies-tx.jpg",bgColor:"#ffffff"};a("update:modelValue",g),e.nextTick(()=>{h()})},d=e.computed(()=>{var g;return o.isPreview?!((g=o.modelValue)!=null&&g.onlyShowPc)||!Ne():!0}),h=()=>{r.value&&clearInterval(r.value),r.value=setInterval(()=>{const g=new Date,b=new Date(o.modelValue.countTime).getTime()-g.getTime();b<=0||(l.value.day=Math.floor(b/(1e3*60*60*24)),l.value.hour=Math.floor(b/(1e3*60*60)%24),l.value.min=Math.floor(b/(1e3*60)%60),l.value.sec=Math.floor(b/1e3%60),l.value.day===0&&l.value.hour===0&&l.value.min===0&&l.value.sec===0&&(clearInterval(r.value),r.value=null))},1e3)};return m(),(g,p)=>{var b,_,w,v,V,C,S,N;return e.openBlock(),e.createElementBlock(e.Fragment,null,[d.value?(e.openBlock(),e.createElementBlock("div",{key:0,class:"count-down",onMouseenter:p[2]||(p[2]=D=>i.value=!0),onMouseleave:p[3]||(p[3]=D=>i.value=!1)},[e.createElementVNode("div",{style:e.normalizeStyle({backgroundColor:(b=n.modelValue)==null?void 0:b.bgColor,marginTop:"30px",marginBottom:"30px"}),class:"count-down-container"},[e.createElementVNode("div",u3,[e.createElementVNode("img",{src:(_=n.modelValue)==null?void 0:_.imgSrc,alt:""},null,8,c3)]),e.createElementVNode("div",m3,[e.createElementVNode("div",{class:"content__text",innerHTML:(w=n.modelValue)==null?void 0:w.content},null,8,p3),e.createElementVNode("div",h3,e.toDisplayString((v=n.modelValue)==null?void 0:v.title),1)]),e.createElementVNode("ul",f3,[e.createElementVNode("li",null,[e.createElementVNode("div",g3,e.toDisplayString((V=l.value)==null?void 0:V.day),1),p[5]||(p[5]=e.createElementVNode("div",{class:"count-down__timer__label"},"日",-1))]),e.createElementVNode("li",null,[e.createElementVNode("div",v3,e.toDisplayString((C=l.value)==null?void 0:C.hour),1),p[6]||(p[6]=e.createElementVNode("div",{class:"count-down__timer__label"},"小时",-1))]),e.createElementVNode("li",null,[e.createElementVNode("div",y3,e.toDisplayString((S=l.value)==null?void 0:S.min),1),p[7]||(p[7]=e.createElementVNode("div",{class:"count-down__timer__label"},"分钟",-1))]),e.createElementVNode("li",null,[e.createElementVNode("div",_3,e.toDisplayString((N=l.value)==null?void 0:N.sec),1),p[8]||(p[8]=e.createElementVNode("div",{class:"count-down__timer__label"},"秒",-1))])])],4),n.isPreview?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(Te,{key:0,show:i.value,"onUpdate:show":p[0]||(p[0]=D=>i.value=D),onHandleEdit:p[1]||(p[1]=D=>s.value=!0),onHandleDelete:u,onHandleCopy:c,onHandlePaste:f},null,8,["show"]))],32)):e.createCommentVNode("",!0),n.isPreview?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(d3,{key:1,show:s.value,"onUpdate:show":p[4]||(p[4]=D=>s.value=D),data:n.modelValue},null,8,["show","data"]))],64)}}}),Bd=ne(b3,[["__scopeId","data-v-d55652a9"]]),w3=Object.freeze(Object.defineProperty({__proto__:null,default:Bd},Symbol.toStringTag,{value:"Module"})),x3={class:"seting-box"},V3={class:"setting-header flex items-center"},C3={class:"setting-header flex items-center"},k3={class:"setting-header flex items-center"},E3={class:"setting-header flex items-center"},T3=e.defineComponent({__name:"setting",props:{show:{type:Boolean,default:!1},data:{type:Object,default:()=>{}}},emits:["update:show"],setup(n,{emit:t}){const o=t,a=()=>{o("update:show",!1)};return(i,s)=>{const l=e.resolveComponent("a-switch"),r=e.resolveComponent("a-option"),u=e.resolveComponent("a-select"),c=e.resolveComponent("a-slider"),f=e.resolveComponent("a-input"),m=e.resolveComponent("a-drawer");return e.openBlock(),e.createBlock(m,{width:500,visible:n.show,footer:!1,onCancel:a,unmountOnClose:""},{title:e.withCtx(()=>{var d;return[e.createTextVNode(e.toDisplayString((d=n.data)==null?void 0:d.type)+"组件编辑 ",1)]}),default:e.withCtx(()=>[e.createElementVNode("div",x3,[e.createElementVNode("div",V3,[s[4]||(s[4]=e.createElementVNode("span",{class:"header-title"},"仅显示PC端",-1)),e.createVNode(l,{modelValue:n.data.onlyShowPc,"onUpdate:modelValue":s[0]||(s[0]=d=>n.data.onlyShowPc=d)},null,8,["modelValue"])]),e.createElementVNode("div",C3,[s[9]||(s[9]=e.createElementVNode("span",{class:"header-title"},"组件宽度",-1)),e.createVNode(u,{modelValue:n.data.width,"onUpdate:modelValue":s[1]||(s[1]=d=>n.data.width=d),placeholder:"请选择","allow-clear":""},{default:e.withCtx(()=>[e.createVNode(r,{value:"default"},{default:e.withCtx(()=>[...s[5]||(s[5]=[e.createTextVNode("默认",-1)])]),_:1}),e.createVNode(r,{value:"small"},{default:e.withCtx(()=>[...s[6]||(s[6]=[e.createTextVNode("小",-1)])]),_:1}),e.createVNode(r,{value:"middle"},{default:e.withCtx(()=>[...s[7]||(s[7]=[e.createTextVNode("中",-1)])]),_:1}),e.createVNode(r,{value:"max"},{default:e.withCtx(()=>[...s[8]||(s[8]=[e.createTextVNode("大",-1)])]),_:1})]),_:1},8,["modelValue"])]),e.createElementVNode("div",k3,[s[10]||(s[10]=e.createElementVNode("span",{class:"header-title"},"组件高度",-1)),e.createVNode(c,{modelValue:n.data.height,"onUpdate:modelValue":s[2]||(s[2]=d=>n.data.height=d),min:320,max:1080,"default-value":10,"show-input":""},null,8,["modelValue"])]),e.createElementVNode("div",E3,[s[11]||(s[11]=e.createElementVNode("span",{class:"header-title"},"网址",-1)),e.createVNode(f,{modelValue:n.data.url,"onUpdate:modelValue":s[3]||(s[3]=d=>n.data.url=d),style:{background:"#ffffff"},placeholder:"请输入","allow-clear":""},null,8,["modelValue"])])])]),_:1},8,["visible"])}}}),N3=ne(T3,[["__scopeId","data-v-22c61146"]]),S3={class:"custom-iframe"},B3=["height","src"],D3=e.defineComponent({name:"CustomIframe",__name:"index",props:{modelValue:{type:Object,default:()=>{}},isPreview:{type:Boolean,default:!0}},emits:["update:modelValue","handleDelete","handleCopy","handlePaste"],setup(n,{emit:t}){const o=n;console.log("!!!!",o.modelValue);const a=t,i=e.ref(!1),s=e.ref(!1);e.ref({day:0,hour:0,min:0,sec:0}),e.ref(null);const l=e.computed(()=>{var g;const d=(g=o.modelValue)==null?void 0:g.width;return!d||d==="default"?"container-content":d.startsWith("container-content-")?d:{small:"acontainer-content-small",middle:"acontainer-content-middle",medium:"acontainer-content-middle",max:"acontainer-content-max"}[d]||"container-content"}),r=()=>{a("handleDelete",o.modelValue.id)},u=()=>{a("handleCopy",o.modelValue)},c=d=>{a("handlePaste",d)},f=()=>{var h;if(o.modelValue&&o.modelValue.url)return;const d={id:((h=o.modelValue)==null?void 0:h.id)||R(),type:"CustomIframe",onlyShowPc:!1,width:"",height:550,url:"https://www.hao123.com/"};a("update:modelValue",d)},m=e.computed(()=>{var d;return o.isPreview?!((d=o.modelValue)!=null&&d.onlyShowPc)||!Ne():!0});return f(),(d,h)=>{var g,p,b;return e.openBlock(),e.createElementBlock(e.Fragment,null,[m.value?(e.openBlock(),e.createElementBlock("div",{key:0,style:e.normalizeStyle([{"margin-top":"30px","margin-bottom":"30px"},{backgroundColor:(g=n.modelValue)==null?void 0:g.bgColor}]),class:"custom-iframe-container",onMouseenter:h[2]||(h[2]=_=>i.value=!0),onMouseleave:h[3]||(h[3]=_=>i.value=!1)},[e.createElementVNode("div",S3,[e.createElementVNode("div",{class:e.normalizeClass([l.value])},[e.createElementVNode("iframe",{width:"450",height:(p=n.modelValue)==null?void 0:p.height,frameborder:"0",src:(b=n.modelValue)==null?void 0:b.url,allow:"",style:{border:"0"}},null,8,B3)],2)]),n.isPreview?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(Te,{key:0,show:i.value,"onUpdate:show":h[0]||(h[0]=_=>i.value=_),onHandleEdit:h[1]||(h[1]=_=>s.value=!0),onHandleDelete:r,onHandleCopy:u,onHandlePaste:c},null,8,["show"]))],36)):e.createCommentVNode("",!0),n.isPreview?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(N3,{key:1,show:s.value,"onUpdate:show":h[4]||(h[4]=_=>s.value=_),data:n.modelValue},null,8,["show","data"]))],64)}}}),Dd=ne(D3,[["__scopeId","data-v-11735f44"]]),P3=Object.freeze(Object.defineProperty({__proto__:null,default:Dd},Symbol.toStringTag,{value:"Module"})),$3={class:"seting-box"},A3={class:"setting-header items-center"},L3={class:"setting-header items-center"},I3={key:0},O3={class:"draggable_box"},M3={class:"drag_top_box"},U3=["onClick"],R3=e.defineComponent({__name:"setting",props:{show:{type:Boolean,default:!1},data:{type:Object,default:()=>{}}},emits:["update:show"],setup(n,{emit:t}){const o=e.defineAsyncComponent(()=>import("vuedraggable")),a=e.computed(()=>({animation:200,group:"links",disabled:!1,ghostClass:"ghost",handle:".drag-handle",filter:".rich-text-editor, .arco-input, .arco-select, .arco-checkbox",preventOnFilter:!1})),i=e.ref(!1),s=n,l=e.ref(new Set),r=h=>{l.value.has(h.id)?l.value.delete(h.id):l.value.add(h.id)},u=h=>{s.data.data=s.data.data.filter(g=>g.id!==h)},c=()=>{s.data.data.push({name:"New Contact",title:"",region:"",link:"",id:R()}),e.nextTick(()=>{const g=document.querySelector(".arco-drawer-body");g&&(g.scrollTop=g.scrollHeight)})},f=h=>l.value.has(h.id),m=t,d=()=>{m("update:show",!1)};return(h,g)=>{const p=e.resolveComponent("a-switch"),b=e.resolveComponent("a-slider"),_=e.resolveComponent("icon-drag-dot"),w=e.resolveComponent("icon-drag-arrow"),v=e.resolveComponent("icon-delete"),V=e.resolveComponent("a-input"),C=e.resolveComponent("icon-plus"),S=e.resolveComponent("a-button"),N=e.resolveComponent("a-drawer");return e.openBlock(),e.createBlock(N,{width:500,visible:n.show,footer:!1,onCancel:d,unmountOnClose:""},{title:e.withCtx(()=>{var D;return[e.createTextVNode(e.toDisplayString((D=n.data)==null?void 0:D.type)+"组件编辑 ",1)]}),default:e.withCtx(()=>[e.createElementVNode("div",$3,[e.createElementVNode("div",A3,[g[5]||(g[5]=e.createElementVNode("span",{class:"header-title"},"仅显示PC端",-1)),e.createVNode(p,{modelValue:n.data.onlyShowPc,"onUpdate:modelValue":g[0]||(g[0]=D=>n.data.onlyShowPc=D)},null,8,["modelValue"])]),e.createElementVNode("div",L3,[g[11]||(g[11]=e.createElementVNode("p",{class:"item-title"},"组件高度(最小值: 1, 最大值: 2)",-1)),e.createVNode(b,{modelValue:n.data.columns,"onUpdate:modelValue":g[1]||(g[1]=D=>n.data.columns=D),min:1,max:2,"default-value":2,"show-input":""},null,8,["modelValue"]),g[12]||(g[12]=e.createElementVNode("p",{class:"item-title"},"Contact Person",-1)),n.data.data.length?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("p",I3,"No items found.")),e.createVNode(e.unref(o),e.mergeProps({modelValue:n.data.data,"onUpdate:modelValue":g[2]||(g[2]=D=>n.data.data=D),"component-data":{tag:"div",type:"transition-group",name:i.value?null:"flip-list"}},a.value,{disabled:!1,onStart:g[3]||(g[3]=D=>i.value=!0),onEnd:g[4]||(g[4]=D=>i.value=!1),"item-key":"id"}),{item:e.withCtx(({element:D})=>[e.createElementVNode("div",O3,[e.createElementVNode("div",M3,[e.createElementVNode("div",{onClick:$=>r(D)},[e.createVNode(_,{style:{"margin-right":"10px"}}),e.createTextVNode(e.toDisplayString(D.name),1)],8,U3),e.createElementVNode("div",null,[e.createVNode(w,{class:"icon_drag"}),e.createVNode(v,{class:"btn-delete",onClick:e.withModifiers($=>u(D.id),["stop"])},null,8,["onClick"])])]),e.createVNode(e.Transition,{name:"collapse"},{default:e.withCtx(()=>[e.withDirectives(e.createElementVNode("div",null,[g[6]||(g[6]=e.createElementVNode("p",{class:"item-title",style:{"margin-top":"20px"}},"Name",-1)),e.createVNode(V,{modelValue:D.name,"onUpdate:modelValue":$=>D.name=$,placeholder:"请输入标题","allow-clear":""},null,8,["modelValue","onUpdate:modelValue"]),g[7]||(g[7]=e.createElementVNode("p",{class:"item-title"},"Title",-1)),e.createVNode(V,{modelValue:D.title,"onUpdate:modelValue":$=>D.title=$,placeholder:"请输入标题","allow-clear":""},null,8,["modelValue","onUpdate:modelValue"]),g[8]||(g[8]=e.createElementVNode("p",{class:"item-title"},"Region",-1)),e.createVNode(V,{modelValue:D.region,"onUpdate:modelValue":$=>D.region=$,placeholder:"请输入标题","allow-clear":""},null,8,["modelValue","onUpdate:modelValue"]),g[9]||(g[9]=e.createElementVNode("p",{class:"item-title"},"Email",-1)),e.createVNode(V,{modelValue:D.link,"onUpdate:modelValue":$=>D.link=$,placeholder:"请输入标题","allow-clear":""},null,8,["modelValue","onUpdate:modelValue"])],512),[[e.vShow,!f(D)]])]),_:2},1024)])]),_:1},16,["modelValue","component-data"]),e.createVNode(S,{type:"primary",onClick:c},{icon:e.withCtx(()=>[e.createVNode(C)]),default:e.withCtx(()=>[g[10]||(g[10]=e.createTextVNode(" 联系人 ",-1))]),_:1})])])]),_:1},8,["visible"])}}}),F3=ne(R3,[["__scopeId","data-v-502c5a92"]]),Fc="data:image/svg+xml,%3csvg%20width='24'%20height='24'%20viewBox='0%200%2024%2024'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M19%204H5C4.20435%204%203.44129%204.31607%202.87868%204.87868C2.31607%205.44129%202%206.20435%202%207V17C2%2017.7956%202.31607%2018.5587%202.87868%2019.1213C3.44129%2019.6839%204.20435%2020%205%2020H19C19.7956%2020%2020.5587%2019.6839%2021.1213%2019.1213C21.6839%2018.5587%2022%2017.7956%2022%2017V7C22%206.20435%2021.6839%205.44129%2021.1213%204.87868C20.5587%204.31607%2019.7956%204%2019%204ZM19%206L12.5%2010.47C12.348%2010.5578%2012.1755%2010.604%2012%2010.604C11.8245%2010.604%2011.652%2010.5578%2011.5%2010.47L5%206H19Z'%20fill='%230032A0'/%3e%3c/svg%3e",H3={class:"contact-us-list"},j3={class:"contact-us-list__list"},z3={class:"contact-us-list__item"},q3={class:"contact-us-list__item__name"},W3={class:"contact-us-list__item__title"},G3={class:"contact-us-list__item__region"},X3={class:"contact-us-list__item__link"},Y3={class:"icon-link icon-link--md"},K3=["href"],Q3={class:"icon-link__text"},J3=e.defineComponent({name:"ContactUsList",__name:"index",props:{modelValue:{type:Object,default:()=>{}},isPreview:{type:Boolean,default:!0}},emits:["update:modelValue","handleDelete","handleCopy","handlePaste"],setup(n,{emit:t}){const o=n;console.log("!!!!",o.modelValue);const a=t,i=e.ref(!1),s=e.ref(!1),l=()=>{a("handleDelete",o.modelValue.id)},r=()=>{a("handleCopy",o.modelValue)},u=m=>{a("handlePaste",m)},c=()=>{var d;if(o.modelValue&&o.modelValue.data&&o.modelValue.data.length)return;const m={id:((d=o.modelValue)==null?void 0:d.id)||R(),type:"ContactUsList",onlyShowPc:!1,columns:2,data:[{name:"New Contact",title:"title",region:"region",link:"*********@qq.com",id:R()},{name:"New Contact",title:"title",region:"region",link:"*********@qq.com",id:R()},{name:"New Contac",title:"title",region:"region",link:"*********@qq.com",id:R()}]};a("update:modelValue",m)},f=e.computed(()=>{var m;return o.isPreview?!((m=o.modelValue)!=null&&m.onlyShowPc)||!Ne():!0});return c(),(m,d)=>{var p;const h=e.resolveComponent("a-col"),g=e.resolveComponent("a-row");return e.openBlock(),e.createElementBlock(e.Fragment,null,[f.value?(e.openBlock(),e.createElementBlock("div",{key:0,style:e.normalizeStyle([{"margin-top":"30px","margin-bottom":"30px"},{backgroundColor:(p=n.modelValue)==null?void 0:p.bgColor}]),class:"contact_wrap",onMouseenter:d[2]||(d[2]=b=>i.value=!0),onMouseleave:d[3]||(d[3]=b=>i.value=!1)},[e.createElementVNode("div",H3,[e.createElementVNode("div",null,[e.createElementVNode("ul",j3,[e.createVNode(g,{style:{display:"flex"}},{default:e.withCtx(()=>{var b;return[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList((b=n.modelValue)==null?void 0:b.data,_=>{var w,v,V,C;return e.openBlock(),e.createBlock(h,{sm:{span:((w=n.modelValue)==null?void 0:w.columns)===2?12:24},md:{span:((v=n.modelValue)==null?void 0:v.columns)===2?12:24},lg:{span:((V=n.modelValue)==null?void 0:V.columns)===2?12:24},xl:{span:((C=n.modelValue)==null?void 0:C.columns)===2?12:24},style:{"margin-top":"16px"}},{default:e.withCtx(()=>[e.createElementVNode("li",z3,[e.createElementVNode("h6",q3,e.toDisplayString(_.name),1),e.createElementVNode("p",W3,e.toDisplayString(_.title),1),e.createElementVNode("div",G3,e.toDisplayString(_.region),1),e.createElementVNode("div",X3,[e.createElementVNode("div",Y3,[e.createElementVNode("a",{href:`mailto:${_.link}`,target:"_blank",class:"icon-link__wrapper"},[e.createElementVNode("span",{class:"icon-link__icon",style:e.normalizeStyle({"--icon-url":`url(${e.unref(Fc)})`})},null,4),e.createElementVNode("div",Q3,[e.createElementVNode("span",null,e.toDisplayString(_.link),1)])],8,K3)])])])]),_:2},1032,["sm","md","lg","xl"])}),256))]}),_:1})])])]),n.isPreview?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(Te,{key:0,show:i.value,"onUpdate:show":d[0]||(d[0]=b=>i.value=b),onHandleEdit:d[1]||(d[1]=b=>s.value=!0),onHandleDelete:l,onHandleCopy:r,onHandlePaste:u},null,8,["show"]))],36)):e.createCommentVNode("",!0),n.isPreview?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(F3,{key:1,show:s.value,"onUpdate:show":d[4]||(d[4]=b=>s.value=b),data:n.modelValue},null,8,["show","data"]))],64)}}}),Pd=ne(J3,[["__scopeId","data-v-465c018e"]]),Z3=Object.freeze(Object.defineProperty({__proto__:null,default:Pd},Symbol.toStringTag,{value:"Module"})),eP={class:"seting-box"},tP={class:"setting-header items-center"},nP={key:0},oP={class:"setting-header items-center"},aP={class:"draggable_box"},iP={class:"drag_top_box"},sP=["onClick"],lP={key:1},rP={class:"setting-header items-center"},dP={class:"draggable_box"},uP={class:"drag_top_box"},cP=["onClick"],mP=e.defineComponent({__name:"setting",props:{show:{type:Boolean,default:!1},data:{type:Object,default:()=>{}}},emits:["update:show"],setup(n,{emit:t}){const o=e.defineAsyncComponent(()=>import("vuedraggable")),a=e.computed(()=>({animation:200,group:"links",disabled:!1,ghostClass:"ghost",handle:".drag-handle",filter:".rich-text-editor, .arco-input, .arco-select, .arco-checkbox",preventOnFilter:!1})),i=e.ref(!1),s=n,l=e.ref(new Set),r=e.ref(new Set),u=w=>{r.value.has(w.id)?r.value.delete(w.id):r.value.add(w.id)},c=w=>{l.value.has(w.id)?l.value.delete(w.id):l.value.add(w.id)},f=w=>{s.data.headers=s.data.headers.filter(v=>v.id!==w)},m=w=>{s.data.rows=s.data.rows.filter(v=>v.id!==w)},d=()=>{s.data.rows.push({title:"请输入",first:"",second:"",third:"",forth:"",id:R()})},h=()=>{s.data.headers.push({title:"请输入",id:R()}),e.nextTick(()=>{const v=document.querySelector(".arco-drawer-body");v&&(v.scrollTop=v.scrollHeight)})},g=w=>l.value.has(w.id),p=w=>r.value.has(w.id),b=t,_=()=>{b("update:show",!1)};return(w,v)=>{const V=e.resolveComponent("a-switch"),C=e.resolveComponent("icon-drag-dot"),S=e.resolveComponent("icon-drag-arrow"),N=e.resolveComponent("icon-delete"),D=e.resolveComponent("a-input"),$=e.resolveComponent("icon-plus"),k=e.resolveComponent("a-button"),A=e.resolveComponent("a-drawer");return e.openBlock(),e.createBlock(A,{width:500,visible:n.show,footer:!1,onCancel:_,unmountOnClose:""},{title:e.withCtx(()=>{var B;return[e.createTextVNode(e.toDisplayString((B=n.data)==null?void 0:B.type)+"组件编辑 ",1)]}),default:e.withCtx(()=>[e.createElementVNode("div",eP,[e.createElementVNode("div",tP,[v[7]||(v[7]=e.createElementVNode("span",{class:"header-title"},"仅显示PC端",-1)),e.createVNode(V,{modelValue:n.data.onlyShowPc,"onUpdate:modelValue":v[0]||(v[0]=B=>n.data.onlyShowPc=B)},null,8,["modelValue"])]),v[16]||(v[16]=e.createElementVNode("div",{class:"part_title"},"表格头部",-1)),n.data.headers.length?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",nP,"暂无数据")),e.createElementVNode("div",oP,[e.createVNode(e.unref(o),e.mergeProps({modelValue:n.data.headers,"onUpdate:modelValue":v[1]||(v[1]=B=>n.data.headers=B),"component-data":{tag:"div",type:"transition-group",name:i.value?null:"flip-list"}},a.value,{disabled:!1,onStart:v[2]||(v[2]=B=>i.value=!0),onEnd:v[3]||(v[3]=B=>i.value=!1),"item-key":"id"}),{item:e.withCtx(({element:B})=>[e.createElementVNode("div",aP,[e.createElementVNode("div",iP,[e.createElementVNode("div",{onClick:I=>c(B)},[e.createVNode(C,{style:{"margin-right":"10px"}}),e.createTextVNode(e.toDisplayString(B.title),1)],8,sP),e.createElementVNode("div",null,[e.createVNode(S,{class:"icon_drag"}),e.createVNode(N,{class:"btn-delete",onClick:e.withModifiers(I=>f(B.id),["stop"])},null,8,["onClick"])])]),e.createVNode(e.Transition,{name:"collapse"},{default:e.withCtx(()=>[e.withDirectives(e.createElementVNode("div",null,[v[8]||(v[8]=e.createElementVNode("p",{class:"item-title",style:{"margin-top":"20px"}},"Title",-1)),e.createVNode(D,{modelValue:B.title,"onUpdate:modelValue":I=>B.title=I,placeholder:"请输入标题","allow-clear":""},null,8,["modelValue","onUpdate:modelValue"])],512),[[e.vShow,!g(B)]])]),_:2},1024)])]),_:1},16,["modelValue","component-data"])]),e.createVNode(k,{type:"primary",onClick:h},{icon:e.withCtx(()=>[e.createVNode($)]),default:e.withCtx(()=>[v[9]||(v[9]=e.createTextVNode(" 新增 ",-1))]),_:1}),v[17]||(v[17]=e.createElementVNode("div",{style:{"margin-top":"30px"},class:"part_title"},"表格行",-1)),n.data.rows.length?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",lP,"暂无数据")),e.createElementVNode("div",rP,[e.createVNode(e.unref(o),e.mergeProps({modelValue:n.data.rows,"onUpdate:modelValue":v[4]||(v[4]=B=>n.data.rows=B),"component-data":{tag:"div",type:"transition-group",name:i.value?null:"flip-list"}},a.value,{disabled:!1,onStart:v[5]||(v[5]=B=>i.value=!0),onEnd:v[6]||(v[6]=B=>i.value=!1),"item-key":"id"}),{item:e.withCtx(({element:B})=>[e.createElementVNode("div",dP,[e.createElementVNode("div",uP,[e.createElementVNode("div",{onClick:I=>u(B)},[e.createVNode(C,{style:{"margin-right":"10px"}}),e.createTextVNode(e.toDisplayString(B.title),1)],8,cP),e.createElementVNode("div",null,[e.createVNode(S,{class:"icon_drag"}),e.createVNode(N,{class:"btn-delete",onClick:e.withModifiers(I=>m(B.id),["stop"])},null,8,["onClick"])])]),e.createVNode(e.Transition,{name:"collapse"},{default:e.withCtx(()=>[e.withDirectives(e.createElementVNode("div",null,[v[10]||(v[10]=e.createElementVNode("p",{class:"item-title",style:{"margin-top":"20px"}},"Title",-1)),e.createVNode(D,{modelValue:B.title,"onUpdate:modelValue":I=>B.title=I,placeholder:"请输入","allow-clear":""},null,8,["modelValue","onUpdate:modelValue"]),v[11]||(v[11]=e.createElementVNode("p",{class:"item-title",style:{"margin-top":"20px"}},"First",-1)),e.createVNode(D,{modelValue:B.first,"onUpdate:modelValue":I=>B.first=I,placeholder:"请输入","allow-clear":""},null,8,["modelValue","onUpdate:modelValue"]),v[12]||(v[12]=e.createElementVNode("p",{class:"item-title",style:{"margin-top":"20px"}},"Second",-1)),e.createVNode(D,{modelValue:B.second,"onUpdate:modelValue":I=>B.second=I,placeholder:"请输入","allow-clear":""},null,8,["modelValue","onUpdate:modelValue"]),v[13]||(v[13]=e.createElementVNode("p",{class:"item-title",style:{"margin-top":"20px"}},"Third",-1)),e.createVNode(D,{modelValue:B.third,"onUpdate:modelValue":I=>B.third=I,placeholder:"请输入","allow-clear":""},null,8,["modelValue","onUpdate:modelValue"]),v[14]||(v[14]=e.createElementVNode("p",{class:"item-title",style:{"margin-top":"20px"}},"Forth",-1)),e.createVNode(D,{modelValue:B.forth,"onUpdate:modelValue":I=>B.forth=I,placeholder:"请输入","allow-clear":""},null,8,["modelValue","onUpdate:modelValue"])],512),[[e.vShow,!p(B)]])]),_:2},1024)])]),_:1},16,["modelValue","component-data"])]),e.createVNode(k,{type:"primary",onClick:d},{icon:e.withCtx(()=>[e.createVNode($)]),default:e.withCtx(()=>[v[15]||(v[15]=e.createTextVNode(" 新增 ",-1))]),_:1})])]),_:1},8,["visible"])}}}),pP=ne(mP,[["__scopeId","data-v-5746001f"]]),hP={class:"count-down"},fP={class:"table-two"},gP={class:"table-two__wrapper"},vP={class:"tableTwo"},yP={key:0,class:"tableTwo__th"},_P={key:0},bP={class:"tableTwo__row"},wP=e.defineComponent({name:"TableTwo",__name:"index",props:{modelValue:{type:Object,default:()=>{}},isPreview:{type:Boolean,default:!0}},emits:["update:modelValue","handleDelete","handleCopy","handlePaste"],setup(n,{emit:t}){const o=n;console.log("!!!!",o.modelValue);const a=t,i=e.ref(!1),s=e.ref(!1),l=()=>{a("handleDelete",o.modelValue.id)},r=()=>{a("handleCopy",o.modelValue)},u=m=>{a("handlePaste",m)},c=()=>{var d;if(o.modelValue&&o.modelValue.headers&&o.modelValue.headers.length)return;const m={id:((d=o.modelValue)==null?void 0:d.id)||R(),type:"TableTwo",onlyShowPc:!1,headers:[{title:"表头1"},{title:"表头2"},{title:"表头3"},{title:"表头4"},{title:"表头5"}],rows:[{title:"行1",first:"行1-1",second:"行1-2",third:"行1-3",forth:"行1-4"},{title:"行2",first:"行2-1",second:"行2-2",third:"行2-3",forth:"行2-4"}]};a("update:modelValue",m)},f=e.computed(()=>{var m;return o.isPreview?!((m=o.modelValue)!=null&&m.onlyShowPc)||!Ne():!0});return c(),(m,d)=>{var h;return e.openBlock(),e.createElementBlock(e.Fragment,null,[f.value?(e.openBlock(),e.createElementBlock("div",{key:0,style:e.normalizeStyle([{"margin-top":"30px","margin-bottom":"30px"},{backgroundColor:(h=n.modelValue)==null?void 0:h.bgColor}]),class:"table-two-container",onMouseenter:d[2]||(d[2]=g=>i.value=!0),onMouseleave:d[3]||(d[3]=g=>i.value=!1)},[e.createElementVNode("div",hP,[e.createElementVNode("div",fP,[e.createElementVNode("div",gP,[e.createElementVNode("table",vP,[e.createElementVNode("thead",null,[n.modelValue&&n.modelValue.headers&&n.modelValue.headers.length?(e.openBlock(),e.createElementBlock("tr",yP,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.modelValue.headers,g=>(e.openBlock(),e.createElementBlock("th",null,[e.createElementVNode("p",null,e.toDisplayString(g.title),1)]))),256))])):e.createCommentVNode("",!0)]),n.modelValue&&n.modelValue.rows&&n.modelValue.rows.length?(e.openBlock(),e.createElementBlock("tbody",_P,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.modelValue.rows,g=>(e.openBlock(),e.createElementBlock("tr",bP,[e.createElementVNode("td",null,e.toDisplayString(g.title),1),e.createElementVNode("td",null,e.toDisplayString(g.first),1),e.createElementVNode("td",null,e.toDisplayString(g.second),1),e.createElementVNode("td",null,e.toDisplayString(g.third),1),e.createElementVNode("td",null,e.toDisplayString(g.forth),1)]))),256))])):e.createCommentVNode("",!0)])])])]),n.isPreview?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(Te,{key:0,show:i.value,"onUpdate:show":d[0]||(d[0]=g=>i.value=g),onHandleEdit:d[1]||(d[1]=g=>s.value=!0),onHandleDelete:l,onHandleCopy:r,onHandlePaste:u},null,8,["show"]))],36)):e.createCommentVNode("",!0),n.isPreview?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(pP,{key:1,show:s.value,"onUpdate:show":d[4]||(d[4]=g=>s.value=g),data:n.modelValue},null,8,["show","data"]))],64)}}}),$d=ne(wP,[["__scopeId","data-v-c4d88197"]]),xP=Object.freeze(Object.defineProperty({__proto__:null,default:$d},Symbol.toStringTag,{value:"Module"})),VP={class:"seting-box"},CP={class:"setting-header flex items-center"},kP=["src"],EP={class:"item-uplaod flex items-center"},TP={key:2,class:"link-title-box"},NP={key:3},SP=e.defineComponent({__name:"setting",props:{show:{type:Boolean,default:!1},data:{type:Object,default:()=>{}}},emits:["update:show"],setup(n,{emit:t}){const o=t,a=e.ref(!1),i=()=>{o("update:show",!1)},s=()=>{a.value=!1},l=()=>{a.value=!a.value};return(r,u)=>{const c=e.resolveComponent("a-switch"),f=e.resolveComponent("a-input"),m=e.resolveComponent("a-divider"),d=e.resolveComponent("a-button"),h=e.resolveComponent("a-option"),g=e.resolveComponent("a-select"),p=e.resolveComponent("a-drawer");return e.openBlock(),e.createBlock(p,{width:500,visible:n.show,footer:!1,onCancel:i,unmountOnClose:""},{title:e.withCtx(()=>{var b;return[e.createTextVNode(e.toDisplayString((b=n.data)==null?void 0:b.type)+"组件编辑 ",1)]}),default:e.withCtx(()=>{var b,_;return[e.createElementVNode("div",VP,[e.createElementVNode("div",CP,[u[7]||(u[7]=e.createElementVNode("span",{class:"header-title"},"仅显示PC端",-1)),e.createVNode(c,{modelValue:n.data.onlyShowPc,"onUpdate:modelValue":u[0]||(u[0]=w=>n.data.onlyShowPc=w)},null,8,["modelValue"])]),u[16]||(u[16]=e.createElementVNode("p",{class:"item-title"},"标题",-1)),e.createVNode(f,{modelValue:n.data.title,"onUpdate:modelValue":u[1]||(u[1]=w=>n.data.title=w),placeholder:"请输入标题","allow-clear":""},null,8,["modelValue"]),u[17]||(u[17]=e.createElementVNode("p",{class:"item-title"},"图片",-1)),(b=n.data)!=null&&b.image?(e.openBlock(),e.createElementBlock("img",{key:0,class:"item-img",src:(_=n.data)==null?void 0:_.image},null,8,kP)):e.createCommentVNode("",!0),e.createElementVNode("div",EP,[e.createVNode(f,{modelValue:n.data.image,"onUpdate:modelValue":u[2]||(u[2]=w=>n.data.image=w),placeholder:"请输入图片链接","allow-clear":""},null,8,["modelValue"]),e.createVNode(ze,{modelValue:n.data.image,"onUpdate:modelValue":u[3]||(u[3]=w=>n.data.image=w),name:"BannerImageWithLink","button-class":"fit-content"},null,8,["modelValue"])]),e.createVNode(m,{class:"divider_box",type:"dashed",size:1}),a.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(d,{key:1,type:"outline",onClick:l},{default:e.withCtx(()=>[...u[8]||(u[8]=[e.createTextVNode("添加链接",-1)])]),_:1})),a.value?(e.openBlock(),e.createElementBlock("div",TP,[u[10]||(u[10]=e.createElementVNode("h4",null,"链接",-1)),e.createVNode(d,{type:"text",onClick:s},{default:e.withCtx(()=>[...u[9]||(u[9]=[e.createTextVNode("移除",-1)])]),_:1})])):e.createCommentVNode("",!0),a.value?(e.openBlock(),e.createElementBlock("div",NP,[u[13]||(u[13]=e.createElementVNode("p",{class:"item-title"},"文本",-1)),e.createVNode(f,{modelValue:n.data.text,"onUpdate:modelValue":u[4]||(u[4]=w=>n.data.text=w),placeholder:"请输入文本","allow-clear":""},null,8,["modelValue"]),u[14]||(u[14]=e.createElementVNode("p",{class:"item-title"},"链接类型",-1)),e.createVNode(g,{modelValue:n.data.linkType,"onUpdate:modelValue":u[5]||(u[5]=w=>n.data.linkType=w),placeholder:"请选择","allow-clear":""},{default:e.withCtx(()=>[e.createVNode(h,{value:"External Link"},{default:e.withCtx(()=>[...u[11]||(u[11]=[e.createTextVNode("外部链接",-1)])]),_:1}),e.createVNode(h,{value:"Internal Link"},{default:e.withCtx(()=>[...u[12]||(u[12]=[e.createTextVNode("内容链接",-1)])]),_:1})]),_:1},8,["modelValue"]),u[15]||(u[15]=e.createElementVNode("p",{class:"item-title"},"链接",-1)),e.createVNode(f,{modelValue:n.data.link,"onUpdate:modelValue":u[6]||(u[6]=w=>n.data.link=w),placeholder:"请输入链接","allow-clear":""},null,8,["modelValue"])])):e.createCommentVNode("",!0)])]}),_:1},8,["visible"])}}}),BP=ne(SP,[["__scopeId","data-v-29217e18"]]),DP={class:"banner-image-with-link"},PP={class:"banner-body"},$P={class:"banner-body__title"},AP={class:"banner-body__link"},LP={class:"circle-link circle-link--light"},IP=["href"],OP=e.defineComponent({name:"BannerImageWithLink",__name:"index",props:{modelValue:{type:Object,default:()=>{}},isPreview:{type:Boolean,default:!0}},emits:["update:modelValue","handleDelete","handleCopy","handlePaste","handleClick"],setup(n,{emit:t}){const o=n;console.log("!!!!",o.modelValue);const a=t,i=e.ref(!1),s=e.ref(!1),l=()=>{a("handleDelete",o.modelValue.id)},r=()=>{a("handleCopy",o.modelValue)},u=h=>{a("handlePaste",h)},c=h=>{a("handleClick",h)},f=()=>{var g;if(o.modelValue&&o.modelValue.image)return;const h={id:((g=o.modelValue)==null?void 0:g.id)||R(),type:"BannerImageWithLink",onlyShowPc:!1,title:"title",image:"https://osswebsite-test.cedim.cn/media-library/ywies-tx/pdf/TX%20Brochure%20Cover_optim_origin.png",text:"text",linkType:"External Link",link:"https://www.baidu.com"};a("update:modelValue",h),console.log("props.modelValue111111111",o.modelValue)},m=e.computed(()=>{var h;return o.isPreview?!((h=o.modelValue)!=null&&h.onlyShowPc)||!Ne():!0});f();const d=e.computed(()=>{var g;return(g=o.modelValue)!=null&&g.image?`url(${o.modelValue.image})`:"none"});return(h,g)=>{var p,b,_,w,v,V;return e.openBlock(),e.createElementBlock(e.Fragment,null,[m.value?(e.openBlock(),e.createElementBlock("div",{key:0,style:e.normalizeStyle([{"margin-top":"30px","margin-bottom":"30px"},{backgroundColor:(p=n.modelValue)==null?void 0:p.bgColor}]),class:"custom-iframe-container",onMouseenter:g[3]||(g[3]=C=>i.value=!0),onMouseleave:g[4]||(g[4]=C=>i.value=!1)},[e.createElementVNode("div",DP,[e.createElementVNode("div",{class:"banner-wrapper",style:e.normalizeStyle({"--bg-image":d.value})},[e.createElementVNode("div",PP,[e.createElementVNode("div",$P,e.toDisplayString(((b=n.modelValue)==null?void 0:b.title)||"title"),1),e.createElementVNode("div",AP,[e.createElementVNode("div",LP,[(_=n.modelValue)!=null&&_.link&&n.modelValue.link.includes("http")&&n.isPreview?(e.openBlock(),e.createElementBlock("a",{key:0,href:n.modelValue.link,target:"_blank"},[e.createElementVNode("div",null,e.toDisplayString(((w=n.modelValue)==null?void 0:w.text)||"bing-placholder"),1),g[6]||(g[6]=e.createElementVNode("span",{class:"circle-link__icon circle-link__icon--light"},null,-1))],8,IP)):(v=n.modelValue)!=null&&v.link?(e.openBlock(),e.createElementBlock("button",{key:1,onClick:g[0]||(g[0]=C=>c(n.modelValue.link))},[e.createElementVNode("div",null,e.toDisplayString(((V=n.modelValue)==null?void 0:V.text)||"bing-placholder"),1),g[7]||(g[7]=e.createElementVNode("span",{class:"circle-link__icon circle-link__icon--light"},null,-1))])):e.createCommentVNode("",!0)])])])],4)]),n.isPreview?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(Te,{key:0,show:i.value,"onUpdate:show":g[1]||(g[1]=C=>i.value=C),onHandleEdit:g[2]||(g[2]=C=>s.value=!0),onHandleDelete:l,onHandleCopy:r,onHandlePaste:u},null,8,["show"]))],36)):e.createCommentVNode("",!0),n.isPreview?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(BP,{key:1,show:s.value,"onUpdate:show":g[5]||(g[5]=C=>s.value=C),data:n.modelValue},null,8,["show","data"]))],64)}}}),Ad=ne(OP,[["__scopeId","data-v-d5e7a9f9"]]),MP=Object.freeze(Object.defineProperty({__proto__:null,default:Ad},Symbol.toStringTag,{value:"Module"})),UP={class:"seting-box"},RP={class:"setting-header flex items-center"},FP={key:0},HP={class:"setting-header items-center"},jP={class:"draggable_box"},zP={class:"drag_top_box"},qP=["onClick"],WP=["src"],GP={class:"item-uplaod flex items-center"},XP={key:1},YP={class:"draggable_link_box"},KP={class:"drag_link_top_box"},QP=["onClick"],JP={class:"link_item",style:{"margin-top":"20px"}},ZP={style:{width:"160px"}},e4=e.defineComponent({__name:"setting",props:{show:{type:Boolean,default:!1},data:{type:Object,default:()=>{}}},emits:["update:show"],setup(n,{emit:t}){var C;const o=e.defineAsyncComponent(()=>import("vuedraggable")),a=e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./index-QFpkZqlg.js"))),i=e.computed(()=>({animation:200,group:"links",disabled:!1,ghostClass:"ghost",handle:".drag-handle",filter:".rich-text-editor, .arco-input, .arco-select, .arco-checkbox",preventOnFilter:!1})),s=e.computed(()=>({animation:200,group:"linkItems",disabled:!1,ghostClass:"ghost",handle:".drag-handle, .drag_link_top_box",filter:".rich-text-editor, .arco-input, .arco-select, .arco-checkbox",preventOnFilter:!1})),l=e.ref(!1),r=e.ref(!1),u=n,c=e.ref(new Set);e.ref(new Set);const f=e.ref(new Set);(C=u.data)!=null&&C.list&&u.data.list.forEach(S=>{c.value.add(S.id)});const m=S=>{var N;c.value.has(S.id)?(c.value.clear(),(N=u.data)!=null&&N.list&&u.data.list.forEach(D=>{D.id!==S.id&&c.value.add(D.id)})):c.value.add(S.id)},d=S=>{u.data.list=u.data.list.filter(N=>N.id!==S)},h=()=>{console.log("props.data",u.data),u.data.list.push({id:R(),name:"名称",title:"标题",image:"",label:"",content:"",links:[]}),e.nextTick(()=>{if(typeof document<"u"){const N=document.querySelector(".arco-drawer-body");N&&(N.scrollTop=N.scrollHeight)}})},g=S=>c.value.has(S.id),p=t,b=()=>{p("update:show",!1)},_=S=>{f.value.has(S.id)?f.value.delete(S.id):f.value.add(S.id)},w=S=>f.value.has(S.id),v=S=>{const N=u.data.list.find(D=>D.id===S);N&&N.links.push({id:R(),text:"新链接",linkType:"Internal Link",url:""})},V=(S,N)=>{console.log("Deleting link:",S,"item:",N);const D=u.data.list.find($=>$.id===S);if(D&&D.links){console.log("Found link item with links:",D.links.length);const $=D.links.filter(k=>k.id!==N);console.log("Filtered links count:",$.length),D.links=$,console.log("Updated links successfully")}else console.log("Link item not found or no links array")};return(S,N)=>{const D=e.resolveComponent("a-switch"),$=e.resolveComponent("icon-drag-dot"),k=e.resolveComponent("icon-drag-arrow"),A=e.resolveComponent("icon-delete"),B=e.resolveComponent("a-input"),I=e.resolveComponent("a-option"),z=e.resolveComponent("a-select"),Y=e.resolveComponent("icon-plus"),H=e.resolveComponent("a-button"),q=e.resolveComponent("a-drawer");return e.openBlock(),e.createBlock(q,{width:500,visible:n.show,footer:!1,onCancel:b,unmountOnClose:""},{title:e.withCtx(()=>{var O;return[e.createTextVNode(e.toDisplayString((O=n.data)==null?void 0:O.type)+"组件编辑 ",1)]}),default:e.withCtx(()=>[e.createElementVNode("div",UP,[e.createElementVNode("div",RP,[N[6]||(N[6]=e.createElementVNode("span",{class:"header-title"},"仅显示PC端",-1)),e.createVNode(D,{modelValue:n.data.onlyShowPc,"onUpdate:modelValue":N[0]||(N[0]=O=>n.data.onlyShowPc=O)},null,8,["modelValue"])]),N[19]||(N[19]=e.createElementVNode("div",{class:"part_title"},"表格头部",-1)),n.data.list.length?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",FP,"暂无数据")),e.createElementVNode("div",HP,[e.createVNode(e.unref(o),e.mergeProps({modelValue:n.data.list,"onUpdate:modelValue":N[3]||(N[3]=O=>n.data.list=O),"component-data":{tag:"div",type:"transition-group",name:l.value?null:"flip-list"}},i.value,{disabled:!1,onStart:N[4]||(N[4]=O=>l.value=!0),onEnd:N[5]||(N[5]=O=>l.value=!1),"item-key":"id"}),{item:e.withCtx(({element:O})=>[e.createElementVNode("div",jP,[e.createElementVNode("div",zP,[e.createElementVNode("div",{class:"drag-handle",onClick:J=>m(O)},[e.createVNode($,{style:{"margin-right":"10px"}}),e.createTextVNode(e.toDisplayString(O.name),1)],8,qP),e.createElementVNode("div",null,[e.createVNode(k,{class:"icon_drag"}),e.createVNode(A,{class:"btn-delete",onClick:e.withModifiers(J=>d(O.id),["stop"])},null,8,["onClick"])])]),e.createVNode(e.Transition,{name:"collapse"},{default:e.withCtx(()=>[e.withDirectives(e.createElementVNode("div",null,[N[12]||(N[12]=e.createElementVNode("p",{class:"item-title",style:{"margin-top":"20px"}},"名称",-1)),e.createVNode(B,{modelValue:O.name,"onUpdate:modelValue":J=>O.name=J,placeholder:"请输入名称","allow-clear":""},null,8,["modelValue","onUpdate:modelValue"]),N[13]||(N[13]=e.createElementVNode("p",{class:"item-title",style:{"margin-top":"20px"}},"标题",-1)),e.createVNode(B,{modelValue:O.title,"onUpdate:modelValue":J=>O.title=J,placeholder:"请输入标题","allow-clear":""},null,8,["modelValue","onUpdate:modelValue"]),N[14]||(N[14]=e.createElementVNode("p",{class:"item-title"},"图片",-1)),O!=null&&O.image?(e.openBlock(),e.createElementBlock("img",{key:0,class:"item-img",src:O==null?void 0:O.image},null,8,WP)):e.createCommentVNode("",!0),e.createElementVNode("div",GP,[e.createVNode(B,{modelValue:O.image,"onUpdate:modelValue":J=>O.image=J,placeholder:"请输入图片链接","allow-clear":""},null,8,["modelValue","onUpdate:modelValue"]),e.createVNode(ze,{modelValue:O.image,"onUpdate:modelValue":J=>O.image=J,name:`ScrollKeyInfo_${O.id}`,"button-class":"fit-content"},null,8,["modelValue","onUpdate:modelValue","name"])]),N[15]||(N[15]=e.createElementVNode("p",{class:"item-title",style:{"margin-top":"20px"}},"标签",-1)),e.createVNode(B,{modelValue:O.label,"onUpdate:modelValue":J=>O.label=J,placeholder:"标签","allow-clear":""},null,8,["modelValue","onUpdate:modelValue"]),N[16]||(N[16]=e.createElementVNode("p",{class:"item-title",style:{"margin-top":"20px"}},"内容",-1)),e.createVNode(e.unref(a),{modelValue:O.content,"onUpdate:modelValue":J=>O.content=J,height:100,placeholder:"请输入内容",name:`ScrollKeyInfo_editor_${O.id}`},null,8,["modelValue","onUpdate:modelValue","name"]),N[17]||(N[17]=e.createElementVNode("p",{class:"item-title",style:{"margin-top":"20px"}},"链接",-1)),O.links.length?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",XP,"暂无数据")),e.createVNode(e.unref(o),e.mergeProps({modelValue:O.links,"onUpdate:modelValue":J=>O.links=J,"component-data":{tag:"div",type:"transition-group",name:r.value?null:"flip-list"}},s.value,{disabled:!1,onStart:N[1]||(N[1]=J=>r.value=!0),onEnd:N[2]||(N[2]=J=>r.value=!1),"item-key":"id"}),{item:e.withCtx(({element:J,index:F})=>[e.createElementVNode("div",YP,[e.createElementVNode("div",KP,[e.createElementVNode("div",{class:"drag-handle",onClick:M=>_(J)},[e.createVNode($,{style:{"margin-right":"10px"}}),N[7]||(N[7]=e.createTextVNode("链接 ",-1))],8,QP),e.createElementVNode("div",null,[e.createVNode(k,{class:"icon_drag"}),e.createVNode(A,{class:"btn-delete",onClick:e.withModifiers(M=>V(O.id,J.id),["stop"])},null,8,["onClick"])])]),e.createVNode(e.Transition,{name:"collapse"},{default:e.withCtx(()=>[e.withDirectives(e.createElementVNode("div",null,[N[10]||(N[10]=e.createElementVNode("p",{class:"link-title"},"链接文本",-1)),e.createVNode(B,{modelValue:J.text,"onUpdate:modelValue":M=>J.text=M,placeholder:"请输入文本"},null,8,["modelValue","onUpdate:modelValue"]),e.createElementVNode("div",JP,[e.createElementVNode("div",ZP,[e.createVNode(z,{modelValue:J.linkType,"onUpdate:modelValue":M=>J.linkType=M,placeholder:"请选择链接类型"},{default:e.withCtx(()=>[e.createVNode(I,{value:"Internal Link"},{default:e.withCtx(()=>[...N[8]||(N[8]=[e.createTextVNode("Internal Link",-1)])]),_:1}),e.createVNode(I,{value:"External Link"},{default:e.withCtx(()=>[...N[9]||(N[9]=[e.createTextVNode("External Link",-1)])]),_:1})]),_:1},8,["modelValue","onUpdate:modelValue"])]),e.createVNode(B,{modelValue:J.url,"onUpdate:modelValue":M=>J.url=M,placeholder:"请输入链接地址"},null,8,["modelValue","onUpdate:modelValue"])])],512),[[e.vShow,!w(J)]])]),_:2},1024)])]),_:2},1040,["modelValue","onUpdate:modelValue","component-data"]),e.createVNode(H,{style:{"margin-top":"20px"},size:"mini",type:"primary",onClick:J=>v(O.id)},{icon:e.withCtx(()=>[e.createVNode(Y)]),default:e.withCtx(()=>[N[11]||(N[11]=e.createTextVNode(" 链接 ",-1))]),_:1},8,["onClick"])],512),[[e.vShow,!g(O)]])]),_:2},1024)])]),_:1},16,["modelValue","component-data"])]),e.createVNode(H,{type:"primary",onClick:h},{icon:e.withCtx(()=>[e.createVNode(Y)]),default:e.withCtx(()=>[N[18]||(N[18]=e.createTextVNode(" 新增 ",-1))]),_:1})])]),_:1},8,["visible"])}}}),t4=ne(e4,[["__scopeId","data-v-0956da12"]]),n4={class:"scroll-key-info scrollkey_wrap"},o4={class:"scroll-key-info__wrapper"},a4={class:"middle_content_box"},i4={class:"content_wrap"},s4={class:"left_content"},l4={class:"title"},r4={class:"lable"},d4={class:"right_content"},u4={class:"top_content"},c4=["innerHTML"],m4={key:0,class:"bottom_content"},p4=["onClick"],h4={class:"a_text"},f4={class:"scroll-key-info__step-bar d-none d-md-block"},g4={class:"step-bar__wrapper container-content"},v4={class:"step-bar__list"},y4=["onClick"],_4={class:"step-bar__item__text"},b4={class:"mobile_wrap"},w4={class:"tab-primary__list"},x4=["onClick"],V4={class:"flex-center"},C4={class:"tab__content__card"},k4={class:"text-blue-dark"},E4={class:"tx-body-p text-teal-dark mt-1"},T4={class:"tab__content__card__content mt-3"},N4=["innerHTML"],S4={class:"tab__content__card__link mt-6"},B4={class:"circle-link"},D4=["onClick"],P4=["onClick"],$4=e.defineComponent({name:"ScrollKeyInfo",__name:"index",props:{modelValue:{type:Object,default:()=>({list:[]})},isPreview:{type:Boolean,default:!0}},emits:["update:modelValue","handleDelete","handleCopy","handlePaste","handleClick"],setup(n,{emit:t}){const o=n;console.log("!!!!",o.modelValue);const a=t,i=e.ref(!1),s=e.ref(!1),l=e.ref(0),r=e.ref(null),u=e.ref(0),c=e.ref(0),f=()=>{a("handleDelete",o.modelValue.id)},m=()=>{a("handleCopy",o.modelValue)},d=w=>{a("handlePaste",w)},h=w=>{a("handleClick",w)},g=()=>{var v;if(o.modelValue&&o.modelValue.list&&o.modelValue.list.length)return;const w={id:((v=o.modelValue)==null?void 0:v.id)||R(),type:"ScrollKeyInfo",onlyShowPc:!1,list:[{name:"幼儿教育",title:"幼儿教育课程",image:"https://osswebsite-test.cedim.cn/media-library/ywies-tx/pdf/TX%20Brochure%20Cover.png",label:"label",content:"耀华致力为孩子创造一个沉浸式双语学习的有利环境,透过教师与家长携手合作,培育新一代有自信、爱心及好奇心的幼龄学习者。早期教育强调儿童全人发展、塑造品格与个人及社会价值观,让孩子终身受益。",id:R(),links:[{id:R(),text:"了解更多",linkType:"Internal Link",url:"https://www.baidu.com"}]},{name:"小学部",title:"title",image:"https://osswebsite-test.cedim.cn/media-library/ywies-tx/pdf/TX%20Brochure%20Cover.png",label:"label",content:"耀华致力为孩子创造一个沉浸式双语学习的有利环境,透过教师与家长携手合作,培育新一代有自信、爱心及好奇心的幼龄学习者。早期教育强调儿童全人发展、塑造品格与个人及社会价值观,让孩子终身受益。",id:R(),links:[{id:R(),text:"了解更多",linkType:"Internal Link",url:"https://www.baidu.com"}]},{name:"中学部",title:"title",id:R(),image:"https://osswebsite-test.cedim.cn/media-library/ywies-tx/pdf/TX%20Brochure%20Cover.png",label:"label",content:"耀华致力为孩子创造一个沉浸式双语学习的有利环境,透过教师与家长携手合作,培育新一代有自信、爱心及好奇心的幼龄学习者。早期教育强调儿童全人发展、塑造品格与个人及社会价值观,让孩子终身受益。",links:[{text:"了解更多",linkType:"Internal Link",url:"https://www.baidu.com",id:R()}]}]};a("update:modelValue",w)},p=e.computed(()=>{var w;return o.isPreview?!((w=o.modelValue)!=null&&w.onlyShowPc)||!Ne():!0}),b=(w,v)=>{l.value=w,_(v)},_=w=>{var k;const v=w.currentTarget.querySelector(".tab-primary__btn"),V=v.offsetWidth,C=v.offsetLeft,S=u.value,N=c.value,D=(k=r==null?void 0:r.value)==null?void 0:k.querySelector(".tab-primary__strip");D.style.transition="none";const $=Math.abs(C-N)+Math.max(V,S);c.value=Math.min(N,C),u.value=$,D.offsetHeight,D.style.transition="left 0.25s ease-in-out, width 0.25s ease-in-out",setTimeout(()=>{c.value=C,u.value=V},260)};return e.onMounted(()=>{e.nextTick(()=>{var v,V;const w=(V=(v=r==null?void 0:r.value)==null?void 0:v.querySelectorAll(".tab-primary__item"))==null?void 0:V[0];if(w){const C=w.querySelector(".tab-primary__btn");C&&(u.value=C.offsetWidth,c.value=C.offsetLeft)}})}),g(),(w,v)=>{var V,C,S,N,D,$,k,A,B,I,z,Y,H,q,O;return e.openBlock(),e.createElementBlock(e.Fragment,null,[p.value?(e.openBlock(),e.createElementBlock("div",{key:0,style:e.normalizeStyle([{"margin-top":"30px","margin-bottom":"30px"},{backgroundColor:(V=n.modelValue)==null?void 0:V.bgColor}]),class:"scroll-key-info-container",onMouseenter:v[2]||(v[2]=J=>i.value=!0),onMouseleave:v[3]||(v[3]=J=>i.value=!1)},[e.createElementVNode("div",n4,[e.createElementVNode("div",o4,[e.createVNode(e.Transition,{name:"fade",mode:"out-in"},{default:e.withCtx(()=>{var J,F,M,Q,W,Z,de,Ve,oe,fe,Ce,Se,ae,ce,se,he,we,ke,te;return[(e.openBlock(),e.createElementBlock("div",{class:"pc_wrap",key:l.value,style:e.normalizeStyle({position:"relative",height:"100%",backgroundPosition:"50%",backgroundSize:"cover",backgroundRepeat:"no-repeat",backgroundImage:"linear-gradient(180deg, hsla(0, 0%, 100%, 0) 78.25%, #edeef1 83.46%),url("+((M=(F=(J=n.modelValue)==null?void 0:J.list)==null?void 0:F[l.value])==null?void 0:M.image)+")"})},[e.createElementVNode("div",a4,[e.createElementVNode("div",i4,[e.createElementVNode("div",s4,[e.createElementVNode("h5",l4,e.toDisplayString((Z=(W=(Q=n.modelValue)==null?void 0:Q.list)==null?void 0:W[l.value])==null?void 0:Z.title),1),e.createElementVNode("div",r4,e.toDisplayString((oe=(Ve=(de=n.modelValue)==null?void 0:de.list)==null?void 0:Ve[l.value])==null?void 0:oe.label),1)]),e.createElementVNode("div",d4,[e.createElementVNode("div",u4,[e.createElementVNode("div",{class:"content",innerHTML:(Se=(Ce=(fe=n.modelValue)==null?void 0:fe.list)==null?void 0:Ce[l.value])==null?void 0:Se.content},null,8,c4)]),(he=(se=(ce=(ae=n.modelValue)==null?void 0:ae.list)==null?void 0:ce[l.value])==null?void 0:se.links)!=null&&he.length?(e.openBlock(),e.createElementBlock("div",m4,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(((te=(ke=(we=n.modelValue)==null?void 0:we.list)==null?void 0:ke[l.value])==null?void 0:te.links)||[],ue=>(e.openBlock(),e.createElementBlock("div",{class:"bottom_item",key:ue},[e.createElementVNode("a",{class:"a_style",onClick:pe=>h(ue.url)},[e.createElementVNode("span",h4,e.toDisplayString(ue.text),1),v[5]||(v[5]=e.createElementVNode("span",{class:"circle-link__icon"},null,-1))],8,p4)]))),128))])):e.createCommentVNode("",!0)])])])],4))]}),_:1}),e.createElementVNode("div",f4,[e.createElementVNode("div",g4,[e.createElementVNode("ul",v4,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList((C=n.modelValue)==null?void 0:C.list,(J,F)=>(e.openBlock(),e.createElementBlock("li",{onClick:M=>b(F,M),class:e.normalizeClass(["step-bar__item",[l.value===F?"is-active":""]])},[e.createElementVNode("div",_4,e.toDisplayString(J.name),1)],10,y4))),256))])])])]),v[6]||(v[6]=e.createElementVNode("div",{class:"scroll-key-info__content"},[e.createElementVNode("div")],-1))]),e.createElementVNode("div",b4,[e.createVNode(e.Transition,{name:"fade",mode:"out-in"},{default:e.withCtx(()=>{var J,F,M;return[(e.openBlock(),e.createElementBlock("div",{class:"pc_wrap",key:l.value,style:e.normalizeStyle({position:"relative",height:"100%",backgroundPosition:"50%",backgroundSize:"cover",backgroundRepeat:"no-repeat",backgroundImage:"linear-gradient(180deg, hsla(0, 0%, 100%, 0) 78.25%, #edeef1 83.46%),url("+((M=(F=(J=n.modelValue)==null?void 0:J.list)==null?void 0:F[l.value])==null?void 0:M.image)+")"})},null,4))]}),_:1}),e.createElementVNode("div",{class:"tab-primary is-campus",ref_key:"tabContainer",ref:r},[e.createElementVNode("ul",w4,[v[7]||(v[7]=e.createElementVNode("div",{class:"tab-primary__nav__prev",style:{display:"none"}},null,-1)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(((S=n.modelValue)==null?void 0:S.list)||[],(J,F)=>(e.openBlock(),e.createElementBlock("li",{onClick:M=>b(F,M),class:"tab-primary__item"},[e.createElementVNode("div",V4,[e.createElementVNode("div",{class:e.normalizeClass(["tab-primary__btn",[l.value===F?"is-active":""]])},[e.createElementVNode("div",null,e.toDisplayString(J.name),1)],2)])],8,x4))),256)),v[8]||(v[8]=e.createElementVNode("div",{class:"tab-primary__nav__next",style:{display:"none"}},null,-1))]),e.createElementVNode("span",{class:"tab-primary__strip",style:e.normalizeStyle({"--strip-width":u.value+"px","--strip-left":c.value+"px","--fix-left":"0px"})},null,4)],512),e.createElementVNode("div",C4,[e.createElementVNode("h5",k4,e.toDisplayString(($=(D=(N=n.modelValue)==null?void 0:N.list)==null?void 0:D[l.value])==null?void 0:$.name),1),e.createElementVNode("div",E4,e.toDisplayString((B=(A=(k=n.modelValue)==null?void 0:k.list)==null?void 0:A[l.value])==null?void 0:B.label),1),e.createElementVNode("div",T4,[e.createElementVNode("p",{innerHTML:(Y=(z=(I=n.modelValue)==null?void 0:I.list)==null?void 0:z[l.value])==null?void 0:Y.content},null,8,N4)]),e.createElementVNode("div",S4,[e.createElementVNode("div",B4,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(((O=(q=(H=n.modelValue)==null?void 0:H.list)==null?void 0:q[l.value])==null?void 0:O.links)||[],J=>(e.openBlock(),e.createElementBlock("div",{key:J},[J.url&&J.url.includes("http")?(e.openBlock(),e.createElementBlock("a",{key:0,onClick:F=>h(J.url),class:"nuxt-link-active"},[e.createElementVNode("div",null,e.toDisplayString(J.text),1),v[9]||(v[9]=e.createElementVNode("span",{class:"circle-link__icon"},null,-1))],8,D4)):(e.openBlock(),e.createElementBlock("button",{onClick:F=>h(J.url),class:"nuxt-link-active",key:J},[e.createElementVNode("div",null,e.toDisplayString(J.text),1),v[10]||(v[10]=e.createElementVNode("span",{class:"circle-link__icon"},null,-1))],8,P4))]))),128))])])])]),n.isPreview?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(Te,{key:0,show:i.value,"onUpdate:show":v[0]||(v[0]=J=>i.value=J),onHandleEdit:v[1]||(v[1]=J=>s.value=!0),onHandleDelete:f,onHandleCopy:m,onHandlePaste:d},null,8,["show"]))],36)):e.createCommentVNode("",!0),n.isPreview?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(t4,{key:1,show:s.value,"onUpdate:show":v[4]||(v[4]=J=>s.value=J),data:n.modelValue},null,8,["show","data"]))],64)}}}),Ld=ne($4,[["__scopeId","data-v-a112fd33"]]),A4=Object.freeze(Object.defineProperty({__proto__:null,default:Ld},Symbol.toStringTag,{value:"Module"})),L4={class:"seting-box"},I4={class:"setting-header items-center"},O4=["src"],M4={class:"item-uplaod flex items-center"},U4={key:0},R4=e.defineComponent({__name:"setting",props:{show:{type:Boolean,default:!1},data:{type:Object,default:()=>{}}},emits:["update:show"],setup(n,{emit:t}){const o=n,a=e.ref([]),i=t,s=()=>{i("update:show",!1)},l=u=>{a.value=a.value.filter(c=>c!==o.data.linkList[u].type),o.data.linkList.splice(u,1)},r=u=>{a.value.includes(u)||(a.value.push(u),o.data.linkList.push({type:u,text:"",url:"",linkType:"textOnly"}))};return(u,c)=>{const f=e.resolveComponent("a-switch"),m=e.resolveComponent("a-option"),d=e.resolveComponent("a-select"),h=e.resolveComponent("a-input"),g=e.resolveComponent("a-button"),p=e.resolveComponent("a-button-group"),b=e.resolveComponent("icon-close"),_=e.resolveComponent("a-collapse-item"),w=e.resolveComponent("a-collapse"),v=e.resolveComponent("a-drawer");return e.openBlock(),e.createBlock(v,{width:600,visible:n.show,footer:!1,onCancel:s,unmountOnClose:""},{title:e.withCtx(()=>{var V;return[e.createTextVNode(e.toDisplayString((V=n.data)==null?void 0:V.type)+"组件编辑 ",1)]}),default:e.withCtx(()=>[e.createElementVNode("div",L4,[e.createElementVNode("div",I4,[c[12]||(c[12]=e.createElementVNode("span",{class:"header-title"},"仅显示PC端",-1)),e.createVNode(f,{modelValue:n.data.onlyShowPc,"onUpdate:modelValue":c[0]||(c[0]=V=>n.data.onlyShowPc=V)},null,8,["modelValue"])]),c[30]||(c[30]=e.createElementVNode("p",{class:"item-title"},"内容宽度",-1)),e.createVNode(d,{style:{width:"320px",background:"#ffffff"},modelValue:n.data.width,"onUpdate:modelValue":c[1]||(c[1]=V=>n.data.width=V),placeholder:"Please select ..."},{default:e.withCtx(()=>[e.createVNode(m,{value:800},{default:e.withCtx(()=>[...c[13]||(c[13]=[e.createTextVNode("Small Width",-1)])]),_:1}),e.createVNode(m,{value:952},{default:e.withCtx(()=>[...c[14]||(c[14]=[e.createTextVNode("Default Width",-1)])]),_:1}),e.createVNode(m,{value:1208},{default:e.withCtx(()=>[...c[15]||(c[15]=[e.createTextVNode("Middle Width",-1)])]),_:1}),e.createVNode(m,{value:1920},{default:e.withCtx(()=>[...c[16]||(c[16]=[e.createTextVNode("Max Width",-1)])]),_:1})]),_:1},8,["modelValue"]),c[31]||(c[31]=e.createElementVNode("p",{class:"item-title"},"标题",-1)),e.createVNode(h,{modelValue:n.data.title,"onUpdate:modelValue":c[2]||(c[2]=V=>n.data.title=V),placeholder:"请输入标题","allow-clear":""},null,8,["modelValue"]),c[32]||(c[32]=e.createElementVNode("p",{class:"item-title"},"图片",-1)),e.createElementVNode("img",{class:"item-img",src:n.data.image},null,8,O4),e.createElementVNode("div",M4,[e.createVNode(h,{modelValue:n.data.image,"onUpdate:modelValue":c[3]||(c[3]=V=>n.data.image=V),placeholder:"请输入图片链接","allow-clear":""},null,8,["modelValue"]),e.createVNode(ze,{modelValue:n.data.image,"onUpdate:modelValue":c[4]||(c[4]=V=>n.data.image=V),name:"ContactUsInfo","button-class":"fit-content"},null,8,["modelValue"])]),c[33]||(c[33]=e.createElementVNode("p",{class:"item-title"},"Image Alt",-1)),e.createVNode(h,{modelValue:n.data.imageAlt,"onUpdate:modelValue":c[5]||(c[5]=V=>n.data.imageAlt=V),placeholder:"请输入标题","allow-clear":""},null,8,["modelValue"]),c[34]||(c[34]=e.createElementVNode("p",{class:"item-title"}," Add Contact Method (This order will not be reflected on page.) ",-1)),e.createVNode(p,{type:"primary"},{default:e.withCtx(()=>[a.value.includes("pin")?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(g,{key:0,onClick:c[6]||(c[6]=V=>r("pin"))},{default:e.withCtx(()=>[...c[17]||(c[17]=[e.createTextVNode(" Address ",-1)])]),_:1})),a.value.includes("googleMap")?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(g,{key:1,onClick:c[7]||(c[7]=V=>r("googleMap"))},{default:e.withCtx(()=>[...c[18]||(c[18]=[e.createTextVNode(" Google Map ",-1)])]),_:1})),a.value.includes("baiduMap")?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(g,{key:2,onClick:c[8]||(c[8]=V=>r("baiduMap"))},{default:e.withCtx(()=>[...c[19]||(c[19]=[e.createTextVNode(" Baidu Map ",-1)])]),_:1})),a.value.includes("email")?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(g,{key:3,onClick:c[9]||(c[9]=V=>r("email"))},{default:e.withCtx(()=>[...c[20]||(c[20]=[e.createTextVNode(" Email ",-1)])]),_:1})),a.value.includes("phone")?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(g,{key:4,onClick:c[10]||(c[10]=V=>r("phone"))},{default:e.withCtx(()=>[...c[21]||(c[21]=[e.createTextVNode(" Phone ",-1)])]),_:1})),a.value.includes("fax")?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(g,{key:5,onClick:c[11]||(c[11]=V=>r("fax"))},{default:e.withCtx(()=>[...c[22]||(c[22]=[e.createTextVNode(" Fax ",-1)])]),_:1}))]),_:1}),e.createElementVNode("div",null,[e.createVNode(w,null,{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.data.linkList,(V,C)=>(e.openBlock(),e.createBlock(_,{header:V.type,key:C},{"expand-icon":e.withCtx(()=>[...c[23]||(c[23]=[])]),extra:e.withCtx(()=>[e.createVNode(b,{onClick:e.withModifiers(()=>l(C),["stop"])},null,8,["onClick"])]),default:e.withCtx(()=>[a.value.includes(V.type)?(e.openBlock(),e.createElementBlock("div",U4,[c[27]||(c[27]=e.createElementVNode("p",null,"Text",-1)),e.createVNode(h,{modelValue:V.text,"onUpdate:modelValue":S=>V.text=S,placeholder:"请输入内容","allow-clear":""},null,8,["modelValue","onUpdate:modelValue"]),c[28]||(c[28]=e.createElementVNode("p",{class:"item-title"},"Link Type",-1)),e.createVNode(d,{style:{width:"320px",background:"#ffffff"},modelValue:V.linkType,"onUpdate:modelValue":S=>V.linkType=S,placeholder:"Please select ..."},{default:e.withCtx(()=>[e.createVNode(m,{value:"internalLink"},{default:e.withCtx(()=>[...c[24]||(c[24]=[e.createTextVNode("Internal Link",-1)])]),_:1}),e.createVNode(m,{value:"externalLink"},{default:e.withCtx(()=>[...c[25]||(c[25]=[e.createTextVNode("External Link",-1)])]),_:1}),e.createVNode(m,{value:"textOnly"},{default:e.withCtx(()=>[...c[26]||(c[26]=[e.createTextVNode("Text-only",-1)])]),_:1})]),_:1},8,["modelValue","onUpdate:modelValue"]),c[29]||(c[29]=e.createElementVNode("p",{class:"item-title"},"Url",-1)),e.createVNode(h,{modelValue:V.url,"onUpdate:modelValue":S=>V.url=S,"allow-clear":""},null,8,["modelValue","onUpdate:modelValue"])])):e.createCommentVNode("",!0)]),_:2},1032,["header"]))),128))]),_:1})])])]),_:1},8,["visible"])}}}),F4=ne(R4,[["__scopeId","data-v-2a96813e"]]),jh="data:image/svg+xml,%3csvg%20width='25'%20height='24'%20viewBox='0%200%2025%2024'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M6.27916%2012.5392C8.45404%2012.0722%208.1578%209.47241%208.09244%208.90418C7.98596%208.02917%206.95597%206.49842%205.557%206.61966C3.79643%206.77779%203.54025%209.31955%203.54025%209.31955C3.302%2010.495%204.10954%2013.0062%206.27916%2012.5392ZM8.58793%2017.0597C8.52467%2017.2421%208.38235%2017.7091%208.5057%2018.1161C8.74817%2019.029%209.54096%2019.0702%209.54096%2019.0702H10.6795V16.287H9.45978C8.91158%2016.4493%208.64802%2016.8763%208.58793%2017.0597ZM10.3148%208.18098C11.5166%208.18098%2012.4865%206.79782%2012.4865%205.08891C12.4865%203.38105%2011.5166%202%2010.3148%202C9.1161%202%208.14304%203.38105%208.14304%205.08891C8.14304%206.79782%209.1161%208.18098%2010.3148%208.18098ZM15.4889%208.38444C17.0935%208.59318%2018.1256%206.88005%2018.3312%205.58123C18.541%204.28453%2017.5046%202.77908%2016.3682%202.51974C15.2296%202.25829%2013.8074%204.08317%2013.6778%205.27129C13.5228%206.72613%2013.8855%208.17887%2015.4889%208.38444ZM15.4889%2012.0194C13.5228%208.95689%2010.7312%2010.203%209.79608%2011.7612C8.8673%2013.3183%207.41773%2014.3019%207.21215%2014.5633C7.00341%2014.8205%204.2118%2016.327%204.83169%2019.0797C5.45053%2021.8301%207.62752%2021.7785%207.62752%2021.7785C7.62752%2021.7785%209.23101%2021.9366%2011.0917%2021.5191C12.9535%2021.1069%2014.5559%2021.6225%2014.5559%2021.6225C14.5559%2021.6225%2018.9047%2023.0773%2020.0938%2020.2752C21.283%2017.4709%2019.4223%2016.0182%2019.4223%2016.0182C19.4223%2016.0182%2016.9385%2014.0963%2015.4879%2012.0194H15.4889ZM9.15511%2020.1898C7.9343%2019.9462%207.4483%2019.1134%207.38716%2018.9711C7.32706%2018.8266%206.98022%2018.1572%207.16366%2017.0176C7.69077%2015.3108%209.19517%2015.1885%209.19517%2015.1885H10.7006V13.3383L11.9815%2013.3594V20.1898H9.15616H9.15511ZM13.994%2020.1697C12.7332%2019.845%2012.6752%2018.9489%2012.6752%2018.9489V15.3519L13.994%2015.3308V18.5631C14.0752%2018.9089%2014.5032%2018.9711%2014.5032%2018.9711H15.8432V15.3519H17.2474V20.1697H13.994ZM21.8523%2010.5657C21.8523%209.94366%2021.3357%208.07344%2019.4223%208.07344C17.5046%208.07344%2017.2485%209.83929%2017.2485%2011.0875C17.2485%2012.2788%2017.3486%2013.9413%2019.7301%2013.8886C22.1127%2013.8359%2021.8523%2011.1898%2021.8523%2010.5657Z'%20fill='%230048E8'/%3e%3c/svg%3e",zh="data:image/svg+xml,%3csvg%20width='23'%20height='24'%20viewBox='0%200%2023%2024'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M17.3826%206C18.3745%208.17%2018.1486%2010.73%2017.0585%2012.81C16.1353%2014.5%2014.8094%2015.93%2013.6799%2017.5C13.1888%2018.2%2012.6978%2018.95%2012.3344%2019.76C12.2067%2020.03%2012.1183%2020.31%2012.0201%2020.59C11.9219%2020.87%2011.8335%2021.15%2011.7451%2021.43C11.6567%2021.69%2011.5486%2022%2011.2245%2022C10.8415%2022%2010.7335%2021.56%2010.6549%2021.26C10.4192%2020.53%2010.1835%2019.83%209.82008%2019.16C9.40758%2018.37%208.88704%2017.64%208.35668%2016.93L17.3826%206ZM8.39597%208.42L5.1549%2012.34C5.75401%2013.63%206.64775%2014.73%207.50222%2015.83C7.70847%2016.08%207.91472%2016.34%208.11115%2016.61L12.2067%2011.67L12.1674%2011.68C10.7335%2012.18%209.1424%2011.44%208.57276%2010C8.49418%209.83%208.43525%209.63%208.39597%209.43C8.34193%209.09894%208.34193%208.76106%208.39597%208.43V8.42ZM5.90133%204.62L5.89151%204.63C4.30043%206.68%204.02543%209.53%204.97811%2011.94L8.89686%207.2L8.84775%207.15L5.90133%204.62ZM13.4049%202.36L10.2424%206.17L10.2817%206.16C11.5978%205.7%2013.071%206.28%2013.7388%207.5C13.8861%207.78%2014.004%208.08%2014.0433%208.38C14.1022%208.76%2014.1219%209.03%2014.0531%209.4V9.41L17.196%205.61C16.3744%204.08939%2015.0266%202.93445%2013.4147%202.37L13.4049%202.36ZM9.15222%206.89L12.9924%202.24L12.9531%202.23C12.3835%202.08%2011.804%202%2011.2245%202C9.28972%202%207.46293%202.85%206.1665%204.31L6.14686%204.32L9.15222%206.89Z'%20fill='%23001E60'/%3e%3cg%20clip-path='url(%23clip0_1307_138886)'%3e%3cpath%20d='M8.32617%2016.8164C8.90147%2017.5536%209.42506%2018.33%209.89316%2019.1402C10.2928%2019.9022%2010.4595%2020.4189%2010.7515%2021.337C10.9307%2021.8442%2011.0926%2021.9956%2011.4406%2021.9956C11.8199%2021.9956%2011.992%2021.7381%2012.125%2021.3397C12.4011%2020.4727%2012.6177%2019.811%2012.9595%2019.1858C13.6302%2017.9787%2014.4636%2016.9061%2015.2824%2015.8752C15.5041%2015.5834%2016.9374%2013.8836%2017.5827%2012.5424C17.5827%2012.5424%2018.3757%2011.0691%2018.3757%209.01152C18.3757%207.08683%2017.5936%205.75195%2017.5936%205.75195L15.3418%206.35827L13.9744%209.97958L13.636%2010.4789L13.5684%2010.5694L13.4784%2010.6826L13.3205%2010.8635L13.0948%2011.0904L11.8771%2012.0879L8.83262%2013.8553L8.32617%2016.8164Z'%20fill='%2334A853'/%3e%3cpath%20d='M5.18359%2012.2931C5.92663%2013.9995%207.35947%2015.4996%208.32891%2016.816L13.478%2010.6833C13.478%2010.6833%2012.7526%2011.6372%2011.4367%2011.6372C9.97096%2011.6372%208.78685%2010.4604%208.78685%208.97644C8.78685%207.95884%209.39573%207.25977%209.39573%207.25977L5.9004%208.20146L5.18359%2012.293V12.2931Z'%20fill='%23FBBC04'/%3e%3cpath%20d='M13.5353%202.31451C15.2454%202.86889%2016.7092%204.03276%2017.5945%205.749L13.4794%2010.6797C13.4794%2010.6797%2014.0882%209.96797%2014.0882%208.95669C14.0882%207.43821%2012.8165%206.30383%2011.4427%206.30383C10.1436%206.30383%209.39746%207.25614%209.39746%207.25614V4.14988L13.5353%202.31445V2.31451Z'%20fill='%234285F4'/%3e%3cpath%20d='M6.12695%204.49401C7.14836%203.26529%208.94565%202%2011.4235%202C12.6257%202%2013.5313%202.31733%2013.5313%202.31733L9.39389%207.25973H6.46245L6.12695%204.49406V4.49401Z'%20fill='%231A73E8'/%3e%3cpath%20d='M5.18358%2012.294C5.18358%2012.294%204.5%2010.948%204.5%208.99817C4.5%207.15528%205.21252%205.54438%206.12683%204.49414L9.3961%207.26029L5.18358%2012.294Z'%20fill='%23EA4335'/%3e%3c/g%3e%3cdefs%3e%3cclipPath%20id='clip0_1307_138886'%3e%3crect%20width='13.8753'%20height='20'%20fill='white'%20transform='translate(4.5%202)'/%3e%3c/clipPath%3e%3c/defs%3e%3c/svg%3e",qh="data:image/svg+xml,%3csvg%20width='25'%20height='24'%20viewBox='0%200%2025%2024'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M4.72757%206.13843L6.9432%203.92483C7.0995%203.76785%207.28527%203.64329%207.48984%203.55832C7.69442%203.47335%207.91376%203.42963%208.13528%203.42969C8.58673%203.42969%209.01113%203.60653%209.32944%203.92483L11.7136%206.30902C11.8706%206.46532%2011.9951%206.65109%2012.0801%206.85567C12.1651%207.06024%2012.2088%207.27959%2012.2087%207.50112C12.2087%207.95257%2012.0319%208.37698%2011.7136%208.69529L9.97021%2010.4387C10.3783%2011.3382%2010.9457%2012.1565%2011.6449%2012.8541C12.3425%2013.5551%2013.1607%2014.1245%2014.0603%2014.5351L15.8037%2012.7917C15.96%2012.6347%2016.1457%2012.5101%2016.3503%2012.4252C16.5549%2012.3402%2016.7742%2012.2965%2016.9958%2012.2965C17.4472%2012.2965%2017.8716%2012.4734%2018.1899%2012.7917L20.5761%2015.1738C20.7333%2015.3304%2020.858%2015.5165%2020.943%2015.7214C21.0279%2015.9264%2021.0715%2016.1461%2021.0713%2016.368C21.0713%2016.8194%2020.8945%2017.2438%2020.5761%2017.5621L18.3647%2019.7737C17.857%2020.2834%2017.156%2020.5725%2016.4361%2020.5725C16.2843%2020.5725%2016.1386%2020.5601%2015.9951%2020.5351C13.1907%2020.0732%2010.4092%2018.5816%208.16441%2016.3388C5.92172%2014.0982%204.43215%2011.3187%203.96405%208.50597C3.82259%207.64675%204.1076%206.76256%204.72757%206.13843Z'%20fill='%230032A0'/%3e%3c/svg%3e",Wh="data:image/svg+xml,%3csvg%20width='24'%20height='24'%20viewBox='0%200%2024%2024'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M11%206H16V8H11V6ZM8%209V3H19V9C19.7956%209%2020.5587%209.31607%2021.1213%209.87868C21.6839%2010.4413%2022%2011.2044%2022%2012V18H19V21H8V18H7V9H8ZM10%205V9H17V5H10ZM10%2015V19H17V15H10ZM19%2011C18.7348%2011%2018.4804%2011.1054%2018.2929%2011.2929C18.1054%2011.4804%2018%2011.7348%2018%2012C18%2012.2652%2018.1054%2012.5196%2018.2929%2012.7071C18.4804%2012.8946%2018.7348%2013%2019%2013C19.2652%2013%2019.5196%2012.8946%2019.7071%2012.7071C19.8946%2012.5196%2020%2012.2652%2020%2012C20%2011.7348%2019.8946%2011.4804%2019.7071%2011.2929C19.5196%2011.1054%2019.2652%2011%2019%2011ZM4%209H5C5.26522%209%205.51957%209.10536%205.70711%209.29289C5.89464%209.48043%206%209.73478%206%2010V17C6%2017.2652%205.89464%2017.5196%205.70711%2017.7071C5.51957%2017.8946%205.26522%2018%205%2018H4C3.46957%2018%202.96086%2017.7893%202.58579%2017.4142C2.21071%2017.0391%202%2016.5304%202%2016V11C2%2010.4696%202.21071%209.96086%202.58579%209.58579C2.96086%209.21071%203.46957%209%204%209Z'%20fill='%230032A0'/%3e%3c/svg%3e",Gh="data:image/svg+xml,%3csvg%20width='25'%20height='24'%20viewBox='0%200%2025%2024'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M12.75%201C10.5628%201.00261%208.46586%201.87264%206.91925%203.41925C5.37264%204.96586%204.50261%207.06276%204.5%209.25C4.5%2016.3091%2012%2021.6411%2012.3193%2021.8645C12.4456%2021.9527%2012.5959%2022%2012.75%2022C12.9041%2022%2013.0544%2021.9527%2013.1807%2021.8645C13.5%2021.6411%2021%2016.3091%2021%209.25C20.9974%207.06276%2020.1274%204.96586%2018.5808%203.41925C17.0341%201.87264%2014.9372%201.00261%2012.75%201ZM12.7506%206.25028C13.3439%206.25028%2013.9239%206.42623%2014.4173%206.75587C14.9106%207.08552%2015.2951%207.55405%2015.5222%208.10223C15.7493%208.65041%2015.8087%209.25361%2015.6929%209.83555C15.5772%2010.4175%2015.2914%2010.952%2014.8719%2011.3716C14.4523%2011.7912%2013.9178%2012.0769%2013.3358%2012.1926C12.7539%2012.3084%2012.1507%2012.249%2011.6025%2012.0219C11.0543%2011.7949%2010.5858%2011.4103%2010.2562%2010.917C9.92651%2010.4236%209.75056%209.84363%209.75056%209.25028C9.75056%208.45463%2010.0666%207.69157%2010.6292%207.12896C11.1919%206.56635%2011.9549%206.25028%2012.7506%206.25028Z'%20fill='%230032A0'/%3e%3c/svg%3e",H4={class:"contact_us_img"},j4=["src","alt"],z4={class:"contact_us_content"},q4={class:"contact_us_title"},W4={class:"contact_us_content_wrap"},G4={style:{display:"flex"}},X4={key:0,style:{"margin-right":"24px"},class:"contact_us_content_item"},Y4=["src"],K4={style:{display:"flex"}},Q4={key:0,class:"contact_us_content_item"},J4=["src"],Z4={key:1,class:"contact_us_content_item last_content"},e$=["src"],t$={style:{display:"flex"}},n$={key:0,class:"contact_us_content_item"},o$=["src"],a$={key:1,class:"contact_us_content_item last_content"},i$=["src"],s$={key:0,class:"contact_us_content_item"},l$=["src"],r$={class:"contact_us_wrap_mobile"},d$={class:"contact_us_img"},u$=["src","alt"],c$={class:"content_mobile_detail"},m$={key:0,style:{"margin-right":"24px"},class:"contact_us_content_item"},p$=["src"],h$={key:1,class:"contact_us_content_item"},f$=["src"],g$={key:2,class:"contact_us_content_item"},v$=["src"],y$={key:3,class:"contact_us_content_item"},_$=["src"],b$={key:4,class:"contact_us_content_item"},w$=["src"],x$={key:5,class:"contact_us_content_item"},V$=["src"],C$=e.defineComponent({name:"ContactUsInfo",__name:"index",props:{modelValue:{type:Object,default:()=>{}},isPreview:{type:Boolean,default:!0}},emits:["update:modelValue","handleDelete","handleCopy","handlePaste","handleClick"],setup(n,{emit:t}){const o=e.ref({text:"",linkType:"",url:""}),a=e.ref({text:"",linkType:"",url:""}),i=e.ref({text:"",linkType:"",url:""}),s=e.ref({text:"",linkType:"",url:""}),l=e.ref({text:"",linkType:"",url:""}),r=e.ref({text:"",linkType:"",url:""}),u=n;console.log("!!!!",u.modelValue);const c=t,f=e.ref(!1),m=e.ref(!1),d=()=>{c("handleDelete",u.modelValue.id)},h=()=>{c("handleCopy",u.modelValue)},g=w=>{c("handlePaste",w)},p=(w,v)=>{v.linkType==="textOnly"||!u.isPreview||(w.includes("http")?typeof window<"u"&&typeof window<"u"&&window.open(w,"_blank"):c("handleClick",w))},b=()=>{var v;if(u.modelValue&&u.modelValue.image)return;const w={id:((v=u.modelValue)==null?void 0:v.id)||R(),type:"ContactUsInfo",onlyShowPc:!1,title:"title",width:1208,image:"https://osswebsite-test.cedim.cn/media-library/ywies-tx/images/high-school-test/home/different_1_optim.png",imageAlt:"",linkList:[]};c("update:modelValue",w)},_=e.computed(()=>{var w;return u.isPreview?!((w=u.modelValue)!=null&&w.onlyShowPc)||!Ne():!0});return e.watch(()=>u.modelValue,w=>{var v;console.log("modelValue 发生变化:",{新值:w,list:w==null?void 0:w.linkList}),(v=w==null?void 0:w.linkList)==null||v.forEach(V=>{V.type==="pin"&&(o.value.text=V.text,o.value.linkType=V.linkType,o.value.url=V.url,console.log("pin===========",o),console.log("item==========",V)),V.type==="googleMap"&&(a.value.text=V.text,a.value.linkType=V.linkType,a.value.url=V.url),V.type==="baiduMap"&&(i.value.text=V.text,i.value.linkType=V.linkType,i.value.url=V.url),V.type==="phone"&&(s.value.text=V.text,s.value.linkType=V.linkType,s.value.url=V.url),V.type==="fax"&&(l.value.text=V.text,l.value.linkType=V.linkType,l.value.url=V.url),V.type==="email"&&(r.value.text=V.text,r.value.linkType=V.linkType,r.value.url=V.url)})},{deep:!0,immediate:!0}),b(),(w,v)=>{var V,C,S,N,D,$,k,A,B,I,z,Y,H,q,O,J,F,M,Q;return e.openBlock(),e.createElementBlock(e.Fragment,null,[_.value?(e.openBlock(),e.createElementBlock("div",{key:0,style:{"margin-top":"30px","margin-bottom":"30px"},class:"contact-us-info-container",onMouseenter:v[14]||(v[14]=W=>f.value=!0),onMouseleave:v[15]||(v[15]=W=>f.value=!1)},[e.createElementVNode("div",{class:"contact_us_wrap",style:e.normalizeStyle({width:((V=n.modelValue)==null?void 0:V.width)+"px"})},[e.createElementVNode("div",H4,[e.createElementVNode("img",{src:(C=n.modelValue)==null?void 0:C.image,alt:(S=n.modelValue)==null?void 0:S.imageAlt},null,8,j4)]),e.createElementVNode("div",z4,[e.createElementVNode("h4",q4,e.toDisplayString((N=n.modelValue)==null?void 0:N.title),1),e.createElementVNode("div",W4,[e.createElementVNode("div",G4,[o.value.text?(e.openBlock(),e.createElementBlock("div",X4,[e.createElementVNode("img",{class:"icon_link_icon",src:e.unref(Gh),alt:""},null,8,Y4),e.createElementVNode("span",{onClick:v[0]||(v[0]=W=>{var Z;return p((Z=o.value)==null?void 0:Z.url,o.value)}),class:e.normalizeClass([o.value.linkType==="textOnly"?"item_text":"contact_us_content_item_text"])},e.toDisplayString((D=o.value)==null?void 0:D.text),3)])):e.createCommentVNode("",!0),e.createElementVNode("div",K4,[a.value.text?(e.openBlock(),e.createElementBlock("div",Q4,[e.createElementVNode("img",{class:"icon_link_icon",src:e.unref(zh),alt:""},null,8,J4),e.createElementVNode("span",{onClick:v[1]||(v[1]=W=>{var Z;return p((Z=a.value)==null?void 0:Z.url,a.value)}),class:e.normalizeClass([a.value.linkType==="textOnly"?"item_text":"contact_us_content_item_text"])},e.toDisplayString(($=a.value)==null?void 0:$.text),3)])):e.createCommentVNode("",!0),i.value.text?(e.openBlock(),e.createElementBlock("div",Z4,[e.createElementVNode("img",{class:"icon_link_icon",src:e.unref(jh),alt:""},null,8,e$),e.createElementVNode("span",{onClick:v[2]||(v[2]=W=>{var Z;return p((Z=i.value)==null?void 0:Z.url,i.value)}),class:e.normalizeClass([i.value.linkType==="textOnly"?"item_text":"contact_us_content_item_text"])},e.toDisplayString((k=i.value)==null?void 0:k.text),3)])):e.createCommentVNode("",!0)])]),e.createElementVNode("div",t$,[s.value.text?(e.openBlock(),e.createElementBlock("div",n$,[e.createElementVNode("img",{class:"icon_link_icon",src:e.unref(qh),alt:""},null,8,o$),e.createElementVNode("span",{onClick:v[3]||(v[3]=W=>{var Z;return p((Z=s.value)==null?void 0:Z.url,s.value)}),class:e.normalizeClass([s.value.linkType==="textOnly"?"item_text":"contact_us_content_item_text"])},e.toDisplayString((A=s.value)==null?void 0:A.text),3)])):e.createCommentVNode("",!0),l.value.text?(e.openBlock(),e.createElementBlock("div",a$,[e.createElementVNode("img",{class:"icon_link_icon",src:e.unref(Wh),alt:""},null,8,i$),e.createElementVNode("span",{onClick:v[4]||(v[4]=W=>{var Z;return p((Z=l.value)==null?void 0:Z.url,l.value)}),class:e.normalizeClass([l.value.linkType==="textOnly"?"item_text":"contact_us_content_item_text"])},e.toDisplayString((B=l.value)==null?void 0:B.text),3)])):e.createCommentVNode("",!0)]),r.value.text?(e.openBlock(),e.createElementBlock("div",s$,[e.createElementVNode("img",{class:"icon_link_icon",src:e.unref(Fc),alt:""},null,8,l$),e.createElementVNode("span",{onClick:v[5]||(v[5]=W=>{var Z;return p((Z=r.value)==null?void 0:Z.url,r.value)}),class:e.normalizeClass([r.value.linkType==="textOnly"?"item_text":"contact_us_content_item_text"])},e.toDisplayString((I=r.value)==null?void 0:I.text),3)])):e.createCommentVNode("",!0)])])],4),e.createElementVNode("div",r$,[e.createElementVNode("div",d$,[e.createElementVNode("img",{src:(z=n.modelValue)==null?void 0:z.image,alt:(Y=n.modelValue)==null?void 0:Y.imageAlt},null,8,u$)]),e.createElementVNode("div",c$,[e.createElementVNode("h4",null,e.toDisplayString((H=n.modelValue)==null?void 0:H.title),1),o.value.text?(e.openBlock(),e.createElementBlock("div",m$,[e.createElementVNode("img",{class:"icon_link_icon",src:e.unref(Gh),alt:""},null,8,p$),e.createElementVNode("span",{onClick:v[6]||(v[6]=W=>{var Z;return p((Z=o.value)==null?void 0:Z.url,o.value)}),class:e.normalizeClass([o.value.linkType==="textOnly"?"item_text":"contact_us_content_item_text"])},e.toDisplayString((q=o.value)==null?void 0:q.text),3)])):e.createCommentVNode("",!0),a.value.text?(e.openBlock(),e.createElementBlock("div",h$,[e.createElementVNode("img",{class:"icon_link_icon",src:e.unref(zh),alt:""},null,8,f$),e.createElementVNode("span",{onClick:v[7]||(v[7]=W=>{var Z;return p((Z=a.value)==null?void 0:Z.url,a.value)}),class:e.normalizeClass([a.value.linkType==="textOnly"?"item_text":"contact_us_content_item_text"])},e.toDisplayString((O=a.value)==null?void 0:O.text),3)])):e.createCommentVNode("",!0),i.value.text?(e.openBlock(),e.createElementBlock("div",g$,[e.createElementVNode("img",{class:"icon_link_icon",src:e.unref(jh),alt:""},null,8,v$),e.createElementVNode("span",{onClick:v[8]||(v[8]=W=>{var Z;return p((Z=i.value)==null?void 0:Z.url,i.value)}),class:e.normalizeClass([i.value.linkType==="textOnly"?"item_text":"contact_us_content_item_text"])},e.toDisplayString((J=i.value)==null?void 0:J.text),3)])):e.createCommentVNode("",!0),s.value.text?(e.openBlock(),e.createElementBlock("div",y$,[e.createElementVNode("img",{class:"icon_link_icon",src:e.unref(qh),alt:""},null,8,_$),e.createElementVNode("span",{onClick:v[9]||(v[9]=W=>{var Z;return p((Z=s.value)==null?void 0:Z.url,s.value)}),class:e.normalizeClass([s.value.linkType==="textOnly"?"item_text":"contact_us_content_item_text"])},e.toDisplayString((F=s.value)==null?void 0:F.text),3)])):e.createCommentVNode("",!0),l.value.text?(e.openBlock(),e.createElementBlock("div",b$,[e.createElementVNode("img",{class:"icon_link_icon",src:e.unref(Wh),alt:""},null,8,w$),e.createElementVNode("span",{onClick:v[10]||(v[10]=W=>{var Z;return p((Z=l.value)==null?void 0:Z.url,l.value)}),class:e.normalizeClass([l.value.linkType==="textOnly"?"item_text":"contact_us_content_item_text"])},e.toDisplayString((M=l.value)==null?void 0:M.text),3)])):e.createCommentVNode("",!0),r.value.text?(e.openBlock(),e.createElementBlock("div",x$,[e.createElementVNode("img",{class:"icon_link_icon",src:e.unref(Fc),alt:""},null,8,V$),e.createElementVNode("span",{onClick:v[11]||(v[11]=W=>{var Z;return p((Z=r.value)==null?void 0:Z.url,r.value)}),class:e.normalizeClass([r.value.linkType==="textOnly"?"item_text":"contact_us_content_item_text"])},e.toDisplayString((Q=r.value)==null?void 0:Q.text),3)])):e.createCommentVNode("",!0)])]),n.isPreview?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(Te,{key:0,show:f.value,"onUpdate:show":v[12]||(v[12]=W=>f.value=W),onHandleEdit:v[13]||(v[13]=W=>m.value=!0),onHandleDelete:d,onHandleCopy:h,onHandlePaste:g},null,8,["show"]))],32)):e.createCommentVNode("",!0),n.isPreview?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(F4,{key:1,show:m.value,"onUpdate:show":v[16]||(v[16]=W=>m.value=W),data:n.modelValue},null,8,["show","data"]))],64)}}}),Id=ne(C$,[["__scopeId","data-v-ba325466"]]),k$=Object.freeze(Object.defineProperty({__proto__:null,default:Id},Symbol.toStringTag,{value:"Module"})),E$={class:"pagination_wrap"},T$={class:"pagination"},N$={class:"pagination-list"},S$=["onClick"],B$=e.defineComponent({__name:"Pagination",props:{total:{type:Number,default:0},activePage:{type:Number,default:1}},emits:["update:activePage","page-change"],setup(n,{emit:t}){const o=n,a=t,i=e.computed(()=>{const u=[];for(let c=1;c<=o.total;c++)u.push(c);return u}),s=u=>{u!==o.activePage&&u>=1&&u<=o.total&&(console.log("页数========",u),a("page-change",u),console.log("当前页数========更新",o.activePage))},l=()=>{o.activePage>1&&s(o.activePage-1)},r=()=>{o.activePage<o.total&&s(o.activePage+1)};return(u,c)=>(e.openBlock(),e.createElementBlock("div",null,[e.createElementVNode("div",E$,[e.createElementVNode("div",T$,[e.createElementVNode("ul",N$,[e.createElementVNode("li",{class:e.normalizeClass(["page-arrow",{"page-arrow--disable":n.activePage<=1}]),onClick:l},[...c[0]||(c[0]=[e.createElementVNode("div",{class:"i page-arrow__left"},null,-1)])],2),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(i.value,f=>(e.openBlock(),e.createElementBlock("li",{key:f,class:e.normalizeClass(["page-item",{"page-item--active":f===n.activePage}]),onClick:m=>s(f)},e.toDisplayString(f),11,S$))),128)),e.createElementVNode("li",{class:e.normalizeClass(["page-arrow",{"page-arrow--disable":n.activePage>=n.total}]),onClick:r},[...c[1]||(c[1]=[e.createElementVNode("div",{class:"i page-arrow__right",style:{position:"relative"}},null,-1)])],2)])])])]))}}),D$=ne(B$,[["__scopeId","data-v-441aebe5"]]),P$={class:"seting-box"},$$={class:"setting-header flex items-center"},A$={class:"draggable_box"},L$={class:"drag_top_box"},I$=["onClick"],O$={class:"sub_draggable_box"},M$={class:"draggable_box"},U$={class:"drag_top_box"},R$=["onClick"],F$=["src"],H$={class:"item-uplaod flex items-center"},j$=["src"],z$={class:"item-uplaod flex items-center"},q$={key:0},W$=e.defineComponent({__name:"setting",props:{show:{type:Boolean,default:!1},data:{type:Object,default:()=>{}}},emits:["update:show"],setup(n,{emit:t}){const o=e.defineAsyncComponent(()=>import("vuedraggable")),a=e.computed(()=>({animation:200,group:"links",disabled:!1,ghostClass:"ghost",handle:".drag-handle",filter:".rich-text-editor, .arco-input, .arco-select, .arco-checkbox",preventOnFilter:!1})),i=e.computed(()=>({animation:200,group:"publications",disabled:!1,ghostClass:"ghost",handle:".drag-handle",filter:".rich-text-editor, .arco-input, .arco-select, .arco-checkbox",preventOnFilter:!1})),s=e.ref(!1),l=e.ref(!1),r=n,u=t,c=()=>{u("update:show",!1)},f=e.ref(new Set),m=e.ref(new Set),d=e.ref(!1);e.watch(()=>{var C,S;return(S=(C=r.data)==null?void 0:C.list)==null?void 0:S.sections},C=>{if(C&&Array.isArray(C)&&!d.value){d.value=!0;const S=C.map(D=>D.key);f.value=new Set(S);const N=[];C.forEach(D=>{D.publications&&Array.isArray(D.publications)&&D.publications.forEach($=>{$.id&&N.push($.id)})}),m.value=new Set(N)}},{immediate:!0,deep:!0});const h=()=>{r.data.list.sections.push({key:yr(),title:"new Section",text:"",button:"View all"})},g=C=>{const S={id:R(10),title:"new Publications",image:"",fileUrl:""},N=r.data.list.sections[C];N.publications||(N.publications=[]),N.publications.push(S)},p=C=>{if(!m.value.has(C.id))m.value.add(C.id);else{const S=[];r.data.list.sections.forEach(N=>{N.publications&&Array.isArray(N.publications)&&N.publications.forEach(D=>{D.id&&S.push(D.id)})}),m.value=new Set(S),m.value.delete(C.id)}},b=(C,S)=>{const N=r.data.list.sections.find(D=>D.key===S);N&&N.publications&&(N.publications=N.publications.filter(D=>D.id!==C))},_=C=>{if(!f.value.has(C.key))f.value.add(C.key);else{const S=[];r.data.list.sections.forEach(N=>{N.key&&S.push(N.key)}),f.value=new Set(S),f.value.delete(C.key)}},w=C=>{r.data.list.sections=r.data.list.sections.filter(S=>S.key!==C)},v=C=>f.value.has(C.key),V=C=>m.value.has(C.id);return(C,S)=>{const N=e.resolveComponent("a-switch"),D=e.resolveComponent("a-option"),$=e.resolveComponent("a-select"),k=e.resolveComponent("icon-drag-dot"),A=e.resolveComponent("icon-drag-arrow"),B=e.resolveComponent("icon-delete"),I=e.resolveComponent("a-input"),z=e.resolveComponent("a-button"),Y=e.resolveComponent("a-drawer");return e.openBlock(),e.createBlock(Y,{width:600,visible:n.show,footer:!1,onCancel:c,unmountOnClose:""},{title:e.withCtx(()=>{var H;return[e.createTextVNode(e.toDisplayString((H=n.data)==null?void 0:H.type)+"组件编辑 ",1)]}),default:e.withCtx(()=>[e.createElementVNode("div",P$,[e.createElementVNode("div",$$,[S[12]||(S[12]=e.createElementVNode("span",{class:"header-title"},"仅显示PC端",-1)),e.createVNode(N,{modelValue:n.data.onlyShowPc,"onUpdate:modelValue":S[0]||(S[0]=H=>n.data.onlyShowPc=H)},null,8,["modelValue"])]),S[30]||(S[30]=e.createElementVNode("p",{class:"item-title"},"内容宽度",-1)),e.createVNode($,{style:{width:"320px",background:"#ffffff"},modelValue:n.data.width,"onUpdate:modelValue":S[1]||(S[1]=H=>n.data.width=H),placeholder:"Please select ..."},{default:e.withCtx(()=>[e.createVNode(D,{value:800},{default:e.withCtx(()=>[...S[13]||(S[13]=[e.createTextVNode("Small Width",-1)])]),_:1}),e.createVNode(D,{value:952},{default:e.withCtx(()=>[...S[14]||(S[14]=[e.createTextVNode("Default Width",-1)])]),_:1}),e.createVNode(D,{value:1208},{default:e.withCtx(()=>[...S[15]||(S[15]=[e.createTextVNode("Middle Width",-1)])]),_:1}),e.createVNode(D,{value:1920},{default:e.withCtx(()=>[...S[16]||(S[16]=[e.createTextVNode("Max Width",-1)])]),_:1})]),_:1},8,["modelValue"]),S[31]||(S[31]=e.createElementVNode("p",{class:"item-title"},"背景色",-1)),e.createVNode($,{style:{width:"320px",background:"#ffffff"},modelValue:n.data.bgColor,"onUpdate:modelValue":S[2]||(S[2]=H=>n.data.bgColor=H),placeholder:"Please select ..."},{default:e.withCtx(()=>[e.createVNode(D,{value:"#ffffff"},{default:e.withCtx(()=>[...S[17]||(S[17]=[e.createTextVNode("White Background",-1)])]),_:1}),e.createVNode(D,{value:"#f8f9fa"},{default:e.withCtx(()=>[...S[18]||(S[18]=[e.createTextVNode("Grey Background",-1)])]),_:1})]),_:1},8,["modelValue"]),S[32]||(S[32]=e.createElementVNode("p",{class:"item-title"},"章节",-1)),e.createVNode(e.unref(o),e.mergeProps({modelValue:n.data.list.sections,"onUpdate:modelValue":S[9]||(S[9]=H=>n.data.list.sections=H),"component-data":{tag:"div",type:"transition-group",name:s.value?null:"flip-list"}},a.value,{disabled:!1,onStart:S[10]||(S[10]=H=>s.value=!0),onEnd:S[11]||(S[11]=H=>s.value=!1),"item-key":"key"}),{item:e.withCtx(({element:H,index:q})=>[e.createElementVNode("div",A$,[e.createElementVNode("div",L$,[e.createElementVNode("div",{onClick:O=>_(H)},[e.createVNode(k,{style:{"margin-right":"10px"}}),e.createTextVNode(e.toDisplayString(H.title),1)],8,I$),e.createElementVNode("div",null,[e.createVNode(A,{class:"icon_drag"}),e.createVNode(B,{class:"btn-delete",onClick:e.withModifiers(O=>w(H.key),["stop"])},null,8,["onClick"])])]),e.createVNode(e.Transition,{name:"collapse"},{default:e.withCtx(()=>[e.withDirectives(e.createElementVNode("div",null,[S[23]||(S[23]=e.createElementVNode("p",{class:"item-title",style:{"margin-top":"20px"}},"Key",-1)),e.createVNode(I,{style:{border:"1px solid #c0c0c0"},modelValue:H.key,"onUpdate:modelValue":O=>H.key=O,onClick:S[3]||(S[3]=e.withModifiers(()=>{},["stop"]))},null,8,["modelValue","onUpdate:modelValue"]),S[24]||(S[24]=e.createElementVNode("span",null,"Key must be formed by lower-case letters (a-z), numbers (0-9) and hyphens (-).",-1)),S[25]||(S[25]=e.createElementVNode("p",{class:"item-title",style:{"margin-top":"20px"}},"题目",-1)),e.createVNode(I,{style:{border:"1px solid #c0c0c0"},modelValue:H.title,"onUpdate:modelValue":O=>H.title=O,onClick:S[4]||(S[4]=e.withModifiers(()=>{},["stop"]))},null,8,["modelValue","onUpdate:modelValue"]),S[26]||(S[26]=e.createElementVNode("p",{class:"item-title",style:{"margin-top":"20px"}},"文本",-1)),e.createVNode(I,{style:{border:"1px solid #c0c0c0"},modelValue:H.text,"onUpdate:modelValue":O=>H.text=O,onClick:S[5]||(S[5]=e.withModifiers(()=>{},["stop"]))},null,8,["modelValue","onUpdate:modelValue"]),S[27]||(S[27]=e.createElementVNode("p",{class:"item-title",style:{"margin-top":"20px"}},"按钮",-1)),e.createVNode(I,{style:{border:"1px solid #c0c0c0"},modelValue:H.button,"onUpdate:modelValue":O=>H.button=O,onClick:S[6]||(S[6]=e.withModifiers(()=>{},["stop"]))},null,8,["modelValue","onUpdate:modelValue"]),S[28]||(S[28]=e.createElementVNode("p",{class:"item-title",style:{"margin-top":"20px"}},"Publications",-1)),e.createElementVNode("div",O$,[e.createVNode(e.unref(o),e.mergeProps({modelValue:H.publications,"onUpdate:modelValue":O=>H.publications=O,"component-data":{tag:"div",type:"transition-group",name:l.value?null:"flip-list"}},i.value,{disabled:!1,onStart:S[7]||(S[7]=O=>l.value=!0),onEnd:S[8]||(S[8]=O=>l.value=!1),"item-key":"id"}),{item:e.withCtx(({element:O})=>[e.createElementVNode("div",M$,[e.createElementVNode("div",U$,[e.createElementVNode("div",{onClick:e.withModifiers(J=>p(O),["stop"])},[e.createVNode(k,{style:{"margin-right":"10px"}}),e.createTextVNode(" "+e.toDisplayString(O.title),1)],8,R$),e.createElementVNode("div",null,[e.createVNode(A,{class:"icon_drag"}),e.createVNode(B,{class:"btn-delete",onClick:e.withModifiers(J=>b(O.id,H.key),["stop"])},null,8,["onClick"])])]),e.createVNode(e.Transition,{name:"collapse"},{default:e.withCtx(()=>[e.withDirectives(e.createElementVNode("div",null,[S[19]||(S[19]=e.createElementVNode("p",{class:"item-title",style:{"margin-top":"20px"}}," Title ",-1)),e.createVNode(I,{style:{border:"1px solid #f1eeee"},modelValue:O.title,"onUpdate:modelValue":J=>O.title=J},null,8,["modelValue","onUpdate:modelValue"]),S[20]||(S[20]=e.createElementVNode("p",{class:"item-title",style:{"margin-top":"20px"}}," 图片 ",-1)),e.createElementVNode("img",{class:"item-img",src:O.image},null,8,F$),e.createElementVNode("div",H$,[e.createVNode(I,{modelValue:O.image,"onUpdate:modelValue":J=>O.image=J,placeholder:"请输入图片链接","allow-clear":"",style:{border:"1px solid #c0c0c0"}},null,8,["modelValue","onUpdate:modelValue"]),e.createVNode(ze,{modelValue:O.image,"onUpdate:modelValue":J=>O.image=J,name:`Publications_${O.id}`,"button-class":"fit-content"},null,8,["modelValue","onUpdate:modelValue","name"])]),S[21]||(S[21]=e.createElementVNode("p",{class:"item-title",style:{"margin-top":"20px"}}," 文件链接 ",-1)),e.createElementVNode("img",{class:"item-img",src:O.fileUrl},null,8,j$),e.createElementVNode("div",z$,[e.createVNode(I,{modelValue:O.fileUrl,"onUpdate:modelValue":J=>O.fileUrl=J,placeholder:"请输入图片链接","allow-clear":"",style:{border:"1px solid #c0c0c0"}},null,8,["modelValue","onUpdate:modelValue"]),e.createVNode(ze,{modelValue:O.fileUrl,"onUpdate:modelValue":J=>O.fileUrl=J,name:`Publications_${O.id}`,"button-class":"fit-content"},null,8,["modelValue","onUpdate:modelValue","name"])])],512),[[e.vShow,!V(O)]])]),_:2},1024)])]),_:2},1040,["modelValue","onUpdate:modelValue","component-data"]),H.publications?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("p",q$,"No items found.")),e.createVNode(z,{style:{"margin-top":"10px","margin-left":"5px"},type:"primary",onClick:O=>g(q)},{default:e.withCtx(()=>[...S[22]||(S[22]=[e.createTextVNode("新增Publications",-1)])]),_:1},8,["onClick"])])],512),[[e.vShow,!v(H)]])]),_:2},1024)])]),_:1},16,["modelValue","component-data"]),e.createVNode(z,{style:{"margin-top":"10px","margin-left":"5px"},type:"primary",onClick:h},{default:e.withCtx(()=>[...S[29]||(S[29]=[e.createTextVNode("新增Section",-1)])]),_:1})])]),_:1},8,["visible"])}}}),G$=ne(W$,[["__scopeId","data-v-7658144a"]]),X$={class:"publications_box publications-bg-light"},Y$={class:"pub-main"},K$={style:{"font-size":"24px"},class:"publications-title-blue"},Q$={style:{"margin-top":"20px"},class:"pub_main_text"},J$={class:"publications-mt-medium publications-mt-medium-xlarge"},Z$=["data-aos-delay"],e5={class:"card-publication"},t5={class:"publication__head"},n5=["onClick"],o5=["src","alt"],a5={class:"publication__body"},i5=["onClick"],s5={class:"pub-sub",style:{"margin-top":"110px"}},l5={class:"pub-sublist__row row row-cols-md-2"},r5={class:"publications-title-blue"},d5={class:"pub-sub__text publications-mt-small"},u5={class:"publications-mt-small"},c5={class:"circle-link"},m5={class:"publications-mt-medium",style:{"margin-top":"40px"}},p5={key:0,class:"pub-subitem__row publications-grid publications-grid-2"},h5={class:"card-publication"},f5={class:"publication__head"},g5=["onClick"],v5=["src"],y5={class:"publication__body"},_5=["onClick"],b5=e.defineComponent({name:"Publications",__name:"index",props:{modelValue:{type:Object,default:()=>{}},isPreview:{type:Boolean,default:!0}},emits:["update:modelValue","handleDelete","handleCopy","handlePaste","handleClick"],setup(n,{emit:t}){const o=n;console.log("!!!!",o.modelValue);const a=t,i=w=>{a("handleClick",w)},s=(w,v)=>{const V=[];for(let C=0;C<w.length;C+=v)V.push(w.slice(C,C+v));return V},l=e.ref([]),r=e.ref([]),u=e.ref([]);e.watch(()=>o.modelValue,w=>{if(w&&w.list&&w.list.sections.length>0){l.value=w.list.sections[0];const v=s(l.value.publications,8);r.value=v,u.value=w.list.sections.slice(1),console.log("subMain.value",u.value)}},{immediate:!0,deep:!0});const c=e.ref(1),f=w=>{console.log("分页========",w),c.value=w},m=e.ref(!1),d=e.ref(!1),h=()=>{a("handleDelete",o.modelValue.id)},g=()=>{a("handleCopy",o.modelValue)},p=w=>{a("handlePaste",w)},b=()=>{var v;if(o.modelValue&&o.modelValue.list&&o.modelValue.list.sections.length)return;const w={id:((v=o.modelValue)==null?void 0:v.id)||R(),width:800,bgColor:"#f8f9fa",type:"Publications",onlyShowPc:!1,list:{sections:[{key:yr(),title:"title",text:"text",button:"view all",publications:[{id:R(),title:"pub-title1",image:"https://osswebsite-test.cedim.cn/ywies-tx/static-images/news/06_News_1_Header.jpg",fileUrl:"https://osswebsite-test.cedim.cn/ywies-tx/static-images/news/06_News_1_Header.jpg"},{id:R(),title:"pub-title1",image:"https://osswebsite-test.cedim.cn/ywies-tx/static-images/news/06_News_1_Header.jpg",fileUrl:"https://osswebsite-test.cedim.cn/ywies-tx/static-images/news/06_News_1_Header.jpg"},{id:R(),title:"pub-title1",image:"https://osswebsite-test.cedim.cn/ywies-tx/static-images/news/06_News_1_Header.jpg",fileUrl:"https://osswebsite-test.cedim.cn/ywies-tx/static-images/news/06_News_1_Header.jpg"},{id:R(),title:"pub-title1",image:"https://osswebsite-test.cedim.cn/ywies-tx/static-images/news/06_News_1_Header.jpg",fileUrl:"https://osswebsite-test.cedim.cn/ywies-tx/static-images/news/06_News_1_Header.jpg"},{id:R(),title:"pub-title1",image:"https://osswebsite-test.cedim.cn/ywies-tx/static-images/news/06_News_1_Header.jpg",fileUrl:"https://osswebsite-test.cedim.cn/ywies-tx/static-images/news/06_News_1_Header.jpg"},{id:R(),title:"pub-title1",image:"https://osswebsite-test.cedim.cn/ywies-tx/static-images/news/06_News_1_Header.jpg",fileUrl:"https://osswebsite-test.cedim.cn/ywies-tx/static-images/news/06_News_1_Header.jpg"},{id:R(),title:"pub-title1",image:"https://osswebsite-test.cedim.cn/ywies-tx/static-images/news/06_News_1_Header.jpg",fileUrl:"https://osswebsite-test.cedim.cn/ywies-tx/static-images/news/06_News_1_Header.jpg"},{id:R(),title:"pub-title1",image:"https://osswebsite-test.cedim.cn/ywies-tx/static-images/news/06_News_1_Header.jpg",fileUrl:"https://osswebsite-test.cedim.cn/ywies-tx/static-images/news/06_News_1_Header.jpg"},{id:R(),title:"pub-title1",image:"https://osswebsite-test.cedim.cn/ywies-tx/static-images/news/06_News_1_Header.jpg",fileUrl:"https://osswebsite-test.cedim.cn/ywies-tx/static-images/news/06_News_1_Header.jpg"},{id:R(),title:"pub-title1",image:"https://osswebsite-test.cedim.cn/ywies-tx/static-images/news/06_News_1_Header.jpg",fileUrl:"https://osswebsite-test.cedim.cn/ywies-tx/static-images/news/06_News_1_Header.jpg"}]},{key:yr(),title:"title",text:"text",button:"view all",publications:[{id:R(),title:"pub-title1",image:"https://osswebsite-test.cedim.cn/ywies-tx/static-images/news/06_News_1_Header.jpg",fileUrl:"https://osswebsite-test.cedim.cn/ywies-tx/static-images/news/06_News_1_Header.jpg"},{id:R(),title:"pub-title1",image:"https://osswebsite-test.cedim.cn/ywies-tx/static-images/news/06_News_1_Header.jpg",fileUrl:"https://osswebsite-test.cedim.cn/ywies-tx/static-images/news/06_News_1_Header.jpg"}]},{key:yr(),title:"title",text:"text",button:"view all",publications:[{id:R(),title:"pub-title1",image:"https://osswebsite-test.cedim.cn/ywies-tx/static-images/news/06_News_1_Header.jpg",fileUrl:"https://osswebsite-test.cedim.cn/ywies-tx/static-images/news/06_News_1_Header.jpg"},{id:R(),title:"pub-title1",image:"https://osswebsite-test.cedim.cn/ywies-tx/static-images/news/06_News_1_Header.jpg",fileUrl:"https://osswebsite-test.cedim.cn/ywies-tx/static-images/news/06_News_1_Header.jpg"}]}]}};a("update:modelValue",w)},_=e.computed(()=>{var w;return o.isPreview?!((w=o.modelValue)!=null&&w.onlyShowPc)||!Ne():!0});return b(),(w,v)=>{var V,C,S,N;return e.openBlock(),e.createElementBlock(e.Fragment,null,[_.value?(e.openBlock(),e.createElementBlock("div",{key:0,style:e.normalizeStyle([{"margin-top":"30px","margin-bottom":"30px"},{backgroundColor:(V=n.modelValue)==null?void 0:V.bgColor}]),class:"publications-container",onMouseenter:v[3]||(v[3]=D=>m.value=!0),onMouseleave:v[4]||(v[4]=D=>m.value=!1)},[e.createElementVNode("div",X$,[e.createElementVNode("div",{class:"publications__wrapper",style:e.normalizeStyle({maxWidth:((C=n.modelValue)==null?void 0:C.width)+"px"})},[e.createElementVNode("div",Y$,[e.createElementVNode("h4",K$,e.toDisplayString(l.value.title),1),e.createElementVNode("div",Q$,e.toDisplayString(l.value.text),1),e.createElementVNode("div",J$,[(N=(S=n.modelValue)==null?void 0:S.list)!=null&&N.sections?(e.openBlock(),e.createElementBlock("ul",{class:"publications-grid publications-grid-2 publications-grid-md-4",key:c.value},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(r.value[c.value-1],(D,$)=>(e.openBlock(),e.createElementBlock("li",{key:$,"data-aos":"fade-right","data-aos-duration":"1500","data-aos-delay":$*100,class:"publications-grid-item"},[e.createElementVNode("div",e5,[e.createElementVNode("div",t5,[e.createElementVNode("a",{onClick:k=>i(D.fileUrl),rel:"noopener noreferrer",class:"header_img",style:{cursor:"pointer"}},[e.createElementVNode("img",{src:D.image,alt:D.title},null,8,o5),v[6]||(v[6]=e.createElementVNode("div",{class:"publication__img__mask"},[e.createElementVNode("div",{class:"publication__img__mask__btn"},"阅读")],-1))],8,n5)]),e.createElementVNode("div",a5,[e.createElementVNode("a",{onClick:k=>i(D.fileUrl),rel:"noopener noreferrer",class:"publication__title publications-line-clamp-2",style:{"font-weight":"bold",cursor:"pointer"}},e.toDisplayString(D.title),9,i5)])])],8,Z$))),128))])):e.createCommentVNode("",!0)]),e.createVNode(D$,{total:r.value.length,activePage:c.value,onPageChange:f},null,8,["total","activePage"])]),e.createElementVNode("div",s5,[e.createElementVNode("ul",l5,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(u.value,D=>(e.openBlock(),e.createElementBlock("li",{key:D.key},[e.createElementVNode("h4",r5,e.toDisplayString(D.title),1),e.createElementVNode("div",d5,e.toDisplayString(D.text),1),e.createElementVNode("div",u5,[e.createElementVNode("div",c5,[e.createElementVNode("a",{style:{cursor:"pointer"},onClick:v[0]||(v[0]=$=>i(w.item.fileUrl))},[e.createElementVNode("div",null,e.toDisplayString(D.button),1),v[7]||(v[7]=e.createElementVNode("span",{class:"circle-link__icon"},null,-1))])])]),e.createElementVNode("div",m5,[D.publications&&D.publications.length?(e.openBlock(),e.createElementBlock("ul",p5,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(D.publications.slice(0,2),($,k)=>(e.openBlock(),e.createElementBlock("li",{key:k,"data-aos":"fade-in","data-aos-duration":"1500",class:"publications-grid-item aos-init aos-animate"},[e.createElementVNode("div",h5,[e.createElementVNode("div",f5,[e.createElementVNode("a",{style:{cursor:"pointer"},onClick:A=>i($.fileUrl),rel:"noopener noreferrer",class:"publication__img img-wrapper"},[e.createElementVNode("img",{src:$.image,alt:"111111"},null,8,v5),v[8]||(v[8]=e.createElementVNode("div",{class:"publication__img__mask"},[e.createElementVNode("div",{class:"publication__img__mask__btn"},"阅读")],-1))],8,g5)]),e.createElementVNode("div",y5,[e.createElementVNode("a",{style:{cursor:"pointer"},onClick:A=>i($.fileUrl),rel:"noopener noreferrer",class:"publication__title publications-line-clamp-2"},e.toDisplayString($.title),9,_5)])])]))),128))])):e.createCommentVNode("",!0)])]))),128))])])],4)]),n.isPreview?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(Te,{key:0,show:m.value,"onUpdate:show":v[1]||(v[1]=D=>m.value=D),onHandleEdit:v[2]||(v[2]=D=>d.value=!0),onHandleDelete:h,onHandleCopy:g,onHandlePaste:p},null,8,["show"]))],36)):e.createCommentVNode("",!0),n.isPreview?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(G$,{key:1,show:d.value,"onUpdate:show":v[5]||(v[5]=D=>d.value=D),data:n.modelValue},null,8,["show","data"]))],64)}}}),Od=ne(b5,[["__scopeId","data-v-67a36596"]]),w5=Object.freeze(Object.defineProperty({__proto__:null,default:Od},Symbol.toStringTag,{value:"Module"})),x5={class:"seting-box"},V5={class:"setting-header flex items-center"},C5=["src"],k5={class:"item-uplaod flex items-center"},E5={class:"draggable_box"},T5={class:"drag_top_box"},N5=["onClick"],S5={class:"sub_draggable_box"},B5={class:"draggable_box"},D5={class:"drag_top_box"},P5=["onClick"],$5=["src"],A5={class:"item-uplaod flex items-center"},L5={key:0},I5=e.defineComponent({__name:"setting",props:{show:{type:Boolean,default:!1},data:{type:Object,default:()=>{}}},emits:["update:show"],setup(n,{emit:t}){const o=e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./index-QFpkZqlg.js"))),a=e.defineAsyncComponent(()=>import("vuedraggable")),i=n,s=e.ref(!1),l=e.ref(new Set),r=e.ref(new Set);e.watch(()=>{var $;return($=i.data)==null?void 0:$.markers},$=>{if($&&Array.isArray($)&&!s.value){s.value=!0;const k=$.map(B=>B.key);l.value=new Set(k);const A=[];$.forEach(B=>{B.list&&Array.isArray(B.list)&&B.list.forEach(I=>{I.id&&A.push(I.id)})}),r.value=new Set(A)}},{immediate:!0,deep:!0});const u=()=>{i.data.markers.push({key:R(10),name:"新的校园",x_coordinates:0,y_coordinates:0,textPos:"left"})},c=e.computed(()=>({animation:200,group:"publications",disabled:!1,ghostClass:"ghost",handle:".drag-handle",filter:".rich-text-editor, .arco-input, .arco-select, .arco-checkbox",preventOnFilter:!1})),f=e.computed(()=>({animation:200,group:"links",disabled:!1,ghostClass:"ghost",handle:".drag-handle",filter:".rich-text-editor, .arco-input, .arco-select, .arco-checkbox",preventOnFilter:!1})),m=e.ref(!1),d=e.ref(!1),h=t,g=$=>l.value.has($.key),p=()=>{h("update:show",!1)},b=()=>{var $,k;return((k=($=i.data)==null?void 0:$.markers)==null?void 0:k.map(A=>A.key).filter(Boolean))||[]},_=()=>{var k;const $=[];return(k=i.data)!=null&&k.markers&&Array.isArray(i.data.markers)&&i.data.markers.forEach(A=>{A.list&&Array.isArray(A.list)&&A.list.forEach(B=>{B.id&&$.push(B.id)})}),$},w=($,k,A)=>{if(!k.value.has($))k.value.add($);else{const I=A();k.value=new Set(I.filter(z=>z!==$))}},v=$=>{w($.key,l,b)},V=$=>{i.data.markers=i.data.markers.filter(k=>k.key!==$)},C=$=>r.value.has($.id),S=$=>{w($.id,r,_)},N=$=>{const k={id:R(10),title:"新的校区",desc:"",image:"",alt:"",phone:"",email:"",link:"",linkName:""},A=i.data.markers[$];A.list||(A.list=[]),A.list.push(k)},D=($,k)=>{const A=i.data.list.find(B=>B.key===k);A&&A.publications&&(A.publications=A.publications.filter(B=>B.id!==$))};return($,k)=>{const A=e.resolveComponent("a-switch"),B=e.resolveComponent("a-input"),I=e.resolveComponent("icon-drag-dot"),z=e.resolveComponent("icon-drag-arrow"),Y=e.resolveComponent("icon-delete"),H=e.resolveComponent("a-option"),q=e.resolveComponent("a-select"),O=e.resolveComponent("icon-plus"),J=e.resolveComponent("a-button"),F=e.resolveComponent("a-drawer");return e.openBlock(),e.createBlock(F,{width:500,visible:n.show,footer:!1,onCancel:p,unmountOnClose:""},{title:e.withCtx(()=>{var M;return[e.createTextVNode(e.toDisplayString((M=n.data)==null?void 0:M.type)+"组件编辑 ",1)]}),default:e.withCtx(()=>[e.createElementVNode("div",x5,[e.createElementVNode("div",V5,[k[13]||(k[13]=e.createElementVNode("span",{class:"header-title"},"仅显示PC端",-1)),e.createVNode(A,{modelValue:n.data.onlyShowPc,"onUpdate:modelValue":k[0]||(k[0]=M=>n.data.onlyShowPc=M)},null,8,["modelValue"])]),k[31]||(k[31]=e.createElementVNode("p",{class:"item-title"},"地图图片",-1)),e.createElementVNode("img",{class:"item-img",src:n.data.map},null,8,C5),e.createElementVNode("div",k5,[e.createVNode(B,{modelValue:n.data.map,"onUpdate:modelValue":k[1]||(k[1]=M=>n.data.map=M),placeholder:"请输入图片链接","allow-clear":""},null,8,["modelValue"]),e.createVNode(ze,{modelValue:n.data.map,"onUpdate:modelValue":k[2]||(k[2]=M=>n.data.map=M),name:"MapStatic","button-class":"fit-content"},null,8,["modelValue"])]),k[32]||(k[32]=e.createElementVNode("p",{class:"item-title"},"显示X坐标",-1)),e.createVNode(B,{modelValue:n.data.x_coordinates,"onUpdate:modelValue":k[3]||(k[3]=M=>n.data.x_coordinates=M),"allow-clear":""},null,8,["modelValue"]),k[33]||(k[33]=e.createElementVNode("p",{class:"item-title"},"显示Y坐标",-1)),e.createVNode(B,{modelValue:n.data.y_coordinates,"onUpdate:modelValue":k[4]||(k[4]=M=>n.data.y_coordinates=M),"allow-clear":""},null,8,["modelValue"]),k[34]||(k[34]=e.createElementVNode("p",{class:"item-title"},"标记",-1)),e.createVNode(e.unref(a),e.mergeProps({modelValue:n.data.markers,"onUpdate:modelValue":k[10]||(k[10]=M=>n.data.markers=M),"component-data":{tag:"div",type:"transition-group",name:m.value?null:"flip-list"}},f.value,{disabled:!1,onStart:k[11]||(k[11]=M=>m.value=!0),onEnd:k[12]||(k[12]=M=>m.value=!1),"item-key":"key"}),{item:e.withCtx(({element:M,index:Q})=>[e.createElementVNode("div",E5,[e.createElementVNode("div",T5,[e.createElementVNode("div",{onClick:W=>v(M)},[e.createVNode(I,{style:{"margin-right":"10px"}}),e.createTextVNode(e.toDisplayString(M.name),1)],8,N5),e.createElementVNode("div",null,[e.createVNode(z,{class:"icon_drag"}),e.createVNode(Y,{class:"btn-delete",onClick:e.withModifiers(W=>V(M.key),["stop"])},null,8,["onClick"])])]),e.createVNode(e.Transition,{name:"collapse"},{default:e.withCtx(()=>[e.withDirectives(e.createElementVNode("div",null,[k[25]||(k[25]=e.createElementVNode("p",{class:"item-title",style:{"margin-top":"20px"}},"名称",-1)),e.createVNode(B,{style:{border:"1px solid #c0c0c0"},modelValue:M.name,"onUpdate:modelValue":W=>M.name=W,onClick:k[5]||(k[5]=e.withModifiers(()=>{},["stop"]))},null,8,["modelValue","onUpdate:modelValue"]),k[26]||(k[26]=e.createElementVNode("p",{class:"item-title",style:{"margin-top":"20px"}},"标记X坐标",-1)),e.createVNode(B,{style:{border:"1px solid #c0c0c0"},modelValue:M.x_coordinates,"onUpdate:modelValue":W=>M.x_coordinates=W,onClick:k[6]||(k[6]=e.withModifiers(()=>{},["stop"]))},null,8,["modelValue","onUpdate:modelValue"]),k[27]||(k[27]=e.createElementVNode("p",{class:"item-title",style:{"margin-top":"20px"}},"标记Y坐标",-1)),e.createVNode(B,{style:{border:"1px solid #c0c0c0"},modelValue:M.x_coordinates,"onUpdate:modelValue":W=>M.x_coordinates=W,onClick:k[7]||(k[7]=e.withModifiers(()=>{},["stop"]))},null,8,["modelValue","onUpdate:modelValue"]),k[28]||(k[28]=e.createElementVNode("p",{class:"item-title",style:{"margin-top":"20px"}},"详情弹出位置",-1)),e.createVNode(q,{modelValue:M.textPos,"onUpdate:modelValue":W=>M.textPos=W,style:{width:"320px"},placeholder:"请选择"},{default:e.withCtx(()=>[e.createVNode(H,{value:"left"},{default:e.withCtx(()=>[...k[14]||(k[14]=[e.createTextVNode("左",-1)])]),_:1}),e.createVNode(H,{value:"right"},{default:e.withCtx(()=>[...k[15]||(k[15]=[e.createTextVNode("右",-1)])]),_:1})]),_:1},8,["modelValue","onUpdate:modelValue"]),k[29]||(k[29]=e.createElementVNode("p",{class:"item-title",style:{"margin-top":"20px"}},"校区",-1)),e.createElementVNode("div",S5,[e.createVNode(e.unref(a),e.mergeProps({modelValue:M.list,"onUpdate:modelValue":W=>M.list=W,"component-data":{tag:"div",type:"transition-group",name:d.value?null:"flip-list"}},c.value,{disabled:!1,onStart:k[8]||(k[8]=W=>d.value=!0),onEnd:k[9]||(k[9]=W=>d.value=!1),"item-key":"id"}),{item:e.withCtx(({element:W,index:Z})=>[e.createElementVNode("div",B5,[e.createElementVNode("div",D5,[e.createElementVNode("div",{onClick:e.withModifiers(de=>S(W),["stop"])},[e.createVNode(I,{style:{"margin-right":"10px"}}),e.createTextVNode(" "+e.toDisplayString(W.title),1)],8,P5),e.createElementVNode("div",null,[e.createVNode(z,{class:"icon_drag"}),e.createVNode(Y,{class:"btn-delete",onClick:e.withModifiers(de=>D(W.id,M.key),["stop"])},null,8,["onClick"])])]),e.createVNode(e.Transition,{name:"collapse"},{default:e.withCtx(()=>[e.withDirectives(e.createElementVNode("div",null,[k[16]||(k[16]=e.createElementVNode("p",{class:"item-title",style:{"margin-top":"20px"}}," 题目 ",-1)),e.createVNode(B,{style:{border:"1px solid #f1eeee"},modelValue:W.title,"onUpdate:modelValue":de=>W.title=de},null,8,["modelValue","onUpdate:modelValue"]),k[17]||(k[17]=e.createElementVNode("p",{class:"item-title",style:{"margin-top":"20px"}}," 描述 ",-1)),e.createVNode(e.unref(o),{modelValue:W.desc,"onUpdate:modelValue":de=>W.desc=de,name:`MapStatic_editor_${Q}_${Z}`},null,8,["modelValue","onUpdate:modelValue","name"]),k[18]||(k[18]=e.createElementVNode("p",{class:"item-title",style:{"margin-top":"20px"}}," 图片 ",-1)),e.createElementVNode("img",{class:"item-img",src:W.image},null,8,$5),e.createElementVNode("div",A5,[e.createVNode(B,{modelValue:W.image,"onUpdate:modelValue":de=>W.image=de,placeholder:"请输入图片链接","allow-clear":"",style:{border:"1px solid #c0c0c0"}},null,8,["modelValue","onUpdate:modelValue"]),e.createVNode(ze,{modelValue:W.image,"onUpdate:modelValue":de=>W.image=de,name:`MapStatic_${Q}_${Z}`,"button-class":"fit-content"},null,8,["modelValue","onUpdate:modelValue","name"])]),k[19]||(k[19]=e.createElementVNode("p",{class:"item-title",style:{"margin-top":"20px"}}," 图片替代文本 ",-1)),e.createVNode(B,{style:{border:"1px solid #f1eeee"},modelValue:W.alt,"onUpdate:modelValue":de=>W.alt=de},null,8,["modelValue","onUpdate:modelValue"]),k[20]||(k[20]=e.createElementVNode("p",{class:"item-title",style:{"margin-top":"20px"}}," 链接名称 ",-1)),e.createVNode(B,{style:{border:"1px solid #f1eeee"},modelValue:W.linkName,"onUpdate:modelValue":de=>W.linkName=de},null,8,["modelValue","onUpdate:modelValue"]),k[21]||(k[21]=e.createElementVNode("p",{class:"item-title",style:{"margin-top":"20px"}}," 链接地址 ",-1)),e.createVNode(B,{style:{border:"1px solid #f1eeee"},modelValue:W.link,"onUpdate:modelValue":de=>W.link=de},null,8,["modelValue","onUpdate:modelValue"]),k[22]||(k[22]=e.createElementVNode("p",{class:"item-title",style:{"margin-top":"20px"}}," 手机号码 ",-1)),e.createVNode(B,{style:{border:"1px solid #f1eeee"},modelValue:W.phone,"onUpdate:modelValue":de=>W.phone=de},null,8,["modelValue","onUpdate:modelValue"]),k[23]||(k[23]=e.createElementVNode("p",{class:"item-title",style:{"margin-top":"20px"}}," 邮箱 ",-1)),e.createVNode(B,{style:{border:"1px solid #f1eeee"},modelValue:W.email,"onUpdate:modelValue":de=>W.email=de},null,8,["modelValue","onUpdate:modelValue"])],512),[[e.vShow,!C(W)]])]),_:2},1024)])]),_:2},1040,["modelValue","onUpdate:modelValue","component-data"]),M.list?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("p",L5,"暂无数据")),e.createVNode(J,{style:{"margin-top":"10px","margin-left":"5px"},type:"primary",onClick:W=>N(Q)},{icon:e.withCtx(()=>[e.createVNode(O)]),default:e.withCtx(()=>[k[24]||(k[24]=e.createTextVNode("校区",-1))]),_:1},8,["onClick"])])],512),[[e.vShow,!g(M)]])]),_:2},1024)])]),_:1},16,["modelValue","component-data"]),e.createVNode(J,{style:{"margin-top":"10px","margin-left":"5px"},type:"primary",onClick:u},{default:e.withCtx(()=>[...k[30]||(k[30]=[e.createTextVNode("新增Section",-1)])]),_:1})])]),_:1},8,["visible"])}}}),O5=ne(I5,[["__scopeId","data-v-76a2b239"]]),M5={class:"map-static-detail"},U5={class:"detail__image"},R5=["src","alt"],F5=["src","alt"],H5={class:"detail__content"},j5={key:0,class:"detail__title me-md-5"},z5=["innerHTML"],q5={class:"detail__cta"},W5={key:0},G5=["href"],X5={key:1},Y5=["href"],K5={key:2,class:"detail__link"},Q5=e.defineComponent({__name:"MapStaticDetail",props:{componentProps:{default:null}},emits:["close"],setup(n,{emit:t}){const o=n,a=t,i=e.ref(0),s=e.ref(0),l=e.ref(0),r={image:"/images/dummyimage/placeholder.jpg"},u=e.computed(()=>{var g;return((g=o.componentProps)==null?void 0:g.list)??[]}),c=e.computed(()=>{var g;return((g=u.value)==null?void 0:g[i.value])??u.value[0]});e.watch(i,g=>{g>u.value.length-1?i.value=0:g<0&&(i.value=u.value.length-1)});const f=()=>{a("close"),setTimeout(()=>{i.value=0},300)},m=g=>{s.value=g.changedTouches[0].screenX},d=g=>{l.value=g.changedTouches[0].screenX,h()},h=()=>{l.value<s.value&&(i.value+=1),l.value>s.value&&(i.value-=1)};return(g,p)=>(e.openBlock(),e.createElementBlock("div",M5,[e.createElementVNode("button",{type:"button",class:"detail__close",onClick:f}),e.createVNode(e.Transition,{name:"fade",mode:"out-in"},{default:e.withCtx(()=>[c.value?(e.openBlock(),e.createElementBlock("div",{class:"map-static-detail__wrapper",key:i.value,onTouchstart:m,onTouchend:d},[e.createElementVNode("div",U5,[c.value.image?(e.openBlock(),e.createElementBlock("img",{key:0,src:c.value.image,alt:c.value.alt||c.value.title},null,8,R5)):(e.openBlock(),e.createElementBlock("img",{key:1,src:r.image,alt:c.value.alt||c.value.title},null,8,F5))]),e.createElementVNode("div",H5,[c.value.title?(e.openBlock(),e.createElementBlock("h6",j5,e.toDisplayString(c.value.title),1)):e.createCommentVNode("",!0),c.value.desc?(e.openBlock(),e.createElementBlock("div",{key:1,class:"detail__desc me-md-5",innerHTML:c.value.desc},null,8,z5)):e.createCommentVNode("",!0),e.createElementVNode("ul",q5,[c.value.phone?(e.openBlock(),e.createElementBlock("li",W5,[e.createElementVNode("a",{href:`tel:${c.value.phone}`,class:"detail__cta__item link-body-p link--udrline"},e.toDisplayString(c.value.phone),9,G5)])):e.createCommentVNode("",!0),c.value.email?(e.openBlock(),e.createElementBlock("li",X5,[e.createElementVNode("a",{href:`mailto:${c.value.email}`,class:"detail__cta__item link-body-p link--udrline"},e.toDisplayString(c.value.email),9,Y5)])):e.createCommentVNode("",!0)]),c.value.link?(e.openBlock(),e.createElementBlock("div",K5)):e.createCommentVNode("",!0)])],32)):e.createCommentVNode("",!0)]),_:1}),u.value.length>1?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createElementVNode("button",{type:"button",class:"map-static-detail__btn-prev i",onClick:p[0]||(p[0]=b=>i.value-=1)}),e.createElementVNode("button",{type:"button",class:"map-static-detail__btn-next i",onClick:p[1]||(p[1]=b=>i.value+=1)})],64)):e.createCommentVNode("",!0)]))}}),J5=ne(Q5,[["__scopeId","data-v-6b174ae8"]]),Z5={class:"mapstatic_wrap"},eA=["draggable"],tA=["src"],nA=["data-title","onClick","onMouseover","onMouseleave"],oA={class:"map__detail"},aA={class:"map-prev"},iA={class:"map-next"},sA={class:"map-up"},lA={class:"map-down"},rA={key:0},dA={key:1,class:"map-hint-fullscreen flex-center"},uA=e.defineComponent({name:"MapStatic",__name:"index",props:{modelValue:{type:Object,default:()=>{}},isPreview:{type:Boolean,default:!0}},emits:["update:modelValue","handleDelete","handleCopy","handlePaste"],setup(n,{emit:t}){const o=n;console.log("!!!!",o.modelValue);const a=t,i=e.ref(!1),s=e.ref(!1),l=()=>{a("handleDelete",o.modelValue.id)},r=()=>{a("handleCopy",o.modelValue)},u=ue=>{a("handlePaste",ue)},c=()=>{var pe;if(o.modelValue&&o.modelValue.map)return;const ue={id:((pe=o.modelValue)==null?void 0:pe.id)||R(),type:"MapStatic",onlyShowPc:!1,map:"https://osswebsite-test.cedim.cn/media-library/ywies-tx/images/campus-life/school-facilities/00_yard%2001.jpg",x_coordinates:49.4,y_coordinates:70,zoom_desktop:1.75,zoom_mobile:2.25,bgColor:"#f5f5f5",markers:[{key:"marker-1",name:"北京校区",x_coordinates:25.5,y_coordinates:35.2,textPos:"left",list:[{title:"香港中央图书馆",desc:"香港最大的公共图书馆,提供丰富的图书资源和学习空间。位于铜锣湾核心地带,交通便利。",image:"https://osswebsite-test.cedim.cn/media-library/ywies-tx/images/campus-life/school-facilities/00_yard%2001.jpg",alt:"香港中央图书馆外观",phone:"+852 2921 0222",email:"info@hkpl.gov.hk",link:"https://www.hkpl.gov.hk",linkName:"访问图书馆官网",id:R()},{title:"维多利亚港观景台",desc:"欣赏维多利亚港美景的最佳地点之一,可以观看到香港岛和九龙半岛的壮丽景色。每晚8点有幻彩咏香江灯光秀。",image:"https://osswebsite-test.cedim.cn/media-library/ywies-tx/images/campus-life/school-facilities/00_yard%2001.jpg",alt:"维多利亚港夜景",phone:"+852 2508 1234",email:"tourism@discoverhongkong.com",link:"https://www.discoverhongkong.com/tc/see-do/highlight-attractions/harbour-views/symphony-of-lights.html",linkName:"了解更多景点信息",id:R()}]},{key:"marker-2",name:"上海校区",x_coordinates:65.8,y_coordinates:45.6,textPos:"right",list:[{title:"香港中央图书馆",desc:"香港最大的公共图书馆,提供丰富的图书资源和学习空间。位于铜锣湾核心地带,交通便利。",image:"https://osswebsite-test.cedim.cn/media-library/ywies-tx/images/campus-life/school-facilities/00_yard%2001.jpg",alt:"香港中央图书馆外观",phone:"+852 2921 0222",email:"info@hkpl.gov.hk",link:"https://www.hkpl.gov.hk",linkName:"访问图书馆官网",id:R()},{title:"维多利亚港观景台",desc:"欣赏维多利亚港美景的最佳地点之一,可以观看到香港岛和九龙半岛的壮丽景色。每晚8点有幻彩咏香江灯光秀。",image:"https://osswebsite-test.cedim.cn/media-library/ywies-tx/images/campus-life/school-facilities/00_yard%2001.jpg",alt:"维多利亚港夜景",phone:"+852 2508 1234",email:"tourism@discoverhongkong.com",link:"https://www.discoverhongkong.com/tc/see-do/highlight-attractions/harbour-views/symphony-of-lights.html",linkName:"了解更多景点信息",id:R()}]},{key:"marker-3",name:"广州校区",x_coordinates:40.2,y_coordinates:60.8,textPos:"left",list:[{title:"香港中央图书馆",desc:"香港最大的公共图书馆,提供丰富的图书资源和学习空间。位于铜锣湾核心地带,交通便利。",image:"https://osswebsite-test.cedim.cn/media-library/ywies-tx/images/campus-life/school-facilities/00_yard%2001.jpg",alt:"香港中央图书馆外观",phone:"+852 2921 0222",email:"info@hkpl.gov.hk",link:"https://www.hkpl.gov.hk",linkName:"访问图书馆官网",id:R()},{title:"维多利亚港观景台",desc:"欣赏维多利亚港美景的最佳地点之一,可以观看到香港岛和九龙半岛的壮丽景色。每晚8点有幻彩咏香江灯光秀。",image:"https://osswebsite-test.cedim.cn/media-library/ywies-tx/images/campus-life/school-facilities/00_yard%2001.jpg",alt:"维多利亚港夜景",phone:"+852 2508 1234",email:"tourism@discoverhongkong.com",link:"https://www.discoverhongkong.com/tc/see-do/highlight-attractions/harbour-views/symphony-of-lights.html",linkName:"了解更多景点信息",id:R()}]}]};a("update:modelValue",ue)},f=e.computed(()=>{var ue;return o.isPreview?!((ue=o.modelValue)!=null&&ue.onlyShowPc)||!Ne():!0});c();const m=e.ref({map:"https://osswebsite-test.cedim.cn/media-library/ywies-tx/images/campus-life/school-facilities/00_yard%2001.jpg",x_coordinates:49.4,y_coordinates:70,zoom_desktop:1.75,zoom_mobile:2.25});e.ref({key:"marker-1",name:"北京校区",x_coordinates:25.5,y_coordinates:35.2,textPos:"bottom"});const d=e.ref(NaN),h=e.ref(NaN),g=e.ref(!1),p=e.ref(!1),b=e.ref(null),_=e.ref(null),w=e.ref(null),v=e.ref(null),V=e.ref(0),C=e.ref(0),S=e.ref(!1),N=e.ref(0),D=e.ref(0),$=e.ref(!0),k=e.ref(!0),A=e.ref(!0),B=e.ref(!0),I=e.ref(),z=e.ref(),Y=e.computed(()=>({transformOrigin:`${J.value}% 50%`,transform:`translate(${V.value}px, ${C.value}px)`,height:`${W.value*100}%`})),H=e.computed(()=>isNaN(d.value)?null:q.value[d.value]),q=e.computed(()=>{var ue;return((ue=o.modelValue)==null?void 0:ue.markers)??[]}),O=e.computed(()=>{var ue;return((ue=o.modelValue)==null?void 0:ue.map)??m.value.map}),J=e.computed(()=>{var ue;return((ue=o.modelValue)==null?void 0:ue.x_coordinates)??m.value.x_coordinates}),F=e.computed(()=>{var ue;return((ue=o.modelValue)==null?void 0:ue.y_coordinates)??m.value.y_coordinates}),M=e.computed(()=>{var ue;return((ue=o.modelValue)==null?void 0:ue.zoom_desktop)??m.value.zoom_desktop}),Q=e.computed(()=>{var ue;return((ue=o.modelValue)==null?void 0:ue.zoom_mobile)??m.value.zoom_mobile}),W=e.computed(()=>(typeof window<"u"?window.innerWidth:1024)>768?M.value:Q.value),Z=e.computed(()=>typeof window<"u"?window.innerWidth<1024:!1),de=(ue,pe)=>({left:`${ue}%`,top:`${pe}%`,transform:"translate(-50%, -75%)"}),Ve=ue=>{d.value=ue,g.value=!0},oe=()=>{console.log("closeDetail"),g.value=!1,setTimeout(()=>{d.value=NaN},300)},fe=ue=>{if(ue.type==="touchstart"){const pe=ue;w.value=pe.touches[0].clientX-V.value,v.value=pe.touches[0].clientY-C.value}else{const pe=ue;w.value=pe.clientX-V.value,v.value=pe.clientY-C.value}p.value=!0},Ce=()=>{w.value=b.value,v.value=_.value,p.value=!1},Se=ue=>{if(p.value){if(ue.preventDefault(),ue.type==="touchmove"){const pe=ue;b.value=pe.touches[0].clientX-(w.value||0),_.value=pe.touches[0].clientY-(v.value||0)}else{const pe=ue;b.value=pe.clientX-(w.value||0),_.value=pe.clientY-(v.value||0)}ae(b.value,_.value)}},ae=(ue,pe)=>{let ve=ue,_e=pe;const Je=z.value,bt=I.value;if(!Je||!bt)return;const Bn=Je.getBoundingClientRect().width,gt=Je.getBoundingClientRect().height,an=bt.getBoundingClientRect().height,it=typeof window<"u"?window.innerWidth:1024,vt={right:-Bn+it/2,left:-1*it/2,top:-gt+an/2,bottom:-1*an/2};ve<vt.right?ve=vt.right:ve>vt.left&&(ve=vt.left),_e<vt.top?_e=vt.top:_e>vt.bottom&&(_e=vt.bottom),V.value=ve,C.value=_e},ce=ue=>{if(Math.abs(ue.deltaX)>Math.abs(ue.deltaY)){ue.preventDefault();const pe=V.value-ue.deltaX;ae(pe,C.value)}},se=()=>{const ue=z.value,pe=I.value;if(ue&&pe&&ue.clientWidth){const ve=pe.clientWidth,_e=pe.clientHeight,Je=ue.clientWidth,bt=ue.clientHeight;V.value=-(Je*J.value/100-ve/2),C.value=-(bt*F.value/100-_e/2)}ae(V.value,C.value)},he=ue=>{h.value=ue},we=ue=>{ue===h.value&&(h.value=NaN)},ke=()=>{se(),e.nextTick(()=>{typeof window<"u"&&window.innerWidth<=768&&setTimeout(()=>S.value=!0,1300)})},te=ue=>{ue.preventDefault();const pe=I.value;if(!pe)return;const ve=pe.getBoundingClientRect();if(ue.type==="touchmove"){const _e=ue;N.value=_e.touches[0].clientX-ve.left,D.value=_e.touches[0].clientY-ve.top}else{const _e=ue;N.value=_e.clientX-ve.left,D.value=_e.clientY-ve.top}};return e.watch(m,()=>{d.value=NaN}),e.watch(()=>typeof window<"u"?window.innerWidth:1024,()=>{se()}),e.watch(p,()=>{S.value=!0}),e.watch(V,()=>{const ue=z.value;if(!ue)return;const pe=ue.getBoundingClientRect().width,ve=typeof window<"u"?window.innerWidth:1024,_e={right:-pe+ve/2,left:-1*ve/2};$.value=_e.left-V.value>50,k.value=V.value-_e.right>50}),e.watch(C,()=>{const ue=z.value,pe=I.value;if(!ue||!pe)return;const ve=ue.getBoundingClientRect().height,_e=pe.getBoundingClientRect().height,Je={top:-ve+_e/2,bottom:-1*_e/2};A.value=Je.bottom-C.value>50,B.value=C.value-Je.top>50}),e.watch(H,(ue,pe)=>{console.log("focosObj 发生变化:",{newValue:ue,oldValue:pe})},{deep:!0,immediate:!0}),e.onMounted(()=>{se()}),(ue,pe)=>{var ve;return e.openBlock(),e.createElementBlock(e.Fragment,null,[f.value?(e.openBlock(),e.createElementBlock("div",{key:0,style:e.normalizeStyle([{"margin-top":"30px","margin-bottom":"30px"},{backgroundColor:(ve=n.modelValue)==null?void 0:ve.bgColor}]),class:"mapstatic-container",onMouseenter:pe[7]||(pe[7]=_e=>i.value=!0),onMouseleave:pe[8]||(pe[8]=_e=>i.value=!1)},[e.createElementVNode("div",Z5,[e.createElementVNode("div",{class:"map-static",ref_key:"parent",ref:I,onMousemove:pe[4]||(pe[4]=_e=>te(_e))},[e.createElementVNode("div",{class:e.normalizeClass(["map__wrapper",{map__wrapper__blur:!S.value}]),ref_key:"wrapper",ref:z,style:e.normalizeStyle(Y.value),draggable:p.value,onMousedown:pe[0]||(pe[0]=_e=>fe(_e)),onMouseup:Ce,onMousemove:pe[1]||(pe[1]=_e=>Se(_e)),onMouseleave:Ce,onTouchstart:pe[2]||(pe[2]=_e=>fe(_e)),onTouchend:Ce,onTouchmove:pe[3]||(pe[3]=_e=>Se(_e)),onWheel:ce},[e.createElementVNode("img",{class:"map__img",src:O.value,alt:"map image",onLoad:ke},null,40,tA),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(q.value,(_e,Je)=>(e.openBlock(),e.createElementBlock("div",{key:_e.key,class:e.normalizeClass(["map__marker",[{"is-blur":g.value&&Je!==d.value,"is-active":Je==d.value},_e.textPos?`is-name-${_e.textPos}`:null]]),style:e.normalizeStyle(de(_e.x_coordinates,_e.y_coordinates)),"data-title":_e.name,onClick:bt=>Ve(Je),onMouseover:bt=>he(Je),onMouseleave:bt=>we(Je)},null,46,nA))),128))],46,eA),e.createVNode(e.Transition,{name:"fade"},{default:e.withCtx(()=>[e.withDirectives(e.createElementVNode("div",oA,[e.createVNode(J5,{componentProps:H.value,onClose:oe},null,8,["componentProps"])],512),[[e.vShow,g.value]])]),_:1}),g.value?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.withDirectives(e.createElementVNode("div",aA,null,512),[[e.vShow,$.value]]),e.withDirectives(e.createElementVNode("div",iA,null,512),[[e.vShow,k.value]]),e.withDirectives(e.createElementVNode("div",sA,null,512),[[e.vShow,A.value]]),e.withDirectives(e.createElementVNode("div",lA,null,512),[[e.vShow,B.value]])],64)),e.createVNode(e.Transition,{name:"fade"},{default:e.withCtx(()=>[S.value?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",rA,[Z.value?(e.openBlock(),e.createElementBlock("div",dA,[...pe[10]||(pe[10]=[e.createElementVNode("div",{class:"map-hint-fullscreen__hint"},"拖动以查看更多学校",-1)])])):(e.openBlock(),e.createElementBlock("div",{key:0,class:"map-hint",style:e.normalizeStyle({left:`${N.value}px`,top:`${D.value}px`})}," 拖动以查看更多学校 ",4))]))]),_:1})],544)]),n.isPreview?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(Te,{key:0,show:i.value,"onUpdate:show":pe[5]||(pe[5]=_e=>i.value=_e),onHandleEdit:pe[6]||(pe[6]=_e=>s.value=!0),onHandleDelete:l,onHandleCopy:r,onHandlePaste:u},null,8,["show"]))],36)):e.createCommentVNode("",!0),n.isPreview?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(O5,{key:1,show:s.value,"onUpdate:show":pe[9]||(pe[9]=_e=>s.value=_e),data:n.modelValue},null,8,["show","data"]))],64)}}}),Md=ne(uA,[["__scopeId","data-v-31f4d77d"]]),cA=Object.freeze(Object.defineProperty({__proto__:null,default:Md},Symbol.toStringTag,{value:"Module"})),mA={class:"setting-content"},pA={class:"setting-header flex items-center"},hA={class:"setting-header flex items-center"},fA={class:"setting-header flex items-center"},gA={class:"setting-header flex items-center"},vA={class:"setting-header flex items-center"},yA={class:"setting-body"},_A={class:"setting-item"},bA={class:"btn-group"},wA={key:0,class:"drag-handle"},xA=["src"],VA={class:"item-uplaod flex items-center"},CA=e.defineComponent({__name:"setting",props:{show:{type:Boolean,default:!1},data:{type:Object,default:()=>{}}},emits:["update:show"],setup(n,{emit:t}){const o=e.defineAsyncComponent(()=>import("vuedraggable")),a=e.ref(!1),i=e.computed(()=>({animation:200,group:"items",disabled:!1,ghostClass:"ghost",handle:".drag-handle",filter:".arco-input, .arco-select, .arco-checkbox",preventOnFilter:!1})),s=m=>m&&m.length>1,l=n,r=t,u=()=>{r("update:show",!1)},c=()=>{l.data.data.push({id:R(),name:"耀华国际",imgSrc:"https://osswebsite.ycyw.com/media-library/ywies-bj/images/home/ywies-tx.jpg",alt:"",link:""})},f=m=>{l.data.data=l.data.data.filter(d=>d.id!==m)};return(m,d)=>{const h=e.resolveComponent("a-switch"),g=e.resolveComponent("a-option"),p=e.resolveComponent("a-select"),b=e.resolveComponent("icon-drag-arrow"),_=e.resolveComponent("icon-delete"),w=e.resolveComponent("a-input"),v=e.resolveComponent("icon-plus"),V=e.resolveComponent("a-drawer");return e.openBlock(),e.createBlock(V,{width:500,visible:n.show,footer:!1,onCancel:u,unmountOnClose:""},{title:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(n.data.type)+"组件编辑 ",1)]),default:e.withCtx(()=>[e.createElementVNode("div",mA,[e.createElementVNode("div",pA,[d[9]||(d[9]=e.createElementVNode("span",{class:"header-title"},"仅显示PC端",-1)),e.createVNode(h,{modelValue:n.data.onlyShowPc,"onUpdate:modelValue":d[0]||(d[0]=C=>n.data.onlyShowPc=C)},null,8,["modelValue"])]),e.createElementVNode("div",hA,[d[14]||(d[14]=e.createElementVNode("span",{class:"header-title"},"组件宽度",-1)),e.createVNode(p,{modelValue:n.data.width,"onUpdate:modelValue":d[1]||(d[1]=C=>n.data.width=C),placeholder:"请选择","allow-clear":""},{default:e.withCtx(()=>[e.createVNode(g,{value:"default"},{default:e.withCtx(()=>[...d[10]||(d[10]=[e.createTextVNode("默认",-1)])]),_:1}),e.createVNode(g,{value:"small"},{default:e.withCtx(()=>[...d[11]||(d[11]=[e.createTextVNode("小",-1)])]),_:1}),e.createVNode(g,{value:"middle"},{default:e.withCtx(()=>[...d[12]||(d[12]=[e.createTextVNode("中",-1)])]),_:1}),e.createVNode(g,{value:"max"},{default:e.withCtx(()=>[...d[13]||(d[13]=[e.createTextVNode("大",-1)])]),_:1})]),_:1},8,["modelValue"])]),e.createElementVNode("div",fA,[d[17]||(d[17]=e.createElementVNode("span",{class:"header-title"},"No Clip",-1)),e.createVNode(p,{modelValue:n.data.isNoClip,"onUpdate:modelValue":d[2]||(d[2]=C=>n.data.isNoClip=C),placeholder:"请选择","allow-clear":""},{default:e.withCtx(()=>[e.createVNode(g,{value:!0},{default:e.withCtx(()=>[...d[15]||(d[15]=[e.createTextVNode("是",-1)])]),_:1}),e.createVNode(g,{value:!1},{default:e.withCtx(()=>[...d[16]||(d[16]=[e.createTextVNode("否",-1)])]),_:1})]),_:1},8,["modelValue"])]),e.createElementVNode("div",gA,[d[20]||(d[20]=e.createElementVNode("span",{class:"header-title"},"No Slide",-1)),e.createVNode(p,{modelValue:n.data.isNoSlide,"onUpdate:modelValue":d[3]||(d[3]=C=>n.data.isNoSlide=C),placeholder:"请选择","allow-clear":""},{default:e.withCtx(()=>[e.createVNode(g,{value:!0},{default:e.withCtx(()=>[...d[18]||(d[18]=[e.createTextVNode("是",-1)])]),_:1}),e.createVNode(g,{value:!1},{default:e.withCtx(()=>[...d[19]||(d[19]=[e.createTextVNode("否",-1)])]),_:1})]),_:1},8,["modelValue"])]),e.createElementVNode("div",vA,[d[23]||(d[23]=e.createElementVNode("span",{class:"header-title"},"Pure Logo",-1)),e.createVNode(p,{modelValue:n.data.isPureLogo,"onUpdate:modelValue":d[4]||(d[4]=C=>n.data.isPureLogo=C),placeholder:"请选择","allow-clear":""},{default:e.withCtx(()=>[e.createVNode(g,{value:!0},{default:e.withCtx(()=>[...d[21]||(d[21]=[e.createTextVNode("是",-1)])]),_:1}),e.createVNode(g,{value:!1},{default:e.withCtx(()=>[...d[22]||(d[22]=[e.createTextVNode("否",-1)])]),_:1})]),_:1},8,["modelValue"])]),e.createElementVNode("div",yA,[e.createElementVNode("div",_A,[e.createVNode(e.unref(o),e.mergeProps({modelValue:n.data.data,"onUpdate:modelValue":d[5]||(d[5]=C=>n.data.data=C),"component-data":{tag:"div",type:"transition-group",name:a.value?null:"flip-list"}},i.value,{disabled:!s(n.data.data),onStart:d[6]||(d[6]=C=>a.value=!0),onEnd:d[7]||(d[7]=C=>a.value=!1),"item-key":"id"}),{item:e.withCtx(({element:C})=>[(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["item-button draggable-item",{"sortable-disabled":!s(n.data.data)}]),key:C.id},[e.createElementVNode("div",bA,[s(n.data.data)?(e.openBlock(),e.createElementBlock("div",wA,[e.createVNode(b,{class:"drag-icon"})])):e.createCommentVNode("",!0),e.createVNode(_,{class:"btn-delete",onClick:S=>f(C.id)},null,8,["onClick"])]),d[24]||(d[24]=e.createElementVNode("p",{class:"item-title"},"名称",-1)),e.createVNode(w,{modelValue:C.name,"onUpdate:modelValue":S=>C.name=S,placeholder:"请输入名称","allow-clear":""},null,8,["modelValue","onUpdate:modelValue"]),d[25]||(d[25]=e.createElementVNode("p",{class:"item-title"},"图片",-1)),e.createElementVNode("img",{class:"item-img",src:C.imgSrc},null,8,xA),e.createElementVNode("div",VA,[e.createVNode(w,{modelValue:C.imgSrc,"onUpdate:modelValue":S=>C.imgSrc=S,placeholder:"请输入图片链接","allow-clear":""},null,8,["modelValue","onUpdate:modelValue"]),e.createVNode(ze,{modelValue:C.imgSrc,"onUpdate:modelValue":S=>C.imgSrc=S,name:`CardShowcaseProfile_img_${C.id}`},null,8,["modelValue","onUpdate:modelValue","name"])]),e.createVNode(w,{class:"mt-2",modelValue:C.alt,"onUpdate:modelValue":S=>C.alt=S,placeholder:"图片alt","allow-clear":""},null,8,["modelValue","onUpdate:modelValue"]),d[26]||(d[26]=e.createElementVNode("p",{class:"item-title"},"链接",-1)),e.createVNode(w,{modelValue:C.link,"onUpdate:modelValue":S=>C.link=S,placeholder:"请输入链接","allow-clear":""},null,8,["modelValue","onUpdate:modelValue"])],2))]),_:1},16,["modelValue","component-data","disabled"]),e.createElementVNode("div",{class:"item-add-btn flex items-center",onClick:d[8]||(d[8]=C=>c())},[e.createVNode(v),d[27]||(d[27]=e.createElementVNode("span",{class:"btn-text"},"添加",-1))])])])])]),_:1},8,["visible"])}}}),kA=ne(CA,[["__scopeId","data-v-1d0abc72"]]),EA=["href"],TA=["src","alt"],NA=["src","alt"],SA=["onClick"],BA=["src","alt"],DA={key:0,class:"mt-6 mt-md-10"},PA={key:1,class:"carousel-logo__row row row-cols-3 row-cols-sm-4 row-cols-md-6"},$A=["href"],AA=["src","alt"],LA=["src","alt"],IA=["onClick"],OA=["src","alt"],MA=e.defineComponent({name:"CarouselLogo",__name:"index",props:{modelValue:{type:Object,default:()=>{}},isPreview:{type:Boolean,default:!0}},emits:["update:modelValue","handleDelete","handleCopy","handlePaste","handleClick"],setup(n,{emit:t}){const o=n,a=t,i=()=>{var A,B;if(o.modelValue&&((A=o.modelValue)!=null&&A.data))return;const k={id:((B=o.modelValue)==null?void 0:B.id)||R(),type:"CarouselLogo",onlyShowPc:!1,width:"",isNoClip:void 0,isPureLogo:void 0,isNoSlide:void 0,data:[{id:R(),name:"这里是名称",imgSrc:"https://osswebsite.ycyw.com/media-library/ywies-bj/images/home/ywies-tx.jpg",alt:"",link:""}]};a("update:modelValue",k)},s=e.computed(()=>{var k;return o.isPreview?!((k=o.modelValue)!=null&&k.onlyShowPc)||!Ne():!0}),l=e.ref(!1),r=e.ref(!1),u=()=>{var k;a("handleDelete",(k=o.modelValue)==null?void 0:k.id)},c=()=>{a("handleCopy",o.modelValue)},f=k=>{a("handlePaste",k)},m=[ct.Navigation,ct.Pagination,ct.Autoplay],d={autoplay:{delay:5e3}},h=e.ref(typeof window<"u"?window.innerWidth:1024);function g(){h.value=typeof window<"u"?window.innerWidth:1024}e.onMounted(()=>{typeof window<"u"&&typeof window<"u"&&window.addEventListener("resize",g)}),e.onBeforeUnmount(()=>{typeof window<"u"&&typeof window<"u"&&window.removeEventListener("resize",g)});const p=e.computed(()=>{const k=h.value;return k>=1280?6:k>=992?5:k>=768?4:3}),b=e.computed(()=>h.value>=768?2:3),_=e.computed(()=>{var I;return(((I=o.modelValue)==null?void 0:I.data)||[]).reduce((z,Y,H)=>{const q=Math.floor(H/p.value);return z[q]||(z[q]=[]),z[q].push(Y),z},[]).reduce((z,Y,H)=>{const q=Math.floor(H/b.value);return z[q]||(z[q]=[]),z[q].push(Y),z},[])}),w=e.ref(0),v=e.ref(),V=e.ref(!1),C=k=>{v.value=k,V.value||e.nextTick(()=>{setTimeout(()=>{S()},100)})},S=()=>{e.nextTick(()=>{v.value&&(v.value.update(),V.value=!0)})},N=k=>{w.value=k.realIndex??0},D=k=>{v.value&&v.value.slideToLoop(k,600)};function $(k){!k.link||!o.isPreview||(k.link.startsWith("http")?typeof window<"u"&&window.open(k.link,"_blank"):a("handleClick",k.link))}return e.onMounted(()=>{S()}),i(),(k,A)=>{var I,z,Y,H;const B=e.resolveComponent("client-only");return e.openBlock(),e.createElementBlock(e.Fragment,null,[s.value?(e.openBlock(),e.createElementBlock("div",{key:0,class:"carousel-logo",onMouseenter:A[2]||(A[2]=q=>l.value=!0),onMouseleave:A[3]||(A[3]=q=>l.value=!1)},[e.createElementVNode("div",{class:e.normalizeClass(["carousel-logo__container",[(I=n.modelValue)!=null&&I.width?`container-content-${(z=n.modelValue)==null?void 0:z.width}`:"container-content"]])},[(Y=n.modelValue)!=null&&Y.isNoSlide?(e.openBlock(),e.createElementBlock("div",PA,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList((H=n.modelValue)==null?void 0:H.data,(q,O)=>{var J,F,M,Q;return e.openBlock(),e.createElementBlock("div",{class:"logo-card col flex-center flex-column",key:`logo-${O}`},[n.isPreview&&q.link?(e.openBlock(),e.createElementBlock("a",{key:0,href:q.link,target:"_blank",class:e.normalizeClass(["logo-card__img",{"logo-card__img--no-clip":(J=n.modelValue)==null?void 0:J.isNoClip}])},[e.createElementVNode("img",{src:q.imgSrc,alt:q.alt||q.name},null,8,AA)],10,$A)):(F=n.modelValue)!=null&&F.isPureLogo?(e.openBlock(),e.createElementBlock("div",{key:1,class:e.normalizeClass(["logo-card__img logo-card__img--is-pure-logo",{"logo-card__img--no-clip":(M=n.modelValue)==null?void 0:M.isNoClip}])},[e.createElementVNode("img",{src:q.imgSrc,alt:q.alt||q.name},null,8,LA)],2)):(e.openBlock(),e.createElementBlock("div",{key:2,class:e.normalizeClass(["logo-card__img",{"logo-card__img--no-clip":(Q=n.modelValue)==null?void 0:Q.isNoClip}]),onClick:W=>$(q)},[e.createElementVNode("img",{src:q.imgSrc,alt:q.alt||q.name},null,8,OA)],10,IA)),e.createElementVNode("div",{class:e.normalizeClass(["logo-card__name tx-overline text-center",{"mt-2":!q.link}])},e.toDisplayString(q.name),3)])}),128))])):(e.openBlock(),e.createBlock(B,{key:0},{default:e.withCtx(()=>[e.createVNode(e.unref(Et.Swiper),{ref:"mySwiperRef",modules:m,"slides-per-view":1,centeredSlides:!0,speed:600,autoplay:d.autoplay,class:"swiper carousel-logo__swiper",onSlideChange:N,onSwiper:C},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(_.value,(q,O)=>(e.openBlock(),e.createBlock(e.unref(Et.SwiperSlide),{class:"swiper-slide",key:O},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(q,(J,F)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["slide-content row",`row-cols-${p.value}`]),key:`logo-${F}`},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(J,(M,Q)=>{var W,Z,de,Ve;return e.openBlock(),e.createElementBlock("div",{class:"logo-card col flex-center flex-column",key:`logo-${Q}`},[n.isPreview&&M.link?(e.openBlock(),e.createElementBlock("a",{key:0,href:M.link,target:"_blank",class:e.normalizeClass(["logo-card__img",{"logo-card__img--no-clip":(W=n.modelValue)==null?void 0:W.isNoClip}])},[e.createElementVNode("img",{src:M.imgSrc,alt:M.alt||M.name},null,8,TA)],10,EA)):(Z=n.modelValue)!=null&&Z.isPureLogo?(e.openBlock(),e.createElementBlock("div",{key:1,class:e.normalizeClass(["logo-card__img logo-card__img--is-pure-logo",{"logo-card__img--no-clip":(de=n.modelValue)==null?void 0:de.isNoClip}])},[e.createElementVNode("img",{src:M.imgSrc,alt:M.alt||M.name},null,8,NA)],2)):(e.openBlock(),e.createElementBlock("div",{key:2,class:e.normalizeClass(["logo-card__img",{"logo-card__img--no-clip":(Ve=n.modelValue)==null?void 0:Ve.isNoClip}]),onClick:oe=>$(M)},[e.createElementVNode("img",{src:M.imgSrc,alt:M.alt||M.name},null,8,BA)],10,SA)),e.createElementVNode("div",{class:e.normalizeClass(["logo-card__name tx-overline text-center",{"mt-2":!M.link}])},e.toDisplayString(M.name),3)])}),128))],2))),128))]),_:2},1024))),128))]),_:1},8,["autoplay"]),_.value.length>1?(e.openBlock(),e.createElementBlock("div",DA,[e.createVNode(es,{currentIndex:w.value,count:_.value.length,onUpdatePage:D,dark:""},null,8,["currentIndex","count"])])):e.createCommentVNode("",!0)]),_:1}))],2),n.isPreview?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(Te,{key:0,show:l.value,"onUpdate:show":A[0]||(A[0]=q=>l.value=q),onHandleEdit:A[1]||(A[1]=q=>r.value=!0),onHandleDelete:u,onHandleCopy:c,onHandlePaste:f},null,8,["show"]))],32)):e.createCommentVNode("",!0),n.isPreview?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(kA,{key:1,show:r.value,"onUpdate:show":A[4]||(A[4]=q=>r.value=q),data:n.modelValue},null,8,["show","data"]))],64)}}}),Ud=ne(MA,[["__scopeId","data-v-1cb8195a"]]),UA=Object.freeze(Object.defineProperty({__proto__:null,default:Ud},Symbol.toStringTag,{value:"Module"})),RA={class:"setting-content"},FA={class:"setting-header flex items-center"},HA={class:"setting-header flex items-center"},jA={class:"setting-body"},zA={class:"setting-item"},qA={class:"btn-group"},WA={key:0,class:"drag-handle"},GA=["src"],XA={class:"item-uplaod flex items-center"},YA={class:"setting-item"},KA={class:"btn-group"},QA={key:0,class:"drag-handle"},JA=e.defineComponent({__name:"setting",props:{show:{type:Boolean,default:!1},data:{type:Object,default:()=>{}}},emits:["update:show"],setup(n,{emit:t}){const o=e.defineAsyncComponent(()=>import("vuedraggable")),a=e.ref(!1),i=e.computed(()=>({animation:200,group:"iconLinks",disabled:!1,ghostClass:"ghost",handle:".drag-handle",filter:".arco-input, .arco-select, .arco-checkbox",preventOnFilter:!1})),s=e.computed(()=>({animation:200,group:"textLinks",disabled:!1,ghostClass:"ghost",handle:".drag-handle",filter:".arco-input, .arco-select, .arco-checkbox",preventOnFilter:!1})),l=g=>g&&g.length>1,r=n,u=t,c=()=>{u("update:show",!1)},f=()=>{r.data.iconLinks.push({id:R(),iconType:void 0,linkType:"outer-link",text:"",url:""})},m=g=>{r.data.iconLinks=r.data.iconLinks.filter(p=>p.id!==g)},d=()=>{r.data.textLinks.push({id:R(),text:"",url:""})},h=g=>{r.data.textLinks=r.data.textLinks.filter(p=>p.id!==g)};return(g,p)=>{const b=e.resolveComponent("a-switch"),_=e.resolveComponent("a-option"),w=e.resolveComponent("a-select"),v=e.resolveComponent("icon-drag-arrow"),V=e.resolveComponent("icon-delete"),C=e.resolveComponent("a-input"),S=e.resolveComponent("icon-plus"),N=e.resolveComponent("a-drawer");return e.openBlock(),e.createBlock(N,{width:500,visible:n.show,footer:!1,onCancel:c,unmountOnClose:""},{title:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(n.data.type)+"组件编辑 ",1)]),default:e.withCtx(()=>[e.createElementVNode("div",RA,[e.createElementVNode("div",FA,[p[10]||(p[10]=e.createElementVNode("span",{class:"header-title"},"仅显示PC端",-1)),e.createVNode(b,{modelValue:n.data.onlyShowPc,"onUpdate:modelValue":p[0]||(p[0]=D=>n.data.onlyShowPc=D)},null,8,["modelValue"])]),e.createElementVNode("div",HA,[p[13]||(p[13]=e.createElementVNode("span",{class:"header-title"},"组件背景",-1)),e.createVNode(w,{modelValue:n.data.bgColor,"onUpdate:modelValue":p[1]||(p[1]=D=>n.data.bgColor=D),placeholder:"请选择","allow-clear":""},{default:e.withCtx(()=>[e.createVNode(_,{value:"#ffffff"},{default:e.withCtx(()=>[...p[11]||(p[11]=[e.createTextVNode("白色",-1)])]),_:1}),e.createVNode(_,{value:"#F7F7FA"},{default:e.withCtx(()=>[...p[12]||(p[12]=[e.createTextVNode("灰色",-1)])]),_:1})]),_:1},8,["modelValue"])]),e.createElementVNode("div",jA,[e.createElementVNode("div",zA,[e.createVNode(e.unref(o),e.mergeProps({modelValue:n.data.iconLinks,"onUpdate:modelValue":p[2]||(p[2]=D=>n.data.iconLinks=D),"component-data":{tag:"div",type:"transition-group",name:a.value?null:"flip-list"}},i.value,{disabled:!l(n.data.iconLinks),onStart:p[3]||(p[3]=D=>a.value=!0),onEnd:p[4]||(p[4]=D=>a.value=!1),"item-key":"id"}),{item:e.withCtx(({element:D})=>[(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["item-button draggable-item",{"sortable-disabled":!l(n.data.iconLinks)}]),key:D.id},[e.createElementVNode("div",qA,[l(n.data.iconLinks)?(e.openBlock(),e.createElementBlock("div",WA,[e.createVNode(v,{class:"drag-icon"})])):e.createCommentVNode("",!0),e.createVNode(V,{class:"btn-delete",onClick:$=>m(D.id)},null,8,["onClick"])]),p[15]||(p[15]=e.createElementVNode("p",{class:"item-title"},"Icon Type",-1)),e.createVNode(w,{modelValue:D.iconType,"onUpdate:modelValue":$=>D.iconType=$,placeholder:"请选择图标","allow-clear":""},{default:e.withCtx(()=>[e.createVNode(_,{value:"PDF"},{default:e.withCtx(()=>[...p[14]||(p[14]=[e.createTextVNode("PDF",-1)])]),_:1})]),_:1},8,["modelValue","onUpdate:modelValue"]),p[16]||(p[16]=e.createElementVNode("p",{class:"item-title"},"名称",-1)),e.createVNode(C,{modelValue:D.text,"onUpdate:modelValue":$=>D.text=$,placeholder:"请输入名称","allow-clear":""},null,8,["modelValue","onUpdate:modelValue"]),p[17]||(p[17]=e.createElementVNode("p",{class:"item-title"},"URL",-1)),e.createElementVNode("img",{class:"item-img",src:D.url},null,8,GA),e.createElementVNode("div",XA,[e.createVNode(C,{modelValue:D.url,"onUpdate:modelValue":$=>D.url=$,placeholder:"请输入URL","allow-clear":""},null,8,["modelValue","onUpdate:modelValue"]),e.createVNode(ze,{modelValue:D.url,"onUpdate:modelValue":$=>D.url=$,name:`Resources_file_${D.id}`},null,8,["modelValue","onUpdate:modelValue","name"])])],2))]),_:1},16,["modelValue","component-data","disabled"]),e.createElementVNode("div",{class:"item-add-btn flex items-center",onClick:p[5]||(p[5]=D=>f())},[e.createVNode(S),p[18]||(p[18]=e.createElementVNode("span",{class:"btn-text"},"添加icon",-1))])]),e.createElementVNode("div",YA,[e.createVNode(e.unref(o),e.mergeProps({modelValue:n.data.textLinks,"onUpdate:modelValue":p[6]||(p[6]=D=>n.data.textLinks=D),"component-data":{tag:"div",type:"transition-group",name:a.value?null:"flip-list"}},s.value,{disabled:!l(n.data.textLinks),onStart:p[7]||(p[7]=D=>a.value=!0),onEnd:p[8]||(p[8]=D=>a.value=!1),"item-key":"id"}),{item:e.withCtx(({element:D})=>[(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["item-button draggable-item",{"sortable-disabled":!l(n.data.textLinks)}]),key:D.id},[e.createElementVNode("div",KA,[l(n.data.textLinks)?(e.openBlock(),e.createElementBlock("div",QA,[e.createVNode(v,{class:"drag-icon"})])):e.createCommentVNode("",!0),e.createVNode(V,{class:"btn-delete",onClick:$=>h(D.id)},null,8,["onClick"])]),p[19]||(p[19]=e.createElementVNode("p",{class:"item-title"},"text",-1)),e.createVNode(C,{modelValue:D.text,"onUpdate:modelValue":$=>D.text=$,placeholder:"请输入text","allow-clear":""},null,8,["modelValue","onUpdate:modelValue"]),p[20]||(p[20]=e.createElementVNode("p",{class:"item-title"},"URL",-1)),e.createVNode(C,{modelValue:D.url,"onUpdate:modelValue":$=>D.url=$,placeholder:"请输入URL","allow-clear":""},null,8,["modelValue","onUpdate:modelValue"])],2))]),_:1},16,["modelValue","component-data","disabled"]),e.createElementVNode("div",{class:"item-add-btn flex items-center",onClick:p[9]||(p[9]=D=>d())},[e.createVNode(S),p[21]||(p[21]=e.createElementVNode("span",{class:"btn-text"},"添加text",-1))])])])])]),_:1},8,["visible"])}}}),ZA=ne(JA,[["__scopeId","data-v-9453bbf2"]]),eL=e.defineComponent({__name:"index",props:{linkType:{type:String,default:"button",validator:n=>["button","outer-link","nuxt-link","text"].indexOf(n)!==-1},iconType:{type:String,default:""},url:{type:String,default:"#"},text:{type:String,default:null},size:{type:String,default:"md",validator:n=>["sm","md"].indexOf(n)!==-1},light:{type:Boolean,default:!1},isPreview:{type:Boolean,default:!0}},emits:["handleClick","clickHandler"],setup(n,{emit:t}){const o=n,a=t;function i(f){a("handleClick",f)}const s=e.computed(()=>{switch(o.linkType){case"outer-link":return{component:o.isPreview?"a":"div",href:o.isPreview?"href":null,target:o.isPreview?"target":null,type:null};case"nuxt-link":return{component:"nuxt-link",href:"to",target:null,type:null};case"text":return{component:"div",href:null,target:null,type:null};default:return{component:"button",href:null,target:null,type:"type"}}}),l=e.computed(()=>{var m;return o.iconType?(typeof process<"u"?(m=process.env)==null?void 0:m.siteType:void 0)=="campus-yccece"?o.light?`url('/src/assets/icon-${o.iconType}--light.svg')`:`url('/src/assets/icon-${o.iconType}--light-blue.svg')`:o.light?`url('/src/assets/icon-${o.iconType}--light.svg')`:`url('/src/assets/icon-${o.iconType}.svg')`:null}),r=e.computed(()=>o.linkType==="nuxt-link"),u=e.computed(()=>o.linkType==="text");function c(){!o.url||!o.isPreview||(o.url.includes("http")?window.open(o.url,"_blank"):a("handleClick",o.url))}return(f,m)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["icon-link",[`icon-link--${n.size}`,{"icon-link--light":n.light}]])},[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(s.value.component),e.normalizeProps({class:"icon-link__wrapper",[s.value.href||""]:r.value?i(n.url):n.url,[s.value.target||""]:"_blank",[s.value.type||""]:"button",onClick:c}),{default:e.withCtx(()=>[l.value?(e.openBlock(),e.createElementBlock("span",{key:0,class:e.normalizeClass(["icon-link__icon",{"icon-link__icon--jump":!n.text}]),style:e.normalizeStyle(`--icon-url: ${l.value}`)},null,6)):e.createCommentVNode("",!0),n.text?(e.openBlock(),e.createElementBlock("div",{key:1,class:e.normalizeClass(["icon-link__text",[{"icon-link__text--pure-text":!l.value},{"disable-effect":u.value}]])},[e.createElementVNode("span",null,e.toDisplayString(n.text),1)],2)):e.createCommentVNode("",!0)]),_:1},16))],2))}}),fa=ne(eL,[["__scopeId","data-v-246f4639"]]),tL={class:"btn-secondary-text"},nL=e.defineComponent({name:"BtnSecondary",__name:"BtnSecondary",props:{text:{default:"Button"},url:{default:"#"},buttonType:{default:"button"},white:{type:Boolean,default:!1},light:{type:Boolean,default:!1},fillWidth:{type:Boolean,default:!1},typeForBtn:{default:"button"},action:{default:""},actionKey:{default:""}},emits:["showLightboxDonation"],setup(n,{emit:t}){const o=n,a=t,i=e.computed(()=>{switch(o.buttonType){case"outer-link":return{component:"a",href:"href",to:null,type:null,target:"target"};case"nuxt-link":return{component:"nuxt-link",href:null,to:"to",type:null,target:null};default:return{component:"button",href:null,to:null,type:"type",target:null}}}),s=e.computed(()=>{switch(o.action){case"donate":return{click:r};default:return null}}),l=e.computed(()=>o.buttonType==="nuxt-link");function r(){a("showLightboxDonation",{key:o.actionKey})}return(u,c)=>(e.openBlock(),e.createBlock(e.resolveDynamicComponent(i.value.component),e.mergeProps({class:["btn-secondary",[{"btn-secondary-w-100":n.fillWidth},{"btn-secondary--white":n.white},{"btn-secondary--light":n.light}]],[i.value.href||""]:n.url,[i.value.to||""]:l.value?n.url:void 0,[i.value.type||""]:n.typeForBtn,[i.value.target||""]:"_blank"},e.toHandlers(s.value)),{default:e.withCtx(()=>[e.createElementVNode("div",tL,e.toDisplayString(n.text),1)]),_:1},16,["class"]))}}),oL=ne(nL,[["__scopeId","data-v-47313996"]]),aL=["innerHTML"],iL=["placeholder"],sL={class:"footer-subscribe-form-button"},lL=e.defineComponent({name:"FooterSubscribe",__name:"FooterSubscribe",props:{isCampus:{type:Boolean,default:!1},isSmaller:{type:Boolean,default:!1},footer:{default:{}}},emits:["showLightboxSubscribe","showLightboxDonation"],setup(n,{emit:t}){const o=n,a=t,i=e.ref([]),s=e.ref(""),l=e.ref(!1),r=e.ref(typeof window<"u"?window.innerWidth:768),u=e.computed(()=>{var w;return(w=o.footer)==null?void 0:w.subscribe_title}),c=e.computed(()=>{var w;return(w=o.footer)==null?void 0:w.subscribe_desktop_text}),f=e.computed(()=>{var w;return(w=o.footer)==null?void 0:w.subscribe_mobile_text}),m=e.computed(()=>{var w;return(w=o.footer)==null?void 0:w.subscribe_lightbox}),d=e.computed(()=>r.value<768?f.value:c.value),h=w=>/^(([^<>()[\]\\.,;:\s@"]+(\.[^<>()[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/.test(w),g=()=>{a("showLightboxSubscribe",{email:s.value})},p=()=>{i.value=[],s.value?h(s.value)||i.value.push("Valid email required."):i.value.push("Email required."),i.value.length||(g(),s.value="")},b=()=>{typeof window<"u"&&(r.value=window.innerWidth)};e.onMounted(()=>{typeof window<"u"&&(r.value=window.innerWidth,window.addEventListener("resize",b))});const _=w=>{a("showLightboxDonation",w)};return(w,v)=>{var V;return e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["footer-subscribe footer-subscribe-bg-neutral-light",{"footer-subscribe--is-campus":n.isCampus,"footer-subscribe--is-smaller":n.isSmaller}])},[e.createElementVNode("div",{class:"footer-subscribe-title",innerHTML:u.value},null,8,aL),e.createElementVNode("form",{class:e.normalizeClass(["footer-subscribe-form",{"footer-subscribe-form-is-focus":l.value}]),onSubmit:e.withModifiers(p,["prevent"]),action:"javascript:void(0);",autocomplete:"off"},[e.withDirectives(e.createElementVNode("input",{class:"footer-subscribe-form-input","onUpdate:modelValue":v[0]||(v[0]=C=>s.value=C),type:"email",name:"email",placeholder:(V=m.value)==null?void 0:V.placeholder,pattern:"[a-z0-9._%+-]+@[a-z0-9.-]+\\.[a-z]{2,}$",required:"",onFocus:v[1]||(v[1]=C=>l.value=!0),onBlur:v[2]||(v[2]=C=>l.value=!1)},null,40,iL),[[e.vModelText,s.value]]),e.createElementVNode("div",sL,[e.createVNode(oL,{text:d.value,typeForBtn:"submit",fillWidth:!0,onShowLightboxDonation:_},null,8,["text"])])],34)],2)}}}),rL=ne(lL,[["__scopeId","data-v-fe586f4c"]]),dL={class:"resources-wrapper"},uL={class:"resources-content resources-row"},cL={class:"resources-col-icon resources-col"},mL={key:0,class:"resources-icon"},pL={key:0,class:"resources-col-text resources-col"},hL={class:"resources-col-text-group"},fL=["href"],gL={key:1,class:"resources-link resources-link-underline"},vL={class:"resources-col-contact resources-col"},yL={class:"resources-contact"},_L={key:0,class:"resources-contact-newsletter"},bL={class:"resources-d-flex resources-flex-column resources-flex-md-row resources-align-items-center resources-text-blue-dark resources-mb-3"},wL={class:"resources-footer-contact-title"},xL={key:0,class:"resources-footer-contact-subtitle resources-tx-body resources-ms-md-2"},VL={class:"resources-contact-top"},CL={key:0,class:"resources-contact-img resources-d-none resources-d-md-block"},kL=["src"],EL={class:"resources-contact-links"},TL={key:0},NL={key:1},SL={key:2},BL={key:3},DL={key:1,class:"resources-contact-bottom"},PL={class:"resources-d-md-none resources-ms-6"},$L={key:0,class:"resources-contact-img"},AL=["src"],LL=e.defineComponent({name:"Resources",__name:"index",props:{modelValue:{type:Object,default:()=>({})},isPreview:{type:Boolean,default:!0},footer:{type:Object,default:()=>({footer_logo:"/images/logo/joint-ywies-ycyw.svg",footer_logo_link:"https://ycyw-edu.com/",footer_title:"共創人类美好未来",contact:{title:"耀华国际教育学校浙江桐乡校区",subtitle:null,qrcode:"https://ywies-tx.cedim.cn/images/dummyimage/ywies-tx-wechat-qrcode.jpg",qrcode_title_img:"/images/icons/icon-wechat-full-sc.png",qrcode_text:"关注我们的微信公众号获取最新消息",address:{text:"中国浙江桐乡市高桥镇合悦大道88号(邮编: 314515)",value:"https://map.baidu.com/poi/耀华国际教育学校(浙江桐乡校区)/@13422013.625963753,3551835.6050974904,16.95z?uid=248fa2a7a83ed6aac9e33c5b&querytype=detailConInfo"},phone:{prefix:"招生部热线:",numbers:[{text:"(0573) 8896 6605",value:"(0573) 8896 6605"},{text:"",value:""}]},fax:{text:null,value:null},email:{text:"电邮: enquiry.tx@ywies.com",value:"enquiry.tx@ywies.com"},links:[{size:"sm",iconType:"",text:"",linkType:"",url:""}]},logoText:`<p>耀华国际教育学校浙江桐乡校区是一所确保儿童安全的学校<br />\r
|
|
16
|
+
点击 <a href="/sc/about-ywies/child-protection" target="_self">此处</a> 了解我们的《儿童保护规章和守则》</p>`,copyright:"© 2022 浙江桐乡市耀华学校版权所有",cookie_text:"您继续访问本站即代表您同意我们的cookies政策。我们使用cookies来改善您在网站上的体验,并向您展示相关推广信息。如您想了解更多关于我们如何处理您的个人信息和使用cookies的信息,请阅读我们的隐私政策。",cookie_link_text:"了解更多",cookie_btn_text:"关闭",cookie_link_url:"/privacy-policy",links:[{key:"sitemap",name:"网站地图",link:"/sitemap"},{key:"legal-information",name:"法律信息",link:"/legal-information"},{key:"privacy-policy",name:"隐私政策",link:"/privacy-policy"}],sublinks:[{key:"icp",name:"浙ICP备2022027407号",link:"https://beian.miit.gov.cn/"},{key:"icp2",name:"浙公网安备 33048302000288号",link:"http://www.beian.gov.cn/portal/registerSystemInfo?recordcode=33048302000288"}],logos:[{key:"cambridge-international",link:"https://www.cambridgeinternational.org/",img:"https://osswebsite-test.cedim.cn/shared/accreds/cambridge-assessment-international-education.png",alt:""}],footer_logo_alt:null})}},emits:["update:modelValue","handleDelete","handleCopy","handlePaste","showLightboxSubscribe","showLightboxDonation","handleClick","clickHandler"],setup(n,{emit:t}){const o=n,a=t,i=()=>{var A;if(o.modelValue&&o.modelValue.data)return;const k={id:((A=o.modelValue)==null?void 0:A.id)||R(),type:"Resources",onlyShowPc:!1,bgColor:"",iconLinks:[{id:R(),iconType:"pdf",linkType:"outer-link",text:"耀华国际教育学校",url:"https://osswebsite-test.cedim.cn/media-library/ywies-tx/pdf/YWIES%20Tongxiang_2024-2025%20School%20Year%20Calendar.pdf"}],textLinks:[{id:R(),text:"耀华国际教育学校",url:"http://baidu.com"}]};a("update:modelValue",k)},s=e.computed(()=>{var k;return o.isPreview?!((k=o.modelValue)!=null&&k.onlyShowPc)||!Ne():!0}),l=e.ref(!1),r=e.ref(!1),u=()=>{a("handleDelete",o.modelValue.id)},c=()=>{a("handleCopy",o.modelValue)},f=k=>{a("handlePaste",k)};i();const m=e.computed(()=>{var k;return((k=o.footer)==null?void 0:k.contact)??null}),d=e.computed(()=>{var k;return((k=m.value)==null?void 0:k.title)??null}),h=e.computed(()=>{var k;return((k=m.value)==null?void 0:k.subtitle)??null}),g=e.computed(()=>{var k;return((k=m.value)==null?void 0:k.address)??null}),p=e.computed(()=>{var k;return((k=m.value)==null?void 0:k.phone)??null}),b=e.computed(()=>{var k;return((k=m.value)==null?void 0:k.fax)??null}),_=e.computed(()=>{var k;return((k=m.value)==null?void 0:k.email)??null}),w=e.computed(()=>{var k;return!!((k=m.value)!=null&&k.qrcode)}),v=e.computed(()=>{var k;return!w.value&&!((k=m.value)!=null&&k.disable_newsletter)});function V(k=[],A=1){return k.reduce((B,I,z)=>{const Y=Math.floor(z/A);return B[Y]||(B[Y]=[]),B[Y].push(I),B},[])}const C=e.computed(()=>{var I;const k=((I=o.modelValue)==null?void 0:I.textLinks)||[];if(typeof window>"u")return[k];if((window.$_vsWidth??window.innerWidth)>=768)return[k];if(!k.length)return[];const B=Math.ceil(k.length/2);return V(k,B)}),S=k=>{a("showLightboxSubscribe",k)},N=k=>{a("showLightboxDonation",k)},D=k=>{a("handleClick",k)},$=()=>{a("clickHandler")};return(k,A)=>{var B,I,z,Y,H,q;return e.openBlock(),e.createElementBlock(e.Fragment,null,[s.value?(e.openBlock(),e.createElementBlock("div",{key:0,class:"resources",onMouseenter:A[2]||(A[2]=O=>l.value=!0),onMouseleave:A[3]||(A[3]=O=>l.value=!1),style:e.normalizeStyle({background:((B=n.modelValue)==null?void 0:B.bgColor)||"transparent"})},[e.createElementVNode("div",dL,[e.createElementVNode("div",uL,[e.createElementVNode("div",cL,[(I=n.modelValue)!=null&&I.iconLinks&&((z=n.modelValue)==null?void 0:z.iconLinks.length)>0?(e.openBlock(),e.createElementBlock("ul",mL,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList((Y=n.modelValue)==null?void 0:Y.iconLinks,(O,J)=>(e.openBlock(),e.createElementBlock("li",{key:J},[e.createVNode(fa,{linkType:O.linkType,iconType:O.iconType,url:O.url,text:O.text,light:O.light,size:"sm",isPreview:n.isPreview,onHandleClick:D},null,8,["linkType","iconType","url","text","light","isPreview"])]))),128))])):e.createCommentVNode("",!0)]),(H=n.modelValue)!=null&&H.textLinks&&((q=n.modelValue)==null?void 0:q.textLinks.length)>0?(e.openBlock(),e.createElementBlock("div",pL,[e.createElementVNode("div",hL,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(C.value,(O,J)=>(e.openBlock(),e.createElementBlock("ul",{key:J,class:"resources-text"},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(O,(F,M)=>(e.openBlock(),e.createElementBlock("li",{key:M},[n.isPreview?(e.openBlock(),e.createElementBlock("a",{key:0,href:F.url,class:"resources-link resources-link-underline"},e.toDisplayString(F.text),9,fL)):(e.openBlock(),e.createElementBlock("button",gL,e.toDisplayString(F.text),1))]))),128))]))),128))])])):e.createCommentVNode("",!0),e.createElementVNode("div",vL,[e.createElementVNode("div",yL,[e.createElementVNode("div",null,[v.value?(e.openBlock(),e.createElementBlock("div",_L,[e.createVNode(rL,{footer:n.footer,onShowLightboxSubscribe:S,onShowLightboxDonation:N,isCampus:"",class:"resources-px-0 resources-pb-4 resources-pt-0"},null,8,["footer"])])):e.createCommentVNode("",!0),e.createElementVNode("div",bL,[e.createElementVNode("h6",wL,e.toDisplayString(d.value),1),h.value?(e.openBlock(),e.createElementBlock("div",xL,e.toDisplayString(h.value),1)):e.createCommentVNode("",!0)]),e.createElementVNode("div",VL,[w.value?(e.openBlock(),e.createElementBlock("div",CL,[e.createElementVNode("img",{src:m.value.qrcode,alt:"qrcode"},null,8,kL)])):e.createCommentVNode("",!0),e.createElementVNode("ul",EL,[g.value&&g.value.text?(e.openBlock(),e.createElementBlock("li",TL,[e.createVNode(fa,{linkType:"outer-link",iconType:"pin",url:g.value.value,text:g.value.text},null,8,["url","text"])])):e.createCommentVNode("",!0),p.value&&p.value.numbers.length>0?(e.openBlock(),e.createElementBlock("li",NL,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(p.value.numbers,(O,J)=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:J},[p.value.numbers.length>0&&J!==0?(e.openBlock(),e.createElementBlock("span",{class:"resources-link-caption resources-text-blue",key:`slash-${J}`}," / ")):e.createCommentVNode("",!0),e.createVNode(fa,{linkType:"outer-link",class:"resources-text-nowrap",iconType:J==0?"phone":null,url:`tel:${O.value}`,text:O.value},null,8,["iconType","url","text"])],64))),128))])):e.createCommentVNode("",!0),b.value&&b.value.value?(e.openBlock(),e.createElementBlock("li",SL,[e.createVNode(fa,{linkType:"outer-link",iconType:"fax",url:`fax:${b.value.value}`,text:b.value.value},null,8,["url","text"])])):e.createCommentVNode("",!0),_.value&&_.value.value?(e.openBlock(),e.createElementBlock("li",BL,[e.createVNode(fa,{linkType:"outer-link",iconType:"email",url:`mailto:${_.value.value}`,text:_.value.value},null,8,["url","text"])])):e.createCommentVNode("",!0)])]),m.value.links?(e.openBlock(),e.createElementBlock("ul",DL,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(m.value.links,(O,J)=>(e.openBlock(),e.createElementBlock("li",{key:J},[(e.openBlock(),e.createBlock(fa,{key:`link-${J}`,linkType:O.linkType,iconType:O.iconType,size:O.size,text:O.text,url:O.url,light:O.light,isPreview:n.isPreview,onHandleClick:D,onClickHandler:$},null,8,["linkType","iconType","size","text","url","light","isPreview"]))]))),128))])):e.createCommentVNode("",!0)]),e.createElementVNode("div",PL,[m.value.qrcode?(e.openBlock(),e.createElementBlock("div",$L,[e.createElementVNode("img",{src:m.value.qrcode,alt:"qrcode"},null,8,AL)])):e.createCommentVNode("",!0)])])])])]),n.isPreview?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(Te,{key:0,show:l.value,"onUpdate:show":A[0]||(A[0]=O=>l.value=O),onHandleEdit:A[1]||(A[1]=O=>r.value=!0),onHandleDelete:u,onHandleCopy:c,onHandlePaste:f},null,8,["show"]))],36)):e.createCommentVNode("",!0),n.isPreview?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(ZA,{key:1,show:r.value,"onUpdate:show":A[4]||(A[4]=O=>r.value=O),data:n.modelValue},null,8,["show","data"]))],64)}}}),Rd=ne(LL,[["__scopeId","data-v-a187604f"]]),IL=Object.freeze(Object.defineProperty({__proto__:null,default:Rd},Symbol.toStringTag,{value:"Module"})),OL={class:"setting-content"},ML={class:"setting-header flex items-center"},UL={class:"setting-body"},RL={class:"setting-item"},FL={class:"btn-group"},HL={key:0,class:"drag-handle"},jL={class:"setting-item"},zL={class:"btn-group"},qL={key:0,class:"drag-handle"},WL=e.defineComponent({__name:"setting",props:{show:{type:Boolean,default:!1},data:{type:Object,default:()=>{}}},emits:["update:show"],setup(n,{emit:t}){const o=e.defineAsyncComponent(()=>import("vuedraggable")),a=e.ref(!1),i=e.computed(()=>({animation:200,group:"links",disabled:!1,ghostClass:"ghost",handle:".drag-handle",filter:".arco-input, .arco-select, .arco-checkbox",preventOnFilter:!1})),s=e.computed(()=>({animation:200,group:"social-links",disabled:!1,ghostClass:"ghost",handle:".drag-handle",filter:".arco-input, .arco-select, .arco-checkbox",preventOnFilter:!1})),l=_=>_&&_.length>1,r=n,u=t,c=()=>{u("update:show",!1)},f=e.computed(()=>[{value:"email",label:"Email"},{value:"fax",label:"Fax"},{value:"pdf",label:"PDF"},{value:"phone",label:"Phone"},{value:"pin",label:"Pin"},{value:"facebook",label:"Facebook"},{value:"instagram",label:"Instagram"},{value:"linkedin",label:"LinkedIn"},{value:"twitter",label:"Twitter"},{value:"wechat",label:"WeChat"},{value:"youtube",label:"YouTube"}]),m=e.computed(()=>[{value:"facebook",label:"Facebook"},{value:"instagram",label:"Instagram"},{value:"linkedin",label:"LinkedIn"},{value:"twitter",label:"Twitter"},{value:"wechat",label:"WeChat"},{value:"youtube",label:"YouTube"}]),d=e.computed(()=>[{value:"sm",label:"Small"},{value:"md",label:"Medium"}]),h=()=>{r.data.links.push({id:R(),iconType:void 0,linkType:"outer-link",text:"",url:"",isExternal:!1})},g=_=>{r.data.links=r.data.links.filter(w=>w.id!==_)},p=()=>{r.data.socialLinks.push({id:R(),text:"",url:"",isExternal:!1,iconType:void 0,iconSize:"md"})},b=_=>{r.data.socialLinks=r.data.socialLinks.filter(w=>w.id!==_)};return(_,w)=>{const v=e.resolveComponent("a-switch"),V=e.resolveComponent("icon-drag-arrow"),C=e.resolveComponent("icon-delete"),S=e.resolveComponent("a-input"),N=e.resolveComponent("a-option"),D=e.resolveComponent("a-select"),$=e.resolveComponent("a-checkbox"),k=e.resolveComponent("icon-plus"),A=e.resolveComponent("a-drawer");return e.openBlock(),e.createBlock(A,{width:500,visible:n.show,footer:!1,onCancel:c,unmountOnClose:""},{title:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(n.data.type)+"组件编辑 ",1)]),default:e.withCtx(()=>[e.createElementVNode("div",OL,[e.createElementVNode("div",ML,[w[9]||(w[9]=e.createElementVNode("span",{class:"header-title"},"仅显示PC端",-1)),e.createVNode(v,{modelValue:n.data.onlyShowPc,"onUpdate:modelValue":w[0]||(w[0]=B=>n.data.onlyShowPc=B)},null,8,["modelValue"])]),e.createElementVNode("div",UL,[e.createElementVNode("div",RL,[e.createVNode(e.unref(o),e.mergeProps({modelValue:n.data.links,"onUpdate:modelValue":w[1]||(w[1]=B=>n.data.links=B),"component-data":{tag:"div",type:"transition-group",name:a.value?null:"flip-list"}},i.value,{disabled:!l(n.data.links),onStart:w[2]||(w[2]=B=>a.value=!0),onEnd:w[3]||(w[3]=B=>a.value=!1),"item-key":"id"}),{item:e.withCtx(({element:B})=>[(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["item-button draggable-item",{"sortable-disabled":!l(n.data.links)}]),key:B.id},[e.createElementVNode("div",FL,[l(n.data.links)?(e.openBlock(),e.createElementBlock("div",HL,[e.createVNode(V,{class:"drag-icon"})])):e.createCommentVNode("",!0),e.createVNode(C,{class:"btn-delete",onClick:I=>g(B.id)},null,8,["onClick"])]),w[11]||(w[11]=e.createElementVNode("p",{class:"item-title"},"名称",-1)),e.createVNode(S,{modelValue:B.text,"onUpdate:modelValue":I=>B.text=I,placeholder:"请输入名称","allow-clear":""},null,8,["modelValue","onUpdate:modelValue"]),w[12]||(w[12]=e.createElementVNode("p",{class:"item-title"},"Icon",-1)),e.createVNode(D,{modelValue:B.iconType,"onUpdate:modelValue":I=>B.iconType=I,placeholder:"请选择图标","allow-clear":""},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(f.value,I=>(e.openBlock(),e.createBlock(N,{key:I.value,value:I.value},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(I.label),1)]),_:2},1032,["value"]))),128))]),_:1},8,["modelValue","onUpdate:modelValue"]),w[13]||(w[13]=e.createElementVNode("p",{class:"item-title"},"URL",-1)),e.createVNode(S,{modelValue:B.url,"onUpdate:modelValue":I=>B.url=I,placeholder:"请输入URL","allow-clear":""},null,8,["modelValue","onUpdate:modelValue"]),e.createVNode($,{modelValue:B.isExternal,"onUpdate:modelValue":I=>B.isExternal=I},{default:e.withCtx(()=>[...w[10]||(w[10]=[e.createTextVNode("是否外部链接",-1)])]),_:1},8,["modelValue","onUpdate:modelValue"])],2))]),_:1},16,["modelValue","component-data","disabled"]),e.createElementVNode("div",{class:"item-add-btn flex items-center",onClick:w[4]||(w[4]=B=>h())},[e.createVNode(k),w[14]||(w[14]=e.createElementVNode("span",{class:"btn-text"},"添加链接",-1))])]),e.createElementVNode("div",jL,[e.createVNode(e.unref(o),e.mergeProps({modelValue:n.data.socialLinks,"onUpdate:modelValue":w[5]||(w[5]=B=>n.data.socialLinks=B),"component-data":{tag:"div",type:"transition-group",name:a.value?null:"flip-list"}},s.value,{disabled:!l(n.data.socialLinks),onStart:w[6]||(w[6]=B=>a.value=!0),onEnd:w[7]||(w[7]=B=>a.value=!1),"item-key":"id"}),{item:e.withCtx(({element:B})=>[(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["item-button draggable-item",{"sortable-disabled":!l(n.data.socialLinks)}]),key:B.id},[e.createElementVNode("div",zL,[l(n.data.socialLinks)?(e.openBlock(),e.createElementBlock("div",qL,[e.createVNode(V,{class:"drag-icon"})])):e.createCommentVNode("",!0),e.createVNode(C,{class:"btn-delete",onClick:I=>b(B.id)},null,8,["onClick"])]),w[16]||(w[16]=e.createElementVNode("p",{class:"item-title"},"名称",-1)),e.createVNode(S,{modelValue:B.text,"onUpdate:modelValue":I=>B.text=I,placeholder:"请输入名称","allow-clear":""},null,8,["modelValue","onUpdate:modelValue"]),w[17]||(w[17]=e.createElementVNode("p",{class:"item-title"},"Icon",-1)),e.createVNode(D,{modelValue:B.iconType,"onUpdate:modelValue":I=>B.iconType=I,placeholder:"请选择图标","allow-clear":""},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(m.value,I=>(e.openBlock(),e.createBlock(N,{key:I.value,value:I.value},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(I.label),1)]),_:2},1032,["value"]))),128))]),_:1},8,["modelValue","onUpdate:modelValue"]),w[18]||(w[18]=e.createElementVNode("p",{class:"item-title"},"Icon Size",-1)),e.createVNode(D,{modelValue:B.iconSize,"onUpdate:modelValue":I=>B.iconSize=I,placeholder:"请选择图标大小","allow-clear":""},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(d.value,I=>(e.openBlock(),e.createBlock(N,{key:I.value,value:I.value},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(I.label),1)]),_:2},1032,["value"]))),128))]),_:1},8,["modelValue","onUpdate:modelValue"]),w[19]||(w[19]=e.createElementVNode("p",{class:"item-title"},"URL",-1)),e.createVNode(S,{modelValue:B.url,"onUpdate:modelValue":I=>B.url=I,placeholder:"请输入URL","allow-clear":""},null,8,["modelValue","onUpdate:modelValue"]),e.createVNode($,{modelValue:B.isExternal,"onUpdate:modelValue":I=>B.isExternal=I},{default:e.withCtx(()=>[...w[15]||(w[15]=[e.createTextVNode("是否外部链接",-1)])]),_:1},8,["modelValue","onUpdate:modelValue"])],2))]),_:1},16,["modelValue","component-data","disabled"]),e.createElementVNode("div",{class:"item-add-btn flex items-center",onClick:w[8]||(w[8]=B=>p())},[e.createVNode(k),w[20]||(w[20]=e.createElementVNode("span",{class:"btn-text"},"添加社交链接",-1))])])])])]),_:1},8,["visible"])}}}),GL=ne(WL,[["__scopeId","data-v-2144bf2c"]]),XL={class:"resources-two-wrapper"},YL={class:"resources-two-content"},KL={class:"resources-two-content-top"},QL={key:0,class:"resources-two-content-links"},JL={key:0,class:"resources-two-content-bottom"},ZL=e.defineComponent({__name:"index",props:{modelValue:{type:Object,default:()=>({})},isPreview:{type:Boolean,default:!0}},emits:["update:modelValue","handleDelete","handleCopy","handlePaste","showLightboxSubscribe","showLightboxDonation","handleClick","clickHandler"],setup(n,{emit:t}){const o=n,a=t,i=()=>{var h;if(o.modelValue&&o.modelValue.data)return;const d={id:((h=o.modelValue)==null?void 0:h.id)||R(),type:"ResourcesTwo",onlyShowPc:!1,links:[{id:R(),text:"这里是名称",iconType:"pdf",isExternal:!1,url:""}],socialLinks:[{id:R(),text:"这里是名称",iconType:"pdf",iconSize:"sm",isExternal:!1,url:""}]};a("update:modelValue",d)},s=e.computed(()=>{var d;return o.isPreview?!((d=o.modelValue)!=null&&d.onlyShowPc)||!Ne():!0}),l=e.ref(!1),r=e.ref(!1),u=()=>{a("handleDelete",o.modelValue.id)},c=()=>{a("handleCopy",o.modelValue)},f=d=>{a("handlePaste",d)};i();const m=d=>{a("handleClick",d)};return(d,h)=>{var g,p,b,_;return e.openBlock(),e.createElementBlock(e.Fragment,null,[s.value?(e.openBlock(),e.createElementBlock("div",{key:0,class:"resources-two",onMouseenter:h[2]||(h[2]=w=>l.value=!0),onMouseleave:h[3]||(h[3]=w=>l.value=!1)},[e.createElementVNode("div",XL,[e.createElementVNode("div",YL,[e.createElementVNode("div",KL,[(p=(g=n.modelValue)==null?void 0:g.links)!=null&&p.length?(e.openBlock(),e.createElementBlock("ul",QL,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.modelValue.links,(w,v)=>(e.openBlock(),e.createElementBlock("li",{key:v},[e.createVNode(fa,{iconType:w.iconType,url:w.url,text:w.text,light:w.light,isPreview:n.isPreview,onHandleClick:m},null,8,["iconType","url","text","light","isPreview"])]))),128))])):e.createCommentVNode("",!0)]),(_=(b=n.modelValue)==null?void 0:b.socialLinks)!=null&&_.length?(e.openBlock(),e.createElementBlock("ul",JL,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.modelValue.socialLinks,(w,v)=>(e.openBlock(),e.createElementBlock("li",{key:v},[e.createVNode(fa,{iconType:w.iconType,size:w.iconSize,text:w.text,url:w.url,light:w.light,isPreview:n.isPreview,onHandleClick:m},null,8,["iconType","size","text","url","light","isPreview"])]))),128))])):e.createCommentVNode("",!0)])]),n.isPreview?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(Te,{key:0,show:l.value,"onUpdate:show":h[0]||(h[0]=w=>l.value=w),onHandleEdit:h[1]||(h[1]=w=>r.value=!0),onHandleDelete:u,onHandleCopy:c,onHandlePaste:f},null,8,["show"]))],32)):e.createCommentVNode("",!0),n.isPreview?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(GL,{key:1,show:r.value,"onUpdate:show":h[4]||(h[4]=w=>r.value=w),data:n.modelValue},null,8,["show","data"]))],64)}}}),Fd=ne(ZL,[["__scopeId","data-v-63c819a9"]]),eI=Object.freeze(Object.defineProperty({__proto__:null,default:Fd},Symbol.toStringTag,{value:"Module"})),tI="data:image/svg+xml,%3csvg%20width='20'%20height='20'%20viewBox='0%200%2020%2020'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M10%2020C15.5228%2020%2020%2015.5228%2020%2010C20%204.47715%2015.5228%200%2010%200C4.47715%200%200%204.47715%200%2010C0%2015.5228%204.47715%2020%2010%2020ZM14.1793%2011.0448H11.0448L11.0448%2014.1793C11.0448%2014.7563%2010.577%2015.2241%2010%2015.2241C9.42296%2015.2241%208.95518%2014.7563%208.95518%2014.1793L8.95518%2011.0448H5.82074C5.2437%2011.0448%204.77592%2010.577%204.77592%209.99999C4.77592%209.42296%205.2437%208.95518%205.82074%208.95518L8.95518%208.95518L8.95518%205.82073C8.95518%205.2437%209.42296%204.77592%2010%204.77592C10.577%204.77592%2011.0448%205.2437%2011.0448%205.82073L11.0448%208.95518L14.1793%208.95518C14.7563%208.95518%2015.2241%209.42296%2015.2241%209.99999C15.2241%2010.577%2014.7563%2011.0448%2014.1793%2011.0448Z'%20fill='%230A1F8F'/%3e%3c/svg%3e",Xh="data:image/svg+xml,%3csvg%20width='16'%20height='16'%20viewBox='0%200%2016%2016'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M4.00024%2012L12.0002%204M4.00024%204L12.0002%2012'%20stroke='%231A1C20'%20stroke-linecap='round'/%3e%3c/svg%3e",nI={class:"setting-content"},oI={class:"setting-header flex items-center"},aI={class:"setting-header flex items-center"},iI={class:"setting-header flex items-center"},sI={class:"setting-body"},lI={class:"setting-item"},rI={class:"btn-group"},dI={key:0,class:"drag-handle"},uI=["src"],cI={class:"item-uplaod flex items-center"},mI=e.defineComponent({__name:"setting",props:{show:{type:Boolean,default:!1},data:{type:Object,default:()=>{}}},emits:["update:show"],setup(n,{emit:t}){const o=e.defineAsyncComponent(()=>import("vuedraggable")),a=e.ref(!1),i=e.computed(()=>({animation:200,group:"data",disabled:!1,ghostClass:"ghost",handle:".drag-handle",filter:".arco-input, .arco-select, .arco-checkbox",preventOnFilter:!1})),s=m=>m&&m.length>1,l=n,r=t,u=()=>{r("update:show",!1)},c=()=>{l.data.data.push({id:R(),title:"",des:"",imgSrc:"",alt:"",link:""})},f=m=>{l.data.data=l.data.data.filter(d=>d.id!==m)};return(m,d)=>{const h=e.resolveComponent("a-switch"),g=e.resolveComponent("a-input"),p=e.resolveComponent("icon-drag-arrow"),b=e.resolveComponent("icon-delete"),_=e.resolveComponent("icon-plus"),w=e.resolveComponent("a-drawer");return e.openBlock(),e.createBlock(w,{width:500,visible:n.show,footer:!1,onCancel:u,unmountOnClose:""},{title:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(n.data.type)+"组件编辑 ",1)]),default:e.withCtx(()=>[e.createElementVNode("div",nI,[e.createElementVNode("div",oI,[d[7]||(d[7]=e.createElementVNode("span",{class:"header-title"},"仅显示PC端",-1)),e.createVNode(h,{modelValue:n.data.onlyShowPc,"onUpdate:modelValue":d[0]||(d[0]=v=>n.data.onlyShowPc=v)},null,8,["modelValue"])]),e.createElementVNode("div",aI,[d[8]||(d[8]=e.createElementVNode("span",{class:"header-title"},"链接名称",-1)),e.createVNode(g,{modelValue:n.data.link.text,"onUpdate:modelValue":d[1]||(d[1]=v=>n.data.link.text=v),placeholder:"请输入text","allow-clear":""},null,8,["modelValue"])]),e.createElementVNode("div",iI,[d[9]||(d[9]=e.createElementVNode("span",{class:"header-title"},"链接地址",-1)),e.createVNode(g,{modelValue:n.data.link.url,"onUpdate:modelValue":d[2]||(d[2]=v=>n.data.link.url=v),placeholder:"请输入url","allow-clear":""},null,8,["modelValue"])]),e.createElementVNode("div",sI,[e.createElementVNode("div",lI,[e.createVNode(e.unref(o),e.mergeProps({modelValue:n.data.data,"onUpdate:modelValue":d[3]||(d[3]=v=>n.data.data=v),"component-data":{tag:"div",type:"transition-group",name:a.value?null:"flip-list"}},i.value,{disabled:!s(n.data.data),onStart:d[4]||(d[4]=v=>a.value=!0),onEnd:d[5]||(d[5]=v=>a.value=!1),"item-key":"id"}),{item:e.withCtx(({element:v})=>[(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["item-button draggable-item",{"sortable-disabled":!s(n.data.data)}]),key:v.id},[e.createElementVNode("div",rI,[s(n.data.data)?(e.openBlock(),e.createElementBlock("div",dI,[e.createVNode(p,{class:"drag-icon"})])):e.createCommentVNode("",!0),e.createVNode(b,{class:"btn-delete",onClick:V=>f(v.id)},null,8,["onClick"])]),d[10]||(d[10]=e.createElementVNode("p",{class:"item-title"},"标题",-1)),e.createVNode(g,{modelValue:v.title,"onUpdate:modelValue":V=>v.title=V,placeholder:"请输入标题","allow-clear":""},null,8,["modelValue","onUpdate:modelValue"]),d[11]||(d[11]=e.createElementVNode("p",{class:"item-title"},"描述",-1)),e.createVNode(g,{modelValue:v.des,"onUpdate:modelValue":V=>v.des=V,placeholder:"请输入描述","allow-clear":""},null,8,["modelValue","onUpdate:modelValue"]),d[12]||(d[12]=e.createElementVNode("p",{class:"item-title"},"图片",-1)),e.createElementVNode("img",{class:"item-img",src:v.imgSrc},null,8,uI),e.createElementVNode("div",cI,[e.createVNode(g,{modelValue:v.imgSrc,"onUpdate:modelValue":V=>v.imgSrc=V,placeholder:"请输入图片链接","allow-clear":""},null,8,["modelValue","onUpdate:modelValue"]),e.createVNode(ze,{modelValue:v.imgSrc,"onUpdate:modelValue":V=>v.imgSrc=V,name:`Disc_img_${v.id}`},null,8,["modelValue","onUpdate:modelValue","name"])]),e.createVNode(g,{class:"mt-2",modelValue:v.alt,"onUpdate:modelValue":V=>v.alt=V,placeholder:"图片alt","allow-clear":""},null,8,["modelValue","onUpdate:modelValue"]),d[13]||(d[13]=e.createElementVNode("p",{class:"item-title"},"链接",-1)),e.createVNode(g,{modelValue:v.link,"onUpdate:modelValue":V=>v.link=V,placeholder:"请输入URL","allow-clear":""},null,8,["modelValue","onUpdate:modelValue"])],2))]),_:1},16,["modelValue","component-data","disabled"]),e.createElementVNode("div",{class:"item-add-btn flex items-center",onClick:d[6]||(d[6]=v=>c())},[e.createVNode(_),d[14]||(d[14]=e.createElementVNode("span",{class:"btn-text"},"添加",-1))])])])])]),_:1},8,["visible"])}}}),pI=ne(mI,[["__scopeId","data-v-cb32a440"]]),hI={class:"disc"},fI=["onClick"],gI=["src","alt"],vI={class:"disc__camp__content"},yI={class:"camp-title"},_I={class:"camp-des"},bI={key:0,class:"disc__link"},wI={key:0,class:"disc__mask"},xI={key:0,class:"disc__campMid"},VI={class:"disc__campMid__content"},CI=["src","alt"],kI={class:"d-flex"},EI={class:"camp-title-mobile"},TI=["src","alt"],NI={class:"camp-title"},SI={class:"camp-des my-2"},BI=e.defineComponent({name:"Disc",__name:"index",props:{modelValue:{type:Object,default:()=>({})},isPreview:{type:Boolean,default:!0}},emits:["update:modelValue","handleDelete","handleCopy","handlePaste","handleClick"],setup(n,{emit:t}){const o=n,a=t,i=()=>{var C;if(o.modelValue&&o.modelValue.data)return;const V={id:((C=o.modelValue)==null?void 0:C.id)||R(),type:"Disc",onlyShowPc:!1,data:[{id:R(),title:"这里是标题1",des:"这里是描述1",imgSrc:"https://osswebsite-test.cedim.cn/media-library/ywies-tx/images/campus-life/school-facilities/00_yard%2001.jpg",alt:"",link:""},{id:R(),title:"这里是标题2",des:"这里是描述2",imgSrc:"https://osswebsite-test.cedim.cn/media-library/ywies-tx/images/campus-life/school-facilities/00_yard%2001.jpg",alt:"",link:""}],link:{id:R(),text:"链接名称",url:""}};a("update:modelValue",V)},s=e.computed(()=>{var V;return o.isPreview?!((V=o.modelValue)!=null&&V.onlyShowPc)||!Ne():!0}),l=e.ref(!1),r=e.ref(!1),u=()=>{a("handleDelete",o.modelValue.id)},c=()=>{a("handleCopy",o.modelValue)},f=V=>{a("handlePaste",V)},m=V=>{a("handleClick",V)};i();const d=e.ref(null),h=e.ref({}),g=e.ref(typeof window<"u"?window.innerWidth:1024),p=e.computed(()=>g.value>=1024),b=V=>{if(!(typeof window>"u"))try{const C=document.body.classList;V?C.add("no-scroll"):C.remove("no-scroll")}catch{}},_=(V,C)=>{d.value=V,h.value=C||{},g.value<=768&&b(!0)},w=()=>{d.value=null,h.value={},g.value<=768&&b(!1)},v=()=>{typeof window<"u"&&(g.value=window.innerWidth)};return e.onMounted(()=>{typeof window<"u"&&(g.value=window.innerWidth,window.addEventListener("resize",v))}),e.onBeforeUnmount(()=>{typeof window<"u"&&window.removeEventListener("resize",v)}),(V,C)=>{var S,N,D,$,k,A;return e.openBlock(),e.createElementBlock(e.Fragment,null,[s.value?(e.openBlock(),e.createElementBlock("div",{key:0,class:"disc-bg",onMouseenter:C[3]||(C[3]=B=>l.value=!0),onMouseleave:C[4]||(C[4]=B=>l.value=!1)},[e.createElementVNode("div",hI,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList((S=n.modelValue)==null?void 0:S.data,(B,I)=>(e.openBlock(),e.createElementBlock("div",{key:I,class:e.normalizeClass(["disc__camp",{show:d.value===I&&p.value===!0}])},[e.createElementVNode("div",{class:"disc__camp__logo",onClick:z=>_(I,B)},[e.createElementVNode("img",{class:"logo",src:B.imgSrc,alt:B.alt},null,8,gI),e.createElementVNode("div",{class:e.normalizeClass(["disc__camp__logo__show-btn",{"d-none":d.value===I&&p.value===!0}])},[...C[6]||(C[6]=[e.createElementVNode("img",{src:tI,alt:"了解更多"},null,-1)])],2)],8,fI),e.createElementVNode("div",vI,[e.createElementVNode("img",{onClick:C[0]||(C[0]=z=>w()),class:"camp-cross",src:Xh,alt:"关闭"}),e.createElementVNode("p",yI,e.toDisplayString(B.title),1),e.createElementVNode("p",_I,e.toDisplayString(B.des),1),B.link?(e.openBlock(),e.createBlock(qo,{key:0,type:"link",data:{text:"了解更多",url:B.link},isPreview:n.isPreview,onHandleClick:m},null,8,["data","isPreview"])):e.createCommentVNode("",!0)])],2))),128)),(D=(N=n.modelValue)==null?void 0:N.link)!=null&&D.text||(k=($=n.modelValue)==null?void 0:$.link)!=null&&k.url?(e.openBlock(),e.createElementBlock("div",bI,[e.createVNode(qo,{type:"link",data:(A=n.modelValue)==null?void 0:A.link,isPreview:n.isPreview,onHandleClick:m},null,8,["data","isPreview"])])):e.createCommentVNode("",!0),C[7]||(C[7]=e.createElementVNode("div",{class:"disc__mid"},[e.createElementVNode("img",{src:"https://ywies-tx.cedim.cn/_nuxt/img/logo-ycyw.0a99fd4.png",alt:"YCYW"})],-1))]),h.value.id-1===d.value?(e.openBlock(),e.createElementBlock("div",wI,[e.createElementVNode("div",{class:"disc__mask__bg",onClick:w}),h.value.id-1===d.value&&p.value===!1?(e.openBlock(),e.createElementBlock("div",xI,[e.createElementVNode("div",VI,[e.createElementVNode("img",{class:"camp-logo camp-logo-desktop",src:h.value.imgSrc,alt:h.value.alt},null,8,CI),e.createElementVNode("div",null,[e.createElementVNode("div",kI,[e.createElementVNode("div",EI,[e.createElementVNode("img",{class:"camp-logo camp-logo-mobile",src:h.value.imgSrc,alt:h.value.alt},null,8,TI),e.createElementVNode("p",NI,e.toDisplayString(h.value.title),1)]),e.createElementVNode("img",{onClick:w,class:"camp-cross",src:Xh,alt:"关闭"})]),e.createElementVNode("p",SI,e.toDisplayString(h.value.des),1),h.value.link?(e.openBlock(),e.createBlock(qo,{key:0,type:"link",data:{text:"了解更多",url:h.value.link},isPreview:n.isPreview,onHandleClick:m},null,8,["data","isPreview"])):e.createCommentVNode("",!0)])])])):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),n.isPreview?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(Te,{key:1,show:l.value,"onUpdate:show":C[1]||(C[1]=B=>l.value=B),onHandleEdit:C[2]||(C[2]=B=>r.value=!0),onHandleDelete:u,onHandleCopy:c,onHandlePaste:f},null,8,["show"]))],32)):e.createCommentVNode("",!0),n.isPreview?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(pI,{key:1,show:r.value,"onUpdate:show":C[5]||(C[5]=B=>r.value=B),data:n.modelValue},null,8,["show","data"]))],64)}}}),Hd=ne(BI,[["__scopeId","data-v-603d54c8"]]),DI=Object.freeze(Object.defineProperty({__proto__:null,default:Hd},Symbol.toStringTag,{value:"Module"})),PI=["innerHTML"],$I={key:0,class:"table-content-right-or tx-body-big"},AI=e.defineComponent({name:"TheCollapse",__name:"index",props:{isDescription:{type:Boolean,default:!1},index:{default:0},maxIndex:{default:0},collapseID:{default:""},title:{default:""},detail:{default:""}},setup(n){const t=e.ref(!0),o=e.ref(!1),a=()=>{t.value=!t.value,o.value=!0,setTimeout(()=>{o.value=!1},360)};return(i,s)=>(e.openBlock(),e.createElementBlock("div",null,[e.createElementVNode("div",{class:e.normalizeClass(["table-content-right-btn",{collapsed:t.value}])},[e.createElementVNode("p",{class:e.normalizeClass({"tx-h4 text-primary":n.isDescription,"tx-body-big":!n.isDescription})},e.toDisplayString(n.title),3),e.createElementVNode("div",{class:"icon__plus",onClick:a})],2),e.createElementVNode("div",{class:e.normalizeClass(["collapse",{show:!t.value||o.value,collapsing:o.value}])},[e.createElementVNode("div",{class:"table-content-right-detail",innerHTML:n.detail},null,8,PI)],2),n.index<n.maxIndex?(e.openBlock(),e.createElementBlock("div",$I," OR ")):e.createCommentVNode("",!0)]))}}),iv=ne(AI,[["__scopeId","data-v-c659b3e0"]]),LI={class:"setting-content"},II={class:"setting-header flex items-center"},OI={class:"setting-header flex items-center"},MI={class:"setting-header flex items-center"},UI={class:"setting-body"},RI={class:"setting-item"},FI={class:"btn-group"},HI={key:0,class:"drag-handle"},jI=e.defineComponent({__name:"setting",props:{show:{type:Boolean,default:!1},data:{type:Object,default:()=>{}}},emits:["update:show"],setup(n,{emit:t}){const o=e.defineAsyncComponent(()=>import("vuedraggable")),a=e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./index-QFpkZqlg.js"))),i=e.ref(!1),s=e.computed(()=>({animation:200,group:"data",disabled:!1,ghostClass:"ghost",handle:".drag-handle",filter:".rich-text-editor, .arco-input, .arco-select, .arco-checkbox",preventOnFilter:!1})),l=d=>d&&d.length>1,r=n,u=t,c=()=>{u("update:show",!1)},f=()=>{r.data.data.push({id:R(),title:"",detail:""})},m=d=>{r.data.data=r.data.data.filter(h=>h.id!==d)};return(d,h)=>{const g=e.resolveComponent("a-switch"),p=e.resolveComponent("a-option"),b=e.resolveComponent("a-select"),_=e.resolveComponent("icon-drag-arrow"),w=e.resolveComponent("icon-delete"),v=e.resolveComponent("a-input"),V=e.resolveComponent("icon-plus"),C=e.resolveComponent("a-drawer");return e.openBlock(),e.createBlock(C,{width:500,visible:n.show,footer:!1,onCancel:c,unmountOnClose:""},{title:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(n.data.type)+"组件编辑 ",1)]),default:e.withCtx(()=>[e.createElementVNode("div",LI,[e.createElementVNode("div",II,[h[7]||(h[7]=e.createElementVNode("span",{class:"header-title"},"仅显示PC端",-1)),e.createVNode(g,{modelValue:n.data.onlyShowPc,"onUpdate:modelValue":h[0]||(h[0]=S=>n.data.onlyShowPc=S)},null,8,["modelValue"])]),e.createElementVNode("div",OI,[h[12]||(h[12]=e.createElementVNode("span",{class:"header-title"},"组件宽度",-1)),e.createVNode(b,{modelValue:n.data.width,"onUpdate:modelValue":h[1]||(h[1]=S=>n.data.width=S),placeholder:"请选择","allow-clear":""},{default:e.withCtx(()=>[e.createVNode(p,{value:"default"},{default:e.withCtx(()=>[...h[8]||(h[8]=[e.createTextVNode("默认",-1)])]),_:1}),e.createVNode(p,{value:"small"},{default:e.withCtx(()=>[...h[9]||(h[9]=[e.createTextVNode("小",-1)])]),_:1}),e.createVNode(p,{value:"middle"},{default:e.withCtx(()=>[...h[10]||(h[10]=[e.createTextVNode("中",-1)])]),_:1}),e.createVNode(p,{value:"max"},{default:e.withCtx(()=>[...h[11]||(h[11]=[e.createTextVNode("大",-1)])]),_:1})]),_:1},8,["modelValue"])]),e.createElementVNode("div",MI,[h[15]||(h[15]=e.createElementVNode("span",{class:"header-title"},"组件背景",-1)),e.createVNode(b,{modelValue:n.data.bgColor,"onUpdate:modelValue":h[2]||(h[2]=S=>n.data.bgColor=S),placeholder:"请选择","allow-clear":""},{default:e.withCtx(()=>[e.createVNode(p,{value:"#ffffff"},{default:e.withCtx(()=>[...h[13]||(h[13]=[e.createTextVNode("白色",-1)])]),_:1}),e.createVNode(p,{value:"#F7F7FA"},{default:e.withCtx(()=>[...h[14]||(h[14]=[e.createTextVNode("灰色",-1)])]),_:1})]),_:1},8,["modelValue"])]),e.createElementVNode("div",UI,[e.createElementVNode("div",RI,[e.createVNode(e.unref(o),e.mergeProps({modelValue:n.data.data,"onUpdate:modelValue":h[3]||(h[3]=S=>n.data.data=S),"component-data":{tag:"div",type:"transition-group",name:i.value?null:"flip-list"}},s.value,{disabled:!l(n.data.data),onStart:h[4]||(h[4]=S=>i.value=!0),onEnd:h[5]||(h[5]=S=>i.value=!1),"item-key":"id"}),{item:e.withCtx(({element:S})=>[(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["item-button draggable-item",{"sortable-disabled":!l(n.data.data)}]),key:S.id},[e.createElementVNode("div",FI,[l(n.data.data)?(e.openBlock(),e.createElementBlock("div",HI,[e.createVNode(_,{class:"drag-icon"})])):e.createCommentVNode("",!0),e.createVNode(w,{class:"btn-delete",onClick:N=>m(S.id)},null,8,["onClick"])]),h[16]||(h[16]=e.createElementVNode("p",{class:"item-title"},"标题",-1)),e.createVNode(v,{modelValue:S.title,"onUpdate:modelValue":N=>S.title=N,placeholder:"请输入标题","allow-clear":""},null,8,["modelValue","onUpdate:modelValue"]),h[17]||(h[17]=e.createElementVNode("p",{class:"item-title"},"内容",-1)),e.createVNode(e.unref(a),{modelValue:S.detail,"onUpdate:modelValue":N=>S.detail=N,name:`BasicCollapse_editor_${n.data.id}`},null,8,["modelValue","onUpdate:modelValue","name"])],2))]),_:1},16,["modelValue","component-data","disabled"]),e.createElementVNode("div",{class:"item-add-btn flex items-center",onClick:h[6]||(h[6]=S=>f())},[e.createVNode(V),h[18]||(h[18]=e.createElementVNode("span",{class:"btn-text"},"添加",-1))])])])])]),_:1},8,["visible"])}}}),zI=ne(jI,[["__scopeId","data-v-a5fd9b53"]]),qI=e.defineComponent({name:"BasicCollapse",__name:"index",props:{modelValue:{type:Object,default:()=>({})},isPreview:{type:Boolean,default:!0}},emits:["update:modelValue","handleDelete","handleCopy","handlePaste"],setup(n,{emit:t}){const o=n,a=t,i=()=>{var d;if(o.modelValue&&o.modelValue.data)return;const m={id:((d=o.modelValue)==null?void 0:d.id)||R(),type:"BasicCollapse",onlyShowPc:!1,bgColor:"",width:"",isDescription:!0,data:[{id:R(),title:"这里是标题",detail:"<p>这里是详情</p>"},{id:R(),title:"这里是标题",detail:"<p>这里是详情</p>"}]};a("update:modelValue",m)},s=e.computed(()=>{var m;return o.isPreview?!((m=o.modelValue)!=null&&m.onlyShowPc)||!Ne():!0}),l=e.ref(!1),r=e.ref(!1),u=()=>{a("handleDelete",o.modelValue.id)},c=()=>{a("handleCopy",o.modelValue)},f=m=>{a("handlePaste",m)};return i(),(m,d)=>{var h,g,p,b;return e.openBlock(),e.createElementBlock(e.Fragment,null,[s.value?(e.openBlock(),e.createElementBlock("div",{key:0,class:"bg-neutral-light basic-collapse",onMouseenter:d[2]||(d[2]=_=>l.value=!0),onMouseleave:d[3]||(d[3]=_=>l.value=!1),style:e.normalizeStyle({background:((h=n.modelValue)==null?void 0:h.bgColor)||"transparent"})},[e.createElementVNode("div",{class:e.normalizeClass([(g=n.modelValue)!=null&&g.width?`container-content-${(p=n.modelValue)==null?void 0:p.width}`:"container-content"])},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList((b=n.modelValue)==null?void 0:b.data,(_,w)=>{var v,V;return e.openBlock(),e.createElementBlock("div",{key:_.id},[e.createVNode(iv,{index:Number(w)+1,maxIndex:(v=n.modelValue)==null?void 0:v.data.length,isDescription:(V=n.modelValue)==null?void 0:V.isDescription,collapseID:_.id,title:_.title,detail:_.detail},null,8,["index","maxIndex","isDescription","collapseID","title","detail"])])}),128))],2),n.isPreview?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(Te,{key:0,show:l.value,"onUpdate:show":d[0]||(d[0]=_=>l.value=_),onHandleEdit:d[1]||(d[1]=_=>r.value=!0),onHandleDelete:u,onHandleCopy:c,onHandlePaste:f},null,8,["show"]))],36)):e.createCommentVNode("",!0),n.isPreview?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(zI,{key:1,show:r.value,"onUpdate:show":d[4]||(d[4]=_=>r.value=_),data:n.modelValue},null,8,["show","data"]))],64)}}}),jd=ne(qI,[["__scopeId","data-v-6f7b20e5"]]),WI=Object.freeze(Object.defineProperty({__proto__:null,default:jd},Symbol.toStringTag,{value:"Module"})),GI={class:"setting-content"},XI={class:"setting-header flex items-center"},YI={class:"setting-header flex items-center"},KI={class:"setting-header flex items-center"},QI={class:"setting-header flex items-center"},JI={class:"setting-header flex items-center"},ZI={class:"setting-header flex items-center"},e6={class:"setting-header flex items-center"},t6={class:"setting-body"},n6={class:"setting-item"},o6={class:"btn-group"},a6={key:0,class:"drag-handle"},i6={class:"setting-item"},s6={class:"btn-group"},l6={key:0,class:"drag-handle"},r6=["onClick"],d6={class:"setting-item"},u6={class:"btn-group"},c6={key:0,class:"drag-handle"},m6=["onClick"],p6=e.defineComponent({__name:"setting",props:{show:{type:Boolean,default:!1},data:{type:Object,default:()=>{}}},emits:["update:show"],setup(n,{emit:t}){const o=e.defineAsyncComponent(()=>import("vuedraggable")),a=e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./index-QFpkZqlg.js"))),i=e.ref(!1),s=e.computed(()=>({animation:200,group:"data",disabled:!1,ghostClass:"ghost",handle:".drag-handle",filter:".rich-text-editor, .arco-input, .arco-select, .arco-checkbox",preventOnFilter:!1})),l=e.computed(()=>({animation:200,group:"collapse",disabled:!1,ghostClass:"ghost",handle:".drag-handle",filter:".rich-text-editor, .arco-input, .arco-select, .arco-checkbox",preventOnFilter:!1})),r=e.computed(()=>({animation:200,group:"basic",disabled:!1,ghostClass:"ghost",handle:".drag-handle",filter:".rich-text-editor, .arco-input, .arco-select, .arco-checkbox",preventOnFilter:!1})),u=w=>w&&w.length>1,c=n,f=t,m=()=>{f("update:show",!1)},d=()=>{c.data.data.push({id:R(),yearName:"",collapseList:[],basicList:[]})},h=w=>{c.data.data=c.data.data.filter(v=>v.id!==w)},g=w=>{w.push({id:R(),title:"",detail:""})},p=w=>{w.push({id:R(),title:""})},b=(w,v)=>{w=w.filter(V=>V.id!==v)},_=(w,v)=>{w=w.filter(V=>V.id!==v)};return(w,v)=>{const V=e.resolveComponent("a-switch"),C=e.resolveComponent("a-option"),S=e.resolveComponent("a-select"),N=e.resolveComponent("a-input"),D=e.resolveComponent("icon-drag-arrow"),$=e.resolveComponent("icon-delete"),k=e.resolveComponent("icon-plus"),A=e.resolveComponent("a-drawer");return e.openBlock(),e.createBlock(A,{width:500,visible:n.show,footer:!1,onCancel:m,unmountOnClose:""},{title:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(n.data.type)+"组件编辑 ",1)]),default:e.withCtx(()=>[e.createElementVNode("div",GI,[e.createElementVNode("div",XI,[v[15]||(v[15]=e.createElementVNode("span",{class:"header-title"},"仅显示PC端",-1)),e.createVNode(V,{modelValue:n.data.onlyShowPc,"onUpdate:modelValue":v[0]||(v[0]=B=>n.data.onlyShowPc=B)},null,8,["modelValue"])]),e.createElementVNode("div",YI,[v[20]||(v[20]=e.createElementVNode("span",{class:"header-title"},"组件宽度",-1)),e.createVNode(S,{modelValue:n.data.width,"onUpdate:modelValue":v[1]||(v[1]=B=>n.data.width=B),placeholder:"请选择","allow-clear":""},{default:e.withCtx(()=>[e.createVNode(C,{value:"default"},{default:e.withCtx(()=>[...v[16]||(v[16]=[e.createTextVNode("默认",-1)])]),_:1}),e.createVNode(C,{value:"small"},{default:e.withCtx(()=>[...v[17]||(v[17]=[e.createTextVNode("小",-1)])]),_:1}),e.createVNode(C,{value:"middle"},{default:e.withCtx(()=>[...v[18]||(v[18]=[e.createTextVNode("中",-1)])]),_:1}),e.createVNode(C,{value:"max"},{default:e.withCtx(()=>[...v[19]||(v[19]=[e.createTextVNode("大",-1)])]),_:1})]),_:1},8,["modelValue"])]),e.createElementVNode("div",KI,[v[23]||(v[23]=e.createElementVNode("span",{class:"header-title"},"组件背景",-1)),e.createVNode(S,{modelValue:n.data.bgColor,"onUpdate:modelValue":v[2]||(v[2]=B=>n.data.bgColor=B),placeholder:"请选择","allow-clear":""},{default:e.withCtx(()=>[e.createVNode(C,{value:"#ffffff"},{default:e.withCtx(()=>[...v[21]||(v[21]=[e.createTextVNode("白色",-1)])]),_:1}),e.createVNode(C,{value:"#F7F7FA"},{default:e.withCtx(()=>[...v[22]||(v[22]=[e.createTextVNode("灰色",-1)])]),_:1})]),_:1},8,["modelValue"])]),e.createElementVNode("div",QI,[v[26]||(v[26]=e.createElementVNode("span",{class:"header-title"},"大标题",-1)),e.createVNode(S,{modelValue:n.data.isDescription,"onUpdate:modelValue":v[3]||(v[3]=B=>n.data.isDescription=B),placeholder:"请选择"},{default:e.withCtx(()=>[e.createVNode(C,{value:!0},{default:e.withCtx(()=>[...v[24]||(v[24]=[e.createTextVNode("是",-1)])]),_:1}),e.createVNode(C,{value:!1},{default:e.withCtx(()=>[...v[25]||(v[25]=[e.createTextVNode("否",-1)])]),_:1})]),_:1},8,["modelValue"])]),e.createElementVNode("div",JI,[v[29]||(v[29]=e.createElementVNode("span",{class:"header-title"},"更多",-1)),e.createVNode(S,{modelValue:n.data.seeMore,"onUpdate:modelValue":v[4]||(v[4]=B=>n.data.seeMore=B),placeholder:"请选择"},{default:e.withCtx(()=>[e.createVNode(C,{value:!0},{default:e.withCtx(()=>[...v[27]||(v[27]=[e.createTextVNode("是",-1)])]),_:1}),e.createVNode(C,{value:!1},{default:e.withCtx(()=>[...v[28]||(v[28]=[e.createTextVNode("否",-1)])]),_:1})]),_:1},8,["modelValue"])]),e.createElementVNode("div",ZI,[v[30]||(v[30]=e.createElementVNode("span",{class:"header-title"},"左侧标题",-1)),e.createVNode(N,{modelValue:n.data.tableHeaderLeft,"onUpdate:modelValue":v[5]||(v[5]=B=>n.data.tableHeaderLeft=B),placeholder:"请输入","allow-clear":""},null,8,["modelValue"])]),e.createElementVNode("div",e6,[v[31]||(v[31]=e.createElementVNode("span",{class:"header-title"},"右侧标题",-1)),e.createVNode(N,{modelValue:n.data.tableHeaderRight,"onUpdate:modelValue":v[6]||(v[6]=B=>n.data.tableHeaderRight=B),placeholder:"请输入","allow-clear":""},null,8,["modelValue"])]),e.createElementVNode("div",t6,[e.createElementVNode("div",n6,[e.createVNode(e.unref(o),e.mergeProps({modelValue:n.data.data,"onUpdate:modelValue":v[11]||(v[11]=B=>n.data.data=B),"component-data":{tag:"div",type:"transition-group",name:i.value?null:"flip-list"}},s.value,{disabled:!u(n.data.data),onStart:v[12]||(v[12]=B=>i.value=!0),onEnd:v[13]||(v[13]=B=>i.value=!1),"item-key":"id"}),{item:e.withCtx(({element:B})=>[(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["item-button draggable-item",{"sortable-disabled":!u(n.data.data)}]),key:B.id},[e.createElementVNode("div",o6,[u(n.data.data)?(e.openBlock(),e.createElementBlock("div",a6,[e.createVNode(D,{class:"drag-icon"})])):e.createCommentVNode("",!0),e.createVNode($,{class:"btn-delete",onClick:I=>h(B.id)},null,8,["onClick"])]),v[37]||(v[37]=e.createElementVNode("p",{class:"item-title"},"标题",-1)),e.createVNode(N,{modelValue:B.yearName,"onUpdate:modelValue":I=>B.yearName=I,placeholder:"请输入标题","allow-clear":""},null,8,["modelValue","onUpdate:modelValue"]),v[38]||(v[38]=e.createElementVNode("p",{class:"item-title"},"Collapse List",-1)),e.createElementVNode("div",i6,[e.createVNode(e.unref(o),e.mergeProps({modelValue:B.collapseList,"onUpdate:modelValue":I=>B.collapseList=I,"component-data":{tag:"div",type:"transition-group",name:i.value?null:"flip-list"}},l.value,{disabled:!u(B.collapseList),onStart:v[7]||(v[7]=I=>i.value=!0),onEnd:v[8]||(v[8]=I=>i.value=!1),"item-key":"id"}),{item:e.withCtx(({element:I})=>[(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["item-button draggable-item",{"sortable-disabled":!u(B.collapseList)}]),key:I.id},[e.createElementVNode("div",s6,[u(B.collapseList)?(e.openBlock(),e.createElementBlock("div",l6,[e.createVNode(D,{class:"drag-icon"})])):e.createCommentVNode("",!0),e.createVNode($,{class:"btn-delete",onClick:z=>b(B.collapseList,I.id)},null,8,["onClick"])]),v[32]||(v[32]=e.createElementVNode("p",{class:"item-title"},"标题",-1)),e.createVNode(N,{modelValue:I.title,"onUpdate:modelValue":z=>I.title=z,placeholder:"请输入标题","allow-clear":""},null,8,["modelValue","onUpdate:modelValue"]),v[33]||(v[33]=e.createElementVNode("p",{class:"item-title"},"内容",-1)),e.createVNode(e.unref(a),{modelValue:I.detail,"onUpdate:modelValue":z=>I.detail=z,name:`BasicCollapse_editor_${I.id}`},null,8,["modelValue","onUpdate:modelValue","name"])],2))]),_:2},1040,["modelValue","onUpdate:modelValue","component-data","disabled"]),e.createElementVNode("div",{class:"item-add-btn flex items-center",onClick:I=>g(B.collapseList)},[e.createVNode(k),v[34]||(v[34]=e.createElementVNode("span",{class:"btn-text"},"添加",-1))],8,r6)]),v[39]||(v[39]=e.createElementVNode("p",{class:"item-title"},"Basic List",-1)),e.createElementVNode("div",d6,[e.createVNode(e.unref(o),e.mergeProps({modelValue:B.basicList,"onUpdate:modelValue":I=>B.basicList=I,"component-data":{tag:"div",type:"transition-group",name:i.value?null:"flip-list"}},r.value,{disabled:!u(B.basicList),onStart:v[9]||(v[9]=I=>i.value=!0),onEnd:v[10]||(v[10]=I=>i.value=!1),"item-key":"id"}),{item:e.withCtx(({element:I})=>[(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["item-button draggable-item",{"sortable-disabled":!u(B.basicList)}]),key:I.id},[e.createElementVNode("div",u6,[u(B.basicList)?(e.openBlock(),e.createElementBlock("div",c6,[e.createVNode(D,{class:"drag-icon"})])):e.createCommentVNode("",!0),e.createVNode($,{class:"btn-delete",onClick:z=>_(B.basicList,I.id)},null,8,["onClick"])]),v[35]||(v[35]=e.createElementVNode("p",{class:"item-title"},"标题",-1)),e.createVNode(N,{modelValue:I.title,"onUpdate:modelValue":z=>I.title=z,placeholder:"请输入标题","allow-clear":""},null,8,["modelValue","onUpdate:modelValue"])],2))]),_:2},1040,["modelValue","onUpdate:modelValue","component-data","disabled"]),e.createElementVNode("div",{class:"item-add-btn flex items-center",onClick:I=>p(B.basicList)},[e.createVNode(k),v[36]||(v[36]=e.createElementVNode("span",{class:"btn-text"},"添加",-1))],8,m6)])],2))]),_:1},16,["modelValue","component-data","disabled"]),e.createElementVNode("div",{class:"item-add-btn flex items-center",onClick:v[14]||(v[14]=B=>d())},[e.createVNode(k),v[40]||(v[40]=e.createElementVNode("span",{class:"btn-text"},"添加",-1))])])])])]),_:1},8,["visible"])}}}),h6=ne(p6,[["__scopeId","data-v-295376f7"]]),f6={class:"more-button-text see-less"},g6={class:"table-header-left"},v6={class:"table-header-right"},y6={class:"table-content-left"},_6={class:"tx-body-big"},b6={class:"table-content-right"},w6=e.defineComponent({name:"TableCollapse",__name:"index",props:{modelValue:{type:Object,default:()=>({})},isPreview:{type:Boolean,default:!0}},emits:["update:modelValue","handleDelete","handleCopy","handlePaste"],setup(n,{emit:t}){const o=n,a=t,i=()=>{var p;if(o.modelValue&&o.modelValue.data)return;const g={id:((p=o.modelValue)==null?void 0:p.id)||R(),type:"TableCollapse",onlyShowPc:!1,bgColor:"",width:"",isDescription:!1,seeMore:!0,tableHeaderLeft:"Year",tableHeaderRight:"Reruirement",data:[{id:R(),yearName:"标题",collapseList:[{id:R(),title:"这里是标题",detail:"<p>这里是详情</p>"}],basicList:[{id:R(),title:"这里是标题"}]},{id:R(),yearName:"这里是标题",collapseList:[],basicList:[]}]};a("update:modelValue",g)},s=e.computed(()=>{var g;return o.isPreview?!((g=o.modelValue)!=null&&g.onlyShowPc)||!Ne():!0}),l=e.ref(!1),r=e.ref(!1),u=e.ref(!0),c=e.ref(!1),f=()=>{u.value=!u.value,c.value=!0,setTimeout(()=>{c.value=!1},360)},m=()=>{a("handleDelete",o.modelValue.id)},d=()=>{a("handleCopy",o.modelValue)},h=g=>{a("handlePaste",g)};return i(),(g,p)=>{var b,_,w,v,V,C,S,N,D,$,k,A;return e.openBlock(),e.createElementBlock(e.Fragment,null,[s.value?(e.openBlock(),e.createElementBlock("div",{key:0,class:"bg-neutral-light table-collapse",onMouseenter:p[2]||(p[2]=B=>l.value=!0),onMouseleave:p[3]||(p[3]=B=>l.value=!1),style:e.normalizeStyle({background:((b=n.modelValue)==null?void 0:b.bgColor)||"transparent"})},[e.createElementVNode("div",{class:e.normalizeClass([(_=n.modelValue)!=null&&_.width?`container-content-${(w=n.modelValue)==null?void 0:w.width}`:"container-content"])},[(v=n.modelValue)!=null&&v.seeMore?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(["more-button",{collapsed:u.value}]),onClick:f,role:"button",tabindex:"0"},[e.createElementVNode("p",f6,e.toDisplayString(u.value?"更多":"收合"),1),p[5]||(p[5]=e.createElementVNode("span",{class:"i i-load-more i-load-more--dark"},null,-1))],2)):e.createCommentVNode("",!0),e.createElementVNode("div",{class:e.normalizeClass(["collapse",{show:!u.value||c.value,collapsing:c.value}])},[((C=(V=n.modelValue)==null?void 0:V.data)==null?void 0:C.length)>0?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(["table-header",{"mt-8":(S=n.modelValue)==null?void 0:S.seeMore}])},[e.createElementVNode("div",g6,e.toDisplayString((N=n.modelValue)==null?void 0:N.tableHeaderLeft),1),e.createElementVNode("div",v6,e.toDisplayString((D=n.modelValue)==null?void 0:D.tableHeaderRight),1)],2)):e.createCommentVNode("",!0),((k=($=n.modelValue)==null?void 0:$.data)==null?void 0:k.length)>0?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:1},e.renderList((A=n.modelValue)==null?void 0:A.data,B=>(e.openBlock(),e.createElementBlock("div",{class:"table-content",key:B.yearName},[e.createElementVNode("div",y6,[e.createElementVNode("p",_6,e.toDisplayString(B.yearName),1)]),e.createElementVNode("div",b6,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(B.collapseList,(I,z)=>(e.openBlock(),e.createElementBlock("div",{class:"",key:I.id},[e.createVNode(iv,{index:z+1,maxIndex:B.collapseList.length,collapseID:I.id,title:I.title,detail:I.detail},null,8,["index","maxIndex","collapseID","title","detail"])]))),128)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(B.basicList,I=>{var z,Y;return e.openBlock(),e.createElementBlock("div",{key:I.id},[e.createElementVNode("p",{class:e.normalizeClass(["mt-6",{"tx-h4":(z=n.modelValue)==null?void 0:z.isDescription,"tx-body-big":!((Y=n.modelValue)!=null&&Y.isDescription)}])},e.toDisplayString(I.title),3)])}),128))])]))),128)):e.createCommentVNode("",!0)],2)],2),n.isPreview?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(Te,{key:0,show:l.value,"onUpdate:show":p[0]||(p[0]=B=>l.value=B),onHandleEdit:p[1]||(p[1]=B=>r.value=!0),onHandleDelete:m,onHandleCopy:d,onHandlePaste:h},null,8,["show"]))],36)):e.createCommentVNode("",!0),n.isPreview?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(h6,{key:1,show:r.value,"onUpdate:show":p[4]||(p[4]=B=>r.value=B),data:n.modelValue},null,8,["show","data"]))],64)}}}),zd=ne(w6,[["__scopeId","data-v-51019ee7"]]),x6=Object.freeze(Object.defineProperty({__proto__:null,default:zd},Symbol.toStringTag,{value:"Module"})),V6={class:"setting-content"},C6={class:"setting-header flex items-center"},k6={class:"setting-header flex items-center"},E6={class:"setting-header flex items-center"},T6={class:"setting-header flex items-center"},N6={class:"setting-body"},S6={class:"setting-item"},B6={class:"btn-group"},D6={key:0,class:"drag-handle"},P6=["src"],$6={class:"item-uplaod flex items-center"},A6=e.defineComponent({__name:"setting",props:{show:{type:Boolean,default:!1},data:{type:Object,default:()=>{}}},emits:["update:show"],setup(n,{emit:t}){const o=e.defineAsyncComponent(()=>import("vuedraggable")),a=e.ref(!1),i=e.computed(()=>({animation:200,group:"data",disabled:!1,ghostClass:"ghost",handle:".drag-handle",filter:".arco-input, .arco-select, .arco-checkbox",preventOnFilter:!1})),s=m=>m&&m.length>1,l=n,r=t,u=()=>{r("update:show",!1)},c=()=>{l.data.data.push({id:R(),imgSrc:"",alt:""})},f=m=>{l.data.data=l.data.data.filter(d=>d.id!==m)};return(m,d)=>{const h=e.resolveComponent("a-switch"),g=e.resolveComponent("a-option"),p=e.resolveComponent("a-select"),b=e.resolveComponent("icon-drag-arrow"),_=e.resolveComponent("icon-delete"),w=e.resolveComponent("a-input"),v=e.resolveComponent("icon-plus"),V=e.resolveComponent("a-drawer");return e.openBlock(),e.createBlock(V,{width:500,visible:n.show,footer:!1,onCancel:u,unmountOnClose:""},{title:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(n.data.type)+"组件编辑 ",1)]),default:e.withCtx(()=>[e.createElementVNode("div",V6,[e.createElementVNode("div",C6,[d[8]||(d[8]=e.createElementVNode("span",{class:"header-title"},"仅在PC端显示",-1)),e.createVNode(h,{modelValue:n.data.onlyShowPc,"onUpdate:modelValue":d[0]||(d[0]=C=>n.data.onlyShowPc=C)},null,8,["modelValue"])]),e.createElementVNode("div",k6,[d[13]||(d[13]=e.createElementVNode("span",{class:"header-title"},"组件宽度",-1)),e.createVNode(p,{modelValue:n.data.width,"onUpdate:modelValue":d[1]||(d[1]=C=>n.data.width=C),placeholder:"请选择","allow-clear":""},{default:e.withCtx(()=>[e.createVNode(g,{value:"default"},{default:e.withCtx(()=>[...d[9]||(d[9]=[e.createTextVNode("默认",-1)])]),_:1}),e.createVNode(g,{value:"small"},{default:e.withCtx(()=>[...d[10]||(d[10]=[e.createTextVNode("小",-1)])]),_:1}),e.createVNode(g,{value:"middle"},{default:e.withCtx(()=>[...d[11]||(d[11]=[e.createTextVNode("中",-1)])]),_:1}),e.createVNode(g,{value:"max"},{default:e.withCtx(()=>[...d[12]||(d[12]=[e.createTextVNode("大",-1)])]),_:1})]),_:1},8,["modelValue"])]),e.createElementVNode("div",E6,[d[16]||(d[16]=e.createElementVNode("span",{class:"header-title"},"组件背景",-1)),e.createVNode(p,{modelValue:n.data.bgColor,"onUpdate:modelValue":d[2]||(d[2]=C=>n.data.bgColor=C),placeholder:"请选择","allow-clear":""},{default:e.withCtx(()=>[e.createVNode(g,{value:"#ffffff"},{default:e.withCtx(()=>[...d[14]||(d[14]=[e.createTextVNode("白色",-1)])]),_:1}),e.createVNode(g,{value:"#F7F7FA"},{default:e.withCtx(()=>[...d[15]||(d[15]=[e.createTextVNode("灰色",-1)])]),_:1})]),_:1},8,["modelValue"])]),e.createElementVNode("div",T6,[d[19]||(d[19]=e.createElementVNode("span",{class:"header-title"},"大标题",-1)),e.createVNode(p,{modelValue:n.data.isDescription,"onUpdate:modelValue":d[3]||(d[3]=C=>n.data.isDescription=C),placeholder:"请选择"},{default:e.withCtx(()=>[e.createVNode(g,{value:!0},{default:e.withCtx(()=>[...d[17]||(d[17]=[e.createTextVNode("是",-1)])]),_:1}),e.createVNode(g,{value:!1},{default:e.withCtx(()=>[...d[18]||(d[18]=[e.createTextVNode("否",-1)])]),_:1})]),_:1},8,["modelValue"])]),e.createElementVNode("div",N6,[e.createElementVNode("div",S6,[e.createVNode(e.unref(o),e.mergeProps({modelValue:n.data.data,"onUpdate:modelValue":d[4]||(d[4]=C=>n.data.data=C),"component-data":{tag:"div",type:"transition-group",name:a.value?null:"flip-list"}},i.value,{disabled:!s(n.data.data),onStart:d[5]||(d[5]=C=>a.value=!0),onEnd:d[6]||(d[6]=C=>a.value=!1),"item-key":"id"}),{item:e.withCtx(({element:C})=>[(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["item-button draggable-item",{"sortable-disabled":!s(n.data.data)}]),key:C.id},[e.createElementVNode("div",B6,[s(n.data.data)?(e.openBlock(),e.createElementBlock("div",D6,[e.createVNode(b,{class:"drag-icon"})])):e.createCommentVNode("",!0),e.createVNode(_,{class:"btn-delete",onClick:S=>f(C.id)},null,8,["onClick"])]),d[20]||(d[20]=e.createElementVNode("p",{class:"item-title"},"图片",-1)),e.createElementVNode("img",{class:"item-img",src:C.imgSrc},null,8,P6),e.createElementVNode("div",$6,[e.createVNode(w,{modelValue:C.imgSrc,"onUpdate:modelValue":S=>C.imgSrc=S,placeholder:"请输入图片链接","allow-clear":""},null,8,["modelValue","onUpdate:modelValue"]),e.createVNode(ze,{modelValue:C.imgSrc,"onUpdate:modelValue":S=>C.imgSrc=S,name:`MediaLogo_img_${C.id}`},null,8,["modelValue","onUpdate:modelValue","name"])])],2))]),_:1},16,["modelValue","component-data","disabled"]),e.createElementVNode("div",{class:"item-add-btn flex items-center",onClick:d[7]||(d[7]=C=>c())},[e.createVNode(v),d[21]||(d[21]=e.createElementVNode("span",{class:"btn-text"},"添加",-1))])])])])]),_:1},8,["visible"])}}}),L6=ne(A6,[["__scopeId","data-v-e1ad1ab3"]]),I6={key:0,class:"media-logo-img flex-center"},O6=["src","alt"],M6={key:1,class:"media-logo-carousel"},U6={class:"media-logo-slide-content"},R6=["src","alt"],F6=e.defineComponent({name:"MediaLogo",__name:"index",props:{modelValue:{type:Object,default:()=>({})},isPreview:{type:Boolean,default:!0}},emits:["update:modelValue","handleDelete","handleCopy","handlePaste"],setup(n,{emit:t}){const o=n,a=t,i=()=>{var h;if(o.modelValue&&o.modelValue.data)return;const d={id:((h=o.modelValue)==null?void 0:h.id)||R(),type:"MediaLogo",onlyShowPc:!1,bgColor:"",width:"",data:[{id:R(),imgSrc:" https://ywies-tx.cedim.cn/_nuxt/img/logo-ycyw.0a99fd4.png",alt:""},{id:R(),imgSrc:" https://ywies-tx.cedim.cn/_nuxt/img/logo-ycyw.0a99fd4.png",alt:""}]};a("update:modelValue",d)},s=e.computed(()=>{var d;return o.isPreview?!((d=o.modelValue)!=null&&d.onlyShowPc)||!Ne():!0}),l=e.ref(!1),r=e.ref(!1),u=()=>{a("handleDelete",o.modelValue.id)},c=()=>{a("handleCopy",o.modelValue)},f=d=>{a("handlePaste",d)};i();const m=[ct.Pagination];return(d,h)=>{var p,b,_,w,v,V,C,S;const g=e.resolveComponent("client-only");return e.openBlock(),e.createElementBlock(e.Fragment,null,[s.value?(e.openBlock(),e.createElementBlock("div",{key:0,class:"media-logo",onMouseenter:h[2]||(h[2]=N=>l.value=!0),onMouseleave:h[3]||(h[3]=N=>l.value=!1),style:e.normalizeStyle({background:((p=n.modelValue)==null?void 0:p.bgColor)||"transparent"})},[e.createElementVNode("div",{class:e.normalizeClass(["media-logo-wrapper flex-center",[(b=n.modelValue)!=null&&b.width?`container-content-${(_=n.modelValue)==null?void 0:_.width}`:"container-content"]])},[(w=n.modelValue)!=null&&w.data&&((v=n.modelValue)==null?void 0:v.data.length)===1?(e.openBlock(),e.createElementBlock("div",I6,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList((V=n.modelValue)==null?void 0:V.data,N=>(e.openBlock(),e.createElementBlock("img",{key:N.id,src:N.imgSrc,alt:N.alt},null,8,O6))),128))])):e.createCommentVNode("",!0),(C=n.modelValue)!=null&&C.data&&((S=n.modelValue)==null?void 0:S.data.length)>1?(e.openBlock(),e.createElementBlock("div",M6,[e.createVNode(g,null,{default:e.withCtx(()=>[e.createVNode(e.unref(Et.Swiper),{ref:"swiperRef",modules:m,"centered-slides":!0,"slides-per-view":1,speed:600,pagination:{el:".swiper-pagination",clickable:!0},class:"swiper media-logo-swiper"},{default:e.withCtx(()=>{var N;return[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList((N=n.modelValue)==null?void 0:N.data,D=>(e.openBlock(),e.createBlock(e.unref(Et.SwiperSlide),{key:D.id,class:"swiper-slide"},{default:e.withCtx(()=>[e.createElementVNode("div",U6,[e.createElementVNode("img",{src:D.imgSrc,alt:D.alt},null,8,R6)])]),_:2},1024))),128)),h[5]||(h[5]=e.createElementVNode("div",{class:"swiper-pagination"},null,-1))]}),_:1},512)]),_:1})])):e.createCommentVNode("",!0)],2),n.isPreview?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(Te,{key:0,show:l.value,"onUpdate:show":h[0]||(h[0]=N=>l.value=N),onHandleEdit:h[1]||(h[1]=N=>r.value=!0),onHandleDelete:u,onHandleCopy:c,onHandlePaste:f},null,8,["show"]))],36)):e.createCommentVNode("",!0),n.isPreview?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(L6,{key:1,show:r.value,"onUpdate:show":h[4]||(h[4]=N=>r.value=N),data:n.modelValue},null,8,["show","data"]))],64)}}}),Cl=ne(F6,[["__scopeId","data-v-9c09a80e"]]),H6=Object.freeze(Object.defineProperty({__proto__:null,default:Cl},Symbol.toStringTag,{value:"Module"}));var cl=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function ti(n){return n&&n.__esModule&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n}function sv(n){if(n.__esModule)return n;var t=n.default;if(typeof t=="function"){var o=function a(){return this instanceof a?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};o.prototype=t.prototype}else o={};return Object.defineProperty(o,"__esModule",{value:!0}),Object.keys(n).forEach(function(a){var i=Object.getOwnPropertyDescriptor(n,a);Object.defineProperty(o,a,i.get?i:{enumerable:!0,get:function(){return n[a]}})}),o}var lv={exports:{}},rv={exports:{}};(function(){var n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",t={rotl:function(o,a){return o<<a|o>>>32-a},rotr:function(o,a){return o<<32-a|o>>>a},endian:function(o){if(o.constructor==Number)return t.rotl(o,8)&16711935|t.rotl(o,24)&4278255360;for(var a=0;a<o.length;a++)o[a]=t.endian(o[a]);return o},randomBytes:function(o){for(var a=[];o>0;o--)a.push(Math.floor(Math.random()*256));return a},bytesToWords:function(o){for(var a=[],i=0,s=0;i<o.length;i++,s+=8)a[s>>>5]|=o[i]<<24-s%32;return a},wordsToBytes:function(o){for(var a=[],i=0;i<o.length*32;i+=8)a.push(o[i>>>5]>>>24-i%32&255);return a},bytesToHex:function(o){for(var a=[],i=0;i<o.length;i++)a.push((o[i]>>>4).toString(16)),a.push((o[i]&15).toString(16));return a.join("")},hexToBytes:function(o){for(var a=[],i=0;i<o.length;i+=2)a.push(parseInt(o.substr(i,2),16));return a},bytesToBase64:function(o){for(var a=[],i=0;i<o.length;i+=3)for(var s=o[i]<<16|o[i+1]<<8|o[i+2],l=0;l<4;l++)i*8+l*6<=o.length*8?a.push(n.charAt(s>>>6*(3-l)&63)):a.push("=");return a.join("")},base64ToBytes:function(o){o=o.replace(/[^A-Z0-9+\/]/ig,"");for(var a=[],i=0,s=0;i<o.length;s=++i%4)s!=0&&a.push((n.indexOf(o.charAt(i-1))&Math.pow(2,-2*s+8)-1)<<s*2|n.indexOf(o.charAt(i))>>>6-s*2);return a}};rv.exports=t})();var j6=rv.exports,Hc={utf8:{stringToBytes:function(n){return Hc.bin.stringToBytes(unescape(encodeURIComponent(n)))},bytesToString:function(n){return decodeURIComponent(escape(Hc.bin.bytesToString(n)))}},bin:{stringToBytes:function(n){for(var t=[],o=0;o<n.length;o++)t.push(n.charCodeAt(o)&255);return t},bytesToString:function(n){for(var t=[],o=0;o<n.length;o++)t.push(String.fromCharCode(n[o]));return t.join("")}}},Yh=Hc;/*!
|
|
17
|
+
* Determine if an object is a Buffer
|
|
18
|
+
*
|
|
19
|
+
* @author Feross Aboukhadijeh <https://feross.org>
|
|
20
|
+
* @license MIT
|
|
21
|
+
*/var z6=function(n){return n!=null&&(dv(n)||q6(n)||!!n._isBuffer)};function dv(n){return!!n.constructor&&typeof n.constructor.isBuffer=="function"&&n.constructor.isBuffer(n)}function q6(n){return typeof n.readFloatLE=="function"&&typeof n.slice=="function"&&dv(n.slice(0,0))}(function(){var n=j6,t=Yh.utf8,o=z6,a=Yh.bin,i=function(s,l){s.constructor==String?l&&l.encoding==="binary"?s=a.stringToBytes(s):s=t.stringToBytes(s):o(s)?s=Array.prototype.slice.call(s,0):!Array.isArray(s)&&s.constructor!==Uint8Array&&(s=s.toString());for(var r=n.bytesToWords(s),u=s.length*8,c=1732584193,f=-271733879,m=-1732584194,d=271733878,h=0;h<r.length;h++)r[h]=(r[h]<<8|r[h]>>>24)&16711935|(r[h]<<24|r[h]>>>8)&4278255360;r[u>>>5]|=128<<u%32,r[(u+64>>>9<<4)+14]=u;for(var g=i._ff,p=i._gg,b=i._hh,_=i._ii,h=0;h<r.length;h+=16){var w=c,v=f,V=m,C=d;c=g(c,f,m,d,r[h+0],7,-680876936),d=g(d,c,f,m,r[h+1],12,-389564586),m=g(m,d,c,f,r[h+2],17,606105819),f=g(f,m,d,c,r[h+3],22,-1044525330),c=g(c,f,m,d,r[h+4],7,-176418897),d=g(d,c,f,m,r[h+5],12,1200080426),m=g(m,d,c,f,r[h+6],17,-1473231341),f=g(f,m,d,c,r[h+7],22,-45705983),c=g(c,f,m,d,r[h+8],7,1770035416),d=g(d,c,f,m,r[h+9],12,-1958414417),m=g(m,d,c,f,r[h+10],17,-42063),f=g(f,m,d,c,r[h+11],22,-1990404162),c=g(c,f,m,d,r[h+12],7,1804603682),d=g(d,c,f,m,r[h+13],12,-40341101),m=g(m,d,c,f,r[h+14],17,-1502002290),f=g(f,m,d,c,r[h+15],22,1236535329),c=p(c,f,m,d,r[h+1],5,-165796510),d=p(d,c,f,m,r[h+6],9,-1069501632),m=p(m,d,c,f,r[h+11],14,643717713),f=p(f,m,d,c,r[h+0],20,-373897302),c=p(c,f,m,d,r[h+5],5,-701558691),d=p(d,c,f,m,r[h+10],9,38016083),m=p(m,d,c,f,r[h+15],14,-660478335),f=p(f,m,d,c,r[h+4],20,-405537848),c=p(c,f,m,d,r[h+9],5,568446438),d=p(d,c,f,m,r[h+14],9,-1019803690),m=p(m,d,c,f,r[h+3],14,-187363961),f=p(f,m,d,c,r[h+8],20,1163531501),c=p(c,f,m,d,r[h+13],5,-1444681467),d=p(d,c,f,m,r[h+2],9,-51403784),m=p(m,d,c,f,r[h+7],14,1735328473),f=p(f,m,d,c,r[h+12],20,-1926607734),c=b(c,f,m,d,r[h+5],4,-378558),d=b(d,c,f,m,r[h+8],11,-2022574463),m=b(m,d,c,f,r[h+11],16,1839030562),f=b(f,m,d,c,r[h+14],23,-35309556),c=b(c,f,m,d,r[h+1],4,-1530992060),d=b(d,c,f,m,r[h+4],11,1272893353),m=b(m,d,c,f,r[h+7],16,-155497632),f=b(f,m,d,c,r[h+10],23,-1094730640),c=b(c,f,m,d,r[h+13],4,681279174),d=b(d,c,f,m,r[h+0],11,-358537222),m=b(m,d,c,f,r[h+3],16,-722521979),f=b(f,m,d,c,r[h+6],23,76029189),c=b(c,f,m,d,r[h+9],4,-640364487),d=b(d,c,f,m,r[h+12],11,-421815835),m=b(m,d,c,f,r[h+15],16,530742520),f=b(f,m,d,c,r[h+2],23,-995338651),c=_(c,f,m,d,r[h+0],6,-198630844),d=_(d,c,f,m,r[h+7],10,1126891415),m=_(m,d,c,f,r[h+14],15,-1416354905),f=_(f,m,d,c,r[h+5],21,-57434055),c=_(c,f,m,d,r[h+12],6,1700485571),d=_(d,c,f,m,r[h+3],10,-1894986606),m=_(m,d,c,f,r[h+10],15,-1051523),f=_(f,m,d,c,r[h+1],21,-2054922799),c=_(c,f,m,d,r[h+8],6,1873313359),d=_(d,c,f,m,r[h+15],10,-30611744),m=_(m,d,c,f,r[h+6],15,-1560198380),f=_(f,m,d,c,r[h+13],21,1309151649),c=_(c,f,m,d,r[h+4],6,-145523070),d=_(d,c,f,m,r[h+11],10,-1120210379),m=_(m,d,c,f,r[h+2],15,718787259),f=_(f,m,d,c,r[h+9],21,-343485551),c=c+w>>>0,f=f+v>>>0,m=m+V>>>0,d=d+C>>>0}return n.endian([c,f,m,d])};i._ff=function(s,l,r,u,c,f,m){var d=s+(l&r|~l&u)+(c>>>0)+m;return(d<<f|d>>>32-f)+l},i._gg=function(s,l,r,u,c,f,m){var d=s+(l&u|r&~u)+(c>>>0)+m;return(d<<f|d>>>32-f)+l},i._hh=function(s,l,r,u,c,f,m){var d=s+(l^r^u)+(c>>>0)+m;return(d<<f|d>>>32-f)+l},i._ii=function(s,l,r,u,c,f,m){var d=s+(r^(l|~u))+(c>>>0)+m;return(d<<f|d>>>32-f)+l},i._blocksize=16,i._digestsize=16,lv.exports=function(s,l){if(s==null)throw new Error("Illegal argument "+s);var r=n.wordsToBytes(i(s,l));return l&&l.asBytes?r:l&&l.asString?a.bytesToString(r):n.bytesToHex(r)}})();var W6=lv.exports;const G6=ti(W6),X6={class:"setting-content"},Y6={class:"setting-header flex items-center"},K6={class:"setting-header flex items-center"},Q6={class:"setting-header flex items-center"},J6={class:"setting-header flex items-center"},Z6={class:"setting-header flex items-center"},eO={class:"setting-header flex items-center"},tO=e.defineComponent({__name:"setting",props:{show:{type:Boolean,default:!1},data:{type:Object,default:()=>{}}},emits:["update:show"],setup(n,{emit:t}){const o=t,a=()=>{o("update:show",!1)};return(i,s)=>{const l=e.resolveComponent("a-switch"),r=e.resolveComponent("a-input"),u=e.resolveComponent("a-drawer");return e.openBlock(),e.createBlock(u,{width:500,visible:n.show,footer:!1,onCancel:a,unmountOnClose:""},{title:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(n.data.type)+"组件编辑 ",1)]),default:e.withCtx(()=>[e.createElementVNode("div",X6,[e.createElementVNode("div",Y6,[s[6]||(s[6]=e.createElementVNode("span",{class:"header-title"},"仅在PC端显示",-1)),e.createVNode(l,{modelValue:n.data.onlyShowPc,"onUpdate:modelValue":s[0]||(s[0]=c=>n.data.onlyShowPc=c)},null,8,["modelValue"])]),e.createElementVNode("div",K6,[s[7]||(s[7]=e.createElementVNode("span",{class:"header-title"},"表单名称",-1)),e.createVNode(r,{modelValue:n.data.data.title,"onUpdate:modelValue":s[1]||(s[1]=c=>n.data.data.title=c),placeholder:"请输入表单名称"},null,8,["modelValue"])]),e.createElementVNode("div",Q6,[s[8]||(s[8]=e.createElementVNode("span",{class:"header-title"},"Event Code (Key)",-1)),e.createVNode(r,{modelValue:n.data.data.event_name,"onUpdate:modelValue":s[2]||(s[2]=c=>n.data.data.event_name=c),placeholder:"请输入Event Code (Key)"},null,8,["modelValue"])]),e.createElementVNode("div",J6,[s[9]||(s[9]=e.createElementVNode("span",{class:"header-title"},"同意复选框文本",-1)),e.createVNode(r,{modelValue:n.data.data.checkText,"onUpdate:modelValue":s[3]||(s[3]=c=>n.data.data.checkText=c),placeholder:"请输入同意复选框文本"},null,8,["modelValue"])]),e.createElementVNode("div",Z6,[s[10]||(s[10]=e.createElementVNode("span",{class:"header-title"},"同意通知",-1)),e.createVNode(r,{modelValue:n.data.data.notice,"onUpdate:modelValue":s[4]||(s[4]=c=>n.data.data.notice=c),placeholder:"请输入同意通知"},null,8,["modelValue"])]),e.createElementVNode("div",eO,[s[11]||(s[11]=e.createElementVNode("span",{class:"header-title"},"提交api",-1)),e.createVNode(r,{modelValue:n.data.api,"onUpdate:modelValue":s[5]||(s[5]=c=>n.data.api=c),placeholder:"请输入提交api"},null,8,["modelValue"])])])]),_:1},8,["visible"])}}}),nO=ne(tO,[["__scopeId","data-v-cb758cdc"]]),oO=["innerHTML"],aO={class:"form-input-group"},iO=["placeholder","value","onInput"],sO={key:0,class:"input-error"},lO=e.defineComponent({name:"FormInput",__name:"index",props:{value:{default:()=>[]},line:{default:1},title:{default:""},placeholder:{default:""},styleType:{default:""},optional:{type:Boolean,default:!1},componentKey:{default:""}},emits:["updateValue","updateError"],setup(n,{expose:t,emit:o}){const a=n,i=o,s=e.ref([]),l=e.computed({get(){return a.value||new Array(a.line)},set(c){i("updateValue",c),e.nextTick(r)}}),r=()=>{if(a.optional)return;const c=l.value.some(m=>!!m),f=a.componentKey??"tempKey";!c&&s.value.indexOf(f)<0&&s.value.push(f),c&&s.value.indexOf(f)>-1&&s.value.splice(s.value.indexOf(f),1),i("updateError",{key:a.componentKey,isPass:c})},u=(c,f)=>{const m=f.target,d=JSON.parse(JSON.stringify(l.value));d.splice(c,1,m.value),l.value=d};return t({checkError:r}),(c,f)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["form-input",{"--is-tight":n.styleType=="2"}])},[e.createElementVNode("div",{class:"tx-btn text-blue-dark mb-1",innerHTML:n.title},null,8,oO),e.createElementVNode("div",aO,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.line,(m,d)=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:`input-${d}`},[e.createElementVNode("input",{class:e.normalizeClass(["default-input",{"has-error":s.value.length>0&&d==0}]),type:"text",placeholder:d==0?n.placeholder:"请输入",value:l.value[d],onInput:h=>u(d,h)},null,42,iO),d==0?(e.openBlock(),e.createElementBlock("div",sO,"此为必填项")):e.createCommentVNode("",!0)],64))),128))])],2))}}),Kh=ne(lO,[["__scopeId","data-v-c52c5e09"]]),rO={class:"tx-btn text-blue-dark mb-1"},dO=["placeholder"],uO={class:"form-select__menu"},cO={class:"form-select__list"},mO=["onClick"],pO={class:"input-error"},hO={__name:"index",props:{options:{type:Array,default:()=>[]},value:{type:String,default:""},title:{type:String,default:""},optionPlaceholder:{type:String,default:"请选择"},error:{type:Object,default:null},isEmptyFirst:{type:Boolean,default:!1},optional:{type:Boolean,default:!1},componentKey:{type:String,default:null}},emits:["updateValue","updateError"],setup(n,{expose:t,emit:o}){const a=n,i=o;e.ref(Date.now());const s=e.ref(!1),l=e.ref([]),r=e.ref(null),u=e.computed({get(){return a.options.some(d=>d.value==a.value)?a.value:""},set(d){i("updateValue",d),c()}});function c(){if(a.optional)return;const d=u.value,h=a.componentKey??"tempKey",g=l.value.indexOf(h);!d&&g<0&&l.value.push(h),d&&g>-1&&l.value.splice(g,1),i("updateError",{key:a.componentKey,isPass:!!d})}function f(d){u.value=d,s.value=!1}function m(d){r.value&&!r.value.contains(d.target)&&(s.value=!1)}return e.onMounted(()=>{!u.value&&!a.isEmptyFirst&&a.options&&a.options[0]&&(i("updateValue",a.options[0].value),c()),document.addEventListener("click",m)}),e.onBeforeUnmount(()=>{document.removeEventListener("click",m)}),t({checkError:c}),(d,h)=>(e.openBlock(),e.createElementBlock("div",{class:"form-select",ref_key:"selectRef",ref:r},[e.createElementVNode("div",rO,e.toDisplayString(n.title),1),e.createElementVNode("div",{class:e.normalizeClass(["form-select__select",{"is-active":s.value,"has-error":l.value.length>0&&!n.optional}]),onClick:h[1]||(h[1]=g=>s.value=!s.value)},[e.withDirectives(e.createElementVNode("input",{type:"text",class:"form-select__btn",placeholder:n.optionPlaceholder,"onUpdate:modelValue":h[0]||(h[0]=g=>u.value=g),readonly:""},null,8,dO),[[e.vModelText,u.value]]),e.createElementVNode("div",uO,[e.createVNode(Zi,null,{default:e.withCtx(()=>[e.createElementVNode("ul",cO,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.options,g=>(e.openBlock(),e.createElementBlock("li",{class:"form-select__option",key:g.key,onClick:p=>f(g.value)},e.toDisplayString(g.name),9,mO))),128))])]),_:1})])],2),e.withDirectives(e.createElementVNode("div",pO,"此为必填项",512),[[e.vShow,!n.optional]])],512))}},fO=ne(hO,[["__scopeId","data-v-c2a92ed3"]]),gO={class:"tx-btn text-blue-dark mb-1"},vO=["onClick"],yO={class:"option-label text-teal"},_O={class:"option-name text-black"},bO={key:0,class:"input-error"},wO={key:1,class:"input-error"},xO=e.defineComponent({name:"FormPhone",__name:"index",props:{value:{default:()=>({})},title:{default:""},error:{default:()=>({})},optional:{type:Boolean,default:!1},componentKey:{default:""},host:{default:""},locale:{default:""}},emits:["updateValue","updateError"],setup(n,{expose:t,emit:o}){const a=n,i=o,s=e.ref(!1),l=e.ref(!1),r=e.ref([]),u=e.ref([]),c=e.ref(null),f=e.computed(()=>u.value),m=e.computed({get(){var _;return((_=a.value)==null?void 0:_.code)??""},set(_){i("updateValue",{code:_,number:d.value??""})}}),d=e.computed({get(){var _;return((_=a.value)==null?void 0:_.number)??""},set(_){i("updateValue",{code:m.value,number:_})}}),h=_=>/^[\d\s\-\(\)]+$/.test(_)&&_.replace(/\D/g,"").length>=7,g=()=>{if(a.optional)return;const _="myNumber";e.nextTick(()=>{const w=h(d.value);console.log("isValid",w);const v=d.value;console.log("numberValue",v),(!v||!w)&&r.value.indexOf(_)<0&&r.value.push(_),v&&w&&r.value.indexOf(_)>-1&&r.value.splice(r.value.indexOf(_),1),i("updateError",{key:a.componentKey,isPass:r.value.length<=0})})};t({checkError:g});const p=async()=>{try{const _={params:{host:a.host}},w="country",{data:v}=await k8.get(w,_);u.value=v.data.map(V=>({...V,key:V.dial_code,label:V.country,value:V.dial_code,name:`+${V.dial_code}`})),!m.value&&u.value.length>0&&(m.value=u.value[0].value)}catch(_){console.error("Failed to fetch country data:",_)}},b=_=>{c.value&&!c.value.contains(_.target)&&(s.value=!1)};return e.onMounted(()=>{p(),document.addEventListener("click",b)}),e.onBeforeUnmount(()=>{document.removeEventListener("click",b)}),(_,w)=>(e.openBlock(),e.createElementBlock("div",{class:"form-phone",ref_key:"phoneRef",ref:c},[e.createElementVNode("div",gO,e.toDisplayString(n.title),1),e.createElementVNode("div",{class:e.normalizeClass(["form-phone-wrapper",[{"is-number-focus":l.value},{"is-code-focus":s.value},{"has-error":r.value.length>0}]])},[e.createElementVNode("div",{class:"form-select",onClick:w[1]||(w[1]=v=>s.value=!s.value)},[e.withDirectives(e.createElementVNode("input",{type:"text",class:e.normalizeClass(["form-select-btn",[{"is-number-focus":l.value},{"is-code-focus":s.value},{"has-error":r.value.length>0}]]),"onUpdate:modelValue":w[0]||(w[0]=v=>m.value=v),readonly:""},null,2),[[e.vModelText,m.value]])]),e.createElementVNode("div",{class:"form-number",onClick:w[5]||(w[5]=v=>s.value=!1)},[e.withDirectives(e.createElementVNode("input",{class:e.normalizeClass([{"is-number-focus":l.value},{"is-code-focus":s.value},{"has-error":r.value.length>0}]),type:"text","onUpdate:modelValue":w[2]||(w[2]=v=>d.value=v),placeholder:"12345678",onChange:g,onFocus:w[3]||(w[3]=v=>l.value=!0),onBlur:w[4]||(w[4]=v=>l.value=!1)},null,34),[[e.vModelText,d.value]])]),e.createElementVNode("div",{class:e.normalizeClass(["form-phone-select-menu",[{"is-active":s.value}]])},[e.createVNode(Zi,null,{default:e.withCtx(()=>[e.createElementVNode("ul",{class:"form-select-list",onClick:w[6]||(w[6]=v=>s.value=!s.value)},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(f.value,v=>(e.openBlock(),e.createElementBlock("li",{class:"form-select-option flex-between",key:v.key,onClick:V=>m.value=v.value},[e.createElementVNode("div",yO,e.toDisplayString(v.label),1),e.createElementVNode("div",_O,e.toDisplayString(v.name),1)],8,vO))),128))])]),_:1})],2)],2),d.value?(e.openBlock(),e.createElementBlock("div",bO,"请输入正确的格式")):(e.openBlock(),e.createElementBlock("div",wO,e.toDisplayString(n.error.errorMsg),1))],512))}}),VO=ne(xO,[["__scopeId","data-v-a734bf51"]]),CO={class:"form-email"},kO={class:"tx-btn text-blue-dark mb-1"},EO={class:"form-email-input"},TO={key:0,class:"input-error"},NO={key:1,class:"input-error"},SO=e.defineComponent({name:"FormEmail",__name:"index",props:{value:{default:""},title:{default:""},componentKey:{default:""}},emits:["updateValue","updateError"],setup(n,{expose:t,emit:o}){const a=n,i=o,s=e.ref([]),l=e.computed({get(){return a.value},set(c){i("updateValue",c)}}),r=c=>{const f=/(?:[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*|"(?:[\x01-\x08\x0b\x0c\x0e-\x1f\x21\x23-\x5b\x5d-\x7f]|\\[\x01-\x09\x0b\x0c\x0e-\x7f])*")@(?:(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?|\[(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?|[a-z0-9-]*[a-z0-9]:(?:[\x01-\x08\x0b\x0c\x0e-\x1f\x21-\x5a\x53-\x7f]|\\[\x01-\x09\x0b\x0c\x0e-\x7f])+)\])/;return!!c.match(f)},u=()=>{const c="myNumber";e.nextTick(()=>{const f=r(l.value);!f&&s.value.indexOf(c)<0&&s.value.push(c),f&&s.value.indexOf(c)>-1&&s.value.splice(s.value.indexOf(c),1),i("updateError",{key:a.componentKey,isPass:s.value.length<=0})})};return t({checkError:u}),(c,f)=>(e.openBlock(),e.createElementBlock("div",CO,[e.createElementVNode("div",kO,e.toDisplayString(n.title),1),e.createElementVNode("div",EO,[e.withDirectives(e.createElementVNode("input",{type:"email",placeholder:"example@yourmail.com","onUpdate:modelValue":f[0]||(f[0]=m=>l.value=m),class:e.normalizeClass(["default-input",{"has-error":s.value.length>0}]),onChange:u},null,34),[[e.vModelText,l.value]]),l.value?(e.openBlock(),e.createElementBlock("div",TO,"请输入正确的格式")):(e.openBlock(),e.createElementBlock("div",NO,"此为必填项"))])]))}}),BO=ne(SO,[["__scopeId","data-v-9e818ea4"]]),DO={key:"loading",class:"btn-submit-wrapper"},PO={key:"success",class:"btn-submit-wrapper"},$O={key:"fail",class:"btn-submit-wrapper"},AO={key:"default",class:"btn-submit-wrapper"},LO={class:"btn-submit-text"},IO=e.defineComponent({name:"BtnSubmit",__name:"index",props:{text:{default:"Button"},isLoading:{type:Boolean,default:!1},isSuccess:{type:Boolean,default:!1},isFail:{type:Boolean,default:!1}},setup(n){return(t,o)=>(e.openBlock(),e.createElementBlock("button",{class:e.normalizeClass(["btn-submit btn-primary w-100 size-normal",{"is-fail":n.isFail}]),type:"button"},[e.createVNode(e.Transition,{name:"submit-btn-label",mode:"out-in"},{default:e.withCtx(()=>[n.isLoading?(e.openBlock(),e.createElementBlock("div",DO,[...o[0]||(o[0]=[e.createElementVNode("div",{class:"spinner"},null,-1)])])):n.isSuccess?(e.openBlock(),e.createElementBlock("div",PO,[...o[1]||(o[1]=[e.createElementVNode("div",{class:"btn-submit-text"}," 提交成功 ",-1)])])):n.isFail?(e.openBlock(),e.createElementBlock("div",$O,[...o[2]||(o[2]=[e.createElementVNode("div",{class:"btn-submit-text"}," 提交失败 ",-1)])])):(e.openBlock(),e.createElementBlock("div",AO,[e.createElementVNode("div",LO,e.toDisplayString(n.text),1),o[3]||(o[3]=e.createElementVNode("span",{class:"btn-submit-icon"},null,-1))]))]),_:1})],2))}}),OO=ne(IO,[["__scopeId","data-v-da92fddf"]]),MO={class:"register-form-container"},UO={key:0,class:"register-form-wrapper"},RO={class:"register-form-title mb-3"},FO={class:"row mb-6"},HO={class:"col col-12 col-md-6"},jO={class:"col col-12 col-md-6"},zO={class:"other-col-temp col col-12 col-md-6"},qO={class:"col col-12 col-md-6"},WO={class:"col col-12 col-md-6"},GO={class:"col col-12 col-md-6"},XO={class:"col col-12"},YO={class:"register-form-btn mb-6"},KO=["innerHTML"],QO=e.defineComponent({name:"RegisterForm",__name:"index",props:{modelValue:{type:Object,default:()=>({})},isPreview:{type:Boolean,default:!0},host:{type:String,default:"cms-web.ycismelody.cn"}},emits:["update:modelValue","handleDelete","handleCopy","handlePaste","handleClick"],setup(n,{emit:t}){const o=n,a=t,i=()=>{var O,J;if(o.modelValue&&o.modelValue.data)return;const q={id:((O=o.modelValue)==null?void 0:O.id)||R(),type:"RegisterForm",onlyShowPc:!1,data:{title:"注册表单",event_name:"12",checkText:"我同意接收来自官方的直接营销信息",notice:"注意:请勿在表单中填写任何个人身份信息,如身份证号、护照号等。"},api:((J=o.modelValue)==null?void 0:J.api)||"/event-registration/submit"};a("update:modelValue",q)},s=e.computed(()=>{var q;return o.isPreview?!((q=o.modelValue)!=null&&q.onlyShowPc)||!Ne():!0}),l=e.ref(!1),r=e.ref(!1),u=()=>{a("handleDelete",o.modelValue.id)},c=()=>{a("handleCopy",o.modelValue)},f=q=>{a("handlePaste",q)};i();const m=e.ref({name:[],youare:"",other_person_type:"",number:null,email:"",school_or_organisation_name:[],opt_out_direct_marketing:!1}),d=e.ref([]),h=e.ref(!0),g=e.ref(!1),p=e.ref(!1),b=e.ref(!1),_=e.ref(null),w=e.ref(null),v=e.ref(null),V=e.ref(null),C=e.ref(null),S=e.computed(()=>{var q;return((q=o.componentProps)==null?void 0:q.event_date)??""}),N=e.computed(()=>{var q;return((q=o.componentProps)==null?void 0:q.optionsYouare)??[{key:"parent",name:"家长",value:"家长"},{key:"alumni",name:"校友",value:"校友"},{key:"student",name:"学生",value:"学生"},{key:"faculty-staff",name:"教学人员/行政人员",value:"教学人员/行政人员"},{key:"others",name:"其他",value:"其他"}]}),D=e.computed(()=>{var O,J,F,M,Q;const q={host:o.host,eventCode:(J=(O=o.modelValue)==null?void 0:O.data)==null?void 0:J.event_name,name:(F=m.value.name)==null?void 0:F.join(" "),personType:(M=N.value.find(W=>W.value===m.value.youare))==null?void 0:M.key,otherPersonType:m.value.other_person_type,contactNumber:m.value.number?`+${m.value.number.code}${m.value.number.number}`:"",email:m.value.email,schoolOrOrganisationName:(Q=m.value.school_or_organisation_name)==null?void 0:Q.join(","),optOutDirectMarketing:+m.value.opt_out_direct_marketing,eventDate:S.value,timestamp:Date.now()};return Object.keys(q).forEach(W=>{q[W]||delete q[W]}),q}),$=(q,O)=>{m.value[q]=O},k=({key:q,isPass:O})=>{console.log("updateErrorFromInput",q,O),!O&&d.value.indexOf(q)<0&&d.value.push(q),O&&d.value.indexOf(q)>-1&&d.value.splice(d.value.indexOf(q),1)},A=()=>{if(g.value||p.value||b.value)return;[_.value,w.value,v.value,V.value,C.value].forEach(O=>{var J;(J=O==null?void 0:O.checkError)==null||J.call(O)}),e.nextTick(()=>{d.value.length>0||I()})},B=q=>{const O=q||D.value,J={};for(const[Q,W]of Object.entries(O))W!==""&&W!==null&&W!==void 0&&(J[Q]=W);const M=Object.keys(J).sort().map(Q=>`${J[Q]}`).join("");return G6(M)},I=async()=>{var J;g.value=!0;const q=B(D.value),O=JSON.stringify({...D.value,sign:q});try{const{data:F}=await Zt.post((J=o.modelValue)==null?void 0:J.api,O),M=F.data.ref_no;z(),a("handleClick",`/thank-you?ref=${M}`)}catch(F){console.log(F),Y()}finally{g.value=!1}},z=()=>{m.value={name:[],youare:"",other_person_type:"",number:null,email:"",school_or_organisation_name:[],opt_out_direct_marketing:!1},g.value=!1,p.value=!0,setTimeout(()=>{p.value=!1,H()},2500)},Y=()=>{g.value=!1,b.value=!0,setTimeout(()=>{b.value=!1},3500)},H=()=>{h.value=!1,e.nextTick(()=>{h.value=!0})};return(q,O)=>{var J,F,M,Q,W,Z,de,Ve;return e.openBlock(),e.createElementBlock(e.Fragment,null,[s.value?(e.openBlock(),e.createElementBlock("div",{key:0,class:"register-form",onMouseenter:O[9]||(O[9]=oe=>l.value=!0),onMouseleave:O[10]||(O[10]=oe=>l.value=!1)},[e.createElementVNode("div",MO,[h.value?(e.openBlock(),e.createElementBlock("div",UO,[e.createElementVNode("div",RO,e.toDisplayString((F=(J=n.modelValue)==null?void 0:J.data)==null?void 0:F.title),1),e.createElementVNode("div",FO,[e.createElementVNode("div",HO,[e.createVNode(Kh,{ref_key:"field1",ref:_,class:"mb-0",componentKey:"name",title:"姓名",placeholder:"你的名字",value:m.value.name,onUpdateValue:O[0]||(O[0]=oe=>$("name",oe)),onUpdateError:k},null,8,["value"])]),e.createElementVNode("div",jO,[e.createVNode(fO,{ref_key:"field2",ref:w,class:"mb-0",componentKey:"youare",title:"你是",options:N.value,placeholder:"Select",value:m.value.youare,optional:!m.value.youare,onUpdateValue:O[1]||(O[1]=oe=>$("youare",oe)),onUpdateError:k},null,8,["options","value","optional"])]),e.withDirectives(e.createElementVNode("div",zO,null,512),[[e.vShow,D.value.person_type=="others"]]),e.withDirectives(e.createElementVNode("div",qO,[e.withDirectives(e.createElementVNode("input",{type:"text",class:"default-input","onUpdate:modelValue":O[2]||(O[2]=oe=>m.value.other_person_type=oe),placeholder:"其他"},null,512),[[e.vModelText,m.value.other_person_type]])],512),[[e.vShow,D.value.person_type=="others"]]),e.createElementVNode("div",WO,[e.createVNode(VO,{ref_key:"field3",ref:v,class:"mb-0",componentKey:"number",title:"联系电话",value:m.value.number,error:{errorMsg:"此为必填项"},host:n.host,onUpdateValue:O[3]||(O[3]=oe=>$("number",oe)),onUpdateError:k},null,8,["value","host"])]),e.createElementVNode("div",GO,[e.createVNode(BO,{ref_key:"field4",ref:V,class:"mb-0",componentKey:"email",title:"电邮",placeholder:"example@yourmail.com",value:m.value.email,onUpdateValue:O[4]||(O[4]=oe=>$("email",oe)),onUpdateError:k},null,8,["value"])]),e.createElementVNode("div",XO,[e.createVNode(Kh,{ref_key:"field5",ref:C,class:"mb-0",componentKey:"school_or_organisation_name",title:"学校名称/组织",placeholder:"学校名称/组织",value:m.value.school_or_organisation_name,onUpdateValue:O[5]||(O[5]=oe=>$("school_or_organisation_name",oe)),onUpdateError:k},null,8,["value"])])]),e.createElementVNode("div",YO,[e.createVNode(OO,{text:"提交",onClick:A,isLoading:g.value,isSuccess:p.value,isFail:b.value},null,8,["isLoading","isSuccess","isFail"])]),e.createElementVNode("div",null,[e.withDirectives(e.createElementVNode("input",{type:"checkbox",class:"default-checkbox",id:"register-form-checkbox","onUpdate:modelValue":O[6]||(O[6]=oe=>m.value.opt_out_direct_marketing=oe)},null,512),[[e.vModelCheckbox,m.value.opt_out_direct_marketing]]),e.createElementVNode("label",{for:"register-form-checkbox",innerHTML:(Q=(M=n.modelValue)==null?void 0:M.data)==null?void 0:Q.checkText},null,8,KO)]),e.withDirectives(e.createElementVNode("div",{class:"register-form-notice mt-3"},e.toDisplayString((Z=(W=n.modelValue)==null?void 0:W.data)==null?void 0:Z.notice),513),[[e.vShow,(Ve=(de=n.modelValue)==null?void 0:de.data)==null?void 0:Ve.notice]])])):e.createCommentVNode("",!0)]),n.isPreview?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(Te,{key:0,show:l.value,"onUpdate:show":O[7]||(O[7]=oe=>l.value=oe),onHandleEdit:O[8]||(O[8]=oe=>r.value=!0),onHandleDelete:u,onHandleCopy:c,onHandlePaste:f},null,8,["show"]))],32)):e.createCommentVNode("",!0),n.isPreview?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(nO,{key:1,show:r.value,"onUpdate:show":O[11]||(O[11]=oe=>r.value=oe),data:n.modelValue},null,8,["show","data"]))],64)}}}),qd=ne(QO,[["__scopeId","data-v-211a8e04"]]),JO=Object.freeze(Object.defineProperty({__proto__:null,default:qd},Symbol.toStringTag,{value:"Module"})),ZO={class:"setting-content"},eM={class:"setting-header flex items-center"},tM={class:"setting-body"},nM={class:"setting-item"},oM={class:"btn-group"},aM={key:0,class:"drag-handle"},iM=["src"],sM={class:"item-uplaod flex items-center"},lM=e.defineComponent({__name:"setting",props:{show:{type:Boolean,default:!1},data:{type:Object,default:()=>{}}},emits:["update:show"],setup(n,{emit:t}){const o=e.defineAsyncComponent(()=>import("vuedraggable")),a=e.ref(!1),i=e.computed(()=>({animation:200,group:"data",disabled:!1,ghostClass:"ghost",handle:".drag-handle",filter:".arco-input, .arco-select, .arco-checkbox",preventOnFilter:!1})),s=m=>m&&m.length>1,l=n,r=t,u=()=>{r("update:show",!1)},c=()=>{if(l.data.data.length>=3){alert("最多只能添加3个");return}l.data.data.push({id:R(),title:"",subtitle:"",url:"",imgSrc:""})},f=m=>{l.data.data=l.data.data.filter(d=>d.id!==m)};return(m,d)=>{const h=e.resolveComponent("a-switch"),g=e.resolveComponent("icon-drag-arrow"),p=e.resolveComponent("icon-delete"),b=e.resolveComponent("a-input"),_=e.resolveComponent("icon-plus"),w=e.resolveComponent("a-drawer");return e.openBlock(),e.createBlock(w,{width:500,visible:n.show,footer:!1,onCancel:u,unmountOnClose:""},{title:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(n.data.type)+"组件编辑 ",1)]),default:e.withCtx(()=>[e.createElementVNode("div",ZO,[e.createElementVNode("div",eM,[d[5]||(d[5]=e.createElementVNode("span",{class:"header-title"},"仅在PC端显示",-1)),e.createVNode(h,{modelValue:n.data.onlyShowPc,"onUpdate:modelValue":d[0]||(d[0]=v=>n.data.onlyShowPc=v)},null,8,["modelValue"])]),e.createElementVNode("div",tM,[e.createElementVNode("div",nM,[e.createVNode(e.unref(o),e.mergeProps({modelValue:n.data.data,"onUpdate:modelValue":d[1]||(d[1]=v=>n.data.data=v),"component-data":{tag:"div",type:"transition-group",name:a.value?null:"flip-list"}},i.value,{disabled:!s(n.data.data),onStart:d[2]||(d[2]=v=>a.value=!0),onEnd:d[3]||(d[3]=v=>a.value=!1),"item-key":"id"}),{item:e.withCtx(({element:v})=>[(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["item-button draggable-item",{"sortable-disabled":!s(n.data.data)}]),key:v.id},[e.createElementVNode("div",oM,[s(n.data.data)?(e.openBlock(),e.createElementBlock("div",aM,[e.createVNode(g,{class:"drag-icon"})])):e.createCommentVNode("",!0),e.createVNode(p,{class:"btn-delete",onClick:V=>f(v.id)},null,8,["onClick"])]),d[6]||(d[6]=e.createElementVNode("p",{class:"item-title"},"标题",-1)),e.createVNode(b,{modelValue:v.title,"onUpdate:modelValue":V=>v.title=V,placeholder:"请输入标题","allow-clear":""},null,8,["modelValue","onUpdate:modelValue"]),d[7]||(d[7]=e.createElementVNode("p",{class:"item-title"},"副标题",-1)),e.createVNode(b,{modelValue:v.subtitle,"onUpdate:modelValue":V=>v.subtitle=V,placeholder:"请输入文本","allow-clear":""},null,8,["modelValue","onUpdate:modelValue"]),d[8]||(d[8]=e.createElementVNode("p",{class:"item-title"},"链接",-1)),e.createVNode(b,{modelValue:v.url,"onUpdate:modelValue":V=>v.url=V,placeholder:"请输入链接","allow-clear":""},null,8,["modelValue","onUpdate:modelValue"]),d[9]||(d[9]=e.createElementVNode("p",{class:"item-title"},"图片",-1)),e.createElementVNode("img",{class:"item-img",src:v.imgSrc},null,8,iM),e.createElementVNode("div",sM,[e.createVNode(b,{modelValue:v.imgSrc,"onUpdate:modelValue":V=>v.imgSrc=V,placeholder:"请输入图片链接","allow-clear":""},null,8,["modelValue","onUpdate:modelValue"]),e.createVNode(ze,{modelValue:v.imgSrc,"onUpdate:modelValue":V=>v.imgSrc=V,name:`GalleryBlock_img_${v.id}`},null,8,["modelValue","onUpdate:modelValue","name"])])],2))]),_:1},16,["modelValue","component-data","disabled"]),e.createElementVNode("div",{class:"item-add-btn flex items-center",onClick:d[4]||(d[4]=v=>c())},[e.createVNode(_),d[10]||(d[10]=e.createElementVNode("span",{class:"btn-text"},"添加",-1))])])])])]),_:1},8,["visible"])}}}),rM=ne(lM,[["__scopeId","data-v-5c2714e9"]]),dM={class:"gallery-block-wrapper"},uM=["onClick"],cM={class:"gallery-block-image-content"},mM=["innerHTML"],pM=["innerHTML"],hM={class:"gallery-block-image-link"},fM={class:"circle-link circle-link--light"},gM=["href"],vM=["onClick"],yM=e.defineComponent({name:"GalleryBlock",__name:"index",props:{modelValue:{type:Object,default:()=>({})},isPreview:{type:Boolean,default:!0}},emits:["update:modelValue","handleDelete","handleCopy","handlePaste","handleClick"],setup(n,{emit:t}){const o=n,a=t,i=()=>{var h;if(o.modelValue&&o.modelValue.data)return;const d={id:((h=o.modelValue)==null?void 0:h.id)||R(),type:"GalleryBlock",onlyShowPc:!1,data:[{id:R(),title:"标题",subtitle:"副标题",url:"",imgSrc:"https://osswebsite.ycyw.com/media-library/ywies-bj/images/home/ywies-tx.jpg"},{id:R(),title:"标题",subtitle:"副标题",url:"",imgSrc:"https://osswebsite.ycyw.com/media-library/ywies-bj/images/home/ywies-tx.jpg"}]};a("update:modelValue",d)},s=e.computed(()=>{var d;return o.isPreview?!((d=o.modelValue)!=null&&d.onlyShowPc)||!Ne():!0}),l=e.ref(!1),r=e.ref(!1),u=()=>{a("handleDelete",o.modelValue.id)},c=()=>{a("handleCopy",o.modelValue)},f=d=>{a("handlePaste",d)};i();const m=d=>{if(!(!d.url||!o.isPreview)){if(d.url.includes("http")){const h=window.open(d.url,"_blank","noopener,noreferrer");h&&(h.opener=null);return}a("handleClick",d)}};return(d,h)=>{var g,p,b;return e.openBlock(),e.createElementBlock(e.Fragment,null,[s.value?(e.openBlock(),e.createElementBlock("div",{key:0,class:"gallery-block",onMouseenter:h[2]||(h[2]=_=>l.value=!0),onMouseleave:h[3]||(h[3]=_=>l.value=!1)},[e.createElementVNode("div",dM,[e.createElementVNode("div",{class:e.normalizeClass(["gallery-block-row",`gallery-block-row-cols-1 gallery-block-row-cols-md-${(p=(g=n.modelValue)==null?void 0:g.data)==null?void 0:p.length}`])},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList((b=n.modelValue)==null?void 0:b.data,_=>(e.openBlock(),e.createElementBlock("div",{class:"gallery-block-col",key:_.id},[e.createElementVNode("div",{class:"gallery-block-image-block",onClick:w=>m(_)},[e.createElementVNode("div",{class:e.normalizeClass(["gallery-block-image-bg",{"gallery-block-image-bg-has-subtitle":_.subtitle}]),style:e.normalizeStyle({"--bg-image":`url('${_.imgSrc}')`})},null,6),e.createElementVNode("div",cM,[h[7]||(h[7]=e.createElementVNode("div",{class:"gallery-block-image-border"},null,-1)),e.createElementVNode("div",{class:"gallery-block-image-title",innerHTML:_.title},null,8,mM),e.withDirectives(e.createElementVNode("div",null,[e.createElementVNode("div",{class:"gallery-block-image-subtitle",innerHTML:_.subtitle},null,8,pM)],512),[[e.vShow,_.subtitle]]),e.createElementVNode("div",hM,[e.createElementVNode("div",fM,[_.url&&_.url.includes("http")&&n.isPreview?(e.openBlock(),e.createElementBlock("a",{key:0,href:_.url,class:"nuxt-link-exact-active nuxt-link-active"},[...h[5]||(h[5]=[e.createElementVNode("div",null,"了解更多",-1),e.createElementVNode("span",{class:"circle-link__icon circle-link__icon--light"},null,-1)])],8,gM)):(e.openBlock(),e.createElementBlock("button",{key:1,onClick:w=>m(_),class:"nuxt-link-exact-active nuxt-link-active"},[...h[6]||(h[6]=[e.createElementVNode("div",null,"了解更多",-1),e.createElementVNode("span",{class:"circle-link__icon circle-link__icon--light"},null,-1)])],8,vM))])])])],8,uM)]))),128))],2)]),n.isPreview?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(Te,{key:0,show:l.value,"onUpdate:show":h[0]||(h[0]=_=>l.value=_),onHandleEdit:h[1]||(h[1]=_=>r.value=!0),onHandleDelete:u,onHandleCopy:c,onHandlePaste:f},null,8,["show"]))],32)):e.createCommentVNode("",!0),n.isPreview?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(rM,{key:1,show:r.value,"onUpdate:show":h[4]||(h[4]=_=>r.value=_),data:n.modelValue},null,8,["show","data"]))],64)}}}),Wd=ne(yM,[["__scopeId","data-v-682e436d"]]),_M=Object.freeze(Object.defineProperty({__proto__:null,default:Wd},Symbol.toStringTag,{value:"Module"})),bM={class:"seting-box"},wM={class:"setting-header flex items-center"},xM={key:0},VM={class:"draggable_box"},CM={class:"drag_top_box"},kM=["onClick"],EM={class:"line-clamp-2"},TM=["src"],NM={class:"item-uplaod flex items-center"},SM={class:"btn_group"},BM=e.defineComponent({__name:"setting",props:{show:{type:Boolean,default:!1},data:{type:Object,default:()=>{}}},emits:["update:show"],setup(n,{emit:t}){const o=e.defineAsyncComponent(()=>import("vuedraggable")),a=n,i=g=>{const p={key:R(8),title:"新文章",description:"这是一个新的文章描述",image:"https://picsum.photos/800/600",date:new Date().toISOString().split("T")[0],label:"new",labelName:"新标签",category:"new"};g==="prepend"?a.data.list.unshift(p):g==="append"&&a.data.list.push(p)},s=g=>r.value.has(g.key),l=e.computed(()=>({animation:200,group:"links",disabled:!1,ghostClass:"ghost",handle:".drag-handle",filter:".rich-text-editor, .arco-input, .arco-select, .arco-checkbox",preventOnFilter:!1})),r=e.ref(new Set),u=g=>{a.data.list=a.data.list.filter(p=>p.key!==g)},c=g=>{if(!r.value.has(g.key))r.value.add(g.key);else{const p=[];a.data.list.forEach(b=>{b.key&&p.push(b.key)}),r.value=new Set(p),r.value.delete(g.key)}},f=e.ref(!1);e.watch(()=>{var g;return(g=a.data)==null?void 0:g.list},g=>{if(g&&Array.isArray(g)&&!f.value){f.value=!0;const p=g.map(b=>b.key);r.value=new Set(p)}},{immediate:!0,deep:!0});const m=t,d=e.ref(!1),h=()=>{m("update:show",!1)};return(g,p)=>{const b=e.resolveComponent("a-switch"),_=e.resolveComponent("a-option"),w=e.resolveComponent("a-select"),v=e.resolveComponent("a-input"),V=e.resolveComponent("icon-drag-dot"),C=e.resolveComponent("icon-drag-arrow"),S=e.resolveComponent("icon-delete"),N=e.resolveComponent("a-date-picker"),D=e.resolveComponent("a-button"),$=e.resolveComponent("a-drawer");return e.openBlock(),e.createBlock($,{width:500,visible:n.show,footer:!1,onCancel:h,unmountOnClose:""},{title:e.withCtx(()=>{var k;return[e.createTextVNode(e.toDisplayString((k=n.data)==null?void 0:k.type)+"组件编辑 ",1)]}),default:e.withCtx(()=>[e.createElementVNode("div",bM,[e.createElementVNode("div",wM,[p[8]||(p[8]=e.createElementVNode("span",{class:"header-title"},"仅显示PC端",-1)),e.createVNode(b,{modelValue:n.data.onlyShowPc,"onUpdate:modelValue":p[0]||(p[0]=k=>n.data.onlyShowPc=k)},null,8,["modelValue"])]),p[22]||(p[22]=e.createElementVNode("p",{class:"item-title"},"内容宽度",-1)),e.createVNode(w,{style:{width:"320px",background:"#ffffff",marginBottom:"20px"},modelValue:n.data.width,"onUpdate:modelValue":p[1]||(p[1]=k=>n.data.width=k),placeholder:"请选择宽度..."},{default:e.withCtx(()=>[e.createVNode(_,{value:"container-content-800"},{default:e.withCtx(()=>[...p[9]||(p[9]=[e.createTextVNode("小 ",-1)])]),_:1}),e.createVNode(_,{value:"container-content-952"},{default:e.withCtx(()=>[...p[10]||(p[10]=[e.createTextVNode("默认 ",-1)])]),_:1}),e.createVNode(_,{value:"container-content-1208"},{default:e.withCtx(()=>[...p[11]||(p[11]=[e.createTextVNode("中",-1)])]),_:1}),e.createVNode(_,{value:"container-content-1920"},{default:e.withCtx(()=>[...p[12]||(p[12]=[e.createTextVNode("大",-1)])]),_:1})]),_:1},8,["modelValue"]),n.data.getDataType==="all"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[p[13]||(p[13]=e.createElementVNode("p",{class:"item-title"},"您希望展示的文章类别标签",-1)),e.createVNode(v,{modelValue:n.data.getDataType,"onUpdate:modelValue":p[2]||(p[2]=k=>n.data.getDataType=k)},null,8,["modelValue"])],64)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[n.data.list.length===0?(e.openBlock(),e.createElementBlock("div",xM,"暂无数据")):e.createCommentVNode("",!0),e.createVNode(e.unref(o),e.mergeProps({modelValue:n.data.list,"onUpdate:modelValue":p[3]||(p[3]=k=>n.data.list=k),"component-data":{tag:"div",type:"transition-group",name:d.value?null:"flip-list"}},l.value,{disabled:!1,onStart:p[4]||(p[4]=k=>d.value=!0),onEnd:p[5]||(p[5]=k=>d.value=!1),"item-key":"key"}),{item:e.withCtx(({element:k,index:A})=>[e.createElementVNode("div",VM,[e.createElementVNode("div",CM,[e.createElementVNode("div",{style:{display:"flex","align-items":"center"},onClick:B=>c(k)},[e.createVNode(V,{style:{"margin-right":"10px"}}),e.createElementVNode("span",EM,e.toDisplayString(k.title),1)],8,kM),e.createElementVNode("div",null,[e.createVNode(C,{class:"icon_drag"}),e.createVNode(S,{class:"btn-delete",onClick:e.withModifiers(B=>u(k.key),["stop"])},null,8,["onClick"])])]),e.createVNode(e.Transition,{name:"collapse"},{default:e.withCtx(()=>[e.withDirectives(e.createElementVNode("div",null,[p[14]||(p[14]=e.createElementVNode("p",{class:"item-title",style:{"margin-top":"20px"}},"标题",-1)),e.createVNode(v,{style:{border:"1px solid #f1eeee"},modelValue:k.title,"onUpdate:modelValue":B=>k.title=B},null,8,["modelValue","onUpdate:modelValue"]),p[15]||(p[15]=e.createElementVNode("p",{class:"item-title",style:{"margin-top":"20px"}},"图片",-1)),e.createElementVNode("img",{class:"item-img",src:k.image},null,8,TM),e.createElementVNode("div",NM,[e.createVNode(v,{modelValue:k.image,"onUpdate:modelValue":B=>k.image=B,placeholder:"请输入图片链接","allow-clear":"",style:{border:"1px solid #c0c0c0"}},null,8,["modelValue","onUpdate:modelValue"]),e.createVNode(ze,{modelValue:k.image,"onUpdate:modelValue":B=>k.image=B,name:`CardCarouselArticles_${k.key}`,"button-class":"fit-content"},null,8,["modelValue","onUpdate:modelValue","name"])]),p[16]||(p[16]=e.createElementVNode("p",{class:"item-title",style:{"margin-top":"20px"}},"链接",-1)),e.createVNode(v,{style:{border:"1px solid #f1eeee"},modelValue:k.link,"onUpdate:modelValue":B=>k.link=B},null,8,["modelValue","onUpdate:modelValue"]),p[17]||(p[17]=e.createElementVNode("p",{class:"item-title",style:{"margin-top":"20px"}},"标签名称",-1)),e.createVNode(v,{style:{border:"1px solid #f1eeee"},modelValue:k.labelName,"onUpdate:modelValue":B=>k.labelName=B},null,8,["modelValue","onUpdate:modelValue"]),p[18]||(p[18]=e.createElementVNode("p",{class:"item-title",style:{"margin-top":"20px"}},"描述",-1)),e.createVNode(v,{style:{border:"1px solid #f1eeee"},modelValue:k.desc,"onUpdate:modelValue":B=>k.desc=B},null,8,["modelValue","onUpdate:modelValue"]),p[19]||(p[19]=e.createElementVNode("p",{class:"item-title",style:{"margin-top":"20px"}},"日期",-1)),e.createVNode(N,{style:{width:"200px"},modelValue:k.date,"onUpdate:modelValue":B=>k.date=B},null,8,["modelValue","onUpdate:modelValue"])],512),[[e.vShow,!s(k)]])]),_:2},1024)])]),_:1},16,["modelValue","component-data"]),e.createElementVNode("div",SM,[e.createVNode(D,{onClick:p[6]||(p[6]=k=>i("prepend")),type:"primary",style:{"margin-right":"20px"}},{default:e.withCtx(()=>[...p[20]||(p[20]=[e.createTextVNode("前置",-1)])]),_:1}),e.createVNode(D,{onClick:p[7]||(p[7]=k=>i("append")),type:"primary"},{default:e.withCtx(()=>[...p[21]||(p[21]=[e.createTextVNode("追加",-1)])]),_:1})])],64))])]),_:1},8,["visible"])}}}),DM=ne(BM,[["__scopeId","data-v-c52de08a"]]),PM={key:0},$M={class:"slide-content"},AM={class:"mt-10 mt-md-12"},LM={key:1},IM={class:"row row-cols-1 row-cols-md-3 row-cols-lg-4 justify-content-center"},OM=e.defineComponent({name:"CardCarouselArticles",__name:"index",props:{modelValue:{type:Object,default:()=>{}},isPreview:{type:Boolean,default:!0}},emits:["update:modelValue","handleDelete","handleCopy","handlePaste"],setup(n,{emit:t}){const o=n;console.log("!!!!",o.modelValue);const a=t,i=e.ref(!1),s=e.ref(!1),l=()=>{a("handleDelete",o.modelValue.id)},r=()=>{a("handleCopy",o.modelValue)},u=M=>{a("handlePaste",M)},c=()=>{var Q,W,Z,de;const M={id:((Q=o.modelValue)==null?void 0:Q.id)||R(),type:"CardCarouselArticles",onlyShowPc:!1,bgColor:((W=o.modelValue)==null?void 0:W.bgColor)||"#f8f9fa",width:((Z=o.modelValue)==null?void 0:Z.width)||"container-content-952",isLoop:((de=o.modelValue)==null?void 0:de.isLoop)??!0,getDataType:!1,list:[{key:"article-001",title:"探索人工智能的未来发展趋势",desc:"人工智能技术正在快速发展,从机器学习到深度学习,从自然语言处理到计算机视觉,AI正在改变我们的生活方式。本文将深入探讨AI技术的最新进展和未来发展方向。",image:"https://images.unsplash.com/photo-1677442136019-21780ecad995?w=800&h=600&fit=crop",alt:"人工智能概念图",date:"2024-01-15",time:"2024-01-15T10:30:00Z",labelName:"科技前沿",category:"technology",link:"/articles/ai-future-trends"},{key:"article-002",title:"可持续发展与绿色能源革命",description:"随着全球气候变化问题日益严重,可持续发展和绿色能源成为了全球关注的焦点。太阳能、风能等可再生能源技术正在快速发展。",image:"https://images.unsplash.com/photo-1466611653911-95081537e5b7?w=800&h=600&fit=crop",date:"2024-01-12",label:"environment",labelName:"科技前沿",category:"environment",link:"https://example.com/green-energy-revolution"},{key:"article-002",title:"可持续发展与绿色能源革命",description:"随着全球气候变化问题日益严重,可持续发展和绿色能源成为了全球关注的焦点。太阳能、风能等可再生能源技术正在快速发展。",image:"https://images.unsplash.com/photo-1466611653911-95081537e5b7?w=800&h=600&fit=crop",date:"2024-01-12",label:"environment",labelName:"科技前沿",category:"environment",link:"https://example.com/green-energy-revolution"},{key:"article-002",title:"可持续发展与绿色能源革命",description:"随着全球气候变化问题日益严重,可持续发展和绿色能源成为了全球关注的焦点。太阳能、风能等可再生能源技术正在快速发展。",image:"https://images.unsplash.com/photo-1466611653911-95081537e5b7?w=800&h=600&fit=crop",date:"2024-01-12",label:"environment",labelName:"科技前沿",category:"environment",link:"https://example.com/green-energy-revolution"},{key:"article-002",title:"可持续发展与绿色能源革命",description:"随着全球气候变化问题日益严重,可持续发展和绿色能源成为了全球关注的焦点。太阳能、风能等可再生能源技术正在快速发展。",image:"https://images.unsplash.com/photo-1466611653911-95081537e5b7?w=800&h=600&fit=crop",date:"2024-01-12",label:"environment",labelName:"科技前沿",category:"environment",link:"https://example.com/green-energy-revolution"},{key:"article-002",title:"可持续发展与绿色能源革命",description:"随着全球气候变化问题日益严重,可持续发展和绿色能源成为了全球关注的焦点。太阳能、风能等可再生能源技术正在快速发展。",image:"https://images.unsplash.com/photo-1466611653911-95081537e5b7?w=800&h=600&fit=crop",date:"2024-01-12",label:"environment",labelName:"科技前沿",category:"environment",link:"https://example.com/green-energy-revolution"}]};a("update:modelValue",M)},f=e.computed(()=>{var M;return o.isPreview?!((M=o.modelValue)!=null&&M.onlyShowPc)||!$():!0}),m=e.ref([]),d=e.ref(0),h=e.ref([]),g=e.ref(0),p=e.ref(!1),b=e.ref(!0),_=e.ref(null),w=e.ref(1024),v=[ct.Navigation,ct.Pagination,ct.Autoplay],V=e.ref({centeredSlides:!1,speed:600,slidesPerView:1,slidesPerGroup:1,spaceBetween:16,shortSwipes:!0,longSwipesRatio:.3,loop:!0,autoHeight:!1,breakpoints:{768:{slidesPerView:3,slidesPerGroup:1,spaceBetween:16,shortSwipes:!1},1024:{slidesPerView:4,slidesPerGroup:1,spaceBetween:16}}}),C=()=>{w.value=typeof window<"u"?window.innerWidth:1024};e.onMounted(()=>{C(),typeof window<"u"&&window.addEventListener("resize",C)}),e.onUnmounted(()=>{typeof window<"u"&&window.removeEventListener("resize",C)}),e.computed(()=>{var M;return((M=o.modelValue)==null?void 0:M.classes)??null}),e.computed(()=>{var M;return((M=o.modelValue)==null?void 0:M.style)??null});const S=e.computed(()=>{var M;return((M=o.modelValue)==null?void 0:M.type)??"school"});e.computed(()=>{var M;return((M=o.modelValue)==null?void 0:M.width)??null});const N=e.computed(()=>{var M;return((M=o.modelValue)==null?void 0:M.isLoop)??!0}),D=e.computed(()=>{var M,Q;return(M=o.modelValue)!=null&&M.getDataType?h.value:((Q=o.modelValue)==null?void 0:Q.list)||[]});e.computed(()=>w.value>=1024),e.computed(()=>w.value>=768&&w.value<1024);const $=e.computed(()=>w.value<768);e.computed(()=>{var M;return((M=o.modelValue)==null?void 0:M.data)||[]}),e.computed(()=>{var M;return((M=o.modelValue)==null?void 0:M.title)||""}),e.computed(()=>{var M;return((M=o.modelValue)==null?void 0:M.subtitle)||""}),e.computed(()=>{var M;return((M=o.modelValue)==null?void 0:M.description)||""}),e.computed(()=>{var M;return((M=o.modelValue)==null?void 0:M.link)||null}),e.computed(()=>{var M;return((M=o.modelValue)==null?void 0:M.linkText)||"View More"});const k=e.computed(()=>w.value>=768?w.value>=1024?4:3:1);e.computed(()=>w.value<768?1:3);const A=e.computed(()=>{var M;return(M=o.modelValue)!=null&&M.getDataType?g.value:(console.log("总页数======",D.value.length),D.value.length)}),B=e.computed(()=>D.value.length>3&&w.value>=1024||D.value.length>2&&w.value>=768&&w.value<1024||w.value<768),I=async()=>{var M;if(!(!o.axiosInstance||!((M=o.modelValue)!=null&&M.apiEndpoint)))try{return(await o.axiosInstance.get(o.modelValue.apiEndpoint)).data}catch(Q){return console.error("Error fetching data:",Q),null}},z=M=>{d.value=M.realIndex},Y=M=>{_.value=M,p.value||e.nextTick(()=>{setTimeout(F,100)})},H=M=>{var Q;(Q=_.value)==null||Q.slideToLoop(M,600)},q=()=>{var M;(M=_.value)==null||M.slidePrev(600)},O=()=>{var M;(M=_.value)==null||M.slideNext(600)},J=(M,Q)=>{S.value=="profile"&&m.value[Q].openLightbox()},F=()=>{b.value=!1,e.nextTick(()=>{var M;b.value=!0,(M=_.value)==null||M.destroy(),e.nextTick(()=>{var Q;(Q=_.value)==null||Q.update(),p.value=!0})})};return e.onMounted(async()=>{var M;(M=o.modelValue)!=null&&M.autoFetch&&await I()}),c(),(M,Q)=>{var W,Z;return e.openBlock(),e.createElementBlock(e.Fragment,null,[f.value?(e.openBlock(),e.createElementBlock("div",{key:0,style:e.normalizeStyle([{"margin-top":"30px","margin-bottom":"30px"},{backgroundColor:(W=n.modelValue)==null?void 0:W.bgColor}]),class:"cardcarouselarticles_container",onMouseenter:Q[2]||(Q[2]=de=>i.value=!0),onMouseleave:Q[3]||(Q[3]=de=>i.value=!1)},[e.createElementVNode("div",{class:e.normalizeClass(["card-carousel__wrapper",[((Z=n.modelValue)==null?void 0:Z.width)||"container-content-952"]])},[B.value&&b.value?(e.openBlock(),e.createElementBlock("div",PM,[e.createVNode(e.unref(Et.Swiper),{ref:"mySwiper",modules:v,"slides-per-view":V.value.slidesPerView,"space-between":V.value.spaceBetween,loop:V.value.loop,speed:V.value.speed,"centered-slides":V.value.centeredSlides,"auto-height":V.value.autoHeight,breakpoints:V.value.breakpoints,class:"swiper card-carousel__swiper",onSlideChange:z,onClickSlide:J,onSwiper:Y},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(D.value,(de,Ve)=>(e.openBlock(),e.createBlock(e.unref(Et.SwiperSlide),{class:"swiper-slide",key:`${de.key}-${Ve}`},{default:e.withCtx(()=>[e.createElementVNode("div",$M,[S.value=="article"?(e.openBlock(),e.createBlock(ul,{key:0,componentProps:de,singleColumn:k.value==1},null,8,["componentProps","singleColumn"])):e.createCommentVNode("",!0)])]),_:2},1024))),128))]),_:1},8,["slides-per-view","space-between","loop","speed","centered-slides","auto-height","breakpoints"]),e.createElementVNode("div",AM,[e.createVNode(es,{currentIndex:d.value,count:A.value,onUpdatePage:H,onSlidePrev:q,onSlideNext:O,dark:"",isLoop:N.value},null,8,["currentIndex","count","isLoop"])])])):(e.openBlock(),e.createElementBlock("div",LM,[e.createElementVNode("div",IM,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(D.value,(de,Ve)=>(e.openBlock(),e.createElementBlock("div",{style:{"margin-right":"10px"},class:"card-content",key:`${de.key}-${Ve}`},[S.value=="article"?(e.openBlock(),e.createBlock(ul,{key:0,componentProps:de,singleColumn:k.value==1},null,8,["componentProps","singleColumn"])):e.createCommentVNode("",!0)]))),128))])]))],2),n.isPreview?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(Te,{key:0,show:i.value,"onUpdate:show":Q[0]||(Q[0]=de=>i.value=de),onHandleEdit:Q[1]||(Q[1]=de=>s.value=!0),onHandleDelete:l,onHandleCopy:r,onHandlePaste:u},null,8,["show"]))],36)):e.createCommentVNode("",!0),n.isPreview?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(DM,{key:1,show:s.value,"onUpdate:show":Q[4]||(Q[4]=de=>s.value=de),data:n.modelValue},null,8,["show","data"]))],64)}}}),Gd=ne(OM,[["__scopeId","data-v-26b3b079"]]),MM=Object.freeze(Object.defineProperty({__proto__:null,default:Gd},Symbol.toStringTag,{value:"Module"})),UM={class:"seting-box"},RM={key:0},FM={class:"draggable_box"},HM={class:"drag_top_box"},jM=["onClick"],zM=["src"],qM={class:"item-uplaod flex items-center"},WM={class:"btn_group"},GM=e.defineComponent({__name:"setting",props:{show:{type:Boolean,default:!1},data:{type:Object,default:()=>{}}},emits:["update:show"],setup(n,{emit:t}){const o=e.defineAsyncComponent(()=>import("vuedraggable")),a=n,i=t,s=e.computed(()=>({animation:200,group:"links",disabled:!1,ghostClass:"ghost",handle:".drag-handle",filter:".rich-text-editor, .arco-input, .arco-select, .arco-checkbox",preventOnFilter:!1})),l=()=>{i("update:show",!1)},r=e.ref(!1),u=e.ref(new Set),c=g=>{if(!u.value.has(g.key))u.value.add(g.key);else{const p=[];a.data.list.forEach(b=>{b.key&&p.push(b.key)}),u.value=new Set(p),u.value.delete(g.key)}},f=g=>{a.data.list=a.data.list.filter(p=>p.key!==g)},m=g=>u.value.has(g.key),d=e.ref(!1);e.watch(()=>{var g;return(g=a.data)==null?void 0:g.list},g=>{if(g&&Array.isArray(g)&&!d.value){d.value=!0;const p=g.map(b=>b.key);u.value=new Set(p)}},{immediate:!0,deep:!0});const h=g=>{const p={key:R(8),title:"示例",desc:"描述",date:"2024-03-08",category:"news",link:"https://www.baidu.com",labelName:"NEWS",image:"https://images.unsplash.com/photo-1677442136019-21780ecad995?w=800&h=600&fit=crop",alt:"人工智能概念图"};g==="prepend"?a.data.list=[p,...a.data.list||[]]:g==="append"&&(a.data.list=[...a.data.list||[],p])};return(g,p)=>{const b=e.resolveComponent("a-option"),_=e.resolveComponent("a-select"),w=e.resolveComponent("a-slider"),v=e.resolveComponent("icon-drag-dot"),V=e.resolveComponent("icon-drag-arrow"),C=e.resolveComponent("icon-delete"),S=e.resolveComponent("a-input"),N=e.resolveComponent("a-date-picker"),D=e.resolveComponent("a-button"),$=e.resolveComponent("a-drawer");return e.openBlock(),e.createBlock($,{width:500,visible:n.show,footer:!1,onCancel:l,unmountOnClose:""},{title:e.withCtx(()=>{var k;return[e.createTextVNode(e.toDisplayString((k=n.data)==null?void 0:k.type)+"组件编辑 ",1)]}),default:e.withCtx(()=>[e.createElementVNode("div",UM,[p[24]||(p[24]=e.createElementVNode("p",{class:"item-title"},"组件宽度",-1)),e.createVNode(_,{style:{width:"320px",background:"#ffffff"},modelValue:n.data.width,"onUpdate:modelValue":p[0]||(p[0]=k=>n.data.width=k),placeholder:"请选择","allow-clear":""},{default:e.withCtx(()=>[e.createVNode(b,{value:"default"},{default:e.withCtx(()=>[...p[9]||(p[9]=[e.createTextVNode("默认",-1)])]),_:1}),e.createVNode(b,{value:"small"},{default:e.withCtx(()=>[...p[10]||(p[10]=[e.createTextVNode("小",-1)])]),_:1}),e.createVNode(b,{value:"middle"},{default:e.withCtx(()=>[...p[11]||(p[11]=[e.createTextVNode("中",-1)])]),_:1}),e.createVNode(b,{value:"max"},{default:e.withCtx(()=>[...p[12]||(p[12]=[e.createTextVNode("大",-1)])]),_:1})]),_:1},8,["modelValue"]),p[25]||(p[25]=e.createElementVNode("p",{class:"item-title"},"背景色",-1)),e.createVNode(_,{style:{width:"320px",background:"#ffffff"},modelValue:n.data.bgColor,"onUpdate:modelValue":p[1]||(p[1]=k=>n.data.bgColor=k),placeholder:"Please select ..."},{default:e.withCtx(()=>[e.createVNode(b,{value:"#ffffff"},{default:e.withCtx(()=>[...p[13]||(p[13]=[e.createTextVNode("白色",-1)])]),_:1}),e.createVNode(b,{value:"#f8f9fa"},{default:e.withCtx(()=>[...p[14]||(p[14]=[e.createTextVNode("灰色",-1)])]),_:1})]),_:1},8,["modelValue"]),p[26]||(p[26]=e.createElementVNode("p",{class:"item-title"},"桌面显示的列数(最小:1,最大:4)",-1)),e.createVNode(w,{modelValue:n.data.row,"onUpdate:modelValue":p[2]||(p[2]=k=>n.data.row=k),min:1,max:4,"default-value":3,"show-input":""},null,8,["modelValue"]),p[27]||(p[27]=e.createElementVNode("p",{class:"item-title"},"移动端显示的列数(最小:1,最大:2)",-1)),e.createVNode(w,{modelValue:n.data.mobileRow,"onUpdate:modelValue":p[3]||(p[3]=k=>n.data.mobileRow=k),min:1,max:2,"default-value":2,"show-input":""},null,8,["modelValue"]),p[28]||(p[28]=e.createElementVNode("p",{class:"item-title"},"文章",-1)),n.data.list.length===0?(e.openBlock(),e.createElementBlock("div",RM,"暂无数据")):e.createCommentVNode("",!0),n.data.list.length?(e.openBlock(),e.createBlock(e.unref(o),e.mergeProps({key:1,modelValue:n.data.list,"onUpdate:modelValue":p[4]||(p[4]=k=>n.data.list=k),"component-data":{tag:"div",type:"transition-group",name:r.value?null:"flip-list"}},s.value,{disabled:!1,onStart:p[5]||(p[5]=k=>r.value=!0),onEnd:p[6]||(p[6]=k=>r.value=!1),"item-key":"key"}),{item:e.withCtx(({element:k,index:A})=>[e.createElementVNode("div",FM,[e.createElementVNode("div",HM,[e.createElementVNode("div",{onClick:B=>c(k)},[e.createVNode(v,{style:{"margin-right":"10px"}}),e.createTextVNode(e.toDisplayString(k.title),1)],8,jM),e.createElementVNode("div",null,[e.createVNode(V,{class:"icon_drag"}),e.createVNode(C,{class:"btn-delete",onClick:e.withModifiers(B=>f(k.key),["stop"])},null,8,["onClick"])])]),e.createVNode(e.Transition,{name:"collapse"},{default:e.withCtx(()=>[e.withDirectives(e.createElementVNode("div",null,[p[15]||(p[15]=e.createElementVNode("h2",null,"照片",-1)),p[16]||(p[16]=e.createElementVNode("p",{class:"item-title"},"标题",-1)),e.createVNode(S,{modelValue:k.title,"onUpdate:modelValue":B=>k.title=B,placeholder:"请输入标题","allow-clear":""},null,8,["modelValue","onUpdate:modelValue"]),p[17]||(p[17]=e.createElementVNode("p",{class:"item-title"},"图片",-1)),e.createElementVNode("img",{class:"item-img",src:k.image},null,8,zM),e.createElementVNode("div",qM,[e.createVNode(S,{modelValue:k.image,"onUpdate:modelValue":B=>k.image=B,placeholder:"请输入图片链接","allow-clear":""},null,8,["modelValue","onUpdate:modelValue"]),e.createVNode(ze,{modelValue:k.image,"onUpdate:modelValue":B=>k.image=B,name:"BannerPage","button-class":"fit-content"},null,8,["modelValue","onUpdate:modelValue"])]),p[18]||(p[18]=e.createElementVNode("p",{class:"item-title"},"网址",-1)),e.createVNode(S,{modelValue:k.link,"onUpdate:modelValue":B=>k.link=B,placeholder:"请输入网址","allow-clear":""},null,8,["modelValue","onUpdate:modelValue"]),p[19]||(p[19]=e.createElementVNode("p",{class:"item-title"},"标签名称",-1)),e.createVNode(S,{modelValue:k.labelName,"onUpdate:modelValue":B=>k.labelName=B,placeholder:"请输入标签名称","allow-clear":""},null,8,["modelValue","onUpdate:modelValue"]),p[20]||(p[20]=e.createElementVNode("p",{class:"item-title"},"描述",-1)),e.createVNode(S,{modelValue:k.desc,"onUpdate:modelValue":B=>k.desc=B,placeholder:"请输入描述","allow-clear":""},null,8,["modelValue","onUpdate:modelValue"]),p[21]||(p[21]=e.createElementVNode("p",{class:"item-title"},"日期",-1)),e.createVNode(N,{modelValue:k.date,"onUpdate:modelValue":B=>k.date=B,style:{width:"200px",background:"#ffffff"}},null,8,["modelValue","onUpdate:modelValue"])],512),[[e.vShow,!m(k)]])]),_:2},1024)])]),_:1},16,["modelValue","component-data"])):e.createCommentVNode("",!0),e.createElementVNode("div",WM,[e.createVNode(D,{onClick:p[7]||(p[7]=k=>h("prepend")),type:"primary",style:{"margin-right":"20px"}},{default:e.withCtx(()=>[...p[22]||(p[22]=[e.createTextVNode("前置",-1)])]),_:1}),e.createVNode(D,{onClick:p[8]||(p[8]=k=>h("append")),type:"primary"},{default:e.withCtx(()=>[...p[23]||(p[23]=[e.createTextVNode("追加",-1)])]),_:1})])])]),_:1},8,["visible"])}}}),XM=ne(GM,[["__scopeId","data-v-04364be1"]]),YM={class:"mt-10 mt-md-12"},KM=e.defineComponent({name:"CardCarouselMultiRowArticles",__name:"index",props:{modelValue:{type:Object,default:()=>{}},isPreview:{type:Boolean,default:!0}},emits:["update:modelValue","handleDelete","handleCopy","handlePaste","showLightboxVideo","showLightBoxImage"],setup(n,{emit:t}){const o=n,a=t,i=[ct.Navigation,ct.Pagination,ct.Autoplay],s=e.ref(!1),l=e.ref(!1),r=()=>{a("handleDelete",o.modelValue.id)},u=()=>{a("handleCopy",o.modelValue)},c=oe=>{a("handlePaste",oe)};(()=>{var fe;if(o.modelValue&&o.modelValue.data)return;const oe={id:((fe=o.modelValue)==null?void 0:fe.id)||R(),type:"CardCarouselMultiRowArticles",bgColor:"#ffffff",width:"default",row:4,mobileRow:2,list:[{key:"art-001",title:"示例文章八:完整一页 8 条",desc:"perChunk=4×row(2)=8,正好一页显示 8 个卡片。",date:"2024-03-08",category:"news",link:"https://example.com/articles/art-008",labelName:"NEWS",image:"https://images.unsplash.com/photo-1677442136019-21780ecad995?w=800&h=600&fit=crop",alt:"人工智能概念图"},{key:"art-002",title:"示例文章八:完整一页 8 条",desc:"perChunk=4×row(2)=8,正好一页显示 8 个卡片。",date:"2024-03-08",category:"news",link:"https://example.com/articles/art-008",labelName:"NEWS",image:"https://images.unsplash.com/photo-1677442136019-21780ecad995?w=800&h=600&fit=crop",alt:"人工智能概念图"},{key:"art-003",title:"示例文章八:完整一页 8 条",desc:"perChunk=4×row(2)=8,正好一页显示 8 个卡片。",date:"2024-03-08",category:"news",link:"https://example.com/articles/art-008",labelName:"NEWS",image:"https://images.unsplash.com/photo-1677442136019-21780ecad995?w=800&h=600&fit=crop",alt:"人工智能概念图"},{key:"art-004",title:"示例文章八:完整一页 8 条",desc:"perChunk=4×row(2)=8,正好一页显示 8 个卡片。",date:"2024-03-08",category:"news",link:"https://example.com/articles/art-008",labelName:"NEWS",image:"https://images.unsplash.com/photo-1677442136019-21780ecad995?w=800&h=600&fit=crop",alt:"人工智能概念图"},{key:"art-005",title:"示例文章八:完整一页 8 条",desc:"perChunk=4×row(2)=8,正好一页显示 8 个卡片。",date:"2024-03-08",category:"news",link:"https://example.com/articles/art-008",labelName:"NEWS",image:"https://images.unsplash.com/photo-1677442136019-21780ecad995?w=800&h=600&fit=crop",alt:"人工智能概念图"}]};a("update:modelValue",oe)})();const m=e.ref(!1),d=e.ref(null),h=e.ref(null),g=e.ref(null),p=oe=>{g.value=oe},b=e.ref(0),_=e.ref([]),w=e.ref({data:[],meta:{}}),v=e.ref([]);e.computed(()=>{var oe;return((oe=o.modelValue)==null?void 0:oe.classes)??null}),e.computed(()=>{var oe;return((oe=o.modelValue)==null?void 0:oe.style)??null}),e.computed(()=>{var oe;return((oe=o.modelValue)==null?void 0:oe.type)??"articles"}),e.computed(()=>{var oe;return((oe=o.modelValue)==null?void 0:oe.width)??null});const V=e.computed(()=>{var oe;return((oe=o.modelValue)==null?void 0:oe.row)??2}),C=e.computed(()=>{var oe;return((oe=o.modelValue)==null?void 0:oe.mobileRow)??2}),S=e.computed(()=>{var oe;return((oe=o.modelValue)==null?void 0:oe.apiLink)??null});e.computed(()=>{var oe;return((oe=o.modelValue)==null?void 0:oe.website)??void 0??""}),e.computed(()=>{var oe;return((oe=o.modelValue)==null?void 0:oe.locale)??"en"});const N=e.ref(1024),D=e.computed(()=>N.value>=768?V.value:C.value),$=e.computed(()=>D.value*2),k=oe=>Math.min(2,Math.ceil(oe.length/D.value)),A=(oe,fe)=>{const Ce=(fe-1)*D.value,Se=Ce+D.value;return oe.slice(Ce,Se)};e.computed(()=>V.value),e.computed(()=>N.value>=768?N.value>=1024?4:3:2);const B=e.computed(()=>{var oe,fe;return(oe=o.modelValue)!=null&&oe.getDataType?w.value.data:S.value?v.value:((fe=o.modelValue)==null?void 0:fe.list)??[]}),I=e.computed(()=>_.value.length>1);e.computed(()=>{var oe;return((oe=h.value)==null?void 0:oe.swiper)??null});const z={768:{slidesPerView:"auto",slidesPerGroup:1,spaceBetween:16},1024:{slidesPerView:1,slidesPerGroup:1,spaceBetween:16}};e.watch(b,()=>{W(d.value)}),e.watch([B,$],()=>{H()});const Y=e.computed(()=>{var fe;const oe=(fe=o.modelValue)==null?void 0:fe.width;return!oe||oe==="default"?"container-content":typeof oe=="string"?oe.startsWith("container-content-")?oe:{small:"container-content-small",middle:"container-content-middle",medium:"container-content-middle",max:"container-content-max"}[oe]||"container-content":typeof oe=="number"?`container-content-${oe}`:"container-content"}),H=()=>{const oe=B.value,fe=[];oe.forEach((Ce,Se)=>{const ae=Math.floor(Se/$.value);fe[ae]||(fe[ae]=[]),fe[ae].push(Ce)}),_.value=fe},q=oe=>{var fe;b.value=(oe==null?void 0:oe.realIndex)??((fe=g.value)==null?void 0:fe.realIndex)??0,Ve(),de()},O=oe=>{var fe,Ce;(Ce=(fe=g.value)==null?void 0:fe.slideToLoop)==null||Ce.call(fe,oe,600)},J=()=>{var oe,fe;(fe=(oe=g.value)==null?void 0:oe.slidePrev)==null||fe.call(oe,600)},F=()=>{var oe,fe;(fe=(oe=g.value)==null?void 0:oe.slideNext)==null||fe.call(oe,600)},M=oe=>{if(oe.video_type==="outer")return;const fe=B.value.filter(Se=>Se.video_type!=="outer"&&Se.type!=="photo"),Ce=fe.findIndex(Se=>Se.slug===oe.slug);a("showLightboxVideo",{idx:Ce,list:fe})},Q=oe=>{const fe=B.value.filter(Se=>Se.type==="photo"),Ce=fe.findIndex(Se=>Se.slug===oe.slug);a("showLightBoxImage",{idx:Ce,url:oe.url,text:oe.text||oe.title,list:fe})},W=oe=>{if(!oe||!m.value)return;const fe=N.value>=1024?170:150,Se=oe.getBoundingClientRect().top+window.pageYOffset-fe;window.scroll({top:Se,left:0,behavior:"smooth"})},Z=oe=>{const fe=oe.currentTarget,Ce=fe==null?void 0:fe.dataset.slug,Se=fe==null?void 0:fe.dataset.type,ae=B.value.find(ce=>ce.key==Ce||ce.slug==Ce);ae&&(Se==="photo"?Q(ae):M(ae))},de=()=>{m.value&&(Array.from(document.getElementsByClassName("card-asset")).forEach(oe=>{oe.addEventListener("click",Z)}),Array.from(document.getElementsByClassName("card-video")).forEach(oe=>{oe.addEventListener("click",Z)}))},Ve=()=>{m.value&&(Array.from(document.getElementsByClassName("card-asset")).forEach(oe=>{oe.removeEventListener("click",Z)}),Array.from(document.getElementsByClassName("card-video")).forEach(oe=>{oe.removeEventListener("click",Z)}))};return e.onMounted(()=>{m.value=!0,N.value=window.innerWidth,window.addEventListener("resize",()=>{N.value=window.innerWidth})}),e.onBeforeUnmount(()=>{Ve()}),(oe,fe)=>{var Se;const Ce=e.resolveComponent("client-only");return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("div",{class:"CardCarouselMultiRowArticles_wrap",ref_key:"parent",ref:d,onMouseenter:fe[2]||(fe[2]=ae=>s.value=!0),onMouseleave:fe[3]||(fe[3]=ae=>s.value=!1)},[e.createElementVNode("div",{style:e.normalizeStyle({backgroundColor:(Se=n.modelValue)==null?void 0:Se.bgColor,marginTop:"30px",marginBottom:"30px"}),class:e.normalizeClass(["CardCarouselMultiRowArticles_container",[Y.value]])},[e.createVNode(Ce,null,{default:e.withCtx(()=>[e.createVNode(e.unref(Et.Swiper),{ref_key:"swiperRef",ref:h,modules:i,"centered-slides":!1,speed:600,"slides-per-view":1,"slides-per-group":1,"space-between":16,loop:!0,breakpoints:z,"auto-height":!0,class:"swiper card-carousel__swiper",onSwiper:p,onSlideChange:q},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(_.value,(ae,ce)=>(e.openBlock(),e.createBlock(e.unref(Et.SwiperSlide),{class:"swiper-slide",key:ce},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(k(ae),se=>(e.openBlock(),e.createElementBlock("div",{key:se,class:e.normalizeClass(["row",[`row-cols-${D.value}`]]),style:e.normalizeStyle({"--cc-cols":D.value})},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(A(ae,se),he=>(e.openBlock(),e.createElementBlock("div",{class:"slide-content col",key:he.key||he.slug},[e.createVNode(ul,{componentProps:he},null,8,["componentProps"])]))),128))],6))),128))]),_:2},1024))),128))]),_:1},512)]),_:1}),e.withDirectives(e.createElementVNode("div",YM,[e.createVNode(es,{currentIndex:b.value,onUpdatePage:O,count:_.value.length,onSlidePrev:J,onSlideNext:F,isLoop:!0,dark:""},null,8,["currentIndex","count"])],512),[[e.vShow,I.value]])],6),n.isPreview?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(Te,{key:0,show:s.value,"onUpdate:show":fe[0]||(fe[0]=ae=>s.value=ae),onHandleEdit:fe[1]||(fe[1]=ae=>l.value=!0),onHandleDelete:r,onHandleCopy:u,onHandlePaste:c},null,8,["show"]))],544),n.isPreview?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(XM,{key:0,show:l.value,"onUpdate:show":fe[4]||(fe[4]=ae=>l.value=ae),data:n.modelValue},null,8,["show","data"]))],64)}}}),Xd=ne(KM,[["__scopeId","data-v-db6f449d"]]),QM=Object.freeze(Object.defineProperty({__proto__:null,default:Xd},Symbol.toStringTag,{value:"Module"})),JM={class:"setting-content"},ZM={class:"setting-header flex items-center"},eU=e.defineComponent({__name:"setting",props:{show:{type:Boolean,default:!1},data:{type:Object,default:()=>{}}},emits:["update:show"],setup(n,{emit:t}){const o=e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./index-QFpkZqlg.js"))),a=t,i=()=>{a("update:show",!1)};return e.ref(1),(s,l)=>{const r=e.resolveComponent("a-switch"),u=e.resolveComponent("a-option"),c=e.resolveComponent("a-select"),f=e.resolveComponent("a-drawer");return e.openBlock(),e.createBlock(f,{width:500,visible:n.show,footer:!1,onCancel:i,unmountOnClose:""},{title:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(n.data.type)+"组件编辑 ",1)]),default:e.withCtx(()=>[e.createElementVNode("div",JM,[e.createElementVNode("div",ZM,[l[5]||(l[5]=e.createElementVNode("span",{class:"header-title"},"仅显示PC端",-1)),e.createVNode(r,{modelValue:n.data.onlyShowPc,"onUpdate:modelValue":l[0]||(l[0]=m=>n.data.onlyShowPc=m)},null,8,["modelValue"])]),l[12]||(l[12]=e.createElementVNode("p",{class:"item-title"},"组件宽度",-1)),e.createVNode(c,{modelValue:n.data.data.width,"onUpdate:modelValue":l[1]||(l[1]=m=>n.data.data.width=m),placeholder:"请选择","allow-clear":""},{default:e.withCtx(()=>[e.createVNode(u,{value:"default"},{default:e.withCtx(()=>[...l[6]||(l[6]=[e.createTextVNode("默认",-1)])]),_:1}),e.createVNode(u,{value:"small"},{default:e.withCtx(()=>[...l[7]||(l[7]=[e.createTextVNode("小",-1)])]),_:1}),e.createVNode(u,{value:"middle"},{default:e.withCtx(()=>[...l[8]||(l[8]=[e.createTextVNode("中",-1)])]),_:1}),e.createVNode(u,{value:"max"},{default:e.withCtx(()=>[...l[9]||(l[9]=[e.createTextVNode("大",-1)])]),_:1})]),_:1},8,["modelValue"]),l[13]||(l[13]=e.createElementVNode("p",{class:"item-title"},"背景颜色",-1)),e.createVNode(c,{modelValue:n.data.data.bgColor,"onUpdate:modelValue":l[2]||(l[2]=m=>n.data.data.bgColor=m),placeholder:"请选择","allow-clear":""},{default:e.withCtx(()=>[e.createVNode(u,{value:"#ffffff"},{default:e.withCtx(()=>[...l[10]||(l[10]=[e.createTextVNode("白色",-1)])]),_:1}),e.createVNode(u,{value:"#F7F7FA"},{default:e.withCtx(()=>[...l[11]||(l[11]=[e.createTextVNode("灰色",-1)])]),_:1})]),_:1},8,["modelValue"]),l[14]||(l[14]=e.createElementVNode("p",{class:"item-title"},"标题",-1)),e.createVNode(e.unref(o),{modelValue:n.data.data.title,"onUpdate:modelValue":l[3]||(l[3]=m=>n.data.data.title=m),name:"CustomText_editor_title"},null,8,["modelValue"]),l[15]||(l[15]=e.createElementVNode("p",{class:"item-title"},"内容",-1)),e.createVNode(e.unref(o),{modelValue:n.data.data.description,"onUpdate:modelValue":l[4]||(l[4]=m=>n.data.data.description=m),name:"CustomText_editor_description"},null,8,["modelValue"])])]),_:1},8,["visible"])}}}),tU=ne(eU,[["__scopeId","data-v-7f36578b"]]),nU=["id"],oU=["innerHTML"],aU=["innerHTML"],iU=e.defineComponent({name:"CustomText",__name:"index",props:{modelValue:{type:Object,default:()=>{}},isPreview:{type:Boolean,default:!0}},emits:["update:modelValue","handleDelete","handleCopy","handlePaste"],setup(n,{emit:t}){const o=n,a=t,i=()=>{var h;if(o.modelValue&&o.modelValue.data)return;const d={id:((h=o.modelValue)==null?void 0:h.id)||R(),type:"CustomText",onlyShowPc:!1,data:{width:1920,backgroundColor:"#ffffff",title:"这是标题",description:"这是描述"}};a("update:modelValue",d)},s=e.computed(()=>{var d;return o.isPreview?!((d=o.modelValue)!=null&&d.onlyShowPc)||!Ne():!0}),l=e.ref(!1),r=e.ref(!1),u=e.computed(()=>{var g,p;const d=(p=(g=o.modelValue)==null?void 0:g.data)==null?void 0:p.width;return!d||d==="default"?"container-content":{small:"container-content-small",middle:"container-content-middle",max:"container-content-max"}[d]||"container-content"}),c=()=>{a("handleDelete",o.modelValue.id)},f=()=>{a("handleCopy",o.modelValue)},m=d=>{a("handlePaste",d)};return i(),(d,h)=>{var g,p,b,_,w,v,V,C,S,N,D,$;return e.openBlock(),e.createElementBlock(e.Fragment,null,[s.value?(e.openBlock(),e.createElementBlock("div",{key:0,id:(p=(g=n.modelValue)==null?void 0:g.data)==null?void 0:p.id,class:"custom-text",style:e.normalizeStyle({"background-color":(_=(b=n.modelValue)==null?void 0:b.data)==null?void 0:_.bgColor}),onMouseenter:h[2]||(h[2]=k=>l.value=!0),onMouseleave:h[3]||(h[3]=k=>l.value=!1)},[e.createElementVNode("div",{class:e.normalizeClass(["custom-text__container",[u.value,{"text-center":d.center}]])},[(v=(w=n.modelValue)==null?void 0:w.data)!=null&&v.title?(e.openBlock(),e.createElementBlock("div",{key:0,class:"custom-text__title",innerHTML:(C=(V=n.modelValue)==null?void 0:V.data)==null?void 0:C.title},null,8,oU)):e.createCommentVNode("",!0),(N=(S=n.modelValue)==null?void 0:S.data)!=null&&N.description?(e.openBlock(),e.createElementBlock("div",{key:1,class:"custom-text__text",innerHTML:($=(D=n.modelValue)==null?void 0:D.data)==null?void 0:$.description},null,8,aU)):e.createCommentVNode("",!0)],2),n.isPreview?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(Te,{key:0,show:l.value,"onUpdate:show":h[0]||(h[0]=k=>l.value=k),onHandleEdit:h[1]||(h[1]=k=>r.value=!0),onHandleDelete:c,onHandleCopy:f,onHandlePaste:m},null,8,["show"]))],44,nU)):e.createCommentVNode("",!0),n.isPreview?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(tU,{key:1,show:r.value,"onUpdate:show":h[4]||(h[4]=k=>r.value=k),data:n.modelValue},null,8,["show","data"]))],64)}}}),uv=ne(iU,[["__scopeId","data-v-08eed582"]]),sU=Object.freeze(Object.defineProperty({__proto__:null,default:uv},Symbol.toStringTag,{value:"Module"})),cv={install:n=>{n.component("CustomText",uv)}},lU={class:"setting-content"},rU={class:"setting-header flex items-center"},dU=["src"],uU={class:"item-uplaod flex items-center"},cU=e.defineComponent({__name:"setting",props:{show:{type:Boolean,default:!1},data:{type:Object,default:()=>{}}},emits:["update:show"],setup(n,{emit:t}){const o=e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./index-QFpkZqlg.js"))),a=t,i=()=>{a("update:show",!1)};return(s,l)=>{const r=e.resolveComponent("a-switch"),u=e.resolveComponent("a-option"),c=e.resolveComponent("a-select"),f=e.resolveComponent("a-input"),m=e.resolveComponent("Upload"),d=e.resolveComponent("a-drawer");return e.openBlock(),e.createBlock(d,{width:500,visible:n.show,footer:!1,onCancel:i,unmountOnClose:""},{title:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(n.data.type)+"组件编辑 ",1)]),default:e.withCtx(()=>[e.createElementVNode("div",lU,[e.createElementVNode("div",rU,[l[6]||(l[6]=e.createElementVNode("span",{class:"header-title"},"仅显示PC端",-1)),e.createVNode(r,{modelValue:n.data.onlyShowPc,"onUpdate:modelValue":l[0]||(l[0]=h=>n.data.onlyShowPc=h)},null,8,["modelValue"])]),l[11]||(l[11]=e.createElementVNode("p",{class:"item-title"},"组件宽度",-1)),e.createVNode(c,{modelValue:n.data.data.width,"onUpdate:modelValue":l[1]||(l[1]=h=>n.data.data.width=h),placeholder:"请选择","allow-clear":""},{default:e.withCtx(()=>[e.createVNode(u,{value:"default"},{default:e.withCtx(()=>[...l[7]||(l[7]=[e.createTextVNode("默认",-1)])]),_:1}),e.createVNode(u,{value:"small"},{default:e.withCtx(()=>[...l[8]||(l[8]=[e.createTextVNode("小",-1)])]),_:1}),e.createVNode(u,{value:"middle"},{default:e.withCtx(()=>[...l[9]||(l[9]=[e.createTextVNode("中",-1)])]),_:1}),e.createVNode(u,{value:"max"},{default:e.withCtx(()=>[...l[10]||(l[10]=[e.createTextVNode("大",-1)])]),_:1})]),_:1},8,["modelValue"]),l[12]||(l[12]=e.createElementVNode("p",{class:"item-title"},"图片",-1)),e.createElementVNode("img",{class:"item-img",src:n.data.data.image},null,8,dU),e.createElementVNode("div",uU,[e.createVNode(f,{modelValue:n.data.data.image,"onUpdate:modelValue":l[2]||(l[2]=h=>n.data.data.image=h),placeholder:"请输入图片链接","allow-clear":""},null,8,["modelValue"]),e.createVNode(m,{modelValue:n.data.data.image,"onUpdate:modelValue":l[3]||(l[3]=h=>n.data.data.image=h),name:"MediaImageFull","button-class":"fit-content"},null,8,["modelValue"])]),l[13]||(l[13]=e.createElementVNode("p",{class:"item-title"},"图片alt",-1)),e.createVNode(f,{modelValue:n.data.data.imgAlt,"onUpdate:modelValue":l[4]||(l[4]=h=>n.data.data.imgAlt=h),placeholder:"请输入图片alt","allow-clear":""},null,8,["modelValue"]),l[14]||(l[14]=e.createElementVNode("p",{class:"item-title"},"图片描述",-1)),e.createVNode(e.unref(o),{modelValue:n.data.data.text,"onUpdate:modelValue":l[5]||(l[5]=h=>n.data.data.text=h),name:"MediaImageFull_editor_text"},null,8,["modelValue"])])]),_:1},8,["visible"])}}}),mU=ne(cU,[["__scopeId","data-v-9f9645fe"]]),pU=["id"],hU={class:"media-image-full"},fU={class:"img-fit"},gU=["src","alt"],vU=["innerHTML"],yU=e.defineComponent({name:"MediaImageFull",__name:"index",props:{modelValue:{type:Object,default:()=>{}},isPreview:{type:Boolean,default:!0}},emits:["update:modelValue","handleDelete","handleCopy","handlePaste"],setup(n,{emit:t}){const o=n,a=t,i=()=>{var h;if(o.modelValue&&o.modelValue.data)return;const d={id:((h=o.modelValue)==null?void 0:h.id)||R(),type:"MediaImageFull",onlyShowPc:!1,data:{width:"default",image:"https://osswebsite.ycyw.com/media-library/ywies-bj/images/home/ywies-tx.jpg",imgAlt:"这是图片alt",text:"这是图片描述"}};a("update:modelValue",d)},s=e.computed(()=>{var d;return o.isPreview?!((d=o.modelValue)!=null&&d.onlyShowPc)||!Ne():!0}),l=e.ref(!1),r=e.ref(!1),u=e.computed(()=>{var g,p;const d=(p=(g=o.modelValue)==null?void 0:g.data)==null?void 0:p.width;return!d||d==="default"?"container-content":{small:"container-content-small",middle:"container-content-middle",max:"container-content-max"}[d]||"container-content"}),c=()=>{a("handleDelete",o.modelValue.id)},f=()=>{a("handleCopy",o.modelValue)},m=d=>{a("handlePaste",d)};return i(),(d,h)=>{var g,p,b,_,w,v,V,C,S,N;return e.openBlock(),e.createElementBlock(e.Fragment,null,[s.value?(e.openBlock(),e.createElementBlock("div",{key:0,class:"mediaImageFull_wrap",id:(p=(g=n.modelValue)==null?void 0:g.data)==null?void 0:p.id,onMouseenter:h[2]||(h[2]=D=>l.value=!0),onMouseleave:h[3]||(h[3]=D=>l.value=!1)},[e.createElementVNode("div",hU,[e.createElementVNode("div",{class:e.normalizeClass(["media-image-full__container",u.value])},[e.createElementVNode("div",fU,[e.createElementVNode("img",{style:{width:"100%",height:"auto"},src:(_=(b=n.modelValue)==null?void 0:b.data)==null?void 0:_.image,alt:(v=(w=n.modelValue)==null?void 0:w.data)==null?void 0:v.imgAlt},null,8,gU),(C=(V=n.modelValue)==null?void 0:V.data)!=null&&C.text?(e.openBlock(),e.createElementBlock("div",{key:0,class:"media-image-full__desc",innerHTML:(N=(S=n.modelValue)==null?void 0:S.data)==null?void 0:N.text},null,8,vU)):e.createCommentVNode("",!0)])],2)]),n.isPreview?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(Te,{key:0,show:l.value,"onUpdate:show":h[0]||(h[0]=D=>l.value=D),onHandleEdit:h[1]||(h[1]=D=>r.value=!0),onHandleDelete:c,onHandleCopy:f,onHandlePaste:m},null,8,["show"]))],40,pU)):e.createCommentVNode("",!0),n.isPreview?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(mU,{key:1,show:r.value,"onUpdate:show":h[4]||(h[4]=D=>r.value=D),data:n.modelValue},null,8,["show","data"]))],64)}}}),Yd=ne(yU,[["__scopeId","data-v-6483e262"]]),_U=Object.freeze(Object.defineProperty({__proto__:null,default:Yd},Symbol.toStringTag,{value:"Module"})),bU={class:"setting-content"},wU={class:"setting-header flex items-center"},xU=["src"],VU={class:"item-uplaod flex items-center"},CU=e.defineComponent({__name:"setting",props:{show:{type:Boolean,default:!1},data:{type:Object,default:()=>{}}},emits:["update:show"],setup(n,{emit:t}){e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./index-QFpkZqlg.js")));const o=t,a=()=>{o("update:show",!1)};return(i,s)=>{const l=e.resolveComponent("a-switch"),r=e.resolveComponent("a-input"),u=e.resolveComponent("Upload"),c=e.resolveComponent("a-drawer");return e.openBlock(),e.createBlock(c,{width:500,visible:n.show,footer:!1,onCancel:a,unmountOnClose:""},{title:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(n.data.type)+"组件编辑 ",1)]),default:e.withCtx(()=>[e.createElementVNode("div",bU,[e.createElementVNode("div",wU,[s[4]||(s[4]=e.createElementVNode("span",{class:"header-title"},"仅显示PC端",-1)),e.createVNode(l,{modelValue:n.data.onlyShowPc,"onUpdate:modelValue":s[0]||(s[0]=f=>n.data.onlyShowPc=f)},null,8,["modelValue"])]),s[5]||(s[5]=e.createElementVNode("p",{class:"item-title"},"图片",-1)),e.createElementVNode("img",{class:"item-img",src:n.data.data.image},null,8,xU),e.createElementVNode("div",VU,[e.createVNode(r,{modelValue:n.data.data.image,"onUpdate:modelValue":s[1]||(s[1]=f=>n.data.data.image=f),placeholder:"请输入图片链接","allow-clear":""},null,8,["modelValue"]),e.createVNode(u,{modelValue:n.data.data.image,"onUpdate:modelValue":s[2]||(s[2]=f=>n.data.data.image=f),name:"MediaImageFull","button-class":"fit-content"},null,8,["modelValue"])]),s[6]||(s[6]=e.createElementVNode("p",{class:"item-title"},"图片alt",-1)),e.createVNode(r,{modelValue:n.data.data.imgAlt,"onUpdate:modelValue":s[3]||(s[3]=f=>n.data.data.imgAlt=f),placeholder:"请输入图片alt","allow-clear":""},null,8,["modelValue"])])]),_:1},8,["visible"])}}}),kU=ne(CU,[["__scopeId","data-v-97710184"]]),EU=["id"],TU={class:"media-image-static"},NU={class:"img-fit"},SU=["src","alt"],BU=e.defineComponent({name:"MediaImageStatic",__name:"index",props:{modelValue:{type:Object,default:()=>{}},isPreview:{type:Boolean,default:!0}},emits:["update:modelValue","handleDelete","handleCopy","handlePaste"],setup(n,{emit:t}){const o=n,a=t,i=()=>{var d;if(o.modelValue&&o.modelValue.data)return;const m={id:((d=o.modelValue)==null?void 0:d.id)||R(),type:"MediaImageStatic",onlyShowPc:!1,data:{image:"https://osswebsite.ycyw.com/media-library/ywies-bj/images/home/ywies-tx.jpg",imgAlt:"这是图片alt"}};a("update:modelValue",m)},s=e.computed(()=>{var m;return o.isPreview?!((m=o.modelValue)!=null&&m.onlyShowPc)||!Ne():!0}),l=e.ref(!1),r=e.ref(!1);e.computed(()=>{var h,g;const m=(g=(h=o.modelValue)==null?void 0:h.data)==null?void 0:g.width;return!m||m==="default"?"container-content":{small:"container-content-small",middle:"container-content-middle",max:"container-content-max"}[m]||"container-content"});const u=()=>{a("handleDelete",o.modelValue.id)},c=()=>{a("handleCopy",o.modelValue)},f=m=>{a("handlePaste",m)};return i(),(m,d)=>{var h,g,p,b,_,w;return e.openBlock(),e.createElementBlock(e.Fragment,null,[s.value?(e.openBlock(),e.createElementBlock("div",{key:0,class:"mediaImageStatic_wrap",id:(g=(h=n.modelValue)==null?void 0:h.data)==null?void 0:g.id,onMouseenter:d[2]||(d[2]=v=>l.value=!0),onMouseleave:d[3]||(d[3]=v=>l.value=!1)},[e.createElementVNode("div",TU,[e.createElementVNode("div",NU,[e.createElementVNode("img",{style:{width:"100%",height:"auto"},src:(b=(p=n.modelValue)==null?void 0:p.data)==null?void 0:b.image,alt:(w=(_=n.modelValue)==null?void 0:_.data)==null?void 0:w.imgAlt},null,8,SU)])]),n.isPreview?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(Te,{key:0,show:l.value,"onUpdate:show":d[0]||(d[0]=v=>l.value=v),onHandleEdit:d[1]||(d[1]=v=>r.value=!0),onHandleDelete:u,onHandleCopy:c,onHandlePaste:f},null,8,["show"]))],40,EU)):e.createCommentVNode("",!0),n.isPreview?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(kU,{key:1,show:r.value,"onUpdate:show":d[4]||(d[4]=v=>r.value=v),data:n.modelValue},null,8,["show","data"]))],64)}}}),Kd=ne(BU,[["__scopeId","data-v-3d6c1c77"]]),DU=Object.freeze(Object.defineProperty({__proto__:null,default:Kd},Symbol.toStringTag,{value:"Module"})),PU={class:"setting-content"},$U={class:"draggable_box"},AU={class:"drag_top_box"},LU=["onClick"],IU=e.defineComponent({__name:"setting",props:{show:{type:Boolean,default:!1},data:{type:Object,default:()=>{}}},emits:["update:show"],setup(n,{emit:t}){const o=e.defineAsyncComponent(()=>import("vuedraggable")),a=n,i=e.ref(!1),s=t,l=e.computed(()=>({animation:200,group:"links",disabled:!1,ghostClass:"ghost",handle:".drag-handle",filter:".rich-text-editor, .arco-input, .arco-select, .arco-checkbox",preventOnFilter:!1})),r=e.ref(new Set),u=e.ref(!1);e.watch(()=>{var g;return[a.show,(g=a.data)==null?void 0:g.list]},([g,p])=>{u.value||(u.value=!0,g&&p&&Array.isArray(p)&&(r.value.clear(),p.forEach(b=>{b.id&&r.value.add(b.id)})))},{immediate:!0,deep:!0});const c=g=>{var p;if(!r.value.has(g.id))r.value.add(g.id);else{const b=[];(p=a.data)!=null&&p.list&&Array.isArray(a.data.list)&&a.data.list.forEach(_=>{_.id&&b.push(_.id)}),r.value=new Set(b),r.value.delete(g.id)}},f=g=>r.value.has(g.id),m=g=>{a.data.list=a.data.list.filter(p=>p.id!==g)},d=()=>{s("update:show",!1)},h=()=>{a.data.list.push({id:R(),title:"标题",description:"描述"})};return(g,p)=>{const b=e.resolveComponent("a-option"),_=e.resolveComponent("a-select"),w=e.resolveComponent("icon-drag-dot"),v=e.resolveComponent("icon-drag-arrow"),V=e.resolveComponent("icon-delete"),C=e.resolveComponent("a-input"),S=e.resolveComponent("icon-plus"),N=e.resolveComponent("a-button"),D=e.resolveComponent("a-drawer");return e.openBlock(),e.createBlock(D,{width:500,visible:n.show,footer:!1,onCancel:d,unmountOnClose:""},{title:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(n.data.type)+"组件编辑 ",1)]),default:e.withCtx(()=>[e.createElementVNode("div",PU,[p[11]||(p[11]=e.createElementVNode("div",{class:"item-title"},"宽度",-1)),e.createVNode(_,{style:{"margin-bottom":"20px"},modelValue:n.data.width,"onUpdate:modelValue":p[0]||(p[0]=$=>n.data.width=$),placeholder:"请选择","allow-clear":""},{default:e.withCtx(()=>[e.createVNode(b,{value:"default"},{default:e.withCtx(()=>[...p[4]||(p[4]=[e.createTextVNode("默认",-1)])]),_:1}),e.createVNode(b,{value:"small"},{default:e.withCtx(()=>[...p[5]||(p[5]=[e.createTextVNode("小",-1)])]),_:1}),e.createVNode(b,{value:"middle"},{default:e.withCtx(()=>[...p[6]||(p[6]=[e.createTextVNode("中",-1)])]),_:1}),e.createVNode(b,{value:"max"},{default:e.withCtx(()=>[...p[7]||(p[7]=[e.createTextVNode("大",-1)])]),_:1})]),_:1},8,["modelValue"]),e.createVNode(e.unref(o),e.mergeProps({modelValue:n.data.list,"onUpdate:modelValue":p[1]||(p[1]=$=>n.data.list=$),"component-data":{tag:"div",type:"transition-group",name:i.value?null:"flip-list"}},l.value,{disabled:!1,onStart:p[2]||(p[2]=$=>i.value=!0),onEnd:p[3]||(p[3]=$=>i.value=!1),"item-key":"id"}),{item:e.withCtx(({element:$})=>[e.createElementVNode("div",$U,[e.createElementVNode("div",AU,[e.createElementVNode("div",{class:"drag-handle",onClick:k=>c($)},[e.createVNode(w,{style:{"margin-right":"10px"}}),e.createTextVNode("标题:"+e.toDisplayString($.title),1)],8,LU),e.createElementVNode("div",null,[e.createVNode(v,{class:"icon_drag"}),e.createVNode(V,{class:"btn-delete",onClick:e.withModifiers(k=>m($.id),["stop"])},null,8,["onClick"])])]),e.createVNode(e.Transition,{name:"collapse"},{default:e.withCtx(()=>[e.withDirectives(e.createElementVNode("div",null,[p[8]||(p[8]=e.createElementVNode("p",{class:"item-title",style:{"margin-top":"40px"}},"标题",-1)),e.createVNode(C,{modelValue:$.title,"onUpdate:modelValue":k=>$.title=k,placeholder:"请输入标题","allow-clear":""},null,8,["modelValue","onUpdate:modelValue"]),p[9]||(p[9]=e.createElementVNode("p",{class:"item-title",style:{"margin-top":"20px"}},"描述",-1)),e.createVNode(C,{modelValue:$.description,"onUpdate:modelValue":k=>$.description=k,placeholder:"请输入描述","allow-clear":""},null,8,["modelValue","onUpdate:modelValue"])],512),[[e.vShow,!f($)]])]),_:2},1024)])]),_:1},16,["modelValue","component-data"]),e.createVNode(N,{style:{"margin-top":"20px"},type:"primary",onClick:h},{icon:e.withCtx(()=>[e.createVNode(S)]),default:e.withCtx(()=>[p[10]||(p[10]=e.createTextVNode(" 新增 ",-1))]),_:1})])]),_:1},8,["visible"])}}}),OU=ne(IU,[["__scopeId","data-v-17433925"]]),MU=["id"],UU={class:"article-list-pure-text"},RU={class:"article-group"},FU={class:"article-item__title"},HU={class:"article-item__description"},jU=e.defineComponent({name:"ArticleListPureText",__name:"index",props:{modelValue:{type:Object,default:()=>{}},isPreview:{type:Boolean,default:!0}},emits:["update:modelValue","handleDelete","handleCopy","handlePaste"],setup(n,{emit:t}){const o=n,a=t,i=()=>{var h;if(o.modelValue&&o.modelValue.list)return;const d={id:((h=o.modelValue)==null?void 0:h.id)||R(),type:"ArticleListPureText",width:"default",list:[{id:R(),title:"标题1",description:"描述1"},{id:R(),title:"标题2",description:"描述2"},{id:R(),title:"标题3",description:"描述3"},{id:R(),title:"标题4",description:"描述4"},{id:R(),title:"标题5",description:"描述5"}]};a("update:modelValue",d)},s=e.ref(!1),l=e.ref(!1),r=e.computed(()=>{var g;const d=(g=o.modelValue)==null?void 0:g.width;return!d||d==="default"?"container-content":{small:"container-content-small",middle:"container-content-middle",max:"container-content-max"}[d]||"container-content"}),u=e.computed(()=>{var g,p;const d=(p=(g=o.modelValue)==null?void 0:g.data)==null?void 0:p.width;return!d||d==="default"?"row-cols-1 row-cols-md-2":{small:"row-cols-1 row-cols-md-2",middle:"row-cols-1 row-cols-md-2 row-cols-lg-3",max:"row-cols-1 row-cols-md-2 row-cols-lg-3 row-cols-xl-4"}[d]||"row-cols-1 row-cols-md-2"}),c=()=>{a("handleDelete",o.modelValue.id)},f=()=>{a("handleCopy",o.modelValue)},m=d=>{a("handlePaste",d)};return i(),(d,h)=>{var g,p,b;return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("div",{class:"articlePureText_wrap",id:(p=(g=n.modelValue)==null?void 0:g.data)==null?void 0:p.id,onMouseenter:h[2]||(h[2]=_=>s.value=!0),onMouseleave:h[3]||(h[3]=_=>s.value=!1)},[e.createElementVNode("div",UU,[e.createElementVNode("div",{class:e.normalizeClass(["article-list-pure-text__container",r.value])},[e.createElementVNode("div",RU,[e.createElementVNode("ul",{class:e.normalizeClass(["article-list row",u.value])},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList((b=n.modelValue)==null?void 0:b.list,(_,w)=>(e.openBlock(),e.createElementBlock("li",{key:w,class:"article-item col"},[e.createElementVNode("h4",FU,e.toDisplayString(_.title),1),e.createElementVNode("p",HU,e.toDisplayString(_.description),1)]))),128))],2)])],2)]),n.isPreview?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(Te,{key:0,show:s.value,"onUpdate:show":h[0]||(h[0]=_=>s.value=_),onHandleEdit:h[1]||(h[1]=_=>l.value=!0),onHandleDelete:c,onHandleCopy:f,onHandlePaste:m},null,8,["show"]))],40,MU),n.isPreview?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(OU,{key:0,show:l.value,"onUpdate:show":h[4]||(h[4]=_=>l.value=_),data:n.modelValue},null,8,["show","data"]))],64)}}}),Qd=ne(jU,[["__scopeId","data-v-e817c868"]]),zU=Object.freeze(Object.defineProperty({__proto__:null,default:Qd},Symbol.toStringTag,{value:"Module"})),qU={class:"setting-content"},WU={class:"setting-header flex items-center"},GU={class:"setting-header flex items-center"},XU=e.defineComponent({__name:"setting",props:{show:{type:Boolean,default:!1},data:{type:Object,default:()=>{}}},emits:["update:show"],setup(n,{emit:t}){const o=t,a=()=>{o("update:show",!1)};return(i,s)=>{const l=e.resolveComponent("a-switch"),r=e.resolveComponent("a-input"),u=e.resolveComponent("a-drawer");return e.openBlock(),e.createBlock(u,{width:500,visible:n.show,footer:!1,onCancel:a,unmountOnClose:""},{title:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(n.data.type)+"组件编辑 ",1)]),default:e.withCtx(()=>[e.createElementVNode("div",qU,[e.createElementVNode("div",WU,[s[2]||(s[2]=e.createElementVNode("span",{class:"header-title"},"仅显示PC端",-1)),e.createVNode(l,{modelValue:n.data.onlyShowPc,"onUpdate:modelValue":s[0]||(s[0]=c=>n.data.onlyShowPc=c)},null,8,["modelValue"])]),e.createElementVNode("div",GU,[s[3]||(s[3]=e.createElementVNode("span",{class:"header-title"},"接口地址",-1)),e.createVNode(r,{modelValue:n.data.api,"onUpdate:modelValue":s[1]||(s[1]=c=>n.data.api=c),placeholder:"默认接口地址","allow-clear":""},null,8,["modelValue"])])])]),_:1},8,["visible"])}}}),YU=ne(XU,[["__scopeId","data-v-9dfdbe7e"]]),KU={class:"tab-default__content mt-5 mt-md-13 container-content"},QU=e.defineComponent({name:"AlummiCommunityList",__name:"index",props:{modelValue:{type:Object,default:()=>{}},isPreview:{type:Boolean,default:!0},website:{type:String,default:"ywies-tx"},locale:{type:String,default:"sc"}},emits:["update:modelValue","handleDelete","handleCopy","handlePaste","handleClick","openPopup"],setup(n,{emit:t}){const o=n,a=t,i=()=>{var V,C,S;if(o.modelValue&&o.modelValue.data)return;const v={id:((V=o.modelValue)==null?void 0:V.id)||R(),type:"AlummiCommunityList",onlyShowPc:Ne(),api:((C=o.modelValue)==null?void 0:C.api)||"/component/production/articles",category:((S=o.modelValue)==null?void 0:S.category)||"alumni-events"};a("update:modelValue",v)},s=e.computed(()=>{var v;return o.isPreview?!((v=o.modelValue)!=null&&v.onlyShowPc)||!Ne():!0}),l=e.ref(!1),r=e.ref(!1),u=()=>{a("handleDelete",o.modelValue.id)},c=()=>{a("handleCopy",o.modelValue)},f=v=>{a("handlePaste",v)},m=v=>{a("handleClick",v)},d=v=>{a("openPopup",v)};i();const h=e.ref(null),g=e.ref([]),p=e.ref(1024),b=e.computed(()=>g.value),_=()=>{typeof window<"u"&&(p.value=window.innerWidth)},w=async()=>{var S;const v={headers:{website:`${o.website}-${o.locale}`}},V=`/component/production/articles?category=${(S=o.modelValue)==null?void 0:S.category}&per_page=4&page=1`,C=await Zt.get(V,v);g.value=C.data.data};return e.onMounted(()=>{w(),_(),typeof window<"u"&&window.addEventListener("resize",_)}),e.onUnmounted(()=>{typeof window<"u"&&window.removeEventListener("resize",_)}),(v,V)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[s.value?(e.openBlock(),e.createElementBlock("div",{key:0,class:"alummi-community-list news-list tab-default",ref_key:"parent",ref:h,onMouseenter:V[2]||(V[2]=C=>l.value=!0),onMouseleave:V[3]||(V[3]=C=>l.value=!1)},[e.createElementVNode("div",KU,[e.createElementVNode("div",{class:e.normalizeClass(["card-list row",["row-cols-2","row-cols-md-2","row-cols-lg-4"]])},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(b.value,C=>(e.openBlock(),e.createElementBlock("div",{class:"card-item col",key:C.key},[e.createVNode(ul,{componentProps:C,singleColumn:p.value<768,onHandleClick:m,onOpenPopup:d},null,8,["componentProps","singleColumn"])]))),128))])]),n.isPreview?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(Te,{key:0,show:l.value,"onUpdate:show":V[0]||(V[0]=C=>l.value=C),onHandleEdit:V[1]||(V[1]=C=>r.value=!0),onHandleDelete:u,onHandleCopy:c,onHandlePaste:f},null,8,["show"]))],544)):e.createCommentVNode("",!0),n.isPreview?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(YU,{key:1,show:r.value,"onUpdate:show":V[4]||(V[4]=C=>r.value=C),data:n.modelValue},null,8,["show","data"]))],64))}}),Jd=ne(QU,[["__scopeId","data-v-64801d65"]]),JU=Object.freeze(Object.defineProperty({__proto__:null,default:Jd},Symbol.toStringTag,{value:"Module"})),ZU={class:"message-card__wrapper"},e7={class:"message-card__head"},t7={class:"message-card__image"},n7=["src","alt"],o7=["innerHTML"],a7=["innerHTML"],i7=["innerHTML"],s7=e.defineComponent({name:"BlessingMessageCard",__name:"BlessingMessageCard",props:{image_url:{default:""},name:{default:""},person_type:{default:""},label:{default:""},message:{default:""},type:{default:0}},setup(n){const t=n,o=e.computed(()=>{const s=t.type%3;return[{"--bg-color":"#0032A0","--border-color":"#FF0044"},{"--bg-color":"#FF8200","--border-color":"#0032A0"},{"--bg-color":"#FF0044","--border-color":"#D2D6DC"}][s]}),a=e.computed(()=>[{key:"parent",name:"家长",value:"家长"},{key:"alumni",name:"校友",value:"校友"},{key:"student",name:"学生",value:"学生"},{key:"faculty-staff",name:"教学人员/行政人员",value:"教学人员/行政人员"},{key:"others",name:"其他",value:"其他"}]),i=e.computed(()=>{var s;return t.person_type==="others"?t.label:((s=a.value.find(l=>l.key===t.person_type))==null?void 0:s.name)??t.label});return(s,l)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["blessing-message-card",{"has-image":!!n.image_url}]),"data-aos":"fade-up"},[e.createElementVNode("div",{class:"message-card",style:e.normalizeStyle(o.value)},[e.createElementVNode("div",ZU,[e.createElementVNode("div",e7,[e.withDirectives(e.createElementVNode("div",t7,[e.createElementVNode("img",{src:n.image_url,alt:n.name},null,8,n7)],512),[[e.vShow,n.image_url]]),e.createElementVNode("h5",{class:"message-card__name text-uppercase",innerHTML:n.name},null,8,o7),e.withDirectives(e.createElementVNode("div",{class:"message-card__label",innerHTML:i.value},null,8,a7),[[e.vShow,i.value]])]),e.createElementVNode("div",{class:"message-card__body",innerHTML:n.message},null,8,i7)])],4)],2))}}),lc=ne(s7,[["__scopeId","data-v-ecf1d319"]]),l7={class:"blessing-message-pagination"},r7={class:"d-flex align-items-center h-100 justify-content-center justify-content-md-start"},d7={key:0,class:"page-ellipsis flex-center"},u7=["onClick"],c7=e.defineComponent({name:"BlessingMessagePagination",__name:"BlessingMessagePagination",props:{totalPage:{default:1},currentPage:{default:1}},emits:["changePage"],setup(n,{emit:t}){const o=n,a=t,i=e.computed(()=>{const u=[];let c=!1;for(let f=1;f<=o.totalPage;f++)r(f)?(c=!1,u.push(f)):c||(u.push("Ellipsis"),c=!0);return u[0]==="Ellipsis"&&u.shift(),u}),s=u=>{a("changePage",u)},l=u=>{u<0?o.currentPage>1&&s(o.currentPage+u):o.currentPage<o.totalPage&&s(o.currentPage+u)},r=u=>o.totalPage<=6||u<=o.currentPage+2&&u>=o.currentPage||u===o.totalPage||o.currentPage>=o.totalPage-3&&(u>=o.totalPage-2||u===1);return(u,c)=>(e.openBlock(),e.createElementBlock("div",l7,[e.createElementVNode("ul",r7,[e.createElementVNode("li",{class:e.normalizeClass(["page-arrow pr-3 pr-md-4",{"page-arrow--disable":n.currentPage===1}]),onClick:c[0]||(c[0]=f=>l(-1))},[...c[2]||(c[2]=[e.createElementVNode("div",{class:"i page-arrow__left"},null,-1)])],2),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(i.value,(f,m)=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:`${f}-${m}`},[f==="Ellipsis"?(e.openBlock(),e.createElementBlock("li",d7)):(e.openBlock(),e.createElementBlock("li",{key:1,class:e.normalizeClass(["page-item flex-center",{"page-item--active":f===n.currentPage}]),onClick:d=>s(f)},e.toDisplayString(f),11,u7))],64))),128)),e.createElementVNode("li",{class:e.normalizeClass(["page-arrow pl-3 pl-md-4",{"page-arrow--disable":n.currentPage===n.totalPage}]),onClick:c[1]||(c[1]=f=>l(1))},[...c[3]||(c[3]=[e.createElementVNode("div",{class:"i page-arrow__right"},null,-1)])],2)])]))}}),m7=ne(c7,[["__scopeId","data-v-36b31ee5"]]),p7={class:"lightbox__wrapper"},h7={class:"lightbox__content"},f7={class:"lightbox__content__body"},g7={class:"lightbox__content__top"},v7={class:"lightbox__content__image"},y7=["src","alt"],_7=["innerHTML"],b7=["innerHTML"],w7=["innerHTML"],x7=e.defineComponent({name:"LightboxBlessingMessage",__name:"index",props:{componentProps:{default:()=>({})},visible:{type:Boolean,default:!1}},emits:["update:visible"],setup(n,{emit:t}){const o=n,a=t,i=e.computed(()=>(window==null?void 0:window.innerWidth)>767.98?(window==null?void 0:window.innerWidth)>1100?"992px":"720px":"100%"),s=e.computed(()=>o.visible),l=e.computed(()=>{var b;return((b=o.componentProps)==null?void 0:b.image_url)??""}),r=e.computed(()=>{var b;return((b=o.componentProps)==null?void 0:b.image_alt)??c.value}),u=e.computed(()=>r.value),c=e.computed(()=>{var b;return((b=o.componentProps)==null?void 0:b.name)??""}),f=e.computed(()=>{var b;return((b=o.componentProps)==null?void 0:b.label)??""}),m=e.computed(()=>{var b;return((b=o.componentProps)==null?void 0:b.person_type)??""}),d=e.computed(()=>{var b;return((b=o.componentProps)==null?void 0:b.message)??""}),h=e.computed(()=>[{key:"parent",name:"家长",value:"家长"},{key:"alumni",name:"校友",value:"校友"},{key:"student",name:"学生",value:"学生"},{key:"faculty-staff",name:"教学人员/行政人员",value:"教学人员/行政人员"},{key:"others",name:"其他",value:"其他"}]),g=e.computed(()=>{var b;return m.value==="others"?f.value:((b=h.value.find(_=>_.key===m.value))==null?void 0:b.name)??f.value}),p=()=>{a("update:visible",!1)};return(b,_)=>{const w=e.resolveComponent("a-modal");return e.openBlock(),e.createBlock(w,{visible:s.value,"onUpdate:visible":_[0]||(_[0]=v=>s.value=v),class:"lightbox-custom lightbox-blessing",width:i.value,footer:!1,closable:!1},{default:e.withCtx(()=>[e.createElementVNode("div",p7,[e.createElementVNode("div",h7,[e.createElementVNode("div",{class:"lightbox__content__head"},[e.createElementVNode("div",{class:"lightbox__content__cross i i-cross-modal",onClick:p})]),e.createElementVNode("div",f7,[e.createElementVNode("div",g7,[e.withDirectives(e.createElementVNode("div",v7,[e.createElementVNode("img",{src:l.value,alt:u.value},null,8,y7)],512),[[e.vShow,l.value]]),e.createElementVNode("div",{class:"lightbox__content__name",innerHTML:c.value},null,8,_7),e.withDirectives(e.createElementVNode("div",{class:"lightbox__content__label",innerHTML:g.value},null,8,b7),[[e.vShow,g.value]])]),_[1]||(_[1]=e.createElementVNode("div",{class:"lightbox__content__title",innerHTML:"Blessing Message to YCYW"},null,-1)),e.createElementVNode("div",{class:"lightbox__content__content",innerHTML:d.value},null,8,w7)])])])]),_:1},8,["visible","width"])}}}),mv=ne(x7,[["__scopeId","data-v-2868ec67"]]),V7={class:"setting-content"},C7={class:"setting-header flex items-center"},k7={class:"setting-header flex items-center"},E7={class:"setting-header flex items-center"},T7=e.defineComponent({__name:"setting",props:{show:{type:Boolean,default:!1},data:{type:Object,default:()=>{}}},emits:["update:show"],setup(n,{emit:t}){const o=t,a=()=>{o("update:show",!1)};return(i,s)=>{const l=e.resolveComponent("a-checkbox"),r=e.resolveComponent("a-input"),u=e.resolveComponent("a-drawer");return e.openBlock(),e.createBlock(u,{width:500,visible:n.show,footer:!1,onCancel:a,unmountOnClose:""},{title:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(n.data.type)+"组件编辑 ",1)]),default:e.withCtx(()=>[e.createElementVNode("div",V7,[e.createElementVNode("div",C7,[s[4]||(s[4]=e.createElementVNode("span",{class:"header-title"},"仅在pc端显示",-1)),e.createVNode(l,{modelValue:n.data.onlyShowPc,"onUpdate:modelValue":s[0]||(s[0]=c=>n.data.onlyShowPc=c)},{default:e.withCtx(()=>[...s[3]||(s[3]=[e.createTextVNode("仅在pc端显示",-1)])]),_:1},8,["modelValue"])]),e.createElementVNode("div",k7,[s[5]||(s[5]=e.createElementVNode("span",{class:"header-title"},"组件标题",-1)),e.createVNode(r,{modelValue:n.data.title,"onUpdate:modelValue":s[1]||(s[1]=c=>n.data.title=c),placeholder:"请输入组件标题","allow-clear":""},null,8,["modelValue"])]),e.createElementVNode("div",E7,[s[6]||(s[6]=e.createElementVNode("span",{class:"header-title"},"接口地址",-1)),e.createVNode(r,{modelValue:n.data.api,"onUpdate:modelValue":s[2]||(s[2]=c=>n.data.api=c),placeholder:"默认接口地址","allow-clear":""},null,8,["modelValue"])])])]),_:1},8,["visible"])}}}),N7=ne(T7,[["__scopeId","data-v-c18f14a5"]]),S7={class:"blessing-message__container container-content"},B7=["innerHTML"],D7={class:"d-none d-md-flex row row-cols-2"},P7={class:"col"},$7={class:"blessing-message__card"},A7={class:"col"},L7={class:"blessing-message__card"},I7={class:"d-md-none row row-cols-1"},O7={class:"col"},M7={class:"blessing-message__card"},U7={key:0,class:"flex-center mt-9 mt-md-22"},R7=e.defineComponent({name:"BlessingMessage",__name:"index",props:{modelValue:{type:Object,default:()=>{}},isPreview:{type:Boolean,default:!0},website:{type:String,default:"ywies-tx"},locale:{type:String,default:"sc"}},emits:["update:modelValue","handleDelete","handleCopy","handlePaste","showLightboxVideo","showLightboxImage"],setup(n,{emit:t}){const o=n,a=t,i=()=>{var D,$,k;if(o.modelValue&&o.modelValue.data)return;const N={id:((D=o.modelValue)==null?void 0:D.id)||R(),type:"BlessingMessage",onlyShowPc:!1,api:(($=o.modelValue)==null?void 0:$.api)||"/blessing-board/blessing-messages/list",title:((k=o.modelValue)==null?void 0:k.title)||"这里是标题"};a("update:modelValue",N)},s=e.computed(()=>{var N;return o.isPreview?!((N=o.modelValue)!=null&&N.onlyShowPc)||!Ne():!0}),l=e.ref(!1),r=e.ref(!1),u=()=>{a("handleDelete",o.modelValue.id)},c=()=>{a("handleCopy",o.modelValue)},f=N=>{a("handlePaste",N)};i();const m=e.ref(null),d=e.ref(1),h=e.ref(6),g=e.ref(1),p=e.ref([]),b=e.ref(null),_=e.computed(()=>p.value.filter((N,D)=>(D+1)%2)),w=e.computed(()=>p.value.filter((N,D)=>!((D+1)%2))),v=async()=>{var $;const N={headers:{website:`${o.website}-${o.locale}`}},D=`${($=o.modelValue)==null?void 0:$.api}?per_page=${h.value}&page=${d.value}`;try{const{data:k}=await Zt.get(D,N);g.value=k.meta.last_page,p.value=k.data}catch{g.value=1,p.value=[]}},V=N=>{if(!N||typeof window>"u")return;const D=window.innerWidth,$=D>=768?D>=1024?170:120:100,A=N.getBoundingClientRect().top+window.pageYOffset-$;window.scroll({top:A,left:0,behavior:"smooth"})},C=e.ref(!1),S=N=>{b.value=N,C.value=!0};return e.watch(d,()=>{e.nextTick(()=>{v(),V(m.value)})}),e.onMounted(()=>{v()}),(N,D)=>{var $,k;return e.openBlock(),e.createElementBlock(e.Fragment,null,[s.value?(e.openBlock(),e.createElementBlock("div",{key:0,class:"blessing-message",onMouseenter:D[4]||(D[4]=A=>l.value=!0),onMouseleave:D[5]||(D[5]=A=>l.value=!1),ref_key:"parent",ref:m},[e.createElementVNode("div",S7,[e.withDirectives(e.createElementVNode("div",{class:"blessing-message__title",innerHTML:($=n.modelValue)==null?void 0:$.title},null,8,B7),[[e.vShow,(k=n.modelValue)==null?void 0:k.title]]),e.createElementVNode("div",D7,[e.createElementVNode("div",P7,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(_.value,(A,B)=>(e.openBlock(),e.createElementBlock("div",{key:`${A.name}-${A.label}-${A.image_url}-${B}`,class:"blessing-message__card-wrapper"},[e.createElementVNode("div",$7,[e.createVNode(lc,e.mergeProps({onClick:I=>S(A)},{ref_for:!0},A,{type:Number(B)*2}),null,16,["onClick","type"])])]))),128))]),e.createElementVNode("div",A7,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(w.value,(A,B)=>(e.openBlock(),e.createElementBlock("div",{key:`${A.name}-${A.label}-${A.image_url}-${B}`,class:"blessing-message__card-wrapper"},[e.createElementVNode("div",L7,[e.createVNode(lc,e.mergeProps({onClick:I=>S(A)},{ref_for:!0},A,{type:Number(B)*2+1}),null,16,["onClick","type"])])]))),128))])]),e.createElementVNode("div",I7,[e.createElementVNode("div",O7,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(p.value,(A,B)=>(e.openBlock(),e.createElementBlock("div",{key:`${A.name}-${A.label}-${A.image_url}-${B}`,class:"blessing-message__card-wrapper"},[e.createElementVNode("div",M7,[e.createVNode(lc,e.mergeProps({onClick:I=>S(A)},{ref_for:!0},A,{type:B}),null,16,["onClick","type"])])]))),128))])]),g.value>0?(e.openBlock(),e.createElementBlock("div",U7,[e.createVNode(m7,{totalPage:g.value,currentPage:d.value,onChangePage:D[0]||(D[0]=A=>d.value=A)},null,8,["totalPage","currentPage"])])):e.createCommentVNode("",!0)]),e.createVNode(mv,{visible:C.value,"onUpdate:visible":D[1]||(D[1]=A=>C.value=A),componentProps:b.value},null,8,["visible","componentProps"]),n.isPreview?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(Te,{key:0,show:l.value,"onUpdate:show":D[2]||(D[2]=A=>l.value=A),onHandleEdit:D[3]||(D[3]=A=>r.value=!0),onHandleDelete:u,onHandleCopy:c,onHandlePaste:f},null,8,["show"]))],544)):e.createCommentVNode("",!0),n.isPreview?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(N7,{key:1,show:r.value,"onUpdate:show":D[6]||(D[6]=A=>r.value=A),data:n.modelValue},null,8,["show","data"]))],64)}}}),Zd=ne(R7,[["__scopeId","data-v-ee9ca31d"]]),F7=Object.freeze(Object.defineProperty({__proto__:null,default:Zd},Symbol.toStringTag,{value:"Module"})),H7={class:"setting-content"},j7={class:"setting-header flex items-center"},z7={class:"setting-header flex items-center"},q7=e.defineComponent({__name:"setting",props:{show:{type:Boolean,default:!1},data:{type:Object,default:()=>{}}},emits:["update:show"],setup(n,{emit:t}){const o=t,a=()=>{o("update:show",!1)};return(i,s)=>{const l=e.resolveComponent("a-checkbox"),r=e.resolveComponent("a-input"),u=e.resolveComponent("a-drawer");return e.openBlock(),e.createBlock(u,{width:500,visible:n.show,footer:!1,onCancel:a,unmountOnClose:""},{title:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(n.data.type)+"组件编辑 ",1)]),default:e.withCtx(()=>[e.createElementVNode("div",H7,[e.createElementVNode("div",j7,[s[3]||(s[3]=e.createElementVNode("span",{class:"header-title"},"仅在pc端显示",-1)),e.createVNode(l,{modelValue:n.data.onlyShowPc,"onUpdate:modelValue":s[0]||(s[0]=c=>n.data.onlyShowPc=c)},{default:e.withCtx(()=>[...s[2]||(s[2]=[e.createTextVNode("仅在pc端显示",-1)])]),_:1},8,["modelValue"])]),e.createElementVNode("div",z7,[s[4]||(s[4]=e.createElementVNode("span",{class:"header-title"},"接口地址",-1)),e.createVNode(r,{modelValue:n.data.api,"onUpdate:modelValue":s[1]||(s[1]=c=>n.data.api=c),placeholder:"默认接口地址","allow-clear":""},null,8,["modelValue"])])])]),_:1},8,["visible"])}}}),W7=ne(q7,[["__scopeId","data-v-491d9fa1"]]),G7={class:"container-content"},X7={class:"blessing-wrapper position-relative"},Y7=["src","alt"],K7={class:"slide-card__wrapper"},Q7={class:"slide-card__head"},J7=["innerHTML"],Z7=["innerHTML"],e9=["innerHTML"],t9=["src","alt"],n9=["src","alt"],o9=e.defineComponent({name:"BlessingSlider",__name:"index",props:{modelValue:{type:Object,default:()=>{}},isPreview:{type:Boolean,default:!0},website:{type:String,default:"ywies-tx"},locale:{type:String,default:"sc"}},emits:["update:modelValue","handleDelete","handleCopy","handlePaste","showLightboxVideo","showLightboxImage"],setup(n,{emit:t}){const o=n,a=t,i=()=>{var O,J;if(o.modelValue&&o.modelValue.data)return;const q={id:((O=o.modelValue)==null?void 0:O.id)||R(),type:"BlessingSlider",onlyShowPc:!1,api:((J=o.modelValue)==null?void 0:J.api)||"/blessing-board/blessing-messages/featured?count=6"};a("update:modelValue",q)},s=e.computed(()=>{var q;return o.isPreview?!((q=o.modelValue)!=null&&q.onlyShowPc)||!Ne():!0}),l=e.ref(!1),r=e.ref(!1),u=()=>{a("handleDelete",o.modelValue.id)},c=()=>{a("handleCopy",o.modelValue)},f=q=>{a("handlePaste",q)};i();const m=e.ref([]),d=e.ref(0),h=e.ref(1),g=e.ref(0),p=e.ref(0),b=e.ref(null),_=e.ref(!1),w=e.computed(()=>m.value.length),v=e.computed(()=>m.value[d.value]),V=e.computed(()=>d.value-1<0?w.value-1:d.value-1),C=e.computed(()=>d.value+1>=w.value?0:d.value+1),S=e.computed(()=>d.value%3),N=e.computed(()=>[{"--bg-color":"#0032A0","--border-color":"#FF0044"},{"--bg-color":"#FF8200","--border-color":"#0032A0"},{"--bg-color":"#FF0044","--border-color":"#D2D6DC"}][S.value]),D=e.computed(()=>[{key:"parent",name:"家长",value:"家长"},{key:"alumni",name:"校友",value:"校友"},{key:"student",name:"学生",value:"学生"},{key:"faculty-staff",name:"教学人员/行政人员",value:"教学人员/行政人员"},{key:"others",name:"其他",value:"其他"}]),$=e.computed(()=>{var q,O,J;return v.value?v.value.person_type==="others"?(q=v.value)==null?void 0:q.label:((O=D.value.find(F=>{var M;return F.key===((M=v.value)==null?void 0:M.person_type)}))==null?void 0:O.name)??((J=v.value)==null?void 0:J.label):null}),k=q=>{h.value=q>d.value?1:-1,d.value=(q+w.value)%w.value},A=()=>{p.value<g.value&&k(d.value+1),p.value>g.value&&k(d.value-1)},B=q=>{g.value=q.changedTouches[0].screenX},I=q=>{p.value=q.changedTouches[0].screenX,A()},z=e.ref(!1),Y=q=>{b.value=q,z.value=!0},H=async()=>{var J;const q={headers:{website:`${o.website}-${o.locale}`}},O=`${(J=o.modelValue)==null?void 0:J.api}`;try{const{data:F}=await Zt.get(O,q);m.value=F.data}catch{m.value=[]}};return e.onMounted(()=>{H()}),(q,O)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[s.value?(e.openBlock(),e.createElementBlock("div",{key:0,class:"blessing-slider",onMouseenter:O[13]||(O[13]=J=>l.value=!0),onMouseleave:O[14]||(O[14]=J=>l.value=!1)},[e.createElementVNode("div",G7,[e.createElementVNode("div",X7,[e.createVNode(e.TransitionGroup,{tag:"div",name:h.value>0?"slide":"slide-invert",class:"slide-block",onTouchstart:B,onTouchend:I},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(m.value,(J,F)=>e.withDirectives((e.openBlock(),e.createElementBlock("div",{class:"slide-block__image",key:`${J.name}-${J.label}-${J.image_url}-${F}`,ref_for:!0,ref:"image",onTransitionstart:O[0]||(O[0]=M=>_.value=!0),onTransitionend:O[1]||(O[1]=M=>_.value=!1)},[e.createElementVNode("img",{src:J.image_url,alt:J.name},null,8,Y7)],32)),[[e.vShow,F===d.value]])),128)),e.createElementVNode("div",{class:"i page-arrow__left",key:"arrow__left",onClick:O[2]||(O[2]=J=>k(d.value-1))}),e.createElementVNode("div",{class:"i page-arrow__right",key:"arrow__right",onClick:O[3]||(O[3]=J=>k(d.value+1))})]),_:1},8,["name"]),v.value?(e.openBlock(),e.createElementBlock("div",{key:0,class:"slide-card",style:e.normalizeStyle(N.value),onTouchstart:B,onTouchend:I,onClick:O[4]||(O[4]=J=>Y(v.value))},[e.createElementVNode("div",K7,[e.createElementVNode("div",Q7,[e.createElementVNode("h5",{class:"slide-card__name text-uppercase",innerHTML:v.value.name},null,8,J7),e.createElementVNode("div",{class:"slide-card__label",innerHTML:$.value},null,8,Z7)]),e.createElementVNode("div",{class:"slide-card__body",innerHTML:v.value.message},null,8,e9)])],36)):e.createCommentVNode("",!0),e.createVNode(e.TransitionGroup,{tag:"div",name:h.value>0?"slide":"slide-invert",class:"slide-block slide-block__prev"},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(m.value,(J,F)=>e.withDirectives((e.openBlock(),e.createElementBlock("div",{class:"slide-block__image",key:`${J.name}-${J.label}-${J.image_url}-${F}`,ref_for:!0,ref:"image",onTransitionstart:O[5]||(O[5]=M=>_.value=!0),onTransitionend:O[6]||(O[6]=M=>_.value=!1)},[e.createElementVNode("img",{src:J.image_url,alt:J.name},null,8,t9)],32)),[[e.vShow,F===V.value]])),128))]),_:1},8,["name"]),e.createVNode(e.TransitionGroup,{tag:"div",name:h.value>0?"slide":"slide-invert",class:"slide-block slide-block__next"},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(m.value,(J,F)=>e.withDirectives((e.openBlock(),e.createElementBlock("div",{class:"slide-block__image",key:`${J.name}-${J.label}-${J.image_url}-${F}`,ref_for:!0,ref:"image",onTransitionstart:O[7]||(O[7]=M=>_.value=!0),onTransitionend:O[8]||(O[8]=M=>_.value=!1)},[e.createElementVNode("img",{src:J.image_url,alt:J.name},null,8,n9)],32)),[[e.vShow,F===C.value]])),128))]),_:1},8,["name"]),e.withDirectives(e.createElementVNode("button",{type:"button",class:"blessing-btn blessing-btn--prev",onClick:O[9]||(O[9]=J=>k(d.value-1))},[...O[16]||(O[16]=[e.createElementVNode("div",{class:"i"},null,-1)])],512),[[e.vShow,m.value.length>1]]),e.withDirectives(e.createElementVNode("button",{type:"button",class:"blessing-btn blessing-btn--next",onClick:O[10]||(O[10]=J=>k(d.value+1))},[...O[17]||(O[17]=[e.createElementVNode("div",{class:"i"},null,-1)])],512),[[e.vShow,m.value.length>1]])])]),e.createVNode(mv,{visible:z.value,"onUpdate:visible":O[11]||(O[11]=J=>z.value=J),componentProps:b.value},null,8,["visible","componentProps"]),n.isPreview?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(Te,{key:0,onHandleEdit:O[12]||(O[12]=J=>r.value=!0),onHandleDelete:u,onHandleCopy:c,onHandlePaste:f}))],32)):e.createCommentVNode("",!0),n.isPreview?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(W7,{key:1,show:r.value,"onUpdate:show":O[15]||(O[15]=J=>r.value=J),data:n.modelValue},null,8,["show","data"]))],64))}}),eu=ne(o9,[["__scopeId","data-v-a8c8eb07"]]),a9=Object.freeze(Object.defineProperty({__proto__:null,default:eu},Symbol.toStringTag,{value:"Module"})),i9={class:"setting-content"},s9={class:"setting-header flex items-center"},l9={class:"setting-header flex items-center"},r9={class:"setting-header flex items-center"},d9=e.defineComponent({__name:"setting",props:{show:{type:Boolean,default:!1},data:{type:Object,default:()=>{}},slugList:{type:Array,default:()=>[]}},emits:["update:show"],setup(n,{emit:t}){const o=t,a=()=>{o("update:show",!1)};return(i,s)=>{const l=e.resolveComponent("a-switch"),r=e.resolveComponent("a-input"),u=e.resolveComponent("a-drawer");return e.openBlock(),e.createBlock(u,{width:500,visible:n.show,footer:!1,onCancel:a,unmountOnClose:""},{title:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(n.data.type)+"组件编辑 ",1)]),default:e.withCtx(()=>[e.createElementVNode("div",i9,[e.createElementVNode("div",s9,[s[3]||(s[3]=e.createElementVNode("span",{class:"header-title"},"仅显示PC端",-1)),e.createVNode(l,{modelValue:n.data.onlyShowPc,"onUpdate:modelValue":s[0]||(s[0]=c=>n.data.onlyShowPc=c)},null,8,["modelValue"])]),e.createElementVNode("div",l9,[s[4]||(s[4]=e.createElementVNode("span",{class:"header-title"},"文章类别",-1)),e.createVNode(r,{modelValue:n.data.slug,"onUpdate:modelValue":s[1]||(s[1]=c=>n.data.slug=c),placeholder:"请输入文章类别","allow-clear":""},null,8,["modelValue"])]),e.createElementVNode("div",r9,[s[5]||(s[5]=e.createElementVNode("span",{class:"header-title"},"接口地址",-1)),e.createVNode(r,{modelValue:n.data.api,"onUpdate:modelValue":s[2]||(s[2]=c=>n.data.api=c),placeholder:"默认接口地址","allow-clear":""},null,8,["modelValue"])])])]),_:1},8,["visible"])}}}),u9=ne(d9,[["__scopeId","data-v-40d98089"]]),c9={class:"card-showcase__container container-content-middle",ref:"cardShowcase"},m9=["onClick"],p9={class:"img-wrapper"},h9=["src","alt"],f9=["src","alt"],g9={class:"slide-content__box bg-white shadow-lg"},v9={class:"slide-content__box__title"},y9=["innerHTML"],_9={key:1,class:"slide-content__box__subtitle"},b9={key:2,class:"slide-content__box__subtitle"},w9=["href"],x9=["onClick"],V9=["onClick"],C9={class:"img-wrapper"},k9=["src","alt"],E9=["src","alt"],T9={class:"slide-content__box bg-white shadow-lg"},N9={class:"slide-content__box__title"},S9=["innerHTML"],B9={key:1,class:"slide-content__box__subtitle"},D9={key:2,class:"slide-content__box__subtitle"},P9=["href"],$9=["onClick"],A9=e.defineComponent({name:"CardShowcase",__name:"index",props:{modelValue:{type:Object,default:()=>{}},isPreview:{type:Boolean,default:!0},host:{type:String,default:"cms-web.ycismelody.cn"},locale:{type:String,default:"sc"}},emits:["update:modelValue","handleDelete","handleCopy","handlePaste","showLightboxVideo","showLightboxImage","handleClick"],setup(n,{emit:t}){const o=n,a=t,i=e.ref([]),s=()=>{var A,B,I;if(o.modelValue&&o.modelValue.data)return;const k={id:((A=o.modelValue)==null?void 0:A.id)||R(),type:"CardShowcase",onlyShowPc:!1,api:((B=o.modelValue)==null?void 0:B.api)||"/component/production/articles",getDataType:((I=o.modelValue)==null?void 0:I.getDataType)||"alumni"};a("update:modelValue",k)},l=e.computed(()=>{var k;return o.isPreview?!((k=o.modelValue)!=null&&k.onlyShowPc)||!Ne():!0}),r=e.ref(!1),u=e.ref(!1),c=()=>{a("handleDelete",o.modelValue.id)},f=()=>{a("handleCopy",o.modelValue)},m=k=>{a("handlePaste",k)};s();const d=[ct.Navigation,ct.Pagination,ct.Autoplay],h={768:{spaceBetween:-100},1024:{spaceBetween:-130}},g=e.ref([]),p=e.ref(typeof window<"u"?window.innerWidth:1024);let b=null,_=null;const w=async()=>{var I;Zt.get("/article/category/listForWeb",{params:{langCode:o.locale,host:o.host}}).then(z=>{i.value=z.data.data});const k=`${o.modelValue.api}?category=${(I=o.modelValue)==null?void 0:I.getDataType}&per_page=5&page=1`,A={headers:{website:`${o.website}-${o.locale}`}};let B=await Zt.get(k,A);g.value=B.data.data},v=k=>{_=k,D()},V=k=>{var A;typeof window<"u"&&window.scroll({top:0,left:0,behavior:"smooth"}),a("handleClick",`/article/${(A=o.modelValue)==null?void 0:A.getDataType}/${k}`)},C=k=>i.value.filter(A=>A.key===k)[0].name,S=k=>{const A=g.value.filter(I=>I.video_type!=="outer"),B=A.findIndex(I=>I.key==k);a("showLightboxVideo",{idx:B,list:A})},N=k=>{var B,I,z;if(!_)return;const A=((z=(I=(B=k.path)==null?void 0:B[0])==null?void 0:I.className)==null?void 0:z.split(" "))||[];A.includes("swiper-slide-next")?_.slideNext():A.includes("swiper-slide-prev")&&_.slidePrev()},D=()=>{typeof document>"u"||(b=document.querySelectorAll(".swiper-slide"),b==null||b.forEach(k=>{k.addEventListener("mouseenter",N)}))},$=()=>{typeof window<"u"&&(p.value=window.innerWidth)};return e.onMounted(()=>{w(),typeof window<"u"&&window.addEventListener("resize",$),e.nextTick(()=>{var k;(k=o.modelValue)!=null&&k.getBackendData&&_&&setTimeout(()=>{_.slideTo(3)},300)})}),e.onUnmounted(()=>{typeof window<"u"&&window.removeEventListener("resize",$),b==null||b.forEach(k=>{k.removeEventListener("mouseenter",N)})}),(k,A)=>{const B=e.resolveComponent("client-only");return e.openBlock(),e.createElementBlock(e.Fragment,null,[l.value?(e.openBlock(),e.createElementBlock("div",{key:0,class:"card-showcase",onMouseenter:A[2]||(A[2]=I=>r.value=!0),onMouseleave:A[3]||(A[3]=I=>r.value=!1)},[e.createElementVNode("div",c9,[p.value>767.98?(e.openBlock(),e.createBlock(B,{key:0},{default:e.withCtx(()=>[e.createVNode(e.unref(Et.Swiper),{ref:"swiperRef",modules:d,"centered-slides":!0,"slides-per-view":2.7,speed:600,loop:!0,"space-between":-80,breakpoints:h,pagination:{el:".swiper-pagination",clickable:!0},navigation:{nextEl:".swiper-button-next",prevEl:".swiper-button-prev"},class:"swiper showcaseSlide swiper--desktop",onSwiper:v},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(g.value,I=>(e.openBlock(),e.createBlock(e.unref(Et.SwiperSlide),{key:I.key,"data-swiper-key":I.key},{default:e.withCtx(()=>[e.createElementVNode("div",{class:"slide-content",onClick:z=>V(I.key)},[e.createElementVNode("div",p9,[I.poster?(e.openBlock(),e.createElementBlock("img",{key:0,class:"img-static",src:I.poster,alt:I.alt||I.title},null,8,h9)):(e.openBlock(),e.createElementBlock("img",{key:1,class:"img-static",src:I.image||I.meta.image,alt:I.alt||I.title},null,8,f9))]),e.createElementVNode("div",g9,[e.createElementVNode("h6",v9,e.toDisplayString(I.title),1),I.content||I.desc||I.meta.description?(e.openBlock(),e.createElementBlock("div",{key:0,class:"slide-content__box__content",innerHTML:I.content||I.desc||I.meta.description},null,8,y9)):e.createCommentVNode("",!0),I.subtitle||I.label?(e.openBlock(),e.createElementBlock("h6",_9,e.toDisplayString(I.subtitle||I.label),1)):(e.openBlock(),e.createElementBlock("h6",b9,e.toDisplayString(C(I.category)),1))]),I.video_type&&I.link?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[n.isPreview&&I.video_type==="outer"?(e.openBlock(),e.createElementBlock("a",{key:0,href:I.link,target:"_blank",rel:"noopener noreferrer",class:"slide-content__play"},null,8,w9)):(e.openBlock(),e.createElementBlock("button",{key:1,type:"button",class:"slide-content__play",onClick:e.withModifiers(z=>S(I.key),["stop"])},null,8,x9))],64)):e.createCommentVNode("",!0)],8,m9)]),_:2},1032,["data-swiper-key"]))),128))]),_:1},512),A[5]||(A[5]=e.createElementVNode("div",{class:"swiper-footer"},[e.createElementVNode("div",{class:"swiper-button-prev"}),e.createElementVNode("div",{class:"swiper-pagination"}),e.createElementVNode("div",{class:"swiper-button-next"})],-1))]),_:1})):(e.openBlock(),e.createBlock(B,{key:1},{default:e.withCtx(()=>[e.createVNode(e.unref(Et.Swiper),{ref:"swiperRefMobile",modules:d,"centered-slides":!0,"slides-per-view":1,speed:600,effect:"fade","fade-effect":{crossFade:!0},loop:!0,pagination:{el:".swiper-pagination__mobile",clickable:!0},navigation:{nextEl:".swiper-button-next__mobile",prevEl:".swiper-button-prev__mobile"},class:"swiper showcaseSlide swiper--mobile",onSwiper:v},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(g.value,I=>(e.openBlock(),e.createBlock(e.unref(Et.SwiperSlide),{key:I.key,"data-swiper-key":I.key},{default:e.withCtx(()=>[e.createElementVNode("div",{class:"slide-content",onClick:z=>V(I.key)},[e.createElementVNode("div",C9,[I.poster?(e.openBlock(),e.createElementBlock("img",{key:0,class:"img-static",src:I.poster,alt:I.alt||I.title},null,8,k9)):(e.openBlock(),e.createElementBlock("img",{key:1,class:"img-static",src:I.image||I.meta.image,alt:I.alt||I.title},null,8,E9))]),e.createElementVNode("div",T9,[e.createElementVNode("h6",N9,e.toDisplayString(I.title),1),I.content||I.desc||I.meta.description?(e.openBlock(),e.createElementBlock("div",{key:0,class:"slide-content__box__content",innerHTML:I.content||I.desc||I.meta.description},null,8,S9)):e.createCommentVNode("",!0),I.subtitle||I.label?(e.openBlock(),e.createElementBlock("h6",B9,e.toDisplayString(I.subtitle||I.label),1)):(e.openBlock(),e.createElementBlock("h6",D9,e.toDisplayString(C(I.category)),1))]),I.video_type&&I.link?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[n.isPreview&&I.video_type==="outer"?(e.openBlock(),e.createElementBlock("a",{key:0,href:I.link,target:"_blank",rel:"noopener noreferrer",class:"slide-content__play"},null,8,P9)):(e.openBlock(),e.createElementBlock("button",{key:1,type:"button",class:"slide-content__play",onClick:e.withModifiers(z=>S(I.key),["stop"])},null,8,$9))],64)):e.createCommentVNode("",!0)],8,V9)]),_:2},1032,["data-swiper-key"]))),128))]),_:1},512),A[6]||(A[6]=e.createElementVNode("div",{class:"swiper-footer"},[e.createElementVNode("div",{class:"swiper-button-prev__mobile swiper-button-prev"}),e.createElementVNode("div",{class:"swiper-pagination__mobile swiper-pagination"}),e.createElementVNode("div",{class:"swiper-button-next__mobile swiper-button-next"})],-1))]),_:1}))],512),n.isPreview?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(Te,{key:0,show:r.value,"onUpdate:show":A[0]||(A[0]=I=>r.value=I),onHandleEdit:A[1]||(A[1]=I=>u.value=!0),onHandleDelete:c,onHandleCopy:f,onHandlePaste:m},null,8,["show"]))],32)):e.createCommentVNode("",!0),n.isPreview?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(u9,{key:1,show:u.value,"onUpdate:show":A[4]||(A[4]=I=>u.value=I),data:n.modelValue},null,8,["show","data"]))],64)}}}),tu=ne(A9,[["__scopeId","data-v-a86f3139"]]),L9=Object.freeze(Object.defineProperty({__proto__:null,default:tu},Symbol.toStringTag,{value:"Module"})),I9={class:"setting-content"},O9={class:"setting-header flex items-center"},M9={class:"setting-header flex items-center"},U9={class:"setting-header flex items-center"},R9={class:"setting-header flex items-center"},F9=e.defineComponent({__name:"setting",props:{show:{type:Boolean,default:!1},data:{type:Object,default:()=>{}}},emits:["update:show"],setup(n,{emit:t}){const o=t,a=()=>{o("update:show",!1)};return(i,s)=>{const l=e.resolveComponent("a-switch"),r=e.resolveComponent("a-option"),u=e.resolveComponent("a-select"),c=e.resolveComponent("a-input"),f=e.resolveComponent("a-drawer");return e.openBlock(),e.createBlock(f,{width:500,visible:n.show,footer:!1,onCancel:a,unmountOnClose:""},{title:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(n.data.type)+"组件编辑 ",1)]),default:e.withCtx(()=>[e.createElementVNode("div",I9,[e.createElementVNode("div",O9,[s[4]||(s[4]=e.createElementVNode("span",{class:"header-title"},"仅在PC端显示",-1)),e.createVNode(l,{modelValue:n.data.onlyShowPc,"onUpdate:modelValue":s[0]||(s[0]=m=>n.data.onlyShowPc=m)},null,8,["modelValue"])]),e.createElementVNode("div",M9,[s[9]||(s[9]=e.createElementVNode("span",{class:"header-title"},"组件宽度",-1)),e.createVNode(u,{modelValue:n.data.width,"onUpdate:modelValue":s[1]||(s[1]=m=>n.data.width=m),placeholder:"请选择","allow-clear":""},{default:e.withCtx(()=>[e.createVNode(r,{value:"default"},{default:e.withCtx(()=>[...s[5]||(s[5]=[e.createTextVNode("默认",-1)])]),_:1}),e.createVNode(r,{value:"small"},{default:e.withCtx(()=>[...s[6]||(s[6]=[e.createTextVNode("小",-1)])]),_:1}),e.createVNode(r,{value:"middle"},{default:e.withCtx(()=>[...s[7]||(s[7]=[e.createTextVNode("中",-1)])]),_:1}),e.createVNode(r,{value:"max"},{default:e.withCtx(()=>[...s[8]||(s[8]=[e.createTextVNode("大",-1)])]),_:1})]),_:1},8,["modelValue"])]),e.createElementVNode("div",U9,[s[12]||(s[12]=e.createElementVNode("span",{class:"header-title"},"组件背景",-1)),e.createVNode(u,{modelValue:n.data.bgColor,"onUpdate:modelValue":s[2]||(s[2]=m=>n.data.bgColor=m),placeholder:"请选择","allow-clear":""},{default:e.withCtx(()=>[e.createVNode(r,{value:"#ffffff"},{default:e.withCtx(()=>[...s[10]||(s[10]=[e.createTextVNode("白色",-1)])]),_:1}),e.createVNode(r,{value:"#F7F7FA"},{default:e.withCtx(()=>[...s[11]||(s[11]=[e.createTextVNode("灰色",-1)])]),_:1})]),_:1},8,["modelValue"])]),e.createElementVNode("div",R9,[s[13]||(s[13]=e.createElementVNode("span",{class:"header-title"},"接口地址",-1)),e.createVNode(c,{modelValue:n.data.api,"onUpdate:modelValue":s[3]||(s[3]=m=>n.data.api=m),placeholder:"默认接口地址","allow-clear":""},null,8,["modelValue"])])])]),_:1},8,["visible"])}}}),H9=ne(F9,[["__scopeId","data-v-b008ac44"]]),j9={class:"explore-links__list row row-cols-1 row-cols-md-3"},z9=e.defineComponent({name:"ExploreLinks",__name:"index",props:{modelValue:{type:Object,default:()=>{}},isPreview:{type:Boolean,default:!0},host:{type:String,default:"cms-web.ycismelody.cn"},locale:{type:String,default:"sc"}},emits:["update:modelValue","handleDelete","handleCopy","handlePaste","handleClick","showLightboxVideo","showLightboxImage"],setup(n,{emit:t}){const o=n,a=t,i=()=>{var b,_,w,v,V;if(o.modelValue&&o.modelValue.data)return;const p={id:((b=o.modelValue)==null?void 0:b.id)||R(),type:"ExploreLinks",onlyShowPc:!1,width:((_=o.modelValue)==null?void 0:_.width)||"",bgColor:((w=o.modelValue)==null?void 0:w.bgColor)||"",api:((v=o.modelValue)==null?void 0:v.api)||"/section-link/explore/random",count:((V=o.modelValue)==null?void 0:V.count)||6};a("update:modelValue",p)},s=e.computed(()=>{var p;return o.isPreview?!((p=o.modelValue)!=null&&p.onlyShowPc)||!Ne():!0}),l=e.ref(!1),r=e.ref(!1),u=()=>{a("handleDelete",o.modelValue.id)},c=()=>{a("handleCopy",o.modelValue)},f=p=>{a("handlePaste",p)},m=p=>{a("handleClick",p)};i();const d=e.ref([]),h=p=>{if(!p||!o.isPreview)return{tag:"div",props:{}};if(p.startsWith("http"))return{tag:"a",props:{href:p,target:"_blank"}};if(p.startsWith("?")||p.startsWith("#")||p.startsWith("/")){const b=p.startsWith("?")?(window==null?void 0:window.location.href.split("?")[0])+p:p.startsWith("#")?(window==null?void 0:window.location.href.split("#")[0])+p:p;return{tag:"div",props:{onClick:()=>m(b)}}}return{tag:"a",props:{href:p,target:"_blank"}}},g=async()=>{var w,v;const p={params:{host:o.host,langCode:o.locale}},b=`${(w=o.modelValue)==null?void 0:w.api}?count=${(v=o.modelValue)==null?void 0:v.count}`,{data:_}=await Zt.get(b,p);d.value=_.data};return e.onMounted(()=>{g()}),(p,b)=>{var _,w,v;return e.openBlock(),e.createElementBlock(e.Fragment,null,[s.value?(e.openBlock(),e.createElementBlock("div",{key:0,class:"explore-links",onMouseenter:b[2]||(b[2]=V=>l.value=!0),onMouseleave:b[3]||(b[3]=V=>l.value=!1),style:e.normalizeStyle({backgroundColor:(_=n.modelValue)==null?void 0:_.bgColor})},[d.value.length>0?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(["explore-links__container",[(w=n.modelValue)!=null&&w.width?`container-content-${(v=n.modelValue)==null?void 0:v.width}`:"container-content"]])},[b[5]||(b[5]=e.createElementVNode("h6",{class:"explore-links__title"},"更多",-1)),e.createElementVNode("ul",j9,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(d.value,V=>(e.openBlock(),e.createElementBlock("li",{key:V.id,class:"col explore-links__item"},[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(h(V.link).tag),e.mergeProps({ref_for:!0},h(V.link).props,{class:"explore-links__link link-body-p link--udrline"}),{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(V.name),1)]),_:2},1040))]))),128))])],2)):e.createCommentVNode("",!0),n.isPreview?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(Te,{key:1,show:l.value,"onUpdate:show":b[0]||(b[0]=V=>l.value=V),onHandleEdit:b[1]||(b[1]=V=>r.value=!0),onHandleDelete:u,onHandleCopy:c,onHandlePaste:f},null,8,["show"]))],36)):e.createCommentVNode("",!0),n.isPreview?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(H9,{key:1,show:r.value,"onUpdate:show":b[4]||(b[4]=V=>r.value=V),data:n.modelValue},null,8,["show","data"]))],64)}}}),nu=ne(z9,[["__scopeId","data-v-f0501371"]]),q9=Object.freeze(Object.defineProperty({__proto__:null,default:nu},Symbol.toStringTag,{value:"Module"})),W9=["id","value"],G9=["for"],X9=e.defineComponent({name:"TabTag",__name:"index",props:{tabList:{default:()=>[]},currentIdx:{default:0}},emits:["updateFilter"],setup(n,{emit:t}){const o=n,a=t,i=e.ref(null),s=e.ref(null),l=e.ref(0),r=e.ref(0),u=e.ref(0),c=e.ref("all"),f=e.ref(!1),m=e.ref(1024),d=e.computed(()=>l.value>0),h=e.computed(()=>{if(!f.value||typeof window>"u")return 24;const v=i.value;if(!v)return 24;const V=window.getComputedStyle(v,null).getPropertyValue("padding-right").split("px")[0];return Number(V)*2}),g=e.computed(()=>r.value-l.value+h.value>u.value),p=()=>{typeof window<"u"&&(m.value=window.innerWidth)},b=()=>{if(o.tabList.length<=0)return;const v=s.value;v&&(l.value=v.scrollLeft,r.value=v.scrollWidth);const V=i.value;V&&(u.value=V.getBoundingClientRect().width)},_=v=>{s.value&&(v==="next"?s.value.scrollLeft+=200:s.value.scrollLeft-=200)},w=()=>{b()};return e.watch(c,()=>{a("updateFilter",c.value)}),e.watch(m,()=>{b()}),e.onMounted(()=>{f.value=!0,p(),typeof window<"u"&&window.addEventListener("resize",p),e.nextTick(w),e.nextTick(()=>{setTimeout(w,1e3)})}),(v,V)=>(e.openBlock(),e.createElementBlock("div",{class:"tab-tag",ref_key:"wrapper",ref:i},[e.createElementVNode("ul",{class:"tab-tag__list",ref_key:"list",ref:s,onScroll:w},[e.withDirectives(e.createElementVNode("div",{class:"tab-tag__nav__prev",onClick:V[0]||(V[0]=C=>_("prev"))},null,512),[[e.vShow,d.value]]),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.tabList,(C,S)=>(e.openBlock(),e.createElementBlock("li",{key:S,class:"tab-tag__item"},[e.withDirectives(e.createElementVNode("input",{type:"radio",class:"tab-tag__checkbox d-none",id:`check-${C.key}`,value:C.key,"onUpdate:modelValue":V[1]||(V[1]=N=>c.value=N)},null,8,W9),[[e.vModelRadio,c.value]]),e.createElementVNode("label",{class:"tab-tag__btn",for:`check-${C.key}`,ref_for:!0,ref:"btn"},e.toDisplayString(C.name),9,G9)]))),128)),e.withDirectives(e.createElementVNode("div",{class:"tab-tag__nav__next",onClick:V[2]||(V[2]=C=>_("next"))},null,512),[[e.vShow,g.value]])],544)],512))}}),Y9=ne(X9,[["__scopeId","data-v-67f77944"]]),K9={class:"card-school"},Q9={class:"school__head"},J9=["src","alt"],Z9={key:1,class:"school__img img-fit"},eR=["src","alt"],tR={key:2,class:"school__watermark"},nR=["src","alt"],oR={class:"school__body"},aR={key:0,class:"school__cat-list"},iR={key:1,class:"school__title"},sR=["innerHTML"],lR={class:"school__cta"},rR={key:0},dR=["href"],uR={key:1},cR=["href"],mR={key:3,class:"contact__link mt-3"},pR={key:4,class:"contact__link mt-3"},hR=e.defineComponent({name:"CardSchool",__name:"index",props:{componentProps:{default:()=>({})}},emits:["handleClick"],setup(n,{emit:t}){const o=n,a=t,i=e.computed(()=>{var _,w;return((_=o.componentProps)==null?void 0:_.image)||((w=o.componentProps)==null?void 0:w.photo_url)}),s=e.computed(()=>{var _,w;return((_=o.componentProps)==null?void 0:_.cat)||((w=o.componentProps)==null?void 0:w.tags)}),l=e.computed(()=>{var _,w;return((_=o.componentProps)==null?void 0:_.title)||((w=o.componentProps)==null?void 0:w.name)}),r=e.computed(()=>{var _,w;return((_=o.componentProps)==null?void 0:_.text)||((w=o.componentProps)==null?void 0:w.description)}),u=e.computed(()=>{var _;return((_=o.componentProps)==null?void 0:_.watermark)??null}),c=e.computed(()=>{var _;return((_=o.componentProps)==null?void 0:_.phone)??null}),f=e.computed(()=>{var _;return((_=o.componentProps)==null?void 0:_.email)??null}),m=e.computed(()=>{var _,w;return((_=o.componentProps)==null?void 0:_.link)||((w=o.componentProps)==null?void 0:w.website)}),d=e.computed(()=>{var _;return(_=o.componentProps)==null?void 0:_.linkText}),h=e.computed(()=>{var _;return((_=o.componentProps)==null?void 0:_.buttons)??null}),g=e.computed(()=>{var _;return((_=o.componentProps)==null?void 0:_.alt)||l.value}),p=_=>_!=null&&_.startsWith("http")?{tag:"a",props:{href:_,target:"_blank",rel:"noopener noreferrer"}}:{tag:"a",props:{href:_}},b=_=>{a("handleClick",_)};return(_,w)=>(e.openBlock(),e.createElementBlock("div",K9,[e.createElementVNode("div",Q9,[m.value?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(p(m.value).tag),e.mergeProps({key:0},p(m.value).props,{class:"school__img img-fit"}),{default:e.withCtx(()=>[e.createElementVNode("img",{src:i.value,alt:g.value},null,8,J9)]),_:1},16)):(e.openBlock(),e.createElementBlock("div",Z9,[e.createElementVNode("img",{src:i.value,alt:g.value},null,8,eR)])),u.value?(e.openBlock(),e.createElementBlock("div",tR,[e.createElementVNode("img",{src:u.value,alt:g.value},null,8,nR)])):e.createCommentVNode("",!0)]),e.createElementVNode("div",oR,[s.value&&s.value.length>0?(e.openBlock(),e.createElementBlock("ul",aR,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(s.value,v=>(e.openBlock(),e.createElementBlock("li",{key:v,class:"tx-overline text-blue"},e.toDisplayString(v),1))),128))])):e.createCommentVNode("",!0),l.value?(e.openBlock(),e.createElementBlock("h6",iR,e.toDisplayString(l.value),1)):e.createCommentVNode("",!0),r.value?(e.openBlock(),e.createElementBlock("div",{key:2,class:"school__content",innerHTML:r.value},null,8,sR)):e.createCommentVNode("",!0),e.createElementVNode("ul",lR,[c.value?(e.openBlock(),e.createElementBlock("li",rR,[e.createElementVNode("a",{class:"school__cta__item link-body-p link--udrline",href:`tel:${c.value}`},e.toDisplayString(c.value),9,dR)])):e.createCommentVNode("",!0),f.value?(e.openBlock(),e.createElementBlock("li",uR,[e.createElementVNode("a",{class:"school__cta__item link-body-p link--udrline",href:`mailto:${f.value}`},e.toDisplayString(f.value),9,cR)])):e.createCommentVNode("",!0)]),m.value?(e.openBlock(),e.createElementBlock("div",mR,[e.createVNode(qo,{type:"link",data:{text:d.value||"访问学校网页",url:m.value},isPreview:_.isPreview,onHandleClick:b},null,8,["data","isPreview"])])):e.createCommentVNode("",!0),h.value?(e.openBlock(),e.createElementBlock("div",pR,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(h.value,(v,V)=>(e.openBlock(),e.createBlock(qo,{key:V,type:"button",data:{text:v.text,url:v.url},isPreview:_.isPreview,onHandleClick:b},null,8,["data","isPreview"]))),128))])):e.createCommentVNode("",!0)])]))}}),pv=ne(hR,[["__scopeId","data-v-bd1748ce"]]),fR={class:"school-list"},gR={key:0,class:"school-list__filter"},vR={key:0,class:"school-list__title"},yR=["id"],_R=["data-aos-delay","data-aos-anchor"],bR=e.defineComponent({name:"SchoolList",__name:"SchoolList",props:{componentProps:{type:Object,default:()=>({})},schoolLocations:{type:Array,default:()=>[]},schoolCategories:{type:Array,default:()=>[]},website:{type:String,default:()=>""},locale:{type:String,default:()=>""}},setup(n){const t=n,o=e.ref("all"),a=Date.now(),i=e.ref([]),s=e.ref(t.schoolLocations),l=e.ref(t.schoolCategories),r=e.computed(()=>{var v;return((v=t.componentProps)==null?void 0:v.width)??null}),u=e.computed(()=>{var v;return((v=t.componentProps)==null?void 0:v.title)??null}),c=e.computed(()=>{var v;return((v=t.componentProps)==null?void 0:v.colDesktop)??3}),f=e.computed(()=>{var v;return((v=t.componentProps)==null?void 0:v.colMobile)??1}),m=e.computed(()=>{var v;return((v=t.componentProps)==null?void 0:v.slug)??"all"}),d=e.computed(()=>{const v=l.value.find(V=>V.slug===m.value);return(v==null?void 0:v.id)??NaN}),h=e.computed(()=>{let v=[{id:"all",name:"全部"}];return v.push(...s.value),v.map(V=>({...V,key:V.id}))}),g=e.computed(()=>{var v;return((v=t.componentProps)==null?void 0:v.list)??[]}),p=e.computed(()=>isNaN(d.value)?i.value:g.value),b=v=>{o.value=v},_=async()=>{try{const v={headers:{website:`${t.website}-${t.locale}`}},V="school",{data:C}=await Zt.get(V,v);i.value=C.data}catch(v){console.error("Error fetching school list:",v)}},w=async v=>{try{const V={headers:{website:`${t.website}-${t.locale}`}},C=`/school/location/${v}`,{data:S}=await Zt.get(C,V);i.value=S.data}catch(V){console.error("Error fetching location list:",V)}};return e.watch(o,v=>{v==="all"?_():w(v)}),e.onMounted(()=>{isNaN(d.value)&&_()}),(v,V)=>(e.openBlock(),e.createElementBlock("div",fR,[h.value&&h.value.length>0&&isNaN(d.value)?(e.openBlock(),e.createElementBlock("div",gR,[e.createVNode(Y9,{tabList:h.value,onUpdateFilter:b},null,8,["tabList"])])):e.createCommentVNode("",!0),p.value.length>0?(e.openBlock(),e.createElementBlock("div",{key:1,class:e.normalizeClass(["school-list__wrapper",[r.value]])},[u.value?(e.openBlock(),e.createElementBlock("h4",vR,e.toDisplayString(u.value),1)):e.createCommentVNode("",!0),e.createElementVNode("div",{class:e.normalizeClass(["row",[`row-cols-${f.value}`,`row-cols-md-${c.value}`,{"small-gap":c.value>4}]]),id:`school-list-${e.unref(a)}`},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(p.value,(C,S)=>(e.openBlock(),e.createElementBlock("div",{class:"col",key:C.name,"data-aos":"fade-up","data-aos-delay":S*100,"data-aos-anchor":`#school-list-${e.unref(a)}`},[e.createVNode(pv,{componentProps:C},null,8,["componentProps"])],8,_R))),128))],10,yR)],2)):e.createCommentVNode("",!0)]))}}),wR=ne(bR,[["__scopeId","data-v-b3439b55"]]),xR={class:"setting-content"},VR={class:"setting-header flex items-center"},CR={class:"setting-header flex items-center"},kR={class:"setting-header flex items-center"},ER={class:"setting-header flex items-center"},TR=e.defineComponent({__name:"setting",props:{show:{type:Boolean,default:!1},data:{type:Object,default:()=>{}},slugList:{type:Array,default:()=>[]}},emits:["update:show"],setup(n,{emit:t}){const o=t,a=()=>{o("update:show",!1)};return(i,s)=>{const l=e.resolveComponent("a-switch"),r=e.resolveComponent("a-option"),u=e.resolveComponent("a-select"),c=e.resolveComponent("a-input"),f=e.resolveComponent("a-drawer");return e.openBlock(),e.createBlock(f,{width:500,visible:n.show,footer:!1,onCancel:a,unmountOnClose:""},{title:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(n.data.type)+"组件编辑 ",1)]),default:e.withCtx(()=>[e.createElementVNode("div",xR,[e.createElementVNode("div",VR,[s[4]||(s[4]=e.createElementVNode("span",{class:"header-title"},"仅显示PC端",-1)),e.createVNode(l,{modelValue:n.data.onlyShowPc,"onUpdate:modelValue":s[0]||(s[0]=m=>n.data.onlyShowPc=m)},null,8,["modelValue"])]),e.createElementVNode("div",CR,[s[5]||(s[5]=e.createElementVNode("span",{class:"header-title"},"学校类别",-1)),e.createVNode(u,{modelValue:n.data.slug,"onUpdate:modelValue":s[1]||(s[1]=m=>n.data.slug=m),placeholder:"请选择","allow-clear":""},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.slugList,m=>(e.openBlock(),e.createBlock(r,{key:m.slug,value:m.slug},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(m.name),1)]),_:2},1032,["value"]))),128))]),_:1},8,["modelValue"])]),e.createElementVNode("div",kR,[s[6]||(s[6]=e.createElementVNode("span",{class:"header-title"},"标题",-1)),e.createVNode(c,{modelValue:n.data.title,"onUpdate:modelValue":s[2]||(s[2]=m=>n.data.title=m),placeholder:"请输入标题","allow-clear":""},null,8,["modelValue"])]),e.createElementVNode("div",ER,[s[7]||(s[7]=e.createElementVNode("span",{class:"header-title"},"接口地址",-1)),e.createVNode(c,{modelValue:n.data.api,"onUpdate:modelValue":s[3]||(s[3]=m=>n.data.api=m),placeholder:"默认接口地址","allow-clear":""},null,8,["modelValue"])])])]),_:1},8,["visible"])}}}),NR=ne(TR,[["__scopeId","data-v-91aaa000"]]);var hv={exports:{}},$t=hv.exports={},bo,wo;function jc(){throw new Error("setTimeout has not been defined")}function zc(){throw new Error("clearTimeout has not been defined")}(function(){try{typeof setTimeout=="function"?bo=setTimeout:bo=jc}catch{bo=jc}try{typeof clearTimeout=="function"?wo=clearTimeout:wo=zc}catch{wo=zc}})();function fv(n){if(bo===setTimeout)return setTimeout(n,0);if((bo===jc||!bo)&&setTimeout)return bo=setTimeout,setTimeout(n,0);try{return bo(n,0)}catch{try{return bo.call(null,n,0)}catch{return bo.call(this,n,0)}}}function SR(n){if(wo===clearTimeout)return clearTimeout(n);if((wo===zc||!wo)&&clearTimeout)return wo=clearTimeout,clearTimeout(n);try{return wo(n)}catch{try{return wo.call(null,n)}catch{return wo.call(this,n)}}}var zo=[],Bi=!1,Ma,kr=-1;function BR(){!Bi||!Ma||(Bi=!1,Ma.length?zo=Ma.concat(zo):kr=-1,zo.length&&gv())}function gv(){if(!Bi){var n=fv(BR);Bi=!0;for(var t=zo.length;t;){for(Ma=zo,zo=[];++kr<t;)Ma&&Ma[kr].run();kr=-1,t=zo.length}Ma=null,Bi=!1,SR(n)}}$t.nextTick=function(n){var t=new Array(arguments.length-1);if(arguments.length>1)for(var o=1;o<arguments.length;o++)t[o-1]=arguments[o];zo.push(new vv(n,t)),zo.length===1&&!Bi&&fv(gv)};function vv(n,t){this.fun=n,this.array=t}vv.prototype.run=function(){this.fun.apply(null,this.array)};$t.title="browser";$t.browser=!0;$t.env={};$t.argv=[];$t.version="";$t.versions={};function Zo(){}$t.on=Zo;$t.addListener=Zo;$t.once=Zo;$t.off=Zo;$t.removeListener=Zo;$t.removeAllListeners=Zo;$t.emit=Zo;$t.prependListener=Zo;$t.prependOnceListener=Zo;$t.listeners=function(n){return[]};$t.binding=function(n){throw new Error("process.binding is not supported")};$t.cwd=function(){return"/"};$t.chdir=function(n){throw new Error("process.chdir is not supported")};$t.umask=function(){return 0};var DR=hv.exports;const PR={key:0,class:"school-layout__logo"},$R={key:1,class:"school-layout__article"},AR=e.defineComponent({name:"SchoolLayout",__name:"index",props:{modelValue:{type:Object,default:()=>{}},isPreview:{type:Boolean,default:!0},host:{type:String,default:"cms-web.ycismelody.cn"},locale:{type:String,default:"sc"}},emits:["update:modelValue","handleDelete","handleCopy","handlePaste","showLightboxVideo","showLightboxImage"],setup(n,{emit:t}){const o=n,a=t,i={schoolCategories:"/school/category/listForWeb",schoolLocations:"/location/listForWeb"},s=e.ref([]),l=e.ref([]),r=()=>{Promise.all([Zt.get(i.schoolCategories,{params:{langCode:o.locale,host:o.host}}),Zt.get(i.schoolLocations)]).then(([S,N])=>{s.value=S.data.data,l.value=N.data.data,DR.nextTick(()=>{console.log("slugId",V.value),isNaN(V.value)||C()})})},u=()=>{var N,D,$,k,A,B;if(o.modelValue&&o.modelValue.data)return;const S={id:((N=o.modelValue)==null?void 0:N.id)||R(),type:"SchoolLayout",onlyShowPc:!1,api:((D=o.modelValue)==null?void 0:D.api)||"/school/getByCategoryId",title:((k=($=o.modelValue)==null?void 0:$.data)==null?void 0:k.title)||"这里是标题",slug:((B=(A=o.modelValue)==null?void 0:A.data)==null?void 0:B.slug)||"ywiek"};a("update:modelValue",S)},c=e.computed(()=>{var S;return o.isPreview?!((S=o.modelValue)!=null&&S.onlyShowPc)||!Ne():!0}),f=e.ref(!1),m=e.ref(!1),d=()=>{a("handleDelete",o.modelValue.id)},h=()=>{a("handleCopy",o.modelValue)},g=S=>{a("handlePaste",S)};r(),u();const p=e.ref([]),b=e.ref([]),_=e.ref([]),w=e.ref({id:R(),type:"MediaLogo",bgColor:"",width:"",data:[]}),v=e.ref({id:R(),type:"ArticleList",bgColor:"",width:"",data:[]}),V=e.computed(()=>{const S=s.value.find(N=>N.slug===o.modelValue.slug);return(S==null?void 0:S.id)??NaN}),C=async()=>{try{const S={headers:{website:`${o.website}-${o.locale}`}},N=`${o.modelValue.api}${V.value}`,{data:D}=await Zt.get(N,S);_.value=D.data.schools;const $=D.data.logo_url;$&&(p.value=Array.isArray($)?$.map(Y=>({id:R(),url:Y.url})):[{id:R(),imgSrc:$}],w.value.data=p.value,console.log("logo_list",p.value));const k=D.data.photo_url,A=D.data.name,B=D.data.description,I=D.data.caption,z=D.data.buttons;B&&b.value.push({id:R(),type:"Article",title:A||null,content:B,buttonList:z==null?void 0:z.map(Y=>({id:R(),...Y}))}),k&&b.value.push({id:R(),type:"Image",imgSrc:k,caption:I?A:null}),v.value.data=b.value}catch(S){console.error("Error fetching category list:",S)}};return(S,N)=>{var D,$;return e.openBlock(),e.createElementBlock(e.Fragment,null,[c.value?(e.openBlock(),e.createElementBlock("div",{key:0,class:"school-layout",onMouseenter:N[4]||(N[4]=k=>f.value=!0),onMouseleave:N[5]||(N[5]=k=>f.value=!1)},[p.value.length>0?(e.openBlock(),e.createElementBlock("div",PR,[e.createVNode(Cl,{isPreview:!1,modelValue:w.value,"onUpdate:modelValue":N[0]||(N[0]=k=>w.value=k)},null,8,["modelValue"])])):e.createCommentVNode("",!0),b.value.length>0?(e.openBlock(),e.createElementBlock("div",$R,[e.createVNode(xl,{isPreview:!1,modelValue:v.value,"onUpdate:modelValue":N[1]||(N[1]=k=>v.value=k)},null,8,["modelValue"])])):e.createCommentVNode("",!0),e.createElementVNode("div",{class:e.normalizeClass(["school-layout__school",{"mt-0":_.value.length<=0}])},[e.createVNode(wR,{componentProps:{title:(D=n.modelValue)==null?void 0:D.title,list:_.value,slug:($=n.modelValue)==null?void 0:$.slug,width:"container-content"},schoolLocations:l.value,schoolCategories:s.value,website:S.website,locale:n.locale},null,8,["componentProps","schoolLocations","schoolCategories","website","locale"])],2),n.isPreview?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(Te,{key:2,show:f.value,"onUpdate:show":N[2]||(N[2]=k=>f.value=k),onHandleEdit:N[3]||(N[3]=k=>m.value=!0),onHandleDelete:d,onHandleCopy:h,onHandlePaste:g},null,8,["show"]))],32)):e.createCommentVNode("",!0),n.isPreview?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(NR,{key:1,show:m.value,"onUpdate:show":N[6]||(N[6]=k=>m.value=k),data:n.modelValue,slugList:s.value},null,8,["show","data","slugList"]))],64)}}}),ou=ne(AR,[["__scopeId","data-v-15eb57af"]]),LR=Object.freeze(Object.defineProperty({__proto__:null,default:ou},Symbol.toStringTag,{value:"Module"})),IR={class:"setting-content"},OR={class:"setting-header flex items-center"},MR={class:"setting-header flex items-center"},UR={class:"setting-header flex items-center"},RR={class:"setting-header flex items-center"},FR={class:"setting-header flex items-center"},HR=e.defineComponent({__name:"setting",props:{show:{type:Boolean,default:!1},data:{type:Object,default:()=>{}}},emits:["update:show"],setup(n,{emit:t}){const o=t,a=()=>{o("update:show",!1)};return(i,s)=>{const l=e.resolveComponent("a-checkbox"),r=e.resolveComponent("a-option"),u=e.resolveComponent("a-select"),c=e.resolveComponent("a-input"),f=e.resolveComponent("a-drawer");return e.openBlock(),e.createBlock(f,{width:500,visible:n.show,footer:!1,onCancel:a,unmountOnClose:""},{title:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(n.data.type)+"组件编辑 ",1)]),default:e.withCtx(()=>[e.createElementVNode("div",IR,[e.createElementVNode("div",OR,[s[6]||(s[6]=e.createElementVNode("span",{class:"header-title"},"仅在pc端显示",-1)),e.createVNode(l,{modelValue:n.data.onlyShowPc,"onUpdate:modelValue":s[0]||(s[0]=m=>n.data.onlyShowPc=m)},{default:e.withCtx(()=>[...s[5]||(s[5]=[e.createTextVNode("仅在pc端显示",-1)])]),_:1},8,["modelValue"])]),e.createElementVNode("div",MR,[s[11]||(s[11]=e.createElementVNode("span",{class:"header-title"},"组件宽度",-1)),e.createVNode(u,{modelValue:n.data.width,"onUpdate:modelValue":s[1]||(s[1]=m=>n.data.width=m),placeholder:"请选择","allow-clear":""},{default:e.withCtx(()=>[e.createVNode(r,{value:"default"},{default:e.withCtx(()=>[...s[7]||(s[7]=[e.createTextVNode("默认",-1)])]),_:1}),e.createVNode(r,{value:"small"},{default:e.withCtx(()=>[...s[8]||(s[8]=[e.createTextVNode("小",-1)])]),_:1}),e.createVNode(r,{value:"middle"},{default:e.withCtx(()=>[...s[9]||(s[9]=[e.createTextVNode("中",-1)])]),_:1}),e.createVNode(r,{value:"max"},{default:e.withCtx(()=>[...s[10]||(s[10]=[e.createTextVNode("大",-1)])]),_:1})]),_:1},8,["modelValue"])]),e.createElementVNode("div",UR,[s[12]||(s[12]=e.createElementVNode("span",{class:"header-title"},"接口地址",-1)),e.createVNode(c,{modelValue:n.data.api,"onUpdate:modelValue":s[2]||(s[2]=m=>n.data.api=m),placeholder:"默认接口地址","allow-clear":""},null,8,["modelValue"])]),e.createElementVNode("div",RR,[s[13]||(s[13]=e.createElementVNode("span",{class:"header-title"},"pc列数",-1)),e.createVNode(c,{modelValue:n.data.desktopCol,"onUpdate:modelValue":s[3]||(s[3]=m=>n.data.desktopCol=m),placeholder:"请输入","allow-clear":""},null,8,["modelValue"])]),e.createElementVNode("div",FR,[s[14]||(s[14]=e.createElementVNode("span",{class:"header-title"},"移动端列数",-1)),e.createVNode(c,{modelValue:n.data.mobileCol,"onUpdate:modelValue":s[4]||(s[4]=m=>n.data.mobileCol=m),placeholder:"请输入","allow-clear":""},null,8,["modelValue"])])])]),_:1},8,["visible"])}}}),jR=ne(HR,[["__scopeId","data-v-060693a1"]]),zR={class:"mt-10 mt-md-12"},qR=e.defineComponent({name:"CardCarouselMultiRowPublications",__name:"index",props:{modelValue:{type:Object,default:()=>{}},isPreview:{type:Boolean,default:!0},website:{type:String,default:"ywies-tx"},locale:{type:String,default:"sc"}},emits:["update:modelValue","handleDelete","handleCopy","handlePaste","handleClick","showLightboxVideo","showLightboxImage"],setup(n,{emit:t}){const o=n,a=t,i=()=>{var M,Q,W;if(o.modelValue&&o.modelValue.data)return;const F={id:((M=o.modelValue)==null?void 0:M.id)||R(),type:"CardCarouselMultiRowPublications",onlyShowPc:!1,width:((Q=o.modelValue)==null?void 0:Q.width)||"",api:((W=o.modelValue)==null?void 0:W.api)||"/media-library/publications?per_page=1000&page=1",desktopCol:4,mobileCol:2};a("update:modelValue",F)},s=e.computed(()=>{var F;return o.isPreview?!((F=o.modelValue)!=null&&F.onlyShowPc)||!Ne():!0}),l=e.ref(!1),r=e.ref(!1),u=()=>{a("handleDelete",o.modelValue.id)},c=()=>{a("handleCopy",o.modelValue)},f=F=>{a("handlePaste",F)},m=F=>{a("handleClick",F)};i();const d=[ct.Navigation,ct.Pagination],h={768:{slidesPerView:"auto",slidesPerGroup:1,slidesPerGroupAuto:!0,spaceBetween:16},1024:{slidesPerView:1,slidesPerGroup:1,spaceBetween:16}},g=e.ref(null),p=e.ref(null),b=e.ref(0),_=e.ref([]),w=e.ref([]),v=e.ref(1024),V=e.computed(()=>(v.value>=768&&v.value>=1024?4:3)*2),C=e.computed(()=>v.value>=768?v.value>=1024?4:3:2),S=e.computed(()=>w.value.length>1);e.watch(b,()=>{const F=g.value;H(F)});const N=()=>{typeof window<"u"&&(v.value=window.innerWidth)},D=async()=>{var F,M;if((F=o.modelValue)!=null&&F.api){const Q=`${(M=o.modelValue)==null?void 0:M.api}`,W={headers:{website:`${o.website}-${o.locale}`}},{data:Z}=await Zt.get(Q,W);w.value=Z.data}$()},$=()=>{const F=w.value.reduce((M,Q,W)=>{const Z=Math.floor(W/V.value);return M[Z]||(M[Z]=[]),M[Z].push(Q),M},[]);_.value=F},k=F=>{p.value=F},A=()=>{p.value&&(b.value=p.value.realIndex,J(),O())},B=F=>{p.value&&p.value.slideToLoop(F,600)},I=F=>{if(F.video_type==="outer")return;const M=w.value.filter(W=>W.video_type!=="outer"&&W.type!=="photo"),Q=M.findIndex(W=>W.slug===F.slug);a("showLightboxVideo",{idx:Q,list:M})},z=F=>{const M=w.value.filter(W=>W.type==="photo"),Q=M.findIndex(W=>W.slug===F.slug);a("showLightboxImage",{idx:Q,url:F.url,text:F.text||F.title,list:M})},Y=F=>{const M=F.getBoundingClientRect();return{x:M.left+window.pageXOffset,y:M.top+window.pageYOffset}},H=F=>{if(!F||typeof window>"u")return;const M=v.value>=1024?170:150,Q=Y(F).y-M;window.scroll({top:Q,left:0,behavior:"smooth"})},q=F=>{const M=F.currentTarget,Q=M.dataset.slug,W=M.dataset.type,Z=w.value.find(de=>de.key==Q||de.slug==Q);Z&&(W==="photo"?z(Z):I(Z))},O=()=>{typeof document>"u"||(Object.values(document.getElementsByClassName("card-asset")).forEach(F=>{F.addEventListener("click",q)}),Object.values(document.getElementsByClassName("card-video")).forEach(F=>{F.addEventListener("click",q)}))},J=()=>{typeof document>"u"||(Object.values(document.getElementsByClassName("card-asset")).forEach(F=>{F.removeEventListener("click",q)}),Object.values(document.getElementsByClassName("card-video")).forEach(F=>{F.removeEventListener("click",q)}))};return e.onMounted(()=>{N(),typeof window<"u"&&window.addEventListener("resize",N),D()}),e.onUnmounted(()=>{typeof window<"u"&&window.removeEventListener("resize",N),J()}),(F,M)=>{var W,Z;const Q=e.resolveComponent("ClientOnly");return e.openBlock(),e.createElementBlock(e.Fragment,null,[s.value?(e.openBlock(),e.createElementBlock("div",{key:0,class:"card-carousel-multi-row",onMouseenter:M[2]||(M[2]=de=>l.value=!0),onMouseleave:M[3]||(M[3]=de=>l.value=!1),ref_key:"parent",ref:g},[e.createElementVNode("div",{class:e.normalizeClass(["card-carousel__wrapper",[(W=n.modelValue)!=null&&W.width?`container-content-${(Z=n.modelValue)==null?void 0:Z.width}`:"container-content"]])},[_.value.length?(e.openBlock(),e.createBlock(Q,{key:0},{default:e.withCtx(()=>[e.createVNode(e.unref(Et.Swiper),{ref_key:"swiperRef",ref:p,modules:d,"centered-slides":!1,speed:600,"slides-per-view":1,"slides-per-group-skip":1,"space-between":16,loop:!0,breakpoints:h,class:"swiper card-carousel__swiper",onSlideChange:A,onSwiper:k},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(_.value,(de,Ve)=>(e.openBlock(),e.createBlock(e.unref(Et.SwiperSlide),{class:"swiper-slide",key:Ve},{default:e.withCtx(()=>[e.createElementVNode("div",{class:e.normalizeClass(["row",[`row-cols-${C.value}`]])},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(de,oe=>(e.openBlock(),e.createElementBlock("div",{class:"slide-content col",key:oe.key||oe.slug},[e.createVNode(pv,{componentProps:oe,onHandleClick:m},null,8,["componentProps"])]))),128))],2)]),_:2},1024))),128))]),_:1},512),e.withDirectives(e.createElementVNode("div",zR,[e.createVNode(es,{currentIndex:b.value,onUpdatePage:B,count:_.value.length,dark:""},null,8,["currentIndex","count"])],512),[[e.vShow,S.value]])]),_:1})):e.createCommentVNode("",!0)],2),n.isPreview?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(Te,{key:0,show:l.value,"onUpdate:show":M[0]||(M[0]=de=>l.value=de),onHandleEdit:M[1]||(M[1]=de=>r.value=!0),onHandleDelete:u,onHandleCopy:c,onHandlePaste:f},null,8,["show"]))],544)):e.createCommentVNode("",!0),n.isPreview?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(jR,{key:1,show:r.value,"onUpdate:show":M[4]||(M[4]=de=>r.value=de),data:n.modelValue},null,8,["show","data"]))],64)}}}),au=ne(qR,[["__scopeId","data-v-fc01a254"]]),WR=Object.freeze(Object.defineProperty({__proto__:null,default:au},Symbol.toStringTag,{value:"Module"})),GR=[{label:"Common",key:"common",image:"",children:[{label:"CustomSpace",key:"custom_space",image:""},{label:"CustomText",key:"custom_text",image:""},{label:"QuoteText",key:"quote_text",image:""},{label:"ArticleList",key:"article_list",image:""},{label:"ArticleListPureText",key:"article_list_pure_text",image:""}]},{label:"Media",key:"media",image:"",children:[{label:"MedialmageFull",key:"media_image_full",image:""},{label:"MedialmageStatic",key:"media_image_static",image:""},{label:"MediaVideo",key:"media_video",image:""}]},{label:"Links",key:"links",image:"",children:[{label:"BtnList",key:"btn_list",image:""},{label:"LinkList",key:"link_list",image:""},{label:"DonorLinks",key:"donor_links",image:""},{label:"GridLinks",key:"grid_links",image:""},{label:"DetailLink",key:"detail_link",image:""},{label:"InformationLink",key:"information_link",image:""}]},{label:"Headers",key:"headers",image:"",children:[{label:"BannerPage",key:"banner_page",image:""},{label:"BannerImage",key:"banner_image",image:""},{label:"MapStatic",key:"map_static",image:""},{label:"VrTour",key:"vr_tour",image:""}]},{label:"Collections",key:"collections",image:"",children:[{label:"HeroSlide",key:"hero_slide",image:""},{label:"AccordionText",key:"accordion_text",image:""},{label:"CardCarousel (Profiles)",key:"card_carousel_profiles",image:""},{label:"CardCarouselMultiRow (Profiles)",key:"card_carousel_multi_row_profiles",image:""},{label:"CardList (Circle)",key:"card_list_circle",image:""},{label:"CardList (Programme)",key:"card_list_programme",image:""},{label:"CardList (School)",key:"card_list_school",image:""},{label:"CardShowcaseProfile",key:"card_showcase_profile",image:""},{label:"CarouselLogo",key:"carousel_logo",image:""},{label:"Resources",key:"resources",image:""},{label:"ResourcesTwo",key:"resources_two",image:""},{label:"Process",key:"process",image:""},{label:"TableTwo",key:"table_two",image:""},{label:"GalleryList (Default)",key:"gallery_list_default",image:""},{label:"GalleryList (Caption)",key:"gallery_list_caption",image:""},{label:"GalleryList (Caption - Round)",key:"gallery_list_caption_round",image:""},{label:"GalleryList (Timeline - One Column)",key:"gallery_list_timeline_one_column",image:""},{label:"GalleryList (Timeline - Two Columns)",key:"gallery_list_timeline_two_columns",image:""},{label:"TabDefault",key:"tab_default",image:""},{label:"TabTimeline",key:"tab_timeline",image:""},{label:"Disc",key:"disc",image:""},{label:"BasicCollapse",key:"basic_collapse",image:""},{label:"TableCollapse",key:"table_collapse",image:""},{label:"MediaLogo",key:"media_logo",image:""},{label:"CollapseCustom",key:"collapse_custom",image:""},{label:"ScrollKeyInfo",key:"scroll_key_info",image:""},{label:"CardCarouselMultiRow (Articles)",key:"card_carousel_multi_row_articles",image:""},{label:"Publications",key:"publications",image:""}]},{label:"Contact Information",key:"contact_information",image:"",children:[{label:"ContactUsInfo",key:"contact_us_info",image:""},{label:"ContactUsList",key:"contact_us_list",image:""}]},{label:"Sections",key:"sections",image:"",children:[{label:"Sections (Pages, updating URL)",key:"sections_pages_updating_url",image:""},{label:"Sections (Logos, not updating URL)",key:"sections_logos_not_updating_url",image:""}]},{label:"Others",key:"others",image:"",children:[{label:"Articleitem",key:"article_item",image:""},{label:"CountDown",key:"count_down",image:""},{label:"Customlframe",key:"custom_iframe",image:""},{label:"TheHistoryCarousel",key:"the_history_carousel",image:""},{label:"TimelineStory",key:"timeline_story",image:""},{label:"RegisterForm (Event)",key:"register_form_event",image:""}]},{label:"YCYW 90th",key:"ycyw_90th",image:"",children:[{label:"BackgroundWrapper",key:"background_wrapper",image:""},{label:"BannerQuote",key:"banner_quote",image:""},{label:"BannerlmageWithLink",key:"banner_image_with_link",image:""},{label:"BlessingMessage",key:"blessing_message",image:""},{label:"BlessingSlider",key:"blessing_slider",image:""},{label:"GalleryBlock",key:"gallery_block",image:""},{label:"RibbonBlock",key:"ribbon_block",image:""}]},{label:"API-related Components",key:"api_related_components",image:"",children:[{label:"NewsList",key:"news_list",image:""},{label:"ExploreLinks",key:"explore_links",image:""},{label:"CardShowcase",key:"card_showcase",image:""},{label:"CardCarousel (Articles)",key:"card_carousel_articles",image:""},{label:"CardCarouselMultiRow (Publications)",key:"card_carousel_multi_row_publications",image:""},{label:"Alumni Community List",key:"alumni_community_list",image:""},{label:"School Layout",key:"school_layout",image:""}]}],XR={class:"search-box"},YR={class:"component-section"},KR={class:"section-title"},QR={class:"section-description"},JR={class:"component-grid"},ZR=["onClick"],eF={class:"thumbnail-placeholder"},tF={class:"component-name"},nF={__name:"index",props:{visible:{type:Boolean,default:!1}},emits:["update:visible","ok","cancel"],setup(n,{emit:t}){const o=n,a=t,i=e.reactive({}),s=e.ref(["common"]),l=e.ref(GR),r=e.ref({}),u=e.computed(()=>r.value.children||[]);e.watch(u,d=>{d.forEach(h=>{i[h.label]||(i[h.label]=null)})},{immediate:!0}),e.watch(s,d=>{r.value=l.value.find(h=>h.key===d[0])||{}},{immediate:!0});const c=d=>{a("ok",JSON.parse(JSON.stringify({type:d.label,id:R()})))},f=e.computed({get:()=>o.visible,set:d=>a("update:visible",d)}),m=()=>{const d=["#3498db","#2ecc71","#e74c3c","#f1c40f","#9b59b6","#1abc9c"];return d[Math.floor(Math.random()*d.length)]};return(d,h)=>{const g=e.resolveComponent("a-input-search"),p=e.resolveComponent("a-menu-item"),b=e.resolveComponent("a-menu"),_=e.resolveComponent("a-layout-sider"),w=e.resolveComponent("a-layout-content"),v=e.resolveComponent("a-layout"),V=e.resolveComponent("a-modal");return e.openBlock(),e.createBlock(V,{visible:f.value,"onUpdate:visible":h[1]||(h[1]=C=>f.value=C),title:"添加组件",width:"90%",footer:!1},{default:e.withCtx(()=>[e.createVNode(v,{class:"component-library-container",style:{display:"flex"}},{default:e.withCtx(()=>[e.createVNode(_,{width:240,style:{background:"#fff",boxShadow:"0 2px 8px rgba(0, 0, 0, 0.08)"}},{default:e.withCtx(()=>[e.createElementVNode("div",XR,[e.createVNode(g,{placeholder:"Search components..."})]),e.createVNode(b,{"selected-keys":s.value,"onUpdate:selectedKeys":h[0]||(h[0]=C=>s.value=C),style:{height:"100%",borderRight:0}},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(l.value,C=>(e.openBlock(),e.createBlock(p,{key:C.key},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(C.label),1)]),_:2},1024))),128))]),_:1},8,["selected-keys"])]),_:1}),e.createVNode(w,{style:{padding:"24px 40px 24px 24px",background:"#f5f5f5"}},{default:e.withCtx(()=>[e.createElementVNode("div",YR,[e.createElementVNode("h2",KR,e.toDisplayString(r.value.label),1),e.createElementVNode("p",QR,e.toDisplayString(r.value.description),1),e.createElementVNode("div",JR,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(u.value,(C,S)=>(e.openBlock(),e.createElementBlock("div",{key:S,class:"component-card",onClick:N=>c(C)},[e.createElementVNode("div",eF,[e.createElementVNode("div",{class:"thumbnail-color",style:e.normalizeStyle({backgroundColor:m()})},null,4)]),e.createElementVNode("div",tF,e.toDisplayString(C.label),1)],8,ZR))),128))])])]),_:1})]),_:1})]),_:1},8,["visible"])}}},oF=ne(nF,[["__scopeId","data-v-72c80758"]]),xa=e.defineComponent({__name:"DynamicComponentLoader",props:{type:{},propsData:{}},emits:["handleDelete","handleCopy","handlePaste","handleClick"],setup(n,{emit:t}){const o=Object.assign({"/src/components/AlummiCommunityList/index.vue":()=>Promise.resolve().then(()=>JU),"/src/components/ArticleItem/index.vue":()=>Promise.resolve().then(()=>VS),"/src/components/ArticleList/index.vue":()=>Promise.resolve().then(()=>Qb),"/src/components/ArticleListPureText/index.vue":()=>Promise.resolve().then(()=>zU),"/src/components/BackgroundWrapper/index.vue":()=>Promise.resolve().then(()=>require("./index-DFuCM6Sl.js")),"/src/components/BannerImage/index.vue":()=>Promise.resolve().then(()=>sw),"/src/components/BannerImageWithLink/index.vue":()=>Promise.resolve().then(()=>MP),"/src/components/BannerPage/index.vue":()=>Promise.resolve().then(()=>yw),"/src/components/BannerQuote/index.vue":()=>Promise.resolve().then(()=>sS),"/src/components/BasicCollapse/index.vue":()=>Promise.resolve().then(()=>WI),"/src/components/BlessingMessage/index.vue":()=>Promise.resolve().then(()=>F7),"/src/components/BlessingSlider/index.vue":()=>Promise.resolve().then(()=>a9),"/src/components/BtnList/index.vue":()=>Promise.resolve().then(()=>Ow),"/src/components/CardCarousel/index.vue":()=>Promise.resolve().then(()=>VN),"/src/components/CardCarouselArticles/index.vue":()=>Promise.resolve().then(()=>MM),"/src/components/CardCarouselMultiRow/index.vue":()=>Promise.resolve().then(()=>qN),"/src/components/CardCarouselMultiRowArticles/index.vue":()=>Promise.resolve().then(()=>QM),"/src/components/CardCarouselMultiRowPublications/index.vue":()=>Promise.resolve().then(()=>WR),"/src/components/CardListCircle/index.vue":()=>Promise.resolve().then(()=>OH),"/src/components/CardListProgramme/index.vue":()=>Promise.resolve().then(()=>mj),"/src/components/CardListSchool/index.vue":()=>Promise.resolve().then(()=>jj),"/src/components/CardShowcase/index.vue":()=>Promise.resolve().then(()=>L9),"/src/components/CardShowcaseProfile/index.vue":()=>Promise.resolve().then(()=>o3),"/src/components/CarouselLogo/index.vue":()=>Promise.resolve().then(()=>UA),"/src/components/CollapseCustom/index.vue":()=>Promise.resolve().then(()=>require("./index-2XnP91cX.js")),"/src/components/ContactUsInfo/index.vue":()=>Promise.resolve().then(()=>k$),"/src/components/ContactUsList/index.vue":()=>Promise.resolve().then(()=>Z3),"/src/components/CountDown/index.vue":()=>Promise.resolve().then(()=>w3),"/src/components/CustomIframe/index.vue":()=>Promise.resolve().then(()=>P3),"/src/components/CustomSpace/index.vue":()=>Promise.resolve().then(()=>vk),"/src/components/CustomText/index.vue":()=>Promise.resolve().then(()=>sU),"/src/components/DetailLink/index.vue":()=>Promise.resolve().then(()=>Jj),"/src/components/Disc/index.vue":()=>Promise.resolve().then(()=>DI),"/src/components/DonorLinks/index.vue":()=>Promise.resolve().then(()=>jT),"/src/components/ExploreLinks/index.vue":()=>Promise.resolve().then(()=>q9),"/src/components/GalleryBlock/index.vue":()=>Promise.resolve().then(()=>_M),"/src/components/GalleryCaptionRound/index.vue":()=>Promise.resolve().then(()=>Sx),"/src/components/GalleryDefault/index.vue":()=>Promise.resolve().then(()=>ax),"/src/components/GalleryList/index.vue":()=>Promise.resolve().then(()=>_E),"/src/components/GalleryTimeline/index.vue":()=>Promise.resolve().then(()=>xV),"/src/components/GalleryTimelineCol/index.vue":()=>Promise.resolve().then(()=>aC),"/src/components/GridLinks/index.vue":()=>Promise.resolve().then(()=>require("./index-BBefhQHG.js")),"/src/components/HeroSlide/index.vue":()=>Promise.resolve().then(()=>oT),"/src/components/InformationLink/index.vue":()=>Promise.resolve().then(()=>uJ),"/src/components/LinkLIst/index.vue":()=>Promise.resolve().then(()=>gT),"/src/components/MapStatic/index.vue":()=>Promise.resolve().then(()=>cA),"/src/components/MediaImageFull/index.vue":()=>Promise.resolve().then(()=>_U),"/src/components/MediaImageStatic/index.vue":()=>Promise.resolve().then(()=>DU),"/src/components/MediaLogo/index.vue":()=>Promise.resolve().then(()=>H6),"/src/components/MediaVideo/index.vue":()=>Promise.resolve().then(()=>ZQ),"/src/components/NewsList/index.vue":()=>Promise.resolve().then(()=>CB),"/src/components/Process/index.vue":()=>Promise.resolve().then(()=>uk),"/src/components/Publications/index.vue":()=>Promise.resolve().then(()=>w5),"/src/components/QuoteText/index.vue":()=>Promise.resolve().then(()=>require("./index-N0gGt0kx.js")),"/src/components/RegisterForm/index.vue":()=>Promise.resolve().then(()=>JO),"/src/components/Resources/index.vue":()=>Promise.resolve().then(()=>IL),"/src/components/ResourcesTwo/index.vue":()=>Promise.resolve().then(()=>eI),"/src/components/RibbonBlock/index.vue":()=>Promise.resolve().then(()=>AS),"/src/components/SchoolLayout/index.vue":()=>Promise.resolve().then(()=>LR),"/src/components/ScrollKeyInfo/index.vue":()=>Promise.resolve().then(()=>A4),"/src/components/TabDefault/index.vue":()=>Promise.resolve().then(()=>$F),"/src/components/TabLogo/index.vue":()=>Promise.resolve().then(()=>require("./index-CQgB-NyR.js")),"/src/components/TabPage/index.vue":()=>Promise.resolve().then(()=>jJ),"/src/components/TabTimeLine/index.vue":()=>Promise.resolve().then(()=>mH),"/src/components/TableCollapse/index.vue":()=>Promise.resolve().then(()=>x6),"/src/components/TableTwo/index.vue":()=>Promise.resolve().then(()=>xP),"/src/components/TheHistoryCarousel/index.vue":()=>Promise.resolve().then(()=>CD),"/src/components/TimelineStory/index.vue":()=>Promise.resolve().then(()=>C8),"/src/components/VrTour/index.vue":()=>Promise.resolve().then(()=>require("./index-BSRuOxk5.js"))}),a={};for(const f in o)try{const m=f.split("/"),d=m[m.length-2];a[d]=e.defineAsyncComponent(o[f])}catch(m){console.error("组件注册失败:",f,m)}a.DynamicComponentLoader=xa;const i=f=>a[f]||"div",s=t,l=f=>{s("handleDelete",f)},r=f=>{s("handleCopy",f)},u=f=>{s("handlePaste",f)},c=f=>{s("handleClick",f)};return(f,m)=>(e.openBlock(),e.createBlock(e.resolveDynamicComponent(i(n.type)),e.mergeProps(n.propsData,{onHandleDelete:l,onHandleCopy:r,onHandlePaste:u,onHandleClick:c}),null,16))}}),aF={class:"page-content"},iF={key:0,style:{width:"100%"}},sF={class:"add-btn"},lF={key:1},rF={__name:"index",props:{data:{type:Array,default:()=>[]}},emits:["update"],setup(n,{emit:t}){const o=e.defineAsyncComponent(()=>import("vuedraggable")),a=e.ref(!1),i=n,s=t,l=e.ref(!1),r=e.ref(0),u=e.ref([...i.data]);e.watch(()=>i.data,p=>{u.value=[...p]},{deep:!0});const c=e.computed(()=>({animation:200,group:"buttons",disabled:!1,ghostClass:"ghost",handle:".drag-handle",filter:".rich-text-editor, .arco-input, .arco-select, .arco-checkbox",preventOnFilter:!1})),f=p=>p&&p.length>1,m=(p=0)=>{r.value=p,l.value=!0},d=(p,b)=>{console.log("===================updateComponentValue=================="),u.value[p]=b,s("update",[...u.value]),console.log("组件更新:",u.value)},h=()=>{a.value=!1,s("update",[...u.value])},g=p=>{l.value=!1,u.value.splice(r.value+1,0,p),s("update",[...u.value])};return(p,b)=>{const _=e.resolveComponent("icon-plus"),w=e.resolveComponent("a-button");return e.openBlock(),e.createElementBlock("div",aF,[u.value&&u.value.length>0?(e.openBlock(),e.createElementBlock("div",iF,[e.createVNode(e.unref(o),e.mergeProps({modelValue:u.value,"onUpdate:modelValue":b[0]||(b[0]=v=>u.value=v),"component-data":{tag:"div",type:"transition-group",name:a.value?null:"flip-list"}},c.value,{disabled:!f(u.value),onStart:b[1]||(b[1]=v=>a.value=!0),onEnd:h,"item-key":"id"}),{item:e.withCtx(({element:v,index:V})=>[(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["item-button draggable-item component-wrapper",{"sortable-disabled":!f(u.value)}]),key:v.id},[e.createVNode(xa,{type:v.type,"props-data":{isPreview:!1,modelValue:v,"onUpdate:modelValue":C=>d(V,C)}},null,8,["type","props-data"]),e.createElementVNode("div",sF,[e.createVNode(w,{type:"primary",onClick:C=>m(V)},{icon:e.withCtx(()=>[e.createVNode(_)]),default:e.withCtx(()=>[b[3]||(b[3]=e.createTextVNode(" Add Component ",-1))]),_:1},8,["onClick"])])],2))]),_:1},16,["modelValue","component-data","disabled"])])):(e.openBlock(),e.createElementBlock("div",lF,[e.createVNode(w,{type:"primary",class:"add-component-btn",onClick:m},{default:e.withCtx(()=>[...b[4]||(b[4]=[e.createTextVNode(" 添加组件 ",-1)])]),_:1})])),e.createVNode(oF,{visible:l.value,"onUpdate:visible":b[2]||(b[2]=v=>l.value=v),onOk:g},null,8,["visible"])])}}},ml=ne(rF,[["__scopeId","data-v-0a011a71"]]),dF={class:"setting-content"},uF={class:"setting-header flex items-center"},cF={class:"setting-header flex items-center"},mF={class:"setting-header flex items-center"},pF={class:"setting-header flex items-center"},hF={class:"setting-body"},fF={class:"setting-toolbar"},gF={class:"tools"},vF={class:"setting-item"},yF={class:"item-header"},_F={class:"btn-group"},bF={key:0,class:"drag-handle"},wF={class:"components-content"},xF=e.defineComponent({__name:"setting",props:{show:{type:Boolean,default:!1},data:{type:Object,default:()=>{}}},emits:["update:show"],setup(n,{emit:t}){const o=e.defineAsyncComponent(()=>import("vuedraggable")),a=e.ref(!1),i=e.computed(()=>({animation:200,group:"gallerys",disabled:!1,ghostClass:"ghost",handle:".drag-handle",filter:".arco-input, .arco-select, .arco-checkbox",preventOnFilter:!1})),s=m=>m&&m.length>1,l=n,r=t,u=()=>{r("update:show",!1)},c=m=>{l.data.data.push({id:R(),type:"Video",videoSrc:"",imgSrc:"",name:"",key:"",componentsDataJson:[]})},f=m=>{l.data.data=l.data.data.filter(d=>d.id!==m)};return(m,d)=>{const h=e.resolveComponent("a-switch"),g=e.resolveComponent("a-option"),p=e.resolveComponent("a-select"),b=e.resolveComponent("icon-plus"),_=e.resolveComponent("a-button"),w=e.resolveComponent("icon-drag-arrow"),v=e.resolveComponent("icon-delete"),V=e.resolveComponent("a-input"),C=e.resolveComponent("a-drawer");return e.openBlock(),e.createBlock(C,{width:"60%",visible:n.show,footer:!1,onCancel:u,unmountOnClose:""},{title:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(n.data.type)+"组件编辑 ",1)]),default:e.withCtx(()=>[e.createElementVNode("div",dF,[e.createElementVNode("div",uF,[d[10]||(d[10]=e.createElementVNode("span",{class:"header-title"},"仅显示PC端",-1)),e.createVNode(h,{modelValue:n.data.onlyShowPc,"onUpdate:modelValue":d[0]||(d[0]=S=>n.data.onlyShowPc=S)},null,8,["modelValue"])]),e.createElementVNode("div",cF,[d[15]||(d[15]=e.createElementVNode("span",{class:"header-title"},"组件宽度",-1)),e.createVNode(p,{modelValue:n.data.width,"onUpdate:modelValue":d[1]||(d[1]=S=>n.data.width=S),placeholder:"请选择","allow-clear":""},{default:e.withCtx(()=>[e.createVNode(g,{value:"default"},{default:e.withCtx(()=>[...d[11]||(d[11]=[e.createTextVNode("默认",-1)])]),_:1}),e.createVNode(g,{value:"small"},{default:e.withCtx(()=>[...d[12]||(d[12]=[e.createTextVNode("小",-1)])]),_:1}),e.createVNode(g,{value:"medium"},{default:e.withCtx(()=>[...d[13]||(d[13]=[e.createTextVNode("中",-1)])]),_:1}),e.createVNode(g,{value:"max"},{default:e.withCtx(()=>[...d[14]||(d[14]=[e.createTextVNode("大",-1)])]),_:1})]),_:1},8,["modelValue"])]),e.createElementVNode("div",mF,[d[18]||(d[18]=e.createElementVNode("span",{class:"header-title"},"组件背景",-1)),e.createVNode(p,{modelValue:n.data.bgColor,"onUpdate:modelValue":d[2]||(d[2]=S=>n.data.bgColor=S),placeholder:"请选择","allow-clear":""},{default:e.withCtx(()=>[e.createVNode(g,{value:"white"},{default:e.withCtx(()=>[...d[16]||(d[16]=[e.createTextVNode("白色",-1)])]),_:1}),e.createVNode(g,{value:"#F7F7FA"},{default:e.withCtx(()=>[...d[17]||(d[17]=[e.createTextVNode("灰色",-1)])]),_:1})]),_:1},8,["modelValue"])]),e.createElementVNode("div",pF,[d[21]||(d[21]=e.createElementVNode("span",{class:"header-title"},"居中",-1)),e.createVNode(p,{modelValue:n.data.center,"onUpdate:modelValue":d[3]||(d[3]=S=>n.data.center=S),placeholder:"请选择","allow-clear":""},{default:e.withCtx(()=>[e.createVNode(g,{value:!0},{default:e.withCtx(()=>[...d[19]||(d[19]=[e.createTextVNode("是",-1)])]),_:1}),e.createVNode(g,{value:!1},{default:e.withCtx(()=>[...d[20]||(d[20]=[e.createTextVNode("否",-1)])]),_:1})]),_:1},8,["modelValue"])]),e.createElementVNode("div",hF,[e.createElementVNode("div",fF,[d[24]||(d[24]=e.createElementVNode("h4",null,"List",-1)),e.createElementVNode("div",gF,[e.createVNode(_,{type:"primary",onClick:d[4]||(d[4]=S=>c())},{icon:e.withCtx(()=>[e.createVNode(b)]),default:e.withCtx(()=>[d[22]||(d[22]=e.createTextVNode(" 添加 Tab ",-1))]),_:1}),e.createVNode(_,{type:"primary",onClick:d[5]||(d[5]=S=>c())},{default:e.withCtx(()=>[...d[23]||(d[23]=[e.createTextVNode("粘贴 Tab",-1)])]),_:1})])]),e.createElementVNode("div",vF,[e.createVNode(e.unref(o),e.mergeProps({modelValue:n.data.data,"onUpdate:modelValue":d[7]||(d[7]=S=>n.data.data=S),"component-data":{tag:"div",type:"transition-group",name:a.value?null:"flip-list"}},i.value,{disabled:!s(n.data.data),onStart:d[8]||(d[8]=S=>a.value=!0),onEnd:d[9]||(d[9]=S=>a.value=!1),"item-key":"id"}),{item:e.withCtx(({element:S})=>[(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["item-button draggable-item",{"sortable-disabled":!s(n.data.data)}]),key:S.id},[e.createElementVNode("div",yF,[e.createElementVNode("div",null,[e.createElementVNode("h5",null,e.toDisplayString(S.name),1),e.createElementVNode("span",null,e.toDisplayString(S.key),1)]),e.createElementVNode("div",_F,[s(n.data.data)?(e.openBlock(),e.createElementBlock("div",bF,[e.createVNode(w,{class:"drag-icon"})])):e.createCommentVNode("",!0),e.createVNode(v,{class:"btn-delete",onClick:N=>f(S.id)},null,8,["onClick"]),e.createVNode(_,{size:"mini",type:"primary",onClick:d[6]||(d[6]=N=>c())},{default:e.withCtx(()=>[...d[25]||(d[25]=[e.createTextVNode("复制 Tab",-1)])]),_:1})])]),d[26]||(d[26]=e.createElementVNode("p",{class:"item-title"},"Tab名称",-1)),e.createVNode(V,{modelValue:S.name,"onUpdate:modelValue":N=>S.name=N,placeholder:"请输入标题","allow-clear":""},null,8,["modelValue","onUpdate:modelValue"]),d[27]||(d[27]=e.createElementVNode("p",{class:"item-title"},"Key",-1)),e.createVNode(V,{modelValue:S.key,"onUpdate:modelValue":N=>S.key=N,placeholder:"请输入key","allow-clear":""},null,8,["modelValue","onUpdate:modelValue"]),d[28]||(d[28]=e.createElementVNode("p",null,"components",-1)),e.createElementVNode("div",wF,[e.createVNode(ml,{data:S.componentsDataJson,onUpdate:N=>S.componentsDataJson=N},null,8,["data","onUpdate"])])],2))]),_:1},16,["modelValue","component-data","disabled"])])])])]),_:1},8,["visible"])}}}),VF=ne(xF,[["__scopeId","data-v-15d50269"]]),CF={class:"tab-default__tab"},kF={class:"tab-blue__wrapper flex-center"},EF={class:"tab-blue__nav justify-content-center"},TF=["id"],NF=["id","onClick"],SF={class:"tab-default__content"},BF={"data-aos":"fade-in","data-aos-duration":"1500",class:"aos-init aos-animate"},DF={class:"component-wrapper"},PF=e.defineComponent({name:"TabDefault",__name:"index",props:{modelValue:{type:Object,default:()=>{}},isPreview:{type:Boolean,default:!0}},emits:["update:modelValue","handleDelete","handleCopy","handlePaste"],setup(n,{emit:t}){const o=(k,A)=>{k&&(h.value[A]=k)},a=n,i=t,s=e.ref(!1),l=e.ref(0),r=e.ref(0),u=e.ref(0),c=e.ref(0),f=e.ref(R()),m=e.ref(""),d=e.ref(0),h=e.ref([]);function g(k){var B;const A=(B=h.value)==null?void 0:B.findIndex(I=>I.id===k);m.value=k,r.value=d.value,u.value=A,s.value=!0,l.value=1,setTimeout(()=>{l.value=2,d.value=A,setTimeout(()=>{s.value=!1,l.value=0},300)},300)}const p=e.ref(!1),b=e.ref(!1),_=e.computed(()=>{var A;if(!((A=a.modelValue)!=null&&A.data)||!Array.isArray(a.modelValue.data))return[];const k=a.modelValue.data[d.value];return k?k.componentsDataJson||[]:[]}),w=()=>{var A;if(a.modelValue&&a.modelValue.data){setTimeout(()=>{var B;g((B=a.modelValue)==null?void 0:B.data[0].id)},0);return}const k={id:((A=a.modelValue)==null?void 0:A.id)||R(),type:"TabDefault",onlyShowPc:!1,containerWidth:"",bgColor:"",center:!0,width:"",data:[{id:R(),key:"11111111",name:"tab1",componentsDataJson:[]},{id:R(),key:"2222",name:"tab2",componentsDataJson:[]},{id:R(),key:"33333",name:"tab3",componentsDataJson:[]}]};i("update:modelValue",k),m.value=k.data[0].id},v=e.computed(()=>{var k;return a.isPreview?!((k=a.modelValue)!=null&&k.onlyShowPc)||!Ne():!0}),V=e.computed(()=>{var k;return(k=a.modelValue)==null?void 0:k.data});w();const C=(k,A)=>{debugger;i("handleDelete",k||a.modelValue.id,A)},S=k=>{debugger;i("handleCopy",k||a.modelValue)},N=(k,A)=>{debugger;i("handlePaste",k,A)},D=e.computed(()=>{if(c.value,!h.value.length)return{};let k=0,A=0;if(s.value){if(l.value===1){const B=Math.min(r.value,u.value),I=Math.max(r.value,u.value),z=h.value[B],Y=h.value[I];if(!z||!Y)return{};const H=typeof window>"u"?{paddingLeft:"0"}:window.getComputedStyle(z),q=typeof window>"u"?{paddingRight:"0"}:window.getComputedStyle(Y);k=z.offsetLeft+parseInt(H.paddingLeft),A=Y.offsetLeft+Y.clientWidth-parseInt(q.paddingRight)-(z.offsetLeft+parseInt(H.paddingLeft))}else if(l.value===2){const B=h.value[u.value];if(!B)return{};const I=typeof window>"u"?{paddingLeft:"0",paddingRight:"0"}:window.getComputedStyle(B);k=B.offsetLeft+parseInt(I.paddingLeft),A=B.clientWidth-parseInt(I.paddingLeft)-parseInt(I.paddingRight)}}else{const B=h.value[d.value];if(!B)return{};const I=typeof window>"u"?{paddingLeft:"0",paddingRight:"0"}:window.getComputedStyle(B);k=B.offsetLeft+parseInt(I.paddingLeft),A=B.clientWidth-parseInt(I.paddingLeft)-parseInt(I.paddingRight)}return{"--strip-left":`${k}px`,"--strip-width":`${A}px`,"--tab-strip-color":"#0032a0",transition:s.value?"all 0.3s cubic-bezier(0.4, 0, 0.2, 1)":"none"}}),$=()=>{s.value||c.value++};return e.watch(V,k=>{setTimeout(()=>{if(typeof document>"u")return;h.value=[];const A=document.getElementById(f.value);if(!A)return;const B=A.querySelectorAll(".tab-blue__list__item");h.value=Array.from(B),k&&k[0]&&g(k[0].id)},0)},{deep:!0}),e.onMounted(()=>{typeof window<"u"&&window.addEventListener("resize",$),e.nextTick(()=>{d.value=d.value})}),e.onUnmounted(()=>{typeof window<"u"&&window.removeEventListener("resize",$)}),(k,A)=>{var B,I,z,Y;return v.value?(e.openBlock(),e.createElementBlock("div",{key:0,class:"tab-default__container bg-neutral-light",style:e.normalizeStyle({backgroundColor:(B=n.modelValue)==null?void 0:B.bgColor}),onMouseover:A[5]||(A[5]=H=>b.value=!0),onMouseout:A[6]||(A[6]=H=>b.value=!1)},[e.createElementVNode("div",{class:e.normalizeClass(["container-content-small",[(I=n.modelValue)!=null&&I.width?`container-content-${(z=n.modelValue)==null?void 0:z.width}`:"container-content"]])},[e.createElementVNode("div",CF,[e.createElementVNode("div",{class:"tab-blue bg-neutral-light",style:e.normalizeStyle({backgroundColor:(Y=n.modelValue)==null?void 0:Y.bgColor})},[e.createElementVNode("div",kF,[e.createElementVNode("div",EF,[A[7]||(A[7]=e.createElementVNode("div",{class:"tab-blue__nav__prev",style:{display:"none"}},null,-1)),e.createElementVNode("ul",{class:"tab-blue__list px-4",id:f.value},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(V.value,(H,q)=>(e.openBlock(),e.createElementBlock("li",{id:H.id,key:H.id,class:"tab-blue__list__item",ref_for:!0,ref:O=>o(O,q),onClick:O=>g(H.id)},[e.createElementVNode("button",{type:"button",class:e.normalizeClass(["tab-blue__btn",{"tab-blue__btn--active":m.value===H.id}])},e.toDisplayString(H.name),3)],8,NF))),128)),e.createElementVNode("span",{class:"tab-blue__strip",style:e.normalizeStyle(D.value)},null,4)],8,TF),A[8]||(A[8]=e.createElementVNode("div",{class:"tab-blue__nav__next",style:{display:"none"}},null,-1))]),A[9]||(A[9]=e.createElementVNode("div",{class:"tab-blue__filter mt-5 mt-md-3",style:{"--width":"338px"}},null,-1))])],4)]),e.createElementVNode("div",SF,[e.createElementVNode("div",BF,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(_.value,(H,q)=>(e.openBlock(),e.createElementBlock("div",{key:H.id,class:"page-item"},[e.createElementVNode("div",DF,[e.createVNode(xa,{type:H.type,"props-data":{modelValue:H,isPreview:!1},onHandleDelete:A[0]||(A[0]=O=>C(O,_.value)),onHandleCopy:A[1]||(A[1]=O=>S(O)),onHandlePaste:O=>N(O,_.value)},null,8,["type","props-data","onHandlePaste"])])]))),128))])]),n.isPreview?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(Te,{key:0,show:b.value,"onUpdate:show":A[2]||(A[2]=H=>b.value=H),onHandleEdit:A[3]||(A[3]=H=>p.value=!0),onHandleDelete:C,onHandleCopy:S,onHandlePaste:N},null,8,["show"]))],2),n.isPreview?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(VF,{key:0,show:p.value,"onUpdate:show":A[4]||(A[4]=H=>p.value=H),data:n.modelValue},null,8,["show","data"]))],36)):e.createCommentVNode("",!0)}}}),iu=ne(PF,[["__scopeId","data-v-ec8d19c4"]]),$F=Object.freeze(Object.defineProperty({__proto__:null,default:iu},Symbol.toStringTag,{value:"Module"})),AF={class:"tab__wrapper"},LF=["onClick"],IF=["id","onClick"],OF={__name:"TabTimeLineTab",props:{list:{type:Array,default:()=>null},currentIdx:{type:Number,default:()=>0},isFixed:{type:Boolean,default:()=>!1}},emits:["updateIdx"],setup(n,{emit:t}){const o=n,a=t,{proxy:i}=e.getCurrentInstance(),s=e.ref(null),l=e.ref(null),r=e.ref(null),u=e.ref(0),c=e.ref(0),f=e.ref(0),m=e.ref(0),d=e.ref(0),h=e.computed(()=>o.isFixed),g=e.computed({get:()=>o.currentIdx,set:N=>a("updateIdx",N)}),p=e.computed(()=>f.value>30),b=e.computed(()=>m.value>d.value),_=e.computed(()=>{var N;return(N=o.list)!=null&&N.length?o.list.length-1:0}),w=e.computed(()=>{var D;const N=(D=o.list)==null?void 0:D.length;return`${g.value/(N-1)*100}%`}),v=()=>{var A;const N=(A=r.value)==null?void 0:A[g.value],D=(N==null?void 0:N.clientWidth)/2,$=i.$_vsWidth/2;u.value=(N==null?void 0:N.getBoundingClientRect().right)-D;const k=l.value;k&&(k.scrollLeft-=$-u.value)},V=()=>{var N;c.value=(N=l.value)==null?void 0:N.scrollWidth},C=N=>{l.value.scrollLeft=f.value+N},S=()=>{var $,k;f.value=($=l.value)==null?void 0:$.scrollLeft;const N=(k=r.value)==null?void 0:k[r.value.length-1];m.value=N==null?void 0:N.getBoundingClientRect().right;const D=s.value;d.value=D==null?void 0:D.getBoundingClientRect().right};return e.watch(g,()=>{v()}),e.watch(h,()=>{V(),S(),e.nextTick(v),setTimeout(V,300)}),e.nextTick(()=>{v(),V(),S()}),(N,D)=>(e.openBlock(),e.createElementBlock("div",{class:"tab-timeline-tab",ref_key:"wrapper",ref:s},[e.createElementVNode("div",AF,[e.createElementVNode("div",{class:e.normalizeClass(["tab__nav",{"is-smaller":h.value}])},[e.withDirectives(e.createElementVNode("div",{class:"nav__prev",onClick:D[0]||(D[0]=$=>C(-100))},null,512),[[e.vShow,p.value]]),e.createElementVNode("ul",{class:"tab__list",ref_key:"listRef",ref:l,onScroll:S},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.list,($,k)=>(e.openBlock(),e.createElementBlock("li",{key:$.key,class:e.normalizeClass(["tab__item",{"is-active":g.value>=k}])},[e.createElementVNode("div",{class:e.normalizeClass(["tab__dot",{"is-active":g.value==k}]),onClick:A=>g.value=k},null,10,LF),e.createElementVNode("button",{type:"button",class:e.normalizeClass(["tab__btn tx-body",{"is-active":g.value==k}]),id:$.id,ref_for:!0,ref_key:"btn",ref:r,onClick:A=>g.value=k},e.toDisplayString($.name),11,IF)],2))),128)),e.createElementVNode("div",{class:e.normalizeClass(["progress",{"is-smaller":h.value}]),style:e.normalizeStyle([{"--progress-width":`${c.value}px`,"--count":_.value,"--bar-width":w.value}])},[...D[2]||(D[2]=[e.createElementVNode("div",{class:"progress-bar",role:"progressbar","aria-valuenow":"0","aria-valuemin":"0","aria-valuemax":"100"},null,-1)])],6)],544),e.withDirectives(e.createElementVNode("div",{class:"nav__next",onClick:D[1]||(D[1]=$=>C(100))},null,512),[[e.vShow,b.value]])],2)])],512))}},MF=ne(OF,[["__scopeId","data-v-4a77a08e"]]),UF=["id"],RF=["id"],FF=["data-bs-target","aria-expanded","aria-controls","onClick"],HF={class:"d-flex align-items-center"},jF={class:"py-2 text-blue-dark"},zF=["id","aria-labelledby","data-bs-parent"],qF={class:"acc-content"},WF={__name:"TabTimelineAccordion",props:{modelValue:{type:Object,default:()=>null}},emits:["update:modelValue","handleDelete","handleCopy","handlePaste"],setup(n,{emit:t}){const o=n,{proxy:a}=e.getCurrentInstance(),{$_vsWidth:i,$_vsScrollY:s,$vsScreenAddListener:l,$vsScreenDestroyListener:r}=a;console.log("$_vsWidth",a);const u=t,c=e.ref(null),f=e.ref(null),m=e.ref(null);e.ref(null);const d=e.ref(Date.now());e.ref(!1);const h=e.ref(0),g=e.ref(!1);e.computed(()=>{var k;return((k=o.modelValue)==null?void 0:k.classes)??null}),e.computed(()=>{var k;return((k=o.modelValue)==null?void 0:k.style)??null});const p=e.computed(()=>{var k;return((k=o.modelValue)==null?void 0:k.data)??[]}),b=k=>{setTimeout(N,300);const A=f.value[k];setTimeout(()=>{S(A)},400)},_=(k,A)=>{u("handleDelete",k||o.modelValue.id,A)},w=k=>{u("handleCopy",k||o.modelValue)},v=(k,A)=>{u("handlePaste",k,A)},V=(k,A)=>+window.getComputedStyle(document.body).getPropertyValue(k).split(A)[0],C=()=>{const k=V("--header-height-calc","px"),A=V("--alert-height","px");return k+A},S=k=>{const A=C(),B=qs(k).y-A;window.scroll({top:B,left:0,behavior:"smooth"})},N=()=>{c.value&&(h.value=c.value.getBoundingClientRect().height)},D=()=>{const k=c.value,A=k.getBoundingClientRect().top,B=k.getBoundingClientRect().bottom,I=C()+40;g.value=A<I&&B>I},$=()=>{const k=m.value;console.log("========== checkBtnFixed"),k.forEach((A,B)=>{const I=f.value[B],z=qs(I).y,Y=qs(I).y+I.clientHeight,H=s.value+C()+80,q={top:z,bottom:Y};H<q.top?(A.classList.add("is-btn-top"),A.classList.remove("is-btn-fixed"),A.classList.remove("is-btn-bottom")):H>q.bottom?(A.classList.add("is-btn-bottom"),A.classList.remove("is-btn-fixed"),A.classList.remove("is-btn-top")):(A.classList.add("is-btn-fixed"),A.classList.remove("is-btn-top"),A.classList.remove("is-btn-bottom"))})};return e.watch(()=>s==null?void 0:s.value,()=>{console.log("========== $_vsScrollY.value"),D(),$()}),(k,A)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["tab-timeline-accordion",{"is-in-front":g.value}])},[e.createElementVNode("div",{class:"acc__wrapper",ref_key:"wrapper",ref:c,style:e.normalizeStyle({minHeight:`${h.value}px`})},[e.createElementVNode("ul",{class:"acc__list accordion",id:`acc-parent-${d.value}`},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(p.value,(B,I)=>(e.openBlock(),e.createElementBlock("li",{class:"acc__item",key:B.key,ref_for:!0,ref_key:"item",ref:B},[e.createElementVNode("div",{class:"acc-header",id:`acc-${d.value}-${B.key}`},[e.createElementVNode("button",{class:e.normalizeClass(["acc-button",{collapsed:I!==0}]),type:"button",ref_for:!0,ref_key:"timeLine",ref:m,"data-bs-toggle":"collapse","data-bs-target":`#acc-${d.value}-collapse-${B.key}`,"aria-expanded":I==0,"aria-controls":`#acc-${d.value}-collapse-${B.key}`,onClick:z=>b(I)},[e.createElementVNode("div",HF,[e.createElementVNode("div",{class:e.normalizeClass(["acc-button__line",{"is-first":I==0,"is-last":I==p.value.length-1}])},[...A[3]||(A[3]=[e.createElementVNode("div",{class:"acc-button__dot"},null,-1)])],2),e.createElementVNode("h6",jF,e.toDisplayString(B.name),1)]),A[4]||(A[4]=e.createElementVNode("span",{class:"acc-button__icon i"},null,-1))],10,FF)],8,RF),e.createElementVNode("div",{id:`acc-${d.value}-collapse-${B.key}`,class:e.normalizeClass(["acc-body collapse",{show:I==0}]),"aria-labelledby":`acc-${d.value}-${B.key}`,"data-bs-parent":`#acc-parent-${d.value}`},[e.createElementVNode("div",qF,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(B.componentsDataJson,(z,Y)=>(e.openBlock(),e.createElementBlock("div",{key:z.id,class:"page-item"},[e.createVNode(xa,{type:z.type,"props-data":{modelValue:z,isPreview:!1},onHandleDelete:A[0]||(A[0]=H=>_(H,k.pageJsonData)),onHandleCopy:A[1]||(A[1]=H=>w(H)),onHandlePaste:A[2]||(A[2]=H=>v(H,k.pageJsonData))},null,8,["type","props-data"])]))),128))])],10,zF)]))),128))],8,UF)],4)],2))}},GF=ne(WF,[["__scopeId","data-v-80d5cd49"]]),XF={class:"setting-content"},YF={class:"setting-header flex items-center"},KF={class:"setting-header flex items-center"},QF={class:"setting-body"},JF={class:"setting-toolbar"},ZF={class:"tools"},eH={class:"setting-item"},tH={class:"item-header"},nH={class:"btn-group"},oH={key:0,class:"drag-handle"},aH={class:"components-content"},iH=e.defineComponent({__name:"setting",props:{show:{type:Boolean,default:!1},data:{type:Object,default:()=>{}}},emits:["update:show"],setup(n,{emit:t}){const o=e.defineAsyncComponent(()=>import("vuedraggable")),a=e.ref(!1),i=e.computed(()=>({animation:200,group:"gallerys",disabled:!1,ghostClass:"ghost",handle:".drag-handle",filter:".arco-input, .arco-select, .arco-checkbox",preventOnFilter:!1})),s=m=>m&&m.length>1,l=n,r=t,u=()=>{r("update:show",!1)},c=m=>{l.data.data.push({id:R(),key:R(),name:"New Tab",componentsDataJson:[]})},f=m=>{l.data.data=l.data.data.filter(d=>d.id!==m)};return(m,d)=>{const h=e.resolveComponent("a-switch"),g=e.resolveComponent("a-option"),p=e.resolveComponent("a-select"),b=e.resolveComponent("icon-plus"),_=e.resolveComponent("a-button"),w=e.resolveComponent("icon-drag-arrow"),v=e.resolveComponent("icon-delete"),V=e.resolveComponent("a-input"),C=e.resolveComponent("a-drawer");return e.openBlock(),e.createBlock(C,{width:"60%",visible:n.show,footer:!1,onCancel:u,unmountOnClose:""},{title:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(n.data.type)+"组件编辑 ",1)]),default:e.withCtx(()=>[e.createElementVNode("div",XF,[e.createElementVNode("div",YF,[d[8]||(d[8]=e.createElementVNode("span",{class:"header-title"},"仅显示PC端",-1)),e.createVNode(h,{modelValue:n.data.onlyShowPc,"onUpdate:modelValue":d[0]||(d[0]=S=>n.data.onlyShowPc=S)},null,8,["modelValue"])]),e.createElementVNode("div",KF,[d[13]||(d[13]=e.createElementVNode("span",{class:"header-title"},"组件宽度",-1)),e.createVNode(p,{modelValue:n.data.width,"onUpdate:modelValue":d[1]||(d[1]=S=>n.data.width=S),placeholder:"请选择","allow-clear":""},{default:e.withCtx(()=>[e.createVNode(g,{value:"default"},{default:e.withCtx(()=>[...d[9]||(d[9]=[e.createTextVNode("默认",-1)])]),_:1}),e.createVNode(g,{value:"small"},{default:e.withCtx(()=>[...d[10]||(d[10]=[e.createTextVNode("小",-1)])]),_:1}),e.createVNode(g,{value:"medium"},{default:e.withCtx(()=>[...d[11]||(d[11]=[e.createTextVNode("中",-1)])]),_:1}),e.createVNode(g,{value:"max"},{default:e.withCtx(()=>[...d[12]||(d[12]=[e.createTextVNode("大",-1)])]),_:1})]),_:1},8,["modelValue"])]),e.createElementVNode("div",QF,[e.createElementVNode("div",JF,[d[16]||(d[16]=e.createElementVNode("h4",null,"List",-1)),e.createElementVNode("div",ZF,[e.createVNode(_,{type:"primary",onClick:d[2]||(d[2]=S=>c())},{icon:e.withCtx(()=>[e.createVNode(b)]),default:e.withCtx(()=>[d[14]||(d[14]=e.createTextVNode(" 添加 Tab ",-1))]),_:1}),e.createVNode(_,{type:"primary",onClick:d[3]||(d[3]=S=>c())},{default:e.withCtx(()=>[...d[15]||(d[15]=[e.createTextVNode("粘贴 Tab",-1)])]),_:1})])]),e.createElementVNode("div",eH,[e.createVNode(e.unref(o),e.mergeProps({modelValue:n.data.data,"onUpdate:modelValue":d[5]||(d[5]=S=>n.data.data=S),"component-data":{tag:"div",type:"transition-group",name:a.value?null:"flip-list"}},i.value,{disabled:!s(n.data.data),onStart:d[6]||(d[6]=S=>a.value=!0),onEnd:d[7]||(d[7]=S=>a.value=!1),"item-key":"id"}),{item:e.withCtx(({element:S})=>[(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["item-button draggable-item",{"sortable-disabled":!s(n.data.data)}]),key:S.id},[e.createElementVNode("div",tH,[e.createElementVNode("div",null,[e.createElementVNode("h5",null,e.toDisplayString(S.name),1),e.createElementVNode("span",null,e.toDisplayString(S.key),1)]),e.createElementVNode("div",nH,[s(n.data.data)?(e.openBlock(),e.createElementBlock("div",oH,[e.createVNode(w,{class:"drag-icon"})])):e.createCommentVNode("",!0),e.createVNode(v,{class:"btn-delete",onClick:N=>f(S.id)},null,8,["onClick"]),e.createVNode(_,{size:"mini",type:"primary",onClick:d[4]||(d[4]=N=>c())},{default:e.withCtx(()=>[...d[17]||(d[17]=[e.createTextVNode("复制 Tab",-1)])]),_:1})])]),d[18]||(d[18]=e.createElementVNode("p",{class:"item-title"},"Tab名称",-1)),e.createVNode(V,{modelValue:S.name,"onUpdate:modelValue":N=>S.name=N,placeholder:"请输入标题","allow-clear":""},null,8,["modelValue","onUpdate:modelValue"]),d[19]||(d[19]=e.createElementVNode("p",{class:"item-title"},"Key",-1)),e.createVNode(V,{modelValue:S.key,"onUpdate:modelValue":N=>S.key=N,placeholder:"请输入key","allow-clear":""},null,8,["modelValue","onUpdate:modelValue"]),d[20]||(d[20]=e.createElementVNode("p",null,"components",-1)),e.createElementVNode("div",aH,[e.createVNode(ml,{data:S.componentsDataJson,onUpdate:N=>S.componentsDataJson=N},null,8,["data","onUpdate"])])],2))]),_:1},16,["modelValue","component-data","disabled"])])])])]),_:1},8,["visible"])}}}),sH=ne(iH,[["__scopeId","data-v-4210f06a"]]),lH={class:"tab-default__content"},rH={"data-aos":"fade-in","data-aos-duration":"1500",class:"aos-init aos-animate"},dH={class:"component-wrapper"},uH={class:"tab-timeline__mobile"},cH={__name:"index",props:{modelValue:{type:Object,default:()=>({})},isPreview:{type:Boolean,default:!0}},emits:["update:modelValue","handleDelete","handleCopy","handlePaste"],setup(n,{emit:t}){const{proxy:o}=e.getCurrentInstance(),{$_vsWidth:a,$_vsScrollY:i,$vsScreenAddListener:s,$vsScreenDestroyListener:l}=o,r=n,u=t,c=e.ref(null),f=e.ref(null),m=e.computed(()=>{var Y;return(Y=r.modelValue)==null?void 0:Y.data}),d=e.ref(0),h=e.ref(!1),g=e.ref(!1),p=e.ref(!1),b=e.computed(()=>{var Y;return((Y=r.modelValue)==null?void 0:Y.classes)??null}),_=e.computed(()=>{var Y;return((Y=r.modelValue)==null?void 0:Y.style)??null});e.computed(()=>{var Y;return(Y=r.modelValue)==null?void 0:Y.width});const w=e.computed(()=>{var Y;return(Y=r.modelValue)==null?void 0:Y.id}),v=e.computed(()=>{var Y;return(Y=r.modelValue)!=null&&Y.bgColor?r.modelValue.bgColor:a.value>=768?"bg-neutral-lightest":null}),V=e.computed(()=>{var H;if(!((H=r.modelValue)!=null&&H.data)||!Array.isArray(r.modelValue.data))return[];const Y=r.modelValue.data[d.value];return Y?Y.componentsDataJson||[]:[]}),C=()=>{var H;if(r.modelValue&&r.modelValue.data)return;const Y={id:((H=r.modelValue)==null?void 0:H.id)||R(),type:"TabTimeLine",onlyShowPc:!1,containerWidth:"",bgColor:"",classes:"custom-class another-class",style:{},width:"",data:[{id:R(),key:"11111111",name:"tab1",componentsDataJson:[]},{id:R(),key:"2222",name:"tab2",componentsDataJson:[]},{id:R(),key:"33333",name:"tab3",componentsDataJson:[]}]};u("update:modelValue",Y),d.value=0},S=e.computed(()=>{var Y;return r.isPreview?!((Y=r.modelValue)!=null&&Y.onlyShowPc)||!Ne():!0}),N=(Y,H)=>{debugger;u("handleDelete",Y||r.modelValue.id,H)},D=Y=>{debugger;u("handleCopy",Y||r.modelValue)},$=(Y,H)=>{debugger;u("handlePaste",Y,H)},k=()=>{if(!f.value||!c.value)return;const Y=f.value.getBoundingClientRect().top,H=c.value.getBoundingClientRect().top,q=c.value.getBoundingClientRect().bottom,O=+window.getComputedStyle(document.body).getPropertyValue("--header-height-calc").split("px")[0];if(H>O||q<O){h.value=!1;return}Y<=O&&(h.value=!0)},A=()=>{if(a.value<=768)return;const Y=c.value,q=qs(Y).y-150;window.scroll({top:q,left:0,behavior:"smooth"})},B=e.ref(""),I=()=>{var H;const Y=(H=m.value)==null?void 0:H.findIndex(q=>q.key==B.value);Y>-1?d.value=Y:d.value=0},z=Y=>{d.value=Y,B.value=m.value[Y].key};return e.watch(()=>i==null?void 0:i.value,()=>{console.log("==========$_vsScrollY.value"),k()}),e.watch(d,()=>{A()}),C(),e.onMounted(()=>{I()}),(Y,H)=>{var q,O;return S.value?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(["tab-timeline",b.value]),ref_key:"wrapper",ref:c,style:e.normalizeStyle(_.value),onMouseover:H[6]||(H[6]=J=>p.value=!0),onMouseout:H[7]||(H[7]=J=>p.value=!1)},[e.createElementVNode("div",{class:e.normalizeClass(["tab-timeline__wrapper",[(q=n.modelValue)!=null&&q.width?`container-content-${(O=n.modelValue)==null?void 0:O.width}`:"container-content"]])},[e.withDirectives(e.createElementVNode("div",{class:e.normalizeClass(["tab-timeline__desktop",[v.value]])},[e.createElementVNode("div",{class:e.normalizeClass(["tab-timeline__hold",{"is-fixed":h.value}])},[e.createElementVNode("div",{class:"tab-timeline__nav",ref_key:"tab",ref:f},[e.createVNode(MF,{list:m.value,isFixed:h.value,currentIdx:d.value,onUpdateIdx:z,componentKey:w.value},null,8,["list","isFixed","currentIdx","componentKey"])],512)],2),e.createElementVNode("div",lH,[e.createElementVNode("div",rH,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(V.value,(J,F)=>(e.openBlock(),e.createElementBlock("div",{key:J.id,class:"page-item"},[e.createElementVNode("div",dH,[e.createVNode(xa,{type:J.type,"props-data":{modelValue:J,isPreview:!1},onHandleDelete:H[0]||(H[0]=M=>N(M,V.value)),onHandleCopy:H[1]||(H[1]=M=>D(M)),onHandlePaste:H[2]||(H[2]=M=>$(M,V.value))},null,8,["type","props-data"])])]))),128))])])],2),[[e.vShow,e.unref(a)>=768]]),e.withDirectives(e.createElementVNode("div",uH,[e.createVNode(GF,{modelValue:n.modelValue,componentKey:w.value},null,8,["modelValue","componentKey"])],512),[[e.vShow,e.unref(a)<768]]),n.isPreview?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(Te,{key:0,show:p.value,"onUpdate:show":H[3]||(H[3]=J=>p.value=J),onHandleEdit:H[4]||(H[4]=J=>g.value=!0),onHandleDelete:N,onHandleCopy:D,onHandlePaste:$},null,8,["show"]))],2),n.isPreview?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(sH,{key:0,show:g.value,"onUpdate:show":H[5]||(H[5]=J=>g.value=J),data:n.modelValue},null,8,["show","data"]))],38)):e.createCommentVNode("",!0)}}},su=ne(cH,[["__scopeId","data-v-1db74274"]]),mH=Object.freeze(Object.defineProperty({__proto__:null,default:su},Symbol.toStringTag,{value:"Module"})),pH={class:"setting-content"},hH={class:"setting-header flex items-center"},fH={class:"setting-header flex items-center"},gH={class:"setting-header flex items-center"},vH={class:"setting-header flex items-center"},yH={class:"setting-body"},_H={class:"setting-item"},bH={class:"btn-group"},wH={key:0,class:"drag-handle"},xH=["src"],VH={class:"item-uplaod flex items-center"},CH=e.defineComponent({__name:"setting",props:{show:{type:Boolean,default:!1},data:{type:Object,default:()=>{}}},emits:["update:show"],setup(n,{emit:t}){const o=e.defineAsyncComponent(()=>import("vuedraggable")),a=e.ref(!1),i=e.computed(()=>({animation:200,group:"circles",disabled:!1,ghostClass:"ghost",handle:".drag-handle",filter:".rich-text-editor, .arco-input, .arco-select, .arco-checkbox",preventOnFilter:!1})),s=f=>f&&f.length>1,l=t,r=()=>{l("update:show",!1)},u=f=>{f.push({id:R(),title:"这里是标题",subtitle:"这里是副标题",subtitle2:"第二个副标题",text:"这里是引言",imgSrc:"https://osswebsite-test.cedim.cn/media-library/ywies-tx/pdf/TX%20Brochure%20Cover_optim.png",alt:""})},c=(f,m)=>{f.splice(f.findIndex(d=>d.id===m),1)};return(f,m)=>{const d=e.resolveComponent("a-switch"),h=e.resolveComponent("a-option"),g=e.resolveComponent("a-select"),p=e.resolveComponent("a-input"),b=e.resolveComponent("icon-drag-arrow"),_=e.resolveComponent("icon-delete"),w=e.resolveComponent("icon-plus"),v=e.resolveComponent("a-drawer");return e.openBlock(),e.createBlock(v,{width:500,visible:n.show,footer:!1,onCancel:r,unmountOnClose:""},{title:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(n.data.type)+"组件编辑 ",1)]),default:e.withCtx(()=>[e.createElementVNode("div",pH,[e.createElementVNode("div",hH,[m[8]||(m[8]=e.createElementVNode("span",{class:"header-title"},"仅显示PC端",-1)),e.createVNode(d,{modelValue:n.data.onlyShowPc,"onUpdate:modelValue":m[0]||(m[0]=V=>n.data.onlyShowPc=V)},null,8,["modelValue"])]),e.createElementVNode("div",fH,[m[13]||(m[13]=e.createElementVNode("span",{class:"header-title"},"组件宽度",-1)),e.createVNode(g,{modelValue:n.data.width,"onUpdate:modelValue":m[1]||(m[1]=V=>n.data.width=V),placeholder:"请选择","allow-clear":""},{default:e.withCtx(()=>[e.createVNode(h,{value:"default"},{default:e.withCtx(()=>[...m[9]||(m[9]=[e.createTextVNode("默认",-1)])]),_:1}),e.createVNode(h,{value:"small"},{default:e.withCtx(()=>[...m[10]||(m[10]=[e.createTextVNode("小",-1)])]),_:1}),e.createVNode(h,{value:"middle"},{default:e.withCtx(()=>[...m[11]||(m[11]=[e.createTextVNode("中",-1)])]),_:1}),e.createVNode(h,{value:"max"},{default:e.withCtx(()=>[...m[12]||(m[12]=[e.createTextVNode("大",-1)])]),_:1})]),_:1},8,["modelValue"])]),e.createElementVNode("div",gH,[m[14]||(m[14]=e.createElementVNode("span",{class:"header-title"},"pc列数",-1)),e.createVNode(p,{modelValue:n.data.colDesktop,"onUpdate:modelValue":m[2]||(m[2]=V=>n.data.colDesktop=V),placeholder:"请输入","allow-clear":""},null,8,["modelValue"])]),e.createElementVNode("div",vH,[m[15]||(m[15]=e.createElementVNode("span",{class:"header-title"},"移动端列数",-1)),e.createVNode(p,{modelValue:n.data.colMobile,"onUpdate:modelValue":m[3]||(m[3]=V=>n.data.colMobile=V),placeholder:"请输入","allow-clear":""},null,8,["modelValue"])]),e.createElementVNode("div",yH,[m[22]||(m[22]=e.createElementVNode("p",{class:"item-title"},"Circles",-1)),e.createElementVNode("div",_H,[e.createVNode(e.unref(o),e.mergeProps({modelValue:n.data.data,"onUpdate:modelValue":m[4]||(m[4]=V=>n.data.data=V),"component-data":{tag:"div",type:"transition-group",name:a.value?null:"flip-list"}},i.value,{disabled:!s(n.data.data),onStart:m[5]||(m[5]=V=>a.value=!0),onEnd:m[6]||(m[6]=V=>a.value=!1),"item-key":"id"}),{item:e.withCtx(({element:V})=>[(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["item-button draggable-item",{"sortable-disabled":!s(n.data.data)}]),key:V.id},[e.createElementVNode("div",bH,[s(n.data.data)?(e.openBlock(),e.createElementBlock("div",wH,[e.createVNode(b,{class:"drag-icon"})])):e.createCommentVNode("",!0),e.createVNode(_,{class:"btn-delete",onClick:C=>c(n.data.data,V.id)},null,8,["onClick"])]),m[16]||(m[16]=e.createElementVNode("p",{class:"item-title"},"标题",-1)),e.createVNode(p,{modelValue:V.title,"onUpdate:modelValue":C=>V.title=C,placeholder:"请输入标题","allow-clear":""},null,8,["modelValue","onUpdate:modelValue"]),m[17]||(m[17]=e.createElementVNode("p",{class:"item-title"},"子标题",-1)),e.createVNode(p,{modelValue:V.subtitle,"onUpdate:modelValue":C=>V.subtitle=C,placeholder:"请输入子标题","allow-clear":""},null,8,["modelValue","onUpdate:modelValue"]),m[18]||(m[18]=e.createElementVNode("p",{class:"item-title"},"第二个子标题",-1)),e.createVNode(p,{modelValue:V.subtitle2,"onUpdate:modelValue":C=>V.subtitle2=C,placeholder:"请输入第二个子标题","allow-clear":""},null,8,["modelValue","onUpdate:modelValue"]),m[19]||(m[19]=e.createElementVNode("p",{class:"item-title"},"引言",-1)),e.createVNode(p,{modelValue:V.text,"onUpdate:modelValue":C=>V.text=C,placeholder:"请输入引言","allow-clear":""},null,8,["modelValue","onUpdate:modelValue"]),m[20]||(m[20]=e.createElementVNode("p",{class:"item-title"},"图片",-1)),e.createElementVNode("img",{class:"item-img",src:V.imgSrc},null,8,xH),e.createElementVNode("div",VH,[e.createVNode(p,{modelValue:V.imgSrc,"onUpdate:modelValue":C=>V.imgSrc=C,placeholder:"请输入图片链接","allow-clear":""},null,8,["modelValue","onUpdate:modelValue"]),e.createVNode(ze,{modelValue:V.imgSrc,"onUpdate:modelValue":C=>V.imgSrc=C,name:`CardListCircle_${V.id}`,"button-class":"fit-content"},null,8,["modelValue","onUpdate:modelValue","name"])]),e.createVNode(p,{class:"mt-2",modelValue:V.alt,"onUpdate:modelValue":C=>V.alt=C,placeholder:"图片alt","allow-clear":""},null,8,["modelValue","onUpdate:modelValue"])],2))]),_:1},16,["modelValue","component-data","disabled"]),e.createElementVNode("div",{class:"item-add-btn flex items-center",onClick:m[7]||(m[7]=V=>u(n.data.data.linkList))},[e.createVNode(w),m[21]||(m[21]=e.createElementVNode("span",{class:"btn-text"},"添加Circle",-1))])])])])]),_:1},8,["visible"])}}}),kH=ne(CH,[["__scopeId","data-v-28bb506f"]]),EH=["id"],TH=["data-aos-delay","data-aos-anchor"],NH={class:"card-circle"},SH={class:"circle__head"},BH={class:"circle__img img-fit"},DH=["src","alt"],PH={key:0,class:"circle__title mt-3"},$H={key:1,class:"circle__subtitle"},AH={key:2,class:"circle__subtitle"},LH={key:3,class:"circle__text mt-3"},IH=e.defineComponent({name:"CardListCircle",__name:"index",props:{modelValue:{type:Object,default:()=>{}},isPreview:{type:Boolean,default:!0}},emits:["update:modelValue","handleDelete","handleCopy","handlePaste"],setup(n,{emit:t}){const o=n,a=t,i=()=>{var d;if(o.modelValue&&o.modelValue.data)return;const m={id:((d=o.modelValue)==null?void 0:d.id)||R(),type:"CardListCircle",onlyShowPc:!1,width:"",colMobile:1,colDesktop:2,data:[{id:R(),title:"这里是标题",subtitle:"这里是副标题",subtitle2:"第二个副标题",text:"这里是引言",imgSrc:"https://osswebsite-test.cedim.cn/media-library/ywies-tx/pdf/TX%20Brochure%20Cover_optim.png",alt:""},{id:R(),title:"这里是标题",subTitle:"这里是副标题",subTitle2:"第二个副标题",text:"这里是引言",imgSrc:"https://osswebsite-test.cedim.cn/media-library/ywies-tx/pdf/TX%20Brochure%20Cover_optim.png",alt:""}]};a("update:modelValue",m)},s=e.computed(()=>{var m;return o.isPreview?!((m=o.modelValue)!=null&&m.onlyShowPc)||!Ne():!0}),l=e.ref(!1),r=e.ref(!1),u=()=>{a("handleDelete",o.modelValue.id)},c=()=>{a("handleCopy",o.modelValue)},f=m=>{a("handlePaste",m)};return i(),(m,d)=>{var h,g,p,b,_,w;return e.openBlock(),e.createElementBlock(e.Fragment,null,[s.value?(e.openBlock(),e.createElementBlock("div",{key:0,class:"card-list",onMouseenter:d[2]||(d[2]=v=>l.value=!0),onMouseleave:d[3]||(d[3]=v=>l.value=!1)},[e.createElementVNode("div",{class:e.normalizeClass(["card-list__wrapper",[(h=n.modelValue)!=null&&h.width?`container-content-${(g=n.modelValue)==null?void 0:g.width}`:"container-content"]])},[e.createElementVNode("div",{class:e.normalizeClass(["row cars-list-circle",[`row-cols-${(p=n.modelValue)==null?void 0:p.colMobile}`,`row-cols-md-${(b=n.modelValue)==null?void 0:b.colDesktop}`,{"small-gap":((_=n.modelValue)==null?void 0:_.colDesktop)>4}]]),id:`card-list-${m.timestamp}`},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList((w=n.modelValue)==null?void 0:w.data,(v,V)=>{var C;return e.openBlock(),e.createElementBlock("div",{class:"col",key:v.id,"data-aos":"fade-up","data-aos-delay":V*100,"data-aos-anchor":`#card-list-${m.timestamp}`},[e.createElementVNode("div",NH,[e.createElementVNode("div",SH,[e.createElementVNode("div",BH,[e.createElementVNode("img",{src:v.imgSrc,alt:v.alt},null,8,DH)])]),e.createElementVNode("div",{class:e.normalizeClass(["circle__body",{"is-single-column":((C=n.modelValue)==null?void 0:C.colMobile)===1}])},[v.title?(e.openBlock(),e.createElementBlock("h4",PH,e.toDisplayString(v.title),1)):e.createCommentVNode("",!0),v.subtitle?(e.openBlock(),e.createElementBlock("div",$H,e.toDisplayString(v.subtitle),1)):e.createCommentVNode("",!0),v.subtitle2?(e.openBlock(),e.createElementBlock("div",AH,e.toDisplayString(v.subtitle2),1)):e.createCommentVNode("",!0),v.text?(e.openBlock(),e.createElementBlock("div",LH,e.toDisplayString(v.text),1)):e.createCommentVNode("",!0)],2)])],8,TH)}),128))],10,EH)],2),n.isPreview?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(Te,{key:0,show:l.value,"onUpdate:show":d[0]||(d[0]=v=>l.value=v),onHandleEdit:d[1]||(d[1]=v=>r.value=!0),onHandleDelete:u,onHandleCopy:c,onHandlePaste:f},null,8,["show"]))],32)):e.createCommentVNode("",!0),n.isPreview?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(kH,{key:1,show:r.value,"onUpdate:show":d[4]||(d[4]=v=>r.value=v),data:n.modelValue},null,8,["show","data"]))],64)}}}),lu=ne(IH,[["__scopeId","data-v-78d7177c"]]),OH=Object.freeze(Object.defineProperty({__proto__:null,default:lu},Symbol.toStringTag,{value:"Module"})),MH={class:"setting-content"},UH={class:"setting-header flex items-center"},RH={class:"setting-header flex items-center"},FH={class:"setting-header flex items-center"},HH={class:"setting-header flex items-center"},jH={class:"setting-body"},zH={class:"setting-item"},qH={class:"btn-group"},WH={key:0,class:"drag-handle"},GH=["src"],XH={class:"item-uplaod flex items-center"},YH={class:"btn-group"},KH={key:0,class:"drag-handle"},QH={class:"item-action flex items-center"},JH=["onClick"],ZH=e.defineComponent({__name:"setting",props:{show:{type:Boolean,default:!1},data:{type:Object,default:()=>{}}},emits:["update:show"],setup(n,{emit:t}){const o=e.defineAsyncComponent(()=>import("vuedraggable")),a=e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./index-QFpkZqlg.js"))),i=e.ref(!1),s=e.computed(()=>({animation:200,group:"programmes",disabled:!1,ghostClass:"ghost",handle:".drag-handle",filter:".rich-text-editor, .arco-input, .arco-select, .arco-checkbox",preventOnFilter:!1})),l=e.computed(()=>({animation:200,group:"buttons",disabled:!1,ghostClass:"ghost",handle:".drag-handle",filter:".rich-text-editor, .arco-input, .arco-select, .arco-checkbox",preventOnFilter:!1})),r=g=>g&&g.length>1,u=t,c=()=>{u("update:show",!1)},f=g=>{g.push({id:R(),title:"这里是标题",subtitle:"这里是副标题",description:"<p>这里是内容</p>",imgSrc:"https://osswebsite-test.cedim.cn/media-library/ywies-tx/pdf/TX%20Brochure%20Cover_optim.png",alt:"",buttons:[]})},m=(g,p)=>{g.splice(g.findIndex(b=>b.id===p),1)},d=g=>{g.push({id:R(),type:"",text:"按钮",url:"",isExternal:!1})},h=(g,p)=>{g.splice(g.findIndex(b=>b.id===p),1)};return(g,p)=>{const b=e.resolveComponent("a-switch"),_=e.resolveComponent("a-option"),w=e.resolveComponent("a-select"),v=e.resolveComponent("a-input"),V=e.resolveComponent("icon-drag-arrow"),C=e.resolveComponent("icon-delete"),S=e.resolveComponent("a-button"),N=e.resolveComponent("a-checkbox"),D=e.resolveComponent("icon-plus"),$=e.resolveComponent("a-drawer");return e.openBlock(),e.createBlock($,{width:500,visible:n.show,footer:!1,onCancel:c,unmountOnClose:""},{title:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(n.data.type)+"组件编辑 ",1)]),default:e.withCtx(()=>[e.createElementVNode("div",MH,[e.createElementVNode("div",UH,[p[10]||(p[10]=e.createElementVNode("span",{class:"header-title"},"仅显示PC端",-1)),e.createVNode(b,{modelValue:n.data.onlyShowPc,"onUpdate:modelValue":p[0]||(p[0]=k=>n.data.onlyShowPc=k)},null,8,["modelValue"])]),e.createElementVNode("div",RH,[p[15]||(p[15]=e.createElementVNode("span",{class:"header-title"},"组件宽度",-1)),e.createVNode(w,{modelValue:n.data.width,"onUpdate:modelValue":p[1]||(p[1]=k=>n.data.width=k),placeholder:"请选择","allow-clear":""},{default:e.withCtx(()=>[e.createVNode(_,{value:"default"},{default:e.withCtx(()=>[...p[11]||(p[11]=[e.createTextVNode("默认",-1)])]),_:1}),e.createVNode(_,{value:"small"},{default:e.withCtx(()=>[...p[12]||(p[12]=[e.createTextVNode("小",-1)])]),_:1}),e.createVNode(_,{value:"middle"},{default:e.withCtx(()=>[...p[13]||(p[13]=[e.createTextVNode("中",-1)])]),_:1}),e.createVNode(_,{value:"max"},{default:e.withCtx(()=>[...p[14]||(p[14]=[e.createTextVNode("大",-1)])]),_:1})]),_:1},8,["modelValue"])]),e.createElementVNode("div",FH,[p[16]||(p[16]=e.createElementVNode("span",{class:"header-title"},"pc列数",-1)),e.createVNode(v,{modelValue:n.data.colDesktop,"onUpdate:modelValue":p[2]||(p[2]=k=>n.data.colDesktop=k),placeholder:"请输入","allow-clear":""},null,8,["modelValue"])]),e.createElementVNode("div",HH,[p[17]||(p[17]=e.createElementVNode("span",{class:"header-title"},"移动端列数",-1)),e.createVNode(v,{modelValue:n.data.colMobile,"onUpdate:modelValue":p[3]||(p[3]=k=>n.data.colMobile=k),placeholder:"请输入","allow-clear":""},null,8,["modelValue"])]),e.createElementVNode("div",jH,[p[30]||(p[30]=e.createElementVNode("p",{class:"item-title"},"Programme",-1)),e.createElementVNode("div",zH,[e.createVNode(e.unref(o),e.mergeProps({modelValue:n.data.data,"onUpdate:modelValue":p[6]||(p[6]=k=>n.data.data=k),"component-data":{tag:"div",type:"transition-group",name:i.value?null:"flip-list"}},s.value,{disabled:!r(n.data.data),onStart:p[7]||(p[7]=k=>i.value=!0),onEnd:p[8]||(p[8]=k=>i.value=!1),"item-key":"id"}),{item:e.withCtx(({element:k})=>[(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["item-button draggable-item",{"sortable-disabled":!r(n.data.data)}]),key:k.id},[e.createElementVNode("div",qH,[r(n.data.data)?(e.openBlock(),e.createElementBlock("div",WH,[e.createVNode(V,{class:"drag-icon"})])):e.createCommentVNode("",!0),e.createVNode(C,{class:"btn-delete",onClick:A=>m(n.data.data,k.id)},null,8,["onClick"])]),p[24]||(p[24]=e.createElementVNode("p",{class:"item-title"},"标题",-1)),e.createVNode(v,{modelValue:k.title,"onUpdate:modelValue":A=>k.title=A,placeholder:"请输入标题","allow-clear":""},null,8,["modelValue","onUpdate:modelValue"]),p[25]||(p[25]=e.createElementVNode("p",{class:"item-title"},"子标题",-1)),e.createVNode(v,{modelValue:k.subtitle,"onUpdate:modelValue":A=>k.subtitle=A,placeholder:"请输入子标题","allow-clear":""},null,8,["modelValue","onUpdate:modelValue"]),p[26]||(p[26]=e.createElementVNode("p",{class:"item-title"},"内容",-1)),e.createVNode(e.unref(a),{modelValue:k.description,"onUpdate:modelValue":A=>k.description=A,name:`CardListProgramme_editor_${k.id}`},null,8,["modelValue","onUpdate:modelValue","name"]),p[27]||(p[27]=e.createElementVNode("p",{class:"item-title"},"图片",-1)),e.createElementVNode("img",{class:"item-img",src:k.imgSrc},null,8,GH),e.createElementVNode("div",XH,[e.createVNode(v,{modelValue:k.imgSrc,"onUpdate:modelValue":A=>k.imgSrc=A,placeholder:"请输入图片链接","allow-clear":""},null,8,["modelValue","onUpdate:modelValue"]),e.createVNode(ze,{modelValue:k.imgSrc,"onUpdate:modelValue":A=>k.imgSrc=A,name:`CardListProgramme_${k.id}`,"button-class":"fit-content"},null,8,["modelValue","onUpdate:modelValue","name"])]),e.createVNode(v,{class:"mt-2",modelValue:k.alt,"onUpdate:modelValue":A=>k.alt=A,placeholder:"图片alt","allow-clear":""},null,8,["modelValue","onUpdate:modelValue"]),p[28]||(p[28]=e.createElementVNode("p",{class:"item-name"},"按钮",-1)),e.createVNode(e.unref(o),e.mergeProps({modelValue:k.buttons,"onUpdate:modelValue":A=>k.buttons=A,"component-data":{tag:"div",type:"transition-group",name:i.value?null:"flip-list"}},l.value,{disabled:!r(k.buttons),onStart:p[4]||(p[4]=A=>i.value=!0),onEnd:p[5]||(p[5]=A=>i.value=!1),"item-key":"id"}),{item:e.withCtx(({element:A})=>[(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["item-button draggable-item school-button",{"sortable-disabled":!r(k.buttons)}]),key:A.id},[e.createElementVNode("div",YH,[r(k.buttons)?(e.openBlock(),e.createElementBlock("div",KH,[e.createVNode(V,{class:"drag-icon"})])):e.createCommentVNode("",!0),e.createVNode(C,{class:"btn-delete",onClick:B=>h(k.buttons,A.id)},null,8,["onClick"])]),e.createVNode(S,{type:"primary"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(A.text),1)]),_:2},1024),e.createElementVNode("div",QH,[e.createVNode(v,{class:"action-text",modelValue:A.text,"onUpdate:modelValue":B=>A.text=B,placeholder:"按钮文本","allow-clear":""},null,8,["modelValue","onUpdate:modelValue"]),e.createVNode(v,{modelValue:A.url,"onUpdate:modelValue":B=>A.url=B,placeholder:"按钮链接","allow-clear":""},null,8,["modelValue","onUpdate:modelValue"])]),e.createVNode(w,{modelValue:A.type,"onUpdate:modelValue":B=>A.type=B,placeholder:"请选择按钮类型"},{default:e.withCtx(()=>[e.createVNode(_,{value:""},{default:e.withCtx(()=>[...p[18]||(p[18]=[e.createTextVNode("默认按钮",-1)])]),_:1}),e.createVNode(_,{value:"white"},{default:e.withCtx(()=>[...p[19]||(p[19]=[e.createTextVNode("白色按钮",-1)])]),_:1}),e.createVNode(_,{value:"light"},{default:e.withCtx(()=>[...p[20]||(p[20]=[e.createTextVNode("亮色按钮",-1)])]),_:1}),e.createVNode(_,{value:"blue"},{default:e.withCtx(()=>[...p[21]||(p[21]=[e.createTextVNode("蓝色按钮",-1)])]),_:1})]),_:1},8,["modelValue","onUpdate:modelValue"]),e.createVNode(N,{modelValue:A.isExternal,"onUpdate:modelValue":B=>A.isExternal=B},{default:e.withCtx(()=>[...p[22]||(p[22]=[e.createTextVNode("是否外部链接",-1)])]),_:1},8,["modelValue","onUpdate:modelValue"])],2))]),_:2},1040,["modelValue","onUpdate:modelValue","component-data","disabled"]),e.createElementVNode("div",{class:"item-add-btn flex items-center",onClick:A=>d(k.buttons)},[e.createVNode(D),p[23]||(p[23]=e.createElementVNode("span",{class:"btn-text"},"添加按钮",-1))],8,JH)],2))]),_:1},16,["modelValue","component-data","disabled"]),e.createElementVNode("div",{class:"item-add-btn flex items-center",onClick:p[9]||(p[9]=k=>f(n.data.data))},[e.createVNode(D),p[29]||(p[29]=e.createElementVNode("span",{class:"btn-text"},"添加Programme",-1))])])])])]),_:1},8,["visible"])}}}),ej=ne(ZH,[["__scopeId","data-v-ac7c5897"]]),tj=["id"],nj=["data-aos-delay","data-aos-anchor"],oj={class:"card-programme"},aj={class:"card-image"},ij=["src","alt"],sj={class:"card-body"},lj=["innerHTML"],rj={class:"card-programme__buttons"},dj=["onClick"],uj={class:"btn-primary__text"},cj=e.defineComponent({name:"CardListProgramme",__name:"index",props:{modelValue:{type:Object,default:()=>{}},isPreview:{type:Boolean,default:!0}},emits:["update:modelValue","handleDelete","handleCopy","handlePaste","handleClick"],setup(n,{emit:t}){const o=n,a=t,i=()=>{var g;if(o.modelValue&&o.modelValue.data)return;const h={id:((g=o.modelValue)==null?void 0:g.id)||R(),type:"CardListProgramme",onlyShowPc:!1,width:"",colMobile:1,colDesktop:2,data:[{id:R(),title:"这里是标题",subtitle:"这里是副标题",description:"<p>这里是内容</p>",imgSrc:"https://osswebsite-test.cedim.cn/media-library/ywies-tx/pdf/TX%20Brochure%20Cover_optim.png",alt:"",buttons:[{id:R(),type:"",text:"按钮名称",url:"",isExternal:!1},{id:R(),type:"",text:"按钮名称",url:"",isExternal:!1}]},{id:R(),title:"这里是标题",subtitle:"这里是副标题",description:"<p>这里是内容</p>",imgSrc:"https://osswebsite-test.cedim.cn/media-library/ywies-tx/pdf/TX%20Brochure%20Cover_optim.png",alt:"",buttons:[]}]};a("update:modelValue",h)},s=e.computed(()=>{var h;return o.isPreview?!((h=o.modelValue)!=null&&h.onlyShowPc)||!Ne():!0}),l=e.ref(!1),r=e.ref(!1),u=()=>{a("handleDelete",o.modelValue.id)},c=()=>{a("handleCopy",o.modelValue)},f=h=>{a("handlePaste",h)},m=h=>{!h||!o.isPreview||(h.startsWith("http")?typeof window<"u"&&window.open(h,"_blank"):a("handleClick",h))};i();const d=e.ref(Date.now());return(h,g)=>{var p,b,_,w,v,V;return e.openBlock(),e.createElementBlock(e.Fragment,null,[s.value?(e.openBlock(),e.createElementBlock("div",{key:0,class:"card-list",onMouseenter:g[2]||(g[2]=C=>l.value=!0),onMouseleave:g[3]||(g[3]=C=>l.value=!1)},[e.createElementVNode("div",{class:e.normalizeClass(["card-list__wrapper",[(p=n.modelValue)!=null&&p.width?`container-content-${(b=n.modelValue)==null?void 0:b.width}`:"container-content"]])},[e.createElementVNode("div",{class:e.normalizeClass(["row cars-list-programme",[`row-cols-${(_=n.modelValue)==null?void 0:_.colMobile}`,`row-cols-md-${(w=n.modelValue)==null?void 0:w.colDesktop}`,{"small-gap":((v=n.modelValue)==null?void 0:v.colDesktop)>4}]]),id:`card-list-${d.value}`},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList((V=n.modelValue)==null?void 0:V.data,(C,S)=>(e.openBlock(),e.createElementBlock("div",{class:"col",key:C.id,"data-aos":"fade-up","data-aos-delay":S*100,"data-aos-anchor":`#card-list-${d.value}`},[e.createElementVNode("div",oj,[e.createElementVNode("div",aj,[e.createElementVNode("img",{src:C.imgSrc,alt:C.alt},null,8,ij)]),e.createElementVNode("div",sj,[e.withDirectives(e.createElementVNode("div",{class:"card-body__title"},e.toDisplayString(C.title),513),[[e.vShow,C.title]]),e.withDirectives(e.createElementVNode("div",{class:"card-body__subtitle"},e.toDisplayString(C.subtitle),513),[[e.vShow,C.subtitle]]),e.withDirectives(e.createElementVNode("div",{class:"card-body__description",innerHTML:C.description},null,8,lj),[[e.vShow,C.description]]),e.withDirectives(e.createElementVNode("div",rj,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(C.buttons,N=>(e.openBlock(),e.createElementBlock("button",{key:N.id,onClick:D=>m(N.url||""),class:e.normalizeClass(["card-programme__buttons size-normal btn-primary",[N.type?`btn-primary--${N.type}`:""]])},[e.createElementVNode("div",uj,e.toDisplayString(N.text),1),g[5]||(g[5]=e.createElementVNode("span",{class:"btn-primary__icon"},null,-1))],10,dj))),128))],512),[[e.vShow,C.buttons&&C.buttons.length>0]])]),g[6]||(g[6]=e.createElementVNode("div",{class:"card-hover-border card-hover-border--y"},null,-1)),g[7]||(g[7]=e.createElementVNode("div",{class:"card-hover-border card-hover-border--x"},null,-1))])],8,nj))),128))],10,tj)],2),n.isPreview?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(Te,{key:0,show:l.value,"onUpdate:show":g[0]||(g[0]=C=>l.value=C),onHandleEdit:g[1]||(g[1]=C=>r.value=!0),onHandleDelete:u,onHandleCopy:c,onHandlePaste:f},null,8,["show"]))],32)):e.createCommentVNode("",!0),n.isPreview?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(ej,{key:1,show:r.value,"onUpdate:show":g[4]||(g[4]=C=>r.value=C),data:n.modelValue},null,8,["show","data"]))],64)}}}),ru=ne(cj,[["__scopeId","data-v-2a9f09d9"]]),mj=Object.freeze(Object.defineProperty({__proto__:null,default:ru},Symbol.toStringTag,{value:"Module"})),pj={class:"setting-content"},hj={class:"setting-header flex items-center"},fj={class:"setting-header flex items-center"},gj={class:"setting-header flex items-center"},vj={class:"setting-header flex items-center"},yj={class:"setting-body"},_j={class:"setting-item"},bj={class:"btn-group"},wj={key:0,class:"drag-handle"},xj=["src"],Vj={class:"item-uplaod flex items-center"},Cj={class:"btn-group"},kj={key:0,class:"drag-handle"},Ej={class:"item-action flex items-center"},Tj=["onClick"],Nj=e.defineComponent({__name:"setting",props:{show:{type:Boolean,default:!1},data:{type:Object,default:()=>{}}},emits:["update:show"],setup(n,{emit:t}){const o=e.defineAsyncComponent(()=>import("vuedraggable")),a=e.ref(!1),i=e.computed(()=>({animation:200,group:"schools",disabled:!1,ghostClass:"ghost",handle:".drag-handle",filter:".rich-text-editor, .arco-input, .arco-select, .arco-checkbox",preventOnFilter:!1})),s=e.computed(()=>({animation:200,group:"buttons",disabled:!1,ghostClass:"ghost",handle:".drag-handle",filter:".rich-text-editor, .arco-input, .arco-select, .arco-checkbox",preventOnFilter:!1})),l=h=>h&&h.length>1,r=t,u=()=>{r("update:show",!1)},c=h=>{h.push({id:R(),title:"这里是标题",text:"这里是内容",imgSrc:"https://osswebsite-test.cedim.cn/media-library/ywies-tx/pdf/TX%20Brochure%20Cover_optim.png",alt:"",buttons:[]})},f=(h,g)=>{h.splice(h.findIndex(p=>p.id===g),1)},m=h=>{h.push({id:R(),type:"",text:"按钮",url:"",isExternal:!1})},d=(h,g)=>{h.splice(h.findIndex(p=>p.id===g),1)};return(h,g)=>{const p=e.resolveComponent("a-switch"),b=e.resolveComponent("a-option"),_=e.resolveComponent("a-select"),w=e.resolveComponent("a-input"),v=e.resolveComponent("icon-drag-arrow"),V=e.resolveComponent("icon-delete"),C=e.resolveComponent("a-button"),S=e.resolveComponent("a-checkbox"),N=e.resolveComponent("icon-plus"),D=e.resolveComponent("a-drawer");return e.openBlock(),e.createBlock(D,{width:500,visible:n.show,footer:!1,onCancel:u,unmountOnClose:""},{title:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(n.data.type)+"组件编辑 ",1)]),default:e.withCtx(()=>[e.createElementVNode("div",pj,[e.createElementVNode("div",hj,[g[10]||(g[10]=e.createElementVNode("span",{class:"header-title"},"仅显示PC端",-1)),e.createVNode(p,{modelValue:n.data.onlyShowPc,"onUpdate:modelValue":g[0]||(g[0]=$=>n.data.onlyShowPc=$)},null,8,["modelValue"])]),e.createElementVNode("div",fj,[g[15]||(g[15]=e.createElementVNode("span",{class:"header-title"},"组件宽度",-1)),e.createVNode(_,{modelValue:n.data.width,"onUpdate:modelValue":g[1]||(g[1]=$=>n.data.width=$),placeholder:"请选择","allow-clear":""},{default:e.withCtx(()=>[e.createVNode(b,{value:"default"},{default:e.withCtx(()=>[...g[11]||(g[11]=[e.createTextVNode("默认",-1)])]),_:1}),e.createVNode(b,{value:"small"},{default:e.withCtx(()=>[...g[12]||(g[12]=[e.createTextVNode("小",-1)])]),_:1}),e.createVNode(b,{value:"middle"},{default:e.withCtx(()=>[...g[13]||(g[13]=[e.createTextVNode("中",-1)])]),_:1}),e.createVNode(b,{value:"max"},{default:e.withCtx(()=>[...g[14]||(g[14]=[e.createTextVNode("大",-1)])]),_:1})]),_:1},8,["modelValue"])]),e.createElementVNode("div",gj,[g[16]||(g[16]=e.createElementVNode("span",{class:"header-title"},"pc列数",-1)),e.createVNode(w,{modelValue:n.data.colDesktop,"onUpdate:modelValue":g[2]||(g[2]=$=>n.data.colDesktop=$),placeholder:"请输入","allow-clear":""},null,8,["modelValue"])]),e.createElementVNode("div",vj,[g[17]||(g[17]=e.createElementVNode("span",{class:"header-title"},"移动端列数",-1)),e.createVNode(w,{modelValue:n.data.colMobile,"onUpdate:modelValue":g[3]||(g[3]=$=>n.data.colMobile=$),placeholder:"请输入","allow-clear":""},null,8,["modelValue"])]),e.createElementVNode("div",yj,[g[29]||(g[29]=e.createElementVNode("p",{class:"item-title"},"Programme",-1)),e.createElementVNode("div",_j,[e.createVNode(e.unref(o),e.mergeProps({modelValue:n.data.data,"onUpdate:modelValue":g[6]||(g[6]=$=>n.data.data=$),"component-data":{tag:"div",type:"transition-group",name:a.value?null:"flip-list"}},i.value,{disabled:!l(n.data.data),onStart:g[7]||(g[7]=$=>a.value=!0),onEnd:g[8]||(g[8]=$=>a.value=!1),"item-key":"id"}),{item:e.withCtx(({element:$})=>[(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["item-button draggable-item",{"sortable-disabled":!l(n.data.data)}]),key:$.id},[e.createElementVNode("div",bj,[l(n.data.data)?(e.openBlock(),e.createElementBlock("div",wj,[e.createVNode(v,{class:"drag-icon"})])):e.createCommentVNode("",!0),e.createVNode(V,{class:"btn-delete",onClick:k=>f(n.data.data,$.id)},null,8,["onClick"])]),g[24]||(g[24]=e.createElementVNode("p",{class:"item-title"},"标题",-1)),e.createVNode(w,{modelValue:$.title,"onUpdate:modelValue":k=>$.title=k,placeholder:"请输入标题","allow-clear":""},null,8,["modelValue","onUpdate:modelValue"]),g[25]||(g[25]=e.createElementVNode("p",{class:"item-title"},"内容",-1)),e.createVNode(w,{modelValue:$.text,"onUpdate:modelValue":k=>$.text=k,placeholder:"请输入内容","allow-clear":""},null,8,["modelValue","onUpdate:modelValue"]),g[26]||(g[26]=e.createElementVNode("p",{class:"item-title"},"图片",-1)),e.createElementVNode("img",{class:"item-img",src:$.imgSrc},null,8,xj),e.createElementVNode("div",Vj,[e.createVNode(w,{modelValue:$.imgSrc,"onUpdate:modelValue":k=>$.imgSrc=k,placeholder:"请输入图片链接","allow-clear":""},null,8,["modelValue","onUpdate:modelValue"]),e.createVNode(ze,{modelValue:$.imgSrc,"onUpdate:modelValue":k=>$.imgSrc=k,name:`CardListProgramme_${$.id}`,"button-class":"fit-content"},null,8,["modelValue","onUpdate:modelValue","name"])]),e.createVNode(w,{class:"mt-2",modelValue:$.alt,"onUpdate:modelValue":k=>$.alt=k,placeholder:"图片alt","allow-clear":""},null,8,["modelValue","onUpdate:modelValue"]),g[27]||(g[27]=e.createElementVNode("p",{class:"item-name"},"按钮",-1)),e.createVNode(e.unref(o),e.mergeProps({modelValue:$.buttons,"onUpdate:modelValue":k=>$.buttons=k,"component-data":{tag:"div",type:"transition-group",name:a.value?null:"flip-list"}},s.value,{disabled:!l($.buttons),onStart:g[4]||(g[4]=k=>a.value=!0),onEnd:g[5]||(g[5]=k=>a.value=!1),"item-key":"id"}),{item:e.withCtx(({element:k})=>[(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["item-button draggable-item school-button",{"sortable-disabled":!l($.buttons)}]),key:k.id},[e.createElementVNode("div",Cj,[l($.buttons)?(e.openBlock(),e.createElementBlock("div",kj,[e.createVNode(v,{class:"drag-icon"})])):e.createCommentVNode("",!0),e.createVNode(V,{class:"btn-delete",onClick:A=>d($.buttons,k.id)},null,8,["onClick"])]),e.createVNode(C,{type:"primary"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(k.text),1)]),_:2},1024),e.createElementVNode("div",Ej,[e.createVNode(w,{class:"action-text",modelValue:k.text,"onUpdate:modelValue":A=>k.text=A,placeholder:"按钮文本","allow-clear":""},null,8,["modelValue","onUpdate:modelValue"]),e.createVNode(w,{modelValue:k.url,"onUpdate:modelValue":A=>k.url=A,placeholder:"按钮链接","allow-clear":""},null,8,["modelValue","onUpdate:modelValue"])]),e.createVNode(_,{modelValue:k.type,"onUpdate:modelValue":A=>k.type=A,placeholder:"请选择按钮类型"},{default:e.withCtx(()=>[e.createVNode(b,{value:""},{default:e.withCtx(()=>[...g[18]||(g[18]=[e.createTextVNode("默认按钮",-1)])]),_:1}),e.createVNode(b,{value:"white"},{default:e.withCtx(()=>[...g[19]||(g[19]=[e.createTextVNode("白色按钮",-1)])]),_:1}),e.createVNode(b,{value:"light"},{default:e.withCtx(()=>[...g[20]||(g[20]=[e.createTextVNode("亮色按钮",-1)])]),_:1}),e.createVNode(b,{value:"blue"},{default:e.withCtx(()=>[...g[21]||(g[21]=[e.createTextVNode("蓝色按钮",-1)])]),_:1})]),_:1},8,["modelValue","onUpdate:modelValue"]),e.createVNode(S,{modelValue:k.isExternal,"onUpdate:modelValue":A=>k.isExternal=A},{default:e.withCtx(()=>[...g[22]||(g[22]=[e.createTextVNode("是否外部链接",-1)])]),_:1},8,["modelValue","onUpdate:modelValue"])],2))]),_:2},1040,["modelValue","onUpdate:modelValue","component-data","disabled"]),e.createElementVNode("div",{class:"item-add-btn flex items-center",onClick:k=>m($.buttons)},[e.createVNode(N),g[23]||(g[23]=e.createElementVNode("span",{class:"btn-text"},"添加按钮",-1))],8,Tj)],2))]),_:1},16,["modelValue","component-data","disabled"]),e.createElementVNode("div",{class:"item-add-btn flex items-center",onClick:g[9]||(g[9]=$=>c(n.data.data))},[e.createVNode(N),g[28]||(g[28]=e.createElementVNode("span",{class:"btn-text"},"添加School",-1))])])])])]),_:1},8,["visible"])}}}),Sj=ne(Nj,[["__scopeId","data-v-830e60df"]]),Bj=["id"],Dj=["data-aos-delay","data-aos-anchor"],Pj={class:"card-school"},$j={class:"school__head"},Aj={class:"school__img img-fit"},Lj=["src","alt"],Ij={class:"school__body"},Oj={key:0,class:"school__title"},Mj=["innerHTML"],Uj={key:2,class:"contact__link mt-3"},Rj=["onClick"],Fj={class:"btn-primary__text"},Hj=e.defineComponent({name:"CardListSchool",__name:"index",props:{modelValue:{type:Object,default:()=>{}},isPreview:{type:Boolean,default:!0}},emits:["update:modelValue","handleDelete","handleCopy","handlePaste","handleClick"],setup(n,{emit:t}){const o=n,a=t,i=()=>{var g;if(o.modelValue&&o.modelValue.data)return;const h={id:((g=o.modelValue)==null?void 0:g.id)||R(),type:"CardListSchool",onlyShowPc:!1,width:"",colMobile:1,colDesktop:2,data:[{id:R(),title:"这里是标题",text:"这里是内容",imgSrc:"https://osswebsite-test.cedim.cn/media-library/ywies-tx/pdf/TX%20Brochure%20Cover_optim.png",alt:"",buttons:[{id:R(),type:"",text:"按钮名称",url:"",isExternal:!1},{id:R(),type:"",text:"按钮名称",url:"",isExternal:!1}]},{id:R(),title:"这里是标题",text:"这里是内容",imgSrc:"https://osswebsite-test.cedim.cn/media-library/ywies-tx/pdf/TX%20Brochure%20Cover_optim.png",alt:"",buttons:[]}]};a("update:modelValue",h)},s=e.computed(()=>{var h;return o.isPreview?!((h=o.modelValue)!=null&&h.onlyShowPc)||!Ne():!0}),l=e.ref(!1),r=e.ref(!1),u=()=>{a("handleDelete",o.modelValue.id)},c=()=>{a("handleCopy",o.modelValue)},f=h=>{a("handlePaste",h)},m=h=>{!h||!o.isPreview||(h.startsWith("http")?typeof window<"u"&&window.open(h,"_blank"):a("handleClick",h))};i();const d=e.ref(Date.now());return(h,g)=>{var p,b,_,w,v,V;return e.openBlock(),e.createElementBlock(e.Fragment,null,[s.value?(e.openBlock(),e.createElementBlock("div",{key:0,class:"card-list",onMouseenter:g[2]||(g[2]=C=>l.value=!0),onMouseleave:g[3]||(g[3]=C=>l.value=!1)},[e.createElementVNode("div",{class:e.normalizeClass(["card-list__wrapper",[(p=n.modelValue)!=null&&p.width?`container-content-${(b=n.modelValue)==null?void 0:b.width}`:"container-content"]])},[e.createElementVNode("div",{class:e.normalizeClass(["row cars-list-school",[`row-cols-${(_=n.modelValue)==null?void 0:_.colMobile}`,`row-cols-md-${(w=n.modelValue)==null?void 0:w.colDesktop}`,{"small-gap":((v=n.modelValue)==null?void 0:v.colDesktop)>4}]]),id:`card-list-${d.value}`},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList((V=n.modelValue)==null?void 0:V.data,(C,S)=>(e.openBlock(),e.createElementBlock("div",{class:"col",key:C.id,"data-aos":"fade-up","data-aos-delay":S*100,"data-aos-anchor":`#card-list-${d.value}`},[e.createElementVNode("div",Pj,[e.createElementVNode("div",$j,[e.createElementVNode("div",Aj,[e.createElementVNode("img",{src:C.imgSrc,alt:C.alt},null,8,Lj)])]),e.createElementVNode("div",Ij,[C.title?(e.openBlock(),e.createElementBlock("h6",Oj,e.toDisplayString(C.title),1)):e.createCommentVNode("",!0),C.text?(e.openBlock(),e.createElementBlock("div",{key:1,class:"school__content",innerHTML:C.text},null,8,Mj)):e.createCommentVNode("",!0),C.buttons&&C.buttons.length>0?(e.openBlock(),e.createElementBlock("div",Uj,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(C.buttons,N=>(e.openBlock(),e.createElementBlock("button",{key:N.id,onClick:D=>m(N.url||""),class:e.normalizeClass(["card-programme__buttons size-normal btn-primary",[N.type?`btn-primary--${N.type}`:""]])},[e.createElementVNode("div",Fj,e.toDisplayString(N.text),1),g[5]||(g[5]=e.createElementVNode("span",{class:"btn-primary__icon"},null,-1))],10,Rj))),128))])):e.createCommentVNode("",!0)])])],8,Dj))),128))],10,Bj)],2),n.isPreview?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(Te,{key:0,show:l.value,"onUpdate:show":g[0]||(g[0]=C=>l.value=C),onHandleEdit:g[1]||(g[1]=C=>r.value=!0),onHandleDelete:u,onHandleCopy:c,onHandlePaste:f},null,8,["show"]))],32)):e.createCommentVNode("",!0),n.isPreview?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(Sj,{key:1,show:r.value,"onUpdate:show":g[4]||(g[4]=C=>r.value=C),data:n.modelValue},null,8,["show","data"]))],64)}}}),du=ne(Hj,[["__scopeId","data-v-b8adeae3"]]),jj=Object.freeze(Object.defineProperty({__proto__:null,default:du},Symbol.toStringTag,{value:"Module"})),zj={class:"setting-content"},qj={class:"setting-header flex items-center"},Wj=e.defineComponent({__name:"setting",props:{show:{type:Boolean,default:!1},data:{type:Object,default:()=>{}}},emits:["update:show"],setup(n,{emit:t}){e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./index-QFpkZqlg.js")));const o=t,a=()=>{o("update:show",!1)};return(i,s)=>{const l=e.resolveComponent("a-switch"),r=e.resolveComponent("a-option"),u=e.resolveComponent("a-select"),c=e.resolveComponent("a-input"),f=e.resolveComponent("a-drawer");return e.openBlock(),e.createBlock(f,{width:500,visible:n.show,footer:!1,onCancel:a,unmountOnClose:""},{title:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(n.data.type)+"组件编辑 ",1)]),default:e.withCtx(()=>[e.createElementVNode("div",zj,[e.createElementVNode("div",qj,[s[5]||(s[5]=e.createElementVNode("span",{class:"header-title"},"仅显示PC端",-1)),e.createVNode(l,{modelValue:n.data.onlyShowPc,"onUpdate:modelValue":s[0]||(s[0]=m=>n.data.onlyShowPc=m)},null,8,["modelValue"])]),s[10]||(s[10]=e.createElementVNode("p",{class:"item-title"},"组件宽度",-1)),e.createVNode(u,{modelValue:n.data.data.width,"onUpdate:modelValue":s[1]||(s[1]=m=>n.data.data.width=m),placeholder:"请选择","allow-clear":""},{default:e.withCtx(()=>[e.createVNode(r,{value:"default"},{default:e.withCtx(()=>[...s[6]||(s[6]=[e.createTextVNode("默认",-1)])]),_:1}),e.createVNode(r,{value:"small"},{default:e.withCtx(()=>[...s[7]||(s[7]=[e.createTextVNode("小",-1)])]),_:1}),e.createVNode(r,{value:"middle"},{default:e.withCtx(()=>[...s[8]||(s[8]=[e.createTextVNode("中",-1)])]),_:1}),e.createVNode(r,{value:"max"},{default:e.withCtx(()=>[...s[9]||(s[9]=[e.createTextVNode("大",-1)])]),_:1})]),_:1},8,["modelValue"]),s[11]||(s[11]=e.createElementVNode("p",{class:"item-title"},"标题",-1)),e.createVNode(c,{modelValue:n.data.data.title,"onUpdate:modelValue":s[2]||(s[2]=m=>n.data.data.title=m),placeholder:"请输入标题","allow-clear":""},null,8,["modelValue"]),s[12]||(s[12]=e.createElementVNode("p",{class:"item-title"},"副标题",-1)),e.createVNode(c,{modelValue:n.data.data.subTitle,"onUpdate:modelValue":s[3]||(s[3]=m=>n.data.data.subTitle=m),placeholder:"请输入副标题","allow-clear":""},null,8,["modelValue"]),s[13]||(s[13]=e.createElementVNode("p",{class:"item-title"},"链接",-1)),e.createVNode(c,{modelValue:n.data.data.link,"onUpdate:modelValue":s[4]||(s[4]=m=>n.data.data.link=m),placeholder:"请输入链接","allow-clear":""},null,8,["modelValue"])])]),_:1},8,["visible"])}}}),Gj=ne(Wj,[["__scopeId","data-v-b0126cce"]]),Xj=["innerHTML"],Yj={class:"d-flex"},Kj=["innerHTML"],Qj=e.defineComponent({name:"DetailLink",__name:"index",props:{modelValue:{type:Object,default:()=>{}},isPreview:{type:Boolean,default:!0}},emits:["update:modelValue","handleDelete","handleCopy","handlePaste","handleClick"],setup(n,{emit:t}){const o=n,a=t,i=h=>{a("handleClick",h)},s=e.computed(()=>{var h;return o.isPreview?!((h=o.modelValue)!=null&&h.onlyShowPc)||!Ne():!0}),l=()=>{var g;if(o.modelValue&&o.modelValue.data)return;const h={id:((g=o.modelValue)==null?void 0:g.id)||R(),type:"DetailLink",onlyShowPc:!1,data:{width:"default",title:"这里是标题",subTitle:"这里是副标题",link:"https://www.baidu.com"}};a("update:modelValue",h)},r=e.ref(!1),u=e.ref(!1),c=e.computed(()=>{var p,b;const h=(b=(p=o.modelValue)==null?void 0:p.data)==null?void 0:b.width;return!h||h==="default"?"container-content":{small:"container-content-small",middle:"container-content-middle",max:"container-content-max"}[h]||"container-content"}),f=()=>{a("handleDelete",o.modelValue.id)},m=()=>{a("handleCopy",o.modelValue)},d=h=>{a("handlePaste",h)};return l(),(h,g)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[s.value?(e.openBlock(),e.createElementBlock("div",{key:0,class:"detailLink_wrap",onMouseenter:g[3]||(g[3]=p=>r.value=!0),onMouseleave:g[4]||(g[4]=p=>r.value=!1)},[e.createElementVNode("div",{class:e.normalizeClass(["media-image-full",c.value])},[!n.modelValue.data.link&&n.modelValue.data.title?(e.openBlock(),e.createElementBlock("h6",{key:0,class:"detail-link__title",innerHTML:n.modelValue.data.title},null,8,Xj)):e.createCommentVNode("",!0),n.modelValue.data.link&&n.modelValue.data.title?(e.openBlock(),e.createElementBlock("div",{key:1,onClick:g[0]||(g[0]=p=>i(n.modelValue.data.link)),class:"nuxt-link-active detail-link__hover-underline"},e.toDisplayString(n.modelValue.data.title),1)):e.createCommentVNode("",!0),e.createElementVNode("div",Yj,[e.createElementVNode("div",{class:"detail-link__date",innerHTML:n.modelValue.data.subTitle},null,8,Kj)])],2),n.isPreview?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(Te,{key:0,show:r.value,"onUpdate:show":g[1]||(g[1]=p=>r.value=p),onHandleEdit:g[2]||(g[2]=p=>u.value=!0),onHandleDelete:f,onHandleCopy:m,onHandlePaste:d},null,8,["show"]))],32)):e.createCommentVNode("",!0),n.isPreview?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(Gj,{key:1,show:u.value,"onUpdate:show":g[5]||(g[5]=p=>u.value=p),data:n.modelValue},null,8,["show","data"]))],64))}}),uu=ne(Qj,[["__scopeId","data-v-24822e38"]]),Jj=Object.freeze(Object.defineProperty({__proto__:null,default:uu},Symbol.toStringTag,{value:"Module"})),Zj={class:"setting-content"},ez={class:"setting-header flex items-center"},tz=["src"],nz={class:"item-uplaod flex items-center"},oz=["src"],az={class:"item-uplaod flex items-center"},iz=e.defineComponent({__name:"setting",props:{show:{type:Boolean,default:!1},data:{type:Object,default:()=>{}}},emits:["update:show"],setup(n,{emit:t}){e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./index-QFpkZqlg.js")));const o=t,a=()=>{o("update:show",!1)};return(i,s)=>{const l=e.resolveComponent("a-switch"),r=e.resolveComponent("a-option"),u=e.resolveComponent("a-select"),c=e.resolveComponent("a-input"),f=e.resolveComponent("Upload"),m=e.resolveComponent("a-drawer");return e.openBlock(),e.createBlock(m,{width:500,visible:n.show,footer:!1,onCancel:a,unmountOnClose:""},{title:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(n.data.type)+"组件编辑 ",1)]),default:e.withCtx(()=>[e.createElementVNode("div",Zj,[e.createElementVNode("div",ez,[s[7]||(s[7]=e.createElementVNode("span",{class:"header-title"},"仅显示PC端",-1)),e.createVNode(l,{modelValue:n.data.onlyShowPc,"onUpdate:modelValue":s[0]||(s[0]=d=>n.data.onlyShowPc=d)},null,8,["modelValue"])]),s[18]||(s[18]=e.createElementVNode("p",{class:"item-title"},"组件宽度",-1)),e.createVNode(u,{modelValue:n.data.data.width,"onUpdate:modelValue":s[1]||(s[1]=d=>n.data.data.width=d),placeholder:"请选择","allow-clear":""},{default:e.withCtx(()=>[e.createVNode(r,{value:"default"},{default:e.withCtx(()=>[...s[8]||(s[8]=[e.createTextVNode("默认",-1)])]),_:1}),e.createVNode(r,{value:"small"},{default:e.withCtx(()=>[...s[9]||(s[9]=[e.createTextVNode("小",-1)])]),_:1}),e.createVNode(r,{value:"middle"},{default:e.withCtx(()=>[...s[10]||(s[10]=[e.createTextVNode("中",-1)])]),_:1}),e.createVNode(r,{value:"max"},{default:e.withCtx(()=>[...s[11]||(s[11]=[e.createTextVNode("大",-1)])]),_:1})]),_:1},8,["modelValue"]),s[19]||(s[19]=e.createElementVNode("p",{class:"item-title"},"视频类型",-1)),e.createVNode(u,{modelValue:n.data.data.type,"onUpdate:modelValue":s[2]||(s[2]=d=>n.data.data.type=d),placeholder:"请选择","allow-clear":""},{default:e.withCtx(()=>[e.createVNode(r,{value:"inner"},{default:e.withCtx(()=>[...s[12]||(s[12]=[e.createTextVNode("inner",-1)])]),_:1}),e.createVNode(r,{value:"youtube"},{default:e.withCtx(()=>[...s[13]||(s[13]=[e.createTextVNode("youtube",-1)])]),_:1}),e.createVNode(r,{value:"bilibili"},{default:e.withCtx(()=>[...s[14]||(s[14]=[e.createTextVNode("bilibili",-1)])]),_:1}),e.createVNode(r,{value:"youku"},{default:e.withCtx(()=>[...s[15]||(s[15]=[e.createTextVNode("youku",-1)])]),_:1}),e.createVNode(r,{value:"qq"},{default:e.withCtx(()=>[...s[16]||(s[16]=[e.createTextVNode("qq",-1)])]),_:1}),e.createVNode(r,{value:"facebook"},{default:e.withCtx(()=>[...s[17]||(s[17]=[e.createTextVNode("facebook",-1)])]),_:1})]),_:1},8,["modelValue"]),s[20]||(s[20]=e.createElementVNode("p",{class:"item-title"},"视频地址",-1)),e.createElementVNode("img",{class:"item-img",src:n.data.data.videoSrc},null,8,tz),e.createElementVNode("div",nz,[e.createVNode(c,{modelValue:n.data.data.videoSrc,"onUpdate:modelValue":s[3]||(s[3]=d=>n.data.data.videoSrc=d),placeholder:"请输入图片链接","allow-clear":""},null,8,["modelValue"]),e.createVNode(f,{modelValue:n.data.data.videoSrc,"onUpdate:modelValue":s[4]||(s[4]=d=>n.data.data.videoSrc=d),name:"MediaImageFull","button-class":"fit-content"},null,8,["modelValue"])]),s[21]||(s[21]=e.createElementVNode("p",{class:"item-title"},"视频封面图",-1)),e.createElementVNode("img",{class:"item-img",src:n.data.data.videoThumbnail},null,8,oz),e.createElementVNode("div",az,[e.createVNode(c,{modelValue:n.data.data.videoThumbnail,"onUpdate:modelValue":s[5]||(s[5]=d=>n.data.data.videoThumbnail=d),placeholder:"请输入图片链接","allow-clear":""},null,8,["modelValue"]),e.createVNode(f,{modelValue:n.data.data.videoThumbnail,"onUpdate:modelValue":s[6]||(s[6]=d=>n.data.data.videoThumbnail=d),name:"MediaImageFull","button-class":"fit-content"},null,8,["modelValue"])])])]),_:1},8,["visible"])}}}),sz=ne(iz,[["__scopeId","data-v-ae9b8be0"]]);var Us;typeof window<"u"?Us=window:typeof cl<"u"?Us=cl:typeof self<"u"?Us=self:Us={};var cu=Us;const X=ti(cu),lz={},rz=Object.freeze(Object.defineProperty({__proto__:null,default:lz},Symbol.toStringTag,{value:"Module"})),dz=sv(rz);var Qh=typeof cl<"u"?cl:typeof window<"u"?window:{},uz=dz,Rs;typeof document<"u"?Rs=document:(Rs=Qh["__GLOBAL_DOCUMENT_CACHE@4"],Rs||(Rs=Qh["__GLOBAL_DOCUMENT_CACHE@4"]=uz));var yv=Rs;const ge=ti(yv);var Lm={exports:{}};function kt(){return kt=Object.assign?Object.assign.bind():function(n){for(var t=1;t<arguments.length;t++){var o=arguments[t];for(var a in o)({}).hasOwnProperty.call(o,a)&&(n[a]=o[a])}return n},kt.apply(null,arguments)}const cz=Object.freeze(Object.defineProperty({__proto__:null,get default(){return kt}},Symbol.toStringTag,{value:"Module"})),mz=sv(cz);var pz=fz,hz=Object.prototype.toString;function fz(n){if(!n)return!1;var t=hz.call(n);return t==="[object Function]"||typeof n=="function"&&t!=="[object RegExp]"||typeof window<"u"&&(n===window.setTimeout||n===window.alert||n===window.confirm||n===window.prompt)}function gz(n,t){var o=typeof Symbol<"u"&&n[Symbol.iterator]||n["@@iterator"];if(o)return(o=o.call(n)).next.bind(o);if(Array.isArray(n)||(o=vz(n))||t){o&&(n=o);var a=0;return function(){return a>=n.length?{done:!0}:{done:!1,value:n[a++]}}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
|
|
22
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function vz(n,t){if(n){if(typeof n=="string")return Jh(n,t);var o=Object.prototype.toString.call(n).slice(8,-1);if(o==="Object"&&n.constructor&&(o=n.constructor.name),o==="Map"||o==="Set")return Array.from(n);if(o==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(o))return Jh(n,t)}}function Jh(n,t){(t==null||t>n.length)&&(t=n.length);for(var o=0,a=new Array(t);o<t;o++)a[o]=n[o];return a}var yz=function(){function n(){this.typeToInterceptorsMap_=new Map,this.enabled_=!1}var t=n.prototype;return t.getIsEnabled=function(){return this.enabled_},t.enable=function(){this.enabled_=!0},t.disable=function(){this.enabled_=!1},t.reset=function(){this.typeToInterceptorsMap_=new Map,this.enabled_=!1},t.addInterceptor=function(a,i){this.typeToInterceptorsMap_.has(a)||this.typeToInterceptorsMap_.set(a,new Set);var s=this.typeToInterceptorsMap_.get(a);return s.has(i)?!1:(s.add(i),!0)},t.removeInterceptor=function(a,i){var s=this.typeToInterceptorsMap_.get(a);return s&&s.has(i)?(s.delete(i),!0):!1},t.clearInterceptorsByType=function(a){var i=this.typeToInterceptorsMap_.get(a);return i?(this.typeToInterceptorsMap_.delete(a),this.typeToInterceptorsMap_.set(a,new Set),!0):!1},t.clear=function(){return this.typeToInterceptorsMap_.size?(this.typeToInterceptorsMap_=new Map,!0):!1},t.getForType=function(a){return this.typeToInterceptorsMap_.get(a)||new Set},t.execute=function(a,i){for(var s=this.getForType(a),l=gz(s),r;!(r=l()).done;){var u=r.value;try{i=u(i)}catch{}}return i},n}(),_z=yz,bz=function(){function n(){this.maxAttempts_=1,this.delayFactor_=.1,this.fuzzFactor_=.1,this.initialDelay_=1e3,this.enabled_=!1}var t=n.prototype;return t.getIsEnabled=function(){return this.enabled_},t.enable=function(){this.enabled_=!0},t.disable=function(){this.enabled_=!1},t.reset=function(){this.maxAttempts_=1,this.delayFactor_=.1,this.fuzzFactor_=.1,this.initialDelay_=1e3,this.enabled_=!1},t.getMaxAttempts=function(){return this.maxAttempts_},t.setMaxAttempts=function(a){this.maxAttempts_=a},t.getDelayFactor=function(){return this.delayFactor_},t.setDelayFactor=function(a){this.delayFactor_=a},t.getFuzzFactor=function(){return this.fuzzFactor_},t.setFuzzFactor=function(a){this.fuzzFactor_=a},t.getInitialDelay=function(){return this.initialDelay_},t.setInitialDelay=function(a){this.initialDelay_=a},t.createRetry=function(a){var i=a===void 0?{}:a,s=i.maxAttempts,l=i.delayFactor,r=i.fuzzFactor,u=i.initialDelay;return new wz({maxAttempts:s||this.maxAttempts_,delayFactor:l||this.delayFactor_,fuzzFactor:r||this.fuzzFactor_,initialDelay:u||this.initialDelay_})},n}(),wz=function(){function n(o){this.maxAttempts_=o.maxAttempts,this.delayFactor_=o.delayFactor,this.fuzzFactor_=o.fuzzFactor,this.currentDelay_=o.initialDelay,this.currentAttempt_=1}var t=n.prototype;return t.moveToNextAttempt=function(){this.currentAttempt_++;var a=this.currentDelay_*this.delayFactor_;this.currentDelay_=this.currentDelay_+a},t.shouldRetry=function(){return this.currentAttempt_<this.maxAttempts_},t.getCurrentDelay=function(){return this.currentDelay_},t.getCurrentMinPossibleDelay=function(){return(1-this.fuzzFactor_)*this.currentDelay_},t.getCurrentMaxPossibleDelay=function(){return(1+this.fuzzFactor_)*this.currentDelay_},t.getCurrentFuzzedDelay=function(){var a=this.getCurrentMinPossibleDelay(),i=this.getCurrentMaxPossibleDelay();return a+Math.random()*(i-a)},n}(),xz=bz,Vz=cu,Cz=function(t,o){return o===void 0&&(o=!1),function(a,i,s){if(a){t(a);return}if(i.statusCode>=400&&i.statusCode<=599){var l=s;if(o)if(Vz.TextDecoder){var r=kz(i.headers&&i.headers["content-type"]);try{l=new TextDecoder(r).decode(s)}catch{}}else l=String.fromCharCode.apply(null,new Uint8Array(s));t({cause:l});return}t(null,s)}};function kz(n){return n===void 0&&(n=""),n.toLowerCase().split(";").reduce(function(t,o){var a=o.split("="),i=a[0],s=a[1];return i.trim()==="charset"?s.trim():t},"utf-8")}var Ez=Cz,_v=cu,Tz=mz,Nz=pz,bv=_z,Sz=xz;Bt.httpHandler=Ez;Bt.requestInterceptorsStorage=new bv;Bt.responseInterceptorsStorage=new bv;Bt.retryManager=new Sz;/**
|
|
23
|
+
* @license
|
|
24
|
+
* slighly modified parse-headers 2.0.2 <https://github.com/kesla/parse-headers/>
|
|
25
|
+
* Copyright (c) 2014 David Björklund
|
|
26
|
+
* Available under the MIT license
|
|
27
|
+
* <https://github.com/kesla/parse-headers/blob/master/LICENCE>
|
|
28
|
+
*/var Bz=function(t){var o={};return t&&t.trim().split(`
|
|
29
|
+
`).forEach(function(a){var i=a.indexOf(":"),s=a.slice(0,i).trim().toLowerCase(),l=a.slice(i+1).trim();typeof o[s]>"u"?o[s]=l:Array.isArray(o[s])?o[s].push(l):o[s]=[o[s],l]}),o};Lm.exports=Bt;Lm.exports.default=Bt;Bt.XMLHttpRequest=_v.XMLHttpRequest||Az;Bt.XDomainRequest="withCredentials"in new Bt.XMLHttpRequest?Bt.XMLHttpRequest:_v.XDomainRequest;Dz(["get","put","post","patch","head","delete"],function(n){Bt[n==="delete"?"del":n]=function(t,o,a){return o=wv(t,o,a),o.method=n.toUpperCase(),Im(o)}});function Dz(n,t){for(var o=0;o<n.length;o++)t(n[o])}function Pz(n){for(var t in n)if(n.hasOwnProperty(t))return!1;return!0}function wv(n,t,o){var a=n;return Nz(t)?(o=t,typeof n=="string"&&(a={uri:n})):a=Tz({},t,{uri:n}),a.callback=o,a}function Bt(n,t,o){return t=wv(n,t,o),Im(t)}function Im(n){if(typeof n.callback>"u")throw new Error("callback argument missing");if(n.requestType&&Bt.requestInterceptorsStorage.getIsEnabled()){var t={uri:n.uri||n.url,headers:n.headers||{},body:n.body,metadata:n.metadata||{},retry:n.retry,timeout:n.timeout},o=Bt.requestInterceptorsStorage.execute(n.requestType,t);n.uri=o.uri,n.headers=o.headers,n.body=o.body,n.metadata=o.metadata,n.retry=o.retry,n.timeout=o.timeout}var a=!1,i=function(C,S,N){a||(a=!0,n.callback(C,S,N))};function s(){c.readyState===4&&!Bt.responseInterceptorsStorage.getIsEnabled()&&setTimeout(u,0)}function l(){var V=void 0;if(c.response?V=c.response:V=c.responseText||$z(c),_)try{V=JSON.parse(V)}catch{}return V}function r(V){if(clearTimeout(w),clearTimeout(n.retryTimeout),V instanceof Error||(V=new Error(""+(V||"Unknown XMLHttpRequest Error"))),V.statusCode=0,!m&&Bt.retryManager.getIsEnabled()&&n.retry&&n.retry.shouldRetry()){n.retryTimeout=setTimeout(function(){n.retry.moveToNextAttempt(),n.xhr=c,Im(n)},n.retry.getCurrentFuzzedDelay());return}if(n.requestType&&Bt.responseInterceptorsStorage.getIsEnabled()){var C={headers:v.headers||{},body:v.body,responseUrl:c.responseURL,responseType:c.responseType},S=Bt.responseInterceptorsStorage.execute(n.requestType,C);v.body=S.body,v.headers=S.headers}return i(V,v)}function u(){if(!m){var V;clearTimeout(w),clearTimeout(n.retryTimeout),n.useXDR&&c.status===void 0?V=200:V=c.status===1223?204:c.status;var C=v,S=null;if(V!==0?(C={body:l(),statusCode:V,method:h,headers:{},url:d,rawRequest:c},c.getAllResponseHeaders&&(C.headers=Bz(c.getAllResponseHeaders()))):S=new Error("Internal XMLHttpRequest Error"),n.requestType&&Bt.responseInterceptorsStorage.getIsEnabled()){var N={headers:C.headers||{},body:C.body,responseUrl:c.responseURL,responseType:c.responseType},D=Bt.responseInterceptorsStorage.execute(n.requestType,N);C.body=D.body,C.headers=D.headers}return i(S,C,C.body)}}var c=n.xhr||null;c||(n.cors||n.useXDR?c=new Bt.XDomainRequest:c=new Bt.XMLHttpRequest);var f,m,d=c.url=n.uri||n.url,h=c.method=n.method||"GET",g=n.body||n.data,p=c.headers=n.headers||{},b=!!n.sync,_=!1,w,v={body:void 0,headers:{},statusCode:0,method:h,url:d,rawRequest:c};if("json"in n&&n.json!==!1&&(_=!0,p.accept||p.Accept||(p.Accept="application/json"),h!=="GET"&&h!=="HEAD"&&(p["content-type"]||p["Content-Type"]||(p["Content-Type"]="application/json"),g=JSON.stringify(n.json===!0?g:n.json))),c.onreadystatechange=s,c.onload=u,c.onerror=r,c.onprogress=function(){},c.onabort=function(){m=!0,clearTimeout(n.retryTimeout)},c.ontimeout=r,c.open(h,d,!b,n.username,n.password),b||(c.withCredentials=!!n.withCredentials),!b&&n.timeout>0&&(w=setTimeout(function(){if(!m){m=!0,c.abort("timeout");var V=new Error("XMLHttpRequest timeout");V.code="ETIMEDOUT",r(V)}},n.timeout)),c.setRequestHeader)for(f in p)p.hasOwnProperty(f)&&c.setRequestHeader(f,p[f]);else if(n.headers&&!Pz(n.headers))throw new Error("Headers cannot be set on an XDomainRequest object");return"responseType"in n&&(c.responseType=n.responseType),"beforeSend"in n&&typeof n.beforeSend=="function"&&n.beforeSend(c),c.send(g||null),c}function $z(n){try{if(n.responseType==="document")return n.responseXML;var t=n.responseXML&&n.responseXML.documentElement.nodeName==="parsererror";if(n.responseType===""&&!t)return n.responseXML}catch{}return null}function Az(){}var Lz=Lm.exports;const xv=ti(Lz);var Vv={exports:{}},Zh=yv,Om=Object.create||function(){function n(){}return function(t){if(arguments.length!==1)throw new Error("Object.create shim only accepts one parameter.");return n.prototype=t,new n}}();function zn(n,t){this.name="ParsingError",this.code=n.code,this.message=t||n.message}zn.prototype=Om(Error.prototype);zn.prototype.constructor=zn;zn.Errors={BadSignature:{code:0,message:"Malformed WebVTT signature."},BadTimeStamp:{code:1,message:"Malformed time stamp."}};function Mm(n){function t(a,i,s,l){return(a|0)*3600+(i|0)*60+(s|0)+(l|0)/1e3}var o=n.match(/^(\d+):(\d{1,2})(:\d{1,2})?\.(\d{3})/);return o?o[3]?t(o[1],o[2],o[3].replace(":",""),o[4]):o[1]>59?t(o[1],o[2],0,o[4]):t(0,o[1],o[2],o[4]):null}function tl(){this.values=Om(null)}tl.prototype={set:function(n,t){!this.get(n)&&t!==""&&(this.values[n]=t)},get:function(n,t,o){return o?this.has(n)?this.values[n]:t[o]:this.has(n)?this.values[n]:t},has:function(n){return n in this.values},alt:function(n,t,o){for(var a=0;a<o.length;++a)if(t===o[a]){this.set(n,t);break}},integer:function(n,t){/^-?\d+$/.test(t)&&this.set(n,parseInt(t,10))},percent:function(n,t){return t.match(/^([\d]{1,3})(\.[\d]*)?%$/)&&(t=parseFloat(t),t>=0&&t<=100)?(this.set(n,t),!0):!1}};function Fs(n,t,o,a){var i=a?n.split(a):[n];for(var s in i)if(typeof i[s]=="string"){var l=i[s].split(o);if(l.length===2){var r=l[0].trim(),u=l[1].trim();t(r,u)}}}function Iz(n,t,o){var a=n;function i(){var r=Mm(n);if(r===null)throw new zn(zn.Errors.BadTimeStamp,"Malformed timestamp: "+a);return n=n.replace(/^[^\sa-zA-Z-]+/,""),r}function s(r,u){var c=new tl;Fs(r,function(f,m){switch(f){case"region":for(var d=o.length-1;d>=0;d--)if(o[d].id===m){c.set(f,o[d].region);break}break;case"vertical":c.alt(f,m,["rl","lr"]);break;case"line":var h=m.split(","),g=h[0];c.integer(f,g),c.percent(f,g)&&c.set("snapToLines",!1),c.alt(f,g,["auto"]),h.length===2&&c.alt("lineAlign",h[1],["start","center","end"]);break;case"position":h=m.split(","),c.percent(f,h[0]),h.length===2&&c.alt("positionAlign",h[1],["start","center","end"]);break;case"size":c.percent(f,m);break;case"align":c.alt(f,m,["start","center","end","left","right"]);break}},/:/,/\s/),u.region=c.get("region",null),u.vertical=c.get("vertical","");try{u.line=c.get("line","auto")}catch{}u.lineAlign=c.get("lineAlign","start"),u.snapToLines=c.get("snapToLines",!0),u.size=c.get("size",100);try{u.align=c.get("align","center")}catch{u.align=c.get("align","middle")}try{u.position=c.get("position","auto")}catch{u.position=c.get("position",{start:0,left:0,center:50,middle:50,end:100,right:100},u.align)}u.positionAlign=c.get("positionAlign",{start:"start",left:"start",center:"center",middle:"center",end:"end",right:"end"},u.align)}function l(){n=n.replace(/^\s+/,"")}if(l(),t.startTime=i(),l(),n.substr(0,3)!=="-->")throw new zn(zn.Errors.BadTimeStamp,"Malformed time stamp (time stamps must be separated by '-->'): "+a);n=n.substr(3),l(),t.endTime=i(),l(),s(n,t)}var rc=Zh.createElement&&Zh.createElement("textarea"),Oz={c:"span",i:"i",b:"b",u:"u",ruby:"ruby",rt:"rt",v:"span",lang:"span"},ef={white:"rgba(255,255,255,1)",lime:"rgba(0,255,0,1)",cyan:"rgba(0,255,255,1)",red:"rgba(255,0,0,1)",yellow:"rgba(255,255,0,1)",magenta:"rgba(255,0,255,1)",blue:"rgba(0,0,255,1)",black:"rgba(0,0,0,1)"},Mz={v:"title",lang:"lang"},tf={rt:"ruby"};function Cv(n,t){function o(){if(!t)return null;function g(b){return t=t.substr(b.length),b}var p=t.match(/^([^<]*)(<[^>]*>?)?/);return g(p[1]?p[1]:p[2])}function a(g){return rc.innerHTML=g,g=rc.textContent,rc.textContent="",g}function i(g,p){return!tf[p.localName]||tf[p.localName]===g.localName}function s(g,p){var b=Oz[g];if(!b)return null;var _=n.document.createElement(b),w=Mz[g];return w&&p&&(_[w]=p.trim()),_}for(var l=n.document.createElement("div"),r=l,u,c=[];(u=o())!==null;){if(u[0]==="<"){if(u[1]==="/"){c.length&&c[c.length-1]===u.substr(2).replace(">","")&&(c.pop(),r=r.parentNode);continue}var f=Mm(u.substr(1,u.length-2)),m;if(f){m=n.document.createProcessingInstruction("timestamp",f),r.appendChild(m);continue}var d=u.match(/^<([^.\s/0-9>]+)(\.[^\s\\>]+)?([^>\\]+)?(\\?)>?$/);if(!d||(m=s(d[1],d[3]),!m)||!i(r,m))continue;if(d[2]){var h=d[2].split(".");h.forEach(function(g){var p=/^bg_/.test(g),b=p?g.slice(3):g;if(ef.hasOwnProperty(b)){var _=p?"background-color":"color",w=ef[b];m.style[_]=w}}),m.className=h.join(" ")}c.push(d[1]),r.appendChild(m),r=m;continue}r.appendChild(n.document.createTextNode(a(u)))}return l}var nf=[[1470,1470],[1472,1472],[1475,1475],[1478,1478],[1488,1514],[1520,1524],[1544,1544],[1547,1547],[1549,1549],[1563,1563],[1566,1610],[1645,1647],[1649,1749],[1765,1766],[1774,1775],[1786,1805],[1807,1808],[1810,1839],[1869,1957],[1969,1969],[1984,2026],[2036,2037],[2042,2042],[2048,2069],[2074,2074],[2084,2084],[2088,2088],[2096,2110],[2112,2136],[2142,2142],[2208,2208],[2210,2220],[8207,8207],[64285,64285],[64287,64296],[64298,64310],[64312,64316],[64318,64318],[64320,64321],[64323,64324],[64326,64449],[64467,64829],[64848,64911],[64914,64967],[65008,65020],[65136,65140],[65142,65276],[67584,67589],[67592,67592],[67594,67637],[67639,67640],[67644,67644],[67647,67669],[67671,67679],[67840,67867],[67872,67897],[67903,67903],[67968,68023],[68030,68031],[68096,68096],[68112,68115],[68117,68119],[68121,68147],[68160,68167],[68176,68184],[68192,68223],[68352,68405],[68416,68437],[68440,68466],[68472,68479],[68608,68680],[126464,126467],[126469,126495],[126497,126498],[126500,126500],[126503,126503],[126505,126514],[126516,126519],[126521,126521],[126523,126523],[126530,126530],[126535,126535],[126537,126537],[126539,126539],[126541,126543],[126545,126546],[126548,126548],[126551,126551],[126553,126553],[126555,126555],[126557,126557],[126559,126559],[126561,126562],[126564,126564],[126567,126570],[126572,126578],[126580,126583],[126585,126588],[126590,126590],[126592,126601],[126603,126619],[126625,126627],[126629,126633],[126635,126651],[1114109,1114109]];function Uz(n){for(var t=0;t<nf.length;t++){var o=nf[t];if(n>=o[0]&&n<=o[1])return!0}return!1}function Rz(n){var t=[],o="",a;if(!n||!n.childNodes)return"ltr";function i(r,u){for(var c=u.childNodes.length-1;c>=0;c--)r.push(u.childNodes[c])}function s(r){if(!r||!r.length)return null;var u=r.pop(),c=u.textContent||u.innerText;if(c){var f=c.match(/^.*(\n|\r)/);return f?(r.length=0,f[0]):c}if(u.tagName==="ruby")return s(r);if(u.childNodes)return i(r,u),s(r)}for(i(t,n);o=s(t);)for(var l=0;l<o.length;l++)if(a=o.charCodeAt(l),Uz(a))return"rtl";return"ltr"}function Fz(n){if(typeof n.line=="number"&&(n.snapToLines||n.line>=0&&n.line<=100))return n.line;if(!n.track||!n.track.textTrackList||!n.track.textTrackList.mediaElement)return-1;for(var t=n.track,o=t.textTrackList,a=0,i=0;i<o.length&&o[i]!==t;i++)o[i].mode==="showing"&&a++;return++a*-1}function mu(){}mu.prototype.applyStyles=function(n,t){t=t||this.div;for(var o in n)n.hasOwnProperty(o)&&(t.style[o]=n[o])};mu.prototype.formatStyle=function(n,t){return n===0?0:n+t};function Lr(n,t,o){mu.call(this),this.cue=t,this.cueDiv=Cv(n,t.text);var a={color:"rgba(255, 255, 255, 1)",backgroundColor:"rgba(0, 0, 0, 0.8)",position:"relative",left:0,right:0,top:0,bottom:0,display:"inline",writingMode:t.vertical===""?"horizontal-tb":t.vertical==="lr"?"vertical-lr":"vertical-rl",unicodeBidi:"plaintext"};this.applyStyles(a,this.cueDiv),this.div=n.document.createElement("div"),a={direction:Rz(this.cueDiv),writingMode:t.vertical===""?"horizontal-tb":t.vertical==="lr"?"vertical-lr":"vertical-rl",unicodeBidi:"plaintext",textAlign:t.align==="middle"?"center":t.align,font:o.font,whiteSpace:"pre-line",position:"absolute"},this.applyStyles(a),this.div.appendChild(this.cueDiv);var i=0;switch(t.positionAlign){case"start":case"line-left":i=t.position;break;case"center":i=t.position-t.size/2;break;case"end":case"line-right":i=t.position-t.size;break}t.vertical===""?this.applyStyles({left:this.formatStyle(i,"%"),width:this.formatStyle(t.size,"%")}):this.applyStyles({top:this.formatStyle(i,"%"),height:this.formatStyle(t.size,"%")}),this.move=function(s){this.applyStyles({top:this.formatStyle(s.top,"px"),bottom:this.formatStyle(s.bottom,"px"),left:this.formatStyle(s.left,"px"),right:this.formatStyle(s.right,"px"),height:this.formatStyle(s.height,"px"),width:this.formatStyle(s.width,"px")})}}Lr.prototype=Om(mu.prototype);Lr.prototype.constructor=Lr;function vn(n){var t,o,a,i;if(n.div){o=n.div.offsetHeight,a=n.div.offsetWidth,i=n.div.offsetTop;var s=(s=n.div.childNodes)&&(s=s[0])&&s.getClientRects&&s.getClientRects();n=n.div.getBoundingClientRect(),t=s?Math.max(s[0]&&s[0].height||0,n.height/s.length):0}this.left=n.left,this.right=n.right,this.top=n.top||i,this.height=n.height||o,this.bottom=n.bottom||i+(n.height||o),this.width=n.width||a,this.lineHeight=t!==void 0?t:n.lineHeight}vn.prototype.move=function(n,t){switch(t=t!==void 0?t:this.lineHeight,n){case"+x":this.left+=t,this.right+=t;break;case"-x":this.left-=t,this.right-=t;break;case"+y":this.top+=t,this.bottom+=t;break;case"-y":this.top-=t,this.bottom-=t;break}};vn.prototype.overlaps=function(n){return this.left<n.right&&this.right>n.left&&this.top<n.bottom&&this.bottom>n.top};vn.prototype.overlapsAny=function(n){for(var t=0;t<n.length;t++)if(this.overlaps(n[t]))return!0;return!1};vn.prototype.within=function(n){return this.top>=n.top&&this.bottom<=n.bottom&&this.left>=n.left&&this.right<=n.right};vn.prototype.overlapsOppositeAxis=function(n,t){switch(t){case"+x":return this.left<n.left;case"-x":return this.right>n.right;case"+y":return this.top<n.top;case"-y":return this.bottom>n.bottom}};vn.prototype.intersectPercentage=function(n){var t=Math.max(0,Math.min(this.right,n.right)-Math.max(this.left,n.left)),o=Math.max(0,Math.min(this.bottom,n.bottom)-Math.max(this.top,n.top)),a=t*o;return a/(this.height*this.width)};vn.prototype.toCSSCompatValues=function(n){return{top:this.top-n.top,bottom:n.bottom-this.bottom,left:this.left-n.left,right:n.right-this.right,height:this.height,width:this.width}};vn.getSimpleBoxPosition=function(n){var t=n.div?n.div.offsetHeight:n.tagName?n.offsetHeight:0,o=n.div?n.div.offsetWidth:n.tagName?n.offsetWidth:0,a=n.div?n.div.offsetTop:n.tagName?n.offsetTop:0;n=n.div?n.div.getBoundingClientRect():n.tagName?n.getBoundingClientRect():n;var i={left:n.left,right:n.right,top:n.top||a,height:n.height||t,bottom:n.bottom||a+(n.height||t),width:n.width||o};return i};function Hz(n,t,o,a){function i(b,_){for(var w,v=new vn(b),V=1,C=0;C<_.length;C++){for(;b.overlapsOppositeAxis(o,_[C])||b.within(o)&&b.overlapsAny(a);)b.move(_[C]);if(b.within(o))return b;var S=b.intersectPercentage(o);V>S&&(w=new vn(b),V=S),b=new vn(v)}return w||v}var s=new vn(t),l=t.cue,r=Fz(l),u=[];if(l.snapToLines){var c;switch(l.vertical){case"":u=["+y","-y"],c="height";break;case"rl":u=["+x","-x"],c="width";break;case"lr":u=["-x","+x"],c="width";break}var f=s.lineHeight,m=f*Math.round(r),d=o[c]+f,h=u[0];Math.abs(m)>d&&(m=m<0?-1:1,m*=Math.ceil(d/f)*f),r<0&&(m+=l.vertical===""?o.height:o.width,u=u.reverse()),s.move(h,m)}else{var g=s.lineHeight/o.height*100;switch(l.lineAlign){case"center":r-=g/2;break;case"end":r-=g;break}switch(l.vertical){case"":t.applyStyles({top:t.formatStyle(r,"%")});break;case"rl":t.applyStyles({left:t.formatStyle(r,"%")});break;case"lr":t.applyStyles({right:t.formatStyle(r,"%")});break}u=["+y","-x","+x","-y"],s=new vn(t)}var p=i(s,u);t.move(p.toCSSCompatValues(o))}function ts(){}ts.StringDecoder=function(){return{decode:function(n){if(!n)return"";if(typeof n!="string")throw new Error("Error - expected string data.");return decodeURIComponent(encodeURIComponent(n))}}};ts.convertCueToDOMTree=function(n,t){return!n||!t?null:Cv(n,t)};var jz=.05,zz="sans-serif",qz="1.5%";ts.processCues=function(n,t,o){if(!n||!t||!o)return null;for(;o.firstChild;)o.removeChild(o.firstChild);var a=n.document.createElement("div");a.style.position="absolute",a.style.left="0",a.style.right="0",a.style.top="0",a.style.bottom="0",a.style.margin=qz,o.appendChild(a);function i(f){for(var m=0;m<f.length;m++)if(f[m].hasBeenReset||!f[m].displayState)return!0;return!1}if(!i(t)){for(var s=0;s<t.length;s++)a.appendChild(t[s].displayState);return}var l=[],r=vn.getSimpleBoxPosition(a),u=Math.round(r.height*jz*100)/100,c={font:u+"px "+zz};(function(){for(var f,m,d=0;d<t.length;d++)m=t[d],f=new Lr(n,m,c),a.appendChild(f.div),Hz(n,f,r,l),m.displayState=f.div,l.push(vn.getSimpleBoxPosition(f))})()};ts.Parser=function(n,t,o){o||(o=t,t={}),t||(t={}),this.window=n,this.vttjs=t,this.state="INITIAL",this.buffer="",this.decoder=o||new TextDecoder("utf8"),this.regionList=[]};ts.Parser.prototype={reportOrThrowError:function(n){if(n instanceof zn)this.onparsingerror&&this.onparsingerror(n);else throw n},parse:function(n){var t=this;n&&(t.buffer+=t.decoder.decode(n,{stream:!0}));function o(){for(var f=t.buffer,m=0;m<f.length&&f[m]!=="\r"&&f[m]!==`
|
|
30
|
+
`;)++m;var d=f.substr(0,m);return f[m]==="\r"&&++m,f[m]===`
|
|
31
|
+
`&&++m,t.buffer=f.substr(m),d}function a(f){var m=new tl;if(Fs(f,function(h,g){switch(h){case"id":m.set(h,g);break;case"width":m.percent(h,g);break;case"lines":m.integer(h,g);break;case"regionanchor":case"viewportanchor":var p=g.split(",");if(p.length!==2)break;var b=new tl;if(b.percent("x",p[0]),b.percent("y",p[1]),!b.has("x")||!b.has("y"))break;m.set(h+"X",b.get("x")),m.set(h+"Y",b.get("y"));break;case"scroll":m.alt(h,g,["up"]);break}},/=/,/\s/),m.has("id")){var d=new(t.vttjs.VTTRegion||t.window.VTTRegion);d.width=m.get("width",100),d.lines=m.get("lines",3),d.regionAnchorX=m.get("regionanchorX",0),d.regionAnchorY=m.get("regionanchorY",100),d.viewportAnchorX=m.get("viewportanchorX",0),d.viewportAnchorY=m.get("viewportanchorY",100),d.scroll=m.get("scroll",""),t.onregion&&t.onregion(d),t.regionList.push({id:m.get("id"),region:d})}}function i(f){var m=new tl;Fs(f,function(d,h){switch(d){case"MPEGT":m.integer(d+"S",h);break;case"LOCA":m.set(d+"L",Mm(h));break}},/[^\d]:/,/,/),t.ontimestampmap&&t.ontimestampmap({MPEGTS:m.get("MPEGTS"),LOCAL:m.get("LOCAL")})}function s(f){f.match(/X-TIMESTAMP-MAP/)?Fs(f,function(m,d){switch(m){case"X-TIMESTAMP-MAP":i(d);break}},/=/):Fs(f,function(m,d){switch(m){case"Region":a(d);break}},/:/)}try{var l;if(t.state==="INITIAL"){if(!/\r\n|\n/.test(t.buffer))return this;l=o();var r=l.match(/^WEBVTT([ \t].*)?$/);if(!r||!r[0])throw new zn(zn.Errors.BadSignature);t.state="HEADER"}for(var u=!1;t.buffer;){if(!/\r\n|\n/.test(t.buffer))return this;switch(u?u=!1:l=o(),t.state){case"HEADER":/:/.test(l)?s(l):l||(t.state="ID");continue;case"NOTE":l||(t.state="ID");continue;case"ID":if(/^NOTE($|[ \t])/.test(l)){t.state="NOTE";break}if(!l)continue;t.cue=new(t.vttjs.VTTCue||t.window.VTTCue)(0,0,"");try{t.cue.align="center"}catch{t.cue.align="middle"}if(t.state="CUE",l.indexOf("-->")===-1){t.cue.id=l;continue}case"CUE":try{Iz(l,t.cue,t.regionList)}catch(f){t.reportOrThrowError(f),t.cue=null,t.state="BADCUE";continue}t.state="CUETEXT";continue;case"CUETEXT":var c=l.indexOf("-->")!==-1;if(!l||c&&(u=!0)){t.oncue&&t.oncue(t.cue),t.cue=null,t.state="ID";continue}t.cue.text&&(t.cue.text+=`
|
|
32
|
+
`),t.cue.text+=l.replace(/\u2028/g,`
|
|
33
|
+
`).replace(/u2029/g,`
|
|
34
|
+
`);continue;case"BADCUE":l||(t.state="ID");continue}}}catch(f){t.reportOrThrowError(f),t.state==="CUETEXT"&&t.cue&&t.oncue&&t.oncue(t.cue),t.cue=null,t.state=t.state==="INITIAL"?"BADWEBVTT":"BADCUE"}return this},flush:function(){var n=this;try{if(n.buffer+=n.decoder.decode(),(n.cue||n.state==="HEADER")&&(n.buffer+=`
|
|
35
|
+
|
|
36
|
+
`,n.parse()),n.state==="INITIAL")throw new zn(zn.Errors.BadSignature)}catch(t){n.reportOrThrowError(t)}return n.onflush&&n.onflush(),this}};var Wz=ts,Gz="auto",Xz={"":1,lr:1,rl:1},Yz={start:1,center:1,end:1,left:1,right:1,auto:1,"line-left":1,"line-right":1};function Kz(n){if(typeof n!="string")return!1;var t=Xz[n.toLowerCase()];return t?n.toLowerCase():!1}function dc(n){if(typeof n!="string")return!1;var t=Yz[n.toLowerCase()];return t?n.toLowerCase():!1}function kv(n,t,o){this.hasBeenReset=!1;var a="",i=!1,s=n,l=t,r=o,u=null,c="",f=!0,m="auto",d="start",h="auto",g="auto",p=100,b="center";Object.defineProperties(this,{id:{enumerable:!0,get:function(){return a},set:function(_){a=""+_}},pauseOnExit:{enumerable:!0,get:function(){return i},set:function(_){i=!!_}},startTime:{enumerable:!0,get:function(){return s},set:function(_){if(typeof _!="number")throw new TypeError("Start time must be set to a number.");s=_,this.hasBeenReset=!0}},endTime:{enumerable:!0,get:function(){return l},set:function(_){if(typeof _!="number")throw new TypeError("End time must be set to a number.");l=_,this.hasBeenReset=!0}},text:{enumerable:!0,get:function(){return r},set:function(_){r=""+_,this.hasBeenReset=!0}},region:{enumerable:!0,get:function(){return u},set:function(_){u=_,this.hasBeenReset=!0}},vertical:{enumerable:!0,get:function(){return c},set:function(_){var w=Kz(_);if(w===!1)throw new SyntaxError("Vertical: an invalid or illegal direction string was specified.");c=w,this.hasBeenReset=!0}},snapToLines:{enumerable:!0,get:function(){return f},set:function(_){f=!!_,this.hasBeenReset=!0}},line:{enumerable:!0,get:function(){return m},set:function(_){if(typeof _!="number"&&_!==Gz)throw new SyntaxError("Line: an invalid number or illegal string was specified.");m=_,this.hasBeenReset=!0}},lineAlign:{enumerable:!0,get:function(){return d},set:function(_){var w=dc(_);w?(d=w,this.hasBeenReset=!0):console.warn("lineAlign: an invalid or illegal string was specified.")}},position:{enumerable:!0,get:function(){return h},set:function(_){if(_<0||_>100)throw new Error("Position must be between 0 and 100.");h=_,this.hasBeenReset=!0}},positionAlign:{enumerable:!0,get:function(){return g},set:function(_){var w=dc(_);w?(g=w,this.hasBeenReset=!0):console.warn("positionAlign: an invalid or illegal string was specified.")}},size:{enumerable:!0,get:function(){return p},set:function(_){if(_<0||_>100)throw new Error("Size must be between 0 and 100.");p=_,this.hasBeenReset=!0}},align:{enumerable:!0,get:function(){return b},set:function(_){var w=dc(_);if(!w)throw new SyntaxError("align: an invalid or illegal alignment string was specified.");b=w,this.hasBeenReset=!0}}}),this.displayState=void 0}kv.prototype.getCueAsHTML=function(){return WebVTT.convertCueToDOMTree(window,this.text)};var Qz=kv,Jz={"":!0,up:!0};function Zz(n){if(typeof n!="string")return!1;var t=Jz[n.toLowerCase()];return t?n.toLowerCase():!1}function Ts(n){return typeof n=="number"&&n>=0&&n<=100}function eq(){var n=100,t=3,o=0,a=100,i=0,s=100,l="";Object.defineProperties(this,{width:{enumerable:!0,get:function(){return n},set:function(r){if(!Ts(r))throw new Error("Width must be between 0 and 100.");n=r}},lines:{enumerable:!0,get:function(){return t},set:function(r){if(typeof r!="number")throw new TypeError("Lines must be set to a number.");t=r}},regionAnchorY:{enumerable:!0,get:function(){return a},set:function(r){if(!Ts(r))throw new Error("RegionAnchorX must be between 0 and 100.");a=r}},regionAnchorX:{enumerable:!0,get:function(){return o},set:function(r){if(!Ts(r))throw new Error("RegionAnchorY must be between 0 and 100.");o=r}},viewportAnchorY:{enumerable:!0,get:function(){return s},set:function(r){if(!Ts(r))throw new Error("ViewportAnchorY must be between 0 and 100.");s=r}},viewportAnchorX:{enumerable:!0,get:function(){return i},set:function(r){if(!Ts(r))throw new Error("ViewportAnchorX must be between 0 and 100.");i=r}},scroll:{enumerable:!0,get:function(){return l},set:function(r){var u=Zz(r);u===!1?console.warn("Scroll: an invalid or illegal string was specified."):l=u}}})}var tq=eq,Yo=cu,ni=Vv.exports={WebVTT:Wz,VTTCue:Qz,VTTRegion:tq};Yo.vttjs=ni;Yo.WebVTT=ni.WebVTT;var nq=ni.VTTCue,oq=ni.VTTRegion,aq=Yo.VTTCue,iq=Yo.VTTRegion;ni.shim=function(){Yo.VTTCue=nq,Yo.VTTRegion=oq};ni.restore=function(){Yo.VTTCue=aq,Yo.VTTRegion=iq};Yo.VTTCue||ni.shim();var sq=Vv.exports;const of=ti(sq);var af="https://example.com",pu=function(t,o){if(/^[a-z]+:/i.test(o))return o;/^data:/.test(t)&&(t=X.location&&X.location.href||"");var a=/^\/\//.test(t),i=!X.location&&!/\/\//i.test(t);t=new X.URL(t,X.location||af);var s=new URL(o,t);return i?s.href.slice(af.length):a?s.href.slice(s.protocol.length):s.href},Um=function(){function n(){this.listeners={}}var t=n.prototype;return t.on=function(a,i){this.listeners[a]||(this.listeners[a]=[]),this.listeners[a].push(i)},t.off=function(a,i){if(!this.listeners[a])return!1;var s=this.listeners[a].indexOf(i);return this.listeners[a]=this.listeners[a].slice(0),this.listeners[a].splice(s,1),s>-1},t.trigger=function(a){var i=this.listeners[a];if(i)if(arguments.length===2)for(var s=i.length,l=0;l<s;++l)i[l].call(this,arguments[1]);else for(var r=Array.prototype.slice.call(arguments,1),u=i.length,c=0;c<u;++c)i[c].apply(this,r)},t.dispose=function(){this.listeners={}},t.pipe=function(a){this.on("data",function(i){a.push(i)})},n}(),lq=function(t){return X.atob?X.atob(t):Buffer.from(t,"base64").toString("binary")};function Ev(n){for(var t=lq(n),o=new Uint8Array(t.length),a=0;a<t.length;a++)o[a]=t.charCodeAt(a);return o}/*! @name m3u8-parser @version 7.2.0 @license Apache-2.0 */class rq extends Um{constructor(){super(),this.buffer=""}push(t){let o;for(this.buffer+=t,o=this.buffer.indexOf(`
|
|
37
|
+
`);o>-1;o=this.buffer.indexOf(`
|
|
38
|
+
`))this.trigger("data",this.buffer.substring(0,o)),this.buffer=this.buffer.substring(o+1)}}const dq=" ",uc=function(n){const t=/([0-9.]*)?@?([0-9.]*)?/.exec(n||""),o={};return t[1]&&(o.length=parseInt(t[1],10)),t[2]&&(o.offset=parseInt(t[2],10)),o},uq=function(){const o="(?:"+"[^=]*"+")=(?:"+'"[^"]*"|[^,]*'+")";return new RegExp("(?:^|,)("+o+")")},dn=function(n){const t={};if(!n)return t;const o=n.split(uq());let a=o.length,i;for(;a--;)o[a]!==""&&(i=/([^=]*)=(.*)/.exec(o[a]).slice(1),i[0]=i[0].replace(/^\s+|\s+$/g,""),i[1]=i[1].replace(/^\s+|\s+$/g,""),i[1]=i[1].replace(/^['"](.*)['"]$/g,"$1"),t[i[0]]=i[1]);return t},sf=n=>{const t=n.split("x"),o={};return t[0]&&(o.width=parseInt(t[0],10)),t[1]&&(o.height=parseInt(t[1],10)),o};class cq extends Um{constructor(){super(),this.customParsers=[],this.tagMappers=[]}push(t){let o,a;if(t=t.trim(),t.length===0)return;if(t[0]!=="#"){this.trigger("data",{type:"uri",uri:t});return}this.tagMappers.reduce((s,l)=>{const r=l(t);return r===t?s:s.concat([r])},[t]).forEach(s=>{for(let l=0;l<this.customParsers.length;l++)if(this.customParsers[l].call(this,s))return;if(s.indexOf("#EXT")!==0){this.trigger("data",{type:"comment",text:s.slice(1)});return}if(s=s.replace("\r",""),o=/^#EXTM3U/.exec(s),o){this.trigger("data",{type:"tag",tagType:"m3u"});return}if(o=/^#EXTINF:([0-9\.]*)?,?(.*)?$/.exec(s),o){a={type:"tag",tagType:"inf"},o[1]&&(a.duration=parseFloat(o[1])),o[2]&&(a.title=o[2]),this.trigger("data",a);return}if(o=/^#EXT-X-TARGETDURATION:([0-9.]*)?/.exec(s),o){a={type:"tag",tagType:"targetduration"},o[1]&&(a.duration=parseInt(o[1],10)),this.trigger("data",a);return}if(o=/^#EXT-X-VERSION:([0-9.]*)?/.exec(s),o){a={type:"tag",tagType:"version"},o[1]&&(a.version=parseInt(o[1],10)),this.trigger("data",a);return}if(o=/^#EXT-X-MEDIA-SEQUENCE:(\-?[0-9.]*)?/.exec(s),o){a={type:"tag",tagType:"media-sequence"},o[1]&&(a.number=parseInt(o[1],10)),this.trigger("data",a);return}if(o=/^#EXT-X-DISCONTINUITY-SEQUENCE:(\-?[0-9.]*)?/.exec(s),o){a={type:"tag",tagType:"discontinuity-sequence"},o[1]&&(a.number=parseInt(o[1],10)),this.trigger("data",a);return}if(o=/^#EXT-X-PLAYLIST-TYPE:(.*)?$/.exec(s),o){a={type:"tag",tagType:"playlist-type"},o[1]&&(a.playlistType=o[1]),this.trigger("data",a);return}if(o=/^#EXT-X-BYTERANGE:(.*)?$/.exec(s),o){a=kt(uc(o[1]),{type:"tag",tagType:"byterange"}),this.trigger("data",a);return}if(o=/^#EXT-X-ALLOW-CACHE:(YES|NO)?/.exec(s),o){a={type:"tag",tagType:"allow-cache"},o[1]&&(a.allowed=!/NO/.test(o[1])),this.trigger("data",a);return}if(o=/^#EXT-X-MAP:(.*)$/.exec(s),o){if(a={type:"tag",tagType:"map"},o[1]){const l=dn(o[1]);l.URI&&(a.uri=l.URI),l.BYTERANGE&&(a.byterange=uc(l.BYTERANGE))}this.trigger("data",a);return}if(o=/^#EXT-X-STREAM-INF:(.*)$/.exec(s),o){a={type:"tag",tagType:"stream-inf"},o[1]&&(a.attributes=dn(o[1]),a.attributes.RESOLUTION&&(a.attributes.RESOLUTION=sf(a.attributes.RESOLUTION)),a.attributes.BANDWIDTH&&(a.attributes.BANDWIDTH=parseInt(a.attributes.BANDWIDTH,10)),a.attributes["FRAME-RATE"]&&(a.attributes["FRAME-RATE"]=parseFloat(a.attributes["FRAME-RATE"])),a.attributes["PROGRAM-ID"]&&(a.attributes["PROGRAM-ID"]=parseInt(a.attributes["PROGRAM-ID"],10))),this.trigger("data",a);return}if(o=/^#EXT-X-MEDIA:(.*)$/.exec(s),o){a={type:"tag",tagType:"media"},o[1]&&(a.attributes=dn(o[1])),this.trigger("data",a);return}if(o=/^#EXT-X-ENDLIST/.exec(s),o){this.trigger("data",{type:"tag",tagType:"endlist"});return}if(o=/^#EXT-X-DISCONTINUITY/.exec(s),o){this.trigger("data",{type:"tag",tagType:"discontinuity"});return}if(o=/^#EXT-X-PROGRAM-DATE-TIME:(.*)$/.exec(s),o){a={type:"tag",tagType:"program-date-time"},o[1]&&(a.dateTimeString=o[1],a.dateTimeObject=new Date(o[1])),this.trigger("data",a);return}if(o=/^#EXT-X-KEY:(.*)$/.exec(s),o){a={type:"tag",tagType:"key"},o[1]&&(a.attributes=dn(o[1]),a.attributes.IV&&(a.attributes.IV.substring(0,2).toLowerCase()==="0x"&&(a.attributes.IV=a.attributes.IV.substring(2)),a.attributes.IV=a.attributes.IV.match(/.{8}/g),a.attributes.IV[0]=parseInt(a.attributes.IV[0],16),a.attributes.IV[1]=parseInt(a.attributes.IV[1],16),a.attributes.IV[2]=parseInt(a.attributes.IV[2],16),a.attributes.IV[3]=parseInt(a.attributes.IV[3],16),a.attributes.IV=new Uint32Array(a.attributes.IV))),this.trigger("data",a);return}if(o=/^#EXT-X-START:(.*)$/.exec(s),o){a={type:"tag",tagType:"start"},o[1]&&(a.attributes=dn(o[1]),a.attributes["TIME-OFFSET"]=parseFloat(a.attributes["TIME-OFFSET"]),a.attributes.PRECISE=/YES/.test(a.attributes.PRECISE)),this.trigger("data",a);return}if(o=/^#EXT-X-CUE-OUT-CONT:(.*)?$/.exec(s),o){a={type:"tag",tagType:"cue-out-cont"},o[1]?a.data=o[1]:a.data="",this.trigger("data",a);return}if(o=/^#EXT-X-CUE-OUT:(.*)?$/.exec(s),o){a={type:"tag",tagType:"cue-out"},o[1]?a.data=o[1]:a.data="",this.trigger("data",a);return}if(o=/^#EXT-X-CUE-IN:?(.*)?$/.exec(s),o){a={type:"tag",tagType:"cue-in"},o[1]?a.data=o[1]:a.data="",this.trigger("data",a);return}if(o=/^#EXT-X-SKIP:(.*)$/.exec(s),o&&o[1]){a={type:"tag",tagType:"skip"},a.attributes=dn(o[1]),a.attributes.hasOwnProperty("SKIPPED-SEGMENTS")&&(a.attributes["SKIPPED-SEGMENTS"]=parseInt(a.attributes["SKIPPED-SEGMENTS"],10)),a.attributes.hasOwnProperty("RECENTLY-REMOVED-DATERANGES")&&(a.attributes["RECENTLY-REMOVED-DATERANGES"]=a.attributes["RECENTLY-REMOVED-DATERANGES"].split(dq)),this.trigger("data",a);return}if(o=/^#EXT-X-PART:(.*)$/.exec(s),o&&o[1]){a={type:"tag",tagType:"part"},a.attributes=dn(o[1]),["DURATION"].forEach(function(l){a.attributes.hasOwnProperty(l)&&(a.attributes[l]=parseFloat(a.attributes[l]))}),["INDEPENDENT","GAP"].forEach(function(l){a.attributes.hasOwnProperty(l)&&(a.attributes[l]=/YES/.test(a.attributes[l]))}),a.attributes.hasOwnProperty("BYTERANGE")&&(a.attributes.byterange=uc(a.attributes.BYTERANGE)),this.trigger("data",a);return}if(o=/^#EXT-X-SERVER-CONTROL:(.*)$/.exec(s),o&&o[1]){a={type:"tag",tagType:"server-control"},a.attributes=dn(o[1]),["CAN-SKIP-UNTIL","PART-HOLD-BACK","HOLD-BACK"].forEach(function(l){a.attributes.hasOwnProperty(l)&&(a.attributes[l]=parseFloat(a.attributes[l]))}),["CAN-SKIP-DATERANGES","CAN-BLOCK-RELOAD"].forEach(function(l){a.attributes.hasOwnProperty(l)&&(a.attributes[l]=/YES/.test(a.attributes[l]))}),this.trigger("data",a);return}if(o=/^#EXT-X-PART-INF:(.*)$/.exec(s),o&&o[1]){a={type:"tag",tagType:"part-inf"},a.attributes=dn(o[1]),["PART-TARGET"].forEach(function(l){a.attributes.hasOwnProperty(l)&&(a.attributes[l]=parseFloat(a.attributes[l]))}),this.trigger("data",a);return}if(o=/^#EXT-X-PRELOAD-HINT:(.*)$/.exec(s),o&&o[1]){a={type:"tag",tagType:"preload-hint"},a.attributes=dn(o[1]),["BYTERANGE-START","BYTERANGE-LENGTH"].forEach(function(l){if(a.attributes.hasOwnProperty(l)){a.attributes[l]=parseInt(a.attributes[l],10);const r=l==="BYTERANGE-LENGTH"?"length":"offset";a.attributes.byterange=a.attributes.byterange||{},a.attributes.byterange[r]=a.attributes[l],delete a.attributes[l]}}),this.trigger("data",a);return}if(o=/^#EXT-X-RENDITION-REPORT:(.*)$/.exec(s),o&&o[1]){a={type:"tag",tagType:"rendition-report"},a.attributes=dn(o[1]),["LAST-MSN","LAST-PART"].forEach(function(l){a.attributes.hasOwnProperty(l)&&(a.attributes[l]=parseInt(a.attributes[l],10))}),this.trigger("data",a);return}if(o=/^#EXT-X-DATERANGE:(.*)$/.exec(s),o&&o[1]){a={type:"tag",tagType:"daterange"},a.attributes=dn(o[1]),["ID","CLASS"].forEach(function(r){a.attributes.hasOwnProperty(r)&&(a.attributes[r]=String(a.attributes[r]))}),["START-DATE","END-DATE"].forEach(function(r){a.attributes.hasOwnProperty(r)&&(a.attributes[r]=new Date(a.attributes[r]))}),["DURATION","PLANNED-DURATION"].forEach(function(r){a.attributes.hasOwnProperty(r)&&(a.attributes[r]=parseFloat(a.attributes[r]))}),["END-ON-NEXT"].forEach(function(r){a.attributes.hasOwnProperty(r)&&(a.attributes[r]=/YES/i.test(a.attributes[r]))}),["SCTE35-CMD"," SCTE35-OUT","SCTE35-IN"].forEach(function(r){a.attributes.hasOwnProperty(r)&&(a.attributes[r]=a.attributes[r].toString(16))});const l=/^X-([A-Z]+-)+[A-Z]+$/;for(const r in a.attributes){if(!l.test(r))continue;const u=/[0-9A-Fa-f]{6}/g.test(a.attributes[r]),c=/^\d+(\.\d+)?$/.test(a.attributes[r]);a.attributes[r]=u?a.attributes[r].toString(16):c?parseFloat(a.attributes[r]):String(a.attributes[r])}this.trigger("data",a);return}if(o=/^#EXT-X-INDEPENDENT-SEGMENTS/.exec(s),o){this.trigger("data",{type:"tag",tagType:"independent-segments"});return}if(o=/^#EXT-X-I-FRAMES-ONLY/.exec(s),o){this.trigger("data",{type:"tag",tagType:"i-frames-only"});return}if(o=/^#EXT-X-CONTENT-STEERING:(.*)$/.exec(s),o){a={type:"tag",tagType:"content-steering"},a.attributes=dn(o[1]),this.trigger("data",a);return}if(o=/^#EXT-X-I-FRAME-STREAM-INF:(.*)$/.exec(s),o){a={type:"tag",tagType:"i-frame-playlist"},a.attributes=dn(o[1]),a.attributes.URI&&(a.uri=a.attributes.URI),a.attributes.BANDWIDTH&&(a.attributes.BANDWIDTH=parseInt(a.attributes.BANDWIDTH,10)),a.attributes.RESOLUTION&&(a.attributes.RESOLUTION=sf(a.attributes.RESOLUTION)),a.attributes["AVERAGE-BANDWIDTH"]&&(a.attributes["AVERAGE-BANDWIDTH"]=parseInt(a.attributes["AVERAGE-BANDWIDTH"],10)),a.attributes["FRAME-RATE"]&&(a.attributes["FRAME-RATE"]=parseFloat(a.attributes["FRAME-RATE"])),this.trigger("data",a);return}if(o=/^#EXT-X-DEFINE:(.*)$/.exec(s),o){a={type:"tag",tagType:"define"},a.attributes=dn(o[1]),this.trigger("data",a);return}this.trigger("data",{type:"tag",data:s.slice(4)})})}addParser({expression:t,customType:o,dataParser:a,segment:i}){typeof a!="function"&&(a=s=>s),this.customParsers.push(s=>{if(t.exec(s))return this.trigger("data",{type:"custom",data:a(s),customType:o,segment:i}),!0})}addTagMapper({expression:t,map:o}){const a=i=>t.test(i)?o(i):i;this.tagMappers.push(a)}}const mq=n=>n.toLowerCase().replace(/-(\w)/g,t=>t[1].toUpperCase()),da=function(n){const t={};return Object.keys(n).forEach(function(o){t[mq(o)]=n[o]}),t},cc=function(n){const{serverControl:t,targetDuration:o,partTargetDuration:a}=n;if(!t)return;const i="#EXT-X-SERVER-CONTROL",s="holdBack",l="partHoldBack",r=o&&o*3,u=a&&a*2;o&&!t.hasOwnProperty(s)&&(t[s]=r,this.trigger("info",{message:`${i} defaulting HOLD-BACK to targetDuration * 3 (${r}).`})),r&&t[s]<r&&(this.trigger("warn",{message:`${i} clamping HOLD-BACK (${t[s]}) to targetDuration * 3 (${r})`}),t[s]=r),a&&!t.hasOwnProperty(l)&&(t[l]=a*3,this.trigger("info",{message:`${i} defaulting PART-HOLD-BACK to partTargetDuration * 3 (${t[l]}).`})),a&&t[l]<u&&(this.trigger("warn",{message:`${i} clamping PART-HOLD-BACK (${t[l]}) to partTargetDuration * 2 (${u}).`}),t[l]=u)};class pq extends Um{constructor(t={}){super(),this.lineStream=new rq,this.parseStream=new cq,this.lineStream.pipe(this.parseStream),this.mainDefinitions=t.mainDefinitions||{},this.params=new URL(t.uri,"https://a.com").searchParams,this.lastProgramDateTime=null;const o=this,a=[];let i={},s,l,r=!1;const u=function(){},c={AUDIO:{},VIDEO:{},"CLOSED-CAPTIONS":{},SUBTITLES:{}},f="urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed";let m=0;this.manifest={allowCache:!0,discontinuityStarts:[],dateRanges:[],iFramePlaylists:[],segments:[]};let d=0,h=0;const g={};this.on("end",()=>{i.uri||!i.parts&&!i.preloadHints||(!i.map&&s&&(i.map=s),!i.key&&l&&(i.key=l),!i.timeline&&typeof m=="number"&&(i.timeline=m),this.manifest.preloadSegment=i)}),this.parseStream.on("data",function(p){let b,_;if(o.manifest.definitions){for(const w in o.manifest.definitions)if(p.uri&&(p.uri=p.uri.replace(`{$${w}}`,o.manifest.definitions[w])),p.attributes)for(const v in p.attributes)typeof p.attributes[v]=="string"&&(p.attributes[v]=p.attributes[v].replace(`{$${w}}`,o.manifest.definitions[w]))}({tag(){({version(){p.version&&(this.manifest.version=p.version)},"allow-cache"(){this.manifest.allowCache=p.allowed,"allowed"in p||(this.trigger("info",{message:"defaulting allowCache to YES"}),this.manifest.allowCache=!0)},byterange(){const w={};"length"in p&&(i.byterange=w,w.length=p.length,"offset"in p||(p.offset=d)),"offset"in p&&(i.byterange=w,w.offset=p.offset),d=w.offset+w.length},endlist(){this.manifest.endList=!0},inf(){"mediaSequence"in this.manifest||(this.manifest.mediaSequence=0,this.trigger("info",{message:"defaulting media sequence to zero"})),"discontinuitySequence"in this.manifest||(this.manifest.discontinuitySequence=0,this.trigger("info",{message:"defaulting discontinuity sequence to zero"})),p.title&&(i.title=p.title),p.duration>0&&(i.duration=p.duration),p.duration===0&&(i.duration=.01,this.trigger("info",{message:"updating zero segment duration to a small value"})),this.manifest.segments=a},key(){if(!p.attributes){this.trigger("warn",{message:"ignoring key declaration without attribute list"});return}if(p.attributes.METHOD==="NONE"){l=null;return}if(!p.attributes.URI){this.trigger("warn",{message:"ignoring key declaration without URI"});return}if(p.attributes.KEYFORMAT==="com.apple.streamingkeydelivery"){this.manifest.contentProtection=this.manifest.contentProtection||{},this.manifest.contentProtection["com.apple.fps.1_0"]={attributes:p.attributes};return}if(p.attributes.KEYFORMAT==="com.microsoft.playready"){this.manifest.contentProtection=this.manifest.contentProtection||{},this.manifest.contentProtection["com.microsoft.playready"]={uri:p.attributes.URI};return}if(p.attributes.KEYFORMAT===f){if(["SAMPLE-AES","SAMPLE-AES-CTR","SAMPLE-AES-CENC"].indexOf(p.attributes.METHOD)===-1){this.trigger("warn",{message:"invalid key method provided for Widevine"});return}if(p.attributes.METHOD==="SAMPLE-AES-CENC"&&this.trigger("warn",{message:"SAMPLE-AES-CENC is deprecated, please use SAMPLE-AES-CTR instead"}),p.attributes.URI.substring(0,23)!=="data:text/plain;base64,"){this.trigger("warn",{message:"invalid key URI provided for Widevine"});return}if(!(p.attributes.KEYID&&p.attributes.KEYID.substring(0,2)==="0x")){this.trigger("warn",{message:"invalid key ID provided for Widevine"});return}this.manifest.contentProtection=this.manifest.contentProtection||{},this.manifest.contentProtection["com.widevine.alpha"]={attributes:{schemeIdUri:p.attributes.KEYFORMAT,keyId:p.attributes.KEYID.substring(2)},pssh:Ev(p.attributes.URI.split(",")[1])};return}p.attributes.METHOD||this.trigger("warn",{message:"defaulting key method to AES-128"}),l={method:p.attributes.METHOD||"AES-128",uri:p.attributes.URI},typeof p.attributes.IV<"u"&&(l.iv=p.attributes.IV)},"media-sequence"(){if(!isFinite(p.number)){this.trigger("warn",{message:"ignoring invalid media sequence: "+p.number});return}this.manifest.mediaSequence=p.number},"discontinuity-sequence"(){if(!isFinite(p.number)){this.trigger("warn",{message:"ignoring invalid discontinuity sequence: "+p.number});return}this.manifest.discontinuitySequence=p.number,m=p.number},"playlist-type"(){if(!/VOD|EVENT/.test(p.playlistType)){this.trigger("warn",{message:"ignoring unknown playlist type: "+p.playlist});return}this.manifest.playlistType=p.playlistType},map(){s={},p.uri&&(s.uri=p.uri),p.byterange&&(s.byterange=p.byterange),l&&(s.key=l)},"stream-inf"(){if(this.manifest.playlists=a,this.manifest.mediaGroups=this.manifest.mediaGroups||c,!p.attributes){this.trigger("warn",{message:"ignoring empty stream-inf attributes"});return}i.attributes||(i.attributes={}),kt(i.attributes,p.attributes)},media(){if(this.manifest.mediaGroups=this.manifest.mediaGroups||c,!(p.attributes&&p.attributes.TYPE&&p.attributes["GROUP-ID"]&&p.attributes.NAME)){this.trigger("warn",{message:"ignoring incomplete or missing media group"});return}const w=this.manifest.mediaGroups[p.attributes.TYPE];w[p.attributes["GROUP-ID"]]=w[p.attributes["GROUP-ID"]]||{},b=w[p.attributes["GROUP-ID"]],_={default:/yes/i.test(p.attributes.DEFAULT)},_.default?_.autoselect=!0:_.autoselect=/yes/i.test(p.attributes.AUTOSELECT),p.attributes.LANGUAGE&&(_.language=p.attributes.LANGUAGE),p.attributes.URI&&(_.uri=p.attributes.URI),p.attributes["INSTREAM-ID"]&&(_.instreamId=p.attributes["INSTREAM-ID"]),p.attributes.CHARACTERISTICS&&(_.characteristics=p.attributes.CHARACTERISTICS),p.attributes.FORCED&&(_.forced=/yes/i.test(p.attributes.FORCED)),b[p.attributes.NAME]=_},discontinuity(){m+=1,i.discontinuity=!0,this.manifest.discontinuityStarts.push(a.length)},"program-date-time"(){typeof this.manifest.dateTimeString>"u"&&(this.manifest.dateTimeString=p.dateTimeString,this.manifest.dateTimeObject=p.dateTimeObject),i.dateTimeString=p.dateTimeString,i.dateTimeObject=p.dateTimeObject;const{lastProgramDateTime:w}=this;this.lastProgramDateTime=new Date(p.dateTimeString).getTime(),w===null&&this.manifest.segments.reduceRight((v,V)=>(V.programDateTime=v-V.duration*1e3,V.programDateTime),this.lastProgramDateTime)},targetduration(){if(!isFinite(p.duration)||p.duration<0){this.trigger("warn",{message:"ignoring invalid target duration: "+p.duration});return}this.manifest.targetDuration=p.duration,cc.call(this,this.manifest)},start(){if(!p.attributes||isNaN(p.attributes["TIME-OFFSET"])){this.trigger("warn",{message:"ignoring start declaration without appropriate attribute list"});return}this.manifest.start={timeOffset:p.attributes["TIME-OFFSET"],precise:p.attributes.PRECISE}},"cue-out"(){i.cueOut=p.data},"cue-out-cont"(){i.cueOutCont=p.data},"cue-in"(){i.cueIn=p.data},skip(){this.manifest.skip=da(p.attributes),this.warnOnMissingAttributes_("#EXT-X-SKIP",p.attributes,["SKIPPED-SEGMENTS"])},part(){r=!0;const w=this.manifest.segments.length,v=da(p.attributes);i.parts=i.parts||[],i.parts.push(v),v.byterange&&(v.byterange.hasOwnProperty("offset")||(v.byterange.offset=h),h=v.byterange.offset+v.byterange.length);const V=i.parts.length-1;this.warnOnMissingAttributes_(`#EXT-X-PART #${V} for segment #${w}`,p.attributes,["URI","DURATION"]),this.manifest.renditionReports&&this.manifest.renditionReports.forEach((C,S)=>{C.hasOwnProperty("lastPart")||this.trigger("warn",{message:`#EXT-X-RENDITION-REPORT #${S} lacks required attribute(s): LAST-PART`})})},"server-control"(){const w=this.manifest.serverControl=da(p.attributes);w.hasOwnProperty("canBlockReload")||(w.canBlockReload=!1,this.trigger("info",{message:"#EXT-X-SERVER-CONTROL defaulting CAN-BLOCK-RELOAD to false"})),cc.call(this,this.manifest),w.canSkipDateranges&&!w.hasOwnProperty("canSkipUntil")&&this.trigger("warn",{message:"#EXT-X-SERVER-CONTROL lacks required attribute CAN-SKIP-UNTIL which is required when CAN-SKIP-DATERANGES is set"})},"preload-hint"(){const w=this.manifest.segments.length,v=da(p.attributes),V=v.type&&v.type==="PART";i.preloadHints=i.preloadHints||[],i.preloadHints.push(v),v.byterange&&(v.byterange.hasOwnProperty("offset")||(v.byterange.offset=V?h:0,V&&(h=v.byterange.offset+v.byterange.length)));const C=i.preloadHints.length-1;if(this.warnOnMissingAttributes_(`#EXT-X-PRELOAD-HINT #${C} for segment #${w}`,p.attributes,["TYPE","URI"]),!!v.type)for(let S=0;S<i.preloadHints.length-1;S++){const N=i.preloadHints[S];N.type&&N.type===v.type&&this.trigger("warn",{message:`#EXT-X-PRELOAD-HINT #${C} for segment #${w} has the same TYPE ${v.type} as preload hint #${S}`})}},"rendition-report"(){const w=da(p.attributes);this.manifest.renditionReports=this.manifest.renditionReports||[],this.manifest.renditionReports.push(w);const v=this.manifest.renditionReports.length-1,V=["LAST-MSN","URI"];r&&V.push("LAST-PART"),this.warnOnMissingAttributes_(`#EXT-X-RENDITION-REPORT #${v}`,p.attributes,V)},"part-inf"(){this.manifest.partInf=da(p.attributes),this.warnOnMissingAttributes_("#EXT-X-PART-INF",p.attributes,["PART-TARGET"]),this.manifest.partInf.partTarget&&(this.manifest.partTargetDuration=this.manifest.partInf.partTarget),cc.call(this,this.manifest)},daterange(){this.manifest.dateRanges.push(da(p.attributes));const w=this.manifest.dateRanges.length-1;this.warnOnMissingAttributes_(`#EXT-X-DATERANGE #${w}`,p.attributes,["ID","START-DATE"]);const v=this.manifest.dateRanges[w];v.endDate&&v.startDate&&new Date(v.endDate)<new Date(v.startDate)&&this.trigger("warn",{message:"EXT-X-DATERANGE END-DATE must be equal to or later than the value of the START-DATE"}),v.duration&&v.duration<0&&this.trigger("warn",{message:"EXT-X-DATERANGE DURATION must not be negative"}),v.plannedDuration&&v.plannedDuration<0&&this.trigger("warn",{message:"EXT-X-DATERANGE PLANNED-DURATION must not be negative"});const V=!!v.endOnNext;if(V&&!v.class&&this.trigger("warn",{message:"EXT-X-DATERANGE with an END-ON-NEXT=YES attribute must have a CLASS attribute"}),V&&(v.duration||v.endDate)&&this.trigger("warn",{message:"EXT-X-DATERANGE with an END-ON-NEXT=YES attribute must not contain DURATION or END-DATE attributes"}),v.duration&&v.endDate){const S=v.startDate.getTime()+v.duration*1e3;this.manifest.dateRanges[w].endDate=new Date(S)}if(!g[v.id])g[v.id]=v;else{for(const S in g[v.id])if(v[S]&&JSON.stringify(g[v.id][S])!==JSON.stringify(v[S])){this.trigger("warn",{message:"EXT-X-DATERANGE tags with the same ID in a playlist must have the same attributes values"});break}const C=this.manifest.dateRanges.findIndex(S=>S.id===v.id);this.manifest.dateRanges[C]=kt(this.manifest.dateRanges[C],v),g[v.id]=kt(g[v.id],v),this.manifest.dateRanges.pop()}},"independent-segments"(){this.manifest.independentSegments=!0},"i-frames-only"(){this.manifest.iFramesOnly=!0,this.requiredCompatibilityversion(this.manifest.version,4)},"content-steering"(){this.manifest.contentSteering=da(p.attributes),this.warnOnMissingAttributes_("#EXT-X-CONTENT-STEERING",p.attributes,["SERVER-URI"])},define(){this.manifest.definitions=this.manifest.definitions||{};const w=(v,V)=>{if(v in this.manifest.definitions){this.trigger("error",{message:`EXT-X-DEFINE: Duplicate name ${v}`});return}this.manifest.definitions[v]=V};if("QUERYPARAM"in p.attributes){if("NAME"in p.attributes||"IMPORT"in p.attributes){this.trigger("error",{message:"EXT-X-DEFINE: Invalid attributes"});return}const v=this.params.get(p.attributes.QUERYPARAM);if(!v){this.trigger("error",{message:`EXT-X-DEFINE: No query param ${p.attributes.QUERYPARAM}`});return}w(p.attributes.QUERYPARAM,decodeURIComponent(v));return}if("NAME"in p.attributes){if("IMPORT"in p.attributes){this.trigger("error",{message:"EXT-X-DEFINE: Invalid attributes"});return}if(!("VALUE"in p.attributes)||typeof p.attributes.VALUE!="string"){this.trigger("error",{message:`EXT-X-DEFINE: No value for ${p.attributes.NAME}`});return}w(p.attributes.NAME,p.attributes.VALUE);return}if("IMPORT"in p.attributes){if(!this.mainDefinitions[p.attributes.IMPORT]){this.trigger("error",{message:`EXT-X-DEFINE: No value ${p.attributes.IMPORT} to import, or IMPORT used on main playlist`});return}w(p.attributes.IMPORT,this.mainDefinitions[p.attributes.IMPORT]);return}this.trigger("error",{message:"EXT-X-DEFINE: No attribute"})},"i-frame-playlist"(){this.manifest.iFramePlaylists.push({attributes:p.attributes,uri:p.uri,timeline:m}),this.warnOnMissingAttributes_("#EXT-X-I-FRAME-STREAM-INF",p.attributes,["BANDWIDTH","URI"])}}[p.tagType]||u).call(o)},uri(){i.uri=p.uri,a.push(i),this.manifest.targetDuration&&!("duration"in i)&&(this.trigger("warn",{message:"defaulting segment duration to the target duration"}),i.duration=this.manifest.targetDuration),l&&(i.key=l),i.timeline=m,s&&(i.map=s),h=0,this.lastProgramDateTime!==null&&(i.programDateTime=this.lastProgramDateTime,this.lastProgramDateTime+=i.duration*1e3),i={}},comment(){},custom(){p.segment?(i.custom=i.custom||{},i.custom[p.customType]=p.data):(this.manifest.custom=this.manifest.custom||{},this.manifest.custom[p.customType]=p.data)}})[p.type].call(o)})}requiredCompatibilityversion(t,o){(t<o||!t)&&this.trigger("warn",{message:`manifest must be at least version ${o}`})}warnOnMissingAttributes_(t,o,a){const i=[];a.forEach(function(s){o.hasOwnProperty(s)||i.push(s)}),i.length&&this.trigger("warn",{message:`${t} lacks required attribute(s): ${i.join(", ")}`})}push(t){this.lineStream.push(t)}end(){this.lineStream.push(`
|
|
39
|
+
`),this.manifest.dateRanges.length&&this.lastProgramDateTime===null&&this.trigger("warn",{message:"A playlist with EXT-X-DATERANGE tag must contain atleast one EXT-X-PROGRAM-DATE-TIME tag"}),this.lastProgramDateTime=null,this.trigger("end")}addParser(t){this.parseStream.addParser(t)}addTagMapper(t){this.parseStream.addTagMapper(t)}}var za={mp4:/^(av0?1|avc0?[1234]|vp0?9|flac|opus|mp3|mp4a|mp4v|stpp.ttml.im1t)/,webm:/^(vp0?[89]|av0?1|opus|vorbis)/,ogg:/^(vp0?[89]|theora|flac|opus|vorbis)/,video:/^(av0?1|avc0?[1234]|vp0?[89]|hvc1|hev1|theora|mp4v)/,audio:/^(mp4a|flac|vorbis|opus|ac-[34]|ec-3|alac|mp3|speex|aac)/,text:/^(stpp.ttml.im1t)/,muxerVideo:/^(avc0?1)/,muxerAudio:/^(mp4a)/,muxerText:/a^/},hq=["video","audio","text"],lf=["Video","Audio","Text"],Tv=function(t){return t&&t.replace(/avc1\.(\d+)\.(\d+)/i,function(o,a,i){var s=("00"+Number(a).toString(16)).slice(-2),l=("00"+Number(i).toString(16)).slice(-2);return"avc1."+s+"00"+l})},xo=function(t){t===void 0&&(t="");var o=t.split(","),a=[];return o.forEach(function(i){i=i.trim();var s;hq.forEach(function(l){var r=za[l].exec(i.toLowerCase());if(!(!r||r.length<=1)){s=l;var u=i.substring(0,r[1].length),c=i.replace(u,"");a.push({type:u,details:c,mediaType:l})}}),s||a.push({type:i,details:"",mediaType:"unknown"})}),a},fq=function(t,o){if(!t.mediaGroups.AUDIO||!o)return null;var a=t.mediaGroups.AUDIO[o];if(!a)return null;for(var i in a){var s=a[i];if(s.default&&s.playlists)return xo(s.playlists[0].attributes.CODECS)}return null},Nv=function(t){return t===void 0&&(t=""),za.audio.test(t.trim().toLowerCase())},gq=function(t){return t===void 0&&(t=""),za.text.test(t.trim().toLowerCase())},Fi=function(t){if(!(!t||typeof t!="string")){var o=t.toLowerCase().split(",").map(function(s){return Tv(s.trim())}),a="video";o.length===1&&Nv(o[0])?a="audio":o.length===1&&gq(o[0])&&(a="application");var i="mp4";return o.every(function(s){return za.mp4.test(s)})?i="mp4":o.every(function(s){return za.webm.test(s)})?i="webm":o.every(function(s){return za.ogg.test(s)})&&(i="ogg"),a+"/"+i+';codecs="'+t+'"'}},nl=function(t,o){return t===void 0&&(t=""),o===void 0&&(o=!1),X.MediaSource&&X.MediaSource.isTypeSupported&&X.MediaSource.isTypeSupported(Fi(t))||o&&X.ManagedMediaSource&&X.ManagedMediaSource.isTypeSupported&&X.ManagedMediaSource.isTypeSupported(Fi(t))||!1},mc=function(t){return t===void 0&&(t=""),t.toLowerCase().split(",").every(function(o){o=o.trim();for(var a=0;a<lf.length;a++){var i=lf[a];if(za["muxer"+i].test(o))return!0}return!1})},rf="mp4a.40.2",vq="avc1.4d400d",yq=/^(audio|video|application)\/(x-|vnd\.apple\.)?mpegurl/i,_q=/^application\/dash\+xml/i,Sv=function(t){return yq.test(t)?"hls":_q.test(t)?"dash":t==="application/vnd.videojs.vhs+json"?"vhs-json":null},bq=function(t){return t.toString(2).length},wq=function(t){return Math.ceil(bq(t)/8)},Bv=function(t){return ArrayBuffer.isView==="function"?ArrayBuffer.isView(t):t&&t.buffer instanceof ArrayBuffer},xq=function(t){return Bv(t)},$e=function(t){return t instanceof Uint8Array?t:(!Array.isArray(t)&&!xq(t)&&!(t instanceof ArrayBuffer)&&(typeof t!="number"||typeof t=="number"&&t!==t?t=0:t=[t]),new Uint8Array(t&&t.buffer||t,t&&t.byteOffset||0,t&&t.byteLength||0))},Xt=X.BigInt||Number,qc=[Xt("0x1"),Xt("0x100"),Xt("0x10000"),Xt("0x1000000"),Xt("0x100000000"),Xt("0x10000000000"),Xt("0x1000000000000"),Xt("0x100000000000000"),Xt("0x10000000000000000")];(function(){var n=new Uint16Array([65484]),t=new Uint8Array(n.buffer,n.byteOffset,n.byteLength);return t[0]===255?"big":t[0]===204?"little":"unknown"})();var Vq=function(t,o){var a=o===void 0?{}:o,i=a.signed,s=i===void 0?!1:i,l=a.le,r=l===void 0?!1:l;t=$e(t);var u=r?"reduce":"reduceRight",c=t[u]?t[u]:Array.prototype[u],f=c.call(t,function(d,h,g){var p=r?g:Math.abs(g+1-t.length);return d+Xt(h)*qc[p]},Xt(0));if(s){var m=qc[t.length]/Xt(2)-Xt(1);f=Xt(f),f>m&&(f-=m,f-=m,f-=Xt(2))}return Number(f)},Cq=function(t,o){var a={},i=a.le,s=i===void 0?!1:i;(typeof t!="bigint"&&typeof t!="number"||typeof t=="number"&&t!==t)&&(t=0),t=Xt(t);for(var l=wq(t),r=new Uint8Array(new ArrayBuffer(l)),u=0;u<l;u++){var c=s?u:Math.abs(u+1-r.length);r[c]=Number(t/qc[u]&Xt(255)),t<0&&(r[c]=Math.abs(~r[c]),r[c]-=u===0?1:2)}return r},Dv=function(t,o){if(typeof t!="string"&&t&&typeof t.toString=="function"&&(t=t.toString()),typeof t!="string")return new Uint8Array;o||(t=unescape(encodeURIComponent(t)));for(var a=new Uint8Array(t.length),i=0;i<t.length;i++)a[i]=t.charCodeAt(i);return a},kq=function(){for(var t=arguments.length,o=new Array(t),a=0;a<t;a++)o[a]=arguments[a];if(o=o.filter(function(r){return r&&(r.byteLength||r.length)&&typeof r!="string"}),o.length<=1)return $e(o[0]);var i=o.reduce(function(r,u,c){return r+(u.byteLength||u.length)},0),s=new Uint8Array(i),l=0;return o.forEach(function(r){r=$e(r),s.set(r,l),l+=r.byteLength}),s},yt=function(t,o,a){var i=a===void 0?{}:a,s=i.offset,l=s===void 0?0:s,r=i.mask,u=r===void 0?[]:r;t=$e(t),o=$e(o);var c=o.every?o.every:Array.prototype.every;return o.length&&t.length-l>=o.length&&c.call(o,function(f,m){var d=u[m]?u[m]&t[l+m]:t[l+m];return f===d})},Eq=function(t,o,a){o.forEach(function(i){for(var s in t.mediaGroups[i])for(var l in t.mediaGroups[i][s]){var r=t.mediaGroups[i][s][l];a(r,i,s,l)}})},ka={},ea={};function Tq(n,t,o){if(o===void 0&&(o=Array.prototype),n&&typeof o.find=="function")return o.find.call(n,t);for(var a=0;a<n.length;a++)if(Object.prototype.hasOwnProperty.call(n,a)){var i=n[a];if(t.call(void 0,i,a,n))return i}}function Rm(n,t){return t===void 0&&(t=Object),t&&typeof t.freeze=="function"?t.freeze(n):n}function Nq(n,t){if(n===null||typeof n!="object")throw new TypeError("target is not an object");for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&(n[o]=t[o]);return n}var Pv=Rm({HTML:"text/html",isHTML:function(n){return n===Pv.HTML},XML_APPLICATION:"application/xml",XML_TEXT:"text/xml",XML_XHTML_APPLICATION:"application/xhtml+xml",XML_SVG_IMAGE:"image/svg+xml"}),$v=Rm({HTML:"http://www.w3.org/1999/xhtml",isHTML:function(n){return n===$v.HTML},SVG:"http://www.w3.org/2000/svg",XML:"http://www.w3.org/XML/1998/namespace",XMLNS:"http://www.w3.org/2000/xmlns/"});ea.assign=Nq;ea.find=Tq;ea.freeze=Rm;ea.MIME_TYPE=Pv;ea.NAMESPACE=$v;var Av=ea,Bo=Av.find,pl=Av.NAMESPACE;function Sq(n){return n!==""}function Bq(n){return n?n.split(/[\t\n\f\r ]+/).filter(Sq):[]}function Dq(n,t){return n.hasOwnProperty(t)||(n[t]=!0),n}function df(n){if(!n)return[];var t=Bq(n);return Object.keys(t.reduce(Dq,{}))}function Pq(n){return function(t){return n&&n.indexOf(t)!==-1}}function kl(n,t){for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(t[o]=n[o])}function Nn(n,t){var o=n.prototype;if(!(o instanceof t)){let a=function(){};a.prototype=t.prototype,a=new a,kl(o,a),n.prototype=o=a}o.constructor!=n&&(typeof n!="function"&&console.error("unknown Class:"+n),o.constructor=n)}var Sn={},no=Sn.ELEMENT_NODE=1,Hi=Sn.ATTRIBUTE_NODE=2,Ir=Sn.TEXT_NODE=3,Lv=Sn.CDATA_SECTION_NODE=4,Iv=Sn.ENTITY_REFERENCE_NODE=5,$q=Sn.ENTITY_NODE=6,Ov=Sn.PROCESSING_INSTRUCTION_NODE=7,Mv=Sn.COMMENT_NODE=8,Uv=Sn.DOCUMENT_NODE=9,Rv=Sn.DOCUMENT_TYPE_NODE=10,Ko=Sn.DOCUMENT_FRAGMENT_NODE=11,Aq=Sn.NOTATION_NODE=12,on={},Gt={};on.INDEX_SIZE_ERR=(Gt[1]="Index size error",1);on.DOMSTRING_SIZE_ERR=(Gt[2]="DOMString size error",2);var Cn=on.HIERARCHY_REQUEST_ERR=(Gt[3]="Hierarchy request error",3);on.WRONG_DOCUMENT_ERR=(Gt[4]="Wrong document",4);on.INVALID_CHARACTER_ERR=(Gt[5]="Invalid character",5);on.NO_DATA_ALLOWED_ERR=(Gt[6]="No data allowed",6);on.NO_MODIFICATION_ALLOWED_ERR=(Gt[7]="No modification allowed",7);var Fv=on.NOT_FOUND_ERR=(Gt[8]="Not found",8);on.NOT_SUPPORTED_ERR=(Gt[9]="Not supported",9);var uf=on.INUSE_ATTRIBUTE_ERR=(Gt[10]="Attribute in use",10);on.INVALID_STATE_ERR=(Gt[11]="Invalid state",11);on.SYNTAX_ERR=(Gt[12]="Syntax error",12);on.INVALID_MODIFICATION_ERR=(Gt[13]="Invalid modification",13);on.NAMESPACE_ERR=(Gt[14]="Invalid namespace",14);on.INVALID_ACCESS_ERR=(Gt[15]="Invalid access",15);function Dt(n,t){if(t instanceof Error)var o=t;else o=this,Error.call(this,Gt[n]),this.message=Gt[n],Error.captureStackTrace&&Error.captureStackTrace(this,Dt);return o.code=n,t&&(this.message=this.message+": "+t),o}Dt.prototype=Error.prototype;kl(on,Dt);function Go(){}Go.prototype={length:0,item:function(n){return n>=0&&n<this.length?this[n]:null},toString:function(n,t){for(var o=[],a=0;a<this.length;a++)Vi(this[a],o,n,t);return o.join("")},filter:function(n){return Array.prototype.filter.call(this,n)},indexOf:function(n){return Array.prototype.indexOf.call(this,n)}};function ji(n,t){this._node=n,this._refresh=t,Fm(this)}function Fm(n){var t=n._node._inc||n._node.ownerDocument._inc;if(n._inc!==t){var o=n._refresh(n._node);if(Zv(n,"length",o.length),!n.$$length||o.length<n.$$length)for(var a=o.length;a in n;a++)Object.prototype.hasOwnProperty.call(n,a)&&delete n[a];kl(o,n),n._inc=t}}ji.prototype.item=function(n){return Fm(this),this[n]||null};Nn(ji,Go);function Or(){}function Hv(n,t){for(var o=n.length;o--;)if(n[o]===t)return o}function cf(n,t,o,a){if(a?t[Hv(t,a)]=o:t[t.length++]=o,n){o.ownerElement=n;var i=n.ownerDocument;i&&(a&&qv(i,n,a),Lq(i,n,o))}}function mf(n,t,o){var a=Hv(t,o);if(a>=0){for(var i=t.length-1;a<i;)t[a]=t[++a];if(t.length=i,n){var s=n.ownerDocument;s&&(qv(s,n,o),o.ownerElement=null)}}else throw new Dt(Fv,new Error(n.tagName+"@"+o))}Or.prototype={length:0,item:Go.prototype.item,getNamedItem:function(n){for(var t=this.length;t--;){var o=this[t];if(o.nodeName==n)return o}},setNamedItem:function(n){var t=n.ownerElement;if(t&&t!=this._ownerElement)throw new Dt(uf);var o=this.getNamedItem(n.nodeName);return cf(this._ownerElement,this,n,o),o},setNamedItemNS:function(n){var t=n.ownerElement,o;if(t&&t!=this._ownerElement)throw new Dt(uf);return o=this.getNamedItemNS(n.namespaceURI,n.localName),cf(this._ownerElement,this,n,o),o},removeNamedItem:function(n){var t=this.getNamedItem(n);return mf(this._ownerElement,this,t),t},removeNamedItemNS:function(n,t){var o=this.getNamedItemNS(n,t);return mf(this._ownerElement,this,o),o},getNamedItemNS:function(n,t){for(var o=this.length;o--;){var a=this[o];if(a.localName==t&&a.namespaceURI==n)return a}return null}};function jv(){}jv.prototype={hasFeature:function(n,t){return!0},createDocument:function(n,t,o){var a=new El;if(a.implementation=this,a.childNodes=new Go,a.doctype=o||null,o&&a.appendChild(o),t){var i=a.createElementNS(n,t);a.appendChild(i)}return a},createDocumentType:function(n,t,o){var a=new hu;return a.name=n,a.nodeName=n,a.publicId=t||"",a.systemId=o||"",a}};function rt(){}rt.prototype={firstChild:null,lastChild:null,previousSibling:null,nextSibling:null,attributes:null,parentNode:null,childNodes:null,ownerDocument:null,nodeValue:null,namespaceURI:null,prefix:null,localName:null,insertBefore:function(n,t){return Mr(this,n,t)},replaceChild:function(n,t){Mr(this,n,t,Gv),t&&this.removeChild(t)},removeChild:function(n){return Wv(this,n)},appendChild:function(n){return this.insertBefore(n,null)},hasChildNodes:function(){return this.firstChild!=null},cloneNode:function(n){return Wc(this.ownerDocument||this,this,n)},normalize:function(){for(var n=this.firstChild;n;){var t=n.nextSibling;t&&t.nodeType==Ir&&n.nodeType==Ir?(this.removeChild(t),n.appendData(t.data)):(n.normalize(),n=t)}},isSupported:function(n,t){return this.ownerDocument.implementation.hasFeature(n,t)},hasAttributes:function(){return this.attributes.length>0},lookupPrefix:function(n){for(var t=this;t;){var o=t._nsMap;if(o){for(var a in o)if(Object.prototype.hasOwnProperty.call(o,a)&&o[a]===n)return a}t=t.nodeType==Hi?t.ownerDocument:t.parentNode}return null},lookupNamespaceURI:function(n){for(var t=this;t;){var o=t._nsMap;if(o&&Object.prototype.hasOwnProperty.call(o,n))return o[n];t=t.nodeType==Hi?t.ownerDocument:t.parentNode}return null},isDefaultNamespace:function(n){var t=this.lookupPrefix(n);return t==null}};function zv(n){return n=="<"&&"<"||n==">"&&">"||n=="&"&&"&"||n=='"'&&"""||"&#"+n.charCodeAt()+";"}kl(Sn,rt);kl(Sn,rt.prototype);function hl(n,t){if(t(n))return!0;if(n=n.firstChild)do if(hl(n,t))return!0;while(n=n.nextSibling)}function El(){this.ownerDocument=this}function Lq(n,t,o){n&&n._inc++;var a=o.namespaceURI;a===pl.XMLNS&&(t._nsMap[o.prefix?o.localName:""]=o.value)}function qv(n,t,o,a){n&&n._inc++;var i=o.namespaceURI;i===pl.XMLNS&&delete t._nsMap[o.prefix?o.localName:""]}function Hm(n,t,o){if(n&&n._inc){n._inc++;var a=t.childNodes;if(o)a[a.length++]=o;else{for(var i=t.firstChild,s=0;i;)a[s++]=i,i=i.nextSibling;a.length=s,delete a[a.length]}}}function Wv(n,t){var o=t.previousSibling,a=t.nextSibling;return o?o.nextSibling=a:n.firstChild=a,a?a.previousSibling=o:n.lastChild=o,t.parentNode=null,t.previousSibling=null,t.nextSibling=null,Hm(n.ownerDocument,n),t}function Iq(n){return n&&(n.nodeType===rt.DOCUMENT_NODE||n.nodeType===rt.DOCUMENT_FRAGMENT_NODE||n.nodeType===rt.ELEMENT_NODE)}function Oq(n){return n&&(Do(n)||jm(n)||Qo(n)||n.nodeType===rt.DOCUMENT_FRAGMENT_NODE||n.nodeType===rt.COMMENT_NODE||n.nodeType===rt.PROCESSING_INSTRUCTION_NODE)}function Qo(n){return n&&n.nodeType===rt.DOCUMENT_TYPE_NODE}function Do(n){return n&&n.nodeType===rt.ELEMENT_NODE}function jm(n){return n&&n.nodeType===rt.TEXT_NODE}function pf(n,t){var o=n.childNodes||[];if(Bo(o,Do)||Qo(t))return!1;var a=Bo(o,Qo);return!(t&&a&&o.indexOf(a)>o.indexOf(t))}function hf(n,t){var o=n.childNodes||[];function a(s){return Do(s)&&s!==t}if(Bo(o,a))return!1;var i=Bo(o,Qo);return!(t&&i&&o.indexOf(i)>o.indexOf(t))}function Mq(n,t,o){if(!Iq(n))throw new Dt(Cn,"Unexpected parent node type "+n.nodeType);if(o&&o.parentNode!==n)throw new Dt(Fv,"child not in parent");if(!Oq(t)||Qo(t)&&n.nodeType!==rt.DOCUMENT_NODE)throw new Dt(Cn,"Unexpected node type "+t.nodeType+" for parent node type "+n.nodeType)}function Uq(n,t,o){var a=n.childNodes||[],i=t.childNodes||[];if(t.nodeType===rt.DOCUMENT_FRAGMENT_NODE){var s=i.filter(Do);if(s.length>1||Bo(i,jm))throw new Dt(Cn,"More than one element or text in fragment");if(s.length===1&&!pf(n,o))throw new Dt(Cn,"Element in fragment can not be inserted before doctype")}if(Do(t)&&!pf(n,o))throw new Dt(Cn,"Only one element can be added and only after doctype");if(Qo(t)){if(Bo(a,Qo))throw new Dt(Cn,"Only one doctype is allowed");var l=Bo(a,Do);if(o&&a.indexOf(l)<a.indexOf(o))throw new Dt(Cn,"Doctype can only be inserted before an element");if(!o&&l)throw new Dt(Cn,"Doctype can not be appended since element is present")}}function Gv(n,t,o){var a=n.childNodes||[],i=t.childNodes||[];if(t.nodeType===rt.DOCUMENT_FRAGMENT_NODE){var s=i.filter(Do);if(s.length>1||Bo(i,jm))throw new Dt(Cn,"More than one element or text in fragment");if(s.length===1&&!hf(n,o))throw new Dt(Cn,"Element in fragment can not be inserted before doctype")}if(Do(t)&&!hf(n,o))throw new Dt(Cn,"Only one element can be added and only after doctype");if(Qo(t)){if(Bo(a,function(u){return Qo(u)&&u!==o}))throw new Dt(Cn,"Only one doctype is allowed");var l=Bo(a,Do);if(o&&a.indexOf(l)<a.indexOf(o))throw new Dt(Cn,"Doctype can only be inserted before an element")}}function Mr(n,t,o,a){Mq(n,t,o),n.nodeType===rt.DOCUMENT_NODE&&(a||Uq)(n,t,o);var i=t.parentNode;if(i&&i.removeChild(t),t.nodeType===Ko){var s=t.firstChild;if(s==null)return t;var l=t.lastChild}else s=l=t;var r=o?o.previousSibling:n.lastChild;s.previousSibling=r,l.nextSibling=o,r?r.nextSibling=s:n.firstChild=s,o==null?n.lastChild=l:o.previousSibling=l;do{s.parentNode=n;var u=n.ownerDocument||n;fl(s,u)}while(s!==l&&(s=s.nextSibling));return Hm(n.ownerDocument||n,n),t.nodeType==Ko&&(t.firstChild=t.lastChild=null),t}function fl(n,t){if(n.ownerDocument!==t){if(n.ownerDocument=t,n.nodeType===no&&n.attributes)for(var o=0;o<n.attributes.length;o++){var a=n.attributes.item(o);a&&(a.ownerDocument=t)}for(var i=n.firstChild;i;)fl(i,t),i=i.nextSibling}}function Rq(n,t){t.parentNode&&t.parentNode.removeChild(t),t.parentNode=n,t.previousSibling=n.lastChild,t.nextSibling=null,t.previousSibling?t.previousSibling.nextSibling=t:n.firstChild=t,n.lastChild=t,Hm(n.ownerDocument,n,t);var o=n.ownerDocument||n;return fl(t,o),t}El.prototype={nodeName:"#document",nodeType:Uv,doctype:null,documentElement:null,_inc:1,insertBefore:function(n,t){if(n.nodeType==Ko){for(var o=n.firstChild;o;){var a=o.nextSibling;this.insertBefore(o,t),o=a}return n}return Mr(this,n,t),fl(n,this),this.documentElement===null&&n.nodeType===no&&(this.documentElement=n),n},removeChild:function(n){return this.documentElement==n&&(this.documentElement=null),Wv(this,n)},replaceChild:function(n,t){Mr(this,n,t,Gv),fl(n,this),t&&this.removeChild(t),Do(n)&&(this.documentElement=n)},importNode:function(n,t){return Jv(this,n,t)},getElementById:function(n){var t=null;return hl(this.documentElement,function(o){if(o.nodeType==no&&o.getAttribute("id")==n)return t=o,!0}),t},getElementsByClassName:function(n){var t=df(n);return new ji(this,function(o){var a=[];return t.length>0&&hl(o.documentElement,function(i){if(i!==o&&i.nodeType===no){var s=i.getAttribute("class");if(s){var l=n===s;if(!l){var r=df(s);l=t.every(Pq(r))}l&&a.push(i)}}}),a})},createElement:function(n){var t=new Ja;t.ownerDocument=this,t.nodeName=n,t.tagName=n,t.localName=n,t.childNodes=new Go;var o=t.attributes=new Or;return o._ownerElement=t,t},createDocumentFragment:function(){var n=new fu;return n.ownerDocument=this,n.childNodes=new Go,n},createTextNode:function(n){var t=new zm;return t.ownerDocument=this,t.appendData(n),t},createComment:function(n){var t=new qm;return t.ownerDocument=this,t.appendData(n),t},createCDATASection:function(n){var t=new Wm;return t.ownerDocument=this,t.appendData(n),t},createProcessingInstruction:function(n,t){var o=new Xm;return o.ownerDocument=this,o.tagName=o.nodeName=o.target=n,o.nodeValue=o.data=t,o},createAttribute:function(n){var t=new Ur;return t.ownerDocument=this,t.name=n,t.nodeName=n,t.localName=n,t.specified=!0,t},createEntityReference:function(n){var t=new Gm;return t.ownerDocument=this,t.nodeName=n,t},createElementNS:function(n,t){var o=new Ja,a=t.split(":"),i=o.attributes=new Or;return o.childNodes=new Go,o.ownerDocument=this,o.nodeName=t,o.tagName=t,o.namespaceURI=n,a.length==2?(o.prefix=a[0],o.localName=a[1]):o.localName=t,i._ownerElement=o,o},createAttributeNS:function(n,t){var o=new Ur,a=t.split(":");return o.ownerDocument=this,o.nodeName=t,o.name=t,o.namespaceURI=n,o.specified=!0,a.length==2?(o.prefix=a[0],o.localName=a[1]):o.localName=t,o}};Nn(El,rt);function Ja(){this._nsMap={}}Ja.prototype={nodeType:no,hasAttribute:function(n){return this.getAttributeNode(n)!=null},getAttribute:function(n){var t=this.getAttributeNode(n);return t&&t.value||""},getAttributeNode:function(n){return this.attributes.getNamedItem(n)},setAttribute:function(n,t){var o=this.ownerDocument.createAttribute(n);o.value=o.nodeValue=""+t,this.setAttributeNode(o)},removeAttribute:function(n){var t=this.getAttributeNode(n);t&&this.removeAttributeNode(t)},appendChild:function(n){return n.nodeType===Ko?this.insertBefore(n,null):Rq(this,n)},setAttributeNode:function(n){return this.attributes.setNamedItem(n)},setAttributeNodeNS:function(n){return this.attributes.setNamedItemNS(n)},removeAttributeNode:function(n){return this.attributes.removeNamedItem(n.nodeName)},removeAttributeNS:function(n,t){var o=this.getAttributeNodeNS(n,t);o&&this.removeAttributeNode(o)},hasAttributeNS:function(n,t){return this.getAttributeNodeNS(n,t)!=null},getAttributeNS:function(n,t){var o=this.getAttributeNodeNS(n,t);return o&&o.value||""},setAttributeNS:function(n,t,o){var a=this.ownerDocument.createAttributeNS(n,t);a.value=a.nodeValue=""+o,this.setAttributeNode(a)},getAttributeNodeNS:function(n,t){return this.attributes.getNamedItemNS(n,t)},getElementsByTagName:function(n){return new ji(this,function(t){var o=[];return hl(t,function(a){a!==t&&a.nodeType==no&&(n==="*"||a.tagName==n)&&o.push(a)}),o})},getElementsByTagNameNS:function(n,t){return new ji(this,function(o){var a=[];return hl(o,function(i){i!==o&&i.nodeType===no&&(n==="*"||i.namespaceURI===n)&&(t==="*"||i.localName==t)&&a.push(i)}),a})}};El.prototype.getElementsByTagName=Ja.prototype.getElementsByTagName;El.prototype.getElementsByTagNameNS=Ja.prototype.getElementsByTagNameNS;Nn(Ja,rt);function Ur(){}Ur.prototype.nodeType=Hi;Nn(Ur,rt);function Tl(){}Tl.prototype={data:"",substringData:function(n,t){return this.data.substring(n,n+t)},appendData:function(n){n=this.data+n,this.nodeValue=this.data=n,this.length=n.length},insertData:function(n,t){this.replaceData(n,0,t)},appendChild:function(n){throw new Error(Gt[Cn])},deleteData:function(n,t){this.replaceData(n,t,"")},replaceData:function(n,t,o){var a=this.data.substring(0,n),i=this.data.substring(n+t);o=a+o+i,this.nodeValue=this.data=o,this.length=o.length}};Nn(Tl,rt);function zm(){}zm.prototype={nodeName:"#text",nodeType:Ir,splitText:function(n){var t=this.data,o=t.substring(n);t=t.substring(0,n),this.data=this.nodeValue=t,this.length=t.length;var a=this.ownerDocument.createTextNode(o);return this.parentNode&&this.parentNode.insertBefore(a,this.nextSibling),a}};Nn(zm,Tl);function qm(){}qm.prototype={nodeName:"#comment",nodeType:Mv};Nn(qm,Tl);function Wm(){}Wm.prototype={nodeName:"#cdata-section",nodeType:Lv};Nn(Wm,Tl);function hu(){}hu.prototype.nodeType=Rv;Nn(hu,rt);function Xv(){}Xv.prototype.nodeType=Aq;Nn(Xv,rt);function Yv(){}Yv.prototype.nodeType=$q;Nn(Yv,rt);function Gm(){}Gm.prototype.nodeType=Iv;Nn(Gm,rt);function fu(){}fu.prototype.nodeName="#document-fragment";fu.prototype.nodeType=Ko;Nn(fu,rt);function Xm(){}Xm.prototype.nodeType=Ov;Nn(Xm,rt);function Kv(){}Kv.prototype.serializeToString=function(n,t,o){return Qv.call(n,t,o)};rt.prototype.toString=Qv;function Qv(n,t){var o=[],a=this.nodeType==9&&this.documentElement||this,i=a.prefix,s=a.namespaceURI;if(s&&i==null){var i=a.lookupPrefix(s);if(i==null)var l=[{namespace:s,prefix:null}]}return Vi(this,o,n,t,l),o.join("")}function ff(n,t,o){var a=n.prefix||"",i=n.namespaceURI;if(!i||a==="xml"&&i===pl.XML||i===pl.XMLNS)return!1;for(var s=o.length;s--;){var l=o[s];if(l.prefix===a)return l.namespace!==i}return!0}function pc(n,t,o){n.push(" ",t,'="',o.replace(/[<>&"\t\n\r]/g,zv),'"')}function Vi(n,t,o,a,i){if(i||(i=[]),a)if(n=a(n),n){if(typeof n=="string"){t.push(n);return}}else return;switch(n.nodeType){case no:var s=n.attributes,l=s.length,_=n.firstChild,r=n.tagName;o=pl.isHTML(n.namespaceURI)||o;var u=r;if(!o&&!n.prefix&&n.namespaceURI){for(var c,f=0;f<s.length;f++)if(s.item(f).name==="xmlns"){c=s.item(f).value;break}if(!c)for(var m=i.length-1;m>=0;m--){var d=i[m];if(d.prefix===""&&d.namespace===n.namespaceURI){c=d.namespace;break}}if(c!==n.namespaceURI)for(var m=i.length-1;m>=0;m--){var d=i[m];if(d.namespace===n.namespaceURI){d.prefix&&(u=d.prefix+":"+r);break}}}t.push("<",u);for(var h=0;h<l;h++){var g=s.item(h);g.prefix=="xmlns"?i.push({prefix:g.localName,namespace:g.value}):g.nodeName=="xmlns"&&i.push({prefix:"",namespace:g.value})}for(var h=0;h<l;h++){var g=s.item(h);if(ff(g,o,i)){var p=g.prefix||"",b=g.namespaceURI;pc(t,p?"xmlns:"+p:"xmlns",b),i.push({prefix:p,namespace:b})}Vi(g,t,o,a,i)}if(r===u&&ff(n,o,i)){var p=n.prefix||"",b=n.namespaceURI;pc(t,p?"xmlns:"+p:"xmlns",b),i.push({prefix:p,namespace:b})}if(_||o&&!/^(?:meta|link|img|br|hr|input)$/i.test(r)){if(t.push(">"),o&&/^script$/i.test(r))for(;_;)_.data?t.push(_.data):Vi(_,t,o,a,i.slice()),_=_.nextSibling;else for(;_;)Vi(_,t,o,a,i.slice()),_=_.nextSibling;t.push("</",u,">")}else t.push("/>");return;case Uv:case Ko:for(var _=n.firstChild;_;)Vi(_,t,o,a,i.slice()),_=_.nextSibling;return;case Hi:return pc(t,n.name,n.value);case Ir:return t.push(n.data.replace(/[<&>]/g,zv));case Lv:return t.push("<![CDATA[",n.data,"]]>");case Mv:return t.push("<!--",n.data,"-->");case Rv:var w=n.publicId,v=n.systemId;if(t.push("<!DOCTYPE ",n.name),w)t.push(" PUBLIC ",w),v&&v!="."&&t.push(" ",v),t.push(">");else if(v&&v!=".")t.push(" SYSTEM ",v,">");else{var V=n.internalSubset;V&&t.push(" [",V,"]"),t.push(">")}return;case Ov:return t.push("<?",n.target," ",n.data,"?>");case Iv:return t.push("&",n.nodeName,";");default:t.push("??",n.nodeName)}}function Jv(n,t,o){var a;switch(t.nodeType){case no:a=t.cloneNode(!1),a.ownerDocument=n;case Ko:break;case Hi:o=!0;break}if(a||(a=t.cloneNode(!1)),a.ownerDocument=n,a.parentNode=null,o)for(var i=t.firstChild;i;)a.appendChild(Jv(n,i,o)),i=i.nextSibling;return a}function Wc(n,t,o){var a=new t.constructor;for(var i in t)if(Object.prototype.hasOwnProperty.call(t,i)){var s=t[i];typeof s!="object"&&s!=a[i]&&(a[i]=s)}switch(t.childNodes&&(a.childNodes=new Go),a.ownerDocument=n,a.nodeType){case no:var l=t.attributes,r=a.attributes=new Or,u=l.length;r._ownerElement=a;for(var c=0;c<u;c++)a.setAttributeNode(Wc(n,l.item(c),!0));break;case Hi:o=!0}if(o)for(var f=t.firstChild;f;)a.appendChild(Wc(n,f,o)),f=f.nextSibling;return a}function Zv(n,t,o){n[t]=o}try{if(Object.defineProperty){let n=function(t){switch(t.nodeType){case no:case Ko:var o=[];for(t=t.firstChild;t;)t.nodeType!==7&&t.nodeType!==8&&o.push(n(t)),t=t.nextSibling;return o.join("");default:return t.nodeValue}};Object.defineProperty(ji.prototype,"length",{get:function(){return Fm(this),this.$$length}}),Object.defineProperty(rt.prototype,"textContent",{get:function(){return n(this)},set:function(t){switch(this.nodeType){case no:case Ko:for(;this.firstChild;)this.removeChild(this.firstChild);(t||String(t))&&this.appendChild(this.ownerDocument.createTextNode(t));break;default:this.data=t,this.value=t,this.nodeValue=t}}}),Zv=function(t,o,a){t["$$"+o]=a}}}catch{}ka.DocumentType=hu;ka.DOMException=Dt;ka.DOMImplementation=jv;ka.Element=Ja;ka.Node=rt;ka.NodeList=Go;ka.XMLSerializer=Kv;var gu={},e0={};(function(n){var t=ea.freeze;n.XML_ENTITIES=t({amp:"&",apos:"'",gt:">",lt:"<",quot:'"'}),n.HTML_ENTITIES=t({Aacute:"Á",aacute:"á",Abreve:"Ă",abreve:"ă",ac:"∾",acd:"∿",acE:"∾̳",Acirc:"Â",acirc:"â",acute:"´",Acy:"А",acy:"а",AElig:"Æ",aelig:"æ",af:"",Afr:"𝔄",afr:"𝔞",Agrave:"À",agrave:"à",alefsym:"ℵ",aleph:"ℵ",Alpha:"Α",alpha:"α",Amacr:"Ā",amacr:"ā",amalg:"⨿",AMP:"&",amp:"&",And:"⩓",and:"∧",andand:"⩕",andd:"⩜",andslope:"⩘",andv:"⩚",ang:"∠",ange:"⦤",angle:"∠",angmsd:"∡",angmsdaa:"⦨",angmsdab:"⦩",angmsdac:"⦪",angmsdad:"⦫",angmsdae:"⦬",angmsdaf:"⦭",angmsdag:"⦮",angmsdah:"⦯",angrt:"∟",angrtvb:"⊾",angrtvbd:"⦝",angsph:"∢",angst:"Å",angzarr:"⍼",Aogon:"Ą",aogon:"ą",Aopf:"𝔸",aopf:"𝕒",ap:"≈",apacir:"⩯",apE:"⩰",ape:"≊",apid:"≋",apos:"'",ApplyFunction:"",approx:"≈",approxeq:"≊",Aring:"Å",aring:"å",Ascr:"𝒜",ascr:"𝒶",Assign:"≔",ast:"*",asymp:"≈",asympeq:"≍",Atilde:"Ã",atilde:"ã",Auml:"Ä",auml:"ä",awconint:"∳",awint:"⨑",backcong:"≌",backepsilon:"϶",backprime:"‵",backsim:"∽",backsimeq:"⋍",Backslash:"∖",Barv:"⫧",barvee:"⊽",Barwed:"⌆",barwed:"⌅",barwedge:"⌅",bbrk:"⎵",bbrktbrk:"⎶",bcong:"≌",Bcy:"Б",bcy:"б",bdquo:"„",becaus:"∵",Because:"∵",because:"∵",bemptyv:"⦰",bepsi:"϶",bernou:"ℬ",Bernoullis:"ℬ",Beta:"Β",beta:"β",beth:"ℶ",between:"≬",Bfr:"𝔅",bfr:"𝔟",bigcap:"⋂",bigcirc:"◯",bigcup:"⋃",bigodot:"⨀",bigoplus:"⨁",bigotimes:"⨂",bigsqcup:"⨆",bigstar:"★",bigtriangledown:"▽",bigtriangleup:"△",biguplus:"⨄",bigvee:"⋁",bigwedge:"⋀",bkarow:"⤍",blacklozenge:"⧫",blacksquare:"▪",blacktriangle:"▴",blacktriangledown:"▾",blacktriangleleft:"◂",blacktriangleright:"▸",blank:"␣",blk12:"▒",blk14:"░",blk34:"▓",block:"█",bne:"=⃥",bnequiv:"≡⃥",bNot:"⫭",bnot:"⌐",Bopf:"𝔹",bopf:"𝕓",bot:"⊥",bottom:"⊥",bowtie:"⋈",boxbox:"⧉",boxDL:"╗",boxDl:"╖",boxdL:"╕",boxdl:"┐",boxDR:"╔",boxDr:"╓",boxdR:"╒",boxdr:"┌",boxH:"═",boxh:"─",boxHD:"╦",boxHd:"╤",boxhD:"╥",boxhd:"┬",boxHU:"╩",boxHu:"╧",boxhU:"╨",boxhu:"┴",boxminus:"⊟",boxplus:"⊞",boxtimes:"⊠",boxUL:"╝",boxUl:"╜",boxuL:"╛",boxul:"┘",boxUR:"╚",boxUr:"╙",boxuR:"╘",boxur:"└",boxV:"║",boxv:"│",boxVH:"╬",boxVh:"╫",boxvH:"╪",boxvh:"┼",boxVL:"╣",boxVl:"╢",boxvL:"╡",boxvl:"┤",boxVR:"╠",boxVr:"╟",boxvR:"╞",boxvr:"├",bprime:"‵",Breve:"˘",breve:"˘",brvbar:"¦",Bscr:"ℬ",bscr:"𝒷",bsemi:"⁏",bsim:"∽",bsime:"⋍",bsol:"\\",bsolb:"⧅",bsolhsub:"⟈",bull:"•",bullet:"•",bump:"≎",bumpE:"⪮",bumpe:"≏",Bumpeq:"≎",bumpeq:"≏",Cacute:"Ć",cacute:"ć",Cap:"⋒",cap:"∩",capand:"⩄",capbrcup:"⩉",capcap:"⩋",capcup:"⩇",capdot:"⩀",CapitalDifferentialD:"ⅅ",caps:"∩︀",caret:"⁁",caron:"ˇ",Cayleys:"ℭ",ccaps:"⩍",Ccaron:"Č",ccaron:"č",Ccedil:"Ç",ccedil:"ç",Ccirc:"Ĉ",ccirc:"ĉ",Cconint:"∰",ccups:"⩌",ccupssm:"⩐",Cdot:"Ċ",cdot:"ċ",cedil:"¸",Cedilla:"¸",cemptyv:"⦲",cent:"¢",CenterDot:"·",centerdot:"·",Cfr:"ℭ",cfr:"𝔠",CHcy:"Ч",chcy:"ч",check:"✓",checkmark:"✓",Chi:"Χ",chi:"χ",cir:"○",circ:"ˆ",circeq:"≗",circlearrowleft:"↺",circlearrowright:"↻",circledast:"⊛",circledcirc:"⊚",circleddash:"⊝",CircleDot:"⊙",circledR:"®",circledS:"Ⓢ",CircleMinus:"⊖",CirclePlus:"⊕",CircleTimes:"⊗",cirE:"⧃",cire:"≗",cirfnint:"⨐",cirmid:"⫯",cirscir:"⧂",ClockwiseContourIntegral:"∲",CloseCurlyDoubleQuote:"”",CloseCurlyQuote:"’",clubs:"♣",clubsuit:"♣",Colon:"∷",colon:":",Colone:"⩴",colone:"≔",coloneq:"≔",comma:",",commat:"@",comp:"∁",compfn:"∘",complement:"∁",complexes:"ℂ",cong:"≅",congdot:"⩭",Congruent:"≡",Conint:"∯",conint:"∮",ContourIntegral:"∮",Copf:"ℂ",copf:"𝕔",coprod:"∐",Coproduct:"∐",COPY:"©",copy:"©",copysr:"℗",CounterClockwiseContourIntegral:"∳",crarr:"↵",Cross:"⨯",cross:"✗",Cscr:"𝒞",cscr:"𝒸",csub:"⫏",csube:"⫑",csup:"⫐",csupe:"⫒",ctdot:"⋯",cudarrl:"⤸",cudarrr:"⤵",cuepr:"⋞",cuesc:"⋟",cularr:"↶",cularrp:"⤽",Cup:"⋓",cup:"∪",cupbrcap:"⩈",CupCap:"≍",cupcap:"⩆",cupcup:"⩊",cupdot:"⊍",cupor:"⩅",cups:"∪︀",curarr:"↷",curarrm:"⤼",curlyeqprec:"⋞",curlyeqsucc:"⋟",curlyvee:"⋎",curlywedge:"⋏",curren:"¤",curvearrowleft:"↶",curvearrowright:"↷",cuvee:"⋎",cuwed:"⋏",cwconint:"∲",cwint:"∱",cylcty:"⌭",Dagger:"‡",dagger:"†",daleth:"ℸ",Darr:"↡",dArr:"⇓",darr:"↓",dash:"‐",Dashv:"⫤",dashv:"⊣",dbkarow:"⤏",dblac:"˝",Dcaron:"Ď",dcaron:"ď",Dcy:"Д",dcy:"д",DD:"ⅅ",dd:"ⅆ",ddagger:"‡",ddarr:"⇊",DDotrahd:"⤑",ddotseq:"⩷",deg:"°",Del:"∇",Delta:"Δ",delta:"δ",demptyv:"⦱",dfisht:"⥿",Dfr:"𝔇",dfr:"𝔡",dHar:"⥥",dharl:"⇃",dharr:"⇂",DiacriticalAcute:"´",DiacriticalDot:"˙",DiacriticalDoubleAcute:"˝",DiacriticalGrave:"`",DiacriticalTilde:"˜",diam:"⋄",Diamond:"⋄",diamond:"⋄",diamondsuit:"♦",diams:"♦",die:"¨",DifferentialD:"ⅆ",digamma:"ϝ",disin:"⋲",div:"÷",divide:"÷",divideontimes:"⋇",divonx:"⋇",DJcy:"Ђ",djcy:"ђ",dlcorn:"⌞",dlcrop:"⌍",dollar:"$",Dopf:"𝔻",dopf:"𝕕",Dot:"¨",dot:"˙",DotDot:"⃜",doteq:"≐",doteqdot:"≑",DotEqual:"≐",dotminus:"∸",dotplus:"∔",dotsquare:"⊡",doublebarwedge:"⌆",DoubleContourIntegral:"∯",DoubleDot:"¨",DoubleDownArrow:"⇓",DoubleLeftArrow:"⇐",DoubleLeftRightArrow:"⇔",DoubleLeftTee:"⫤",DoubleLongLeftArrow:"⟸",DoubleLongLeftRightArrow:"⟺",DoubleLongRightArrow:"⟹",DoubleRightArrow:"⇒",DoubleRightTee:"⊨",DoubleUpArrow:"⇑",DoubleUpDownArrow:"⇕",DoubleVerticalBar:"∥",DownArrow:"↓",Downarrow:"⇓",downarrow:"↓",DownArrowBar:"⤓",DownArrowUpArrow:"⇵",DownBreve:"̑",downdownarrows:"⇊",downharpoonleft:"⇃",downharpoonright:"⇂",DownLeftRightVector:"⥐",DownLeftTeeVector:"⥞",DownLeftVector:"↽",DownLeftVectorBar:"⥖",DownRightTeeVector:"⥟",DownRightVector:"⇁",DownRightVectorBar:"⥗",DownTee:"⊤",DownTeeArrow:"↧",drbkarow:"⤐",drcorn:"⌟",drcrop:"⌌",Dscr:"𝒟",dscr:"𝒹",DScy:"Ѕ",dscy:"ѕ",dsol:"⧶",Dstrok:"Đ",dstrok:"đ",dtdot:"⋱",dtri:"▿",dtrif:"▾",duarr:"⇵",duhar:"⥯",dwangle:"⦦",DZcy:"Џ",dzcy:"џ",dzigrarr:"⟿",Eacute:"É",eacute:"é",easter:"⩮",Ecaron:"Ě",ecaron:"ě",ecir:"≖",Ecirc:"Ê",ecirc:"ê",ecolon:"≕",Ecy:"Э",ecy:"э",eDDot:"⩷",Edot:"Ė",eDot:"≑",edot:"ė",ee:"ⅇ",efDot:"≒",Efr:"𝔈",efr:"𝔢",eg:"⪚",Egrave:"È",egrave:"è",egs:"⪖",egsdot:"⪘",el:"⪙",Element:"∈",elinters:"⏧",ell:"ℓ",els:"⪕",elsdot:"⪗",Emacr:"Ē",emacr:"ē",empty:"∅",emptyset:"∅",EmptySmallSquare:"◻",emptyv:"∅",EmptyVerySmallSquare:"▫",emsp:" ",emsp13:" ",emsp14:" ",ENG:"Ŋ",eng:"ŋ",ensp:" ",Eogon:"Ę",eogon:"ę",Eopf:"𝔼",eopf:"𝕖",epar:"⋕",eparsl:"⧣",eplus:"⩱",epsi:"ε",Epsilon:"Ε",epsilon:"ε",epsiv:"ϵ",eqcirc:"≖",eqcolon:"≕",eqsim:"≂",eqslantgtr:"⪖",eqslantless:"⪕",Equal:"⩵",equals:"=",EqualTilde:"≂",equest:"≟",Equilibrium:"⇌",equiv:"≡",equivDD:"⩸",eqvparsl:"⧥",erarr:"⥱",erDot:"≓",Escr:"ℰ",escr:"ℯ",esdot:"≐",Esim:"⩳",esim:"≂",Eta:"Η",eta:"η",ETH:"Ð",eth:"ð",Euml:"Ë",euml:"ë",euro:"€",excl:"!",exist:"∃",Exists:"∃",expectation:"ℰ",ExponentialE:"ⅇ",exponentiale:"ⅇ",fallingdotseq:"≒",Fcy:"Ф",fcy:"ф",female:"♀",ffilig:"ffi",fflig:"ff",ffllig:"ffl",Ffr:"𝔉",ffr:"𝔣",filig:"fi",FilledSmallSquare:"◼",FilledVerySmallSquare:"▪",fjlig:"fj",flat:"♭",fllig:"fl",fltns:"▱",fnof:"ƒ",Fopf:"𝔽",fopf:"𝕗",ForAll:"∀",forall:"∀",fork:"⋔",forkv:"⫙",Fouriertrf:"ℱ",fpartint:"⨍",frac12:"½",frac13:"⅓",frac14:"¼",frac15:"⅕",frac16:"⅙",frac18:"⅛",frac23:"⅔",frac25:"⅖",frac34:"¾",frac35:"⅗",frac38:"⅜",frac45:"⅘",frac56:"⅚",frac58:"⅝",frac78:"⅞",frasl:"⁄",frown:"⌢",Fscr:"ℱ",fscr:"𝒻",gacute:"ǵ",Gamma:"Γ",gamma:"γ",Gammad:"Ϝ",gammad:"ϝ",gap:"⪆",Gbreve:"Ğ",gbreve:"ğ",Gcedil:"Ģ",Gcirc:"Ĝ",gcirc:"ĝ",Gcy:"Г",gcy:"г",Gdot:"Ġ",gdot:"ġ",gE:"≧",ge:"≥",gEl:"⪌",gel:"⋛",geq:"≥",geqq:"≧",geqslant:"⩾",ges:"⩾",gescc:"⪩",gesdot:"⪀",gesdoto:"⪂",gesdotol:"⪄",gesl:"⋛︀",gesles:"⪔",Gfr:"𝔊",gfr:"𝔤",Gg:"⋙",gg:"≫",ggg:"⋙",gimel:"ℷ",GJcy:"Ѓ",gjcy:"ѓ",gl:"≷",gla:"⪥",glE:"⪒",glj:"⪤",gnap:"⪊",gnapprox:"⪊",gnE:"≩",gne:"⪈",gneq:"⪈",gneqq:"≩",gnsim:"⋧",Gopf:"𝔾",gopf:"𝕘",grave:"`",GreaterEqual:"≥",GreaterEqualLess:"⋛",GreaterFullEqual:"≧",GreaterGreater:"⪢",GreaterLess:"≷",GreaterSlantEqual:"⩾",GreaterTilde:"≳",Gscr:"𝒢",gscr:"ℊ",gsim:"≳",gsime:"⪎",gsiml:"⪐",Gt:"≫",GT:">",gt:">",gtcc:"⪧",gtcir:"⩺",gtdot:"⋗",gtlPar:"⦕",gtquest:"⩼",gtrapprox:"⪆",gtrarr:"⥸",gtrdot:"⋗",gtreqless:"⋛",gtreqqless:"⪌",gtrless:"≷",gtrsim:"≳",gvertneqq:"≩︀",gvnE:"≩︀",Hacek:"ˇ",hairsp:" ",half:"½",hamilt:"ℋ",HARDcy:"Ъ",hardcy:"ъ",hArr:"⇔",harr:"↔",harrcir:"⥈",harrw:"↭",Hat:"^",hbar:"ℏ",Hcirc:"Ĥ",hcirc:"ĥ",hearts:"♥",heartsuit:"♥",hellip:"…",hercon:"⊹",Hfr:"ℌ",hfr:"𝔥",HilbertSpace:"ℋ",hksearow:"⤥",hkswarow:"⤦",hoarr:"⇿",homtht:"∻",hookleftarrow:"↩",hookrightarrow:"↪",Hopf:"ℍ",hopf:"𝕙",horbar:"―",HorizontalLine:"─",Hscr:"ℋ",hscr:"𝒽",hslash:"ℏ",Hstrok:"Ħ",hstrok:"ħ",HumpDownHump:"≎",HumpEqual:"≏",hybull:"⁃",hyphen:"‐",Iacute:"Í",iacute:"í",ic:"",Icirc:"Î",icirc:"î",Icy:"И",icy:"и",Idot:"İ",IEcy:"Е",iecy:"е",iexcl:"¡",iff:"⇔",Ifr:"ℑ",ifr:"𝔦",Igrave:"Ì",igrave:"ì",ii:"ⅈ",iiiint:"⨌",iiint:"∭",iinfin:"⧜",iiota:"℩",IJlig:"IJ",ijlig:"ij",Im:"ℑ",Imacr:"Ī",imacr:"ī",image:"ℑ",ImaginaryI:"ⅈ",imagline:"ℐ",imagpart:"ℑ",imath:"ı",imof:"⊷",imped:"Ƶ",Implies:"⇒",in:"∈",incare:"℅",infin:"∞",infintie:"⧝",inodot:"ı",Int:"∬",int:"∫",intcal:"⊺",integers:"ℤ",Integral:"∫",intercal:"⊺",Intersection:"⋂",intlarhk:"⨗",intprod:"⨼",InvisibleComma:"",InvisibleTimes:"",IOcy:"Ё",iocy:"ё",Iogon:"Į",iogon:"į",Iopf:"𝕀",iopf:"𝕚",Iota:"Ι",iota:"ι",iprod:"⨼",iquest:"¿",Iscr:"ℐ",iscr:"𝒾",isin:"∈",isindot:"⋵",isinE:"⋹",isins:"⋴",isinsv:"⋳",isinv:"∈",it:"",Itilde:"Ĩ",itilde:"ĩ",Iukcy:"І",iukcy:"і",Iuml:"Ï",iuml:"ï",Jcirc:"Ĵ",jcirc:"ĵ",Jcy:"Й",jcy:"й",Jfr:"𝔍",jfr:"𝔧",jmath:"ȷ",Jopf:"𝕁",jopf:"𝕛",Jscr:"𝒥",jscr:"𝒿",Jsercy:"Ј",jsercy:"ј",Jukcy:"Є",jukcy:"є",Kappa:"Κ",kappa:"κ",kappav:"ϰ",Kcedil:"Ķ",kcedil:"ķ",Kcy:"К",kcy:"к",Kfr:"𝔎",kfr:"𝔨",kgreen:"ĸ",KHcy:"Х",khcy:"х",KJcy:"Ќ",kjcy:"ќ",Kopf:"𝕂",kopf:"𝕜",Kscr:"𝒦",kscr:"𝓀",lAarr:"⇚",Lacute:"Ĺ",lacute:"ĺ",laemptyv:"⦴",lagran:"ℒ",Lambda:"Λ",lambda:"λ",Lang:"⟪",lang:"⟨",langd:"⦑",langle:"⟨",lap:"⪅",Laplacetrf:"ℒ",laquo:"«",Larr:"↞",lArr:"⇐",larr:"←",larrb:"⇤",larrbfs:"⤟",larrfs:"⤝",larrhk:"↩",larrlp:"↫",larrpl:"⤹",larrsim:"⥳",larrtl:"↢",lat:"⪫",lAtail:"⤛",latail:"⤙",late:"⪭",lates:"⪭︀",lBarr:"⤎",lbarr:"⤌",lbbrk:"❲",lbrace:"{",lbrack:"[",lbrke:"⦋",lbrksld:"⦏",lbrkslu:"⦍",Lcaron:"Ľ",lcaron:"ľ",Lcedil:"Ļ",lcedil:"ļ",lceil:"⌈",lcub:"{",Lcy:"Л",lcy:"л",ldca:"⤶",ldquo:"“",ldquor:"„",ldrdhar:"⥧",ldrushar:"⥋",ldsh:"↲",lE:"≦",le:"≤",LeftAngleBracket:"⟨",LeftArrow:"←",Leftarrow:"⇐",leftarrow:"←",LeftArrowBar:"⇤",LeftArrowRightArrow:"⇆",leftarrowtail:"↢",LeftCeiling:"⌈",LeftDoubleBracket:"⟦",LeftDownTeeVector:"⥡",LeftDownVector:"⇃",LeftDownVectorBar:"⥙",LeftFloor:"⌊",leftharpoondown:"↽",leftharpoonup:"↼",leftleftarrows:"⇇",LeftRightArrow:"↔",Leftrightarrow:"⇔",leftrightarrow:"↔",leftrightarrows:"⇆",leftrightharpoons:"⇋",leftrightsquigarrow:"↭",LeftRightVector:"⥎",LeftTee:"⊣",LeftTeeArrow:"↤",LeftTeeVector:"⥚",leftthreetimes:"⋋",LeftTriangle:"⊲",LeftTriangleBar:"⧏",LeftTriangleEqual:"⊴",LeftUpDownVector:"⥑",LeftUpTeeVector:"⥠",LeftUpVector:"↿",LeftUpVectorBar:"⥘",LeftVector:"↼",LeftVectorBar:"⥒",lEg:"⪋",leg:"⋚",leq:"≤",leqq:"≦",leqslant:"⩽",les:"⩽",lescc:"⪨",lesdot:"⩿",lesdoto:"⪁",lesdotor:"⪃",lesg:"⋚︀",lesges:"⪓",lessapprox:"⪅",lessdot:"⋖",lesseqgtr:"⋚",lesseqqgtr:"⪋",LessEqualGreater:"⋚",LessFullEqual:"≦",LessGreater:"≶",lessgtr:"≶",LessLess:"⪡",lesssim:"≲",LessSlantEqual:"⩽",LessTilde:"≲",lfisht:"⥼",lfloor:"⌊",Lfr:"𝔏",lfr:"𝔩",lg:"≶",lgE:"⪑",lHar:"⥢",lhard:"↽",lharu:"↼",lharul:"⥪",lhblk:"▄",LJcy:"Љ",ljcy:"љ",Ll:"⋘",ll:"≪",llarr:"⇇",llcorner:"⌞",Lleftarrow:"⇚",llhard:"⥫",lltri:"◺",Lmidot:"Ŀ",lmidot:"ŀ",lmoust:"⎰",lmoustache:"⎰",lnap:"⪉",lnapprox:"⪉",lnE:"≨",lne:"⪇",lneq:"⪇",lneqq:"≨",lnsim:"⋦",loang:"⟬",loarr:"⇽",lobrk:"⟦",LongLeftArrow:"⟵",Longleftarrow:"⟸",longleftarrow:"⟵",LongLeftRightArrow:"⟷",Longleftrightarrow:"⟺",longleftrightarrow:"⟷",longmapsto:"⟼",LongRightArrow:"⟶",Longrightarrow:"⟹",longrightarrow:"⟶",looparrowleft:"↫",looparrowright:"↬",lopar:"⦅",Lopf:"𝕃",lopf:"𝕝",loplus:"⨭",lotimes:"⨴",lowast:"∗",lowbar:"_",LowerLeftArrow:"↙",LowerRightArrow:"↘",loz:"◊",lozenge:"◊",lozf:"⧫",lpar:"(",lparlt:"⦓",lrarr:"⇆",lrcorner:"⌟",lrhar:"⇋",lrhard:"⥭",lrm:"",lrtri:"⊿",lsaquo:"‹",Lscr:"ℒ",lscr:"𝓁",Lsh:"↰",lsh:"↰",lsim:"≲",lsime:"⪍",lsimg:"⪏",lsqb:"[",lsquo:"‘",lsquor:"‚",Lstrok:"Ł",lstrok:"ł",Lt:"≪",LT:"<",lt:"<",ltcc:"⪦",ltcir:"⩹",ltdot:"⋖",lthree:"⋋",ltimes:"⋉",ltlarr:"⥶",ltquest:"⩻",ltri:"◃",ltrie:"⊴",ltrif:"◂",ltrPar:"⦖",lurdshar:"⥊",luruhar:"⥦",lvertneqq:"≨︀",lvnE:"≨︀",macr:"¯",male:"♂",malt:"✠",maltese:"✠",Map:"⤅",map:"↦",mapsto:"↦",mapstodown:"↧",mapstoleft:"↤",mapstoup:"↥",marker:"▮",mcomma:"⨩",Mcy:"М",mcy:"м",mdash:"—",mDDot:"∺",measuredangle:"∡",MediumSpace:" ",Mellintrf:"ℳ",Mfr:"𝔐",mfr:"𝔪",mho:"℧",micro:"µ",mid:"∣",midast:"*",midcir:"⫰",middot:"·",minus:"−",minusb:"⊟",minusd:"∸",minusdu:"⨪",MinusPlus:"∓",mlcp:"⫛",mldr:"…",mnplus:"∓",models:"⊧",Mopf:"𝕄",mopf:"𝕞",mp:"∓",Mscr:"ℳ",mscr:"𝓂",mstpos:"∾",Mu:"Μ",mu:"μ",multimap:"⊸",mumap:"⊸",nabla:"∇",Nacute:"Ń",nacute:"ń",nang:"∠⃒",nap:"≉",napE:"⩰̸",napid:"≋̸",napos:"ʼn",napprox:"≉",natur:"♮",natural:"♮",naturals:"ℕ",nbsp:" ",nbump:"≎̸",nbumpe:"≏̸",ncap:"⩃",Ncaron:"Ň",ncaron:"ň",Ncedil:"Ņ",ncedil:"ņ",ncong:"≇",ncongdot:"⩭̸",ncup:"⩂",Ncy:"Н",ncy:"н",ndash:"–",ne:"≠",nearhk:"⤤",neArr:"⇗",nearr:"↗",nearrow:"↗",nedot:"≐̸",NegativeMediumSpace:"",NegativeThickSpace:"",NegativeThinSpace:"",NegativeVeryThinSpace:"",nequiv:"≢",nesear:"⤨",nesim:"≂̸",NestedGreaterGreater:"≫",NestedLessLess:"≪",NewLine:`
|
|
40
|
+
`,nexist:"∄",nexists:"∄",Nfr:"𝔑",nfr:"𝔫",ngE:"≧̸",nge:"≱",ngeq:"≱",ngeqq:"≧̸",ngeqslant:"⩾̸",nges:"⩾̸",nGg:"⋙̸",ngsim:"≵",nGt:"≫⃒",ngt:"≯",ngtr:"≯",nGtv:"≫̸",nhArr:"⇎",nharr:"↮",nhpar:"⫲",ni:"∋",nis:"⋼",nisd:"⋺",niv:"∋",NJcy:"Њ",njcy:"њ",nlArr:"⇍",nlarr:"↚",nldr:"‥",nlE:"≦̸",nle:"≰",nLeftarrow:"⇍",nleftarrow:"↚",nLeftrightarrow:"⇎",nleftrightarrow:"↮",nleq:"≰",nleqq:"≦̸",nleqslant:"⩽̸",nles:"⩽̸",nless:"≮",nLl:"⋘̸",nlsim:"≴",nLt:"≪⃒",nlt:"≮",nltri:"⋪",nltrie:"⋬",nLtv:"≪̸",nmid:"∤",NoBreak:"",NonBreakingSpace:" ",Nopf:"ℕ",nopf:"𝕟",Not:"⫬",not:"¬",NotCongruent:"≢",NotCupCap:"≭",NotDoubleVerticalBar:"∦",NotElement:"∉",NotEqual:"≠",NotEqualTilde:"≂̸",NotExists:"∄",NotGreater:"≯",NotGreaterEqual:"≱",NotGreaterFullEqual:"≧̸",NotGreaterGreater:"≫̸",NotGreaterLess:"≹",NotGreaterSlantEqual:"⩾̸",NotGreaterTilde:"≵",NotHumpDownHump:"≎̸",NotHumpEqual:"≏̸",notin:"∉",notindot:"⋵̸",notinE:"⋹̸",notinva:"∉",notinvb:"⋷",notinvc:"⋶",NotLeftTriangle:"⋪",NotLeftTriangleBar:"⧏̸",NotLeftTriangleEqual:"⋬",NotLess:"≮",NotLessEqual:"≰",NotLessGreater:"≸",NotLessLess:"≪̸",NotLessSlantEqual:"⩽̸",NotLessTilde:"≴",NotNestedGreaterGreater:"⪢̸",NotNestedLessLess:"⪡̸",notni:"∌",notniva:"∌",notnivb:"⋾",notnivc:"⋽",NotPrecedes:"⊀",NotPrecedesEqual:"⪯̸",NotPrecedesSlantEqual:"⋠",NotReverseElement:"∌",NotRightTriangle:"⋫",NotRightTriangleBar:"⧐̸",NotRightTriangleEqual:"⋭",NotSquareSubset:"⊏̸",NotSquareSubsetEqual:"⋢",NotSquareSuperset:"⊐̸",NotSquareSupersetEqual:"⋣",NotSubset:"⊂⃒",NotSubsetEqual:"⊈",NotSucceeds:"⊁",NotSucceedsEqual:"⪰̸",NotSucceedsSlantEqual:"⋡",NotSucceedsTilde:"≿̸",NotSuperset:"⊃⃒",NotSupersetEqual:"⊉",NotTilde:"≁",NotTildeEqual:"≄",NotTildeFullEqual:"≇",NotTildeTilde:"≉",NotVerticalBar:"∤",npar:"∦",nparallel:"∦",nparsl:"⫽⃥",npart:"∂̸",npolint:"⨔",npr:"⊀",nprcue:"⋠",npre:"⪯̸",nprec:"⊀",npreceq:"⪯̸",nrArr:"⇏",nrarr:"↛",nrarrc:"⤳̸",nrarrw:"↝̸",nRightarrow:"⇏",nrightarrow:"↛",nrtri:"⋫",nrtrie:"⋭",nsc:"⊁",nsccue:"⋡",nsce:"⪰̸",Nscr:"𝒩",nscr:"𝓃",nshortmid:"∤",nshortparallel:"∦",nsim:"≁",nsime:"≄",nsimeq:"≄",nsmid:"∤",nspar:"∦",nsqsube:"⋢",nsqsupe:"⋣",nsub:"⊄",nsubE:"⫅̸",nsube:"⊈",nsubset:"⊂⃒",nsubseteq:"⊈",nsubseteqq:"⫅̸",nsucc:"⊁",nsucceq:"⪰̸",nsup:"⊅",nsupE:"⫆̸",nsupe:"⊉",nsupset:"⊃⃒",nsupseteq:"⊉",nsupseteqq:"⫆̸",ntgl:"≹",Ntilde:"Ñ",ntilde:"ñ",ntlg:"≸",ntriangleleft:"⋪",ntrianglelefteq:"⋬",ntriangleright:"⋫",ntrianglerighteq:"⋭",Nu:"Ν",nu:"ν",num:"#",numero:"№",numsp:" ",nvap:"≍⃒",nVDash:"⊯",nVdash:"⊮",nvDash:"⊭",nvdash:"⊬",nvge:"≥⃒",nvgt:">⃒",nvHarr:"⤄",nvinfin:"⧞",nvlArr:"⤂",nvle:"≤⃒",nvlt:"<⃒",nvltrie:"⊴⃒",nvrArr:"⤃",nvrtrie:"⊵⃒",nvsim:"∼⃒",nwarhk:"⤣",nwArr:"⇖",nwarr:"↖",nwarrow:"↖",nwnear:"⤧",Oacute:"Ó",oacute:"ó",oast:"⊛",ocir:"⊚",Ocirc:"Ô",ocirc:"ô",Ocy:"О",ocy:"о",odash:"⊝",Odblac:"Ő",odblac:"ő",odiv:"⨸",odot:"⊙",odsold:"⦼",OElig:"Œ",oelig:"œ",ofcir:"⦿",Ofr:"𝔒",ofr:"𝔬",ogon:"˛",Ograve:"Ò",ograve:"ò",ogt:"⧁",ohbar:"⦵",ohm:"Ω",oint:"∮",olarr:"↺",olcir:"⦾",olcross:"⦻",oline:"‾",olt:"⧀",Omacr:"Ō",omacr:"ō",Omega:"Ω",omega:"ω",Omicron:"Ο",omicron:"ο",omid:"⦶",ominus:"⊖",Oopf:"𝕆",oopf:"𝕠",opar:"⦷",OpenCurlyDoubleQuote:"“",OpenCurlyQuote:"‘",operp:"⦹",oplus:"⊕",Or:"⩔",or:"∨",orarr:"↻",ord:"⩝",order:"ℴ",orderof:"ℴ",ordf:"ª",ordm:"º",origof:"⊶",oror:"⩖",orslope:"⩗",orv:"⩛",oS:"Ⓢ",Oscr:"𝒪",oscr:"ℴ",Oslash:"Ø",oslash:"ø",osol:"⊘",Otilde:"Õ",otilde:"õ",Otimes:"⨷",otimes:"⊗",otimesas:"⨶",Ouml:"Ö",ouml:"ö",ovbar:"⌽",OverBar:"‾",OverBrace:"⏞",OverBracket:"⎴",OverParenthesis:"⏜",par:"∥",para:"¶",parallel:"∥",parsim:"⫳",parsl:"⫽",part:"∂",PartialD:"∂",Pcy:"П",pcy:"п",percnt:"%",period:".",permil:"‰",perp:"⊥",pertenk:"‱",Pfr:"𝔓",pfr:"𝔭",Phi:"Φ",phi:"φ",phiv:"ϕ",phmmat:"ℳ",phone:"☎",Pi:"Π",pi:"π",pitchfork:"⋔",piv:"ϖ",planck:"ℏ",planckh:"ℎ",plankv:"ℏ",plus:"+",plusacir:"⨣",plusb:"⊞",pluscir:"⨢",plusdo:"∔",plusdu:"⨥",pluse:"⩲",PlusMinus:"±",plusmn:"±",plussim:"⨦",plustwo:"⨧",pm:"±",Poincareplane:"ℌ",pointint:"⨕",Popf:"ℙ",popf:"𝕡",pound:"£",Pr:"⪻",pr:"≺",prap:"⪷",prcue:"≼",prE:"⪳",pre:"⪯",prec:"≺",precapprox:"⪷",preccurlyeq:"≼",Precedes:"≺",PrecedesEqual:"⪯",PrecedesSlantEqual:"≼",PrecedesTilde:"≾",preceq:"⪯",precnapprox:"⪹",precneqq:"⪵",precnsim:"⋨",precsim:"≾",Prime:"″",prime:"′",primes:"ℙ",prnap:"⪹",prnE:"⪵",prnsim:"⋨",prod:"∏",Product:"∏",profalar:"⌮",profline:"⌒",profsurf:"⌓",prop:"∝",Proportion:"∷",Proportional:"∝",propto:"∝",prsim:"≾",prurel:"⊰",Pscr:"𝒫",pscr:"𝓅",Psi:"Ψ",psi:"ψ",puncsp:" ",Qfr:"𝔔",qfr:"𝔮",qint:"⨌",Qopf:"ℚ",qopf:"𝕢",qprime:"⁗",Qscr:"𝒬",qscr:"𝓆",quaternions:"ℍ",quatint:"⨖",quest:"?",questeq:"≟",QUOT:'"',quot:'"',rAarr:"⇛",race:"∽̱",Racute:"Ŕ",racute:"ŕ",radic:"√",raemptyv:"⦳",Rang:"⟫",rang:"⟩",rangd:"⦒",range:"⦥",rangle:"⟩",raquo:"»",Rarr:"↠",rArr:"⇒",rarr:"→",rarrap:"⥵",rarrb:"⇥",rarrbfs:"⤠",rarrc:"⤳",rarrfs:"⤞",rarrhk:"↪",rarrlp:"↬",rarrpl:"⥅",rarrsim:"⥴",Rarrtl:"⤖",rarrtl:"↣",rarrw:"↝",rAtail:"⤜",ratail:"⤚",ratio:"∶",rationals:"ℚ",RBarr:"⤐",rBarr:"⤏",rbarr:"⤍",rbbrk:"❳",rbrace:"}",rbrack:"]",rbrke:"⦌",rbrksld:"⦎",rbrkslu:"⦐",Rcaron:"Ř",rcaron:"ř",Rcedil:"Ŗ",rcedil:"ŗ",rceil:"⌉",rcub:"}",Rcy:"Р",rcy:"р",rdca:"⤷",rdldhar:"⥩",rdquo:"”",rdquor:"”",rdsh:"↳",Re:"ℜ",real:"ℜ",realine:"ℛ",realpart:"ℜ",reals:"ℝ",rect:"▭",REG:"®",reg:"®",ReverseElement:"∋",ReverseEquilibrium:"⇋",ReverseUpEquilibrium:"⥯",rfisht:"⥽",rfloor:"⌋",Rfr:"ℜ",rfr:"𝔯",rHar:"⥤",rhard:"⇁",rharu:"⇀",rharul:"⥬",Rho:"Ρ",rho:"ρ",rhov:"ϱ",RightAngleBracket:"⟩",RightArrow:"→",Rightarrow:"⇒",rightarrow:"→",RightArrowBar:"⇥",RightArrowLeftArrow:"⇄",rightarrowtail:"↣",RightCeiling:"⌉",RightDoubleBracket:"⟧",RightDownTeeVector:"⥝",RightDownVector:"⇂",RightDownVectorBar:"⥕",RightFloor:"⌋",rightharpoondown:"⇁",rightharpoonup:"⇀",rightleftarrows:"⇄",rightleftharpoons:"⇌",rightrightarrows:"⇉",rightsquigarrow:"↝",RightTee:"⊢",RightTeeArrow:"↦",RightTeeVector:"⥛",rightthreetimes:"⋌",RightTriangle:"⊳",RightTriangleBar:"⧐",RightTriangleEqual:"⊵",RightUpDownVector:"⥏",RightUpTeeVector:"⥜",RightUpVector:"↾",RightUpVectorBar:"⥔",RightVector:"⇀",RightVectorBar:"⥓",ring:"˚",risingdotseq:"≓",rlarr:"⇄",rlhar:"⇌",rlm:"",rmoust:"⎱",rmoustache:"⎱",rnmid:"⫮",roang:"⟭",roarr:"⇾",robrk:"⟧",ropar:"⦆",Ropf:"ℝ",ropf:"𝕣",roplus:"⨮",rotimes:"⨵",RoundImplies:"⥰",rpar:")",rpargt:"⦔",rppolint:"⨒",rrarr:"⇉",Rrightarrow:"⇛",rsaquo:"›",Rscr:"ℛ",rscr:"𝓇",Rsh:"↱",rsh:"↱",rsqb:"]",rsquo:"’",rsquor:"’",rthree:"⋌",rtimes:"⋊",rtri:"▹",rtrie:"⊵",rtrif:"▸",rtriltri:"⧎",RuleDelayed:"⧴",ruluhar:"⥨",rx:"℞",Sacute:"Ś",sacute:"ś",sbquo:"‚",Sc:"⪼",sc:"≻",scap:"⪸",Scaron:"Š",scaron:"š",sccue:"≽",scE:"⪴",sce:"⪰",Scedil:"Ş",scedil:"ş",Scirc:"Ŝ",scirc:"ŝ",scnap:"⪺",scnE:"⪶",scnsim:"⋩",scpolint:"⨓",scsim:"≿",Scy:"С",scy:"с",sdot:"⋅",sdotb:"⊡",sdote:"⩦",searhk:"⤥",seArr:"⇘",searr:"↘",searrow:"↘",sect:"§",semi:";",seswar:"⤩",setminus:"∖",setmn:"∖",sext:"✶",Sfr:"𝔖",sfr:"𝔰",sfrown:"⌢",sharp:"♯",SHCHcy:"Щ",shchcy:"щ",SHcy:"Ш",shcy:"ш",ShortDownArrow:"↓",ShortLeftArrow:"←",shortmid:"∣",shortparallel:"∥",ShortRightArrow:"→",ShortUpArrow:"↑",shy:"",Sigma:"Σ",sigma:"σ",sigmaf:"ς",sigmav:"ς",sim:"∼",simdot:"⩪",sime:"≃",simeq:"≃",simg:"⪞",simgE:"⪠",siml:"⪝",simlE:"⪟",simne:"≆",simplus:"⨤",simrarr:"⥲",slarr:"←",SmallCircle:"∘",smallsetminus:"∖",smashp:"⨳",smeparsl:"⧤",smid:"∣",smile:"⌣",smt:"⪪",smte:"⪬",smtes:"⪬︀",SOFTcy:"Ь",softcy:"ь",sol:"/",solb:"⧄",solbar:"⌿",Sopf:"𝕊",sopf:"𝕤",spades:"♠",spadesuit:"♠",spar:"∥",sqcap:"⊓",sqcaps:"⊓︀",sqcup:"⊔",sqcups:"⊔︀",Sqrt:"√",sqsub:"⊏",sqsube:"⊑",sqsubset:"⊏",sqsubseteq:"⊑",sqsup:"⊐",sqsupe:"⊒",sqsupset:"⊐",sqsupseteq:"⊒",squ:"□",Square:"□",square:"□",SquareIntersection:"⊓",SquareSubset:"⊏",SquareSubsetEqual:"⊑",SquareSuperset:"⊐",SquareSupersetEqual:"⊒",SquareUnion:"⊔",squarf:"▪",squf:"▪",srarr:"→",Sscr:"𝒮",sscr:"𝓈",ssetmn:"∖",ssmile:"⌣",sstarf:"⋆",Star:"⋆",star:"☆",starf:"★",straightepsilon:"ϵ",straightphi:"ϕ",strns:"¯",Sub:"⋐",sub:"⊂",subdot:"⪽",subE:"⫅",sube:"⊆",subedot:"⫃",submult:"⫁",subnE:"⫋",subne:"⊊",subplus:"⪿",subrarr:"⥹",Subset:"⋐",subset:"⊂",subseteq:"⊆",subseteqq:"⫅",SubsetEqual:"⊆",subsetneq:"⊊",subsetneqq:"⫋",subsim:"⫇",subsub:"⫕",subsup:"⫓",succ:"≻",succapprox:"⪸",succcurlyeq:"≽",Succeeds:"≻",SucceedsEqual:"⪰",SucceedsSlantEqual:"≽",SucceedsTilde:"≿",succeq:"⪰",succnapprox:"⪺",succneqq:"⪶",succnsim:"⋩",succsim:"≿",SuchThat:"∋",Sum:"∑",sum:"∑",sung:"♪",Sup:"⋑",sup:"⊃",sup1:"¹",sup2:"²",sup3:"³",supdot:"⪾",supdsub:"⫘",supE:"⫆",supe:"⊇",supedot:"⫄",Superset:"⊃",SupersetEqual:"⊇",suphsol:"⟉",suphsub:"⫗",suplarr:"⥻",supmult:"⫂",supnE:"⫌",supne:"⊋",supplus:"⫀",Supset:"⋑",supset:"⊃",supseteq:"⊇",supseteqq:"⫆",supsetneq:"⊋",supsetneqq:"⫌",supsim:"⫈",supsub:"⫔",supsup:"⫖",swarhk:"⤦",swArr:"⇙",swarr:"↙",swarrow:"↙",swnwar:"⤪",szlig:"ß",Tab:" ",target:"⌖",Tau:"Τ",tau:"τ",tbrk:"⎴",Tcaron:"Ť",tcaron:"ť",Tcedil:"Ţ",tcedil:"ţ",Tcy:"Т",tcy:"т",tdot:"⃛",telrec:"⌕",Tfr:"𝔗",tfr:"𝔱",there4:"∴",Therefore:"∴",therefore:"∴",Theta:"Θ",theta:"θ",thetasym:"ϑ",thetav:"ϑ",thickapprox:"≈",thicksim:"∼",ThickSpace:" ",thinsp:" ",ThinSpace:" ",thkap:"≈",thksim:"∼",THORN:"Þ",thorn:"þ",Tilde:"∼",tilde:"˜",TildeEqual:"≃",TildeFullEqual:"≅",TildeTilde:"≈",times:"×",timesb:"⊠",timesbar:"⨱",timesd:"⨰",tint:"∭",toea:"⤨",top:"⊤",topbot:"⌶",topcir:"⫱",Topf:"𝕋",topf:"𝕥",topfork:"⫚",tosa:"⤩",tprime:"‴",TRADE:"™",trade:"™",triangle:"▵",triangledown:"▿",triangleleft:"◃",trianglelefteq:"⊴",triangleq:"≜",triangleright:"▹",trianglerighteq:"⊵",tridot:"◬",trie:"≜",triminus:"⨺",TripleDot:"⃛",triplus:"⨹",trisb:"⧍",tritime:"⨻",trpezium:"⏢",Tscr:"𝒯",tscr:"𝓉",TScy:"Ц",tscy:"ц",TSHcy:"Ћ",tshcy:"ћ",Tstrok:"Ŧ",tstrok:"ŧ",twixt:"≬",twoheadleftarrow:"↞",twoheadrightarrow:"↠",Uacute:"Ú",uacute:"ú",Uarr:"↟",uArr:"⇑",uarr:"↑",Uarrocir:"⥉",Ubrcy:"Ў",ubrcy:"ў",Ubreve:"Ŭ",ubreve:"ŭ",Ucirc:"Û",ucirc:"û",Ucy:"У",ucy:"у",udarr:"⇅",Udblac:"Ű",udblac:"ű",udhar:"⥮",ufisht:"⥾",Ufr:"𝔘",ufr:"𝔲",Ugrave:"Ù",ugrave:"ù",uHar:"⥣",uharl:"↿",uharr:"↾",uhblk:"▀",ulcorn:"⌜",ulcorner:"⌜",ulcrop:"⌏",ultri:"◸",Umacr:"Ū",umacr:"ū",uml:"¨",UnderBar:"_",UnderBrace:"⏟",UnderBracket:"⎵",UnderParenthesis:"⏝",Union:"⋃",UnionPlus:"⊎",Uogon:"Ų",uogon:"ų",Uopf:"𝕌",uopf:"𝕦",UpArrow:"↑",Uparrow:"⇑",uparrow:"↑",UpArrowBar:"⤒",UpArrowDownArrow:"⇅",UpDownArrow:"↕",Updownarrow:"⇕",updownarrow:"↕",UpEquilibrium:"⥮",upharpoonleft:"↿",upharpoonright:"↾",uplus:"⊎",UpperLeftArrow:"↖",UpperRightArrow:"↗",Upsi:"ϒ",upsi:"υ",upsih:"ϒ",Upsilon:"Υ",upsilon:"υ",UpTee:"⊥",UpTeeArrow:"↥",upuparrows:"⇈",urcorn:"⌝",urcorner:"⌝",urcrop:"⌎",Uring:"Ů",uring:"ů",urtri:"◹",Uscr:"𝒰",uscr:"𝓊",utdot:"⋰",Utilde:"Ũ",utilde:"ũ",utri:"▵",utrif:"▴",uuarr:"⇈",Uuml:"Ü",uuml:"ü",uwangle:"⦧",vangrt:"⦜",varepsilon:"ϵ",varkappa:"ϰ",varnothing:"∅",varphi:"ϕ",varpi:"ϖ",varpropto:"∝",vArr:"⇕",varr:"↕",varrho:"ϱ",varsigma:"ς",varsubsetneq:"⊊︀",varsubsetneqq:"⫋︀",varsupsetneq:"⊋︀",varsupsetneqq:"⫌︀",vartheta:"ϑ",vartriangleleft:"⊲",vartriangleright:"⊳",Vbar:"⫫",vBar:"⫨",vBarv:"⫩",Vcy:"В",vcy:"в",VDash:"⊫",Vdash:"⊩",vDash:"⊨",vdash:"⊢",Vdashl:"⫦",Vee:"⋁",vee:"∨",veebar:"⊻",veeeq:"≚",vellip:"⋮",Verbar:"‖",verbar:"|",Vert:"‖",vert:"|",VerticalBar:"∣",VerticalLine:"|",VerticalSeparator:"❘",VerticalTilde:"≀",VeryThinSpace:" ",Vfr:"𝔙",vfr:"𝔳",vltri:"⊲",vnsub:"⊂⃒",vnsup:"⊃⃒",Vopf:"𝕍",vopf:"𝕧",vprop:"∝",vrtri:"⊳",Vscr:"𝒱",vscr:"𝓋",vsubnE:"⫋︀",vsubne:"⊊︀",vsupnE:"⫌︀",vsupne:"⊋︀",Vvdash:"⊪",vzigzag:"⦚",Wcirc:"Ŵ",wcirc:"ŵ",wedbar:"⩟",Wedge:"⋀",wedge:"∧",wedgeq:"≙",weierp:"℘",Wfr:"𝔚",wfr:"𝔴",Wopf:"𝕎",wopf:"𝕨",wp:"℘",wr:"≀",wreath:"≀",Wscr:"𝒲",wscr:"𝓌",xcap:"⋂",xcirc:"◯",xcup:"⋃",xdtri:"▽",Xfr:"𝔛",xfr:"𝔵",xhArr:"⟺",xharr:"⟷",Xi:"Ξ",xi:"ξ",xlArr:"⟸",xlarr:"⟵",xmap:"⟼",xnis:"⋻",xodot:"⨀",Xopf:"𝕏",xopf:"𝕩",xoplus:"⨁",xotime:"⨂",xrArr:"⟹",xrarr:"⟶",Xscr:"𝒳",xscr:"𝓍",xsqcup:"⨆",xuplus:"⨄",xutri:"△",xvee:"⋁",xwedge:"⋀",Yacute:"Ý",yacute:"ý",YAcy:"Я",yacy:"я",Ycirc:"Ŷ",ycirc:"ŷ",Ycy:"Ы",ycy:"ы",yen:"¥",Yfr:"𝔜",yfr:"𝔶",YIcy:"Ї",yicy:"ї",Yopf:"𝕐",yopf:"𝕪",Yscr:"𝒴",yscr:"𝓎",YUcy:"Ю",yucy:"ю",Yuml:"Ÿ",yuml:"ÿ",Zacute:"Ź",zacute:"ź",Zcaron:"Ž",zcaron:"ž",Zcy:"З",zcy:"з",Zdot:"Ż",zdot:"ż",zeetrf:"ℨ",ZeroWidthSpace:"",Zeta:"Ζ",zeta:"ζ",Zfr:"ℨ",zfr:"𝔷",ZHcy:"Ж",zhcy:"ж",zigrarr:"⇝",Zopf:"ℤ",zopf:"𝕫",Zscr:"𝒵",zscr:"𝓏",zwj:"",zwnj:""}),n.entityMap=n.HTML_ENTITIES})(e0);var Ym={},gl=ea.NAMESPACE,Gc=/[A-Z_a-z\xC0-\xD6\xD8-\xF6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]/,gf=new RegExp("[\\-\\.0-9"+Gc.source.slice(1,-1)+"\\u00B7\\u0300-\\u036F\\u203F-\\u2040]"),vf=new RegExp("^"+Gc.source+gf.source+"*(?::"+Gc.source+gf.source+"*)?$"),Ns=0,ua=1,pi=2,Ss=3,hi=4,fi=5,Bs=6,cr=7;function zi(n,t){this.message=n,this.locator=t,Error.captureStackTrace&&Error.captureStackTrace(this,zi)}zi.prototype=new Error;zi.prototype.name=zi.name;function t0(){}t0.prototype={parse:function(n,t,o){var a=this.domBuilder;a.startDocument(),n0(t,t={}),Fq(n,t,o,a,this.errorHandler),a.endDocument()}};function Fq(n,t,o,a,i){function s(H){if(H>65535){H-=65536;var q=55296+(H>>10),O=56320+(H&1023);return String.fromCharCode(q,O)}else return String.fromCharCode(H)}function l(H){var q=H.slice(1,-1);return Object.hasOwnProperty.call(o,q)?o[q]:q.charAt(0)==="#"?s(parseInt(q.substr(1).replace("x","0x"))):(i.error("entity not found:"+H),H)}function r(H){if(H>p){var q=n.substring(p,H).replace(/&#?\w+;/g,l);d&&u(p),a.characters(q,0,H-p),p=H}}function u(H,q){for(;H>=f&&(q=m.exec(n));)c=q.index,f=c+q[0].length,d.lineNumber++;d.columnNumber=H-c+1}for(var c=0,f=0,m=/.*(?:\r\n?|\n)|.*$/g,d=a.locator,h=[{currentNSMap:t}],g={},p=0;;){try{var b=n.indexOf("<",p);if(b<0){if(!n.substr(p).match(/^\s*$/)){var _=a.doc,w=_.createTextNode(n.substr(p));_.appendChild(w),a.currentElement=w}return}switch(b>p&&r(b),n.charAt(b+1)){case"/":var A=n.indexOf(">",b+3),v=n.substring(b+2,A).replace(/[ \t\n\r]+$/g,""),V=h.pop();A<0?(v=n.substring(b+2).replace(/[\s<].*/,""),i.error("end tag name: "+v+" is not complete:"+V.tagName),A=b+1+v.length):v.match(/\s</)&&(v=v.replace(/[\s<].*/,""),i.error("end tag name: "+v+" maybe not complete"),A=b+1+v.length);var C=V.localNSMap,S=V.tagName==v,N=S||V.tagName&&V.tagName.toLowerCase()==v.toLowerCase();if(N){if(a.endElement(V.uri,V.localName,v),C)for(var D in C)Object.prototype.hasOwnProperty.call(C,D)&&a.endPrefixMapping(D);S||i.fatalError("end tag name: "+v+" is not match the current start tagName:"+V.tagName)}else h.push(V);A++;break;case"?":d&&u(b),A=Wq(n,b,a);break;case"!":d&&u(b),A=qq(n,b,a,i);break;default:d&&u(b);var $=new o0,k=h[h.length-1].currentNSMap,A=Hq(n,b,$,k,l,i),B=$.length;if(!$.closed&&zq(n,A,$.tagName,g)&&($.closed=!0,o.nbsp||i.warning("unclosed xml attribute")),d&&B){for(var I=yf(d,{}),z=0;z<B;z++){var Y=$[z];u(Y.offset),Y.locator=yf(d,{})}a.locator=I,_f($,a,k)&&h.push($),a.locator=d}else _f($,a,k)&&h.push($);gl.isHTML($.uri)&&!$.closed?A=jq(n,A,$.tagName,l,a):A++}}catch(H){if(H instanceof zi)throw H;i.error("element parse error: "+H),A=-1}A>p?p=A:r(Math.max(b,p)+1)}}function yf(n,t){return t.lineNumber=n.lineNumber,t.columnNumber=n.columnNumber,t}function Hq(n,t,o,a,i,s){function l(d,h,g){o.attributeNames.hasOwnProperty(d)&&s.fatalError("Attribute "+d+" redefined"),o.addValue(d,h.replace(/[\t\n\r]/g," ").replace(/&#?\w+;/g,i),g)}for(var r,u,c=++t,f=Ns;;){var m=n.charAt(c);switch(m){case"=":if(f===ua)r=n.slice(t,c),f=Ss;else if(f===pi)f=Ss;else throw new Error("attribute equal must after attrName");break;case"'":case'"':if(f===Ss||f===ua)if(f===ua&&(s.warning('attribute value must after "="'),r=n.slice(t,c)),t=c+1,c=n.indexOf(m,t),c>0)u=n.slice(t,c),l(r,u,t-1),f=fi;else throw new Error("attribute value no end '"+m+"' match");else if(f==hi)u=n.slice(t,c),l(r,u,t),s.warning('attribute "'+r+'" missed start quot('+m+")!!"),t=c+1,f=fi;else throw new Error('attribute value must after "="');break;case"/":switch(f){case Ns:o.setTagName(n.slice(t,c));case fi:case Bs:case cr:f=cr,o.closed=!0;case hi:case ua:break;case pi:o.closed=!0;break;default:throw new Error("attribute invalid close char('/')")}break;case"":return s.error("unexpected end of input"),f==Ns&&o.setTagName(n.slice(t,c)),c;case">":switch(f){case Ns:o.setTagName(n.slice(t,c));case fi:case Bs:case cr:break;case hi:case ua:u=n.slice(t,c),u.slice(-1)==="/"&&(o.closed=!0,u=u.slice(0,-1));case pi:f===pi&&(u=r),f==hi?(s.warning('attribute "'+u+'" missed quot(")!'),l(r,u,t)):((!gl.isHTML(a[""])||!u.match(/^(?:disabled|checked|selected)$/i))&&s.warning('attribute "'+u+'" missed value!! "'+u+'" instead!!'),l(u,u,t));break;case Ss:throw new Error("attribute value missed!!")}return c;case"":m=" ";default:if(m<=" ")switch(f){case Ns:o.setTagName(n.slice(t,c)),f=Bs;break;case ua:r=n.slice(t,c),f=pi;break;case hi:var u=n.slice(t,c);s.warning('attribute "'+u+'" missed quot(")!!'),l(r,u,t);case fi:f=Bs;break}else switch(f){case pi:o.tagName,(!gl.isHTML(a[""])||!r.match(/^(?:disabled|checked|selected)$/i))&&s.warning('attribute "'+r+'" missed value!! "'+r+'" instead2!!'),l(r,r,t),t=c,f=ua;break;case fi:s.warning('attribute space is required"'+r+'"!!');case Bs:f=ua,t=c;break;case Ss:f=hi,t=c;break;case cr:throw new Error("elements closed character '/' and '>' must be connected to")}}c++}}function _f(n,t,o){for(var a=n.tagName,i=null,m=n.length;m--;){var s=n[m],l=s.qName,r=s.value,d=l.indexOf(":");if(d>0)var u=s.prefix=l.slice(0,d),c=l.slice(d+1),f=u==="xmlns"&&c;else c=l,u=null,f=l==="xmlns"&&"";s.localName=c,f!==!1&&(i==null&&(i={},n0(o,o={})),o[f]=i[f]=r,s.uri=gl.XMLNS,t.startPrefixMapping(f,r))}for(var m=n.length;m--;){s=n[m];var u=s.prefix;u&&(u==="xml"&&(s.uri=gl.XML),u!=="xmlns"&&(s.uri=o[u||""]))}var d=a.indexOf(":");d>0?(u=n.prefix=a.slice(0,d),c=n.localName=a.slice(d+1)):(u=null,c=n.localName=a);var h=n.uri=o[u||""];if(t.startElement(h,c,a,n),n.closed){if(t.endElement(h,c,a),i)for(u in i)Object.prototype.hasOwnProperty.call(i,u)&&t.endPrefixMapping(u)}else return n.currentNSMap=o,n.localNSMap=i,!0}function jq(n,t,o,a,i){if(/^(?:script|textarea)$/i.test(o)){var s=n.indexOf("</"+o+">",t),l=n.substring(t+1,s);if(/[&<]/.test(l))return/^script$/i.test(o)?(i.characters(l,0,l.length),s):(l=l.replace(/&#?\w+;/g,a),i.characters(l,0,l.length),s)}return t+1}function zq(n,t,o,a){var i=a[o];return i==null&&(i=n.lastIndexOf("</"+o+">"),i<t&&(i=n.lastIndexOf("</"+o)),a[o]=i),i<t}function n0(n,t){for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(t[o]=n[o])}function qq(n,t,o,a){var i=n.charAt(t+2);switch(i){case"-":if(n.charAt(t+3)==="-"){var s=n.indexOf("-->",t+4);return s>t?(o.comment(n,t+4,s-t-4),s+3):(a.error("Unclosed comment"),-1)}else return-1;default:if(n.substr(t+3,6)=="CDATA["){var s=n.indexOf("]]>",t+9);return o.startCDATA(),o.characters(n,t+9,s-t-9),o.endCDATA(),s+3}var l=Gq(n,t),r=l.length;if(r>1&&/!doctype/i.test(l[0][0])){var u=l[1][0],c=!1,f=!1;r>3&&(/^public$/i.test(l[2][0])?(c=l[3][0],f=r>4&&l[4][0]):/^system$/i.test(l[2][0])&&(f=l[3][0]));var m=l[r-1];return o.startDTD(u,c,f),o.endDTD(),m.index+m[0].length}}return-1}function Wq(n,t,o){var a=n.indexOf("?>",t);if(a){var i=n.substring(t,a).match(/^<\?(\S*)\s*([\s\S]*?)\s*$/);return i?(i[0].length,o.processingInstruction(i[1],i[2]),a+2):-1}return-1}function o0(){this.attributeNames={}}o0.prototype={setTagName:function(n){if(!vf.test(n))throw new Error("invalid tagName:"+n);this.tagName=n},addValue:function(n,t,o){if(!vf.test(n))throw new Error("invalid attribute:"+n);this.attributeNames[n]=this.length,this[this.length++]={qName:n,value:t,offset:o}},length:0,getLocalName:function(n){return this[n].localName},getLocator:function(n){return this[n].locator},getQName:function(n){return this[n].qName},getURI:function(n){return this[n].uri},getValue:function(n){return this[n].value}};function Gq(n,t){var o,a=[],i=/'[^']+'|"[^"]+"|[^\s<>\/=]+=?|(\/?\s*>|<)/g;for(i.lastIndex=t,i.exec(n);o=i.exec(n);)if(a.push(o),o[1])return a}Ym.XMLReader=t0;Ym.ParseError=zi;var Xq=ea,Yq=ka,bf=e0,a0=Ym,Kq=Yq.DOMImplementation,wf=Xq.NAMESPACE,Qq=a0.ParseError,Jq=a0.XMLReader;function i0(n){return n.replace(/\r[\n\u0085]/g,`
|
|
41
|
+
`).replace(/[\r\u0085\u2028]/g,`
|
|
42
|
+
`)}function s0(n){this.options=n||{locator:{}}}s0.prototype.parseFromString=function(n,t){var o=this.options,a=new Jq,i=o.domBuilder||new Nl,s=o.errorHandler,l=o.locator,r=o.xmlns||{},u=/\/x?html?$/.test(t),c=u?bf.HTML_ENTITIES:bf.XML_ENTITIES;l&&i.setDocumentLocator(l),a.errorHandler=Zq(s,i,l),a.domBuilder=o.domBuilder||i,u&&(r[""]=wf.HTML),r.xml=r.xml||wf.XML;var f=o.normalizeLineEndings||i0;return n&&typeof n=="string"?a.parse(f(n),r,c):a.errorHandler.error("invalid doc source"),i.doc};function Zq(n,t,o){if(!n){if(t instanceof Nl)return t;n=t}var a={},i=n instanceof Function;o=o||{};function s(l){var r=n[l];!r&&i&&(r=n.length==2?function(u){n(l,u)}:n),a[l]=r&&function(u){r("[xmldom "+l+"] "+u+Xc(o))}||function(){}}return s("warning"),s("error"),s("fatalError"),a}function Nl(){this.cdata=!1}function gi(n,t){t.lineNumber=n.lineNumber,t.columnNumber=n.columnNumber}Nl.prototype={startDocument:function(){this.doc=new Kq().createDocument(null,null,null),this.locator&&(this.doc.documentURI=this.locator.systemId)},startElement:function(n,t,o,a){var i=this.doc,s=i.createElementNS(n,o||t),l=a.length;mr(this,s),this.currentElement=s,this.locator&&gi(this.locator,s);for(var r=0;r<l;r++){var n=a.getURI(r),u=a.getValue(r),o=a.getQName(r),c=i.createAttributeNS(n,o);this.locator&&gi(a.getLocator(r),c),c.value=c.nodeValue=u,s.setAttributeNode(c)}},endElement:function(n,t,o){var a=this.currentElement;a.tagName,this.currentElement=a.parentNode},startPrefixMapping:function(n,t){},endPrefixMapping:function(n){},processingInstruction:function(n,t){var o=this.doc.createProcessingInstruction(n,t);this.locator&&gi(this.locator,o),mr(this,o)},ignorableWhitespace:function(n,t,o){},characters:function(n,t,o){if(n=xf.apply(this,arguments),n){if(this.cdata)var a=this.doc.createCDATASection(n);else var a=this.doc.createTextNode(n);this.currentElement?this.currentElement.appendChild(a):/^\s*$/.test(n)&&this.doc.appendChild(a),this.locator&&gi(this.locator,a)}},skippedEntity:function(n){},endDocument:function(){this.doc.normalize()},setDocumentLocator:function(n){(this.locator=n)&&(n.lineNumber=0)},comment:function(n,t,o){n=xf.apply(this,arguments);var a=this.doc.createComment(n);this.locator&&gi(this.locator,a),mr(this,a)},startCDATA:function(){this.cdata=!0},endCDATA:function(){this.cdata=!1},startDTD:function(n,t,o){var a=this.doc.implementation;if(a&&a.createDocumentType){var i=a.createDocumentType(n,t,o);this.locator&&gi(this.locator,i),mr(this,i),this.doc.doctype=i}},warning:function(n){console.warn("[xmldom warning] "+n,Xc(this.locator))},error:function(n){console.error("[xmldom error] "+n,Xc(this.locator))},fatalError:function(n){throw new Qq(n,this.locator)}};function Xc(n){if(n)return`
|
|
43
|
+
@`+(n.systemId||"")+"#[line:"+n.lineNumber+",col:"+n.columnNumber+"]"}function xf(n,t,o){return typeof n=="string"?n.substr(t,o):n.length>=t+o||t?new java.lang.String(n,t,o)+"":n}"endDTD,startEntity,endEntity,attributeDecl,elementDecl,externalEntityDecl,internalEntityDecl,resolveEntity,getExternalSubset,notationDecl,unparsedEntityDecl".replace(/\w+/g,function(n){Nl.prototype[n]=function(){return null}});function mr(n,t){n.currentElement?n.currentElement.appendChild(t):n.doc.appendChild(t)}gu.__DOMHandler=Nl;gu.normalizeLineEndings=i0;gu.DOMParser=s0;var eW=gu.DOMParser;/*! @name mpd-parser @version 1.3.1 @license Apache-2.0 */const Vf=n=>!!n&&typeof n=="object",qt=(...n)=>n.reduce((t,o)=>(typeof o!="object"||Object.keys(o).forEach(a=>{Array.isArray(t[a])&&Array.isArray(o[a])?t[a]=t[a].concat(o[a]):Vf(t[a])&&Vf(o[a])?t[a]=qt(t[a],o[a]):t[a]=o[a]}),t),{}),l0=n=>Object.keys(n).map(t=>n[t]),tW=(n,t)=>{const o=[];for(let a=n;a<t;a++)o.push(a);return o},qi=n=>n.reduce((t,o)=>t.concat(o),[]),r0=n=>{if(!n.length)return[];const t=[];for(let o=0;o<n.length;o++)t.push(n[o]);return t},nW=(n,t)=>n.reduce((o,a,i)=>(a[t]&&o.push(i),o),[]),oW=(n,t)=>l0(n.reduce((o,a)=>(a.forEach(i=>{o[t(i)]=i}),o),{}));var Wi={INVALID_NUMBER_OF_PERIOD:"INVALID_NUMBER_OF_PERIOD",DASH_EMPTY_MANIFEST:"DASH_EMPTY_MANIFEST",DASH_INVALID_XML:"DASH_INVALID_XML",NO_BASE_URL:"NO_BASE_URL",SEGMENT_TIME_UNSPECIFIED:"SEGMENT_TIME_UNSPECIFIED",UNSUPPORTED_UTC_TIMING_SCHEME:"UNSUPPORTED_UTC_TIMING_SCHEME"};const vl=({baseUrl:n="",source:t="",range:o="",indexRange:a=""})=>{const i={uri:t,resolvedUri:pu(n||"",t)};if(o||a){const l=(o||a).split("-");let r=X.BigInt?X.BigInt(l[0]):parseInt(l[0],10),u=X.BigInt?X.BigInt(l[1]):parseInt(l[1],10);r<Number.MAX_SAFE_INTEGER&&typeof r=="bigint"&&(r=Number(r)),u<Number.MAX_SAFE_INTEGER&&typeof u=="bigint"&&(u=Number(u));let c;typeof u=="bigint"||typeof r=="bigint"?c=X.BigInt(u)-X.BigInt(r)+X.BigInt(1):c=u-r+1,typeof c=="bigint"&&c<Number.MAX_SAFE_INTEGER&&(c=Number(c)),i.byterange={length:c,offset:r}}return i},aW=n=>{let t;return typeof n.offset=="bigint"||typeof n.length=="bigint"?t=X.BigInt(n.offset)+X.BigInt(n.length)-X.BigInt(1):t=n.offset+n.length-1,`${n.offset}-${t}`},Cf=n=>(n&&typeof n!="number"&&(n=parseInt(n,10)),isNaN(n)?null:n),iW={static(n){const{duration:t,timescale:o=1,sourceDuration:a,periodDuration:i}=n,s=Cf(n.endNumber),l=t/o;return typeof s=="number"?{start:0,end:s}:typeof i=="number"?{start:0,end:i/l}:{start:0,end:a/l}},dynamic(n){const{NOW:t,clientOffset:o,availabilityStartTime:a,timescale:i=1,duration:s,periodStart:l=0,minimumUpdatePeriod:r=0,timeShiftBufferDepth:u=1/0}=n,c=Cf(n.endNumber),f=(t+o)/1e3,m=a+l,h=f+r-m,g=Math.ceil(h*i/s),p=Math.floor((f-m-u)*i/s),b=Math.floor((f-m)*i/s);return{start:Math.max(0,p),end:typeof c=="number"?c:Math.min(g,b)}}},sW=n=>t=>{const{duration:o,timescale:a=1,periodStart:i,startNumber:s=1}=n;return{number:s+t,duration:o/a,timeline:i,time:t*o}},Km=n=>{const{type:t,duration:o,timescale:a=1,periodDuration:i,sourceDuration:s}=n,{start:l,end:r}=iW[t](n),u=tW(l,r).map(sW(n));if(t==="static"){const c=u.length-1,f=typeof i=="number"?i:s;u[c].duration=f-o/a*c}return u},d0=n=>{const{baseUrl:t,initialization:o={},sourceDuration:a,indexRange:i="",periodStart:s,presentationTime:l,number:r=0,duration:u}=n;if(!t)throw new Error(Wi.NO_BASE_URL);const c=vl({baseUrl:t,source:o.sourceURL,range:o.range}),f=vl({baseUrl:t,source:t,indexRange:i});if(f.map=c,u){const m=Km(n);m.length&&(f.duration=m[0].duration,f.timeline=m[0].timeline)}else a&&(f.duration=a,f.timeline=s);return f.presentationTime=l||s,f.number=r,[f]},Qm=(n,t,o)=>{const a=n.sidx.map?n.sidx.map:null,i=n.sidx.duration,s=n.timeline||0,l=n.sidx.byterange,r=l.offset+l.length,u=t.timescale,c=t.references.filter(b=>b.referenceType!==1),f=[],m=n.endList?"static":"dynamic",d=n.sidx.timeline;let h=d,g=n.mediaSequence||0,p;typeof t.firstOffset=="bigint"?p=X.BigInt(r)+t.firstOffset:p=r+t.firstOffset;for(let b=0;b<c.length;b++){const _=t.references[b],w=_.referencedSize,v=_.subsegmentDuration;let V;typeof p=="bigint"?V=p+X.BigInt(w)-X.BigInt(1):V=p+w-1;const C=`${p}-${V}`,N=d0({baseUrl:o,timescale:u,timeline:s,periodStart:d,presentationTime:h,number:g,duration:v,sourceDuration:i,indexRange:C,type:m})[0];a&&(N.map=a),f.push(N),typeof p=="bigint"?p+=X.BigInt(w):p+=w,h+=v/u,g++}return n.segments=f,n},lW=["AUDIO","SUBTITLES"],rW=1/60,u0=n=>oW(n,({timeline:t})=>t).sort((t,o)=>t.timeline>o.timeline?1:-1),dW=(n,t)=>{for(let o=0;o<n.length;o++)if(n[o].attributes.NAME===t)return n[o];return null},kf=n=>{let t=[];return Eq(n,lW,(o,a,i,s)=>{t=t.concat(o.playlists||[])}),t},Ef=({playlist:n,mediaSequence:t})=>{n.mediaSequence=t,n.segments.forEach((o,a)=>{o.number=n.mediaSequence+a})},uW=({oldPlaylists:n,newPlaylists:t,timelineStarts:o})=>{t.forEach(a=>{a.discontinuitySequence=o.findIndex(function({timeline:u}){return u===a.timeline});const i=dW(n,a.attributes.NAME);if(!i||a.sidx)return;const s=a.segments[0],l=i.segments.findIndex(function(u){return Math.abs(u.presentationTime-s.presentationTime)<rW});if(l===-1){Ef({playlist:a,mediaSequence:i.mediaSequence+i.segments.length}),a.segments[0].discontinuity=!0,a.discontinuityStarts.unshift(0),(!i.segments.length&&a.timeline>i.timeline||i.segments.length&&a.timeline>i.segments[i.segments.length-1].timeline)&&a.discontinuitySequence--;return}i.segments[l].discontinuity&&!s.discontinuity&&(s.discontinuity=!0,a.discontinuityStarts.unshift(0),a.discontinuitySequence--),Ef({playlist:a,mediaSequence:i.segments[l].number})})},cW=({oldManifest:n,newManifest:t})=>{const o=n.playlists.concat(kf(n)),a=t.playlists.concat(kf(t));return t.timelineStarts=u0([n.timelineStarts,t.timelineStarts]),uW({oldPlaylists:o,newPlaylists:a,timelineStarts:t.timelineStarts}),t},vu=n=>n&&n.uri+"-"+aW(n.byterange),hc=n=>{const t=n.reduce(function(a,i){return a[i.attributes.baseUrl]||(a[i.attributes.baseUrl]=[]),a[i.attributes.baseUrl].push(i),a},{});let o=[];return Object.values(t).forEach(a=>{const i=l0(a.reduce((s,l)=>{const r=l.attributes.id+(l.attributes.lang||"");return s[r]?(l.segments&&(l.segments[0]&&(l.segments[0].discontinuity=!0),s[r].segments.push(...l.segments)),l.attributes.contentProtection&&(s[r].attributes.contentProtection=l.attributes.contentProtection)):(s[r]=l,s[r].attributes.timelineStarts=[]),s[r].attributes.timelineStarts.push({start:l.attributes.periodStart,timeline:l.attributes.periodStart}),s},{}));o=o.concat(i)}),o.map(a=>(a.discontinuityStarts=nW(a.segments||[],"discontinuity"),a))},Jm=(n,t)=>{const o=vu(n.sidx),a=o&&t[o]&&t[o].sidx;return a&&Qm(n,a,n.sidx.resolvedUri),n},mW=(n,t={})=>{if(!Object.keys(t).length)return n;for(const o in n)n[o]=Jm(n[o],t);return n},pW=({attributes:n,segments:t,sidx:o,mediaSequence:a,discontinuitySequence:i,discontinuityStarts:s},l)=>{const r={attributes:{NAME:n.id,BANDWIDTH:n.bandwidth,CODECS:n.codecs,"PROGRAM-ID":1},uri:"",endList:n.type==="static",timeline:n.periodStart,resolvedUri:n.baseUrl||"",targetDuration:n.duration,discontinuitySequence:i,discontinuityStarts:s,timelineStarts:n.timelineStarts,mediaSequence:a,segments:t};return n.contentProtection&&(r.contentProtection=n.contentProtection),n.serviceLocation&&(r.attributes.serviceLocation=n.serviceLocation),o&&(r.sidx=o),l&&(r.attributes.AUDIO="audio",r.attributes.SUBTITLES="subs"),r},hW=({attributes:n,segments:t,mediaSequence:o,discontinuityStarts:a,discontinuitySequence:i})=>{typeof t>"u"&&(t=[{uri:n.baseUrl,timeline:n.periodStart,resolvedUri:n.baseUrl||"",duration:n.sourceDuration,number:0}],n.duration=n.sourceDuration);const s={NAME:n.id,BANDWIDTH:n.bandwidth,"PROGRAM-ID":1};n.codecs&&(s.CODECS=n.codecs);const l={attributes:s,uri:"",endList:n.type==="static",timeline:n.periodStart,resolvedUri:n.baseUrl||"",targetDuration:n.duration,timelineStarts:n.timelineStarts,discontinuityStarts:a,discontinuitySequence:i,mediaSequence:o,segments:t};return n.serviceLocation&&(l.attributes.serviceLocation=n.serviceLocation),l},fW=(n,t={},o=!1)=>{let a;const i=n.reduce((s,l)=>{const r=l.attributes.role&&l.attributes.role.value||"",u=l.attributes.lang||"";let c=l.attributes.label||"main";if(u&&!l.attributes.label){const m=r?` (${r})`:"";c=`${l.attributes.lang}${m}`}s[c]||(s[c]={language:u,autoselect:!0,default:r==="main",playlists:[],uri:""});const f=Jm(pW(l,o),t);return s[c].playlists.push(f),typeof a>"u"&&r==="main"&&(a=l,a.default=!0),s},{});if(!a){const s=Object.keys(i)[0];i[s].default=!0}return i},gW=(n,t={})=>n.reduce((o,a)=>{const i=a.attributes.label||a.attributes.lang||"text",s=a.attributes.lang||"und";return o[i]||(o[i]={language:s,default:!1,autoselect:!1,playlists:[],uri:""}),o[i].playlists.push(Jm(hW(a),t)),o},{}),vW=n=>n.reduce((t,o)=>(o&&o.forEach(a=>{const{channel:i,language:s}=a;t[s]={autoselect:!1,default:!1,instreamId:i,language:s},a.hasOwnProperty("aspectRatio")&&(t[s].aspectRatio=a.aspectRatio),a.hasOwnProperty("easyReader")&&(t[s].easyReader=a.easyReader),a.hasOwnProperty("3D")&&(t[s]["3D"]=a["3D"])}),t),{}),yW=({attributes:n,segments:t,sidx:o,discontinuityStarts:a})=>{const i={attributes:{NAME:n.id,AUDIO:"audio",SUBTITLES:"subs",RESOLUTION:{width:n.width,height:n.height},CODECS:n.codecs,BANDWIDTH:n.bandwidth,"PROGRAM-ID":1},uri:"",endList:n.type==="static",timeline:n.periodStart,resolvedUri:n.baseUrl||"",targetDuration:n.duration,discontinuityStarts:a,timelineStarts:n.timelineStarts,segments:t};return n.frameRate&&(i.attributes["FRAME-RATE"]=n.frameRate),n.contentProtection&&(i.contentProtection=n.contentProtection),n.serviceLocation&&(i.attributes.serviceLocation=n.serviceLocation),o&&(i.sidx=o),i},_W=({attributes:n})=>n.mimeType==="video/mp4"||n.mimeType==="video/webm"||n.contentType==="video",bW=({attributes:n})=>n.mimeType==="audio/mp4"||n.mimeType==="audio/webm"||n.contentType==="audio",wW=({attributes:n})=>n.mimeType==="text/vtt"||n.contentType==="text",xW=(n,t)=>{n.forEach(o=>{o.mediaSequence=0,o.discontinuitySequence=t.findIndex(function({timeline:a}){return a===o.timeline}),o.segments&&o.segments.forEach((a,i)=>{a.number=i})})},Tf=n=>n?Object.keys(n).reduce((t,o)=>{const a=n[o];return t.concat(a.playlists)},[]):[],VW=({dashPlaylists:n,locations:t,contentSteering:o,sidxMapping:a={},previousManifest:i,eventStream:s})=>{if(!n.length)return{};const{sourceDuration:l,type:r,suggestedPresentationDelay:u,minimumUpdatePeriod:c}=n[0].attributes,f=hc(n.filter(_W)).map(yW),m=hc(n.filter(bW)),d=hc(n.filter(wW)),h=n.map(V=>V.attributes.captionServices).filter(Boolean),g={allowCache:!0,discontinuityStarts:[],segments:[],endList:!0,mediaGroups:{AUDIO:{},VIDEO:{},"CLOSED-CAPTIONS":{},SUBTITLES:{}},uri:"",duration:l,playlists:mW(f,a)};c>=0&&(g.minimumUpdatePeriod=c*1e3),t&&(g.locations=t),o&&(g.contentSteering=o),r==="dynamic"&&(g.suggestedPresentationDelay=u),s&&s.length>0&&(g.eventStream=s);const p=g.playlists.length===0,b=m.length?fW(m,a,p):null,_=d.length?gW(d,a):null,w=f.concat(Tf(b),Tf(_)),v=w.map(({timelineStarts:V})=>V);return g.timelineStarts=u0(v),xW(w,g.timelineStarts),b&&(g.mediaGroups.AUDIO.audio=b),_&&(g.mediaGroups.SUBTITLES.subs=_),h.length&&(g.mediaGroups["CLOSED-CAPTIONS"].cc=vW(h)),i?cW({oldManifest:i,newManifest:g}):g},CW=(n,t,o)=>{const{NOW:a,clientOffset:i,availabilityStartTime:s,timescale:l=1,periodStart:r=0,minimumUpdatePeriod:u=0}=n,c=(a+i)/1e3,f=s+r,d=c+u-f;return Math.ceil((d*l-t)/o)},c0=(n,t)=>{const{type:o,minimumUpdatePeriod:a=0,media:i="",sourceDuration:s,timescale:l=1,startNumber:r=1,periodStart:u}=n,c=[];let f=-1;for(let m=0;m<t.length;m++){const d=t[m],h=d.d,g=d.r||0,p=d.t||0;f<0&&(f=p),p&&p>f&&(f=p);let b;if(g<0){const v=m+1;v===t.length?o==="dynamic"&&a>0&&i.indexOf("$Number$")>0?b=CW(n,f,h):b=(s*l-f)/h:b=(t[v].t-f)/h}else b=g+1;const _=r+c.length+b;let w=r+c.length;for(;w<_;)c.push({number:w,duration:h/l,time:f,timeline:u}),f+=h,w++}return c},kW=/\$([A-z]*)(?:(%0)([0-9]+)d)?\$/g,EW=n=>(t,o,a,i)=>{if(t==="$$")return"$";if(typeof n[o]>"u")return t;const s=""+n[o];return o==="RepresentationID"||(a?i=parseInt(i,10):i=1,s.length>=i)?s:`${new Array(i-s.length+1).join("0")}${s}`},Nf=(n,t)=>n.replace(kW,EW(t)),TW=(n,t)=>!n.duration&&!t?[{number:n.startNumber||1,duration:n.sourceDuration,time:0,timeline:n.periodStart}]:n.duration?Km(n):c0(n,t),NW=(n,t)=>{const o={RepresentationID:n.id,Bandwidth:n.bandwidth||0},{initialization:a={sourceURL:"",range:""}}=n,i=vl({baseUrl:n.baseUrl,source:Nf(a.sourceURL,o),range:a.range});return TW(n,t).map(l=>{o.Number=l.number,o.Time=l.time;const r=Nf(n.media||"",o),u=n.timescale||1,c=n.presentationTimeOffset||0,f=n.periodStart+(l.time-c)/u;return{uri:r,timeline:l.timeline,duration:l.duration,resolvedUri:pu(n.baseUrl||"",r),map:i,number:l.number,presentationTime:f}})},SW=(n,t)=>{const{baseUrl:o,initialization:a={}}=n,i=vl({baseUrl:o,source:a.sourceURL,range:a.range}),s=vl({baseUrl:o,source:t.media,range:t.mediaRange});return s.map=i,s},BW=(n,t)=>{const{duration:o,segmentUrls:a=[],periodStart:i}=n;if(!o&&!t||o&&t)throw new Error(Wi.SEGMENT_TIME_UNSPECIFIED);const s=a.map(u=>SW(n,u));let l;return o&&(l=Km(n)),t&&(l=c0(n,t)),l.map((u,c)=>{if(s[c]){const f=s[c],m=n.timescale||1,d=n.presentationTimeOffset||0;return f.timeline=u.timeline,f.duration=u.duration,f.number=u.number,f.presentationTime=i+(u.time-d)/m,f}}).filter(u=>u)},DW=({attributes:n,segmentInfo:t})=>{let o,a;t.template?(a=NW,o=qt(n,t.template)):t.base?(a=d0,o=qt(n,t.base)):t.list&&(a=BW,o=qt(n,t.list));const i={attributes:n};if(!a)return i;const s=a(o,t.segmentTimeline);if(o.duration){const{duration:l,timescale:r=1}=o;o.duration=l/r}else s.length?o.duration=s.reduce((l,r)=>Math.max(l,Math.ceil(r.duration)),0):o.duration=0;return i.attributes=o,i.segments=s,t.base&&o.indexRange&&(i.sidx=s[0],i.segments=[]),i},PW=n=>n.map(DW),_t=(n,t)=>r0(n.childNodes).filter(({tagName:o})=>o===t),Sl=n=>n.textContent.trim(),$W=n=>parseFloat(n.split("/").reduce((t,o)=>t/o)),vi=n=>{const r=/P(?:(\d*)Y)?(?:(\d*)M)?(?:(\d*)D)?(?:T(?:(\d*)H)?(?:(\d*)M)?(?:([\d.]*)S)?)?/.exec(n);if(!r)return 0;const[u,c,f,m,d,h]=r.slice(1);return parseFloat(u||0)*31536e3+parseFloat(c||0)*2592e3+parseFloat(f||0)*86400+parseFloat(m||0)*3600+parseFloat(d||0)*60+parseFloat(h||0)},AW=n=>(/^\d+-\d+-\d+T\d+:\d+:\d+(\.\d+)?$/.test(n)&&(n+="Z"),Date.parse(n)),Sf={mediaPresentationDuration(n){return vi(n)},availabilityStartTime(n){return AW(n)/1e3},minimumUpdatePeriod(n){return vi(n)},suggestedPresentationDelay(n){return vi(n)},type(n){return n},timeShiftBufferDepth(n){return vi(n)},start(n){return vi(n)},width(n){return parseInt(n,10)},height(n){return parseInt(n,10)},bandwidth(n){return parseInt(n,10)},frameRate(n){return $W(n)},startNumber(n){return parseInt(n,10)},timescale(n){return parseInt(n,10)},presentationTimeOffset(n){return parseInt(n,10)},duration(n){const t=parseInt(n,10);return isNaN(t)?vi(n):t},d(n){return parseInt(n,10)},t(n){return parseInt(n,10)},r(n){return parseInt(n,10)},presentationTime(n){return parseInt(n,10)},DEFAULT(n){return n}},Lt=n=>n&&n.attributes?r0(n.attributes).reduce((t,o)=>{const a=Sf[o.name]||Sf.DEFAULT;return t[o.name]=a(o.value),t},{}):{},LW={"urn:uuid:1077efec-c0b2-4d02-ace3-3c1e52e2fb4b":"org.w3.clearkey","urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed":"com.widevine.alpha","urn:uuid:9a04f079-9840-4286-ab92-e65be0885f95":"com.microsoft.playready","urn:uuid:f239e769-efa3-4850-9c16-a903c6932efb":"com.adobe.primetime","urn:mpeg:dash:mp4protection:2011":"mp4protection"},yu=(n,t)=>t.length?qi(n.map(function(o){return t.map(function(a){const i=Sl(a),s=pu(o.baseUrl,i),l=qt(Lt(a),{baseUrl:s});return s!==i&&!l.serviceLocation&&o.serviceLocation&&(l.serviceLocation=o.serviceLocation),l})})):n,Zm=n=>{const t=_t(n,"SegmentTemplate")[0],o=_t(n,"SegmentList")[0],a=o&&_t(o,"SegmentURL").map(m=>qt({tag:"SegmentURL"},Lt(m))),i=_t(n,"SegmentBase")[0],s=o||t,l=s&&_t(s,"SegmentTimeline")[0],r=o||i||t,u=r&&_t(r,"Initialization")[0],c=t&&Lt(t);c&&u?c.initialization=u&&Lt(u):c&&c.initialization&&(c.initialization={sourceURL:c.initialization});const f={template:c,segmentTimeline:l&&_t(l,"S").map(m=>Lt(m)),list:o&&qt(Lt(o),{segmentUrls:a,initialization:Lt(u)}),base:i&&qt(Lt(i),{initialization:Lt(u)})};return Object.keys(f).forEach(m=>{f[m]||delete f[m]}),f},IW=(n,t,o)=>a=>{const i=_t(a,"BaseURL"),s=yu(t,i),l=qt(n,Lt(a)),r=Zm(a);return s.map(u=>({segmentInfo:qt(o,r),attributes:qt(l,u)}))},OW=n=>n.reduce((t,o)=>{const a=Lt(o);a.schemeIdUri&&(a.schemeIdUri=a.schemeIdUri.toLowerCase());const i=LW[a.schemeIdUri];if(i){t[i]={attributes:a};const s=_t(o,"cenc:pssh")[0];if(s){const l=Sl(s);t[i].pssh=l&&Ev(l)}}return t},{}),MW=n=>{if(n.schemeIdUri==="urn:scte:dash:cc:cea-608:2015")return(typeof n.value!="string"?[]:n.value.split(";")).map(o=>{let a,i;return i=o,/^CC\d=/.test(o)?[a,i]=o.split("="):/^CC\d$/.test(o)&&(a=o),{channel:a,language:i}});if(n.schemeIdUri==="urn:scte:dash:cc:cea-708:2015")return(typeof n.value!="string"?[]:n.value.split(";")).map(o=>{const a={channel:void 0,language:void 0,aspectRatio:1,easyReader:0,"3D":0};if(/=/.test(o)){const[i,s=""]=o.split("=");a.channel=i,a.language=o,s.split(",").forEach(l=>{const[r,u]=l.split(":");r==="lang"?a.language=u:r==="er"?a.easyReader=Number(u):r==="war"?a.aspectRatio=Number(u):r==="3D"&&(a["3D"]=Number(u))})}else a.language=o;return a.channel&&(a.channel="SERVICE"+a.channel),a})},UW=n=>qi(_t(n.node,"EventStream").map(t=>{const o=Lt(t),a=o.schemeIdUri;return _t(t,"Event").map(i=>{const s=Lt(i),l=s.presentationTime||0,r=o.timescale||1,u=s.duration||0,c=l/r+n.attributes.start;return{schemeIdUri:a,value:o.value,id:s.id,start:c,end:c+u/r,messageData:Sl(i)||s.messageData,contentEncoding:o.contentEncoding,presentationTimeOffset:o.presentationTimeOffset||0}})})),RW=(n,t,o)=>a=>{const i=Lt(a),s=yu(t,_t(a,"BaseURL")),l=_t(a,"Role")[0],r={role:Lt(l)};let u=qt(n,i,r);const c=_t(a,"Accessibility")[0],f=MW(Lt(c));f&&(u=qt(u,{captionServices:f}));const m=_t(a,"Label")[0];if(m&&m.childNodes.length){const b=m.childNodes[0].nodeValue.trim();u=qt(u,{label:b})}const d=OW(_t(a,"ContentProtection"));Object.keys(d).length&&(u=qt(u,{contentProtection:d}));const h=Zm(a),g=_t(a,"Representation"),p=qt(o,h);return qi(g.map(IW(u,s,p)))},FW=(n,t)=>(o,a)=>{const i=yu(t,_t(o.node,"BaseURL")),s=qt(n,{periodStart:o.attributes.start});typeof o.attributes.duration=="number"&&(s.periodDuration=o.attributes.duration);const l=_t(o.node,"AdaptationSet"),r=Zm(o.node);return qi(l.map(RW(s,i,r)))},HW=(n,t)=>{if(n.length>1&&t({type:"warn",message:"The MPD manifest should contain no more than one ContentSteering tag"}),!n.length)return null;const o=qt({serverURL:Sl(n[0])},Lt(n[0]));return o.queryBeforeStart=o.queryBeforeStart==="true",o},jW=({attributes:n,priorPeriodAttributes:t,mpdType:o})=>typeof n.start=="number"?n.start:t&&typeof t.start=="number"&&typeof t.duration=="number"?t.start+t.duration:!t&&o==="static"?0:null,zW=(n,t={})=>{const{manifestUri:o="",NOW:a=Date.now(),clientOffset:i=0,eventHandler:s=function(){}}=t,l=_t(n,"Period");if(!l.length)throw new Error(Wi.INVALID_NUMBER_OF_PERIOD);const r=_t(n,"Location"),u=Lt(n),c=yu([{baseUrl:o}],_t(n,"BaseURL")),f=_t(n,"ContentSteering");u.type=u.type||"static",u.sourceDuration=u.mediaPresentationDuration||0,u.NOW=a,u.clientOffset=i,r.length&&(u.locations=r.map(Sl));const m=[];return l.forEach((d,h)=>{const g=Lt(d),p=m[h-1];g.start=jW({attributes:g,priorPeriodAttributes:p?p.attributes:null,mpdType:u.type}),m.push({node:d,attributes:g})}),{locations:u.locations,contentSteeringInfo:HW(f,s),representationInfo:qi(m.map(FW(u,c))),eventStream:qi(m.map(UW))}},m0=n=>{if(n==="")throw new Error(Wi.DASH_EMPTY_MANIFEST);const t=new eW;let o,a;try{o=t.parseFromString(n,"application/xml"),a=o&&o.documentElement.tagName==="MPD"?o.documentElement:null}catch{}if(!a||a&&a.getElementsByTagName("parsererror").length>0)throw new Error(Wi.DASH_INVALID_XML);return a},qW=n=>{const t=_t(n,"UTCTiming")[0];if(!t)return null;const o=Lt(t);switch(o.schemeIdUri){case"urn:mpeg:dash:utc:http-head:2014":case"urn:mpeg:dash:utc:http-head:2012":o.method="HEAD";break;case"urn:mpeg:dash:utc:http-xsdate:2014":case"urn:mpeg:dash:utc:http-iso:2014":case"urn:mpeg:dash:utc:http-xsdate:2012":case"urn:mpeg:dash:utc:http-iso:2012":o.method="GET";break;case"urn:mpeg:dash:utc:direct:2014":case"urn:mpeg:dash:utc:direct:2012":o.method="DIRECT",o.value=Date.parse(o.value);break;case"urn:mpeg:dash:utc:http-ntp:2014":case"urn:mpeg:dash:utc:ntp:2014":case"urn:mpeg:dash:utc:sntp:2014":default:throw new Error(Wi.UNSUPPORTED_UTC_TIMING_SCHEME)}return o},WW=(n,t={})=>{const o=zW(m0(n),t),a=PW(o.representationInfo);return VW({dashPlaylists:a,locations:o.locations,contentSteering:o.contentSteeringInfo,sidxMapping:t.sidxMapping,previousManifest:t.previousManifest,eventStream:o.eventStream})},GW=n=>qW(m0(n));var XW=Math.pow(2,32),YW=function(n){var t=new DataView(n.buffer,n.byteOffset,n.byteLength),o;return t.getBigUint64?(o=t.getBigUint64(0),o<Number.MAX_SAFE_INTEGER?Number(o):o):t.getUint32(0)*XW+t.getUint32(4)},KW={getUint64:YW},Bf=KW.getUint64,QW=function(n){var t=new DataView(n.buffer,n.byteOffset,n.byteLength),o={version:n[0],flags:new Uint8Array(n.subarray(1,4)),references:[],referenceId:t.getUint32(4),timescale:t.getUint32(8)},a=12;o.version===0?(o.earliestPresentationTime=t.getUint32(a),o.firstOffset=t.getUint32(a+4),a+=8):(o.earliestPresentationTime=Bf(n.subarray(a)),o.firstOffset=Bf(n.subarray(a+8)),a+=16),a+=2;var i=t.getUint16(a);for(a+=2;i>0;a+=12,i--)o.references.push({referenceType:(n[a]&128)>>>7,referencedSize:t.getUint32(a)&2147483647,subsegmentDuration:t.getUint32(a+4),startsWithSap:!!(n[a+8]&128),sapType:(n[a+8]&112)>>>4,sapDeltaTime:t.getUint32(a+8)&268435455});return o},JW=QW;const ZW=ti(JW);var eG=$e([73,68,51]),tG=function(t,o){o===void 0&&(o=0),t=$e(t);var a=t[o+5],i=t[o+6]<<21|t[o+7]<<14|t[o+8]<<7|t[o+9],s=(a&16)>>4;return s?i+20:i+10},Hs=function n(t,o){return o===void 0&&(o=0),t=$e(t),t.length-o<10||!yt(t,eG,{offset:o})?o:(o+=tG(t,o),n(t,o))},Df=function(t){return typeof t=="string"?Dv(t):t},nG=function(t){return Array.isArray(t)?t.map(function(o){return Df(o)}):[Df(t)]},oG=function n(t,o,a){a===void 0&&(a=!1),o=nG(o),t=$e(t);var i=[];if(!o.length)return i;for(var s=0;s<t.length;){var l=(t[s]<<24|t[s+1]<<16|t[s+2]<<8|t[s+3])>>>0,r=t.subarray(s+4,s+8);if(l===0)break;var u=s+l;if(u>t.length){if(a)break;u=t.length}var c=t.subarray(s+8,u);yt(r,o[0])&&(o.length===1?i.push(c):i.push.apply(i,n(c,o.slice(1),a))),s=u}return i},pr={EBML:$e([26,69,223,163]),DocType:$e([66,130]),Segment:$e([24,83,128,103]),SegmentInfo:$e([21,73,169,102]),Tracks:$e([22,84,174,107]),Track:$e([174]),TrackNumber:$e([215]),DefaultDuration:$e([35,227,131]),TrackEntry:$e([174]),TrackType:$e([131]),FlagDefault:$e([136]),CodecID:$e([134]),CodecPrivate:$e([99,162]),VideoTrack:$e([224]),AudioTrack:$e([225]),Cluster:$e([31,67,182,117]),Timestamp:$e([231]),TimestampScale:$e([42,215,177]),BlockGroup:$e([160]),BlockDuration:$e([155]),Block:$e([161]),SimpleBlock:$e([163])},Yc=[128,64,32,16,8,4,2,1],aG=function(t){for(var o=1,a=0;a<Yc.length&&!(t&Yc[a]);a++)o++;return o},Rr=function(t,o,a,i){a===void 0&&(a=!0),i===void 0&&(i=!1);var s=aG(t[o]),l=t.subarray(o,o+s);return a&&(l=Array.prototype.slice.call(t,o,o+s),l[0]^=Yc[s-1]),{length:s,value:Vq(l,{signed:i}),bytes:l}},Pf=function n(t){return typeof t=="string"?t.match(/.{1,2}/g).map(function(o){return n(o)}):typeof t=="number"?Cq(t):t},iG=function(t){return Array.isArray(t)?t.map(function(o){return Pf(o)}):[Pf(t)]},sG=function n(t,o,a){if(a>=o.length)return o.length;var i=Rr(o,a,!1);if(yt(t.bytes,i.bytes))return a;var s=Rr(o,a+i.length);return n(t,o,a+s.length+s.value+i.length)},$f=function n(t,o){o=iG(o),t=$e(t);var a=[];if(!o.length)return a;for(var i=0;i<t.length;){var s=Rr(t,i,!1),l=Rr(t,i+s.length),r=i+s.length+l.length;l.value===127&&(l.value=sG(s,t,r),l.value!==t.length&&(l.value-=r));var u=r+l.value>t.length?t.length:r+l.value,c=t.subarray(r,u);yt(o[0],s.bytes)&&(o.length===1?a.push(c):a=a.concat(n(c,o.slice(1))));var f=s.length+l.length+c.length;i+=f}return a},lG=$e([0,0,0,1]),rG=$e([0,0,1]),dG=$e([0,0,3]),uG=function(t){for(var o=[],a=1;a<t.length-2;)yt(t.subarray(a,a+3),dG)&&(o.push(a+2),a++),a++;if(o.length===0)return t;var i=t.length-o.length,s=new Uint8Array(i),l=0;for(a=0;a<i;l++,a++)l===o[0]&&(l++,o.shift()),s[a]=t[l];return s},p0=function(t,o,a,i){t=$e(t),a=[].concat(a);for(var s=0,l,r=0;s<t.length&&(r<i||l);){var u=void 0;if(yt(t.subarray(s),lG)?u=4:yt(t.subarray(s),rG)&&(u=3),!u){s++;continue}if(r++,l)return uG(t.subarray(l,s));var c=void 0;o==="h264"?c=t[s+u]&31:o==="h265"&&(c=t[s+u]>>1&63),a.indexOf(c)!==-1&&(l=s+u),s+=u+(o==="h264"?1:2)}return t.subarray(0,0)},cG=function(t,o,a){return p0(t,"h264",o,a)},mG=function(t,o,a){return p0(t,"h265",o,a)},un={webm:$e([119,101,98,109]),matroska:$e([109,97,116,114,111,115,107,97]),flac:$e([102,76,97,67]),ogg:$e([79,103,103,83]),ac3:$e([11,119]),riff:$e([82,73,70,70]),avi:$e([65,86,73]),wav:$e([87,65,86,69]),"3gp":$e([102,116,121,112,51,103]),mp4:$e([102,116,121,112]),fmp4:$e([115,116,121,112]),mov:$e([102,116,121,112,113,116]),moov:$e([109,111,111,118]),moof:$e([109,111,111,102])},Gi={aac:function(t){var o=Hs(t);return yt(t,[255,16],{offset:o,mask:[255,22]})},mp3:function(t){var o=Hs(t);return yt(t,[255,2],{offset:o,mask:[255,6]})},webm:function(t){var o=$f(t,[pr.EBML,pr.DocType])[0];return yt(o,un.webm)},mkv:function(t){var o=$f(t,[pr.EBML,pr.DocType])[0];return yt(o,un.matroska)},mp4:function(t){if(Gi["3gp"](t)||Gi.mov(t))return!1;if(yt(t,un.mp4,{offset:4})||yt(t,un.fmp4,{offset:4})||yt(t,un.moof,{offset:4})||yt(t,un.moov,{offset:4}))return!0},mov:function(t){return yt(t,un.mov,{offset:4})},"3gp":function(t){return yt(t,un["3gp"],{offset:4})},ac3:function(t){var o=Hs(t);return yt(t,un.ac3,{offset:o})},ts:function(t){if(t.length<189&&t.length>=1)return t[0]===71;for(var o=0;o+188<t.length&&o<188;){if(t[o]===71&&t[o+188]===71)return!0;o+=1}return!1},flac:function(t){var o=Hs(t);return yt(t,un.flac,{offset:o})},ogg:function(t){return yt(t,un.ogg)},avi:function(t){return yt(t,un.riff)&&yt(t,un.avi,{offset:8})},wav:function(t){return yt(t,un.riff)&&yt(t,un.wav,{offset:8})},h264:function(t){return cG(t,7,3).length},h265:function(t){return mG(t,[32,33],3).length}},Kc=Object.keys(Gi).filter(function(n){return n!=="ts"&&n!=="h264"&&n!=="h265"}).concat(["ts","h264","h265"]);Kc.forEach(function(n){var t=Gi[n];Gi[n]=function(o){return t($e(o))}});var pG=Gi,ep=function(t){t=$e(t);for(var o=0;o<Kc.length;o++){var a=Kc[o];if(pG[a](t))return a}return""},hG=function(t){return oG(t,["moof"]).length>0},Ua={};/**
|
|
44
|
+
* @license
|
|
45
|
+
* Video.js 8.23.4 <http://videojs.com/>
|
|
46
|
+
* Copyright Brightcove, Inc. <https://www.brightcove.com/>
|
|
47
|
+
* Available under Apache License Version 2.0
|
|
48
|
+
* <https://github.com/videojs/video.js/blob/main/LICENSE>
|
|
49
|
+
*
|
|
50
|
+
* Includes vtt.js <https://github.com/mozilla/vtt.js>
|
|
51
|
+
* Available under Apache License Version 2.0
|
|
52
|
+
* <https://github.com/mozilla/vtt.js/blob/main/LICENSE>
|
|
53
|
+
*/var Qc="8.23.4";const Fo={},Va=function(n,t){return Fo[n]=Fo[n]||[],t&&(Fo[n]=Fo[n].concat(t)),Fo[n]},fG=function(n,t){Va(n,t)},h0=function(n,t){const o=Va(n).indexOf(t);return o<=-1?!1:(Fo[n]=Fo[n].slice(),Fo[n].splice(o,1),!0)},gG=function(n,t){Va(n,[].concat(t).map(o=>{const a=(...i)=>(h0(n,a),o(...i));return a}))},Fr={prefixed:!0},Er=[["requestFullscreen","exitFullscreen","fullscreenElement","fullscreenEnabled","fullscreenchange","fullscreenerror","fullscreen"],["webkitRequestFullscreen","webkitExitFullscreen","webkitFullscreenElement","webkitFullscreenEnabled","webkitfullscreenchange","webkitfullscreenerror","-webkit-full-screen"]],Af=Er[0];let js;for(let n=0;n<Er.length;n++)if(Er[n][1]in ge){js=Er[n];break}if(js){for(let n=0;n<js.length;n++)Fr[Af[n]]=js[n];Fr.prefixed=js[0]!==Af[0]}let wn=[];const vG=(n,t,o)=>(a,i,s)=>{const l=t.levels[i],r=new RegExp(`^(${l})$`);let u=n;if(a!=="log"&&s.unshift(a.toUpperCase()+":"),o&&(u=`%c${n}`,s.unshift(o)),s.unshift(u+":"),wn){wn.push([].concat(s));const f=wn.length-1e3;wn.splice(0,f>0?f:0)}if(!X.console)return;let c=X.console[a];!c&&a==="debug"&&(c=X.console.info||X.console.log),!(!c||!l||!r.test(a))&&c[Array.isArray(s)?"apply":"call"](X.console,s)};function Jc(n,t=":",o=""){let a="info",i;function s(...l){i("log",a,l)}return i=vG(n,s,o),s.createLogger=(l,r,u)=>{const c=r!==void 0?r:t,f=u!==void 0?u:o,m=`${n} ${c} ${l}`;return Jc(m,c,f)},s.createNewLogger=(l,r,u)=>Jc(l,r,u),s.levels={all:"debug|log|warn|error",off:"",debug:"debug|log|warn|error",info:"log|warn|error",warn:"warn|error",error:"error",DEFAULT:a},s.level=l=>{if(typeof l=="string"){if(!s.levels.hasOwnProperty(l))throw new Error(`"${l}" in not a valid log level`);a=l}return a},s.history=()=>wn?[].concat(wn):[],s.history.filter=l=>(wn||[]).filter(r=>new RegExp(`.*${l}.*`).test(r[0])),s.history.clear=()=>{wn&&(wn.length=0)},s.history.disable=()=>{wn!==null&&(wn.length=0,wn=null)},s.history.enable=()=>{wn===null&&(wn=[])},s.error=(...l)=>i("error",a,l),s.warn=(...l)=>i("warn",a,l),s.debug=(...l)=>i("debug",a,l),s}const Ge=Jc("VIDEOJS"),f0=Ge.createLogger,yG=Object.prototype.toString,g0=function(n){return Po(n)?Object.keys(n):[]};function Di(n,t){g0(n).forEach(o=>t(n[o],o))}function v0(n,t,o=0){return g0(n).reduce((a,i)=>t(a,n[i],i),o)}function Po(n){return!!n&&typeof n=="object"}function Xi(n){return Po(n)&&yG.call(n)==="[object Object]"&&n.constructor===Object}function ut(...n){const t={};return n.forEach(o=>{o&&Di(o,(a,i)=>{if(!Xi(a)){t[i]=a;return}Xi(t[i])||(t[i]={}),t[i]=ut(t[i],a)})}),t}function y0(n={}){const t=[];for(const o in n)if(n.hasOwnProperty(o)){const a=n[o];t.push(a)}return t}function _u(n,t,o,a=!0){const i=l=>Object.defineProperty(n,t,{value:l,enumerable:!0,writable:!0}),s={configurable:!0,enumerable:!0,get(){const l=o();return i(l),l}};return a&&(s.set=i),Object.defineProperty(n,t,s)}var _G=Object.freeze({__proto__:null,each:Di,reduce:v0,isObject:Po,isPlain:Xi,merge:ut,values:y0,defineLazyProperty:_u});let tp=!1,_0=null,po=!1,b0,w0=!1,Pi=!1,$i=!1,$o=!1,np=null,bu=null;const bG=!!(X.cast&&X.cast.framework&&X.cast.framework.CastReceiverContext);let x0=null,Hr=!1,wu=!1,jr=!1,xu=!1,zr=!1,qr=!1,Wr=!1;const yl=!!(ns()&&("ontouchstart"in X||X.navigator.maxTouchPoints||X.DocumentTouch&&X.document instanceof X.DocumentTouch)),ca=X.navigator&&X.navigator.userAgentData;ca&&ca.platform&&ca.brands&&(po=ca.platform==="Android",Pi=!!ca.brands.find(n=>n.brand==="Microsoft Edge"),$i=!!ca.brands.find(n=>n.brand==="Chromium"),$o=!Pi&&$i,np=bu=(ca.brands.find(n=>n.brand==="Chromium")||{}).version||null,wu=ca.platform==="Windows");if(!$i){const n=X.navigator&&X.navigator.userAgent||"";tp=/iPod/i.test(n),_0=function(){const t=n.match(/OS (\d+)_/i);return t&&t[1]?t[1]:null}(),po=/Android/i.test(n),b0=function(){const t=n.match(/Android (\d+)(?:\.(\d+))?(?:\.(\d+))*/i);if(!t)return null;const o=t[1]&&parseFloat(t[1]),a=t[2]&&parseFloat(t[2]);return o&&a?parseFloat(t[1]+"."+t[2]):o||null}(),w0=/Firefox/i.test(n),Pi=/Edg/i.test(n),$i=/Chrome/i.test(n)||/CriOS/i.test(n),$o=!Pi&&$i,np=bu=function(){const t=n.match(/(Chrome|CriOS)\/(\d+)/);return t&&t[2]?parseFloat(t[2]):null}(),x0=function(){const t=/MSIE\s(\d+)\.\d/.exec(n);let o=t&&parseFloat(t[1]);return!o&&/Trident\/7.0/i.test(n)&&/rv:11.0/.test(n)&&(o=11),o}(),zr=/Tizen/i.test(n),qr=/Web0S/i.test(n),Wr=zr||qr,Hr=/Safari/i.test(n)&&!$o&&!po&&!Pi&&!Wr,wu=/Windows/i.test(n),jr=/iPad/i.test(n)||Hr&&yl&&!/iPhone/i.test(n),xu=/iPhone/i.test(n)&&!jr}const en=xu||jr||tp,Vu=(Hr||en)&&!$o;var V0=Object.freeze({__proto__:null,get IS_IPOD(){return tp},get IOS_VERSION(){return _0},get IS_ANDROID(){return po},get ANDROID_VERSION(){return b0},get IS_FIREFOX(){return w0},get IS_EDGE(){return Pi},get IS_CHROMIUM(){return $i},get IS_CHROME(){return $o},get CHROMIUM_VERSION(){return np},get CHROME_VERSION(){return bu},IS_CHROMECAST_RECEIVER:bG,get IE_VERSION(){return x0},get IS_SAFARI(){return Hr},get IS_WINDOWS(){return wu},get IS_IPAD(){return jr},get IS_IPHONE(){return xu},get IS_TIZEN(){return zr},get IS_WEBOS(){return qr},get IS_SMART_TV(){return Wr},TOUCH_ENABLED:yl,IS_IOS:en,IS_ANY_SAFARI:Vu});function Lf(n){return typeof n=="string"&&!!n.trim()}function wG(n){if(n.indexOf(" ")>=0)throw new Error("class has illegal whitespace characters")}function ns(){return ge===X.document}function os(n){return Po(n)&&n.nodeType===1}function C0(){try{return X.parent!==X.self}catch{return!0}}function k0(n){return function(t,o){if(!Lf(t))return ge[n](null);Lf(o)&&(o=ge.querySelector(o));const a=os(o)?o:ge;return a[n]&&a[n](t)}}function Le(n="div",t={},o={},a){const i=ge.createElement(n);return Object.getOwnPropertyNames(t).forEach(function(s){const l=t[s];s==="textContent"?Ea(i,l):(i[s]!==l||s==="tabIndex")&&(i[s]=l)}),Object.getOwnPropertyNames(o).forEach(function(s){i.setAttribute(s,o[s])}),a&&op(i,a),i}function Ea(n,t){return typeof n.textContent>"u"?n.innerText=t:n.textContent=t,n}function Zc(n,t){t.firstChild?t.insertBefore(n,t.firstChild):t.appendChild(n)}function ol(n,t){return wG(t),n.classList.contains(t)}function qa(n,...t){return n.classList.add(...t.reduce((o,a)=>o.concat(a.split(/\s+/)),[])),n}function Cu(n,...t){return n?(n.classList.remove(...t.reduce((o,a)=>o.concat(a.split(/\s+/)),[])),n):(Ge.warn("removeClass was called with an element that doesn't exist"),null)}function E0(n,t,o){return typeof o=="function"&&(o=o(n,t)),typeof o!="boolean"&&(o=void 0),t.split(/\s+/).forEach(a=>n.classList.toggle(a,o)),n}function T0(n,t){Object.getOwnPropertyNames(t).forEach(function(o){const a=t[o];a===null||typeof a>"u"||a===!1?n.removeAttribute(o):n.setAttribute(o,a===!0?"":a)})}function ga(n){const t={},o=["autoplay","controls","playsinline","loop","muted","default","defaultMuted"];if(n&&n.attributes&&n.attributes.length>0){const a=n.attributes;for(let i=a.length-1;i>=0;i--){const s=a[i].name;let l=a[i].value;o.includes(s)&&(l=l!==null),t[s]=l}}return t}function N0(n,t){return n.getAttribute(t)}function Yi(n,t,o){n.setAttribute(t,o)}function ku(n,t){n.removeAttribute(t)}function S0(){ge.body.focus(),ge.onselectstart=function(){return!1}}function B0(){ge.onselectstart=function(){return!0}}function Ki(n){if(n&&n.getBoundingClientRect&&n.parentNode){const t=n.getBoundingClientRect(),o={};return["bottom","height","left","right","top","width"].forEach(a=>{t[a]!==void 0&&(o[a]=t[a])}),o.height||(o.height=parseFloat(Qi(n,"height"))),o.width||(o.width=parseFloat(Qi(n,"width"))),o}}function _l(n){if(!n||n&&!n.offsetParent)return{left:0,top:0,width:0,height:0};const t=n.offsetWidth,o=n.offsetHeight;let a=0,i=0;for(;n.offsetParent&&n!==ge[Fr.fullscreenElement];)a+=n.offsetLeft,i+=n.offsetTop,n=n.offsetParent;return{left:a,top:i,width:t,height:o}}function Eu(n,t){const o={x:0,y:0};if(en){let f=n;for(;f&&f.nodeName.toLowerCase()!=="html";){const m=Qi(f,"transform");if(/^matrix/.test(m)){const d=m.slice(7,-1).split(/,\s/).map(Number);o.x+=d[4],o.y+=d[5]}else if(/^matrix3d/.test(m)){const d=m.slice(9,-1).split(/,\s/).map(Number);o.x+=d[12],o.y+=d[13]}if(f.assignedSlot&&f.assignedSlot.parentElement&&X.WebKitCSSMatrix){const d=X.getComputedStyle(f.assignedSlot.parentElement).transform,h=new X.WebKitCSSMatrix(d);o.x+=h.m41,o.y+=h.m42}f=f.parentNode||f.host}}const a={},i=_l(t.target),s=_l(n),l=s.width,r=s.height;let u=t.offsetY-(s.top-i.top),c=t.offsetX-(s.left-i.left);return t.changedTouches&&(c=t.changedTouches[0].pageX-s.left,u=t.changedTouches[0].pageY+s.top,en&&(c-=o.x,u-=o.y)),a.y=1-Math.max(0,Math.min(1,u/r)),a.x=Math.max(0,Math.min(1,c/l)),a}function D0(n){return Po(n)&&n.nodeType===3}function Tu(n){for(;n.firstChild;)n.removeChild(n.firstChild);return n}function P0(n){return typeof n=="function"&&(n=n()),(Array.isArray(n)?n:[n]).map(t=>{if(typeof t=="function"&&(t=t()),os(t)||D0(t))return t;if(typeof t=="string"&&/\S/.test(t))return ge.createTextNode(t)}).filter(t=>t)}function op(n,t){return P0(t).forEach(o=>n.appendChild(o)),n}function $0(n,t){return op(Tu(n),t)}function bl(n){return n.button===void 0&&n.buttons===void 0||n.button===0&&n.buttons===void 0||n.type==="mouseup"&&n.button===0&&n.buttons===0||n.type==="mousedown"&&n.button===0&&n.buttons===0?!0:!(n.button!==0||n.buttons!==1)}const Ca=k0("querySelector"),A0=k0("querySelectorAll");function Qi(n,t){if(!n||!t)return"";if(typeof X.getComputedStyle=="function"){let o;try{o=X.getComputedStyle(n)}catch{return""}return o?o.getPropertyValue(t)||o[t]:""}return""}function L0(n){[...ge.styleSheets].forEach(t=>{try{const o=[...t.cssRules].map(i=>i.cssText).join(""),a=ge.createElement("style");a.textContent=o,n.document.head.appendChild(a)}catch{const a=ge.createElement("link");a.rel="stylesheet",a.type=t.type,a.media=t.media.mediaText,a.href=t.href,n.document.head.appendChild(a)}})}var I0=Object.freeze({__proto__:null,isReal:ns,isEl:os,isInFrame:C0,createEl:Le,textContent:Ea,prependTo:Zc,hasClass:ol,addClass:qa,removeClass:Cu,toggleClass:E0,setAttributes:T0,getAttributes:ga,getAttribute:N0,setAttribute:Yi,removeAttribute:ku,blockTextSelection:S0,unblockTextSelection:B0,getBoundingClientRect:Ki,findPosition:_l,getPointerPosition:Eu,isTextNode:D0,emptyEl:Tu,normalizeContent:P0,appendContent:op,insertContent:$0,isSingleLeftClick:bl,$:Ca,$$:A0,computedStyle:Qi,copyStyleSheetsToWindow:L0});let O0=!1,em;const xG=function(){if(em.options.autoSetup===!1)return;const n=Array.prototype.slice.call(ge.getElementsByTagName("video")),t=Array.prototype.slice.call(ge.getElementsByTagName("audio")),o=Array.prototype.slice.call(ge.getElementsByTagName("video-js")),a=n.concat(t,o);if(a&&a.length>0)for(let i=0,s=a.length;i<s;i++){const l=a[i];if(l&&l.getAttribute)l.player===void 0&&l.getAttribute("data-setup")!==null&&em(l);else{tm(1);break}}else O0||tm(1)};function tm(n,t){ns()&&(t&&(em=t),X.setTimeout(xG,n))}function nm(){O0=!0,X.removeEventListener("load",nm)}ns()&&(ge.readyState==="complete"?nm():X.addEventListener("load",nm));const M0=function(n){const t=ge.createElement("style");return t.className=n,t},U0=function(n,t){n.styleSheet?n.styleSheet.cssText=t:n.textContent=t};var yn=new WeakMap;const VG=3;let CG=VG;function ao(){return CG++}function If(n,t){if(!yn.has(n))return;const o=yn.get(n);o.handlers[t].length===0&&(delete o.handlers[t],n.removeEventListener?n.removeEventListener(t,o.dispatcher,!1):n.detachEvent&&n.detachEvent("on"+t,o.dispatcher)),Object.getOwnPropertyNames(o.handlers).length<=0&&(delete o.handlers,delete o.dispatcher,delete o.disabled),Object.getOwnPropertyNames(o).length===0&&yn.delete(n)}function ap(n,t,o,a){o.forEach(function(i){n(t,i,a)})}function Nu(n){if(n.fixed_)return n;function t(){return!0}function o(){return!1}if(!n||!n.isPropagationStopped||!n.isImmediatePropagationStopped){const a=n||X.event;n={};const i=["layerX","layerY","keyLocation","path","webkitMovementX","webkitMovementY","mozPressure","mozInputSource"];for(const s in a)i.includes(s)||s==="returnValue"&&a.preventDefault||(n[s]=a[s]);if(n.target||(n.target=n.srcElement||ge),n.relatedTarget||(n.relatedTarget=n.fromElement===n.target?n.toElement:n.fromElement),n.preventDefault=function(){a.preventDefault&&a.preventDefault(),n.returnValue=!1,a.returnValue=!1,n.defaultPrevented=!0},n.defaultPrevented=!1,n.stopPropagation=function(){a.stopPropagation&&a.stopPropagation(),n.cancelBubble=!0,a.cancelBubble=!0,n.isPropagationStopped=t},n.isPropagationStopped=o,n.stopImmediatePropagation=function(){a.stopImmediatePropagation&&a.stopImmediatePropagation(),n.isImmediatePropagationStopped=t,n.stopPropagation()},n.isImmediatePropagationStopped=o,n.clientX!==null&&n.clientX!==void 0){const s=ge.documentElement,l=ge.body;n.pageX=n.clientX+(s&&s.scrollLeft||l&&l.scrollLeft||0)-(s&&s.clientLeft||l&&l.clientLeft||0),n.pageY=n.clientY+(s&&s.scrollTop||l&&l.scrollTop||0)-(s&&s.clientTop||l&&l.clientTop||0)}n.which=n.charCode||n.keyCode,n.button!==null&&n.button!==void 0&&(n.button=n.button&1?0:n.button&4?1:n.button&2?2:0)}return n.fixed_=!0,n}let hr;const kG=function(){if(typeof hr!="boolean"){hr=!1;try{const n=Object.defineProperty({},"passive",{get(){hr=!0}});X.addEventListener("test",null,n),X.removeEventListener("test",null,n)}catch{}}return hr},EG=["touchstart","touchmove"];function qn(n,t,o){if(Array.isArray(t))return ap(qn,n,t,o);yn.has(n)||yn.set(n,{});const a=yn.get(n);if(a.handlers||(a.handlers={}),a.handlers[t]||(a.handlers[t]=[]),o.guid||(o.guid=ao()),a.handlers[t].push(o),a.dispatcher||(a.disabled=!1,a.dispatcher=function(i,s){if(a.disabled)return;i=Nu(i);const l=a.handlers[i.type];if(l){const r=l.slice(0);for(let u=0,c=r.length;u<c&&!i.isImmediatePropagationStopped();u++)try{r[u].call(n,i,s)}catch(f){Ge.error(f)}}}),a.handlers[t].length===1)if(n.addEventListener){let i=!1;kG()&&EG.indexOf(t)>-1&&(i={passive:!0}),n.addEventListener(t,a.dispatcher,i)}else n.attachEvent&&n.attachEvent("on"+t,a.dispatcher)}function tn(n,t,o){if(!yn.has(n))return;const a=yn.get(n);if(!a.handlers)return;if(Array.isArray(t))return ap(tn,n,t,o);const i=function(l,r){a.handlers[r]=[],If(l,r)};if(t===void 0){for(const l in a.handlers)Object.prototype.hasOwnProperty.call(a.handlers||{},l)&&i(n,l);return}const s=a.handlers[t];if(s){if(!o){i(n,t);return}if(o.guid)for(let l=0;l<s.length;l++)s[l].guid===o.guid&&s.splice(l--,1);If(n,t)}}function as(n,t,o){const a=yn.has(n)?yn.get(n):{},i=n.parentNode||n.ownerDocument;if(typeof t=="string"?t={type:t,target:n}:t.target||(t.target=n),t=Nu(t),a.dispatcher&&a.dispatcher.call(n,t,o),i&&!t.isPropagationStopped()&&t.bubbles===!0)as.call(null,i,t,o);else if(!i&&!t.defaultPrevented&&t.target&&t.target[t.type]){yn.has(t.target)||yn.set(t.target,{});const s=yn.get(t.target);t.target[t.type]&&(s.disabled=!0,typeof t.target[t.type]=="function"&&t.target[t.type](),s.disabled=!1)}return!t.defaultPrevented}function Su(n,t,o){if(Array.isArray(t))return ap(Su,n,t,o);const a=function(){tn(n,t,a),o.apply(this,arguments)};a.guid=o.guid=o.guid||ao(),qn(n,t,a)}function ip(n,t,o){const a=function(){tn(n,t,a),o.apply(this,arguments)};a.guid=o.guid=o.guid||ao(),qn(n,t,a)}var TG=Object.freeze({__proto__:null,fixEvent:Nu,on:qn,off:tn,trigger:as,one:Su,any:ip});const io=30,pt=function(n,t,o){t.guid||(t.guid=ao());const a=t.bind(n);return a.guid=o?o+"_"+t.guid:t.guid,a},Ao=function(n,t){let o=X.performance.now();return function(...i){const s=X.performance.now();s-o>=t&&(n(...i),o=s)}},R0=function(n,t,o,a=X){let i;const s=()=>{a.clearTimeout(i),i=null},l=function(){const r=this,u=arguments;let c=function(){i=null,c=null,o||n.apply(r,u)};!i&&o&&n.apply(r,u),a.clearTimeout(i),i=a.setTimeout(c,t)};return l.cancel=s,l};var NG=Object.freeze({__proto__:null,UPDATE_REFRESH_INTERVAL:io,bind_:pt,throttle:Ao,debounce:R0});let Ds;class Wn{on(t,o){const a=this.addEventListener;this.addEventListener=()=>{},qn(this,t,o),this.addEventListener=a}off(t,o){tn(this,t,o)}one(t,o){const a=this.addEventListener;this.addEventListener=()=>{},Su(this,t,o),this.addEventListener=a}any(t,o){const a=this.addEventListener;this.addEventListener=()=>{},ip(this,t,o),this.addEventListener=a}trigger(t){const o=t.type||t;typeof t=="string"&&(t={type:o}),t=Nu(t),this.allowedEvents_[o]&&this["on"+o]&&this["on"+o](t),as(this,t)}queueTrigger(t){Ds||(Ds=new Map);const o=t.type||t;let a=Ds.get(this);a||(a=new Map,Ds.set(this,a));const i=a.get(o);a.delete(o),X.clearTimeout(i);const s=X.setTimeout(()=>{a.delete(o),a.size===0&&(a=null,Ds.delete(this)),this.trigger(t)},0);a.set(o,s)}}Wn.prototype.allowedEvents_={};Wn.prototype.addEventListener=Wn.prototype.on;Wn.prototype.removeEventListener=Wn.prototype.off;Wn.prototype.dispatchEvent=Wn.prototype.trigger;const Bu=n=>typeof n.name=="function"?n.name():typeof n.name=="string"?n.name:n.name_?n.name_:n.constructor&&n.constructor.name?n.constructor.name:typeof n,Xo=n=>n instanceof Wn||!!n.eventBusEl_&&["on","one","off","trigger"].every(t=>typeof n[t]=="function"),SG=(n,t)=>{Xo(n)?t():(n.eventedCallbacks||(n.eventedCallbacks=[]),n.eventedCallbacks.push(t))},om=n=>typeof n=="string"&&/\S/.test(n)||Array.isArray(n)&&!!n.length,Gr=(n,t,o)=>{if(!n||!n.nodeName&&!Xo(n))throw new Error(`Invalid target for ${Bu(t)}#${o}; must be a DOM node or evented object.`)},F0=(n,t,o)=>{if(!om(n))throw new Error(`Invalid event type for ${Bu(t)}#${o}; must be a non-empty string or array.`)},H0=(n,t,o)=>{if(typeof n!="function")throw new Error(`Invalid listener for ${Bu(t)}#${o}; must be a function.`)},fc=(n,t,o)=>{const a=t.length<3||t[0]===n||t[0]===n.eventBusEl_;let i,s,l;return a?(i=n.eventBusEl_,t.length>=3&&t.shift(),[s,l]=t):(i=t[0],s=t[1],l=t[2]),Gr(i,n,o),F0(s,n,o),H0(l,n,o),l=pt(n,l),{isTargetingSelf:a,target:i,type:s,listener:l}},Pa=(n,t,o,a)=>{Gr(n,n,t),n.nodeName?TG[t](n,o,a):n[t](o,a)},BG={on(...n){const{isTargetingSelf:t,target:o,type:a,listener:i}=fc(this,n,"on");if(Pa(o,"on",a,i),!t){const s=()=>this.off(o,a,i);s.guid=i.guid;const l=()=>this.off("dispose",s);l.guid=i.guid,Pa(this,"on","dispose",s),Pa(o,"on","dispose",l)}},one(...n){const{isTargetingSelf:t,target:o,type:a,listener:i}=fc(this,n,"one");if(t)Pa(o,"one",a,i);else{const s=(...l)=>{this.off(o,a,s),i.apply(null,l)};s.guid=i.guid,Pa(o,"one",a,s)}},any(...n){const{isTargetingSelf:t,target:o,type:a,listener:i}=fc(this,n,"any");if(t)Pa(o,"any",a,i);else{const s=(...l)=>{this.off(o,a,s),i.apply(null,l)};s.guid=i.guid,Pa(o,"any",a,s)}},off(n,t,o){if(!n||om(n))tn(this.eventBusEl_,n,t);else{const a=n,i=t;Gr(a,this,"off"),F0(i,this,"off"),H0(o,this,"off"),o=pt(this,o),this.off("dispose",o),a.nodeName?(tn(a,i,o),tn(a,"dispose",o)):Xo(a)&&(a.off(i,o),a.off("dispose",o))}},trigger(n,t){Gr(this.eventBusEl_,this,"trigger");const o=n&&typeof n!="string"?n.type:n;if(!om(o))throw new Error(`Invalid event type for ${Bu(this)}#trigger; must be a non-empty string or object with a type key that has a non-empty value.`);return as(this.eventBusEl_,n,t)}};function sp(n,t={}){const{eventBusKey:o}=t;if(o){if(!n[o].nodeName)throw new Error(`The eventBusKey "${o}" does not refer to an element.`);n.eventBusEl_=n[o]}else n.eventBusEl_=Le("span",{className:"vjs-event-bus"});return Object.assign(n,BG),n.eventedCallbacks&&n.eventedCallbacks.forEach(a=>{a()}),n.on("dispose",()=>{n.off(),[n,n.el_,n.eventBusEl_].forEach(function(a){a&&yn.has(a)&&yn.delete(a)}),X.setTimeout(()=>{n.eventBusEl_=null},0)}),n}const DG={state:{},setState(n){typeof n=="function"&&(n=n());let t;return Di(n,(o,a)=>{this.state[a]!==o&&(t=t||{},t[a]={from:this.state[a],to:o}),this.state[a]=o}),t&&Xo(this)&&this.trigger({changes:t,type:"statechanged"}),t}};function j0(n,t){return Object.assign(n,DG),n.state=Object.assign({},n.state,t),typeof n.handleStateChanged=="function"&&Xo(n)&&n.on("statechanged",n.handleStateChanged),n}const al=function(n){return typeof n!="string"?n:n.replace(/./,t=>t.toLowerCase())},Ct=function(n){return typeof n!="string"?n:n.replace(/./,t=>t.toUpperCase())},z0=function(n,t){return Ct(n)===Ct(t)};var PG=Object.freeze({__proto__:null,toLowerCase:al,toTitleCase:Ct,titleCaseEquals:z0});class re{constructor(t,o,a){if(!t&&this.play?this.player_=t=this:this.player_=t,this.isDisposed_=!1,this.parentComponent_=null,this.options_=ut({},this.options_),o=this.options_=ut(this.options_,o),this.id_=o.id||o.el&&o.el.id,!this.id_){const i=t&&t.id&&t.id()||"no_player";this.id_=`${i}_component_${ao()}`}this.name_=o.name||null,o.el?this.el_=o.el:o.createEl!==!1&&(this.el_=this.createEl()),o.className&&this.el_&&o.className.split(" ").forEach(i=>this.addClass(i)),["on","off","one","any","trigger"].forEach(i=>{this[i]=void 0}),o.evented!==!1&&(sp(this,{eventBusKey:this.el_?"el_":null}),this.handleLanguagechange=this.handleLanguagechange.bind(this),this.on(this.player_,"languagechange",this.handleLanguagechange)),j0(this,this.constructor.defaultState),this.children_=[],this.childIndex_={},this.childNameIndex_={},this.setTimeoutIds_=new Set,this.setIntervalIds_=new Set,this.rafIds_=new Set,this.namedRafs_=new Map,this.clearingTimersOnDispose_=!1,o.initChildren!==!1&&this.initChildren(),this.ready(a),o.reportTouchActivity!==!1&&this.enableTouchActivity()}dispose(t={}){if(!this.isDisposed_){if(this.readyQueue_&&(this.readyQueue_.length=0),this.trigger({type:"dispose",bubbles:!1}),this.isDisposed_=!0,this.children_)for(let o=this.children_.length-1;o>=0;o--)this.children_[o].dispose&&this.children_[o].dispose();this.children_=null,this.childIndex_=null,this.childNameIndex_=null,this.parentComponent_=null,this.el_&&(this.el_.parentNode&&(t.restoreEl?this.el_.parentNode.replaceChild(t.restoreEl,this.el_):this.el_.parentNode.removeChild(this.el_)),this.el_=null),this.player_=null}}isDisposed(){return!!this.isDisposed_}player(){return this.player_}options(t){return t?(this.options_=ut(this.options_,t),this.options_):this.options_}el(){return this.el_}createEl(t,o,a){return Le(t,o,a)}localize(t,o,a=t){const i=this.player_.language&&this.player_.language(),s=this.player_.languages&&this.player_.languages(),l=s&&s[i],r=i&&i.split("-")[0],u=s&&s[r];let c=a;return l&&l[t]?c=l[t]:u&&u[t]&&(c=u[t]),o&&(c=c.replace(/\{(\d+)\}/g,function(f,m){const d=o[m-1];let h=d;return typeof d>"u"&&(h=f),h})),c}handleLanguagechange(){}contentEl(){return this.contentEl_||this.el_}id(){return this.id_}name(){return this.name_}children(){return this.children_}getChildById(t){return this.childIndex_[t]}getChild(t){if(t)return this.childNameIndex_[t]}getDescendant(...t){t=t.reduce((a,i)=>a.concat(i),[]);let o=this;for(let a=0;a<t.length;a++)if(o=o.getChild(t[a]),!o||!o.getChild)return;return o}setIcon(t,o=this.el()){if(!this.player_.options_.experimentalSvgIcons)return;const a="http://www.w3.org/2000/svg",i=Le("span",{className:"vjs-icon-placeholder vjs-svg-icon"},{"aria-hidden":"true"}),s=ge.createElementNS(a,"svg");s.setAttributeNS(null,"viewBox","0 0 512 512");const l=ge.createElementNS(a,"use");return s.appendChild(l),l.setAttributeNS(null,"href",`#vjs-icon-${t}`),i.appendChild(s),this.iconIsSet_?o.replaceChild(i,o.querySelector(".vjs-icon-placeholder")):o.appendChild(i),this.iconIsSet_=!0,i}addChild(t,o={},a=this.children_.length){let i,s;if(typeof t=="string"){s=Ct(t);const l=o.componentClass||s;o.name=s;const r=re.getComponent(l);if(!r)throw new Error(`Component ${l} does not exist`);if(typeof r!="function")return null;i=new r(this.player_||this,o)}else i=t;if(i.parentComponent_&&i.parentComponent_.removeChild(i),this.children_.splice(a,0,i),i.parentComponent_=this,typeof i.id=="function"&&(this.childIndex_[i.id()]=i),s=s||i.name&&Ct(i.name()),s&&(this.childNameIndex_[s]=i,this.childNameIndex_[al(s)]=i),typeof i.el=="function"&&i.el()){let l=null;this.children_[a+1]&&(this.children_[a+1].el_?l=this.children_[a+1].el_:os(this.children_[a+1])&&(l=this.children_[a+1])),this.contentEl().insertBefore(i.el(),l)}return i}removeChild(t){if(typeof t=="string"&&(t=this.getChild(t)),!t||!this.children_)return;let o=!1;for(let i=this.children_.length-1;i>=0;i--)if(this.children_[i]===t){o=!0,this.children_.splice(i,1);break}if(!o)return;t.parentComponent_=null,this.childIndex_[t.id()]=null,this.childNameIndex_[Ct(t.name())]=null,this.childNameIndex_[al(t.name())]=null;const a=t.el();a&&a.parentNode===this.contentEl()&&this.contentEl().removeChild(t.el())}initChildren(){const t=this.options_.children;if(t){const o=this.options_,a=l=>{const r=l.name;let u=l.opts;if(o[r]!==void 0&&(u=o[r]),u===!1)return;u===!0&&(u={}),u.playerOptions=this.options_.playerOptions;const c=this.addChild(r,u);c&&(this[r]=c)};let i;const s=re.getComponent("Tech");Array.isArray(t)?i=t:i=Object.keys(t),i.concat(Object.keys(this.options_).filter(function(l){return!i.some(function(r){return typeof r=="string"?l===r:l===r.name})})).map(l=>{let r,u;return typeof l=="string"?(r=l,u=t[r]||this.options_[r]||{}):(r=l.name,u=l),{name:r,opts:u}}).filter(l=>{const r=re.getComponent(l.opts.componentClass||Ct(l.name));return r&&!s.isTech(r)}).forEach(a)}}buildCSSClass(){return""}ready(t,o=!1){if(t){if(!this.isReady_){this.readyQueue_=this.readyQueue_||[],this.readyQueue_.push(t);return}o?t.call(this):this.setTimeout(t,1)}}triggerReady(){this.isReady_=!0,this.setTimeout(function(){const t=this.readyQueue_;this.readyQueue_=[],t&&t.length>0&&t.forEach(function(o){o.call(this)},this),this.trigger("ready")},1)}$(t,o){return Ca(t,o||this.contentEl())}$$(t,o){return A0(t,o||this.contentEl())}hasClass(t){return ol(this.el_,t)}addClass(...t){qa(this.el_,...t)}removeClass(...t){Cu(this.el_,...t)}toggleClass(t,o){E0(this.el_,t,o)}show(){this.removeClass("vjs-hidden")}hide(){this.addClass("vjs-hidden")}lockShowing(){this.addClass("vjs-lock-showing")}unlockShowing(){this.removeClass("vjs-lock-showing")}getAttribute(t){return N0(this.el_,t)}setAttribute(t,o){Yi(this.el_,t,o)}removeAttribute(t){ku(this.el_,t)}width(t,o){return this.dimension("width",t,o)}height(t,o){return this.dimension("height",t,o)}dimensions(t,o){this.width(t,!0),this.height(o)}dimension(t,o,a){if(o!==void 0){(o===null||o!==o)&&(o=0),(""+o).indexOf("%")!==-1||(""+o).indexOf("px")!==-1?this.el_.style[t]=o:o==="auto"?this.el_.style[t]="":this.el_.style[t]=o+"px",a||this.trigger("componentresize");return}if(!this.el_)return 0;const i=this.el_.style[t],s=i.indexOf("px");return parseInt(s!==-1?i.slice(0,s):this.el_["offset"+Ct(t)],10)}currentDimension(t){let o=0;if(t!=="width"&&t!=="height")throw new Error("currentDimension only accepts width or height value");if(o=Qi(this.el_,t),o=parseFloat(o),o===0||isNaN(o)){const a=`offset${Ct(t)}`;o=this.el_[a]}return o}currentDimensions(){return{width:this.currentDimension("width"),height:this.currentDimension("height")}}currentWidth(){return this.currentDimension("width")}currentHeight(){return this.currentDimension("height")}getPositions(){const t=this.el_.getBoundingClientRect(),o={x:t.x,y:t.y,width:t.width,height:t.height,top:t.top,right:t.right,bottom:t.bottom,left:t.left},a={x:t.left+t.width/2,y:t.top+t.height/2,width:0,height:0,top:t.top+t.height/2,right:t.left+t.width/2,bottom:t.top+t.height/2,left:t.left+t.width/2};return{boundingClientRect:o,center:a}}focus(){this.el_.focus()}blur(){this.el_.blur()}handleKeyDown(t){this.player_&&(t.key!=="Tab"&&!(this.player_.options_.playerOptions.spatialNavigation&&this.player_.options_.playerOptions.spatialNavigation.enabled)&&t.stopPropagation(),this.player_.handleKeyDown(t))}handleKeyPress(t){this.handleKeyDown(t)}emitTapEvents(){let t=0,o=null;const a=10,i=200;let s;this.on("touchstart",function(r){r.touches.length===1&&(o={pageX:r.touches[0].pageX,pageY:r.touches[0].pageY},t=X.performance.now(),s=!0)}),this.on("touchmove",function(r){if(r.touches.length>1)s=!1;else if(o){const u=r.touches[0].pageX-o.pageX,c=r.touches[0].pageY-o.pageY;Math.sqrt(u*u+c*c)>a&&(s=!1)}});const l=function(){s=!1};this.on("touchleave",l),this.on("touchcancel",l),this.on("touchend",function(r){o=null,s===!0&&X.performance.now()-t<i&&(r.preventDefault(),this.trigger("tap"))})}enableTouchActivity(){if(!this.player()||!this.player().reportUserActivity)return;const t=pt(this.player(),this.player().reportUserActivity);let o;this.on("touchstart",function(){t(),this.clearInterval(o),o=this.setInterval(t,250)});const a=function(i){t(),this.clearInterval(o)};this.on("touchmove",t),this.on("touchend",a),this.on("touchcancel",a)}setTimeout(t,o){var a;return t=pt(this,t),this.clearTimersOnDispose_(),a=X.setTimeout(()=>{this.setTimeoutIds_.has(a)&&this.setTimeoutIds_.delete(a),t()},o),this.setTimeoutIds_.add(a),a}clearTimeout(t){return this.setTimeoutIds_.has(t)&&(this.setTimeoutIds_.delete(t),X.clearTimeout(t)),t}setInterval(t,o){t=pt(this,t),this.clearTimersOnDispose_();const a=X.setInterval(t,o);return this.setIntervalIds_.add(a),a}clearInterval(t){return this.setIntervalIds_.has(t)&&(this.setIntervalIds_.delete(t),X.clearInterval(t)),t}requestAnimationFrame(t){this.clearTimersOnDispose_();var o;return t=pt(this,t),o=X.requestAnimationFrame(()=>{this.rafIds_.has(o)&&this.rafIds_.delete(o),t()}),this.rafIds_.add(o),o}requestNamedAnimationFrame(t,o){this.namedRafs_.has(t)&&this.cancelNamedAnimationFrame(t),this.clearTimersOnDispose_(),o=pt(this,o);const a=this.requestAnimationFrame(()=>{o(),this.namedRafs_.has(t)&&this.namedRafs_.delete(t)});return this.namedRafs_.set(t,a),t}cancelNamedAnimationFrame(t){this.namedRafs_.has(t)&&(this.cancelAnimationFrame(this.namedRafs_.get(t)),this.namedRafs_.delete(t))}cancelAnimationFrame(t){return this.rafIds_.has(t)&&(this.rafIds_.delete(t),X.cancelAnimationFrame(t)),t}clearTimersOnDispose_(){this.clearingTimersOnDispose_||(this.clearingTimersOnDispose_=!0,this.one("dispose",()=>{[["namedRafs_","cancelNamedAnimationFrame"],["rafIds_","cancelAnimationFrame"],["setTimeoutIds_","clearTimeout"],["setIntervalIds_","clearInterval"]].forEach(([t,o])=>{this[t].forEach((a,i)=>this[o](i))}),this.clearingTimersOnDispose_=!1}))}getIsDisabled(){return!!this.el_.disabled}getIsExpresslyInert(){return this.el_.inert&&!this.el_.ownerDocument.documentElement.inert}getIsFocusable(t){return(t||this.el_).tabIndex>=0&&!(this.getIsDisabled()||this.getIsExpresslyInert())}getIsAvailableToBeFocused(t){function o(s){const l=X.getComputedStyle(s,null),r=l.getPropertyValue("visibility");return l.getPropertyValue("display")!=="none"&&!["hidden","collapse"].includes(r)}function a(s){return!(!o(s.parentElement)||!o(s)||s.style.opacity==="0"||X.getComputedStyle(s).height==="0px"||X.getComputedStyle(s).width==="0px")}function i(s){if(s.offsetWidth+s.offsetHeight+s.getBoundingClientRect().height+s.getBoundingClientRect().width===0)return!1;const l={x:s.getBoundingClientRect().left+s.offsetWidth/2,y:s.getBoundingClientRect().top+s.offsetHeight/2};if(l.x<0||l.x>(ge.documentElement.clientWidth||X.innerWidth)||l.y<0||l.y>(ge.documentElement.clientHeight||X.innerHeight))return!1;let r=ge.elementFromPoint(l.x,l.y);for(;r;){if(r===s)return!0;if(r.parentNode)r=r.parentNode;else return!1}}return t||(t=this.el()),!!(i(t)&&a(t)&&(!t.parentElement||t.tabIndex>=0))}static registerComponent(t,o){if(typeof t!="string"||!t)throw new Error(`Illegal component name, "${t}"; must be a non-empty string.`);const a=re.getComponent("Tech"),i=a&&a.isTech(o),s=re===o||re.prototype.isPrototypeOf(o.prototype);if(i||!s){let r;throw i?r="techs must be registered using Tech.registerTech()":r="must be a Component subclass",new Error(`Illegal component, "${t}"; ${r}.`)}t=Ct(t),re.components_||(re.components_={});const l=re.getComponent("Player");if(t==="Player"&&l&&l.players){const r=l.players,u=Object.keys(r);if(r&&u.length>0){for(let c=0;c<u.length;c++)if(r[u[c]]!==null)throw new Error("Can not register Player component after player has been created.")}}return re.components_[t]=o,re.components_[al(t)]=o,o}static getComponent(t){if(!(!t||!re.components_))return re.components_[t]}}re.registerComponent("Component",re);function $G(n,t,o){if(typeof t!="number"||t<0||t>o)throw new Error(`Failed to execute '${n}' on 'TimeRanges': The index provided (${t}) is non-numeric or out of bounds (0-${o}).`)}function Of(n,t,o,a){return $G(n,a,o.length-1),o[a][t]}function gc(n){let t;return n===void 0||n.length===0?t={length:0,start(){throw new Error("This TimeRanges object is empty")},end(){throw new Error("This TimeRanges object is empty")}}:t={length:n.length,start:Of.bind(null,"start",0,n),end:Of.bind(null,"end",1,n)},X.Symbol&&X.Symbol.iterator&&(t[X.Symbol.iterator]=()=>(n||[]).values()),t}function mo(n,t){return Array.isArray(n)?gc(n):n===void 0||t===void 0?gc():gc([[n,t]])}const q0=function(n,t){n=n<0?0:n;let o=Math.floor(n%60),a=Math.floor(n/60%60),i=Math.floor(n/3600);const s=Math.floor(t/60%60),l=Math.floor(t/3600);return(isNaN(n)||n===1/0)&&(i=a=o="-"),i=i>0||l>0?i+":":"",a=((i||s>=10)&&a<10?"0"+a:a)+":",o=o<10?"0"+o:o,i+a+o};let lp=q0;function W0(n){lp=n}function G0(){lp=q0}function Za(n,t=n){return lp(n,t)}var AG=Object.freeze({__proto__:null,createTimeRanges:mo,createTimeRange:mo,setFormatTime:W0,resetFormatTime:G0,formatTime:Za});function X0(n,t){let o=0,a,i;if(!t)return 0;(!n||!n.length)&&(n=mo(0,0));for(let s=0;s<n.length;s++)a=n.start(s),i=n.end(s),i>t&&(i=t),o+=i-a;return o/t}function Vt(n){if(n instanceof Vt)return n;typeof n=="number"?this.code=n:typeof n=="string"?this.message=n:Po(n)&&(typeof n.code=="number"&&(this.code=n.code),Object.assign(this,n)),this.message||(this.message=Vt.defaultMessages[this.code]||"")}Vt.prototype.code=0;Vt.prototype.message="";Vt.prototype.status=null;Vt.prototype.metadata=null;Vt.errorTypes=["MEDIA_ERR_CUSTOM","MEDIA_ERR_ABORTED","MEDIA_ERR_NETWORK","MEDIA_ERR_DECODE","MEDIA_ERR_SRC_NOT_SUPPORTED","MEDIA_ERR_ENCRYPTED"];Vt.defaultMessages={1:"You aborted the media playback",2:"A network error caused the media download to fail part-way.",3:"The media playback was aborted due to a corruption problem or because the media used features your browser did not support.",4:"The media could not be loaded, either because the server or network failed or because the format is not supported.",5:"The media is encrypted and we do not have the keys to decrypt it."};Vt.MEDIA_ERR_CUSTOM=0;Vt.prototype.MEDIA_ERR_CUSTOM=0;Vt.MEDIA_ERR_ABORTED=1;Vt.prototype.MEDIA_ERR_ABORTED=1;Vt.MEDIA_ERR_NETWORK=2;Vt.prototype.MEDIA_ERR_NETWORK=2;Vt.MEDIA_ERR_DECODE=3;Vt.prototype.MEDIA_ERR_DECODE=3;Vt.MEDIA_ERR_SRC_NOT_SUPPORTED=4;Vt.prototype.MEDIA_ERR_SRC_NOT_SUPPORTED=4;Vt.MEDIA_ERR_ENCRYPTED=5;Vt.prototype.MEDIA_ERR_ENCRYPTED=5;function il(n){return n!=null&&typeof n.then=="function"}function ko(n){il(n)&&n.then(null,t=>{})}const am=function(n){return["kind","label","language","id","inBandMetadataTrackDispatchType","mode","src"].reduce((o,a,i)=>(n[a]&&(o[a]=n[a]),o),{cues:n.cues&&Array.prototype.map.call(n.cues,function(o){return{startTime:o.startTime,endTime:o.endTime,text:o.text,id:o.id}})})},LG=function(n){const t=n.$$("track"),o=Array.prototype.map.call(t,i=>i.track);return Array.prototype.map.call(t,function(i){const s=am(i.track);return i.src&&(s.src=i.src),s}).concat(Array.prototype.filter.call(n.textTracks(),function(i){return o.indexOf(i)===-1}).map(am))},IG=function(n,t){return n.forEach(function(o){const a=t.addRemoteTextTrack(o).track;!o.src&&o.cues&&o.cues.forEach(i=>a.addCue(i))}),t.textTracks()};var im={textTracksToJson:LG,jsonToTextTracks:IG,trackToJson:am};const vc="vjs-modal-dialog";class is extends re{constructor(t,o){super(t,o),this.handleKeyDown_=a=>this.handleKeyDown(a),this.close_=a=>this.close(a),this.opened_=this.hasBeenOpened_=this.hasBeenFilled_=!1,this.closeable(!this.options_.uncloseable),this.content(this.options_.content),this.contentEl_=Le("div",{className:`${vc}-content`},{role:"document"}),this.descEl_=Le("p",{className:`${vc}-description vjs-control-text`,id:this.el().getAttribute("aria-describedby")}),Ea(this.descEl_,this.description()),this.el_.appendChild(this.descEl_),this.el_.appendChild(this.contentEl_)}createEl(){return super.createEl("div",{className:this.buildCSSClass(),tabIndex:-1},{"aria-describedby":`${this.id()}_description`,"aria-hidden":"true","aria-label":this.label(),role:"dialog","aria-live":"polite"})}dispose(){this.contentEl_=null,this.descEl_=null,this.previouslyActiveEl_=null,super.dispose()}buildCSSClass(){return`${vc} vjs-hidden ${super.buildCSSClass()}`}label(){return this.localize(this.options_.label||"Modal Window")}description(){let t=this.options_.description||this.localize("This is a modal window.");return this.closeable()&&(t+=" "+this.localize("This modal can be closed by pressing the Escape key or activating the close button.")),t}open(){if(this.opened_){this.options_.fillAlways&&this.fill();return}const t=this.player();this.trigger("beforemodalopen"),this.opened_=!0,(this.options_.fillAlways||!this.hasBeenOpened_&&!this.hasBeenFilled_)&&this.fill(),this.wasPlaying_=!t.paused(),this.options_.pauseOnOpen&&this.wasPlaying_&&t.pause(),this.on("keydown",this.handleKeyDown_),this.hadControls_=t.controls(),t.controls(!1),this.show(),this.conditionalFocus_(),this.el().setAttribute("aria-hidden","false"),this.trigger("modalopen"),this.hasBeenOpened_=!0}opened(t){return typeof t=="boolean"&&this[t?"open":"close"](),this.opened_}close(){if(!this.opened_)return;const t=this.player();this.trigger("beforemodalclose"),this.opened_=!1,this.wasPlaying_&&this.options_.pauseOnOpen&&t.play(),this.off("keydown",this.handleKeyDown_),this.hadControls_&&t.controls(!0),this.hide(),this.el().setAttribute("aria-hidden","true"),this.trigger({type:"modalclose",bubbles:!0}),this.conditionalBlur_(),this.options_.temporary&&this.dispose()}closeable(t){if(typeof t=="boolean"){const o=this.closeable_=!!t;let a=this.getChild("closeButton");if(o&&!a){const i=this.contentEl_;this.contentEl_=this.el_,a=this.addChild("closeButton",{controlText:"Close Modal Dialog"}),this.contentEl_=i,this.on(a,"close",this.close_)}!o&&a&&(this.off(a,"close",this.close_),this.removeChild(a),a.dispose())}return this.closeable_}fill(){this.fillWith(this.content())}fillWith(t){const o=this.contentEl(),a=o.parentNode,i=o.nextSibling;this.trigger("beforemodalfill"),this.hasBeenFilled_=!0,a.removeChild(o),this.empty(),$0(o,t),this.trigger("modalfill"),i?a.insertBefore(o,i):a.appendChild(o);const s=this.getChild("closeButton");s&&a.appendChild(s.el_),this.trigger("aftermodalfill")}empty(){this.trigger("beforemodalempty"),Tu(this.contentEl()),this.trigger("modalempty")}content(t){return typeof t<"u"&&(this.content_=t),this.content_}conditionalFocus_(){const t=ge.activeElement,o=this.player_.el_;this.previouslyActiveEl_=null,(o.contains(t)||o===t)&&(this.previouslyActiveEl_=t,this.focus())}conditionalBlur_(){this.previouslyActiveEl_&&(this.previouslyActiveEl_.focus(),this.previouslyActiveEl_=null)}handleKeyDown(t){if(this.trigger({type:"modalKeydown",originalEvent:t,target:this,bubbles:!0}),t.stopPropagation(),t.key==="Escape"&&this.closeable()){t.preventDefault(),this.close();return}if(t.key!=="Tab")return;const o=this.focusableEls_(),a=this.el_.querySelector(":focus");let i;for(let s=0;s<o.length;s++)if(a===o[s]){i=s;break}ge.activeElement===this.el_&&(i=0),t.shiftKey&&i===0?(o[o.length-1].focus(),t.preventDefault()):!t.shiftKey&&i===o.length-1&&(o[0].focus(),t.preventDefault())}focusableEls_(){const t=this.el_.querySelectorAll("*");return Array.prototype.filter.call(t,o=>(o instanceof X.HTMLAnchorElement||o instanceof X.HTMLAreaElement)&&o.hasAttribute("href")||(o instanceof X.HTMLInputElement||o instanceof X.HTMLSelectElement||o instanceof X.HTMLTextAreaElement||o instanceof X.HTMLButtonElement)&&!o.hasAttribute("disabled")||o instanceof X.HTMLIFrameElement||o instanceof X.HTMLObjectElement||o instanceof X.HTMLEmbedElement||o.hasAttribute("tabindex")&&o.getAttribute("tabindex")!==-1||o.hasAttribute("contenteditable"))}}is.prototype.options_={pauseOnOpen:!0,temporary:!0};re.registerComponent("ModalDialog",is);class ei extends Wn{constructor(t=[]){super(),this.tracks_=[],Object.defineProperty(this,"length",{get(){return this.tracks_.length}});for(let o=0;o<t.length;o++)this.addTrack(t[o])}addTrack(t){const o=this.tracks_.length;""+o in this||Object.defineProperty(this,o,{get(){return this.tracks_[o]}}),this.tracks_.indexOf(t)===-1&&(this.tracks_.push(t),this.trigger({track:t,type:"addtrack",target:this})),t.labelchange_=()=>{this.trigger({track:t,type:"labelchange",target:this})},Xo(t)&&t.addEventListener("labelchange",t.labelchange_)}removeTrack(t){let o;for(let a=0,i=this.length;a<i;a++)if(this[a]===t){o=this[a],o.off&&o.off(),this.tracks_.splice(a,1);break}o&&this.trigger({track:o,type:"removetrack",target:this})}getTrackById(t){let o=null;for(let a=0,i=this.length;a<i;a++){const s=this[a];if(s.id===t){o=s;break}}return o}}ei.prototype.allowedEvents_={change:"change",addtrack:"addtrack",removetrack:"removetrack",labelchange:"labelchange"};for(const n in ei.prototype.allowedEvents_)ei.prototype["on"+n]=null;const yc=function(n,t){for(let o=0;o<n.length;o++)!Object.keys(n[o]).length||t.id===n[o].id||(n[o].enabled=!1)};class Y0 extends ei{constructor(t=[]){for(let o=t.length-1;o>=0;o--)if(t[o].enabled){yc(t,t[o]);break}super(t),this.changing_=!1}addTrack(t){t.enabled&&yc(this,t),super.addTrack(t),t.addEventListener&&(t.enabledChange_=()=>{this.changing_||(this.changing_=!0,yc(this,t),this.changing_=!1,this.trigger("change"))},t.addEventListener("enabledchange",t.enabledChange_))}removeTrack(t){super.removeTrack(t),t.removeEventListener&&t.enabledChange_&&(t.removeEventListener("enabledchange",t.enabledChange_),t.enabledChange_=null)}}const _c=function(n,t){for(let o=0;o<n.length;o++)!Object.keys(n[o]).length||t.id===n[o].id||(n[o].selected=!1)};class K0 extends ei{constructor(t=[]){for(let o=t.length-1;o>=0;o--)if(t[o].selected){_c(t,t[o]);break}super(t),this.changing_=!1,Object.defineProperty(this,"selectedIndex",{get(){for(let o=0;o<this.length;o++)if(this[o].selected)return o;return-1},set(){}})}addTrack(t){t.selected&&_c(this,t),super.addTrack(t),t.addEventListener&&(t.selectedChange_=()=>{this.changing_||(this.changing_=!0,_c(this,t),this.changing_=!1,this.trigger("change"))},t.addEventListener("selectedchange",t.selectedChange_))}removeTrack(t){super.removeTrack(t),t.removeEventListener&&t.selectedChange_&&(t.removeEventListener("selectedchange",t.selectedChange_),t.selectedChange_=null)}}class rp extends ei{addTrack(t){super.addTrack(t),this.queueChange_||(this.queueChange_=()=>this.queueTrigger("change")),this.triggerSelectedlanguagechange||(this.triggerSelectedlanguagechange_=()=>this.trigger("selectedlanguagechange")),t.addEventListener("modechange",this.queueChange_),["metadata","chapters"].indexOf(t.kind)===-1&&t.addEventListener("modechange",this.triggerSelectedlanguagechange_)}removeTrack(t){super.removeTrack(t),t.removeEventListener&&(this.queueChange_&&t.removeEventListener("modechange",this.queueChange_),this.selectedlanguagechange_&&t.removeEventListener("modechange",this.triggerSelectedlanguagechange_))}toJSON(){return this.tracks_.map(t=>t.toJSON())}}class OG{constructor(t=[]){this.trackElements_=[],Object.defineProperty(this,"length",{get(){return this.trackElements_.length}});for(let o=0,a=t.length;o<a;o++)this.addTrackElement_(t[o])}addTrackElement_(t){const o=this.trackElements_.length;""+o in this||Object.defineProperty(this,o,{get(){return this.trackElements_[o]}}),this.trackElements_.indexOf(t)===-1&&this.trackElements_.push(t)}getTrackElementByTrack_(t){let o;for(let a=0,i=this.trackElements_.length;a<i;a++)if(t===this.trackElements_[a].track){o=this.trackElements_[a];break}return o}removeTrackElement_(t){for(let o=0,a=this.trackElements_.length;o<a;o++)if(t===this.trackElements_[o]){this.trackElements_[o].track&&typeof this.trackElements_[o].track.off=="function"&&this.trackElements_[o].track.off(),typeof this.trackElements_[o].off=="function"&&this.trackElements_[o].off(),this.trackElements_.splice(o,1);break}}}class Xr{constructor(t){Xr.prototype.setCues_.call(this,t),Object.defineProperty(this,"length",{get(){return this.length_}})}setCues_(t){const o=this.length||0;let a=0;const i=t.length;this.cues_=t,this.length_=t.length;const s=function(l){""+l in this||Object.defineProperty(this,""+l,{get(){return this.cues_[l]}})};if(o<i)for(a=o;a<i;a++)s.call(this,a)}getCueById(t){let o=null;for(let a=0,i=this.length;a<i;a++){const s=this[a];if(s.id===t){o=s;break}}return o}}const MG={alternative:"alternative",captions:"captions",main:"main",sign:"sign",subtitles:"subtitles",commentary:"commentary"},UG={alternative:"alternative",descriptions:"descriptions",main:"main","main-desc":"main-desc",translation:"translation",commentary:"commentary"},RG={subtitles:"subtitles",captions:"captions",descriptions:"descriptions",chapters:"chapters",metadata:"metadata"},Mf={disabled:"disabled",hidden:"hidden",showing:"showing"};class dp extends Wn{constructor(t={}){super();const o={id:t.id||"vjs_track_"+ao(),kind:t.kind||"",language:t.language||""};let a=t.label||"";for(const i in o)Object.defineProperty(this,i,{get(){return o[i]},set(){}});Object.defineProperty(this,"label",{get(){return a},set(i){i!==a&&(a=i,this.trigger("labelchange"))}})}}const up=function(n){return new URL(n,ge.baseURI)},Q0=function(n){return new URL(n,ge.baseURI).href},cp=function(n){if(typeof n=="string"){const o=n.split("?")[0].replace(/\/+$/,"").match(/\.([^.\/]+)$/);return o?o[1].toLowerCase():""}return""},Du=function(n,t=X.location){return up(n).origin!==t.origin};var FG=Object.freeze({__proto__:null,parseUrl:up,getAbsoluteURL:Q0,getFileExtension:cp,isCrossOrigin:Du});const Uf=function(n,t){const o=new X.WebVTT.Parser(X,X.vttjs,X.WebVTT.StringDecoder()),a=[];o.oncue=function(i){t.addCue(i)},o.onparsingerror=function(i){a.push(i)},o.onflush=function(){t.trigger({type:"loadeddata",target:t})},o.parse(n),a.length>0&&(X.console&&X.console.groupCollapsed&&X.console.groupCollapsed(`Text Track parsing errors for ${t.src}`),a.forEach(i=>Ge.error(i)),X.console&&X.console.groupEnd&&X.console.groupEnd()),o.flush()},Rf=function(n,t){const o={uri:n},a=Du(n);a&&(o.cors=a);const i=t.tech_.crossOrigin()==="use-credentials";i&&(o.withCredentials=i),xv(o,pt(this,function(s,l,r){if(s)return Ge.error(s,l);t.loaded_=!0,typeof X.WebVTT!="function"?t.tech_&&t.tech_.any(["vttjsloaded","vttjserror"],u=>{if(u.type==="vttjserror"){Ge.error(`vttjs failed to load, stopping trying to process ${t.src}`);return}return Uf(r,t)}):Uf(r,t)}))};class Bl extends dp{constructor(t={}){if(!t.tech)throw new Error("A tech was not provided.");const o=ut(t,{kind:RG[t.kind]||"subtitles",language:t.language||t.srclang||""});let a=Mf[o.mode]||"disabled";const i=o.default;(o.kind==="metadata"||o.kind==="chapters")&&(a="hidden"),super(o),this.tech_=o.tech,this.cues_=[],this.activeCues_=[],this.preload_=this.tech_.preloadTextTracks!==!1;const s=new Xr(this.cues_),l=new Xr(this.activeCues_);let r=!1;this.timeupdateHandler=pt(this,function(c={}){if(!this.tech_.isDisposed()){if(!this.tech_.isReady_){c.type!=="timeupdate"&&(this.rvf_=this.tech_.requestVideoFrameCallback(this.timeupdateHandler));return}this.activeCues=this.activeCues,r&&(this.trigger("cuechange"),r=!1),c.type!=="timeupdate"&&(this.rvf_=this.tech_.requestVideoFrameCallback(this.timeupdateHandler))}});const u=()=>{this.stopTracking()};this.tech_.one("dispose",u),a!=="disabled"&&this.startTracking(),Object.defineProperties(this,{default:{get(){return i},set(){}},mode:{get(){return a},set(c){Mf[c]&&a!==c&&(a=c,!this.preload_&&a!=="disabled"&&this.cues.length===0&&Rf(this.src,this),this.stopTracking(),a!=="disabled"&&this.startTracking(),this.trigger("modechange"))}},cues:{get(){return this.loaded_?s:null},set(){}},activeCues:{get(){if(!this.loaded_)return null;if(this.cues.length===0)return l;const c=this.tech_.currentTime(),f=[];for(let m=0,d=this.cues.length;m<d;m++){const h=this.cues[m];h.startTime<=c&&h.endTime>=c&&f.push(h)}if(r=!1,f.length!==this.activeCues_.length)r=!0;else for(let m=0;m<f.length;m++)this.activeCues_.indexOf(f[m])===-1&&(r=!0);return this.activeCues_=f,l.setCues_(this.activeCues_),l},set(){}}}),o.src?(this.src=o.src,this.preload_||(this.loaded_=!0),(this.preload_||o.kind!=="subtitles"&&o.kind!=="captions")&&Rf(this.src,this)):this.loaded_=!0}startTracking(){this.rvf_=this.tech_.requestVideoFrameCallback(this.timeupdateHandler),this.tech_.on("timeupdate",this.timeupdateHandler)}stopTracking(){this.rvf_&&(this.tech_.cancelVideoFrameCallback(this.rvf_),this.rvf_=void 0),this.tech_.off("timeupdate",this.timeupdateHandler)}addCue(t){let o=t;if(!("getCueAsHTML"in o)){o=new X.vttjs.VTTCue(t.startTime,t.endTime,t.text);for(const i in t)i in o||(o[i]=t[i]);o.id=t.id,o.originalCue_=t}const a=this.tech_.textTracks();for(let i=0;i<a.length;i++)a[i]!==this&&a[i].removeCue(o);this.cues_.push(o),this.cues.setCues_(this.cues_)}toJSON(){return im.trackToJson(this)}removeCue(t){let o=this.cues_.length;for(;o--;){const a=this.cues_[o];if(a===t||a.originalCue_&&a.originalCue_===t){this.cues_.splice(o,1),this.cues.setCues_(this.cues_);break}}}}Bl.prototype.allowedEvents_={cuechange:"cuechange"};class J0 extends dp{constructor(t={}){const o=ut(t,{kind:UG[t.kind]||""});super(o);let a=!1;Object.defineProperty(this,"enabled",{get(){return a},set(i){typeof i!="boolean"||i===a||(a=i,this.trigger("enabledchange"))}}),o.enabled&&(this.enabled=o.enabled),this.loaded_=!0}}class Z0 extends dp{constructor(t={}){const o=ut(t,{kind:MG[t.kind]||""});super(o);let a=!1;Object.defineProperty(this,"selected",{get(){return a},set(i){typeof i!="boolean"||i===a||(a=i,this.trigger("selectedchange"))}}),o.selected&&(this.selected=o.selected)}}class Jo extends Wn{constructor(t={}){super();let o;const a=new Bl(t);this.kind=a.kind,this.src=a.src,this.srclang=a.language,this.label=a.label,this.default=a.default,Object.defineProperties(this,{readyState:{get(){return o}},track:{get(){return a}}}),o=Jo.NONE,a.addEventListener("loadeddata",()=>{o=Jo.LOADED,this.trigger({type:"load",target:this})})}}Jo.prototype.allowedEvents_={load:"load"};Jo.NONE=0;Jo.LOADING=1;Jo.LOADED=2;Jo.ERROR=3;const oo={audio:{ListClass:Y0,TrackClass:J0,capitalName:"Audio"},video:{ListClass:K0,TrackClass:Z0,capitalName:"Video"},text:{ListClass:rp,TrackClass:Bl,capitalName:"Text"}};Object.keys(oo).forEach(function(n){oo[n].getterName=`${n}Tracks`,oo[n].privateName=`${n}Tracks_`});const Ji={remoteText:{ListClass:rp,TrackClass:Bl,capitalName:"RemoteText",getterName:"remoteTextTracks",privateName:"remoteTextTracks_"},remoteTextEl:{ListClass:OG,TrackClass:Jo,capitalName:"RemoteTextTrackEls",getterName:"remoteTextTrackEls",privateName:"remoteTextTrackEls_"}},fn=Object.assign({},oo,Ji);Ji.names=Object.keys(Ji);oo.names=Object.keys(oo);fn.names=[].concat(Ji.names).concat(oo.names);function HG(n,t,o,a,i={}){const s=n.textTracks();i.kind=t,o&&(i.label=o),a&&(i.language=a),i.tech=n;const l=new fn.text.TrackClass(i);return s.addTrack(l),l}class Fe extends re{constructor(t={},o=function(){}){t.reportTouchActivity=!1,super(null,t,o),this.onDurationChange_=a=>this.onDurationChange(a),this.trackProgress_=a=>this.trackProgress(a),this.trackCurrentTime_=a=>this.trackCurrentTime(a),this.stopTrackingCurrentTime_=a=>this.stopTrackingCurrentTime(a),this.disposeSourceHandler_=a=>this.disposeSourceHandler(a),this.queuedHanders_=new Set,this.hasStarted_=!1,this.on("playing",function(){this.hasStarted_=!0}),this.on("loadstart",function(){this.hasStarted_=!1}),fn.names.forEach(a=>{const i=fn[a];t&&t[i.getterName]&&(this[i.privateName]=t[i.getterName])}),this.featuresProgressEvents||this.manualProgressOn(),this.featuresTimeupdateEvents||this.manualTimeUpdatesOn(),["Text","Audio","Video"].forEach(a=>{t[`native${a}Tracks`]===!1&&(this[`featuresNative${a}Tracks`]=!1)}),t.nativeCaptions===!1||t.nativeTextTracks===!1?this.featuresNativeTextTracks=!1:(t.nativeCaptions===!0||t.nativeTextTracks===!0)&&(this.featuresNativeTextTracks=!0),this.featuresNativeTextTracks||this.emulateTextTracks(),this.preloadTextTracks=t.preloadTextTracks!==!1,this.autoRemoteTextTracks_=new fn.text.ListClass,this.initTrackListeners(),t.nativeControlsForTouch||this.emitTapEvents(),this.constructor&&(this.name_=this.constructor.name||"Unknown Tech")}triggerSourceset(t){this.isReady_||this.one("ready",()=>this.setTimeout(()=>this.triggerSourceset(t),1)),this.trigger({src:t,type:"sourceset"})}manualProgressOn(){this.on("durationchange",this.onDurationChange_),this.manualProgress=!0,this.one("ready",this.trackProgress_)}manualProgressOff(){this.manualProgress=!1,this.stopTrackingProgress(),this.off("durationchange",this.onDurationChange_)}trackProgress(t){this.stopTrackingProgress(),this.progressInterval=this.setInterval(pt(this,function(){const o=this.bufferedPercent();this.bufferedPercent_!==o&&this.trigger("progress"),this.bufferedPercent_=o,o===1&&this.stopTrackingProgress()}),500)}onDurationChange(t){this.duration_=this.duration()}buffered(){return mo(0,0)}bufferedPercent(){return X0(this.buffered(),this.duration_)}stopTrackingProgress(){this.clearInterval(this.progressInterval)}manualTimeUpdatesOn(){this.manualTimeUpdates=!0,this.on("play",this.trackCurrentTime_),this.on("pause",this.stopTrackingCurrentTime_)}manualTimeUpdatesOff(){this.manualTimeUpdates=!1,this.stopTrackingCurrentTime(),this.off("play",this.trackCurrentTime_),this.off("pause",this.stopTrackingCurrentTime_)}trackCurrentTime(){this.currentTimeInterval&&this.stopTrackingCurrentTime(),this.currentTimeInterval=this.setInterval(function(){this.trigger({type:"timeupdate",target:this,manuallyTriggered:!0})},250)}stopTrackingCurrentTime(){this.clearInterval(this.currentTimeInterval),this.trigger({type:"timeupdate",target:this,manuallyTriggered:!0})}dispose(){this.clearTracks(oo.names),this.manualProgress&&this.manualProgressOff(),this.manualTimeUpdates&&this.manualTimeUpdatesOff(),super.dispose()}clearTracks(t){t=[].concat(t),t.forEach(o=>{const a=this[`${o}Tracks`]()||[];let i=a.length;for(;i--;){const s=a[i];o==="text"&&this.removeRemoteTextTrack(s),a.removeTrack(s)}})}cleanupAutoTextTracks(){const t=this.autoRemoteTextTracks_||[];let o=t.length;for(;o--;){const a=t[o];this.removeRemoteTextTrack(a)}}reset(){}crossOrigin(){}setCrossOrigin(){}error(t){return t!==void 0&&(this.error_=new Vt(t),this.trigger("error")),this.error_}played(){return this.hasStarted_?mo(0,0):mo()}play(){}setScrubbing(t){}scrubbing(){}setCurrentTime(t){this.manualTimeUpdates&&this.trigger({type:"timeupdate",target:this,manuallyTriggered:!0})}initTrackListeners(){oo.names.forEach(t=>{const o=oo[t],a=()=>{this.trigger(`${t}trackchange`)},i=this[o.getterName]();i.addEventListener("removetrack",a),i.addEventListener("addtrack",a),this.on("dispose",()=>{i.removeEventListener("removetrack",a),i.removeEventListener("addtrack",a)})})}addWebVttScript_(){if(!X.WebVTT)if(ge.body.contains(this.el())){if(!this.options_["vtt.js"]&&Xi(of)&&Object.keys(of).length>0){this.trigger("vttjsloaded");return}const t=ge.createElement("script");t.src=this.options_["vtt.js"]||"https://vjs.zencdn.net/vttjs/0.14.1/vtt.min.js",t.onload=()=>{this.trigger("vttjsloaded")},t.onerror=()=>{this.trigger("vttjserror")},this.on("dispose",()=>{t.onload=null,t.onerror=null}),X.WebVTT=!0,this.el().parentNode.appendChild(t)}else this.ready(this.addWebVttScript_)}emulateTextTracks(){const t=this.textTracks(),o=this.remoteTextTracks(),a=r=>t.addTrack(r.track),i=r=>t.removeTrack(r.track);o.on("addtrack",a),o.on("removetrack",i),this.addWebVttScript_();const s=()=>this.trigger("texttrackchange"),l=()=>{s();for(let r=0;r<t.length;r++){const u=t[r];u.removeEventListener("cuechange",s),u.mode==="showing"&&u.addEventListener("cuechange",s)}};l(),t.addEventListener("change",l),t.addEventListener("addtrack",l),t.addEventListener("removetrack",l),this.on("dispose",function(){o.off("addtrack",a),o.off("removetrack",i),t.removeEventListener("change",l),t.removeEventListener("addtrack",l),t.removeEventListener("removetrack",l);for(let r=0;r<t.length;r++)t[r].removeEventListener("cuechange",s)})}addTextTrack(t,o,a){if(!t)throw new Error("TextTrack kind is required but was not provided");return HG(this,t,o,a)}createRemoteTextTrack(t){const o=ut(t,{tech:this});return new Ji.remoteTextEl.TrackClass(o)}addRemoteTextTrack(t={},o){const a=this.createRemoteTextTrack(t);return typeof o!="boolean"&&(o=!1),this.remoteTextTrackEls().addTrackElement_(a),this.remoteTextTracks().addTrack(a.track),o===!1&&this.ready(()=>this.autoRemoteTextTracks_.addTrack(a.track)),a}removeRemoteTextTrack(t){const o=this.remoteTextTrackEls().getTrackElementByTrack_(t);this.remoteTextTrackEls().removeTrackElement_(o),this.remoteTextTracks().removeTrack(t),this.autoRemoteTextTracks_.removeTrack(t)}getVideoPlaybackQuality(){return{}}requestPictureInPicture(){return Promise.reject()}disablePictureInPicture(){return!0}setDisablePictureInPicture(){}requestVideoFrameCallback(t){const o=ao();return!this.isReady_||this.paused()?(this.queuedHanders_.add(o),this.one("playing",()=>{this.queuedHanders_.has(o)&&(this.queuedHanders_.delete(o),t())})):this.requestNamedAnimationFrame(o,t),o}cancelVideoFrameCallback(t){this.queuedHanders_.has(t)?this.queuedHanders_.delete(t):this.cancelNamedAnimationFrame(t)}setPoster(){}playsinline(){}setPlaysinline(){}overrideNativeAudioTracks(t){}overrideNativeVideoTracks(t){}canPlayType(t){return""}static canPlayType(t){return""}static canPlaySource(t,o){return Fe.canPlayType(t.type)}static isTech(t){return t.prototype instanceof Fe||t instanceof Fe||t===Fe}static registerTech(t,o){if(Fe.techs_||(Fe.techs_={}),!Fe.isTech(o))throw new Error(`Tech ${t} must be a Tech`);if(!Fe.canPlayType)throw new Error("Techs must have a static canPlayType method on them");if(!Fe.canPlaySource)throw new Error("Techs must have a static canPlaySource method on them");return t=Ct(t),Fe.techs_[t]=o,Fe.techs_[al(t)]=o,t!=="Tech"&&Fe.defaultTechOrder_.push(t),o}static getTech(t){if(t){if(Fe.techs_&&Fe.techs_[t])return Fe.techs_[t];if(t=Ct(t),X&&X.videojs&&X.videojs[t])return Ge.warn(`The ${t} tech was added to the videojs object when it should be registered using videojs.registerTech(name, tech)`),X.videojs[t]}}}fn.names.forEach(function(n){const t=fn[n];Fe.prototype[t.getterName]=function(){return this[t.privateName]=this[t.privateName]||new t.ListClass,this[t.privateName]}});Fe.prototype.featuresVolumeControl=!0;Fe.prototype.featuresMuteControl=!0;Fe.prototype.featuresFullscreenResize=!1;Fe.prototype.featuresPlaybackRate=!1;Fe.prototype.featuresProgressEvents=!1;Fe.prototype.featuresSourceset=!1;Fe.prototype.featuresTimeupdateEvents=!1;Fe.prototype.featuresNativeTextTracks=!1;Fe.prototype.featuresVideoFrameCallback=!1;Fe.withSourceHandlers=function(n){n.registerSourceHandler=function(o,a){let i=n.sourceHandlers;i||(i=n.sourceHandlers=[]),a===void 0&&(a=i.length),i.splice(a,0,o)},n.canPlayType=function(o){const a=n.sourceHandlers||[];let i;for(let s=0;s<a.length;s++)if(i=a[s].canPlayType(o),i)return i;return""},n.selectSourceHandler=function(o,a){const i=n.sourceHandlers||[];let s;for(let l=0;l<i.length;l++)if(s=i[l].canHandleSource(o,a),s)return i[l];return null},n.canPlaySource=function(o,a){const i=n.selectSourceHandler(o,a);return i?i.canHandleSource(o,a):""},["seekable","seeking","duration"].forEach(function(o){const a=this[o];typeof a=="function"&&(this[o]=function(){return this.sourceHandler_&&this.sourceHandler_[o]?this.sourceHandler_[o].apply(this.sourceHandler_,arguments):a.apply(this,arguments)})},n.prototype),n.prototype.setSource=function(o){let a=n.selectSourceHandler(o,this.options_);a||(n.nativeSourceHandler?a=n.nativeSourceHandler:Ge.error("No source handler found for the current source.")),this.disposeSourceHandler(),this.off("dispose",this.disposeSourceHandler_),a!==n.nativeSourceHandler&&(this.currentSource_=o),this.sourceHandler_=a.handleSource(o,this,this.options_),this.one("dispose",this.disposeSourceHandler_)},n.prototype.disposeSourceHandler=function(){this.currentSource_&&(this.clearTracks(["audio","video"]),this.currentSource_=null),this.cleanupAutoTextTracks(),this.sourceHandler_&&(this.sourceHandler_.dispose&&this.sourceHandler_.dispose(),this.sourceHandler_=null)}};re.registerComponent("Tech",Fe);Fe.registerTech("Tech",Fe);Fe.defaultTechOrder_=[];const Wa={},Yr={},Kr={};function jG(n,t){Wa[n]=Wa[n]||[],Wa[n].push(t)}function zG(n,t,o){n.setTimeout(()=>La(t,Wa[t.type],o,n),1)}function qG(n,t){n.forEach(o=>o.setTech&&o.setTech(t))}function WG(n,t,o){return n.reduceRight(mp(o),t[o]())}function GG(n,t,o,a){return t[o](n.reduce(mp(o),a))}function Ff(n,t,o,a=null){const i="call"+Ct(o),s=n.reduce(mp(i),a),l=s===Kr,r=l?null:t[o](s);return KG(n,o,r,l),r}const XG={buffered:1,currentTime:1,duration:1,muted:1,played:1,paused:1,seekable:1,volume:1,ended:1},YG={setCurrentTime:1,setMuted:1,setVolume:1},Hf={play:1,pause:1};function mp(n){return(t,o)=>t===Kr?Kr:o[n]?o[n](t):t}function KG(n,t,o,a){for(let i=n.length-1;i>=0;i--){const s=n[i];s[t]&&s[t](a,o)}}function QG(n){Yr.hasOwnProperty(n.id())&&delete Yr[n.id()]}function JG(n,t){const o=Yr[n.id()];let a=null;if(o==null)return a=t(n),Yr[n.id()]=[[t,a]],a;for(let i=0;i<o.length;i++){const[s,l]=o[i];s===t&&(a=l)}return a===null&&(a=t(n),o.push([t,a])),a}function La(n={},t=[],o,a,i=[],s=!1){const[l,...r]=t;if(typeof l=="string")La(n,Wa[l],o,a,i,s);else if(l){const u=JG(a,l);if(!u.setSource)return i.push(u),La(n,r,o,a,i,s);u.setSource(Object.assign({},n),function(c,f){if(c)return La(n,r,o,a,i,s);i.push(u),La(f,n.type===f.type?r:Wa[f.type],o,a,i,s)})}else r.length?La(n,r,o,a,i,s):s?o(n,i):La(n,Wa["*"],o,a,i,!0)}const ZG={opus:"video/ogg",ogv:"video/ogg",mp4:"video/mp4",mov:"video/mp4",m4v:"video/mp4",mkv:"video/x-matroska",m4a:"audio/mp4",mp3:"audio/mpeg",aac:"audio/aac",caf:"audio/x-caf",flac:"audio/flac",oga:"audio/ogg",wav:"audio/wav",m3u8:"application/x-mpegURL",mpd:"application/dash+xml",jpg:"image/jpeg",jpeg:"image/jpeg",gif:"image/gif",png:"image/png",svg:"image/svg+xml",webp:"image/webp"},Qr=function(n=""){const t=cp(n);return ZG[t.toLowerCase()]||""},eX=(n,t)=>{if(!t)return"";if(n.cache_.source.src===t&&n.cache_.source.type)return n.cache_.source.type;const o=n.cache_.sources.filter(i=>i.src===t);if(o.length)return o[0].type;const a=n.$$("source");for(let i=0;i<a.length;i++){const s=a[i];if(s.type&&s.src&&s.src===t)return s.type}return Qr(t)},e1=function(n){if(Array.isArray(n)){let t=[];n.forEach(function(o){o=e1(o),Array.isArray(o)?t=t.concat(o):Po(o)&&t.push(o)}),n=t}else typeof n=="string"&&n.trim()?n=[jf({src:n})]:Po(n)&&typeof n.src=="string"&&n.src&&n.src.trim()?n=[jf(n)]:n=[];return n};function jf(n){if(!n.type){const t=Qr(n.src);t&&(n.type=t)}return n}var tX=`<svg xmlns="http://www.w3.org/2000/svg">
|
|
54
|
+
<defs>
|
|
55
|
+
<symbol viewBox="0 0 48 48" id="vjs-icon-play">
|
|
56
|
+
<path d="M16 10v28l22-14z"></path>
|
|
57
|
+
</symbol>
|
|
58
|
+
<symbol viewBox="0 0 48 48" id="vjs-icon-pause">
|
|
59
|
+
<path d="M12 38h8V10h-8v28zm16-28v28h8V10h-8z"></path>
|
|
60
|
+
</symbol>
|
|
61
|
+
<symbol viewBox="0 0 48 48" id="vjs-icon-audio">
|
|
62
|
+
<path d="M24 2C14.06 2 6 10.06 6 20v14c0 3.31 2.69 6 6 6h6V24h-8v-4c0-7.73 6.27-14 14-14s14 6.27 14 14v4h-8v16h6c3.31 0 6-2.69 6-6V20c0-9.94-8.06-18-18-18z"></path>
|
|
63
|
+
</symbol>
|
|
64
|
+
<symbol viewBox="0 0 48 48" id="vjs-icon-captions">
|
|
65
|
+
<path d="M38 8H10c-2.21 0-4 1.79-4 4v24c0 2.21 1.79 4 4 4h28c2.21 0 4-1.79 4-4V12c0-2.21-1.79-4-4-4zM22 22h-3v-1h-4v6h4v-1h3v2a2 2 0 0 1-2 2h-6a2 2 0 0 1-2-2v-8a2 2 0 0 1 2-2h6a2 2 0 0 1 2 2v2zm14 0h-3v-1h-4v6h4v-1h3v2a2 2 0 0 1-2 2h-6a2 2 0 0 1-2-2v-8a2 2 0 0 1 2-2h6a2 2 0 0 1 2 2v2z"></path>
|
|
66
|
+
</symbol>
|
|
67
|
+
<symbol viewBox="0 0 48 48" id="vjs-icon-subtitles">
|
|
68
|
+
<path d="M40 8H8c-2.21 0-4 1.79-4 4v24c0 2.21 1.79 4 4 4h32c2.21 0 4-1.79 4-4V12c0-2.21-1.79-4-4-4zM8 24h8v4H8v-4zm20 12H8v-4h20v4zm12 0h-8v-4h8v4zm0-8H20v-4h20v4z"></path>
|
|
69
|
+
</symbol>
|
|
70
|
+
<symbol viewBox="0 0 48 48" id="vjs-icon-fullscreen-enter">
|
|
71
|
+
<path d="M14 28h-4v10h10v-4h-6v-6zm-4-8h4v-6h6v-4H10v10zm24 14h-6v4h10V28h-4v6zm-6-24v4h6v6h4V10H28z"></path>
|
|
72
|
+
</symbol>
|
|
73
|
+
<symbol viewBox="0 0 48 48" id="vjs-icon-fullscreen-exit">
|
|
74
|
+
<path d="M10 32h6v6h4V28H10v4zm6-16h-6v4h10V10h-4v6zm12 22h4v-6h6v-4H28v10zm4-22v-6h-4v10h10v-4h-6z"></path>
|
|
75
|
+
</symbol>
|
|
76
|
+
<symbol viewBox="0 0 48 48" id="vjs-icon-play-circle">
|
|
77
|
+
<path d="M20 33l12-9-12-9v18zm4-29C12.95 4 4 12.95 4 24s8.95 20 20 20 20-8.95 20-20S35.05 4 24 4zm0 36c-8.82 0-16-7.18-16-16S15.18 8 24 8s16 7.18 16 16-7.18 16-16 16z"></path>
|
|
78
|
+
</symbol>
|
|
79
|
+
<symbol viewBox="0 0 48 48" id="vjs-icon-volume-mute">
|
|
80
|
+
<path d="M33 24c0-3.53-2.04-6.58-5-8.05v4.42l4.91 4.91c.06-.42.09-.85.09-1.28zm5 0c0 1.88-.41 3.65-1.08 5.28l3.03 3.03C41.25 29.82 42 27 42 24c0-8.56-5.99-15.72-14-17.54v4.13c5.78 1.72 10 7.07 10 13.41zM8.55 6L6 8.55 15.45 18H6v12h8l10 10V26.55l8.51 8.51c-1.34 1.03-2.85 1.86-4.51 2.36v4.13a17.94 17.94 0 0 0 7.37-3.62L39.45 42 42 39.45l-18-18L8.55 6zM24 8l-4.18 4.18L24 16.36V8z"></path>
|
|
81
|
+
</symbol>
|
|
82
|
+
<symbol viewBox="0 0 48 48" id="vjs-icon-volume-low">
|
|
83
|
+
<path d="M14 18v12h8l10 10V8L22 18h-8z"></path>
|
|
84
|
+
</symbol>
|
|
85
|
+
<symbol viewBox="0 0 48 48" id="vjs-icon-volume-medium">
|
|
86
|
+
<path d="M37 24c0-3.53-2.04-6.58-5-8.05v16.11c2.96-1.48 5-4.53 5-8.06zm-27-6v12h8l10 10V8L18 18h-8z"></path>
|
|
87
|
+
</symbol>
|
|
88
|
+
<symbol viewBox="0 0 48 48" id="vjs-icon-volume-high">
|
|
89
|
+
<path d="M6 18v12h8l10 10V8L14 18H6zm27 6c0-3.53-2.04-6.58-5-8.05v16.11c2.96-1.48 5-4.53 5-8.06zM28 6.46v4.13c5.78 1.72 10 7.07 10 13.41s-4.22 11.69-10 13.41v4.13c8.01-1.82 14-8.97 14-17.54S36.01 8.28 28 6.46z"></path>
|
|
90
|
+
</symbol>
|
|
91
|
+
<symbol viewBox="0 0 48 48" id="vjs-icon-spinner">
|
|
92
|
+
<path d="M18.8 21l9.53-16.51C26.94 4.18 25.49 4 24 4c-4.8 0-9.19 1.69-12.64 4.51l7.33 12.69.11-.2zm24.28-3c-1.84-5.85-6.3-10.52-11.99-12.68L23.77 18h19.31zm.52 2H28.62l.58 1 9.53 16.5C41.99 33.94 44 29.21 44 24c0-1.37-.14-2.71-.4-4zm-26.53 4l-7.8-13.5C6.01 14.06 4 18.79 4 24c0 1.37.14 2.71.4 4h14.98l-2.31-4zM4.92 30c1.84 5.85 6.3 10.52 11.99 12.68L24.23 30H4.92zm22.54 0l-7.8 13.51c1.4.31 2.85.49 4.34.49 4.8 0 9.19-1.69 12.64-4.51L29.31 26.8 27.46 30z"></path>
|
|
93
|
+
</symbol>
|
|
94
|
+
<symbol viewBox="0 0 24 24" id="vjs-icon-hd">
|
|
95
|
+
<path d="M19 3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm-8 12H9.5v-2h-2v2H6V9h1.5v2.5h2V9H11v6zm2-6h4c.55 0 1 .45 1 1v4c0 .55-.45 1-1 1h-4V9zm1.5 4.5h2v-3h-2v3z"></path>
|
|
96
|
+
</symbol>
|
|
97
|
+
<symbol viewBox="0 0 48 48" id="vjs-icon-chapters">
|
|
98
|
+
<path d="M6 26h4v-4H6v4zm0 8h4v-4H6v4zm0-16h4v-4H6v4zm8 8h28v-4H14v4zm0 8h28v-4H14v4zm0-20v4h28v-4H14z"></path>
|
|
99
|
+
</symbol>
|
|
100
|
+
<symbol viewBox="0 0 40 40" id="vjs-icon-downloading">
|
|
101
|
+
<path d="M18.208 36.875q-3.208-.292-5.979-1.729-2.771-1.438-4.812-3.729-2.042-2.292-3.188-5.229-1.146-2.938-1.146-6.23 0-6.583 4.334-11.416 4.333-4.834 10.833-5.5v3.166q-5.167.75-8.583 4.646Q6.25 14.75 6.25 19.958q0 5.209 3.396 9.104 3.396 3.896 8.562 4.646zM20 28.417L11.542 20l2.083-2.083 4.917 4.916v-11.25h2.916v11.25l4.875-4.916L28.417 20zm1.792 8.458v-3.167q1.833-.25 3.541-.958 1.709-.708 3.167-1.875l2.333 2.292q-1.958 1.583-4.25 2.541-2.291.959-4.791 1.167zm6.791-27.792q-1.541-1.125-3.25-1.854-1.708-.729-3.541-1.021V3.042q2.5.25 4.77 1.208 2.271.958 4.271 2.5zm4.584 21.584l-2.25-2.25q1.166-1.5 1.854-3.209.687-1.708.937-3.541h3.209q-.292 2.5-1.229 4.791-.938 2.292-2.521 4.209zm.541-12.417q-.291-1.833-.958-3.562-.667-1.73-1.833-3.188l2.375-2.208q1.541 1.916 2.458 4.208.917 2.292 1.167 4.75z"></path>
|
|
102
|
+
</symbol>
|
|
103
|
+
<symbol viewBox="0 0 48 48" id="vjs-icon-file-download">
|
|
104
|
+
<path d="M10.8 40.55q-1.35 0-2.375-1T7.4 37.15v-7.7h3.4v7.7h26.35v-7.7h3.4v7.7q0 1.4-1 2.4t-2.4 1zM24 32.1L13.9 22.05l2.45-2.45 5.95 5.95V7.15h3.4v18.4l5.95-5.95 2.45 2.45z"></path>
|
|
105
|
+
</symbol>
|
|
106
|
+
<symbol viewBox="0 0 48 48" id="vjs-icon-file-download-done">
|
|
107
|
+
<path d="M9.8 40.5v-3.45h28.4v3.45zm9.2-9.05L7.4 19.85l2.45-2.35L19 26.65l19.2-19.2 2.4 2.4z"></path>
|
|
108
|
+
</symbol>
|
|
109
|
+
<symbol viewBox="0 0 48 48" id="vjs-icon-file-download-off">
|
|
110
|
+
<path d="M4.9 4.75L43.25 43.1 41 45.3l-4.75-4.75q-.05.05-.075.025-.025-.025-.075-.025H10.8q-1.35 0-2.375-1T7.4 37.15v-7.7h3.4v7.7h22.05l-7-7-1.85 1.8L13.9 21.9l1.85-1.85L2.7 7zm26.75 14.7l2.45 2.45-3.75 3.8-2.45-2.5zM25.7 7.15V21.1l-3.4-3.45V7.15z"></path>
|
|
111
|
+
</symbol>
|
|
112
|
+
<symbol viewBox="0 0 48 48" id="vjs-icon-share">
|
|
113
|
+
<path d="M36 32.17c-1.52 0-2.89.59-3.93 1.54L17.82 25.4c.11-.45.18-.92.18-1.4s-.07-.95-.18-1.4l14.1-8.23c1.07 1 2.5 1.62 4.08 1.62 3.31 0 6-2.69 6-6s-2.69-6-6-6-6 2.69-6 6c0 .48.07.95.18 1.4l-14.1 8.23c-1.07-1-2.5-1.62-4.08-1.62-3.31 0-6 2.69-6 6s2.69 6 6 6c1.58 0 3.01-.62 4.08-1.62l14.25 8.31c-.1.42-.16.86-.16 1.31A5.83 5.83 0 1 0 36 32.17z"></path>
|
|
114
|
+
</symbol>
|
|
115
|
+
<symbol viewBox="0 0 48 48" id="vjs-icon-cog">
|
|
116
|
+
<path d="M38.86 25.95c.08-.64.14-1.29.14-1.95s-.06-1.31-.14-1.95l4.23-3.31c.38-.3.49-.84.24-1.28l-4-6.93c-.25-.43-.77-.61-1.22-.43l-4.98 2.01c-1.03-.79-2.16-1.46-3.38-1.97L29 4.84c-.09-.47-.5-.84-1-.84h-8c-.5 0-.91.37-.99.84l-.75 5.3a14.8 14.8 0 0 0-3.38 1.97L9.9 10.1a1 1 0 0 0-1.22.43l-4 6.93c-.25.43-.14.97.24 1.28l4.22 3.31C9.06 22.69 9 23.34 9 24s.06 1.31.14 1.95l-4.22 3.31c-.38.3-.49.84-.24 1.28l4 6.93c.25.43.77.61 1.22.43l4.98-2.01c1.03.79 2.16 1.46 3.38 1.97l.75 5.3c.08.47.49.84.99.84h8c.5 0 .91-.37.99-.84l.75-5.3a14.8 14.8 0 0 0 3.38-1.97l4.98 2.01a1 1 0 0 0 1.22-.43l4-6.93c.25-.43.14-.97-.24-1.28l-4.22-3.31zM24 31c-3.87 0-7-3.13-7-7s3.13-7 7-7 7 3.13 7 7-3.13 7-7 7z"></path>
|
|
117
|
+
</symbol>
|
|
118
|
+
<symbol viewBox="0 0 48 48" id="vjs-icon-square">
|
|
119
|
+
<path d="M36 8H12c-2.21 0-4 1.79-4 4v24c0 2.21 1.79 4 4 4h24c2.21 0 4-1.79 4-4V12c0-2.21-1.79-4-4-4zm0 28H12V12h24v24z"></path>
|
|
120
|
+
</symbol>
|
|
121
|
+
<symbol viewBox="0 0 48 48" id="vjs-icon-circle">
|
|
122
|
+
<circle cx="24" cy="24" r="20"></circle>
|
|
123
|
+
</symbol>
|
|
124
|
+
<symbol viewBox="0 0 48 48" id="vjs-icon-circle-outline">
|
|
125
|
+
<path d="M24 4C12.95 4 4 12.95 4 24s8.95 20 20 20 20-8.95 20-20S35.05 4 24 4zm0 36c-8.82 0-16-7.18-16-16S15.18 8 24 8s16 7.18 16 16-7.18 16-16 16z"></path>
|
|
126
|
+
</symbol>
|
|
127
|
+
<symbol viewBox="0 0 48 48" id="vjs-icon-circle-inner-circle">
|
|
128
|
+
<path d="M24 4C12.97 4 4 12.97 4 24s8.97 20 20 20 20-8.97 20-20S35.03 4 24 4zm0 36c-8.82 0-16-7.18-16-16S15.18 8 24 8s16 7.18 16 16-7.18 16-16 16zm6-16c0 3.31-2.69 6-6 6s-6-2.69-6-6 2.69-6 6-6 6 2.69 6 6z"></path>
|
|
129
|
+
</symbol>
|
|
130
|
+
<symbol viewBox="0 0 48 48" id="vjs-icon-cancel">
|
|
131
|
+
<path d="M24 4C12.95 4 4 12.95 4 24s8.95 20 20 20 20-8.95 20-20S35.05 4 24 4zm10 27.17L31.17 34 24 26.83 16.83 34 14 31.17 21.17 24 14 16.83 16.83 14 24 21.17 31.17 14 34 16.83 26.83 24 34 31.17z"></path>
|
|
132
|
+
</symbol>
|
|
133
|
+
<symbol viewBox="0 0 48 48" id="vjs-icon-replay">
|
|
134
|
+
<path d="M24 10V2L14 12l10 10v-8c6.63 0 12 5.37 12 12s-5.37 12-12 12-12-5.37-12-12H8c0 8.84 7.16 16 16 16s16-7.16 16-16-7.16-16-16-16z"></path>
|
|
135
|
+
</symbol>
|
|
136
|
+
<symbol viewBox="0 0 48 48" id="vjs-icon-repeat">
|
|
137
|
+
<path d="M14 14h20v6l8-8-8-8v6H10v12h4v-8zm20 20H14v-6l-8 8 8 8v-6h24V26h-4v8z"></path>
|
|
138
|
+
</symbol>
|
|
139
|
+
<symbol viewBox="0 96 48 48" id="vjs-icon-replay-5">
|
|
140
|
+
<path d="M17.689 98l-8.697 8.696 8.697 8.697 2.486-2.485-4.32-4.319h1.302c4.93 0 9.071 1.722 12.424 5.165 3.352 3.443 5.029 7.638 5.029 12.584h3.55c0-2.958-.553-5.73-1.658-8.313-1.104-2.583-2.622-4.841-4.555-6.774-1.932-1.932-4.19-3.45-6.773-4.555-2.584-1.104-5.355-1.657-8.313-1.657H15.5l4.615-4.615zm-8.08 21.659v13.861h11.357v5.008H9.609V143h12.7c.834 0 1.55-.298 2.146-.894.596-.597.895-1.31.895-2.145v-7.781c0-.835-.299-1.55-.895-2.147a2.929 2.929 0 0 0-2.147-.894h-8.227v-5.096H25.35v-4.384z"></path>
|
|
141
|
+
</symbol>
|
|
142
|
+
<symbol viewBox="0 96 48 48" id="vjs-icon-replay-10">
|
|
143
|
+
<path d="M42.315 125.63c0-4.997-1.694-9.235-5.08-12.713-3.388-3.479-7.571-5.218-12.552-5.218h-1.315l4.363 4.363-2.51 2.51-8.787-8.786L25.221 97l2.45 2.45-4.662 4.663h1.375c2.988 0 5.788.557 8.397 1.673 2.61 1.116 4.892 2.65 6.844 4.602 1.953 1.953 3.487 4.234 4.602 6.844 1.116 2.61 1.674 5.41 1.674 8.398zM8.183 142v-19.657H3.176V117.8h9.643V142zm13.63 0c-1.156 0-2.127-.393-2.912-1.178-.778-.778-1.168-1.746-1.168-2.902v-16.04c0-1.156.393-2.127 1.178-2.912.779-.779 1.746-1.168 2.902-1.168h7.696c1.156 0 2.126.392 2.911 1.177.779.78 1.168 1.747 1.168 2.903v16.04c0 1.156-.392 2.127-1.177 2.912-.779.779-1.746 1.168-2.902 1.168zm.556-4.636h6.583v-15.02H22.37z"></path>
|
|
144
|
+
</symbol>
|
|
145
|
+
<symbol viewBox="0 96 48 48" id="vjs-icon-replay-30">
|
|
146
|
+
<path d="M26.047 97l-8.733 8.732 8.733 8.733 2.496-2.494-4.336-4.338h1.307c4.95 0 9.108 1.73 12.474 5.187 3.367 3.458 5.051 7.668 5.051 12.635h3.565c0-2.97-.556-5.751-1.665-8.346-1.109-2.594-2.633-4.862-4.574-6.802-1.94-1.941-4.208-3.466-6.803-4.575-2.594-1.109-5.375-1.664-8.345-1.664H23.85l4.634-4.634zM2.555 117.531v4.688h10.297v5.25H5.873v4.687h6.979v5.156H2.555V142H13.36c1.061 0 1.95-.395 2.668-1.186.718-.79 1.076-1.772 1.076-2.94v-16.218c0-1.168-.358-2.149-1.076-2.94-.717-.79-1.607-1.185-2.668-1.185zm22.482.14c-1.149 0-2.11.39-2.885 1.165-.78.78-1.172 1.744-1.172 2.893v15.943c0 1.149.388 2.11 1.163 2.885.78.78 1.745 1.172 2.894 1.172h7.649c1.148 0 2.11-.388 2.884-1.163.78-.78 1.17-1.745 1.17-2.894v-15.943c0-1.15-.386-2.111-1.16-2.885-.78-.78-1.746-1.172-2.894-1.172zm.553 4.518h6.545v14.93H25.59z"></path>
|
|
147
|
+
</symbol>
|
|
148
|
+
<symbol viewBox="0 96 48 48" id="vjs-icon-forward-5">
|
|
149
|
+
<path d="M29.508 97l-2.431 2.43 4.625 4.625h-1.364c-2.965 0-5.742.554-8.332 1.66-2.589 1.107-4.851 2.629-6.788 4.566-1.937 1.937-3.458 4.2-4.565 6.788-1.107 2.59-1.66 5.367-1.66 8.331h3.557c0-4.957 1.68-9.16 5.04-12.611 3.36-3.45 7.51-5.177 12.451-5.177h1.304l-4.326 4.33 2.49 2.49 8.715-8.716zm-9.783 21.61v13.89h11.382v5.018H19.725V142h12.727a2.93 2.93 0 0 0 2.15-.896 2.93 2.93 0 0 0 .896-2.15v-7.798c0-.837-.299-1.554-.896-2.152a2.93 2.93 0 0 0-2.15-.896h-8.245V123h11.29v-4.392z"></path>
|
|
150
|
+
</symbol>
|
|
151
|
+
<symbol viewBox="0 96 48 48" id="vjs-icon-forward-10">
|
|
152
|
+
<path d="M23.119 97l-2.386 2.383 4.538 4.538h-1.339c-2.908 0-5.633.543-8.173 1.63-2.54 1.085-4.76 2.577-6.66 4.478-1.9 1.9-3.392 4.12-4.478 6.66-1.085 2.54-1.629 5.264-1.629 8.172h3.49c0-4.863 1.648-8.986 4.944-12.372 3.297-3.385 7.368-5.078 12.216-5.078h1.279l-4.245 4.247 2.443 2.442 8.55-8.55zm-9.52 21.45v4.42h4.871V142h4.513v-23.55zm18.136 0c-1.125 0-2.066.377-2.824 1.135-.764.764-1.148 1.709-1.148 2.834v15.612c0 1.124.38 2.066 1.139 2.824.764.764 1.708 1.145 2.833 1.145h7.489c1.125 0 2.066-.378 2.824-1.136.764-.764 1.145-1.709 1.145-2.833v-15.612c0-1.125-.378-2.067-1.136-2.825-.764-.764-1.708-1.145-2.833-1.145zm.54 4.42h6.408v14.617h-6.407z"></path>
|
|
153
|
+
</symbol>
|
|
154
|
+
<symbol viewBox="0 96 48 48" id="vjs-icon-forward-30">
|
|
155
|
+
<path d="M25.549 97l-2.437 2.434 4.634 4.635H26.38c-2.97 0-5.753.555-8.347 1.664-2.594 1.109-4.861 2.633-6.802 4.574-1.94 1.94-3.465 4.207-4.574 6.802-1.109 2.594-1.664 5.377-1.664 8.347h3.565c0-4.967 1.683-9.178 5.05-12.636 3.366-3.458 7.525-5.187 12.475-5.187h1.307l-4.335 4.338 2.495 2.494 8.732-8.732zm-11.553 20.53v4.689h10.297v5.249h-6.978v4.688h6.978v5.156H13.996V142h10.808c1.06 0 1.948-.395 2.666-1.186.718-.79 1.077-1.771 1.077-2.94v-16.217c0-1.169-.36-2.15-1.077-2.94-.718-.79-1.605-1.186-2.666-1.186zm21.174.168c-1.149 0-2.11.389-2.884 1.163-.78.78-1.172 1.745-1.172 2.894v15.942c0 1.15.388 2.11 1.162 2.885.78.78 1.745 1.17 2.894 1.17h7.649c1.149 0 2.11-.386 2.885-1.16.78-.78 1.17-1.746 1.17-2.895v-15.942c0-1.15-.387-2.11-1.161-2.885-.78-.78-1.745-1.172-2.894-1.172zm.552 4.516h6.542v14.931h-6.542z"></path>
|
|
156
|
+
</symbol>
|
|
157
|
+
<symbol viewBox="0 0 512 512" id="vjs-icon-audio-description">
|
|
158
|
+
<g fill-rule="evenodd"><path d="M227.29 381.351V162.993c50.38-1.017 89.108-3.028 117.631 17.126 27.374 19.342 48.734 56.965 44.89 105.325-4.067 51.155-41.335 94.139-89.776 98.475-24.085 2.155-71.972 0-71.972 0s-.84-1.352-.773-2.568m48.755-54.804c31.43 1.26 53.208-16.633 56.495-45.386 4.403-38.51-21.188-63.552-58.041-60.796v103.612c-.036 1.466.575 2.22 1.546 2.57"></path><path d="M383.78 381.328c13.336 3.71 17.387-11.06 23.215-21.408 12.722-22.571 22.294-51.594 22.445-84.774.221-47.594-18.343-82.517-35.6-106.182h-8.51c-.587 3.874 2.226 7.315 3.865 10.276 13.166 23.762 25.367 56.553 25.54 94.194.2 43.176-14.162 79.278-30.955 107.894"></path><path d="M425.154 381.328c13.336 3.71 17.384-11.061 23.215-21.408 12.721-22.571 22.291-51.594 22.445-84.774.221-47.594-18.343-82.517-35.6-106.182h-8.511c-.586 3.874 2.226 7.315 3.866 10.276 13.166 23.762 25.367 56.553 25.54 94.194.2 43.176-14.162 79.278-30.955 107.894"></path><path d="M466.26 381.328c13.337 3.71 17.385-11.061 23.216-21.408 12.722-22.571 22.292-51.594 22.445-84.774.221-47.594-18.343-82.517-35.6-106.182h-8.51c-.587 3.874 2.225 7.315 3.865 10.276 13.166 23.762 25.367 56.553 25.54 94.194.2 43.176-14.162 79.278-30.955 107.894M4.477 383.005H72.58l18.573-28.484 64.169-.135s.065 19.413.065 28.62h48.756V160.307h-58.816c-5.653 9.537-140.85 222.697-140.85 222.697zm152.667-145.282v71.158l-40.453-.27 40.453-70.888z"></path></g>
|
|
159
|
+
</symbol>
|
|
160
|
+
<symbol viewBox="0 0 48 48" id="vjs-icon-next-item">
|
|
161
|
+
<path d="M12 36l17-12-17-12v24zm20-24v24h4V12h-4z"></path>
|
|
162
|
+
</symbol>
|
|
163
|
+
<symbol viewBox="0 0 48 48" id="vjs-icon-previous-item">
|
|
164
|
+
<path d="M12 12h4v24h-4zm7 12l17 12V12z"></path>
|
|
165
|
+
</symbol>
|
|
166
|
+
<symbol viewBox="0 0 48 48" id="vjs-icon-shuffle">
|
|
167
|
+
<path d="M21.17 18.34L10.83 8 8 10.83l10.34 10.34 2.83-2.83zM29 8l4.09 4.09L8 37.17 10.83 40l25.09-25.09L40 19V8H29zm.66 18.83l-2.83 2.83 6.26 6.26L29 40h11V29l-4.09 4.09-6.25-6.26z"></path>
|
|
168
|
+
</symbol>
|
|
169
|
+
<symbol viewBox="0 0 48 48" id="vjs-icon-cast">
|
|
170
|
+
<path d="M42 6H6c-2.21 0-4 1.79-4 4v6h4v-6h36v28H28v4h14c2.21 0 4-1.79 4-4V10c0-2.21-1.79-4-4-4zM2 36v6h6c0-3.31-2.69-6-6-6zm0-8v4c5.52 0 10 4.48 10 10h4c0-7.73-6.27-14-14-14zm0-8v4c9.94 0 18 8.06 18 18h4c0-12.15-9.85-22-22-22z"></path>
|
|
171
|
+
</symbol>
|
|
172
|
+
<symbol viewBox="0 0 48 48" id="vjs-icon-picture-in-picture-enter">
|
|
173
|
+
<path d="M38 22H22v11.99h16V22zm8 16V9.96C46 7.76 44.2 6 42 6H6C3.8 6 2 7.76 2 9.96V38c0 2.2 1.8 4 4 4h36c2.2 0 4-1.8 4-4zm-4 .04H6V9.94h36v28.1z"></path>
|
|
174
|
+
</symbol>
|
|
175
|
+
<symbol viewBox="0 0 22 18" id="vjs-icon-picture-in-picture-exit">
|
|
176
|
+
<path d="M18 4H4v10h14V4zm4 12V1.98C22 .88 21.1 0 20 0H2C.9 0 0 .88 0 1.98V16c0 1.1.9 2 2 2h18c1.1 0 2-.9 2-2zm-2 .02H2V1.97h18v14.05z"></path>
|
|
177
|
+
<path fill="none" d="M-1-3h24v24H-1z"></path>
|
|
178
|
+
</symbol>
|
|
179
|
+
<symbol viewBox="0 0 1792 1792" id="vjs-icon-facebook">
|
|
180
|
+
<path d="M1343 12v264h-157q-86 0-116 36t-30 108v189h293l-39 296h-254v759H734V905H479V609h255V391q0-186 104-288.5T1115 0q147 0 228 12z"></path>
|
|
181
|
+
</symbol>
|
|
182
|
+
<symbol viewBox="0 0 1792 1792" id="vjs-icon-linkedin">
|
|
183
|
+
<path d="M477 625v991H147V625h330zm21-306q1 73-50.5 122T312 490h-2q-82 0-132-49t-50-122q0-74 51.5-122.5T314 148t133 48.5T498 319zm1166 729v568h-329v-530q0-105-40.5-164.5T1168 862q-63 0-105.5 34.5T999 982q-11 30-11 81v553H659q2-399 2-647t-1-296l-1-48h329v144h-2q20-32 41-56t56.5-52 87-43.5T1285 602q171 0 275 113.5t104 332.5z"></path>
|
|
184
|
+
</symbol>
|
|
185
|
+
<symbol viewBox="0 0 1200 1227" id="vjs-icon-twitter">
|
|
186
|
+
<path d="M714.163 519.284L1160.89 0H1055.03L667.137 450.887L357.328 0H0L468.492 681.821L0 1226.37H105.866L515.491 750.218L842.672 1226.37H1200L714.137 519.284H714.163ZM569.165 687.828L521.697 619.934L144.011 79.6944H306.615L611.412 515.685L658.88 583.579L1055.08 1150.3H892.476L569.165 687.854V687.828Z"/>
|
|
187
|
+
</symbol>
|
|
188
|
+
<symbol viewBox="0 0 1792 1792" id="vjs-icon-tumblr">
|
|
189
|
+
<path d="M1328 1329l80 237q-23 35-111 66t-177 32q-104 2-190.5-26T787 1564t-95-106-55.5-120-16.5-118V676H452V461q72-26 129-69.5t91-90 58-102 34-99T779 12q1-5 4.5-8.5T791 0h244v424h333v252h-334v518q0 30 6.5 56t22.5 52.5 49.5 41.5 81.5 14q78-2 134-29z"></path>
|
|
190
|
+
</symbol>
|
|
191
|
+
<symbol viewBox="0 0 1792 1792" id="vjs-icon-pinterest">
|
|
192
|
+
<path d="M1664 896q0 209-103 385.5T1281.5 1561 896 1664q-111 0-218-32 59-93 78-164 9-34 54-211 20 39 73 67.5t114 28.5q121 0 216-68.5t147-188.5 52-270q0-114-59.5-214T1180 449t-255-63q-105 0-196 29t-154.5 77-109 110.5-67 129.5T377 866q0 104 40 183t117 111q30 12 38-20 2-7 8-31t8-30q6-23-11-43-51-61-51-151 0-151 104.5-259.5T904 517q151 0 235.5 82t84.5 213q0 170-68.5 289T980 1220q-61 0-98-43.5T859 1072q8-35 26.5-93.5t30-103T927 800q0-50-27-83t-77-33q-62 0-105 57t-43 142q0 73 25 122l-99 418q-17 70-13 177-206-91-333-281T128 896q0-209 103-385.5T510.5 231 896 128t385.5 103T1561 510.5 1664 896z"></path>
|
|
193
|
+
</symbol>
|
|
194
|
+
</defs>
|
|
195
|
+
</svg>`;const zf=zr?10009:qr?461:8,yi={codes:{play:415,pause:19,ff:417,rw:412,back:zf},names:{415:"play",19:"pause",417:"ff",412:"rw",[zf]:"back"},isEventKey(n,t){return t=t.toLowerCase(),!!(this.names[n.keyCode]&&this.names[n.keyCode]===t)},getEventName(n){if(this.names[n.keyCode])return this.names[n.keyCode];if(this.codes[n.code]){const t=this.codes[n.code];return this.names[t]}return null}},qf=5;class nX extends Wn{constructor(t){super(),this.player_=t,this.focusableComponents=[],this.isListening_=!1,this.isPaused_=!1,this.onKeyDown_=this.onKeyDown_.bind(this),this.lastFocusedComponent_=null}start(){this.isListening_||(this.player_.on("keydown",this.onKeyDown_),this.player_.on("modalKeydown",this.onKeyDown_),this.player_.on("loadedmetadata",()=>{this.focus(this.updateFocusableComponents()[0])}),this.player_.on("modalclose",()=>{this.refocusComponent()}),this.player_.on("focusin",this.handlePlayerFocus_.bind(this)),this.player_.on("focusout",this.handlePlayerBlur_.bind(this)),this.isListening_=!0,this.player_.errorDisplay&&this.player_.errorDisplay.on("aftermodalfill",()=>{this.updateFocusableComponents(),this.focusableComponents.length&&(this.focusableComponents.length>1?this.focusableComponents[1].focus():this.focusableComponents[0].focus())}))}stop(){this.player_.off("keydown",this.onKeyDown_),this.isListening_=!1}onKeyDown_(t){const o=t.originalEvent?t.originalEvent:t;if(["ArrowLeft","ArrowRight","ArrowUp","ArrowDown"].includes(o.key)){if(this.isPaused_)return;o.preventDefault();const a=o.key.substring(5).toLowerCase();this.move(a)}else if(yi.isEventKey(o,"play")||yi.isEventKey(o,"pause")||yi.isEventKey(o,"ff")||yi.isEventKey(o,"rw")){o.preventDefault();const a=yi.getEventName(o);this.performMediaAction_(a)}else yi.isEventKey(o,"Back")&&t.target&&typeof t.target.closeable=="function"&&t.target.closeable()&&(o.preventDefault(),t.target.close())}performMediaAction_(t){if(this.player_)switch(t){case"play":this.player_.paused()&&this.player_.play();break;case"pause":this.player_.paused()||this.player_.pause();break;case"ff":this.userSeek_(this.player_.currentTime()+qf);break;case"rw":this.userSeek_(this.player_.currentTime()-qf);break}}userSeek_(t){this.player_.liveTracker&&this.player_.liveTracker.isLive()&&this.player_.liveTracker.nextSeekedFromUser(),this.player_.currentTime(t)}pause(){this.isPaused_=!0}resume(){this.isPaused_=!1}handlePlayerBlur_(t){const o=t.relatedTarget;let a=null;const i=this.getCurrentComponent(t.target);o&&(a=!!o.closest(".video-js"),o.classList.contains("vjs-text-track-settings")&&!this.isPaused_&&this.searchForTrackSelect_()),(!t.currentTarget.contains(t.relatedTarget)&&!a||!o)&&(i&&i.name()==="CloseButton"?this.refocusComponent():(this.pause(),i&&i.el()&&(this.lastFocusedComponent_=i)))}handlePlayerFocus_(){this.getCurrentComponent()&&this.getCurrentComponent().getIsFocusable()&&this.resume()}updateFocusableComponents(){const t=this.player_,o=[];function a(i){for(const s of i)s.hasOwnProperty("el_")&&s.getIsFocusable()&&s.getIsAvailableToBeFocused(s.el())&&o.push(s),s.hasOwnProperty("children_")&&s.children_.length>0&&a(s.children_)}return t.children_.forEach(i=>{if(i.hasOwnProperty("el_"))if(i.getIsFocusable&&i.getIsAvailableToBeFocused&&i.getIsFocusable()&&i.getIsAvailableToBeFocused(i.el())){o.push(i);return}else i.hasOwnProperty("children_")&&i.children_.length>0?a(i.children_):i.hasOwnProperty("items")&&i.items.length>0?a(i.items):this.findSuitableDOMChild(i)&&o.push(i);if(i.name_==="ErrorDisplay"&&i.opened_){const s=i.el_.querySelector(".vjs-errors-ok-button-container");s&&s.querySelectorAll("button").forEach((r,u)=>{o.push({name:()=>"ModalButton"+(u+1),el:()=>r,getPositions:()=>{const c=r.getBoundingClientRect(),f={x:c.x,y:c.y,width:c.width,height:c.height,top:c.top,right:c.right,bottom:c.bottom,left:c.left},m={x:c.left+c.width/2,y:c.top+c.height/2,width:0,height:0,top:c.top+c.height/2,right:c.left+c.width/2,bottom:c.top+c.height/2,left:c.left+c.width/2};return{boundingClientRect:f,center:m}},getIsAvailableToBeFocused:()=>!0,getIsFocusable:c=>!0,focus:()=>r.focus()})})}}),this.focusableComponents=o,this.focusableComponents}findSuitableDOMChild(t){function o(a){if(t.getIsFocusable(a)&&t.getIsAvailableToBeFocused(a))return a;for(let i=0;i<a.children.length;i++){const s=a.children[i],l=o(s);if(l)return l}return null}return t.el()?o(t.el()):null}getCurrentComponent(t){this.updateFocusableComponents();const o=t||document.activeElement;if(this.focusableComponents.length){for(const a of this.focusableComponents)if(a.el()===o)return a}}add(t){const o=[...this.focusableComponents];t.hasOwnProperty("el_")&&t.getIsFocusable()&&t.getIsAvailableToBeFocused(t.el())&&o.push(t),this.focusableComponents=o,this.trigger({type:"focusableComponentsChanged",focusableComponents:this.focusableComponents})}remove(t){for(let o=0;o<this.focusableComponents.length;o++)if(this.focusableComponents[o].name()===t.name()){this.focusableComponents.splice(o,1),this.trigger({type:"focusableComponentsChanged",focusableComponents:this.focusableComponents});return}}clear(){this.focusableComponents.length>0&&(this.focusableComponents=[],this.trigger({type:"focusableComponentsChanged",focusableComponents:this.focusableComponents}))}move(t){const o=this.getCurrentComponent();if(!o)return;const a=o.getPositions(),i=this.focusableComponents.filter(l=>l!==o&&this.isInDirection_(a.boundingClientRect,l.getPositions().boundingClientRect,t)),s=this.findBestCandidate_(a.center,i,t);s?this.focus(s):this.trigger({type:"endOfFocusableComponents",direction:t,focusedComponent:o})}findBestCandidate_(t,o,a){let i=1/0,s=null;for(const l of o){const r=l.getPositions().center,u=this.calculateDistance_(t,r,a);u<i&&(i=u,s=l)}return s}isInDirection_(t,o,a){switch(a){case"right":return o.left>=t.right;case"left":return o.right<=t.left;case"down":return o.top>=t.bottom;case"up":return o.bottom<=t.top;default:return!1}}refocusComponent(){if(this.lastFocusedComponent_){this.player_.userActive()||this.player_.userActive(!0),this.updateFocusableComponents();for(let t=0;t<this.focusableComponents.length;t++)if(this.focusableComponents[t].name()===this.lastFocusedComponent_.name()){this.focus(this.focusableComponents[t]);return}}else this.focus(this.updateFocusableComponents()[0])}focus(t){typeof t=="object"&&(t.getIsAvailableToBeFocused(t.el())?t.focus():this.findSuitableDOMChild(t)&&this.findSuitableDOMChild(t).focus())}calculateDistance_(t,o,a){const i=Math.abs(t.x-o.x),s=Math.abs(t.y-o.y);let l;switch(a){case"right":case"left":l=i+s*100;break;case"up":l=s*2+i*.5;break;case"down":l=s*5+i;break;default:l=i+s}return l}searchForTrackSelect_(){const t=this;for(const o of t.updateFocusableComponents())if(o.constructor.name==="TextTrackSelect"){t.focus(o);break}}}class oX extends re{constructor(t,o,a){const i=ut({createEl:!1},o);if(super(t,i,a),!o.playerOptions.sources||o.playerOptions.sources.length===0)for(let s=0,l=o.playerOptions.techOrder;s<l.length;s++){const r=Ct(l[s]);let u=Fe.getTech(r);if(r||(u=re.getComponent(r)),u&&u.isSupported()){t.loadTech_(r);break}}else t.src(o.playerOptions.sources)}}re.registerComponent("MediaLoader",oX);class Pu extends re{constructor(t,o){super(t,o),this.options_.controlText&&this.controlText(this.options_.controlText),this.handleMouseOver_=a=>this.handleMouseOver(a),this.handleMouseOut_=a=>this.handleMouseOut(a),this.handleClick_=a=>this.handleClick(a),this.handleKeyDown_=a=>this.handleKeyDown(a),this.emitTapEvents(),this.enable()}createEl(t="div",o={},a={}){o=Object.assign({className:this.buildCSSClass(),tabIndex:0},o),t==="button"&&Ge.error(`Creating a ClickableComponent with an HTML element of ${t} is not supported; use a Button instead.`),a=Object.assign({role:"button"},a),this.tabIndex_=o.tabIndex;const i=Le(t,o,a);return this.player_.options_.experimentalSvgIcons||i.appendChild(Le("span",{className:"vjs-icon-placeholder"},{"aria-hidden":!0})),this.createControlTextEl(i),i}dispose(){this.controlTextEl_=null,super.dispose()}createControlTextEl(t){return this.controlTextEl_=Le("span",{className:"vjs-control-text"},{"aria-live":"polite"}),t&&t.appendChild(this.controlTextEl_),this.controlText(this.controlText_,t),this.controlTextEl_}controlText(t,o=this.el()){if(t===void 0)return this.controlText_||"Need Text";const a=this.localize(t);this.controlText_=t,Ea(this.controlTextEl_,a),!this.nonIconControl&&!this.player_.options_.noUITitleAttributes&&o.setAttribute("title",a)}buildCSSClass(){return`vjs-control vjs-button ${super.buildCSSClass()}`}enable(){this.enabled_||(this.enabled_=!0,this.removeClass("vjs-disabled"),this.el_.setAttribute("aria-disabled","false"),typeof this.tabIndex_<"u"&&this.el_.setAttribute("tabIndex",this.tabIndex_),this.on(["tap","click"],this.handleClick_),this.on("keydown",this.handleKeyDown_))}disable(){this.enabled_=!1,this.addClass("vjs-disabled"),this.el_.setAttribute("aria-disabled","true"),typeof this.tabIndex_<"u"&&this.el_.removeAttribute("tabIndex"),this.off("mouseover",this.handleMouseOver_),this.off("mouseout",this.handleMouseOut_),this.off(["tap","click"],this.handleClick_),this.off("keydown",this.handleKeyDown_)}handleLanguagechange(){this.controlText(this.controlText_)}handleClick(t){this.options_.clickHandler&&this.options_.clickHandler.call(this,arguments)}handleKeyDown(t){t.key===" "||t.key==="Enter"?(t.preventDefault(),t.stopPropagation(),this.trigger("click")):super.handleKeyDown(t)}}re.registerComponent("ClickableComponent",Pu);class sm extends Pu{constructor(t,o){super(t,o),this.update(),this.update_=a=>this.update(a),t.on("posterchange",this.update_)}dispose(){this.player().off("posterchange",this.update_),super.dispose()}createEl(){return Le("div",{className:"vjs-poster"})}crossOrigin(t){if(typeof t>"u")return this.$("img")?this.$("img").crossOrigin:this.player_.tech_&&this.player_.tech_.isReady_?this.player_.crossOrigin():this.player_.options_.crossOrigin||this.player_.options_.crossorigin||null;if(t!==null&&t!=="anonymous"&&t!=="use-credentials"){this.player_.log.warn(`crossOrigin must be null, "anonymous" or "use-credentials", given "${t}"`);return}this.$("img")&&(this.$("img").crossOrigin=t)}update(t){const o=this.player().poster();this.setSrc(o),o?this.show():this.hide()}setSrc(t){if(!t){this.el_.textContent="";return}this.$("img")||this.el_.appendChild(Le("picture",{className:"vjs-poster",tabIndex:-1},{},Le("img",{loading:"lazy",crossOrigin:this.crossOrigin()},{alt:""}))),this.$("img").src=t}handleClick(t){this.player_.controls()&&(this.player_.tech(!0)&&this.player_.tech(!0).focus(),this.player_.paused()?ko(this.player_.play()):this.player_.pause())}}sm.prototype.crossorigin=sm.prototype.crossOrigin;re.registerComponent("PosterImage",sm);const Jn="#222",Wf="#ccc",aX={monospace:"monospace",sansSerif:"sans-serif",serif:"serif",monospaceSansSerif:'"Andale Mono", "Lucida Console", monospace',monospaceSerif:'"Courier New", monospace',proportionalSansSerif:"sans-serif",proportionalSerif:"serif",casual:'"Comic Sans MS", Impact, fantasy',script:'"Monotype Corsiva", cursive',smallcaps:'"Andale Mono", "Lucida Console", monospace, sans-serif'};function bc(n,t){let o;if(n.length===4)o=n[1]+n[1]+n[2]+n[2]+n[3]+n[3];else if(n.length===7)o=n.slice(1);else throw new Error("Invalid color code provided, "+n+"; must be formatted as e.g. #f0e or #f604e2.");return"rgba("+parseInt(o.slice(0,2),16)+","+parseInt(o.slice(2,4),16)+","+parseInt(o.slice(4,6),16)+","+t+")"}function vo(n,t,o){try{n.style[t]=o}catch{return}}function Gf(n){return n?`${n}px`:""}class iX extends re{constructor(t,o,a){super(t,o,a);const i=l=>this.updateDisplay(l),s=l=>{this.updateDisplayOverlay(),this.updateDisplay(l)};t.on("loadstart",l=>this.toggleDisplay(l)),t.on("useractive",i),t.on("userinactive",i),t.on("texttrackchange",i),t.on("loadedmetadata",l=>{this.updateDisplayOverlay(),this.preselectTrack(l)}),t.ready(pt(this,function(){if(t.tech_&&t.tech_.featuresNativeTextTracks){this.hide();return}t.on("fullscreenchange",s),t.on("playerresize",s);const l=X.screen.orientation||X,r=X.screen.orientation?"change":"orientationchange";l.addEventListener(r,s),t.on("dispose",()=>l.removeEventListener(r,s));const u=this.options_.playerOptions.tracks||[];for(let c=0;c<u.length;c++)this.player_.addRemoteTextTrack(u[c],!0);this.preselectTrack()}))}preselectTrack(){const t={captions:1,subtitles:1},o=this.player_.textTracks(),a=this.player_.cache_.selectedLanguage;let i,s,l;for(let r=0;r<o.length;r++){const u=o[r];a&&a.enabled&&a.language&&a.language===u.language&&u.kind in t?u.kind===a.kind?l=u:l||(l=u):a&&!a.enabled?(l=null,i=null,s=null):u.default&&(u.kind==="descriptions"&&!i?i=u:u.kind in t&&!s&&(s=u))}l?l.mode="showing":s?s.mode="showing":i&&(i.mode="showing")}toggleDisplay(){this.player_.tech_&&this.player_.tech_.featuresNativeTextTracks?this.hide():this.show()}createEl(){return super.createEl("div",{className:"vjs-text-track-display"},{translate:"yes","aria-live":"off","aria-atomic":"true"})}clearDisplay(){typeof X.WebVTT=="function"&&X.WebVTT.processCues(X,[],this.el_)}updateDisplay(){const t=this.player_.textTracks(),o=this.options_.allowMultipleShowingTracks;if(this.clearDisplay(),o){const l=[];for(let r=0;r<t.length;++r){const u=t[r];u.mode==="showing"&&l.push(u)}this.updateForTrack(l);return}let a=null,i=null,s=t.length;for(;s--;){const l=t[s];l.mode==="showing"&&(l.kind==="descriptions"?a=l:i=l)}if(i?(this.getAttribute("aria-live")!=="off"&&this.setAttribute("aria-live","off"),this.updateForTrack(i)):a&&(this.getAttribute("aria-live")!=="assertive"&&this.setAttribute("aria-live","assertive"),this.updateForTrack(a)),!X.CSS.supports("inset","10px")){const l=this.el_,r=l.querySelectorAll(".vjs-text-track-cue"),u=this.player_.controlBar.el_.getBoundingClientRect().height,c=this.player_.el_.getBoundingClientRect().height;l.style="",vo(l,"position","relative"),vo(l,"height",c-u+"px"),vo(l,"top","unset"),Wr?vo(l,"bottom",c+"px"):vo(l,"bottom","0px"),r.length>0&&r.forEach(f=>{if(f.style.inset){const m=f.style.inset.split(" ");m.length===3&&Object.assign(f.style,{top:m[0],right:m[1],bottom:m[2],left:"unset"})}})}}updateDisplayOverlay(){if(!this.player_.videoHeight()||!X.CSS.supports("inset-inline: 10px"))return;const t=this.player_.currentWidth(),o=this.player_.currentHeight(),a=t/o,i=this.player_.videoWidth()/this.player_.videoHeight();let s=0,l=0;Math.abs(a-i)>.1&&(a>i?s=Math.round((t-o*i)/2):l=Math.round((o-t/i)/2)),vo(this.el_,"insetInline",Gf(s)),vo(this.el_,"insetBlock",Gf(l))}updateDisplayState(t){const o=this.player_.textTrackSettings.getValues(),a=t.activeCues;let i=a.length;for(;i--;){const s=a[i];if(!s)continue;const l=s.displayState;if(o.color&&(l.firstChild.style.color=o.color),o.textOpacity&&vo(l.firstChild,"color",bc(o.color||"#fff",o.textOpacity)),o.backgroundColor&&(l.firstChild.style.backgroundColor=o.backgroundColor),o.backgroundOpacity&&vo(l.firstChild,"backgroundColor",bc(o.backgroundColor||"#000",o.backgroundOpacity)),o.windowColor&&(o.windowOpacity?vo(l,"backgroundColor",bc(o.windowColor,o.windowOpacity)):l.style.backgroundColor=o.windowColor),o.edgeStyle&&(o.edgeStyle==="dropshadow"?l.firstChild.style.textShadow=`2px 2px 3px ${Jn}, 2px 2px 4px ${Jn}, 2px 2px 5px ${Jn}`:o.edgeStyle==="raised"?l.firstChild.style.textShadow=`1px 1px ${Jn}, 2px 2px ${Jn}, 3px 3px ${Jn}`:o.edgeStyle==="depressed"?l.firstChild.style.textShadow=`1px 1px ${Wf}, 0 1px ${Wf}, -1px -1px ${Jn}, 0 -1px ${Jn}`:o.edgeStyle==="uniform"&&(l.firstChild.style.textShadow=`0 0 4px ${Jn}, 0 0 4px ${Jn}, 0 0 4px ${Jn}, 0 0 4px ${Jn}`)),o.fontPercent&&o.fontPercent!==1){const r=X.parseFloat(l.style.fontSize);l.style.fontSize=r*o.fontPercent+"px",l.style.height="auto",l.style.top="auto"}o.fontFamily&&o.fontFamily!=="default"&&(o.fontFamily==="small-caps"?l.firstChild.style.fontVariant="small-caps":l.firstChild.style.fontFamily=aX[o.fontFamily])}}updateForTrack(t){if(Array.isArray(t)||(t=[t]),typeof X.WebVTT!="function"||t.every(a=>!a.activeCues))return;const o=[];for(let a=0;a<t.length;++a){const i=t[a];for(let s=0;s<i.activeCues.length;++s)o.push(i.activeCues[s])}X.WebVTT.processCues(X,o,this.el_);for(let a=0;a<t.length;++a){const i=t[a];for(let s=0;s<i.activeCues.length;++s){const l=i.activeCues[s].displayState;qa(l,"vjs-text-track-cue","vjs-text-track-cue-"+(i.language?i.language:a)),i.language&&Yi(l,"lang",i.language)}this.player_.textTrackSettings&&this.updateDisplayState(i)}}}re.registerComponent("TextTrackDisplay",iX);class sX extends re{createEl(){const t=this.player_.isAudio(),o=this.localize(t?"Audio Player":"Video Player"),a=Le("span",{className:"vjs-control-text",textContent:this.localize("{1} is loading.",[o])}),i=super.createEl("div",{className:"vjs-loading-spinner",dir:"ltr"});return i.appendChild(a),i}handleLanguagechange(){this.$(".vjs-control-text").textContent=this.localize("{1} is loading.",[this.player_.isAudio()?"Audio Player":"Video Player"])}}re.registerComponent("LoadingSpinner",sX);class nn extends Pu{createEl(t,o={},a={}){t="button",o=Object.assign({className:this.buildCSSClass()},o),a=Object.assign({type:"button"},a);const i=Le(t,o,a);return this.player_.options_.experimentalSvgIcons||i.appendChild(Le("span",{className:"vjs-icon-placeholder"},{"aria-hidden":!0})),this.createControlTextEl(i),i}addChild(t,o={}){const a=this.constructor.name;return Ge.warn(`Adding an actionable (user controllable) child to a Button (${a}) is not supported; use a ClickableComponent instead.`),re.prototype.addChild.call(this,t,o)}enable(){super.enable(),this.el_.removeAttribute("disabled")}disable(){super.disable(),this.el_.setAttribute("disabled","disabled")}handleKeyDown(t){if(t.key===" "||t.key==="Enter"){t.stopPropagation();return}super.handleKeyDown(t)}}re.registerComponent("Button",nn);class t1 extends nn{constructor(t,o){super(t,o),this.mouseused_=!1,this.setIcon("play"),this.on("mousedown",a=>this.handleMouseDown(a))}buildCSSClass(){return"vjs-big-play-button"}handleClick(t){const o=this.player_.play();if(t.type==="tap"||this.mouseused_&&"clientX"in t&&"clientY"in t){ko(o),this.player_.tech(!0)&&this.player_.tech(!0).focus();return}const a=this.player_.getChild("controlBar"),i=a&&a.getChild("playToggle");if(!i){this.player_.tech(!0).focus();return}const s=()=>i.focus();il(o)?o.then(s,()=>{}):this.setTimeout(s,1)}handleKeyDown(t){this.mouseused_=!1,super.handleKeyDown(t)}handleMouseDown(t){this.mouseused_=!0}}t1.prototype.controlText_="Play Video";re.registerComponent("BigPlayButton",t1);class lX extends nn{constructor(t,o){super(t,o),this.setIcon("cancel"),this.controlText(o&&o.controlText||this.localize("Close"))}buildCSSClass(){return`vjs-close-button ${super.buildCSSClass()}`}handleClick(t){this.trigger({type:"close",bubbles:!1})}handleKeyDown(t){t.key==="Escape"?(t.preventDefault(),t.stopPropagation(),this.trigger("click")):super.handleKeyDown(t)}}re.registerComponent("CloseButton",lX);class n1 extends nn{constructor(t,o={}){super(t,o),o.replay=o.replay===void 0||o.replay,this.setIcon("play"),this.on(t,"play",a=>this.handlePlay(a)),this.on(t,"pause",a=>this.handlePause(a)),o.replay&&this.on(t,"ended",a=>this.handleEnded(a))}buildCSSClass(){return`vjs-play-control ${super.buildCSSClass()}`}handleClick(t){this.player_.paused()?ko(this.player_.play()):this.player_.pause()}handleSeeked(t){this.removeClass("vjs-ended"),this.player_.paused()?this.handlePause(t):this.handlePlay(t)}handlePlay(t){this.removeClass("vjs-ended","vjs-paused"),this.addClass("vjs-playing"),this.setIcon("pause"),this.controlText("Pause")}handlePause(t){this.removeClass("vjs-playing"),this.addClass("vjs-paused"),this.setIcon("play"),this.controlText("Play")}handleEnded(t){this.removeClass("vjs-playing"),this.addClass("vjs-ended"),this.setIcon("replay"),this.controlText("Replay"),this.one(this.player_,"seeked",o=>this.handleSeeked(o))}}n1.prototype.controlText_="Play";re.registerComponent("PlayToggle",n1);class ss extends re{constructor(t,o){super(t,o),this.on(t,["timeupdate","ended","seeking"],a=>this.update(a)),this.updateTextNode_()}createEl(){const t=this.buildCSSClass(),o=super.createEl("div",{className:`${t} vjs-time-control vjs-control`}),a=Le("span",{className:"vjs-control-text",textContent:`${this.localize(this.labelText_)} `},{role:"presentation"});return o.appendChild(a),this.contentEl_=Le("span",{className:`${t}-display`},{role:"presentation"}),o.appendChild(this.contentEl_),o}dispose(){this.contentEl_=null,this.textNode_=null,super.dispose()}update(t){!this.player_.options_.enableSmoothSeeking&&t.type==="seeking"||this.updateContent(t)}updateTextNode_(t=0){t=Za(t),this.formattedTime_!==t&&(this.formattedTime_=t,this.requestNamedAnimationFrame("TimeDisplay#updateTextNode_",()=>{if(!this.contentEl_)return;let o=this.textNode_;o&&this.contentEl_.firstChild!==o&&(o=null,Ge.warn("TimeDisplay#updateTextnode_: Prevented replacement of text node element since it was no longer a child of this node. Appending a new node instead.")),this.textNode_=ge.createTextNode(this.formattedTime_),this.textNode_&&(o?this.contentEl_.replaceChild(this.textNode_,o):this.contentEl_.appendChild(this.textNode_))}))}updateContent(t){}}ss.prototype.labelText_="Time";ss.prototype.controlText_="Time";re.registerComponent("TimeDisplay",ss);class pp extends ss{buildCSSClass(){return"vjs-current-time"}updateContent(t){let o;this.player_.ended()?o=this.player_.duration():t&&t.target&&typeof t.target.pendingSeekTime=="function"?o=t.target.pendingSeekTime():o=this.player_.scrubbing()?this.player_.getCache().currentTime:this.player_.currentTime(),this.updateTextNode_(o)}}pp.prototype.labelText_="Current Time";pp.prototype.controlText_="Current Time";re.registerComponent("CurrentTimeDisplay",pp);class hp extends ss{constructor(t,o){super(t,o);const a=i=>this.updateContent(i);this.on(t,"durationchange",a),this.on(t,"loadstart",a),this.on(t,"loadedmetadata",a)}buildCSSClass(){return"vjs-duration"}updateContent(t){const o=this.player_.duration();this.updateTextNode_(o)}}hp.prototype.labelText_="Duration";hp.prototype.controlText_="Duration";re.registerComponent("DurationDisplay",hp);class rX extends re{createEl(){const t=super.createEl("div",{className:"vjs-time-control vjs-time-divider"},{"aria-hidden":!0}),o=super.createEl("div"),a=super.createEl("span",{textContent:"/"});return o.appendChild(a),t.appendChild(o),t}}re.registerComponent("TimeDivider",rX);class fp extends ss{constructor(t,o){super(t,o),this.on(t,"durationchange",a=>this.updateContent(a))}buildCSSClass(){return"vjs-remaining-time"}createEl(){const t=super.createEl();return this.options_.displayNegative!==!1&&t.insertBefore(Le("span",{},{"aria-hidden":!0},"-"),this.contentEl_),t}updateContent(t){if(typeof this.player_.duration()!="number")return;let o;this.player_.ended()?o=0:this.player_.remainingTimeDisplay?o=this.player_.remainingTimeDisplay():o=this.player_.remainingTime(),this.updateTextNode_(o)}}fp.prototype.labelText_="Remaining Time";fp.prototype.controlText_="Remaining Time";re.registerComponent("RemainingTimeDisplay",fp);class dX extends re{constructor(t,o){super(t,o),this.updateShowing(),this.on(this.player(),"durationchange",a=>this.updateShowing(a))}createEl(){const t=super.createEl("div",{className:"vjs-live-control vjs-control"});return this.contentEl_=Le("div",{className:"vjs-live-display"},{"aria-live":"off"}),this.contentEl_.appendChild(Le("span",{className:"vjs-control-text",textContent:`${this.localize("Stream Type")} `})),this.contentEl_.appendChild(ge.createTextNode(this.localize("LIVE"))),t.appendChild(this.contentEl_),t}dispose(){this.contentEl_=null,super.dispose()}updateShowing(t){this.player().duration()===1/0?this.show():this.hide()}}re.registerComponent("LiveDisplay",dX);class o1 extends nn{constructor(t,o){super(t,o),this.updateLiveEdgeStatus(),this.player_.liveTracker&&(this.updateLiveEdgeStatusHandler_=a=>this.updateLiveEdgeStatus(a),this.on(this.player_.liveTracker,"liveedgechange",this.updateLiveEdgeStatusHandler_))}createEl(){const t=super.createEl("button",{className:"vjs-seek-to-live-control vjs-control"});return this.setIcon("circle",t),this.textEl_=Le("span",{className:"vjs-seek-to-live-text",textContent:this.localize("LIVE")},{"aria-hidden":"true"}),t.appendChild(this.textEl_),t}updateLiveEdgeStatus(){!this.player_.liveTracker||this.player_.liveTracker.atLiveEdge()?(this.setAttribute("aria-disabled",!0),this.addClass("vjs-at-live-edge"),this.controlText("Seek to live, currently playing live")):(this.setAttribute("aria-disabled",!1),this.removeClass("vjs-at-live-edge"),this.controlText("Seek to live, currently behind live"))}handleClick(){this.player_.liveTracker.seekToLiveEdge()}dispose(){this.player_.liveTracker&&this.off(this.player_.liveTracker,"liveedgechange",this.updateLiveEdgeStatusHandler_),this.textEl_=null,super.dispose()}}o1.prototype.controlText_="Seek to live, currently playing live";re.registerComponent("SeekToLive",o1);function Dl(n,t,o){return n=Number(n),Math.min(o,Math.max(t,isNaN(n)?t:n))}var uX=Object.freeze({__proto__:null,clamp:Dl});class gp extends re{constructor(t,o){super(t,o),this.handleMouseDown_=a=>this.handleMouseDown(a),this.handleMouseUp_=a=>this.handleMouseUp(a),this.handleKeyDown_=a=>this.handleKeyDown(a),this.handleClick_=a=>this.handleClick(a),this.handleMouseMove_=a=>this.handleMouseMove(a),this.update_=a=>this.update(a),this.bar=this.getChild(this.options_.barName),this.vertical(!!this.options_.vertical),this.enable()}enabled(){return this.enabled_}enable(){this.enabled()||(this.on("mousedown",this.handleMouseDown_),this.on("touchstart",this.handleMouseDown_),this.on("keydown",this.handleKeyDown_),this.on("click",this.handleClick_),this.on(this.player_,"controlsvisible",this.update),this.playerEvent&&this.on(this.player_,this.playerEvent,this.update),this.removeClass("disabled"),this.setAttribute("tabindex",0),this.enabled_=!0)}disable(){if(!this.enabled())return;const t=this.bar.el_.ownerDocument;this.off("mousedown",this.handleMouseDown_),this.off("touchstart",this.handleMouseDown_),this.off("keydown",this.handleKeyDown_),this.off("click",this.handleClick_),this.off(this.player_,"controlsvisible",this.update_),this.off(t,"mousemove",this.handleMouseMove_),this.off(t,"mouseup",this.handleMouseUp_),this.off(t,"touchmove",this.handleMouseMove_),this.off(t,"touchend",this.handleMouseUp_),this.removeAttribute("tabindex"),this.addClass("disabled"),this.playerEvent&&this.off(this.player_,this.playerEvent,this.update),this.enabled_=!1}createEl(t,o={},a={}){return o.className=o.className+" vjs-slider",o=Object.assign({tabIndex:0},o),a=Object.assign({role:"slider","aria-valuenow":0,"aria-valuemin":0,"aria-valuemax":100},a),super.createEl(t,o,a)}handleMouseDown(t){const o=this.bar.el_.ownerDocument;t.type==="mousedown"&&t.preventDefault(),t.type==="touchstart"&&!$o&&t.preventDefault(),S0(),this.addClass("vjs-sliding"),this.trigger("slideractive"),this.on(o,"mousemove",this.handleMouseMove_),this.on(o,"mouseup",this.handleMouseUp_),this.on(o,"touchmove",this.handleMouseMove_),this.on(o,"touchend",this.handleMouseUp_),this.handleMouseMove(t,!0)}handleMouseMove(t){}handleMouseUp(t){const o=this.bar.el_.ownerDocument;B0(),this.removeClass("vjs-sliding"),this.trigger("sliderinactive"),this.off(o,"mousemove",this.handleMouseMove_),this.off(o,"mouseup",this.handleMouseUp_),this.off(o,"touchmove",this.handleMouseMove_),this.off(o,"touchend",this.handleMouseUp_),this.update()}update(){if(!this.el_||!this.bar)return;const t=this.getProgress();return t===this.progress_||(this.progress_=t,this.requestNamedAnimationFrame("Slider#update",()=>{const o=this.vertical()?"height":"width";this.bar.el().style[o]=(t*100).toFixed(2)+"%"})),t}getProgress(){return Number(Dl(this.getPercent(),0,1).toFixed(4))}calculateDistance(t){const o=Eu(this.el_,t);return this.vertical()?o.y:o.x}handleKeyDown(t){const o=this.options_.playerOptions.spatialNavigation,a=o&&o.enabled,i=o&&o.horizontalSeek;a?i&&t.key==="ArrowLeft"||!i&&t.key==="ArrowDown"?(t.preventDefault(),t.stopPropagation(),this.stepBack()):i&&t.key==="ArrowRight"||!i&&t.key==="ArrowUp"?(t.preventDefault(),t.stopPropagation(),this.stepForward()):(this.pendingSeekTime()&&(this.pendingSeekTime(null),this.userSeek_(this.player_.currentTime())),super.handleKeyDown(t)):t.key==="ArrowLeft"||t.key==="ArrowDown"?(t.preventDefault(),t.stopPropagation(),this.stepBack()):t.key==="ArrowUp"||t.key==="ArrowRight"?(t.preventDefault(),t.stopPropagation(),this.stepForward()):super.handleKeyDown(t)}handleClick(t){t.stopPropagation(),t.preventDefault()}vertical(t){if(t===void 0)return this.vertical_||!1;this.vertical_=!!t,this.vertical_?this.addClass("vjs-slider-vertical"):this.addClass("vjs-slider-horizontal")}}re.registerComponent("Slider",gp);const wc=(n,t)=>Dl(n/t*100,0,100).toFixed(2)+"%";class cX extends re{constructor(t,o){super(t,o),this.partEls_=[],this.on(t,"progress",a=>this.update(a))}createEl(){const t=super.createEl("div",{className:"vjs-load-progress"}),o=Le("span",{className:"vjs-control-text"}),a=Le("span",{textContent:this.localize("Loaded")}),i=ge.createTextNode(": ");return this.percentageEl_=Le("span",{className:"vjs-control-text-loaded-percentage",textContent:"0%"}),t.appendChild(o),o.appendChild(a),o.appendChild(i),o.appendChild(this.percentageEl_),t}dispose(){this.partEls_=null,this.percentageEl_=null,super.dispose()}update(t){this.requestNamedAnimationFrame("LoadProgressBar#update",()=>{const o=this.player_.liveTracker,a=this.player_.buffered(),i=o&&o.isLive()?o.seekableEnd():this.player_.duration(),s=this.player_.bufferedEnd(),l=this.partEls_,r=wc(s,i);this.percent_!==r&&(this.el_.style.width=r,Ea(this.percentageEl_,r),this.percent_=r);for(let u=0;u<a.length;u++){const c=a.start(u),f=a.end(u);let m=l[u];m||(m=this.el_.appendChild(Le()),l[u]=m),!(m.dataset.start===c&&m.dataset.end===f)&&(m.dataset.start=c,m.dataset.end=f,m.style.left=wc(c,s),m.style.width=wc(f-c,s))}for(let u=l.length;u>a.length;u--)this.el_.removeChild(l[u-1]);l.length=a.length})}}re.registerComponent("LoadProgressBar",cX);class mX extends re{constructor(t,o){super(t,o),this.update=Ao(pt(this,this.update),io)}createEl(){return super.createEl("div",{className:"vjs-time-tooltip"},{"aria-hidden":"true"})}update(t,o,a){const i=_l(this.el_),s=Ki(this.player_.el()),l=t.width*o;if(!s||!i)return;let r=t.left-s.left+l,u=t.width-l+(s.right-t.right);u||(u=t.width-l,r=l);let c=i.width/2;r<c?c+=c-r:u<c&&(c=u),c<0?c=0:c>i.width&&(c=i.width),c=Math.round(c),this.el_.style.right=`-${c}px`,this.write(a)}write(t){Ea(this.el_,t)}updateTime(t,o,a,i){this.requestNamedAnimationFrame("TimeTooltip#updateTime",()=>{let s;const l=this.player_.duration();if(this.player_.liveTracker&&this.player_.liveTracker.isLive()){const r=this.player_.liveTracker.liveWindow(),u=r-o*r;s=(u<1?"":"-")+Za(u,r)}else s=Za(a,l);this.update(t,o,s),i&&i()})}}re.registerComponent("TimeTooltip",mX);class vp extends re{constructor(t,o){super(t,o),this.setIcon("circle"),this.update=Ao(pt(this,this.update),io)}createEl(){return super.createEl("div",{className:"vjs-play-progress vjs-slider-bar"},{"aria-hidden":"true"})}update(t,o,a){const i=this.getChild("timeTooltip");if(!i)return;const s=a&&a.target&&typeof a.target.pendingSeekTime=="function"?a.target.pendingSeekTime():this.player_.scrubbing()?this.player_.getCache().currentTime:this.player_.currentTime();i.updateTime(t,o,s)}}vp.prototype.options_={children:[]};!en&&!po&&vp.prototype.options_.children.push("timeTooltip");re.registerComponent("PlayProgressBar",vp);class a1 extends re{constructor(t,o){super(t,o),this.update=Ao(pt(this,this.update),io)}createEl(){return super.createEl("div",{className:"vjs-mouse-display"})}update(t,o){const a=o*this.player_.duration();this.getChild("timeTooltip").updateTime(t,o,a,()=>{this.el_.style.left=`${t.width*o}px`})}}a1.prototype.options_={children:["timeTooltip"]};re.registerComponent("MouseTimeDisplay",a1);class $u extends gp{constructor(t,o){o=ut($u.prototype.options_,o),o.children=[...o.children];const a=t.options_.disableSeekWhileScrubbingOnMobile&&(en||po)||t.options_.disableSeekWhileScrubbingOnSTV;(!en&&!po||a)&&o.children.splice(1,0,"mouseTimeDisplay"),super(t,o),this.shouldDisableSeekWhileScrubbing_=a,this.pendingSeekTime_=null,this.setEventHandlers_()}setEventHandlers_(){this.update_=pt(this,this.update),this.update=Ao(this.update_,io),this.on(this.player_,["durationchange","timeupdate"],this.update),this.on(this.player_,["ended"],this.update_),this.player_.liveTracker&&this.on(this.player_.liveTracker,"liveedgechange",this.update),this.updateInterval=null,this.enableIntervalHandler_=t=>this.enableInterval_(t),this.disableIntervalHandler_=t=>this.disableInterval_(t),this.on(this.player_,["playing"],this.enableIntervalHandler_),this.on(this.player_,["ended","pause","waiting"],this.disableIntervalHandler_),"hidden"in ge&&"visibilityState"in ge&&this.on(ge,"visibilitychange",this.toggleVisibility_)}toggleVisibility_(t){ge.visibilityState==="hidden"?(this.cancelNamedAnimationFrame("SeekBar#update"),this.cancelNamedAnimationFrame("Slider#update"),this.disableInterval_(t)):(!this.player_.ended()&&!this.player_.paused()&&this.enableInterval_(),this.update())}enableInterval_(){this.updateInterval||(this.updateInterval=this.setInterval(this.update,io))}disableInterval_(t){this.player_.liveTracker&&this.player_.liveTracker.isLive()&&t&&t.type!=="ended"||this.updateInterval&&(this.clearInterval(this.updateInterval),this.updateInterval=null)}createEl(){return super.createEl("div",{className:"vjs-progress-holder"},{"aria-label":this.localize("Progress Bar")})}update(t){if(ge.visibilityState==="hidden")return;const o=super.update();return this.requestNamedAnimationFrame("SeekBar#update",()=>{const a=this.player_.ended()?this.player_.duration():this.getCurrentTime_(),i=this.player_.liveTracker;let s=this.player_.duration();i&&i.isLive()&&(s=this.player_.liveTracker.liveCurrentTime()),this.percent_!==o&&(this.el_.setAttribute("aria-valuenow",(o*100).toFixed(2)),this.percent_=o),(this.currentTime_!==a||this.duration_!==s)&&(this.el_.setAttribute("aria-valuetext",this.localize("progress bar timing: currentTime={1} duration={2}",[Za(a,s),Za(s,s)],"{1} of {2}")),this.currentTime_=a,this.duration_=s),this.bar&&this.bar.update(Ki(this.el()),this.getProgress(),t)}),o}userSeek_(t){this.player_.liveTracker&&this.player_.liveTracker.isLive()&&this.player_.liveTracker.nextSeekedFromUser(),this.player_.currentTime(t)}getCurrentTime_(){return this.player_.scrubbing()?this.player_.getCache().currentTime:this.player_.currentTime()}pendingSeekTime(t){if(t!==void 0)if(t!==null){const o=this.player_.duration();this.pendingSeekTime_=Math.max(0,Math.min(t,o))}else this.pendingSeekTime_=null;return this.pendingSeekTime_}getPercent(){if(this.pendingSeekTime()!==null)return this.pendingSeekTime()/this.player_.duration();const t=this.getCurrentTime_();let o;const a=this.player_.liveTracker;return a&&a.isLive()?(o=(t-a.seekableStart())/a.liveWindow(),a.atLiveEdge()&&(o=1)):o=t/this.player_.duration(),o}handleMouseDown(t){bl(t)&&(t.stopPropagation(),this.videoWasPlaying=!this.player_.paused(),this.shouldDisableSeekWhileScrubbing_||this.player_.pause(),super.handleMouseDown(t))}handleMouseMove(t,o=!1){if(!bl(t)||isNaN(this.player_.duration()))return;!o&&!this.player_.scrubbing()&&this.player_.scrubbing(!0);let a;const i=this.calculateDistance(t),s=this.player_.liveTracker;if(!s||!s.isLive())a=i*this.player_.duration(),a===this.player_.duration()&&(a=a-.1);else{if(i>=.99){s.seekToLiveEdge();return}const l=s.seekableStart(),r=s.liveCurrentTime();if(a=l+i*s.liveWindow(),a>=r&&(a=r),a<=l&&(a=l+.1),a===1/0)return}this.shouldDisableSeekWhileScrubbing_?this.pendingSeekTime(a):this.userSeek_(a),this.player_.options_.enableSmoothSeeking&&this.update()}enable(){super.enable();const t=this.getChild("mouseTimeDisplay");t&&t.show()}disable(){super.disable();const t=this.getChild("mouseTimeDisplay");t&&t.hide()}handleMouseUp(t){super.handleMouseUp(t),t&&t.stopPropagation(),this.player_.scrubbing(!1),this.pendingSeekTime()!==null&&(this.userSeek_(this.pendingSeekTime()),this.pendingSeekTime(null)),this.player_.trigger({type:"timeupdate",target:this,manuallyTriggered:!0}),this.videoWasPlaying?ko(this.player_.play()):this.update_()}handlePendingSeek_(t){this.player_.paused()||this.player_.pause();const o=this.pendingSeekTime()!==null?this.pendingSeekTime():this.player_.currentTime();this.pendingSeekTime(o+t),this.player_.trigger({type:"timeupdate",target:this,manuallyTriggered:!0})}stepForward(){this.shouldDisableSeekWhileScrubbing_?this.handlePendingSeek_(this.options().stepSeconds):this.userSeek_(this.player_.currentTime()+this.options().stepSeconds)}stepBack(){this.shouldDisableSeekWhileScrubbing_?this.handlePendingSeek_(-this.options().stepSeconds):this.userSeek_(this.player_.currentTime()-this.options().stepSeconds)}handleAction(t){this.pendingSeekTime()!==null&&(this.userSeek_(this.pendingSeekTime()),this.pendingSeekTime(null)),this.player_.paused()?this.player_.play():this.player_.pause()}handleKeyDown(t){const o=this.player_.liveTracker;if(t.key===" "||t.key==="Enter")t.preventDefault(),t.stopPropagation(),this.handleAction(t);else if(t.key==="Home")t.preventDefault(),t.stopPropagation(),this.userSeek_(0);else if(t.key==="End")t.preventDefault(),t.stopPropagation(),o&&o.isLive()?this.userSeek_(o.liveCurrentTime()):this.userSeek_(this.player_.duration());else if(/^[0-9]$/.test(t.key)){t.preventDefault(),t.stopPropagation();const a=parseInt(t.key,10)*.1;o&&o.isLive()?this.userSeek_(o.seekableStart()+o.liveWindow()*a):this.userSeek_(this.player_.duration()*a)}else t.key==="PageDown"?(t.preventDefault(),t.stopPropagation(),this.userSeek_(this.player_.currentTime()-this.options().stepSeconds*this.options().pageMultiplier)):t.key==="PageUp"?(t.preventDefault(),t.stopPropagation(),this.userSeek_(this.player_.currentTime()+this.options().stepSeconds*this.options().pageMultiplier)):super.handleKeyDown(t)}dispose(){this.disableInterval_(),this.off(this.player_,["durationchange","timeupdate"],this.update),this.off(this.player_,["ended"],this.update_),this.player_.liveTracker&&this.off(this.player_.liveTracker,"liveedgechange",this.update),this.off(this.player_,["playing"],this.enableIntervalHandler_),this.off(this.player_,["ended","pause","waiting"],this.disableIntervalHandler_),"hidden"in ge&&"visibilityState"in ge&&this.off(ge,"visibilitychange",this.toggleVisibility_),super.dispose()}}$u.prototype.options_={children:["loadProgressBar","playProgressBar"],barName:"playProgressBar",stepSeconds:5,pageMultiplier:12};re.registerComponent("SeekBar",$u);class i1 extends re{constructor(t,o){super(t,o),this.handleMouseMove=Ao(pt(this,this.handleMouseMove),io),this.throttledHandleMouseSeek=Ao(pt(this,this.handleMouseSeek),io),this.handleMouseUpHandler_=a=>this.handleMouseUp(a),this.handleMouseDownHandler_=a=>this.handleMouseDown(a),this.enable()}createEl(){return super.createEl("div",{className:"vjs-progress-control vjs-control"})}handleMouseMove(t){const o=this.getChild("seekBar");if(!o)return;const a=o.getChild("playProgressBar"),i=o.getChild("mouseTimeDisplay");if(!a&&!i)return;const s=o.el(),l=_l(s);let r=Eu(s,t).x;r=Dl(r,0,1),i&&i.update(l,r),a&&a.update(l,o.getProgress())}handleMouseSeek(t){const o=this.getChild("seekBar");o&&o.handleMouseMove(t)}enabled(){return this.enabled_}disable(){if(this.children().forEach(t=>t.disable&&t.disable()),!!this.enabled()&&(this.off(["mousedown","touchstart"],this.handleMouseDownHandler_),this.off(this.el_,["mousemove","touchmove"],this.handleMouseMove),this.removeListenersAddedOnMousedownAndTouchstart(),this.addClass("disabled"),this.enabled_=!1,this.player_.scrubbing())){const t=this.getChild("seekBar");this.player_.scrubbing(!1),t.videoWasPlaying&&ko(this.player_.play())}}enable(){this.children().forEach(t=>t.enable&&t.enable()),!this.enabled()&&(this.on(["mousedown","touchstart"],this.handleMouseDownHandler_),this.on(this.el_,["mousemove","touchmove"],this.handleMouseMove),this.removeClass("disabled"),this.enabled_=!0)}removeListenersAddedOnMousedownAndTouchstart(){const t=this.el_.ownerDocument;this.off(t,"mousemove",this.throttledHandleMouseSeek),this.off(t,"touchmove",this.throttledHandleMouseSeek),this.off(t,"mouseup",this.handleMouseUpHandler_),this.off(t,"touchend",this.handleMouseUpHandler_)}handleMouseDown(t){const o=this.el_.ownerDocument,a=this.getChild("seekBar");a&&a.handleMouseDown(t),this.on(o,"mousemove",this.throttledHandleMouseSeek),this.on(o,"touchmove",this.throttledHandleMouseSeek),this.on(o,"mouseup",this.handleMouseUpHandler_),this.on(o,"touchend",this.handleMouseUpHandler_)}handleMouseUp(t){const o=this.getChild("seekBar");o&&o.handleMouseUp(t),this.removeListenersAddedOnMousedownAndTouchstart()}}i1.prototype.options_={children:["seekBar"]};re.registerComponent("ProgressControl",i1);class s1 extends nn{constructor(t,o){super(t,o),this.setIcon("picture-in-picture-enter"),this.on(t,["enterpictureinpicture","leavepictureinpicture"],a=>this.handlePictureInPictureChange(a)),this.on(t,["disablepictureinpicturechanged","loadedmetadata"],a=>this.handlePictureInPictureEnabledChange(a)),this.on(t,["loadedmetadata","audioonlymodechange","audiopostermodechange"],()=>this.handlePictureInPictureAudioModeChange()),this.disable()}buildCSSClass(){return`vjs-picture-in-picture-control vjs-hidden ${super.buildCSSClass()}`}handlePictureInPictureAudioModeChange(){if(!(this.player_.currentType().substring(0,5)==="audio"||this.player_.audioPosterMode()||this.player_.audioOnlyMode())){this.show();return}this.player_.isInPictureInPicture()&&this.player_.exitPictureInPicture(),this.hide()}handlePictureInPictureEnabledChange(){ge.pictureInPictureEnabled&&this.player_.disablePictureInPicture()===!1||this.player_.options_.enableDocumentPictureInPicture&&"documentPictureInPicture"in X?this.enable():this.disable()}handlePictureInPictureChange(t){this.player_.isInPictureInPicture()?(this.setIcon("picture-in-picture-exit"),this.controlText("Exit Picture-in-Picture")):(this.setIcon("picture-in-picture-enter"),this.controlText("Picture-in-Picture")),this.handlePictureInPictureEnabledChange()}handleClick(t){this.player_.isInPictureInPicture()?this.player_.exitPictureInPicture():this.player_.requestPictureInPicture()}show(){typeof ge.exitPictureInPicture=="function"&&super.show()}}s1.prototype.controlText_="Picture-in-Picture";re.registerComponent("PictureInPictureToggle",s1);class l1 extends nn{constructor(t,o){super(t,o),this.setIcon("fullscreen-enter"),this.on(t,"fullscreenchange",a=>this.handleFullscreenChange(a)),ge[t.fsApi_.fullscreenEnabled]===!1&&this.disable()}buildCSSClass(){return`vjs-fullscreen-control ${super.buildCSSClass()}`}handleFullscreenChange(t){this.player_.isFullscreen()?(this.controlText("Exit Fullscreen"),this.setIcon("fullscreen-exit")):(this.controlText("Fullscreen"),this.setIcon("fullscreen-enter"))}handleClick(t){this.player_.isFullscreen()?this.player_.exitFullscreen():this.player_.requestFullscreen()}}l1.prototype.controlText_="Fullscreen";re.registerComponent("FullscreenToggle",l1);const pX=function(n,t){t.tech_&&!t.tech_.featuresVolumeControl&&n.addClass("vjs-hidden"),n.on(t,"loadstart",function(){t.tech_.featuresVolumeControl?n.removeClass("vjs-hidden"):n.addClass("vjs-hidden")})};class hX extends re{createEl(){const t=super.createEl("div",{className:"vjs-volume-level"});return this.setIcon("circle",t),t.appendChild(super.createEl("span",{className:"vjs-control-text"})),t}}re.registerComponent("VolumeLevel",hX);class fX extends re{constructor(t,o){super(t,o),this.update=Ao(pt(this,this.update),io)}createEl(){return super.createEl("div",{className:"vjs-volume-tooltip"},{"aria-hidden":"true"})}update(t,o,a,i){if(!a){const s=Ki(this.el_),l=Ki(this.player_.el()),r=t.width*o;if(!l||!s)return;const u=t.left-l.left+r,c=t.width-r+(l.right-t.right);let f=s.width/2;u<f?f+=f-u:c<f&&(f=c),f<0?f=0:f>s.width&&(f=s.width),this.el_.style.right=`-${f}px`}this.write(`${i}%`)}write(t){Ea(this.el_,t)}updateVolume(t,o,a,i,s){this.requestNamedAnimationFrame("VolumeLevelTooltip#updateVolume",()=>{this.update(t,o,a,i.toFixed(0)),s&&s()})}}re.registerComponent("VolumeLevelTooltip",fX);class r1 extends re{constructor(t,o){super(t,o),this.update=Ao(pt(this,this.update),io)}createEl(){return super.createEl("div",{className:"vjs-mouse-display"})}update(t,o,a){const i=100*o;this.getChild("volumeLevelTooltip").updateVolume(t,o,a,i,()=>{a?this.el_.style.bottom=`${t.height*o}px`:this.el_.style.left=`${t.width*o}px`})}}r1.prototype.options_={children:["volumeLevelTooltip"]};re.registerComponent("MouseVolumeLevelDisplay",r1);class Au extends gp{constructor(t,o){super(t,o),this.on("slideractive",a=>this.updateLastVolume_(a)),this.on(t,"volumechange",a=>this.updateARIAAttributes(a)),t.ready(()=>this.updateARIAAttributes())}createEl(){return super.createEl("div",{className:"vjs-volume-bar vjs-slider-bar"},{"aria-label":this.localize("Volume Level"),"aria-live":"polite"})}handleMouseDown(t){bl(t)&&super.handleMouseDown(t)}handleMouseMove(t){const o=this.getChild("mouseVolumeLevelDisplay");if(o){const a=this.el(),i=Ki(a),s=this.vertical();let l=Eu(a,t);l=s?l.y:l.x,l=Dl(l,0,1),o.update(i,l,s)}bl(t)&&(this.checkMuted(),this.player_.volume(this.calculateDistance(t)))}checkMuted(){this.player_.muted()&&this.player_.muted(!1)}getPercent(){return this.player_.muted()?0:this.player_.volume()}stepForward(){this.checkMuted(),this.player_.volume(this.player_.volume()+.1)}stepBack(){this.checkMuted(),this.player_.volume(this.player_.volume()-.1)}updateARIAAttributes(t){const o=this.player_.muted()?0:this.volumeAsPercentage_();this.el_.setAttribute("aria-valuenow",o),this.el_.setAttribute("aria-valuetext",o+"%")}volumeAsPercentage_(){return Math.round(this.player_.volume()*100)}updateLastVolume_(){const t=this.player_.volume();this.one("sliderinactive",()=>{this.player_.volume()===0&&this.player_.lastVolume_(t)})}}Au.prototype.options_={children:["volumeLevel"],barName:"volumeLevel"};!en&&!po&&Au.prototype.options_.children.splice(0,0,"mouseVolumeLevelDisplay");Au.prototype.playerEvent="volumechange";re.registerComponent("VolumeBar",Au);class d1 extends re{constructor(t,o={}){o.vertical=o.vertical||!1,(typeof o.volumeBar>"u"||Xi(o.volumeBar))&&(o.volumeBar=o.volumeBar||{},o.volumeBar.vertical=o.vertical),super(t,o),pX(this,t),this.throttledHandleMouseMove=Ao(pt(this,this.handleMouseMove),io),this.handleMouseUpHandler_=a=>this.handleMouseUp(a),this.on("mousedown",a=>this.handleMouseDown(a)),this.on("touchstart",a=>this.handleMouseDown(a)),this.on("mousemove",a=>this.handleMouseMove(a)),this.on(this.volumeBar,["focus","slideractive"],()=>{this.volumeBar.addClass("vjs-slider-active"),this.addClass("vjs-slider-active"),this.trigger("slideractive")}),this.on(this.volumeBar,["blur","sliderinactive"],()=>{this.volumeBar.removeClass("vjs-slider-active"),this.removeClass("vjs-slider-active"),this.trigger("sliderinactive")})}createEl(){let t="vjs-volume-horizontal";return this.options_.vertical&&(t="vjs-volume-vertical"),super.createEl("div",{className:`vjs-volume-control vjs-control ${t}`})}handleMouseDown(t){const o=this.el_.ownerDocument;this.on(o,"mousemove",this.throttledHandleMouseMove),this.on(o,"touchmove",this.throttledHandleMouseMove),this.on(o,"mouseup",this.handleMouseUpHandler_),this.on(o,"touchend",this.handleMouseUpHandler_)}handleMouseUp(t){const o=this.el_.ownerDocument;this.off(o,"mousemove",this.throttledHandleMouseMove),this.off(o,"touchmove",this.throttledHandleMouseMove),this.off(o,"mouseup",this.handleMouseUpHandler_),this.off(o,"touchend",this.handleMouseUpHandler_)}handleMouseMove(t){this.volumeBar.handleMouseMove(t)}}d1.prototype.options_={children:["volumeBar"]};re.registerComponent("VolumeControl",d1);const gX=function(n,t){t.tech_&&!t.tech_.featuresMuteControl&&n.addClass("vjs-hidden"),n.on(t,"loadstart",function(){t.tech_.featuresMuteControl?n.removeClass("vjs-hidden"):n.addClass("vjs-hidden")})};class u1 extends nn{constructor(t,o){super(t,o),gX(this,t),this.on(t,["loadstart","volumechange"],a=>this.update(a))}buildCSSClass(){return`vjs-mute-control ${super.buildCSSClass()}`}handleClick(t){const o=this.player_.volume(),a=this.player_.lastVolume_();if(o===0){const i=a<.1?.1:a;this.player_.volume(i),this.player_.muted(!1)}else this.player_.muted(!this.player_.muted())}update(t){this.updateIcon_(),this.updateControlText_()}updateIcon_(){const t=this.player_.volume();let o=3;this.setIcon("volume-high"),en&&this.player_.tech_&&this.player_.tech_.el_&&this.player_.muted(this.player_.tech_.el_.muted),t===0||this.player_.muted()?(this.setIcon("volume-mute"),o=0):t<.33?(this.setIcon("volume-low"),o=1):t<.67&&(this.setIcon("volume-medium"),o=2),Cu(this.el_,[0,1,2,3].reduce((a,i)=>a+`${i?" ":""}vjs-vol-${i}`,"")),qa(this.el_,`vjs-vol-${o}`)}updateControlText_(){const o=this.player_.muted()||this.player_.volume()===0?"Unmute":"Mute";this.controlText()!==o&&this.controlText(o)}}u1.prototype.controlText_="Mute";re.registerComponent("MuteToggle",u1);class c1 extends re{constructor(t,o={}){typeof o.inline<"u"?o.inline=o.inline:o.inline=!0,(typeof o.volumeControl>"u"||Xi(o.volumeControl))&&(o.volumeControl=o.volumeControl||{},o.volumeControl.vertical=!o.inline),super(t,o),this.handleKeyPressHandler_=a=>this.handleKeyPress(a),this.on(t,["loadstart"],a=>this.volumePanelState_(a)),this.on(this.muteToggle,"keyup",a=>this.handleKeyPress(a)),this.on(this.volumeControl,"keyup",a=>this.handleVolumeControlKeyUp(a)),this.on("keydown",a=>this.handleKeyPress(a)),this.on("mouseover",a=>this.handleMouseOver(a)),this.on("mouseout",a=>this.handleMouseOut(a)),this.on(this.volumeControl,["slideractive"],this.sliderActive_),this.on(this.volumeControl,["sliderinactive"],this.sliderInactive_)}sliderActive_(){this.addClass("vjs-slider-active")}sliderInactive_(){this.removeClass("vjs-slider-active")}volumePanelState_(){this.volumeControl.hasClass("vjs-hidden")&&this.muteToggle.hasClass("vjs-hidden")&&this.addClass("vjs-hidden"),this.volumeControl.hasClass("vjs-hidden")&&!this.muteToggle.hasClass("vjs-hidden")&&this.addClass("vjs-mute-toggle-only")}createEl(){let t="vjs-volume-panel-horizontal";return this.options_.inline||(t="vjs-volume-panel-vertical"),super.createEl("div",{className:`vjs-volume-panel vjs-control ${t}`})}dispose(){this.handleMouseOut(),super.dispose()}handleVolumeControlKeyUp(t){t.key==="Escape"&&this.muteToggle.focus()}handleMouseOver(t){this.addClass("vjs-hover"),qn(ge,"keyup",this.handleKeyPressHandler_)}handleMouseOut(t){this.removeClass("vjs-hover"),tn(ge,"keyup",this.handleKeyPressHandler_)}handleKeyPress(t){t.key==="Escape"&&this.handleMouseOut()}}c1.prototype.options_={children:["muteToggle","volumeControl"]};re.registerComponent("VolumePanel",c1);class m1 extends nn{constructor(t,o){super(t,o),this.validOptions=[5,10,30],this.skipTime=this.getSkipForwardTime(),this.skipTime&&this.validOptions.includes(this.skipTime)?(this.setIcon(`forward-${this.skipTime}`),this.controlText(this.localize("Skip forward {1} seconds",[this.skipTime.toLocaleString(t.language())])),this.show()):this.hide()}getSkipForwardTime(){const t=this.options_.playerOptions;return t.controlBar&&t.controlBar.skipButtons&&t.controlBar.skipButtons.forward}buildCSSClass(){return`vjs-skip-forward-${this.getSkipForwardTime()} ${super.buildCSSClass()}`}handleClick(t){if(isNaN(this.player_.duration()))return;const o=this.player_.currentTime(),a=this.player_.liveTracker,i=a&&a.isLive()?a.seekableEnd():this.player_.duration();let s;o+this.skipTime<=i?s=o+this.skipTime:s=i,this.player_.currentTime(s)}handleLanguagechange(){this.controlText(this.localize("Skip forward {1} seconds",[this.skipTime]))}}m1.prototype.controlText_="Skip Forward";re.registerComponent("SkipForward",m1);class p1 extends nn{constructor(t,o){super(t,o),this.validOptions=[5,10,30],this.skipTime=this.getSkipBackwardTime(),this.skipTime&&this.validOptions.includes(this.skipTime)?(this.setIcon(`replay-${this.skipTime}`),this.controlText(this.localize("Skip backward {1} seconds",[this.skipTime.toLocaleString(t.language())])),this.show()):this.hide()}getSkipBackwardTime(){const t=this.options_.playerOptions;return t.controlBar&&t.controlBar.skipButtons&&t.controlBar.skipButtons.backward}buildCSSClass(){return`vjs-skip-backward-${this.getSkipBackwardTime()} ${super.buildCSSClass()}`}handleClick(t){const o=this.player_.currentTime(),a=this.player_.liveTracker,i=a&&a.isLive()&&a.seekableStart();let s;i&&o-this.skipTime<=i?s=i:o>=this.skipTime?s=o-this.skipTime:s=0,this.player_.currentTime(s)}handleLanguagechange(){this.controlText(this.localize("Skip backward {1} seconds",[this.skipTime]))}}p1.prototype.controlText_="Skip Backward";re.registerComponent("SkipBackward",p1);class h1 extends re{constructor(t,o){super(t,o),o&&(this.menuButton_=o.menuButton),this.focusedChild_=-1,this.on("keydown",a=>this.handleKeyDown(a)),this.boundHandleBlur_=a=>this.handleBlur(a),this.boundHandleTapClick_=a=>this.handleTapClick(a)}addEventListenerForItem(t){t instanceof re&&(this.on(t,"blur",this.boundHandleBlur_),this.on(t,["tap","click"],this.boundHandleTapClick_))}removeEventListenerForItem(t){t instanceof re&&(this.off(t,"blur",this.boundHandleBlur_),this.off(t,["tap","click"],this.boundHandleTapClick_))}removeChild(t){typeof t=="string"&&(t=this.getChild(t)),this.removeEventListenerForItem(t),super.removeChild(t)}addItem(t){const o=this.addChild(t);o&&this.addEventListenerForItem(o)}createEl(){const t=this.options_.contentElType||"ul";this.contentEl_=Le(t,{className:"vjs-menu-content"}),this.contentEl_.setAttribute("role","menu");const o=super.createEl("div",{append:this.contentEl_,className:"vjs-menu"});return o.appendChild(this.contentEl_),qn(o,"click",function(a){a.preventDefault(),a.stopImmediatePropagation()}),o}dispose(){this.contentEl_=null,this.boundHandleBlur_=null,this.boundHandleTapClick_=null,super.dispose()}handleBlur(t){const o=t.relatedTarget||ge.activeElement;if(!this.children().some(a=>a.el()===o)){const a=this.menuButton_;a&&a.buttonPressed_&&o!==a.el().firstChild&&a.unpressButton()}}handleTapClick(t){if(this.menuButton_){this.menuButton_.unpressButton();const o=this.children();if(!Array.isArray(o))return;const a=o.filter(i=>i.el()===t.target)[0];if(!a)return;a.name()!=="CaptionSettingsMenuItem"&&this.menuButton_.focus()}}handleKeyDown(t){t.key==="ArrowLeft"||t.key==="ArrowDown"?(t.preventDefault(),t.stopPropagation(),this.stepForward()):(t.key==="ArrowRight"||t.key==="ArrowUp")&&(t.preventDefault(),t.stopPropagation(),this.stepBack())}stepForward(){let t=0;this.focusedChild_!==void 0&&(t=this.focusedChild_+1),this.focus(t)}stepBack(){let t=0;this.focusedChild_!==void 0&&(t=this.focusedChild_-1),this.focus(t)}focus(t=0){const o=this.children().slice();o.length&&o[0].hasClass("vjs-menu-title")&&o.shift(),o.length>0&&(t<0?t=0:t>=o.length&&(t=o.length-1),this.focusedChild_=t,o[t].el_.focus())}}re.registerComponent("Menu",h1);class yp extends re{constructor(t,o={}){super(t,o),this.menuButton_=new nn(t,o),this.menuButton_.controlText(this.controlText_),this.menuButton_.el_.setAttribute("aria-haspopup","true");const a=nn.prototype.buildCSSClass();this.menuButton_.el_.className=this.buildCSSClass()+" "+a,this.menuButton_.removeClass("vjs-control"),this.addChild(this.menuButton_),this.update(),this.enabled_=!0;const i=s=>this.handleClick(s);this.handleMenuKeyUp_=s=>this.handleMenuKeyUp(s),this.on(this.menuButton_,"tap",i),this.on(this.menuButton_,"click",i),this.on(this.menuButton_,"keydown",s=>this.handleKeyDown(s)),this.on(this.menuButton_,"mouseenter",()=>{this.addClass("vjs-hover"),this.menu.show(),qn(ge,"keyup",this.handleMenuKeyUp_)}),this.on("mouseleave",s=>this.handleMouseLeave(s)),this.on("keydown",s=>this.handleSubmenuKeyDown(s))}update(){const t=this.createMenu();this.menu&&(this.menu.dispose(),this.removeChild(this.menu)),this.menu=t,this.addChild(t),this.buttonPressed_=!1,this.menuButton_.el_.setAttribute("aria-expanded","false"),this.items&&this.items.length<=this.hideThreshold_?(this.hide(),this.menu.contentEl_.removeAttribute("role")):(this.show(),this.menu.contentEl_.setAttribute("role","menu"))}createMenu(){const t=new h1(this.player_,{menuButton:this});if(this.hideThreshold_=0,this.options_.title){const o=Le("li",{className:"vjs-menu-title",textContent:Ct(this.options_.title),tabIndex:-1}),a=new re(this.player_,{el:o});t.addItem(a)}if(this.items=this.createItems(),this.items)for(let o=0;o<this.items.length;o++)t.addItem(this.items[o]);return t}createItems(){}createEl(){return super.createEl("div",{className:this.buildWrapperCSSClass()},{})}setIcon(t){super.setIcon(t,this.menuButton_.el_)}buildWrapperCSSClass(){let t="vjs-menu-button";this.options_.inline===!0?t+="-inline":t+="-popup";const o=nn.prototype.buildCSSClass();return`vjs-menu-button ${t} ${o} ${super.buildCSSClass()}`}buildCSSClass(){let t="vjs-menu-button";return this.options_.inline===!0?t+="-inline":t+="-popup",`vjs-menu-button ${t} ${super.buildCSSClass()}`}controlText(t,o=this.menuButton_.el()){return this.menuButton_.controlText(t,o)}dispose(){this.handleMouseLeave(),super.dispose()}handleClick(t){this.buttonPressed_?this.unpressButton():this.pressButton()}handleMouseLeave(t){this.removeClass("vjs-hover"),tn(ge,"keyup",this.handleMenuKeyUp_)}focus(){this.menuButton_.focus()}blur(){this.menuButton_.blur()}handleKeyDown(t){t.key==="Escape"||t.key==="Tab"?(this.buttonPressed_&&this.unpressButton(),!t.key==="Tab"&&(t.preventDefault(),this.menuButton_.focus())):(t.key==="Up"||t.key==="Down"&&!(this.player_.options_.playerOptions.spatialNavigation&&this.player_.options_.playerOptions.spatialNavigation.enabled))&&(this.buttonPressed_||(t.preventDefault(),this.pressButton()))}handleMenuKeyUp(t){(t.key==="Escape"||t.key==="Tab")&&this.removeClass("vjs-hover")}handleSubmenuKeyPress(t){this.handleSubmenuKeyDown(t)}handleSubmenuKeyDown(t){(t.key==="Escape"||t.key==="Tab")&&(this.buttonPressed_&&this.unpressButton(),!t.key==="Tab"&&(t.preventDefault(),this.menuButton_.focus()))}pressButton(){if(this.enabled_){if(this.buttonPressed_=!0,this.menu.show(),this.menu.lockShowing(),this.menuButton_.el_.setAttribute("aria-expanded","true"),en&&C0())return;this.menu.focus()}}unpressButton(){this.enabled_&&(this.buttonPressed_=!1,this.menu.unlockShowing(),this.menu.hide(),this.menuButton_.el_.setAttribute("aria-expanded","false"))}disable(){this.unpressButton(),this.enabled_=!1,this.addClass("vjs-disabled"),this.menuButton_.disable()}enable(){this.enabled_=!0,this.removeClass("vjs-disabled"),this.menuButton_.enable()}}re.registerComponent("MenuButton",yp);class _p extends yp{constructor(t,o){const a=o.tracks;if(super(t,o),this.items.length<=1&&this.hide(),!a)return;const i=pt(this,this.update);a.addEventListener("removetrack",i),a.addEventListener("addtrack",i),a.addEventListener("labelchange",i),this.player_.on("ready",i),this.player_.on("dispose",function(){a.removeEventListener("removetrack",i),a.removeEventListener("addtrack",i),a.removeEventListener("labelchange",i)})}}re.registerComponent("TrackButton",_p);class Pl extends Pu{constructor(t,o){super(t,o),this.selectable=o.selectable,this.isSelected_=o.selected||!1,this.multiSelectable=o.multiSelectable,this.selected(this.isSelected_),this.selectable?this.multiSelectable?this.el_.setAttribute("role","menuitemcheckbox"):this.el_.setAttribute("role","menuitemradio"):this.el_.setAttribute("role","menuitem")}createEl(t,o,a){this.nonIconControl=!0;const i=super.createEl("li",Object.assign({className:"vjs-menu-item",tabIndex:-1},o),a),s=Le("span",{className:"vjs-menu-item-text",textContent:this.localize(this.options_.label)});return this.player_.options_.experimentalSvgIcons?i.appendChild(s):i.replaceChild(s,i.querySelector(".vjs-icon-placeholder")),i}handleKeyDown(t){["Tab","Escape","ArrowUp","ArrowLeft","ArrowRight","ArrowDown"].includes(t.key)||super.handleKeyDown(t)}handleClick(t){this.selected(!0)}selected(t){this.selectable&&(t?(this.addClass("vjs-selected"),this.el_.setAttribute("aria-checked","true"),this.controlText(", selected"),this.isSelected_=!0):(this.removeClass("vjs-selected"),this.el_.setAttribute("aria-checked","false"),this.controlText(""),this.isSelected_=!1))}}re.registerComponent("MenuItem",Pl);class $l extends Pl{constructor(t,o){const a=o.track,i=t.textTracks();o.label=a.label||a.language||"Unknown",o.selected=a.mode==="showing",super(t,o),this.track=a,this.kinds=(o.kinds||[o.kind||this.track.kind]).filter(Boolean);const s=(...r)=>{this.handleTracksChange.apply(this,r)},l=(...r)=>{this.handleSelectedLanguageChange.apply(this,r)};if(t.on(["loadstart","texttrackchange"],s),i.addEventListener("change",s),i.addEventListener("selectedlanguagechange",l),this.on("dispose",function(){t.off(["loadstart","texttrackchange"],s),i.removeEventListener("change",s),i.removeEventListener("selectedlanguagechange",l)}),i.onchange===void 0){let r;this.on(["tap","click"],function(){if(typeof X.Event!="object")try{r=new X.Event("change")}catch{}r||(r=ge.createEvent("Event"),r.initEvent("change",!0,!0)),i.dispatchEvent(r)})}this.handleTracksChange()}handleClick(t){const o=this.track,a=this.player_.textTracks();if(super.handleClick(t),!!a)for(let i=0;i<a.length;i++){const s=a[i];this.kinds.indexOf(s.kind)!==-1&&(s===o?s.mode!=="showing"&&(s.mode="showing"):s.mode!=="disabled"&&(s.mode="disabled"))}}handleTracksChange(t){const o=this.track.mode==="showing";o!==this.isSelected_&&this.selected(o)}handleSelectedLanguageChange(t){if(this.track.mode==="showing"){const o=this.player_.cache_.selectedLanguage;if(o&&o.enabled&&o.language===this.track.language&&o.kind!==this.track.kind)return;this.player_.cache_.selectedLanguage={enabled:!0,language:this.track.language,kind:this.track.kind}}}dispose(){this.track=null,super.dispose()}}re.registerComponent("TextTrackMenuItem",$l);class f1 extends $l{constructor(t,o){o.track={player:t,kind:o.kind,kinds:o.kinds,default:!1,mode:"disabled"},o.kinds||(o.kinds=[o.kind]),o.label?o.track.label=o.label:o.track.label=o.kinds.join(" and ")+" off",o.selectable=!0,o.multiSelectable=!1,super(t,o)}handleTracksChange(t){const o=this.player().textTracks();let a=!0;for(let i=0,s=o.length;i<s;i++){const l=o[i];if(this.options_.kinds.indexOf(l.kind)>-1&&l.mode==="showing"){a=!1;break}}a!==this.isSelected_&&this.selected(a)}handleSelectedLanguageChange(t){const o=this.player().textTracks();let a=!0;for(let i=0,s=o.length;i<s;i++){const l=o[i];if(["captions","descriptions","subtitles"].indexOf(l.kind)>-1&&l.mode==="showing"){a=!1;break}}a&&(this.player_.cache_.selectedLanguage={enabled:!1})}handleLanguagechange(){this.$(".vjs-menu-item-text").textContent=this.player_.localize(this.options_.label),super.handleLanguagechange()}}re.registerComponent("OffTextTrackMenuItem",f1);class ls extends _p{constructor(t,o={}){o.tracks=t.textTracks(),super(t,o)}createItems(t=[],o=$l){let a;this.label_&&(a=`${this.label_} off`),t.push(new f1(this.player_,{kinds:this.kinds_,kind:this.kind_,label:a})),this.hideThreshold_+=1;const i=this.player_.textTracks();Array.isArray(this.kinds_)||(this.kinds_=[this.kind_]);for(let s=0;s<i.length;s++){const l=i[s];if(this.kinds_.indexOf(l.kind)>-1){const r=new o(this.player_,{track:l,kinds:this.kinds_,kind:this.kind_,selectable:!0,multiSelectable:!1});r.addClass(`vjs-${l.kind}-menu-item`),t.push(r)}}return t}}re.registerComponent("TextTrackButton",ls);class g1 extends Pl{constructor(t,o){const a=o.track,i=o.cue,s=t.currentTime();o.selectable=!0,o.multiSelectable=!1,o.label=i.text,o.selected=i.startTime<=s&&s<i.endTime,super(t,o),this.track=a,this.cue=i}handleClick(t){super.handleClick(),this.player_.currentTime(this.cue.startTime)}}re.registerComponent("ChaptersTrackMenuItem",g1);class bp extends ls{constructor(t,o,a){super(t,o,a),this.setIcon("chapters"),this.selectCurrentItem_=()=>{this.items.forEach(i=>{i.selected(this.track_.activeCues[0]===i.cue)})}}buildCSSClass(){return`vjs-chapters-button ${super.buildCSSClass()}`}buildWrapperCSSClass(){return`vjs-chapters-button ${super.buildWrapperCSSClass()}`}update(t){if(t&&t.track&&t.track.kind!=="chapters")return;const o=this.findChaptersTrack();o!==this.track_?(this.setTrack(o),super.update()):(!this.items||o&&o.cues&&o.cues.length!==this.items.length)&&super.update()}setTrack(t){if(this.track_!==t){if(this.updateHandler_||(this.updateHandler_=this.update.bind(this)),this.track_){const o=this.player_.remoteTextTrackEls().getTrackElementByTrack_(this.track_);o&&o.removeEventListener("load",this.updateHandler_),this.track_.removeEventListener("cuechange",this.selectCurrentItem_),this.track_=null}if(this.track_=t,this.track_){this.track_.mode="hidden";const o=this.player_.remoteTextTrackEls().getTrackElementByTrack_(this.track_);o&&o.addEventListener("load",this.updateHandler_),this.track_.addEventListener("cuechange",this.selectCurrentItem_)}}}findChaptersTrack(){const t=this.player_.textTracks()||[];for(let o=t.length-1;o>=0;o--){const a=t[o];if(a.kind===this.kind_)return a}}getMenuCaption(){return this.track_&&this.track_.label?this.track_.label:this.localize(Ct(this.kind_))}createMenu(){return this.options_.title=this.getMenuCaption(),super.createMenu()}createItems(){const t=[];if(!this.track_)return t;const o=this.track_.cues;if(!o)return t;for(let a=0,i=o.length;a<i;a++){const s=o[a],l=new g1(this.player_,{track:this.track_,cue:s});t.push(l)}return t}}bp.prototype.kind_="chapters";bp.prototype.controlText_="Chapters";re.registerComponent("ChaptersButton",bp);class wp extends ls{constructor(t,o,a){super(t,o,a),this.setIcon("audio-description");const i=t.textTracks(),s=pt(this,this.handleTracksChange);i.addEventListener("change",s),this.on("dispose",function(){i.removeEventListener("change",s)})}handleTracksChange(t){const o=this.player().textTracks();let a=!1;for(let i=0,s=o.length;i<s;i++){const l=o[i];if(l.kind!==this.kind_&&l.mode==="showing"){a=!0;break}}a?this.disable():this.enable()}buildCSSClass(){return`vjs-descriptions-button ${super.buildCSSClass()}`}buildWrapperCSSClass(){return`vjs-descriptions-button ${super.buildWrapperCSSClass()}`}}wp.prototype.kind_="descriptions";wp.prototype.controlText_="Descriptions";re.registerComponent("DescriptionsButton",wp);class xp extends ls{constructor(t,o,a){super(t,o,a),this.setIcon("subtitles")}buildCSSClass(){return`vjs-subtitles-button ${super.buildCSSClass()}`}buildWrapperCSSClass(){return`vjs-subtitles-button ${super.buildWrapperCSSClass()}`}}xp.prototype.kind_="subtitles";xp.prototype.controlText_="Subtitles";re.registerComponent("SubtitlesButton",xp);class Vp extends $l{constructor(t,o){o.track={player:t,kind:o.kind,label:o.kind+" settings",selectable:!1,default:!1,mode:"disabled"},o.selectable=!1,o.name="CaptionSettingsMenuItem",super(t,o),this.addClass("vjs-texttrack-settings"),this.controlText(", opens "+o.kind+" settings dialog")}handleClick(t){this.player().getChild("textTrackSettings").open()}handleLanguagechange(){this.$(".vjs-menu-item-text").textContent=this.player_.localize(this.options_.kind+" settings"),super.handleLanguagechange()}}re.registerComponent("CaptionSettingsMenuItem",Vp);class Cp extends ls{constructor(t,o,a){super(t,o,a),this.setIcon("captions")}buildCSSClass(){return`vjs-captions-button ${super.buildCSSClass()}`}buildWrapperCSSClass(){return`vjs-captions-button ${super.buildWrapperCSSClass()}`}createItems(){const t=[];return!(this.player().tech_&&this.player().tech_.featuresNativeTextTracks)&&this.player().getChild("textTrackSettings")&&(t.push(new Vp(this.player_,{kind:this.kind_})),this.hideThreshold_+=1),super.createItems(t)}}Cp.prototype.kind_="captions";Cp.prototype.controlText_="Captions";re.registerComponent("CaptionsButton",Cp);class v1 extends $l{createEl(t,o,a){const i=super.createEl(t,o,a),s=i.querySelector(".vjs-menu-item-text");return this.options_.track.kind==="captions"&&(this.player_.options_.experimentalSvgIcons?this.setIcon("captions",i):s.appendChild(Le("span",{className:"vjs-icon-placeholder"},{"aria-hidden":!0})),s.appendChild(Le("span",{className:"vjs-control-text",textContent:` ${this.localize("Captions")}`}))),i}}re.registerComponent("SubsCapsMenuItem",v1);class kp extends ls{constructor(t,o={}){super(t,o),this.label_="subtitles",this.setIcon("subtitles"),["en","en-us","en-ca","fr-ca"].indexOf(this.player_.language_)>-1&&(this.label_="captions",this.setIcon("captions")),this.menuButton_.controlText(Ct(this.label_))}buildCSSClass(){return`vjs-subs-caps-button ${super.buildCSSClass()}`}buildWrapperCSSClass(){return`vjs-subs-caps-button ${super.buildWrapperCSSClass()}`}createItems(){let t=[];return!(this.player().tech_&&this.player().tech_.featuresNativeTextTracks)&&this.player().getChild("textTrackSettings")&&(t.push(new Vp(this.player_,{kind:this.label_})),this.hideThreshold_+=1),t=super.createItems(t,v1),t}}kp.prototype.kinds_=["captions","subtitles"];kp.prototype.controlText_="Subtitles";re.registerComponent("SubsCapsButton",kp);class y1 extends Pl{constructor(t,o){const a=o.track,i=t.audioTracks();o.label=a.label||a.language||"Unknown",o.selected=a.enabled,super(t,o),this.track=a,this.addClass(`vjs-${a.kind}-menu-item`);const s=(...l)=>{this.handleTracksChange.apply(this,l)};i.addEventListener("change",s),this.on("dispose",()=>{i.removeEventListener("change",s)})}createEl(t,o,a){const i=super.createEl(t,o,a),s=i.querySelector(".vjs-menu-item-text");return["main-desc","descriptions"].indexOf(this.options_.track.kind)>=0&&(s.appendChild(Le("span",{className:"vjs-icon-placeholder"},{"aria-hidden":!0})),s.appendChild(Le("span",{className:"vjs-control-text",textContent:" "+this.localize("Descriptions")}))),i}handleClick(t){if(super.handleClick(t),this.track.enabled=!0,this.player_.tech_.featuresNativeAudioTracks){const o=this.player_.audioTracks();for(let a=0;a<o.length;a++){const i=o[a];i!==this.track&&(i.enabled=i===this.track)}}}handleTracksChange(t){this.selected(this.track.enabled)}}re.registerComponent("AudioTrackMenuItem",y1);class _1 extends _p{constructor(t,o={}){o.tracks=t.audioTracks(),super(t,o),this.setIcon("audio")}buildCSSClass(){return`vjs-audio-button ${super.buildCSSClass()}`}buildWrapperCSSClass(){return`vjs-audio-button ${super.buildWrapperCSSClass()}`}createItems(t=[]){this.hideThreshold_=1;const o=this.player_.audioTracks();for(let a=0;a<o.length;a++){const i=o[a];t.push(new y1(this.player_,{track:i,selectable:!0,multiSelectable:!1}))}return t}}_1.prototype.controlText_="Audio Track";re.registerComponent("AudioTrackButton",_1);class Ep extends Pl{constructor(t,o){const a=o.rate,i=parseFloat(a,10);o.label=a,o.selected=i===t.playbackRate(),o.selectable=!0,o.multiSelectable=!1,super(t,o),this.label=a,this.rate=i,this.on(t,"ratechange",s=>this.update(s))}handleClick(t){super.handleClick(),this.player().playbackRate(this.rate)}update(t){this.selected(this.player().playbackRate()===this.rate)}}Ep.prototype.contentElType="button";re.registerComponent("PlaybackRateMenuItem",Ep);class b1 extends yp{constructor(t,o){super(t,o),this.menuButton_.el_.setAttribute("aria-describedby",this.labelElId_),this.updateVisibility(),this.updateLabel(),this.on(t,"loadstart",a=>this.updateVisibility(a)),this.on(t,"ratechange",a=>this.updateLabel(a)),this.on(t,"playbackrateschange",a=>this.handlePlaybackRateschange(a))}createEl(){const t=super.createEl();return this.labelElId_="vjs-playback-rate-value-label-"+this.id_,this.labelEl_=Le("div",{className:"vjs-playback-rate-value",id:this.labelElId_,textContent:"1x"}),t.appendChild(this.labelEl_),t}dispose(){this.labelEl_=null,super.dispose()}buildCSSClass(){return`vjs-playback-rate ${super.buildCSSClass()}`}buildWrapperCSSClass(){return`vjs-playback-rate ${super.buildWrapperCSSClass()}`}createItems(){const t=this.playbackRates(),o=[];for(let a=t.length-1;a>=0;a--)o.push(new Ep(this.player(),{rate:t[a]+"x"}));return o}handlePlaybackRateschange(t){this.update()}playbackRates(){const t=this.player();return t.playbackRates&&t.playbackRates()||[]}playbackRateSupported(){return this.player().tech_&&this.player().tech_.featuresPlaybackRate&&this.playbackRates()&&this.playbackRates().length>0}updateVisibility(t){this.playbackRateSupported()?this.removeClass("vjs-hidden"):this.addClass("vjs-hidden")}updateLabel(t){this.playbackRateSupported()&&(this.labelEl_.textContent=this.player().playbackRate()+"x")}}b1.prototype.controlText_="Playback Rate";re.registerComponent("PlaybackRateMenuButton",b1);class w1 extends re{buildCSSClass(){return`vjs-spacer ${super.buildCSSClass()}`}createEl(t="div",o={},a={}){return o.className||(o.className=this.buildCSSClass()),super.createEl(t,o,a)}}re.registerComponent("Spacer",w1);class vX extends w1{buildCSSClass(){return`vjs-custom-control-spacer ${super.buildCSSClass()}`}createEl(){return super.createEl("div",{className:this.buildCSSClass(),textContent:" "})}}re.registerComponent("CustomControlSpacer",vX);class x1 extends re{createEl(){return super.createEl("div",{className:"vjs-control-bar",dir:"ltr"})}}x1.prototype.options_={children:["playToggle","skipBackward","skipForward","volumePanel","currentTimeDisplay","timeDivider","durationDisplay","progressControl","liveDisplay","seekToLive","remainingTimeDisplay","customControlSpacer","playbackRateMenuButton","chaptersButton","descriptionsButton","subsCapsButton","audioTrackButton","pictureInPictureToggle","fullscreenToggle"]};re.registerComponent("ControlBar",x1);class V1 extends is{constructor(t,o){super(t,o),this.on(t,"error",a=>{this.open(a)})}buildCSSClass(){return`vjs-error-display ${super.buildCSSClass()}`}content(){const t=this.player().error();return t?this.localize(t.message):""}}V1.prototype.options_=Object.assign({},is.prototype.options_,{pauseOnOpen:!1,fillAlways:!0,temporary:!1,uncloseable:!0});re.registerComponent("ErrorDisplay",V1);class C1 extends re{constructor(t,o={}){super(t,o),this.el_.setAttribute("aria-labelledby",this.selectLabelledbyIds)}createEl(){return this.selectLabelledbyIds=[this.options_.legendId,this.options_.labelId].join(" ").trim(),Le("select",{id:this.options_.id},{},this.options_.SelectOptions.map(o=>{const a=(this.options_.labelId?this.options_.labelId:`vjs-track-option-${ao()}`)+"-"+o[1].replace(/\W+/g,""),i=Le("option",{id:a,value:this.localize(o[0]),textContent:this.localize(o[1])});return i.setAttribute("aria-labelledby",`${this.selectLabelledbyIds} ${a}`),i}))}}re.registerComponent("TextTrackSelect",C1);class Ga extends re{constructor(t,o={}){super(t,o);const a=Le("legend",{textContent:this.localize(this.options_.legendText),id:this.options_.legendId});this.el().appendChild(a);const i=this.options_.selects;for(const s of i){const l=this.options_.selectConfigs[s],r=l.className,u=l.id.replace("%s",this.options_.id_);let c=null;const f=`vjs_select_${ao()}`;if(this.options_.type==="colors"){c=Le("span",{className:r});const d=Le("label",{id:u,className:"vjs-label",textContent:this.localize(l.label)});d.setAttribute("for",f),c.appendChild(d)}const m=new C1(t,{SelectOptions:l.options,legendId:this.options_.legendId,id:f,labelId:u});this.addChild(m),this.options_.type==="colors"&&(c.appendChild(m.el()),this.el().appendChild(c))}}createEl(){return Le("fieldset",{className:this.options_.className})}}re.registerComponent("TextTrackFieldset",Ga);class k1 extends re{constructor(t,o={}){super(t,o);const a=this.options_.textTrackComponentid,i=new Ga(t,{id_:a,legendId:`captions-text-legend-${a}`,legendText:this.localize("Text"),className:"vjs-fg vjs-track-setting",selects:this.options_.fieldSets[0],selectConfigs:this.options_.selectConfigs,type:"colors"});this.addChild(i);const s=new Ga(t,{id_:a,legendId:`captions-background-${a}`,legendText:this.localize("Text Background"),className:"vjs-bg vjs-track-setting",selects:this.options_.fieldSets[1],selectConfigs:this.options_.selectConfigs,type:"colors"});this.addChild(s);const l=new Ga(t,{id_:a,legendId:`captions-window-${a}`,legendText:this.localize("Caption Area Background"),className:"vjs-window vjs-track-setting",selects:this.options_.fieldSets[2],selectConfigs:this.options_.selectConfigs,type:"colors"});this.addChild(l)}createEl(){return Le("div",{className:"vjs-track-settings-colors"})}}re.registerComponent("TextTrackSettingsColors",k1);class E1 extends re{constructor(t,o={}){super(t,o);const a=this.options_.textTrackComponentid,i=new Ga(t,{id_:a,legendId:`captions-font-size-${a}`,legendText:"Font Size",className:"vjs-font-percent vjs-track-setting",selects:this.options_.fieldSets[0],selectConfigs:this.options_.selectConfigs,type:"font"});this.addChild(i);const s=new Ga(t,{id_:a,legendId:`captions-edge-style-${a}`,legendText:this.localize("Text Edge Style"),className:"vjs-edge-style vjs-track-setting",selects:this.options_.fieldSets[1],selectConfigs:this.options_.selectConfigs,type:"font"});this.addChild(s);const l=new Ga(t,{id_:a,legendId:`captions-font-family-${a}`,legendText:this.localize("Font Family"),className:"vjs-font-family vjs-track-setting",selects:this.options_.fieldSets[2],selectConfigs:this.options_.selectConfigs,type:"font"});this.addChild(l)}createEl(){return Le("div",{className:"vjs-track-settings-font"})}}re.registerComponent("TextTrackSettingsFont",E1);class T1 extends re{constructor(t,o={}){super(t,o);const a=new nn(t,{controlText:this.localize("restore all settings to the default values"),className:"vjs-default-button"});a.el().classList.remove("vjs-control","vjs-button"),a.el().textContent=this.localize("Reset"),this.addChild(a);const i=this.localize("Done"),s=new nn(t,{controlText:i,className:"vjs-done-button"});s.el().classList.remove("vjs-control","vjs-button"),s.el().textContent=i,this.addChild(s)}createEl(){return Le("div",{className:"vjs-track-settings-controls"})}}re.registerComponent("TrackSettingsControls",T1);const xc="vjs-text-track-settings",Xf=["#000","Black"],Yf=["#00F","Blue"],Kf=["#0FF","Cyan"],Qf=["#0F0","Green"],Jf=["#F0F","Magenta"],Zf=["#F00","Red"],eg=["#FFF","White"],tg=["#FF0","Yellow"],Vc=["1","Opaque"],Cc=["0.5","Semi-Transparent"],ng=["0","Transparent"],va={backgroundColor:{selector:".vjs-bg-color > select",id:"captions-background-color-%s",label:"Color",options:[Xf,eg,Zf,Qf,Yf,tg,Jf,Kf],className:"vjs-bg-color"},backgroundOpacity:{selector:".vjs-bg-opacity > select",id:"captions-background-opacity-%s",label:"Opacity",options:[Vc,Cc,ng],className:"vjs-bg-opacity vjs-opacity"},color:{selector:".vjs-text-color > select",id:"captions-foreground-color-%s",label:"Color",options:[eg,Xf,Zf,Qf,Yf,tg,Jf,Kf],className:"vjs-text-color"},edgeStyle:{selector:".vjs-edge-style > select",id:"",label:"Text Edge Style",options:[["none","None"],["raised","Raised"],["depressed","Depressed"],["uniform","Uniform"],["dropshadow","Drop shadow"]]},fontFamily:{selector:".vjs-font-family > select",id:"",label:"Font Family",options:[["proportionalSansSerif","Proportional Sans-Serif"],["monospaceSansSerif","Monospace Sans-Serif"],["proportionalSerif","Proportional Serif"],["monospaceSerif","Monospace Serif"],["casual","Casual"],["script","Script"],["small-caps","Small Caps"]]},fontPercent:{selector:".vjs-font-percent > select",id:"",label:"Font Size",options:[["0.50","50%"],["0.75","75%"],["1.00","100%"],["1.25","125%"],["1.50","150%"],["1.75","175%"],["2.00","200%"],["3.00","300%"],["4.00","400%"]],default:2,parser:n=>n==="1.00"?null:Number(n)},textOpacity:{selector:".vjs-text-opacity > select",id:"captions-foreground-opacity-%s",label:"Opacity",options:[Vc,Cc],className:"vjs-text-opacity vjs-opacity"},windowColor:{selector:".vjs-window-color > select",id:"captions-window-color-%s",label:"Color",className:"vjs-window-color"},windowOpacity:{selector:".vjs-window-opacity > select",id:"captions-window-opacity-%s",label:"Opacity",options:[ng,Cc,Vc],className:"vjs-window-opacity vjs-opacity"}};va.windowColor.options=va.backgroundColor.options;function N1(n,t){if(t&&(n=t(n)),n&&n!=="none")return n}function yX(n,t){const o=n.options[n.options.selectedIndex].value;return N1(o,t)}function _X(n,t,o){if(t){for(let a=0;a<n.options.length;a++)if(N1(n.options[a].value,o)===t){n.selectedIndex=a;break}}}class bX extends is{constructor(t,o){o.temporary=!1,super(t,o),this.updateDisplay=this.updateDisplay.bind(this),this.fill(),this.hasBeenOpened_=this.hasBeenFilled_=!0,this.renderModalComponents(t),this.endDialog=Le("p",{className:"vjs-control-text",textContent:this.localize("End of dialog window.")}),this.el().appendChild(this.endDialog),this.setDefaults(),o.persistTextTrackSettings===void 0&&(this.options_.persistTextTrackSettings=this.options_.playerOptions.persistTextTrackSettings),this.bindFunctionsToSelectsAndButtons(),this.options_.persistTextTrackSettings&&this.restoreSettings()}renderModalComponents(t){const o=new k1(t,{textTrackComponentid:this.id_,selectConfigs:va,fieldSets:[["color","textOpacity"],["backgroundColor","backgroundOpacity"],["windowColor","windowOpacity"]]});this.addChild(o);const a=new E1(t,{textTrackComponentid:this.id_,selectConfigs:va,fieldSets:[["fontPercent"],["edgeStyle"],["fontFamily"]]});this.addChild(a);const i=new T1(t);this.addChild(i)}bindFunctionsToSelectsAndButtons(){this.on(this.$(".vjs-done-button"),["click","tap"],()=>{this.saveSettings(),this.close()}),this.on(this.$(".vjs-default-button"),["click","tap"],()=>{this.setDefaults(),this.updateDisplay()}),Di(va,t=>{this.on(this.$(t.selector),"change",this.updateDisplay)})}dispose(){this.endDialog=null,super.dispose()}label(){return this.localize("Caption Settings Dialog")}description(){return this.localize("Beginning of dialog window. Escape will cancel and close the window.")}buildCSSClass(){return super.buildCSSClass()+" vjs-text-track-settings"}getValues(){return v0(va,(t,o,a)=>{const i=yX(this.$(o.selector),o.parser);return i!==void 0&&(t[a]=i),t},{})}setValues(t){Di(va,(o,a)=>{_X(this.$(o.selector),t[a],o.parser)})}setDefaults(){Di(va,t=>{const o=t.hasOwnProperty("default")?t.default:0;this.$(t.selector).selectedIndex=o})}restoreSettings(){let t;try{t=JSON.parse(X.localStorage.getItem(xc))}catch(o){Ge.warn(o)}t&&this.setValues(t)}saveSettings(){if(!this.options_.persistTextTrackSettings)return;const t=this.getValues();try{Object.keys(t).length?X.localStorage.setItem(xc,JSON.stringify(t)):X.localStorage.removeItem(xc)}catch(o){Ge.warn(o)}}updateDisplay(){const t=this.player_.getChild("textTrackDisplay");t&&t.updateDisplay()}handleLanguagechange(){this.fill(),this.renderModalComponents(this.player_),this.bindFunctionsToSelectsAndButtons()}}re.registerComponent("TextTrackSettings",bX);class wX extends re{constructor(t,o){let a=o.ResizeObserver||X.ResizeObserver;o.ResizeObserver===null&&(a=!1);const i=ut({createEl:!a,reportTouchActivity:!1},o);super(t,i),this.ResizeObserver=o.ResizeObserver||X.ResizeObserver,this.loadListener_=null,this.resizeObserver_=null,this.debouncedHandler_=R0(()=>{this.resizeHandler()},100,!1,this),a?(this.resizeObserver_=new this.ResizeObserver(this.debouncedHandler_),this.resizeObserver_.observe(t.el())):(this.loadListener_=()=>{if(!this.el_||!this.el_.contentWindow)return;const s=this.debouncedHandler_;let l=this.unloadListener_=function(){tn(this,"resize",s),tn(this,"unload",l),l=null};qn(this.el_.contentWindow,"unload",l),qn(this.el_.contentWindow,"resize",s)},this.one("load",this.loadListener_))}createEl(){return super.createEl("iframe",{className:"vjs-resize-manager",tabIndex:-1,title:this.localize("No content")},{"aria-hidden":"true"})}resizeHandler(){!this.player_||!this.player_.trigger||this.player_.trigger("playerresize")}dispose(){this.debouncedHandler_&&this.debouncedHandler_.cancel(),this.resizeObserver_&&(this.player_.el()&&this.resizeObserver_.unobserve(this.player_.el()),this.resizeObserver_.disconnect()),this.loadListener_&&this.off("load",this.loadListener_),this.el_&&this.el_.contentWindow&&this.unloadListener_&&this.unloadListener_.call(this.el_.contentWindow),this.ResizeObserver=null,this.resizeObserver=null,this.debouncedHandler_=null,this.loadListener_=null,super.dispose()}}re.registerComponent("ResizeManager",wX);const xX={trackingThreshold:20,liveTolerance:15};class VX extends re{constructor(t,o){const a=ut(xX,o,{createEl:!1});super(t,a),this.trackLiveHandler_=()=>this.trackLive_(),this.handlePlay_=i=>this.handlePlay(i),this.handleFirstTimeupdate_=i=>this.handleFirstTimeupdate(i),this.handleSeeked_=i=>this.handleSeeked(i),this.seekToLiveEdge_=i=>this.seekToLiveEdge(i),this.reset_(),this.on(this.player_,"durationchange",i=>this.handleDurationchange(i)),this.on(this.player_,"canplay",()=>this.toggleTracking())}trackLive_(){const t=this.player_.seekable();if(!t||!t.length)return;const o=Number(X.performance.now().toFixed(4)),a=this.lastTime_===-1?0:(o-this.lastTime_)/1e3;this.lastTime_=o,this.pastSeekEnd_=this.pastSeekEnd()+a;const i=this.liveCurrentTime(),s=this.player_.currentTime();let l=this.player_.paused()||this.seekedBehindLive_||Math.abs(i-s)>this.options_.liveTolerance;(!this.timeupdateSeen_||i===1/0)&&(l=!1),l!==this.behindLiveEdge_&&(this.behindLiveEdge_=l,this.trigger("liveedgechange"))}handleDurationchange(){this.toggleTracking()}toggleTracking(){this.player_.duration()===1/0&&this.liveWindow()>=this.options_.trackingThreshold?(this.player_.options_.liveui&&this.player_.addClass("vjs-liveui"),this.startTracking()):(this.player_.removeClass("vjs-liveui"),this.stopTracking())}startTracking(){this.isTracking()||(this.timeupdateSeen_||(this.timeupdateSeen_=this.player_.hasStarted()),this.trackingInterval_=this.setInterval(this.trackLiveHandler_,io),this.trackLive_(),this.on(this.player_,["play","pause"],this.trackLiveHandler_),this.timeupdateSeen_?this.on(this.player_,"seeked",this.handleSeeked_):(this.one(this.player_,"play",this.handlePlay_),this.one(this.player_,"timeupdate",this.handleFirstTimeupdate_)))}handleFirstTimeupdate(){this.timeupdateSeen_=!0,this.on(this.player_,"seeked",this.handleSeeked_)}handleSeeked(){const t=Math.abs(this.liveCurrentTime()-this.player_.currentTime());this.seekedBehindLive_=this.nextSeekedFromUser_&&t>2,this.nextSeekedFromUser_=!1,this.trackLive_()}handlePlay(){this.one(this.player_,"timeupdate",this.seekToLiveEdge_)}reset_(){this.lastTime_=-1,this.pastSeekEnd_=0,this.lastSeekEnd_=-1,this.behindLiveEdge_=!0,this.timeupdateSeen_=!1,this.seekedBehindLive_=!1,this.nextSeekedFromUser_=!1,this.clearInterval(this.trackingInterval_),this.trackingInterval_=null,this.off(this.player_,["play","pause"],this.trackLiveHandler_),this.off(this.player_,"seeked",this.handleSeeked_),this.off(this.player_,"play",this.handlePlay_),this.off(this.player_,"timeupdate",this.handleFirstTimeupdate_),this.off(this.player_,"timeupdate",this.seekToLiveEdge_)}nextSeekedFromUser(){this.nextSeekedFromUser_=!0}stopTracking(){this.isTracking()&&(this.reset_(),this.trigger("liveedgechange"))}seekableEnd(){const t=this.player_.seekable(),o=[];let a=t?t.length:0;for(;a--;)o.push(t.end(a));return o.length?o.sort()[o.length-1]:1/0}seekableStart(){const t=this.player_.seekable(),o=[];let a=t?t.length:0;for(;a--;)o.push(t.start(a));return o.length?o.sort()[0]:0}liveWindow(){const t=this.liveCurrentTime();return t===1/0?0:t-this.seekableStart()}isLive(){return this.isTracking()}atLiveEdge(){return!this.behindLiveEdge()}liveCurrentTime(){return this.pastSeekEnd()+this.seekableEnd()}pastSeekEnd(){const t=this.seekableEnd();return this.lastSeekEnd_!==-1&&t!==this.lastSeekEnd_&&(this.pastSeekEnd_=0),this.lastSeekEnd_=t,this.pastSeekEnd_}behindLiveEdge(){return this.behindLiveEdge_}isTracking(){return typeof this.trackingInterval_=="number"}seekToLiveEdge(){this.seekedBehindLive_=!1,!this.atLiveEdge()&&(this.nextSeekedFromUser_=!1,this.player_.currentTime(this.liveCurrentTime()))}dispose(){this.stopTracking(),super.dispose()}}re.registerComponent("LiveTracker",VX);class CX extends re{constructor(t,o){super(t,o),this.on("statechanged",a=>this.updateDom_()),this.updateDom_()}createEl(){return this.els={title:Le("div",{className:"vjs-title-bar-title",id:`vjs-title-bar-title-${ao()}`}),description:Le("div",{className:"vjs-title-bar-description",id:`vjs-title-bar-description-${ao()}`})},Le("div",{className:"vjs-title-bar"},{},y0(this.els))}updateDom_(){const t=this.player_.tech_,o=t&&t.el_,a={title:"aria-labelledby",description:"aria-describedby"};["title","description"].forEach(i=>{const s=this.state[i],l=this.els[i],r=a[i];Tu(l),s&&Ea(l,s),o&&(o.removeAttribute(r),s&&o.setAttribute(r,l.id))}),this.state.title||this.state.description?this.show():this.hide()}update(t){this.setState(t)}dispose(){const t=this.player_.tech_,o=t&&t.el_;o&&(o.removeAttribute("aria-labelledby"),o.removeAttribute("aria-describedby")),super.dispose(),this.els=null}}re.registerComponent("TitleBar",CX);const kX={initialDisplay:4e3,position:[],takeFocus:!1};class EX extends nn{constructor(t,o){o=ut(kX,o),super(t,o),this.controlText(o.controlText),this.hide(),this.on(this.player_,["useractive","userinactive"],a=>{this.removeClass("force-display")})}buildCSSClass(){return`vjs-transient-button focus-visible ${this.options_.position.map(t=>`vjs-${t}`).join(" ")}`}createEl(){const t=Le("button",{},{type:"button",class:this.buildCSSClass()},Le("span"));return this.controlTextEl_=t.querySelector("span"),t}show(){super.show(),this.addClass("force-display"),this.options_.takeFocus&&this.el().focus({preventScroll:!0}),this.forceDisplayTimeout=this.player_.setTimeout(()=>{this.removeClass("force-display")},this.options_.initialDisplay)}hide(){this.removeClass("force-display"),super.hide()}dispose(){this.player_.clearTimeout(this.forceDisplayTimeout),super.dispose()}}re.registerComponent("TransientButton",EX);const lm=n=>{const t=n.el();if(t.hasAttribute("src"))return n.triggerSourceset(t.src),!0;const o=n.$$("source"),a=[];let i="";if(!o.length)return!1;for(let s=0;s<o.length;s++){const l=o[s].src;l&&a.indexOf(l)===-1&&a.push(l)}return a.length?(a.length===1&&(i=a[0]),n.triggerSourceset(i),!0):!1},TX=Object.defineProperty({},"innerHTML",{get(){return this.cloneNode(!0).innerHTML},set(n){const t=ge.createElement(this.nodeName.toLowerCase());t.innerHTML=n;const o=ge.createDocumentFragment();for(;t.childNodes.length;)o.appendChild(t.childNodes[0]);return this.innerText="",X.Element.prototype.appendChild.call(this,o),this.innerHTML}}),S1=(n,t)=>{let o={};for(let a=0;a<n.length&&(o=Object.getOwnPropertyDescriptor(n[a],t),!(o&&o.set&&o.get));a++);return o.enumerable=!0,o.configurable=!0,o},NX=n=>S1([n.el(),X.HTMLMediaElement.prototype,X.Element.prototype,TX],"innerHTML"),og=function(n){const t=n.el();if(t.resetSourceWatch_)return;const o={},a=NX(n),i=s=>(...l)=>{const r=s.apply(t,l);return lm(n),r};["append","appendChild","insertAdjacentHTML"].forEach(s=>{t[s]&&(o[s]=t[s],t[s]=i(o[s]))}),Object.defineProperty(t,"innerHTML",ut(a,{set:i(a.set)})),t.resetSourceWatch_=()=>{t.resetSourceWatch_=null,Object.keys(o).forEach(s=>{t[s]=o[s]}),Object.defineProperty(t,"innerHTML",a)},n.one("sourceset",t.resetSourceWatch_)},SX=Object.defineProperty({},"src",{get(){return this.hasAttribute("src")?Q0(X.Element.prototype.getAttribute.call(this,"src")):""},set(n){return X.Element.prototype.setAttribute.call(this,"src",n),n}}),BX=n=>S1([n.el(),X.HTMLMediaElement.prototype,SX],"src"),DX=function(n){if(!n.featuresSourceset)return;const t=n.el();if(t.resetSourceset_)return;const o=BX(n),a=t.setAttribute,i=t.load;Object.defineProperty(t,"src",ut(o,{set:s=>{const l=o.set.call(t,s);return n.triggerSourceset(t.src),l}})),t.setAttribute=(s,l)=>{const r=a.call(t,s,l);return/src/i.test(s)&&n.triggerSourceset(t.src),r},t.load=()=>{const s=i.call(t);return lm(n)||(n.triggerSourceset(""),og(n)),s},t.currentSrc?n.triggerSourceset(t.currentSrc):lm(n)||og(n),t.resetSourceset_=()=>{t.resetSourceset_=null,t.load=i,t.setAttribute=a,Object.defineProperty(t,"src",o),t.resetSourceWatch_&&t.resetSourceWatch_()}};class xe extends Fe{constructor(t,o){super(t,o);const a=t.source;let i=!1;if(this.featuresVideoFrameCallback=this.featuresVideoFrameCallback&&this.el_.tagName==="VIDEO",a&&(this.el_.currentSrc!==a.src||t.tag&&t.tag.initNetworkState_===3)?this.setSource(a):this.handleLateInit_(this.el_),t.enableSourceset&&this.setupSourcesetHandling_(),this.isScrubbing_=!1,this.el_.hasChildNodes()){const s=this.el_.childNodes;let l=s.length;const r=[];for(;l--;){const u=s[l];u.nodeName.toLowerCase()==="track"&&(this.featuresNativeTextTracks?(this.remoteTextTrackEls().addTrackElement_(u),this.remoteTextTracks().addTrack(u.track),this.textTracks().addTrack(u.track),!i&&!this.el_.hasAttribute("crossorigin")&&Du(u.src)&&(i=!0)):r.push(u))}for(let u=0;u<r.length;u++)this.el_.removeChild(r[u])}this.proxyNativeTracks_(),this.featuresNativeTextTracks&&i&&Ge.warn(`Text Tracks are being loaded from another origin but the crossorigin attribute isn't used.
|
|
196
|
+
This may prevent text tracks from loading.`),this.restoreMetadataTracksInIOSNativePlayer_(),(yl||xu)&&t.nativeControlsForTouch===!0&&this.setControls(!0),this.proxyWebkitFullscreen_(),this.triggerReady()}dispose(){this.el_&&this.el_.resetSourceset_&&this.el_.resetSourceset_(),xe.disposeMediaElement(this.el_),this.options_=null,super.dispose()}setupSourcesetHandling_(){DX(this)}restoreMetadataTracksInIOSNativePlayer_(){const t=this.textTracks();let o;const a=()=>{o=[];for(let s=0;s<t.length;s++){const l=t[s];l.kind==="metadata"&&o.push({track:l,storedMode:l.mode})}};a(),t.addEventListener("change",a),this.on("dispose",()=>t.removeEventListener("change",a));const i=()=>{for(let s=0;s<o.length;s++){const l=o[s];l.track.mode==="disabled"&&l.track.mode!==l.storedMode&&(l.track.mode=l.storedMode)}t.removeEventListener("change",i)};this.on("webkitbeginfullscreen",()=>{t.removeEventListener("change",a),t.removeEventListener("change",i),t.addEventListener("change",i)}),this.on("webkitendfullscreen",()=>{t.removeEventListener("change",a),t.addEventListener("change",a),t.removeEventListener("change",i)})}overrideNative_(t,o){if(o!==this[`featuresNative${t}Tracks`])return;const a=t.toLowerCase();this[`${a}TracksListeners_`]&&Object.keys(this[`${a}TracksListeners_`]).forEach(i=>{this.el()[`${a}Tracks`].removeEventListener(i,this[`${a}TracksListeners_`][i])}),this[`featuresNative${t}Tracks`]=!o,this[`${a}TracksListeners_`]=null,this.proxyNativeTracksForType_(a)}overrideNativeAudioTracks(t){this.overrideNative_("Audio",t)}overrideNativeVideoTracks(t){this.overrideNative_("Video",t)}proxyNativeTracksForType_(t){const o=oo[t],a=this.el()[o.getterName],i=this[o.getterName]();if(!this[`featuresNative${o.capitalName}Tracks`]||!a||!a.addEventListener)return;const s={change:r=>{const u={type:"change",target:i,currentTarget:i,srcElement:i};i.trigger(u),t==="text"&&this[Ji.remoteText.getterName]().trigger(u)},addtrack(r){i.addTrack(r.track)},removetrack(r){i.removeTrack(r.track)}},l=function(){const r=[];for(let u=0;u<i.length;u++){let c=!1;for(let f=0;f<a.length;f++)if(a[f]===i[u]){c=!0;break}c||r.push(i[u])}for(;r.length;)i.removeTrack(r.shift())};this[o.getterName+"Listeners_"]=s,Object.keys(s).forEach(r=>{const u=s[r];a.addEventListener(r,u),this.on("dispose",c=>a.removeEventListener(r,u))}),this.on("loadstart",l),this.on("dispose",r=>this.off("loadstart",l))}proxyNativeTracks_(){oo.names.forEach(t=>{this.proxyNativeTracksForType_(t)})}createEl(){let t=this.options_.tag;if(!t||!(this.options_.playerElIngest||this.movingMediaElementInDOM)){if(t){const a=t.cloneNode(!0);t.parentNode&&t.parentNode.insertBefore(a,t),xe.disposeMediaElement(t),t=a}else{t=ge.createElement("video");const a=this.options_.tag&&ga(this.options_.tag),i=ut({},a);(!yl||this.options_.nativeControlsForTouch!==!0)&&delete i.controls,T0(t,Object.assign(i,{id:this.options_.techId,class:"vjs-tech"}))}t.playerId=this.options_.playerId}typeof this.options_.preload<"u"&&Yi(t,"preload",this.options_.preload),this.options_.disablePictureInPicture!==void 0&&(t.disablePictureInPicture=this.options_.disablePictureInPicture);const o=["loop","muted","playsinline","autoplay"];for(let a=0;a<o.length;a++){const i=o[a],s=this.options_[i];typeof s<"u"&&(s?Yi(t,i,i):ku(t,i),t[i]=s)}return t}handleLateInit_(t){if(t.networkState===0||t.networkState===3)return;if(t.readyState===0){let a=!1;const i=function(){a=!0};this.on("loadstart",i);const s=function(){a||this.trigger("loadstart")};this.on("loadedmetadata",s),this.ready(function(){this.off("loadstart",i),this.off("loadedmetadata",s),a||this.trigger("loadstart")});return}const o=["loadstart"];o.push("loadedmetadata"),t.readyState>=2&&o.push("loadeddata"),t.readyState>=3&&o.push("canplay"),t.readyState>=4&&o.push("canplaythrough"),this.ready(function(){o.forEach(function(a){this.trigger(a)},this)})}setScrubbing(t){this.isScrubbing_=t}scrubbing(){return this.isScrubbing_}setCurrentTime(t){try{this.isScrubbing_&&this.el_.fastSeek&&Vu?this.el_.fastSeek(t):this.el_.currentTime=t}catch(o){Ge(o,"Video is not ready. (Video.js)")}}duration(){if(this.el_.duration===1/0&&po&&$o&&this.el_.currentTime===0){const t=()=>{this.el_.currentTime>0&&(this.el_.duration===1/0&&this.trigger("durationchange"),this.off("timeupdate",t))};return this.on("timeupdate",t),NaN}return this.el_.duration||NaN}width(){return this.el_.offsetWidth}height(){return this.el_.offsetHeight}proxyWebkitFullscreen_(){if(!("webkitDisplayingFullscreen"in this.el_))return;const t=function(){this.trigger("fullscreenchange",{isFullscreen:!1}),this.el_.controls&&!this.options_.nativeControlsForTouch&&this.controls()&&(this.el_.controls=!1)},o=function(){"webkitPresentationMode"in this.el_&&this.el_.webkitPresentationMode!=="picture-in-picture"&&(this.one("webkitendfullscreen",t),this.trigger("fullscreenchange",{isFullscreen:!0,nativeIOSFullscreen:!0}))};this.on("webkitbeginfullscreen",o),this.on("dispose",()=>{this.off("webkitbeginfullscreen",o),this.off("webkitendfullscreen",t)})}supportsFullScreen(){return typeof this.el_.webkitEnterFullScreen=="function"}enterFullScreen(){const t=this.el_;if(t.paused&&t.networkState<=t.HAVE_METADATA)ko(this.el_.play()),this.setTimeout(function(){t.pause();try{t.webkitEnterFullScreen()}catch(o){this.trigger("fullscreenerror",o)}},0);else try{t.webkitEnterFullScreen()}catch(o){this.trigger("fullscreenerror",o)}}exitFullScreen(){if(!this.el_.webkitDisplayingFullscreen){this.trigger("fullscreenerror",new Error("The video is not fullscreen"));return}this.el_.webkitExitFullScreen()}requestPictureInPicture(){return this.el_.requestPictureInPicture()}requestVideoFrameCallback(t){return this.featuresVideoFrameCallback&&!this.el_.webkitKeys?this.el_.requestVideoFrameCallback(t):super.requestVideoFrameCallback(t)}cancelVideoFrameCallback(t){this.featuresVideoFrameCallback&&!this.el_.webkitKeys?this.el_.cancelVideoFrameCallback(t):super.cancelVideoFrameCallback(t)}src(t){if(t===void 0)return this.el_.src;this.setSrc(t)}addSourceElement(t,o){if(!t)return Ge.error("Invalid source URL."),!1;const a={src:t};o&&(a.type=o);const i=Le("source",{},a);return this.el_.appendChild(i),!0}removeSourceElement(t){if(!t)return Ge.error("Source URL is required to remove the source element."),!1;const o=this.el_.querySelectorAll("source");for(const a of o)if(a.src===t)return this.el_.removeChild(a),!0;return Ge.warn(`No matching source element found with src: ${t}`),!1}reset(){xe.resetMediaElement(this.el_)}currentSrc(){return this.currentSource_?this.currentSource_.src:this.el_.currentSrc}setControls(t){this.el_.controls=!!t}addTextTrack(t,o,a){return this.featuresNativeTextTracks?this.el_.addTextTrack(t,o,a):super.addTextTrack(t,o,a)}createRemoteTextTrack(t){if(!this.featuresNativeTextTracks)return super.createRemoteTextTrack(t);const o=ge.createElement("track");return t.kind&&(o.kind=t.kind),t.label&&(o.label=t.label),(t.language||t.srclang)&&(o.srclang=t.language||t.srclang),t.default&&(o.default=t.default),t.id&&(o.id=t.id),t.src&&(o.src=t.src),o}addRemoteTextTrack(t,o){const a=super.addRemoteTextTrack(t,o);return this.featuresNativeTextTracks&&this.el().appendChild(a),a}removeRemoteTextTrack(t){if(super.removeRemoteTextTrack(t),this.featuresNativeTextTracks){const o=this.$$("track");let a=o.length;for(;a--;)(t===o[a]||t===o[a].track)&&this.el().removeChild(o[a])}}getVideoPlaybackQuality(){if(typeof this.el().getVideoPlaybackQuality=="function")return this.el().getVideoPlaybackQuality();const t={};return typeof this.el().webkitDroppedFrameCount<"u"&&typeof this.el().webkitDecodedFrameCount<"u"&&(t.droppedVideoFrames=this.el().webkitDroppedFrameCount,t.totalVideoFrames=this.el().webkitDecodedFrameCount),X.performance&&(t.creationTime=X.performance.now()),t}}_u(xe,"TEST_VID",function(){if(!ns())return;const n=ge.createElement("video"),t=ge.createElement("track");return t.kind="captions",t.srclang="en",t.label="English",n.appendChild(t),n});xe.isSupported=function(){try{xe.TEST_VID.volume=.5}catch{return!1}return!!(xe.TEST_VID&&xe.TEST_VID.canPlayType)};xe.canPlayType=function(n){return xe.TEST_VID.canPlayType(n)};xe.canPlaySource=function(n,t){return xe.canPlayType(n.type)};xe.canControlVolume=function(){try{const n=xe.TEST_VID.volume;xe.TEST_VID.volume=n/2+.1;const t=n!==xe.TEST_VID.volume;return t&&en?(X.setTimeout(()=>{xe&&xe.prototype&&(xe.prototype.featuresVolumeControl=n!==xe.TEST_VID.volume)}),!1):t}catch{return!1}};xe.canMuteVolume=function(){try{const n=xe.TEST_VID.muted;return xe.TEST_VID.muted=!n,xe.TEST_VID.muted?Yi(xe.TEST_VID,"muted","muted"):ku(xe.TEST_VID,"muted","muted"),n!==xe.TEST_VID.muted}catch{return!1}};xe.canControlPlaybackRate=function(){if(po&&$o&&bu<58)return!1;try{const n=xe.TEST_VID.playbackRate;return xe.TEST_VID.playbackRate=n/2+.1,n!==xe.TEST_VID.playbackRate}catch{return!1}};xe.canOverrideAttributes=function(){try{const n=()=>{};Object.defineProperty(ge.createElement("video"),"src",{get:n,set:n}),Object.defineProperty(ge.createElement("audio"),"src",{get:n,set:n}),Object.defineProperty(ge.createElement("video"),"innerHTML",{get:n,set:n}),Object.defineProperty(ge.createElement("audio"),"innerHTML",{get:n,set:n})}catch{return!1}return!0};xe.supportsNativeTextTracks=function(){return Vu||en&&$o};xe.supportsNativeVideoTracks=function(){return!!(xe.TEST_VID&&xe.TEST_VID.videoTracks)};xe.supportsNativeAudioTracks=function(){return!!(xe.TEST_VID&&xe.TEST_VID.audioTracks)};xe.Events=["loadstart","suspend","abort","error","emptied","stalled","loadedmetadata","loadeddata","canplay","canplaythrough","playing","waiting","seeking","seeked","ended","durationchange","timeupdate","progress","play","pause","ratechange","resize","volumechange"];[["featuresMuteControl","canMuteVolume"],["featuresPlaybackRate","canControlPlaybackRate"],["featuresSourceset","canOverrideAttributes"],["featuresNativeTextTracks","supportsNativeTextTracks"],["featuresNativeVideoTracks","supportsNativeVideoTracks"],["featuresNativeAudioTracks","supportsNativeAudioTracks"]].forEach(function([n,t]){_u(xe.prototype,n,()=>xe[t](),!0)});xe.prototype.featuresVolumeControl=xe.canControlVolume();xe.prototype.movingMediaElementInDOM=!en;xe.prototype.featuresFullscreenResize=!0;xe.prototype.featuresProgressEvents=!0;xe.prototype.featuresTimeupdateEvents=!0;xe.prototype.featuresVideoFrameCallback=!!(xe.TEST_VID&&xe.TEST_VID.requestVideoFrameCallback);xe.disposeMediaElement=function(n){if(n){for(n.parentNode&&n.parentNode.removeChild(n);n.hasChildNodes();)n.removeChild(n.firstChild);n.removeAttribute("src"),typeof n.load=="function"&&function(){try{n.load()}catch{}}()}};xe.resetMediaElement=function(n){if(!n)return;const t=n.querySelectorAll("source");let o=t.length;for(;o--;)n.removeChild(t[o]);n.removeAttribute("src"),typeof n.load=="function"&&function(){try{n.load()}catch{}}()};["muted","defaultMuted","autoplay","controls","loop","playsinline"].forEach(function(n){xe.prototype[n]=function(){return this.el_[n]||this.el_.hasAttribute(n)}});["muted","defaultMuted","autoplay","loop","playsinline"].forEach(function(n){xe.prototype["set"+Ct(n)]=function(t){this.el_[n]=t,t?this.el_.setAttribute(n,n):this.el_.removeAttribute(n)}});["paused","currentTime","buffered","volume","poster","preload","error","seeking","seekable","ended","playbackRate","defaultPlaybackRate","disablePictureInPicture","played","networkState","readyState","videoWidth","videoHeight","crossOrigin"].forEach(function(n){xe.prototype[n]=function(){return this.el_[n]}});["volume","src","poster","preload","playbackRate","defaultPlaybackRate","disablePictureInPicture","crossOrigin"].forEach(function(n){xe.prototype["set"+Ct(n)]=function(t){this.el_[n]=t}});["pause","load","play"].forEach(function(n){xe.prototype[n]=function(){return this.el_[n]()}});Fe.withSourceHandlers(xe);xe.nativeSourceHandler={};xe.nativeSourceHandler.canPlayType=function(n){try{return xe.TEST_VID.canPlayType(n)}catch{return""}};xe.nativeSourceHandler.canHandleSource=function(n,t){if(n.type)return xe.nativeSourceHandler.canPlayType(n.type);if(n.src){const o=cp(n.src);return xe.nativeSourceHandler.canPlayType(`video/${o}`)}return""};xe.nativeSourceHandler.handleSource=function(n,t,o){t.setSrc(n.src)};xe.nativeSourceHandler.dispose=function(){};xe.registerSourceHandler(xe.nativeSourceHandler);Fe.registerTech("Html5",xe);const B1=["progress","abort","suspend","emptied","stalled","loadedmetadata","loadeddata","timeupdate","resize","volumechange","texttrackchange"],kc={canplay:"CanPlay",canplaythrough:"CanPlayThrough",playing:"Playing",seeked:"Seeked"},rm=["tiny","xsmall","small","medium","large","xlarge","huge"],Tr={};rm.forEach(n=>{const t=n.charAt(0)==="x"?`x-${n.substring(1)}`:n;Tr[n]=`vjs-layout-${t}`});const PX={tiny:210,xsmall:320,small:425,medium:768,large:1440,xlarge:2560,huge:1/0};class ot extends re{constructor(t,o,a){if(t.id=t.id||o.id||`vjs_video_${ao()}`,o=Object.assign(ot.getTagSettings(t),o),o.initChildren=!1,o.createEl=!1,o.evented=!1,o.reportTouchActivity=!1,!o.language){const l=t.closest("[lang]");l&&(o.language=l.getAttribute("lang"))}if(super(null,o,a),this.boundDocumentFullscreenChange_=l=>this.documentFullscreenChange_(l),this.boundFullWindowOnEscKey_=l=>this.fullWindowOnEscKey(l),this.boundUpdateStyleEl_=l=>this.updateStyleEl_(l),this.boundApplyInitTime_=l=>this.applyInitTime_(l),this.boundUpdateCurrentBreakpoint_=l=>this.updateCurrentBreakpoint_(l),this.boundHandleTechClick_=l=>this.handleTechClick_(l),this.boundHandleTechDoubleClick_=l=>this.handleTechDoubleClick_(l),this.boundHandleTechTouchStart_=l=>this.handleTechTouchStart_(l),this.boundHandleTechTouchMove_=l=>this.handleTechTouchMove_(l),this.boundHandleTechTouchEnd_=l=>this.handleTechTouchEnd_(l),this.boundHandleTechTap_=l=>this.handleTechTap_(l),this.boundUpdatePlayerHeightOnAudioOnlyMode_=l=>this.updatePlayerHeightOnAudioOnlyMode_(l),this.isFullscreen_=!1,this.log=f0(this.id_),this.fsApi_=Fr,this.isPosterFromTech_=!1,this.queuedCallbacks_=[],this.isReady_=!1,this.hasStarted_=!1,this.userActive_=!1,this.debugEnabled_=!1,this.audioOnlyMode_=!1,this.audioPosterMode_=!1,this.audioOnlyCache_={controlBarHeight:null,playerHeight:null,hiddenChildren:[]},!this.options_||!this.options_.techOrder||!this.options_.techOrder.length)throw new Error("No techOrder specified. Did you overwrite videojs.options instead of just changing the properties you want to override?");if(this.tag=t,this.tagAttributes=t&&ga(t),this.language(this.options_.language),o.languages){const l={};Object.getOwnPropertyNames(o.languages).forEach(function(r){l[r.toLowerCase()]=o.languages[r]}),this.languages_=l}else this.languages_=ot.prototype.options_.languages;this.resetCache_(),this.poster_=o.poster||"",this.controls_=!!o.controls,t.controls=!1,t.removeAttribute("controls"),this.changingSrc_=!1,this.playCallbacks_=[],this.playTerminatedQueue_=[],t.hasAttribute("autoplay")?this.autoplay(!0):this.autoplay(this.options_.autoplay),o.plugins&&Object.keys(o.plugins).forEach(l=>{if(typeof this[l]!="function")throw new Error(`plugin "${l}" does not exist`)}),this.scrubbing_=!1,this.el_=this.createEl(),sp(this,{eventBusKey:"el_"}),this.fsApi_.requestFullscreen&&(qn(ge,this.fsApi_.fullscreenchange,this.boundDocumentFullscreenChange_),this.on(this.fsApi_.fullscreenchange,this.boundDocumentFullscreenChange_)),this.fluid_&&this.on(["playerreset","resize"],this.boundUpdateStyleEl_);const i=ut(this.options_);if(o.plugins&&Object.keys(o.plugins).forEach(l=>{this[l](o.plugins[l])}),o.debug&&this.debug(!0),this.options_.playerOptions=i,this.middleware_=[],this.playbackRates(o.playbackRates),o.experimentalSvgIcons){const r=new X.DOMParser().parseFromString(tX,"image/svg+xml");if(r.querySelector("parsererror"))Ge.warn("Failed to load SVG Icons. Falling back to Font Icons."),this.options_.experimentalSvgIcons=null;else{const c=r.documentElement;c.style.display="none",this.el_.appendChild(c),this.addClass("vjs-svg-icons-enabled")}}this.initChildren(),this.isAudio(t.nodeName.toLowerCase()==="audio"),this.controls()?this.addClass("vjs-controls-enabled"):this.addClass("vjs-controls-disabled"),this.el_.setAttribute("role","region"),this.isAudio()?this.el_.setAttribute("aria-label",this.localize("Audio Player")):this.el_.setAttribute("aria-label",this.localize("Video Player")),this.isAudio()&&this.addClass("vjs-audio"),o.spatialNavigation&&o.spatialNavigation.enabled&&(this.spatialNavigation=new nX(this),this.addClass("vjs-spatial-navigation-enabled")),yl&&this.addClass("vjs-touch-enabled"),en||this.addClass("vjs-workinghover"),ot.players[this.id_]=this;const s=Qc.split(".")[0];this.addClass(`vjs-v${s}`),this.userActive(!0),this.reportUserActivity(),this.one("play",l=>this.listenForUserActivity_(l)),this.on("keydown",l=>this.handleKeyDown(l)),this.on("languagechange",l=>this.handleLanguagechange(l)),this.breakpoints(this.options_.breakpoints),this.responsive(this.options_.responsive),this.on("ready",()=>{this.audioPosterMode(this.options_.audioPosterMode),this.audioOnlyMode(this.options_.audioOnlyMode)})}dispose(){this.trigger("dispose"),this.off("dispose"),tn(ge,this.fsApi_.fullscreenchange,this.boundDocumentFullscreenChange_),tn(ge,"keydown",this.boundFullWindowOnEscKey_),this.styleEl_&&this.styleEl_.parentNode&&(this.styleEl_.parentNode.removeChild(this.styleEl_),this.styleEl_=null),ot.players[this.id_]=null,this.tag&&this.tag.player&&(this.tag.player=null),this.el_&&this.el_.player&&(this.el_.player=null),this.tech_&&(this.tech_.dispose(),this.isPosterFromTech_=!1,this.poster_=""),this.playerElIngest_&&(this.playerElIngest_=null),this.tag&&(this.tag=null),QG(this),fn.names.forEach(t=>{const o=fn[t],a=this[o.getterName]();a&&a.off&&a.off()}),super.dispose({restoreEl:this.options_.restoreEl})}createEl(){let t=this.tag,o,a=this.playerElIngest_=t.parentNode&&t.parentNode.hasAttribute&&t.parentNode.hasAttribute("data-vjs-player");const i=this.tag.tagName.toLowerCase()==="video-js";a?o=this.el_=t.parentNode:i||(o=this.el_=super.createEl("div"));const s=ga(t);if(i){for(o=this.el_=t,t=this.tag=ge.createElement("video");o.children.length;)t.appendChild(o.firstChild);ol(o,"video-js")||qa(o,"video-js"),o.appendChild(t),a=this.playerElIngest_=o,Object.keys(o).forEach(u=>{try{t[u]=o[u]}catch{}})}t.setAttribute("tabindex","-1"),s.tabindex="-1",$o&&wu&&(t.setAttribute("role","application"),s.role="application"),t.removeAttribute("width"),t.removeAttribute("height"),"width"in s&&delete s.width,"height"in s&&delete s.height,Object.getOwnPropertyNames(s).forEach(function(u){i&&u==="class"||o.setAttribute(u,s[u]),i&&t.setAttribute(u,s[u])}),t.playerId=t.id,t.id+="_html5_api",t.className="vjs-tech",t.player=o.player=this,this.addClass("vjs-paused");const l=["IS_SMART_TV","IS_TIZEN","IS_WEBOS","IS_ANDROID","IS_IPAD","IS_IPHONE","IS_CHROMECAST_RECEIVER"].filter(u=>V0[u]).map(u=>"vjs-device-"+u.substring(3).toLowerCase().replace(/\_/g,"-"));if(this.addClass(...l),X.VIDEOJS_NO_DYNAMIC_STYLE!==!0){this.styleEl_=M0("vjs-styles-dimensions");const u=Ca(".vjs-styles-defaults"),c=Ca("head");c.insertBefore(this.styleEl_,u?u.nextSibling:c.firstChild)}this.fill_=!1,this.fluid_=!1,this.width(this.options_.width),this.height(this.options_.height),this.fill(this.options_.fill),this.fluid(this.options_.fluid),this.aspectRatio(this.options_.aspectRatio),this.crossOrigin(this.options_.crossOrigin||this.options_.crossorigin);const r=t.getElementsByTagName("a");for(let u=0;u<r.length;u++){const c=r.item(u);qa(c,"vjs-hidden"),c.setAttribute("hidden","hidden")}return t.initNetworkState_=t.networkState,t.parentNode&&!a&&t.parentNode.insertBefore(o,t),Zc(t,o),this.children_.unshift(t),this.el_.setAttribute("lang",this.language_),this.el_.setAttribute("translate","no"),this.el_=o,o}crossOrigin(t){if(typeof t>"u")return this.techGet_("crossOrigin");if(t!==null&&t!=="anonymous"&&t!=="use-credentials"){Ge.warn(`crossOrigin must be null, "anonymous" or "use-credentials", given "${t}"`);return}this.techCall_("setCrossOrigin",t),this.posterImage&&this.posterImage.crossOrigin(t)}width(t){return this.dimension("width",t)}height(t){return this.dimension("height",t)}dimension(t,o){const a=t+"_";if(o===void 0)return this[a]||0;if(o===""||o==="auto"){this[a]=void 0,this.updateStyleEl_();return}const i=parseFloat(o);if(isNaN(i)){Ge.error(`Improper value "${o}" supplied for for ${t}`);return}this[a]=i,this.updateStyleEl_()}fluid(t){if(t===void 0)return!!this.fluid_;this.fluid_=!!t,Xo(this)&&this.off(["playerreset","resize"],this.boundUpdateStyleEl_),t?(this.addClass("vjs-fluid"),this.fill(!1),SG(this,()=>{this.on(["playerreset","resize"],this.boundUpdateStyleEl_)})):this.removeClass("vjs-fluid"),this.updateStyleEl_()}fill(t){if(t===void 0)return!!this.fill_;this.fill_=!!t,t?(this.addClass("vjs-fill"),this.fluid(!1)):this.removeClass("vjs-fill")}aspectRatio(t){if(t===void 0)return this.aspectRatio_;if(!/^\d+\:\d+$/.test(t))throw new Error("Improper value supplied for aspect ratio. The format should be width:height, for example 16:9.");this.aspectRatio_=t,this.fluid(!0),this.updateStyleEl_()}updateStyleEl_(){if(X.VIDEOJS_NO_DYNAMIC_STYLE===!0){const r=typeof this.width_=="number"?this.width_:this.options_.width,u=typeof this.height_=="number"?this.height_:this.options_.height,c=this.tech_&&this.tech_.el();c&&(r>=0&&(c.width=r),u>=0&&(c.height=u));return}let t,o,a,i;this.aspectRatio_!==void 0&&this.aspectRatio_!=="auto"?a=this.aspectRatio_:this.videoWidth()>0?a=this.videoWidth()+":"+this.videoHeight():a="16:9";const s=a.split(":"),l=s[1]/s[0];this.width_!==void 0?t=this.width_:this.height_!==void 0?t=this.height_/l:t=this.videoWidth()||300,this.height_!==void 0?o=this.height_:o=t*l,/^[^a-zA-Z]/.test(this.id())?i="dimensions-"+this.id():i=this.id()+"-dimensions",this.addClass(i),U0(this.styleEl_,`
|
|
197
|
+
.${i} {
|
|
198
|
+
width: ${t}px;
|
|
199
|
+
height: ${o}px;
|
|
200
|
+
}
|
|
201
|
+
|
|
202
|
+
.${i}.vjs-fluid:not(.vjs-audio-only-mode) {
|
|
203
|
+
padding-top: ${l*100}%;
|
|
204
|
+
}
|
|
205
|
+
`)}loadTech_(t,o){this.tech_&&this.unloadTech_();const a=Ct(t),i=t.charAt(0).toLowerCase()+t.slice(1);a!=="Html5"&&this.tag&&(Fe.getTech("Html5").disposeMediaElement(this.tag),this.tag.player=null,this.tag=null),this.techName_=a,this.isReady_=!1;let s=this.autoplay();(typeof this.autoplay()=="string"||this.autoplay()===!0&&this.options_.normalizeAutoplay)&&(s=!1);const l={source:o,autoplay:s,nativeControlsForTouch:this.options_.nativeControlsForTouch,playerId:this.id(),techId:`${this.id()}_${i}_api`,playsinline:this.options_.playsinline,preload:this.options_.preload,loop:this.options_.loop,disablePictureInPicture:this.options_.disablePictureInPicture,muted:this.options_.muted,poster:this.poster(),language:this.language(),playerElIngest:this.playerElIngest_||!1,"vtt.js":this.options_["vtt.js"],canOverridePoster:!!this.options_.techCanOverridePoster,enableSourceset:this.options_.enableSourceset};fn.names.forEach(u=>{const c=fn[u];l[c.getterName]=this[c.privateName]}),Object.assign(l,this.options_[a]),Object.assign(l,this.options_[i]),Object.assign(l,this.options_[t.toLowerCase()]),this.tag&&(l.tag=this.tag),o&&o.src===this.cache_.src&&this.cache_.currentTime>0&&(l.startTime=this.cache_.currentTime);const r=Fe.getTech(t);if(!r)throw new Error(`No Tech named '${a}' exists! '${a}' should be registered using videojs.registerTech()'`);this.tech_=new r(l),this.tech_.ready(pt(this,this.handleTechReady_),!0),im.jsonToTextTracks(this.textTracksJson_||[],this.tech_),B1.forEach(u=>{this.on(this.tech_,u,c=>this[`handleTech${Ct(u)}_`](c))}),Object.keys(kc).forEach(u=>{this.on(this.tech_,u,c=>{if(this.tech_.playbackRate()===0&&this.tech_.seeking()){this.queuedCallbacks_.push({callback:this[`handleTech${kc[u]}_`].bind(this),event:c});return}this[`handleTech${kc[u]}_`](c)})}),this.on(this.tech_,"loadstart",u=>this.handleTechLoadStart_(u)),this.on(this.tech_,"sourceset",u=>this.handleTechSourceset_(u)),this.on(this.tech_,"waiting",u=>this.handleTechWaiting_(u)),this.on(this.tech_,"ended",u=>this.handleTechEnded_(u)),this.on(this.tech_,"seeking",u=>this.handleTechSeeking_(u)),this.on(this.tech_,"play",u=>this.handleTechPlay_(u)),this.on(this.tech_,"pause",u=>this.handleTechPause_(u)),this.on(this.tech_,"durationchange",u=>this.handleTechDurationChange_(u)),this.on(this.tech_,"fullscreenchange",(u,c)=>this.handleTechFullscreenChange_(u,c)),this.on(this.tech_,"fullscreenerror",(u,c)=>this.handleTechFullscreenError_(u,c)),this.on(this.tech_,"enterpictureinpicture",u=>this.handleTechEnterPictureInPicture_(u)),this.on(this.tech_,"leavepictureinpicture",u=>this.handleTechLeavePictureInPicture_(u)),this.on(this.tech_,"error",u=>this.handleTechError_(u)),this.on(this.tech_,"posterchange",u=>this.handleTechPosterChange_(u)),this.on(this.tech_,"textdata",u=>this.handleTechTextData_(u)),this.on(this.tech_,"ratechange",u=>this.handleTechRateChange_(u)),this.on(this.tech_,"loadedmetadata",this.boundUpdateStyleEl_),this.usingNativeControls(this.techGet_("controls")),this.controls()&&!this.usingNativeControls()&&this.addTechControlsListeners_(),this.tech_.el().parentNode!==this.el()&&(a!=="Html5"||!this.tag)&&Zc(this.tech_.el(),this.el()),this.tag&&(this.tag.player=null,this.tag=null)}unloadTech_(){fn.names.forEach(t=>{const o=fn[t];this[o.privateName]=this[o.getterName]()}),this.textTracksJson_=im.textTracksToJson(this.tech_),this.isReady_=!1,this.tech_.dispose(),this.tech_=!1,this.isPosterFromTech_&&(this.poster_="",this.trigger("posterchange")),this.isPosterFromTech_=!1}tech(t){return t===void 0&&Ge.warn(`Using the tech directly can be dangerous. I hope you know what you're doing.
|
|
206
|
+
See https://github.com/videojs/video.js/issues/2617 for more info.
|
|
207
|
+
`),this.tech_}version(){return{"video.js":Qc}}addTechControlsListeners_(){this.removeTechControlsListeners_(),this.on(this.tech_,"click",this.boundHandleTechClick_),this.on(this.tech_,"dblclick",this.boundHandleTechDoubleClick_),this.on(this.tech_,"touchstart",this.boundHandleTechTouchStart_),this.on(this.tech_,"touchmove",this.boundHandleTechTouchMove_),this.on(this.tech_,"touchend",this.boundHandleTechTouchEnd_),this.on(this.tech_,"tap",this.boundHandleTechTap_)}removeTechControlsListeners_(){this.off(this.tech_,"tap",this.boundHandleTechTap_),this.off(this.tech_,"touchstart",this.boundHandleTechTouchStart_),this.off(this.tech_,"touchmove",this.boundHandleTechTouchMove_),this.off(this.tech_,"touchend",this.boundHandleTechTouchEnd_),this.off(this.tech_,"click",this.boundHandleTechClick_),this.off(this.tech_,"dblclick",this.boundHandleTechDoubleClick_)}handleTechReady_(){this.triggerReady(),this.cache_.volume&&this.techCall_("setVolume",this.cache_.volume),this.handleTechPosterChange_(),this.handleTechDurationChange_()}handleTechLoadStart_(){this.removeClass("vjs-ended","vjs-seeking"),this.error(null),this.handleTechDurationChange_(),this.paused()?(this.hasStarted(!1),this.trigger("loadstart")):this.trigger("loadstart"),this.manualAutoplay_(this.autoplay()===!0&&this.options_.normalizeAutoplay?"play":this.autoplay())}manualAutoplay_(t){if(!this.tech_||typeof t!="string")return;const o=()=>{const i=this.muted();this.muted(!0);const s=()=>{this.muted(i)};this.playTerminatedQueue_.push(s);const l=this.play();if(il(l))return l.catch(r=>{throw s(),new Error(`Rejection at manualAutoplay. Restoring muted value. ${r||""}`)})};let a;if(t==="any"&&!this.muted()?(a=this.play(),il(a)&&(a=a.catch(o))):t==="muted"&&!this.muted()?a=o():a=this.play(),!!il(a))return a.then(()=>{this.trigger({type:"autoplay-success",autoplay:t})}).catch(()=>{this.trigger({type:"autoplay-failure",autoplay:t})})}updateSourceCaches_(t=""){let o=t,a="";typeof o!="string"&&(o=t.src,a=t.type),this.cache_.source=this.cache_.source||{},this.cache_.sources=this.cache_.sources||[],o&&!a&&(a=eX(this,o)),this.cache_.source=ut({},t,{src:o,type:a});const i=this.cache_.sources.filter(u=>u.src&&u.src===o),s=[],l=this.$$("source"),r=[];for(let u=0;u<l.length;u++){const c=ga(l[u]);s.push(c),c.src&&c.src===o&&r.push(c.src)}r.length&&!i.length?this.cache_.sources=s:i.length||(this.cache_.sources=[this.cache_.source]),this.cache_.src=o}handleTechSourceset_(t){if(!this.changingSrc_){let o=s=>this.updateSourceCaches_(s);const a=this.currentSource().src,i=t.src;a&&!/^blob:/.test(a)&&/^blob:/.test(i)&&(!this.lastSource_||this.lastSource_.tech!==i&&this.lastSource_.player!==a)&&(o=()=>{}),o(i),t.src||this.tech_.any(["sourceset","loadstart"],s=>{if(s.type==="sourceset")return;const l=this.techGet_("currentSrc");this.lastSource_.tech=l,this.updateSourceCaches_(l)})}this.lastSource_={player:this.currentSource().src,tech:t.src},this.trigger({src:t.src,type:"sourceset"})}hasStarted(t){if(t===void 0)return this.hasStarted_;t!==this.hasStarted_&&(this.hasStarted_=t,this.hasStarted_?this.addClass("vjs-has-started"):this.removeClass("vjs-has-started"))}handleTechPlay_(){this.removeClass("vjs-ended","vjs-paused"),this.addClass("vjs-playing"),this.hasStarted(!0),this.trigger("play")}handleTechRateChange_(){this.tech_.playbackRate()>0&&this.cache_.lastPlaybackRate===0&&(this.queuedCallbacks_.forEach(t=>t.callback(t.event)),this.queuedCallbacks_=[]),this.cache_.lastPlaybackRate=this.tech_.playbackRate(),this.trigger("ratechange")}handleTechWaiting_(){this.addClass("vjs-waiting"),this.trigger("waiting");const t=this.currentTime(),o=()=>{t!==this.currentTime()&&(this.removeClass("vjs-waiting"),this.off("timeupdate",o))};this.on("timeupdate",o)}handleTechCanPlay_(){this.removeClass("vjs-waiting"),this.trigger("canplay")}handleTechCanPlayThrough_(){this.removeClass("vjs-waiting"),this.trigger("canplaythrough")}handleTechPlaying_(){this.removeClass("vjs-waiting"),this.trigger("playing")}handleTechSeeking_(){this.addClass("vjs-seeking"),this.trigger("seeking")}handleTechSeeked_(){this.removeClass("vjs-seeking","vjs-ended"),this.trigger("seeked")}handleTechPause_(){this.removeClass("vjs-playing"),this.addClass("vjs-paused"),this.trigger("pause")}handleTechEnded_(){this.addClass("vjs-ended"),this.removeClass("vjs-waiting"),this.options_.loop?(this.currentTime(0),this.play()):this.paused()||this.pause(),this.trigger("ended")}handleTechDurationChange_(){this.duration(this.techGet_("duration"))}handleTechClick_(t){this.controls_&&(this.options_===void 0||this.options_.userActions===void 0||this.options_.userActions.click===void 0||this.options_.userActions.click!==!1)&&(this.options_!==void 0&&this.options_.userActions!==void 0&&typeof this.options_.userActions.click=="function"?this.options_.userActions.click.call(this,t):this.paused()?ko(this.play()):this.pause())}handleTechDoubleClick_(t){if(!this.controls_)return;Array.prototype.some.call(this.$$(".vjs-control-bar, .vjs-modal-dialog"),a=>a.contains(t.target))||(this.options_===void 0||this.options_.userActions===void 0||this.options_.userActions.doubleClick===void 0||this.options_.userActions.doubleClick!==!1)&&(this.options_!==void 0&&this.options_.userActions!==void 0&&typeof this.options_.userActions.doubleClick=="function"?this.options_.userActions.doubleClick.call(this,t):this.isInPictureInPicture()&&!ge.pictureInPictureElement?this.exitPictureInPicture():this.isFullscreen()?this.exitFullscreen():this.requestFullscreen())}handleTechTap_(){this.userActive(!this.userActive())}handleTechTouchStart_(){this.userWasActive=this.userActive()}handleTechTouchMove_(){this.userWasActive&&this.reportUserActivity()}handleTechTouchEnd_(t){t.cancelable&&t.preventDefault()}toggleFullscreenClass_(){this.isFullscreen()?this.addClass("vjs-fullscreen"):this.removeClass("vjs-fullscreen")}documentFullscreenChange_(t){const o=t.target.player;if(o&&o!==this)return;const a=this.el();let i=ge[this.fsApi_.fullscreenElement]===a;!i&&a.matches&&(i=a.matches(":"+this.fsApi_.fullscreen)),this.isFullscreen(i)}handleTechFullscreenChange_(t,o){o&&(o.nativeIOSFullscreen&&(this.addClass("vjs-ios-native-fs"),this.tech_.one("webkitendfullscreen",()=>{this.removeClass("vjs-ios-native-fs")})),this.isFullscreen(o.isFullscreen))}handleTechFullscreenError_(t,o){this.trigger("fullscreenerror",o)}togglePictureInPictureClass_(){this.isInPictureInPicture()?this.addClass("vjs-picture-in-picture"):this.removeClass("vjs-picture-in-picture")}handleTechEnterPictureInPicture_(t){this.isInPictureInPicture(!0)}handleTechLeavePictureInPicture_(t){this.isInPictureInPicture(!1)}handleTechError_(){const t=this.tech_.error();t&&this.error(t)}handleTechTextData_(){let t=null;arguments.length>1&&(t=arguments[1]),this.trigger("textdata",t)}getCache(){return this.cache_}resetCache_(){this.cache_={currentTime:0,initTime:0,inactivityTimeout:this.options_.inactivityTimeout,duration:NaN,lastVolume:1,lastPlaybackRate:this.defaultPlaybackRate(),media:null,src:"",source:{},sources:[],playbackRates:[],volume:1}}techCall_(t,o){this.ready(function(){if(t in YG)return GG(this.middleware_,this.tech_,t,o);if(t in Hf)return Ff(this.middleware_,this.tech_,t,o);try{this.tech_&&this.tech_[t](o)}catch(a){throw Ge(a),a}},!0)}techGet_(t){if(!(!this.tech_||!this.tech_.isReady_)){if(t in XG)return WG(this.middleware_,this.tech_,t);if(t in Hf)return Ff(this.middleware_,this.tech_,t);try{return this.tech_[t]()}catch(o){throw this.tech_[t]===void 0?(Ge(`Video.js: ${t} method not defined for ${this.techName_} playback technology.`,o),o):o.name==="TypeError"?(Ge(`Video.js: ${t} unavailable on ${this.techName_} playback technology element.`,o),this.tech_.isReady_=!1,o):(Ge(o),o)}}}play(){return new Promise(t=>{this.play_(t)})}play_(t=ko){this.playCallbacks_.push(t);const o=!!(!this.changingSrc_&&(this.src()||this.currentSrc())),a=!!(Vu||en);if(this.waitToPlay_&&(this.off(["ready","loadstart"],this.waitToPlay_),this.waitToPlay_=null),!this.isReady_||!o){this.waitToPlay_=l=>{this.play_()},this.one(["ready","loadstart"],this.waitToPlay_),!o&&a&&this.load();return}const i=this.techGet_("play");a&&this.hasClass("vjs-ended")&&this.resetProgressBar_(),i===null?this.runPlayTerminatedQueue_():this.runPlayCallbacks_(i)}runPlayTerminatedQueue_(){const t=this.playTerminatedQueue_.slice(0);this.playTerminatedQueue_=[],t.forEach(function(o){o()})}runPlayCallbacks_(t){const o=this.playCallbacks_.slice(0);this.playCallbacks_=[],this.playTerminatedQueue_=[],o.forEach(function(a){a(t)})}pause(){this.techCall_("pause")}paused(){return this.techGet_("paused")!==!1}played(){return this.techGet_("played")||mo(0,0)}scrubbing(t){if(typeof t>"u")return this.scrubbing_;this.scrubbing_=!!t,this.techCall_("setScrubbing",this.scrubbing_),t?this.addClass("vjs-scrubbing"):this.removeClass("vjs-scrubbing")}currentTime(t){if(t===void 0)return this.cache_.currentTime=this.techGet_("currentTime")||0,this.cache_.currentTime;if(t<0&&(t=0),!this.isReady_||this.changingSrc_||!this.tech_||!this.tech_.isReady_){this.cache_.initTime=t,this.off("canplay",this.boundApplyInitTime_),this.one("canplay",this.boundApplyInitTime_);return}this.techCall_("setCurrentTime",t),this.cache_.initTime=0,isFinite(t)&&(this.cache_.currentTime=Number(t))}applyInitTime_(){this.currentTime(this.cache_.initTime)}duration(t){if(t===void 0)return this.cache_.duration!==void 0?this.cache_.duration:NaN;t=parseFloat(t),t<0&&(t=1/0),t!==this.cache_.duration&&(this.cache_.duration=t,t===1/0?this.addClass("vjs-live"):this.removeClass("vjs-live"),isNaN(t)||this.trigger("durationchange"))}remainingTime(){return this.duration()-this.currentTime()}remainingTimeDisplay(){return Math.floor(this.duration())-Math.floor(this.currentTime())}buffered(){let t=this.techGet_("buffered");return(!t||!t.length)&&(t=mo(0,0)),t}seekable(){let t=this.techGet_("seekable");return(!t||!t.length)&&(t=mo(0,0)),t}seeking(){return this.techGet_("seeking")}ended(){return this.techGet_("ended")}networkState(){return this.techGet_("networkState")}readyState(){return this.techGet_("readyState")}bufferedPercent(){return X0(this.buffered(),this.duration())}bufferedEnd(){const t=this.buffered(),o=this.duration();let a=t.end(t.length-1);return a>o&&(a=o),a}volume(t){let o;if(t!==void 0){o=Math.max(0,Math.min(1,t)),this.cache_.volume=o,this.techCall_("setVolume",o),o>0&&this.lastVolume_(o);return}return o=parseFloat(this.techGet_("volume")),isNaN(o)?1:o}muted(t){if(t!==void 0){this.techCall_("setMuted",t);return}return this.techGet_("muted")||!1}defaultMuted(t){return t!==void 0&&this.techCall_("setDefaultMuted",t),this.techGet_("defaultMuted")||!1}lastVolume_(t){if(t!==void 0&&t!==0){this.cache_.lastVolume=t;return}return this.cache_.lastVolume}supportsFullScreen(){return this.techGet_("supportsFullScreen")||!1}isFullscreen(t){if(t!==void 0){const o=this.isFullscreen_;this.isFullscreen_=!!t,this.isFullscreen_!==o&&this.fsApi_.prefixed&&this.trigger("fullscreenchange"),this.toggleFullscreenClass_();return}return this.isFullscreen_}requestFullscreen(t){this.isInPictureInPicture()&&this.exitPictureInPicture();const o=this;return new Promise((a,i)=>{function s(){o.off("fullscreenerror",r),o.off("fullscreenchange",l)}function l(){s(),a()}function r(c,f){s(),i(f)}o.one("fullscreenchange",l),o.one("fullscreenerror",r);const u=o.requestFullscreenHelper_(t);u&&(u.then(s,s),u.then(a,i))})}requestFullscreenHelper_(t){let o;if(this.fsApi_.prefixed||(o=this.options_.fullscreen&&this.options_.fullscreen.options||{},t!==void 0&&(o=t)),this.fsApi_.requestFullscreen){const a=this.el_[this.fsApi_.requestFullscreen](o);return a&&a.then(()=>this.isFullscreen(!0),()=>this.isFullscreen(!1)),a}else this.tech_.supportsFullScreen()&&!this.options_.preferFullWindow?this.techCall_("enterFullScreen"):this.enterFullWindow()}exitFullscreen(){const t=this;return new Promise((o,a)=>{function i(){t.off("fullscreenerror",l),t.off("fullscreenchange",s)}function s(){i(),o()}function l(u,c){i(),a(c)}t.one("fullscreenchange",s),t.one("fullscreenerror",l);const r=t.exitFullscreenHelper_();r&&(r.then(i,i),r.then(o,a))})}exitFullscreenHelper_(){if(this.fsApi_.requestFullscreen){const t=ge[this.fsApi_.exitFullscreen]();return t&&ko(t.then(()=>this.isFullscreen(!1))),t}else this.tech_.supportsFullScreen()&&!this.options_.preferFullWindow?this.techCall_("exitFullScreen"):this.exitFullWindow()}enterFullWindow(){this.isFullscreen(!0),this.isFullWindow=!0,this.docOrigOverflow=ge.documentElement.style.overflow,qn(ge,"keydown",this.boundFullWindowOnEscKey_),ge.documentElement.style.overflow="hidden",qa(ge.body,"vjs-full-window"),this.trigger("enterFullWindow")}fullWindowOnEscKey(t){t.key==="Escape"&&this.isFullscreen()===!0&&(this.isFullWindow?this.exitFullWindow():this.exitFullscreen())}exitFullWindow(){this.isFullscreen(!1),this.isFullWindow=!1,tn(ge,"keydown",this.boundFullWindowOnEscKey_),ge.documentElement.style.overflow=this.docOrigOverflow,Cu(ge.body,"vjs-full-window"),this.trigger("exitFullWindow")}disablePictureInPicture(t){if(t===void 0)return this.techGet_("disablePictureInPicture");this.techCall_("setDisablePictureInPicture",t),this.options_.disablePictureInPicture=t,this.trigger("disablepictureinpicturechanged")}isInPictureInPicture(t){if(t!==void 0){this.isInPictureInPicture_=!!t,this.togglePictureInPictureClass_();return}return!!this.isInPictureInPicture_}requestPictureInPicture(){if(this.options_.enableDocumentPictureInPicture&&X.documentPictureInPicture){const t=ge.createElement(this.el().tagName);return t.classList=this.el().classList,t.classList.add("vjs-pip-container"),this.posterImage&&t.appendChild(this.posterImage.el().cloneNode(!0)),this.titleBar&&t.appendChild(this.titleBar.el().cloneNode(!0)),t.appendChild(Le("p",{className:"vjs-pip-text"},{},this.localize("Playing in picture-in-picture"))),X.documentPictureInPicture.requestWindow({width:this.videoWidth(),height:this.videoHeight()}).then(o=>(L0(o),this.el_.parentNode.insertBefore(t,this.el_),o.document.body.appendChild(this.el_),o.document.body.classList.add("vjs-pip-window"),this.player_.isInPictureInPicture(!0),this.player_.trigger({type:"enterpictureinpicture",pipWindow:o}),o.addEventListener("pagehide",a=>{const i=a.target.querySelector(".video-js");t.parentNode.replaceChild(i,t),this.player_.isInPictureInPicture(!1),this.player_.trigger("leavepictureinpicture")}),o))}return"pictureInPictureEnabled"in ge&&this.disablePictureInPicture()===!1?this.techGet_("requestPictureInPicture"):Promise.reject("No PiP mode is available")}exitPictureInPicture(){if(X.documentPictureInPicture&&X.documentPictureInPicture.window)return X.documentPictureInPicture.window.close(),Promise.resolve();if("pictureInPictureEnabled"in ge)return ge.exitPictureInPicture()}handleKeyDown(t){const{userActions:o}=this.options_;!o||!o.hotkeys||(i=>{const s=i.tagName.toLowerCase();if(i.isContentEditable)return!0;const l=["button","checkbox","hidden","radio","reset","submit"];return s==="input"?l.indexOf(i.type)===-1:["textarea"].indexOf(s)!==-1})(this.el_.ownerDocument.activeElement)||(typeof o.hotkeys=="function"?o.hotkeys.call(this,t):this.handleHotkeys(t))}handleHotkeys(t){const o=this.options_.userActions?this.options_.userActions.hotkeys:{},{fullscreenKey:a=l=>t.key.toLowerCase()==="f",muteKey:i=l=>t.key.toLowerCase()==="m",playPauseKey:s=l=>t.key.toLowerCase()==="k"||t.key.toLowerCase()===" "}=o;if(a.call(this,t)){t.preventDefault(),t.stopPropagation();const l=re.getComponent("FullscreenToggle");ge[this.fsApi_.fullscreenEnabled]!==!1&&l.prototype.handleClick.call(this,t)}else i.call(this,t)?(t.preventDefault(),t.stopPropagation(),re.getComponent("MuteToggle").prototype.handleClick.call(this,t)):s.call(this,t)&&(t.preventDefault(),t.stopPropagation(),re.getComponent("PlayToggle").prototype.handleClick.call(this,t))}canPlayType(t){let o;for(let a=0,i=this.options_.techOrder;a<i.length;a++){const s=i[a];let l=Fe.getTech(s);if(l||(l=re.getComponent(s)),!l){Ge.error(`The "${s}" tech is undefined. Skipped browser support check for that tech.`);continue}if(l.isSupported()&&(o=l.canPlayType(t),o))return o}return""}selectSource(t){const o=this.options_.techOrder.map(r=>[r,Fe.getTech(r)]).filter(([r,u])=>u?u.isSupported():(Ge.error(`The "${r}" tech is undefined. Skipped browser support check for that tech.`),!1)),a=function(r,u,c){let f;return r.some(m=>u.some(d=>{if(f=c(m,d),f)return!0})),f};let i;const s=r=>(u,c)=>r(c,u),l=([r,u],c)=>{if(u.canPlaySource(c,this.options_[r.toLowerCase()]))return{source:c,tech:r}};return this.options_.sourceOrder?i=a(t,o,s(l)):i=a(o,t,l),i||!1}handleSrc_(t,o){if(typeof t>"u")return this.cache_.src||"";this.resetRetryOnError_&&this.resetRetryOnError_();const a=e1(t);if(!a.length){this.setTimeout(function(){this.error({code:4,message:this.options_.notSupportedMessage})},0);return}if(this.changingSrc_=!0,o||(this.cache_.sources=a),this.updateSourceCaches_(a[0]),zG(this,a[0],(i,s)=>{if(this.middleware_=s,o||(this.cache_.sources=a),this.updateSourceCaches_(i),this.src_(i)){if(a.length>1)return this.handleSrc_(a.slice(1));this.changingSrc_=!1,this.setTimeout(function(){this.error({code:4,message:this.options_.notSupportedMessage})},0),this.triggerReady();return}qG(s,this.tech_)}),a.length>1){const i=()=>{this.error(null),this.handleSrc_(a.slice(1),!0)},s=()=>{this.off("error",i)};this.one("error",i),this.one("playing",s),this.resetRetryOnError_=()=>{this.off("error",i),this.off("playing",s)}}}src(t){return this.handleSrc_(t,!1)}src_(t){const o=this.selectSource([t]);return o?z0(o.tech,this.techName_)?(this.ready(function(){this.tech_.constructor.prototype.hasOwnProperty("setSource")?this.techCall_("setSource",t):this.techCall_("src",t.src),this.changingSrc_=!1},!0),!1):(this.changingSrc_=!0,this.loadTech_(o.tech,o.source),this.tech_.ready(()=>{this.changingSrc_=!1}),!1):!0}addSourceElement(t,o){return this.tech_?this.tech_.addSourceElement(t,o):!1}removeSourceElement(t){return this.tech_?this.tech_.removeSourceElement(t):!1}load(){if(this.tech_&&this.tech_.vhs){this.src(this.currentSource());return}this.techCall_("load")}reset(){if(this.paused())this.doReset_();else{const t=this.play();ko(t.then(()=>this.doReset_()))}}doReset_(){this.tech_&&this.tech_.clearTracks("text"),this.removeClass("vjs-playing"),this.addClass("vjs-paused"),this.resetCache_(),this.poster(""),this.loadTech_(this.options_.techOrder[0],null),this.techCall_("reset"),this.resetControlBarUI_(),this.error(null),this.titleBar&&this.titleBar.update({title:void 0,description:void 0}),Xo(this)&&this.trigger("playerreset")}resetControlBarUI_(){this.resetProgressBar_(),this.resetPlaybackRate_(),this.resetVolumeBar_()}resetProgressBar_(){this.currentTime(0);const{currentTimeDisplay:t,durationDisplay:o,progressControl:a,remainingTimeDisplay:i}=this.controlBar||{},{seekBar:s}=a||{};t&&t.updateContent(),o&&o.updateContent(),i&&i.updateContent(),s&&(s.update(),s.loadProgressBar&&s.loadProgressBar.update())}resetPlaybackRate_(){this.playbackRate(this.defaultPlaybackRate()),this.handleTechRateChange_()}resetVolumeBar_(){this.volume(1),this.trigger("volumechange")}currentSources(){const t=this.currentSource(),o=[];return Object.keys(t).length!==0&&o.push(t),this.cache_.sources||o}currentSource(){return this.cache_.source||{}}currentSrc(){return this.currentSource()&&this.currentSource().src||""}currentType(){return this.currentSource()&&this.currentSource().type||""}preload(t){if(t!==void 0){this.techCall_("setPreload",t),this.options_.preload=t;return}return this.techGet_("preload")}autoplay(t){if(t===void 0)return this.options_.autoplay||!1;let o;typeof t=="string"&&/(any|play|muted)/.test(t)||t===!0&&this.options_.normalizeAutoplay?(this.options_.autoplay=t,this.manualAutoplay_(typeof t=="string"?t:"play"),o=!1):t?this.options_.autoplay=!0:this.options_.autoplay=!1,o=typeof o>"u"?this.options_.autoplay:o,this.tech_&&this.techCall_("setAutoplay",o)}playsinline(t){return t!==void 0&&(this.techCall_("setPlaysinline",t),this.options_.playsinline=t),this.techGet_("playsinline")}loop(t){if(t!==void 0){this.techCall_("setLoop",t),this.options_.loop=t;return}return this.techGet_("loop")}poster(t){if(t===void 0)return this.poster_;t||(t=""),t!==this.poster_&&(this.poster_=t,this.techCall_("setPoster",t),this.isPosterFromTech_=!1,this.trigger("posterchange"))}handleTechPosterChange_(){if((!this.poster_||this.options_.techCanOverridePoster)&&this.tech_&&this.tech_.poster){const t=this.tech_.poster()||"";t!==this.poster_&&(this.poster_=t,this.isPosterFromTech_=!0,this.trigger("posterchange"))}}controls(t){if(t===void 0)return!!this.controls_;t=!!t,this.controls_!==t&&(this.controls_=t,this.usingNativeControls()&&this.techCall_("setControls",t),this.controls_?(this.removeClass("vjs-controls-disabled"),this.addClass("vjs-controls-enabled"),this.trigger("controlsenabled"),this.usingNativeControls()||this.addTechControlsListeners_()):(this.removeClass("vjs-controls-enabled"),this.addClass("vjs-controls-disabled"),this.trigger("controlsdisabled"),this.usingNativeControls()||this.removeTechControlsListeners_()))}usingNativeControls(t){if(t===void 0)return!!this.usingNativeControls_;t=!!t,this.usingNativeControls_!==t&&(this.usingNativeControls_=t,this.usingNativeControls_?(this.addClass("vjs-using-native-controls"),this.trigger("usingnativecontrols")):(this.removeClass("vjs-using-native-controls"),this.trigger("usingcustomcontrols")))}error(t){if(t===void 0)return this.error_||null;if(Va("beforeerror").forEach(o=>{const a=o(this,t);if(!(Po(a)&&!Array.isArray(a)||typeof a=="string"||typeof a=="number"||a===null)){this.log.error("please return a value that MediaError expects in beforeerror hooks");return}t=a}),this.options_.suppressNotSupportedError&&t&&t.code===4){const o=function(){this.error(t)};this.options_.suppressNotSupportedError=!1,this.any(["click","touchstart"],o),this.one("loadstart",function(){this.off(["click","touchstart"],o)});return}if(t===null){this.error_=null,this.removeClass("vjs-error"),this.errorDisplay&&this.errorDisplay.close();return}this.error_=new Vt(t),this.addClass("vjs-error"),Ge.error(`(CODE:${this.error_.code} ${Vt.errorTypes[this.error_.code]})`,this.error_.message,this.error_),this.trigger("error"),Va("error").forEach(o=>o(this,this.error_))}reportUserActivity(t){this.userActivity_=!0}userActive(t){if(t===void 0)return this.userActive_;if(t=!!t,t!==this.userActive_){if(this.userActive_=t,this.userActive_){this.userActivity_=!0,this.removeClass("vjs-user-inactive"),this.addClass("vjs-user-active"),this.trigger("useractive");return}this.tech_&&this.tech_.one("mousemove",function(o){o.stopPropagation(),o.preventDefault()}),this.userActivity_=!1,this.removeClass("vjs-user-active"),this.addClass("vjs-user-inactive"),this.trigger("userinactive")}}listenForUserActivity_(){let t,o,a;const i=pt(this,this.reportUserActivity),s=function(m){(m.screenX!==o||m.screenY!==a)&&(o=m.screenX,a=m.screenY,i())},l=function(){i(),this.clearInterval(t),t=this.setInterval(i,250)},r=function(m){i(),this.clearInterval(t)};this.on("mousedown",l),this.on("mousemove",s),this.on("mouseup",r),this.on("mouseleave",r);const u=this.getChild("controlBar");u&&!en&&!po&&(u.on("mouseenter",function(m){this.player().options_.inactivityTimeout!==0&&(this.player().cache_.inactivityTimeout=this.player().options_.inactivityTimeout),this.player().options_.inactivityTimeout=0}),u.on("mouseleave",function(m){this.player().options_.inactivityTimeout=this.player().cache_.inactivityTimeout})),this.on("keydown",i),this.on("keyup",i);let c;const f=function(){if(!this.userActivity_)return;this.userActivity_=!1,this.userActive(!0),this.clearTimeout(c);const m=this.options_.inactivityTimeout;m<=0||(c=this.setTimeout(function(){this.userActivity_||this.userActive(!1)},m))};this.setInterval(f,250)}playbackRate(t){if(t!==void 0){this.techCall_("setPlaybackRate",t);return}return this.tech_&&this.tech_.featuresPlaybackRate?this.cache_.lastPlaybackRate||this.techGet_("playbackRate"):1}defaultPlaybackRate(t){return t!==void 0?this.techCall_("setDefaultPlaybackRate",t):this.tech_&&this.tech_.featuresPlaybackRate?this.techGet_("defaultPlaybackRate"):1}isAudio(t){if(t!==void 0){this.isAudio_=!!t;return}return!!this.isAudio_}updatePlayerHeightOnAudioOnlyMode_(){const t=this.getChild("ControlBar");!t||this.audioOnlyCache_.controlBarHeight===t.currentHeight()||(this.audioOnlyCache_.controlBarHeight=t.currentHeight(),this.height(this.audioOnlyCache_.controlBarHeight))}enableAudioOnlyUI_(){this.addClass("vjs-audio-only-mode");const t=this.children(),o=this.getChild("ControlBar"),a=o&&o.currentHeight();t.forEach(i=>{i!==o&&i.el_&&!i.hasClass("vjs-hidden")&&(i.hide(),this.audioOnlyCache_.hiddenChildren.push(i))}),this.audioOnlyCache_.playerHeight=this.currentHeight(),this.audioOnlyCache_.controlBarHeight=a,this.on("playerresize",this.boundUpdatePlayerHeightOnAudioOnlyMode_),this.height(a),this.trigger("audioonlymodechange")}disableAudioOnlyUI_(){this.removeClass("vjs-audio-only-mode"),this.off("playerresize",this.boundUpdatePlayerHeightOnAudioOnlyMode_),this.audioOnlyCache_.hiddenChildren.forEach(t=>t.show()),this.height(this.audioOnlyCache_.playerHeight),this.trigger("audioonlymodechange")}audioOnlyMode(t){if(typeof t!="boolean"||t===this.audioOnlyMode_)return this.audioOnlyMode_;if(this.audioOnlyMode_=t,t){const o=[];return this.isInPictureInPicture()&&o.push(this.exitPictureInPicture()),this.isFullscreen()&&o.push(this.exitFullscreen()),this.audioPosterMode()&&o.push(this.audioPosterMode(!1)),Promise.all(o).then(()=>this.enableAudioOnlyUI_())}return Promise.resolve().then(()=>this.disableAudioOnlyUI_())}enablePosterModeUI_(){(this.tech_&&this.tech_).hide(),this.addClass("vjs-audio-poster-mode"),this.trigger("audiopostermodechange")}disablePosterModeUI_(){(this.tech_&&this.tech_).show(),this.removeClass("vjs-audio-poster-mode"),this.trigger("audiopostermodechange")}audioPosterMode(t){return typeof t!="boolean"||t===this.audioPosterMode_?this.audioPosterMode_:(this.audioPosterMode_=t,t?this.audioOnlyMode()?this.audioOnlyMode(!1).then(()=>{this.enablePosterModeUI_()}):Promise.resolve().then(()=>{this.enablePosterModeUI_()}):Promise.resolve().then(()=>{this.disablePosterModeUI_()}))}addTextTrack(t,o,a){if(this.tech_)return this.tech_.addTextTrack(t,o,a)}addRemoteTextTrack(t,o){if(this.tech_)return this.tech_.addRemoteTextTrack(t,o)}removeRemoteTextTrack(t={}){let{track:o}=t;if(o||(o=t),this.tech_)return this.tech_.removeRemoteTextTrack(o)}getVideoPlaybackQuality(){return this.techGet_("getVideoPlaybackQuality")}videoWidth(){return this.tech_&&this.tech_.videoWidth&&this.tech_.videoWidth()||0}videoHeight(){return this.tech_&&this.tech_.videoHeight&&this.tech_.videoHeight()||0}language(t){if(t===void 0)return this.language_;this.language_!==String(t).toLowerCase()&&(this.language_=String(t).toLowerCase(),Xo(this)&&this.trigger("languagechange"))}languages(){return ut(ot.prototype.options_.languages,this.languages_)}toJSON(){const t=ut(this.options_),o=t.tracks;t.tracks=[];for(let a=0;a<o.length;a++){let i=o[a];i=ut(i),i.player=void 0,t.tracks[a]=i}return t}createModal(t,o){o=o||{},o.content=t||"";const a=new is(this,o);return this.addChild(a),a.on("dispose",()=>{this.removeChild(a)}),a.open(),a}updateCurrentBreakpoint_(){if(!this.responsive())return;const t=this.currentBreakpoint(),o=this.currentWidth();for(let a=0;a<rm.length;a++){const i=rm[a],s=this.breakpoints_[i];if(o<=s){if(t===i)return;t&&this.removeClass(Tr[t]),this.addClass(Tr[i]),this.breakpoint_=i;break}}}removeCurrentBreakpoint_(){const t=this.currentBreakpointClass();this.breakpoint_="",t&&this.removeClass(t)}breakpoints(t){return t===void 0?Object.assign(this.breakpoints_):(this.breakpoint_="",this.breakpoints_=Object.assign({},PX,t),this.updateCurrentBreakpoint_(),Object.assign(this.breakpoints_))}responsive(t){if(t===void 0)return this.responsive_;t=!!t;const o=this.responsive_;if(t!==o)return this.responsive_=t,t?(this.on("playerresize",this.boundUpdateCurrentBreakpoint_),this.updateCurrentBreakpoint_()):(this.off("playerresize",this.boundUpdateCurrentBreakpoint_),this.removeCurrentBreakpoint_()),t}currentBreakpoint(){return this.breakpoint_}currentBreakpointClass(){return Tr[this.breakpoint_]||""}loadMedia(t,o){if(!t||typeof t!="object")return;const a=this.crossOrigin();this.reset(),this.cache_.media=ut(t);const{artist:i,artwork:s,description:l,poster:r,src:u,textTracks:c,title:f}=this.cache_.media;!s&&r&&(this.cache_.media.artwork=[{src:r,type:Qr(r)}]),a&&this.crossOrigin(a),u&&this.src(u),r&&this.poster(r),Array.isArray(c)&&c.forEach(m=>this.addRemoteTextTrack(m,!1)),this.titleBar&&this.titleBar.update({title:f,description:l||i||""}),this.ready(o)}getMedia(){if(!this.cache_.media){const t=this.poster(),o=this.currentSources(),a=Array.prototype.map.call(this.remoteTextTracks(),s=>({kind:s.kind,label:s.label,language:s.language,src:s.src})),i={src:o,textTracks:a};return t&&(i.poster=t,i.artwork=[{src:i.poster,type:Qr(i.poster)}]),i}return ut(this.cache_.media)}static getTagSettings(t){const o={sources:[],tracks:[]},a=ga(t),i=a["data-setup"];if(ol(t,"vjs-fill")&&(a.fill=!0),ol(t,"vjs-fluid")&&(a.fluid=!0),i!==null)try{Object.assign(a,JSON.parse(i||"{}"))}catch(s){Ge.error("data-setup",s)}if(Object.assign(o,a),t.hasChildNodes()){const s=t.childNodes;for(let l=0,r=s.length;l<r;l++){const u=s[l],c=u.nodeName.toLowerCase();c==="source"?o.sources.push(ga(u)):c==="track"&&o.tracks.push(ga(u))}}return o}debug(t){if(t===void 0)return this.debugEnabled_;t?(this.trigger("debugon"),this.previousLogLevel_=this.log.level,this.log.level("debug"),this.debugEnabled_=!0):(this.trigger("debugoff"),this.log.level(this.previousLogLevel_),this.previousLogLevel_=void 0,this.debugEnabled_=!1)}playbackRates(t){if(t===void 0)return this.cache_.playbackRates;Array.isArray(t)&&t.every(o=>typeof o=="number")&&(this.cache_.playbackRates=t,this.trigger("playbackrateschange"))}}ot.prototype.videoTracks=()=>{};ot.prototype.audioTracks=()=>{};ot.prototype.textTracks=()=>{};ot.prototype.remoteTextTracks=()=>{};ot.prototype.remoteTextTrackEls=()=>{};fn.names.forEach(function(n){const t=fn[n];ot.prototype[t.getterName]=function(){return this.tech_?this.tech_[t.getterName]():(this[t.privateName]=this[t.privateName]||new t.ListClass,this[t.privateName])}});ot.prototype.crossorigin=ot.prototype.crossOrigin;ot.players={};const Ps=X.navigator;ot.prototype.options_={techOrder:Fe.defaultTechOrder_,html5:{},enableSourceset:!0,inactivityTimeout:2e3,playbackRates:[],liveui:!1,children:["mediaLoader","posterImage","titleBar","textTrackDisplay","loadingSpinner","bigPlayButton","liveTracker","controlBar","errorDisplay","textTrackSettings","resizeManager"],language:Ps&&(Ps.languages&&Ps.languages[0]||Ps.userLanguage||Ps.language)||"en",languages:{},notSupportedMessage:"No compatible source was found for this media.",normalizeAutoplay:!1,fullscreen:{options:{navigationUI:"hide"}},breakpoints:{},responsive:!1,audioOnlyMode:!1,audioPosterMode:!1,spatialNavigation:{enabled:!1,horizontalSeek:!1},enableSmoothSeeking:!1,disableSeekWhileScrubbingOnMobile:!1,disableSeekWhileScrubbingOnSTV:!1};B1.forEach(function(n){ot.prototype[`handleTech${Ct(n)}_`]=function(){return this.trigger(n)}});re.registerComponent("Player",ot);const Jr="plugin",Ai="activePlugins_",Ci={},Zr=n=>Ci.hasOwnProperty(n),Nr=n=>Zr(n)?Ci[n]:void 0,D1=(n,t)=>{n[Ai]=n[Ai]||{},n[Ai][t]=!0},ed=(n,t,o)=>{const a=(o?"before":"")+"pluginsetup";n.trigger(a,t),n.trigger(a+":"+t.name,t)},$X=function(n,t){const o=function(){ed(this,{name:n,plugin:t,instance:null},!0);const a=t.apply(this,arguments);return D1(this,n),ed(this,{name:n,plugin:t,instance:a}),a};return Object.keys(t).forEach(function(a){o[a]=t[a]}),o},ag=(n,t)=>(t.prototype.name=n,function(...o){ed(this,{name:n,plugin:t,instance:null},!0);const a=new t(this,...o);return this[n]=()=>a,ed(this,a.getEventHash()),a});class Tn{constructor(t){if(this.constructor===Tn)throw new Error("Plugin must be sub-classed; not directly instantiated.");this.player=t,this.log||(this.log=this.player.log.createLogger(this.name)),sp(this),delete this.trigger,j0(this,this.constructor.defaultState),D1(t,this.name),this.dispose=this.dispose.bind(this),t.on("dispose",this.dispose)}version(){return this.constructor.VERSION}getEventHash(t={}){return t.name=this.name,t.plugin=this.constructor,t.instance=this,t}trigger(t,o={}){return as(this.eventBusEl_,t,this.getEventHash(o))}handleStateChanged(t){}dispose(){const{name:t,player:o}=this;this.trigger("dispose"),this.off(),o.off("dispose",this.dispose),o[Ai][t]=!1,this.player=this.state=null,o[t]=ag(t,Ci[t])}static isBasic(t){const o=typeof t=="string"?Nr(t):t;return typeof o=="function"&&!Tn.prototype.isPrototypeOf(o.prototype)}static registerPlugin(t,o){if(typeof t!="string")throw new Error(`Illegal plugin name, "${t}", must be a string, was ${typeof t}.`);if(Zr(t))Ge.warn(`A plugin named "${t}" already exists. You may want to avoid re-registering plugins!`);else if(ot.prototype.hasOwnProperty(t))throw new Error(`Illegal plugin name, "${t}", cannot share a name with an existing player method!`);if(typeof o!="function")throw new Error(`Illegal plugin for "${t}", must be a function, was ${typeof o}.`);return Ci[t]=o,t!==Jr&&(Tn.isBasic(o)?ot.prototype[t]=$X(t,o):ot.prototype[t]=ag(t,o)),o}static deregisterPlugin(t){if(t===Jr)throw new Error("Cannot de-register base plugin.");Zr(t)&&(delete Ci[t],delete ot.prototype[t])}static getPlugins(t=Object.keys(Ci)){let o;return t.forEach(a=>{const i=Nr(a);i&&(o=o||{},o[a]=i)}),o}static getPluginVersion(t){const o=Nr(t);return o&&o.VERSION||""}}Tn.getPlugin=Nr;Tn.BASE_PLUGIN_NAME=Jr;Tn.registerPlugin(Jr,Tn);ot.prototype.usingPlugin=function(n){return!!this[Ai]&&this[Ai][n]===!0};ot.prototype.hasPlugin=function(n){return!!Zr(n)};function AX(n,t){let o=!1;return function(...a){return o||Ge.warn(n),o=!0,t.apply(this,a)}}function ho(n,t,o,a){return AX(`${t} is deprecated and will be removed in ${n}.0; please use ${o} instead.`,a)}var LX={NetworkBadStatus:"networkbadstatus",NetworkRequestFailed:"networkrequestfailed",NetworkRequestAborted:"networkrequestaborted",NetworkRequestTimeout:"networkrequesttimeout",NetworkBodyParserFailed:"networkbodyparserfailed",StreamingHlsPlaylistParserError:"streaminghlsplaylistparsererror",StreamingDashManifestParserError:"streamingdashmanifestparsererror",StreamingContentSteeringParserError:"streamingcontentsteeringparsererror",StreamingVttParserError:"streamingvttparsererror",StreamingFailedToSelectNextSegment:"streamingfailedtoselectnextsegment",StreamingFailedToDecryptSegment:"streamingfailedtodecryptsegment",StreamingFailedToTransmuxSegment:"streamingfailedtotransmuxsegment",StreamingFailedToAppendSegment:"streamingfailedtoappendsegment",StreamingCodecsChangeError:"streamingcodecschangeerror"};const P1=n=>n.indexOf("#")===0?n.slice(1):n;function ie(n,t,o){let a=ie.getPlayer(n);if(a)return t&&Ge.warn(`Player "${n}" is already initialised. Options will not be applied.`),o&&a.ready(o),a;const i=typeof n=="string"?Ca("#"+P1(n)):n;if(!os(i))throw new TypeError("The element or ID supplied is not valid. (videojs)");const l=("getRootNode"in i?i.getRootNode()instanceof X.ShadowRoot:!1)?i.getRootNode():i.ownerDocument.body;(!i.ownerDocument.defaultView||!l.contains(i))&&Ge.warn("The element supplied is not included in the DOM"),t=t||{},t.restoreEl===!0&&(t.restoreEl=(i.parentNode&&i.parentNode.hasAttribute&&i.parentNode.hasAttribute("data-vjs-player")?i.parentNode:i).cloneNode(!0)),Va("beforesetup").forEach(u=>{const c=u(i,ut(t));if(!Po(c)||Array.isArray(c)){Ge.error("please return an object in beforesetup hooks");return}t=ut(t,c)});const r=re.getComponent("Player");return a=new r(i,t,o),Va("setup").forEach(u=>u(a)),a}ie.hooks_=Fo;ie.hooks=Va;ie.hook=fG;ie.hookOnce=gG;ie.removeHook=h0;if(X.VIDEOJS_NO_DYNAMIC_STYLE!==!0&&ns()){let n=Ca(".vjs-styles-defaults");if(!n){n=M0("vjs-styles-defaults");const t=Ca("head");t&&t.insertBefore(n,t.firstChild),U0(n,`
|
|
208
|
+
.video-js {
|
|
209
|
+
width: 300px;
|
|
210
|
+
height: 150px;
|
|
211
|
+
}
|
|
212
|
+
|
|
213
|
+
.vjs-fluid:not(.vjs-audio-only-mode) {
|
|
214
|
+
padding-top: 56.25%
|
|
215
|
+
}
|
|
216
|
+
`)}}tm(1,ie);ie.VERSION=Qc;ie.options=ot.prototype.options_;ie.getPlayers=()=>ot.players;ie.getPlayer=n=>{const t=ot.players;let o;if(typeof n=="string"){const a=P1(n),i=t[a];if(i)return i;o=Ca("#"+a)}else o=n;if(os(o)){const{player:a,playerId:i}=o;if(a||t[i])return a||t[i]}};ie.getAllPlayers=()=>Object.keys(ot.players).map(n=>ot.players[n]).filter(Boolean);ie.players=ot.players;ie.getComponent=re.getComponent;ie.registerComponent=(n,t)=>(Fe.isTech(t)&&Ge.warn(`The ${n} tech was registered as a component. It should instead be registered using videojs.registerTech(name, tech)`),re.registerComponent.call(re,n,t));ie.getTech=Fe.getTech;ie.registerTech=Fe.registerTech;ie.use=jG;Object.defineProperty(ie,"middleware",{value:{},writeable:!1,enumerable:!0});Object.defineProperty(ie.middleware,"TERMINATOR",{value:Kr,writeable:!1,enumerable:!0});ie.browser=V0;ie.obj=_G;ie.mergeOptions=ho(9,"videojs.mergeOptions","videojs.obj.merge",ut);ie.defineLazyProperty=ho(9,"videojs.defineLazyProperty","videojs.obj.defineLazyProperty",_u);ie.bind=ho(9,"videojs.bind","native Function.prototype.bind",pt);ie.registerPlugin=Tn.registerPlugin;ie.deregisterPlugin=Tn.deregisterPlugin;ie.plugin=(n,t)=>(Ge.warn("videojs.plugin() is deprecated; use videojs.registerPlugin() instead"),Tn.registerPlugin(n,t));ie.getPlugins=Tn.getPlugins;ie.getPlugin=Tn.getPlugin;ie.getPluginVersion=Tn.getPluginVersion;ie.addLanguage=function(n,t){return n=(""+n).toLowerCase(),ie.options.languages=ut(ie.options.languages,{[n]:t}),ie.options.languages[n]};ie.log=Ge;ie.createLogger=f0;ie.time=AG;ie.createTimeRange=ho(9,"videojs.createTimeRange","videojs.time.createTimeRanges",mo);ie.createTimeRanges=ho(9,"videojs.createTimeRanges","videojs.time.createTimeRanges",mo);ie.formatTime=ho(9,"videojs.formatTime","videojs.time.formatTime",Za);ie.setFormatTime=ho(9,"videojs.setFormatTime","videojs.time.setFormatTime",W0);ie.resetFormatTime=ho(9,"videojs.resetFormatTime","videojs.time.resetFormatTime",G0);ie.parseUrl=ho(9,"videojs.parseUrl","videojs.url.parseUrl",up);ie.isCrossOrigin=ho(9,"videojs.isCrossOrigin","videojs.url.isCrossOrigin",Du);ie.EventTarget=Wn;ie.any=ip;ie.on=qn;ie.one=Su;ie.off=tn;ie.trigger=as;ie.xhr=xv;ie.TrackList=ei;ie.TextTrack=Bl;ie.TextTrackList=rp;ie.AudioTrack=J0;ie.AudioTrackList=Y0;ie.VideoTrack=Z0;ie.VideoTrackList=K0;["isEl","isTextNode","createEl","hasClass","addClass","removeClass","toggleClass","setAttributes","getAttributes","emptyEl","appendContent","insertContent"].forEach(n=>{ie[n]=function(){return Ge.warn(`videojs.${n}() is deprecated; use videojs.dom.${n}() instead`),I0[n].apply(null,arguments)}});ie.computedStyle=ho(9,"videojs.computedStyle","videojs.dom.computedStyle",Qi);ie.dom=I0;ie.fn=NG;ie.num=uX;ie.str=PG;ie.url=FG;ie.Error=LX;/*! @name videojs-contrib-quality-levels @version 4.1.0 @license Apache-2.0 */class IX{constructor(t){let o=this;return o.id=t.id,o.label=o.id,o.width=t.width,o.height=t.height,o.bitrate=t.bandwidth,o.frameRate=t.frameRate,o.enabled_=t.enabled,Object.defineProperty(o,"enabled",{get(){return o.enabled_()},set(a){o.enabled_(a)}}),o}}class td extends ie.EventTarget{constructor(){super();let t=this;return t.levels_=[],t.selectedIndex_=-1,Object.defineProperty(t,"selectedIndex",{get(){return t.selectedIndex_}}),Object.defineProperty(t,"length",{get(){return t.levels_.length}}),t[Symbol.iterator]=()=>t.levels_.values(),t}addQualityLevel(t){let o=this.getQualityLevelById(t.id);if(o)return o;const a=this.levels_.length;return o=new IX(t),""+a in this||Object.defineProperty(this,a,{get(){return this.levels_[a]}}),this.levels_.push(o),this.trigger({qualityLevel:o,type:"addqualitylevel"}),o}removeQualityLevel(t){let o=null;for(let a=0,i=this.length;a<i;a++)if(this[a]===t){o=this.levels_.splice(a,1)[0],this.selectedIndex_===a?this.selectedIndex_=-1:this.selectedIndex_>a&&this.selectedIndex_--;break}return o&&this.trigger({qualityLevel:t,type:"removequalitylevel"}),o}getQualityLevelById(t){for(let o=0,a=this.length;o<a;o++){const i=this[o];if(i.id===t)return i}return null}dispose(){this.selectedIndex_=-1,this.levels_.length=0}}td.prototype.allowedEvents_={change:"change",addqualitylevel:"addqualitylevel",removequalitylevel:"removequalitylevel"};for(const n in td.prototype.allowedEvents_)td.prototype["on"+n]=null;var $1="4.1.0";const OX=function(n,t){const o=n.qualityLevels,a=new td,i=function(){a.dispose(),n.qualityLevels=o,n.off("dispose",i)};return n.on("dispose",i),n.qualityLevels=()=>a,n.qualityLevels.VERSION=$1,a},A1=function(n){return OX(this,ie.obj.merge({},n))};ie.registerPlugin("qualityLevels",A1);A1.VERSION=$1;/*! @name @videojs/http-streaming @version 3.17.2 @license Apache-2.0 */const kn=pu,nd=(n,t)=>t&&t.responseURL&&n!==t.responseURL?t.responseURL:n,so=n=>ie.log.debug?ie.log.debug.bind(ie,"VHS:",`${n} >`):function(){};function at(...n){const t=ie.obj||ie;return(t.merge||t.mergeOptions).apply(t,n)}function Wt(...n){const t=ie.time||ie;return(t.createTimeRanges||t.createTimeRanges).apply(t,n)}function MX(n){if(n.length===0)return"Buffered Ranges are empty";let t=`Buffered Ranges:
|
|
217
|
+
`;for(let o=0;o<n.length;o++){const a=n.start(o),i=n.end(o);t+=`${a} --> ${i}. Duration (${i-a})
|
|
218
|
+
`}return t}const Eo=1/30,To=Eo*3,L1=function(n,t){const o=[];let a;if(n&&n.length)for(a=0;a<n.length;a++)t(n.start(a),n.end(a))&&o.push([n.start(a),n.end(a)]);return Wt(o)},ki=function(n,t){return L1(n,function(o,a){return o-To<=t&&a+To>=t})},fr=function(n,t){return L1(n,function(o){return o-Eo>=t})},UX=function(n){if(n.length<2)return Wt();const t=[];for(let o=1;o<n.length;o++){const a=n.end(o-1),i=n.start(o);t.push([a,i])}return Wt(t)},RX=function(n,t){let o=null,a=null,i=0;const s=[],l=[];if(!n||!n.length||!t||!t.length)return Wt();let r=n.length;for(;r--;)s.push({time:n.start(r),type:"start"}),s.push({time:n.end(r),type:"end"});for(r=t.length;r--;)s.push({time:t.start(r),type:"start"}),s.push({time:t.end(r),type:"end"});for(s.sort(function(u,c){return u.time-c.time}),r=0;r<s.length;r++)s[r].type==="start"?(i++,i===2&&(o=s[r].time)):s[r].type==="end"&&(i--,i===1&&(a=s[r].time)),o!==null&&a!==null&&(l.push([o,a]),o=null,a=null);return Wt(l)},I1=n=>{const t=[];if(!n||!n.length)return"";for(let o=0;o<n.length;o++)t.push(n.start(o)+" => "+n.end(o));return t.join(", ")},FX=function(n,t,o=1){return((n.length?n.end(n.length-1):0)-t)/o},Ra=n=>{const t=[];for(let o=0;o<n.length;o++)t.push({start:n.start(o),end:n.end(o)});return t},HX=function(n,t){if(n===t)return!1;if(!n&&t||!t&&n||n.length!==t.length)return!0;for(let o=0;o<n.length;o++)if(n.start(o)!==t.start(o)||n.end(o)!==t.end(o))return!0;return!1},Ec=function(n){if(!(!n||!n.length||!n.end))return n.end(n.length-1)},Tp=function(n,t){let o=0;if(!n||!n.length)return o;for(let a=0;a<n.length;a++){const i=n.start(a),s=n.end(a);if(!(t>s)){if(t>i&&t<=s){o+=s-t;continue}o+=s-i}}return o},Np=(n,t)=>{if(!t.preload)return t.duration;let o=0;return(t.parts||[]).forEach(function(a){o+=a.duration}),(t.preloadHints||[]).forEach(function(a){a.type==="PART"&&(o+=n.partTargetDuration)}),o},dm=n=>(n.segments||[]).reduce((t,o,a)=>(o.parts?o.parts.forEach(function(i,s){t.push({duration:i.duration,segmentIndex:a,partIndex:s,part:i,segment:o})}):t.push({duration:o.duration,segmentIndex:a,partIndex:null,segment:o,part:null}),t),[]),O1=n=>{const t=n.segments&&n.segments.length&&n.segments[n.segments.length-1];return t&&t.parts||[]},M1=({preloadSegment:n})=>{if(!n)return;const{parts:t,preloadHints:o}=n;let a=(o||[]).reduce((i,s)=>i+(s.type==="PART"?1:0),0);return a+=t&&t.length?t.length:0,a},U1=(n,t)=>{if(t.endList)return 0;if(n&&n.suggestedPresentationDelay)return n.suggestedPresentationDelay;const o=O1(t).length>0;return o&&t.serverControl&&t.serverControl.partHoldBack?t.serverControl.partHoldBack:o&&t.partTargetDuration?t.partTargetDuration*3:t.serverControl&&t.serverControl.holdBack?t.serverControl.holdBack:t.targetDuration?t.targetDuration*3:0},jX=function(n,t){let o=0,a=t-n.mediaSequence,i=n.segments[a];if(i){if(typeof i.start<"u")return{result:i.start,precise:!0};if(typeof i.end<"u")return{result:i.end-i.duration,precise:!0}}for(;a--;){if(i=n.segments[a],typeof i.end<"u")return{result:o+i.end,precise:!0};if(o+=Np(n,i),typeof i.start<"u")return{result:o+i.start,precise:!0}}return{result:o,precise:!1}},zX=function(n,t){let o=0,a,i=t-n.mediaSequence;for(;i<n.segments.length;i++){if(a=n.segments[i],typeof a.start<"u")return{result:a.start-o,precise:!0};if(o+=Np(n,a),typeof a.end<"u")return{result:a.end-o,precise:!0}}return{result:-1,precise:!1}},R1=function(n,t,o){if(typeof t>"u"&&(t=n.mediaSequence+n.segments.length),t<n.mediaSequence)return 0;const a=jX(n,t);if(a.precise)return a.result;const i=zX(n,t);return i.precise?i.result:a.result+o},F1=function(n,t,o){if(!n)return 0;if(typeof o!="number"&&(o=0),typeof t>"u"){if(n.totalDuration)return n.totalDuration;if(!n.endList)return X.Infinity}return R1(n,t,o)},sl=function({defaultDuration:n,durationList:t,startIndex:o,endIndex:a}){let i=0;if(o>a&&([o,a]=[a,o]),o<0){for(let s=o;s<Math.min(0,a);s++)i+=n;o=0}for(let s=o;s<a;s++)i+=t[s].duration;return i},H1=function(n,t,o,a){if(!n||!n.segments)return null;if(n.endList)return F1(n);if(t===null)return null;t=t||0;let i=R1(n,n.mediaSequence+n.segments.length,t);return o&&(a=typeof a=="number"?a:U1(null,n),i-=a),Math.max(0,i)},qX=function(n,t,o){const i=t||0;let s=H1(n,t,!0,o);return s===null?Wt():(s<i&&(s=i),Wt(i,s))},WX=function({playlist:n,currentTime:t,startingSegmentIndex:o,startingPartIndex:a,startTime:i,exactManifestTimings:s}){let l=t-i;const r=dm(n);let u=0;for(let c=0;c<r.length;c++){const f=r[c];if(o===f.segmentIndex&&!(typeof a=="number"&&typeof f.partIndex=="number"&&a!==f.partIndex)){u=c;break}}if(l<0){if(u>0)for(let c=u-1;c>=0;c--){const f=r[c];if(l+=f.duration,s){if(l<0)continue}else if(l+Eo<=0)continue;return{partIndex:f.partIndex,segmentIndex:f.segmentIndex,startTime:i-sl({defaultDuration:n.targetDuration,durationList:r,startIndex:u,endIndex:c})}}return{partIndex:r[0]&&r[0].partIndex||null,segmentIndex:r[0]&&r[0].segmentIndex||0,startTime:t}}if(u<0){for(let c=u;c<0;c++)if(l-=n.targetDuration,l<0)return{partIndex:r[0]&&r[0].partIndex||null,segmentIndex:r[0]&&r[0].segmentIndex||0,startTime:t};u=0}for(let c=u;c<r.length;c++){const f=r[c];l-=f.duration;const m=f.duration>Eo,d=l===0,h=m&&l+Eo>=0;if(!((d||h)&&c!==r.length-1)){if(s){if(l>0)continue}else if(l-Eo>=0)continue;return{partIndex:f.partIndex,segmentIndex:f.segmentIndex,startTime:i+sl({defaultDuration:n.targetDuration,durationList:r,startIndex:u,endIndex:c})}}}return{segmentIndex:r[r.length-1].segmentIndex,partIndex:r[r.length-1].partIndex,startTime:t}},j1=function(n){return n.excludeUntil&&n.excludeUntil>Date.now()},Sp=function(n){return n.excludeUntil&&n.excludeUntil===1/0},Lu=function(n){const t=j1(n);return!n.disabled&&!t},GX=function(n){return n.disabled},XX=function(n){for(let t=0;t<n.segments.length;t++)if(n.segments[t].key)return!0;return!1},z1=function(n,t){return t.attributes&&t.attributes[n]},YX=function(n,t,o,a=0){return z1("BANDWIDTH",o)?(n*o.attributes.BANDWIDTH-a*8)/t:NaN},um=(n,t)=>{if(n.playlists.length===1)return!0;const o=t.attributes.BANDWIDTH||Number.MAX_VALUE;return n.playlists.filter(a=>Lu(a)?(a.attributes.BANDWIDTH||0)<o:!1).length===0},Bp=(n,t)=>!n&&!t||!n&&t||n&&!t?!1:!!(n===t||n.id&&t.id&&n.id===t.id||n.resolvedUri&&t.resolvedUri&&n.resolvedUri===t.resolvedUri||n.uri&&t.uri&&n.uri===t.uri),ig=function(n,t){const o=n&&n.mediaGroups&&n.mediaGroups.AUDIO||{};let a=!1;for(const i in o){for(const s in o[i])if(a=t(o[i][s]),a)break;if(a)break}return!!a},Al=n=>{if(!n||!n.playlists||!n.playlists.length)return ig(n,o=>o.playlists&&o.playlists.length||o.uri);for(let t=0;t<n.playlists.length;t++){const o=n.playlists[t],a=o.attributes&&o.attributes.CODECS;if(!(a&&a.split(",").every(s=>Nv(s))||ig(n,s=>Bp(o,s))))return!1}return!0};var En={liveEdgeDelay:U1,duration:F1,seekable:qX,getMediaInfoForTime:WX,isEnabled:Lu,isDisabled:GX,isExcluded:j1,isIncompatible:Sp,playlistEnd:H1,isAes:XX,hasAttribute:z1,estimateSegmentRequestTime:YX,isLowestEnabledRendition:um,isAudioOnly:Al,playlistMatch:Bp,segmentDurationWithParts:Np};const{log:q1}=ie,Li=(n,t)=>`${n}-${t}`,W1=(n,t,o)=>`placeholder-uri-${n}-${t}-${o}`,KX=({onwarn:n,oninfo:t,manifestString:o,customTagParsers:a=[],customTagMappers:i=[],llhls:s})=>{const l=new pq;n&&l.on("warn",n),t&&l.on("info",t),a.forEach(c=>l.addParser(c)),i.forEach(c=>l.addTagMapper(c)),l.push(o),l.end();const r=l.manifest;if(s||(["preloadSegment","skip","serverControl","renditionReports","partInf","partTargetDuration"].forEach(function(c){r.hasOwnProperty(c)&&delete r[c]}),r.segments&&r.segments.forEach(function(c){["parts","preloadHints"].forEach(function(f){c.hasOwnProperty(f)&&delete c[f]})})),!r.targetDuration){let c=10;r.segments&&r.segments.length&&(c=r.segments.reduce((f,m)=>Math.max(f,m.duration),0)),n&&n({message:`manifest has no targetDuration defaulting to ${c}`}),r.targetDuration=c}const u=O1(r);if(u.length&&!r.partTargetDuration){const c=u.reduce((f,m)=>Math.max(f,m.duration),0);n&&(n({message:`manifest has no partTargetDuration defaulting to ${c}`}),q1.error("LL-HLS manifest has parts but lacks required #EXT-X-PART-INF:PART-TARGET value. See https://datatracker.ietf.org/doc/html/draft-pantos-hls-rfc8216bis-09#section-4.4.3.7. Playback is not guaranteed.")),r.partTargetDuration=c}return r},rs=(n,t)=>{n.mediaGroups&&["AUDIO","SUBTITLES"].forEach(o=>{if(n.mediaGroups[o])for(const a in n.mediaGroups[o])for(const i in n.mediaGroups[o][a]){const s=n.mediaGroups[o][a][i];t(s,o,a,i)}})},G1=({playlist:n,uri:t,id:o})=>{n.id=o,n.playlistErrors_=0,t&&(n.uri=t),n.attributes=n.attributes||{}},QX=n=>{let t=n.playlists.length;for(;t--;){const o=n.playlists[t];G1({playlist:o,id:Li(t,o.uri)}),o.resolvedUri=kn(n.uri,o.uri),n.playlists[o.id]=o,n.playlists[o.uri]=o,o.attributes.BANDWIDTH||q1.warn("Invalid playlist STREAM-INF detected. Missing BANDWIDTH attribute.")}},JX=n=>{rs(n,t=>{t.uri&&(t.resolvedUri=kn(n.uri,t.uri))})},ZX=(n,t)=>{const o=Li(0,t),a={mediaGroups:{AUDIO:{},VIDEO:{},"CLOSED-CAPTIONS":{},SUBTITLES:{}},uri:X.location.href,resolvedUri:X.location.href,playlists:[{uri:t,id:o,resolvedUri:t,attributes:{}}]};return a.playlists[o]=a.playlists[0],a.playlists[t]=a.playlists[0],a},X1=(n,t,o=W1)=>{n.uri=t;for(let i=0;i<n.playlists.length;i++)if(!n.playlists[i].uri){const s=`placeholder-uri-${i}`;n.playlists[i].uri=s}const a=Al(n);rs(n,(i,s,l,r)=>{if(!i.playlists||!i.playlists.length){if(a&&s==="AUDIO"&&!i.uri)for(let u=0;u<n.playlists.length;u++){const c=n.playlists[u];if(c.attributes&&c.attributes.AUDIO&&c.attributes.AUDIO===l)return}i.playlists=[kt({},i)]}i.playlists.forEach(function(u,c){const f=o(s,l,r,u),m=Li(c,f);u.uri?u.resolvedUri=u.resolvedUri||kn(n.uri,u.uri):(u.uri=c===0?f:m,u.resolvedUri=u.uri),u.id=u.id||m,u.attributes=u.attributes||{},n.playlists[u.id]=u,n.playlists[u.uri]=u})}),QX(n),JX(n)};class sg{constructor(){this.offset_=null,this.pendingDateRanges_=new Map,this.processedDateRanges_=new Map}setOffset(t=[]){if(this.offset_!==null||!t.length)return;const[o]=t;o.programDateTime!==void 0&&(this.offset_=o.programDateTime/1e3)}setPendingDateRanges(t=[]){if(!t.length)return;const[o]=t,a=o.startDate.getTime();this.trimProcessedDateRanges_(a),this.pendingDateRanges_=t.reduce((i,s)=>(i.set(s.id,s),i),new Map)}processDateRange(t){this.pendingDateRanges_.delete(t.id),this.processedDateRanges_.set(t.id,t)}getDateRangesToProcess(){if(this.offset_===null)return[];const t={},o=[];this.pendingDateRanges_.forEach((a,i)=>{if(!this.processedDateRanges_.has(i)&&(a.startTime=a.startDate.getTime()/1e3-this.offset_,a.processDateRange=()=>this.processDateRange(a),o.push(a),!!a.class))if(t[a.class]){const s=t[a.class].push(a);a.classListIndex=s-1}else t[a.class]=[a],a.classListIndex=0});for(const a of o){const i=t[a.class]||[];a.endDate?a.endTime=a.endDate.getTime()/1e3-this.offset_:a.endOnNext&&i[a.classListIndex+1]?a.endTime=i[a.classListIndex+1].startTime:a.duration?a.endTime=a.startTime+a.duration:a.plannedDuration?a.endTime=a.startTime+a.plannedDuration:a.endTime=a.startTime}return o}trimProcessedDateRanges_(t){new Map(this.processedDateRanges_).forEach((a,i)=>{a.startDate.getTime()<t&&this.processedDateRanges_.delete(i)})}}const Y1=22,Xa=({requestType:n,request:t,error:o,parseFailure:a})=>{const i=t.status<200||t.status>299,s=t.status>=400&&t.status<=499,l={uri:t.uri,requestType:n},r=i&&!s||a;if(o&&s)l.error=kt({},o),l.errorType=ie.Error.NetworkRequestFailed;else if(t.aborted)l.errorType=ie.Error.NetworkRequestAborted;else if(t.timedout)l.errorType=ie.Error.NetworkRequestTimeout;else if(r){const u=a?ie.Error.NetworkBodyParserFailed:ie.Error.NetworkBadStatus;l.errorType=u,l.status=t.status,l.headers=t.headers}return l},eY=so("CodecUtils"),K1=function(n){const t=n.attributes||{};if(t.CODECS)return xo(t.CODECS)},Q1=(n,t)=>{const o=t.attributes||{};return n&&n.mediaGroups&&n.mediaGroups.AUDIO&&o.AUDIO&&n.mediaGroups.AUDIO[o.AUDIO]},tY=(n,t)=>{if(!Q1(n,t))return!0;const o=t.attributes||{},a=n.mediaGroups.AUDIO[o.AUDIO];for(const i in a)if(!a[i].uri&&!a[i].playlists)return!0;return!1},wl=function(n){const t={};return n.forEach(({mediaType:o,type:a,details:i})=>{t[o]=t[o]||[],t[o].push(Tv(`${a}${i}`))}),Object.keys(t).forEach(function(o){if(t[o].length>1){eY(`multiple ${o} codecs found as attributes: ${t[o].join(", ")}. Setting playlist codecs to null so that we wait for mux.js to probe segments for real codecs.`),t[o]=null;return}t[o]=t[o][0]}),t},lg=function(n){let t=0;return n.audio&&t++,n.video&&t++,t},ll=function(n,t){const o=t.attributes||{},a=wl(K1(t)||[]);if(Q1(n,t)&&!a.audio&&!tY(n,t)){const i=wl(fq(n,o.AUDIO)||[]);i.audio&&(a.audio=i.audio)}return a},{EventTarget:nY}=ie,oY=(n,t)=>{if(t.endList||!t.serverControl)return n;const o={};if(t.serverControl.canBlockReload){const{preloadSegment:a}=t;let i=t.mediaSequence+t.segments.length;if(a){const s=a.parts||[],l=M1(t)-1;l>-1&&l!==s.length-1&&(o._HLS_part=l),(l>-1||s.length)&&i--}o._HLS_msn=i}if(t.serverControl&&t.serverControl.canSkipUntil&&(o._HLS_skip=t.serverControl.canSkipDateranges?"v2":"YES"),Object.keys(o).length){const a=new X.URL(n);["_HLS_skip","_HLS_msn","_HLS_part"].forEach(function(i){o.hasOwnProperty(i)&&a.searchParams.set(i,o[i])}),n=a.toString()}return n},aY=(n,t)=>{if(!n)return t;const o=at(n,t);if(n.preloadHints&&!t.preloadHints&&delete o.preloadHints,n.parts&&!t.parts)delete o.parts;else if(n.parts&&t.parts)for(let a=0;a<t.parts.length;a++)n.parts&&n.parts[a]&&(o.parts[a]=at(n.parts[a],t.parts[a]));return!n.skipped&&t.skipped&&(o.skipped=!1),n.preload&&!t.preload&&(o.preload=!1),o},iY=(n,t,o)=>{const a=n.slice(),i=t.slice();o=o||0;const s=[];let l;for(let r=0;r<i.length;r++){const u=a[r+o],c=i[r];u?(l=u.map||l,s.push(aY(u,c))):(l&&!c.map&&(c.map=l),s.push(c))}return s},J1=(n,t)=>{!n.resolvedUri&&n.uri&&(n.resolvedUri=kn(t,n.uri)),n.key&&!n.key.resolvedUri&&(n.key.resolvedUri=kn(t,n.key.uri)),n.map&&!n.map.resolvedUri&&(n.map.resolvedUri=kn(t,n.map.uri)),n.map&&n.map.key&&!n.map.key.resolvedUri&&(n.map.key.resolvedUri=kn(t,n.map.key.uri)),n.parts&&n.parts.length&&n.parts.forEach(o=>{o.resolvedUri||(o.resolvedUri=kn(t,o.uri))}),n.preloadHints&&n.preloadHints.length&&n.preloadHints.forEach(o=>{o.resolvedUri||(o.resolvedUri=kn(t,o.uri))})},Z1=function(n){const t=n.segments||[],o=n.preloadSegment;if(o&&o.parts&&o.parts.length){if(o.preloadHints){for(let a=0;a<o.preloadHints.length;a++)if(o.preloadHints[a].type==="MAP")return t}o.duration=n.targetDuration,o.preload=!0,t.push(o)}return t},ey=(n,t)=>n===t||n.segments&&t.segments&&n.segments.length===t.segments.length&&n.endList===t.endList&&n.mediaSequence===t.mediaSequence&&n.preloadSegment===t.preloadSegment,cm=(n,t,o=ey)=>{const a=at(n,{}),i=a.playlists[t.id];if(!i||o(i,t))return null;t.segments=Z1(t);const s=at(i,t);if(s.preloadSegment&&!t.preloadSegment&&delete s.preloadSegment,i.segments){if(t.skip){t.segments=t.segments||[];for(let l=0;l<t.skip.skippedSegments;l++)t.segments.unshift({skipped:!0})}s.segments=iY(i.segments,t.segments,t.mediaSequence-i.mediaSequence)}s.segments.forEach(l=>{J1(l,s.resolvedUri)});for(let l=0;l<a.playlists.length;l++)a.playlists[l].id===t.id&&(a.playlists[l]=s);return a.playlists[t.id]=s,a.playlists[t.uri]=s,rs(n,(l,r,u,c)=>{if(l.playlists)for(let f=0;f<l.playlists.length;f++)t.id===l.playlists[f].id&&(l.playlists[f]=s)}),a},mm=(n,t)=>{const o=n.segments||[],a=o[o.length-1],i=a&&a.parts&&a.parts[a.parts.length-1],s=i&&i.duration||a&&a.duration;return t&&s?s*1e3:(n.partTargetDuration||n.targetDuration||10)*500},rg=(n,t,o)=>{if(!n)return;const a=[];return n.forEach(i=>{if(!i.attributes)return;const{BANDWIDTH:s,RESOLUTION:l,CODECS:r}=i.attributes;a.push({id:i.id,bandwidth:s,resolution:l,codecs:r})}),{type:t,isLive:o,renditions:a}};class Ei extends nY{constructor(t,o,a={}){if(super(),!t)throw new Error("A non-empty playlist URL or object is required");this.logger_=so("PlaylistLoader");const{withCredentials:i=!1}=a;this.src=t,this.vhs_=o,this.withCredentials=i,this.addDateRangesToTextTrack_=a.addDateRangesToTextTrack;const s=o.options_;this.customTagParsers=s&&s.customTagParsers||[],this.customTagMappers=s&&s.customTagMappers||[],this.llhls=s&&s.llhls,this.dateRangesStorage_=new sg,this.state="HAVE_NOTHING",this.handleMediaupdatetimeout_=this.handleMediaupdatetimeout_.bind(this),this.on("mediaupdatetimeout",this.handleMediaupdatetimeout_),this.on("loadedplaylist",this.handleLoadedPlaylist_.bind(this))}handleLoadedPlaylist_(){const t=this.media();if(!t)return;this.dateRangesStorage_.setOffset(t.segments),this.dateRangesStorage_.setPendingDateRanges(t.dateRanges);const o=this.dateRangesStorage_.getDateRangesToProcess();!o.length||!this.addDateRangesToTextTrack_||this.addDateRangesToTextTrack_(o)}handleMediaupdatetimeout_(){if(this.state!=="HAVE_METADATA")return;const t=this.media();let o=kn(this.main.uri,t.uri);this.llhls&&(o=oY(o,t)),this.state="HAVE_CURRENT_METADATA",this.request=this.vhs_.xhr({uri:o,withCredentials:this.withCredentials,requestType:"hls-playlist"},(a,i)=>{if(this.request){if(a)return this.playlistRequestError(this.request,this.media(),"HAVE_METADATA");this.haveMetadata({playlistString:this.request.responseText,url:this.media().uri,id:this.media().id})}})}playlistRequestError(t,o,a){const{uri:i,id:s}=o;this.request=null,a&&(this.state=a),this.error={playlist:this.main.playlists[s],status:t.status,message:`HLS playlist request error at URL: ${i}.`,responseText:t.responseText,code:t.status>=500?4:2,metadata:Xa({requestType:t.requestType,request:t,error:t.error})},this.trigger("error")}parseManifest_({url:t,manifestString:o}){try{const a=KX({onwarn:({message:i})=>this.logger_(`m3u8-parser warn for ${t}: ${i}`),oninfo:({message:i})=>this.logger_(`m3u8-parser info for ${t}: ${i}`),manifestString:o,customTagParsers:this.customTagParsers,customTagMappers:this.customTagMappers,llhls:this.llhls});return!a.playlists||!a.playlists.length||this.excludeAudioOnlyVariants(a.playlists),a}catch(a){this.error=a,this.error.metadata={errorType:ie.Error.StreamingHlsPlaylistParserError,error:a}}}excludeAudioOnlyVariants(t){const o=a=>{const i=a.attributes||{},{width:s,height:l}=i.RESOLUTION||{};if(s&&l)return!0;const r=K1(a)||[];return!!wl(r).video};t.some(o)&&t.forEach(a=>{o(a)||(a.excludeUntil=1/0)})}haveMetadata({playlistString:t,playlistObject:o,url:a,id:i}){this.request=null,this.state="HAVE_METADATA";const s={playlistInfo:{type:"media",uri:a}};this.trigger({type:"playlistparsestart",metadata:s});const l=o||this.parseManifest_({url:a,manifestString:t});l.lastRequest=Date.now(),G1({playlist:l,uri:a,id:i});const r=cm(this.main,l);this.targetDuration=l.partTargetDuration||l.targetDuration,this.pendingMedia_=null,r?(this.main=r,this.media_=this.main.playlists[i]):this.trigger("playlistunchanged"),this.updateMediaUpdateTimeout_(mm(this.media(),!!r)),s.parsedPlaylist=rg(this.main.playlists,s.playlistInfo.type,!this.media_.endList),this.trigger({type:"playlistparsecomplete",metadata:s}),this.trigger("loadedplaylist")}dispose(){this.trigger("dispose"),this.stopRequest(),X.clearTimeout(this.mediaUpdateTimeout),X.clearTimeout(this.finalRenditionTimeout),this.dateRangesStorage_=new sg,this.off()}stopRequest(){if(this.request){const t=this.request;this.request=null,t.onreadystatechange=null,t.abort()}}media(t,o){if(!t)return this.media_;if(this.state==="HAVE_NOTHING")throw new Error("Cannot switch media playlist from "+this.state);if(typeof t=="string"){if(!this.main.playlists[t])throw new Error("Unknown playlist URI: "+t);t=this.main.playlists[t]}if(X.clearTimeout(this.finalRenditionTimeout),o){const r=(t.partTargetDuration||t.targetDuration)/2*1e3||5e3;this.finalRenditionTimeout=X.setTimeout(this.media.bind(this,t,!1),r);return}const a=this.state,i=!this.media_||t.id!==this.media_.id,s=this.main.playlists[t.id];if(s&&s.endList||t.endList&&t.segments.length){this.request&&(this.request.onreadystatechange=null,this.request.abort(),this.request=null),this.state="HAVE_METADATA",this.media_=t,i&&(this.trigger("mediachanging"),a==="HAVE_MAIN_MANIFEST"?this.trigger("loadedmetadata"):this.trigger("mediachange"));return}if(this.updateMediaUpdateTimeout_(mm(t,!0)),!i)return;if(this.state="SWITCHING_MEDIA",this.request){if(t.resolvedUri===this.request.url)return;this.request.onreadystatechange=null,this.request.abort(),this.request=null}this.media_&&this.trigger("mediachanging"),this.pendingMedia_=t;const l={playlistInfo:{type:"media",uri:t.uri}};this.trigger({type:"playlistrequeststart",metadata:l}),this.request=this.vhs_.xhr({uri:t.resolvedUri,withCredentials:this.withCredentials,requestType:"hls-playlist"},(r,u)=>{if(this.request){if(t.lastRequest=Date.now(),t.resolvedUri=nd(t.resolvedUri,u),r)return this.playlistRequestError(this.request,t,a);this.trigger({type:"playlistrequestcomplete",metadata:l}),this.haveMetadata({playlistString:u.responseText,url:t.uri,id:t.id}),a==="HAVE_MAIN_MANIFEST"?this.trigger("loadedmetadata"):this.trigger("mediachange")}})}pause(){this.mediaUpdateTimeout&&(X.clearTimeout(this.mediaUpdateTimeout),this.mediaUpdateTimeout=null),this.stopRequest(),this.state==="HAVE_NOTHING"&&(this.started=!1),this.state==="SWITCHING_MEDIA"?this.media_?this.state="HAVE_METADATA":this.state="HAVE_MAIN_MANIFEST":this.state==="HAVE_CURRENT_METADATA"&&(this.state="HAVE_METADATA")}load(t){this.mediaUpdateTimeout&&(X.clearTimeout(this.mediaUpdateTimeout),this.mediaUpdateTimeout=null);const o=this.media();if(t){const a=o?(o.partTargetDuration||o.targetDuration)/2*1e3:5e3;this.mediaUpdateTimeout=X.setTimeout(()=>{this.mediaUpdateTimeout=null,this.load()},a);return}if(!this.started){this.start();return}o&&!o.endList?this.trigger("mediaupdatetimeout"):this.trigger("loadedplaylist")}updateMediaUpdateTimeout_(t){this.mediaUpdateTimeout&&(X.clearTimeout(this.mediaUpdateTimeout),this.mediaUpdateTimeout=null),!(!this.media()||this.media().endList)&&(this.mediaUpdateTimeout=X.setTimeout(()=>{this.mediaUpdateTimeout=null,this.trigger("mediaupdatetimeout"),this.updateMediaUpdateTimeout_(t)},t))}start(){if(this.started=!0,typeof this.src=="object"){this.src.uri||(this.src.uri=X.location.href),this.src.resolvedUri=this.src.uri,setTimeout(()=>{this.setupInitialPlaylist(this.src)},0);return}const t={playlistInfo:{type:"multivariant",uri:this.src}};this.trigger({type:"playlistrequeststart",metadata:t}),this.request=this.vhs_.xhr({uri:this.src,withCredentials:this.withCredentials,requestType:"hls-playlist"},(o,a)=>{if(!this.request)return;if(this.request=null,o)return this.error={status:a.status,message:`HLS playlist request error at URL: ${this.src}.`,responseText:a.responseText,code:2,metadata:Xa({requestType:a.requestType,request:a,error:o})},this.state==="HAVE_NOTHING"&&(this.started=!1),this.trigger("error");this.trigger({type:"playlistrequestcomplete",metadata:t}),this.src=nd(this.src,a),this.trigger({type:"playlistparsestart",metadata:t});const i=this.parseManifest_({manifestString:a.responseText,url:this.src});t.parsedPlaylist=rg(i.playlists,t.playlistInfo.type,!1),this.trigger({type:"playlistparsecomplete",metadata:t}),this.setupInitialPlaylist(i)})}srcUri(){return typeof this.src=="string"?this.src:this.src.uri}setupInitialPlaylist(t){if(this.state="HAVE_MAIN_MANIFEST",t.playlists){this.main=t,X1(this.main,this.srcUri()),t.playlists.forEach(a=>{a.segments=Z1(a),a.segments.forEach(i=>{J1(i,a.resolvedUri)})}),this.trigger("loadedplaylist"),this.request||this.media(this.main.playlists[0]);return}const o=this.srcUri()||X.location.href;this.main=ZX(t,o),this.haveMetadata({playlistObject:t,url:o,id:this.main.playlists[0].id}),this.trigger("loadedmetadata")}updateOrDeleteClone(t,o){const a=this.main,i=t.ID;let s=a.playlists.length;for(;s--;){const l=a.playlists[s];if(l.attributes["PATHWAY-ID"]===i){const r=l.resolvedUri,u=l.id;if(o){const c=this.createCloneURI_(l.resolvedUri,t),f=Li(i,c),m=this.createCloneAttributes_(i,l.attributes),d=this.createClonePlaylist_(l,f,t,m);a.playlists[s]=d,a.playlists[f]=d,a.playlists[c]=d}else a.playlists.splice(s,1);delete a.playlists[u],delete a.playlists[r]}}this.updateOrDeleteCloneMedia(t,o)}updateOrDeleteCloneMedia(t,o){const a=this.main,i=t.ID;["AUDIO","SUBTITLES","CLOSED-CAPTIONS"].forEach(s=>{if(!(!a.mediaGroups[s]||!a.mediaGroups[s][i])){for(const l in a.mediaGroups[s])if(l===i){for(const r in a.mediaGroups[s][l])a.mediaGroups[s][l][r].playlists.forEach((c,f)=>{const m=a.playlists[c.id],d=m.id,h=m.resolvedUri;delete a.playlists[d],delete a.playlists[h]});delete a.mediaGroups[s][l]}}}),o&&this.createClonedMediaGroups_(t)}addClonePathway(t,o={}){const a=this.main,i=a.playlists.length,s=this.createCloneURI_(o.resolvedUri,t),l=Li(t.ID,s),r=this.createCloneAttributes_(t.ID,o.attributes),u=this.createClonePlaylist_(o,l,t,r);a.playlists[i]=u,a.playlists[l]=u,a.playlists[s]=u,this.createClonedMediaGroups_(t)}createClonedMediaGroups_(t){const o=t.ID,a=t["BASE-ID"],i=this.main;["AUDIO","SUBTITLES","CLOSED-CAPTIONS"].forEach(s=>{if(!(!i.mediaGroups[s]||i.mediaGroups[s][o]))for(const l in i.mediaGroups[s]){if(l===a)i.mediaGroups[s][o]={};else continue;for(const r in i.mediaGroups[s][l]){const u=i.mediaGroups[s][l][r];i.mediaGroups[s][o][r]=kt({},u);const c=i.mediaGroups[s][o][r],f=this.createCloneURI_(u.resolvedUri,t);c.resolvedUri=f,c.uri=f,c.playlists=[],u.playlists.forEach((m,d)=>{const h=i.playlists[m.id],g=W1(s,o,r),p=Li(o,g);if(h&&!i.playlists[p]){const b=this.createClonePlaylist_(h,p,t),_=b.resolvedUri;i.playlists[p]=b,i.playlists[_]=b}c.playlists[d]=this.createClonePlaylist_(m,p,t)})}}})}createClonePlaylist_(t,o,a,i){const s=this.createCloneURI_(t.resolvedUri,a),l={resolvedUri:s,uri:s,id:o};return t.segments&&(l.segments=[]),i&&(l.attributes=i),at(t,l)}createCloneURI_(t,o){const a=new URL(t);a.hostname=o["URI-REPLACEMENT"].HOST;const i=o["URI-REPLACEMENT"].PARAMS;for(const s of Object.keys(i))a.searchParams.set(s,i[s]);return a.href}createCloneAttributes_(t,o){const a={"PATHWAY-ID":t};return["AUDIO","SUBTITLES","CLOSED-CAPTIONS"].forEach(i=>{o[i]&&(a[i]=t)}),a}getKeyIdSet(t){const o=new Set;if(!t||!t.contentProtection)return o;for(const a in t.contentProtection)if(t.contentProtection[a]&&t.contentProtection[a].attributes&&t.contentProtection[a].attributes.keyId){const i=t.contentProtection[a].attributes.keyId;o.add(i.toLowerCase())}return o}}const pm=function(n,t,o,a){const i=n.responseType==="arraybuffer"?n.response:n.responseText;!t&&i&&(n.responseTime=Date.now(),n.roundTripTime=n.responseTime-n.requestTime,n.bytesReceived=i.byteLength||i.length,n.bandwidth||(n.bandwidth=Math.floor(n.bytesReceived/n.roundTripTime*8*1e3))),o.headers&&(n.responseHeaders=o.headers),t&&t.code==="ETIMEDOUT"&&(n.timedout=!0),!t&&!n.aborted&&o.statusCode!==200&&o.statusCode!==206&&o.statusCode!==0&&(t=new Error("XHR Failed with a response of: "+(n&&(i||n.responseText)))),a(t,n)},sY=(n,t)=>{if(!n||!n.size)return;let o=t;return n.forEach(a=>{o=a(o)}),o},lY=(n,t,o,a)=>{!n||!n.size||n.forEach(i=>{i(t,o,a)})},ty=function(){const n=function t(o,a){o=at({timeout:45e3},o);const i=t.beforeRequest||ie.Vhs.xhr.beforeRequest,s=t._requestCallbackSet||ie.Vhs.xhr._requestCallbackSet||new Set,l=t._responseCallbackSet||ie.Vhs.xhr._responseCallbackSet;i&&typeof i=="function"&&(ie.log.warn("beforeRequest is deprecated, use onRequest instead."),s.add(i));const r=ie.Vhs.xhr.original===!0?ie.xhr:ie.Vhs.xhr,u=sY(s,o);s.delete(i);const c=r(u||o,function(m,d){return lY(l,c,m,d),pm(c,m,d,a)}),f=c.abort;return c.abort=function(){return c.aborted=!0,f.apply(c,arguments)},c.uri=o.uri,c.requestType=o.requestType,c.requestTime=Date.now(),c};return n.original=!0,n},rY=function(n){let t;const o=n.offset;return typeof n.offset=="bigint"||typeof n.length=="bigint"?t=X.BigInt(n.offset)+X.BigInt(n.length)-X.BigInt(1):t=n.offset+n.length-1,"bytes="+o+"-"+t},hm=function(n){const t={};return n.byterange&&(t.Range=rY(n.byterange)),t},dY=function(n,t){return n.start(t)+"-"+n.end(t)},uY=function(n,t){const o=n.toString(16);return"00".substring(0,2-o.length)+o+(t%2?" ":"")},cY=function(n){return n>=32&&n<126?String.fromCharCode(n):"."},ny=function(n){const t={};return Object.keys(n).forEach(o=>{const a=n[o];Bv(a)?t[o]={bytes:a.buffer,byteOffset:a.byteOffset,byteLength:a.byteLength}:t[o]=a}),t},od=function(n){const t=n.byterange||{length:1/0,offset:0};return[t.length,t.offset,n.resolvedUri].join(",")},oy=function(n){return n.resolvedUri},ay=n=>{const t=Array.prototype.slice.call(n),o=16;let a="",i,s;for(let l=0;l<t.length/o;l++)i=t.slice(l*o,l*o+o).map(uY).join(""),s=t.slice(l*o,l*o+o).map(cY).join(""),a+=i+" "+s+`
|
|
219
|
+
`;return a},mY=({bytes:n})=>ay(n),pY=n=>{let t="",o;for(o=0;o<n.length;o++)t+=dY(n,o)+" ";return t};var hY=Object.freeze({__proto__:null,createTransferableMessage:ny,initSegmentId:od,segmentKeyId:oy,hexDump:ay,tagDump:mY,textRanges:pY});const iy=.25,fY=(n,t)=>{if(!t.dateTimeObject)return null;const o=t.videoTimingInfo.transmuxerPrependedSeconds,i=t.videoTimingInfo.transmuxedPresentationStart+o,s=n-i;return new Date(t.dateTimeObject.getTime()+s*1e3)},gY=n=>n.transmuxedPresentationEnd-n.transmuxedPresentationStart-n.transmuxerPrependedSeconds,vY=(n,t)=>{let o;try{o=new Date(n)}catch{return null}if(!t||!t.segments||t.segments.length===0)return null;let a=t.segments[0];if(o<new Date(a.dateTimeObject))return null;for(let u=0;u<t.segments.length-1;u++){a=t.segments[u];const c=new Date(t.segments[u+1].dateTimeObject);if(o<c)break}const i=t.segments[t.segments.length-1],s=i.dateTimeObject,l=i.videoTimingInfo?gY(i.videoTimingInfo):i.duration+i.duration*iy,r=new Date(s.getTime()+l*1e3);return o>r?null:(o>new Date(s)&&(a=i),{segment:a,estimatedStart:a.videoTimingInfo?a.videoTimingInfo.transmuxedPresentationStart:En.duration(t,t.mediaSequence+t.segments.indexOf(a)),type:a.videoTimingInfo?"accurate":"estimate"})},yY=(n,t)=>{if(!t||!t.segments||t.segments.length===0)return null;let o=0,a;for(let s=0;s<t.segments.length&&(a=t.segments[s],o=a.videoTimingInfo?a.videoTimingInfo.transmuxedPresentationEnd:o+a.duration,!(n<=o));s++);const i=t.segments[t.segments.length-1];if(i.videoTimingInfo&&i.videoTimingInfo.transmuxedPresentationEnd<n)return null;if(n>o){if(n>o+i.duration*iy)return null;a=i}return{segment:a,estimatedStart:a.videoTimingInfo?a.videoTimingInfo.transmuxedPresentationStart:o-a.duration,type:a.videoTimingInfo?"accurate":"estimate"}},_Y=(n,t)=>{let o,a;try{o=new Date(n),a=new Date(t)}catch{}const i=o.getTime();return(a.getTime()-i)/1e3},bY=n=>{if(!n.segments||n.segments.length===0)return!1;for(let t=0;t<n.segments.length;t++)if(!n.segments[t].dateTimeObject)return!1;return!0},wY=({playlist:n,time:t=void 0,callback:o})=>{if(!o)throw new Error("getProgramTime: callback must be provided");if(!n||t===void 0)return o({message:"getProgramTime: playlist and time must be provided"});const a=yY(t,n);if(!a)return o({message:"valid programTime was not found"});if(a.type==="estimate")return o({message:"Accurate programTime could not be determined. Please seek to e.seekTime and try again",seekTime:a.estimatedStart});const i={mediaSeconds:t},s=fY(t,a.segment);return s&&(i.programDateTime=s.toISOString()),o(null,i)},sy=({programTime:n,playlist:t,retryCount:o=2,seekTo:a,pauseAfterSeek:i=!0,tech:s,callback:l})=>{if(!l)throw new Error("seekToProgramTime: callback must be provided");if(typeof n>"u"||!t||!a)return l({message:"seekToProgramTime: programTime, seekTo and playlist must be provided"});if(!t.endList&&!s.hasStarted_)return l({message:"player must be playing a live stream to start buffering"});if(!bY(t))return l({message:"programDateTime tags must be provided in the manifest "+t.resolvedUri});const r=vY(n,t);if(!r)return l({message:`${n} was not found in the stream`});const u=r.segment,c=_Y(u.dateTimeObject,n);if(r.type==="estimate"){if(o===0)return l({message:`${n} is not buffered yet. Try again`});a(r.estimatedStart+c),s.one("seeked",()=>{sy({programTime:n,playlist:t,retryCount:o-1,seekTo:a,pauseAfterSeek:i,tech:s,callback:l})});return}const f=u.start+c,m=()=>l(null,s.currentTime());s.one("seeked",m),i&&s.pause(),a(f)},Tc=(n,t)=>{if(n.readyState===4)return t()},xY=(n,t,o,a)=>{let i=[],s,l=!1;const r=function(m,d,h,g){return d.abort(),l=!0,o(m,d,h,g)},u=function(m,d){if(l)return;if(m)return m.metadata=Xa({requestType:a,request:d,error:m}),r(m,d,"",i);const h=d.responseText.substring(i&&i.byteLength||0,d.responseText.length);if(i=kq(i,Dv(h,!0)),s=s||Hs(i),i.length<10||s&&i.length<s+2)return Tc(d,()=>r(m,d,"",i));const g=ep(i);return g==="ts"&&i.length<188?Tc(d,()=>r(m,d,"",i)):!g&&i.length<376?Tc(d,()=>r(m,d,"",i)):r(null,d,g,i)},f=t({uri:n,beforeSend(m){m.overrideMimeType("text/plain; charset=x-user-defined"),m.addEventListener("progress",function({total:d,loaded:h}){return pm(m,null,{statusCode:m.status},u)})}},function(m,d){return pm(f,m,d,u)});return f},{EventTarget:VY}=ie,dg=function(n,t){if(!ey(n,t)||n.sidx&&t.sidx&&(n.sidx.offset!==t.sidx.offset||n.sidx.length!==t.sidx.length))return!1;if(!n.sidx&&t.sidx||n.sidx&&!t.sidx||n.segments&&!t.segments||!n.segments&&t.segments)return!1;if(!n.segments&&!t.segments)return!0;for(let o=0;o<n.segments.length;o++){const a=n.segments[o],i=t.segments[o];if(a.uri!==i.uri)return!1;if(!a.byterange&&!i.byterange)continue;const s=a.byterange,l=i.byterange;if(s&&!l||!s&&l||s.offset!==l.offset||s.length!==l.length)return!1}return!0},CY=(n,t,o,a)=>{const i=a.attributes.NAME||o;return`placeholder-uri-${n}-${t}-${i}`},kY=({mainXml:n,srcUrl:t,clientOffset:o,sidxMapping:a,previousManifest:i})=>{const s=WW(n,{manifestUri:t,clientOffset:o,sidxMapping:a,previousManifest:i});return X1(s,t,CY),s},EY=(n,t)=>{rs(n,(o,a,i,s)=>{(!t.mediaGroups[a][i]||!(s in t.mediaGroups[a][i]))&&delete n.mediaGroups[a][i][s]})},TY=(n,t,o)=>{let a=!0,i=at(n,{duration:t.duration,minimumUpdatePeriod:t.minimumUpdatePeriod,timelineStarts:t.timelineStarts});for(let s=0;s<t.playlists.length;s++){const l=t.playlists[s];if(l.sidx){const u=vu(l.sidx);o&&o[u]&&o[u].sidx&&Qm(l,o[u].sidx,l.sidx.resolvedUri)}const r=cm(i,l,dg);r&&(i=r,a=!1)}return rs(t,(s,l,r,u)=>{if(s.playlists&&s.playlists.length){const c=s.playlists[0].id,f=cm(i,s.playlists[0],dg);f&&(i=f,u in i.mediaGroups[l][r]||(i.mediaGroups[l][r][u]=s),i.mediaGroups[l][r][u].playlists[0]=i.playlists[c],a=!1)}}),EY(i,t),t.minimumUpdatePeriod!==n.minimumUpdatePeriod&&(a=!1),a?null:i},NY=(n,t)=>(!n.map&&!t.map||!!(n.map&&t.map&&n.map.byterange.offset===t.map.byterange.offset&&n.map.byterange.length===t.map.byterange.length))&&n.uri===t.uri&&n.byterange.offset===t.byterange.offset&&n.byterange.length===t.byterange.length,ug=(n,t)=>{const o={};for(const a in n){const s=n[a].sidx;if(s){const l=vu(s);if(!t[l])break;const r=t[l].sidxInfo;NY(r,s)&&(o[l]=t[l])}}return o},SY=(n,t)=>{let a=ug(n.playlists,t);return rs(n,(i,s,l,r)=>{if(i.playlists&&i.playlists.length){const u=i.playlists;a=at(a,ug(u,t))}}),a};class fm extends VY{constructor(t,o,a={},i){super(),this.isPaused_=!0,this.mainPlaylistLoader_=i||this,i||(this.isMain_=!0);const{withCredentials:s=!1}=a;if(this.vhs_=o,this.withCredentials=s,this.addMetadataToTextTrack=a.addMetadataToTextTrack,!t)throw new Error("A non-empty playlist URL or object is required");this.on("minimumUpdatePeriod",()=>{this.refreshXml_()}),this.on("mediaupdatetimeout",()=>{this.refreshMedia_(this.media().id)}),this.state="HAVE_NOTHING",this.loadedPlaylists_={},this.logger_=so("DashPlaylistLoader"),this.isMain_?(this.mainPlaylistLoader_.srcUrl=t,this.mainPlaylistLoader_.sidxMapping_={}):this.childPlaylist_=t}get isPaused(){return this.isPaused_}requestErrored_(t,o,a){if(!this.request)return!0;if(this.request=null,t)return this.error=typeof t=="object"&&!(t instanceof Error)?t:{status:o.status,message:"DASH request error at URL: "+o.uri,response:o.response,code:2,metadata:t.metadata},a&&(this.state=a),this.trigger("error"),!0}addSidxSegments_(t,o,a){const i=t.sidx&&vu(t.sidx);if(!t.sidx||!i||this.mainPlaylistLoader_.sidxMapping_[i]){X.clearTimeout(this.mediaRequest_),this.mediaRequest_=X.setTimeout(()=>a(!1),0);return}const s=nd(t.sidx.resolvedUri),l=(u,c)=>{if(this.requestErrored_(u,c,o))return;const f=this.mainPlaylistLoader_.sidxMapping_,{requestType:m}=c;let d;try{d=ZW($e(c.response).subarray(8))}catch(h){h.metadata=Xa({requestType:m,request:c,parseFailure:!0}),this.requestErrored_(h,c,o);return}return f[i]={sidxInfo:t.sidx,sidx:d},Qm(t,d,t.sidx.resolvedUri),a(!0)},r="dash-sidx";this.request=xY(s,this.vhs_.xhr,(u,c,f,m)=>{if(u)return l(u,c);if(!f||f!=="mp4"){const g=f||"unknown";return l({status:c.status,message:`Unsupported ${g} container type for sidx segment at URL: ${s}`,response:"",playlist:t,internal:!0,playlistExclusionDuration:1/0,code:2},c)}const{offset:d,length:h}=t.sidx.byterange;if(m.length>=h+d)return l(u,{response:m.subarray(d,d+h),status:c.status,uri:c.uri});this.request=this.vhs_.xhr({uri:s,responseType:"arraybuffer",requestType:"dash-sidx",headers:hm({byterange:t.sidx.byterange})},l)},r)}dispose(){this.isPaused_=!0,this.trigger("dispose"),this.stopRequest(),this.loadedPlaylists_={},X.clearTimeout(this.minimumUpdatePeriodTimeout_),X.clearTimeout(this.mediaRequest_),X.clearTimeout(this.mediaUpdateTimeout),this.mediaUpdateTimeout=null,this.mediaRequest_=null,this.minimumUpdatePeriodTimeout_=null,this.mainPlaylistLoader_.createMupOnMedia_&&(this.off("loadedmetadata",this.mainPlaylistLoader_.createMupOnMedia_),this.mainPlaylistLoader_.createMupOnMedia_=null),this.off()}hasPendingRequest(){return this.request||this.mediaRequest_}stopRequest(){if(this.request){const t=this.request;this.request=null,t.onreadystatechange=null,t.abort()}}media(t){if(!t)return this.media_;if(this.state==="HAVE_NOTHING")throw new Error("Cannot switch media playlist from "+this.state);const o=this.state;if(typeof t=="string"){if(!this.mainPlaylistLoader_.main.playlists[t])throw new Error("Unknown playlist URI: "+t);t=this.mainPlaylistLoader_.main.playlists[t]}const a=!this.media_||t.id!==this.media_.id;if(a&&this.loadedPlaylists_[t.id]&&this.loadedPlaylists_[t.id].endList){this.state="HAVE_METADATA",this.media_=t,a&&(this.trigger("mediachanging"),this.trigger("mediachange"));return}a&&(this.media_&&this.trigger("mediachanging"),this.addSidxSegments_(t,o,i=>{this.haveMetadata({startingState:o,playlist:t})}))}haveMetadata({startingState:t,playlist:o}){this.state="HAVE_METADATA",this.loadedPlaylists_[o.id]=o,X.clearTimeout(this.mediaRequest_),this.mediaRequest_=null,this.refreshMedia_(o.id),t==="HAVE_MAIN_MANIFEST"?this.trigger("loadedmetadata"):this.trigger("mediachange")}pause(){this.isPaused_=!0,this.mainPlaylistLoader_.createMupOnMedia_&&(this.off("loadedmetadata",this.mainPlaylistLoader_.createMupOnMedia_),this.mainPlaylistLoader_.createMupOnMedia_=null),this.stopRequest(),X.clearTimeout(this.mediaUpdateTimeout),this.mediaUpdateTimeout=null,this.isMain_&&(X.clearTimeout(this.mainPlaylistLoader_.minimumUpdatePeriodTimeout_),this.mainPlaylistLoader_.minimumUpdatePeriodTimeout_=null),this.state==="HAVE_NOTHING"&&(this.started=!1)}load(t){this.isPaused_=!1,X.clearTimeout(this.mediaUpdateTimeout),this.mediaUpdateTimeout=null;const o=this.media();if(t){const a=o?o.targetDuration/2*1e3:5e3;this.mediaUpdateTimeout=X.setTimeout(()=>this.load(),a);return}if(!this.started){this.start();return}o&&!o.endList?(this.isMain_&&!this.minimumUpdatePeriodTimeout_&&(this.trigger("minimumUpdatePeriod"),this.updateMinimumUpdatePeriodTimeout_()),this.trigger("mediaupdatetimeout")):this.trigger("loadedplaylist")}start(){if(this.started=!0,!this.isMain_){X.clearTimeout(this.mediaRequest_),this.mediaRequest_=X.setTimeout(()=>this.haveMain_(),0);return}this.requestMain_((t,o)=>{this.haveMain_(),!this.hasPendingRequest()&&!this.media_&&this.media(this.mainPlaylistLoader_.main.playlists[0])})}requestMain_(t){const o={manifestInfo:{uri:this.mainPlaylistLoader_.srcUrl}};this.trigger({type:"manifestrequeststart",metadata:o}),this.request=this.vhs_.xhr({uri:this.mainPlaylistLoader_.srcUrl,withCredentials:this.withCredentials,requestType:"dash-manifest"},(a,i)=>{if(a){const{requestType:l}=i;a.metadata=Xa({requestType:l,request:i,error:a})}if(this.requestErrored_(a,i)){this.state==="HAVE_NOTHING"&&(this.started=!1);return}this.trigger({type:"manifestrequestcomplete",metadata:o});const s=i.responseText!==this.mainPlaylistLoader_.mainXml_;if(this.mainPlaylistLoader_.mainXml_=i.responseText,i.responseHeaders&&i.responseHeaders.date?this.mainLoaded_=Date.parse(i.responseHeaders.date):this.mainLoaded_=Date.now(),this.mainPlaylistLoader_.srcUrl=nd(this.mainPlaylistLoader_.srcUrl,i),s){this.handleMain_(),this.syncClientServerClock_(()=>t(i,s));return}return t(i,s)})}syncClientServerClock_(t){const o=GW(this.mainPlaylistLoader_.mainXml_);if(o===null)return this.mainPlaylistLoader_.clientOffset_=this.mainLoaded_-Date.now(),t();if(o.method==="DIRECT")return this.mainPlaylistLoader_.clientOffset_=o.value-Date.now(),t();this.request=this.vhs_.xhr({uri:kn(this.mainPlaylistLoader_.srcUrl,o.value),method:o.method,withCredentials:this.withCredentials,requestType:"dash-clock-sync"},(a,i)=>{if(!this.request)return;if(a){const{requestType:l}=i;return this.error.metadata=Xa({requestType:l,request:i,error:a}),this.mainPlaylistLoader_.clientOffset_=this.mainLoaded_-Date.now(),t()}let s;o.method==="HEAD"?!i.responseHeaders||!i.responseHeaders.date?s=this.mainLoaded_:s=Date.parse(i.responseHeaders.date):s=Date.parse(i.responseText),this.mainPlaylistLoader_.clientOffset_=s-Date.now(),t()})}haveMain_(){this.state="HAVE_MAIN_MANIFEST",this.isMain_?this.trigger("loadedplaylist"):this.media_||this.media(this.childPlaylist_)}handleMain_(){X.clearTimeout(this.mediaRequest_),this.mediaRequest_=null;const t=this.mainPlaylistLoader_.main,o={manifestInfo:{uri:this.mainPlaylistLoader_.srcUrl}};this.trigger({type:"manifestparsestart",metadata:o});let a;try{a=kY({mainXml:this.mainPlaylistLoader_.mainXml_,srcUrl:this.mainPlaylistLoader_.srcUrl,clientOffset:this.mainPlaylistLoader_.clientOffset_,sidxMapping:this.mainPlaylistLoader_.sidxMapping_,previousManifest:t})}catch(s){this.error=s,this.error.metadata={errorType:ie.Error.StreamingDashManifestParserError,error:s},this.trigger("error")}t&&(a=TY(t,a,this.mainPlaylistLoader_.sidxMapping_)),this.mainPlaylistLoader_.main=a||t;const i=this.mainPlaylistLoader_.main.locations&&this.mainPlaylistLoader_.main.locations[0];if(i&&i!==this.mainPlaylistLoader_.srcUrl&&(this.mainPlaylistLoader_.srcUrl=i),(!t||a&&a.minimumUpdatePeriod!==t.minimumUpdatePeriod)&&this.updateMinimumUpdatePeriodTimeout_(),this.addEventStreamToMetadataTrack_(a),a){const{duration:s,endList:l}=a,r=[];a.playlists.forEach(c=>{r.push({id:c.id,bandwidth:c.attributes.BANDWIDTH,resolution:c.attributes.RESOLUTION,codecs:c.attributes.CODECS})});const u={duration:s,isLive:!l,renditions:r};o.parsedManifest=u,this.trigger({type:"manifestparsecomplete",metadata:o})}return!!a}updateMinimumUpdatePeriodTimeout_(){const t=this.mainPlaylistLoader_;t.createMupOnMedia_&&(t.off("loadedmetadata",t.createMupOnMedia_),t.createMupOnMedia_=null),t.minimumUpdatePeriodTimeout_&&(X.clearTimeout(t.minimumUpdatePeriodTimeout_),t.minimumUpdatePeriodTimeout_=null);let o=t.main&&t.main.minimumUpdatePeriod;if(o===0&&(t.media()?o=t.media().targetDuration*1e3:(t.createMupOnMedia_=t.updateMinimumUpdatePeriodTimeout_,t.one("loadedmetadata",t.createMupOnMedia_))),typeof o!="number"||o<=0){o<0&&this.logger_(`found invalid minimumUpdatePeriod of ${o}, not setting a timeout`);return}this.createMUPTimeout_(o)}createMUPTimeout_(t){const o=this.mainPlaylistLoader_;o.minimumUpdatePeriodTimeout_=X.setTimeout(()=>{o.minimumUpdatePeriodTimeout_=null,o.trigger("minimumUpdatePeriod"),o.createMUPTimeout_(t)},t)}refreshXml_(){this.requestMain_((t,o)=>{o&&(this.media_&&(this.media_=this.mainPlaylistLoader_.main.playlists[this.media_.id]),this.mainPlaylistLoader_.sidxMapping_=SY(this.mainPlaylistLoader_.main,this.mainPlaylistLoader_.sidxMapping_),this.addSidxSegments_(this.media(),this.state,a=>{this.refreshMedia_(this.media().id)}))})}refreshMedia_(t){if(!t)throw new Error("refreshMedia_ must take a media id");this.media_&&this.isMain_&&this.handleMain_();const o=this.mainPlaylistLoader_.main.playlists,a=!this.media_||this.media_!==o[t];if(a?this.media_=o[t]:this.trigger("playlistunchanged"),!this.mediaUpdateTimeout){const i=()=>{this.media().endList||(this.mediaUpdateTimeout=X.setTimeout(()=>{this.trigger("mediaupdatetimeout"),i()},mm(this.media(),!!a)))};i()}this.trigger("loadedplaylist")}addEventStreamToMetadataTrack_(t){if(t&&this.mainPlaylistLoader_.main.eventStream){const o=this.mainPlaylistLoader_.main.eventStream.map(a=>({cueTime:a.start,frames:[{data:a.messageData}]}));this.addMetadataToTextTrack("EventStream",o,this.mainPlaylistLoader_.main.duration)}}getKeyIdSet(t){if(t.contentProtection){const o=new Set;for(const a in t.contentProtection){const i=t.contentProtection[a].attributes["cenc:default_KID"];i&&o.add(i.replace(/-/g,"").toLowerCase())}return o}}}var zt={GOAL_BUFFER_LENGTH:30,MAX_GOAL_BUFFER_LENGTH:60,BACK_BUFFER_LENGTH:30,GOAL_BUFFER_LENGTH_RATE:1,INITIAL_BANDWIDTH:4194304,BANDWIDTH_VARIANCE:1.2,BUFFER_LOW_WATER_LINE:0,MAX_BUFFER_LOW_WATER_LINE:30,EXPERIMENTAL_MAX_BUFFER_LOW_WATER_LINE:16,BUFFER_LOW_WATER_LINE_RATE:1,BUFFER_HIGH_WATER_LINE:30};const BY=n=>{const t=new Uint8Array(new ArrayBuffer(n.length));for(let o=0;o<n.length;o++)t[o]=n.charCodeAt(o);return t.buffer},ly=function(n){return n.on=n.addEventListener,n.off=n.removeEventListener,n},DY=function(n){try{return URL.createObjectURL(new Blob([n],{type:"application/javascript"}))}catch{const o=new BlobBuilder;return o.append(n),URL.createObjectURL(o.getBlob())}},ry=function(n){return function(){const t=DY(n),o=ly(new Worker(t));o.objURL=t;const a=o.terminate;return o.on=o.addEventListener,o.off=o.removeEventListener,o.terminate=function(){return URL.revokeObjectURL(t),a.call(this)},o}},dy=function(n){return`var browserWorkerPolyFill = ${ly.toString()};
|
|
220
|
+
browserWorkerPolyFill(self);
|
|
221
|
+
`+n},uy=function(n){return n.toString().replace(/^function.+?{/,"").slice(0,-1)},PY=dy(uy(function(){var n=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},t=function(){this.init=function(){var y={};this.on=function(x,T){y[x]||(y[x]=[]),y[x]=y[x].concat(T)},this.off=function(x,T){var E;return y[x]?(E=y[x].indexOf(T),y[x]=y[x].slice(),y[x].splice(E,1),E>-1):!1},this.trigger=function(x){var T,E,P,L;if(T=y[x],!!T)if(arguments.length===2)for(P=T.length,E=0;E<P;++E)T[E].call(this,arguments[1]);else{for(L=[],E=arguments.length,E=1;E<arguments.length;++E)L.push(arguments[E]);for(P=T.length,E=0;E<P;++E)T[E].apply(this,L)}},this.dispose=function(){y={}}}};t.prototype.pipe=function(y){return this.on("data",function(x){y.push(x)}),this.on("done",function(x){y.flush(x)}),this.on("partialdone",function(x){y.partialFlush(x)}),this.on("endedtimeline",function(x){y.endTimeline(x)}),this.on("reset",function(x){y.reset(x)}),y},t.prototype.push=function(y){this.trigger("data",y)},t.prototype.flush=function(y){this.trigger("done",y)},t.prototype.partialFlush=function(y){this.trigger("partialdone",y)},t.prototype.endTimeline=function(y){this.trigger("endedtimeline",y)},t.prototype.reset=function(y){this.trigger("reset",y)};var o=t,a=Math.pow(2,32),i=function(y){var x=new DataView(y.buffer,y.byteOffset,y.byteLength),T;return x.getBigUint64?(T=x.getBigUint64(0),T<Number.MAX_SAFE_INTEGER?Number(T):T):x.getUint32(0)*a+x.getUint32(4)},s={getUint64:i,MAX_UINT32:a},l=s.MAX_UINT32,r,u,c,f,m,d,h,g,p,b,_,w,v,V,C,S,N,D,$,k,A,B,I,z,Y,H,q,O,J,F,M,Q,W,Z,de,Ve;(function(){var y;if(I={avc1:[],avcC:[],btrt:[],dinf:[],dref:[],esds:[],ftyp:[],hdlr:[],mdat:[],mdhd:[],mdia:[],mfhd:[],minf:[],moof:[],moov:[],mp4a:[],mvex:[],mvhd:[],pasp:[],sdtp:[],smhd:[],stbl:[],stco:[],stsc:[],stsd:[],stsz:[],stts:[],styp:[],tfdt:[],tfhd:[],traf:[],trak:[],trun:[],trex:[],tkhd:[],vmhd:[]},!(typeof Uint8Array>"u")){for(y in I)I.hasOwnProperty(y)&&(I[y]=[y.charCodeAt(0),y.charCodeAt(1),y.charCodeAt(2),y.charCodeAt(3)]);z=new Uint8Array([105,115,111,109]),H=new Uint8Array([97,118,99,49]),Y=new Uint8Array([0,0,0,1]),q=new Uint8Array([0,0,0,0,0,0,0,0,118,105,100,101,0,0,0,0,0,0,0,0,0,0,0,0,86,105,100,101,111,72,97,110,100,108,101,114,0]),O=new Uint8Array([0,0,0,0,0,0,0,0,115,111,117,110,0,0,0,0,0,0,0,0,0,0,0,0,83,111,117,110,100,72,97,110,100,108,101,114,0]),J={video:q,audio:O},Q=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,12,117,114,108,32,0,0,0,1]),M=new Uint8Array([0,0,0,0,0,0,0,0]),W=new Uint8Array([0,0,0,0,0,0,0,0]),Z=W,de=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0]),Ve=W,F=new Uint8Array([0,0,0,1,0,0,0,0,0,0,0,0])}})(),r=function(y){var x=[],T=0,E,P,L;for(E=1;E<arguments.length;E++)x.push(arguments[E]);for(E=x.length;E--;)T+=x[E].byteLength;for(P=new Uint8Array(T+8),L=new DataView(P.buffer,P.byteOffset,P.byteLength),L.setUint32(0,P.byteLength),P.set(y,4),E=0,T=8;E<x.length;E++)P.set(x[E],T),T+=x[E].byteLength;return P},u=function(){return r(I.dinf,r(I.dref,Q))},c=function(y){return r(I.esds,new Uint8Array([0,0,0,0,3,25,0,0,0,4,17,64,21,0,6,0,0,0,218,192,0,0,218,192,5,2,y.audioobjecttype<<3|y.samplingfrequencyindex>>>1,y.samplingfrequencyindex<<7|y.channelcount<<3,6,1,2]))},f=function(){return r(I.ftyp,z,Y,z,H)},S=function(y){return r(I.hdlr,J[y])},m=function(y){return r(I.mdat,y)},C=function(y){var x=new Uint8Array([0,0,0,0,0,0,0,2,0,0,0,3,0,1,95,144,y.duration>>>24&255,y.duration>>>16&255,y.duration>>>8&255,y.duration&255,85,196,0,0]);return y.samplerate&&(x[12]=y.samplerate>>>24&255,x[13]=y.samplerate>>>16&255,x[14]=y.samplerate>>>8&255,x[15]=y.samplerate&255),r(I.mdhd,x)},V=function(y){return r(I.mdia,C(y),S(y.type),h(y))},d=function(y){return r(I.mfhd,new Uint8Array([0,0,0,0,(y&4278190080)>>24,(y&16711680)>>16,(y&65280)>>8,y&255]))},h=function(y){return r(I.minf,y.type==="video"?r(I.vmhd,F):r(I.smhd,M),u(),D(y))},g=function(y,x){for(var T=[],E=x.length;E--;)T[E]=k(x[E]);return r.apply(null,[I.moof,d(y)].concat(T))},p=function(y){for(var x=y.length,T=[];x--;)T[x]=w(y[x]);return r.apply(null,[I.moov,_(4294967295)].concat(T).concat(b(y)))},b=function(y){for(var x=y.length,T=[];x--;)T[x]=A(y[x]);return r.apply(null,[I.mvex].concat(T))},_=function(y){var x=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,2,0,1,95,144,(y&4278190080)>>24,(y&16711680)>>16,(y&65280)>>8,y&255,0,1,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255]);return r(I.mvhd,x)},N=function(y){var x=y.samples||[],T=new Uint8Array(4+x.length),E,P;for(P=0;P<x.length;P++)E=x[P].flags,T[P+4]=E.dependsOn<<4|E.isDependedOn<<2|E.hasRedundancy;return r(I.sdtp,T)},D=function(y){return r(I.stbl,$(y),r(I.stts,Ve),r(I.stsc,Z),r(I.stsz,de),r(I.stco,W))},function(){var y,x;$=function(T){return r(I.stsd,new Uint8Array([0,0,0,0,0,0,0,1]),T.type==="video"?y(T):x(T))},y=function(T){var E=T.sps||[],P=T.pps||[],L=[],U=[],j,G;for(j=0;j<E.length;j++)L.push((E[j].byteLength&65280)>>>8),L.push(E[j].byteLength&255),L=L.concat(Array.prototype.slice.call(E[j]));for(j=0;j<P.length;j++)U.push((P[j].byteLength&65280)>>>8),U.push(P[j].byteLength&255),U=U.concat(Array.prototype.slice.call(P[j]));if(G=[I.avc1,new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,(T.width&65280)>>8,T.width&255,(T.height&65280)>>8,T.height&255,0,72,0,0,0,72,0,0,0,0,0,0,0,1,19,118,105,100,101,111,106,115,45,99,111,110,116,114,105,98,45,104,108,115,0,0,0,0,0,0,0,0,0,0,0,0,0,24,17,17]),r(I.avcC,new Uint8Array([1,T.profileIdc,T.profileCompatibility,T.levelIdc,255].concat([E.length],L,[P.length],U))),r(I.btrt,new Uint8Array([0,28,156,128,0,45,198,192,0,45,198,192]))],T.sarRatio){var K=T.sarRatio[0],ee=T.sarRatio[1];G.push(r(I.pasp,new Uint8Array([(K&4278190080)>>24,(K&16711680)>>16,(K&65280)>>8,K&255,(ee&4278190080)>>24,(ee&16711680)>>16,(ee&65280)>>8,ee&255])))}return r.apply(null,G)},x=function(T){return r(I.mp4a,new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,(T.channelcount&65280)>>8,T.channelcount&255,(T.samplesize&65280)>>8,T.samplesize&255,0,0,0,0,(T.samplerate&65280)>>8,T.samplerate&255,0,0]),c(T))}}(),v=function(y){var x=new Uint8Array([0,0,0,7,0,0,0,0,0,0,0,0,(y.id&4278190080)>>24,(y.id&16711680)>>16,(y.id&65280)>>8,y.id&255,0,0,0,0,(y.duration&4278190080)>>24,(y.duration&16711680)>>16,(y.duration&65280)>>8,y.duration&255,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0,(y.width&65280)>>8,y.width&255,0,0,(y.height&65280)>>8,y.height&255,0,0]);return r(I.tkhd,x)},k=function(y){var x,T,E,P,L,U,j;return x=r(I.tfhd,new Uint8Array([0,0,0,58,(y.id&4278190080)>>24,(y.id&16711680)>>16,(y.id&65280)>>8,y.id&255,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0])),U=Math.floor(y.baseMediaDecodeTime/l),j=Math.floor(y.baseMediaDecodeTime%l),T=r(I.tfdt,new Uint8Array([1,0,0,0,U>>>24&255,U>>>16&255,U>>>8&255,U&255,j>>>24&255,j>>>16&255,j>>>8&255,j&255])),L=92,y.type==="audio"?(E=B(y,L),r(I.traf,x,T,E)):(P=N(y),E=B(y,P.length+L),r(I.traf,x,T,E,P))},w=function(y){return y.duration=y.duration||4294967295,r(I.trak,v(y),V(y))},A=function(y){var x=new Uint8Array([0,0,0,0,(y.id&4278190080)>>24,(y.id&16711680)>>16,(y.id&65280)>>8,y.id&255,0,0,0,1,0,0,0,0,0,0,0,0,0,1,0,1]);return y.type!=="video"&&(x[x.length-1]=0),r(I.trex,x)},function(){var y,x,T;T=function(E,P){var L=0,U=0,j=0,G=0;return E.length&&(E[0].duration!==void 0&&(L=1),E[0].size!==void 0&&(U=2),E[0].flags!==void 0&&(j=4),E[0].compositionTimeOffset!==void 0&&(G=8)),[0,0,L|U|j|G,1,(E.length&4278190080)>>>24,(E.length&16711680)>>>16,(E.length&65280)>>>8,E.length&255,(P&4278190080)>>>24,(P&16711680)>>>16,(P&65280)>>>8,P&255]},x=function(E,P){var L,U,j,G,K,ee;for(G=E.samples||[],P+=20+16*G.length,j=T(G,P),U=new Uint8Array(j.length+G.length*16),U.set(j),L=j.length,ee=0;ee<G.length;ee++)K=G[ee],U[L++]=(K.duration&4278190080)>>>24,U[L++]=(K.duration&16711680)>>>16,U[L++]=(K.duration&65280)>>>8,U[L++]=K.duration&255,U[L++]=(K.size&4278190080)>>>24,U[L++]=(K.size&16711680)>>>16,U[L++]=(K.size&65280)>>>8,U[L++]=K.size&255,U[L++]=K.flags.isLeading<<2|K.flags.dependsOn,U[L++]=K.flags.isDependedOn<<6|K.flags.hasRedundancy<<4|K.flags.paddingValue<<1|K.flags.isNonSyncSample,U[L++]=K.flags.degradationPriority&61440,U[L++]=K.flags.degradationPriority&15,U[L++]=(K.compositionTimeOffset&4278190080)>>>24,U[L++]=(K.compositionTimeOffset&16711680)>>>16,U[L++]=(K.compositionTimeOffset&65280)>>>8,U[L++]=K.compositionTimeOffset&255;return r(I.trun,U)},y=function(E,P){var L,U,j,G,K,ee;for(G=E.samples||[],P+=20+8*G.length,j=T(G,P),L=new Uint8Array(j.length+G.length*8),L.set(j),U=j.length,ee=0;ee<G.length;ee++)K=G[ee],L[U++]=(K.duration&4278190080)>>>24,L[U++]=(K.duration&16711680)>>>16,L[U++]=(K.duration&65280)>>>8,L[U++]=K.duration&255,L[U++]=(K.size&4278190080)>>>24,L[U++]=(K.size&16711680)>>>16,L[U++]=(K.size&65280)>>>8,L[U++]=K.size&255;return r(I.trun,L)},B=function(E,P){return E.type==="audio"?y(E,P):x(E,P)}}();var oe={ftyp:f,mdat:m,moof:g,moov:p,initSegment:function(y){var x=f(),T=p(y),E;return E=new Uint8Array(x.byteLength+T.byteLength),E.set(x),E.set(T,x.byteLength),E}},fe=function(y){var x,T,E=[],P=[];for(P.byteLength=0,P.nalCount=0,P.duration=0,E.byteLength=0,x=0;x<y.length;x++)T=y[x],T.nalUnitType==="access_unit_delimiter_rbsp"?(E.length&&(E.duration=T.dts-E.dts,P.byteLength+=E.byteLength,P.nalCount+=E.length,P.duration+=E.duration,P.push(E)),E=[T],E.byteLength=T.data.byteLength,E.pts=T.pts,E.dts=T.dts):(T.nalUnitType==="slice_layer_without_partitioning_rbsp_idr"&&(E.keyFrame=!0),E.duration=T.dts-E.dts,E.byteLength+=T.data.byteLength,E.push(T));return P.length&&(!E.duration||E.duration<=0)&&(E.duration=P[P.length-1].duration),P.byteLength+=E.byteLength,P.nalCount+=E.length,P.duration+=E.duration,P.push(E),P},Ce=function(y){var x,T,E=[],P=[];for(E.byteLength=0,E.nalCount=0,E.duration=0,E.pts=y[0].pts,E.dts=y[0].dts,P.byteLength=0,P.nalCount=0,P.duration=0,P.pts=y[0].pts,P.dts=y[0].dts,x=0;x<y.length;x++)T=y[x],T.keyFrame?(E.length&&(P.push(E),P.byteLength+=E.byteLength,P.nalCount+=E.nalCount,P.duration+=E.duration),E=[T],E.nalCount=T.length,E.byteLength=T.byteLength,E.pts=T.pts,E.dts=T.dts,E.duration=T.duration):(E.duration+=T.duration,E.nalCount+=T.length,E.byteLength+=T.byteLength,E.push(T));return P.length&&E.duration<=0&&(E.duration=P[P.length-1].duration),P.byteLength+=E.byteLength,P.nalCount+=E.nalCount,P.duration+=E.duration,P.push(E),P},Se=function(y){var x;return!y[0][0].keyFrame&&y.length>1&&(x=y.shift(),y.byteLength-=x.byteLength,y.nalCount-=x.nalCount,y[0][0].dts=x.dts,y[0][0].pts=x.pts,y[0][0].duration+=x.duration),y},ae=function(){return{size:0,flags:{isLeading:0,dependsOn:1,isDependedOn:0,hasRedundancy:0,degradationPriority:0,isNonSyncSample:1}}},ce=function(y,x){var T=ae();return T.dataOffset=x,T.compositionTimeOffset=y.pts-y.dts,T.duration=y.duration,T.size=4*y.length,T.size+=y.byteLength,y.keyFrame&&(T.flags.dependsOn=2,T.flags.isNonSyncSample=0),T},se=function(y,x){var T,E,P,L,U,j=x||0,G=[];for(T=0;T<y.length;T++)for(L=y[T],E=0;E<L.length;E++)U=L[E],P=ce(U,j),j+=P.size,G.push(P);return G},he=function(y){var x,T,E,P,L,U,j=0,G=y.byteLength,K=y.nalCount,ee=G+4*K,le=new Uint8Array(ee),ye=new DataView(le.buffer);for(x=0;x<y.length;x++)for(P=y[x],T=0;T<P.length;T++)for(L=P[T],E=0;E<L.length;E++)U=L[E],ye.setUint32(j,U.data.byteLength),j+=4,le.set(U.data,j),j+=U.data.byteLength;return le},we=function(y,x){var T,E=x||0,P=[];return T=ce(y,E),P.push(T),P},ke=function(y){var x,T,E=0,P=y.byteLength,L=y.length,U=P+4*L,j=new Uint8Array(U),G=new DataView(j.buffer);for(x=0;x<y.length;x++)T=y[x],G.setUint32(E,T.data.byteLength),E+=4,j.set(T.data,E),E+=T.data.byteLength;return j},te={groupNalsIntoFrames:fe,groupFramesIntoGops:Ce,extendFirstKeyFrame:Se,generateSampleTable:se,concatenateNalData:he,generateSampleTableForFrame:we,concatenateNalDataForFrame:ke},ue=[33,16,5,32,164,27],pe=[33,65,108,84,1,2,4,8,168,2,4,8,17,191,252],ve=function(y){for(var x=[];y--;)x.push(0);return x},_e=function(y){return Object.keys(y).reduce(function(x,T){return x[T]=new Uint8Array(y[T].reduce(function(E,P){return E.concat(P)},[])),x},{})},Je,bt=function(){if(!Je){var y={96e3:[ue,[227,64],ve(154),[56]],88200:[ue,[231],ve(170),[56]],64e3:[ue,[248,192],ve(240),[56]],48e3:[ue,[255,192],ve(268),[55,148,128],ve(54),[112]],44100:[ue,[255,192],ve(268),[55,163,128],ve(84),[112]],32e3:[ue,[255,192],ve(268),[55,234],ve(226),[112]],24e3:[ue,[255,192],ve(268),[55,255,128],ve(268),[111,112],ve(126),[224]],16e3:[ue,[255,192],ve(268),[55,255,128],ve(268),[111,255],ve(269),[223,108],ve(195),[1,192]],12e3:[pe,ve(268),[3,127,248],ve(268),[6,255,240],ve(268),[13,255,224],ve(268),[27,253,128],ve(259),[56]],11025:[pe,ve(268),[3,127,248],ve(268),[6,255,240],ve(268),[13,255,224],ve(268),[27,255,192],ve(268),[55,175,128],ve(108),[112]],8e3:[pe,ve(268),[3,121,16],ve(47),[7]]};Je=_e(y)}return Je},Bn=9e4,gt,an,it,vt,sn,Gn,ta;gt=function(y){return y*Bn},an=function(y,x){return y*x},it=function(y){return y/Bn},vt=function(y,x){return y/x},sn=function(y,x){return gt(vt(y,x))},Gn=function(y,x){return an(it(y),x)},ta=function(y,x,T){return it(T?y:y-x)};var Oe={ONE_SECOND_IN_TS:Bn,secondsToVideoTs:gt,secondsToAudioTs:an,videoTsToSeconds:it,audioTsToSeconds:vt,audioTsToVideoTs:sn,videoTsToAudioTs:Gn,metadataTsToSeconds:ta},oi=bt,_n=Oe,na=function(y){var x,T,E=0;for(x=0;x<y.length;x++)T=y[x],E+=T.data.byteLength;return E},oa=function(y,x,T,E){var P,L=0,U=0,j=0,G=0,K,ee,le;if(x.length&&(P=_n.audioTsToVideoTs(y.baseMediaDecodeTime,y.samplerate),L=Math.ceil(_n.ONE_SECOND_IN_TS/(y.samplerate/1024)),T&&E&&(U=P-Math.max(T,E),j=Math.floor(U/L),G=j*L),!(j<1||G>_n.ONE_SECOND_IN_TS/2))){for(K=oi()[y.samplerate],K||(K=x[0].data),ee=0;ee<j;ee++)le=x[0],x.splice(0,0,{data:K,dts:le.dts-L,pts:le.pts-L});return y.baseMediaDecodeTime-=Math.floor(_n.videoTsToAudioTs(G,y.samplerate)),G}},fo=function(y,x,T){return x.minSegmentDts>=T?y:(x.minSegmentDts=1/0,y.filter(function(E){return E.dts>=T?(x.minSegmentDts=Math.min(x.minSegmentDts,E.dts),x.minSegmentPts=x.minSegmentDts,!0):!1}))},Lo=function(y){var x,T,E=[];for(x=0;x<y.length;x++)T=y[x],E.push({size:T.data.byteLength,duration:1024});return E},qe=function(y){var x,T,E=0,P=new Uint8Array(na(y));for(x=0;x<y.length;x++)T=y[x],P.set(T.data,E),E+=T.data.byteLength;return P},Io={prefixWithSilence:oa,trimAdtsFramesByEarliestDts:fo,generateSampleTable:Lo,concatenateFrameData:qe},Dn=Oe.ONE_SECOND_IN_TS,Pn=function(y,x){typeof x.pts=="number"&&(y.timelineStartInfo.pts===void 0&&(y.timelineStartInfo.pts=x.pts),y.minSegmentPts===void 0?y.minSegmentPts=x.pts:y.minSegmentPts=Math.min(y.minSegmentPts,x.pts),y.maxSegmentPts===void 0?y.maxSegmentPts=x.pts:y.maxSegmentPts=Math.max(y.maxSegmentPts,x.pts)),typeof x.dts=="number"&&(y.timelineStartInfo.dts===void 0&&(y.timelineStartInfo.dts=x.dts),y.minSegmentDts===void 0?y.minSegmentDts=x.dts:y.minSegmentDts=Math.min(y.minSegmentDts,x.dts),y.maxSegmentDts===void 0?y.maxSegmentDts=x.dts:y.maxSegmentDts=Math.max(y.maxSegmentDts,x.dts))},$n=function(y){delete y.minSegmentDts,delete y.maxSegmentDts,delete y.minSegmentPts,delete y.maxSegmentPts},Oo=function(y,x){var T,E,P=y.minSegmentDts;return x||(P-=y.timelineStartInfo.dts),T=y.timelineStartInfo.baseMediaDecodeTime,T+=P,T=Math.max(0,T),y.type==="audio"&&(E=y.samplerate/Dn,T*=E,T=Math.floor(T)),T},aa={clearDtsInfo:$n,calculateTrackBaseMediaDecodeTime:Oo,collectDtsInfo:Pn},Xn=4,Ta=128,Re=function(y){for(var x=0,T={payloadType:-1,payloadSize:0},E=0,P=0;x<y.byteLength&&y[x]!==Ta;){for(;y[x]===255;)E+=255,x++;for(E+=y[x++];y[x]===255;)P+=255,x++;if(P+=y[x++],!T.payload&&E===Xn){var L=String.fromCharCode(y[x+3],y[x+4],y[x+5],y[x+6]);if(L==="GA94"){T.payloadType=E,T.payloadSize=P,T.payload=y.subarray(x,x+P);break}else T.payload=void 0}x+=P,E=0,P=0}return T},Ae=function(y){return y.payload[0]!==181||(y.payload[1]<<8|y.payload[2])!==49||String.fromCharCode(y.payload[3],y.payload[4],y.payload[5],y.payload[6])!=="GA94"||y.payload[7]!==3?null:y.payload.subarray(8,y.payload.length-1)},Ze=function(y,x){var T=[],E,P,L,U;if(!(x[0]&64))return T;for(P=x[0]&31,E=0;E<P;E++)L=E*3,U={type:x[L+2]&3,pts:y},x[L+2]&4&&(U.ccData=x[L+3]<<8|x[L+4],T.push(U));return T},be=function(y){for(var x=y.byteLength,T=[],E=1,P,L;E<x-2;)y[E]===0&&y[E+1]===0&&y[E+2]===3?(T.push(E+2),E+=2):E++;if(T.length===0)return y;P=x-T.length,L=new Uint8Array(P);var U=0;for(E=0;E<P;U++,E++)U===T[0]&&(U++,T.shift()),L[E]=y[U];return L},Me={parseSei:Re,parseUserData:Ae,parseCaptionPackets:Ze,discardEmulationPreventionBytes:be,USER_DATA_REGISTERED_ITU_T_T35:Xn},Be=o,Ie=Me,et=function(y){y=y||{},et.prototype.init.call(this),this.parse708captions_=typeof y.parse708captions=="boolean"?y.parse708captions:!0,this.captionPackets_=[],this.ccStreams_=[new He(0,0),new He(0,1),new He(1,0),new He(1,1)],this.parse708captions_&&(this.cc708Stream_=new De({captionServices:y.captionServices})),this.reset(),this.ccStreams_.forEach(function(x){x.on("data",this.trigger.bind(this,"data")),x.on("partialdone",this.trigger.bind(this,"partialdone")),x.on("done",this.trigger.bind(this,"done"))},this),this.parse708captions_&&(this.cc708Stream_.on("data",this.trigger.bind(this,"data")),this.cc708Stream_.on("partialdone",this.trigger.bind(this,"partialdone")),this.cc708Stream_.on("done",this.trigger.bind(this,"done")))};et.prototype=new Be,et.prototype.push=function(y){var x,T,E;if(y.nalUnitType==="sei_rbsp"&&(x=Ie.parseSei(y.escapedRBSP),!!x.payload&&x.payloadType===Ie.USER_DATA_REGISTERED_ITU_T_T35&&(T=Ie.parseUserData(x),!!T))){if(y.dts<this.latestDts_){this.ignoreNextEqualDts_=!0;return}else if(y.dts===this.latestDts_&&this.ignoreNextEqualDts_){this.numSameDts_--,this.numSameDts_||(this.ignoreNextEqualDts_=!1);return}E=Ie.parseCaptionPackets(y.pts,T),this.captionPackets_=this.captionPackets_.concat(E),this.latestDts_!==y.dts&&(this.numSameDts_=0),this.numSameDts_++,this.latestDts_=y.dts}},et.prototype.flushCCStreams=function(y){this.ccStreams_.forEach(function(x){return y==="flush"?x.flush():x.partialFlush()},this)},et.prototype.flushStream=function(y){if(!this.captionPackets_.length){this.flushCCStreams(y);return}this.captionPackets_.forEach(function(x,T){x.presortIndex=T}),this.captionPackets_.sort(function(x,T){return x.pts===T.pts?x.presortIndex-T.presortIndex:x.pts-T.pts}),this.captionPackets_.forEach(function(x){x.type<2?this.dispatchCea608Packet(x):this.dispatchCea708Packet(x)},this),this.captionPackets_.length=0,this.flushCCStreams(y)},et.prototype.flush=function(){return this.flushStream("flush")},et.prototype.partialFlush=function(){return this.flushStream("partialFlush")},et.prototype.reset=function(){this.latestDts_=null,this.ignoreNextEqualDts_=!1,this.numSameDts_=0,this.activeCea608Channel_=[null,null],this.ccStreams_.forEach(function(y){y.reset()})},et.prototype.dispatchCea608Packet=function(y){this.setsTextOrXDSActive(y)?this.activeCea608Channel_[y.type]=null:this.setsChannel1Active(y)?this.activeCea608Channel_[y.type]=0:this.setsChannel2Active(y)&&(this.activeCea608Channel_[y.type]=1),this.activeCea608Channel_[y.type]!==null&&this.ccStreams_[(y.type<<1)+this.activeCea608Channel_[y.type]].push(y)},et.prototype.setsChannel1Active=function(y){return(y.ccData&30720)===4096},et.prototype.setsChannel2Active=function(y){return(y.ccData&30720)===6144},et.prototype.setsTextOrXDSActive=function(y){return(y.ccData&28928)===256||(y.ccData&30974)===4138||(y.ccData&30974)===6186},et.prototype.dispatchCea708Packet=function(y){this.parse708captions_&&this.cc708Stream_.push(y)};var Qe={127:9834,4128:32,4129:160,4133:8230,4138:352,4140:338,4144:9608,4145:8216,4146:8217,4147:8220,4148:8221,4149:8226,4153:8482,4154:353,4156:339,4157:8480,4159:376,4214:8539,4215:8540,4216:8541,4217:8542,4218:9168,4219:9124,4220:9123,4221:9135,4222:9126,4223:9121,4256:12600},wt=function(y){var x=Qe[y]||y;return y&4096&&y===x?"":String.fromCharCode(x)},Tt=function(y){return 32<=y&&y<=127||160<=y&&y<=255},tt=function(y){this.windowNum=y,this.reset()};tt.prototype.reset=function(){this.clearText(),this.pendingNewLine=!1,this.winAttr={},this.penAttr={},this.penLoc={},this.penColor={},this.visible=0,this.rowLock=0,this.columnLock=0,this.priority=0,this.relativePositioning=0,this.anchorVertical=0,this.anchorHorizontal=0,this.anchorPoint=0,this.rowCount=1,this.virtualRowCount=this.rowCount+1,this.columnCount=41,this.windowStyle=0,this.penStyle=0},tt.prototype.getText=function(){return this.rows.join(`
|
|
222
|
+
`)},tt.prototype.clearText=function(){this.rows=[""],this.rowIdx=0},tt.prototype.newLine=function(y){for(this.rows.length>=this.virtualRowCount&&typeof this.beforeRowOverflow=="function"&&this.beforeRowOverflow(y),this.rows.length>0&&(this.rows.push(""),this.rowIdx++);this.rows.length>this.virtualRowCount;)this.rows.shift(),this.rowIdx--},tt.prototype.isEmpty=function(){return this.rows.length===0?!0:this.rows.length===1?this.rows[0]==="":!1},tt.prototype.addText=function(y){this.rows[this.rowIdx]+=y},tt.prototype.backspace=function(){if(!this.isEmpty()){var y=this.rows[this.rowIdx];this.rows[this.rowIdx]=y.substr(0,y.length-1)}};var st=function(y,x,T){this.serviceNum=y,this.text="",this.currentWindow=new tt(-1),this.windows=[],this.stream=T,typeof x=="string"&&this.createTextDecoder(x)};st.prototype.init=function(y,x){this.startPts=y;for(var T=0;T<8;T++)this.windows[T]=new tt(T),typeof x=="function"&&(this.windows[T].beforeRowOverflow=x)},st.prototype.setCurrentWindow=function(y){this.currentWindow=this.windows[y]},st.prototype.createTextDecoder=function(y){if(typeof TextDecoder>"u")this.stream.trigger("log",{level:"warn",message:"The `encoding` option is unsupported without TextDecoder support"});else try{this.textDecoder_=new TextDecoder(y)}catch(x){this.stream.trigger("log",{level:"warn",message:"TextDecoder could not be created with "+y+" encoding. "+x})}};var De=function(y){y=y||{},De.prototype.init.call(this);var x=this,T=y.captionServices||{},E={},P;Object.keys(T).forEach(L=>{P=T[L],/^SERVICE/.test(L)&&(E[L]=P.encoding)}),this.serviceEncodings=E,this.current708Packet=null,this.services={},this.push=function(L){L.type===3?(x.new708Packet(),x.add708Bytes(L)):(x.current708Packet===null&&x.new708Packet(),x.add708Bytes(L))}};De.prototype=new Be,De.prototype.new708Packet=function(){this.current708Packet!==null&&this.push708Packet(),this.current708Packet={data:[],ptsVals:[]}},De.prototype.add708Bytes=function(y){var x=y.ccData,T=x>>>8,E=x&255;this.current708Packet.ptsVals.push(y.pts),this.current708Packet.data.push(T),this.current708Packet.data.push(E)},De.prototype.push708Packet=function(){var y=this.current708Packet,x=y.data,T=null,E=null,P=0,L=x[P++];for(y.seq=L>>6,y.sizeCode=L&63;P<x.length;P++)L=x[P++],T=L>>5,E=L&31,T===7&&E>0&&(L=x[P++],T=L),this.pushServiceBlock(T,P,E),E>0&&(P+=E-1)},De.prototype.pushServiceBlock=function(y,x,T){var E,P=x,L=this.current708Packet.data,U=this.services[y];for(U||(U=this.initService(y,P));P<x+T&&P<L.length;P++)E=L[P],Tt(E)?P=this.handleText(P,U):E===24?P=this.multiByteCharacter(P,U):E===16?P=this.extendedCommands(P,U):128<=E&&E<=135?P=this.setCurrentWindow(P,U):152<=E&&E<=159?P=this.defineWindow(P,U):E===136?P=this.clearWindows(P,U):E===140?P=this.deleteWindows(P,U):E===137?P=this.displayWindows(P,U):E===138?P=this.hideWindows(P,U):E===139?P=this.toggleWindows(P,U):E===151?P=this.setWindowAttributes(P,U):E===144?P=this.setPenAttributes(P,U):E===145?P=this.setPenColor(P,U):E===146?P=this.setPenLocation(P,U):E===143?U=this.reset(P,U):E===8?U.currentWindow.backspace():E===12?U.currentWindow.clearText():E===13?U.currentWindow.pendingNewLine=!0:E===14?U.currentWindow.clearText():E===141&&P++},De.prototype.extendedCommands=function(y,x){var T=this.current708Packet.data,E=T[++y];return Tt(E)&&(y=this.handleText(y,x,{isExtended:!0})),y},De.prototype.getPts=function(y){return this.current708Packet.ptsVals[Math.floor(y/2)]},De.prototype.initService=function(y,x){var E="SERVICE"+y,T=this,E,P;return E in this.serviceEncodings&&(P=this.serviceEncodings[E]),this.services[y]=new st(y,P,T),this.services[y].init(this.getPts(x),function(L){T.flushDisplayed(L,T.services[y])}),this.services[y]},De.prototype.handleText=function(y,x,T){var E=T&&T.isExtended,P=T&&T.isMultiByte,L=this.current708Packet.data,U=E?4096:0,j=L[y],G=L[y+1],K=x.currentWindow,ee,le;function ye(me){return me.map(Pe=>("0"+(Pe&255).toString(16)).slice(-2)).join("")}if(P?(le=[j,G],y++):le=[j],x.textDecoder_&&!E)ee=x.textDecoder_.decode(new Uint8Array(le));else if(P){const me=ye(le);ee=String.fromCharCode(parseInt(me,16))}else ee=wt(U|j);return K.pendingNewLine&&!K.isEmpty()&&K.newLine(this.getPts(y)),K.pendingNewLine=!1,K.addText(ee),y},De.prototype.multiByteCharacter=function(y,x){var T=this.current708Packet.data,E=T[y+1],P=T[y+2];return Tt(E)&&Tt(P)&&(y=this.handleText(++y,x,{isMultiByte:!0})),y},De.prototype.setCurrentWindow=function(y,x){var T=this.current708Packet.data,E=T[y],P=E&7;return x.setCurrentWindow(P),y},De.prototype.defineWindow=function(y,x){var T=this.current708Packet.data,E=T[y],P=E&7;x.setCurrentWindow(P);var L=x.currentWindow;return E=T[++y],L.visible=(E&32)>>5,L.rowLock=(E&16)>>4,L.columnLock=(E&8)>>3,L.priority=E&7,E=T[++y],L.relativePositioning=(E&128)>>7,L.anchorVertical=E&127,E=T[++y],L.anchorHorizontal=E,E=T[++y],L.anchorPoint=(E&240)>>4,L.rowCount=E&15,E=T[++y],L.columnCount=E&63,E=T[++y],L.windowStyle=(E&56)>>3,L.penStyle=E&7,L.virtualRowCount=L.rowCount+1,y},De.prototype.setWindowAttributes=function(y,x){var T=this.current708Packet.data,E=T[y],P=x.currentWindow.winAttr;return E=T[++y],P.fillOpacity=(E&192)>>6,P.fillRed=(E&48)>>4,P.fillGreen=(E&12)>>2,P.fillBlue=E&3,E=T[++y],P.borderType=(E&192)>>6,P.borderRed=(E&48)>>4,P.borderGreen=(E&12)>>2,P.borderBlue=E&3,E=T[++y],P.borderType+=(E&128)>>5,P.wordWrap=(E&64)>>6,P.printDirection=(E&48)>>4,P.scrollDirection=(E&12)>>2,P.justify=E&3,E=T[++y],P.effectSpeed=(E&240)>>4,P.effectDirection=(E&12)>>2,P.displayEffect=E&3,y},De.prototype.flushDisplayed=function(y,x){for(var T=[],E=0;E<8;E++)x.windows[E].visible&&!x.windows[E].isEmpty()&&T.push(x.windows[E].getText());x.endPts=y,x.text=T.join(`
|
|
223
|
+
|
|
224
|
+
`),this.pushCaption(x),x.startPts=y},De.prototype.pushCaption=function(y){y.text!==""&&(this.trigger("data",{startPts:y.startPts,endPts:y.endPts,text:y.text,stream:"cc708_"+y.serviceNum}),y.text="",y.startPts=y.endPts)},De.prototype.displayWindows=function(y,x){var T=this.current708Packet.data,E=T[++y],P=this.getPts(y);this.flushDisplayed(P,x);for(var L=0;L<8;L++)E&1<<L&&(x.windows[L].visible=1);return y},De.prototype.hideWindows=function(y,x){var T=this.current708Packet.data,E=T[++y],P=this.getPts(y);this.flushDisplayed(P,x);for(var L=0;L<8;L++)E&1<<L&&(x.windows[L].visible=0);return y},De.prototype.toggleWindows=function(y,x){var T=this.current708Packet.data,E=T[++y],P=this.getPts(y);this.flushDisplayed(P,x);for(var L=0;L<8;L++)E&1<<L&&(x.windows[L].visible^=1);return y},De.prototype.clearWindows=function(y,x){var T=this.current708Packet.data,E=T[++y],P=this.getPts(y);this.flushDisplayed(P,x);for(var L=0;L<8;L++)E&1<<L&&x.windows[L].clearText();return y},De.prototype.deleteWindows=function(y,x){var T=this.current708Packet.data,E=T[++y],P=this.getPts(y);this.flushDisplayed(P,x);for(var L=0;L<8;L++)E&1<<L&&x.windows[L].reset();return y},De.prototype.setPenAttributes=function(y,x){var T=this.current708Packet.data,E=T[y],P=x.currentWindow.penAttr;return E=T[++y],P.textTag=(E&240)>>4,P.offset=(E&12)>>2,P.penSize=E&3,E=T[++y],P.italics=(E&128)>>7,P.underline=(E&64)>>6,P.edgeType=(E&56)>>3,P.fontStyle=E&7,y},De.prototype.setPenColor=function(y,x){var T=this.current708Packet.data,E=T[y],P=x.currentWindow.penColor;return E=T[++y],P.fgOpacity=(E&192)>>6,P.fgRed=(E&48)>>4,P.fgGreen=(E&12)>>2,P.fgBlue=E&3,E=T[++y],P.bgOpacity=(E&192)>>6,P.bgRed=(E&48)>>4,P.bgGreen=(E&12)>>2,P.bgBlue=E&3,E=T[++y],P.edgeRed=(E&48)>>4,P.edgeGreen=(E&12)>>2,P.edgeBlue=E&3,y},De.prototype.setPenLocation=function(y,x){var T=this.current708Packet.data,E=T[y],P=x.currentWindow.penLoc;return x.currentWindow.pendingNewLine=!0,E=T[++y],P.row=E&15,E=T[++y],P.column=E&63,y},De.prototype.reset=function(y,x){var T=this.getPts(y);return this.flushDisplayed(T,x),this.initService(x.serviceNum,y)};var An={42:225,92:233,94:237,95:243,96:250,123:231,124:247,125:209,126:241,127:9608,304:174,305:176,306:189,307:191,308:8482,309:162,310:163,311:9834,312:224,313:160,314:232,315:226,316:234,317:238,318:244,319:251,544:193,545:201,546:211,547:218,548:220,549:252,550:8216,551:161,552:42,553:39,554:8212,555:169,556:8480,557:8226,558:8220,559:8221,560:192,561:194,562:199,563:200,564:202,565:203,566:235,567:206,568:207,569:239,570:212,571:217,572:249,573:219,574:171,575:187,800:195,801:227,802:205,803:204,804:236,805:210,806:242,807:213,808:245,809:123,810:125,811:92,812:94,813:95,814:124,815:126,816:196,817:228,818:214,819:246,820:223,821:165,822:164,823:9474,824:197,825:229,826:216,827:248,828:9484,829:9488,830:9492,831:9496},dt=function(y){return y===null?"":(y=An[y]||y,String.fromCharCode(y))},Ut=14,Yn=[4352,4384,4608,4640,5376,5408,5632,5664,5888,5920,4096,4864,4896,5120,5152],ht=function(){for(var y=[],x=Ut+1;x--;)y.push({text:"",indent:0,offset:0});return y},He=function(y,x){He.prototype.init.call(this),this.field_=y||0,this.dataChannel_=x||0,this.name_="CC"+((this.field_<<1|this.dataChannel_)+1),this.setConstants(),this.reset(),this.push=function(T){var E,P,L,U,j;if(E=T.ccData&32639,E===this.lastControlCode_){this.lastControlCode_=null;return}if((E&61440)===4096?this.lastControlCode_=E:E!==this.PADDING_&&(this.lastControlCode_=null),L=E>>>8,U=E&255,E!==this.PADDING_)if(E===this.RESUME_CAPTION_LOADING_)this.mode_="popOn";else if(E===this.END_OF_CAPTION_)this.mode_="popOn",this.clearFormatting(T.pts),this.flushDisplayed(T.pts),P=this.displayed_,this.displayed_=this.nonDisplayed_,this.nonDisplayed_=P,this.startPts_=T.pts;else if(E===this.ROLL_UP_2_ROWS_)this.rollUpRows_=2,this.setRollUp(T.pts);else if(E===this.ROLL_UP_3_ROWS_)this.rollUpRows_=3,this.setRollUp(T.pts);else if(E===this.ROLL_UP_4_ROWS_)this.rollUpRows_=4,this.setRollUp(T.pts);else if(E===this.CARRIAGE_RETURN_)this.clearFormatting(T.pts),this.flushDisplayed(T.pts),this.shiftRowsUp_(),this.startPts_=T.pts;else if(E===this.BACKSPACE_)this.mode_==="popOn"?this.nonDisplayed_[this.row_].text=this.nonDisplayed_[this.row_].text.slice(0,-1):this.displayed_[this.row_].text=this.displayed_[this.row_].text.slice(0,-1);else if(E===this.ERASE_DISPLAYED_MEMORY_)this.flushDisplayed(T.pts),this.displayed_=ht();else if(E===this.ERASE_NON_DISPLAYED_MEMORY_)this.nonDisplayed_=ht();else if(E===this.RESUME_DIRECT_CAPTIONING_)this.mode_!=="paintOn"&&(this.flushDisplayed(T.pts),this.displayed_=ht()),this.mode_="paintOn",this.startPts_=T.pts;else if(this.isSpecialCharacter(L,U))L=(L&3)<<8,j=dt(L|U),this[this.mode_](T.pts,j),this.column_++;else if(this.isExtCharacter(L,U))this.mode_==="popOn"?this.nonDisplayed_[this.row_].text=this.nonDisplayed_[this.row_].text.slice(0,-1):this.displayed_[this.row_].text=this.displayed_[this.row_].text.slice(0,-1),L=(L&3)<<8,j=dt(L|U),this[this.mode_](T.pts,j),this.column_++;else if(this.isMidRowCode(L,U))this.clearFormatting(T.pts),this[this.mode_](T.pts," "),this.column_++,(U&14)===14&&this.addFormatting(T.pts,["i"]),(U&1)===1&&this.addFormatting(T.pts,["u"]);else if(this.isOffsetControlCode(L,U)){const K=U&3;this.nonDisplayed_[this.row_].offset=K,this.column_+=K}else if(this.isPAC(L,U)){var G=Yn.indexOf(E&7968);if(this.mode_==="rollUp"&&(G-this.rollUpRows_+1<0&&(G=this.rollUpRows_-1),this.setRollUp(T.pts,G)),G!==this.row_&&G>=0&&G<=14&&(this.clearFormatting(T.pts),this.row_=G),U&1&&this.formatting_.indexOf("u")===-1&&this.addFormatting(T.pts,["u"]),(E&16)===16){const K=(E&14)>>1;this.column_=K*4,this.nonDisplayed_[this.row_].indent+=K}this.isColorPAC(U)&&(U&14)===14&&this.addFormatting(T.pts,["i"])}else this.isNormalChar(L)&&(U===0&&(U=null),j=dt(L),j+=dt(U),this[this.mode_](T.pts,j),this.column_+=j.length)}};He.prototype=new Be,He.prototype.flushDisplayed=function(y){const x=E=>{this.trigger("log",{level:"warn",message:"Skipping a malformed 608 caption at index "+E+"."})},T=[];this.displayed_.forEach((E,P)=>{if(E&&E.text&&E.text.length){try{E.text=E.text.trim()}catch{x(P)}E.text.length&&T.push({text:E.text,line:P+1,position:10+Math.min(70,E.indent*10)+E.offset*2.5})}else E==null&&x(P)}),T.length&&this.trigger("data",{startPts:this.startPts_,endPts:y,content:T,stream:this.name_})},He.prototype.reset=function(){this.mode_="popOn",this.topRow_=0,this.startPts_=0,this.displayed_=ht(),this.nonDisplayed_=ht(),this.lastControlCode_=null,this.column_=0,this.row_=Ut,this.rollUpRows_=2,this.formatting_=[]},He.prototype.setConstants=function(){this.dataChannel_===0?(this.BASE_=16,this.EXT_=17,this.CONTROL_=(20|this.field_)<<8,this.OFFSET_=23):this.dataChannel_===1&&(this.BASE_=24,this.EXT_=25,this.CONTROL_=(28|this.field_)<<8,this.OFFSET_=31),this.PADDING_=0,this.RESUME_CAPTION_LOADING_=this.CONTROL_|32,this.END_OF_CAPTION_=this.CONTROL_|47,this.ROLL_UP_2_ROWS_=this.CONTROL_|37,this.ROLL_UP_3_ROWS_=this.CONTROL_|38,this.ROLL_UP_4_ROWS_=this.CONTROL_|39,this.CARRIAGE_RETURN_=this.CONTROL_|45,this.RESUME_DIRECT_CAPTIONING_=this.CONTROL_|41,this.BACKSPACE_=this.CONTROL_|33,this.ERASE_DISPLAYED_MEMORY_=this.CONTROL_|44,this.ERASE_NON_DISPLAYED_MEMORY_=this.CONTROL_|46},He.prototype.isSpecialCharacter=function(y,x){return y===this.EXT_&&x>=48&&x<=63},He.prototype.isExtCharacter=function(y,x){return(y===this.EXT_+1||y===this.EXT_+2)&&x>=32&&x<=63},He.prototype.isMidRowCode=function(y,x){return y===this.EXT_&&x>=32&&x<=47},He.prototype.isOffsetControlCode=function(y,x){return y===this.OFFSET_&&x>=33&&x<=35},He.prototype.isPAC=function(y,x){return y>=this.BASE_&&y<this.BASE_+8&&x>=64&&x<=127},He.prototype.isColorPAC=function(y){return y>=64&&y<=79||y>=96&&y<=127},He.prototype.isNormalChar=function(y){return y>=32&&y<=127},He.prototype.setRollUp=function(y,x){if(this.mode_!=="rollUp"&&(this.row_=Ut,this.mode_="rollUp",this.flushDisplayed(y),this.nonDisplayed_=ht(),this.displayed_=ht()),x!==void 0&&x!==this.row_)for(var T=0;T<this.rollUpRows_;T++)this.displayed_[x-T]=this.displayed_[this.row_-T],this.displayed_[this.row_-T]={text:"",indent:0,offset:0};x===void 0&&(x=this.row_),this.topRow_=x-this.rollUpRows_+1},He.prototype.addFormatting=function(y,x){this.formatting_=this.formatting_.concat(x);var T=x.reduce(function(E,P){return E+"<"+P+">"},"");this[this.mode_](y,T)},He.prototype.clearFormatting=function(y){if(this.formatting_.length){var x=this.formatting_.reverse().reduce(function(T,E){return T+"</"+E+">"},"");this.formatting_=[],this[this.mode_](y,x)}},He.prototype.popOn=function(y,x){var T=this.nonDisplayed_[this.row_].text;T+=x,this.nonDisplayed_[this.row_].text=T},He.prototype.rollUp=function(y,x){var T=this.displayed_[this.row_].text;T+=x,this.displayed_[this.row_].text=T},He.prototype.shiftRowsUp_=function(){var y;for(y=0;y<this.topRow_;y++)this.displayed_[y]={text:"",indent:0,offset:0};for(y=this.row_+1;y<Ut+1;y++)this.displayed_[y]={text:"",indent:0,offset:0};for(y=this.topRow_;y<this.row_;y++)this.displayed_[y]=this.displayed_[y+1];this.displayed_[this.row_]={text:"",indent:0,offset:0}},He.prototype.paintOn=function(y,x){var T=this.displayed_[this.row_].text;T+=x,this.displayed_[this.row_].text=T};var It={CaptionStream:et,Cea608Stream:He,Cea708Stream:De},Kn={H264_STREAM_TYPE:27,ADTS_STREAM_TYPE:15,METADATA_STREAM_TYPE:21},ai=o,Rt=8589934592,Nt=4294967296,Ln="shared",Na=function(y,x){var T=1;for(y>x&&(T=-1);Math.abs(x-y)>Nt;)y+=T*Rt;return y},ii=function(y){var x,T;ii.prototype.init.call(this),this.type_=y||Ln,this.push=function(E){if(E.type==="metadata"){this.trigger("data",E);return}this.type_!==Ln&&E.type!==this.type_||(T===void 0&&(T=E.dts),E.dts=Na(E.dts,T),E.pts=Na(E.pts,T),x=E.dts,this.trigger("data",E))},this.flush=function(){T=x,this.trigger("done")},this.endTimeline=function(){this.flush(),this.trigger("endedtimeline")},this.discontinuity=function(){T=void 0,x=void 0},this.reset=function(){this.discontinuity(),this.trigger("reset")}};ii.prototype=new ai;var ia={TimestampRolloverStream:ii,handleRollover:Na},Qn=(y,x,T)=>{if(!y)return-1;for(var E=T;E<y.length;E++)if(y[E]===x)return E;return-1},Sa={typedArrayIndexOf:Qn},Mo=Sa.typedArrayIndexOf,In={Utf8:3},Ap=function(y,x,T){var E,P="";for(E=x;E<T;E++)P+="%"+("00"+y[E].toString(16)).slice(-2);return P},ds=function(y,x,T){return decodeURIComponent(Ap(y,x,T))},us=function(y,x,T){return unescape(Ap(y,x,T))},cs=function(y){return y[0]<<21|y[1]<<14|y[2]<<7|y[3]},ms={APIC:function(y){var x=1,T,E,P="-->";y.data[0]===In.Utf8&&(T=Mo(y.data,0,x),!(T<0)&&(y.mimeType=us(y.data,x,T),x=T+1,y.pictureType=y.data[x],x++,E=Mo(y.data,0,x),!(E<0)&&(y.description=ds(y.data,x,E),x=E+1,y.mimeType===P?y.url=us(y.data,x,y.data.length):y.pictureData=y.data.subarray(x,y.data.length))))},"T*":function(y){y.data[0]===In.Utf8&&(y.value=ds(y.data,1,y.data.length).replace(/\0*$/,""),y.values=y.value.split("\0"))},TXXX:function(y){var x;y.data[0]===In.Utf8&&(x=Mo(y.data,0,1),x!==-1&&(y.description=ds(y.data,1,x),y.value=ds(y.data,x+1,y.data.length).replace(/\0*$/,""),y.data=y.value))},"W*":function(y){y.url=us(y.data,0,y.data.length).replace(/\0.*$/,"")},WXXX:function(y){var x;y.data[0]===In.Utf8&&(x=Mo(y.data,0,1),x!==-1&&(y.description=ds(y.data,1,x),y.url=us(y.data,x+1,y.data.length).replace(/\0.*$/,"")))},PRIV:function(y){var x;for(x=0;x<y.data.length;x++)if(y.data[x]===0){y.owner=us(y.data,0,x);break}y.privateData=y.data.subarray(x+1),y.data=y.privateData}},Uy=function(y){var x,T,E=10,P=0,L=[];if(!(y.length<10||y[0]!==73||y[1]!==68||y[2]!==51)){P=cs(y.subarray(6,10)),P+=10;var U=y[5]&64;U&&(E+=4,E+=cs(y.subarray(10,14)),P-=cs(y.subarray(16,20)));do{if(x=cs(y.subarray(E+4,E+8)),x<1)break;T=String.fromCharCode(y[E],y[E+1],y[E+2],y[E+3]);var j={id:T,data:y.subarray(E+10,E+x+10)};j.key=j.id,ms[j.id]?ms[j.id](j):j.id[0]==="T"?ms["T*"](j):j.id[0]==="W"&&ms["W*"](j),L.push(j),E+=10,E+=x}while(E<P);return L}},Lp={parseId3Frames:Uy,parseSyncSafeInteger:cs,frameParsers:ms},Ry=o,Fy=Kn,sa=Lp,Ll;Ll=function(y){var x={descriptor:y&&y.descriptor},T=0,E=[],P=0,L;if(Ll.prototype.init.call(this),this.dispatchType=Fy.METADATA_STREAM_TYPE.toString(16),x.descriptor)for(L=0;L<x.descriptor.length;L++)this.dispatchType+=("00"+x.descriptor[L].toString(16)).slice(-2);this.push=function(U){var j,G,K,ee,le,ye;if(U.type==="timed-metadata"){if(U.dataAlignmentIndicator&&(P=0,E.length=0),E.length===0&&(U.data.length<10||U.data[0]!==73||U.data[1]!==68||U.data[2]!==51)){this.trigger("log",{level:"warn",message:"Skipping unrecognized metadata packet"});return}if(E.push(U),P+=U.data.byteLength,E.length===1&&(T=sa.parseSyncSafeInteger(U.data.subarray(6,10)),T+=10),!(P<T)){for(j={data:new Uint8Array(T),frames:[],pts:E[0].pts,dts:E[0].dts},le=0;le<T;)j.data.set(E[0].data.subarray(0,T-le),le),le+=E[0].data.byteLength,P-=E[0].data.byteLength,E.shift();G=10,j.data[5]&64&&(G+=4,G+=sa.parseSyncSafeInteger(j.data.subarray(10,14)),T-=sa.parseSyncSafeInteger(j.data.subarray(16,20)));do{if(K=sa.parseSyncSafeInteger(j.data.subarray(G+4,G+8)),K<1){this.trigger("log",{level:"warn",message:"Malformed ID3 frame encountered. Skipping remaining metadata parsing."});break}if(ye=String.fromCharCode(j.data[G],j.data[G+1],j.data[G+2],j.data[G+3]),ee={id:ye,data:j.data.subarray(G+10,G+K+10)},ee.key=ee.id,sa.frameParsers[ee.id]?sa.frameParsers[ee.id](ee):ee.id[0]==="T"?sa.frameParsers["T*"](ee):ee.id[0]==="W"&&sa.frameParsers["W*"](ee),ee.owner==="com.apple.streaming.transportStreamTimestamp"){var me=ee.data,Pe=(me[3]&1)<<30|me[4]<<22|me[5]<<14|me[6]<<6|me[7]>>>2;Pe*=4,Pe+=me[7]&3,ee.timeStamp=Pe,j.pts===void 0&&j.dts===void 0&&(j.pts=ee.timeStamp,j.dts=ee.timeStamp),this.trigger("timestamp",ee)}j.frames.push(ee),G+=10,G+=K}while(G<T);this.trigger("data",j)}}}},Ll.prototype=new Ry;var Hy=Ll,Uu=o,Ru=It,lo=Kn,jy=ia.TimestampRolloverStream,Il,ps,Ol,si=188,Fu=71;Il=function(){var y=new Uint8Array(si),x=0;Il.prototype.init.call(this),this.push=function(T){var E=0,P=si,L;for(x?(L=new Uint8Array(T.byteLength+x),L.set(y.subarray(0,x)),L.set(T,x),x=0):L=T;P<L.byteLength;){if(L[E]===Fu&&L[P]===Fu){this.trigger("data",L.subarray(E,P)),E+=si,P+=si;continue}E++,P++}E<L.byteLength&&(y.set(L.subarray(E),0),x=L.byteLength-E)},this.flush=function(){x===si&&y[0]===Fu&&(this.trigger("data",y),x=0),this.trigger("done")},this.endTimeline=function(){this.flush(),this.trigger("endedtimeline")},this.reset=function(){x=0,this.trigger("reset")}},Il.prototype=new Uu,ps=function(){var y,x,T,E;ps.prototype.init.call(this),E=this,this.packetsWaitingForPmt=[],this.programMapTable=void 0,y=function(P,L){var U=0;L.payloadUnitStartIndicator&&(U+=P[U]+1),L.type==="pat"?x(P.subarray(U),L):T(P.subarray(U),L)},x=function(P,L){L.section_number=P[7],L.last_section_number=P[8],E.pmtPid=(P[10]&31)<<8|P[11],L.pmtPid=E.pmtPid},T=function(P,L){var U,j,G,K;if(P[5]&1){for(E.programMapTable={video:null,audio:null,"timed-metadata":{}},U=(P[1]&15)<<8|P[2],j=3+U-4,G=(P[10]&15)<<8|P[11],K=12+G;K<j;){var ee=P[K],le=(P[K+1]&31)<<8|P[K+2];ee===lo.H264_STREAM_TYPE&&E.programMapTable.video===null?E.programMapTable.video=le:ee===lo.ADTS_STREAM_TYPE&&E.programMapTable.audio===null?E.programMapTable.audio=le:ee===lo.METADATA_STREAM_TYPE&&(E.programMapTable["timed-metadata"][le]=ee),K+=((P[K+3]&15)<<8|P[K+4])+5}L.programMapTable=E.programMapTable}},this.push=function(P){var L={},U=4;if(L.payloadUnitStartIndicator=!!(P[1]&64),L.pid=P[1]&31,L.pid<<=8,L.pid|=P[2],(P[3]&48)>>>4>1&&(U+=P[U]+1),L.pid===0)L.type="pat",y(P.subarray(U),L),this.trigger("data",L);else if(L.pid===this.pmtPid)for(L.type="pmt",y(P.subarray(U),L),this.trigger("data",L);this.packetsWaitingForPmt.length;)this.processPes_.apply(this,this.packetsWaitingForPmt.shift());else this.programMapTable===void 0?this.packetsWaitingForPmt.push([P,U,L]):this.processPes_(P,U,L)},this.processPes_=function(P,L,U){U.pid===this.programMapTable.video?U.streamType=lo.H264_STREAM_TYPE:U.pid===this.programMapTable.audio?U.streamType=lo.ADTS_STREAM_TYPE:U.streamType=this.programMapTable["timed-metadata"][U.pid],U.type="pes",U.data=P.subarray(L),this.trigger("data",U)}},ps.prototype=new Uu,ps.STREAM_TYPES={h264:27,adts:15},Ol=function(){var y=this,x=!1,T={data:[],size:0},E={data:[],size:0},P={data:[],size:0},L,U=function(G,K){var ee;const le=G[0]<<16|G[1]<<8|G[2];K.data=new Uint8Array,le===1&&(K.packetLength=6+(G[4]<<8|G[5]),K.dataAlignmentIndicator=(G[6]&4)!==0,ee=G[7],ee&192&&(K.pts=(G[9]&14)<<27|(G[10]&255)<<20|(G[11]&254)<<12|(G[12]&255)<<5|(G[13]&254)>>>3,K.pts*=4,K.pts+=(G[13]&6)>>>1,K.dts=K.pts,ee&64&&(K.dts=(G[14]&14)<<27|(G[15]&255)<<20|(G[16]&254)<<12|(G[17]&255)<<5|(G[18]&254)>>>3,K.dts*=4,K.dts+=(G[18]&6)>>>1)),K.data=G.subarray(9+G[8]))},j=function(G,K,ee){var le=new Uint8Array(G.size),ye={type:K},me=0,Pe=0,je=!1,Ft;if(!(!G.data.length||G.size<9)){for(ye.trackId=G.data[0].pid,me=0;me<G.data.length;me++)Ft=G.data[me],le.set(Ft.data,Pe),Pe+=Ft.data.byteLength;U(le,ye),je=K==="video"||ye.packetLength<=G.size,(ee||je)&&(G.size=0,G.data.length=0),je&&y.trigger("data",ye)}};Ol.prototype.init.call(this),this.push=function(G){({pat:function(){},pes:function(){var K,ee;switch(G.streamType){case lo.H264_STREAM_TYPE:K=T,ee="video";break;case lo.ADTS_STREAM_TYPE:K=E,ee="audio";break;case lo.METADATA_STREAM_TYPE:K=P,ee="timed-metadata";break;default:return}G.payloadUnitStartIndicator&&j(K,ee,!0),K.data.push(G),K.size+=G.data.byteLength},pmt:function(){var K={type:"metadata",tracks:[]};L=G.programMapTable,L.video!==null&&K.tracks.push({timelineStartInfo:{baseMediaDecodeTime:0},id:+L.video,codec:"avc",type:"video"}),L.audio!==null&&K.tracks.push({timelineStartInfo:{baseMediaDecodeTime:0},id:+L.audio,codec:"adts",type:"audio"}),x=!0,y.trigger("data",K)}})[G.type]()},this.reset=function(){T.size=0,T.data.length=0,E.size=0,E.data.length=0,this.trigger("reset")},this.flushStreams_=function(){j(T,"video"),j(E,"audio"),j(P,"timed-metadata")},this.flush=function(){if(!x&&L){var G={type:"metadata",tracks:[]};L.video!==null&&G.tracks.push({timelineStartInfo:{baseMediaDecodeTime:0},id:+L.video,codec:"avc",type:"video"}),L.audio!==null&&G.tracks.push({timelineStartInfo:{baseMediaDecodeTime:0},id:+L.audio,codec:"adts",type:"audio"}),y.trigger("data",G)}x=!1,this.flushStreams_(),this.trigger("done")}},Ol.prototype=new Uu;var Ip={PAT_PID:0,MP2T_PACKET_LENGTH:si,TransportPacketStream:Il,TransportParseStream:ps,ElementaryStream:Ol,TimestampRolloverStream:jy,CaptionStream:Ru.CaptionStream,Cea608Stream:Ru.Cea608Stream,Cea708Stream:Ru.Cea708Stream,MetadataStream:Hy};for(var Hu in lo)lo.hasOwnProperty(Hu)&&(Ip[Hu]=lo[Hu]);var zy=Ip,qy=o,Wy=Oe.ONE_SECOND_IN_TS,Ml,Op=[96e3,88200,64e3,48e3,44100,32e3,24e3,22050,16e3,12e3,11025,8e3,7350];Ml=function(y){var x,T=0;Ml.prototype.init.call(this),this.skipWarn_=function(E,P){this.trigger("log",{level:"warn",message:`adts skiping bytes ${E} to ${P} in frame ${T} outside syncword`})},this.push=function(E){var P=0,L,U,j,G,K;if(y||(T=0),E.type==="audio"){x&&x.length?(j=x,x=new Uint8Array(j.byteLength+E.data.byteLength),x.set(j),x.set(E.data,j.byteLength)):x=E.data;for(var ee;P+7<x.length;){if(x[P]!==255||(x[P+1]&246)!==240){typeof ee!="number"&&(ee=P),P++;continue}if(typeof ee=="number"&&(this.skipWarn_(ee,P),ee=null),U=(~x[P+1]&1)*2,L=(x[P+3]&3)<<11|x[P+4]<<3|(x[P+5]&224)>>5,G=((x[P+6]&3)+1)*1024,K=G*Wy/Op[(x[P+2]&60)>>>2],x.byteLength-P<L)break;this.trigger("data",{pts:E.pts+T*K,dts:E.dts+T*K,sampleCount:G,audioobjecttype:(x[P+2]>>>6&3)+1,channelcount:(x[P+2]&1)<<2|(x[P+3]&192)>>>6,samplerate:Op[(x[P+2]&60)>>>2],samplingfrequencyindex:(x[P+2]&60)>>>2,samplesize:16,data:x.subarray(P+7+U,P+L)}),T++,P+=L}typeof ee=="number"&&(this.skipWarn_(ee,P),ee=null),x=x.subarray(P)}},this.flush=function(){T=0,this.trigger("done")},this.reset=function(){x=void 0,this.trigger("reset")},this.endTimeline=function(){x=void 0,this.trigger("endedtimeline")}},Ml.prototype=new qy;var Gy=Ml,Mp;Mp=function(y){var x=y.byteLength,T=0,E=0;this.length=function(){return 8*x},this.bitsAvailable=function(){return 8*x+E},this.loadWord=function(){var P=y.byteLength-x,L=new Uint8Array(4),U=Math.min(4,x);if(U===0)throw new Error("no bytes available");L.set(y.subarray(P,P+U)),T=new DataView(L.buffer).getUint32(0),E=U*8,x-=U},this.skipBits=function(P){var L;E>P?(T<<=P,E-=P):(P-=E,L=Math.floor(P/8),P-=L*8,x-=L,this.loadWord(),T<<=P,E-=P)},this.readBits=function(P){var L=Math.min(E,P),U=T>>>32-L;return E-=L,E>0?T<<=L:x>0&&this.loadWord(),L=P-L,L>0?U<<L|this.readBits(L):U},this.skipLeadingZeros=function(){var P;for(P=0;P<E;++P)if(T&2147483648>>>P)return T<<=P,E-=P,P;return this.loadWord(),P+this.skipLeadingZeros()},this.skipUnsignedExpGolomb=function(){this.skipBits(1+this.skipLeadingZeros())},this.skipExpGolomb=function(){this.skipBits(1+this.skipLeadingZeros())},this.readUnsignedExpGolomb=function(){var P=this.skipLeadingZeros();return this.readBits(P+1)-1},this.readExpGolomb=function(){var P=this.readUnsignedExpGolomb();return 1&P?1+P>>>1:-1*(P>>>1)},this.readBoolean=function(){return this.readBits(1)===1},this.readUnsignedByte=function(){return this.readBits(8)},this.loadWord()};var Xy=Mp,Up=o,Yy=Xy,Ul,Rl,Rp;Rl=function(){var y=0,x,T;Rl.prototype.init.call(this),this.push=function(E){var P;T?(P=new Uint8Array(T.byteLength+E.data.byteLength),P.set(T),P.set(E.data,T.byteLength),T=P):T=E.data;for(var L=T.byteLength;y<L-3;y++)if(T[y+2]===1){x=y+5;break}for(;x<L;)switch(T[x]){case 0:if(T[x-1]!==0){x+=2;break}else if(T[x-2]!==0){x++;break}y+3!==x-2&&this.trigger("data",T.subarray(y+3,x-2));do x++;while(T[x]!==1&&x<L);y=x-2,x+=3;break;case 1:if(T[x-1]!==0||T[x-2]!==0){x+=3;break}this.trigger("data",T.subarray(y+3,x-2)),y=x-2,x+=3;break;default:x+=3;break}T=T.subarray(y),x-=y,y=0},this.reset=function(){T=null,y=0,this.trigger("reset")},this.flush=function(){T&&T.byteLength>3&&this.trigger("data",T.subarray(y+3)),T=null,y=0,this.trigger("done")},this.endTimeline=function(){this.flush(),this.trigger("endedtimeline")}},Rl.prototype=new Up,Rp={100:!0,110:!0,122:!0,244:!0,44:!0,83:!0,86:!0,118:!0,128:!0,138:!0,139:!0,134:!0},Ul=function(){var y=new Rl,x,T,E,P,L,U,j;Ul.prototype.init.call(this),x=this,this.push=function(G){G.type==="video"&&(T=G.trackId,E=G.pts,P=G.dts,y.push(G))},y.on("data",function(G){var K={trackId:T,pts:E,dts:P,data:G,nalUnitTypeCode:G[0]&31};switch(K.nalUnitTypeCode){case 5:K.nalUnitType="slice_layer_without_partitioning_rbsp_idr";break;case 6:K.nalUnitType="sei_rbsp",K.escapedRBSP=L(G.subarray(1));break;case 7:K.nalUnitType="seq_parameter_set_rbsp",K.escapedRBSP=L(G.subarray(1)),K.config=U(K.escapedRBSP);break;case 8:K.nalUnitType="pic_parameter_set_rbsp";break;case 9:K.nalUnitType="access_unit_delimiter_rbsp";break}x.trigger("data",K)}),y.on("done",function(){x.trigger("done")}),y.on("partialdone",function(){x.trigger("partialdone")}),y.on("reset",function(){x.trigger("reset")}),y.on("endedtimeline",function(){x.trigger("endedtimeline")}),this.flush=function(){y.flush()},this.partialFlush=function(){y.partialFlush()},this.reset=function(){y.reset()},this.endTimeline=function(){y.endTimeline()},j=function(G,K){var ee=8,le=8,ye,me;for(ye=0;ye<G;ye++)le!==0&&(me=K.readExpGolomb(),le=(ee+me+256)%256),ee=le===0?ee:le},L=function(G){for(var K=G.byteLength,ee=[],le=1,ye,me;le<K-2;)G[le]===0&&G[le+1]===0&&G[le+2]===3?(ee.push(le+2),le+=2):le++;if(ee.length===0)return G;ye=K-ee.length,me=new Uint8Array(ye);var Pe=0;for(le=0;le<ye;Pe++,le++)Pe===ee[0]&&(Pe++,ee.shift()),me[le]=G[Pe];return me},U=function(G){var K=0,ee=0,le=0,ye=0,me,Pe,je,Ft,On,ra,bs,ws,xs,Vs,Jl,ft=[1,1],Cs,uo;if(me=new Yy(G),Pe=me.readUnsignedByte(),Ft=me.readUnsignedByte(),je=me.readUnsignedByte(),me.skipUnsignedExpGolomb(),Rp[Pe]&&(On=me.readUnsignedExpGolomb(),On===3&&me.skipBits(1),me.skipUnsignedExpGolomb(),me.skipUnsignedExpGolomb(),me.skipBits(1),me.readBoolean()))for(Jl=On!==3?8:12,uo=0;uo<Jl;uo++)me.readBoolean()&&(uo<6?j(16,me):j(64,me));if(me.skipUnsignedExpGolomb(),ra=me.readUnsignedExpGolomb(),ra===0)me.readUnsignedExpGolomb();else if(ra===1)for(me.skipBits(1),me.skipExpGolomb(),me.skipExpGolomb(),bs=me.readUnsignedExpGolomb(),uo=0;uo<bs;uo++)me.skipExpGolomb();if(me.skipUnsignedExpGolomb(),me.skipBits(1),ws=me.readUnsignedExpGolomb(),xs=me.readUnsignedExpGolomb(),Vs=me.readBits(1),Vs===0&&me.skipBits(1),me.skipBits(1),me.readBoolean()&&(K=me.readUnsignedExpGolomb(),ee=me.readUnsignedExpGolomb(),le=me.readUnsignedExpGolomb(),ye=me.readUnsignedExpGolomb()),me.readBoolean()&&me.readBoolean()){switch(Cs=me.readUnsignedByte(),Cs){case 1:ft=[1,1];break;case 2:ft=[12,11];break;case 3:ft=[10,11];break;case 4:ft=[16,11];break;case 5:ft=[40,33];break;case 6:ft=[24,11];break;case 7:ft=[20,11];break;case 8:ft=[32,11];break;case 9:ft=[80,33];break;case 10:ft=[18,11];break;case 11:ft=[15,11];break;case 12:ft=[64,33];break;case 13:ft=[160,99];break;case 14:ft=[4,3];break;case 15:ft=[3,2];break;case 16:ft=[2,1];break;case 255:{ft=[me.readUnsignedByte()<<8|me.readUnsignedByte(),me.readUnsignedByte()<<8|me.readUnsignedByte()];break}}ft&&ft[0]/ft[1]}return{profileIdc:Pe,levelIdc:je,profileCompatibility:Ft,width:(ws+1)*16-K*2-ee*2,height:(2-Vs)*(xs+1)*16-le*2-ye*2,sarRatio:ft}}},Ul.prototype=new Up;var Ky={H264Stream:Ul},Qy=[96e3,88200,64e3,48e3,44100,32e3,24e3,22050,16e3,12e3,11025,8e3,7350],Fp=function(y,x){var T=y[x+6]<<21|y[x+7]<<14|y[x+8]<<7|y[x+9],E=y[x+5],P=(E&16)>>4;return T=T>=0?T:0,P?T+20:T+10},Hp=function(y,x){return y.length-x<10||y[x]!==73||y[x+1]!==68||y[x+2]!==51?x:(x+=Fp(y,x),Hp(y,x))},Jy=function(y){var x=Hp(y,0);return y.length>=x+2&&(y[x]&255)===255&&(y[x+1]&240)===240&&(y[x+1]&22)===16},jp=function(y){return y[0]<<21|y[1]<<14|y[2]<<7|y[3]},Zy=function(y,x,T){var E,P="";for(E=x;E<T;E++)P+="%"+("00"+y[E].toString(16)).slice(-2);return P},e2=function(y,x,T){return unescape(Zy(y,x,T))},t2=function(y,x){var T=(y[x+5]&224)>>5,E=y[x+4]<<3,P=y[x+3]&6144;return P|E|T},n2=function(y,x){return y[x]===73&&y[x+1]===68&&y[x+2]===51?"timed-metadata":y[x]&!0&&(y[x+1]&240)===240?"audio":null},o2=function(y){for(var x=0;x+5<y.length;){if(y[x]!==255||(y[x+1]&246)!==240){x++;continue}return Qy[(y[x+2]&60)>>>2]}return null},a2=function(y){var x,T,E,P;x=10,y[5]&64&&(x+=4,x+=jp(y.subarray(10,14)));do{if(T=jp(y.subarray(x+4,x+8)),T<1)return null;if(P=String.fromCharCode(y[x],y[x+1],y[x+2],y[x+3]),P==="PRIV"){E=y.subarray(x+10,x+T+10);for(var L=0;L<E.byteLength;L++)if(E[L]===0){var U=e2(E,0,L);if(U==="com.apple.streaming.transportStreamTimestamp"){var j=E.subarray(L+1),G=(j[3]&1)<<30|j[4]<<22|j[5]<<14|j[6]<<6|j[7]>>>2;return G*=4,G+=j[7]&3,G}break}}x+=10,x+=T}while(x<y.byteLength);return null},ju={isLikelyAacData:Jy,parseId3TagSize:Fp,parseAdtsSize:t2,parseType:n2,parseSampleRate:o2,parseAacTimestamp:a2},i2=o,zp=ju,Fl;Fl=function(){var y=new Uint8Array,x=0;Fl.prototype.init.call(this),this.setTimestamp=function(T){x=T},this.push=function(T){var E=0,P=0,L,U,j,G;for(y.length?(G=y.length,y=new Uint8Array(T.byteLength+G),y.set(y.subarray(0,G)),y.set(T,G)):y=T;y.length-P>=3;){if(y[P]===73&&y[P+1]===68&&y[P+2]===51){if(y.length-P<10||(E=zp.parseId3TagSize(y,P),P+E>y.length))break;U={type:"timed-metadata",data:y.subarray(P,P+E)},this.trigger("data",U),P+=E;continue}else if((y[P]&255)===255&&(y[P+1]&240)===240){if(y.length-P<7||(E=zp.parseAdtsSize(y,P),P+E>y.length))break;j={type:"audio",data:y.subarray(P,P+E),pts:x,dts:x},this.trigger("data",j),P+=E;continue}P++}L=y.length-P,L>0?y=y.subarray(P):y=new Uint8Array},this.reset=function(){y=new Uint8Array,this.trigger("reset")},this.endTimeline=function(){y=new Uint8Array,this.trigger("endedtimeline")}},Fl.prototype=new i2;var s2=Fl,l2=["audioobjecttype","channelcount","samplerate","samplingfrequencyindex","samplesize"],r2=l2,d2=["width","height","profileIdc","levelIdc","profileCompatibility","sarRatio"],u2=d2,Hl=o,hs=oe,fs=te,jl=Io,ro=aa,Uo=zy,zl=Oe,qp=Gy,c2=Ky.H264Stream,m2=s2,p2=ju.isLikelyAacData,h2=Oe.ONE_SECOND_IN_TS,Wp=r2,Gp=u2,ql,gs,Wl,Ba,f2=function(y,x){x.stream=y,this.trigger("log",x)},Xp=function(y,x){for(var T=Object.keys(x),E=0;E<T.length;E++){var P=T[E];P==="headOfPipeline"||!x[P].on||x[P].on("log",f2.bind(y,P))}},Yp=function(y,x){var T;if(y.length!==x.length)return!1;for(T=0;T<y.length;T++)if(y[T]!==x[T])return!1;return!0},Kp=function(y,x,T,E,P,L){var U=T-x,j=E-x,G=P-T;return{start:{dts:y,pts:y+U},end:{dts:y+j,pts:y+G},prependedContentDuration:L,baseMediaDecodeTime:y}};gs=function(y,x){var T=[],E,P=0,L=0,U=1/0;x=x||{},E=x.firstSequenceNumber||0,gs.prototype.init.call(this),this.push=function(j){ro.collectDtsInfo(y,j),y&&Wp.forEach(function(G){y[G]=j[G]}),T.push(j)},this.setEarliestDts=function(j){P=j},this.setVideoBaseMediaDecodeTime=function(j){U=j},this.setAudioAppendStart=function(j){L=j},this.flush=function(){var j,G,K,ee,le,ye,me;if(T.length===0){this.trigger("done","AudioSegmentStream");return}j=jl.trimAdtsFramesByEarliestDts(T,y,P),y.baseMediaDecodeTime=ro.calculateTrackBaseMediaDecodeTime(y,x.keepOriginalTimestamps),me=jl.prefixWithSilence(y,j,L,U),y.samples=jl.generateSampleTable(j),K=hs.mdat(jl.concatenateFrameData(j)),T=[],G=hs.moof(E,[y]),ee=new Uint8Array(G.byteLength+K.byteLength),E++,ee.set(G),ee.set(K,G.byteLength),ro.clearDtsInfo(y),le=Math.ceil(h2*1024/y.samplerate),j.length&&(ye=j.length*le,this.trigger("segmentTimingInfo",Kp(zl.audioTsToVideoTs(y.baseMediaDecodeTime,y.samplerate),j[0].dts,j[0].pts,j[0].dts+ye,j[0].pts+ye,me||0)),this.trigger("timingInfo",{start:j[0].pts,end:j[0].pts+ye})),this.trigger("data",{track:y,boxes:ee}),this.trigger("done","AudioSegmentStream")},this.reset=function(){ro.clearDtsInfo(y),T=[],this.trigger("reset")}},gs.prototype=new Hl,ql=function(y,x){var T,E=[],P=[],L,U;x=x||{},T=x.firstSequenceNumber||0,ql.prototype.init.call(this),delete y.minPTS,this.gopCache_=[],this.push=function(j){ro.collectDtsInfo(y,j),j.nalUnitType==="seq_parameter_set_rbsp"&&!L&&(L=j.config,y.sps=[j.data],Gp.forEach(function(G){y[G]=L[G]},this)),j.nalUnitType==="pic_parameter_set_rbsp"&&!U&&(U=j.data,y.pps=[j.data]),E.push(j)},this.flush=function(){for(var j,G,K,ee,le,ye,me=0,Pe,je;E.length&&E[0].nalUnitType!=="access_unit_delimiter_rbsp";)E.shift();if(E.length===0){this.resetStream_(),this.trigger("done","VideoSegmentStream");return}if(j=fs.groupNalsIntoFrames(E),K=fs.groupFramesIntoGops(j),K[0][0].keyFrame||(G=this.getGopForFusion_(E[0],y),G?(me=G.duration,K.unshift(G),K.byteLength+=G.byteLength,K.nalCount+=G.nalCount,K.pts=G.pts,K.dts=G.dts,K.duration+=G.duration):K=fs.extendFirstKeyFrame(K)),P.length){var Ft;if(x.alignGopsAtEnd?Ft=this.alignGopsAtEnd_(K):Ft=this.alignGopsAtStart_(K),!Ft){this.gopCache_.unshift({gop:K.pop(),pps:y.pps,sps:y.sps}),this.gopCache_.length=Math.min(6,this.gopCache_.length),E=[],this.resetStream_(),this.trigger("done","VideoSegmentStream");return}ro.clearDtsInfo(y),K=Ft}ro.collectDtsInfo(y,K),y.samples=fs.generateSampleTable(K),le=hs.mdat(fs.concatenateNalData(K)),y.baseMediaDecodeTime=ro.calculateTrackBaseMediaDecodeTime(y,x.keepOriginalTimestamps),this.trigger("processedGopsInfo",K.map(function(On){return{pts:On.pts,dts:On.dts,byteLength:On.byteLength}})),Pe=K[0],je=K[K.length-1],this.trigger("segmentTimingInfo",Kp(y.baseMediaDecodeTime,Pe.dts,Pe.pts,je.dts+je.duration,je.pts+je.duration,me)),this.trigger("timingInfo",{start:K[0].pts,end:K[K.length-1].pts+K[K.length-1].duration}),this.gopCache_.unshift({gop:K.pop(),pps:y.pps,sps:y.sps}),this.gopCache_.length=Math.min(6,this.gopCache_.length),E=[],this.trigger("baseMediaDecodeTime",y.baseMediaDecodeTime),this.trigger("timelineStartInfo",y.timelineStartInfo),ee=hs.moof(T,[y]),ye=new Uint8Array(ee.byteLength+le.byteLength),T++,ye.set(ee),ye.set(le,ee.byteLength),this.trigger("data",{track:y,boxes:ye}),this.resetStream_(),this.trigger("done","VideoSegmentStream")},this.reset=function(){this.resetStream_(),E=[],this.gopCache_.length=0,P.length=0,this.trigger("reset")},this.resetStream_=function(){ro.clearDtsInfo(y),L=void 0,U=void 0},this.getGopForFusion_=function(j){var G=45e3,K=1/0,ee,le,ye,me,Pe;for(Pe=0;Pe<this.gopCache_.length;Pe++)me=this.gopCache_[Pe],ye=me.gop,!(!(y.pps&&Yp(y.pps[0],me.pps[0]))||!(y.sps&&Yp(y.sps[0],me.sps[0])))&&(ye.dts<y.timelineStartInfo.dts||(ee=j.dts-ye.dts-ye.duration,ee>=-1e4&&ee<=G&&(!le||K>ee)&&(le=me,K=ee)));return le?le.gop:null},this.alignGopsAtStart_=function(j){var G,K,ee,le,ye,me,Pe,je;for(ye=j.byteLength,me=j.nalCount,Pe=j.duration,G=K=0;G<P.length&&K<j.length&&(ee=P[G],le=j[K],ee.pts!==le.pts);){if(le.pts>ee.pts){G++;continue}K++,ye-=le.byteLength,me-=le.nalCount,Pe-=le.duration}return K===0?j:K===j.length?null:(je=j.slice(K),je.byteLength=ye,je.duration=Pe,je.nalCount=me,je.pts=je[0].pts,je.dts=je[0].dts,je)},this.alignGopsAtEnd_=function(j){var G,K,ee,le,ye,me;for(G=P.length-1,K=j.length-1,ye=null,me=!1;G>=0&&K>=0;){if(ee=P[G],le=j[K],ee.pts===le.pts){me=!0;break}if(ee.pts>le.pts){G--;continue}G===P.length-1&&(ye=K),K--}if(!me&&ye===null)return null;var Pe;if(me?Pe=K:Pe=ye,Pe===0)return j;var je=j.slice(Pe),Ft=je.reduce(function(On,ra){return On.byteLength+=ra.byteLength,On.duration+=ra.duration,On.nalCount+=ra.nalCount,On},{byteLength:0,duration:0,nalCount:0});return je.byteLength=Ft.byteLength,je.duration=Ft.duration,je.nalCount=Ft.nalCount,je.pts=je[0].pts,je.dts=je[0].dts,je},this.alignGopsWith=function(j){P=j}},ql.prototype=new Hl,Ba=function(y,x){this.numberOfTracks=0,this.metadataStream=x,y=y||{},typeof y.remux<"u"?this.remuxTracks=!!y.remux:this.remuxTracks=!0,typeof y.keepOriginalTimestamps=="boolean"?this.keepOriginalTimestamps=y.keepOriginalTimestamps:this.keepOriginalTimestamps=!1,this.pendingTracks=[],this.videoTrack=null,this.pendingBoxes=[],this.pendingCaptions=[],this.pendingMetadata=[],this.pendingBytes=0,this.emittedTracks=0,Ba.prototype.init.call(this),this.push=function(T){if(T.content||T.text)return this.pendingCaptions.push(T);if(T.frames)return this.pendingMetadata.push(T);this.pendingTracks.push(T.track),this.pendingBytes+=T.boxes.byteLength,T.track.type==="video"&&(this.videoTrack=T.track,this.pendingBoxes.push(T.boxes)),T.track.type==="audio"&&(this.audioTrack=T.track,this.pendingBoxes.unshift(T.boxes))}},Ba.prototype=new Hl,Ba.prototype.flush=function(y){var x=0,T={captions:[],captionStreams:{},metadata:[],info:{}},E,P,L,U=0,j;if(this.pendingTracks.length<this.numberOfTracks){if(y!=="VideoSegmentStream"&&y!=="AudioSegmentStream")return;if(this.remuxTracks)return;if(this.pendingTracks.length===0){this.emittedTracks++,this.emittedTracks>=this.numberOfTracks&&(this.trigger("done"),this.emittedTracks=0);return}}if(this.videoTrack?(U=this.videoTrack.timelineStartInfo.pts,Gp.forEach(function(G){T.info[G]=this.videoTrack[G]},this)):this.audioTrack&&(U=this.audioTrack.timelineStartInfo.pts,Wp.forEach(function(G){T.info[G]=this.audioTrack[G]},this)),this.videoTrack||this.audioTrack){for(this.pendingTracks.length===1?T.type=this.pendingTracks[0].type:T.type="combined",this.emittedTracks+=this.pendingTracks.length,L=hs.initSegment(this.pendingTracks),T.initSegment=new Uint8Array(L.byteLength),T.initSegment.set(L),T.data=new Uint8Array(this.pendingBytes),j=0;j<this.pendingBoxes.length;j++)T.data.set(this.pendingBoxes[j],x),x+=this.pendingBoxes[j].byteLength;for(j=0;j<this.pendingCaptions.length;j++)E=this.pendingCaptions[j],E.startTime=zl.metadataTsToSeconds(E.startPts,U,this.keepOriginalTimestamps),E.endTime=zl.metadataTsToSeconds(E.endPts,U,this.keepOriginalTimestamps),T.captionStreams[E.stream]=!0,T.captions.push(E);for(j=0;j<this.pendingMetadata.length;j++)P=this.pendingMetadata[j],P.cueTime=zl.metadataTsToSeconds(P.pts,U,this.keepOriginalTimestamps),T.metadata.push(P);for(T.metadata.dispatchType=this.metadataStream.dispatchType,this.pendingTracks.length=0,this.videoTrack=null,this.pendingBoxes.length=0,this.pendingCaptions.length=0,this.pendingBytes=0,this.pendingMetadata.length=0,this.trigger("data",T),j=0;j<T.captions.length;j++)E=T.captions[j],this.trigger("caption",E);for(j=0;j<T.metadata.length;j++)P=T.metadata[j],this.trigger("id3Frame",P)}this.emittedTracks>=this.numberOfTracks&&(this.trigger("done"),this.emittedTracks=0)},Ba.prototype.setRemux=function(y){this.remuxTracks=y},Wl=function(y){var x=this,T=!0,E,P;Wl.prototype.init.call(this),y=y||{},this.baseMediaDecodeTime=y.baseMediaDecodeTime||0,this.transmuxPipeline_={},this.setupAacPipeline=function(){var L={};this.transmuxPipeline_=L,L.type="aac",L.metadataStream=new Uo.MetadataStream,L.aacStream=new m2,L.audioTimestampRolloverStream=new Uo.TimestampRolloverStream("audio"),L.timedMetadataTimestampRolloverStream=new Uo.TimestampRolloverStream("timed-metadata"),L.adtsStream=new qp,L.coalesceStream=new Ba(y,L.metadataStream),L.headOfPipeline=L.aacStream,L.aacStream.pipe(L.audioTimestampRolloverStream).pipe(L.adtsStream),L.aacStream.pipe(L.timedMetadataTimestampRolloverStream).pipe(L.metadataStream).pipe(L.coalesceStream),L.metadataStream.on("timestamp",function(U){L.aacStream.setTimestamp(U.timeStamp)}),L.aacStream.on("data",function(U){U.type!=="timed-metadata"&&U.type!=="audio"||L.audioSegmentStream||(P=P||{timelineStartInfo:{baseMediaDecodeTime:x.baseMediaDecodeTime},codec:"adts",type:"audio"},L.coalesceStream.numberOfTracks++,L.audioSegmentStream=new gs(P,y),L.audioSegmentStream.on("log",x.getLogTrigger_("audioSegmentStream")),L.audioSegmentStream.on("timingInfo",x.trigger.bind(x,"audioTimingInfo")),L.adtsStream.pipe(L.audioSegmentStream).pipe(L.coalesceStream),x.trigger("trackinfo",{hasAudio:!!P,hasVideo:!!E}))}),L.coalesceStream.on("data",this.trigger.bind(this,"data")),L.coalesceStream.on("done",this.trigger.bind(this,"done")),Xp(this,L)},this.setupTsPipeline=function(){var L={};this.transmuxPipeline_=L,L.type="ts",L.metadataStream=new Uo.MetadataStream,L.packetStream=new Uo.TransportPacketStream,L.parseStream=new Uo.TransportParseStream,L.elementaryStream=new Uo.ElementaryStream,L.timestampRolloverStream=new Uo.TimestampRolloverStream,L.adtsStream=new qp,L.h264Stream=new c2,L.captionStream=new Uo.CaptionStream(y),L.coalesceStream=new Ba(y,L.metadataStream),L.headOfPipeline=L.packetStream,L.packetStream.pipe(L.parseStream).pipe(L.elementaryStream).pipe(L.timestampRolloverStream),L.timestampRolloverStream.pipe(L.h264Stream),L.timestampRolloverStream.pipe(L.adtsStream),L.timestampRolloverStream.pipe(L.metadataStream).pipe(L.coalesceStream),L.h264Stream.pipe(L.captionStream).pipe(L.coalesceStream),L.elementaryStream.on("data",function(U){var j;if(U.type==="metadata"){for(j=U.tracks.length;j--;)!E&&U.tracks[j].type==="video"?(E=U.tracks[j],E.timelineStartInfo.baseMediaDecodeTime=x.baseMediaDecodeTime):!P&&U.tracks[j].type==="audio"&&(P=U.tracks[j],P.timelineStartInfo.baseMediaDecodeTime=x.baseMediaDecodeTime);E&&!L.videoSegmentStream&&(L.coalesceStream.numberOfTracks++,L.videoSegmentStream=new ql(E,y),L.videoSegmentStream.on("log",x.getLogTrigger_("videoSegmentStream")),L.videoSegmentStream.on("timelineStartInfo",function(G){P&&!y.keepOriginalTimestamps&&(P.timelineStartInfo=G,L.audioSegmentStream.setEarliestDts(G.dts-x.baseMediaDecodeTime))}),L.videoSegmentStream.on("processedGopsInfo",x.trigger.bind(x,"gopInfo")),L.videoSegmentStream.on("segmentTimingInfo",x.trigger.bind(x,"videoSegmentTimingInfo")),L.videoSegmentStream.on("baseMediaDecodeTime",function(G){P&&L.audioSegmentStream.setVideoBaseMediaDecodeTime(G)}),L.videoSegmentStream.on("timingInfo",x.trigger.bind(x,"videoTimingInfo")),L.h264Stream.pipe(L.videoSegmentStream).pipe(L.coalesceStream)),P&&!L.audioSegmentStream&&(L.coalesceStream.numberOfTracks++,L.audioSegmentStream=new gs(P,y),L.audioSegmentStream.on("log",x.getLogTrigger_("audioSegmentStream")),L.audioSegmentStream.on("timingInfo",x.trigger.bind(x,"audioTimingInfo")),L.audioSegmentStream.on("segmentTimingInfo",x.trigger.bind(x,"audioSegmentTimingInfo")),L.adtsStream.pipe(L.audioSegmentStream).pipe(L.coalesceStream)),x.trigger("trackinfo",{hasAudio:!!P,hasVideo:!!E})}}),L.coalesceStream.on("data",this.trigger.bind(this,"data")),L.coalesceStream.on("id3Frame",function(U){U.dispatchType=L.metadataStream.dispatchType,x.trigger("id3Frame",U)}),L.coalesceStream.on("caption",this.trigger.bind(this,"caption")),L.coalesceStream.on("done",this.trigger.bind(this,"done")),Xp(this,L)},this.setBaseMediaDecodeTime=function(L){var U=this.transmuxPipeline_;y.keepOriginalTimestamps||(this.baseMediaDecodeTime=L),P&&(P.timelineStartInfo.dts=void 0,P.timelineStartInfo.pts=void 0,ro.clearDtsInfo(P),U.audioTimestampRolloverStream&&U.audioTimestampRolloverStream.discontinuity()),E&&(U.videoSegmentStream&&(U.videoSegmentStream.gopCache_=[]),E.timelineStartInfo.dts=void 0,E.timelineStartInfo.pts=void 0,ro.clearDtsInfo(E),U.captionStream.reset()),U.timestampRolloverStream&&U.timestampRolloverStream.discontinuity()},this.setAudioAppendStart=function(L){P&&this.transmuxPipeline_.audioSegmentStream.setAudioAppendStart(L)},this.setRemux=function(L){var U=this.transmuxPipeline_;y.remux=L,U&&U.coalesceStream&&U.coalesceStream.setRemux(L)},this.alignGopsWith=function(L){E&&this.transmuxPipeline_.videoSegmentStream&&this.transmuxPipeline_.videoSegmentStream.alignGopsWith(L)},this.getLogTrigger_=function(L){var U=this;return function(j){j.stream=L,U.trigger("log",j)}},this.push=function(L){if(T){var U=p2(L);U&&this.transmuxPipeline_.type!=="aac"?this.setupAacPipeline():!U&&this.transmuxPipeline_.type!=="ts"&&this.setupTsPipeline(),T=!1}this.transmuxPipeline_.headOfPipeline.push(L)},this.flush=function(){T=!0,this.transmuxPipeline_.headOfPipeline.flush()},this.endTimeline=function(){this.transmuxPipeline_.headOfPipeline.endTimeline()},this.reset=function(){this.transmuxPipeline_.headOfPipeline&&this.transmuxPipeline_.headOfPipeline.reset()},this.resetCaptions=function(){this.transmuxPipeline_.captionStream&&this.transmuxPipeline_.captionStream.reset()}},Wl.prototype=new Hl;var g2={Transmuxer:Wl},v2=function(y){return y>>>0},y2=function(y){return("00"+y.toString(16)).slice(-2)},Gl={toUnsigned:v2,toHexString:y2},_2=function(y){var x="";return x+=String.fromCharCode(y[0]),x+=String.fromCharCode(y[1]),x+=String.fromCharCode(y[2]),x+=String.fromCharCode(y[3]),x},Qp=_2,b2=Gl.toUnsigned,w2=Qp,Jp=function(y,x){var T=[],E,P,L,U,j;if(!x.length)return null;for(E=0;E<y.byteLength;)P=b2(y[E]<<24|y[E+1]<<16|y[E+2]<<8|y[E+3]),L=w2(y.subarray(E+4,E+8)),U=P>1?E+P:y.byteLength,L===x[0]&&(x.length===1?T.push(y.subarray(E+8,U)):(j=Jp(y.subarray(E+8,U),x.slice(1)),j.length&&(T=T.concat(j)))),E=U;return T},zu=Jp,x2=Gl.toUnsigned,V2=s.getUint64,C2=function(y){var x={version:y[0],flags:new Uint8Array(y.subarray(1,4))};return x.version===1?x.baseMediaDecodeTime=V2(y.subarray(4)):x.baseMediaDecodeTime=x2(y[4]<<24|y[5]<<16|y[6]<<8|y[7]),x},qu=C2,k2=function(y){var x=new DataView(y.buffer,y.byteOffset,y.byteLength),T={version:y[0],flags:new Uint8Array(y.subarray(1,4)),trackId:x.getUint32(4)},E=T.flags[2]&1,P=T.flags[2]&2,L=T.flags[2]&8,U=T.flags[2]&16,j=T.flags[2]&32,G=T.flags[0]&65536,K=T.flags[0]&131072,ee;return ee=8,E&&(ee+=4,T.baseDataOffset=x.getUint32(12),ee+=4),P&&(T.sampleDescriptionIndex=x.getUint32(ee),ee+=4),L&&(T.defaultSampleDuration=x.getUint32(ee),ee+=4),U&&(T.defaultSampleSize=x.getUint32(ee),ee+=4),j&&(T.defaultSampleFlags=x.getUint32(ee)),G&&(T.durationIsEmpty=!0),!E&&K&&(T.baseDataOffsetIsMoof=!0),T},Zp=k2,E2=function(y){return{isLeading:(y[0]&12)>>>2,dependsOn:y[0]&3,isDependedOn:(y[1]&192)>>>6,hasRedundancy:(y[1]&48)>>>4,paddingValue:(y[1]&14)>>>1,isNonSyncSample:y[1]&1,degradationPriority:y[2]<<8|y[3]}},T2=E2,eh=T2,N2=function(y){var x={version:y[0],flags:new Uint8Array(y.subarray(1,4)),samples:[]},T=new DataView(y.buffer,y.byteOffset,y.byteLength),E=x.flags[2]&1,P=x.flags[2]&4,L=x.flags[1]&1,U=x.flags[1]&2,j=x.flags[1]&4,G=x.flags[1]&8,K=T.getUint32(4),ee=8,le;for(E&&(x.dataOffset=T.getInt32(ee),ee+=4),P&&K&&(le={flags:eh(y.subarray(ee,ee+4))},ee+=4,L&&(le.duration=T.getUint32(ee),ee+=4),U&&(le.size=T.getUint32(ee),ee+=4),G&&(x.version===1?le.compositionTimeOffset=T.getInt32(ee):le.compositionTimeOffset=T.getUint32(ee),ee+=4),x.samples.push(le),K--);K--;)le={},L&&(le.duration=T.getUint32(ee),ee+=4),U&&(le.size=T.getUint32(ee),ee+=4),j&&(le.flags=eh(y.subarray(ee,ee+4)),ee+=4),G&&(x.version===1?le.compositionTimeOffset=T.getInt32(ee):le.compositionTimeOffset=T.getUint32(ee),ee+=4),x.samples.push(le);return x},th=N2,nh={tfdt:qu,trun:th},oh={parseTfdt:nh.tfdt,parseTrun:nh.trun},S2=function(y){for(var x=0,T=String.fromCharCode(y[x]),E="";T!=="\0";)E+=T,x++,T=String.fromCharCode(y[x]);return E+=T,E},B2={uint8ToCString:S2},Xl=B2.uint8ToCString,D2=s.getUint64,P2=function(y){var x=4,T=y[0],E,P,L,U,j,G,K,ee;if(T===0){E=Xl(y.subarray(x)),x+=E.length,P=Xl(y.subarray(x)),x+=P.length;var le=new DataView(y.buffer);L=le.getUint32(x),x+=4,j=le.getUint32(x),x+=4,G=le.getUint32(x),x+=4,K=le.getUint32(x),x+=4}else if(T===1){var le=new DataView(y.buffer);L=le.getUint32(x),x+=4,U=D2(y.subarray(x)),x+=8,G=le.getUint32(x),x+=4,K=le.getUint32(x),x+=4,E=Xl(y.subarray(x)),x+=E.length,P=Xl(y.subarray(x)),x+=P.length}ee=new Uint8Array(y.subarray(x,y.byteLength));var ye={scheme_id_uri:E,value:P,timescale:L||1,presentation_time:U,presentation_time_delta:j,event_duration:G,id:K,message_data:ee};return A2(T,ye)?ye:void 0},$2=function(y,x,T,E){return y||y===0?y/x:E+T/x},A2=function(y,x){var T=x.scheme_id_uri!=="\0",E=y===0&&ah(x.presentation_time_delta)&&T,P=y===1&&ah(x.presentation_time)&&T;return!(y>1)&&E||P},ah=function(y){return y!==void 0||y!==null},L2={parseEmsgBox:P2,scaleTime:$2},vs;typeof window<"u"?vs=window:typeof n<"u"?vs=n:typeof self<"u"?vs=self:vs={};var ih=vs,Yl=Gl.toUnsigned,ys=Gl.toHexString,St=zu,li=Qp,Wu=L2,I2=Zp,O2=th,M2=qu,U2=s.getUint64,sh,lh,rh,dh,uh,Gu,ch,Xu=ih,R2=Lp.parseId3Frames;sh=function(y){var x={},T=St(y,["moov","trak"]);return T.reduce(function(E,P){var L,U,j,G,K;return L=St(P,["tkhd"])[0],!L||(U=L[0],j=U===0?12:20,G=Yl(L[j]<<24|L[j+1]<<16|L[j+2]<<8|L[j+3]),K=St(P,["mdia","mdhd"])[0],!K)?null:(U=K[0],j=U===0?12:20,E[G]=Yl(K[j]<<24|K[j+1]<<16|K[j+2]<<8|K[j+3]),E)},x)},lh=function(y,x){var T;T=St(x,["moof","traf"]);var E=T.reduce(function(P,L){var U=St(L,["tfhd"])[0],j=Yl(U[4]<<24|U[5]<<16|U[6]<<8|U[7]),G=y[j]||9e4,K=St(L,["tfdt"])[0],ee=new DataView(K.buffer,K.byteOffset,K.byteLength),le;K[0]===1?le=U2(K.subarray(4,12)):le=ee.getUint32(4);let ye;return typeof le=="bigint"?ye=le/Xu.BigInt(G):typeof le=="number"&&!isNaN(le)&&(ye=le/G),ye<Number.MAX_SAFE_INTEGER&&(ye=Number(ye)),ye<P&&(P=ye),P},1/0);return typeof E=="bigint"||isFinite(E)?E:0},rh=function(y,x){var T=St(x,["moof","traf"]),E=0,P=0,L;if(T&&T.length){var U=St(T[0],["tfhd"])[0],j=St(T[0],["trun"])[0],G=St(T[0],["tfdt"])[0];if(U){var K=I2(U);L=K.trackId}if(G){var ee=M2(G);E=ee.baseMediaDecodeTime}if(j){var le=O2(j);le.samples&&le.samples.length&&(P=le.samples[0].compositionTimeOffset||0)}}var ye=y[L]||9e4;typeof E=="bigint"&&(P=Xu.BigInt(P),ye=Xu.BigInt(ye));var me=(E+P)/ye;return typeof me=="bigint"&&me<Number.MAX_SAFE_INTEGER&&(me=Number(me)),me},dh=function(y){var x=St(y,["moov","trak"]),T=[];return x.forEach(function(E){var P=St(E,["mdia","hdlr"]),L=St(E,["tkhd"]);P.forEach(function(U,j){var G=li(U.subarray(8,12)),K=L[j],ee,le,ye;G==="vide"&&(ee=new DataView(K.buffer,K.byteOffset,K.byteLength),le=ee.getUint8(0),ye=le===0?ee.getUint32(12):ee.getUint32(20),T.push(ye))})}),T},Gu=function(y){var x=y[0],T=x===0?12:20;return Yl(y[T]<<24|y[T+1]<<16|y[T+2]<<8|y[T+3])},uh=function(y){var x=St(y,["moov","trak"]),T=[];return x.forEach(function(E){var P={},L=St(E,["tkhd"])[0],U,j;L&&(U=new DataView(L.buffer,L.byteOffset,L.byteLength),j=U.getUint8(0),P.id=j===0?U.getUint32(12):U.getUint32(20));var G=St(E,["mdia","hdlr"])[0];if(G){var K=li(G.subarray(8,12));K==="vide"?P.type="video":K==="soun"?P.type="audio":P.type=K}var ee=St(E,["mdia","minf","stbl","stsd"])[0];if(ee){var le=ee.subarray(8);P.codec=li(le.subarray(4,8));var ye=St(le,[P.codec])[0],me,Pe;ye&&(/^[asm]vc[1-9]$/i.test(P.codec)?(me=ye.subarray(78),Pe=li(me.subarray(4,8)),Pe==="avcC"&&me.length>11?(P.codec+=".",P.codec+=ys(me[9]),P.codec+=ys(me[10]),P.codec+=ys(me[11])):P.codec="avc1.4d400d"):/^mp4[a,v]$/i.test(P.codec)?(me=ye.subarray(28),Pe=li(me.subarray(4,8)),Pe==="esds"&&me.length>20&&me[19]!==0?(P.codec+="."+ys(me[19]),P.codec+="."+ys(me[20]>>>2&63).replace(/^0/,"")):P.codec="mp4a.40.2"):P.codec=P.codec.toLowerCase())}var je=St(E,["mdia","mdhd"])[0];je&&(P.timescale=Gu(je)),T.push(P)}),T},ch=function(y,x=0){var T=St(y,["emsg"]);return T.map(E=>{var P=Wu.parseEmsgBox(new Uint8Array(E)),L=R2(P.message_data);return{cueTime:Wu.scaleTime(P.presentation_time,P.timescale,P.presentation_time_delta,x),duration:Wu.scaleTime(P.event_duration,P.timescale),frames:L}})};var _s={findBox:St,parseType:li,timescale:sh,startTime:lh,compositionStartTime:rh,videoTrackIds:dh,tracks:uh,getTimescaleFromMediaHeader:Gu,getEmsgID3:ch};const{parseTrun:F2}=oh,{findBox:mh}=_s;var ph=ih,H2=function(y){var x=mh(y,["moof","traf"]),T=mh(y,["mdat"]),E=[];return T.forEach(function(P,L){var U=x[L];E.push({mdat:P,traf:U})}),E},j2=function(y,x,T){var E=x,P=T.defaultSampleDuration||0,L=T.defaultSampleSize||0,U=T.trackId,j=[];return y.forEach(function(G){var K=F2(G),ee=K.samples;ee.forEach(function(le){le.duration===void 0&&(le.duration=P),le.size===void 0&&(le.size=L),le.trackId=U,le.dts=E,le.compositionTimeOffset===void 0&&(le.compositionTimeOffset=0),typeof E=="bigint"?(le.pts=E+ph.BigInt(le.compositionTimeOffset),E+=ph.BigInt(le.duration)):(le.pts=E+le.compositionTimeOffset,E+=le.duration)}),j=j.concat(ee)}),j},hh={getMdatTrafPairs:H2,parseSamples:j2},z2=Me.discardEmulationPreventionBytes,q2=It.CaptionStream,Yu=zu,W2=qu,G2=Zp,{getMdatTrafPairs:X2,parseSamples:Y2}=hh,K2=function(y,x){for(var T=y,E=0;E<x.length;E++){var P=x[E];if(T<P.size)return P;T-=P.size}return null},Q2=function(y,x,T){var E=new DataView(y.buffer,y.byteOffset,y.byteLength),P={logs:[],seiNals:[]},L,U,j,G;for(U=0;U+4<y.length;U+=j)if(j=E.getUint32(U),U+=4,!(j<=0))switch(y[U]&31){case 6:var K=y.subarray(U+1,U+1+j),ee=K2(U,x);if(L={nalUnitType:"sei_rbsp",size:j,data:K,escapedRBSP:z2(K),trackId:T},ee)L.pts=ee.pts,L.dts=ee.dts,G=ee;else if(G)L.pts=G.pts,L.dts=G.dts;else{P.logs.push({level:"warn",message:"We've encountered a nal unit without data at "+U+" for trackId "+T+". See mux.js#223."});break}P.seiNals.push(L);break}return P},J2=function(y,x){var T={},E=X2(y);return E.forEach(function(P){var L=P.mdat,U=P.traf,j=Yu(U,["tfhd"]),G=G2(j[0]),K=G.trackId,ee=Yu(U,["tfdt"]),le=ee.length>0?W2(ee[0]).baseMediaDecodeTime:0,ye=Yu(U,["trun"]),me,Pe;x===K&&ye.length>0&&(me=Y2(ye,le,G),Pe=Q2(L,me,K),T[K]||(T[K]={seiNals:[],logs:[]}),T[K].seiNals=T[K].seiNals.concat(Pe.seiNals),T[K].logs=T[K].logs.concat(Pe.logs))}),T},Z2=function(y,x,T){var E;if(x===null)return null;E=J2(y,x);var P=E[x]||{};return{seiNals:P.seiNals,logs:P.logs,timescale:T}},e_=function(){var y=!1,x,T,E,P,L,U;this.isInitialized=function(){return y},this.init=function(j){x=new q2,y=!0,U=j?j.isPartial:!1,x.on("data",function(G){G.startTime=G.startPts/P,G.endTime=G.endPts/P,L.captions.push(G),L.captionStreams[G.stream]=!0}),x.on("log",function(G){L.logs.push(G)})},this.isNewInit=function(j,G){return j&&j.length===0||G&&typeof G=="object"&&Object.keys(G).length===0?!1:E!==j[0]||P!==G[E]},this.parse=function(j,G,K){var ee;if(this.isInitialized()){if(!G||!K)return null;if(this.isNewInit(G,K))E=G[0],P=K[E];else if(E===null||!P)return T.push(j),null}else return null;for(;T.length>0;){var le=T.shift();this.parse(le,G,K)}return ee=Z2(j,E,P),ee&&ee.logs&&(L.logs=L.logs.concat(ee.logs)),ee===null||!ee.seiNals?L.logs.length?{logs:L.logs,captions:[],captionStreams:[]}:null:(this.pushNals(ee.seiNals),this.flushStream(),L)},this.pushNals=function(j){if(!this.isInitialized()||!j||j.length===0)return null;j.forEach(function(G){x.push(G)})},this.flushStream=function(){if(!this.isInitialized())return null;U?x.partialFlush():x.flush()},this.clearParsedCaptions=function(){L.captions=[],L.captionStreams={},L.logs=[]},this.resetCaptionStream=function(){if(!this.isInitialized())return null;x.reset()},this.clearAllCaptions=function(){this.clearParsedCaptions(),this.resetCaptionStream()},this.reset=function(){T=[],E=null,P=null,L?this.clearParsedCaptions():L={captions:[],captionStreams:{},logs:[]},this.resetCaptionStream()},this.reset()},t_=e_;const{parseTfdt:n_}=oh,la=zu,{getTimescaleFromMediaHeader:o_}=_s,{parseSamples:a_,getMdatTrafPairs:i_}=hh;var fh=function(){let y=9e4;this.init=function(x){const T=la(x,["moov","trak","mdia","mdhd"])[0];T&&(y=o_(T))},this.parseSegment=function(x){const T=[],E=i_(x);let P=0;return E.forEach(function(L){const U=L.mdat,j=L.traf,G=la(j,["tfdt"])[0],K=la(j,["tfhd"])[0],ee=la(j,["trun"]);if(G&&(P=n_(G).baseMediaDecodeTime),ee.length&&K){const le=a_(ee,P,K);let ye=0;le.forEach(function(me){const Pe="utf-8",je=new TextDecoder(Pe),Ft=U.slice(ye,ye+me.size);if(la(Ft,["vtte"])[0]){ye+=me.size;return}la(Ft,["vttc"]).forEach(function(bs){const ws=la(bs,["payl"])[0],xs=la(bs,["sttg"])[0],Vs=me.pts/y,Jl=(me.pts+me.duration)/y;let ft,Cs;if(ws)try{ft=je.decode(ws)}catch(uo){console.error(uo)}if(xs)try{Cs=je.decode(xs)}catch(uo){console.error(uo)}me.duration&&ft&&T.push({cueText:ft,start:Vs,end:Jl,settings:Cs})}),ye+=me.size})}}),T}},Ku=Kn,gh=function(y){var x=y[1]&31;return x<<=8,x|=y[2],x},Kl=function(y){return!!(y[1]&64)},Ql=function(y){var x=0;return(y[3]&48)>>>4>1&&(x+=y[4]+1),x},s_=function(y,x){var T=gh(y);return T===0?"pat":T===x?"pmt":x?"pes":null},l_=function(y){var x=Kl(y),T=4+Ql(y);return x&&(T+=y[T]+1),(y[T+10]&31)<<8|y[T+11]},r_=function(y){var x={},T=Kl(y),E=4+Ql(y);if(T&&(E+=y[E]+1),!!(y[E+5]&1)){var P,L,U;P=(y[E+1]&15)<<8|y[E+2],L=3+P-4,U=(y[E+10]&15)<<8|y[E+11];for(var j=12+U;j<L;){var G=E+j;x[(y[G+1]&31)<<8|y[G+2]]=y[G],j+=((y[G+3]&15)<<8|y[G+4])+5}return x}},d_=function(y,x){var T=gh(y),E=x[T];switch(E){case Ku.H264_STREAM_TYPE:return"video";case Ku.ADTS_STREAM_TYPE:return"audio";case Ku.METADATA_STREAM_TYPE:return"timed-metadata";default:return null}},u_=function(y){var x=Kl(y);if(!x)return null;var T=4+Ql(y);if(T>=y.byteLength)return null;var E=null,P;return P=y[T+7],P&192&&(E={},E.pts=(y[T+9]&14)<<27|(y[T+10]&255)<<20|(y[T+11]&254)<<12|(y[T+12]&255)<<5|(y[T+13]&254)>>>3,E.pts*=4,E.pts+=(y[T+13]&6)>>>1,E.dts=E.pts,P&64&&(E.dts=(y[T+14]&14)<<27|(y[T+15]&255)<<20|(y[T+16]&254)<<12|(y[T+17]&255)<<5|(y[T+18]&254)>>>3,E.dts*=4,E.dts+=(y[T+18]&6)>>>1)),E},Qu=function(y){switch(y){case 5:return"slice_layer_without_partitioning_rbsp_idr";case 6:return"sei_rbsp";case 7:return"seq_parameter_set_rbsp";case 8:return"pic_parameter_set_rbsp";case 9:return"access_unit_delimiter_rbsp";default:return null}},c_=function(y){for(var x=4+Ql(y),T=y.subarray(x),E=0,P=0,L=!1,U;P<T.byteLength-3;P++)if(T[P+2]===1){E=P+5;break}for(;E<T.byteLength;)switch(T[E]){case 0:if(T[E-1]!==0){E+=2;break}else if(T[E-2]!==0){E++;break}P+3!==E-2&&(U=Qu(T[P+3]&31),U==="slice_layer_without_partitioning_rbsp_idr"&&(L=!0));do E++;while(T[E]!==1&&E<T.length);P=E-2,E+=3;break;case 1:if(T[E-1]!==0||T[E-2]!==0){E+=3;break}U=Qu(T[P+3]&31),U==="slice_layer_without_partitioning_rbsp_idr"&&(L=!0),P=E-2,E+=3;break;default:E+=3;break}return T=T.subarray(P),E-=P,P=0,T&&T.byteLength>3&&(U=Qu(T[P+3]&31),U==="slice_layer_without_partitioning_rbsp_idr"&&(L=!0)),L},m_={parseType:s_,parsePat:l_,parsePmt:r_,parsePayloadUnitStartIndicator:Kl,parsePesType:d_,parsePesTime:u_,videoPacketContainsKeyFrame:c_},vh=Kn,ri=ia.handleRollover,lt={};lt.ts=m_,lt.aac=ju;var Da=Oe.ONE_SECOND_IN_TS,ln=188,go=71,p_=function(y,x){for(var T=0,E=ln,P,L;E<y.byteLength;){if(y[T]===go&&y[E]===go){switch(P=y.subarray(T,E),L=lt.ts.parseType(P,x.pid),L){case"pat":x.pid=lt.ts.parsePat(P);break;case"pmt":var U=lt.ts.parsePmt(P);x.table=x.table||{},Object.keys(U).forEach(function(j){x.table[j]=U[j]});break}T+=ln,E+=ln;continue}T++,E++}},yh=function(y,x,T){for(var E=0,P=ln,L,U,j,G,K,ee=!1;P<=y.byteLength;){if(y[E]===go&&(y[P]===go||P===y.byteLength)){switch(L=y.subarray(E,P),U=lt.ts.parseType(L,x.pid),U){case"pes":j=lt.ts.parsePesType(L,x.table),G=lt.ts.parsePayloadUnitStartIndicator(L),j==="audio"&&G&&(K=lt.ts.parsePesTime(L),K&&(K.type="audio",T.audio.push(K),ee=!0));break}if(ee)break;E+=ln,P+=ln;continue}E++,P++}for(P=y.byteLength,E=P-ln,ee=!1;E>=0;){if(y[E]===go&&(y[P]===go||P===y.byteLength)){switch(L=y.subarray(E,P),U=lt.ts.parseType(L,x.pid),U){case"pes":j=lt.ts.parsePesType(L,x.table),G=lt.ts.parsePayloadUnitStartIndicator(L),j==="audio"&&G&&(K=lt.ts.parsePesTime(L),K&&(K.type="audio",T.audio.push(K),ee=!0));break}if(ee)break;E-=ln,P-=ln;continue}E--,P--}},h_=function(y,x,T){for(var E=0,P=ln,L,U,j,G,K,ee,le,ye,me=!1,Pe={data:[],size:0};P<y.byteLength;){if(y[E]===go&&y[P]===go){switch(L=y.subarray(E,P),U=lt.ts.parseType(L,x.pid),U){case"pes":if(j=lt.ts.parsePesType(L,x.table),G=lt.ts.parsePayloadUnitStartIndicator(L),j==="video"&&(G&&!me&&(K=lt.ts.parsePesTime(L),K&&(K.type="video",T.video.push(K),me=!0)),!T.firstKeyFrame)){if(G&&Pe.size!==0){for(ee=new Uint8Array(Pe.size),le=0;Pe.data.length;)ye=Pe.data.shift(),ee.set(ye,le),le+=ye.byteLength;if(lt.ts.videoPacketContainsKeyFrame(ee)){var je=lt.ts.parsePesTime(ee);je?(T.firstKeyFrame=je,T.firstKeyFrame.type="video"):console.warn("Failed to extract PTS/DTS from PES at first keyframe. This could be an unusual TS segment, or else mux.js did not parse your TS segment correctly. If you know your TS segments do contain PTS/DTS on keyframes please file a bug report! You can try ffprobe to double check for yourself.")}Pe.size=0}Pe.data.push(L),Pe.size+=L.byteLength}break}if(me&&T.firstKeyFrame)break;E+=ln,P+=ln;continue}E++,P++}for(P=y.byteLength,E=P-ln,me=!1;E>=0;){if(y[E]===go&&y[P]===go){switch(L=y.subarray(E,P),U=lt.ts.parseType(L,x.pid),U){case"pes":j=lt.ts.parsePesType(L,x.table),G=lt.ts.parsePayloadUnitStartIndicator(L),j==="video"&&G&&(K=lt.ts.parsePesTime(L),K&&(K.type="video",T.video.push(K),me=!0));break}if(me)break;E-=ln,P-=ln;continue}E--,P--}},f_=function(y,x){if(y.audio&&y.audio.length){var T=x;(typeof T>"u"||isNaN(T))&&(T=y.audio[0].dts),y.audio.forEach(function(L){L.dts=ri(L.dts,T),L.pts=ri(L.pts,T),L.dtsTime=L.dts/Da,L.ptsTime=L.pts/Da})}if(y.video&&y.video.length){var E=x;if((typeof E>"u"||isNaN(E))&&(E=y.video[0].dts),y.video.forEach(function(L){L.dts=ri(L.dts,E),L.pts=ri(L.pts,E),L.dtsTime=L.dts/Da,L.ptsTime=L.pts/Da}),y.firstKeyFrame){var P=y.firstKeyFrame;P.dts=ri(P.dts,E),P.pts=ri(P.pts,E),P.dtsTime=P.dts/Da,P.ptsTime=P.pts/Da}}},g_=function(y){for(var x=!1,T=0,E=null,P=null,L=0,U=0,j;y.length-U>=3;){var G=lt.aac.parseType(y,U);switch(G){case"timed-metadata":if(y.length-U<10){x=!0;break}if(L=lt.aac.parseId3TagSize(y,U),L>y.length){x=!0;break}P===null&&(j=y.subarray(U,U+L),P=lt.aac.parseAacTimestamp(j)),U+=L;break;case"audio":if(y.length-U<7){x=!0;break}if(L=lt.aac.parseAdtsSize(y,U),L>y.length){x=!0;break}E===null&&(j=y.subarray(U,U+L),E=lt.aac.parseSampleRate(j)),T++,U+=L;break;default:U++;break}if(x)return null}if(E===null||P===null)return null;var K=Da/E,ee={audio:[{type:"audio",dts:P,pts:P},{type:"audio",dts:P+T*1024*K,pts:P+T*1024*K}]};return ee},v_=function(y){var x={pid:null,table:null},T={};p_(y,x);for(var E in x.table)if(x.table.hasOwnProperty(E)){var P=x.table[E];switch(P){case vh.H264_STREAM_TYPE:T.video=[],h_(y,x,T),T.video.length===0&&delete T.video;break;case vh.ADTS_STREAM_TYPE:T.audio=[],yh(y,x,T),T.audio.length===0&&delete T.audio;break}}return T},y_=function(y,x){var T=lt.aac.isLikelyAacData(y),E;return T?E=g_(y):E=v_(y),!E||!E.audio&&!E.video?null:(f_(E,x),E)},__={inspect:y_,parseAudioPes_:yh};const b_=function(y,x){x.on("data",function(T){const E=T.initSegment;T.initSegment={data:E.buffer,byteOffset:E.byteOffset,byteLength:E.byteLength};const P=T.data;T.data=P.buffer,y.postMessage({action:"data",segment:T,byteOffset:P.byteOffset,byteLength:P.byteLength},[T.data])}),x.on("done",function(T){y.postMessage({action:"done"})}),x.on("gopInfo",function(T){y.postMessage({action:"gopInfo",gopInfo:T})}),x.on("videoSegmentTimingInfo",function(T){const E={start:{decode:Oe.videoTsToSeconds(T.start.dts),presentation:Oe.videoTsToSeconds(T.start.pts)},end:{decode:Oe.videoTsToSeconds(T.end.dts),presentation:Oe.videoTsToSeconds(T.end.pts)},baseMediaDecodeTime:Oe.videoTsToSeconds(T.baseMediaDecodeTime)};T.prependedContentDuration&&(E.prependedContentDuration=Oe.videoTsToSeconds(T.prependedContentDuration)),y.postMessage({action:"videoSegmentTimingInfo",videoSegmentTimingInfo:E})}),x.on("audioSegmentTimingInfo",function(T){const E={start:{decode:Oe.videoTsToSeconds(T.start.dts),presentation:Oe.videoTsToSeconds(T.start.pts)},end:{decode:Oe.videoTsToSeconds(T.end.dts),presentation:Oe.videoTsToSeconds(T.end.pts)},baseMediaDecodeTime:Oe.videoTsToSeconds(T.baseMediaDecodeTime)};T.prependedContentDuration&&(E.prependedContentDuration=Oe.videoTsToSeconds(T.prependedContentDuration)),y.postMessage({action:"audioSegmentTimingInfo",audioSegmentTimingInfo:E})}),x.on("id3Frame",function(T){y.postMessage({action:"id3Frame",id3Frame:T})}),x.on("caption",function(T){y.postMessage({action:"caption",caption:T})}),x.on("trackinfo",function(T){y.postMessage({action:"trackinfo",trackInfo:T})}),x.on("audioTimingInfo",function(T){y.postMessage({action:"audioTimingInfo",audioTimingInfo:{start:Oe.videoTsToSeconds(T.start),end:Oe.videoTsToSeconds(T.end)}})}),x.on("videoTimingInfo",function(T){y.postMessage({action:"videoTimingInfo",videoTimingInfo:{start:Oe.videoTsToSeconds(T.start),end:Oe.videoTsToSeconds(T.end)}})}),x.on("log",function(T){y.postMessage({action:"log",log:T})})};class _h{constructor(x,T){this.options=T||{},this.self=x,this.init()}init(){this.transmuxer&&this.transmuxer.dispose(),this.transmuxer=new g2.Transmuxer(this.options),b_(this.self,this.transmuxer)}pushMp4Captions(x){this.captionParser||(this.captionParser=new t_,this.captionParser.init());const T=new Uint8Array(x.data,x.byteOffset,x.byteLength),E=this.captionParser.parse(T,x.trackIds,x.timescales);this.self.postMessage({action:"mp4Captions",captions:E&&E.captions||[],logs:E&&E.logs||[],data:T.buffer},[T.buffer])}initMp4WebVttParser(x){this.webVttParser||(this.webVttParser=new fh);const T=new Uint8Array(x.data,x.byteOffset,x.byteLength);this.webVttParser.init(T)}getMp4WebVttText(x){this.webVttParser||(this.webVttParser=new fh);const T=new Uint8Array(x.data,x.byteOffset,x.byteLength),E=this.webVttParser.parseSegment(T);this.self.postMessage({action:"getMp4WebVttText",mp4VttCues:E||[],data:T.buffer},[T.buffer])}probeMp4StartTime({timescales:x,data:T}){const E=_s.startTime(x,T);this.self.postMessage({action:"probeMp4StartTime",startTime:E,data:T},[T.buffer])}probeMp4Tracks({data:x}){const T=_s.tracks(x);this.self.postMessage({action:"probeMp4Tracks",tracks:T,data:x},[x.buffer])}probeEmsgID3({data:x,offset:T}){const E=_s.getEmsgID3(x,T);this.self.postMessage({action:"probeEmsgID3",id3Frames:E,emsgData:x},[x.buffer])}probeTs({data:x,baseStartTime:T}){const E=typeof T=="number"&&!isNaN(T)?T*Oe.ONE_SECOND_IN_TS:void 0,P=__.inspect(x,E);let L=null;P&&(L={hasVideo:P.video&&P.video.length===2||!1,hasAudio:P.audio&&P.audio.length===2||!1},L.hasVideo&&(L.videoStart=P.video[0].ptsTime),L.hasAudio&&(L.audioStart=P.audio[0].ptsTime)),this.self.postMessage({action:"probeTs",result:L,data:x},[x.buffer])}clearAllMp4Captions(){this.captionParser&&this.captionParser.clearAllCaptions()}clearParsedMp4Captions(){this.captionParser&&this.captionParser.clearParsedCaptions()}push(x){const T=new Uint8Array(x.data,x.byteOffset,x.byteLength);this.transmuxer.push(T)}reset(){this.transmuxer.reset()}setTimestampOffset(x){const T=x.timestampOffset||0;this.transmuxer.setBaseMediaDecodeTime(Math.round(Oe.secondsToVideoTs(T)))}setAudioAppendStart(x){this.transmuxer.setAudioAppendStart(Math.ceil(Oe.secondsToVideoTs(x.appendStart)))}setRemux(x){this.transmuxer.setRemux(x.remux)}flush(x){this.transmuxer.flush(),self.postMessage({action:"done",type:"transmuxed"})}endTimeline(){this.transmuxer.endTimeline(),self.postMessage({action:"endedtimeline",type:"transmuxed"})}alignGopsWith(x){this.transmuxer.alignGopsWith(x.gopsToAlignWith.slice())}}self.onmessage=function(y){if(y.data.action==="init"&&y.data.options){this.messageHandlers=new _h(self,y.data.options);return}this.messageHandlers||(this.messageHandlers=new _h(self)),y.data&&y.data.action&&y.data.action!=="init"&&this.messageHandlers[y.data.action]&&this.messageHandlers[y.data.action](y.data)}}));var $Y=ry(PY);const AY=(n,t,o)=>{const{type:a,initSegment:i,captions:s,captionStreams:l,metadata:r,videoFrameDtsTime:u,videoFramePtsTime:c}=n.data.segment;t.buffer.push({captions:s,captionStreams:l,metadata:r});const f=n.data.segment.boxes||{data:n.data.segment.data},m={type:a,data:new Uint8Array(f.data,f.data.byteOffset,f.data.byteLength),initSegment:new Uint8Array(i.data,i.byteOffset,i.byteLength)};typeof u<"u"&&(m.videoFrameDtsTime=u),typeof c<"u"&&(m.videoFramePtsTime=c),o(m)},LY=({transmuxedData:n,callback:t})=>{n.buffer=[],t(n)},IY=(n,t)=>{t.gopInfo=n.data.gopInfo},cy=n=>{const{transmuxer:t,bytes:o,audioAppendStart:a,gopsToAlignWith:i,remux:s,onData:l,onTrackInfo:r,onAudioTimingInfo:u,onVideoTimingInfo:c,onVideoSegmentTimingInfo:f,onAudioSegmentTimingInfo:m,onId3:d,onCaptions:h,onDone:g,onEndedTimeline:p,onTransmuxerLog:b,isEndOfTimeline:_,segment:w,triggerSegmentEventFn:v}=n,V={buffer:[]};let C=_;const S=D=>{t.currentTransmux===n&&(D.data.action==="data"&&AY(D,V,l),D.data.action==="trackinfo"&&r(D.data.trackInfo),D.data.action==="gopInfo"&&IY(D,V),D.data.action==="audioTimingInfo"&&u(D.data.audioTimingInfo),D.data.action==="videoTimingInfo"&&c(D.data.videoTimingInfo),D.data.action==="videoSegmentTimingInfo"&&f(D.data.videoSegmentTimingInfo),D.data.action==="audioSegmentTimingInfo"&&m(D.data.audioSegmentTimingInfo),D.data.action==="id3Frame"&&d([D.data.id3Frame],D.data.id3Frame.dispatchType),D.data.action==="caption"&&h(D.data.caption),D.data.action==="endedtimeline"&&(C=!1,p()),D.data.action==="log"&&b(D.data.log),D.data.type==="transmuxed"&&(C||(t.onmessage=null,LY({transmuxedData:V,callback:g}),my(t))))},N=()=>{const D={message:"Received an error message from the transmuxer worker",metadata:{errorType:ie.Error.StreamingFailedToTransmuxSegment,segmentInfo:Ia({segment:w})}};g(null,D)};if(t.onmessage=S,t.onerror=N,a&&t.postMessage({action:"setAudioAppendStart",appendStart:a}),Array.isArray(i)&&t.postMessage({action:"alignGopsWith",gopsToAlignWith:i}),typeof s<"u"&&t.postMessage({action:"setRemux",remux:s}),o.byteLength){const D=o instanceof ArrayBuffer?o:o.buffer,$=o instanceof ArrayBuffer?0:o.byteOffset;v({type:"segmenttransmuxingstart",segment:w}),t.postMessage({action:"push",data:D,byteOffset:$,byteLength:o.byteLength},[D])}_&&t.postMessage({action:"endTimeline"}),t.postMessage({action:"flush"})},my=n=>{n.currentTransmux=null,n.transmuxQueue.length&&(n.currentTransmux=n.transmuxQueue.shift(),typeof n.currentTransmux=="function"?n.currentTransmux():cy(n.currentTransmux))},cg=(n,t)=>{n.postMessage({action:t}),my(n)},py=(n,t)=>{if(!t.currentTransmux){t.currentTransmux=n,cg(t,n);return}t.transmuxQueue.push(cg.bind(null,t,n))},OY=n=>{py("reset",n)},MY=n=>{py("endTimeline",n)},hy=n=>{if(!n.transmuxer.currentTransmux){n.transmuxer.currentTransmux=n,cy(n);return}n.transmuxer.transmuxQueue.push(n)},UY=n=>{const t=new $Y;t.currentTransmux=null,t.transmuxQueue=[];const o=t.terminate;return t.terminate=()=>(t.currentTransmux=null,t.transmuxQueue.length=0,o.call(t)),t.postMessage({action:"init",options:n}),t};var Nc={reset:OY,endTimeline:MY,transmux:hy,createTransmuxer:UY};const Ii=function(n){const t=n.transmuxer,o=n.endAction||n.action,a=n.callback,i=kt({},n,{endAction:null,transmuxer:null,callback:null}),s=l=>{l.data.action===o&&(t.removeEventListener("message",s),l.data.data&&(l.data.data=new Uint8Array(l.data.data,n.byteOffset||0,n.byteLength||l.data.data.byteLength),n.data&&(n.data=l.data.data)),a(l.data))};if(t.addEventListener("message",s),n.data){const l=n.data instanceof ArrayBuffer;i.byteOffset=l?0:n.data.byteOffset,i.byteLength=n.data.byteLength;const r=[l?n.data:n.data.buffer];t.postMessage(i,r)}else t.postMessage(i)},No={FAILURE:2,TIMEOUT:-101,ABORTED:-102},fy="wvtt",gm=n=>{n.forEach(t=>{t.abort()})},RY=n=>({bandwidth:n.bandwidth,bytesReceived:n.bytesReceived||0,roundTripTime:n.roundTripTime||0}),FY=n=>{const t=n.target,a={bandwidth:1/0,bytesReceived:0,roundTripTime:Date.now()-t.requestTime||0};return a.bytesReceived=n.loaded,a.bandwidth=Math.floor(a.bytesReceived/a.roundTripTime*8*1e3),a},Dp=(n,t)=>{const{requestType:o}=t,a=Xa({requestType:o,request:t,error:n});return t.timedout?{status:t.status,message:"HLS request timed-out at URL: "+t.uri,code:No.TIMEOUT,xhr:t,metadata:a}:t.aborted?{status:t.status,message:"HLS request aborted at URL: "+t.uri,code:No.ABORTED,xhr:t,metadata:a}:n?{status:t.status,message:"HLS request errored at URL: "+t.uri,code:No.FAILURE,xhr:t,metadata:a}:t.responseType==="arraybuffer"&&t.response.byteLength===0?{status:t.status,message:"Empty HLS response at URL: "+t.uri,code:No.FAILURE,xhr:t,metadata:a}:null},mg=(n,t,o,a)=>(i,s)=>{const l=s.response,r=Dp(i,s);if(r)return o(r,n);if(l.byteLength!==16)return o({status:s.status,message:"Invalid HLS key at URL: "+s.uri,code:No.FAILURE,xhr:s},n);const u=new DataView(l),c=new Uint32Array([u.getUint32(0),u.getUint32(4),u.getUint32(8),u.getUint32(12)]);for(let m=0;m<t.length;m++)t[m].bytes=c;const f={uri:s.uri};return a({type:"segmentkeyloadcomplete",segment:n,keyInfo:f}),o(null,n)},HY=(n,t)=>{t===fy&&n.transmuxer.postMessage({action:"initMp4WebVttParser",data:n.map.bytes})},jY=(n,t,o)=>{t===fy&&Ii({action:"getMp4WebVttText",data:n.bytes,transmuxer:n.transmuxer,callback:({data:a,mp4VttCues:i})=>{n.bytes=a,o(null,n,{mp4VttCues:i})}})},gy=(n,t)=>{const o=ep(n.map.bytes);if(o!=="mp4"){const a=n.map.resolvedUri||n.map.uri,i=o||"unknown";return t({internal:!0,message:`Found unsupported ${i} container for initialization segment at URL: ${a}`,code:No.FAILURE,metadata:{mediaType:i}})}Ii({action:"probeMp4Tracks",data:n.map.bytes,transmuxer:n.transmuxer,callback:({tracks:a,data:i})=>(n.map.bytes=i,a.forEach(function(s){n.map.tracks=n.map.tracks||{},!n.map.tracks[s.type]&&(n.map.tracks[s.type]=s,typeof s.id=="number"&&s.timescale&&(n.map.timescales=n.map.timescales||{},n.map.timescales[s.id]=s.timescale),s.type==="text"&&HY(n,s.codec))}),t(null))})},zY=({segment:n,finishProcessingFn:t,triggerSegmentEventFn:o})=>(a,i)=>{const s=Dp(a,i);if(s)return t(s,n);const l=new Uint8Array(i.response);if(o({type:"segmentloaded",segment:n}),n.map.key)return n.map.encryptedBytes=l,t(null,n);n.map.bytes=l,gy(n,function(r){if(r)return r.xhr=i,r.status=i.status,t(r,n);t(null,n)})},qY=({segment:n,finishProcessingFn:t,responseType:o,triggerSegmentEventFn:a})=>(i,s)=>{const l=Dp(i,s);if(l)return t(l,n);a({type:"segmentloaded",segment:n});const r=o==="arraybuffer"||!s.responseText?s.response:BY(s.responseText.substring(n.lastReachedChar||0));return n.stats=RY(s),n.key?n.encryptedBytes=new Uint8Array(r):n.bytes=new Uint8Array(r),t(null,n)},WY=({segment:n,bytes:t,trackInfoFn:o,timingInfoFn:a,videoSegmentTimingInfoFn:i,audioSegmentTimingInfoFn:s,id3Fn:l,captionsFn:r,isEndOfTimeline:u,endedTimelineFn:c,dataFn:f,doneFn:m,onTransmuxerLog:d,triggerSegmentEventFn:h})=>{const g=n.map&&n.map.tracks||{},p=!!(g.audio&&g.video);let b=a.bind(null,n,"audio","start");const _=a.bind(null,n,"audio","end");let w=a.bind(null,n,"video","start");const v=a.bind(null,n,"video","end"),V=()=>hy({bytes:t,transmuxer:n.transmuxer,audioAppendStart:n.audioAppendStart,gopsToAlignWith:n.gopsToAlignWith,remux:p,onData:C=>{C.type=C.type==="combined"?"video":C.type,f(n,C)},onTrackInfo:C=>{o&&(p&&(C.isMuxed=!0),o(n,C))},onAudioTimingInfo:C=>{b&&typeof C.start<"u"&&(b(C.start),b=null),_&&typeof C.end<"u"&&_(C.end)},onVideoTimingInfo:C=>{w&&typeof C.start<"u"&&(w(C.start),w=null),v&&typeof C.end<"u"&&v(C.end)},onVideoSegmentTimingInfo:C=>{const S={pts:{start:C.start.presentation,end:C.end.presentation},dts:{start:C.start.decode,end:C.end.decode}};h({type:"segmenttransmuxingtiminginfoavailable",segment:n,timingInfo:S}),i(C)},onAudioSegmentTimingInfo:C=>{const S={pts:{start:C.start.pts,end:C.end.pts},dts:{start:C.start.dts,end:C.end.dts}};h({type:"segmenttransmuxingtiminginfoavailable",segment:n,timingInfo:S}),s(C)},onId3:(C,S)=>{l(n,C,S)},onCaptions:C=>{r(n,[C])},isEndOfTimeline:u,onEndedTimeline:()=>{c()},onTransmuxerLog:d,onDone:(C,S)=>{m&&(C.type=C.type==="combined"?"video":C.type,h({type:"segmenttransmuxingcomplete",segment:n}),m(S,n,C))},segment:n,triggerSegmentEventFn:h});Ii({action:"probeTs",transmuxer:n.transmuxer,data:t,baseStartTime:n.baseStartTime,callback:C=>{n.bytes=t=C.data;const S=C.result;S&&(o(n,{hasAudio:S.hasAudio,hasVideo:S.hasVideo,isMuxed:p}),o=null),V()}})},vy=({segment:n,bytes:t,trackInfoFn:o,timingInfoFn:a,videoSegmentTimingInfoFn:i,audioSegmentTimingInfoFn:s,id3Fn:l,captionsFn:r,isEndOfTimeline:u,endedTimelineFn:c,dataFn:f,doneFn:m,onTransmuxerLog:d,triggerSegmentEventFn:h})=>{let g=new Uint8Array(t);if(hG(g)){n.isFmp4=!0;const{tracks:p}=n.map;if(p.text&&(!p.audio||!p.video)){f(n,{data:g,type:"text"}),jY(n,p.text.codec,m);return}const _={isFmp4:!0,hasVideo:!!p.video,hasAudio:!!p.audio};p.audio&&p.audio.codec&&p.audio.codec!=="enca"&&(_.audioCodec=p.audio.codec),p.video&&p.video.codec&&p.video.codec!=="encv"&&(_.videoCodec=p.video.codec),p.video&&p.audio&&(_.isMuxed=!0),o(n,_);const w=(v,V)=>{f(n,{data:g,type:_.hasAudio&&!_.isMuxed?"audio":"video"}),V&&V.length&&l(n,V),v&&v.length&&r(n,v),m(null,n,{})};Ii({action:"probeMp4StartTime",timescales:n.map.timescales,data:g,transmuxer:n.transmuxer,callback:({data:v,startTime:V})=>{t=v.buffer,n.bytes=g=v,_.hasAudio&&!_.isMuxed&&a(n,"audio","start",V),_.hasVideo&&a(n,"video","start",V),Ii({action:"probeEmsgID3",data:g,transmuxer:n.transmuxer,offset:V,callback:({emsgData:C,id3Frames:S})=>{if(t=C.buffer,n.bytes=g=C,!p.video||!C.byteLength||!n.transmuxer){w(void 0,S);return}Ii({action:"pushMp4Captions",endAction:"mp4Captions",transmuxer:n.transmuxer,data:g,timescales:n.map.timescales,trackIds:[p.video.id],callback:N=>{t=N.data.buffer,n.bytes=g=N.data,N.logs.forEach(function(D){d(at(D,{stream:"mp4CaptionParser"}))}),w(N.captions,S)}})}})}});return}if(!n.transmuxer){m(null,n,{});return}if(typeof n.container>"u"&&(n.container=ep(g)),n.container!=="ts"&&n.container!=="aac"){o(n,{hasAudio:!1,hasVideo:!1}),m(null,n,{});return}WY({segment:n,bytes:t,trackInfoFn:o,timingInfoFn:a,videoSegmentTimingInfoFn:i,audioSegmentTimingInfoFn:s,id3Fn:l,captionsFn:r,isEndOfTimeline:u,endedTimelineFn:c,dataFn:f,doneFn:m,onTransmuxerLog:d,triggerSegmentEventFn:h})},yy=function({id:n,key:t,encryptedBytes:o,decryptionWorker:a,segment:i,doneFn:s},l){const r=c=>{if(c.data.source===n){a.removeEventListener("message",r);const f=c.data.decrypted;l(new Uint8Array(f.bytes,f.byteOffset,f.byteLength))}};a.onerror=()=>{const c="An error occurred in the decryption worker",f=Ia({segment:i}),m={message:c,metadata:{error:new Error(c),errorType:ie.Error.StreamingFailedToDecryptSegment,segmentInfo:f,keyInfo:{uri:i.key.resolvedUri||i.map.key.resolvedUri}}};s(m,i)},a.addEventListener("message",r);let u;t.bytes.slice?u=t.bytes.slice():u=new Uint32Array(Array.prototype.slice.call(t.bytes)),a.postMessage(ny({source:n,encrypted:o,key:u,iv:t.iv}),[o.buffer,u.buffer])},GY=({decryptionWorker:n,segment:t,trackInfoFn:o,timingInfoFn:a,videoSegmentTimingInfoFn:i,audioSegmentTimingInfoFn:s,id3Fn:l,captionsFn:r,isEndOfTimeline:u,endedTimelineFn:c,dataFn:f,doneFn:m,onTransmuxerLog:d,triggerSegmentEventFn:h})=>{h({type:"segmentdecryptionstart"}),yy({id:t.requestId,key:t.key,encryptedBytes:t.encryptedBytes,decryptionWorker:n,segment:t,doneFn:m},g=>{t.bytes=g,h({type:"segmentdecryptioncomplete",segment:t}),vy({segment:t,bytes:t.bytes,trackInfoFn:o,timingInfoFn:a,videoSegmentTimingInfoFn:i,audioSegmentTimingInfoFn:s,id3Fn:l,captionsFn:r,isEndOfTimeline:u,endedTimelineFn:c,dataFn:f,doneFn:m,onTransmuxerLog:d,triggerSegmentEventFn:h})})},XY=({activeXhrs:n,decryptionWorker:t,trackInfoFn:o,timingInfoFn:a,videoSegmentTimingInfoFn:i,audioSegmentTimingInfoFn:s,id3Fn:l,captionsFn:r,isEndOfTimeline:u,endedTimelineFn:c,dataFn:f,doneFn:m,onTransmuxerLog:d,triggerSegmentEventFn:h})=>{let g=0,p=!1;return(b,_)=>{if(!p){if(b)return p=!0,gm(n),m(b,_);if(g+=1,g===n.length){const w=function(){if(_.encryptedBytes)return GY({decryptionWorker:t,segment:_,trackInfoFn:o,timingInfoFn:a,videoSegmentTimingInfoFn:i,audioSegmentTimingInfoFn:s,id3Fn:l,captionsFn:r,isEndOfTimeline:u,endedTimelineFn:c,dataFn:f,doneFn:m,onTransmuxerLog:d,triggerSegmentEventFn:h});vy({segment:_,bytes:_.bytes,trackInfoFn:o,timingInfoFn:a,videoSegmentTimingInfoFn:i,audioSegmentTimingInfoFn:s,id3Fn:l,captionsFn:r,isEndOfTimeline:u,endedTimelineFn:c,dataFn:f,doneFn:m,onTransmuxerLog:d,triggerSegmentEventFn:h})};if(_.endOfAllRequests=Date.now(),_.map&&_.map.encryptedBytes&&!_.map.bytes)return h({type:"segmentdecryptionstart",segment:_}),yy({decryptionWorker:t,id:_.requestId+"-init",encryptedBytes:_.map.encryptedBytes,key:_.map.key,segment:_,doneFn:m},v=>{_.map.bytes=v,h({type:"segmentdecryptioncomplete",segment:_}),gy(_,V=>{if(V)return gm(n),m(V,_);w()})});w()}}}},YY=({loadendState:n,abortFn:t})=>o=>{o.target.aborted&&t&&!n.calledAbortFn&&(t(),n.calledAbortFn=!0)},KY=({segment:n,progressFn:t,trackInfoFn:o,timingInfoFn:a,videoSegmentTimingInfoFn:i,audioSegmentTimingInfoFn:s,id3Fn:l,captionsFn:r,isEndOfTimeline:u,endedTimelineFn:c,dataFn:f})=>m=>{if(!m.target.aborted)return n.stats=at(n.stats,FY(m)),!n.stats.firstBytesReceivedAt&&n.stats.bytesReceived&&(n.stats.firstBytesReceivedAt=Date.now()),t(m,n)},QY=({xhr:n,xhrOptions:t,decryptionWorker:o,segment:a,abortFn:i,progressFn:s,trackInfoFn:l,timingInfoFn:r,videoSegmentTimingInfoFn:u,audioSegmentTimingInfoFn:c,id3Fn:f,captionsFn:m,isEndOfTimeline:d,endedTimelineFn:h,dataFn:g,doneFn:p,onTransmuxerLog:b,triggerSegmentEventFn:_})=>{const w=[],v=XY({activeXhrs:w,decryptionWorker:o,trackInfoFn:l,timingInfoFn:r,videoSegmentTimingInfoFn:u,audioSegmentTimingInfoFn:c,id3Fn:f,captionsFn:m,isEndOfTimeline:d,endedTimelineFn:h,dataFn:g,doneFn:p,onTransmuxerLog:b,triggerSegmentEventFn:_});if(a.key&&!a.key.bytes){const D=[a.key];a.map&&!a.map.bytes&&a.map.key&&a.map.key.resolvedUri===a.key.resolvedUri&&D.push(a.map.key);const $=at(t,{uri:a.key.resolvedUri,responseType:"arraybuffer",requestType:"segment-key"}),k=mg(a,D,v,_),A={uri:a.key.resolvedUri};_({type:"segmentkeyloadstart",segment:a,keyInfo:A});const B=n($,k);w.push(B)}if(a.map&&!a.map.bytes){if(a.map.key&&(!a.key||a.key.resolvedUri!==a.map.key.resolvedUri)){const B=at(t,{uri:a.map.key.resolvedUri,responseType:"arraybuffer",requestType:"segment-key"}),I=mg(a,[a.map.key],v,_),z={uri:a.map.key.resolvedUri};_({type:"segmentkeyloadstart",segment:a,keyInfo:z});const Y=n(B,I);w.push(Y)}const $=at(t,{uri:a.map.resolvedUri,responseType:"arraybuffer",headers:hm(a.map),requestType:"segment-media-initialization"}),k=zY({segment:a,finishProcessingFn:v,triggerSegmentEventFn:_});_({type:"segmentloadstart",segment:a});const A=n($,k);w.push(A)}const V=at(t,{uri:a.part&&a.part.resolvedUri||a.resolvedUri,responseType:"arraybuffer",headers:hm(a),requestType:"segment"}),C=qY({segment:a,finishProcessingFn:v,responseType:V.responseType,triggerSegmentEventFn:_});_({type:"segmentloadstart",segment:a});const S=n(V,C);S.addEventListener("progress",KY({segment:a,progressFn:s,trackInfoFn:l,timingInfoFn:r,videoSegmentTimingInfoFn:u,audioSegmentTimingInfoFn:c,id3Fn:f,captionsFn:m,isEndOfTimeline:d,endedTimelineFn:h,dataFn:g})),w.push(S);const N={};return w.forEach(D=>{D.addEventListener("loadend",YY({loadendState:N,abortFn:i}))}),()=>gm(w)},gr=so("PlaylistSelector"),pg=function(n){if(!n||!n.playlist)return;const t=n.playlist;return JSON.stringify({id:t.id,bandwidth:n.bandwidth,width:n.width,height:n.height,codecs:t.attributes&&t.attributes.CODECS||""})},Oi=function(n,t){if(!n)return"";const o=X.getComputedStyle(n);return o?o[t]:""},Mi=function(n,t){const o=n.slice();n.sort(function(a,i){const s=t(a,i);return s===0?o.indexOf(a)-o.indexOf(i):s})},Pp=function(n,t){let o,a;return n.attributes.BANDWIDTH&&(o=n.attributes.BANDWIDTH),o=o||X.Number.MAX_VALUE,t.attributes.BANDWIDTH&&(a=t.attributes.BANDWIDTH),a=a||X.Number.MAX_VALUE,o-a},JY=function(n,t){let o,a;return n.attributes.RESOLUTION&&n.attributes.RESOLUTION.width&&(o=n.attributes.RESOLUTION.width),o=o||X.Number.MAX_VALUE,t.attributes.RESOLUTION&&t.attributes.RESOLUTION.width&&(a=t.attributes.RESOLUTION.width),a=a||X.Number.MAX_VALUE,o===a&&n.attributes.BANDWIDTH&&t.attributes.BANDWIDTH?n.attributes.BANDWIDTH-t.attributes.BANDWIDTH:o-a};let _y=function(n){const{main:t,bandwidth:o,playerWidth:a,playerHeight:i,playerObjectFit:s,limitRenditionByPlayerDimensions:l,playlistController:r}=n;if(!t)return;const u={bandwidth:o,width:a,height:i,limitRenditionByPlayerDimensions:l};let c=t.playlists;En.isAudioOnly(t)&&(c=r.getAudioTrackPlaylists_(),u.audioOnly=!0);let f=c.map(N=>{let D;const $=N.attributes&&N.attributes.RESOLUTION&&N.attributes.RESOLUTION.width,k=N.attributes&&N.attributes.RESOLUTION&&N.attributes.RESOLUTION.height;return D=N.attributes&&N.attributes.BANDWIDTH,D=D||X.Number.MAX_VALUE,{bandwidth:D,width:$,height:k,playlist:N}});Mi(f,(N,D)=>N.bandwidth-D.bandwidth),f=f.filter(N=>!En.isIncompatible(N.playlist));let m=f.filter(N=>En.isEnabled(N.playlist));m.length||(m=f.filter(N=>!En.isDisabled(N.playlist)));const d=m.filter(N=>N.bandwidth*zt.BANDWIDTH_VARIANCE<o);let h=d[d.length-1];const g=d.filter(N=>N.bandwidth===h.bandwidth)[0];if(l===!1){const N=g||m[0]||f[0];if(N&&N.playlist){let D="sortedPlaylistReps";return g&&(D="bandwidthBestRep"),m[0]&&(D="enabledPlaylistReps"),gr(`choosing ${pg(N)} using ${D} with options`,u),N.playlist}return gr("could not choose a playlist with options",u),null}const p=d.filter(N=>N.width&&N.height);Mi(p,(N,D)=>N.width-D.width);const b=p.filter(N=>N.width===a&&N.height===i);h=b[b.length-1];const _=b.filter(N=>N.bandwidth===h.bandwidth)[0];let w,v,V;_||(w=p.filter(N=>s==="cover"?N.width>a&&N.height>i:N.width>a||N.height>i),v=w.filter(N=>N.width===w[0].width&&N.height===w[0].height),h=v[v.length-1],V=v.filter(N=>N.bandwidth===h.bandwidth)[0]);let C;if(r.leastPixelDiffSelector){const N=p.map(D=>(D.pixelDiff=Math.abs(D.width-a)+Math.abs(D.height-i),D));Mi(N,(D,$)=>D.pixelDiff===$.pixelDiff?$.bandwidth-D.bandwidth:D.pixelDiff-$.pixelDiff),C=N[0]}const S=C||V||_||g||m[0]||f[0];if(S&&S.playlist){let N="sortedPlaylistReps";return C?N="leastPixelDiffRep":V?N="resolutionPlusOneRep":_?N="resolutionBestRep":g?N="bandwidthBestRep":m[0]&&(N="enabledPlaylistReps"),gr(`choosing ${pg(S)} using ${N} with options`,u),S.playlist}return gr("could not choose a playlist with options",u),null};const hg=function(){let n=this.useDevicePixelRatio&&X.devicePixelRatio||1;return isNaN(this.customPixelRatio)||(n=this.customPixelRatio),_y({main:this.playlists.main,bandwidth:this.systemBandwidth,playerWidth:parseInt(Oi(this.tech_.el(),"width"),10)*n,playerHeight:parseInt(Oi(this.tech_.el(),"height"),10)*n,playerObjectFit:this.usePlayerObjectFit?Oi(this.tech_.el(),"objectFit"):"",limitRenditionByPlayerDimensions:this.limitRenditionByPlayerDimensions,playlistController:this.playlistController_})},ZY=function(n){let t=-1,o=-1;if(n<0||n>1)throw new Error("Moving average bandwidth decay must be between 0 and 1.");return function(){let a=this.useDevicePixelRatio&&X.devicePixelRatio||1;return isNaN(this.customPixelRatio)||(a=this.customPixelRatio),t<0&&(t=this.systemBandwidth,o=this.systemBandwidth),this.systemBandwidth>0&&this.systemBandwidth!==o&&(t=n*this.systemBandwidth+(1-n)*t,o=this.systemBandwidth),_y({main:this.playlists.main,bandwidth:t,playerWidth:parseInt(Oi(this.tech_.el(),"width"),10)*a,playerHeight:parseInt(Oi(this.tech_.el(),"height"),10)*a,playerObjectFit:this.usePlayerObjectFit?Oi(this.tech_.el(),"objectFit"):"",limitRenditionByPlayerDimensions:this.limitRenditionByPlayerDimensions,playlistController:this.playlistController_})}},eK=function(n){const{main:t,currentTime:o,bandwidth:a,duration:i,segmentDuration:s,timeUntilRebuffer:l,currentTimeline:r,syncController:u}=n,c=t.playlists.filter(g=>!En.isIncompatible(g));let f=c.filter(En.isEnabled);f.length||(f=c.filter(g=>!En.isDisabled(g)));const d=f.filter(En.hasAttribute.bind(null,"BANDWIDTH")).map(g=>{const b=u.getSyncPoint(g,i,r,o)?1:2,w=En.estimateSegmentRequestTime(s,a,g)*b-l;return{playlist:g,rebufferingImpact:w}}),h=d.filter(g=>g.rebufferingImpact<=0);return Mi(h,(g,p)=>Pp(p.playlist,g.playlist)),h.length?h[0]:(Mi(d,(g,p)=>g.rebufferingImpact-p.rebufferingImpact),d[0]||null)},tK=function(){const n=this.playlists.main.playlists.filter(En.isEnabled);return Mi(n,(o,a)=>Pp(o,a)),n.filter(o=>!!ll(this.playlists.main,o).video)[0]||null},nK=n=>{let t=0,o;return n.bytes&&(o=new Uint8Array(n.bytes),n.segments.forEach(a=>{o.set(a,t),t+=a.byteLength})),o};function by(n){try{return new URL(n).pathname.split("/").slice(-2).join("/")}catch{return""}}const oK=function(n,t,o){if(!n[o]){t.trigger({type:"usage",name:"vhs-608"});let a=o;/^cc708_/.test(o)&&(a="SERVICE"+o.split("_")[1]);const i=t.textTracks().getTrackById(a);if(i)n[o]=i;else{const s=t.options_.vhs&&t.options_.vhs.captionServices||{};let l=o,r=o,u=!1;const c=s[a];c&&(l=c.label,r=c.language,u=c.default),n[o]=t.addRemoteTextTrack({kind:"captions",id:a,default:u,label:l,language:r},!1).track}}},aK=function({inbandTextTracks:n,captionArray:t,timestampOffset:o}){if(!t)return;const a=X.WebKitDataCue||X.VTTCue;t.forEach(i=>{const s=i.stream;i.content?i.content.forEach(l=>{const r=new a(i.startTime+o,i.endTime+o,l.text);r.line=l.line,r.align="left",r.position=l.position,r.positionAlign="line-left",n[s].addCue(r)}):n[s].addCue(new a(i.startTime+o,i.endTime+o,i.text))})},iK=function(n){Object.defineProperties(n.frame,{id:{get(){return ie.log.warn("cue.frame.id is deprecated. Use cue.value.key instead."),n.value.key}},value:{get(){return ie.log.warn("cue.frame.value is deprecated. Use cue.value.data instead."),n.value.data}},privateData:{get(){return ie.log.warn("cue.frame.privateData is deprecated. Use cue.value.data instead."),n.value.data}}})},sK=({inbandTextTracks:n,metadataArray:t,timestampOffset:o,videoDuration:a})=>{if(!t)return;const i=X.WebKitDataCue||X.VTTCue,s=n.metadataTrack_;if(!s||(t.forEach(f=>{const m=f.cueTime+o;typeof m!="number"||X.isNaN(m)||m<0||!(m<1/0)||!f.frames||!f.frames.length||f.frames.forEach(d=>{const h=new i(m,m,d.value||d.url||d.data||"");h.frame=d,h.value=d,iK(h),s.addCue(h)})}),!s.cues||!s.cues.length))return;const l=s.cues,r=[];for(let f=0;f<l.length;f++)l[f]&&r.push(l[f]);const u=r.reduce((f,m)=>{const d=f[m.startTime]||[];return d.push(m),f[m.startTime]=d,f},{}),c=Object.keys(u).sort((f,m)=>Number(f)-Number(m));c.forEach((f,m)=>{const d=u[f],h=isFinite(a)?a:f,g=Number(c[m+1])||h;d.forEach(p=>{p.endTime=g})})},lK={id:"ID",class:"CLASS",startDate:"START-DATE",duration:"DURATION",endDate:"END-DATE",endOnNext:"END-ON-NEXT",plannedDuration:"PLANNED-DURATION",scte35Out:"SCTE35-OUT",scte35In:"SCTE35-IN"},rK=new Set(["id","class","startDate","duration","endDate","endOnNext","startTime","endTime","processDateRange"]),dK=({inbandTextTracks:n,dateRanges:t})=>{const o=n.metadataTrack_;if(!o)return;const a=X.WebKitDataCue||X.VTTCue;t.forEach(i=>{for(const s of Object.keys(i)){if(rK.has(s))continue;const l=new a(i.startTime,i.endTime,"");l.id=i.id,l.type="com.apple.quicktime.HLS",l.value={key:lK[s],data:i[s]},(s==="scte35Out"||s==="scte35In")&&(l.value.data=new Uint8Array(l.value.data.match(/[\da-f]{2}/gi)).buffer),o.addCue(l)}i.processDateRange()})},fg=(n,t,o)=>{n.metadataTrack_||(n.metadataTrack_=o.addRemoteTextTrack({kind:"metadata",label:"Timed Metadata"},!1).track,ie.browser.IS_ANY_SAFARI||(n.metadataTrack_.inBandMetadataTrackDispatchType=t))},zs=function(n,t,o){let a,i;if(o&&o.cues)for(a=o.cues.length;a--;)i=o.cues[a],i.startTime>=n&&i.endTime<=t&&o.removeCue(i)},uK=function(n){const t=n.cues;if(!t)return;const o={};for(let a=t.length-1;a>=0;a--){const i=t[a],s=`${i.startTime}-${i.endTime}-${i.text}`;o[s]?n.removeCue(i):o[s]=i}},cK=(n,t,o)=>{if(typeof t>"u"||t===null||!n.length)return[];const a=Math.ceil((t-o+3)*Ua.ONE_SECOND_IN_TS);let i;for(i=0;i<n.length&&!(n[i].pts>a);i++);return n.slice(i)},mK=(n,t,o)=>{if(!t.length)return n;if(o)return t.slice();const a=t[0].pts;let i=0;for(i;i<n.length&&!(n[i].pts>=a);i++);return n.slice(0,i).concat(t)},pK=(n,t,o,a)=>{const i=Math.ceil((t-a)*Ua.ONE_SECOND_IN_TS),s=Math.ceil((o-a)*Ua.ONE_SECOND_IN_TS),l=n.slice();let r=n.length;for(;r--&&!(n[r].pts<=s););if(r===-1)return l;let u=r+1;for(;u--&&!(n[u].pts<=i););return u=Math.max(u,0),l.splice(u,r-u+1),l},hK=function(n,t){if(!n&&!t||!n&&t||n&&!t)return!1;if(n===t)return!0;const o=Object.keys(n).sort(),a=Object.keys(t).sort();if(o.length!==a.length)return!1;for(let i=0;i<o.length;i++){const s=o[i];if(s!==a[i]||n[s]!==t[s])return!1}return!0},fK=function(n,t,o){t=t||[];const a=[];let i=0;for(let s=0;s<t.length;s++){const l=t[s];if(n===l.timeline&&(a.push(s),i+=l.duration,i>o))return s}return a.length===0?0:a[a.length-1]},$s=1,gK=500,gg=n=>typeof n=="number"&&isFinite(n),vr=1/60,vK=(n,t,o)=>n!=="main"||!t||!o?null:!o.hasAudio&&!o.hasVideo?"Neither audio nor video found in segment.":t.hasVideo&&!o.hasVideo?"Only audio found in segment when we expected video. We can't switch to audio only from a stream that had video. To get rid of this message, please add codec information to the manifest.":!t.hasVideo&&o.hasVideo?"Video found in segment when we expected only audio. We can't switch to a stream with video from an audio only stream. To get rid of this message, please add codec information to the manifest.":null,yK=(n,t,o)=>{let a=t-zt.BACK_BUFFER_LENGTH;n.length&&(a=Math.max(a,n.start(0)));const i=t-o;return Math.min(i,a)},_i=n=>{const{startOfSegment:t,duration:o,segment:a,part:i,playlist:{mediaSequence:s,id:l,segments:r=[]},mediaIndex:u,partIndex:c,timeline:f}=n,m=r.length-1;let d="mediaIndex/partIndex increment";n.getMediaInfoForTime?d=`getMediaInfoForTime (${n.getMediaInfoForTime})`:n.isSyncRequest&&(d="getSyncSegmentCandidate (isSyncRequest)"),n.independent&&(d+=` with independent ${n.independent}`);const h=typeof c=="number",g=n.segment.uri?"segment":"pre-segment",p=h?M1({preloadSegment:a})-1:0;return`${g} [${s+u}/${s+m}]`+(h?` part [${c}/${p}]`:"")+` segment start/end [${a.start} => ${a.end}]`+(h?` part start/end [${i.start} => ${i.end}]`:"")+` startOfSegment [${t}] duration [${o}] timeline [${f}] selected by [${d}] playlist [${l}]`},vg=n=>`${n}TimingInfo`,_K=({segmentTimeline:n,currentTimeline:t,startOfSegment:o,buffered:a,overrideCheck:i})=>!i&&n===t?null:n<t?o:a.length?a.end(a.length-1):o,vm=({timelineChangeController:n,currentTimeline:t,segmentTimeline:o,loaderType:a,audioDisabled:i})=>{if(t===o)return!1;if(a==="audio"){const s=n.lastTimelineChange({type:"main"});return!s||s.to!==o}if(a==="main"&&i){const s=n.pendingTimelineChange({type:"audio"});return!(s&&s.to===o)}return!1},bK=n=>{if(!n)return!1;const t=n.pendingTimelineChange({type:"audio"}),o=n.pendingTimelineChange({type:"main"}),a=t&&o,i=a&&t.to!==o.to;return!!(a&&t.from!==-1&&o.from!==-1&&i)},wK=n=>{const t=n.timelineChangeController_.pendingTimelineChange({type:"audio"}),o=n.timelineChangeController_.pendingTimelineChange({type:"main"});return t&&o&&t.to<o.to},ma=n=>{const t=n.pendingSegment_;if(!t)return;if(vm({timelineChangeController:n.timelineChangeController_,currentTimeline:n.currentTimeline_,segmentTimeline:t.timeline,loaderType:n.loaderType_,audioDisabled:n.audioDisabled_})&&bK(n.timelineChangeController_)){if(wK(n)){n.timelineChangeController_.trigger("audioTimelineBehind");return}n.timelineChangeController_.trigger("fixBadTimelineChange")}},xK=n=>{let t=0;return["video","audio"].forEach(function(o){const a=n[`${o}TimingInfo`];if(!a)return;const{start:i,end:s}=a;let l;typeof i=="bigint"||typeof s=="bigint"?l=X.BigInt(s)-X.BigInt(i):typeof i=="number"&&typeof s=="number"&&(l=s-i),typeof l<"u"&&l>t&&(t=l)}),typeof t=="bigint"&&t<Number.MAX_SAFE_INTEGER&&(t=Number(t)),t},yg=({segmentDuration:n,maxDuration:t})=>n?Math.round(n)>t+Eo:!1,VK=(n,t)=>{if(t!=="hls")return null;const o=xK({audioTimingInfo:n.audioTimingInfo,videoTimingInfo:n.videoTimingInfo});if(!o)return null;const a=n.playlist.targetDuration,i=yg({segmentDuration:o,maxDuration:a*2}),s=yg({segmentDuration:o,maxDuration:a}),l=`Segment with index ${n.mediaIndex} from playlist ${n.playlist.id} has a duration of ${o} when the reported duration is ${n.duration} and the target duration is ${a}. For HLS content, a duration in excess of the target duration may result in playback issues. See the HLS specification section on EXT-X-TARGETDURATION for more details: https://tools.ietf.org/html/draft-pantos-http-live-streaming-23#section-4.3.3.1`;return i||s?{severity:i?"warn":"info",message:l}:null},Ia=({type:n,segment:t})=>{if(!t)return;const o=!!(t.key||t.map&&t.map.ke),a=!!(t.map&&!t.map.bytes),i=t.startOfSegment===void 0?t.start:t.startOfSegment;return{type:n||t.type,uri:t.resolvedUri||t.uri,start:i,duration:t.duration,isEncrypted:o,isMediaInitialization:a}};class ym extends ie.EventTarget{constructor(t,o={}){if(super(),!t)throw new TypeError("Initialization settings are required");if(typeof t.currentTime!="function")throw new TypeError("No currentTime getter specified");if(!t.mediaSource)throw new TypeError("No MediaSource specified");this.bandwidth=t.bandwidth,this.throughput={rate:0,count:0},this.roundTrip=NaN,this.resetStats_(),this.mediaIndex=null,this.partIndex=null,this.hasPlayed_=t.hasPlayed,this.currentTime_=t.currentTime,this.seekable_=t.seekable,this.seeking_=t.seeking,this.duration_=t.duration,this.mediaSource_=t.mediaSource,this.vhs_=t.vhs,this.loaderType_=t.loaderType,this.currentMediaInfo_=void 0,this.startingMediaInfo_=void 0,this.segmentMetadataTrack_=t.segmentMetadataTrack,this.goalBufferLength_=t.goalBufferLength,this.sourceType_=t.sourceType,this.sourceUpdater_=t.sourceUpdater,this.inbandTextTracks_=t.inbandTextTracks,this.state_="INIT",this.timelineChangeController_=t.timelineChangeController,this.shouldSaveSegmentTimingInfo_=!0,this.parse708captions_=t.parse708captions,this.useDtsForTimestampOffset_=t.useDtsForTimestampOffset,this.captionServices_=t.captionServices,this.exactManifestTimings=t.exactManifestTimings,this.addMetadataToTextTrack=t.addMetadataToTextTrack,this.checkBufferTimeout_=null,this.error_=void 0,this.currentTimeline_=-1,this.shouldForceTimestampOffsetAfterResync_=!1,this.pendingSegment_=null,this.xhrOptions_=null,this.pendingSegments_=[],this.audioDisabled_=!1,this.isPendingTimestampOffset_=!1,this.gopBuffer_=[],this.timeMapping_=0,this.safeAppend_=!1,this.appendInitSegment_={audio:!0,video:!0},this.playlistOfLastInitSegment_={audio:null,video:null},this.callQueue_=[],this.loadQueue_=[],this.metadataQueue_={id3:[],caption:[]},this.waitingOnRemove_=!1,this.quotaExceededErrorRetryTimeout_=null,this.activeInitSegmentId_=null,this.initSegments_={},this.cacheEncryptionKeys_=t.cacheEncryptionKeys,this.keyCache_={},this.decrypter_=t.decrypter,this.syncController_=t.syncController,this.syncPoint_={segmentIndex:0,time:0},this.transmuxer_=this.createTransmuxer_(),this.triggerSyncInfoUpdate_=()=>this.trigger("syncinfoupdate"),this.syncController_.on("syncinfoupdate",this.triggerSyncInfoUpdate_),this.mediaSource_.addEventListener("sourceopen",()=>{this.isEndOfStream_()||(this.ended_=!1)}),this.fetchAtBuffer_=!1,this.logger_=so(`SegmentLoader[${this.loaderType_}]`),Object.defineProperty(this,"state",{get(){return this.state_},set(a){a!==this.state_&&(this.logger_(`${this.state_} -> ${a}`),this.state_=a,this.trigger("statechange"))}}),this.sourceUpdater_.on("ready",()=>{this.hasEnoughInfoToAppend_()?this.processCallQueue_():ma(this)}),this.sourceUpdater_.on("codecschange",a=>{this.trigger(kt({type:"codecschange"},a))}),this.loaderType_==="main"&&this.timelineChangeController_.on("pendingtimelinechange",()=>{this.hasEnoughInfoToAppend_()?this.processCallQueue_():ma(this)}),this.loaderType_==="audio"&&this.timelineChangeController_.on("timelinechange",a=>{this.trigger(kt({type:"timelinechange"},a)),this.hasEnoughInfoToLoad_()?this.processLoadQueue_():ma(this),this.hasEnoughInfoToAppend_()?this.processCallQueue_():ma(this)})}get mediaSequenceSync_(){return this.syncController_.getMediaSequenceSync(this.loaderType_)}createTransmuxer_(){return Nc.createTransmuxer({remux:!1,alignGopsAtEnd:this.safeAppend_,keepOriginalTimestamps:!0,parse708captions:this.parse708captions_,captionServices:this.captionServices_})}resetStats_(){this.mediaBytesTransferred=0,this.mediaRequests=0,this.mediaRequestsAborted=0,this.mediaRequestsTimedout=0,this.mediaRequestsErrored=0,this.mediaTransferDuration=0,this.mediaSecondsLoaded=0,this.mediaAppends=0}dispose(){this.trigger("dispose"),this.state="DISPOSED",this.pause(),this.abort_(),this.transmuxer_&&this.transmuxer_.terminate(),this.resetStats_(),this.checkBufferTimeout_&&X.clearTimeout(this.checkBufferTimeout_),this.syncController_&&this.triggerSyncInfoUpdate_&&this.syncController_.off("syncinfoupdate",this.triggerSyncInfoUpdate_),this.off()}setAudio(t){this.audioDisabled_=!t,t?this.appendInitSegment_.audio=!0:this.sourceUpdater_.removeAudio(0,this.duration_())}abort(){if(this.state!=="WAITING"){this.pendingSegment_&&(this.pendingSegment_=null),this.timelineChangeController_.clearPendingTimelineChange(this.loaderType_);return}this.abort_(),this.state="READY",this.paused()||this.monitorBuffer_()}abort_(){this.pendingSegment_&&this.pendingSegment_.abortRequests&&this.pendingSegment_.abortRequests(),this.pendingSegment_=null,this.callQueue_=[],this.loadQueue_=[],this.metadataQueue_.id3=[],this.metadataQueue_.caption=[],this.timelineChangeController_.clearPendingTimelineChange(this.loaderType_),this.waitingOnRemove_=!1,X.clearTimeout(this.quotaExceededErrorRetryTimeout_),this.quotaExceededErrorRetryTimeout_=null}checkForAbort_(t){return this.state==="APPENDING"&&!this.pendingSegment_?(this.state="READY",!0):!this.pendingSegment_||this.pendingSegment_.requestId!==t}error(t){return typeof t<"u"&&(this.logger_("error occurred:",t),this.error_=t),this.pendingSegment_=null,this.error_}endOfStream(){this.ended_=!0,this.transmuxer_&&Nc.reset(this.transmuxer_),this.gopBuffer_.length=0,this.pause(),this.trigger("ended")}buffered_(){const t=this.getMediaInfo_();if(!this.sourceUpdater_||!t)return Wt();if(this.loaderType_==="main"){const{hasAudio:o,hasVideo:a,isMuxed:i}=t;if(a&&o&&!this.audioDisabled_&&!i)return this.sourceUpdater_.buffered();if(a)return this.sourceUpdater_.videoBuffered()}return this.sourceUpdater_.audioBuffered()}initSegmentForMap(t,o=!1){if(!t)return null;const a=od(t);let i=this.initSegments_[a];return o&&!i&&t.bytes&&(this.initSegments_[a]=i={resolvedUri:t.resolvedUri,byterange:t.byterange,bytes:t.bytes,tracks:t.tracks,timescales:t.timescales}),i||t}segmentKey(t,o=!1){if(!t)return null;const a=oy(t);let i=this.keyCache_[a];this.cacheEncryptionKeys_&&o&&!i&&t.bytes&&(this.keyCache_[a]=i={resolvedUri:t.resolvedUri,bytes:t.bytes});const s={resolvedUri:(i||t).resolvedUri};return i&&(s.bytes=i.bytes),s}couldBeginLoading_(){return this.playlist_&&!this.paused()}load(){if(this.monitorBuffer_(),!!this.playlist_){if(this.state==="INIT"&&this.couldBeginLoading_())return this.init_();!this.couldBeginLoading_()||this.state!=="READY"&&this.state!=="INIT"||(this.state="READY")}}init_(){return this.state="READY",this.resetEverything(),this.monitorBuffer_()}playlist(t,o={}){if(!t||this.playlist_&&this.playlist_.endList&&t.endList&&this.playlist_.uri===t.uri)return;const a=this.playlist_,i=this.pendingSegment_;this.playlist_=t,this.xhrOptions_=o,this.state==="INIT"&&(t.syncInfo={mediaSequence:t.mediaSequence,time:0},this.loaderType_==="main"&&this.syncController_.setDateTimeMappingForStart(t));let s=null;if(a&&(a.id?s=a.id:a.uri&&(s=a.uri)),this.logger_(`playlist update [${s} => ${t.id||t.uri}]`),this.mediaSequenceSync_&&(this.mediaSequenceSync_.update(t,this.currentTime_()),this.logger_(`Playlist update:
|
|
225
|
+
currentTime: ${this.currentTime_()}
|
|
226
|
+
bufferedEnd: ${Ec(this.buffered_())}
|
|
227
|
+
`,this.mediaSequenceSync_.diagnostics)),this.trigger("syncinfoupdate"),this.state==="INIT"&&this.couldBeginLoading_())return this.init_();if(!a||a.uri!==t.uri){this.mediaIndex!==null&&(!t.endList&&typeof t.partTargetDuration=="number"?this.resetLoader():this.resyncLoader()),this.currentMediaInfo_=void 0,this.trigger("playlistupdate");return}const l=t.mediaSequence-a.mediaSequence;if(this.logger_(`live window shift [${l}]`),this.mediaIndex!==null)if(this.mediaIndex-=l,this.mediaIndex<0)this.mediaIndex=null,this.partIndex=null;else{const r=this.playlist_.segments[this.mediaIndex];if(this.partIndex&&(!r.parts||!r.parts.length||!r.parts[this.partIndex])){const u=this.mediaIndex;this.logger_(`currently processing part (index ${this.partIndex}) no longer exists.`),this.resetLoader(),this.mediaIndex=u}}i&&(i.mediaIndex-=l,i.mediaIndex<0?(i.mediaIndex=null,i.partIndex=null):(i.mediaIndex>=0&&(i.segment=t.segments[i.mediaIndex]),i.partIndex>=0&&i.segment.parts&&(i.part=i.segment.parts[i.partIndex]))),this.syncController_.saveExpiredSegmentInfo(a,t)}pause(){this.checkBufferTimeout_&&(X.clearTimeout(this.checkBufferTimeout_),this.checkBufferTimeout_=null)}paused(){return this.checkBufferTimeout_===null}resetEverything(t){this.ended_=!1,this.activeInitSegmentId_=null,this.appendInitSegment_={audio:!0,video:!0},this.resetLoader(),this.remove(0,1/0,t),this.transmuxer_&&(this.transmuxer_.postMessage({action:"clearAllMp4Captions"}),this.transmuxer_.postMessage({action:"reset"}))}resetLoader(){this.fetchAtBuffer_=!1,this.mediaSequenceSync_&&this.mediaSequenceSync_.resetAppendedStatus(),this.resyncLoader()}resyncLoader(){this.transmuxer_&&Nc.reset(this.transmuxer_),this.mediaIndex=null,this.partIndex=null,this.syncPoint_=null,this.isPendingTimestampOffset_=!1;const t=this.currentMediaInfo_&&this.currentMediaInfo_.isFmp4;this.sourceType_==="hls"&&!t&&(this.shouldForceTimestampOffsetAfterResync_=!0),this.callQueue_=[],this.loadQueue_=[],this.metadataQueue_.id3=[],this.metadataQueue_.caption=[],this.abort(),this.transmuxer_&&this.transmuxer_.postMessage({action:"clearParsedMp4Captions"})}remove(t,o,a=()=>{},i=!1){if(o===1/0&&(o=this.duration_()),o<=t){this.logger_("skipping remove because end ${end} is <= start ${start}");return}if(!this.sourceUpdater_||!this.getMediaInfo_()){this.logger_("skipping remove because no source updater or starting media info");return}let s=1;const l=()=>{s--,s===0&&a()};(i||!this.audioDisabled_)&&(s++,this.sourceUpdater_.removeAudio(t,o,l)),(i||this.loaderType_==="main")&&(this.gopBuffer_=pK(this.gopBuffer_,t,o,this.timeMapping_),s++,this.sourceUpdater_.removeVideo(t,o,l));for(const r in this.inbandTextTracks_)zs(t,o,this.inbandTextTracks_[r]);zs(t,o,this.segmentMetadataTrack_),l()}monitorBuffer_(){this.checkBufferTimeout_&&X.clearTimeout(this.checkBufferTimeout_),this.checkBufferTimeout_=X.setTimeout(this.monitorBufferTick_.bind(this),1)}monitorBufferTick_(){this.state==="READY"&&this.fillBuffer_(),this.checkBufferTimeout_&&X.clearTimeout(this.checkBufferTimeout_),this.checkBufferTimeout_=X.setTimeout(this.monitorBufferTick_.bind(this),gK)}fillBuffer_(){if(this.sourceUpdater_.updating())return;const t=this.chooseNextRequest_();if(!t)return;const o={segmentInfo:Ia({type:this.loaderType_,segment:t})};this.trigger({type:"segmentselected",metadata:o}),typeof t.timestampOffset=="number"&&(this.isPendingTimestampOffset_=!1,this.timelineChangeController_.pendingTimelineChange({type:this.loaderType_,from:this.currentTimeline_,to:t.timeline})),this.loadSegment_(t)}isEndOfStream_(t=this.mediaIndex,o=this.playlist_,a=this.partIndex){if(!o||!this.mediaSource_)return!1;const i=typeof t=="number"&&o.segments[t],s=t+1===o.segments.length,l=!i||!i.parts||a+1===i.parts.length;return o.endList&&this.mediaSource_.readyState==="open"&&s&&l}chooseNextRequest_(){const t=this.buffered_(),o=Ec(t)||0,a=Tp(t,this.currentTime_()),i=!this.hasPlayed_()&&a>=1,s=a>=this.goalBufferLength_(),l=this.playlist_.segments;if(!l.length||i||s)return null;this.syncPoint_=this.syncPoint_||this.syncController_.getSyncPoint(this.playlist_,this.duration_(),this.currentTimeline_,this.currentTime_(),this.loaderType_);const r={partIndex:null,mediaIndex:null,startOfSegment:null,playlist:this.playlist_,isSyncRequest:!this.syncPoint_};if(r.isSyncRequest)r.mediaIndex=fK(this.currentTimeline_,l,o),this.logger_(`choose next request. Can not find sync point. Fallback to media Index: ${r.mediaIndex}`);else if(this.mediaIndex!==null){const d=l[this.mediaIndex],h=typeof this.partIndex=="number"?this.partIndex:-1;r.startOfSegment=d.end?d.end:o,d.parts&&d.parts[h+1]?(r.mediaIndex=this.mediaIndex,r.partIndex=h+1):r.mediaIndex=this.mediaIndex+1}else{let d,h,g;const p=this.fetchAtBuffer_?o:this.currentTime_();if(this.mediaSequenceSync_&&this.logger_(`chooseNextRequest_ request after Quality Switch:
|
|
228
|
+
For TargetTime: ${p}.
|
|
229
|
+
CurrentTime: ${this.currentTime_()}
|
|
230
|
+
BufferedEnd: ${o}
|
|
231
|
+
Fetch At Buffer: ${this.fetchAtBuffer_}
|
|
232
|
+
`,this.mediaSequenceSync_.diagnostics),this.mediaSequenceSync_&&this.mediaSequenceSync_.isReliable){const b=this.getSyncInfoFromMediaSequenceSync_(p);if(!b){const _="No sync info found while using media sequence sync";return this.error({message:_,metadata:{errorType:ie.Error.StreamingFailedToSelectNextSegment,error:new Error(_)}}),this.logger_("chooseNextRequest_ - no sync info found using media sequence sync"),null}this.logger_(`chooseNextRequest_ mediaSequence syncInfo (${b.start} --> ${b.end})`),d=b.segmentIndex,h=b.partIndex,g=b.start}else{this.logger_("chooseNextRequest_ - fallback to a regular segment selection algorithm, based on a syncPoint.");const b=En.getMediaInfoForTime({exactManifestTimings:this.exactManifestTimings,playlist:this.playlist_,currentTime:p,startingPartIndex:this.syncPoint_.partIndex,startingSegmentIndex:this.syncPoint_.segmentIndex,startTime:this.syncPoint_.time});d=b.segmentIndex,h=b.partIndex,g=b.startTime}r.getMediaInfoForTime=this.fetchAtBuffer_?`bufferedEnd ${p}`:`currentTime ${p}`,r.mediaIndex=d,r.startOfSegment=g,r.partIndex=h,this.logger_(`choose next request. Playlist switched and we have a sync point. Media Index: ${r.mediaIndex} `)}const u=l[r.mediaIndex];let c=u&&typeof r.partIndex=="number"&&u.parts&&u.parts[r.partIndex];if(!u||typeof r.partIndex=="number"&&!c)return null;typeof r.partIndex!="number"&&u.parts&&(r.partIndex=0,c=u.parts[0]);const f=this.vhs_.playlists&&this.vhs_.playlists.main&&this.vhs_.playlists.main.independentSegments||this.playlist_.independentSegments;if(!a&&c&&!f&&!c.independent)if(r.partIndex===0){const d=l[r.mediaIndex-1],h=d.parts&&d.parts.length&&d.parts[d.parts.length-1];h&&h.independent&&(r.mediaIndex-=1,r.partIndex=d.parts.length-1,r.independent="previous segment")}else u.parts[r.partIndex-1].independent&&(r.partIndex-=1,r.independent="previous part");const m=this.mediaSource_&&this.mediaSource_.readyState==="ended";return r.mediaIndex>=l.length-1&&m&&!this.seeking_()?null:(this.shouldForceTimestampOffsetAfterResync_&&(this.shouldForceTimestampOffsetAfterResync_=!1,r.forceTimestampOffset=!0,this.logger_("choose next request. Force timestamp offset after loader resync")),this.generateSegmentInfo_(r))}getSyncInfoFromMediaSequenceSync_(t){if(!this.mediaSequenceSync_)return null;const o=Math.max(t,this.mediaSequenceSync_.start);t!==o&&this.logger_(`getSyncInfoFromMediaSequenceSync_. Pulled target time from ${t} to ${o}`);const a=this.mediaSequenceSync_.getSyncInfoForTime(o);if(!a)return null;if(!a.isAppended)return a;const i=this.mediaSequenceSync_.getSyncInfoForTime(a.end);return i?(i.isAppended&&this.logger_("getSyncInfoFromMediaSequenceSync_: We encounter unexpected scenario where next media sequence sync info is also appended!"),i):null}generateSegmentInfo_(t){const{independent:o,playlist:a,mediaIndex:i,startOfSegment:s,isSyncRequest:l,partIndex:r,forceTimestampOffset:u,getMediaInfoForTime:c}=t,f=a.segments[i],m=typeof r=="number"&&f.parts[r],d={requestId:"segment-loader-"+Math.random(),uri:m&&m.resolvedUri||f.resolvedUri,mediaIndex:i,partIndex:m?r:null,isSyncRequest:l,startOfSegment:s,playlist:a,bytes:null,encryptedBytes:null,timestampOffset:null,timeline:f.timeline,duration:m&&m.duration||f.duration,segment:f,part:m,byteLength:0,transmuxer:this.transmuxer_,getMediaInfoForTime:c,independent:o},h=typeof u<"u"?u:this.isPendingTimestampOffset_;d.timestampOffset=this.timestampOffsetForSegment_({segmentTimeline:f.timeline,currentTimeline:this.currentTimeline_,startOfSegment:s,buffered:this.buffered_(),overrideCheck:h});const g=Ec(this.sourceUpdater_.audioBuffered());return typeof g=="number"&&(d.audioAppendStart=g-this.sourceUpdater_.audioTimestampOffset()),this.sourceUpdater_.videoBuffered().length&&(d.gopsToAlignWith=cK(this.gopBuffer_,this.currentTime_()-this.sourceUpdater_.videoTimestampOffset(),this.timeMapping_)),d}timestampOffsetForSegment_(t){return _K(t)}earlyAbortWhenNeeded_(t){if(this.vhs_.tech_.paused()||!this.xhrOptions_.timeout||!this.playlist_.attributes.BANDWIDTH||Date.now()-(t.firstBytesReceivedAt||Date.now())<1e3)return;const o=this.currentTime_(),a=t.bandwidth,i=this.pendingSegment_.duration,s=En.estimateSegmentRequestTime(i,a,this.playlist_,t.bytesReceived),l=FX(this.buffered_(),o,this.vhs_.tech_.playbackRate())-1;if(s<=l)return;const r=eK({main:this.vhs_.playlists.main,currentTime:o,bandwidth:a,duration:this.duration_(),segmentDuration:i,timeUntilRebuffer:l,currentTimeline:this.currentTimeline_,syncController:this.syncController_});if(!r)return;const c=s-l-r.rebufferingImpact;let f=.5;l<=Eo&&(f=1),!(!r.playlist||r.playlist.uri===this.playlist_.uri||c<f)&&(this.bandwidth=r.playlist.attributes.BANDWIDTH*zt.BANDWIDTH_VARIANCE+1,this.trigger("earlyabort"))}handleAbort_(t){this.logger_(`Aborting ${_i(t)}`),this.mediaRequestsAborted+=1}handleProgress_(t,o){this.earlyAbortWhenNeeded_(o.stats),!this.checkForAbort_(o.requestId)&&this.trigger("progress")}handleTrackInfo_(t,o){const{hasAudio:a,hasVideo:i}=o,s={segmentInfo:Ia({type:this.loaderType_,segment:t}),trackInfo:{hasAudio:a,hasVideo:i}};this.trigger({type:"segmenttransmuxingtrackinfoavailable",metadata:s}),this.earlyAbortWhenNeeded_(t.stats),!this.checkForAbort_(t.requestId)&&(this.checkForIllegalMediaSwitch(o)||(o=o||{},hK(this.currentMediaInfo_,o)||(this.appendInitSegment_={audio:!0,video:!0},this.startingMediaInfo_=o,this.currentMediaInfo_=o,this.logger_("trackinfo update",o),this.trigger("trackinfo")),!this.checkForAbort_(t.requestId)&&(this.pendingSegment_.trackInfo=o,this.hasEnoughInfoToAppend_()?this.processCallQueue_():ma(this))))}handleTimingInfo_(t,o,a,i){if(this.earlyAbortWhenNeeded_(t.stats),this.checkForAbort_(t.requestId))return;const s=this.pendingSegment_,l=vg(o);s[l]=s[l]||{},s[l][a]=i,this.logger_(`timinginfo: ${o} - ${a} - ${i}`),this.hasEnoughInfoToAppend_()?this.processCallQueue_():ma(this)}handleCaptions_(t,o){if(this.earlyAbortWhenNeeded_(t.stats),this.checkForAbort_(t.requestId))return;if(o.length===0){this.logger_("SegmentLoader received no captions from a caption event");return}if(!this.pendingSegment_.hasAppendedData_){this.metadataQueue_.caption.push(this.handleCaptions_.bind(this,t,o));return}const i=this.sourceUpdater_.videoTimestampOffset()===null?this.sourceUpdater_.audioTimestampOffset():this.sourceUpdater_.videoTimestampOffset(),s={};o.forEach(l=>{s[l.stream]=s[l.stream]||{startTime:1/0,captions:[],endTime:0};const r=s[l.stream];r.startTime=Math.min(r.startTime,l.startTime+i),r.endTime=Math.max(r.endTime,l.endTime+i),r.captions.push(l)}),Object.keys(s).forEach(l=>{const{startTime:r,endTime:u,captions:c}=s[l],f=this.inbandTextTracks_;this.logger_(`adding cues from ${r} -> ${u} for ${l}`),oK(f,this.vhs_.tech_,l),zs(r,u,f[l]),aK({captionArray:c,inbandTextTracks:f,timestampOffset:i})}),this.transmuxer_&&this.transmuxer_.postMessage({action:"clearParsedMp4Captions"})}handleId3_(t,o,a){if(this.earlyAbortWhenNeeded_(t.stats),this.checkForAbort_(t.requestId))return;if(!this.pendingSegment_.hasAppendedData_){this.metadataQueue_.id3.push(this.handleId3_.bind(this,t,o,a));return}this.addMetadataToTextTrack(a,o,this.duration_())}processMetadataQueue_(){this.metadataQueue_.id3.forEach(t=>t()),this.metadataQueue_.caption.forEach(t=>t()),this.metadataQueue_.id3=[],this.metadataQueue_.caption=[]}processCallQueue_(){const t=this.callQueue_;this.callQueue_=[],t.forEach(o=>o())}processLoadQueue_(){const t=this.loadQueue_;this.loadQueue_=[],t.forEach(o=>o())}hasEnoughInfoToLoad_(){if(this.loaderType_!=="audio")return!0;const t=this.pendingSegment_;return t?this.getCurrentMediaInfo_()?!vm({timelineChangeController:this.timelineChangeController_,currentTimeline:this.currentTimeline_,segmentTimeline:t.timeline,loaderType:this.loaderType_,audioDisabled:this.audioDisabled_}):!0:!1}getCurrentMediaInfo_(t=this.pendingSegment_){return t&&t.trackInfo||this.currentMediaInfo_}getMediaInfo_(t=this.pendingSegment_){return this.getCurrentMediaInfo_(t)||this.startingMediaInfo_}getPendingSegmentPlaylist(){return this.pendingSegment_?this.pendingSegment_.playlist:null}hasEnoughInfoToAppend_(){if(!this.sourceUpdater_.ready()||this.waitingOnRemove_||this.quotaExceededErrorRetryTimeout_)return!1;const t=this.pendingSegment_,o=this.getCurrentMediaInfo_();if(!t||!o)return!1;const{hasAudio:a,hasVideo:i,isMuxed:s}=o;return!(i&&!t.videoTimingInfo||a&&!this.audioDisabled_&&!s&&!t.audioTimingInfo||vm({timelineChangeController:this.timelineChangeController_,currentTimeline:this.currentTimeline_,segmentTimeline:t.timeline,loaderType:this.loaderType_,audioDisabled:this.audioDisabled_}))}handleData_(t,o){if(this.earlyAbortWhenNeeded_(t.stats),this.checkForAbort_(t.requestId))return;if(this.callQueue_.length||!this.hasEnoughInfoToAppend_()){ma(this),this.callQueue_.push(this.handleData_.bind(this,t,o));return}const a=this.pendingSegment_;if(this.setTimeMapping_(a.timeline),this.updateMediaSecondsLoaded_(a.part||a.segment),this.mediaSource_.readyState!=="closed"){if(t.map&&(t.map=this.initSegmentForMap(t.map,!0),a.segment.map=t.map),t.key&&this.segmentKey(t.key,!0),a.isFmp4=t.isFmp4,a.timingInfo=a.timingInfo||{},a.isFmp4)this.trigger("fmp4"),a.timingInfo.start=a[vg(o.type)].start;else{const i=this.getCurrentMediaInfo_(),s=this.loaderType_==="main"&&i&&i.hasVideo;let l;s&&(l=a.videoTimingInfo.start),a.timingInfo.start=this.trueSegmentStart_({currentStart:a.timingInfo.start,playlist:a.playlist,mediaIndex:a.mediaIndex,currentVideoTimestampOffset:this.sourceUpdater_.videoTimestampOffset(),useVideoTimingInfo:s,firstVideoFrameTimeForData:l,videoTimingInfo:a.videoTimingInfo,audioTimingInfo:a.audioTimingInfo})}if(this.updateAppendInitSegmentStatus(a,o.type),this.updateSourceBufferTimestampOffset_(a),a.isSyncRequest){this.updateTimingInfoEnd_(a),this.syncController_.saveSegmentTimingInfo({segmentInfo:a,shouldSaveTimelineMapping:this.loaderType_==="main"});const i=this.chooseNextRequest_();if(i.mediaIndex!==a.mediaIndex||i.partIndex!==a.partIndex){this.logger_("sync segment was incorrect, not appending");return}this.logger_("sync segment was correct, appending")}a.hasAppendedData_=!0,this.processMetadataQueue_(),this.appendData_(a,o)}}updateAppendInitSegmentStatus(t,o){this.loaderType_==="main"&&typeof t.timestampOffset=="number"&&!t.changedTimestampOffset&&(this.appendInitSegment_={audio:!0,video:!0}),this.playlistOfLastInitSegment_[o]!==t.playlist&&(this.appendInitSegment_[o]=!0)}getInitSegmentAndUpdateState_({type:t,initSegment:o,map:a,playlist:i}){if(a){const s=od(a);if(this.activeInitSegmentId_===s)return null;o=this.initSegmentForMap(a,!0).bytes,this.activeInitSegmentId_=s}return o&&this.appendInitSegment_[t]?(this.playlistOfLastInitSegment_[t]=i,this.appendInitSegment_[t]=!1,this.activeInitSegmentId_=null,o):null}handleQuotaExceededError_({segmentInfo:t,type:o,bytes:a},i){const s=this.sourceUpdater_.audioBuffered(),l=this.sourceUpdater_.videoBuffered();s.length>1&&this.logger_("On QUOTA_EXCEEDED_ERR, found gaps in the audio buffer: "+Ra(s).join(", ")),l.length>1&&this.logger_("On QUOTA_EXCEEDED_ERR, found gaps in the video buffer: "+Ra(l).join(", "));const r=s.length?s.start(0):0,u=s.length?s.end(s.length-1):0,c=l.length?l.start(0):0,f=l.length?l.end(l.length-1):0;if(u-r<=$s&&f-c<=$s){this.logger_(`On QUOTA_EXCEEDED_ERR, single segment too large to append to buffer, triggering an error. Appended byte length: ${a.byteLength}, audio buffer: ${Ra(s).join(", ")}, video buffer: ${Ra(l).join(", ")}, `),this.error({message:"Quota exceeded error with append of a single segment of content",excludeUntil:1/0}),this.trigger("error");return}this.waitingOnRemove_=!0,this.callQueue_.push(this.appendToSourceBuffer_.bind(this,{segmentInfo:t,type:o,bytes:a}));const d=this.currentTime_()-$s;this.logger_(`On QUOTA_EXCEEDED_ERR, removing audio/video from 0 to ${d}`),this.remove(0,d,()=>{this.logger_(`On QUOTA_EXCEEDED_ERR, retrying append in ${$s}s`),this.waitingOnRemove_=!1,this.quotaExceededErrorRetryTimeout_=X.setTimeout(()=>{this.logger_("On QUOTA_EXCEEDED_ERR, re-processing call queue"),this.quotaExceededErrorRetryTimeout_=null,this.processCallQueue_()},$s*1e3)},!0)}handleAppendError_({segmentInfo:t,type:o,bytes:a},i){if(i){if(i.code===Y1){this.handleQuotaExceededError_({segmentInfo:t,type:o,bytes:a});return}this.logger_("Received non QUOTA_EXCEEDED_ERR on append",i),this.error({message:`${o} append of ${a.length}b failed for segment #${t.mediaIndex} in playlist ${t.playlist.id}`,metadata:{errorType:ie.Error.StreamingFailedToAppendSegment}}),this.trigger("appenderror")}}appendToSourceBuffer_({segmentInfo:t,type:o,initSegment:a,data:i,bytes:s}){if(!s){const r=[i];let u=i.byteLength;a&&(r.unshift(a),u+=a.byteLength),s=nK({bytes:u,segments:r})}const l={segmentInfo:Ia({type:this.loaderType_,segment:t})};this.trigger({type:"segmentappendstart",metadata:l}),this.sourceUpdater_.appendBuffer({segmentInfo:t,type:o,bytes:s},this.handleAppendError_.bind(this,{segmentInfo:t,type:o,bytes:s}))}handleSegmentTimingInfo_(t,o,a){if(!this.pendingSegment_||o!==this.pendingSegment_.requestId)return;const i=this.pendingSegment_.segment,s=`${t}TimingInfo`;i[s]||(i[s]={}),i[s].transmuxerPrependedSeconds=a.prependedContentDuration||0,i[s].transmuxedPresentationStart=a.start.presentation,i[s].transmuxedDecodeStart=a.start.decode,i[s].transmuxedPresentationEnd=a.end.presentation,i[s].transmuxedDecodeEnd=a.end.decode,i[s].baseMediaDecodeTime=a.baseMediaDecodeTime}appendData_(t,o){const{type:a,data:i}=o;if(!i||!i.byteLength||a==="audio"&&this.audioDisabled_)return;const s=this.getInitSegmentAndUpdateState_({type:a,initSegment:o.initSegment,playlist:t.playlist,map:t.isFmp4?t.segment.map:null});this.appendToSourceBuffer_({segmentInfo:t,type:a,initSegment:s,data:i})}loadSegment_(t){if(this.state="WAITING",this.pendingSegment_=t,this.trimBackBuffer_(t),typeof t.timestampOffset=="number"&&this.transmuxer_&&this.transmuxer_.postMessage({action:"clearAllMp4Captions"}),!this.hasEnoughInfoToLoad_()){ma(this),this.loadQueue_.push(()=>{const o=kt({},t,{forceTimestampOffset:!0});kt(t,this.generateSegmentInfo_(o)),this.isPendingTimestampOffset_=!1,this.updateTransmuxerAndRequestSegment_(t)});return}this.updateTransmuxerAndRequestSegment_(t)}updateTransmuxerAndRequestSegment_(t){this.shouldUpdateTransmuxerTimestampOffset_(t.timestampOffset)&&(this.gopBuffer_.length=0,t.gopsToAlignWith=[],this.timeMapping_=0,this.transmuxer_.postMessage({action:"reset"}),this.transmuxer_.postMessage({action:"setTimestampOffset",timestampOffset:t.timestampOffset}));const o=this.createSimplifiedSegmentObj_(t),a=this.isEndOfStream_(t.mediaIndex,t.playlist,t.partIndex),i=this.mediaIndex!==null,s=t.timeline!==this.currentTimeline_&&t.timeline>0,l=a||i&&s;this.logger_(`Requesting
|
|
233
|
+
${by(t.uri)}
|
|
234
|
+
${_i(t)}`),o.map&&!o.map.bytes&&(this.logger_("going to request init segment."),this.appendInitSegment_={video:!0,audio:!0}),t.abortRequests=QY({xhr:this.vhs_.xhr,xhrOptions:this.xhrOptions_,decryptionWorker:this.decrypter_,segment:o,abortFn:this.handleAbort_.bind(this,t),progressFn:this.handleProgress_.bind(this),trackInfoFn:this.handleTrackInfo_.bind(this),timingInfoFn:this.handleTimingInfo_.bind(this),videoSegmentTimingInfoFn:this.handleSegmentTimingInfo_.bind(this,"video",t.requestId),audioSegmentTimingInfoFn:this.handleSegmentTimingInfo_.bind(this,"audio",t.requestId),captionsFn:this.handleCaptions_.bind(this),isEndOfTimeline:l,endedTimelineFn:()=>{this.logger_("received endedtimeline callback")},id3Fn:this.handleId3_.bind(this),dataFn:this.handleData_.bind(this),doneFn:this.segmentRequestFinished_.bind(this),onTransmuxerLog:({message:r,level:u,stream:c})=>{this.logger_(`${_i(t)} logged from transmuxer stream ${c} as a ${u}: ${r}`)},triggerSegmentEventFn:({type:r,segment:u,keyInfo:c,trackInfo:f,timingInfo:m})=>{const h={segmentInfo:Ia({segment:u})};c&&(h.keyInfo=c),f&&(h.trackInfo=f),m&&(h.timingInfo=m),this.trigger({type:r,metadata:h})}})}trimBackBuffer_(t){const o=yK(this.seekable_(),this.currentTime_(),this.playlist_.targetDuration||10);o>0&&this.remove(0,o)}createSimplifiedSegmentObj_(t){const o=t.segment,a=t.part,i=t.segment.key||t.segment.map&&t.segment.map.key,s=t.segment.map&&!t.segment.map.bytes,l={resolvedUri:a?a.resolvedUri:o.resolvedUri,byterange:a?a.byterange:o.byterange,requestId:t.requestId,transmuxer:t.transmuxer,audioAppendStart:t.audioAppendStart,gopsToAlignWith:t.gopsToAlignWith,part:t.part,type:this.loaderType_,start:t.startOfSegment,duration:t.duration,isEncrypted:i,isMediaInitialization:s},r=t.playlist.segments[t.mediaIndex-1];if(r&&r.timeline===o.timeline&&(r.videoTimingInfo?l.baseStartTime=r.videoTimingInfo.transmuxedDecodeEnd:r.audioTimingInfo&&(l.baseStartTime=r.audioTimingInfo.transmuxedDecodeEnd)),o.key){const u=o.key.iv||new Uint32Array([0,0,0,t.mediaIndex+t.playlist.mediaSequence]);l.key=this.segmentKey(o.key),l.key.iv=u}return o.map&&(l.map=this.initSegmentForMap(o.map)),l}saveTransferStats_(t){this.mediaRequests+=1,t&&(this.mediaBytesTransferred+=t.bytesReceived,this.mediaTransferDuration+=t.roundTripTime)}saveBandwidthRelatedStats_(t,o){if(this.pendingSegment_.byteLength=o.bytesReceived,t<vr){this.logger_(`Ignoring segment's bandwidth because its duration of ${t} is less than the min to record ${vr}`);return}const a={bandwidthInfo:{from:this.bandwidth,to:o.bandwidth}};this.trigger({type:"bandwidthupdated",metadata:a}),this.bandwidth=o.bandwidth,this.roundTrip=o.roundTripTime}handleTimeout_(){this.mediaRequestsTimedout+=1,this.bandwidth=1,this.roundTrip=NaN,this.trigger("bandwidthupdate"),this.trigger("timeout")}segmentRequestFinished_(t,o,a){if(this.callQueue_.length){this.callQueue_.push(this.segmentRequestFinished_.bind(this,t,o,a));return}if(this.saveTransferStats_(o.stats),!this.pendingSegment_||o.requestId!==this.pendingSegment_.requestId)return;if(t){if(this.pendingSegment_=null,this.state="READY",t.code===No.ABORTED)return;if(this.pause(),t.code===No.TIMEOUT){this.handleTimeout_();return}this.mediaRequestsErrored+=1,this.error(t),this.trigger("error");return}const i=this.pendingSegment_;this.saveBandwidthRelatedStats_(i.duration,o.stats),i.endOfAllRequests=o.endOfAllRequests,a.gopInfo&&(this.gopBuffer_=mK(this.gopBuffer_,a.gopInfo,this.safeAppend_)),this.state="APPENDING",this.trigger("appending"),this.waitForAppendsToComplete_(i)}setTimeMapping_(t){const o=this.syncController_.mappingForTimeline(t);o!==null&&(this.timeMapping_=o)}updateMediaSecondsLoaded_(t){typeof t.start=="number"&&typeof t.end=="number"?this.mediaSecondsLoaded+=t.end-t.start:this.mediaSecondsLoaded+=t.duration}shouldUpdateTransmuxerTimestampOffset_(t){return t===null?!1:this.loaderType_==="main"&&t!==this.sourceUpdater_.videoTimestampOffset()||!this.audioDisabled_&&t!==this.sourceUpdater_.audioTimestampOffset()}trueSegmentStart_({currentStart:t,playlist:o,mediaIndex:a,firstVideoFrameTimeForData:i,currentVideoTimestampOffset:s,useVideoTimingInfo:l,videoTimingInfo:r,audioTimingInfo:u}){if(typeof t<"u")return t;if(!l)return u.start;const c=o.segments[a-1];return a===0||!c||typeof c.start>"u"||c.end!==i+s?i:r.start}waitForAppendsToComplete_(t){const o=this.getCurrentMediaInfo_(t);if(!o){this.error({message:"No starting media returned, likely due to an unsupported media format.",playlistExclusionDuration:1/0}),this.trigger("error");return}const{hasAudio:a,hasVideo:i,isMuxed:s}=o,l=this.loaderType_==="main"&&i,r=!this.audioDisabled_&&a&&!s;if(t.waitingOnAppends=0,!t.hasAppendedData_){!t.timingInfo&&typeof t.timestampOffset=="number"&&(this.isPendingTimestampOffset_=!0),t.timingInfo={start:0},t.waitingOnAppends++,this.isPendingTimestampOffset_||(this.updateSourceBufferTimestampOffset_(t),this.processMetadataQueue_()),this.checkAppendsDone_(t);return}l&&t.waitingOnAppends++,r&&t.waitingOnAppends++,l&&this.sourceUpdater_.videoQueueCallback(this.checkAppendsDone_.bind(this,t)),r&&this.sourceUpdater_.audioQueueCallback(this.checkAppendsDone_.bind(this,t))}checkAppendsDone_(t){this.checkForAbort_(t.requestId)||(t.waitingOnAppends--,t.waitingOnAppends===0&&this.handleAppendsDone_())}checkForIllegalMediaSwitch(t){const o=vK(this.loaderType_,this.getCurrentMediaInfo_(),t);return o?(this.error({message:o,playlistExclusionDuration:1/0}),this.trigger("error"),!0):!1}updateSourceBufferTimestampOffset_(t){if(t.timestampOffset===null||typeof t.timingInfo.start!="number"||t.changedTimestampOffset||this.loaderType_!=="main")return;let o=!1;t.timestampOffset-=this.getSegmentStartTimeForTimestampOffsetCalculation_({videoTimingInfo:t.segment.videoTimingInfo,audioTimingInfo:t.segment.audioTimingInfo,timingInfo:t.timingInfo}),t.changedTimestampOffset=!0,t.timestampOffset!==this.sourceUpdater_.videoTimestampOffset()&&(this.sourceUpdater_.videoTimestampOffset(t.timestampOffset),o=!0),t.timestampOffset!==this.sourceUpdater_.audioTimestampOffset()&&(this.sourceUpdater_.audioTimestampOffset(t.timestampOffset),o=!0),o&&this.trigger("timestampoffset")}getSegmentStartTimeForTimestampOffsetCalculation_({videoTimingInfo:t,audioTimingInfo:o,timingInfo:a}){return this.useDtsForTimestampOffset_?t&&typeof t.transmuxedDecodeStart=="number"?t.transmuxedDecodeStart:o&&typeof o.transmuxedDecodeStart=="number"?o.transmuxedDecodeStart:a.start:a.start}updateTimingInfoEnd_(t){t.timingInfo=t.timingInfo||{};const o=this.getMediaInfo_(),i=this.loaderType_==="main"&&o&&o.hasVideo&&t.videoTimingInfo?t.videoTimingInfo:t.audioTimingInfo;i&&(t.timingInfo.end=typeof i.end=="number"?i.end:i.start+t.duration)}handleAppendsDone_(){if(this.pendingSegment_){const u={segmentInfo:Ia({type:this.loaderType_,segment:this.pendingSegment_})};this.trigger({type:"appendsdone",metadata:u})}if(!this.pendingSegment_){this.state="READY",this.paused()||this.monitorBuffer_();return}const t=this.pendingSegment_;t.part&&t.part.syncInfo?t.part.syncInfo.markAppended():t.segment.syncInfo&&t.segment.syncInfo.markAppended(),this.updateTimingInfoEnd_(t),this.shouldSaveSegmentTimingInfo_&&this.syncController_.saveSegmentTimingInfo({segmentInfo:t,shouldSaveTimelineMapping:this.loaderType_==="main"});const o=VK(t,this.sourceType_);if(o&&(o.severity==="warn"?ie.log.warn(o.message):this.logger_(o.message)),this.recordThroughput_(t),this.pendingSegment_=null,this.state="READY",t.isSyncRequest&&(this.trigger("syncinfoupdate"),!t.hasAppendedData_)){this.logger_(`Throwing away un-appended sync request ${_i(t)}`);return}this.logger_(`Appended ${_i(t)}`),this.addSegmentMetadataCue_(t),this.fetchAtBuffer_=!0,this.currentTimeline_!==t.timeline&&(this.timelineChangeController_.lastTimelineChange({type:this.loaderType_,from:this.currentTimeline_,to:t.timeline}),this.loaderType_==="main"&&!this.audioDisabled_&&this.timelineChangeController_.lastTimelineChange({type:"audio",from:this.currentTimeline_,to:t.timeline})),this.currentTimeline_=t.timeline,this.trigger("syncinfoupdate");const a=t.segment,i=t.part,s=a.end&&this.currentTime_()-a.end>t.playlist.targetDuration*3,l=i&&i.end&&this.currentTime_()-i.end>t.playlist.partTargetDuration*3;if(s||l){this.logger_(`bad ${s?"segment":"part"} ${_i(t)}`),this.resetEverything();return}this.mediaIndex!==null&&this.trigger("bandwidthupdate"),this.trigger("progress"),this.mediaIndex=t.mediaIndex,this.partIndex=t.partIndex,this.isEndOfStream_(t.mediaIndex,t.playlist,t.partIndex)&&this.endOfStream(),this.trigger("appended"),t.hasAppendedData_&&this.mediaAppends++,this.paused()||this.monitorBuffer_()}recordThroughput_(t){if(t.duration<vr){this.logger_(`Ignoring segment's throughput because its duration of ${t.duration} is less than the min to record ${vr}`);return}const o=this.throughput.rate,a=Date.now()-t.endOfAllRequests+1,i=Math.floor(t.byteLength/a*8*1e3);this.throughput.rate+=(i-o)/++this.throughput.count}addSegmentMetadataCue_(t){if(!this.segmentMetadataTrack_)return;const o=t.segment,a=o.start,i=o.end;if(!gg(a)||!gg(i))return;zs(a,i,this.segmentMetadataTrack_);const s=X.WebKitDataCue||X.VTTCue,l={custom:o.custom,dateTimeObject:o.dateTimeObject,dateTimeString:o.dateTimeString,programDateTime:o.programDateTime,bandwidth:t.playlist.attributes.BANDWIDTH,resolution:t.playlist.attributes.RESOLUTION,codecs:t.playlist.attributes.CODECS,byteLength:t.byteLength,uri:t.uri,timeline:t.timeline,playlist:t.playlist.id,start:a,end:i},r=JSON.stringify(l),u=new s(a,i,r);u.value=l,this.segmentMetadataTrack_.addCue(u)}}function Ho(){}const wy=function(n){return typeof n!="string"?n:n.replace(/./,t=>t.toUpperCase())},CK=["video","audio"],_m=(n,t)=>{const o=t[`${n}Buffer`];return o&&o.updating||t.queuePending[n]},kK=(n,t)=>{for(let o=0;o<t.length;o++){const a=t[o];if(a.type==="mediaSource")return null;if(a.type===n)return o}return null},Ui=(n,t)=>{if(t.queue.length===0)return;let o=0,a=t.queue[o];if(a.type==="mediaSource"){!t.updating()&&t.mediaSource.readyState!=="closed"&&(t.queue.shift(),a.action(t),a.doneFn&&a.doneFn(),Ui("audio",t),Ui("video",t));return}if(n!=="mediaSource"&&!(!t.ready()||t.mediaSource.readyState==="closed"||_m(n,t))){if(a.type!==n){if(o=kK(n,t.queue),o===null)return;a=t.queue[o]}if(t.queue.splice(o,1),t.queuePending[n]=a,a.action(n,t),!a.doneFn){t.queuePending[n]=null,Ui(n,t);return}}},xy=(n,t)=>{const o=t[`${n}Buffer`],a=wy(n);o&&(o.removeEventListener("updateend",t[`on${a}UpdateEnd_`]),o.removeEventListener("error",t[`on${a}Error_`]),t.codecs[n]=null,t[`${n}Buffer`]=null)},Vo=(n,t)=>n&&t&&Array.prototype.indexOf.call(n.sourceBuffers,t)!==-1,Mn={appendBuffer:(n,t,o)=>(a,i)=>{const s=i[`${a}Buffer`];if(Vo(i.mediaSource,s)){i.logger_(`Appending segment ${t.mediaIndex}'s ${n.length} bytes to ${a}Buffer`);try{s.appendBuffer(n)}catch(l){i.logger_(`Error with code ${l.code} `+(l.code===Y1?"(QUOTA_EXCEEDED_ERR) ":"")+`when appending segment ${t.mediaIndex} to ${a}Buffer`),i.queuePending[a]=null,o(l)}}},remove:(n,t)=>(o,a)=>{const i=a[`${o}Buffer`];if(Vo(a.mediaSource,i)){a.logger_(`Removing ${n} to ${t} from ${o}Buffer`);try{i.remove(n,t)}catch{a.logger_(`Remove ${n} to ${t} from ${o}Buffer failed`)}}},timestampOffset:n=>(t,o)=>{const a=o[`${t}Buffer`];Vo(o.mediaSource,a)&&(o.logger_(`Setting ${t}timestampOffset to ${n}`),a.timestampOffset=n)},callback:n=>(t,o)=>{n()},endOfStream:n=>t=>{if(t.mediaSource.readyState==="open"){t.logger_(`Calling mediaSource endOfStream(${n||""})`);try{t.mediaSource.endOfStream(n)}catch(o){ie.log.warn("Failed to call media source endOfStream",o)}}},duration:n=>t=>{t.logger_(`Setting mediaSource duration to ${n}`);try{t.mediaSource.duration=n}catch(o){ie.log.warn("Failed to set media source duration",o)}},abort:()=>(n,t)=>{if(t.mediaSource.readyState!=="open")return;const o=t[`${n}Buffer`];if(Vo(t.mediaSource,o)){t.logger_(`calling abort on ${n}Buffer`);try{o.abort()}catch(a){ie.log.warn(`Failed to abort on ${n}Buffer`,a)}}},addSourceBuffer:(n,t)=>o=>{const a=wy(n),i=Fi(t);o.logger_(`Adding ${n}Buffer with codec ${t} to mediaSource`);const s=o.mediaSource.addSourceBuffer(i);s.addEventListener("updateend",o[`on${a}UpdateEnd_`]),s.addEventListener("error",o[`on${a}Error_`]),o.codecs[n]=t,o[`${n}Buffer`]=s},removeSourceBuffer:n=>t=>{const o=t[`${n}Buffer`];if(xy(n,t),!!Vo(t.mediaSource,o)){t.logger_(`Removing ${n}Buffer with codec ${t.codecs[n]} from mediaSource`);try{t.mediaSource.removeSourceBuffer(o)}catch(a){ie.log.warn(`Failed to removeSourceBuffer ${n}Buffer`,a)}}},changeType:n=>(t,o)=>{const a=o[`${t}Buffer`],i=Fi(n);if(!Vo(o.mediaSource,a))return;const s=n.substring(0,n.indexOf(".")),l=o.codecs[t];if(l.substring(0,l.indexOf("."))===s)return;const u={codecsChangeInfo:{from:l,to:n}};o.trigger({type:"codecschange",metadata:u}),o.logger_(`changing ${t}Buffer codec from ${l} to ${n}`);try{a.changeType(i),o.codecs[t]=n}catch(c){u.errorType=ie.Error.StreamingCodecsChangeError,u.error=c,c.metadata=u,o.error_=c,o.trigger("error"),ie.log.warn(`Failed to changeType on ${t}Buffer`,c)}}},Un=({type:n,sourceUpdater:t,action:o,doneFn:a,name:i})=>{t.queue.push({type:n,action:o,doneFn:a,name:i}),Ui(n,t)},_g=(n,t)=>o=>{const a=t[`${n}Buffered`](),i=MX(a);if(t.logger_(`received "updateend" event for ${n} Source Buffer: `,i),t.queuePending[n]){const s=t.queuePending[n].doneFn;t.queuePending[n]=null,s&&s(t[`${n}Error_`])}Ui(n,t)};class Vy extends ie.EventTarget{constructor(t){super(),this.mediaSource=t,this.sourceopenListener_=()=>Ui("mediaSource",this),this.mediaSource.addEventListener("sourceopen",this.sourceopenListener_),this.logger_=so("SourceUpdater"),this.audioTimestampOffset_=0,this.videoTimestampOffset_=0,this.queue=[],this.queuePending={audio:null,video:null},this.delayedAudioAppendQueue_=[],this.videoAppendQueued_=!1,this.codecs={},this.onVideoUpdateEnd_=_g("video",this),this.onAudioUpdateEnd_=_g("audio",this),this.onVideoError_=o=>{this.videoError_=o},this.onAudioError_=o=>{this.audioError_=o},this.createdSourceBuffers_=!1,this.initializedEme_=!1,this.triggeredReady_=!1}initializedEme(){this.initializedEme_=!0,this.triggerReady()}hasCreatedSourceBuffers(){return this.createdSourceBuffers_}hasInitializedAnyEme(){return this.initializedEme_}ready(){return this.hasCreatedSourceBuffers()&&this.hasInitializedAnyEme()}createSourceBuffers(t){this.hasCreatedSourceBuffers()||(this.addOrChangeSourceBuffers(t),this.createdSourceBuffers_=!0,this.trigger("createdsourcebuffers"),this.triggerReady())}triggerReady(){this.ready()&&!this.triggeredReady_&&(this.triggeredReady_=!0,this.trigger("ready"))}addSourceBuffer(t,o){Un({type:"mediaSource",sourceUpdater:this,action:Mn.addSourceBuffer(t,o),name:"addSourceBuffer"})}abort(t){Un({type:t,sourceUpdater:this,action:Mn.abort(t),name:"abort"})}removeSourceBuffer(t){if(!this.canRemoveSourceBuffer()){ie.log.error("removeSourceBuffer is not supported!");return}Un({type:"mediaSource",sourceUpdater:this,action:Mn.removeSourceBuffer(t),name:"removeSourceBuffer"})}canRemoveSourceBuffer(){return!ie.browser.IS_FIREFOX&&X.MediaSource&&X.MediaSource.prototype&&typeof X.MediaSource.prototype.removeSourceBuffer=="function"}static canChangeType(){return X.SourceBuffer&&X.SourceBuffer.prototype&&typeof X.SourceBuffer.prototype.changeType=="function"}canChangeType(){return this.constructor.canChangeType()}changeType(t,o){if(!this.canChangeType()){ie.log.error("changeType is not supported!");return}Un({type:t,sourceUpdater:this,action:Mn.changeType(o),name:"changeType"})}addOrChangeSourceBuffers(t){if(!t||typeof t!="object"||Object.keys(t).length===0)throw new Error("Cannot addOrChangeSourceBuffers to undefined codecs");Object.keys(t).forEach(o=>{const a=t[o];if(!this.hasCreatedSourceBuffers())return this.addSourceBuffer(o,a);this.canChangeType()&&this.changeType(o,a)})}appendBuffer(t,o){const{segmentInfo:a,type:i,bytes:s}=t;if(this.processedAppend_=!0,i==="audio"&&this.videoBuffer&&!this.videoAppendQueued_){this.delayedAudioAppendQueue_.push([t,o]),this.logger_(`delayed audio append of ${s.length} until video append`);return}const l=o;if(Un({type:i,sourceUpdater:this,action:Mn.appendBuffer(s,a||{mediaIndex:-1},l),doneFn:o,name:"appendBuffer"}),i==="video"){if(this.videoAppendQueued_=!0,!this.delayedAudioAppendQueue_.length)return;const r=this.delayedAudioAppendQueue_.slice();this.logger_(`queuing delayed audio ${r.length} appendBuffers`),this.delayedAudioAppendQueue_.length=0,r.forEach(u=>{this.appendBuffer.apply(this,u)})}}audioBuffered(){return Vo(this.mediaSource,this.audioBuffer)&&this.audioBuffer.buffered?this.audioBuffer.buffered:Wt()}videoBuffered(){return Vo(this.mediaSource,this.videoBuffer)&&this.videoBuffer.buffered?this.videoBuffer.buffered:Wt()}buffered(){const t=Vo(this.mediaSource,this.videoBuffer)?this.videoBuffer:null,o=Vo(this.mediaSource,this.audioBuffer)?this.audioBuffer:null;return o&&!t?this.audioBuffered():t&&!o?this.videoBuffered():RX(this.audioBuffered(),this.videoBuffered())}setDuration(t,o=Ho){Un({type:"mediaSource",sourceUpdater:this,action:Mn.duration(t),name:"duration",doneFn:o})}endOfStream(t=null,o=Ho){typeof t!="string"&&(t=void 0),Un({type:"mediaSource",sourceUpdater:this,action:Mn.endOfStream(t),name:"endOfStream",doneFn:o})}removeAudio(t,o,a=Ho){if(!this.audioBuffered().length||this.audioBuffered().end(0)===0){a();return}Un({type:"audio",sourceUpdater:this,action:Mn.remove(t,o),doneFn:a,name:"remove"})}removeVideo(t,o,a=Ho){if(!this.videoBuffered().length||this.videoBuffered().end(0)===0){a();return}Un({type:"video",sourceUpdater:this,action:Mn.remove(t,o),doneFn:a,name:"remove"})}updating(){return!!(_m("audio",this)||_m("video",this))}audioTimestampOffset(t){return typeof t<"u"&&this.audioBuffer&&this.audioTimestampOffset_!==t&&(Un({type:"audio",sourceUpdater:this,action:Mn.timestampOffset(t),name:"timestampOffset"}),this.audioTimestampOffset_=t),this.audioTimestampOffset_}videoTimestampOffset(t){return typeof t<"u"&&this.videoBuffer&&this.videoTimestampOffset_!==t&&(Un({type:"video",sourceUpdater:this,action:Mn.timestampOffset(t),name:"timestampOffset"}),this.videoTimestampOffset_=t),this.videoTimestampOffset_}audioQueueCallback(t){this.audioBuffer&&Un({type:"audio",sourceUpdater:this,action:Mn.callback(t),name:"callback"})}videoQueueCallback(t){this.videoBuffer&&Un({type:"video",sourceUpdater:this,action:Mn.callback(t),name:"callback"})}dispose(){this.trigger("dispose"),CK.forEach(t=>{this.abort(t),this.canRemoveSourceBuffer()?this.removeSourceBuffer(t):this[`${t}QueueCallback`](()=>xy(t,this))}),this.videoAppendQueued_=!1,this.delayedAudioAppendQueue_.length=0,this.sourceopenListener_&&this.mediaSource.removeEventListener("sourceopen",this.sourceopenListener_),this.off()}}const bg=n=>decodeURIComponent(escape(String.fromCharCode.apply(null,n))),EK=n=>{const t=new Uint8Array(n);return Array.from(t).map(o=>o.toString(16).padStart(2,"0")).join("")},wg=new Uint8Array(`
|
|
235
|
+
|
|
236
|
+
`.split("").map(n=>n.charCodeAt(0)));class TK extends Error{constructor(){super("Trying to parse received VTT cues, but there is no WebVTT. Make sure vtt.js is loaded.")}}class NK extends ym{constructor(t,o={}){super(t,o),this.mediaSource_=null,this.subtitlesTrack_=null,this.featuresNativeTextTracks_=t.featuresNativeTextTracks,this.loadVttJs=t.loadVttJs,this.shouldSaveSegmentTimingInfo_=!1}buffered_(){if(!this.subtitlesTrack_||!this.subtitlesTrack_.cues||!this.subtitlesTrack_.cues.length)return Wt();const t=this.subtitlesTrack_.cues,o=t[0].startTime,a=t[t.length-1].startTime;return Wt([[o,a]])}initSegmentForMap(t,o=!1){if(!t)return null;const a=od(t);let i=this.initSegments_[a];if(o&&!i&&t.bytes){const s=wg.byteLength+t.bytes.byteLength,l=new Uint8Array(s);l.set(t.bytes),l.set(wg,t.bytes.byteLength),this.initSegments_[a]=i={resolvedUri:t.resolvedUri,byterange:t.byterange,bytes:l}}return i||t}couldBeginLoading_(){return this.playlist_&&this.subtitlesTrack_&&!this.paused()}init_(){return this.state="READY",this.resetEverything(),this.monitorBuffer_()}track(t){return typeof t>"u"?this.subtitlesTrack_:(this.subtitlesTrack_=t,this.state==="INIT"&&this.couldBeginLoading_()&&this.init_(),this.subtitlesTrack_)}remove(t,o){zs(t,o,this.subtitlesTrack_)}fillBuffer_(){const t=this.chooseNextRequest_();if(t){if(this.syncController_.timestampOffsetForTimeline(t.timeline)===null){const o=()=>{this.state="READY",this.paused()||this.monitorBuffer_()};this.syncController_.one("timestampoffset",o),this.state="WAITING_ON_TIMELINE";return}this.loadSegment_(t)}}timestampOffsetForSegment_(){return null}chooseNextRequest_(){return this.skipEmptySegments_(super.chooseNextRequest_())}skipEmptySegments_(t){for(;t&&t.segment.empty;){if(t.mediaIndex+1>=t.playlist.segments.length){t=null;break}t=this.generateSegmentInfo_({playlist:t.playlist,mediaIndex:t.mediaIndex+1,startOfSegment:t.startOfSegment+t.duration,isSyncRequest:t.isSyncRequest})}return t}stopForError(t){this.error(t),this.state="READY",this.pause(),this.trigger("error")}segmentRequestFinished_(t,o,a){if(!this.subtitlesTrack_){this.state="READY";return}if(this.saveTransferStats_(o.stats),!this.pendingSegment_){this.state="READY",this.mediaRequestsAborted+=1;return}if(t){t.code===No.TIMEOUT&&this.handleTimeout_(),t.code===No.ABORTED?this.mediaRequestsAborted+=1:this.mediaRequestsErrored+=1,this.stopForError(t);return}const i=this.pendingSegment_,s=a.mp4VttCues&&a.mp4VttCues.length;s&&(i.mp4VttCues=a.mp4VttCues),this.saveBandwidthRelatedStats_(i.duration,o.stats),o.key&&this.segmentKey(o.key,!0),this.state="APPENDING",this.trigger("appending");const l=i.segment;if(l.map&&(l.map.bytes=o.map.bytes),i.bytes=o.bytes,typeof X.WebVTT!="function"&&typeof this.loadVttJs=="function"){this.state="WAITING_ON_VTTJS",this.loadVttJs().then(()=>this.segmentRequestFinished_(t,o,a),()=>this.stopForError({message:"Error loading vtt.js"}));return}l.requested=!0;try{this.parseVTTCues_(i)}catch(r){this.stopForError({message:r.message,metadata:{errorType:ie.Error.StreamingVttParserError,error:r}});return}if(s||this.updateTimeMapping_(i,this.syncController_.timelines[i.timeline],this.playlist_),i.cues.length?i.timingInfo={start:i.cues[0].startTime,end:i.cues[i.cues.length-1].endTime}:i.timingInfo={start:i.startOfSegment,end:i.startOfSegment+i.duration},i.isSyncRequest){this.trigger("syncinfoupdate"),this.pendingSegment_=null,this.state="READY";return}i.byteLength=i.bytes.byteLength,this.mediaSecondsLoaded+=l.duration,i.cues.forEach(r=>{this.subtitlesTrack_.addCue(this.featuresNativeTextTracks_?new X.VTTCue(r.startTime,r.endTime,r.text):r)}),uK(this.subtitlesTrack_),this.handleAppendsDone_()}handleData_(t,o){const a=t&&t.type==="vtt",i=o&&o.type==="text";a&&i&&super.handleData_(t,o)}updateTimingInfoEnd_(){}parseMp4VttCues_(t){const o=this.sourceUpdater_.videoTimestampOffset()===null?this.sourceUpdater_.audioTimestampOffset():this.sourceUpdater_.videoTimestampOffset();t.mp4VttCues.forEach(a=>{const i=a.start+o,s=a.end+o,l=new X.VTTCue(i,s,a.cueText);a.settings&&a.settings.split(" ").forEach(r=>{const u=r.split(":"),c=u[0],f=u[1];l[c]=isNaN(f)?f:Number(f)}),t.cues.push(l)})}parseVTTCues_(t){let o,a=!1;if(typeof X.WebVTT!="function")throw new TK;if(t.cues=[],t.timestampmap={MPEGTS:0,LOCAL:0},t.mp4VttCues){this.parseMp4VttCues_(t);return}typeof X.TextDecoder=="function"?o=new X.TextDecoder("utf8"):(o=X.WebVTT.StringDecoder(),a=!0);const i=new X.WebVTT.Parser(X,X.vttjs,o);if(i.oncue=t.cues.push.bind(t.cues),i.ontimestampmap=l=>{t.timestampmap=l},i.onparsingerror=l=>{ie.log.warn("Error encountered when parsing cues: "+l.message)},t.segment.map){let l=t.segment.map.bytes;a&&(l=bg(l)),i.parse(l)}let s=t.bytes;a&&(s=bg(s)),i.parse(s),i.flush()}updateTimeMapping_(t,o,a){const i=t.segment;if(!o)return;if(!t.cues.length){i.empty=!0;return}const{MPEGTS:s,LOCAL:l}=t.timestampmap,u=s/Ua.ONE_SECOND_IN_TS-l+o.mapping;if(t.cues.forEach(c=>{const f=c.endTime-c.startTime,m=this.handleRollover_(c.startTime+u,o.time);c.startTime=Math.max(m,0),c.endTime=Math.max(m+f,0)}),!a.syncInfo){const c=t.cues[0].startTime,f=t.cues[t.cues.length-1].startTime;a.syncInfo={mediaSequence:a.mediaSequence+t.mediaIndex,time:Math.min(c,f-i.duration)}}}handleRollover_(t,o){if(o===null)return t;let a=t*Ua.ONE_SECOND_IN_TS;const i=o*Ua.ONE_SECOND_IN_TS;let s;for(i<a?s=-8589934592:s=8589934592;Math.abs(a-i)>4294967296;)a+=s;return a/Ua.ONE_SECOND_IN_TS}}const SK=function(n,t){const o=n.cues;for(let a=0;a<o.length;a++){const i=o[a];if(t>=i.adStartTime&&t<=i.adEndTime)return i}return null},BK=function(n,t,o=0){if(!n.segments)return;let a=o,i;for(let s=0;s<n.segments.length;s++){const l=n.segments[s];if(i||(i=SK(t,a+l.duration/2)),i){if("cueIn"in l){i.endTime=a,i.adEndTime=a,a+=l.duration,i=null;continue}if(a<i.endTime){a+=l.duration;continue}i.endTime+=l.duration}else if("cueOut"in l&&(i=new X.VTTCue(a,a+l.duration,l.cueOut),i.adStartTime=a,i.adEndTime=a+parseFloat(l.cueOut),t.addCue(i)),"cueOutCont"in l){const[r,u]=l.cueOutCont.split("/").map(parseFloat);i=new X.VTTCue(a,a+l.duration,""),i.adStartTime=a-r,i.adEndTime=i.adStartTime+u,t.addCue(i)}a+=l.duration}};class xg{constructor({start:t,end:o,segmentIndex:a,partIndex:i=null,appended:s=!1}){this.start_=t,this.end_=o,this.segmentIndex_=a,this.partIndex_=i,this.appended_=s}isInRange(t){return t>=this.start&&t<this.end}markAppended(){this.appended_=!0}resetAppendedStatus(){this.appended_=!1}get isAppended(){return this.appended_}get start(){return this.start_}get end(){return this.end_}get segmentIndex(){return this.segmentIndex_}get partIndex(){return this.partIndex_}}class DK{constructor(t,o=[]){this.segmentSyncInfo_=t,this.partsSyncInfo_=o}get segmentSyncInfo(){return this.segmentSyncInfo_}get partsSyncInfo(){return this.partsSyncInfo_}get hasPartsSyncInfo(){return this.partsSyncInfo_.length>0}resetAppendStatus(){this.segmentSyncInfo_.resetAppendedStatus(),this.partsSyncInfo_.forEach(t=>t.resetAppendedStatus())}}class Cy{constructor(){this.storage_=new Map,this.diagnostics_="",this.isReliable_=!1,this.start_=-1/0,this.end_=1/0}get start(){return this.start_}get end(){return this.end_}get diagnostics(){return this.diagnostics_}get isReliable(){return this.isReliable_}resetAppendedStatus(){this.storage_.forEach(t=>t.resetAppendStatus())}update(t,o){const{mediaSequence:a,segments:i}=t;if(this.isReliable_=this.isReliablePlaylist_(a,i),!!this.isReliable_)return this.updateStorage_(i,a,this.calculateBaseTime_(a,i,o))}getSyncInfoForTime(t){for(const{segmentSyncInfo:o,partsSyncInfo:a}of this.storage_.values())if(a.length){for(const i of a)if(i.isInRange(t))return i}else if(o.isInRange(t))return o;return null}getSyncInfoForMediaSequence(t){return this.storage_.get(t)}updateStorage_(t,o,a){const i=new Map;let s=`
|
|
237
|
+
`,l=a,r=o;this.start_=l,t.forEach((u,c)=>{const f=this.storage_.get(r),m=l,d=m+u.duration,h=!!(f&&f.segmentSyncInfo&&f.segmentSyncInfo.isAppended),g=new xg({start:m,end:d,appended:h,segmentIndex:c});u.syncInfo=g;let p=l;const b=(u.parts||[]).map((_,w)=>{const v=p,V=p+_.duration,C=!!(f&&f.partsSyncInfo&&f.partsSyncInfo[w]&&f.partsSyncInfo[w].isAppended),S=new xg({start:v,end:V,appended:C,segmentIndex:c,partIndex:w});return p=V,s+=`Media Sequence: ${r}.${w} | Range: ${v} --> ${V} | Appended: ${C}
|
|
238
|
+
`,_.syncInfo=S,S});i.set(r,new DK(g,b)),s+=`${by(u.resolvedUri)} | Media Sequence: ${r} | Range: ${m} --> ${d} | Appended: ${h}
|
|
239
|
+
`,r++,l=d}),this.end_=l,this.storage_=i,this.diagnostics_=s}calculateBaseTime_(t,o,a){if(!this.storage_.size)return 0;if(this.storage_.has(t))return this.storage_.get(t).segmentSyncInfo.start;const i=Math.min(...this.storage_.keys());if(t<i){const s=i-t;let l=this.storage_.get(i).segmentSyncInfo.start;for(let r=0;r<s;r++){const u=o[r];l-=u.duration}return l}return a}isReliablePlaylist_(t,o){return t!=null&&Array.isArray(o)&&o.length}}class Vg extends Cy{constructor(t){super(),this.parent_=t}calculateBaseTime_(t,o,a){if(!this.storage_.size){const i=this.parent_.getSyncInfoForMediaSequence(t);return i?i.segmentSyncInfo.start:0}return super.calculateBaseTime_(t,o,a)}}const PK=86400,Sc=[{name:"VOD",run:(n,t,o,a,i)=>o!==1/0?{time:0,segmentIndex:0,partIndex:null}:null},{name:"MediaSequence",run:(n,t,o,a,i,s)=>{const l=n.getMediaSequenceSync(s);if(!l||!l.isReliable)return null;const r=l.getSyncInfoForTime(i);return r?{time:r.start,partIndex:r.partIndex,segmentIndex:r.segmentIndex}:null}},{name:"ProgramDateTime",run:(n,t,o,a,i)=>{if(!Object.keys(n.timelineToDatetimeMappings).length)return null;let s=null,l=null;const r=dm(t);i=i||0;for(let u=0;u<r.length;u++){const c=t.endList||i===0?u:r.length-(u+1),f=r[c],m=f.segment,d=n.timelineToDatetimeMappings[m.timeline];if(!d||!m.dateTimeObject)continue;let g=m.dateTimeObject.getTime()/1e3+d;if(m.parts&&typeof f.partIndex=="number")for(let b=0;b<f.partIndex;b++)g+=m.parts[b].duration;const p=Math.abs(i-g);if(l!==null&&(p===0||l<p))break;l=p,s={time:g,segmentIndex:f.segmentIndex,partIndex:f.partIndex}}return s}},{name:"Segment",run:(n,t,o,a,i)=>{let s=null,l=null;i=i||0;const r=dm(t);for(let u=0;u<r.length;u++){const c=t.endList||i===0?u:r.length-(u+1),f=r[c],m=f.segment,d=f.part&&f.part.start||m&&m.start;if(m.timeline===a&&typeof d<"u"){const h=Math.abs(i-d);if(l!==null&&l<h)break;(!s||l===null||l>=h)&&(l=h,s={time:d,segmentIndex:f.segmentIndex,partIndex:f.partIndex})}}return s}},{name:"Discontinuity",run:(n,t,o,a,i)=>{let s=null;if(i=i||0,t.discontinuityStarts&&t.discontinuityStarts.length){let l=null;for(let r=0;r<t.discontinuityStarts.length;r++){const u=t.discontinuityStarts[r],c=t.discontinuitySequence+r+1,f=n.discontinuities[c];if(f){const m=Math.abs(i-f.time);if(l!==null&&l<m)break;(!s||l===null||l>=m)&&(l=m,s={time:f.time,segmentIndex:u,partIndex:null})}}}return s}},{name:"Playlist",run:(n,t,o,a,i)=>t.syncInfo?{time:t.syncInfo.time,segmentIndex:t.syncInfo.mediaSequence-t.mediaSequence,partIndex:null}:null}];class $K extends ie.EventTarget{constructor(t={}){super(),this.timelines=[],this.discontinuities=[],this.timelineToDatetimeMappings={};const o=new Cy,a=new Vg(o),i=new Vg(o);this.mediaSequenceStorage_={main:o,audio:a,vtt:i},this.logger_=so("SyncController")}getMediaSequenceSync(t){return this.mediaSequenceStorage_[t]||null}getSyncPoint(t,o,a,i,s){if(o!==1/0)return Sc.find(({name:u})=>u==="VOD").run(this,t,o);const l=this.runStrategies_(t,o,a,i,s);if(!l.length)return null;for(const r of l){const{syncPoint:u,strategy:c}=r,{segmentIndex:f,time:m}=u;if(f<0)continue;const d=t.segments[f],h=m,g=h+d.duration;if(this.logger_(`Strategy: ${c}. Current time: ${i}. selected segment: ${f}. Time: [${h} -> ${g}]}`),i>=h&&i<g)return this.logger_("Found sync point with exact match: ",u),u}return this.selectSyncPoint_(l,{key:"time",value:i})}getExpiredTime(t,o){if(!t||!t.segments)return null;const a=this.runStrategies_(t,o,t.discontinuitySequence,0);if(!a.length)return null;const i=this.selectSyncPoint_(a,{key:"segmentIndex",value:0});return i.segmentIndex>0&&(i.time*=-1),Math.abs(i.time+sl({defaultDuration:t.targetDuration,durationList:t.segments,startIndex:i.segmentIndex,endIndex:0}))}runStrategies_(t,o,a,i,s){const l=[];for(let r=0;r<Sc.length;r++){const u=Sc[r],c=u.run(this,t,o,a,i,s);c&&(c.strategy=u.name,l.push({strategy:u.name,syncPoint:c}))}return l}selectSyncPoint_(t,o){let a=t[0].syncPoint,i=Math.abs(t[0].syncPoint[o.key]-o.value),s=t[0].strategy;for(let l=1;l<t.length;l++){const r=Math.abs(t[l].syncPoint[o.key]-o.value);r<i&&(i=r,a=t[l].syncPoint,s=t[l].strategy)}return this.logger_(`syncPoint for [${o.key}: ${o.value}] chosen with strategy [${s}]: [time:${a.time}, segmentIndex:${a.segmentIndex}`+(typeof a.partIndex=="number"?`,partIndex:${a.partIndex}`:"")+"]"),a}saveExpiredSegmentInfo(t,o){const a=o.mediaSequence-t.mediaSequence;if(a>PK){ie.log.warn(`Not saving expired segment info. Media sequence gap ${a} is too large.`);return}for(let i=a-1;i>=0;i--){const s=t.segments[i];if(s&&typeof s.start<"u"){o.syncInfo={mediaSequence:t.mediaSequence+i,time:s.start},this.logger_(`playlist refresh sync: [time:${o.syncInfo.time}, mediaSequence: ${o.syncInfo.mediaSequence}]`),this.trigger("syncinfoupdate");break}}}setDateTimeMappingForStart(t){if(this.timelineToDatetimeMappings={},t.segments&&t.segments.length&&t.segments[0].dateTimeObject){const o=t.segments[0],a=o.dateTimeObject.getTime()/1e3;this.timelineToDatetimeMappings[o.timeline]=-a}}saveSegmentTimingInfo({segmentInfo:t,shouldSaveTimelineMapping:o}){const a=this.calculateSegmentTimeMapping_(t,t.timingInfo,o),i=t.segment;a&&(this.saveDiscontinuitySyncInfo_(t),t.playlist.syncInfo||(t.playlist.syncInfo={mediaSequence:t.playlist.mediaSequence+t.mediaIndex,time:i.start}));const s=i.dateTimeObject;i.discontinuity&&o&&s&&(this.timelineToDatetimeMappings[i.timeline]=-(s.getTime()/1e3))}timestampOffsetForTimeline(t){return typeof this.timelines[t]>"u"?null:this.timelines[t].time}mappingForTimeline(t){return typeof this.timelines[t]>"u"?null:this.timelines[t].mapping}calculateSegmentTimeMapping_(t,o,a){const i=t.segment,s=t.part;let l=this.timelines[t.timeline],r,u;if(typeof t.timestampOffset=="number")l={time:t.startOfSegment,mapping:t.startOfSegment-o.start},a&&(this.timelines[t.timeline]=l,this.trigger("timestampoffset"),this.logger_(`time mapping for timeline ${t.timeline}: [time: ${l.time}] [mapping: ${l.mapping}]`)),r=t.startOfSegment,u=o.end+l.mapping;else if(l)r=o.start+l.mapping,u=o.end+l.mapping;else return!1;return s&&(s.start=r,s.end=u),(!i.start||r<i.start)&&(i.start=r),i.end=u,!0}saveDiscontinuitySyncInfo_(t){const o=t.playlist,a=t.segment;if(a.discontinuity)this.discontinuities[a.timeline]={time:a.start,accuracy:0};else if(o.discontinuityStarts&&o.discontinuityStarts.length)for(let i=0;i<o.discontinuityStarts.length;i++){const s=o.discontinuityStarts[i],l=o.discontinuitySequence+i+1,r=s-t.mediaIndex,u=Math.abs(r);if(!this.discontinuities[l]||this.discontinuities[l].accuracy>u){let c;r<0?c=a.start-sl({defaultDuration:o.targetDuration,durationList:o.segments,startIndex:t.mediaIndex,endIndex:s}):c=a.end+sl({defaultDuration:o.targetDuration,durationList:o.segments,startIndex:t.mediaIndex+1,endIndex:s}),this.discontinuities[l]={time:c,accuracy:u}}}}dispose(){this.trigger("dispose"),this.off()}}class AK extends ie.EventTarget{constructor(){super(),this.pendingTimelineChanges_={},this.lastTimelineChanges_={}}clearPendingTimelineChange(t){this.pendingTimelineChanges_[t]=null,this.trigger("pendingtimelinechange")}pendingTimelineChange({type:t,from:o,to:a}){return typeof o=="number"&&typeof a=="number"&&(this.pendingTimelineChanges_[t]={type:t,from:o,to:a},this.trigger("pendingtimelinechange")),this.pendingTimelineChanges_[t]}lastTimelineChange({type:t,from:o,to:a}){if(typeof o=="number"&&typeof a=="number"){this.lastTimelineChanges_[t]={type:t,from:o,to:a},delete this.pendingTimelineChanges_[t];const i={timelineChangeInfo:{from:o,to:a}};this.trigger({type:"timelinechange",metadata:i})}return this.lastTimelineChanges_[t]}dispose(){this.trigger("dispose"),this.pendingTimelineChanges_={},this.lastTimelineChanges_={},this.off()}}const LK=dy(uy(function(){var n=function(){function p(){this.listeners={}}var b=p.prototype;return b.on=function(w,v){this.listeners[w]||(this.listeners[w]=[]),this.listeners[w].push(v)},b.off=function(w,v){if(!this.listeners[w])return!1;var V=this.listeners[w].indexOf(v);return this.listeners[w]=this.listeners[w].slice(0),this.listeners[w].splice(V,1),V>-1},b.trigger=function(w){var v=this.listeners[w];if(v)if(arguments.length===2)for(var V=v.length,C=0;C<V;++C)v[C].call(this,arguments[1]);else for(var S=Array.prototype.slice.call(arguments,1),N=v.length,D=0;D<N;++D)v[D].apply(this,S)},b.dispose=function(){this.listeners={}},b.pipe=function(w){this.on("data",function(v){w.push(v)})},p}();/*! @name pkcs7 @version 1.0.4 @license Apache-2.0 */function t(p){return p.subarray(0,p.byteLength-p[p.byteLength-1])}/*! @name aes-decrypter @version 4.0.2 @license Apache-2.0 */const o=function(){const p=[[[],[],[],[],[]],[[],[],[],[],[]]],b=p[0],_=p[1],w=b[4],v=_[4];let V,C,S;const N=[],D=[];let $,k,A,B,I,z;for(V=0;V<256;V++)D[(N[V]=V<<1^(V>>7)*283)^V]=V;for(C=S=0;!w[C];C^=$||1,S=D[S]||1)for(B=S^S<<1^S<<2^S<<3^S<<4,B=B>>8^B&255^99,w[C]=B,v[B]=C,A=N[k=N[$=N[C]]],z=A*16843009^k*65537^$*257^C*16843008,I=N[B]*257^B*16843008,V=0;V<4;V++)b[V][C]=I=I<<24^I>>>8,_[V][B]=z=z<<24^z>>>8;for(V=0;V<5;V++)b[V]=b[V].slice(0),_[V]=_[V].slice(0);return p};let a=null;class i{constructor(b){a||(a=o()),this._tables=[[a[0][0].slice(),a[0][1].slice(),a[0][2].slice(),a[0][3].slice(),a[0][4].slice()],[a[1][0].slice(),a[1][1].slice(),a[1][2].slice(),a[1][3].slice(),a[1][4].slice()]];let _,w,v;const V=this._tables[0][4],C=this._tables[1],S=b.length;let N=1;if(S!==4&&S!==6&&S!==8)throw new Error("Invalid aes key size");const D=b.slice(0),$=[];for(this._key=[D,$],_=S;_<4*S+28;_++)v=D[_-1],(_%S===0||S===8&&_%S===4)&&(v=V[v>>>24]<<24^V[v>>16&255]<<16^V[v>>8&255]<<8^V[v&255],_%S===0&&(v=v<<8^v>>>24^N<<24,N=N<<1^(N>>7)*283)),D[_]=D[_-S]^v;for(w=0;_;w++,_--)v=D[w&3?_:_-4],_<=4||w<4?$[w]=v:$[w]=C[0][V[v>>>24]]^C[1][V[v>>16&255]]^C[2][V[v>>8&255]]^C[3][V[v&255]]}decrypt(b,_,w,v,V,C){const S=this._key[1];let N=b^S[0],D=v^S[1],$=w^S[2],k=_^S[3],A,B,I;const z=S.length/4-2;let Y,H=4;const q=this._tables[1],O=q[0],J=q[1],F=q[2],M=q[3],Q=q[4];for(Y=0;Y<z;Y++)A=O[N>>>24]^J[D>>16&255]^F[$>>8&255]^M[k&255]^S[H],B=O[D>>>24]^J[$>>16&255]^F[k>>8&255]^M[N&255]^S[H+1],I=O[$>>>24]^J[k>>16&255]^F[N>>8&255]^M[D&255]^S[H+2],k=O[k>>>24]^J[N>>16&255]^F[D>>8&255]^M[$&255]^S[H+3],H+=4,N=A,D=B,$=I;for(Y=0;Y<4;Y++)V[(3&-Y)+C]=Q[N>>>24]<<24^Q[D>>16&255]<<16^Q[$>>8&255]<<8^Q[k&255]^S[H++],A=N,N=D,D=$,$=k,k=A}}class s extends n{constructor(){super(n),this.jobs=[],this.delay=1,this.timeout_=null}processJob_(){this.jobs.shift()(),this.jobs.length?this.timeout_=setTimeout(this.processJob_.bind(this),this.delay):this.timeout_=null}push(b){this.jobs.push(b),this.timeout_||(this.timeout_=setTimeout(this.processJob_.bind(this),this.delay))}}const l=function(p){return p<<24|(p&65280)<<8|(p&16711680)>>8|p>>>24},r=function(p,b,_){const w=new Int32Array(p.buffer,p.byteOffset,p.byteLength>>2),v=new i(Array.prototype.slice.call(b)),V=new Uint8Array(p.byteLength),C=new Int32Array(V.buffer);let S,N,D,$,k,A,B,I,z;for(S=_[0],N=_[1],D=_[2],$=_[3],z=0;z<w.length;z+=4)k=l(w[z]),A=l(w[z+1]),B=l(w[z+2]),I=l(w[z+3]),v.decrypt(k,A,B,I,C,z),C[z]=l(C[z]^S),C[z+1]=l(C[z+1]^N),C[z+2]=l(C[z+2]^D),C[z+3]=l(C[z+3]^$),S=k,N=A,D=B,$=I;return V};class u{constructor(b,_,w,v){const V=u.STEP,C=new Int32Array(b.buffer),S=new Uint8Array(b.byteLength);let N=0;for(this.asyncStream_=new s,this.asyncStream_.push(this.decryptChunk_(C.subarray(N,N+V),_,w,S)),N=V;N<C.length;N+=V)w=new Uint32Array([l(C[N-4]),l(C[N-3]),l(C[N-2]),l(C[N-1])]),this.asyncStream_.push(this.decryptChunk_(C.subarray(N,N+V),_,w,S));this.asyncStream_.push(function(){v(null,t(S))})}static get STEP(){return 32e3}decryptChunk_(b,_,w,v){return function(){const V=r(b,_,w);v.set(V,b.byteOffset)}}}var c=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},f;typeof window<"u"?f=window:typeof c<"u"?f=c:typeof self<"u"?f=self:f={};var m=f,d=function(b){return ArrayBuffer.isView==="function"?ArrayBuffer.isView(b):b&&b.buffer instanceof ArrayBuffer},h=m.BigInt||Number;h("0x1"),h("0x100"),h("0x10000"),h("0x1000000"),h("0x100000000"),h("0x10000000000"),h("0x1000000000000"),h("0x100000000000000"),h("0x10000000000000000"),function(){var p=new Uint16Array([65484]),b=new Uint8Array(p.buffer,p.byteOffset,p.byteLength);return b[0]===255?"big":b[0]===204?"little":"unknown"}();const g=function(p){const b={};return Object.keys(p).forEach(_=>{const w=p[_];d(w)?b[_]={bytes:w.buffer,byteOffset:w.byteOffset,byteLength:w.byteLength}:b[_]=w}),b};self.onmessage=function(p){const b=p.data,_=new Uint8Array(b.encrypted.bytes,b.encrypted.byteOffset,b.encrypted.byteLength),w=new Uint32Array(b.key.bytes,b.key.byteOffset,b.key.byteLength/4),v=new Uint32Array(b.iv.bytes,b.iv.byteOffset,b.iv.byteLength/4);new u(_,w,v,function(V,C){self.postMessage(g({source:b.source,decrypted:C}),[C.buffer])})}}));var IK=ry(LK);const OK=n=>{let t=n.default?"main":"alternative";return n.characteristics&&n.characteristics.indexOf("public.accessibility.describes-video")>=0&&(t="main-desc"),t},ky=(n,t)=>{n.abort(),n.pause(),t&&t.activePlaylistLoader&&(t.activePlaylistLoader.pause(),t.activePlaylistLoader=null)},bm=(n,t)=>{t.activePlaylistLoader=n,n.load()},MK=(n,t)=>()=>{const{segmentLoaders:{[n]:o,main:a},mediaTypes:{[n]:i}}=t,s=i.activeTrack(),l=i.getActiveGroup(),r=i.activePlaylistLoader,u=i.lastGroup_;if(!(l&&u&&l.id===u.id)&&(i.lastGroup_=l,i.lastTrack_=s,ky(o,i),!(!l||l.isMainPlaylist))){if(!l.playlistLoader){r&&a.resetEverything();return}o.resyncLoader(),bm(l.playlistLoader,i)}},UK=(n,t)=>()=>{const{segmentLoaders:{[n]:o},mediaTypes:{[n]:a}}=t;a.lastGroup_=null,o.abort(),o.pause()},RK=(n,t)=>()=>{const{mainPlaylistLoader:o,segmentLoaders:{[n]:a,main:i},mediaTypes:{[n]:s}}=t,l=s.activeTrack(),r=s.getActiveGroup(),u=s.activePlaylistLoader,c=s.lastTrack_;if(!(c&&l&&c.id===l.id)&&(s.lastGroup_=r,s.lastTrack_=l,ky(a,s),!!r)){if(r.isMainPlaylist){if(!l||!c||l.id===c.id)return;const f=t.vhs.playlistController_,m=f.selectPlaylist();if(f.media()===m)return;s.logger_(`track change. Switching main audio from ${c.id} to ${l.id}`),o.pause(),i.resetEverything(),f.fastQualityChange_(m);return}if(n==="AUDIO"){if(!r.playlistLoader){i.setAudio(!0),i.resetEverything();return}a.setAudio(!0),i.setAudio(!1)}if(u===r.playlistLoader){bm(r.playlistLoader,s);return}a.track&&a.track(l),a.resetEverything(),bm(r.playlistLoader,s)}},ad={AUDIO:(n,t)=>()=>{const{mediaTypes:{[n]:o},excludePlaylist:a}=t,i=o.activeTrack(),s=o.activeGroup(),l=(s.filter(u=>u.default)[0]||s[0]).id,r=o.tracks[l];if(i===r){a({error:{message:"Problem encountered loading the default audio track."}});return}ie.log.warn("Problem encountered loading the alternate audio track.Switching back to default.");for(const u in o.tracks)o.tracks[u].enabled=o.tracks[u]===r;o.onTrackChanged()},SUBTITLES:(n,t)=>()=>{const{mediaTypes:{[n]:o}}=t;ie.log.warn("Problem encountered loading the subtitle track.Disabling subtitle track.");const a=o.activeTrack();a&&(a.mode="disabled"),o.onTrackChanged()}},Cg={AUDIO:(n,t,o)=>{if(!t)return;const{tech:a,requestOptions:i,segmentLoaders:{[n]:s}}=o;t.on("loadedmetadata",()=>{const l=t.media();s.playlist(l,i),(!a.paused()||l.endList&&a.preload()!=="none")&&s.load()}),t.on("loadedplaylist",()=>{s.playlist(t.media(),i),a.paused()||s.load()}),t.on("error",ad[n](n,o))},SUBTITLES:(n,t,o)=>{const{tech:a,requestOptions:i,segmentLoaders:{[n]:s},mediaTypes:{[n]:l}}=o;t.on("loadedmetadata",()=>{const r=t.media();s.playlist(r,i),s.track(l.activeTrack()),(!a.paused()||r.endList&&a.preload()!=="none")&&s.load()}),t.on("loadedplaylist",()=>{s.playlist(t.media(),i),a.paused()||s.load()}),t.on("error",ad[n](n,o))}},FK={AUDIO:(n,t)=>{const{vhs:o,sourceType:a,segmentLoaders:{[n]:i},requestOptions:s,main:{mediaGroups:l},mediaTypes:{[n]:{groups:r,tracks:u,logger_:c}},mainPlaylistLoader:f}=t,m=Al(f.main);(!l[n]||Object.keys(l[n]).length===0)&&(l[n]={main:{default:{default:!0}}},m&&(l[n].main.default.playlists=f.main.playlists));for(const d in l[n]){r[d]||(r[d]=[]);for(const h in l[n][d]){let g=l[n][d][h],p;if(m?(c(`AUDIO group '${d}' label '${h}' is a main playlist`),g.isMainPlaylist=!0,p=null):a==="vhs-json"&&g.playlists?p=new Ei(g.playlists[0],o,s):g.resolvedUri?p=new Ei(g.resolvedUri,o,s):g.playlists&&a==="dash"?p=new fm(g.playlists[0],o,s,f):p=null,g=at({id:h,playlistLoader:p},g),Cg[n](n,g.playlistLoader,t),r[d].push(g),typeof u[h]>"u"){const b=new ie.AudioTrack({id:h,kind:OK(g),enabled:!1,language:g.language,default:g.default,label:h});u[h]=b}}}i.on("error",ad[n](n,t))},SUBTITLES:(n,t)=>{const{tech:o,vhs:a,sourceType:i,segmentLoaders:{[n]:s},requestOptions:l,main:{mediaGroups:r},mediaTypes:{[n]:{groups:u,tracks:c}},mainPlaylistLoader:f}=t;for(const m in r[n]){u[m]||(u[m]=[]);for(const d in r[n][m]){if(!a.options_.useForcedSubtitles&&r[n][m][d].forced)continue;let h=r[n][m][d],g;if(i==="hls")g=new Ei(h.resolvedUri,a,l);else if(i==="dash"){if(!h.playlists.filter(b=>b.excludeUntil!==1/0).length)return;g=new fm(h.playlists[0],a,l,f)}else i==="vhs-json"&&(g=new Ei(h.playlists?h.playlists[0]:h.resolvedUri,a,l));if(h=at({id:d,playlistLoader:g},h),Cg[n](n,h.playlistLoader,t),u[m].push(h),typeof c[d]>"u"){const p=o.addRemoteTextTrack({id:d,kind:"subtitles",default:h.default&&h.autoselect,language:h.language,label:d},!1).track;c[d]=p}}}s.on("error",ad[n](n,t))},"CLOSED-CAPTIONS":(n,t)=>{const{tech:o,main:{mediaGroups:a},mediaTypes:{[n]:{groups:i,tracks:s}}}=t;for(const l in a[n]){i[l]||(i[l]=[]);for(const r in a[n][l]){const u=a[n][l][r];if(!/^(?:CC|SERVICE)/.test(u.instreamId))continue;const c=o.options_.vhs&&o.options_.vhs.captionServices||{};let f={label:r,language:u.language,instreamId:u.instreamId,default:u.default&&u.autoselect};if(c[f.instreamId]&&(f=at(f,c[f.instreamId])),f.default===void 0&&delete f.default,i[l].push(at({id:r},u)),typeof s[r]>"u"){const m=o.addRemoteTextTrack({id:f.instreamId,kind:"captions",default:f.default,language:f.language,label:f.label},!1).track;s[r]=m}}}}},Ey=(n,t)=>{for(let o=0;o<n.length;o++)if(Bp(t,n[o])||n[o].playlists&&Ey(n[o].playlists,t))return!0;return!1},HK=(n,t)=>o=>{const{mainPlaylistLoader:a,mediaTypes:{[n]:{groups:i}}}=t,s=a.media();if(!s)return null;let l=null;s.attributes[n]&&(l=i[s.attributes[n]]);const r=Object.keys(i);if(!l)if(n==="AUDIO"&&r.length>1&&Al(t.main))for(let u=0;u<r.length;u++){const c=i[r[u]];if(Ey(c,s)){l=c;break}}else i.main?l=i.main:r.length===1&&(l=i[r[0]]);return typeof o>"u"?l:o===null||!l?null:l.filter(u=>u.id===o.id)[0]||null},jK={AUDIO:(n,t)=>()=>{const{mediaTypes:{[n]:{tracks:o}}}=t;for(const a in o)if(o[a].enabled)return o[a];return null},SUBTITLES:(n,t)=>()=>{const{mediaTypes:{[n]:{tracks:o}}}=t;for(const a in o)if(o[a].mode==="showing"||o[a].mode==="hidden")return o[a];return null}},zK=(n,{mediaTypes:t})=>()=>{const o=t[n].activeTrack();return o?t[n].activeGroup(o):null},qK=n=>{["AUDIO","SUBTITLES","CLOSED-CAPTIONS"].forEach(c=>{FK[c](c,n)});const{mediaTypes:t,mainPlaylistLoader:o,tech:a,vhs:i,segmentLoaders:{["AUDIO"]:s,main:l}}=n;["AUDIO","SUBTITLES"].forEach(c=>{t[c].activeGroup=HK(c,n),t[c].activeTrack=jK[c](c,n),t[c].onGroupChanged=MK(c,n),t[c].onGroupChanging=UK(c,n),t[c].onTrackChanged=RK(c,n),t[c].getActiveGroup=zK(c,n)});const r=t.AUDIO.activeGroup();if(r){const c=(r.filter(m=>m.default)[0]||r[0]).id;t.AUDIO.tracks[c].enabled=!0,t.AUDIO.onGroupChanged(),t.AUDIO.onTrackChanged(),t.AUDIO.getActiveGroup().playlistLoader?(l.setAudio(!1),s.setAudio(!0)):l.setAudio(!0)}o.on("mediachange",()=>{["AUDIO","SUBTITLES"].forEach(c=>t[c].onGroupChanged())}),o.on("mediachanging",()=>{["AUDIO","SUBTITLES"].forEach(c=>t[c].onGroupChanging())});const u=()=>{t.AUDIO.onTrackChanged(),a.trigger({type:"usage",name:"vhs-audio-change"})};a.audioTracks().addEventListener("change",u),a.remoteTextTracks().addEventListener("change",t.SUBTITLES.onTrackChanged),i.on("dispose",()=>{a.audioTracks().removeEventListener("change",u),a.remoteTextTracks().removeEventListener("change",t.SUBTITLES.onTrackChanged)}),a.clearTracks("audio");for(const c in t.AUDIO.tracks)a.audioTracks().addTrack(t.AUDIO.tracks[c])},WK=()=>{const n={};return["AUDIO","SUBTITLES","CLOSED-CAPTIONS"].forEach(t=>{n[t]={groups:{},tracks:{},activePlaylistLoader:null,activeGroup:Ho,activeTrack:Ho,getActiveGroup:Ho,onGroupChanged:Ho,onTrackChanged:Ho,lastTrack_:null,logger_:so(`MediaGroups[${t}]`)}}),n};class kg{constructor(){this.priority_=[],this.pathwayClones_=new Map}set version(t){t===1&&(this.version_=t)}set ttl(t){this.ttl_=t||300}set reloadUri(t){t&&(this.reloadUri_=kn(this.reloadUri_,t))}set priority(t){t&&t.length&&(this.priority_=t)}set pathwayClones(t){t&&t.length&&(this.pathwayClones_=new Map(t.map(o=>[o.ID,o])))}get version(){return this.version_}get ttl(){return this.ttl_}get reloadUri(){return this.reloadUri_}get priority(){return this.priority_}get pathwayClones(){return this.pathwayClones_}}class GK extends ie.EventTarget{constructor(t,o){super(),this.currentPathway=null,this.defaultPathway=null,this.queryBeforeStart=!1,this.availablePathways_=new Set,this.steeringManifest=new kg,this.proxyServerUrl_=null,this.manifestType_=null,this.ttlTimeout_=null,this.request_=null,this.currentPathwayClones=new Map,this.nextPathwayClones=new Map,this.excludedSteeringManifestURLs=new Set,this.logger_=so("Content Steering"),this.xhr_=t,this.getBandwidth_=o}assignTagProperties(t,o){this.manifestType_=o.serverUri?"HLS":"DASH";const a=o.serverUri||o.serverURL;if(!a){this.logger_(`steering manifest URL is ${a}, cannot request steering manifest.`),this.trigger("error");return}if(a.startsWith("data:")){this.decodeDataUriManifest_(a.substring(a.indexOf(",")+1));return}this.steeringManifest.reloadUri=kn(t,a),this.defaultPathway=o.pathwayId||o.defaultServiceLocation,this.queryBeforeStart=o.queryBeforeStart,this.proxyServerUrl_=o.proxyServerURL,this.defaultPathway&&!this.queryBeforeStart&&this.trigger("content-steering")}requestSteeringManifest(t){const o=this.steeringManifest.reloadUri;if(!o)return;const a=t?o:this.getRequestURI(o);if(!a){this.logger_("No valid content steering manifest URIs. Stopping content steering."),this.trigger("error"),this.dispose();return}const i={contentSteeringInfo:{uri:a}};this.trigger({type:"contentsteeringloadstart",metadata:i}),this.request_=this.xhr_({uri:a,requestType:"content-steering-manifest"},(s,l)=>{if(s){if(l.status===410){this.logger_(`manifest request 410 ${s}.`),this.logger_(`There will be no more content steering requests to ${a} this session.`),this.excludedSteeringManifestURLs.add(a);return}if(l.status===429){const c=l.responseHeaders["retry-after"];this.logger_(`manifest request 429 ${s}.`),this.logger_(`content steering will retry in ${c} seconds.`),this.startTTLTimeout_(parseInt(c,10));return}this.logger_(`manifest failed to load ${s}.`),this.startTTLTimeout_();return}this.trigger({type:"contentsteeringloadcomplete",metadata:i});let r;try{r=JSON.parse(this.request_.responseText)}catch(c){const f={errorType:ie.Error.StreamingContentSteeringParserError,error:c};this.trigger({type:"error",metadata:f})}this.assignSteeringProperties_(r);const u={contentSteeringInfo:i.contentSteeringInfo,contentSteeringManifest:{version:this.steeringManifest.version,reloadUri:this.steeringManifest.reloadUri,priority:this.steeringManifest.priority}};this.trigger({type:"contentsteeringparsed",metadata:u}),this.startTTLTimeout_()})}setProxyServerUrl_(t){const o=new X.URL(t),a=new X.URL(this.proxyServerUrl_);return a.searchParams.set("url",encodeURI(o.toString())),this.setSteeringParams_(a.toString())}decodeDataUriManifest_(t){const o=JSON.parse(X.atob(t));this.assignSteeringProperties_(o)}setSteeringParams_(t){const o=new X.URL(t),a=this.getPathway(),i=this.getBandwidth_();if(a){const s=`_${this.manifestType_}_pathway`;o.searchParams.set(s,a)}if(i){const s=`_${this.manifestType_}_throughput`;o.searchParams.set(s,i)}return o.toString()}assignSteeringProperties_(t){if(this.steeringManifest.version=t.VERSION,!this.steeringManifest.version){this.logger_(`manifest version is ${t.VERSION}, which is not supported.`),this.trigger("error");return}this.steeringManifest.ttl=t.TTL,this.steeringManifest.reloadUri=t["RELOAD-URI"],this.steeringManifest.priority=t["PATHWAY-PRIORITY"]||t["SERVICE-LOCATION-PRIORITY"],this.steeringManifest.pathwayClones=t["PATHWAY-CLONES"],this.nextPathwayClones=this.steeringManifest.pathwayClones,this.availablePathways_.size||(this.logger_("There are no available pathways for content steering. Ending content steering."),this.trigger("error"),this.dispose());const a=(i=>{for(const s of i)if(this.availablePathways_.has(s))return s;return[...this.availablePathways_][0]})(this.steeringManifest.priority);this.currentPathway!==a&&(this.currentPathway=a,this.trigger("content-steering"))}getPathway(){return this.currentPathway||this.defaultPathway}getRequestURI(t){if(!t)return null;const o=i=>this.excludedSteeringManifestURLs.has(i);if(this.proxyServerUrl_){const i=this.setProxyServerUrl_(t);if(!o(i))return i}const a=this.setSteeringParams_(t);return o(a)?null:a}startTTLTimeout_(t=this.steeringManifest.ttl){const o=t*1e3;this.ttlTimeout_=X.setTimeout(()=>{this.requestSteeringManifest()},o)}clearTTLTimeout_(){X.clearTimeout(this.ttlTimeout_),this.ttlTimeout_=null}abort(){this.request_&&this.request_.abort(),this.request_=null}dispose(){this.off("content-steering"),this.off("error"),this.abort(),this.clearTTLTimeout_(),this.currentPathway=null,this.defaultPathway=null,this.queryBeforeStart=null,this.proxyServerUrl_=null,this.manifestType_=null,this.ttlTimeout_=null,this.request_=null,this.excludedSteeringManifestURLs=new Set,this.availablePathways_=new Set,this.steeringManifest=new kg}addAvailablePathway(t){t&&this.availablePathways_.add(t)}clearAvailablePathways(){this.availablePathways_.clear()}excludePathway(t){return this.availablePathways_.delete(t)}didDASHTagChange(t,o){return!o&&this.steeringManifest.reloadUri||o&&(kn(t,o.serverURL)!==this.steeringManifest.reloadUri||o.defaultServiceLocation!==this.defaultPathway||o.queryBeforeStart!==this.queryBeforeStart||o.proxyServerURL!==this.proxyServerUrl_)}getAvailablePathways(){return this.availablePathways_}}const XK=(n,t)=>{let o=null;return(...a)=>{clearTimeout(o),o=setTimeout(()=>{n.apply(null,a)},t)}},YK=10;let pa;const KK=["mediaRequests","mediaRequestsAborted","mediaRequestsTimedout","mediaRequestsErrored","mediaTransferDuration","mediaBytesTransferred","mediaAppends"],QK=function(n){return this.audioSegmentLoader_[n]+this.mainSegmentLoader_[n]},JK=function({currentPlaylist:n,buffered:t,currentTime:o,nextPlaylist:a,bufferLowWaterLine:i,bufferHighWaterLine:s,duration:l,bufferBasedABR:r,log:u}){if(!a)return ie.log.warn("We received no playlist to switch to. Please check your stream."),!1;const c=`allowing switch ${n&&n.id||"null"} -> ${a.id}`;if(!n)return u(`${c} as current playlist is not set`),!0;if(a.id===n.id)return!1;const f=!!ki(t,o).length;if(!n.endList)return!f&&typeof n.partTargetDuration=="number"?(u(`not ${c} as current playlist is live llhls, but currentTime isn't in buffered.`),!1):(u(`${c} as current playlist is live`),!0);const m=Tp(t,o),d=r?zt.EXPERIMENTAL_MAX_BUFFER_LOW_WATER_LINE:zt.MAX_BUFFER_LOW_WATER_LINE;if(l<d)return u(`${c} as duration < max low water line (${l} < ${d})`),!0;const h=a.attributes.BANDWIDTH,g=n.attributes.BANDWIDTH;if(h<g&&(!r||m<s)){let p=`${c} as next bandwidth < current bandwidth (${h} < ${g})`;return r&&(p+=` and forwardBuffer < bufferHighWaterLine (${m} < ${s})`),u(p),!0}if((!r||h>g)&&m>=i){let p=`${c} as forwardBuffer >= bufferLowWaterLine (${m} >= ${i})`;return r&&(p+=` and next bandwidth > current bandwidth (${h} > ${g})`),u(p),!0}return u(`not ${c} as no switching criteria met`),!1};class ZK extends ie.EventTarget{constructor(t){super(),this.fastQualityChange_=XK(this.fastQualityChange_.bind(this),100);const{src:o,withCredentials:a,tech:i,bandwidth:s,externVhs:l,useCueTags:r,playlistExclusionDuration:u,enableLowInitialPlaylist:c,sourceType:f,cacheEncryptionKeys:m,bufferBasedABR:d,leastPixelDiffSelector:h,captionServices:g,experimentalUseMMS:p}=t;if(!o)throw new Error("A non-empty playlist URL or JSON manifest string is required");let{maxPlaylistRetries:b}=t;(b===null||typeof b>"u")&&(b=1/0),pa=l,this.bufferBasedABR=!!d,this.leastPixelDiffSelector=!!h,this.withCredentials=a,this.tech_=i,this.vhs_=i.vhs,this.player_=t.player_,this.sourceType_=f,this.useCueTags_=r,this.playlistExclusionDuration=u,this.maxPlaylistRetries=b,this.enableLowInitialPlaylist=c,this.usingManagedMediaSource_=!1,this.useCueTags_&&(this.cueTagsTrack_=this.tech_.addTextTrack("metadata","ad-cues"),this.cueTagsTrack_.inBandMetadataTrackDispatchType=""),this.requestOptions_={withCredentials:a,maxPlaylistRetries:b,timeout:null},this.on("error",this.pauseLoading),this.mediaTypes_=WK(),p&&X.ManagedMediaSource?(this.tech_.el_.disableRemotePlayback=!0,this.mediaSource=new X.ManagedMediaSource,this.usingManagedMediaSource_=!0,ie.log("Using ManagedMediaSource")):X.MediaSource&&(this.mediaSource=new X.MediaSource),this.handleDurationChange_=this.handleDurationChange_.bind(this),this.handleSourceOpen_=this.handleSourceOpen_.bind(this),this.handleSourceEnded_=this.handleSourceEnded_.bind(this),this.load=this.load.bind(this),this.pause=this.pause.bind(this),this.mediaSource.addEventListener("durationchange",this.handleDurationChange_),this.mediaSource.addEventListener("sourceopen",this.handleSourceOpen_),this.mediaSource.addEventListener("sourceended",this.handleSourceEnded_),this.mediaSource.addEventListener("startstreaming",this.load),this.mediaSource.addEventListener("endstreaming",this.pause),this.seekable_=Wt(),this.hasPlayed_=!1,this.syncController_=new $K(t),this.segmentMetadataTrack_=i.addRemoteTextTrack({kind:"metadata",label:"segment-metadata"},!1).track,this.segmentMetadataTrack_.mode="hidden",this.decrypter_=new IK,this.sourceUpdater_=new Vy(this.mediaSource),this.inbandTextTracks_={},this.timelineChangeController_=new AK,this.keyStatusMap_=new Map;const _={vhs:this.vhs_,parse708captions:t.parse708captions,useDtsForTimestampOffset:t.useDtsForTimestampOffset,captionServices:g,mediaSource:this.mediaSource,currentTime:this.tech_.currentTime.bind(this.tech_),seekable:()=>this.seekable(),seeking:()=>this.tech_.seeking(),duration:()=>this.duration(),hasPlayed:()=>this.hasPlayed_,goalBufferLength:()=>this.goalBufferLength(),bandwidth:s,syncController:this.syncController_,decrypter:this.decrypter_,sourceType:this.sourceType_,inbandTextTracks:this.inbandTextTracks_,cacheEncryptionKeys:m,sourceUpdater:this.sourceUpdater_,timelineChangeController:this.timelineChangeController_,exactManifestTimings:t.exactManifestTimings,addMetadataToTextTrack:this.addMetadataToTextTrack.bind(this)};this.mainPlaylistLoader_=this.sourceType_==="dash"?new fm(o,this.vhs_,at(this.requestOptions_,{addMetadataToTextTrack:this.addMetadataToTextTrack.bind(this)})):new Ei(o,this.vhs_,at(this.requestOptions_,{addDateRangesToTextTrack:this.addDateRangesToTextTrack_.bind(this)})),this.setupMainPlaylistLoaderListeners_(),this.mainSegmentLoader_=new ym(at(_,{segmentMetadataTrack:this.segmentMetadataTrack_,loaderType:"main"}),t),this.audioSegmentLoader_=new ym(at(_,{loaderType:"audio"}),t),this.subtitleSegmentLoader_=new NK(at(_,{loaderType:"vtt",featuresNativeTextTracks:this.tech_.featuresNativeTextTracks,loadVttJs:()=>new Promise((V,C)=>{function S(){i.off("vttjserror",N),V()}function N(){i.off("vttjsloaded",S),C()}i.one("vttjsloaded",S),i.one("vttjserror",N),i.addWebVttScript_()})}),t);const w=()=>this.mainSegmentLoader_.bandwidth;this.contentSteeringController_=new GK(this.vhs_.xhr,w),this.setupSegmentLoaderListeners_(),this.bufferBasedABR&&(this.mainPlaylistLoader_.one("loadedplaylist",()=>this.startABRTimer_()),this.tech_.on("pause",()=>this.stopABRTimer_()),this.tech_.on("play",()=>this.startABRTimer_())),KK.forEach(V=>{this[V+"_"]=QK.bind(this,V)}),this.logger_=so("pc"),this.triggeredFmp4Usage=!1,this.tech_.preload()==="none"?(this.loadOnPlay_=()=>{this.loadOnPlay_=null,this.mainPlaylistLoader_.load()},this.tech_.one("play",this.loadOnPlay_)):this.mainPlaylistLoader_.load(),this.timeToLoadedData__=-1,this.mainAppendsToLoadedData__=-1,this.audioAppendsToLoadedData__=-1;const v=this.tech_.preload()==="none"?"play":"loadstart";this.tech_.one(v,()=>{const V=Date.now();this.tech_.one("loadeddata",()=>{this.timeToLoadedData__=Date.now()-V,this.mainAppendsToLoadedData__=this.mainSegmentLoader_.mediaAppends,this.audioAppendsToLoadedData__=this.audioSegmentLoader_.mediaAppends})})}mainAppendsToLoadedData_(){return this.mainAppendsToLoadedData__}audioAppendsToLoadedData_(){return this.audioAppendsToLoadedData__}appendsToLoadedData_(){const t=this.mainAppendsToLoadedData_(),o=this.audioAppendsToLoadedData_();return t===-1||o===-1?-1:t+o}timeToLoadedData_(){return this.timeToLoadedData__}checkABR_(t="abr"){const o=this.selectPlaylist();o&&this.shouldSwitchToMedia_(o)&&this.switchMedia_(o,t)}switchMedia_(t,o,a){const i=this.media(),s=i&&(i.id||i.uri),l=t&&(t.id||t.uri);if(s&&s!==l){this.logger_(`switch media ${s} -> ${l} from ${o}`);const r={renditionInfo:{id:l,bandwidth:t.attributes.BANDWIDTH,resolution:t.attributes.RESOLUTION,codecs:t.attributes.CODECS},cause:o};this.trigger({type:"renditionselected",metadata:r}),this.tech_.trigger({type:"usage",name:`vhs-rendition-change-${o}`})}this.mainPlaylistLoader_.media(t,a)}switchMediaForDASHContentSteering_(){["AUDIO","SUBTITLES","CLOSED-CAPTIONS"].forEach(t=>{const o=this.mediaTypes_[t],a=o?o.activeGroup():null,i=this.contentSteeringController_.getPathway();if(a&&i){const l=(a.length?a[0].playlists:a.playlists).filter(r=>r.attributes.serviceLocation===i);l.length&&this.mediaTypes_[t].activePlaylistLoader.media(l[0])}})}startABRTimer_(){this.stopABRTimer_(),this.abrTimer_=X.setInterval(()=>this.checkABR_(),250)}stopABRTimer_(){this.tech_.scrubbing&&this.tech_.scrubbing()||(X.clearInterval(this.abrTimer_),this.abrTimer_=null)}getAudioTrackPlaylists_(){const t=this.main(),o=t&&t.playlists||[];if(!t||!t.mediaGroups||!t.mediaGroups.AUDIO)return o;const a=t.mediaGroups.AUDIO,i=Object.keys(a);let s;if(Object.keys(this.mediaTypes_.AUDIO.groups).length)s=this.mediaTypes_.AUDIO.activeTrack();else{const r=a.main||i.length&&a[i[0]];for(const u in r)if(r[u].default){s={label:u};break}}if(!s)return o;const l=[];for(const r in a)if(a[r][s.label]){const u=a[r][s.label];if(u.playlists&&u.playlists.length)l.push.apply(l,u.playlists);else if(u.uri)l.push(u);else if(t.playlists.length)for(let c=0;c<t.playlists.length;c++){const f=t.playlists[c];f.attributes&&f.attributes.AUDIO&&f.attributes.AUDIO===r&&l.push(f)}}return l.length?l:o}setupMainPlaylistLoaderListeners_(){this.mainPlaylistLoader_.on("loadedmetadata",()=>{const o=this.mainPlaylistLoader_.media(),a=o.targetDuration*1.5*1e3;um(this.mainPlaylistLoader_.main,this.mainPlaylistLoader_.media())?this.requestOptions_.timeout=0:this.requestOptions_.timeout=a,o.endList&&this.tech_.preload()!=="none"&&(this.mainSegmentLoader_.playlist(o,this.requestOptions_),this.mainSegmentLoader_.load()),qK({sourceType:this.sourceType_,segmentLoaders:{AUDIO:this.audioSegmentLoader_,SUBTITLES:this.subtitleSegmentLoader_,main:this.mainSegmentLoader_},tech:this.tech_,requestOptions:this.requestOptions_,mainPlaylistLoader:this.mainPlaylistLoader_,vhs:this.vhs_,main:this.main(),mediaTypes:this.mediaTypes_,excludePlaylist:this.excludePlaylist.bind(this)}),this.triggerPresenceUsage_(this.main(),o),this.setupFirstPlay(),!this.mediaTypes_.AUDIO.activePlaylistLoader||this.mediaTypes_.AUDIO.activePlaylistLoader.media()?this.trigger("selectedinitialmedia"):this.mediaTypes_.AUDIO.activePlaylistLoader.one("loadedmetadata",()=>{this.trigger("selectedinitialmedia")})}),this.mainPlaylistLoader_.on("loadedplaylist",()=>{this.loadOnPlay_&&this.tech_.off("play",this.loadOnPlay_);let o=this.mainPlaylistLoader_.media();if(!o){this.attachContentSteeringListeners_(),this.initContentSteeringController_(),this.excludeUnsupportedVariants_();let a;if(this.enableLowInitialPlaylist&&(a=this.selectInitialPlaylist()),a||(a=this.selectPlaylist()),!a||!this.shouldSwitchToMedia_(a)||(this.initialMedia_=a,this.switchMedia_(this.initialMedia_,"initial"),!(this.sourceType_==="vhs-json"&&this.initialMedia_.segments)))return;o=this.initialMedia_}this.handleUpdatedMediaPlaylist(o)}),this.mainPlaylistLoader_.on("error",()=>{const o=this.mainPlaylistLoader_.error;this.excludePlaylist({playlistToExclude:o.playlist,error:o})}),this.mainPlaylistLoader_.on("mediachanging",()=>{this.mainSegmentLoader_.abort(),this.mainSegmentLoader_.pause()}),this.mainPlaylistLoader_.on("mediachange",()=>{const o=this.mainPlaylistLoader_.media(),a=o.targetDuration*1.5*1e3;um(this.mainPlaylistLoader_.main,this.mainPlaylistLoader_.media())?this.requestOptions_.timeout=0:this.requestOptions_.timeout=a,this.sourceType_==="dash"&&this.mainPlaylistLoader_.isPaused&&this.mainPlaylistLoader_.load(),this.mainSegmentLoader_.pause(),this.mainSegmentLoader_.playlist(o,this.requestOptions_),this.waitingForFastQualityPlaylistReceived_?this.runFastQualitySwitch_():this.mainSegmentLoader_.load(),this.tech_.trigger({type:"mediachange",bubbles:!0})}),this.mainPlaylistLoader_.on("playlistunchanged",()=>{const o=this.mainPlaylistLoader_.media();if(o.lastExcludeReason_==="playlist-unchanged")return;this.stuckAtPlaylistEnd_(o)&&(this.excludePlaylist({error:{message:"Playlist no longer updating.",reason:"playlist-unchanged"}}),this.tech_.trigger("playliststuck"))}),this.mainPlaylistLoader_.on("renditiondisabled",()=>{this.tech_.trigger({type:"usage",name:"vhs-rendition-disabled"})}),this.mainPlaylistLoader_.on("renditionenabled",()=>{this.tech_.trigger({type:"usage",name:"vhs-rendition-enabled"})}),["manifestrequeststart","manifestrequestcomplete","manifestparsestart","manifestparsecomplete","playlistrequeststart","playlistrequestcomplete","playlistparsestart","playlistparsecomplete","renditiondisabled","renditionenabled"].forEach(o=>{this.mainPlaylistLoader_.on(o,a=>{this.player_.trigger(kt({},a))})})}handleUpdatedMediaPlaylist(t){this.useCueTags_&&this.updateAdCues_(t),this.mainSegmentLoader_.pause(),this.mainSegmentLoader_.playlist(t,this.requestOptions_),this.waitingForFastQualityPlaylistReceived_&&this.runFastQualitySwitch_(),this.updateDuration(!t.endList),this.tech_.paused()||(this.mainSegmentLoader_.load(),this.audioSegmentLoader_&&this.audioSegmentLoader_.load())}triggerPresenceUsage_(t,o){const a=t.mediaGroups||{};let i=!0;const s=Object.keys(a.AUDIO);for(const l in a.AUDIO)for(const r in a.AUDIO[l])a.AUDIO[l][r].uri||(i=!1);i&&this.tech_.trigger({type:"usage",name:"vhs-demuxed"}),Object.keys(a.SUBTITLES).length&&this.tech_.trigger({type:"usage",name:"vhs-webvtt"}),pa.Playlist.isAes(o)&&this.tech_.trigger({type:"usage",name:"vhs-aes"}),s.length&&Object.keys(a.AUDIO[s[0]]).length>1&&this.tech_.trigger({type:"usage",name:"vhs-alternate-audio"}),this.useCueTags_&&this.tech_.trigger({type:"usage",name:"vhs-playlist-cue-tags"})}shouldSwitchToMedia_(t){const o=this.mainPlaylistLoader_.media()||this.mainPlaylistLoader_.pendingMedia_,a=this.tech_.currentTime(),i=this.bufferLowWaterLine(),s=this.bufferHighWaterLine(),l=this.tech_.buffered();return JK({buffered:l,currentTime:a,currentPlaylist:o,nextPlaylist:t,bufferLowWaterLine:i,bufferHighWaterLine:s,duration:this.duration(),bufferBasedABR:this.bufferBasedABR,log:this.logger_})}setupSegmentLoaderListeners_(){this.mainSegmentLoader_.on("bandwidthupdate",()=>{this.checkABR_("bandwidthupdate"),this.tech_.trigger("bandwidthupdate")}),this.mainSegmentLoader_.on("timeout",()=>{this.bufferBasedABR&&this.mainSegmentLoader_.load()}),this.bufferBasedABR||this.mainSegmentLoader_.on("progress",()=>{this.trigger("progress")}),this.mainSegmentLoader_.on("error",()=>{const a=this.mainSegmentLoader_.error();this.excludePlaylist({playlistToExclude:a.playlist,error:a})}),this.mainSegmentLoader_.on("appenderror",()=>{this.error=this.mainSegmentLoader_.error_,this.trigger("error")}),this.mainSegmentLoader_.on("syncinfoupdate",()=>{this.onSyncInfoUpdate_()}),this.mainSegmentLoader_.on("timestampoffset",()=>{this.tech_.trigger({type:"usage",name:"vhs-timestamp-offset"})}),this.audioSegmentLoader_.on("syncinfoupdate",()=>{this.onSyncInfoUpdate_()}),this.audioSegmentLoader_.on("appenderror",()=>{this.error=this.audioSegmentLoader_.error_,this.trigger("error")}),this.mainSegmentLoader_.on("ended",()=>{this.logger_("main segment loader ended"),this.onEndOfStream()}),this.timelineChangeController_.on("audioTimelineBehind",()=>{const a=this.audioSegmentLoader_.pendingSegment_;if(!a||!a.segment||!a.segment.syncInfo)return;const i=a.segment.syncInfo.end+.01;this.tech_.setCurrentTime(i)}),this.timelineChangeController_.on("fixBadTimelineChange",()=>{this.logger_("Fix bad timeline change. Restarting al segment loaders..."),this.mainSegmentLoader_.pause(),this.mainSegmentLoader_.resetEverything(),this.mediaTypes_.AUDIO.activePlaylistLoader&&(this.audioSegmentLoader_.pause(),this.audioSegmentLoader_.resetEverything()),this.mediaTypes_.SUBTITLES.activePlaylistLoader&&(this.subtitleSegmentLoader_.pause(),this.subtitleSegmentLoader_.resetEverything()),this.load()}),this.mainSegmentLoader_.on("earlyabort",a=>{this.bufferBasedABR||(this.delegateLoaders_("all",["abort"]),this.excludePlaylist({error:{message:"Aborted early because there isn't enough bandwidth to complete the request without rebuffering."},playlistExclusionDuration:YK}))});const t=()=>{if(!this.sourceUpdater_.hasCreatedSourceBuffers())return this.tryToCreateSourceBuffers_();const a=this.getCodecsOrExclude_();a&&this.sourceUpdater_.addOrChangeSourceBuffers(a)};this.mainSegmentLoader_.on("trackinfo",t),this.audioSegmentLoader_.on("trackinfo",t),this.mainSegmentLoader_.on("fmp4",()=>{this.triggeredFmp4Usage||(this.tech_.trigger({type:"usage",name:"vhs-fmp4"}),this.triggeredFmp4Usage=!0)}),this.audioSegmentLoader_.on("fmp4",()=>{this.triggeredFmp4Usage||(this.tech_.trigger({type:"usage",name:"vhs-fmp4"}),this.triggeredFmp4Usage=!0)}),this.audioSegmentLoader_.on("ended",()=>{this.logger_("audioSegmentLoader ended"),this.onEndOfStream()}),["segmentselected","segmentloadstart","segmentloaded","segmentkeyloadstart","segmentkeyloadcomplete","segmentdecryptionstart","segmentdecryptioncomplete","segmenttransmuxingstart","segmenttransmuxingcomplete","segmenttransmuxingtrackinfoavailable","segmenttransmuxingtiminginfoavailable","segmentappendstart","appendsdone","bandwidthupdated","timelinechange","codecschange"].forEach(a=>{this.mainSegmentLoader_.on(a,i=>{this.player_.trigger(kt({},i))}),this.audioSegmentLoader_.on(a,i=>{this.player_.trigger(kt({},i))}),this.subtitleSegmentLoader_.on(a,i=>{this.player_.trigger(kt({},i))})})}mediaSecondsLoaded_(){return Math.max(this.audioSegmentLoader_.mediaSecondsLoaded+this.mainSegmentLoader_.mediaSecondsLoaded)}load(){this.mainSegmentLoader_.load(),this.mediaTypes_.AUDIO.activePlaylistLoader&&this.audioSegmentLoader_.load(),this.mediaTypes_.SUBTITLES.activePlaylistLoader&&this.subtitleSegmentLoader_.load()}pause(){this.mainSegmentLoader_.pause(),this.mediaTypes_.AUDIO.activePlaylistLoader&&this.audioSegmentLoader_.pause(),this.mediaTypes_.SUBTITLES.activePlaylistLoader&&this.subtitleSegmentLoader_.pause()}fastQualityChange_(t=this.selectPlaylist()){if(t&&t===this.mainPlaylistLoader_.media()){this.logger_("skipping fastQualityChange because new media is same as old");return}this.switchMedia_(t,"fast-quality"),this.waitingForFastQualityPlaylistReceived_=!0}runFastQualitySwitch_(){this.waitingForFastQualityPlaylistReceived_=!1,this.mainSegmentLoader_.pause(),this.mainSegmentLoader_.resetEverything(),this.mediaTypes_.AUDIO.activePlaylistLoader&&(this.audioSegmentLoader_.pause(),this.audioSegmentLoader_.resetEverything()),this.mediaTypes_.SUBTITLES.activePlaylistLoader&&(this.subtitleSegmentLoader_.pause(),this.subtitleSegmentLoader_.resetEverything()),this.load()}play(){if(this.setupFirstPlay())return;this.tech_.ended()&&this.tech_.setCurrentTime(0),this.hasPlayed_&&this.load();const t=this.tech_.seekable();if(this.tech_.duration()===1/0&&this.tech_.currentTime()<t.start(0))return this.tech_.setCurrentTime(t.end(t.length-1))}setupFirstPlay(){const t=this.mainPlaylistLoader_.media();if(!t||this.tech_.paused()||this.hasPlayed_)return!1;if(!t.endList||t.start){const o=this.seekable();if(!o.length)return!1;const a=o.end(0);let i=a;if(t.start){const s=t.start.timeOffset;s<0?i=Math.max(a+s,o.start(0)):i=Math.min(a,s)}this.trigger("firstplay"),this.tech_.setCurrentTime(i)}return this.hasPlayed_=!0,this.load(),!0}handleSourceOpen_(){if(this.tryToCreateSourceBuffers_(),this.tech_.autoplay()){const t=this.tech_.play();typeof t<"u"&&typeof t.then=="function"&&t.then(null,o=>{})}this.trigger("sourceopen")}handleSourceEnded_(){if(!this.inbandTextTracks_.metadataTrack_)return;const t=this.inbandTextTracks_.metadataTrack_.cues;if(!t||!t.length)return;const o=this.duration();t[t.length-1].endTime=isNaN(o)||Math.abs(o)===1/0?Number.MAX_VALUE:o}handleDurationChange_(){this.tech_.trigger("durationchange")}onEndOfStream(){let t=this.mainSegmentLoader_.ended_;if(this.mediaTypes_.AUDIO.activePlaylistLoader){const o=this.mainSegmentLoader_.getCurrentMediaInfo_();!o||o.hasVideo?t=t&&this.audioSegmentLoader_.ended_:t=this.audioSegmentLoader_.ended_}t&&(this.stopABRTimer_(),this.sourceUpdater_.endOfStream())}stuckAtPlaylistEnd_(t){if(!this.seekable().length)return!1;const a=this.syncController_.getExpiredTime(t,this.duration());if(a===null)return!1;const i=pa.Playlist.playlistEnd(t,a),s=this.tech_.currentTime(),l=this.tech_.buffered();if(!l.length)return i-s<=To;const r=l.end(l.length-1);return r-s<=To&&i-r<=To}excludePlaylist({playlistToExclude:t=this.mainPlaylistLoader_.media(),error:o={},playlistExclusionDuration:a}){if(t=t||this.mainPlaylistLoader_.media(),a=a||o.playlistExclusionDuration||this.playlistExclusionDuration,!t){this.error=o,this.mediaSource.readyState!=="open"?this.trigger("error"):this.sourceUpdater_.endOfStream("network");return}t.playlistErrors_++;const i=this.mainPlaylistLoader_.main.playlists,s=i.filter(Lu),l=s.length===1&&s[0]===t;if(i.length===1&&a!==1/0)return ie.log.warn(`Problem encountered with playlist ${t.id}. Trying again since it is the only playlist.`),this.tech_.trigger("retryplaylist"),this.mainPlaylistLoader_.load(l);if(l){if(this.main().contentSteering){const g=this.pathwayAttribute_(t),p=this.contentSteeringController_.steeringManifest.ttl*1e3;this.contentSteeringController_.excludePathway(g),this.excludeThenChangePathway_(),setTimeout(()=>{this.contentSteeringController_.addAvailablePathway(g)},p);return}let h=!1;i.forEach(g=>{if(g===t)return;const p=g.excludeUntil;typeof p<"u"&&p!==1/0&&(h=!0,delete g.excludeUntil)}),h&&(ie.log.warn("Removing other playlists from the exclusion list because the last rendition is about to be excluded."),this.tech_.trigger("retryplaylist"))}let r;t.playlistErrors_>this.maxPlaylistRetries?r=1/0:r=Date.now()+a*1e3,t.excludeUntil=r,o.reason&&(t.lastExcludeReason_=o.reason),this.tech_.trigger("excludeplaylist"),this.tech_.trigger({type:"usage",name:"vhs-rendition-excluded"});const u=this.selectPlaylist();if(!u){this.error="Playback cannot continue. No available working or supported playlists.",this.trigger("error");return}const c=o.internal?this.logger_:ie.log.warn,f=o.message?" "+o.message:"";c(`${o.internal?"Internal problem":"Problem"} encountered with playlist ${t.id}.${f} Switching to playlist ${u.id}.`),u.attributes.AUDIO!==t.attributes.AUDIO&&this.delegateLoaders_("audio",["abort","pause"]),u.attributes.SUBTITLES!==t.attributes.SUBTITLES&&this.delegateLoaders_("subtitle",["abort","pause"]),this.delegateLoaders_("main",["abort","pause"]);const m=u.targetDuration/2*1e3||5*1e3,d=typeof u.lastRequest=="number"&&Date.now()-u.lastRequest<=m;return this.switchMedia_(u,"exclude",l||d)}pauseLoading(){this.delegateLoaders_("all",["abort","pause"]),this.stopABRTimer_()}delegateLoaders_(t,o){const a=[],i=t==="all";(i||t==="main")&&a.push(this.mainPlaylistLoader_);const s=[];(i||t==="audio")&&s.push("AUDIO"),(i||t==="subtitle")&&(s.push("CLOSED-CAPTIONS"),s.push("SUBTITLES")),s.forEach(l=>{const r=this.mediaTypes_[l]&&this.mediaTypes_[l].activePlaylistLoader;r&&a.push(r)}),["main","audio","subtitle"].forEach(l=>{const r=this[`${l}SegmentLoader_`];r&&(t===l||t==="all")&&a.push(r)}),a.forEach(l=>o.forEach(r=>{typeof l[r]=="function"&&l[r]()}))}setCurrentTime(t){const o=ki(this.tech_.buffered(),t);if(!(this.mainPlaylistLoader_&&this.mainPlaylistLoader_.media())||!this.mainPlaylistLoader_.media().segments)return 0;if(o&&o.length)return t;this.mainSegmentLoader_.pause(),this.mainSegmentLoader_.resetEverything(),this.mediaTypes_.AUDIO.activePlaylistLoader&&(this.audioSegmentLoader_.pause(),this.audioSegmentLoader_.resetEverything()),this.mediaTypes_.SUBTITLES.activePlaylistLoader&&(this.subtitleSegmentLoader_.pause(),this.subtitleSegmentLoader_.resetEverything()),this.load()}duration(){if(!this.mainPlaylistLoader_)return 0;const t=this.mainPlaylistLoader_.media();return t?t.endList?this.mediaSource?this.mediaSource.duration:pa.Playlist.duration(t):1/0:0}seekable(){return this.seekable_}getSeekableRange_(t,o){const a=t.media();if(!a)return null;const i=this.syncController_.getMediaSequenceSync(o);if(i&&i.isReliable){const r=i.start,u=i.end;if(!isFinite(r)||!isFinite(u))return null;const c=pa.Playlist.liveEdgeDelay(this.mainPlaylistLoader_.main,a),f=Math.max(r,u-c);return Wt([[r,f]])}const s=this.syncController_.getExpiredTime(a,this.duration());if(s===null)return null;const l=pa.Playlist.seekable(a,s,pa.Playlist.liveEdgeDelay(this.mainPlaylistLoader_.main,a));return l.length?l:null}computeFinalSeekable_(t,o){if(!o)return t;const a=t.start(0),i=t.end(0),s=o.start(0),l=o.end(0);return s>i||a>l?t:Wt([[Math.max(a,s),Math.min(i,l)]])}onSyncInfoUpdate_(){if(!this.mainPlaylistLoader_)return;const t=this.getSeekableRange_(this.mainPlaylistLoader_,"main");if(!t)return;let o;if(this.mediaTypes_.AUDIO.activePlaylistLoader&&(o=this.getSeekableRange_(this.mediaTypes_.AUDIO.activePlaylistLoader,"audio"),!o))return;const a=this.seekable_;if(this.seekable_=this.computeFinalSeekable_(t,o),!this.seekable_||a&&a.length&&this.seekable_.length&&a.start(0)===this.seekable_.start(0)&&a.end(0)===this.seekable_.end(0))return;this.logger_(`seekable updated [${I1(this.seekable_)}]`);const i={seekableRanges:this.seekable_};this.trigger({type:"seekablerangeschanged",metadata:i}),this.tech_.trigger("seekablechanged")}updateDuration(t){if(this.updateDuration_&&(this.mediaSource.removeEventListener("sourceopen",this.updateDuration_),this.updateDuration_=null),this.mediaSource.readyState!=="open"){this.updateDuration_=this.updateDuration.bind(this,t),this.mediaSource.addEventListener("sourceopen",this.updateDuration_);return}if(t){const i=this.seekable();if(!i.length)return;(isNaN(this.mediaSource.duration)||this.mediaSource.duration<i.end(i.length-1))&&this.sourceUpdater_.setDuration(i.end(i.length-1));return}const o=this.tech_.buffered();let a=pa.Playlist.duration(this.mainPlaylistLoader_.media());o.length>0&&(a=Math.max(a,o.end(o.length-1))),this.mediaSource.duration!==a&&this.sourceUpdater_.setDuration(a)}dispose(){this.trigger("dispose"),this.decrypter_.terminate(),this.mainPlaylistLoader_.dispose(),this.mainSegmentLoader_.dispose(),this.contentSteeringController_.dispose(),this.keyStatusMap_.clear(),this.loadOnPlay_&&this.tech_.off("play",this.loadOnPlay_),["AUDIO","SUBTITLES"].forEach(t=>{const o=this.mediaTypes_[t].groups;for(const a in o)o[a].forEach(i=>{i.playlistLoader&&i.playlistLoader.dispose()})}),this.audioSegmentLoader_.dispose(),this.subtitleSegmentLoader_.dispose(),this.sourceUpdater_.dispose(),this.timelineChangeController_.dispose(),this.stopABRTimer_(),this.updateDuration_&&this.mediaSource.removeEventListener("sourceopen",this.updateDuration_),this.mediaSource.removeEventListener("durationchange",this.handleDurationChange_),this.mediaSource.removeEventListener("sourceopen",this.handleSourceOpen_),this.mediaSource.removeEventListener("sourceended",this.handleSourceEnded_),this.off()}main(){return this.mainPlaylistLoader_.main}media(){return this.mainPlaylistLoader_.media()||this.initialMedia_}areMediaTypesKnown_(){const t=!!this.mediaTypes_.AUDIO.activePlaylistLoader,o=!!this.mainSegmentLoader_.getCurrentMediaInfo_(),a=t?!!this.audioSegmentLoader_.getCurrentMediaInfo_():!0;return!(!o||!a)}getCodecsOrExclude_(){const t={main:this.mainSegmentLoader_.getCurrentMediaInfo_()||{},audio:this.audioSegmentLoader_.getCurrentMediaInfo_()||{}},o=this.mainSegmentLoader_.getPendingSegmentPlaylist()||this.media();t.video=t.main;const a=ll(this.main(),o),i={},s=!!this.mediaTypes_.AUDIO.activePlaylistLoader;if(t.main.hasVideo&&(i.video=a.video||t.main.videoCodec||vq),t.main.isMuxed&&(i.video+=`,${a.audio||t.main.audioCodec||rf}`),(t.main.hasAudio&&!t.main.isMuxed||t.audio.hasAudio||s)&&(i.audio=a.audio||t.main.audioCodec||t.audio.audioCodec||rf,t.audio.isFmp4=t.main.hasAudio&&!t.main.isMuxed?t.main.isFmp4:t.audio.isFmp4),!i.audio&&!i.video){this.excludePlaylist({playlistToExclude:o,error:{message:"Could not determine codecs for playlist."},playlistExclusionDuration:1/0});return}const l=(c,f)=>c?nl(f,this.usingManagedMediaSource_):mc(f),r={};let u;if(["video","audio"].forEach(function(c){if(i.hasOwnProperty(c)&&!l(t[c].isFmp4,i[c])){const f=t[c].isFmp4?"browser":"muxer";r[f]=r[f]||[],r[f].push(i[c]),c==="audio"&&(u=f)}}),s&&u&&o.attributes.AUDIO){const c=o.attributes.AUDIO;this.main().playlists.forEach(f=>{(f.attributes&&f.attributes.AUDIO)===c&&f!==o&&(f.excludeUntil=1/0)}),this.logger_(`excluding audio group ${c} as ${u} does not support codec(s): "${i.audio}"`)}if(Object.keys(r).length){const c=Object.keys(r).reduce((f,m)=>(f&&(f+=", "),f+=`${m} does not support codec(s): "${r[m].join(",")}"`,f),"")+".";this.excludePlaylist({playlistToExclude:o,error:{internal:!0,message:c},playlistExclusionDuration:1/0});return}if(this.sourceUpdater_.hasCreatedSourceBuffers()&&!this.sourceUpdater_.canChangeType()){const c=[];if(["video","audio"].forEach(f=>{const m=(xo(this.sourceUpdater_.codecs[f]||"")[0]||{}).type,d=(xo(i[f]||"")[0]||{}).type;m&&d&&m.toLowerCase()!==d.toLowerCase()&&c.push(`"${this.sourceUpdater_.codecs[f]}" -> "${i[f]}"`)}),c.length){this.excludePlaylist({playlistToExclude:o,error:{message:`Codec switching not supported: ${c.join(", ")}.`,internal:!0},playlistExclusionDuration:1/0});return}}return i}tryToCreateSourceBuffers_(){if(this.mediaSource.readyState!=="open"||this.sourceUpdater_.hasCreatedSourceBuffers()||!this.areMediaTypesKnown_())return;const t=this.getCodecsOrExclude_();if(!t)return;this.sourceUpdater_.createSourceBuffers(t);const o=[t.video,t.audio].filter(Boolean).join(",");this.excludeIncompatibleVariants_(o)}excludeUnsupportedVariants_(){const t=this.main().playlists,o=[];Object.keys(t).forEach(a=>{const i=t[a];if(o.indexOf(i.id)!==-1)return;o.push(i.id);const s=ll(this.main,i),l=[];s.audio&&!mc(s.audio)&&!nl(s.audio,this.usingManagedMediaSource_)&&l.push(`audio codec ${s.audio}`),s.video&&!mc(s.video)&&!nl(s.video,this.usingManagedMediaSource_)&&l.push(`video codec ${s.video}`),s.text&&s.text==="stpp.ttml.im1t"&&l.push(`text codec ${s.text}`),l.length&&(i.excludeUntil=1/0,this.logger_(`excluding ${i.id} for unsupported: ${l.join(", ")}`))})}excludeIncompatibleVariants_(t){const o=[],a=this.main().playlists,i=wl(xo(t)),s=lg(i),l=i.video&&xo(i.video)[0]||null,r=i.audio&&xo(i.audio)[0]||null;Object.keys(a).forEach(u=>{const c=a[u];if(o.indexOf(c.id)!==-1||c.excludeUntil===1/0)return;o.push(c.id);const f=[],m=ll(this.mainPlaylistLoader_.main,c),d=lg(m);if(!(!m.audio&&!m.video)){if(d!==s&&f.push(`codec count "${d}" !== "${s}"`),!this.sourceUpdater_.canChangeType()){const h=m.video&&xo(m.video)[0]||null,g=m.audio&&xo(m.audio)[0]||null;h&&l&&h.type.toLowerCase()!==l.type.toLowerCase()&&f.push(`video codec "${h.type}" !== "${l.type}"`),g&&r&&g.type.toLowerCase()!==r.type.toLowerCase()&&f.push(`audio codec "${g.type}" !== "${r.type}"`)}f.length&&(c.excludeUntil=1/0,this.logger_(`excluding ${c.id}: ${f.join(" && ")}`))}})}updateAdCues_(t){let o=0;const a=this.seekable();a.length&&(o=a.start(0)),BK(t,this.cueTagsTrack_,o)}goalBufferLength(){const t=this.tech_.currentTime(),o=zt.GOAL_BUFFER_LENGTH,a=zt.GOAL_BUFFER_LENGTH_RATE,i=Math.max(o,zt.MAX_GOAL_BUFFER_LENGTH);return Math.min(o+t*a,i)}bufferLowWaterLine(){const t=this.tech_.currentTime(),o=zt.BUFFER_LOW_WATER_LINE,a=zt.BUFFER_LOW_WATER_LINE_RATE,i=Math.max(o,zt.MAX_BUFFER_LOW_WATER_LINE),s=Math.max(o,zt.EXPERIMENTAL_MAX_BUFFER_LOW_WATER_LINE);return Math.min(o+t*a,this.bufferBasedABR?s:i)}bufferHighWaterLine(){return zt.BUFFER_HIGH_WATER_LINE}addDateRangesToTextTrack_(t){fg(this.inbandTextTracks_,"com.apple.streaming",this.tech_),dK({inbandTextTracks:this.inbandTextTracks_,dateRanges:t})}addMetadataToTextTrack(t,o,a){const i=this.sourceUpdater_.videoBuffer?this.sourceUpdater_.videoTimestampOffset():this.sourceUpdater_.audioTimestampOffset();fg(this.inbandTextTracks_,t,this.tech_),sK({inbandTextTracks:this.inbandTextTracks_,metadataArray:o,timestampOffset:i,videoDuration:a})}pathwayAttribute_(t){return t.attributes["PATHWAY-ID"]||t.attributes.serviceLocation}initContentSteeringController_(){const t=this.main();if(t.contentSteering){for(const o of t.playlists)this.contentSteeringController_.addAvailablePathway(this.pathwayAttribute_(o));if(this.contentSteeringController_.assignTagProperties(t.uri,t.contentSteering),this.contentSteeringController_.queryBeforeStart){this.contentSteeringController_.requestSteeringManifest(!0);return}this.tech_.one("canplay",()=>{this.contentSteeringController_.requestSteeringManifest()})}}resetContentSteeringController_(){this.contentSteeringController_.clearAvailablePathways(),this.contentSteeringController_.dispose(),this.initContentSteeringController_()}attachContentSteeringListeners_(){this.contentSteeringController_.on("content-steering",this.excludeThenChangePathway_.bind(this)),["contentsteeringloadstart","contentsteeringloadcomplete","contentsteeringparsed"].forEach(o=>{this.contentSteeringController_.on(o,a=>{this.trigger(kt({},a))})}),this.sourceType_==="dash"&&this.mainPlaylistLoader_.on("loadedplaylist",()=>{const o=this.main();(this.contentSteeringController_.didDASHTagChange(o.uri,o.contentSteering)||(()=>{const s=this.contentSteeringController_.getAvailablePathways(),l=[];for(const r of o.playlists){const u=r.attributes.serviceLocation;if(u&&(l.push(u),!s.has(u)))return!0}return!!(!l.length&&s.size)})())&&this.resetContentSteeringController_()})}excludeThenChangePathway_(){const t=this.contentSteeringController_.getPathway();if(!t)return;this.handlePathwayClones_();const a=this.main().playlists,i=new Set;let s=!1;Object.keys(a).forEach(l=>{const r=a[l],u=this.pathwayAttribute_(r),c=u&&t!==u;r.excludeUntil===1/0&&r.lastExcludeReason_==="content-steering"&&!c&&(delete r.excludeUntil,delete r.lastExcludeReason_,s=!0);const m=!r.excludeUntil&&r.excludeUntil!==1/0;!i.has(r.id)&&c&&m&&(i.add(r.id),r.excludeUntil=1/0,r.lastExcludeReason_="content-steering",this.logger_(`excluding ${r.id} for ${r.lastExcludeReason_}`))}),this.contentSteeringController_.manifestType_==="DASH"&&Object.keys(this.mediaTypes_).forEach(l=>{const r=this.mediaTypes_[l];if(r.activePlaylistLoader){const u=r.activePlaylistLoader.media_;u&&u.attributes.serviceLocation!==t&&(s=!0)}}),s&&this.changeSegmentPathway_()}handlePathwayClones_(){const o=this.main().playlists,a=this.contentSteeringController_.currentPathwayClones,i=this.contentSteeringController_.nextPathwayClones;if(a&&a.size||i&&i.size){for(const[l,r]of a.entries())i.get(l)||(this.mainPlaylistLoader_.updateOrDeleteClone(r),this.contentSteeringController_.excludePathway(l));for(const[l,r]of i.entries()){const u=a.get(l);if(!u){o.filter(f=>f.attributes["PATHWAY-ID"]===r["BASE-ID"]).forEach(f=>{this.mainPlaylistLoader_.addClonePathway(r,f)}),this.contentSteeringController_.addAvailablePathway(l);continue}this.equalPathwayClones_(u,r)||(this.mainPlaylistLoader_.updateOrDeleteClone(r,!0),this.contentSteeringController_.addAvailablePathway(l))}this.contentSteeringController_.currentPathwayClones=new Map(JSON.parse(JSON.stringify([...i])))}}equalPathwayClones_(t,o){if(t["BASE-ID"]!==o["BASE-ID"]||t.ID!==o.ID||t["URI-REPLACEMENT"].HOST!==o["URI-REPLACEMENT"].HOST)return!1;const a=t["URI-REPLACEMENT"].PARAMS,i=o["URI-REPLACEMENT"].PARAMS;for(const s in a)if(a[s]!==i[s])return!1;for(const s in i)if(a[s]!==i[s])return!1;return!0}changeSegmentPathway_(){const t=this.selectPlaylist();this.pauseLoading(),this.contentSteeringController_.manifestType_==="DASH"&&this.switchMediaForDASHContentSteering_(),this.switchMedia_(t,"content-steering")}excludeNonUsablePlaylistsByKeyId_(){if(!this.mainPlaylistLoader_||!this.mainPlaylistLoader_.main)return;let t=0;const o="non-usable";this.mainPlaylistLoader_.main.playlists.forEach(a=>{const i=this.mainPlaylistLoader_.getKeyIdSet(a);!i||!i.size||i.forEach(s=>{const l="usable",r=this.keyStatusMap_.has(s)&&this.keyStatusMap_.get(s)===l,u=a.lastExcludeReason_===o&&a.excludeUntil===1/0;r?r&&u&&(delete a.excludeUntil,delete a.lastExcludeReason_,this.logger_(`enabling playlist ${a.id} because key ID ${s} is ${l}`)):(a.excludeUntil!==1/0&&a.lastExcludeReason_!==o&&(a.excludeUntil=1/0,a.lastExcludeReason_=o,this.logger_(`excluding playlist ${a.id} because the key ID ${s} doesn't exist in the keyStatusMap or is not ${l}`)),t++)})}),t>=this.mainPlaylistLoader_.main.playlists.length&&this.mainPlaylistLoader_.main.playlists.forEach(a=>{const i=a&&a.attributes&&a.attributes.RESOLUTION&&a.attributes.RESOLUTION.height<720,s=a.excludeUntil===1/0&&a.lastExcludeReason_===o;i&&s&&(delete a.excludeUntil,ie.log.warn(`enabling non-HD playlist ${a.id} because all playlists were excluded due to ${o} key IDs`))})}addKeyStatus_(t,o){const s=(typeof t=="string"?t:EK(t)).slice(0,32).toLowerCase();this.logger_(`KeyStatus '${o}' with key ID ${s} added to the keyStatusMap`),this.keyStatusMap_.set(s,o)}updatePlaylistByKeyStatus(t,o){this.addKeyStatus_(t,o),this.waitingForFastQualityPlaylistReceived_||this.excludeNonUsableThenChangePlaylist_(),this.mainPlaylistLoader_.off("loadedplaylist",this.excludeNonUsableThenChangePlaylist_.bind(this)),this.mainPlaylistLoader_.on("loadedplaylist",this.excludeNonUsableThenChangePlaylist_.bind(this))}excludeNonUsableThenChangePlaylist_(){this.excludeNonUsablePlaylistsByKeyId_(),this.fastQualityChange_()}}const eQ=(n,t,o)=>a=>{const i=n.main.playlists[t],s=Sp(i),l=Lu(i);if(typeof a>"u")return l;a?delete i.disabled:i.disabled=!0;const r={renditionInfo:{id:t,bandwidth:i.attributes.BANDWIDTH,resolution:i.attributes.RESOLUTION,codecs:i.attributes.CODECS},cause:"fast-quality"};return a!==l&&!s&&(a?(o(i),n.trigger({type:"renditionenabled",metadata:r})):n.trigger({type:"renditiondisabled",metadata:r})),a};class tQ{constructor(t,o,a){const{playlistController_:i}=t,s=i.fastQualityChange_.bind(i);if(o.attributes){const l=o.attributes.RESOLUTION;this.width=l&&l.width,this.height=l&&l.height,this.bandwidth=o.attributes.BANDWIDTH,this.frameRate=o.attributes["FRAME-RATE"]}this.codecs=ll(i.main(),o),this.playlist=o,this.id=a,this.enabled=eQ(t.playlists,o.id,s)}}const nQ=function(n){n.representations=()=>{const t=n.playlistController_.main(),o=Al(t)?n.playlistController_.getAudioTrackPlaylists_():t.playlists;return o?o.filter(a=>!Sp(a)).map((a,i)=>new tQ(n,a,a.id)):[]}},Eg=["seeking","seeked","pause","playing","error"];class oQ extends ie.EventTarget{constructor(t){super(),this.playlistController_=t.playlistController,this.tech_=t.tech,this.seekable=t.seekable,this.allowSeeksWithinUnsafeLiveWindow=t.allowSeeksWithinUnsafeLiveWindow,this.liveRangeSafeTimeDelta=t.liveRangeSafeTimeDelta,this.media=t.media,this.playedRanges_=[],this.consecutiveUpdates=0,this.lastRecordedTime=null,this.checkCurrentTimeTimeout_=null,this.logger_=so("PlaybackWatcher"),this.logger_("initialize");const o=()=>this.monitorCurrentTime_(),a=()=>this.monitorCurrentTime_(),i=()=>this.techWaiting_(),s=()=>this.resetTimeUpdate_(),l=this.playlistController_,r=["main","subtitle","audio"],u={};r.forEach(f=>{u[f]={reset:()=>this.resetSegmentDownloads_(f),updateend:()=>this.checkSegmentDownloads_(f)},l[`${f}SegmentLoader_`].on("appendsdone",u[f].updateend),l[`${f}SegmentLoader_`].on("playlistupdate",u[f].reset),this.tech_.on(["seeked","seeking"],u[f].reset)});const c=f=>{["main","audio"].forEach(m=>{l[`${m}SegmentLoader_`][f]("appended",this.seekingAppendCheck_)})};this.seekingAppendCheck_=()=>{this.fixesBadSeeks_()&&(this.consecutiveUpdates=0,this.lastRecordedTime=this.tech_.currentTime(),c("off"))},this.clearSeekingAppendCheck_=()=>c("off"),this.watchForBadSeeking_=()=>{this.clearSeekingAppendCheck_(),c("on")},this.tech_.on("seeked",this.clearSeekingAppendCheck_),this.tech_.on("seeking",this.watchForBadSeeking_),this.tech_.on("waiting",i),this.tech_.on(Eg,s),this.tech_.on("canplay",a),this.tech_.one("play",o),this.dispose=()=>{this.clearSeekingAppendCheck_(),this.logger_("dispose"),this.tech_.off("waiting",i),this.tech_.off(Eg,s),this.tech_.off("canplay",a),this.tech_.off("play",o),this.tech_.off("seeking",this.watchForBadSeeking_),this.tech_.off("seeked",this.clearSeekingAppendCheck_),r.forEach(f=>{l[`${f}SegmentLoader_`].off("appendsdone",u[f].updateend),l[`${f}SegmentLoader_`].off("playlistupdate",u[f].reset),this.tech_.off(["seeked","seeking"],u[f].reset)}),this.checkCurrentTimeTimeout_&&X.clearTimeout(this.checkCurrentTimeTimeout_),this.resetTimeUpdate_()}}monitorCurrentTime_(){this.checkCurrentTime_(),this.checkCurrentTimeTimeout_&&X.clearTimeout(this.checkCurrentTimeTimeout_),this.checkCurrentTimeTimeout_=X.setTimeout(this.monitorCurrentTime_.bind(this),250)}resetSegmentDownloads_(t){const o=this.playlistController_[`${t}SegmentLoader_`];this[`${t}StalledDownloads_`]>0&&this.logger_(`resetting possible stalled download count for ${t} loader`),this[`${t}StalledDownloads_`]=0,this[`${t}Buffered_`]=o.buffered_()}checkSegmentDownloads_(t){const o=this.playlistController_,a=o[`${t}SegmentLoader_`],i=a.buffered_(),s=HX(this[`${t}Buffered_`],i);if(this[`${t}Buffered_`]=i,s){const l={bufferedRanges:i};o.trigger({type:"bufferedrangeschanged",metadata:l}),this.resetSegmentDownloads_(t);return}this[`${t}StalledDownloads_`]++,this.logger_(`found #${this[`${t}StalledDownloads_`]} ${t} appends that did not increase buffer (possible stalled download)`,{playlistId:a.playlist_&&a.playlist_.id,buffered:Ra(i)}),!(this[`${t}StalledDownloads_`]<10)&&(this.logger_(`${t} loader stalled download exclusion`),this.resetSegmentDownloads_(t),this.tech_.trigger({type:"usage",name:`vhs-${t}-download-exclusion`}),t!=="subtitle"&&o.excludePlaylist({error:{message:`Excessive ${t} segment downloading detected.`},playlistExclusionDuration:1/0}))}checkCurrentTime_(){if(this.tech_.paused()||this.tech_.seeking())return;const t=this.tech_.currentTime(),o=this.tech_.buffered();if(this.lastRecordedTime===t&&(!o.length||t+To>=o.end(o.length-1)))return this.techWaiting_();if(this.consecutiveUpdates>=5&&t===this.lastRecordedTime)this.consecutiveUpdates++,this.waiting_();else if(t===this.lastRecordedTime)this.consecutiveUpdates++;else{this.playedRanges_.push(Wt([this.lastRecordedTime,t]));const a={playedRanges:this.playedRanges_};this.playlistController_.trigger({type:"playedrangeschanged",metadata:a}),this.consecutiveUpdates=0,this.lastRecordedTime=t}}resetTimeUpdate_(){this.consecutiveUpdates=0}fixesBadSeeks_(){if(!this.tech_.seeking())return!1;const o=this.seekable(),a=this.tech_.currentTime(),i=this.afterSeekableWindow_(o,a,this.media(),this.allowSeeksWithinUnsafeLiveWindow);let s;if(i&&(s=o.end(o.length-1)),this.beforeSeekableWindow_(o,a)){const g=o.start(0);s=g+(g===o.end(0)?0:To)}if(typeof s<"u")return this.logger_(`Trying to seek outside of seekable at time ${a} with seekable range ${I1(o)}. Seeking to ${s}.`),this.tech_.setCurrentTime(s),!0;const l=this.playlistController_.sourceUpdater_,r=this.tech_.buffered(),u=l.audioBuffer?l.audioBuffered():null,c=l.videoBuffer?l.videoBuffered():null,f=this.media(),m=f.partTargetDuration?f.partTargetDuration:(f.targetDuration-Eo)*2,d=[u,c];for(let g=0;g<d.length;g++){if(!d[g])continue;if(Tp(d[g],a)<m)return!1}const h=fr(r,a);return h.length===0?!1:(s=h.start(0)+To,this.logger_(`Buffered region starts (${h.start(0)}) just beyond seek point (${a}). Seeking to ${s}.`),this.tech_.setCurrentTime(s),!0)}waiting_(){if(this.techWaiting_())return;const t=this.tech_.currentTime(),o=this.tech_.buffered(),a=ki(o,t);if(a.length&&t+3<=a.end(0)){this.resetTimeUpdate_(),this.tech_.setCurrentTime(t),this.logger_(`Stopped at ${t} while inside a buffered region [${a.start(0)} -> ${a.end(0)}]. Attempting to resume playback by seeking to the current time.`),this.tech_.trigger({type:"usage",name:"vhs-unknown-waiting"});return}}techWaiting_(){const t=this.seekable(),o=this.tech_.currentTime();if(this.tech_.seeking())return!0;if(this.beforeSeekableWindow_(t,o)){const r=t.end(t.length-1);return this.logger_(`Fell out of live window at time ${o}. Seeking to live point (seekable end) ${r}`),this.resetTimeUpdate_(),this.tech_.setCurrentTime(r),this.tech_.trigger({type:"usage",name:"vhs-live-resync"}),!0}const a=this.tech_.vhs.playlistController_.sourceUpdater_,i=this.tech_.buffered();if(this.videoUnderflow_({audioBuffered:a.audioBuffered(),videoBuffered:a.videoBuffered(),currentTime:o}))return this.resetTimeUpdate_(),this.tech_.setCurrentTime(o),this.tech_.trigger({type:"usage",name:"vhs-video-underflow"}),!0;const l=fr(i,o);return l.length>0?(this.logger_(`Stopped at ${o} and seeking to ${l.start(0)}`),this.resetTimeUpdate_(),this.skipTheGap_(o),!0):!1}afterSeekableWindow_(t,o,a,i=!1){if(!t.length)return!1;let s=t.end(t.length-1)+To;const l=!a.endList,r=typeof a.partTargetDuration=="number";return l&&(r||i)&&(s=t.end(t.length-1)+a.targetDuration*3),o>s}beforeSeekableWindow_(t,o){return!!(t.length&&t.start(0)>0&&o<t.start(0)-this.liveRangeSafeTimeDelta)}videoUnderflow_({videoBuffered:t,audioBuffered:o,currentTime:a}){if(!t)return;let i;if(t.length&&o.length){const s=ki(t,a-3),l=ki(t,a),r=ki(o,a);r.length&&!l.length&&s.length&&(i={start:s.end(0),end:r.end(0)})}else fr(t,a).length||(i=this.gapFromVideoUnderflow_(t,a));return i?(this.logger_(`Encountered a gap in video from ${i.start} to ${i.end}. Seeking to current time ${a}`),!0):!1}skipTheGap_(t){const o=this.tech_.buffered(),a=this.tech_.currentTime(),i=fr(o,a);if(this.resetTimeUpdate_(),i.length===0||a!==t)return;this.logger_("skipTheGap_:","currentTime:",a,"scheduled currentTime:",t,"nextRange start:",i.start(0)),this.tech_.setCurrentTime(i.start(0)+Eo);const s={gapInfo:{from:a,to:i.start(0)}};this.playlistController_.trigger({type:"gapjumped",metadata:s}),this.tech_.trigger({type:"usage",name:"vhs-gap-skip"})}gapFromVideoUnderflow_(t,o){const a=UX(t);for(let i=0;i<a.length;i++){const s=a.start(i),l=a.end(i);if(o-s<4&&o-s>2)return{start:s,end:l}}return null}}const aQ={errorInterval:30,getSource(n){const o=this.tech({IWillNotUseThisInPlugins:!0}).currentSource_||this.currentSource();return n(o)}},Ty=function(n,t){let o=0,a=0;const i=at(aQ,t);n.ready(()=>{n.trigger({type:"usage",name:"vhs-error-reload-initialized"})});const s=function(){a&&n.currentTime(a)},l=function(f){f!=null&&(a=n.duration()!==1/0&&n.currentTime()||0,n.one("loadedmetadata",s),n.src(f),n.trigger({type:"usage",name:"vhs-error-reload"}),n.play())},r=function(){if(Date.now()-o<i.errorInterval*1e3){n.trigger({type:"usage",name:"vhs-error-reload-canceled"});return}if(!i.getSource||typeof i.getSource!="function"){ie.log.error("ERROR: reloadSourceOnError - The option getSource must be a function!");return}return o=Date.now(),i.getSource.call(n,l)},u=function(){n.off("loadedmetadata",s),n.off("error",r),n.off("dispose",u)},c=function(f){u(),Ty(n,f)};n.on("error",r),n.on("dispose",u),n.reloadSourceOnError=c},iQ=function(n){Ty(this,n)};var Ny="3.17.2",sQ="7.1.0",lQ="1.3.1",rQ="7.2.0",dQ="4.0.2";const xt={PlaylistLoader:Ei,Playlist:En,utils:hY,STANDARD_PLAYLIST_SELECTOR:hg,INITIAL_PLAYLIST_SELECTOR:tK,lastBandwidthSelector:hg,movingAverageBandwidthSelector:ZY,comparePlaylistBandwidth:Pp,comparePlaylistResolution:JY,xhr:ty()};Object.keys(zt).forEach(n=>{Object.defineProperty(xt,n,{get(){return ie.log.warn(`using Vhs.${n} is UNSAFE be sure you know what you are doing`),zt[n]},set(t){if(ie.log.warn(`using Vhs.${n} is UNSAFE be sure you know what you are doing`),typeof t!="number"||t<0){ie.log.warn(`value of Vhs.${n} must be greater than or equal to 0`);return}zt[n]=t}})});const Sy="videojs-vhs",By=function(n,t){const o=t.media();let a=-1;for(let i=0;i<n.length;i++)if(n[i].id===o.id){a=i;break}n.selectedIndex_=a,n.trigger({selectedIndex:a,type:"change"})},uQ=function(n,t){t.representations().forEach(o=>{n.addQualityLevel(o)}),By(n,t.playlists)};xt.canPlaySource=function(){return ie.log.warn("VHS is no longer a tech. Please remove it from your player's techOrder.")};const cQ=(n,t,o)=>{if(!n)return n;let a={};t&&t.attributes&&t.attributes.CODECS&&(a=wl(xo(t.attributes.CODECS))),o&&o.attributes&&o.attributes.CODECS&&(a.audio=o.attributes.CODECS);const i=Fi(a.video),s=Fi(a.audio),l={};for(const r in n)l[r]={},s&&(l[r].audioContentType=s),i&&(l[r].videoContentType=i),t.contentProtection&&t.contentProtection[r]&&t.contentProtection[r].pssh&&(l[r].pssh=t.contentProtection[r].pssh),typeof n[r]=="string"&&(l[r].url=n[r]);return at(n,l)},mQ=(n,t)=>n.reduce((o,a)=>{if(!a.contentProtection)return o;const i=t.reduce((s,l)=>{const r=a.contentProtection[l];return r&&r.pssh&&(s[l]={pssh:r.pssh}),s},{});return Object.keys(i).length&&o.push(i),o},[]),pQ=({player:n,sourceKeySystems:t,audioMedia:o,mainPlaylists:a})=>{if(!n.eme.initializeMediaKeys)return Promise.resolve();const i=o?a.concat([o]):a,s=mQ(i,Object.keys(t)),l=[],r=[];return s.forEach(u=>{r.push(new Promise((c,f)=>{n.tech_.one("keysessioncreated",c)})),l.push(new Promise((c,f)=>{n.eme.initializeMediaKeys({keySystems:u},m=>{if(m){f(m);return}c()})}))}),Promise.race([Promise.all(l),Promise.race(r)])},hQ=({player:n,sourceKeySystems:t,media:o,audioMedia:a})=>{const i=cQ(t,o,a);return i?(n.currentSource().keySystems=i,i&&!n.eme?(ie.log.warn("DRM encrypted source cannot be decrypted without a DRM plugin"),!1):!0):!1},Dy=()=>{if(!X.localStorage)return null;const n=X.localStorage.getItem(Sy);if(!n)return null;try{return JSON.parse(n)}catch{return null}},fQ=n=>{if(!X.localStorage)return!1;let t=Dy();t=t?at(t,n):n;try{X.localStorage.setItem(Sy,JSON.stringify(t))}catch{return!1}return t},gQ=n=>n.toLowerCase().indexOf("data:application/vnd.videojs.vhs+json,")===0?JSON.parse(n.substring(n.indexOf(",")+1)):n,Py=(n,t)=>{n._requestCallbackSet||(n._requestCallbackSet=new Set),n._requestCallbackSet.add(t)},$y=(n,t)=>{n._responseCallbackSet||(n._responseCallbackSet=new Set),n._responseCallbackSet.add(t)},Ay=(n,t)=>{n._requestCallbackSet&&(n._requestCallbackSet.delete(t),n._requestCallbackSet.size||delete n._requestCallbackSet)},Ly=(n,t)=>{n._responseCallbackSet&&(n._responseCallbackSet.delete(t),n._responseCallbackSet.size||delete n._responseCallbackSet)};xt.supportsNativeHls=function(){if(!ge||!ge.createElement)return!1;const n=ge.createElement("video");return ie.getTech("Html5").isSupported()?["application/vnd.apple.mpegurl","audio/mpegurl","audio/x-mpegurl","application/x-mpegurl","video/x-mpegurl","video/mpegurl","application/mpegurl"].some(function(o){return/maybe|probably/i.test(n.canPlayType(o))}):!1}();xt.supportsNativeDash=function(){return!ge||!ge.createElement||!ie.getTech("Html5").isSupported()?!1:/maybe|probably/i.test(ge.createElement("video").canPlayType("application/dash+xml"))}();xt.supportsTypeNatively=n=>n==="hls"?xt.supportsNativeHls:n==="dash"?xt.supportsNativeDash:!1;xt.isSupported=function(){return ie.log.warn("VHS is no longer a tech. Please remove it from your player's techOrder.")};xt.xhr.onRequest=function(n){Py(xt.xhr,n)};xt.xhr.onResponse=function(n){$y(xt.xhr,n)};xt.xhr.offRequest=function(n){Ay(xt.xhr,n)};xt.xhr.offResponse=function(n){Ly(xt.xhr,n)};const vQ=ie.getComponent("Component");class Iy extends vQ{constructor(t,o,a){if(super(o,a.vhs),typeof a.initialBandwidth=="number"&&(this.options_.bandwidth=a.initialBandwidth),this.logger_=so("VhsHandler"),o.options_&&o.options_.playerId){const i=ie.getPlayer(o.options_.playerId);this.player_=i}if(this.tech_=o,this.source_=t,this.stats={},this.ignoreNextSeekingEvent_=!1,this.setOptions_(),this.options_.overrideNative&&o.overrideNativeAudioTracks&&o.overrideNativeVideoTracks)o.overrideNativeAudioTracks(!0),o.overrideNativeVideoTracks(!0);else if(this.options_.overrideNative&&(o.featuresNativeVideoTracks||o.featuresNativeAudioTracks))throw new Error("Overriding native VHS requires emulated tracks. See https://git.io/vMpjB");this.on(ge,["fullscreenchange","webkitfullscreenchange","mozfullscreenchange","MSFullscreenChange"],i=>{const s=ge.fullscreenElement||ge.webkitFullscreenElement||ge.mozFullScreenElement||ge.msFullscreenElement;s&&s.contains(this.tech_.el())?this.playlistController_.fastQualityChange_():this.playlistController_.checkABR_()}),this.on(this.tech_,"seeking",function(){if(this.ignoreNextSeekingEvent_){this.ignoreNextSeekingEvent_=!1;return}this.setCurrentTime(this.tech_.currentTime())}),this.on(this.tech_,"error",function(){this.tech_.error()&&this.playlistController_&&this.playlistController_.pauseLoading()}),this.on(this.tech_,"play",this.play)}setOptions_(t={}){if(this.options_=at(this.options_,t),this.options_.withCredentials=this.options_.withCredentials||!1,this.options_.limitRenditionByPlayerDimensions=this.options_.limitRenditionByPlayerDimensions!==!1,this.options_.useDevicePixelRatio=this.options_.useDevicePixelRatio||!1,this.options_.usePlayerObjectFit=this.options_.usePlayerObjectFit||!1,this.options_.useBandwidthFromLocalStorage=typeof this.source_.useBandwidthFromLocalStorage<"u"?this.source_.useBandwidthFromLocalStorage:this.options_.useBandwidthFromLocalStorage||!1,this.options_.useForcedSubtitles=this.options_.useForcedSubtitles||!1,this.options_.useNetworkInformationApi=typeof this.options_.useNetworkInformationApi<"u"?this.options_.useNetworkInformationApi:!0,this.options_.useDtsForTimestampOffset=this.options_.useDtsForTimestampOffset||!1,this.options_.customTagParsers=this.options_.customTagParsers||[],this.options_.customTagMappers=this.options_.customTagMappers||[],this.options_.cacheEncryptionKeys=this.options_.cacheEncryptionKeys||!1,this.options_.llhls=this.options_.llhls!==!1,this.options_.bufferBasedABR=this.options_.bufferBasedABR||!1,typeof this.options_.playlistExclusionDuration!="number"&&(this.options_.playlistExclusionDuration=60),typeof this.options_.bandwidth!="number"&&this.options_.useBandwidthFromLocalStorage){const a=Dy();a&&a.bandwidth&&(this.options_.bandwidth=a.bandwidth,this.tech_.trigger({type:"usage",name:"vhs-bandwidth-from-local-storage"})),a&&a.throughput&&(this.options_.throughput=a.throughput,this.tech_.trigger({type:"usage",name:"vhs-throughput-from-local-storage"}))}typeof this.options_.bandwidth!="number"&&(this.options_.bandwidth=zt.INITIAL_BANDWIDTH),this.options_.enableLowInitialPlaylist=this.options_.enableLowInitialPlaylist&&this.options_.bandwidth===zt.INITIAL_BANDWIDTH,["withCredentials","useDevicePixelRatio","usePlayerObjectFit","customPixelRatio","limitRenditionByPlayerDimensions","bandwidth","customTagParsers","customTagMappers","cacheEncryptionKeys","playlistSelector","initialPlaylistSelector","bufferBasedABR","liveRangeSafeTimeDelta","llhls","useForcedSubtitles","useNetworkInformationApi","useDtsForTimestampOffset","exactManifestTimings","leastPixelDiffSelector"].forEach(a=>{typeof this.source_[a]<"u"&&(this.options_[a]=this.source_[a])}),this.limitRenditionByPlayerDimensions=this.options_.limitRenditionByPlayerDimensions,this.useDevicePixelRatio=this.options_.useDevicePixelRatio,this.usePlayerObjectFit=this.options_.usePlayerObjectFit;const o=this.options_.customPixelRatio;typeof o=="number"&&o>=0&&(this.customPixelRatio=o)}setOptions(t={}){this.setOptions_(t)}src(t,o){if(!t)return;this.setOptions_(),this.options_.src=gQ(this.source_.src),this.options_.tech=this.tech_,this.options_.externVhs=xt,this.options_.sourceType=Sv(o),this.options_.seekTo=s=>{this.tech_.setCurrentTime(s)},this.options_.player_=this.player_,this.playlistController_=new ZK(this.options_);const a=at({liveRangeSafeTimeDelta:To},this.options_,{seekable:()=>this.seekable(),media:()=>this.playlistController_.media(),playlistController:this.playlistController_});this.playbackWatcher_=new oQ(a),this.attachStreamingEventListeners_(),this.playlistController_.on("error",()=>{const s=ie.players[this.tech_.options_.playerId];let l=this.playlistController_.error;typeof l=="object"&&!l.code?l.code=3:typeof l=="string"&&(l={message:l,code:3}),s.error(l)});const i=this.options_.bufferBasedABR?xt.movingAverageBandwidthSelector(.55):xt.STANDARD_PLAYLIST_SELECTOR;this.playlistController_.selectPlaylist=this.selectPlaylist?this.selectPlaylist.bind(this):i.bind(this),this.playlistController_.selectInitialPlaylist=xt.INITIAL_PLAYLIST_SELECTOR.bind(this),this.playlists=this.playlistController_.mainPlaylistLoader_,this.mediaSource=this.playlistController_.mediaSource,Object.defineProperties(this,{selectPlaylist:{get(){return this.playlistController_.selectPlaylist},set(s){this.playlistController_.selectPlaylist=s.bind(this)}},throughput:{get(){return this.playlistController_.mainSegmentLoader_.throughput.rate},set(s){this.playlistController_.mainSegmentLoader_.throughput.rate=s,this.playlistController_.mainSegmentLoader_.throughput.count=1}},bandwidth:{get(){let s=this.playlistController_.mainSegmentLoader_.bandwidth;const l=X.navigator.connection||X.navigator.mozConnection||X.navigator.webkitConnection,r=1e7;if(this.options_.useNetworkInformationApi&&l){const u=l.downlink*1e3*1e3;u>=r&&s>=r?s=Math.max(s,u):s=u}return s},set(s){this.playlistController_.mainSegmentLoader_.bandwidth=s,this.playlistController_.mainSegmentLoader_.throughput={rate:0,count:0}}},systemBandwidth:{get(){const s=1/(this.bandwidth||1);let l;return this.throughput>0?l=1/this.throughput:l=0,Math.floor(1/(s+l))},set(){ie.log.error('The "systemBandwidth" property is read-only')}}}),this.options_.bandwidth&&(this.bandwidth=this.options_.bandwidth),this.options_.throughput&&(this.throughput=this.options_.throughput),Object.defineProperties(this.stats,{bandwidth:{get:()=>this.bandwidth||0,enumerable:!0},mediaRequests:{get:()=>this.playlistController_.mediaRequests_()||0,enumerable:!0},mediaRequestsAborted:{get:()=>this.playlistController_.mediaRequestsAborted_()||0,enumerable:!0},mediaRequestsTimedout:{get:()=>this.playlistController_.mediaRequestsTimedout_()||0,enumerable:!0},mediaRequestsErrored:{get:()=>this.playlistController_.mediaRequestsErrored_()||0,enumerable:!0},mediaTransferDuration:{get:()=>this.playlistController_.mediaTransferDuration_()||0,enumerable:!0},mediaBytesTransferred:{get:()=>this.playlistController_.mediaBytesTransferred_()||0,enumerable:!0},mediaSecondsLoaded:{get:()=>this.playlistController_.mediaSecondsLoaded_()||0,enumerable:!0},mediaAppends:{get:()=>this.playlistController_.mediaAppends_()||0,enumerable:!0},mainAppendsToLoadedData:{get:()=>this.playlistController_.mainAppendsToLoadedData_()||0,enumerable:!0},audioAppendsToLoadedData:{get:()=>this.playlistController_.audioAppendsToLoadedData_()||0,enumerable:!0},appendsToLoadedData:{get:()=>this.playlistController_.appendsToLoadedData_()||0,enumerable:!0},timeToLoadedData:{get:()=>this.playlistController_.timeToLoadedData_()||0,enumerable:!0},buffered:{get:()=>Ra(this.tech_.buffered()),enumerable:!0},currentTime:{get:()=>this.tech_.currentTime(),enumerable:!0},currentSource:{get:()=>this.tech_.currentSource_,enumerable:!0},currentTech:{get:()=>this.tech_.name_,enumerable:!0},duration:{get:()=>this.tech_.duration(),enumerable:!0},main:{get:()=>this.playlists.main,enumerable:!0},playerDimensions:{get:()=>this.tech_.currentDimensions(),enumerable:!0},seekable:{get:()=>Ra(this.tech_.seekable()),enumerable:!0},timestamp:{get:()=>Date.now(),enumerable:!0},videoPlaybackQuality:{get:()=>this.tech_.getVideoPlaybackQuality(),enumerable:!0}}),this.tech_.one("canplay",this.playlistController_.setupFirstPlay.bind(this.playlistController_)),this.tech_.on("bandwidthupdate",()=>{this.options_.useBandwidthFromLocalStorage&&fQ({bandwidth:this.bandwidth,throughput:Math.round(this.throughput)})}),this.playlistController_.on("selectedinitialmedia",()=>{nQ(this)}),this.playlistController_.sourceUpdater_.on("createdsourcebuffers",()=>{this.setupEme_()}),this.on(this.playlistController_,"progress",function(){this.tech_.trigger("progress")}),this.on(this.playlistController_,"firstplay",function(){this.ignoreNextSeekingEvent_=!0}),this.setupQualityLevels_(),this.tech_.el()&&(this.mediaSourceUrl_=X.URL.createObjectURL(this.playlistController_.mediaSource),(ie.browser.IS_ANY_SAFARI||ie.browser.IS_IOS)&&this.options_.overrideNative&&this.options_.sourceType==="hls"&&typeof this.tech_.addSourceElement=="function"?(this.tech_.addSourceElement(this.mediaSourceUrl_),this.tech_.addSourceElement(this.source_.src)):this.tech_.src(this.mediaSourceUrl_))}createKeySessions_(){const t=this.playlistController_.mediaTypes_.AUDIO.activePlaylistLoader;this.logger_("waiting for EME key session creation"),pQ({player:this.player_,sourceKeySystems:this.source_.keySystems,audioMedia:t&&t.media(),mainPlaylists:this.playlists.main.playlists}).then(()=>{this.logger_("created EME key session"),this.playlistController_.sourceUpdater_.initializedEme()}).catch(o=>{this.logger_("error while creating EME key session",o),this.player_.error({message:"Failed to initialize media keys for EME",code:3})})}handleWaitingForKey_(){this.logger_("waitingforkey fired, attempting to create any new key sessions"),this.createKeySessions_()}setupEme_(){const t=this.playlistController_.mediaTypes_.AUDIO.activePlaylistLoader,o=hQ({player:this.player_,sourceKeySystems:this.source_.keySystems,media:this.playlists.media(),audioMedia:t&&t.media()});if(this.player_.tech_.on("keystatuschange",a=>{this.playlistController_.updatePlaylistByKeyStatus(a.keyId,a.status)}),this.handleWaitingForKey_=this.handleWaitingForKey_.bind(this),this.player_.tech_.on("waitingforkey",this.handleWaitingForKey_),!o){this.playlistController_.sourceUpdater_.initializedEme();return}this.createKeySessions_()}setupQualityLevels_(){const t=ie.players[this.tech_.options_.playerId];!t||!t.qualityLevels||this.qualityLevels_||(this.qualityLevels_=t.qualityLevels(),this.playlistController_.on("selectedinitialmedia",()=>{uQ(this.qualityLevels_,this)}),this.playlists.on("mediachange",()=>{By(this.qualityLevels_,this.playlists)}))}static version(){return{"@videojs/http-streaming":Ny,"mux.js":sQ,"mpd-parser":lQ,"m3u8-parser":rQ,"aes-decrypter":dQ}}version(){return this.constructor.version()}canChangeType(){return Vy.canChangeType()}play(){this.playlistController_.play()}setCurrentTime(t){this.playlistController_.setCurrentTime(t)}duration(){return this.playlistController_.duration()}seekable(){return this.playlistController_.seekable()}dispose(){this.playbackWatcher_&&this.playbackWatcher_.dispose(),this.playlistController_&&this.playlistController_.dispose(),this.qualityLevels_&&this.qualityLevels_.dispose(),this.tech_&&this.tech_.vhs&&delete this.tech_.vhs,this.mediaSourceUrl_&&X.URL.revokeObjectURL&&(X.URL.revokeObjectURL(this.mediaSourceUrl_),this.mediaSourceUrl_=null),this.tech_&&this.tech_.off("waitingforkey",this.handleWaitingForKey_),super.dispose()}convertToProgramTime(t,o){return wY({playlist:this.playlistController_.media(),time:t,callback:o})}seekToProgramTime(t,o,a=!0,i=2){return sy({programTime:t,playlist:this.playlistController_.media(),retryCount:i,pauseAfterSeek:a,seekTo:this.options_.seekTo,tech:this.options_.tech,callback:o})}setupXhrHooks_(){this.xhr.onRequest=t=>{Py(this.xhr,t)},this.xhr.onResponse=t=>{$y(this.xhr,t)},this.xhr.offRequest=t=>{Ay(this.xhr,t)},this.xhr.offResponse=t=>{Ly(this.xhr,t)},this.player_.trigger("xhr-hooks-ready")}attachStreamingEventListeners_(){const t=["seekablerangeschanged","bufferedrangeschanged","contentsteeringloadstart","contentsteeringloadcomplete","contentsteeringparsed"],o=["gapjumped","playedrangeschanged"];t.forEach(a=>{this.playlistController_.on(a,i=>{this.player_.trigger(kt({},i))})}),o.forEach(a=>{this.playbackWatcher_.on(a,i=>{this.player_.trigger(kt({},i))})})}}const id={name:"videojs-http-streaming",VERSION:Ny,canHandleSource(n,t={}){const o=at(ie.options,t);return!o.vhs.experimentalUseMMS&&!nl("avc1.4d400d,mp4a.40.2",!1)?!1:id.canPlayType(n.type,o)},handleSource(n,t,o={}){const a=at(ie.options,o);return t.vhs=new Iy(n,t,a),t.vhs.xhr=ty(),t.vhs.setupXhrHooks_(),t.vhs.src(n.src,n.type),t.vhs},canPlayType(n,t){const o=Sv(n);if(!o)return"";const a=id.getOverrideNative(t);return!xt.supportsTypeNatively(o)||a?"maybe":""},getOverrideNative(n={}){const{vhs:t={}}=n,o=!(ie.browser.IS_ANY_SAFARI||ie.browser.IS_IOS),{overrideNative:a=o}=t;return a}},yQ=()=>nl("avc1.4d400d,mp4a.40.2",!0);yQ()&&ie.getTech("Html5").registerSourceHandler(id,0);ie.VhsHandler=Iy;ie.VhsSourceHandler=id;ie.Vhs=xt;ie.use||ie.registerComponent("Vhs",xt);ie.options.vhs=ie.options.vhs||{};(!ie.getPlugin||!ie.getPlugin("reloadSourceOnError"))&&ie.registerPlugin("reloadSourceOnError",iQ);const _Q={name:"MediaVideoPlayer",props:{url:{type:String,default:()=>""},poster:{type:String,default:()=>""}},data(){return{player:null}},mounted(){this.player=ie(this.$refs.videoPlayer,{autoplay:!1,controls:!0,muted:!0,fluid:!0,sources:[{src:this.url,type:"video/mp4"}],poster:this.poster})},beforeDestroy(){this.player&&this.player.dispose()}},bQ={ref:"videoPlayer",class:"video-js"};function wQ(n,t,o,a,i,s){return e.openBlock(),e.createElementBlock("video",bQ,null,512)}const xQ=ne(_Q,[["render",wQ],["__scopeId","data-v-3e044975"]]),VQ={name:"YoutubePlayer",props:{url:{type:String,default:()=>""},isPlaying:{type:Boolean,default:()=>!1},control:{type:Boolean,default:()=>!1},mute:{type:Boolean,default:()=>!1},autoplay:{type:Boolean,default:()=>!1}},data(){return{timestamp:Date.now(),isRender:!0,player:null}},watch:{isPlaying(){this.resetVideo()}},methods:{resetVideo(){this.player=null,this.isRender=!1,this.$nextTick(()=>{this.isRender=!0,this.$nextTick(()=>{setTimeout(this.initPlayer,300)})})},initPlayer(){if(!YT||!document.getElementById(`yt-player-${this.timestamp}`)){setTimeout(this.initPlayer,3e3);return}this.player||(this.player=new YT.Player(`yt-player-${this.timestamp}`,{origin:"http://localhost:3000/",events:{onStateChange:this.onPlayerStateChange}}))},onPlayerStateChange(){this.player.getPlayerState()==0&&this.$emit("playEnd")}},mounted(){this.$nextTick(()=>{setTimeout(this.initPlayer,300)})}},CQ={class:"youtube-player"},kQ=["id","src"];function EQ(n,t,o,a,i,s){return e.openBlock(),e.createElementBlock("div",CQ,[i.isRender?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(["video-foreground",{"show-control-n-fit":o.control}])},[e.createElementVNode("iframe",{id:`yt-player-${i.timestamp}`,ref:"player",width:"1280",height:"537",src:`${o.url}?enablejsapi=1&controls=${o.control?1:0}&autoplay=${o.autoplay||o.isPlaying}&mute=${o.mute?1:0}`,title:"YouTube video player",frameborder:"0",allow:"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture",allowfullscreen:"",sandbox:"allow-forms allow-pointer-lock allow-same-origin allow-scripts allow-top-navigation"},null,8,kQ)],2)):e.createCommentVNode("",!0)])}const TQ=ne(VQ,[["render",EQ],["__scopeId","data-v-ca2b2fbb"]]),NQ={name:"BilibiliPlayer",props:{url:{type:String,default:()=>""},poster:{type:String,default:()=>""},isPlaying:{type:Boolean,default:()=>!1},mute:{type:Boolean,default:()=>!1},autoplay:{type:Boolean,default:()=>!1}},data(){return{timestamp:Date.now(),isRender:!0,wrapperRatio:1}},computed:{isVideoWider(){return this.wrapperRatio>1}},watch:{isPlaying(n,t){this.resetVideo()}},methods:{resetVideo(){this.isRender=!1,this.$nextTick(()=>{this.isRender=!0})}},mounted(){this.$nextTick(()=>{this.wrapperRatio=this.$refs.wrapper.clientWidth/this.$refs.wrapper.clientHeight})}},SQ={class:"bilibili-player",ref:"wrapper"},BQ=["id","src"];function DQ(n,t,o,a,i,s){return e.openBlock(),e.createElementBlock("div",SQ,[e.createElementVNode("div",{class:e.normalizeClass(["video-foreground",[{"video-foreground--wider":s.isVideoWider,"video-foreground--higher":!s.isVideoWider}]])},[i.isRender?(e.openBlock(),e.createElementBlock("iframe",{key:0,id:`bilibili-player-${i.timestamp}`,scrolling:"no",border:"0",frameborder:"no",framespacing:"0",allowfullscreen:"true",src:`${o.url}&high_quality=1&danmaku=0&as_wide=1`},null,8,BQ)):e.createCommentVNode("",!0)],2)],512)}const PQ=ne(NQ,[["render",DQ],["__scopeId","data-v-40e15401"]]),$Q={name:"YoukuPlayer",props:{url:{type:String,default:()=>""},isPlaying:{type:Boolean,default:()=>!1}},data(){return{timestamp:Date.now(),isRender:!0}},methods:{resetVideo(){this.isRender=!1,this.$nextTick(()=>{this.isRender=!0})}}},AQ={class:"youku-player"},LQ=["src","id"];function IQ(n,t,o,a,i,s){return e.openBlock(),e.createElementBlock("div",AQ,[e.createElementVNode("iframe",{width:"1280",height:"537",src:`${o.url}?rel=0&autoplay=${o.isPlaying}`,frameborder:"0",allowfullscreen:"",id:`youku-player-${i.timestamp}`,sandbox:"allow-forms allow-pointer-lock allow-same-origin allow-scripts allow-top-navigation"},null,8,LQ)])}const OQ=ne($Q,[["render",IQ],["__scopeId","data-v-cf32c3a0"]]),MQ={name:"QqPlayer",props:{url:{type:String,default:()=>""},poster:{type:String,default:()=>""},isPlaying:{type:Boolean,default:()=>!1},mute:{type:Boolean,default:()=>!1},autoplay:{type:Boolean,default:()=>!1}},data(){return{timestamp:Date.now(),isRender:!0,player:null,wrapperRatio:1}},computed:{isVideoWider(){return this.wrapperRatio>1}},watch:{isPlaying(){this.resetVideo()}},methods:{resetVideo(){this.player=null,this.isRender=!1,this.$nextTick(()=>{this.isRender=!0,this.$nextTick(()=>{setTimeout(this.initPlayer,300)})})},initPlayer(){const n=document.getElementById(`qq-player-${this.timestamp}`);if(!Txp||!n){setTimeout(this.initPlayer,3e3);return}if(this.player)return;this.player=new Txp.Player({containerId:`qq-player-${this.timestamp}`,vid:this.url,width:"100%",height:"100%",autoplay:this.autoplay||this.$_vsWidth>=768||this.isPlaying,mini:!0,muted:this.mute,volume:this.mute?0:50});const t=n.querySelector("iframe");t.sandbox="allow-forms allow-pointer-lock allow-same-origin allow-scripts allow-top-navigation",this.player.on("playStateChange",this.onPlayerStateChange)},onPlayerStateChange(n){n.state==0&&this.$emit("playEnd")}},mounted(){this.$nextTick(()=>{this.wrapperRatio=this.$refs.wrapper.clientWidth/this.$refs.wrapper.clientHeight,setTimeout(this.initPlayer,300)})}},UQ={class:"qq-player",ref:"wrapper"},RQ=["id"],FQ={class:"qq-player__poster"},HQ=["src"];function jQ(n,t,o,a,i,s){return e.openBlock(),e.createElementBlock("div",UQ,[i.isRender?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(["video-foreground",[{"video-foreground--wider":s.isVideoWider,"video-foreground--higher":!s.isVideoWider}]])},[i.isRender?(e.openBlock(),e.createElementBlock("div",{key:0,class:"iframe",id:`qq-player-${i.timestamp}`},null,8,RQ)):e.createCommentVNode("",!0)],2)):e.createCommentVNode("",!0),e.withDirectives(e.createElementVNode("div",FQ,[e.createElementVNode("img",{src:o.poster,alt:"poster"},null,8,HQ)],512),[[e.vShow,!o.isPlaying&&!o.autoplay]])],512)}const zQ=ne(MQ,[["render",jQ],["__scopeId","data-v-719611b1"]]),qQ={name:"FbPlayer",props:{html:{type:String,default:()=>""}},mounted(){this.loadFacebookSDK()},methods:{loadFacebookSDK(){if(document.querySelector('script[src*="connect.facebook.net"]'))return;const n=document.createElement("script");n.async=!0,n.defer=!0,n.crossOrigin="anonymous",n.src="https://connect.facebook.net/zh_TW/sdk.js#xfbml=1&version=v14.0",n.nonce="5tyirFAy",document.body.appendChild(n)}}},WQ={class:"fb-player",ref:"wrapper"},GQ=["innerHTML"];function XQ(n,t,o,a,i,s){return e.openBlock(),e.createElementBlock("div",WQ,[t[0]||(t[0]=e.createElementVNode("div",{id:"fb-root"},null,-1)),e.createElementVNode("div",{innerHTML:o.html},null,8,GQ)],512)}const YQ=ne(qQ,[["render",XQ],["__scopeId","data-v-c5a2a3ed"]]),KQ={class:"media_video_wrap"},QQ={class:"img-wrapper"},JQ=e.defineComponent({name:"MediaVideo",__name:"index",props:{modelValue:{type:Object,default:()=>{}},isPreview:{type:Boolean,default:!0}},emits:["update:modelValue","handleDelete","handleCopy","handlePaste"],setup(n,{emit:t}){const o=n,a=t,i=e.ref(!1),s=()=>{var g;if(o.modelValue&&o.modelValue.data)return;const h={id:((g=o.modelValue)==null?void 0:g.id)||R(),type:"MediaVideo",onlyShowPc:!1,data:{width:"default",type:"inner",videoSrc:"https://mvideo.ycyw.com/2e1a9441vodgzp1253458132/a31402d51397757891052265568/SW8B19vOtzMA.mp4",videoThumbnail:"https://osswebsite.ycyw.com/media-library/ywies-bj/images/home/ywies-tx.jpg"}};a("update:modelValue",h)},l=e.computed(()=>{var h;return o.isPreview?!((h=o.modelValue)!=null&&h.onlyShowPc)||!Ne():!0}),r=e.ref(!1),u=e.ref(!1),c=e.computed(()=>{var p,b;const h=(b=(p=o.modelValue)==null?void 0:p.data)==null?void 0:b.width;return!h||h==="default"?"container-content":{small:"container-content-small",middle:"container-content-middle",max:"container-content-max"}[h]||"container-content"}),f=()=>{a("handleDelete",o.modelValue.id)},m=()=>{a("handleCopy",o.modelValue)},d=h=>{a("handlePaste",h)};return s(),(h,g)=>{var p,b,_,w,v,V,C,S,N,D,$,k;return e.openBlock(),e.createElementBlock(e.Fragment,null,[l.value?(e.openBlock(),e.createElementBlock("div",{key:0,class:"mediaVideo_wrap_box",onMouseenter:g[2]||(g[2]=A=>r.value=!0),onMouseleave:g[3]||(g[3]=A=>r.value=!1)},[e.createElementVNode("div",KQ,[e.createElementVNode("div",{class:e.normalizeClass(["media-video__container",c.value])},[e.createElementVNode("div",QQ,[((b=(p=n.modelValue)==null?void 0:p.data)==null?void 0:b.type)==="inner"?(e.openBlock(),e.createBlock(xQ,{key:0,url:n.modelValue.data.videoSrc,poster:n.modelValue.data.videoThumbnail},null,8,["url","poster"])):e.createCommentVNode("",!0),((w=(_=n.modelValue)==null?void 0:_.data)==null?void 0:w.type)==="youtube"?(e.openBlock(),e.createBlock(TQ,{key:1,url:n.modelValue.data.videoSrc,isPlaying:i.value,control:!0,autoplay:i.value},null,8,["url","isPlaying","autoplay"])):e.createCommentVNode("",!0),((V=(v=n.modelValue)==null?void 0:v.data)==null?void 0:V.type)==="bilibili"?(e.openBlock(),e.createBlock(PQ,{key:2,url:n.modelValue.data.videoSrc,isPlaying:i.value},null,8,["url","isPlaying"])):e.createCommentVNode("",!0),((S=(C=n.modelValue)==null?void 0:C.data)==null?void 0:S.type)==="youku"?(e.openBlock(),e.createBlock(OQ,{key:3,url:n.modelValue.data.videoSrc,isPlaying:i.value},null,8,["url","isPlaying"])):e.createCommentVNode("",!0),((D=(N=n.modelValue)==null?void 0:N.data)==null?void 0:D.type)==="qq"?(e.openBlock(),e.createBlock(zQ,{key:4,url:n.modelValue.data.videoSrc,isPlaying:i.value,autoplay:i.value},null,8,["url","isPlaying","autoplay"])):e.createCommentVNode("",!0),((k=($=n.modelValue)==null?void 0:$.data)==null?void 0:k.type)==="facebook"?(e.openBlock(),e.createBlock(YQ,{key:5,html:n.modelValue.data.videoSrc},null,8,["html"])):e.createCommentVNode("",!0)])],2)]),n.isPreview?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(Te,{key:0,show:r.value,"onUpdate:show":g[0]||(g[0]=A=>r.value=A),onHandleEdit:g[1]||(g[1]=A=>u.value=!0),onHandleDelete:f,onHandleCopy:m,onHandlePaste:d},null,8,["show"]))],32)):e.createCommentVNode("",!0),n.isPreview?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(sz,{key:1,show:u.value,"onUpdate:show":g[4]||(g[4]=A=>u.value=A),data:n.modelValue},null,8,["show","data"]))],64)}}}),Iu=ne(JQ,[["__scopeId","data-v-79406f1a"]]),ZQ=Object.freeze(Object.defineProperty({__proto__:null,default:Iu},Symbol.toStringTag,{value:"Module"})),eJ={class:"setting-content"},tJ={class:"setting-header flex items-center"},nJ=e.defineComponent({__name:"setting",props:{show:{type:Boolean,default:!1},data:{type:Object,default:()=>{}}},emits:["update:show"],setup(n,{emit:t}){e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./index-QFpkZqlg.js")));const o=t,a=()=>{o("update:show",!1)};return(i,s)=>{const l=e.resolveComponent("a-switch"),r=e.resolveComponent("a-option"),u=e.resolveComponent("a-select"),c=e.resolveComponent("a-input"),f=e.resolveComponent("a-drawer");return e.openBlock(),e.createBlock(f,{width:500,visible:n.show,footer:!1,onCancel:a,unmountOnClose:""},{title:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(n.data.type)+"组件编辑 ",1)]),default:e.withCtx(()=>[e.createElementVNode("div",eJ,[e.createElementVNode("div",tJ,[s[4]||(s[4]=e.createElementVNode("span",{class:"header-title"},"仅显示PC端",-1)),e.createVNode(l,{modelValue:n.data.onlyShowPc,"onUpdate:modelValue":s[0]||(s[0]=m=>n.data.onlyShowPc=m)},null,8,["modelValue"])]),s[9]||(s[9]=e.createElementVNode("p",{class:"item-title"},"组件宽度",-1)),e.createVNode(u,{modelValue:n.data.data.width,"onUpdate:modelValue":s[1]||(s[1]=m=>n.data.data.width=m),placeholder:"请选择","allow-clear":""},{default:e.withCtx(()=>[e.createVNode(r,{value:"default"},{default:e.withCtx(()=>[...s[5]||(s[5]=[e.createTextVNode("默认",-1)])]),_:1}),e.createVNode(r,{value:"small"},{default:e.withCtx(()=>[...s[6]||(s[6]=[e.createTextVNode("小",-1)])]),_:1}),e.createVNode(r,{value:"middle"},{default:e.withCtx(()=>[...s[7]||(s[7]=[e.createTextVNode("中",-1)])]),_:1}),e.createVNode(r,{value:"max"},{default:e.withCtx(()=>[...s[8]||(s[8]=[e.createTextVNode("大",-1)])]),_:1})]),_:1},8,["modelValue"]),s[10]||(s[10]=e.createElementVNode("p",{class:"item-title"},"标题",-1)),e.createVNode(c,{modelValue:n.data.data.title,"onUpdate:modelValue":s[2]||(s[2]=m=>n.data.data.title=m),placeholder:"请输入标题","allow-clear":""},null,8,["modelValue"]),s[11]||(s[11]=e.createElementVNode("p",{class:"item-title"},"链接",-1)),e.createVNode(c,{modelValue:n.data.data.link,"onUpdate:modelValue":s[3]||(s[3]=m=>n.data.data.link=m),placeholder:"请输入链接","allow-clear":""},null,8,["modelValue"])])]),_:1},8,["visible"])}}}),oJ=ne(nJ,[["__scopeId","data-v-1a0fd5b6"]]),aJ={class:"information-link__wrapper"},iJ={key:0},sJ=["innerHTML"],lJ={key:1,class:"information-link__btn btn p-0",type:"button"},rJ=["innerHTML"],dJ=e.defineComponent({name:"InformationLink",__name:"index",props:{modelValue:{type:Object,default:()=>{}},isPreview:{type:Boolean,default:!0}},emits:["update:modelValue","handleDelete","handleCopy","handlePaste","handleClick"],setup(n,{emit:t}){const o=n,a=t,i=h=>{a("handleClick",h)},s=e.computed(()=>{var h;return o.isPreview?!((h=o.modelValue)!=null&&h.onlyShowPc)||!Ne():!0}),l=()=>{var g;if(o.modelValue&&o.modelValue.data)return;const h={id:((g=o.modelValue)==null?void 0:g.id)||R(),type:"InformationLink",onlyShowPc:!1,data:{width:"default",title:"这里是标题",link:"https://www.baidu.com"}};a("update:modelValue",h)},r=e.ref(!1),u=e.ref(!1),c=e.computed(()=>{var p,b;const h=(b=(p=o.modelValue)==null?void 0:p.data)==null?void 0:b.width;return!h||h==="default"?"container-content":{small:"container-content-small",middle:"container-content-middle",max:"container-content-max"}[h]||"container-content"}),f=()=>{a("handleDelete",o.modelValue.id)},m=()=>{a("handleCopy",o.modelValue)},d=h=>{a("handlePaste",h)};return l(),(h,g)=>{var p,b,_,w,v,V,C,S;return e.openBlock(),e.createElementBlock(e.Fragment,null,[s.value?(e.openBlock(),e.createElementBlock("div",{key:0,class:"informationLink_wrap",onMouseenter:g[3]||(g[3]=N=>r.value=!0),onMouseleave:g[4]||(g[4]=N=>r.value=!1)},[e.createElementVNode("div",{class:e.normalizeClass(["media-image-full",c.value])},[e.createElementVNode("div",aJ,[(b=(p=n.modelValue)==null?void 0:p.data)!=null&&b.link?(e.openBlock(),e.createElementBlock("div",iJ,[(w=(_=n.modelValue)==null?void 0:_.data)!=null&&w.link?(e.openBlock(),e.createElementBlock("div",{key:0,target:"_blank",class:"information-link__btn btn p-0",onClick:g[0]||(g[0]=N=>{var D,$;return i(($=(D=n.modelValue)==null?void 0:D.data)==null?void 0:$.link)})},[e.createElementVNode("h6",{class:"information-link__title",innerHTML:(V=(v=n.modelValue)==null?void 0:v.data)==null?void 0:V.title},null,8,sJ),g[6]||(g[6]=e.createElementVNode("div",{class:"i i-arrow-next"},null,-1))])):e.createCommentVNode("",!0)])):(e.openBlock(),e.createElementBlock("button",lJ,[e.createElementVNode("h6",{class:"information-link__title",innerHTML:(S=(C=n.modelValue)==null?void 0:C.data)==null?void 0:S.title},null,8,rJ),g[7]||(g[7]=e.createElementVNode("div",{class:"i i-arrow-next"},null,-1))]))])],2),n.isPreview?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(Te,{key:0,show:r.value,"onUpdate:show":g[1]||(g[1]=N=>r.value=N),onHandleEdit:g[2]||(g[2]=N=>u.value=!0),onHandleDelete:f,onHandleCopy:m,onHandlePaste:d},null,8,["show"]))],32)):e.createCommentVNode("",!0),n.isPreview?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(oJ,{key:1,show:u.value,"onUpdate:show":g[5]||(g[5]=N=>u.value=N),data:n.modelValue},null,8,["show","data"]))],64)}}}),Ou=ne(dJ,[["__scopeId","data-v-b42edfbc"]]),uJ=Object.freeze(Object.defineProperty({__proto__:null,default:Ou},Symbol.toStringTag,{value:"Module"}));/*!
|
|
240
|
+
* vue-router v4.5.1
|
|
241
|
+
* (c) 2025 Eduardo San Martin Morote
|
|
242
|
+
* @license MIT
|
|
243
|
+
*/var Tg;(function(n){n.pop="pop",n.push="push"})(Tg||(Tg={}));var Ng;(function(n){n.back="back",n.forward="forward",n.unknown=""})(Ng||(Ng={}));Symbol(process.env.NODE_ENV!=="production"?"navigation failure":"");var Sg;(function(n){n[n.aborted=4]="aborted",n[n.cancelled=8]="cancelled",n[n.duplicated=16]="duplicated"})(Sg||(Sg={}));Symbol(process.env.NODE_ENV!=="production"?"router view location matched":"");Symbol(process.env.NODE_ENV!=="production"?"router view depth":"");const cJ=Symbol(process.env.NODE_ENV!=="production"?"router":""),mJ=Symbol(process.env.NODE_ENV!=="production"?"route location":"");Symbol(process.env.NODE_ENV!=="production"?"router view location":"");function $p(){return e.inject(cJ)}function Oy(n){return e.inject(mJ)}const pJ={key:0,class:"tab-primary__btn__img flex-center"},hJ=["src","alt"],fJ={key:1},gJ={__name:"TabPrimary",props:{tabList:{type:Array,default:()=>[]},currentIdx:{type:[String,Number],default:()=>0},isFixed:{type:Boolean,default:()=>!1},fullWidth:{type:Boolean,default:()=>!1}},emits:["updateCurrentIdx"],setup(n,{emit:t}){const{proxy:o}=e.getCurrentInstance(),{$_vsWidth:a,$_vsScrollY:i,$vsScreenAddListener:s,$vsScreenDestroyListener:l}=o,r=n,u=t,c=e.ref(null),f=e.ref(null),m=e.ref([]),d=e.ref(0),h=e.ref(.5*a.value),g=e.ref(0),p=e.ref(!0),b=e.ref(!0),_=e.ref(0),w=e.ref(!1),v=e.ref(0),V=e.ref(0),C=e.ref(0);e.ref(0);const S=e.ref(null),N=e.ref(null),D=e.ref(null),$=e.ref(null),k=e.ref(null),A=e.computed(()=>d.value-h.value),B=e.computed(()=>[{"--strip-width":`${A.value}px`},{"--strip-left":`${h.value}px`},{"--fix-left":`${g.value}px`},{transition:b.value?"left 0.2s ease-in-out, width 0.2s ease-in-out":""}]),I=e.computed(()=>v.value>0),z=e.computed(()=>V.value-v.value+Y.value>C.value),Y=e.computed(()=>{if(!w.value)return 24;const ae=c.value;return ae?window.getComputedStyle(ae,null).getPropertyValue("padding-right").split("px")[0]*2:24}),H=e.computed(()=>!1),q=$p();e.watch(()=>q.currentRoute.value.path,()=>{e.nextTick(O),D.value=setTimeout(()=>{e.nextTick(O)},500)}),e.watch(a,()=>{M(),Q()}),e.watch(()=>r.currentIdx,(ae,ce)=>{p.value=ae>ce,e.nextTick(O),e.nextTick(de)}),e.watch(()=>r.tabList,(ae,ce)=>{Q(),e.nextTick(()=>{O(0)})},{deep:!0}),e.watch(()=>r.isFixed,()=>{a.value>1200&&M(),e.nextTick(Q)});const O=ae=>{const ce=ae??250;p.value?(J(),$.value=setTimeout(F,ce)):(F(),$.value=setTimeout(J,ce)),k.value=setTimeout(()=>{b.value=!0},ce)},J=()=>{const ae=m.value;let ce=null;ae&&ae[r.currentIdx]&&(ce=ae[r.currentIdx]),ce&&ce.getBoundingClientRect&&(d.value=ce.getBoundingClientRect().right)},F=()=>{const ae=m.value;let ce=null;ae&&ae[r.currentIdx]&&(ce=ae[r.currentIdx]),ce&&ce.getBoundingClientRect&&(h.value=ce.getBoundingClientRect().left)},M=()=>{b.value=!1,e.nextTick(()=>O(0)),e.nextTick(W)},Q=()=>{const ae=c.value;if(ae){let ce=ae.getBoundingClientRect().left;g.value=(ae.offsetWidth-ae.getBoundingClientRect().width)/2+ce}},W=()=>{if(r.tabList.length<=0)return;const ae=f.value;ae&&(v.value=ae.scrollLeft,V.value=ae.scrollWidth);const ce=c.value;ce&&(C.value=ce.getBoundingClientRect().width)},Z=ae=>{f.value&&(ae=="next"?f.value.scrollLeft+=9999:f.value.scrollLeft-=9999)},de=()=>{const ae=m.value[r.currentIdx];if(!ae)return;const ce=ae.clientWidth/2,se=a.value/2;_.value=ae.getBoundingClientRect().right-ce,f.value&&(f.value.scrollLeft-=se-_.value)},Ve=(ae,ce)=>{ae||u("updateCurrentIdx",ce)},oe=ae=>ae?ae.includes("http")?"a":"RouterLink":"button",fe=ae=>ae&&!ae.includes("http")?ae:null,Ce=ae=>ae&&ae.includes("http")?ae:null,Se=ae=>ae&&ae.includes("http")?"_blank":null;return e.onMounted(()=>{w.value=!0,e.nextTick(()=>{O(0),S.value=setTimeout(M,300),Q(),e.nextTick(()=>{N.value=setTimeout(de,300)})})}),e.onBeforeUnmount(()=>{clearTimeout(S.value),clearTimeout(N.value),clearTimeout(D.value),clearTimeout($.value),clearTimeout(k.value),window.removeEventListener("resize",()=>{a.value=window.innerWidth})}),(ae,ce)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["tab-primary",[{"is-fixed":n.isFixed},{"is-campus":!H.value},{"is-full-width":n.fullWidth}]]),ref_key:"wrapper",ref:c},[e.createElementVNode("ul",{class:"tab-primary__list",ref_key:"list",ref:f,onScroll:M},[e.withDirectives(e.createElementVNode("div",{class:"tab-primary__nav__prev",onClick:ce[0]||(ce[0]=se=>Z("prev"))},null,512),[[e.vShow,I.value]]),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.tabList,(se,he)=>(e.openBlock(),e.createElementBlock("li",{key:he,class:e.normalizeClass(["tab-primary__item",[{"is-img":!!se.img}]])},[e.createElementVNode("div",{ref_for:!0,ref_key:"btnRefs",ref:m,class:"flex-center"},[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(oe(se.link)),{type:se.link?null:"button",to:fe(se.link),href:Ce(se.link),target:Se(se.link),class:e.normalizeClass(["tab-primary__btn",[{"is-active":n.currentIdx==he}]]),onClick:we=>Ve(se.link,he)},{default:e.withCtx(()=>[se.img?(e.openBlock(),e.createElementBlock("div",pJ,[e.createElementVNode("img",{src:se.img,alt:se.alt||se.name},null,8,hJ)])):(e.openBlock(),e.createElementBlock("div",fJ,e.toDisplayString(se.name),1))]),_:2},1032,["type","to","href","target","class","onClick"]))],512)],2))),128)),e.withDirectives(e.createElementVNode("div",{class:"tab-primary__nav__next",onClick:ce[1]||(ce[1]=se=>Z("next"))},null,512),[[e.vShow,z.value]])],544),e.createElementVNode("span",{class:"tab-primary__strip",style:e.normalizeStyle(B.value)},null,4)],2))}},vJ=ne(gJ,[["__scopeId","data-v-8df3b091"]]),yJ={class:"setting-content"},_J={class:"setting-header flex items-center"},bJ={class:"setting-body"},wJ={class:"setting-toolbar"},xJ={class:"tools"},VJ={class:"setting-item"},CJ={class:"item-header"},kJ={class:"btn-group"},EJ={key:0,class:"drag-handle"},TJ={class:"components-content"},NJ={class:"setting-body"},SJ={class:"setting-toolbar"},BJ={class:"tools"},DJ={class:"setting-item"},PJ={class:"item-header"},$J={class:"btn-group"},AJ={key:0,class:"drag-handle"},LJ={class:"components-content"},IJ=e.defineComponent({__name:"setting",props:{show:{type:Boolean,default:!1},data:{type:Object,default:()=>{}}},emits:["update:show"],setup(n,{emit:t}){const o=e.defineAsyncComponent(()=>import("vuedraggable")),a=e.ref(!1),i=e.computed(()=>({animation:200,group:"gallerys",disabled:!1,ghostClass:"ghost",handle:".drag-handle",filter:".arco-input, .arco-select, .arco-checkbox",preventOnFilter:!1})),s=e.computed(()=>({animation:200,group:"gallerys-above",disabled:!1,ghostClass:"ghost",handle:".drag-handle",filter:".arco-input, .arco-select, .arco-checkbox",preventOnFilter:!1})),l=d=>d&&d.length>1,r=n,u=t,c=()=>{u("update:show",!1)},f=d=>{var g;debugger;const h=r.data;d==="listAbove"?h.listAbove.push({id:R(),key:R(),name:"New Tab",componentsDataJson:[{id:((g=r.modelValue)==null?void 0:g.id)||R(),type:"BannerImage",onlyShowPc:!1,data:{title:"这里是标题",imgSrc:"https://osswebsite-test.cedim.cn/ywies-tx/static-images/about-ywies/01_About_YWIES_1_Header.jpg"}}]}):h.data.push({id:R(),key:R(),name:"New Tab",link:"/",componentsDataJson:[]})},m=(d,h)=>{h==="listAbove"?r.data.listAbove=r.data.listAbove.filter(g=>g.id!==d):r.data.data=r.data.data.filter(g=>g.id!==d)};return(d,h)=>{const g=e.resolveComponent("a-switch"),p=e.resolveComponent("icon-plus"),b=e.resolveComponent("a-button"),_=e.resolveComponent("icon-drag-arrow"),w=e.resolveComponent("icon-delete"),v=e.resolveComponent("a-input"),V=e.resolveComponent("a-drawer");return e.openBlock(),e.createBlock(V,{width:"60%",visible:n.show,footer:!1,onCancel:c,unmountOnClose:""},{title:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(n.data.type)+"组件编辑 ",1)]),default:e.withCtx(()=>[e.createElementVNode("div",yJ,[e.createElementVNode("div",_J,[h[13]||(h[13]=e.createElementVNode("span",{class:"header-title"},"仅显示PC端",-1)),e.createVNode(g,{modelValue:n.data.onlyShowPc,"onUpdate:modelValue":h[0]||(h[0]=C=>n.data.onlyShowPc=C)},null,8,["modelValue"])]),e.createElementVNode("div",bJ,[e.createElementVNode("div",wJ,[h[16]||(h[16]=e.createElementVNode("h1",null,"List Above",-1)),e.createElementVNode("div",xJ,[e.createVNode(b,{type:"primary",onClick:h[1]||(h[1]=C=>f("listAbove"))},{icon:e.withCtx(()=>[e.createVNode(p)]),default:e.withCtx(()=>[h[14]||(h[14]=e.createTextVNode(" 添加 List Above ",-1))]),_:1}),e.createVNode(b,{type:"primary",onClick:h[2]||(h[2]=C=>f("listAbove"))},{default:e.withCtx(()=>[...h[15]||(h[15]=[e.createTextVNode("粘贴 Tab",-1)])]),_:1})])]),e.createElementVNode("div",VJ,[e.createVNode(e.unref(o),e.mergeProps({modelValue:n.data.listAbove,"onUpdate:modelValue":h[4]||(h[4]=C=>n.data.listAbove=C),"component-data":{tag:"div",type:"transition-group",name:a.value?null:"flip-list"}},s.value,{disabled:!l(n.data.data),onStart:h[5]||(h[5]=C=>a.value=!0),onEnd:h[6]||(h[6]=C=>a.value=!1),"item-key":"id"}),{item:e.withCtx(({element:C})=>[(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["item-button draggable-item",{"sortable-disabled":!l(n.data.data)}]),key:C.id},[e.createElementVNode("div",CJ,[e.createElementVNode("div",null,[e.createElementVNode("h5",null,e.toDisplayString(C.name),1),e.createElementVNode("span",null,e.toDisplayString(C.key),1)]),e.createElementVNode("div",kJ,[l(n.data.data)?(e.openBlock(),e.createElementBlock("div",EJ,[e.createVNode(_,{class:"drag-icon"})])):e.createCommentVNode("",!0),e.createVNode(w,{class:"btn-delete",onClick:S=>m(C.id,"listAbove")},null,8,["onClick"]),e.createVNode(b,{size:"mini",type:"primary",onClick:h[3]||(h[3]=S=>f("Video"))},{default:e.withCtx(()=>[...h[17]||(h[17]=[e.createTextVNode("复制 Tab",-1)])]),_:1})])]),h[18]||(h[18]=e.createElementVNode("p",{class:"item-title"},"Tab名称",-1)),e.createVNode(v,{modelValue:C.name,"onUpdate:modelValue":S=>C.name=S,placeholder:"请输入标题","allow-clear":""},null,8,["modelValue","onUpdate:modelValue"]),h[19]||(h[19]=e.createElementVNode("p",{class:"item-title"},"Key",-1)),e.createVNode(v,{modelValue:C.key,"onUpdate:modelValue":S=>C.key=S,placeholder:"请输入key","allow-clear":""},null,8,["modelValue","onUpdate:modelValue"]),h[20]||(h[20]=e.createElementVNode("p",null,"components",-1)),e.createElementVNode("div",TJ,[e.createVNode(ml,{data:C.componentsDataJson,onUpdate:S=>C.componentsDataJson=S},null,8,["data","onUpdate"])])],2))]),_:1},16,["modelValue","component-data","disabled"])])]),e.createElementVNode("div",NJ,[e.createElementVNode("div",SJ,[h[23]||(h[23]=e.createElementVNode("h1",null,"List",-1)),e.createElementVNode("div",BJ,[e.createVNode(b,{type:"primary",onClick:h[7]||(h[7]=C=>f("Video"))},{icon:e.withCtx(()=>[e.createVNode(p)]),default:e.withCtx(()=>[h[21]||(h[21]=e.createTextVNode(" 添加 List ",-1))]),_:1}),e.createVNode(b,{type:"primary",onClick:h[8]||(h[8]=C=>f("Video"))},{default:e.withCtx(()=>[...h[22]||(h[22]=[e.createTextVNode("粘贴 Tab",-1)])]),_:1})])]),e.createElementVNode("div",DJ,[e.createVNode(e.unref(o),e.mergeProps({modelValue:n.data.data,"onUpdate:modelValue":h[10]||(h[10]=C=>n.data.data=C),"component-data":{tag:"div",type:"transition-group",name:a.value?null:"flip-list"}},i.value,{disabled:!l(n.data.data),onStart:h[11]||(h[11]=C=>a.value=!0),onEnd:h[12]||(h[12]=C=>a.value=!1),"item-key":"id"}),{item:e.withCtx(({element:C})=>[(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["item-button draggable-item",{"sortable-disabled":!l(n.data.data)}]),key:C.id},[e.createElementVNode("div",PJ,[e.createElementVNode("div",null,[e.createElementVNode("h5",null,e.toDisplayString(C.name),1),e.createElementVNode("span",null,e.toDisplayString(C.key),1)]),e.createElementVNode("div",$J,[l(n.data.data)?(e.openBlock(),e.createElementBlock("div",AJ,[e.createVNode(_,{class:"drag-icon"})])):e.createCommentVNode("",!0),e.createVNode(w,{class:"btn-delete",onClick:S=>m(C.id,"list")},null,8,["onClick"]),e.createVNode(b,{size:"mini",type:"primary",onClick:h[9]||(h[9]=S=>f("Video"))},{default:e.withCtx(()=>[...h[24]||(h[24]=[e.createTextVNode("复制 Tab",-1)])]),_:1})])]),h[25]||(h[25]=e.createElementVNode("p",{class:"item-title"},"Tab名称",-1)),e.createVNode(v,{modelValue:C.name,"onUpdate:modelValue":S=>C.name=S,placeholder:"请输入标题","allow-clear":""},null,8,["modelValue","onUpdate:modelValue"]),h[26]||(h[26]=e.createElementVNode("p",{class:"item-title"},"Key",-1)),e.createVNode(v,{modelValue:C.key,"onUpdate:modelValue":S=>C.key=S,placeholder:"请输入key","allow-clear":""},null,8,["modelValue","onUpdate:modelValue"]),h[27]||(h[27]=e.createElementVNode("p",null,"components",-1)),e.createElementVNode("div",LJ,[e.createVNode(ml,{data:C.componentsDataJson,onUpdate:S=>C.componentsDataJson=S},null,8,["data","onUpdate"])])],2))]),_:1},16,["modelValue","component-data","disabled"])])])])]),_:1},8,["visible"])}}}),OJ=ne(IJ,[["__scopeId","data-v-f4a07508"]]),MJ={class:"tab-page__above"},UJ={key:0},RJ={class:"tab-page__content"},FJ={key:0},Bg="",HJ={__name:"index",props:{modelValue:{type:Object,default:()=>({})},isPreview:{type:Boolean,default:!0}},emits:["update:modelValue","handleDelete","handleCopy","handlePaste"],setup(n,{emit:t}){const o=t,{proxy:a}=e.getCurrentInstance(),{$_vsWidth:i,$_vsScrollY:s,$vsScreenAddListener:l,$vsScreenDestroyListener:r}=a,u=n,c=Oy(),f=$p(),m=e.ref(0),d=e.ref(!1),h=e.ref(!0),g=e.ref(null),p=e.ref(null),b=e.ref(!1),_=e.ref(!1),w=Z=>{if(!Z)return{top:0,left:0};const de=Z.getBoundingClientRect(),Ve=window.pageYOffset||document.documentElement.scrollTop,oe=window.pageXOffset||document.documentElement.scrollLeft;return{top:de.top+Ve,left:de.left+oe}},v=e.computed(()=>{var Z;return((Z=u.modelValue)==null?void 0:Z.classes)??null}),V=e.computed(()=>{var Z;return((Z=u.modelValue)==null?void 0:Z.style)??null});e.computed(()=>{var Z;return((Z=u.modelValue)==null?void 0:Z.type)??"TabPrimary"});const C=e.computed(()=>{var Z;return((Z=u.modelValue)==null?void 0:Z.listAbove)??[]}),S=e.computed(()=>{var Z;return((Z=u.modelValue)==null?void 0:Z.data)??[]}),N=e.computed(()=>{var Z;return((Z=u.modelValue)==null?void 0:Z.fixed)??!0}),D=e.computed(()=>{var Z;return((Z=u.modelValue)==null?void 0:Z.resetToTop)??!0}),$=e.computed(()=>{var Z;return((Z=u.modelValue)==null?void 0:Z.scrollToTop)??!0}),k=e.computed(()=>{var Z;return((Z=u.modelValue)==null?void 0:Z.fullWidth)??!1});e.computed(()=>0),e.computed(()=>!1);const A=e.computed(()=>S.value.some(Z=>Z.img)),B=e.computed(()=>{var Z;return((Z=S.value[m.value])==null?void 0:Z.key)??null}),I=e.computed(()=>{var de;if(!((de=u.modelValue)!=null&&de.data)||!Array.isArray(u.modelValue.data))return[];const Z=u.modelValue.data[m.value];return Z?Z.componentsDataJson||[]:[]}),z=()=>{var de;if(u.modelValue&&u.modelValue.data)return;const Z={id:((de=u.modelValue)==null?void 0:de.id)||R(),type:"TabPage",onlyShowPc:!1,containerWidth:"",bgColor:"",classes:"custom-class another-class",style:{},width:"",listAbove:[],data:[{id:R(),key:R(),name:"New Tab1",componentsDataJson:[]},{id:R(),key:R(),name:"New Tab2",componentsDataJson:[]}]};o("update:modelValue",Z),m.value=0},Y=()=>{const Z=p.value;if(!Z)return;const de=Z.getBoundingClientRect().top,Ve=g.value;if(!Ve)return;const oe=Ve.getBoundingClientRect().top,fe=+window.getComputedStyle(document.body).getPropertyValue("--header-height-calc").split("px")[0];if(oe>fe){d.value=!1;return}de<=fe&&(d.value=!0)},H=()=>{if(c.hash){e.nextTick(()=>{setTimeout(q,500)});return}if(!$.value)return;let Z=0;D.value||(Z=w(g.value).top-170),window.scroll({top:Z,left:0,behavior:"smooth"})},q=()=>{if(!c.hash)return;const Z=document.querySelector(c.hash);if(!Z)return;const de=w(Z).top;window.scroll({top:de-170,left:0,behavior:"smooth"})},O=()=>{const Z=c.params.subpage;let de=S.value.findIndex(Se=>Se.key==Z);const Ve=F(),oe=S.value.findIndex(Se=>Se.key==Ve),fe=c.query.category,Ce=S.value.findIndex(Se=>Se.key==fe);if(de>=0)m.value=de;else if(Ce>-1)h.value=!1,m.value=Ce;else if(oe>-1)h.value=!1,m.value=oe;else if(S.value[0]&&S.value[0].link){console.log(S.value[0].link);let Se=c.path;Se.endsWith("/")&&(Se=Se.split("/"),Se.pop(),Se=Se.join("/"));const ae=`${Se}/${S.value[0].key}`;f.replace(ae)}e.nextTick(q)},J=Z=>{sessionStorage.setItem(Bg,Z)},F=()=>sessionStorage.getItem(Bg),M=(Z,de)=>{o("handleDelete",Z||u.modelValue.id,de)},Q=Z=>{o("handleCopy",Z||u.modelValue)},W=(Z,de)=>{o("handlePaste",Z,de)};return e.watch(()=>s.value,()=>{Y()}),e.watch(()=>c.params.subpage,()=>{O()}),e.watch(()=>c.query,()=>{O()},{deep:!0}),e.watch(m,()=>{J(B.value),h.value&&H(),h.value=!0}),e.watch(B,Z=>{Z||(m.value=0)}),e.onMounted(()=>{["article"].includes(c.params.section)||(z(),q(),O(),e.nextTick(Y),setTimeout(()=>{e.nextTick(Y)},200),setTimeout(()=>{e.nextTick(q)},1e3))}),(Z,de)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["tab-page",v.value]),style:e.normalizeStyle(V.value),onMouseover:de[10]||(de[10]=Ve=>_.value=!0),onMouseout:de[11]||(de[11]=Ve=>_.value=!1)},[e.createElementVNode("div",MJ,[e.createVNode(e.Transition,{name:"fade",mode:"out-in"},{default:e.withCtx(()=>[B.value?(e.openBlock(),e.createElementBlock("div",{key:B.value},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(C.value,Ve=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[B.value==Ve.key?(e.openBlock(),e.createElementBlock("div",UJ,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(Ve.componentsDataJson,(oe,fe)=>(e.openBlock(),e.createBlock(xa,{key:oe.id,type:oe.type,"props-data":{modelValue:oe,isPreview:!1},onHandleDelete:de[0]||(de[0]=Ce=>M(Ce,I.value)),onHandleCopy:de[1]||(de[1]=Ce=>Q(Ce)),onHandlePaste:de[2]||(de[2]=Ce=>W(Ce,I.value))},null,8,["type","props-data"]))),128))])):e.createCommentVNode("",!0)],64))),256))])):e.createCommentVNode("",!0)]),_:1})]),e.createElementVNode("div",{class:e.normalizeClass(["tab-page__hold",[{"is-fixed":d.value&&N.value},{"is-thick":A.value}]]),ref_key:"hold",ref:g},[e.createElementVNode("div",{class:"tab-page__nav",ref_key:"tab",ref:p},[e.createVNode(vJ,{tabList:S.value,currentIdx:m.value,isFixed:d.value&&N.value,fullWidth:k.value,onUpdateCurrentIdx:de[3]||(de[3]=Ve=>m.value=Ve)},null,8,["tabList","currentIdx","isFixed","fullWidth"])],512)],2),e.createElementVNode("div",RJ,[e.createVNode(e.Transition,{name:"fade",mode:"out-in"},{default:e.withCtx(()=>[B.value?(e.openBlock(),e.createElementBlock("div",{key:B.value},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(S.value,Ve=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[B.value==Ve.key?(e.openBlock(),e.createElementBlock("div",FJ,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(Ve.componentsDataJson,(oe,fe)=>(e.openBlock(),e.createBlock(xa,{key:oe.id,type:oe.type,"props-data":{modelValue:oe,isPreview:!1},onHandleDelete:de[4]||(de[4]=Ce=>M(Ce,I.value)),onHandleCopy:de[5]||(de[5]=Ce=>Q(Ce)),onHandlePaste:de[6]||(de[6]=Ce=>W(Ce,I.value))},null,8,["type","props-data"]))),128))])):e.createCommentVNode("",!0)],64))),256))])):e.createCommentVNode("",!0)]),_:1})]),n.isPreview?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(Te,{key:0,show:_.value,"onUpdate:show":de[7]||(de[7]=Ve=>_.value=Ve),onHandleEdit:de[8]||(de[8]=Ve=>b.value=!0),onHandleDelete:M,onHandleCopy:Q,onHandlePaste:W,style:{top:"-32px"}},null,8,["show"])),n.isPreview?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(OJ,{key:1,show:b.value,"onUpdate:show":de[9]||(de[9]=Ve=>b.value=Ve),data:n.modelValue},null,8,["show","data"]))],38))}},Mu=ne(HJ,[["__scopeId","data-v-6e32b9da"]]),jJ=Object.freeze(Object.defineProperty({__proto__:null,default:Mu},Symbol.toStringTag,{value:"Module"})),zJ={install:n=>{n.component("RibbonBlock",kd)}},qJ={install:n=>{n.component("TimelineStory",Ed)}},WJ={install:n=>{n.component("NewsList",Td)}},GJ={install:n=>{n.component("TheHistoryCarousel",Nd)}},XJ={install:n=>{n.component("CardShowcaseProfile",Sd)}},YJ={install:n=>{n.component("ArticleList",xl)}},KJ={install:n=>{n.component("BannerImage",sd)}},QJ={install:n=>{n.component("BannerPage",ld)}},JJ={install:n=>{n.component("BtnList",Vl)}},ZJ={install:n=>{n.component("GalleryDefault",rd)}},eZ={install:n=>{n.component("GalleryCaptionRound",dd)}},tZ={install:n=>{n.component("GalleryTimeline",cd)}},nZ={install:n=>{n.component("GalleryTimelineCol",md)}},oZ={install:n=>{n.component("Process",pd)}},aZ={install:n=>{n.component("CustomSpace",hd)}},iZ={install:n=>{n.component("GalleryList",vd)}},sZ={install:n=>{n.component("HeroSlide",yd)}},lZ={install:n=>{n.component("LinkList",_d)}},rZ={install:n=>{n.component("QuoteText",Am)}},dZ={install:n=>{n.component("DonorLinks",bd)}},uZ={install:n=>{n.component("CardCarousel",wd)}},cZ={install:n=>{n.component("CardCarouselMultiRow",xd)}},mZ={install:n=>{n.component("BannerQuote",Vd)}},pZ={install:n=>{n.component("ArticleItem",Cd)}},hZ={install:n=>{n.component("CountDown",Bd)}},fZ={install:n=>{n.component("CustomIframe",Dd)}},gZ={install:n=>{n.component("BannerImageWithLink",Ad)}},vZ={install:n=>{n.component("ContactUsList",Pd)}},yZ={install:n=>{n.component("TableTwo",$d)}},_Z={install:n=>{n.component("ScrollKeyInfo",Ld)}},bZ={install:n=>{n.component("ContactUsInfo",Id)}},wZ={install:n=>{n.component("Publications",Od)}},xZ={install:n=>{n.component("MapStatic",Md)}},VZ={install:n=>{n.component("CardCarouselArticles",Gd)}},CZ={install:n=>{n.component("CarouselLogo",Ud)}},kZ={install:n=>{n.component("Resources",Rd)}},EZ={install:n=>{n.component("ResourcesTwo",Fd)}},TZ={install:n=>{n.component("Disc",Hd)}},NZ={install:n=>{n.component("BasicCollapse",jd)}},SZ={install:n=>{n.component("TableCollapse",zd)}},BZ={install:n=>{n.component("MediaLogo",Cl)}},DZ={install:n=>{n.component("RegisterForm",qd)}},PZ={install:n=>{n.component("GalleryBlock",Wd)}},$Z={install:n=>{n.component("CardCarouselMultiRowArticles",Xd)}},AZ={install:n=>{n.component("AlummiCommunityList",Jd)}},LZ={install:n=>{n.component("BlessingMessage",Zd)}},IZ={install:n=>{n.component("BlessingSlider",eu)}},OZ={install:n=>{n.component("CardShowcase",tu)}},MZ={install:n=>{n.component("ExploreLinks",nu)}},UZ={install:n=>{n.component("SchoolLayout",ou)}},RZ={install:n=>{n.component("CardCarouselMultiRowPublications",au)}},FZ={install:n=>{n.component("MediaImageFull",Yd)}},HZ={install:n=>{n.component("MediaImageStatic",Kd)}},jZ={install:n=>{n.component("ArticleListPureText",Qd)}},zZ={install:n=>{n.component("TabDefault",iu)}},qZ={install:n=>{n.component("TabTimeLine",su)}},WZ={install:n=>{n.component("CardListProgramme",ru)}},GZ={install:n=>{n.component("CardListCircle",lu)}},XZ={install:n=>{n.component("CardListSchool",du)}},YZ={install:n=>{n.component("MediaVideo",Iu)}},KZ={install:n=>{n.component("DetailLink",uu)}},QZ={install:n=>{n.component("InformationLink",Ou)}},JZ={install:n=>{n.component("TabPage",Mu)}},wm={default:{primaryColor:"#3b82f6",secondaryColor:"#a855f7",fontSize:"14px",fontFamily:"Inter, sans-serif",borderRadius:"6px",spacing:"16px"},dark:{primaryColor:"#60a5fa",secondaryColor:"#c084fc",fontSize:"14px",fontFamily:"Inter, sans-serif",borderRadius:"6px",spacing:"16px"},compact:{primaryColor:"#3b82f6",secondaryColor:"#a855f7",fontSize:"12px",fontFamily:"Inter, sans-serif",borderRadius:"4px",spacing:"12px"},large:{primaryColor:"#3b82f6",secondaryColor:"#a855f7",fontSize:"16px",fontFamily:"Inter, sans-serif",borderRadius:"8px",spacing:"20px"}},bn=e.ref(wm.default),yo=e.ref(!1);function ZZ(){const n=g=>{typeof g=="string"?bn.value={...wm[g]}:bn.value={...g},a()},t=g=>{bn.value={...bn.value,...g},a()},o=()=>{yo.value=!yo.value,typeof document<"u"&&document.documentElement.classList.toggle("dark",yo.value)},a=()=>{if(typeof document>"u")return;const g=document.documentElement,p=bn.value;g.style.setProperty("--theme-primary",p.primaryColor),g.style.setProperty("--theme-secondary",p.secondaryColor),g.style.setProperty("--font-size-default",p.fontSize),g.style.setProperty("--radius-md",p.borderRadius),g.style.setProperty("--spacing-md",p.spacing)},i=g=>e.computed(()=>g==="primary"?bn.value.primaryColor:bn.value.secondaryColor),s=()=>e.computed(()=>bn.value.fontSize),l=()=>e.computed(()=>bn.value.fontFamily),r=()=>e.computed(()=>bn.value.borderRadius),u=()=>e.computed(()=>bn.value.spacing),c=()=>{n("default"),yo.value=!1,typeof document<"u"&&document.documentElement.classList.remove("dark")},f=()=>JSON.stringify(bn.value,null,2),m=g=>{try{const p=JSON.parse(g);return n(p),!0}catch(p){return console.error("Invalid theme configuration:",p),!1}},d=()=>{const g=typeof window<"u"&&typeof localStorage<"u",p=g?localStorage.getItem("officialblock-theme"):null,b=g?localStorage.getItem("officialblock-dark-mode"):null;if(p)try{const _=JSON.parse(p);n(_)}catch(_){console.error("Failed to restore theme:",_)}if(b&&(yo.value=b==="true",typeof document<"u"&&document.documentElement.classList.toggle("dark",yo.value)),typeof window<"u"&&typeof window.matchMedia=="function"){const _=window.matchMedia("(prefers-color-scheme: dark)"),w=v=>{(!g||!localStorage.getItem("officialblock-dark-mode"))&&(yo.value=v.matches,typeof document<"u"&&document.documentElement.classList.toggle("dark",yo.value))};_.addEventListener("change",w)}a()},h=()=>{typeof window<"u"&&typeof localStorage<"u"&&(localStorage.setItem("officialblock-theme",JSON.stringify(bn.value)),localStorage.setItem("officialblock-dark-mode",yo.value.toString()))};return{currentTheme:e.computed(()=>bn.value),isDarkMode:e.computed(()=>yo.value),themePresets:wm,setTheme:n,updateTheme:t,toggleDarkMode:o,resetTheme:c,exportTheme:f,importTheme:m,initTheme:d,saveTheme:h,getThemeColor:i,getFontSize:s,getFontFamily:l,getBorderRadius:r,getSpacing:u}}class eee{static hexToRgb(t){const o=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(t);return o?{r:parseInt(o[1],16),g:parseInt(o[2],16),b:parseInt(o[3],16)}:null}static rgbToHex(t,o,a){return"#"+((1<<24)+(t<<16)+(o<<8)+a).toString(16).slice(1)}static adjustBrightness(t,o){const a=this.hexToRgb(t);if(!a)return t;const i=s=>{const l=Math.round(s*(1+o/100));return Math.max(0,Math.min(255,l))};return this.rgbToHex(i(a.r),i(a.g),i(a.b))}static generateColorScale(t){const o=[50,100,200,300,400,500,600,700,800,900,950],a={};return o.forEach((i,s)=>{let l;i<=500?l=80-s*16:l=-20-(s-5)*12,a[i.toString()]=this.adjustBrightness(t,l)}),a}static getContrastRatio(t,o){const a=u=>{const c=this.hexToRgb(u);if(!c)return 0;const f=m=>{const d=m/255;return d<=.03928?d/12.92:Math.pow((d+.055)/1.055,2.4)};return .2126*f(c.r)+.7152*f(c.g)+.0722*f(c.b)},i=a(t),s=a(o),l=Math.max(i,s),r=Math.min(i,s);return(l+.05)/(r+.05)}static isDarkColor(t){const o=this.hexToRgb(t);return o?(o.r*299+o.g*587+o.b*114)/1e3<128:!1}static getBestTextColor(t){return this.isDarkColor(t)?"#ffffff":"#000000"}static mixColors(t,o,a=.5){const i=this.hexToRgb(t),s=this.hexToRgb(o);if(!i||!s)return t;const l=(r,u)=>Math.round(r*(1-a)+u*a);return this.rgbToHex(l(i.r,s.r),l(i.g,s.g),l(i.b,s.b))}}class tee{static getCurrentBreakpoint(){if(typeof window>"u")return"xl";const t=window.innerWidth;return t<475?"xs":t<640?"sm":t<768?"md":t<1024?"lg":t<1280?"xl":"2xl"}static isMobile(){return typeof window>"u"?!1:window.innerWidth<768}static isTablet(){if(typeof window>"u")return!1;const t=window.innerWidth;return t>=768&&t<1024}static isDesktop(){return typeof window>"u"?!0:window.innerWidth>=1024}static onBreakpointChange(t){if(typeof window>"u")return()=>{};let o=this.getCurrentBreakpoint();const a=()=>{const i=this.getCurrentBreakpoint();i!==o&&(o=i,t(i))};return window.addEventListener("resize",a),()=>{typeof window<"u"&&window.removeEventListener("resize",a)}}}class My{static animate(t,o,a,i,s=this.easing.easeOutQuad){if(typeof window>"u"||typeof requestAnimationFrame>"u"||typeof performance>"u")return i(o),()=>{};const l=performance.now();let r;const u=c=>{const f=c-l,m=Math.min(f/a,1),d=s(m),h=t+(o-t)*d;i(h),m<1&&(r=requestAnimationFrame(u))};return r=requestAnimationFrame(u),()=>{r&&cancelAnimationFrame(r)}}static scrollTo(t,o,a=300,i=this.easing.easeOutQuad){return new Promise(s=>{if(typeof window>"u"){s();return}const l=t===window,r=l?window.pageYOffset:t.scrollTop;this.animate(r,o,a,u=>{l?window.scrollTo(0,u):t.scrollTop=u},i),setTimeout(s,a)})}}Zu(My,"easing",{linear:t=>t,easeInQuad:t=>t*t,easeOutQuad:t=>t*(2-t),easeInOutQuad:t=>t<.5?2*t*t:-1+(4-2*t)*t,easeInCubic:t=>t*t*t,easeOutCubic:t=>--t*t*t+1,easeInOutCubic:t=>t<.5?4*t*t*t:(t-1)*(2*t-2)*(2*t-2)+1});class nee{static setItem(t,o){if(typeof window>"u"||typeof localStorage>"u")return!1;try{return localStorage.setItem(t,JSON.stringify(o)),!0}catch(a){return console.warn("Failed to save to localStorage:",a),!1}}static getItem(t,o){if(typeof window>"u"||typeof localStorage>"u")return o||null;try{const a=localStorage.getItem(t);return a?JSON.parse(a):o||null}catch(a){return console.warn("Failed to read from localStorage:",a),o||null}}static removeItem(t){if(typeof window>"u"||typeof localStorage>"u")return!1;try{return localStorage.removeItem(t),!0}catch(o){return console.warn("Failed to remove from localStorage:",o),!1}}static cleanExpired(){if(typeof window>"u"||typeof localStorage>"u")return;const t=Date.now(),o=[];for(let a=0;a<localStorage.length;a++){const i=localStorage.key(a);if(i&&i.startsWith("officialblock-"))try{const s=JSON.parse(localStorage.getItem(i)||"{}");s.expires&&s.expires<t&&o.push(i)}catch{}}o.forEach(a=>localStorage.removeItem(a))}}if(typeof globalThis<"u"&&!globalThis.FormData){class n{constructor(){Zu(this,"data",new Map)}append(o,a,i){this.data.set(o,{value:a,filename:i})}get(o){const a=this.data.get(o);return a?a.value:null}has(o){return this.data.has(o)}delete(o){this.data.delete(o)}entries(){return this.data.entries()}keys(){return this.data.keys()}values(){return this.data.values()}[Symbol.iterator](){return this.data.entries()}}globalThis.FormData=n}const oee={install:n=>{n.use($g),n.config.globalProperties.$device={get isMobile(){return typeof window<"u"?window.innerWidth<768:!1},get isTablet(){return typeof window<"u"?window.innerWidth>=768&&window.innerWidth<1024:!1},get isMobileOrTablet(){return typeof window<"u"?window.innerWidth<1024:!1},get isDesktop(){return typeof window<"u"?window.innerWidth>=1024:!0}},n.component("ArticleList",xl),n.component("BannerImage",sd),n.component("BannerPage",ld),n.component("BtnList",Vl),n.component("GalleryDefault",rd),n.component("GalleryCaptionRound",dd),n.component("GalleryTimeline",cd),n.component("GalleryTimelineCol",md),n.component("Process",pd),n.component("CustomSpace",hd),n.component("GalleryList",vd),n.component("HeroSlide",yd),n.component("LinkList",_d),n.component("QuoteText",Am),n.component("DonorLinks",bd),n.component("CardCarousel",wd),n.component("CardCarouselMultiRow",xd),n.component("BannerQuote",Vd),n.component("ArticleItem",Cd),n.component("RibbonBlock",kd),n.component("TimelineStory",Ed),n.component("NewsList",Td),n.component("TheHistoryCarousel",Nd),n.component("CardShowcaseProfile",Sd),n.component("CountDown",Bd),n.component("ContactUsList",Pd),n.component("CustomIframe",Dd),n.component("TableTwo",$d),n.component("ScrollKeyInfo",Ld),n.component("BannerImageWithLink",Ad),n.component("ContactUsInfo",Id),n.component("Publications",Od),n.component("MapStatic",Md),n.component("CardCarouselArticles",Gd),n.component("CarouselLogo",Ud),n.component("Resources",Rd),n.component("ResourcesTwo",Fd),n.component("Disc",Hd),n.component("BasicCollapse",jd),n.component("TableCollapse",zd),n.component("MediaLogo",Cl),n.component("RegisterForm",qd),n.component("GalleryBlock",Wd),n.component("CardCarouselMultiRowArticles",Xd),n.component("AlummiCommunityList",Jd),n.component("BlessingMessage",Zd),n.component("BlessingSlider",eu),n.component("CardShowcase",tu),n.component("ExploreLinks",nu),n.component("SchoolLayout",ou),n.component("CardCarouselMultiRowPublications",au),n.component("CustomText",cv),n.component("MediaImageFull",Yd),n.component("MediaImageStatic",Kd),n.component("ArticleListPureText",Qd),n.component("TabDefault",iu),n.component("CardListProgramme",ru),n.component("CardListCircle",lu),n.component("CardListSchool",du),n.component("MediaVideo",Iu),n.component("DetailLink",uu),n.component("InformationLink",Ou),n.component("TabTimeLine",su),n.component("TabPage",Mu)}};exports.$=qs;exports.A=xl;exports.B=sd;exports.C=hd;exports.D=bd;exports.E=Ad;exports.F=Id;exports.G=rd;exports.H=yd;exports.I=Od;exports.J=Gd;exports.K=Ud;exports.L=_d;exports.M=Md;exports.N=Td;exports.O=Te;exports.P=ml;exports.Q=Rd;exports.R=kd;exports.S=Ld;exports.T=Ed;exports.U=ze;exports.V=Fd;exports.W=Hd;exports.X=jd;exports.Y=zd;exports.Z=Cl;exports._=ne;exports.a=xa;exports.a$=BZ;exports.a0=qd;exports.a1=Wd;exports.a2=Xd;exports.a3=Jd;exports.a4=Zd;exports.a5=eu;exports.a6=tu;exports.a7=nu;exports.a8=ou;exports.a9=au;exports.aA=rZ;exports.aB=dZ;exports.aC=uZ;exports.aD=cZ;exports.aE=mZ;exports.aF=pZ;exports.aG=zJ;exports.aH=qJ;exports.aI=WJ;exports.aJ=GJ;exports.aK=XJ;exports.aL=hZ;exports.aM=vZ;exports.aN=fZ;exports.aO=yZ;exports.aP=gZ;exports.aQ=_Z;exports.aR=bZ;exports.aS=wZ;exports.aT=xZ;exports.aU=VZ;exports.aV=CZ;exports.aW=kZ;exports.aX=EZ;exports.aY=TZ;exports.aZ=NZ;exports.a_=SZ;exports.aa=cv;exports.ab=Yd;exports.ac=Kd;exports.ad=Qd;exports.ae=iu;exports.af=su;exports.ag=ru;exports.ah=lu;exports.ai=du;exports.aj=Iu;exports.ak=uu;exports.al=Ou;exports.am=Mu;exports.an=YJ;exports.ao=KJ;exports.ap=QJ;exports.aq=JJ;exports.ar=ZJ;exports.as=eZ;exports.at=tZ;exports.au=nZ;exports.av=oZ;exports.aw=aZ;exports.ax=iZ;exports.ay=sZ;exports.az=lZ;exports.b=Am;exports.b0=DZ;exports.b1=PZ;exports.b2=$Z;exports.b3=AZ;exports.b4=LZ;exports.b5=IZ;exports.b6=OZ;exports.b7=MZ;exports.b8=UZ;exports.b9=RZ;exports.ba=FZ;exports.bb=HZ;exports.bc=jZ;exports.bd=zZ;exports.be=qZ;exports.bf=WZ;exports.bg=GZ;exports.bh=XZ;exports.bi=YZ;exports.bj=KZ;exports.bk=QZ;exports.bl=JZ;exports.bm=ZZ;exports.bn=eee;exports.bo=tee;exports.bp=My;exports.bq=nee;exports.br=$g;exports.bs=S_;exports.c=cl;exports.d=$p;exports.e=oee;exports.f=ld;exports.g=ti;exports.h=Vl;exports.i=Ne;exports.j=dd;exports.k=cd;exports.l=md;exports.m=pd;exports.n=vd;exports.o=wd;exports.p=xd;exports.q=Vd;exports.r=R;exports.s=Cd;exports.t=Nd;exports.u=Oy;exports.v=Sd;exports.w=Bd;exports.x=Dd;exports.y=Pd;exports.z=$d;
|