var Rm=Object.defineProperty;var Hm=(e,t,a)=>t in e?Rm(e,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[t]=a;var Se=(e,t,a)=>Hm(e,typeof t!="symbol"?t+"":t,a);import{r as w,c as F,o as d,w as r,a as o,u as f,b as x,d as i,e as h,f as O,t as _,F as H,g as Z,h as M,i as Be,j as it,k as vt,l as z,m as Jt,n as le,p as Qt,q as qe,s as ei,T as Dn,v as Ce,x as be,y as Di,z as ja,A as os,B as ms,C as Pm,D as Xt,E as ws,G as Zt,H as Km,I as $s,J as Mo,K as Cs,L as Qi,M as Nm,N as Gu,V as zu,O as On,P as Gm,Q as Gd,R as wt,S as da,U as Gs,W as zm,X as Jr,Y as jm,Z as ro,_ as Ym,$ as qm,a0 as Wm,a1 as zd,a2 as Xm}from"./chunks/vue.esm-bundler.js?ver=1.3.25";import{u as Oa,a as Ra,o as ju,c as Jm,b as Zm}from"./chunks/vue-router.js?ver=1.3.25";import{_ as j,a as Ft}from"./chunks/DynamicIcon.js?ver=1.3.25";import{T as Rn,_ as na,a as Hn,C as we,b as jd,F as ti,c as me,d as he,e as Qs,P as sl,f as Yu,g as eh,h as th,m as ah}from"./chunks/CardBody.js?ver=1.3.25";import{t as u,a as Dt,A as He,p as qo}from"./chunks/Translator.js?ver=1.3.25";import{_ as Xe,P as Ha}from"./chunks/Empty.js?ver=1.3.25";import{_ as gt,a as Yd,p as Wo,b as qu,c as Wu,L as qd,d as Ii,O as Xu,e as Ti,P as Wd}from"./chunks/OrderCustomerInformation.js?ver=1.3.25";import{C as Le,f as Vt,a as sh,p as nh,b as oh,g as lh,c as ih,d as rh}from"./chunks/productService.js?ver=1.3.25";import{_ as Ca,a as Xd,b as Jd,c as dh,S as Ju,d as Zu,e as Ah,A as ep,f as tp}from"./chunks/CancelSubscription.js?ver=1.3.25";import{_ as Ue}from"./chunks/_plugin-vue_export-helper.js?ver=1.3.25";import{I as Ee,S as pt}from"./chunks/IconButton.js?ver=1.3.25";import{c as ch,h as Xo,a as ap,g as sp,f as uh,b as Tn,$ as Ea}from"./chunks/common.js?ver=1.3.25";import{M as Pa}from"./chunks/Model.js?ver=1.3.25";import{R as ie}from"./chunks/Rest.js?ver=1.3.25";import{d as Me,g as ph}from"./chunks/dayjs.min.js?ver=1.3.25";import{a as Vi,E as ba,m as fh,b as Ka,d as Fn,i as Ja,c as mh,s as np,e as ai,f as Zd,r as eA,g as op,p as jA,w as hh,h as Mi,l as _h,j as hn,k as gh,n as vh,o as si,t as yh,q as bh,u as wh,v as Ch,x as Bh,y as kh,z as xh,A as Sh}from"./chunks/index.js?ver=1.3.25";import{n as Y}from"./chunks/Notify.js?ver=1.3.25";import{_ as ra}from"./chunks/Animation.js?ver=1.3.25";import{_ as qs,T as ke,m as wa,a as Ms,i as Ut,r as Fh,L as Zr,b as lp,d as ip,c as rp}from"./chunks/dateShortCuts.js?ver=1.3.25";import{S as fa,u as Pn,_ as Eh,a as Uh,c as $h}from"./chunks/countries.js?ver=1.3.25";import{u as wn,L as Bt,_ as Li}from"./chunks/NotFound.js?ver=1.3.25";import{A as Vn}from"./chunks/Asset.js?ver=1.3.25";import{E as Dh}from"./chunks/index2.js?ver=1.3.25";import{S as Mt}from"./chunks/Str.js?ver=1.3.25";import{A as Pe}from"./chunks/Arr.js?ver=1.3.25";import{U as ed}from"./chunks/Url.js?ver=1.3.25";import{u as Oi,t as dp}from"./chunks/timezone.js?ver=1.3.25";import{e as Jo,i as tA,U as aA,p as Qh}from"./chunks/Utils.js?ver=1.3.25";import{B as Gt}from"./chunks/Badge.js?ver=1.3.25";import{_ as _o,P as Ap}from"./chunks/ProductVariationSelector.js?ver=1.3.25";import{_ as ns,C as Mn}from"./chunks/CopyToClipboard.js?ver=1.3.25";import{B as sA}from"./chunks/BundleProducts.js?ver=1.3.25";import{E as YA}from"./chunks/index3.js?ver=1.3.25";import{_ as cp}from"./chunks/FileUploaderDialog.js?ver=1.3.25";import{E as zn,v as Ih,i as Th}from"./chunks/defaults.js?ver=1.3.25";import Vh from"./chunks/Screenshot.js?ver=1.3.25";import{u as Mh}from"./chunks/useElementPlusComponents.js?ver=1.3.25";import"./chunks/index4.js?ver=1.3.25";class Lh extends Rn{getTabs(){return null}getToggleableColumns(){return[{label:u("Lifetime Value (LTV)"),value:"ltv"},{label:u("Customer Since"),value:"customer_since"},{label:u("Last Purchase Date"),value:"last_purchase_date"}]}getSortableColumns(){return[{label:u("Customer ID"),value:"id"},{label:u("Name"),value:"first_name"},{label:u("Purchases"),value:"purchase_count"},{label:u("Lifetime Value (LTV)"),value:"ltv"},{label:u("Last Purchase Date"),value:"last_purchase_date"},{label:u("Customer Since"),value:"created_at"}]}getSearchHint(){return u("Search by, #ID, First Name, Last Name and Email")}getFetchUrl(){return"customers"}parseResponse(t){return t.customers}getTableName(){return"customers"}useFullWidthSearch(){return!0}}function up(e){return Lh.init(e)}const Oh={class:"table-cell"},Rh={class:"fct-product-info-card w-full"},Hh={class:"fct-product-info-media"},Ph={class:"fct-product-info-details grow-0 shrink-0 basis-[calc(100%-52px)]",style:{overflow:"hidden"}},Kh={class:"fct-product-info-name flex flex-col items-start gap-3"},Nh={class:"table-cell"},Gh={class:"table-cell"},zh={class:"table-cell"},jh={class:"table-cell"};const Yh={__name:"CustomersLoader",props:{nextPageCount:{type:Number,default:0},customerTable:{type:Object,default:()=>({})}},setup(e){const t=e,a=Array.from({length:t.nextPageCount},(s,n)=>n+1);return(s,n)=>{const l=w("el-table-column"),A=w("el-skeleton-item"),c=w("el-table"),p=w("el-skeleton");return d(),F(p,{animated:""},{template:r(()=>[o(c,{data:f(a),class:"w-full compact-table responsive"},{empty:r(()=>n[0]||(n[0]=[])),default:r(()=>[x("",!0),o(l,{label:s.$t("Customer"),width:"300"},{default:r(()=>[i("div",Oh,[i("div",Rh,[i("div",Hh,[o(A,{varient:"image",class:"w-10 h-10.5 rounded-full flex-none"})]),i("div",Ph,[i("div",Kh,[o(A,{varient:"p",class:"max-w-[190px]"}),o(A,{varient:"p",class:"max-w-[100px]"})])])])])]),_:1},8,["label"]),o(l,{label:s.$t("Address"),width:"300"},{default:r(()=>[i("div",Nh,[o(A,{varient:"p",class:"w-4/5"})])]),_:1},8,["label"]),o(l,{label:s.$t("Purchases"),width:"150"},{default:r(()=>[i("div",Gh,[o(A,{varient:"p",class:"w-3/5"})])]),_:1},8,["label"]),e.customerTable.isColumnVisible("last_purchase_date")?(d(),F(l,{key:1,label:s.$t("Last Purchase Date"),width:"200"},{default:r(()=>[i("div",zh,[o(A,{varient:"p",class:"w-4/5"})])]),_:1},8,["label"])):x("",!0),e.customerTable.isColumnVisible("customer_since")?(d(),F(l,{key:2,label:s.$t("Customer Since"),width:"150"},{default:r(()=>[i("div",jh,[o(A,{varient:"p",class:"w-4/5"})])]),_:1},8,["label"])):x("",!0),(e.customerTable.isColumnVisible("actions"),x("",!0))]),_:1},8,["data"])]),_:1})}}},qh={key:0,class:"fct-customer-card"},Wh={class:"fct-customer-avatar"},Xh=["src"],Jh={class:"fct-customer-details"},Zh={class:"fct-customer-name"},e_={class:"fct-customer-id"},t_={class:"fct-customer-email"},a_=["innerHTML"],s_={key:1},n_={__name:"CustomersTable",props:{table:{type:Object,required:!0}},setup(e){return(t,a)=>{const s=w("el-table-column"),n=w("el-table");return d(),F(n,{data:e.table.getTableData(),class:"w-full compact-table"},{empty:r(()=>[o(Xe,{icon:"Empty/ListView","has-dark":!0,text:f(u)("No customer found!")},null,8,["text"])]),default:r(()=>[x("",!0),o(s,{label:f(u)("Customer"),width:"300"},{default:r(l=>{var A;return[o(na,{class:"hover:no-underline",to:{name:"view_customer",params:{customer_id:(A=l.row)==null?void 0:A.id}}},{default:r(()=>{var c,p,m,g,y;return[(c=l.row)!=null&&c.id?(d(),h("div",qh,[i("div",Wh,[i("span",null,[i("img",{src:(p=l.row)==null?void 0:p.photo,alt:"avatar"},null,8,Xh)])]),i("div",Jh,[i("div",Zh,[O(_(((m=l.row)==null?void 0:m.full_name)||f(u)("No Name"))+" ",1),i("span",e_,"#"+_(f(Dt)((g=l.row)==null?void 0:g.id)),1)]),i("div",t_,_((y=l.row)==null?void 0:y.email),1)])])):x("",!0)]}),_:2},1032,["to"])]}),_:1},8,["label"]),o(s,{label:f(u)("Address"),width:"300"},{default:r(l=>{var A;return[o(na,{class:"hover:no-underline",to:{name:"view_customer",params:{customer_id:(A=l.row)==null?void 0:A.id}}},{default:r(()=>[O(_(t.getOrderAddress(l.row)),1)]),_:2},1032,["to"])]}),_:1},8,["label"]),o(s,{label:f(u)("Purchases"),width:90},{default:r(l=>{var A;return[o(na,{class:"hover:no-underline",to:{name:"view_customer",params:{customer_id:(A=l.row)==null?void 0:A.id}}},{default:r(()=>[O(_(f(Dt)(l.row.purchase_count)),1)]),_:2},1032,["to"])]}),_:1},8,["label"]),e.table.isColumnVisible("ltv")?(d(),F(s,{key:1,label:f(u)("LTV"),width:100},{default:r(l=>{var A;return[o(na,{class:"hover:no-underline",to:{name:"view_customer",params:{customer_id:(A=l.row)==null?void 0:A.id}}},{default:r(()=>[i("span",{innerHTML:f(Le).formatNumber(l.row.ltv,!0,!1)},null,8,a_)]),_:2},1032,["to"])]}),_:1},8,["label"])):x("",!0),e.table.isColumnVisible("last_purchase_date")?(d(),F(s,{key:2,label:f(u)("Last Purchase Date"),width:"200"},{default:r(l=>{var A;return[o(na,{class:"hover:no-underline",to:{name:"view_customer",params:{customer_id:(A=l.row)==null?void 0:A.id}}},{default:r(()=>[l.row.last_purchase_date?(d(),F(Ca,{key:0,"date-time":l.row.last_purchase_date},null,8,["date-time"])):(d(),h("span",s_,"---"))]),_:2},1032,["to"])]}),_:1},8,["label"])):x("",!0),e.table.isColumnVisible("customer_since")?(d(),F(s,{key:3,label:f(u)("Customer Since"),width:"150"},{default:r(l=>{var A;return[o(na,{class:"hover:no-underline",to:{name:"view_customer",params:{customer_id:(A=l.row)==null?void 0:A.id}}},{default:r(()=>[o(Ca,{"date-time":l.row.created_at},null,8,["date-time"])]),_:2},1032,["to"])]}),_:1},8,["label"])):x("",!0)]),_:1},8,["data"])}}},o_={class:"fct-customer-table-mobile-wrap"},l_=["onClick"],i_={class:"fct-customer-table-mobile-header"},r_={key:0,class:"fct-customer-table-customer-col fct-customer-card"},d_={class:"fct-customer-avatar"},A_=["src"],c_={class:"fct-customer-details"},u_={class:"fct-customer-name"},p_={class:"fct-customer-id"},f_={class:"fct-customer-email"},m_={class:"fct-customer-table-purchases-col"},h_={class:"fct-customer-table-mobile-body"},__={class:"fct-customer-table-mobile-body-list"},g_={key:0,class:"fct-customer-table-ltv-col"},v_={class:"label"},y_=["innerHTML"],b_={key:1,class:"fct-customer-table-last-purchase-date-col"},w_={class:"label"},C_={class:"value"},B_={key:2,class:"fct-customer-table-customer-since-col"},k_={class:"label"},x_={class:"value"},S_={class:"fct-customer-table-mobile-footer"},F_={class:"fct-customer-table-address-col"},E_={key:0,class:"py-6 text-center"},U_={__name:"CustomersTableMobile",props:{table:{type:Object,required:!0},emptyText:{type:String,default:u("No customers found.")}},setup(e){return(t,a)=>(d(),h("div",o_,[(d(!0),h(H,null,Z(e.table.getTableData(),(s,n)=>(d(),h("div",{key:s.id,class:"fct-customer-table-mobile-row",onClick:l=>t.$router.push({name:"view_customer",params:{customer_id:s.id}})},[i("div",i_,[s!=null&&s.id?(d(),h("div",r_,[i("div",d_,[i("img",{src:s==null?void 0:s.photo,alt:"avatar"},null,8,A_)]),i("div",c_,[i("div",u_,[O(_((s==null?void 0:s.full_name)||f(u)("No Name"))+" ",1),i("span",p_,"#"+_(s==null?void 0:s.id),1)]),i("div",f_,_(s==null?void 0:s.email),1)])])):x("",!0),i("div",m_,_(s.purchase_count)+" "+_(s.purchase_count>1?f(u)("Purchases"):f(u)("Purchase")),1)]),i("div",h_,[i("ul",__,[e.table.isColumnVisible("ltv")?(d(),h("li",g_,[i("div",v_,_(f(u)("LTV:")),1),i("div",{class:"value",innerHTML:f(Le).formatNumber(s.ltv,!0,!1)},null,8,y_)])):x("",!0),e.table.isColumnVisible("last_purchase_date")?(d(),h("li",b_,[i("div",w_,_(f(u)("Last Purchase Date:")),1),i("div",C_,[o(Ca,{"date-time":s.last_purchase_date},null,8,["date-time"])])])):x("",!0),e.table.isColumnVisible("customer_since")?(d(),h("li",B_,[i("div",k_,_(f(u)("Customer Since:")),1),i("div",x_,[o(Ca,{"date-time":s.created_at},null,8,["date-time"])])])):x("",!0)])]),i("div",S_,[i("div",F_,[o(j,{name:"LocationPin"}),O(" "+_(t.getOrderAddress(s)),1)])])],8,l_))),128)),e.table.getTableData().length===0?(d(),h("div",E_,[o(Xe,{icon:"Empty/Order","has-dark":"",text:e.emptyText},null,8,["text"])])):x("",!0)]))}},$_={},D_={class:"px-4 py-3"},Q_={class:"flex items-center justify-between mb-3"},I_={class:"flex items-center justify-between mb-3"},T_={class:"flex items-center justify-between mb-3"},V_={class:"flex items-center justify-between mb-3"};function M_(e,t){const a=w("el-skeleton-item"),s=w("el-skeleton");return d(),F(s,{animated:""},{template:r(()=>[i("div",D_,[i("div",Q_,[o(a,{varient:"p",class:"w-1/2"}),o(a,{varient:"p",class:"w-[100px]"})]),i("div",I_,[o(a,{varient:"p",class:"w-[50px]"}),o(a,{varient:"p",class:"w-[80px]"})]),i("div",T_,[o(a,{varient:"p",class:"w-[120px]"}),o(a,{varient:"p",class:"w-[100px]"})]),i("div",V_,[o(a,{varient:"p",class:"w-[100px]"}),o(a,{varient:"p",class:"w-[100px]"})]),o(a,{varient:"p",class:"w-[230px]"})])]),_:1})}const L_=Ue($_,[["render",M_]]),O_={class:"fct-all-customers-page fct-layout-width"},R_={class:"fct-all-customers-wrap"},H_={key:1},P_={__name:"AllCustomers",setup(e){const t=up(),a=M({showModal:!1,action:"create",title:u("Create New Customer"),customer:{}}),s=M(!1),n=()=>{s.value=window.innerWidth<768};return Be(()=>{n(),window.addEventListener("resize",n)}),it(()=>{window.removeEventListener("resize",n)}),(l,A)=>{const c=w("el-button");return d(),h("div",O_,[o(gt,{permission:"customers/manage"},{default:r(()=>[o(Ha,{title:f(u)("Customers")},{action:r(()=>[o(c,{type:"primary",onClick:A[0]||(A[0]=p=>a.value.showModal=!0)},{default:r(()=>[O(_(f(u)("Add Customer")),1)]),_:1})]),_:1},8,["title"])]),_:1}),o(gt,{permission:"customers/view"},{default:r(()=>[i("div",R_,[o(Hn,{table:f(t),"has-mobile-slot":!0},{mobile:r(()=>[f(t).isLoading()?(d(),F(L_,{key:0})):x("",!0),o(U_,{table:f(t)},null,8,["table"])]),default:r(()=>[f(t).isLoading()?(d(),F(Yh,{key:0,customerTable:f(t),"next-page-count":f(t).nextPageCount},null,8,["customerTable","next-page-count"])):(d(),h("div",H_,[o(n_,{table:f(t)},null,8,["table"])]))]),_:1},8,["table"])])]),_:1}),o(gt,{permission:"customers/manage"},{default:r(()=>[o(Yd,{"onUpdate:customerModal":A[1]||(A[1]=()=>{a.value.showModal=!1,a.value.customer={},f(t).fetch()}),customerModalInfos:a.value,customer_id:a.value.customer_id,customer:a.value.customer,onCloseModal:A[2]||(A[2]=p=>a.value.showModal=!1)},null,8,["customerModalInfos","customer_id","customer"])]),_:1})])}}};class K_ extends Rn{getTabs(){return{all:u("All"),completed:u("Completed"),processing:u("Processing"),"on-hold":u("On Hold"),paid:u("Paid"),subscription:u("Subscription"),renewal:u("Renewal"),refunded:u("Refunded"),partially_refunded:u("Partially Refunded"),upgraded_from:{title:u("Upgraded From"),description:u("Orders upgraded from another order")},upgraded_to:{title:u("Upgraded To"),description:u("Orders upgraded to another order")}}}getToggleableColumns(){return[{label:u("Customer"),value:"customer"},{label:u("Items"),value:"order_items"},{label:u("Order Status"),value:"status"},{label:u("Order Type"),value:"type"},{label:u("Actions"),value:"actions"}]}getSortableColumns(){return[{label:u("Order ID"),value:"id"},{label:u("Total"),value:"total_amount"},{label:u("Payment Status"),value:"payment_status"},{label:u("Order Status"),value:"status"}]}getSearchHint(){return u("Search by invoice no, customer name, or customer email.")}getFetchUrl(){return"orders"}parseResponse(t){return t.orders}getTableName(){return"order_table"}with(){return["customer.primary_billing_address","order_items"]}}function pp(e){return K_.init(e)}const N_={class:"fct-order-stats-card"},G_={class:"fct-order-stats-card-head"},z_={class:"fct-order-stats-card-head-content"},j_={class:"text"},Y_={key:0,class:"value"},q_={class:"fct-order-stats-card-body"},W_={key:0,class:"change-wrap"},X_={key:0,class:"change-title"},J_={key:1,class:"change-title"},Z_={key:1,class:"change-wrap"},eg={class:"change-title"},tg={__name:"StatCard",props:{direction:String,stat:Object,statRanges:Object,currentRange:String|Number,statKey:String|Number,loading:Boolean},setup(e){const t=vt().ctx,a=e,s=z(()=>{switch(a.statKey){case"total_orders":return"warning";case"paid_orders":return"blue";case"total_paid_order_items":return"danger";case"total_paid_amounts":return"secondary";default:return"info"}}),n=z(()=>A.value===0?"":A.value>0?"success":"danger"),l=p=>p.is_cents?t.formatNumber(p.current_count):Dt(p.current_count),A=z(()=>{let p=ch(a.stat.current_count,a.stat.compare_count)??0;return p===""?0:p}),c=z(()=>a.statRanges[a.currentRange].label);return(p,m)=>{const g=w("el-skeleton"),y=w("el-skeleton-item");return d(),h("div",N_,[i("div",G_,[o(Ee,{size:"large",bg:s.value,soft:""},{default:r(()=>[Jt(p.$slots,"icon")]),_:3},8,["bg"]),i("div",z_,[o(g,{loading:e.loading,animated:"",rows:0},null,8,["loading"]),i("span",j_,_(e.stat.title),1),e.loading?x("",!0):(d(),h("div",Y_,_(l(e.stat)),1))])]),i("div",q_,[o(g,{loading:e.loading,animated:""},{template:r(()=>[o(y,{variant:"p",class:"w-1/2 h-4"})]),_:1},8,["loading"]),!e.loading&&e.currentRange!=="all_time"?(d(),h("div",W_,[i("span",{class:le("change "+n.value)},[A.value!==0?(d(),F(j,{key:0,name:A.value>0?"CaretUp":"CaretDown"},null,8,["name"])):x("",!0),O(" "+_(A.value===0?p.$t("Same as previous"):Math.abs(A.value)+"%"),1)],2),A.value>0?(d(),h("span",X_,_(f(u)("More than %s",c.value==="Today"?p.$t("Yesterday"):p.$t(c.value))),1)):A.value<0?(d(),h("span",J_,_(f(u)("Less than %s",c.value==="Today"?p.$t("Yesterday"):p.$t(c.value))),1)):x("",!0)])):x("",!0),!e.loading&&e.currentRange==="all_time"?(d(),h("div",Z_,[i("span",eg,_(p.$t("All Time")),1)])):x("",!0)])])}}},ag={name:"CardFooter"},sg={class:"fct-card-footer"};function ng(e,t,a,s,n,l){return d(),h("div",sg,[Jt(e.$slots,"default")])}const nA=Ue(ag,[["render",ng]]);class fp{constructor(){Se(this,"_attributes",{})}attribute(t,a){return this._attributes[t]=a,this}setAttribute(t){return this._attributes=typeof t=="object"?t:this._attributes,this}}class _n{static install(t,a,s={},n=!1){const l=new a(...Object.values(s));Object.keys(l).forEach(A=>{(n||!t.hasOwnProperty(A))&&(t[A]=l[A])}),Object.getOwnPropertyNames(a.prototype).forEach(A=>{A!=="constructor"&&typeof l[A]=="function"&&(n||typeof t[A]!="function")&&(t[A]=l[A].bind(t))})}}class og extends Pa{constructor(){super(...arguments);Se(this,"data",{salesGrowthChart:[],countryHeatMap:[],fluctuations:[],dashBoardStats:[],recentOrders:[],recentActivities:[],topSoldProducts:[],currencySign:He.get("shop.currency_sign"),isBusy:{recentActivities:!1,fluctuations:!1,dashBoardStats:!1,recentOrders:!1,countryHeatMap:!1,salesGrowthChart:!0,topSoldProducts:!0}})}get controllerKey(){return"ReportingController"}beforeInit(){}makeRequest(a,s,n,l){this.data.isBusy[l]=!0,typeof s!="object"&&(s={});const A=ie.get(`reports/${a}`,s);return this.resolvePromiseResponse(A,n,l),A}resolvePromiseResponse(a,s=null,n=null){a.then(l=>{n==null||s==null||(this.data[n]=l[s])}).catch(l=>{}).finally(()=>{this.data.isBusy[n]=!1})}getDashboardStats(a={}){return this.makeRequest("dashboard-stats",a,"dashBoardStats","dashBoardStats")}getSalesGrowthChart(a={}){return this.makeRequest("sales-growth-chart",a,"salesGrowthChart","salesGrowthChart")}getCountryHeatMap(a={}){return this.makeRequest("country-heat-map",a,"countryHeatMap","countryHeatMap")}getRecentOrders(a={}){return this.makeRequest("get-recent-orders",a,"recentOrders","recentOrders")}getRecentActivities(a={}){return this.makeRequest("get-recent-activities",a,"recentActivities","recentActivities")}getSummary(a={}){return this.makeRequest("get-dashboard-summary",a,"summaryData","summaryData")}getTopSoldProducts(a={}){return this.makeRequest("fetch-top-sold-products",a,"topSoldProducts","topSoldProducts")}}const Sa=og.init(),lg={},ig={class:"fct-order-stats-row"},rg={class:"p-4 bg-gray-25 rounded dark:bg-primary-500"},dg={class:"flex items-center gap-2 mb-3"},Ag={class:"right flex flex-col flex-1 gap-2"};function cg(e,t){const a=w("el-skeleton-item"),s=w("el-skeleton");return d(),h("div",ig,[(d(),h(H,null,Z(4,n=>o(s,{animated:"",key:n},{template:r(()=>[i("div",rg,[i("div",dg,[o(a,{variant:"p",class:"rounded w-10 h-10 block"}),i("div",Ag,[o(a,{variant:"p",class:"rounded w-4/5 block"}),o(a,{variant:"p",class:"rounded w-1/2 block"})])]),i("div",null,[o(a,{variant:"p",class:"rounded w-2/3 block"})])])]),_:2},1024)),64))])}const ug=Ue(lg,[["render",cg]]),pg={class:"fct-order-stats-wrap"},fg={class:"fct-order-stats-actions flex items-center gap-2.5"},mg={class:"fct-order-stats-body"},hg={key:1,class:"fct-order-stats-row"},_g={class:"flex justify-end mt-2"},gg=Object.assign({name:"OrderStatBar"},{__name:"OrderStatBar",setup(e){const t=M(pt.get("order_stat_collapse",!1)),a=M(""),s=vt().ctx,n=M(!1),l=M(!0),A=M(!1),c=M("-7 days"),p=Oa(),m=M({"-0 days":{label:u("Today"),desc:u("Compared to yesterday")},"-7 days":{label:u("Last 7 days"),desc:u("Compared to the previous 7 days")},"-30 days":{label:u("Last 30 days"),desc:u("Compared to the previous 30 days")},this_month:{label:u("This Month"),desc:u("Compared to the previous Month")},all_time:{label:u("All Time"),desc:u("See All time Sales Stat")}}),g=async v=>{if(c.value!==v)try{c.value=v,a.value="collapse",t.value===!0&&(t.value=!1,pt.set("order_stat_collapse",t.value)),await Promise.all([s.Storage().set("order_quick_stat_bar_range",c.value),y()])}catch(C){console.error("Error in handleStatRangeChanged:",C)}},y=()=>{A.value=!1,l.value=!0;const v={"-0 days":[Me().startOf("day").format("YYYY-MM-DD"),Me().endOf("day").format("YYYY-MM-DD")],"-7 days":[Me().subtract(7,"days").startOf("day").format("YYYY-MM-DD"),Me().endOf("day").format("YYYY-MM-DD")],"-30 days":[Me().subtract(30,"days").startOf("day").format("YYYY-MM-DD"),Me().endOf("day").format("YYYY-MM-DD")],this_month:[Me().startOf("month").format("YYYY-MM-DD"),Me().endOf("day").format("YYYY-MM-DD")],all_time:[null,null]},[C,b]=v[c.value]||[Me().startOf("month"),Me().endOf("day")],B={startDate:C,endDate:b,paymentStatus:"all"};Sa.getDashboardStats({params:{...B}}).then(()=>{n.value=Sa.data.dashBoardStats}).catch(k=>{console.error("Error fetching dashboard stats:",k)}).finally(()=>{l.value=!1})};return Be(()=>{c.value=pt.get("order_quick_stat_bar_range","-0 days");let v=pt.get("order_quick_stat_bar_collapse_item");a.value=v===null?"collapse":v,y()}),(v,C)=>{const b=w("el-button");return d(),h("div",pg,[o(he,null,{default:r(()=>[o(we,{title:f(u)("Order Stats Overview"),border_bottom:""},{action:r(()=>[i("div",fg,[o(jd,{class:"hide-animation-on-mobile"},{default:r(()=>[(d(!0),h(H,null,Z(m.value,(B,k)=>(d(),F(ti,{title:`${f(u)("Order Stats Overview of")} ${B.label}`,tabindex:"0",key:k,onClick:U=>g(k),class:le(k===c.value?"active":"")},{default:r(()=>[O(_(B.label),1)]),_:2},1032,["title","onClick","class"]))),128))]),_:1})])]),_:1},8,["title"]),o(me,null,{default:r(()=>[i("div",mg,[l.value?(d(),F(ug,{key:0})):(d(),h("div",hg,[(d(!0),h(H,null,Z(n.value,(B,k)=>(d(),h("div",{key:k,class:"fct-order-stats-col cursor-pointer",onClick:C[0]||(C[0]=U=>f(p).push({name:"reports_orders"}))},[(d(),F(tg,{key:k,stat:B,"current-range":c.value,"stat-ranges":m.value,loading:l.value,"stat-key":k},{icon:r(()=>[o(j,{name:B.icon},null,8,["name"])]),_:2},1032,["stat","current-range","stat-ranges","loading","stat-key"]))]))),128))])),i("div",_g,[o(b,{text:"",class:"underline-link-button",onClick:C[1]||(C[1]=B=>f(p).push({name:"reports_orders"}))},{default:r(()=>[O(_(f(u)("See Full Report")),1)]),_:1})])])]),_:1})]),_:1})])}}}),vg={class:"table-cell"},yg={class:"table-cell"},bg={class:"table-cell"},wg={class:"table-cell"},Cg={class:"table-cell items-center gap-1"},Bg={class:"table-cell"},kg={class:"table-cell"},xg={class:"table-cell"},Sg={__name:"OrdersLoader",props:{nextPageCount:{type:Number,default:0},orderTable:{type:Object,default:()=>({})}},setup(e){const t=e,a=n=>t.orderTable.columns.includes(n),s=Array.from({length:t.nextPageCount},(n,l)=>l+1);return(n,l)=>{const A=w("el-table-column"),c=w("el-skeleton-item"),p=w("el-table"),m=w("el-skeleton");return d(),F(m,{animated:""},{template:r(()=>[o(p,{data:f(s),class:"w-full compact-table responsive"},{empty:r(()=>l[0]||(l[0]=[])),default:r(()=>[x("",!0),o(A,{label:n.$t("# Date"),width:140},{default:r(()=>[i("div",vg,[o(c,{varient:"p",class:"w-4/5"})])]),_:1},8,["label"]),a("customer")?(d(),F(A,{key:1,width:"100",label:n.$t("Customer")},{default:r(()=>[i("div",yg,[o(c,{varient:"p",class:"w-4/5"})])]),_:1},8,["label"])):x("",!0),a("order_items")?(d(),F(A,{key:2,label:n.$t("Items"),width:"250"},{default:r(()=>[i("div",bg,[o(c,{varient:"p",class:"w-4/5"})])]),_:1},8,["label"])):x("",!0),o(A,{width:"100",label:n.$t("Total")},{default:r(()=>[i("div",wg,[o(c,{varient:"p",class:"w-4/5"})])]),_:1},8,["label"]),o(A,{width:"150",label:n.$t("Payment Status")},{default:r(()=>[i("div",Cg,[o(c,{varient:"p",class:"w-4/5"}),o(c,{varient:"p",class:"w-3/5"})])]),_:1},8,["label"]),a("status")?(d(),F(A,{key:3,width:"150",label:n.$t("Status")},{default:r(()=>[i("div",Bg,[o(c,{varient:"p",class:"w-4/5"})])]),_:1},8,["label"])):x("",!0),a("type")?(d(),F(A,{key:4,width:"110",label:n.$t("Order Type")},{default:r(()=>[i("div",kg,[o(c,{varient:"p",class:"w-4/5"})])]),_:1},8,["label"])):x("",!0),a("actions")?(d(),F(A,{key:5,width:"60",label:""},{default:r(()=>[i("div",xg,[o(c,{varient:"p",class:"w-3/5"})])]),_:1})):x("",!0)]),_:1},8,["data"])]),_:1})}}},Fg={},Eg={class:"px-4 py-3"},Ug={class:"grid grid-cols-3 gap-5 mt-5"};function $g(e,t){const a=w("el-skeleton-item"),s=w("el-skeleton");return d(),F(s,{animated:""},{template:r(()=>[i("div",Eg,[(d(),h(H,null,Z(2,n=>i("div",{key:n,class:"flex items-center justify-between mb-3"},[o(a,{varient:"p",class:"w-1/2"}),o(a,{varient:"p",class:"w-[100px]"})])),64)),i("div",Ug,[(d(),h(H,null,Z(3,n=>i("div",{key:n},[o(a,{varient:"p",class:"w-1/2"}),o(a,{varient:"p",class:"w-[100px]"})])),64))])])]),_:1})}const Dg=Ue(Fg,[["render",$g]]),Qg={class:"fct-all-orders-page fct-layout-width"},Ig={class:"fct-delete-test-orders-content"},Tg={if:"deleteTestOrdersProgressTitle",class:"fct-delete-test-orders-title"},Vg={class:"fct-delete-test-orders-meta"},Mg={class:"fct-delete-test-orders-text"},Lg={key:0,class:"fct-delete-test-orders-loading"},Og={class:"fct-test-orders-loading-content"},Rg={class:"fct-loading-bars"},Hg=["id"],Pg={class:"fct-delete-test-orders-percentage"},Kg={class:"fct-delete-test-orders-stats"},Ng={class:"fct-delete-test-orders-stat-row"},Gg={class:"fct-delete-test-orders-stat-label"},zg={class:"fct-delete-test-orders-stat-value"},jg={class:"fct-delete-test-orders-stat-row"},Yg={class:"fct-delete-test-orders-stat-label"},qg={class:"fct-delete-test-orders-stat-value is-success"},Wg={class:"fct-delete-test-orders-stat-row"},Xg={class:"fct-delete-test-orders-stat-label"},Jg={class:"fct-delete-test-orders-stat-value is-danger"},Zg={key:1,class:"fct-delete-test-orders-message"},ev={key:0,class:"dialog-footer"},tv={class:"fct-all-orders-wrap"},av={__name:"AllOrders",setup(e){const t=pp({instance:vt()}),a=M(!1),s=M(!1),n=M(!1),l=M(!1),A=M({total:0,processed:0,deleted:0,failed:0}),c=M(""),p=z(()=>A.value.total?Math.min(100,Math.round(A.value.processed/A.value.total*100)):0),m=z(()=>{if(!A.value.total)return"";const U=Math.min(A.value.processed,A.value.total);return n.value?u("Deleting %1$s of %2$s Test Orders",U,A.value.total):u("Deleted %1$s of %2$s Test Orders",U,A.value.total)}),g=z(()=>A.value.total?n.value?u("Deleting... %s%",p.value):u("Completed"):""),y=()=>{s.value=window.innerWidth<768},v=()=>{A.value={total:0,processed:0,deleted:0,failed:0},c.value=""},C=U=>{U==="show_order_stats"&&(pt.set("show_order_stats",!a.value),a.value=!a.value),U==="show_delete_bulk_action"&&t.showBulkDeleteAction(!0),U==="hide_delete_bulk_action"&&t.showBulkDeleteAction(!1),U==="delete_test_orders"&&b()},b=async()=>{var U,T;if(!n.value){try{await ba.confirm(u("Are you sure you want to delete all test orders? This action cannot be undone."),u("Confirm Delete!"),{confirmButtonText:u("Delete"),cancelButtonText:u("Cancel"),cancelButtonClass:"el-button--small",confirmButtonClass:"el-button--small",type:"warning"})}catch{return}n.value=!0,l.value=!0,v();try{let S=0,E=0,Q=0;for(;;){const L=await ie.post("orders/do-bulk-action",{action:"delete_test_orders",last_order_id:S}),I=L||{};if(E=E||Number(I.total_count||0),Q+=Number(I.batch_count||0),A.value={total:E,processed:Q,deleted:A.value.deleted+Number(I.deleted_count||0),failed:A.value.failed+Number(I.failed_count||0)},c.value=I.has_more?u("Processed %1$s of %2$s test orders...",Math.min(Q,E),E):(L==null?void 0:L.message)||"",!I.has_more)break;S=Number(I.last_attempted_order_id||0),await new Promise($=>setTimeout($,100))}if(!A.value.total){l.value=!1,Y.info(u("No test orders found to delete"));return}const D=A.value.failed?u("Deleted %1$s test orders. %2$s test orders could not be deleted.",A.value.deleted,A.value.failed):u("Deleted %s test orders successfully",A.value.deleted);c.value=D,Y.success(D),t.fetch()}catch(S){c.value=((U=S==null?void 0:S.data)==null?void 0:U.message)||u("Failed to delete test orders"),Y.error(((T=S==null?void 0:S.data)==null?void 0:T.message)||u("Failed to delete test orders"))}finally{n.value=!1}}},B=()=>{l.value=!1},k=()=>{const U=pt.get("show_order_stats");U&&(a.value=U)};return Be(()=>{k(),y(),window.addEventListener("resize",y)}),it(()=>{window.removeEventListener("resize",y)}),(U,T)=>{const S=w("el-icon"),E=w("el-button"),Q=w("el-dropdown-item"),D=w("el-dropdown-menu"),L=w("el-dropdown"),I=w("el-tag"),$=w("el-progress"),V=w("el-dialog");return d(),h("div",Qg,[o(Ha,{title:f(u)("Orders")},{action:r(()=>[o(gt,{permission:["reports/view","orders/manage"]},{default:r(()=>[o(L,{trigger:"click","popper-class":"fct-dropdown",onCommand:C,placement:"bottom-end"},{dropdown:r(()=>[o(D,null,{default:r(()=>[o(gt,{permission:"reports/view"},{default:r(()=>[o(Q,{command:"show_order_stats"},{default:r(()=>[a.value?(d(),h(H,{key:1},[o(j,{name:"EyeOff"}),O(" "+_(f(u)("Hide Order Stats")),1)],64)):(d(),h(H,{key:0},[o(j,{name:"Eye"}),O(" "+_(f(u)("Show Order Stats")),1)],64))]),_:1}),f(t).data.showDeleteBulkAction?x("",!0):(d(),F(Q,{key:0,command:"show_delete_bulk_action"},{default:r(()=>[o(j,{name:"Eye"}),O(" "+_(f(u)("Show Bulk Actions")),1)]),_:1})),f(t).data.showDeleteBulkAction?(d(),F(Q,{key:1,command:"hide_delete_bulk_action"},{default:r(()=>[o(j,{name:"EyeOff"}),O(" "+_(f(u)("Hide Bulk Actions")),1)]),_:1})):x("",!0)]),_:1}),o(gt,{permission:"orders/manage"},{default:r(()=>[o(Q,{command:"delete_test_orders",disabled:n.value,class:"item-destructive"},{default:r(()=>[o(j,{name:"Delete"}),O(" "+_(n.value?f(u)("Deleting Test Orders..."):f(u)("Delete Test Orders")),1)]),_:1},8,["disabled"])]),_:1})]),_:1})]),default:r(()=>[o(E,null,{default:r(()=>[O(_(f(u)("More actions"))+" ",1),o(S,null,{default:r(()=>[o(f(Vi))]),_:1})]),_:1})]),_:1})]),_:1}),o(gt,{permission:"orders/create"},{default:r(()=>[o(E,{tag:"router-link",type:"primary",to:{name:"add_order"}},{default:r(()=>[O(_(f(u)("Create Order")),1)]),_:1})]),_:1})]),_:1},8,["title"]),o(V,{modelValue:l.value,"onUpdate:modelValue":T[0]||(T[0]=R=>l.value=R),title:f(u)("Delete Test Orders"),"append-to-body":!0,"close-on-click-modal":!1,"show-close":!0,"close-on-press-escape":!0,onClose:B,class:"fct-delete-test-orders-modal"},{footer:r(()=>[n.value?x("",!0):(d(),h("div",ev,[o(E,{type:"primary",onClick:B},{default:r(()=>[O(_(f(u)("Done")),1)]),_:1})]))]),default:r(()=>[i("div",Ig,[i("div",Tg,_(m.value),1),i("div",Vg,[i("div",Mg,_(n.value?f(u)("You can close this — deletion will continue in the background"):f(u)("Test order deletion completed.")),1),g.value?(d(),F(I,{key:0,type:"success",class:le(["fct-delete-test-orders-status",{"is-complete":!n.value}])},{default:r(()=>[O(_(g.value),1)]),_:1},8,["class"])):x("",!0)]),n.value?(d(),h("div",Lg,[i("div",Og,[i("div",Rg,[(d(),h(H,null,Z(8,R=>i("div",{key:R,class:"bar-block",id:`bar-block-${R+1}`},null,8,Hg)),64))]),O(" "+_(f(u)("Deleting...")),1)]),i("span",Pg,_(p.value)+"% ",1)])):x("",!0),o(ra,{visible:n.value,fade:"",duration:300},{default:r(()=>[o($,{percentage:p.value,"stroke-width":6,striped:"","striped-flow":"","show-text":!1,status:n.value?void 0:"success",class:"fct-delete-test-orders-progress"},null,8,["percentage","status"])]),_:1},8,["visible"]),i("div",Kg,[i("div",Ng,[T[1]||(T[1]=i("span",{class:"fct-delete-test-orders-stat-icon"},[i("svg",{width:"24",height:"24",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[i("path",{opacity:"0.4",d:"M13.66 1.1333C13.3741 1.09487 13.0575 1.0716 12.7083 1.05762V1.66146V1.70461C12.7083 2.25782 12.7084 2.73471 12.6567 3.11653C12.6017 3.52616 12.4775 3.91865 12.1592 4.23714C11.8409 4.55563 11.4483 4.68009 11.0383 4.73518C10.6566 4.78653 10.18 4.78649 9.62663 4.78646H9.58329H8.74996H8.70662C8.15333 4.78649 7.67666 4.78653 7.29499 4.73518C6.88499 4.68009 6.49249 4.55563 6.17416 4.23714C5.85583 3.91865 5.73166 3.52616 5.67666 3.11653C5.62333 2.72482 5.625 2.23304 5.625 1.66146V1.05762C5.27583 1.0716 4.95917 1.09487 4.67333 1.1333C3.92333 1.23414 3.2925 1.45038 2.79083 1.95198C2.28917 2.45358 2.07249 3.08503 1.97166 3.83513C1.87499 4.55588 1.875 5.47186 1.875 6.60774V13.3818C1.875 14.5178 1.87499 15.4337 1.97166 16.1544C2.07249 16.9046 2.28917 17.536 2.79083 18.0376C3.2925 18.5392 3.92333 18.7554 4.67333 18.8563C5.39417 18.9532 6.31 18.9532 7.44667 18.9531H10.8866C11.0791 18.9532 11.2641 18.9519 11.4433 18.9515C11.2358 18.5378 11.0666 18.3449 10.9875 18.2671C10.18 18.0578 9.58329 17.3269 9.58329 16.4539C9.58329 15.4184 10.4225 14.5789 11.4583 14.5789C11.6941 14.5789 11.9733 14.6359 12.1158 14.6766C12.31 14.7322 12.52 14.8165 12.7383 14.9346C13.1533 14.298 13.6958 13.5629 14.3133 12.9367C14.8741 12.3678 15.5933 11.7846 16.4583 11.432V6.60774C16.4583 5.47186 16.4583 4.55588 16.3616 3.83513C16.2608 3.08503 16.0441 2.45358 15.5425 1.95198C15.0408 1.45038 14.41 1.23414 13.66 1.1333Z",fill:"#017EF3"}),i("path",{d:"M17.012 12.3361C17.4462 12.1825 17.922 12.4094 18.0753 12.8431C18.2295 13.2768 18.002 13.753 17.5687 13.9068C17.1453 14.0568 16.6945 14.3786 16.2395 14.8393C15.7912 15.2944 15.3778 15.845 15.022 16.3897C14.6687 16.9317 14.3828 17.4519 14.1853 17.8374C14.087 18.0296 13.9387 18.3456 13.8879 18.4534C13.7587 18.7501 13.4695 18.9462 13.1453 18.9548C12.822 18.9633 12.5228 18.7836 12.3778 18.4942C12.0112 17.7597 11.6821 17.4672 11.5154 17.3564C11.4421 17.3074 11.3937 17.2895 11.3762 17.284C10.9537 17.2435 10.6237 16.8878 10.6237 16.4548C10.6237 15.9945 10.997 15.6214 11.457 15.6214C11.5645 15.6214 11.7428 15.6547 11.8287 15.6792C12.002 15.7287 12.2112 15.8173 12.4403 15.9698C12.6295 16.0958 12.8245 16.2633 13.0228 16.48C13.1945 16.1726 13.3971 15.8302 13.6271 15.4782C14.0187 14.8772 14.5003 14.2296 15.0528 13.6691C15.6003 13.1143 16.2595 12.6028 17.012 12.3361ZM9.16532 11.8714C9.51032 11.8714 9.79032 12.1513 9.79032 12.4964C9.79032 12.8416 9.51032 13.1214 9.16532 13.1214H5.83203C5.48703 13.1214 5.20703 12.8416 5.20703 12.4964C5.20703 12.1513 5.48703 11.8714 5.83203 11.8714H9.16532ZM12.4987 8.53809C12.8437 8.53809 13.1237 8.81793 13.1237 9.16309C13.1237 9.50826 12.8437 9.78809 12.4987 9.78809H5.83203C5.48703 9.78809 5.20703 9.50826 5.20703 9.16309C5.20703 8.81793 5.48703 8.53809 5.83203 8.53809H12.4987ZM11.457 1.0389V1.66309C11.457 2.26994 11.4562 2.66228 11.417 2.95134C11.3803 3.22242 11.3212 3.3074 11.2737 3.35498C11.2262 3.40256 11.1412 3.46176 10.8704 3.49821C10.5812 3.53706 10.1887 3.53809 9.58199 3.53809H8.74866C8.14203 3.53809 7.74952 3.53706 7.46036 3.49821C7.18952 3.46176 7.10453 3.40256 7.05703 3.35498C7.00953 3.3074 6.95036 3.22242 6.9137 2.95134C6.87453 2.66228 6.8737 2.26994 6.8737 1.66309V1.0389C7.05786 1.03839 7.24786 1.03808 7.44536 1.03809H10.8853C11.0828 1.03808 11.2728 1.03839 11.457 1.0389Z",fill:"#017EF3"})])],-1)),i("span",Gg,_(f(u)("Processed")),1),i("span",zg,_(A.value.processed)+" / "+_(A.value.total),1)]),i("div",jg,[T[2]||(T[2]=i("span",{class:"fct-delete-test-orders-stat-icon"},[i("svg",{width:"24",height:"24",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[i("path",{opacity:"0.4",d:"M16.9433 13.0463C16.88 14.0913 16.8292 14.9197 16.725 15.5813C16.6183 16.2605 16.4475 16.8263 16.1067 17.3205C15.7942 17.773 15.3917 18.1547 14.9258 18.4413C14.4158 18.7555 13.8467 18.8922 13.1692 18.958H8.06417C7.38667 18.8922 6.81667 18.7547 6.30667 18.4405C5.84 18.153 5.4375 17.7705 5.125 17.3172C4.78417 16.8222 4.61417 16.2563 4.50833 15.5763C4.405 14.913 4.355 14.083 4.2925 13.0372L3.75 3.95801H17.5L16.9433 13.0463Z",fill:"#189877"}),i("path",{d:"M11.7488 1.06879C12.2196 1.11046 12.6621 1.25462 13.043 1.53796C13.3238 1.74712 13.5188 2.00379 13.6855 2.28212C13.8405 2.53962 13.9963 2.86046 14.173 3.22462L14.528 3.95879H18.1263C18.5863 3.95879 18.9596 4.33129 18.9596 4.79212C18.9596 5.25212 18.5863 5.62546 18.1263 5.62546H3.1263C2.6663 5.62546 2.29297 5.25212 2.29297 4.79212C2.29297 4.33129 2.6663 3.95879 3.1263 3.95879H6.8013L7.09797 3.30796C7.26964 2.93046 7.4213 2.59796 7.5738 2.33129C7.73797 2.04296 7.93214 1.77629 8.21714 1.55796C8.6013 1.26296 9.05297 1.11379 9.53464 1.06962C9.86213 1.03962 10.193 1.04046 10.5221 1.04129C10.5571 1.04129 10.5913 1.04212 10.6263 1.04212C10.6605 1.04212 10.6955 1.04212 10.7288 1.04212C11.1138 1.04212 11.4605 1.04296 11.7488 1.06879ZM8.63297 3.95879H12.6763C12.4871 3.56879 12.3663 3.32212 12.2571 3.13962C12.0963 2.87296 11.9046 2.75546 11.6005 2.72879C11.3846 2.70962 11.103 2.70879 10.6555 2.70879C10.1963 2.70879 9.90714 2.70962 9.68547 2.72962C9.3738 2.75796 9.17964 2.87962 9.0213 3.15712C8.91714 3.33879 8.80464 3.58212 8.63297 3.95879Z",fill:"#189877"})])],-1)),i("span",Yg,_(f(u)("Deleted")),1),i("span",qg,_(A.value.deleted),1)]),i("div",Wg,[T[3]||(T[3]=i("span",{class:"fct-delete-test-orders-stat-icon"},[i("svg",{width:"24",height:"24",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[i("path",{opacity:"0.4",d:"M10.0013 1.04004C14.9488 1.04004 18.9596 5.05082 18.9596 9.99833C18.9596 14.9459 14.9488 18.9567 10.0013 18.9567C5.0538 18.9567 1.04297 14.9459 1.04297 9.99833C1.04297 9.54867 1.40778 9.18392 1.85677 9.18375C2.30677 9.18375 2.6722 9.54858 2.6722 9.99833C2.6722 14.0463 5.95297 17.3282 10.0013 17.3282C14.0496 17.3282 17.3304 14.0463 17.3304 9.99833C17.3304 5.95037 14.0496 2.66846 10.0013 2.66846C9.55138 2.66846 9.18764 2.30434 9.18747 1.85466C9.18747 1.40488 9.5513 1.04004 10.0013 1.04004ZM2.80566 4.66634C3.08066 4.35891 3.55043 4.30436 3.89209 4.55241C4.25514 4.81714 4.33519 5.32656 4.07031 5.69011L3.90674 5.92448C3.53507 6.47876 3.23784 7.08712 3.02784 7.73356C2.88857 8.16094 2.42904 8.39483 2.00163 8.25602C1.57424 8.11701 1.33924 7.65747 1.47835 7.22982C1.77169 6.32508 2.20608 5.48362 2.75358 4.73145L2.80566 4.66634ZM7.3125 1.45345C7.71574 1.36659 8.12817 1.59791 8.25814 1.9987C8.39722 2.42644 8.16233 2.88598 7.73486 3.02491L7.46061 3.12011C6.82564 3.35476 6.23137 3.67519 5.69222 4.06738L5.62224 4.11214C5.26557 4.32003 4.80286 4.22905 4.55453 3.88835C4.29044 3.52472 4.37034 3.01452 4.73356 2.74984L5.02084 2.55046C5.69734 2.09692 6.44048 1.7332 7.23194 1.47624L7.3125 1.45345Z",fill:"#F04438"}),i("path",{d:"M11.9754 6.85201C12.3029 6.58506 12.7854 6.6039 13.0904 6.90897C13.3954 7.21407 13.4145 7.69657 13.147 8.02388L13.0904 8.08736L11.1787 9.99808L13.0895 11.9089L13.147 11.9724C13.4137 12.2997 13.3945 12.7823 13.0895 13.0873C12.7845 13.3923 12.302 13.4113 11.9745 13.1442L11.9112 13.0873L10.0012 11.1765L8.09122 13.0873C7.76538 13.4127 7.23789 13.4127 6.91289 13.0873C6.58706 12.7619 6.58706 12.2344 6.91289 11.9089L8.82288 9.99808L6.91206 8.08736L6.85456 8.02388C6.58789 7.69657 6.60706 7.21407 6.91206 6.90897C7.21706 6.6039 7.69955 6.58506 8.02705 6.85201L8.09039 6.90897L10.0012 8.81975L11.912 6.90897L11.9754 6.85201Z",fill:"#F04438"})])],-1)),i("span",Xg,_(f(u)("Failed")),1),i("span",Jg,_(A.value.failed),1)])]),c.value&&!n.value?(d(),h("p",Zg,_(c.value),1)):x("",!0)])]),_:1},8,["modelValue","title"]),o(gt,{permission:"reports/view"},{default:r(()=>[a.value?(d(),F(gg,{key:0})):x("",!0)]),_:1}),o(gt,{permission:"orders/view"},{default:r(()=>[i("div",tv,[o(Hn,{table:f(t),classicTabStyle:!0,hasMobileSlot:!0},{mobile:r(()=>[f(t).isLoading()?(d(),F(Dg,{key:0})):x("",!0),f(t).isLoading()?x("",!0):(d(),F(Jd,{key:1,table:f(t),orders:f(t).getTableData(),columns:f(t).data.columns,"empty-text":f(t).emptyMessage},null,8,["table","orders","columns","empty-text"]))]),default:r(()=>[f(t).isLoading()?(d(),F(Sg,{key:0,orderTable:f(t),"next-page-count":f(t).nextPageCount},null,8,["orderTable","next-page-count"])):(d(),F(Xd,{key:1,table:f(t),orders:f(t).getTableData(),columns:f(t).data.columns,"empty-text":f(t).emptyMessage},null,8,["table","orders","columns","empty-text"]))]),_:1},8,["table"])])]),_:1})])}}},sv={class:"setting-wrap"},nv={class:"setting-wrap-inner"},ov={class:"setting-confirmation-content"},lv={class:"custom-wp-editor-wrapper"},iv={class:"setting-save-action"},rv={__name:"InvoicePacking",setup(e){const t=M([]),a=M([]),s=M(!1),n=M(!1);wn().onSave(()=>{m()});const A=M([u("Invoice Template"),u("Packing Slip Template"),u("Delivery Slip Template"),u("Shipping Slip Template"),u("Dispatch Slip Template")]),c=()=>{s.value=!0,ie.get("templates/print-templates").then(g=>{t.value=g.templates,s.value=!1}).catch(g=>{Y.error(g)}).finally(()=>{s.value=!1})},p=()=>{s.value=!0,ie.get("settings/confirmation/shortcode",{}).then(g=>{a.value=g.data}).catch(g=>{Y.error(g)}).finally(()=>{s.value=!1})},m=()=>{n.value=!0,ie.put("templates/print-templates",{templates:t.value}).then(g=>{Y.success(g.message)}).catch(g=>{Y.error(g)}).finally(()=>{n.value=!1})};return Be(()=>{c(),p()}),(g,y)=>{const v=w("el-skeleton");return w("el-button"),d(),h("div",sv,[o(fa,{heading:f(u)("Invoice & Packing"),"show-save-button":!1},null,8,["heading"]),i("div",nv,[o(Qs,{class:"mb-5",type:"information",content:f(u)("It will be available soon!")},null,8,["content"]),s.value?(d(!0),h(H,{key:0},Z(A.value,(C,b)=>(d(),F(he,{key:b},{default:r(()=>[o(we,{title:C,border_bottom:""},null,8,["title"]),o(me,null,{default:r(()=>[o(v,{animated:"",rows:6})]),_:1})]),_:2},1024))),128)):x("",!0),!s.value&&t.value.length>0?(d(),h(H,{key:1},[(d(!0),h(H,null,Z(t.value,(C,b)=>(d(),F(he,{key:b},{default:r(()=>[o(we,{title:C.title+" (Under Development)",border_bottom:""},null,8,["title"]),o(me,null,{default:r(()=>[i("div",ov,[i("div",lv,[o(qs,{"short-codes":a.value,modelValue:C.content,"onUpdate:modelValue":B=>C.content=B,onUpdate:B=>{C.content=B}},null,8,["short-codes","modelValue","onUpdate:modelValue","onUpdate"])])])]),_:2},1024)]),_:2},1024))),128)),i("div",iv,[x("",!0)])],64)):x("",!0)])])}}},dv={class:"fct-pdf-pro-gate"},Av={class:"fct-pdf-pro-gate-inner"},cv={class:"fct-pdf-pro-heading"},uv={class:"fct-pdf-pro-icon"},pv={class:"fct-pdf-pro-label"},fv={class:"fct-pdf-pro-badge"},mv={class:"fct-pdf-pro-desc"},hv={__name:"PdfTemplateProGate",setup(e){return(t,a)=>{const s=w("el-button");return d(),h("div",dv,[i("div",Av,[i("div",cv,[i("div",uv,[o(j,{name:"Crown"})]),i("span",pv,_(f(u)("PDF Templates")),1),i("span",fv,_(f(u)("Pro")),1)]),i("p",mv,_(f(u)("Customizable PDF receipts, invoices, and e-invoices with ZUGFeRD support.")),1),o(s,{type:"primary",size:"small",tag:"a",href:"https://fluentcart.com/pricing/",target:"_blank"},{default:r(()=>[o(j,{name:"Crown"}),O(" "+_(f(u)("Upgrade to Pro")),1)]),_:1})])])}}},_v=Ue(hv,[["__scopeId","data-v-83e6a503"]]),gv={__name:"PdfTemplateRoute",setup(e){const t=He.get("app_config.isProActive");return(a,s)=>{const n=w("router-view");return f(t)?(d(),F(n,{key:1})):(d(),F(_v,{key:0}))}}},vv={class:"setting-wrap"},yv={class:"setting-wrap-inner"},bv={class:"flex gap-5"},wv={class:"flex flex-col items-center justify-center py-12 text-center"},Cv={class:"text-lg font-semibold mb-2 text-system-dark dark:text-gray-200"},Bv={class:"text-sm text-system-mid dark:text-gray-400 mb-6 max-w-md"},kv={class:"fct-pdf-template-desc"},xv={class:"fct-pdf-template-grid"},Sv={class:"fct-pdf-template-preview"},Fv={class:"fct-pdf-template-preview-placeholder"},Ev={class:"fct-pdf-placeholder-text"},Uv={class:"fct-pdf-template-overlay"},$v={class:"fct-pdf-template-footer"},Dv={class:"fct-pdf-template-name-row"},Qv={class:"fct-pdf-template-title"},Iv={key:0,class:"fct-pdf-badge fct-pdf-badge--default"},Tv={__name:"PdfTemplateIndex",setup(e){const t=Oa(),a=M(!0),s=M(!1),n=M({}),l=M(!1),A=M(""),c=M(!1),p=M(""),m=M(null),g=M(!1),y=M(!1),v=He.get("app_config.isProActive"),C=()=>{a.value=!0,ie.get("settings/pdf-templates/receipt").then(S=>{n.value=S.templates||{},s.value=S.has_fluent_pdf||!1,m.value=S.addon_info||null}).catch(S=>{var E;Y.error(((E=S.data)==null?void 0:E.message)||"Failed to load templates")}).finally(()=>{a.value=!1})},b=()=>{if(m.value){if(!v&&m.value.repo_link){window.open(m.value.repo_link,"_blank","noopener,noreferrer");return}g.value=!0,ie.post("settings/modules/plugin-addons/install",{plugin_slug:m.value.plugin_slug,source_type:m.value.source_type||"wordpress",source_link:m.value.source_link||"",asset_path:m.value.asset_path||""}).then(S=>{Y.success(S.message||u("Plugin installed successfully")),setTimeout(()=>{window.location.reload()},500)}).catch(S=>{var E;Y.error(((E=S.data)==null?void 0:E.message)||u("Failed to install plugin"))}).finally(()=>{g.value=!1})}},B=()=>{m.value&&(y.value=!0,ie.post("settings/modules/plugin-addons/activate",{plugin_file:m.value.plugin_file}).then(S=>{Y.success(S.message||u("Plugin activated successfully")),setTimeout(()=>{window.location.reload()},500)}).catch(S=>{var E;Y.error(((E=S.data)==null?void 0:E.message)||u("Failed to activate plugin"))}).finally(()=>{y.value=!1}))},k=()=>{A.value="",l.value=!0},U=()=>{if(!A.value.trim()){Y.error(u("Please enter a template name"));return}c.value=!0,ie.post("settings/pdf-templates/create",{title:A.value.trim()}).then(S=>{l.value=!1,Y.success(S.message||u("Template created")),S.slug?t.push({name:"edit-pdf-template",params:{template:S.slug}}):C()}).catch(S=>{var E;Y.error(((E=S.data)==null?void 0:E.message)||"Failed to create template")}).finally(()=>{c.value=!1})},T=S=>{p.value=S,ie.delete("settings/pdf-templates/delete/"+S).then(E=>{Y.success(E.message||u("Template deleted")),C()}).catch(E=>{var Q;Y.error(((Q=E.data)==null?void 0:Q.message)||"Failed to delete template")}).finally(()=>{p.value=""})};return Be(()=>{C()}),(S,E)=>{const Q=w("el-button"),D=w("el-skeleton-item"),L=w("el-skeleton"),I=w("el-popconfirm"),$=w("el-input"),V=w("el-form-item"),R=w("el-form"),P=w("el-dialog");return d(),h("div",vv,[o(fa,{heading:f(u)("PDF Templates"),"show-save-button":!1},Qt({_:2},[s.value?{name:"action",fn:r(()=>[o(Q,{type:"primary",size:"small",onClick:k},{default:r(()=>[O(_(f(u)("Add Template")),1)]),_:1})]),key:"0"}:void 0]),1032,["heading"]),i("div",yv,[a.value?(d(),F(he,{key:0},{default:r(()=>[o(me,null,{default:r(()=>[o(L,{animated:""},{template:r(()=>[o(D,{variant:"text",class:"w-[300px] mb-4"}),i("div",bv,[o(D,{variant:"rect",style:{width:"220px",height:"280px","border-radius":"8px"}}),o(D,{variant:"rect",style:{width:"220px",height:"280px","border-radius":"8px"}})])]),_:1})]),_:1})]),_:1})):x("",!0),!a.value&&!s.value&&m.value?(d(),F(he,{key:1},{default:r(()=>[o(me,null,{default:r(()=>[i("div",wv,[E[3]||(E[3]=i("svg",{class:"mb-4",width:"48",height:"48",viewBox:"0 0 32 32",fill:"none",stroke:"currentColor","stroke-width":"1.5"},[i("path",{d:"M8 2C6.9 2 6 2.9 6 4v24c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V10l-8-8H8z"}),i("path",{d:"M18 2v8h8"}),i("path",{d:"M12 18h8M12 22h6"})],-1)),i("h3",Cv,_(f(u)("Fluent PDF Required")),1),i("p",Bv,_(f(u)("To use PDF receipt templates, you need to install and activate the Fluent PDF plugin.")),1),m.value.is_installed?m.value.is_installed&&!m.value.is_active?(d(),F(Q,{key:1,type:"success",loading:y.value,onClick:B},{default:r(()=>[O(_(f(u)("Activate Plugin")),1)]),_:1},8,["loading"])):x("",!0):(d(),F(Q,{key:0,type:"primary",loading:g.value,onClick:b},{default:r(()=>[O(_(f(v)?f(u)("Install & Activate"):f(u)("Download")),1)]),_:1},8,["loading"]))])]),_:1})]),_:1})):x("",!0),!a.value&&s.value?(d(),F(he,{key:2},{default:r(()=>[o(me,null,{default:r(()=>[i("p",kv,_(f(u)("Customize PDF templates for email attachments. Select which template to attach in each email notification's settings.")),1),i("div",xv,[(d(!0),h(H,null,Z(n.value,(W,N)=>(d(),h("div",{key:N,class:"fct-pdf-template-card"},[i("div",Sv,[i("div",Fv,[E[4]||(E[4]=i("svg",{width:"40",height:"40",viewBox:"0 0 32 32",fill:"none",stroke:"#525866","stroke-width":"1.2"},[i("path",{d:"M8 2C6.9 2 6 2.9 6 4v24c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V10l-8-8H8z"}),i("path",{d:"M18 2v8h8"}),i("path",{d:"M12 18h8M12 22h6"})],-1)),i("span",Ev,_(W.title||f(u)("Receipt Template")),1)]),i("div",Uv,[o(Q,{type:"primary",size:"small",tag:"router-link",to:{name:"edit-pdf-template",params:{template:N}}},{default:r(()=>[O(_(f(u)("Edit Template")),1)]),_:2},1032,["to"])])]),i("div",$v,[i("div",Dv,[i("span",Qv,_(W.title||N),1),W.is_default?(d(),h("span",Iv,_(f(u)("Built-in")),1)):x("",!0)]),W.is_default?x("",!0):(d(),F(I,{key:0,title:f(u)("Delete this template?"),"confirm-button-text":f(u)("Delete"),"cancel-button-text":f(u)("Cancel"),"confirm-button-type":"danger",onConfirm:te=>T(N)},{reference:r(()=>[o(Q,{type:"danger",size:"small",text:"",loading:p.value===N,class:"fct-pdf-delete-btn"},{default:r(()=>E[5]||(E[5]=[i("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},[i("path",{d:"M3 6h18"}),i("path",{d:"M19 6v14a2 2 0 01-2 2H7a2 2 0 01-2-2V6m3 0V4a2 2 0 012-2h4a2 2 0 012 2v2"})],-1)])),_:2,__:[5]},1032,["loading"])]),_:2},1032,["title","confirm-button-text","cancel-button-text","onConfirm"]))])]))),128))])]),_:1})]),_:1})):x("",!0)]),o(P,{modelValue:l.value,"onUpdate:modelValue":E[2]||(E[2]=W=>l.value=W),title:f(u)("Add Custom Template"),width:"420px","close-on-click-modal":!1,"append-to-body":!0},{footer:r(()=>[o(Q,{onClick:E[1]||(E[1]=W=>l.value=!1)},{default:r(()=>[O(_(f(u)("Cancel")),1)]),_:1}),o(Q,{type:"primary",onClick:U,loading:c.value},{default:r(()=>[O(_(f(u)("Create")),1)]),_:1},8,["loading"])]),default:r(()=>[o(R,{onSubmit:qe(U,["prevent"]),"label-position":"top"},{default:r(()=>[o(V,{label:f(u)("Template Name")},{default:r(()=>[o($,{modelValue:A.value,"onUpdate:modelValue":E[0]||(E[0]=W=>A.value=W),placeholder:f(u)("e.g. Custom Invoice"),autofocus:""},null,8,["modelValue","placeholder"])]),_:1},8,["label"])]),_:1})]),_:1},8,["modelValue","title"])])}}},Vv={name:"EmailBodySkeleton",props:{showLoadingBadge:{type:Boolean,default:!1}}},Mv={class:"fct-email-body-skeleton"},Lv={class:"fct-email-body-skeleton__page"},Ov={key:0,class:"fct-ebs__badge"},Rv={class:"fct-ebs__badge-text"};function Hv(e,t,a,s,n,l){return d(),h("div",Mv,[i("div",Lv,[t[3]||(t[3]=ei('
',9)),a.showLoadingBadge?(d(),h("div",Ov,[t[0]||(t[0]=i("span",{class:"fct-ebs__dot"},null,-1)),t[1]||(t[1]=i("span",{class:"fct-ebs__dot"},null,-1)),t[2]||(t[2]=i("span",{class:"fct-ebs__dot"},null,-1)),i("span",Rv,_(e.$t("Loading block editor…")),1)])):x("",!0)])])}const td=Ue(Vv,[["render",Hv]]),Pv={name:"NewEditorFrame",components:{EmailBodySkeleton:td},emits:["update:modelValue","titleUpdated","contentUpdated","editorFullscreenToggle","featuredMediaUpdated","previewRequest","autosaveState"],props:{editorPath:{type:String,default:"/editor"},modelValue:{type:String,default:""},editorParams:{type:Object,default:()=>({})},frameHeight:{type:String,default:"500px"},documentTitle:{type:String,default:""}},data(){return{editorData:{content:""},editorFrame:null,editorOrigin:null,dataSent:!1,isFailing:!1,iframeReady:!1,pendingDataSend:!1,sendRetries:0,editorReadyReceived:!1,editorContentReady:!1,isFullscreen:!1,_timers:[]}},computed:{editorFailed(){return!this.dataSent&&this.isFailing&&!this.editorReadyReceived}},mounted(){this._setTimeout(()=>{this.editorReadyReceived||(this.isFailing=!0)},3e4),this.editorData.content=this.modelValue,this.editorData.title=this.documentTitle,this.createEditorIframe(),window.addEventListener("message",this.handleEditorMessage)},beforeUnmount(){this._timers.forEach(e=>clearTimeout(e)),this._timers=[],window.removeEventListener("message",this.handleEditorMessage),this.isFullscreen&&this.toggleFullScreen(!1),this.editorFrame&&(this.editorFrame.onload=null,this.$refs.iframeContainer.removeChild(this.editorFrame),this.editorFrame=null)},methods:{_setTimeout(e,t){const a=setTimeout(e,t);return this._timers.push(a),a},createEditorIframe(){this.editorFrame=document.createElement("iframe");let e=this.appVars.fct_editor_frame;if(this.editorParams){const t=new URLSearchParams(this.editorParams);e+="&"+t.toString()}try{this.editorOrigin=new URL(e,window.location.origin).origin}catch{this.editorOrigin=window.location.origin}this.editorFrame.src=e,this.editorFrame.style.width="100%",this.editorFrame.style.height=this.frameHeight,this.editorFrame.onload=()=>{this.iframeReady=!0,this.pendingDataSend&&(this.pendingDataSend=!1,this._setTimeout(()=>{this.sendDataToEditor()},1e3)),this._setTimeout(()=>{!this.editorReadyReceived&&this.iframeReady&&this.sendDataToEditor()},1e4)},this.$refs.iframeContainer.appendChild(this.editorFrame)},sendDataToEditor(){if(!this.iframeReady||!this.editorFrame||!this.editorFrame.contentWindow){this.pendingDataSend=!0;return}try{const e=JSON.parse(JSON.stringify(this.editorData));this.editorFrame.contentWindow.postMessage({action:"UPDATE_EDITOR",data:e},this.editorOrigin),this.dataSent=!0,this.sendRetries=0,this._setTimeout(()=>{this.editorContentReady||(this.editorContentReady=!0)},5e3)}catch(e){console.error("Error sending data to editor:",e),this.sendRetries++,this.sendRetries<=3&&this._setTimeout(()=>{this.sendDataToEditor()},500)}},handleEditorMessage(e){if(e&&e.origin&&this.editorOrigin&&e.origin!==this.editorOrigin)return;const{action:t,content:a}=e.data;t==="EDITOR_UPDATED"?this.dataSent&&(this.editorContentReady||this._setTimeout(()=>{this.editorContentReady=!0},1500),this.editorData.content=a,this.$emit("update:modelValue",a),this.$emit("contentUpdated",a)):t==="TITLE_UPDATED"?(this.editorData.title=a,this.$emit("titleUpdated",a)):t==="FEATURED_MEDIA_UPDATED"?this.$emit("featuredMediaUpdated",a):t==="EDITOR_FULLSCREEN_TOGGLE"?this.toggleFullScreen(a):t==="EMAIL_PREVIEW_REQUEST"?this.$emit("previewRequest"):t==="AUTOSAVE_STATE"?this.$emit("autosaveState",a):t==="EDITOR_READY"&&(this.editorReadyReceived=!0,this.isFailing=!1,this.sendDataToEditor())},forceAutosave(){this.editorFrame&&this.editorFrame.contentWindow&&this.editorFrame.contentWindow.postMessage({action:"FORCE_SAVE"},this.editorOrigin)},toggleFullScreen(e){this.isFullscreen=e;const t=this.editorFrame;if(e){if(document.documentElement.classList.add("fct-editor-fullscreen"),document.body.style.overflow="hidden",t){t.classList.add("fct-fullscreen-iframe"),this._fullscreenAncestors=[];let a=t.parentElement;for(;a&&a!==document.documentElement;)a.classList.add("fct-fullscreen-ancestor"),this._fullscreenAncestors.push(a),a=a.parentElement}}else document.documentElement.classList.remove("fct-editor-fullscreen"),document.body.style.overflow="",t&&t.classList.remove("fct-fullscreen-iframe"),this._fullscreenAncestors&&(this._fullscreenAncestors.forEach(function(a){a.classList.remove("fct-fullscreen-ancestor")}),this._fullscreenAncestors=null);this.$emit("editorFullscreenToggle",e)}}},Kv={style:{width:"100%"}},Nv={key:0,style:{display:"flex","justify-content":"center","align-items":"center","column-gap":"10px"}},Gv={class:"editor-container",style:{position:"relative"}},zv={key:0,class:"fct-editor-skeleton"},jv={ref:"iframeContainer",class:"iframe-container"};function Yv(e,t,a,s,n,l){const A=w("EmailBodySkeleton");return d(),h("div",Kv,[l.editorFailed?(d(),h("div",Nv,[i("p",null,_(e.$t("Problem with loading the editor. Please reload the page.")),1)])):x("",!0),i("div",Gv,[o(Dn,{name:"fct-skeleton-fade"},{default:r(()=>[n.editorContentReady?x("",!0):(d(),h("div",zv,[t[0]||(t[0]=i("div",{class:"fct-skel-menubar"},[i("div",{class:"fct-skel fct-skel-logo"}),i("div",{class:"fct-skel-slash"}),i("div",{class:"fct-skel fct-skel-name"}),i("div",{class:"fct-skel-spacer"}),i("div",{class:"fct-skel fct-skel-btn-wide"}),i("div",{class:"fct-skel-dot"}),i("div",{class:"fct-skel-dot"})],-1)),t[1]||(t[1]=i("div",{class:"fct-skel-toolbar"},[i("div",{class:"fct-skel fct-skel-tb-btn"}),i("div",{class:"fct-skel fct-skel-tb-btn"}),i("div",{class:"fct-skel fct-skel-tb-btn"}),i("div",{class:"fct-skel-sep"}),i("div",{class:"fct-skel fct-skel-tb-btn"}),i("div",{class:"fct-skel fct-skel-tb-btn"}),i("div",{class:"fct-skel-sep"}),i("div",{class:"fct-skel fct-skel-tb-wide"}),i("div",{class:"fct-skel fct-skel-tb-wide"}),i("div",{class:"fct-skel-sep"}),i("div",{class:"fct-skel fct-skel-tb-btn"})],-1)),o(A,{"show-loading-badge":!0})]))]),_:1}),i("div",jv,null,512)])])}const mp=Ue(Pv,[["render",Yv],["__scopeId","data-v-eda40332"]]),qv={class:"setting-wrap fct-pdf-template-edit-wrapper"},Wv={class:"capitalize"},Xv={class:"setting-wrap-inner"},Jv={class:"bg-white rounded dark:bg-dark-700 p-6 mb-4"},Zv={class:"setting-save-action"},e1={__name:"PdfTemplateEdit",props:{template:{type:String,required:!0}},setup(e){const t=e,a=Oa(),s=M(!0),n=M(!1),l=M(!1),A=M(!1),c=M(null),p=M(null),m=M(""),g=E=>{const Q=atob(E),D=new Array(Q.length);for(let L=0;L{const E=await ie.post("settings/pdf-templates/download",{template_id:t.template});if(!(E!=null&&E.pdf_base64))throw new Error(u("Failed to generate PDF"));return E},v=()=>{s.value=!0,ie.get("settings/pdf-templates/receipt/"+t.template).then(E=>{var D,L,I;c.value=E.template;const Q=(I=(L=(D=E.template)==null?void 0:D.pdf_settings)==null?void 0:L[0])==null?void 0:I.pdf_structure;Q&&(m.value=Q.content||"")}).catch(E=>{var Q;Y.error(((Q=E.data)==null?void 0:Q.message)||"Failed to load template")}).finally(()=>{s.value=!1})},C=async({showSuccess:E=!0}={})=>{var D,L,I,$;n.value=!0,p.value&&await p.value.forceAutosave();const Q=((I=(L=(D=c.value)==null?void 0:D.pdf_settings)==null?void 0:L[0])==null?void 0:I.pdf_structure)||{};Q.content=m.value;try{const V=await ie.post("settings/pdf-templates/receipt/"+t.template,{pdf_structure:Q});return E&&Y.success(V.message||u("Template saved")),!0}catch(V){return Y.error((($=V.data)==null?void 0:$.message)||"Failed to save template"),!1}finally{n.value=!1}},b=()=>{l.value=!0,y().then(E=>{const Q=g(E.pdf_base64),D=URL.createObjectURL(Q),L=document.createElement("a");L.href=D,L.download=E.filename||"receipt-test.pdf",document.body.appendChild(L),L.click(),document.body.removeChild(L),URL.revokeObjectURL(D),Y.success(u("PDF downloaded"))}).catch(E=>{var Q;Y.error(((Q=E.data)==null?void 0:Q.message)||E.message||"Failed to generate PDF")}).finally(()=>{l.value=!1})},B=async()=>{var E;A.value=!0;try{const Q=await y(),D=g(Q.pdf_base64),L=URL.createObjectURL(D),I=document.createElement("a");I.href=L,I.target="_blank",I.rel="noopener",document.body.appendChild(I),I.click(),document.body.removeChild(I),setTimeout(()=>{URL.revokeObjectURL(L)},1e4)}catch(Q){Y.error(((E=Q.data)==null?void 0:E.message)||Q.message||"Failed to generate PDF")}finally{A.value=!1}},k=async()=>{n.value||l.value||A.value||!await C({showSuccess:!1})||await B()},U=()=>c.value&&!c.value.is_default,T=()=>{ie.delete("settings/pdf-templates/delete/"+t.template).then(E=>{Y.success(E.message||u("Template deleted")),a.push({path:"/settings/pdf-template"})}).catch(E=>{var Q;Y.error(((Q=E.data)==null?void 0:Q.message)||"Failed to delete template")})},S=()=>{ie.get("settings/pdf-templates/factory-default").then(E=>{var L,I,$;const Q=(L=E.templates)==null?void 0:L[t.template];if(!Q)return;const D=(($=(I=Q.pdf_settings)==null?void 0:I[0])==null?void 0:$.pdf_structure)||{};return ie.post("settings/pdf-templates/receipt/"+t.template,{pdf_structure:D}).then(()=>{Y.success(u("Reverted to default template")),v()})}).catch(E=>{var Q;Y.error(((Q=E.data)==null?void 0:Q.message)||u("Failed to revert template"))})};return Be(()=>{v()}),(E,Q)=>{const D=w("el-breadcrumb-item"),L=w("el-breadcrumb"),I=w("el-icon"),$=w("el-button"),V=w("el-dropdown-item"),R=w("el-dropdown-menu"),P=w("el-dropdown"),W=w("el-skeleton-item"),N=w("el-skeleton");return d(),h("div",qv,[o(fa,{loading:n.value,"loading-text":f(u)("Saving"),"save-button-text":f(u)("Save Template"),onOnSave:C},{heading:r(()=>[o(L,{class:"mb-0","separator-icon":f(Ka)},{default:r(()=>[o(D,{to:{path:"/settings/pdf-template"}},{default:r(()=>[O(_(E.$t("PDF Templates")),1)]),_:1}),o(D,null,{default:r(()=>{var te;return[i("span",Wv,_(((te=c.value)==null?void 0:te.title)||f(u)("Edit Template")),1)]}),_:1})]),_:1},8,["separator-icon"])]),action:r(()=>[o(P,{trigger:"click",style:{"margin-left":"12px",display:"inline-flex","align-items":"center"}},{dropdown:r(()=>[o(R,null,{default:r(()=>[o(V,{onClick:b,disabled:l.value},{default:r(()=>[O(_(l.value?f(u)("Downloading..."):f(u)("Test Download")),1)]),_:1},8,["disabled"]),o(V,{onClick:S},{default:r(()=>[O(_(f(u)("Revert to Default")),1)]),_:1}),U()?(d(),F(V,{key:0,divided:"",onClick:T,style:{color:"#F56C6C"}},{default:r(()=>[O(_(f(u)("Delete Template")),1)]),_:1})):x("",!0)]),_:1})]),default:r(()=>[o($,{size:"small",text:"",style:{height:"auto",padding:"4px"}},{default:r(()=>[o(I,{style:{transform:"rotate(90deg)","font-size":"16px"}},{default:r(()=>[o(f(fh))]),_:1})]),_:1})]),_:1})]),_:1},8,["loading","loading-text","save-button-text"]),i("div",Xv,[o(N,{loading:s.value,class:"bg-white rounded p-6 dark:bg-dark-700",animated:""},{template:r(()=>[o(W,{variant:"h3",class:"w-[200px] mb-5"}),o(W,{variant:"rect",style:{width:"100%",height:"500px"}})]),_:1},8,["loading"]),!s.value&&c.value?(d(),h(H,{key:0},[i("div",Jv,[o(mp,{ref_key:"editorFrameRef",ref:p,editorParams:{block_type:"pdf_template",campaign_title:c.value.title,bid:t.template},frameHeight:"calc(100vh - 200px)",documentTitle:c.value.title||f(u)("Receipt Template"),onPreviewRequest:k,modelValue:m.value,"onUpdate:modelValue":Q[0]||(Q[0]=te=>m.value=te)},null,8,["editorParams","documentTitle","modelValue"])]),i("div",Zv,[o($,{onClick:C,type:"primary",disabled:n.value,loading:n.value},{default:r(()=>[O(_(n.value?f(u)("Saving"):f(u)("Save Template")),1)]),_:1},8,["disabled","loading"]),o($,{onClick:b,disabled:l.value,loading:l.value},{default:r(()=>[O(_(l.value?f(u)("Generating..."):f(u)("Test Download")),1)]),_:1},8,["disabled","loading"])])],64)):x("",!0)])])}}},t1={class:"fluent-cart-admin-validation-error-wrapper `${fieldKey}`"},ts=Object.assign({name:"ValidationError"},{__name:"ValidationError",props:{validationErrors:Object,fieldKey:{type:String,default:""}},setup(e){return(t,a)=>(d(),h("div",t1,[(d(!0),h(H,null,Z(e.validationErrors,(s,n)=>(d(),h("span",{class:"fluent-cart-admin-validation-error",key:s.toLowerCase().replace(/\s/g,"")},_(s),1))),128))]))}}),a1={class:"setting-wrap"},s1={class:"setting-wrap-inner"},n1={class:"grid gap-3 mb-6"},o1={class:"grid gap-3 mb-6"},l1={class:"grid gap-3 mb-6"},i1={class:"grid gap-3"},r1={key:0,class:"mb-4 p-4 rounded-lg border border-yellow-300 bg-yellow-50 text-yellow-800 text-sm"},d1=["href"],A1={class:"form-note"},c1={class:"mb-4"},u1={class:"form-note"},p1={class:"form-note"},f1={class:"form-note"},m1={class:"form-note"},h1={class:"form-note"},_1={class:"mb-4"},g1={class:"mb-4"},v1={class:"form-note"},y1={class:"form-note"},b1={class:"form-note"},w1={class:"form-note"},C1={class:"setting-save-action"},B1={__name:"PdfTemplateSettings",setup(e){const t=M(!0),a=M(!1),s=M({}),n=M(!0),l=M(""),A=M({zugferd_enabled:"0",zugferd_profile:"en16931",seller_vat_id:"",seller_tax_id:"",seller_legal_name:"",seller_legal_registration_id:"",seller_legal_registration_scheme:"",seller_contact_name:"",seller_contact_email:"",seller_contact_phone:"",seller_bank_iban:"",seller_bank_bic:"",seller_bank_account_name:"",seller_electronic_address:""}),c=[{label:"EN 16931 (ZUGFeRD)",value:"en16931"}],p=[{value:"",label:u("None")},{value:"0002",label:"0002 — SIRENE (France)"},{value:"0009",label:"0009 — SIRET (France)"},{value:"0021",label:"0021 — SWIFT"},{value:"0060",label:"0060 — DUNS"},{value:"0088",label:"0088 — EAN / GS1 GLN"},{value:"0096",label:"0096 — Danish P number"},{value:"0130",label:"0130 — EU Directorates"},{value:"0183",label:"0183 — Swiss UID"},{value:"0184",label:"0184 — Danish CVR"},{value:"0190",label:"0190 — Dutch OIN"},{value:"0191",label:"0191 — Dutch KvK"},{value:"0192",label:"0192 — Dutch Organisation ID"},{value:"0195",label:"0195 — Singapore UEN"},{value:"0196",label:"0196 — Icelandic kennitala"},{value:"0198",label:"0198 — Danish SE"},{value:"0199",label:"0199 — LEI"},{value:"0200",label:"0200 — Lithuanian legal entity"},{value:"0204",label:"0204 — German Leitweg-ID"},{value:"0208",label:"0208 — Belgian CBE / KBO"},{value:"0210",label:"0210 — Italian Codice Fiscale"},{value:"0211",label:"0211 — Italian Partita IVA"},{value:"0213",label:"0213 — Finnish OVT"}];wn().onSave(()=>{y()});const g=()=>{t.value=!0,ie.get("settings/pdf-templates/seller-details").then(v=>{v.seller_details&&Object.keys(A.value).forEach(C=>{v.seller_details[C]!==void 0&&(A.value[C]=v.seller_details[C])}),n.value=v.store_country_set!==!1,l.value=v.store_settings_url||""}).catch(v=>{var C;Y.error(((C=v.data)==null?void 0:C.message)||u("Failed to load settings"))}).finally(()=>{t.value=!1})},y=()=>{a.value=!0,s.value={},ie.post("settings/pdf-templates/seller-details",A.value).then(v=>{Y.success(v.message||u("Settings saved"))}).catch(v=>{var C,b;v.status_code===422&&((C=v.data)!=null&&C.data)&&(s.value=v.data.data),Y.error(((b=v.data)==null?void 0:b.message)||u("Failed to save settings"))}).finally(()=>{a.value=!1})};return Be(()=>{g()}),(v,C)=>{const b=w("el-skeleton-item"),B=w("el-skeleton"),k=w("el-switch"),U=w("el-option"),T=w("el-select"),S=w("el-form-item"),E=w("el-input"),Q=w("el-col"),D=w("el-row"),L=w("el-divider"),I=w("el-button");return d(),h("div",a1,[o(fa,{heading:f(u)("E-Invoice Settings"),loading:a.value,onOnSave:y},null,8,["heading","loading"]),i("div",s1,[t.value?(d(),F(he,{key:0},{default:r(()=>[o(me,null,{default:r(()=>[o(B,{animated:""},{template:r(()=>[i("div",n1,[o(b,{variant:"p",class:"w-[20%]"}),o(b,{variant:"p"})]),i("div",o1,[o(b,{variant:"p",class:"w-[20%]"}),o(b,{variant:"p"})]),i("div",l1,[o(b,{variant:"p",class:"w-[20%]"}),o(b,{variant:"p"})]),i("div",i1,[o(b,{variant:"p",class:"w-[20%]"}),o(b,{variant:"p"})])]),_:1})]),_:1})]),_:1})):x("",!0),t.value?x("",!0):(d(),h(H,{key:1},[A.value.zugferd_enabled==="1"&&!n.value?(d(),h("div",r1,[i("strong",null,_(f(u)("Store country is not configured.")),1),O(" "+_(f(u)("ZUGFeRD XML cannot be embedded in PDFs until your store country is set."))+" ",1),l.value?(d(),h("a",{key:0,href:l.value,class:"underline ml-1"},_(f(u)("Go to Store Settings")),9,d1)):x("",!0)])):x("",!0),o(he,null,{default:r(()=>[o(we,{title:f(u)("E-Invoice Configuration"),text:f(u)("Configure ZUGFeRD / Factur-X e-invoice encoding and seller details for your PDFs."),border_bottom:""},{action:r(()=>[o(k,{modelValue:A.value.zugferd_enabled,"onUpdate:modelValue":C[0]||(C[0]=$=>A.value.zugferd_enabled=$),"active-value":"1","inactive-value":"0"},null,8,["modelValue"])]),_:1},8,["title","text"]),o(me,null,{default:r(()=>[o(S,{label:f(u)("ZUGFeRD Profile"),"label-position":"top"},{default:r(()=>[o(T,{modelValue:A.value.zugferd_profile,"onUpdate:modelValue":C[1]||(C[1]=$=>A.value.zugferd_profile=$)},{default:r(()=>[(d(),h(H,null,Z(c,$=>o(U,{key:$.value,label:$.label,value:$.value},null,8,["label","value"])),64))]),_:1},8,["modelValue"]),i("div",A1,[i("p",null,_(f(u)("Select the e-invoice formatter used when generating the embedded XML.")),1)])]),_:1},8,["label"]),i("h4",c1,_(f(u)("Seller Tax Details")),1),o(D,{gutter:15},{default:r(()=>[o(Q,{lg:12},{default:r(()=>[o(S,{label:f(u)("Seller VAT ID"),"label-position":"top",required:A.value.zugferd_enabled==="1"},{default:r(()=>[o(E,{modelValue:A.value.seller_vat_id,"onUpdate:modelValue":C[2]||(C[2]=$=>A.value.seller_vat_id=$)},null,8,["modelValue"]),o(ts,{"validation-errors":s.value.seller_vat_id||{},"field-key":"seller_vat_id"},null,8,["validation-errors"]),i("div",u1,[i("p",null,_(f(u)("VAT identification number (e.g. DE123456789)")),1)])]),_:1},8,["label","required"])]),_:1}),o(Q,{lg:12},{default:r(()=>[o(S,{label:f(u)("Seller Tax ID"),"label-position":"top"},{default:r(()=>[o(E,{modelValue:A.value.seller_tax_id,"onUpdate:modelValue":C[3]||(C[3]=$=>A.value.seller_tax_id=$)},null,8,["modelValue"]),i("div",p1,[i("p",null,_(f(u)("National tax identification number")),1)])]),_:1},8,["label"])]),_:1})]),_:1}),o(D,{gutter:15},{default:r(()=>[o(Q,{lg:12},{default:r(()=>[o(S,{label:f(u)("Legal Name"),"label-position":"top"},{default:r(()=>[o(E,{modelValue:A.value.seller_legal_name,"onUpdate:modelValue":C[4]||(C[4]=$=>A.value.seller_legal_name=$)},null,8,["modelValue"]),i("div",f1,[i("p",null,_(f(u)("Registered legal name of the seller")),1)])]),_:1},8,["label"])]),_:1}),o(Q,{lg:12},{default:r(()=>[o(S,{label:f(u)("Legal Registration ID"),"label-position":"top",required:A.value.zugferd_enabled==="1"},{default:r(()=>[o(E,{modelValue:A.value.seller_legal_registration_id,"onUpdate:modelValue":C[5]||(C[5]=$=>A.value.seller_legal_registration_id=$)},null,8,["modelValue"]),i("div",m1,[i("p",null,_(f(u)("Company registration number (e.g. HRB 12345)")),1)])]),_:1},8,["label","required"])]),_:1})]),_:1}),o(D,{gutter:15},{default:r(()=>[o(Q,{lg:12},{default:r(()=>[o(S,{label:f(u)("Legal Registration Scheme"),"label-position":"top"},{default:r(()=>[o(T,{modelValue:A.value.seller_legal_registration_scheme,"onUpdate:modelValue":C[6]||(C[6]=$=>A.value.seller_legal_registration_scheme=$),placeholder:f(u)("Select scheme"),clearable:"",filterable:""},{default:r(()=>[(d(),h(H,null,Z(p,$=>o(U,{key:$.value,label:$.label,value:$.value},null,8,["label","value"])),64))]),_:1},8,["modelValue","placeholder"]),o(ts,{"validation-errors":s.value.seller_legal_registration_scheme||{},"field-key":"seller_legal_registration_scheme"},null,8,["validation-errors"]),i("div",h1,[i("p",null,_(f(u)("ISO 6523 ICD code for the legal registration identifier")),1)])]),_:1},8,["label"])]),_:1})]),_:1}),o(L),i("h4",_1,_(f(u)("Seller Contact")),1),o(D,{gutter:15},{default:r(()=>[o(Q,{lg:12},{default:r(()=>[o(S,{label:f(u)("Contact Name"),"label-position":"top"},{default:r(()=>[o(E,{modelValue:A.value.seller_contact_name,"onUpdate:modelValue":C[7]||(C[7]=$=>A.value.seller_contact_name=$)},null,8,["modelValue"])]),_:1},8,["label"])]),_:1}),o(Q,{lg:12},{default:r(()=>[o(S,{label:f(u)("Contact Email"),"label-position":"top"},{default:r(()=>[o(E,{modelValue:A.value.seller_contact_email,"onUpdate:modelValue":C[8]||(C[8]=$=>A.value.seller_contact_email=$),type:"email"},null,8,["modelValue"]),o(ts,{"validation-errors":s.value.seller_contact_email||{},"field-key":"seller_contact_email"},null,8,["validation-errors"])]),_:1},8,["label"])]),_:1})]),_:1}),o(D,{gutter:15},{default:r(()=>[o(Q,{lg:12},{default:r(()=>[o(S,{label:f(u)("Contact Phone"),"label-position":"top"},{default:r(()=>[o(E,{modelValue:A.value.seller_contact_phone,"onUpdate:modelValue":C[9]||(C[9]=$=>A.value.seller_contact_phone=$)},null,8,["modelValue"])]),_:1},8,["label"])]),_:1})]),_:1}),o(L),i("h4",g1,_(f(u)("Seller Bank Details")),1),o(D,{gutter:15},{default:r(()=>[o(Q,{lg:12},{default:r(()=>[o(S,{label:f(u)("Bank IBAN"),"label-position":"top"},{default:r(()=>[o(E,{modelValue:A.value.seller_bank_iban,"onUpdate:modelValue":C[10]||(C[10]=$=>A.value.seller_bank_iban=$)},null,8,["modelValue"]),o(ts,{"validation-errors":s.value.seller_bank_iban||{},"field-key":"seller_bank_iban"},null,8,["validation-errors"]),i("div",v1,[i("p",null,_(f(u)("International Bank Account Number")),1)])]),_:1},8,["label"])]),_:1}),o(Q,{lg:12},{default:r(()=>[o(S,{label:f(u)("Bank BIC"),"label-position":"top"},{default:r(()=>[o(E,{modelValue:A.value.seller_bank_bic,"onUpdate:modelValue":C[11]||(C[11]=$=>A.value.seller_bank_bic=$)},null,8,["modelValue"]),i("div",y1,[i("p",null,_(f(u)("Bank Identifier Code (SWIFT)")),1)])]),_:1},8,["label"])]),_:1})]),_:1}),o(D,{gutter:15},{default:r(()=>[o(Q,{lg:12},{default:r(()=>[o(S,{label:f(u)("Bank Account Name"),"label-position":"top"},{default:r(()=>[o(E,{modelValue:A.value.seller_bank_account_name,"onUpdate:modelValue":C[12]||(C[12]=$=>A.value.seller_bank_account_name=$)},null,8,["modelValue"]),i("div",b1,[i("p",null,_(f(u)("Name of the bank account holder")),1)])]),_:1},8,["label"])]),_:1}),o(Q,{lg:12},{default:r(()=>[o(S,{label:f(u)("Electronic Address"),"label-position":"top"},{default:r(()=>[o(E,{modelValue:A.value.seller_electronic_address,"onUpdate:modelValue":C[13]||(C[13]=$=>A.value.seller_electronic_address=$)},null,8,["modelValue"]),i("div",w1,[i("p",null,_(f(u)("Electronic address for receiving e-invoices (e.g. PEPPOL ID)")),1)])]),_:1},8,["label"])]),_:1})]),_:1})]),_:1})]),_:1}),i("div",C1,[o(I,{type:"primary",onClick:C[14]||(C[14]=$=>y()),loading:a.value},{default:r(()=>[O(_(a.value?f(u)("Saving Settings"):f(u)("Save Settings")),1)]),_:1},8,["loading"])])],64))])])}}},k1={name:"CustomersRoute"},x1={class:"fca_customers_route"};function S1(e,t,a,s,n,l){const A=w("router-view");return d(),h("div",x1,[o(A)])}const F1=Ue(k1,[["render",S1]]);/*! * html2canvas 1.4.1 * Copyright (c) 2022 Niklas von Hertzen * Released under MIT License *//*! ***************************************************************************** Copyright (c) Microsoft Corporation. Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted. THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ***************************************************************************** */var ad=function(e,t){return ad=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(a,s){a.__proto__=s}||function(a,s){for(var n in s)Object.prototype.hasOwnProperty.call(s,n)&&(a[n]=s[n])},ad(e,t)};function Bs(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");ad(e,t);function a(){this.constructor=e}e.prototype=t===null?Object.create(t):(a.prototype=t.prototype,new a)}var sd=function(){return sd=Object.assign||function(t){for(var a,s=1,n=arguments.length;s0&&l[l.length-1])&&(m[0]===6||m[0]===2)){a=0;continue}if(m[0]===3&&(!l||m[1]>l[0]&&m[1]=55296&&n<=56319&&a>10)+55296,A%1024+56320)),(n+1===a||s.length>16384)&&(l+=String.fromCharCode.apply(String,s),s.length=0)}return l},qA="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",U1=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(var fl=0;fl"u"?[]:new Uint8Array(256);for(var ml=0;ml>4,g[n++]=(A&15)<<4|c>>2,g[n++]=(c&3)<<6|p&63;return m},D1=function(e){for(var t=e.length,a=[],s=0;s>Qn,T1=1<>Qn,M1=hp+V1,L1=M1,O1=32,R1=L1+O1,H1=65536>>oA,P1=1<=0){if(t<55296||t>56319&&t<=65535)return a=this.index[t>>Qn],a=(a<>Qn)],a=(a<>oA),a=this.index[a],a+=t>>Qn&K1,a=this.index[a],a=(a<"u"?[]:new Uint8Array(256);for(var hl=0;hlZA?(n.push(!0),c-=ZA):n.push(!1),["normal","auto","loose"].indexOf(t)!==-1&&[8208,8211,12316,12448].indexOf(l)!==-1)return s.push(A),a.push(ld);if(c===W1||c===nd){if(A===0)return s.push(A),a.push(En);var p=a[A-1];return ny.indexOf(p)===-1?(s.push(s[A-1]),a.push(p)):(s.push(A),a.push(En))}if(s.push(A),c===ty)return a.push(t==="strict"?id:Zo);if(c===yp||c===ey)return a.push(En);if(c===ay)return l>=131072&&l<=196605||l>=196608&&l<=262141?a.push(Zo):a.push(En);a.push(c)}),[s,a,n]},pr=function(e,t,a,s){var n=s[a];if(Array.isArray(e)?e.indexOf(n)!==-1:e===n)for(var l=a;l<=s.length;){l++;var A=s[l];if(A===t)return!0;if(A!==cn)break}if(n===cn)for(var l=a;l>0;){l--;var c=s[l];if(Array.isArray(e)?e.indexOf(c)!==-1:e===c)for(var p=a;p<=s.length;){p++;var A=s[p];if(A===t)return!0;if(A!==cn)break}if(c!==cn)break}return!1},lc=function(e,t){for(var a=e;a>=0;){var s=t[a];if(s===cn)a--;else return s}return 0},iy=function(e,t,a,s,n){if(a[s]===0)return mt;var l=s-1;if(Array.isArray(n)&&n[l]===!0)return mt;var A=l-1,c=l+1,p=t[l],m=A>=0?t[A]:0,g=t[c];if(p===_p&&g===gp)return mt;if(pd.indexOf(p)!==-1)return bp;if(pd.indexOf(g)!==-1||wp.indexOf(g)!==-1)return mt;if(lc(l,t)===vp)return yl;if(ud.get(e[l])===nd||(p===gl||p===vl)&&ud.get(e[c])===nd||p===ec||g===ec||p===tc||[cn,od,Fo].indexOf(p)===-1&&g===tc||[_l,Co,Z1,jn,Yn].indexOf(g)!==-1||lc(l,t)===Bo||pr(cr,Bo,l,t)||pr([_l,Co],id,l,t)||pr(ac,ac,l,t))return mt;if(p===cn)return yl;if(p===cr||g===cr)return mt;if(g===ld||p===ld)return yl;if([od,Fo,id].indexOf(g)!==-1||p===J1||m===Ad&&oy.indexOf(p)!==-1||p===Yn&&g===Ad||g===sc||Ks.indexOf(g)!==-1&&p===qa||Ks.indexOf(p)!==-1&&g===qa||p===Uo&&[Zo,gl,vl].indexOf(g)!==-1||[Zo,gl,vl].indexOf(p)!==-1&&g===Eo||Ks.indexOf(p)!==-1&&nc.indexOf(g)!==-1||nc.indexOf(p)!==-1&&Ks.indexOf(g)!==-1||[Uo,Eo].indexOf(p)!==-1&&(g===qa||[Bo,Fo].indexOf(g)!==-1&&t[c+1]===qa)||[Bo,Fo].indexOf(p)!==-1&&g===qa||p===qa&&[qa,Yn,jn].indexOf(g)!==-1)return mt;if([qa,Yn,jn,_l,Co].indexOf(g)!==-1)for(var y=l;y>=0;){var v=t[y];if(v===qa)return mt;if([Yn,jn].indexOf(v)!==-1)y--;else break}if([Uo,Eo].indexOf(g)!==-1)for(var y=[_l,Co].indexOf(p)!==-1?A:l;y>=0;){var v=t[y];if(v===qa)return mt;if([Yn,jn].indexOf(v)!==-1)y--;else break}if(cd===p&&[cd,Nl,rd,dd].indexOf(g)!==-1||[Nl,rd].indexOf(p)!==-1&&[Nl,Gl].indexOf(g)!==-1||[Gl,dd].indexOf(p)!==-1&&g===Gl||oc.indexOf(p)!==-1&&[sc,Eo].indexOf(g)!==-1||oc.indexOf(g)!==-1&&p===Uo||Ks.indexOf(p)!==-1&&Ks.indexOf(g)!==-1||p===jn&&Ks.indexOf(g)!==-1||Ks.concat(qa).indexOf(p)!==-1&&g===Bo&&sy.indexOf(e[c])===-1||Ks.concat(qa).indexOf(g)!==-1&&p===Co)return mt;if(p===ur&&g===ur){for(var C=a[l],b=1;C>0&&(C--,t[C]===ur);)b++;if(b%2!==0)return mt}return p===gl&&g===vl?mt:yl},ry=function(e,t){t||(t={lineBreak:"normal",wordBreak:"normal"});var a=ly(e,t.lineBreak),s=a[0],n=a[1],l=a[2];(t.wordBreak==="break-all"||t.wordBreak==="break-word")&&(n=n.map(function(c){return[qa,En,yp].indexOf(c)!==-1?Zo:c}));var A=t.wordBreak==="keep-all"?l.map(function(c,p){return c&&e[p]>=19968&&e[p]<=40959}):void 0;return[s,n,A]},dy=function(){function e(t,a,s,n){this.codePoints=t,this.required=a===bp,this.start=s,this.end=n}return e.prototype.slice=function(){return ia.apply(void 0,this.codePoints.slice(this.start,this.end))},e}(),Ay=function(e,t){var a=Hi(e),s=ry(a,t),n=s[0],l=s[1],A=s[2],c=a.length,p=0,m=0;return{next:function(){if(m>=c)return{done:!0,value:null};for(var g=mt;m=Cp&&e<=57},Ny=function(e){return e>=55296&&e<=57343},qn=function(e){return Ta(e)||e>=xp&&e<=Fp||e>=Bp&&e<=Oy},Gy=function(e){return e>=Bp&&e<=Hy},zy=function(e){return e>=xp&&e<=Ky},jy=function(e){return Gy(e)||zy(e)},Yy=function(e){return e>=Ey},kl=function(e){return e===ni||e===py||e===fy},oi=function(e){return jy(e)||Yy(e)||e===gy},cc=function(e){return oi(e)||Ta(e)||e===za},qy=function(e){return e>=Qy&&e<=Iy||e===Ty||e>=Vy&&e<=My||e===Ly},rn=function(e,t){return e!==Lo?!1:t!==ni},xl=function(e,t,a){return e===za?oi(t)||rn(t,a):oi(e)?!0:!!(e===Lo&&rn(e,t))},mr=function(e,t,a){return e===$n||e===za?Ta(t)?!0:t===el&&Ta(a):Ta(e===el?t:e)},Wy=function(e){var t=0,a=1;(e[t]===$n||e[t]===za)&&(e[t]===za&&(a=-1),t++);for(var s=[];Ta(e[t]);)s.push(e[t++]);var n=s.length?parseInt(ia.apply(void 0,s),10):0;e[t]===el&&t++;for(var l=[];Ta(e[t]);)l.push(e[t++]);var A=l.length,c=A?parseInt(ia.apply(void 0,l),10):0;(e[t]===Sp||e[t]===kp)&&t++;var p=1;(e[t]===$n||e[t]===za)&&(e[t]===za&&(p=-1),t++);for(var m=[];Ta(e[t]);)m.push(e[t++]);var g=m.length?parseInt(ia.apply(void 0,m),10):0;return a*(n+c*Math.pow(10,-A))*Math.pow(10,p*g)},Xy={type:2},Jy={type:3},Zy={type:4},eb={type:13},tb={type:8},ab={type:21},sb={type:9},nb={type:10},ob={type:11},lb={type:12},ib={type:14},Sl={type:23},rb={type:1},db={type:25},Ab={type:24},cb={type:26},ub={type:27},pb={type:28},fb={type:29},mb={type:31},fd={type:32},Ep=function(){function e(){this._value=[]}return e.prototype.write=function(t){this._value=this._value.concat(Hi(t))},e.prototype.read=function(){for(var t=[],a=this.consumeToken();a!==fd;)t.push(a),a=this.consumeToken();return t},e.prototype.consumeToken=function(){var t=this.consumeCodePoint();switch(t){case bl:return this.consumeStringToken(bl);case my:var a=this.peekCodePoint(0),s=this.peekCodePoint(1),n=this.peekCodePoint(2);if(cc(a)||rn(s,n)){var l=xl(a,s,n)?uy:cy,A=this.consumeName();return{type:5,value:A,flags:l}}break;case hy:if(this.peekCodePoint(0)===ko)return this.consumeCodePoint(),eb;break;case wl:return this.consumeStringToken(wl);case Cl:return Xy;case xo:return Jy;case fr:if(this.peekCodePoint(0)===ko)return this.consumeCodePoint(),ib;break;case $n:if(mr(t,this.peekCodePoint(0),this.peekCodePoint(1)))return this.reconsumeCodePoint(t),this.consumeNumericToken();break;case Uy:return Zy;case za:var c=t,p=this.peekCodePoint(0),m=this.peekCodePoint(1);if(mr(c,p,m))return this.reconsumeCodePoint(t),this.consumeNumericToken();if(xl(c,p,m))return this.reconsumeCodePoint(t),this.consumeIdentLikeToken();if(p===za&&m===by)return this.consumeCodePoint(),this.consumeCodePoint(),Ab;break;case el:if(mr(t,this.peekCodePoint(0),this.peekCodePoint(1)))return this.reconsumeCodePoint(t),this.consumeNumericToken();break;case rc:if(this.peekCodePoint(0)===fr)for(this.consumeCodePoint();;){var g=this.consumeCodePoint();if(g===fr&&(g=this.consumeCodePoint(),g===rc))return this.consumeToken();if(g===Fs)return this.consumeToken()}break;case $y:return cb;case Dy:return ub;case yy:if(this.peekCodePoint(0)===vy&&this.peekCodePoint(1)===za&&this.peekCodePoint(2)===za)return this.consumeCodePoint(),this.consumeCodePoint(),db;break;case wy:var y=this.peekCodePoint(0),v=this.peekCodePoint(1),C=this.peekCodePoint(2);if(xl(y,v,C)){var A=this.consumeName();return{type:7,value:A}}break;case Cy:return pb;case Lo:if(rn(t,this.peekCodePoint(0)))return this.reconsumeCodePoint(t),this.consumeIdentLikeToken();break;case By:return fb;case ky:if(this.peekCodePoint(0)===ko)return this.consumeCodePoint(),tb;break;case xy:return ob;case Sy:return lb;case Ry:case Py:var b=this.peekCodePoint(0),B=this.peekCodePoint(1);return b===$n&&(qn(B)||B===Bl)&&(this.consumeCodePoint(),this.consumeUnicodeRangeToken()),this.reconsumeCodePoint(t),this.consumeIdentLikeToken();case dc:if(this.peekCodePoint(0)===ko)return this.consumeCodePoint(),sb;if(this.peekCodePoint(0)===dc)return this.consumeCodePoint(),ab;break;case Fy:if(this.peekCodePoint(0)===ko)return this.consumeCodePoint(),nb;break;case Fs:return fd}return kl(t)?(this.consumeWhiteSpace(),mb):Ta(t)?(this.reconsumeCodePoint(t),this.consumeNumericToken()):oi(t)?(this.reconsumeCodePoint(t),this.consumeIdentLikeToken()):{type:6,value:ia(t)}},e.prototype.consumeCodePoint=function(){var t=this._value.shift();return typeof t>"u"?-1:t},e.prototype.reconsumeCodePoint=function(t){this._value.unshift(t)},e.prototype.peekCodePoint=function(t){return t>=this._value.length?-1:this._value[t]},e.prototype.consumeUnicodeRangeToken=function(){for(var t=[],a=this.consumeCodePoint();qn(a)&&t.length<6;)t.push(a),a=this.consumeCodePoint();for(var s=!1;a===Bl&&t.length<6;)t.push(a),a=this.consumeCodePoint(),s=!0;if(s){var n=parseInt(ia.apply(void 0,t.map(function(p){return p===Bl?Cp:p})),16),l=parseInt(ia.apply(void 0,t.map(function(p){return p===Bl?Fp:p})),16);return{type:30,start:n,end:l}}var A=parseInt(ia.apply(void 0,t),16);if(this.peekCodePoint(0)===za&&qn(this.peekCodePoint(1))){this.consumeCodePoint(),a=this.consumeCodePoint();for(var c=[];qn(a)&&c.length<6;)c.push(a),a=this.consumeCodePoint();var l=parseInt(ia.apply(void 0,c),16);return{type:30,start:A,end:l}}else return{type:30,start:A,end:A}},e.prototype.consumeIdentLikeToken=function(){var t=this.consumeName();return t.toLowerCase()==="url"&&this.peekCodePoint(0)===Cl?(this.consumeCodePoint(),this.consumeUrlToken()):this.peekCodePoint(0)===Cl?(this.consumeCodePoint(),{type:19,value:t}):{type:20,value:t}},e.prototype.consumeUrlToken=function(){var t=[];if(this.consumeWhiteSpace(),this.peekCodePoint(0)===Fs)return{type:22,value:""};var a=this.peekCodePoint(0);if(a===wl||a===bl){var s=this.consumeStringToken(this.consumeCodePoint());return s.type===0&&(this.consumeWhiteSpace(),this.peekCodePoint(0)===Fs||this.peekCodePoint(0)===xo)?(this.consumeCodePoint(),{type:22,value:s.value}):(this.consumeBadUrlRemnants(),Sl)}for(;;){var n=this.consumeCodePoint();if(n===Fs||n===xo)return{type:22,value:ia.apply(void 0,t)};if(kl(n))return this.consumeWhiteSpace(),this.peekCodePoint(0)===Fs||this.peekCodePoint(0)===xo?(this.consumeCodePoint(),{type:22,value:ia.apply(void 0,t)}):(this.consumeBadUrlRemnants(),Sl);if(n===bl||n===wl||n===Cl||qy(n))return this.consumeBadUrlRemnants(),Sl;if(n===Lo)if(rn(n,this.peekCodePoint(0)))t.push(this.consumeEscapedCodePoint());else return this.consumeBadUrlRemnants(),Sl;else t.push(n)}},e.prototype.consumeWhiteSpace=function(){for(;kl(this.peekCodePoint(0));)this.consumeCodePoint()},e.prototype.consumeBadUrlRemnants=function(){for(;;){var t=this.consumeCodePoint();if(t===xo||t===Fs)return;rn(t,this.peekCodePoint(0))&&this.consumeEscapedCodePoint()}},e.prototype.consumeStringSlice=function(t){for(var a=5e4,s="";t>0;){var n=Math.min(a,t);s+=ia.apply(void 0,this._value.splice(0,n)),t-=n}return this._value.shift(),s},e.prototype.consumeStringToken=function(t){var a="",s=0;do{var n=this._value[s];if(n===Fs||n===void 0||n===t)return a+=this.consumeStringSlice(s),{type:0,value:a};if(n===ni)return this._value.splice(0,s),rb;if(n===Lo){var l=this._value[s+1];l!==Fs&&l!==void 0&&(l===ni?(a+=this.consumeStringSlice(s),s=-1,this._value.shift()):rn(n,l)&&(a+=this.consumeStringSlice(s),a+=ia(this.consumeEscapedCodePoint()),s=-1))}s++}while(!0)},e.prototype.consumeNumber=function(){var t=[],a=nl,s=this.peekCodePoint(0);for((s===$n||s===za)&&t.push(this.consumeCodePoint());Ta(this.peekCodePoint(0));)t.push(this.consumeCodePoint());s=this.peekCodePoint(0);var n=this.peekCodePoint(1);if(s===el&&Ta(n))for(t.push(this.consumeCodePoint(),this.consumeCodePoint()),a=ic;Ta(this.peekCodePoint(0));)t.push(this.consumeCodePoint());s=this.peekCodePoint(0),n=this.peekCodePoint(1);var l=this.peekCodePoint(2);if((s===Sp||s===kp)&&((n===$n||n===za)&&Ta(l)||Ta(n)))for(t.push(this.consumeCodePoint(),this.consumeCodePoint()),a=ic;Ta(this.peekCodePoint(0));)t.push(this.consumeCodePoint());return[Wy(t),a]},e.prototype.consumeNumericToken=function(){var t=this.consumeNumber(),a=t[0],s=t[1],n=this.peekCodePoint(0),l=this.peekCodePoint(1),A=this.peekCodePoint(2);if(xl(n,l,A)){var c=this.consumeName();return{type:15,number:a,flags:s,unit:c}}return n===_y?(this.consumeCodePoint(),{type:16,number:a,flags:s}):{type:17,number:a,flags:s}},e.prototype.consumeEscapedCodePoint=function(){var t=this.consumeCodePoint();if(qn(t)){for(var a=ia(t);qn(this.peekCodePoint(0))&&a.length<6;)a+=ia(this.consumeCodePoint());kl(this.peekCodePoint(0))&&this.consumeCodePoint();var s=parseInt(a,16);return s===0||Ny(s)||s>1114111?Ac:s}return t===Fs?Ac:t},e.prototype.consumeName=function(){for(var t="";;){var a=this.consumeCodePoint();if(cc(a))t+=ia(a);else if(rn(a,this.peekCodePoint(0)))t+=ia(this.consumeEscapedCodePoint());else return this.reconsumeCodePoint(a),t}},e}(),Up=function(){function e(t){this._tokens=t}return e.create=function(t){var a=new Ep;return a.write(t),new e(a.read())},e.parseValue=function(t){return e.create(t).parseComponentValue()},e.parseValues=function(t){return e.create(t).parseComponentValues()},e.prototype.parseComponentValue=function(){for(var t=this.consumeToken();t.type===31;)t=this.consumeToken();if(t.type===32)throw new SyntaxError("Error parsing CSS component value, unexpected EOF");this.reconsumeToken(t);var a=this.consumeComponentValue();do t=this.consumeToken();while(t.type===31);if(t.type===32)return a;throw new SyntaxError("Error parsing CSS component value, multiple values found when expecting only one")},e.prototype.parseComponentValues=function(){for(var t=[];;){var a=this.consumeComponentValue();if(a.type===32)return t;t.push(a),t.push()}},e.prototype.consumeComponentValue=function(){var t=this.consumeToken();switch(t.type){case 11:case 28:case 2:return this.consumeSimpleBlock(t.type);case 19:return this.consumeFunction(t)}return t},e.prototype.consumeSimpleBlock=function(t){for(var a={type:t,values:[]},s=this.consumeToken();;){if(s.type===32||_b(s,t))return a;this.reconsumeToken(s),a.values.push(this.consumeComponentValue()),s=this.consumeToken()}},e.prototype.consumeFunction=function(t){for(var a={name:t.value,values:[],type:18};;){var s=this.consumeToken();if(s.type===32||s.type===3)return a;this.reconsumeToken(s),a.values.push(this.consumeComponentValue())}},e.prototype.consumeToken=function(){var t=this._tokens.shift();return typeof t>"u"?fd:t},e.prototype.reconsumeToken=function(t){this._tokens.unshift(t)},e}(),ol=function(e){return e.type===15},go=function(e){return e.type===17},Tt=function(e){return e.type===20},hb=function(e){return e.type===0},md=function(e,t){return Tt(e)&&e.value===t},$p=function(e){return e.type!==31},fo=function(e){return e.type!==31&&e.type!==4},Ls=function(e){var t=[],a=[];return e.forEach(function(s){if(s.type===4){if(a.length===0)throw new Error("Error parsing function args, zero tokens for arg");t.push(a),a=[];return}s.type!==31&&a.push(s)}),a.length&&t.push(a),t},_b=function(e,t){return t===11&&e.type===12||t===28&&e.type===29?!0:t===2&&e.type===3},yn=function(e){return e.type===17||e.type===15},pa=function(e){return e.type===16||yn(e)},Dp=function(e){return e.length>1?[e[0],e[1]]:[e[0]]},Ua={type:17,number:0,flags:nl},lA={type:16,number:50,flags:nl},un={type:16,number:100,flags:nl},$o=function(e,t,a){var s=e[0],n=e[1];return[Nt(s,t),Nt(typeof n<"u"?n:s,a)]},Nt=function(e,t){if(e.type===16)return e.number/100*t;if(ol(e))switch(e.unit){case"rem":case"em":return 16*e.number;case"px":default:return e.number}return e.number},Qp="deg",Ip="grad",Tp="rad",Vp="turn",Pi={name:"angle",parse:function(e,t){if(t.type===15)switch(t.unit){case Qp:return Math.PI*t.number/180;case Ip:return Math.PI/200*t.number;case Tp:return t.number;case Vp:return Math.PI*2*t.number}throw new Error("Unsupported angle type")}},Mp=function(e){return e.type===15&&(e.unit===Qp||e.unit===Ip||e.unit===Tp||e.unit===Vp)},Lp=function(e){var t=e.filter(Tt).map(function(a){return a.value}).join(" ");switch(t){case"to bottom right":case"to right bottom":case"left top":case"top left":return[Ua,Ua];case"to top":case"bottom":return us(0);case"to bottom left":case"to left bottom":case"right top":case"top right":return[Ua,un];case"to right":case"left":return us(90);case"to top left":case"to left top":case"right bottom":case"bottom right":return[un,un];case"to bottom":case"top":return us(180);case"to top right":case"to right top":case"left bottom":case"bottom left":return[un,Ua];case"to left":case"right":return us(270)}return 0},us=function(e){return Math.PI*e/180},gn={name:"color",parse:function(e,t){if(t.type===18){var a=gb[t.name];if(typeof a>"u")throw new Error('Attempting to parse an unsupported color function "'+t.name+'"');return a(e,t.values)}if(t.type===5){if(t.value.length===3){var s=t.value.substring(0,1),n=t.value.substring(1,2),l=t.value.substring(2,3);return pn(parseInt(s+s,16),parseInt(n+n,16),parseInt(l+l,16),1)}if(t.value.length===4){var s=t.value.substring(0,1),n=t.value.substring(1,2),l=t.value.substring(2,3),A=t.value.substring(3,4);return pn(parseInt(s+s,16),parseInt(n+n,16),parseInt(l+l,16),parseInt(A+A,16)/255)}if(t.value.length===6){var s=t.value.substring(0,2),n=t.value.substring(2,4),l=t.value.substring(4,6);return pn(parseInt(s,16),parseInt(n,16),parseInt(l,16),1)}if(t.value.length===8){var s=t.value.substring(0,2),n=t.value.substring(2,4),l=t.value.substring(4,6),A=t.value.substring(6,8);return pn(parseInt(s,16),parseInt(n,16),parseInt(l,16),parseInt(A,16)/255)}}if(t.type===20){var c=zs[t.value.toUpperCase()];if(typeof c<"u")return c}return zs.TRANSPARENT}},vn=function(e){return(255&e)===0},ya=function(e){var t=255&e,a=255&e>>8,s=255&e>>16,n=255&e>>24;return t<255?"rgba("+n+","+s+","+a+","+t/255+")":"rgb("+n+","+s+","+a+")"},pn=function(e,t,a,s){return(e<<24|t<<16|a<<8|Math.round(s*255)<<0)>>>0},uc=function(e,t){if(e.type===17)return e.number;if(e.type===16){var a=t===3?1:255;return t===3?e.number/100*a:Math.round(e.number/100*a)}return 0},pc=function(e,t){var a=t.filter(fo);if(a.length===3){var s=a.map(uc),n=s[0],l=s[1],A=s[2];return pn(n,l,A,1)}if(a.length===4){var c=a.map(uc),n=c[0],l=c[1],A=c[2],p=c[3];return pn(n,l,A,p)}return 0};function hr(e,t,a){return a<0&&(a+=1),a>=1&&(a-=1),a<1/6?(t-e)*a*6+e:a<1/2?t:a<2/3?(t-e)*6*(2/3-a)+e:e}var fc=function(e,t){var a=t.filter(fo),s=a[0],n=a[1],l=a[2],A=a[3],c=(s.type===17?us(s.number):Pi.parse(e,s))/(Math.PI*2),p=pa(n)?n.number/100:0,m=pa(l)?l.number/100:0,g=typeof A<"u"&&pa(A)?Nt(A,1):1;if(p===0)return pn(m*255,m*255,m*255,1);var y=m<=.5?m*(p+1):m+p-m*p,v=m*2-y,C=hr(v,y,c+1/3),b=hr(v,y,c),B=hr(v,y,c-1/3);return pn(C*255,b*255,B*255,g)},gb={hsl:fc,hsla:fc,rgb:pc,rgba:pc},Oo=function(e,t){return gn.parse(e,Up.create(t).parseComponentValue())},zs={ALICEBLUE:4042850303,ANTIQUEWHITE:4209760255,AQUA:16777215,AQUAMARINE:2147472639,AZURE:4043309055,BEIGE:4126530815,BISQUE:4293182719,BLACK:255,BLANCHEDALMOND:4293643775,BLUE:65535,BLUEVIOLET:2318131967,BROWN:2771004159,BURLYWOOD:3736635391,CADETBLUE:1604231423,CHARTREUSE:2147418367,CHOCOLATE:3530104575,CORAL:4286533887,CORNFLOWERBLUE:1687547391,CORNSILK:4294499583,CRIMSON:3692313855,CYAN:16777215,DARKBLUE:35839,DARKCYAN:9145343,DARKGOLDENROD:3095837695,DARKGRAY:2846468607,DARKGREEN:6553855,DARKGREY:2846468607,DARKKHAKI:3182914559,DARKMAGENTA:2332068863,DARKOLIVEGREEN:1433087999,DARKORANGE:4287365375,DARKORCHID:2570243327,DARKRED:2332033279,DARKSALMON:3918953215,DARKSEAGREEN:2411499519,DARKSLATEBLUE:1211993087,DARKSLATEGRAY:793726975,DARKSLATEGREY:793726975,DARKTURQUOISE:13554175,DARKVIOLET:2483082239,DEEPPINK:4279538687,DEEPSKYBLUE:12582911,DIMGRAY:1768516095,DIMGREY:1768516095,DODGERBLUE:512819199,FIREBRICK:2988581631,FLORALWHITE:4294635775,FORESTGREEN:579543807,FUCHSIA:4278255615,GAINSBORO:3705462015,GHOSTWHITE:4177068031,GOLD:4292280575,GOLDENROD:3668254975,GRAY:2155905279,GREEN:8388863,GREENYELLOW:2919182335,GREY:2155905279,HONEYDEW:4043305215,HOTPINK:4285117695,INDIANRED:3445382399,INDIGO:1258324735,IVORY:4294963455,KHAKI:4041641215,LAVENDER:3873897215,LAVENDERBLUSH:4293981695,LAWNGREEN:2096890111,LEMONCHIFFON:4294626815,LIGHTBLUE:2916673279,LIGHTCORAL:4034953471,LIGHTCYAN:3774873599,LIGHTGOLDENRODYELLOW:4210742015,LIGHTGRAY:3553874943,LIGHTGREEN:2431553791,LIGHTGREY:3553874943,LIGHTPINK:4290167295,LIGHTSALMON:4288707327,LIGHTSEAGREEN:548580095,LIGHTSKYBLUE:2278488831,LIGHTSLATEGRAY:2005441023,LIGHTSLATEGREY:2005441023,LIGHTSTEELBLUE:2965692159,LIGHTYELLOW:4294959359,LIME:16711935,LIMEGREEN:852308735,LINEN:4210091775,MAGENTA:4278255615,MAROON:2147483903,MEDIUMAQUAMARINE:1724754687,MEDIUMBLUE:52735,MEDIUMORCHID:3126187007,MEDIUMPURPLE:2473647103,MEDIUMSEAGREEN:1018393087,MEDIUMSLATEBLUE:2070474495,MEDIUMSPRINGGREEN:16423679,MEDIUMTURQUOISE:1221709055,MEDIUMVIOLETRED:3340076543,MIDNIGHTBLUE:421097727,MINTCREAM:4127193855,MISTYROSE:4293190143,MOCCASIN:4293178879,NAVAJOWHITE:4292783615,NAVY:33023,OLDLACE:4260751103,OLIVE:2155872511,OLIVEDRAB:1804477439,ORANGE:4289003775,ORANGERED:4282712319,ORCHID:3664828159,PALEGOLDENROD:4008225535,PALEGREEN:2566625535,PALETURQUOISE:2951671551,PALEVIOLETRED:3681588223,PAPAYAWHIP:4293907967,PEACHPUFF:4292524543,PERU:3448061951,PINK:4290825215,PLUM:3718307327,POWDERBLUE:2967529215,PURPLE:2147516671,REBECCAPURPLE:1714657791,RED:4278190335,ROSYBROWN:3163525119,ROYALBLUE:1097458175,SADDLEBROWN:2336560127,SALMON:4202722047,SANDYBROWN:4104413439,SEAGREEN:780883967,SEASHELL:4294307583,SIENNA:2689740287,SILVER:3233857791,SKYBLUE:2278484991,SLATEBLUE:1784335871,SLATEGRAY:1887473919,SLATEGREY:1887473919,SNOW:4294638335,SPRINGGREEN:16744447,STEELBLUE:1182971135,TAN:3535047935,TEAL:8421631,THISTLE:3636451583,TOMATO:4284696575,TRANSPARENT:0,TURQUOISE:1088475391,VIOLET:4001558271,WHEAT:4125012991,WHITE:4294967295,WHITESMOKE:4126537215,YELLOW:4294902015,YELLOWGREEN:2597139199},vb={name:"background-clip",initialValue:"border-box",prefix:!1,type:1,parse:function(e,t){return t.map(function(a){if(Tt(a))switch(a.value){case"padding-box":return 1;case"content-box":return 2}return 0})}},yb={name:"background-color",initialValue:"transparent",prefix:!1,type:3,format:"color"},Ki=function(e,t){var a=gn.parse(e,t[0]),s=t[1];return s&&pa(s)?{color:a,stop:s}:{color:a,stop:null}},mc=function(e,t){var a=e[0],s=e[e.length-1];a.stop===null&&(a.stop=Ua),s.stop===null&&(s.stop=un);for(var n=[],l=0,A=0;Al?n.push(p):n.push(l),l=p}else n.push(null)}for(var m=null,A=0;AA.optimumDistance)?{optimumCorner:c,optimumDistance:g}:A},{optimumDistance:n?1/0:-1/0,optimumCorner:null}).optimumCorner},Cb=function(e,t,a,s,n){var l=0,A=0;switch(e.size){case 0:e.shape===0?l=A=Math.min(Math.abs(t),Math.abs(t-s),Math.abs(a),Math.abs(a-n)):e.shape===1&&(l=Math.min(Math.abs(t),Math.abs(t-s)),A=Math.min(Math.abs(a),Math.abs(a-n)));break;case 2:if(e.shape===0)l=A=Math.min(vs(t,a),vs(t,a-n),vs(t-s,a),vs(t-s,a-n));else if(e.shape===1){var c=Math.min(Math.abs(a),Math.abs(a-n))/Math.min(Math.abs(t),Math.abs(t-s)),p=hc(s,n,t,a,!0),m=p[0],g=p[1];l=vs(m-t,(g-a)/c),A=c*l}break;case 1:e.shape===0?l=A=Math.max(Math.abs(t),Math.abs(t-s),Math.abs(a),Math.abs(a-n)):e.shape===1&&(l=Math.max(Math.abs(t),Math.abs(t-s)),A=Math.max(Math.abs(a),Math.abs(a-n)));break;case 3:if(e.shape===0)l=A=Math.max(vs(t,a),vs(t,a-n),vs(t-s,a),vs(t-s,a-n));else if(e.shape===1){var c=Math.max(Math.abs(a),Math.abs(a-n))/Math.max(Math.abs(t),Math.abs(t-s)),y=hc(s,n,t,a,!1),m=y[0],g=y[1];l=vs(m-t,(g-a)/c),A=c*l}break}return Array.isArray(e.size)&&(l=Nt(e.size[0],s),A=e.size.length===2?Nt(e.size[1],n):l),[l,A]},Bb=function(e,t){var a=us(180),s=[];return Ls(t).forEach(function(n,l){if(l===0){var A=n[0];if(A.type===20&&A.value==="to"){a=Lp(n);return}else if(Mp(A)){a=Pi.parse(e,A);return}}var c=Ki(e,n);s.push(c)}),{angle:a,stops:s,type:1}},Fl=function(e,t){var a=us(180),s=[];return Ls(t).forEach(function(n,l){if(l===0){var A=n[0];if(A.type===20&&["top","left","right","bottom"].indexOf(A.value)!==-1){a=Lp(n);return}else if(Mp(A)){a=(Pi.parse(e,A)+us(270))%us(360);return}}var c=Ki(e,n);s.push(c)}),{angle:a,stops:s,type:1}},kb=function(e,t){var a=us(180),s=[],n=1,l=0,A=3,c=[];return Ls(t).forEach(function(p,m){var g=p[0];if(m===0){if(Tt(g)&&g.value==="linear"){n=1;return}else if(Tt(g)&&g.value==="radial"){n=2;return}}if(g.type===18){if(g.name==="from"){var y=gn.parse(e,g.values[0]);s.push({stop:Ua,color:y})}else if(g.name==="to"){var y=gn.parse(e,g.values[0]);s.push({stop:un,color:y})}else if(g.name==="color-stop"){var v=g.values.filter(fo);if(v.length===2){var y=gn.parse(e,v[1]),C=v[0];go(C)&&s.push({stop:{type:16,number:C.number*100,flags:C.flags},color:y})}}}}),n===1?{angle:(a+us(180))%us(360),stops:s,type:n}:{size:A,shape:l,stops:s,position:c,type:n}},Op="closest-side",Rp="farthest-side",Hp="closest-corner",Pp="farthest-corner",Kp="circle",Np="ellipse",Gp="cover",zp="contain",xb=function(e,t){var a=0,s=3,n=[],l=[];return Ls(t).forEach(function(A,c){var p=!0;if(c===0){var m=!1;p=A.reduce(function(y,v){if(m)if(Tt(v))switch(v.value){case"center":return l.push(lA),y;case"top":case"left":return l.push(Ua),y;case"right":case"bottom":return l.push(un),y}else(pa(v)||yn(v))&&l.push(v);else if(Tt(v))switch(v.value){case Kp:return a=0,!1;case Np:return a=1,!1;case"at":return m=!0,!1;case Op:return s=0,!1;case Gp:case Rp:return s=1,!1;case zp:case Hp:return s=2,!1;case Pp:return s=3,!1}else if(yn(v)||pa(v))return Array.isArray(s)||(s=[]),s.push(v),!1;return y},p)}if(p){var g=Ki(e,A);n.push(g)}}),{size:s,shape:a,stops:n,position:l,type:2}},El=function(e,t){var a=0,s=3,n=[],l=[];return Ls(t).forEach(function(A,c){var p=!0;if(c===0?p=A.reduce(function(g,y){if(Tt(y))switch(y.value){case"center":return l.push(lA),!1;case"top":case"left":return l.push(Ua),!1;case"right":case"bottom":return l.push(un),!1}else if(pa(y)||yn(y))return l.push(y),!1;return g},p):c===1&&(p=A.reduce(function(g,y){if(Tt(y))switch(y.value){case Kp:return a=0,!1;case Np:return a=1,!1;case zp:case Op:return s=0,!1;case Rp:return s=1,!1;case Hp:return s=2,!1;case Gp:case Pp:return s=3,!1}else if(yn(y)||pa(y))return Array.isArray(s)||(s=[]),s.push(y),!1;return g},p)),p){var m=Ki(e,A);n.push(m)}}),{size:s,shape:a,stops:n,position:l,type:2}},Sb=function(e){return e.type===1},Fb=function(e){return e.type===2},iA={name:"image",parse:function(e,t){if(t.type===22){var a={url:t.value,type:0};return e.cache.addImage(t.value),a}if(t.type===18){var s=jp[t.name];if(typeof s>"u")throw new Error('Attempting to parse an unsupported image function "'+t.name+'"');return s(e,t.values)}throw new Error("Unsupported image type "+t.type)}};function Eb(e){return!(e.type===20&&e.value==="none")&&(e.type!==18||!!jp[e.name])}var jp={"linear-gradient":Bb,"-moz-linear-gradient":Fl,"-ms-linear-gradient":Fl,"-o-linear-gradient":Fl,"-webkit-linear-gradient":Fl,"radial-gradient":xb,"-moz-radial-gradient":El,"-ms-radial-gradient":El,"-o-radial-gradient":El,"-webkit-radial-gradient":El,"-webkit-gradient":kb},Ub={name:"background-image",initialValue:"none",type:1,prefix:!1,parse:function(e,t){if(t.length===0)return[];var a=t[0];return a.type===20&&a.value==="none"?[]:t.filter(function(s){return fo(s)&&Eb(s)}).map(function(s){return iA.parse(e,s)})}},$b={name:"background-origin",initialValue:"border-box",prefix:!1,type:1,parse:function(e,t){return t.map(function(a){if(Tt(a))switch(a.value){case"padding-box":return 1;case"content-box":return 2}return 0})}},Db={name:"background-position",initialValue:"0% 0%",type:1,prefix:!1,parse:function(e,t){return Ls(t).map(function(a){return a.filter(pa)}).map(Dp)}},Qb={name:"background-repeat",initialValue:"repeat",prefix:!1,type:1,parse:function(e,t){return Ls(t).map(function(a){return a.filter(Tt).map(function(s){return s.value}).join(" ")}).map(Ib)}},Ib=function(e){switch(e){case"no-repeat":return 1;case"repeat-x":case"repeat no-repeat":return 2;case"repeat-y":case"no-repeat repeat":return 3;case"repeat":default:return 0}},uo;(function(e){e.AUTO="auto",e.CONTAIN="contain",e.COVER="cover"})(uo||(uo={}));var Tb={name:"background-size",initialValue:"0",prefix:!1,type:1,parse:function(e,t){return Ls(t).map(function(a){return a.filter(Vb)})}},Vb=function(e){return Tt(e)||pa(e)},Ni=function(e){return{name:"border-"+e+"-color",initialValue:"transparent",prefix:!1,type:3,format:"color"}},Mb=Ni("top"),Lb=Ni("right"),Ob=Ni("bottom"),Rb=Ni("left"),Gi=function(e){return{name:"border-radius-"+e,initialValue:"0 0",prefix:!1,type:1,parse:function(t,a){return Dp(a.filter(pa))}}},Hb=Gi("top-left"),Pb=Gi("top-right"),Kb=Gi("bottom-right"),Nb=Gi("bottom-left"),zi=function(e){return{name:"border-"+e+"-style",initialValue:"solid",prefix:!1,type:2,parse:function(t,a){switch(a){case"none":return 0;case"dashed":return 2;case"dotted":return 3;case"double":return 4}return 1}}},Gb=zi("top"),zb=zi("right"),jb=zi("bottom"),Yb=zi("left"),ji=function(e){return{name:"border-"+e+"-width",initialValue:"0",type:0,prefix:!1,parse:function(t,a){return ol(a)?a.number:0}}},qb=ji("top"),Wb=ji("right"),Xb=ji("bottom"),Jb=ji("left"),Zb={name:"color",initialValue:"transparent",prefix:!1,type:3,format:"color"},e0={name:"direction",initialValue:"ltr",prefix:!1,type:2,parse:function(e,t){switch(t){case"rtl":return 1;case"ltr":default:return 0}}},t0={name:"display",initialValue:"inline-block",prefix:!1,type:1,parse:function(e,t){return t.filter(Tt).reduce(function(a,s){return a|a0(s.value)},0)}},a0=function(e){switch(e){case"block":case"-webkit-box":return 2;case"inline":return 4;case"run-in":return 8;case"flow":return 16;case"flow-root":return 32;case"table":return 64;case"flex":case"-webkit-flex":return 128;case"grid":case"-ms-grid":return 256;case"ruby":return 512;case"subgrid":return 1024;case"list-item":return 2048;case"table-row-group":return 4096;case"table-header-group":return 8192;case"table-footer-group":return 16384;case"table-row":return 32768;case"table-cell":return 65536;case"table-column-group":return 131072;case"table-column":return 262144;case"table-caption":return 524288;case"ruby-base":return 1048576;case"ruby-text":return 2097152;case"ruby-base-container":return 4194304;case"ruby-text-container":return 8388608;case"contents":return 16777216;case"inline-block":return 33554432;case"inline-list-item":return 67108864;case"inline-table":return 134217728;case"inline-flex":return 268435456;case"inline-grid":return 536870912}return 0},s0={name:"float",initialValue:"none",prefix:!1,type:2,parse:function(e,t){switch(t){case"left":return 1;case"right":return 2;case"inline-start":return 3;case"inline-end":return 4}return 0}},n0={name:"letter-spacing",initialValue:"0",prefix:!1,type:0,parse:function(e,t){return t.type===20&&t.value==="normal"?0:t.type===17||t.type===15?t.number:0}},li;(function(e){e.NORMAL="normal",e.STRICT="strict"})(li||(li={}));var o0={name:"line-break",initialValue:"normal",prefix:!1,type:2,parse:function(e,t){switch(t){case"strict":return li.STRICT;case"normal":default:return li.NORMAL}}},l0={name:"line-height",initialValue:"normal",prefix:!1,type:4},_c=function(e,t){return Tt(e)&&e.value==="normal"?1.2*t:e.type===17?t*e.number:pa(e)?Nt(e,t):t},i0={name:"list-style-image",initialValue:"none",type:0,prefix:!1,parse:function(e,t){return t.type===20&&t.value==="none"?null:iA.parse(e,t)}},r0={name:"list-style-position",initialValue:"outside",prefix:!1,type:2,parse:function(e,t){switch(t){case"inside":return 0;case"outside":default:return 1}}},hd={name:"list-style-type",initialValue:"none",prefix:!1,type:2,parse:function(e,t){switch(t){case"disc":return 0;case"circle":return 1;case"square":return 2;case"decimal":return 3;case"cjk-decimal":return 4;case"decimal-leading-zero":return 5;case"lower-roman":return 6;case"upper-roman":return 7;case"lower-greek":return 8;case"lower-alpha":return 9;case"upper-alpha":return 10;case"arabic-indic":return 11;case"armenian":return 12;case"bengali":return 13;case"cambodian":return 14;case"cjk-earthly-branch":return 15;case"cjk-heavenly-stem":return 16;case"cjk-ideographic":return 17;case"devanagari":return 18;case"ethiopic-numeric":return 19;case"georgian":return 20;case"gujarati":return 21;case"gurmukhi":return 22;case"hebrew":return 22;case"hiragana":return 23;case"hiragana-iroha":return 24;case"japanese-formal":return 25;case"japanese-informal":return 26;case"kannada":return 27;case"katakana":return 28;case"katakana-iroha":return 29;case"khmer":return 30;case"korean-hangul-formal":return 31;case"korean-hanja-formal":return 32;case"korean-hanja-informal":return 33;case"lao":return 34;case"lower-armenian":return 35;case"malayalam":return 36;case"mongolian":return 37;case"myanmar":return 38;case"oriya":return 39;case"persian":return 40;case"simp-chinese-formal":return 41;case"simp-chinese-informal":return 42;case"tamil":return 43;case"telugu":return 44;case"thai":return 45;case"tibetan":return 46;case"trad-chinese-formal":return 47;case"trad-chinese-informal":return 48;case"upper-armenian":return 49;case"disclosure-open":return 50;case"disclosure-closed":return 51;case"none":default:return-1}}},Yi=function(e){return{name:"margin-"+e,initialValue:"0",prefix:!1,type:4}},d0=Yi("top"),A0=Yi("right"),c0=Yi("bottom"),u0=Yi("left"),p0={name:"overflow",initialValue:"visible",prefix:!1,type:1,parse:function(e,t){return t.filter(Tt).map(function(a){switch(a.value){case"hidden":return 1;case"scroll":return 2;case"clip":return 3;case"auto":return 4;case"visible":default:return 0}})}},f0={name:"overflow-wrap",initialValue:"normal",prefix:!1,type:2,parse:function(e,t){switch(t){case"break-word":return"break-word";case"normal":default:return"normal"}}},qi=function(e){return{name:"padding-"+e,initialValue:"0",prefix:!1,type:3,format:"length-percentage"}},m0=qi("top"),h0=qi("right"),_0=qi("bottom"),g0=qi("left"),v0={name:"text-align",initialValue:"left",prefix:!1,type:2,parse:function(e,t){switch(t){case"right":return 2;case"center":case"justify":return 1;case"left":default:return 0}}},y0={name:"position",initialValue:"static",prefix:!1,type:2,parse:function(e,t){switch(t){case"relative":return 1;case"absolute":return 2;case"fixed":return 3;case"sticky":return 4}return 0}},b0={name:"text-shadow",initialValue:"none",type:1,prefix:!1,parse:function(e,t){return t.length===1&&md(t[0],"none")?[]:Ls(t).map(function(a){for(var s={color:zs.TRANSPARENT,offsetX:Ua,offsetY:Ua,blur:Ua},n=0,l=0;l"u")throw new Error('Attempting to parse an unsupported transform function "'+t.name+'"');return a(t.values)}return null}},B0=function(e){var t=e.filter(function(a){return a.type===17}).map(function(a){return a.number});return t.length===6?t:null},k0=function(e){var t=e.filter(function(p){return p.type===17}).map(function(p){return p.number}),a=t[0],s=t[1];t[2],t[3];var n=t[4],l=t[5];t[6],t[7],t[8],t[9],t[10],t[11];var A=t[12],c=t[13];return t[14],t[15],t.length===16?[a,s,n,l,A,c]:null},x0={matrix:B0,matrix3d:k0},gc={type:16,number:50,flags:nl},S0=[gc,gc],F0={name:"transform-origin",initialValue:"50% 50%",prefix:!0,type:1,parse:function(e,t){var a=t.filter(pa);return a.length!==2?S0:[a[0],a[1]]}},E0={name:"visible",initialValue:"none",prefix:!1,type:2,parse:function(e,t){switch(t){case"hidden":return 1;case"collapse":return 2;case"visible":default:return 0}}},Ro;(function(e){e.NORMAL="normal",e.BREAK_ALL="break-all",e.KEEP_ALL="keep-all"})(Ro||(Ro={}));var U0={name:"word-break",initialValue:"normal",prefix:!1,type:2,parse:function(e,t){switch(t){case"break-all":return Ro.BREAK_ALL;case"keep-all":return Ro.KEEP_ALL;case"normal":default:return Ro.NORMAL}}},$0={name:"z-index",initialValue:"auto",prefix:!1,type:0,parse:function(e,t){if(t.type===20)return{auto:!0,order:0};if(go(t))return{auto:!1,order:t.number};throw new Error("Invalid z-index number parsed")}},Yp={name:"time",parse:function(e,t){if(t.type===15)switch(t.unit.toLowerCase()){case"s":return 1e3*t.number;case"ms":return t.number}throw new Error("Unsupported time type")}},D0={name:"opacity",initialValue:"1",type:0,prefix:!1,parse:function(e,t){return go(t)?t.number:1}},Q0={name:"text-decoration-color",initialValue:"transparent",prefix:!1,type:3,format:"color"},I0={name:"text-decoration-line",initialValue:"none",prefix:!1,type:1,parse:function(e,t){return t.filter(Tt).map(function(a){switch(a.value){case"underline":return 1;case"overline":return 2;case"line-through":return 3;case"none":return 4}return 0}).filter(function(a){return a!==0})}},T0={name:"font-family",initialValue:"",prefix:!1,type:1,parse:function(e,t){var a=[],s=[];return t.forEach(function(n){switch(n.type){case 20:case 0:a.push(n.value);break;case 17:a.push(n.number.toString());break;case 4:s.push(a.join(" ")),a.length=0;break}}),a.length&&s.push(a.join(" ")),s.map(function(n){return n.indexOf(" ")===-1?n:"'"+n+"'"})}},V0={name:"font-size",initialValue:"0",prefix:!1,type:3,format:"length"},M0={name:"font-weight",initialValue:"normal",type:0,prefix:!1,parse:function(e,t){if(go(t))return t.number;if(Tt(t))switch(t.value){case"bold":return 700;case"normal":default:return 400}return 400}},L0={name:"font-variant",initialValue:"none",type:1,prefix:!1,parse:function(e,t){return t.filter(Tt).map(function(a){return a.value})}},O0={name:"font-style",initialValue:"normal",prefix:!1,type:2,parse:function(e,t){switch(t){case"oblique":return"oblique";case"italic":return"italic";case"normal":default:return"normal"}}},_a=function(e,t){return(e&t)!==0},R0={name:"content",initialValue:"none",type:1,prefix:!1,parse:function(e,t){if(t.length===0)return[];var a=t[0];return a.type===20&&a.value==="none"?[]:t}},H0={name:"counter-increment",initialValue:"none",prefix:!0,type:1,parse:function(e,t){if(t.length===0)return null;var a=t[0];if(a.type===20&&a.value==="none")return null;for(var s=[],n=t.filter($p),l=0;l1?1:0],this.overflowWrap=Ge(t,f0,a.overflowWrap),this.paddingTop=Ge(t,m0,a.paddingTop),this.paddingRight=Ge(t,h0,a.paddingRight),this.paddingBottom=Ge(t,_0,a.paddingBottom),this.paddingLeft=Ge(t,g0,a.paddingLeft),this.paintOrder=Ge(t,z0,a.paintOrder),this.position=Ge(t,y0,a.position),this.textAlign=Ge(t,v0,a.textAlign),this.textDecorationColor=Ge(t,Q0,(s=a.textDecorationColor)!==null&&s!==void 0?s:a.color),this.textDecorationLine=Ge(t,I0,(n=a.textDecorationLine)!==null&&n!==void 0?n:a.textDecoration),this.textShadow=Ge(t,b0,a.textShadow),this.textTransform=Ge(t,w0,a.textTransform),this.transform=Ge(t,C0,a.transform),this.transformOrigin=Ge(t,F0,a.transformOrigin),this.visibility=Ge(t,E0,a.visibility),this.webkitTextStrokeColor=Ge(t,j0,a.webkitTextStrokeColor),this.webkitTextStrokeWidth=Ge(t,Y0,a.webkitTextStrokeWidth),this.wordBreak=Ge(t,U0,a.wordBreak),this.zIndex=Ge(t,$0,a.zIndex)}return e.prototype.isVisible=function(){return this.display>0&&this.opacity>0&&this.visibility===0},e.prototype.isTransparent=function(){return vn(this.backgroundColor)},e.prototype.isTransformed=function(){return this.transform!==null},e.prototype.isPositioned=function(){return this.position!==0},e.prototype.isPositionedWithZIndex=function(){return this.isPositioned()&&!this.zIndex.auto},e.prototype.isFloating=function(){return this.float!==0},e.prototype.isInlineLevel=function(){return _a(this.display,4)||_a(this.display,33554432)||_a(this.display,268435456)||_a(this.display,536870912)||_a(this.display,67108864)||_a(this.display,134217728)},e}(),W0=function(){function e(t,a){this.content=Ge(t,R0,a.content),this.quotes=Ge(t,N0,a.quotes)}return e}(),yc=function(){function e(t,a){this.counterIncrement=Ge(t,H0,a.counterIncrement),this.counterReset=Ge(t,P0,a.counterReset)}return e}(),Ge=function(e,t,a){var s=new Ep,n=a!==null&&typeof a<"u"?a.toString():t.initialValue;s.write(n);var l=new Up(s.read());switch(t.type){case 2:var A=l.parseComponentValue();return t.parse(e,Tt(A)?A.value:t.initialValue);case 0:return t.parse(e,l.parseComponentValue());case 1:return t.parse(e,l.parseComponentValues());case 4:return l.parseComponentValue();case 3:switch(t.format){case"angle":return Pi.parse(e,l.parseComponentValue());case"color":return gn.parse(e,l.parseComponentValue());case"image":return iA.parse(e,l.parseComponentValue());case"length":var c=l.parseComponentValue();return yn(c)?c:Ua;case"length-percentage":var p=l.parseComponentValue();return pa(p)?p:Ua;case"time":return Yp.parse(e,l.parseComponentValue())}break}},X0="data-html2canvas-debug",J0=function(e){var t=e.getAttribute(X0);switch(t){case"all":return 1;case"clone":return 2;case"parse":return 3;case"render":return 4;default:return 0}},_d=function(e,t){var a=J0(e);return a===1||t===a},Os=function(){function e(t,a){if(this.context=t,this.textNodes=[],this.elements=[],this.flags=0,_d(a,3))debugger;this.styles=new q0(t,window.getComputedStyle(a,null)),yd(a)&&(this.styles.animationDuration.some(function(s){return s>0})&&(a.style.animationDuration="0s"),this.styles.transform!==null&&(a.style.transform="none")),this.bounds=Ri(this.context,a),_d(a,4)&&(this.flags|=16)}return e}(),Z0="AAAAAAAAAAAAEA4AGBkAAFAaAAACAAAAAAAIABAAGAAwADgACAAQAAgAEAAIABAACAAQAAgAEAAIABAACAAQAAgAEAAIABAAQABIAEQATAAIABAACAAQAAgAEAAIABAAVABcAAgAEAAIABAACAAQAGAAaABwAHgAgACIAI4AlgAIABAAmwCjAKgAsAC2AL4AvQDFAMoA0gBPAVYBWgEIAAgACACMANoAYgFkAWwBdAF8AX0BhQGNAZUBlgGeAaMBlQGWAasBswF8AbsBwwF0AcsBYwHTAQgA2wG/AOMBdAF8AekB8QF0AfkB+wHiAHQBfAEIAAMC5gQIAAsCEgIIAAgAFgIeAggAIgIpAggAMQI5AkACygEIAAgASAJQAlgCYAIIAAgACAAKBQoFCgUTBRMFGQUrBSsFCAAIAAgACAAIAAgACAAIAAgACABdAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACABoAmgCrwGvAQgAbgJ2AggAHgEIAAgACADnAXsCCAAIAAgAgwIIAAgACAAIAAgACACKAggAkQKZAggAPADJAAgAoQKkAqwCsgK6AsICCADJAggA0AIIAAgACAAIANYC3gIIAAgACAAIAAgACABAAOYCCAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAkASoB+QIEAAgACAA8AEMCCABCBQgACABJBVAFCAAIAAgACAAIAAgACAAIAAgACABTBVoFCAAIAFoFCABfBWUFCAAIAAgACAAIAAgAbQUIAAgACAAIAAgACABzBXsFfQWFBYoFigWKBZEFigWKBYoFmAWfBaYFrgWxBbkFCAAIAAgACAAIAAgACAAIAAgACAAIAMEFCAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAMgFCADQBQgACAAIAAgACAAIAAgACAAIAAgACAAIAO4CCAAIAAgAiQAIAAgACABAAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAD0AggACAD8AggACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIANYFCAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAMDvwAIAAgAJAIIAAgACAAIAAgACAAIAAgACwMTAwgACAB9BOsEGwMjAwgAKwMyAwsFYgE3A/MEPwMIAEUDTQNRAwgAWQOsAGEDCAAIAAgACAAIAAgACABpAzQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BT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AAIAFoECAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgAOQEIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAB+BAcACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAEABhgSMBAgACAAIAAgAlAQIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAwAEAAQABAADAAMAAwADAAQABAAEAAQABAAEAAQABHATAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgAdQMIAAgACAAIAAgACAAIAMkACAAIAAgAfQMIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACACFA4kDCAAIAAgACAAIAOcBCAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAIcDCAAIAAgACAAIAAgACAAIAAgACAAIAJEDCAAIAAgACADFAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACABgBAgAZgQIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgAbAQCBXIECAAIAHkECAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACABAAJwEQACjBKoEsgQIAAgACAAIAAgACAAIAAgACAAIA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AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA4AAAAAAA4ADgAOAA4ADgAOAA4ADgAOAAAADgAOAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4AAAAAAAAAAAAAAAAADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAA4ADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAA4ADgAOAA4ADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAA4ADgAOAA4AAAAAAAAAAAAAAAAAAAAAAA4ADgAOAA4ADgAOAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4AAAAOAA4ADgAOAA4ADgAAAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4AAAAAAAAAAAA=",bc="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Do=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(var Ul=0;Ul>4,g[n++]=(A&15)<<4|c>>2,g[n++]=(c&3)<<6|p&63;return m},tw=function(e){for(var t=e.length,a=[],s=0;s>In,nw=1<>In,lw=qp+ow,iw=lw,rw=32,dw=iw+rw,Aw=65536>>rA,cw=1<=0){if(t<55296||t>56319&&t<=65535)return a=this.index[t>>In],a=(a<<_r)+(t&gr),this.data[a];if(t<=65535)return a=this.index[qp+(t-55296>>In)],a=(a<<_r)+(t&gr),this.data[a];if(t>rA),a=this.index[a],a+=t>>In&uw,a=this.index[a],a=(a<<_r)+(t&gr),this.data[a];if(t<=1114111)return this.data[this.highValueIndex]}return this.errorValue},e}(),Cc="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",hw=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(var $l=0;$l=55296&&n<=56319&&a>10)+55296,A%1024+56320)),(n+1===a||s.length>16384)&&(l+=String.fromCharCode.apply(String,s),s.length=0)}return l},bw=fw(Z0),is="×",Br="÷",ww=function(e){return bw.get(e)},Cw=function(e,t,a){var s=a-2,n=t[s],l=t[a-1],A=t[a];if(l===vr&&A===yr)return is;if(l===vr||l===yr||l===Bc||A===vr||A===yr||A===Bc)return Br;if(l===xc&&[xc,br,Sc,Fc].indexOf(A)!==-1||(l===Sc||l===br)&&(A===br||A===wr)||(l===Fc||l===wr)&&A===wr||A===Ec||A===kc||A===gw||l===_w)return is;if(l===Ec&&A===Uc){for(;n===kc;)n=t[--s];if(n===Uc)return is}if(l===Cr&&A===Cr){for(var c=0;n===Cr;)c++,n=t[--s];if(c%2===0)return is}return Br},Bw=function(e){var t=vw(e),a=t.length,s=0,n=0,l=t.map(ww);return{next:function(){if(s>=a)return{done:!0,value:null};for(var A=is;sA.x||g.y>A.y;return A=g,m===0?!0:y});return e.body.removeChild(t),c},Fw=function(){return typeof new Image().crossOrigin<"u"},Ew=function(){return typeof new XMLHttpRequest().responseType=="string"},Uw=function(e){var t=new Image,a=e.createElement("canvas"),s=a.getContext("2d");if(!s)return!1;t.src="data:image/svg+xml,";try{s.drawImage(t,0,0),a.toDataURL()}catch{return!1}return!0},$c=function(e){return e[0]===0&&e[1]===255&&e[2]===0&&e[3]===255},$w=function(e){var t=e.createElement("canvas"),a=100;t.width=a,t.height=a;var s=t.getContext("2d");if(!s)return Promise.reject(!1);s.fillStyle="rgb(0, 255, 0)",s.fillRect(0,0,a,a);var n=new Image,l=t.toDataURL();n.src=l;var A=gd(a,a,0,0,n);return s.fillStyle="red",s.fillRect(0,0,a,a),Dc(A).then(function(c){s.drawImage(c,0,0);var p=s.getImageData(0,0,a,a).data;s.fillStyle="red",s.fillRect(0,0,a,a);var m=e.createElement("div");return m.style.backgroundImage="url("+l+")",m.style.height=a+"px",$c(p)?Dc(gd(a,a,0,0,m)):Promise.reject(!1)}).then(function(c){return s.drawImage(c,0,0),$c(s.getImageData(0,0,a,a).data)}).catch(function(){return!1})},gd=function(e,t,a,s,n){var l="http://www.w3.org/2000/svg",A=document.createElementNS(l,"svg"),c=document.createElementNS(l,"foreignObject");return A.setAttributeNS(null,"width",e.toString()),A.setAttributeNS(null,"height",t.toString()),c.setAttributeNS(null,"width","100%"),c.setAttributeNS(null,"height","100%"),c.setAttributeNS(null,"x",a.toString()),c.setAttributeNS(null,"y",s.toString()),c.setAttributeNS(null,"externalResourcesRequired","true"),A.appendChild(c),c.appendChild(n),A},Dc=function(e){return new Promise(function(t,a){var s=new Image;s.onload=function(){return t(s)},s.onerror=a,s.src="data:image/svg+xml;charset=utf-8,"+encodeURIComponent(new XMLSerializer().serializeToString(e))})},Fa={get SUPPORT_RANGE_BOUNDS(){var e=xw(document);return Object.defineProperty(Fa,"SUPPORT_RANGE_BOUNDS",{value:e}),e},get SUPPORT_WORD_BREAKING(){var e=Fa.SUPPORT_RANGE_BOUNDS&&Sw(document);return Object.defineProperty(Fa,"SUPPORT_WORD_BREAKING",{value:e}),e},get SUPPORT_SVG_DRAWING(){var e=Uw(document);return Object.defineProperty(Fa,"SUPPORT_SVG_DRAWING",{value:e}),e},get SUPPORT_FOREIGNOBJECT_DRAWING(){var e=typeof Array.from=="function"&&typeof window.fetch=="function"?$w(document):Promise.resolve(!1);return Object.defineProperty(Fa,"SUPPORT_FOREIGNOBJECT_DRAWING",{value:e}),e},get SUPPORT_CORS_IMAGES(){var e=Fw();return Object.defineProperty(Fa,"SUPPORT_CORS_IMAGES",{value:e}),e},get SUPPORT_RESPONSE_TYPE(){var e=Ew();return Object.defineProperty(Fa,"SUPPORT_RESPONSE_TYPE",{value:e}),e},get SUPPORT_CORS_XHR(){var e="withCredentials"in new XMLHttpRequest;return Object.defineProperty(Fa,"SUPPORT_CORS_XHR",{value:e}),e},get SUPPORT_NATIVE_TEXT_SEGMENTATION(){var e=!!(typeof Intl<"u"&&Intl.Segmenter);return Object.defineProperty(Fa,"SUPPORT_NATIVE_TEXT_SEGMENTATION",{value:e}),e}},Ho=function(){function e(t,a){this.text=t,this.bounds=a}return e}(),Dw=function(e,t,a,s){var n=Tw(t,a),l=[],A=0;return n.forEach(function(c){if(a.textDecorationLine.length||c.trim().length>0)if(Fa.SUPPORT_RANGE_BOUNDS){var p=Qc(s,A,c.length).getClientRects();if(p.length>1){var m=dA(c),g=0;m.forEach(function(v){l.push(new Ho(v,Ws.fromDOMRectList(e,Qc(s,g+A,v.length).getClientRects()))),g+=v.length})}else l.push(new Ho(c,Ws.fromDOMRectList(e,p)))}else{var y=s.splitText(c.length);l.push(new Ho(c,Qw(e,s))),s=y}else Fa.SUPPORT_RANGE_BOUNDS||(s=s.splitText(c.length));A+=c.length}),l},Qw=function(e,t){var a=t.ownerDocument;if(a){var s=a.createElement("html2canvaswrapper");s.appendChild(t.cloneNode(!0));var n=t.parentNode;if(n){n.replaceChild(s,t);var l=Ri(e,s);return s.firstChild&&n.replaceChild(s.firstChild,s),l}}return Ws.EMPTY},Qc=function(e,t,a){var s=e.ownerDocument;if(!s)throw new Error("Node has no owner document");var n=s.createRange();return n.setStart(e,t),n.setEnd(e,t+a),n},dA=function(e){if(Fa.SUPPORT_NATIVE_TEXT_SEGMENTATION){var t=new Intl.Segmenter(void 0,{granularity:"grapheme"});return Array.from(t.segment(e)).map(function(a){return a.segment})}return kw(e)},Iw=function(e,t){if(Fa.SUPPORT_NATIVE_TEXT_SEGMENTATION){var a=new Intl.Segmenter(void 0,{granularity:"word"});return Array.from(a.segment(e)).map(function(s){return s.segment})}return Mw(e,t)},Tw=function(e,t){return t.letterSpacing!==0?dA(e):Iw(e,t)},Vw=[32,160,4961,65792,65793,4153,4241],Mw=function(e,t){for(var a=Ay(e,{lineBreak:t.lineBreak,wordBreak:t.overflowWrap==="break-word"?"break-word":t.wordBreak}),s=[],n,l=function(){if(n.value){var A=n.value.slice(),c=Hi(A),p="";c.forEach(function(m){Vw.indexOf(m)===-1?p+=ia(m):(p.length&&s.push(p),s.push(ia(m)),p="")}),p.length&&s.push(p)}};!(n=a.next()).done;)l();return s},Lw=function(){function e(t,a,s){this.text=Ow(a.data,s.textTransform),this.textBounds=Dw(t,this.text,s,a)}return e}(),Ow=function(e,t){switch(t){case 1:return e.toLowerCase();case 3:return e.replace(Rw,Hw);case 2:return e.toUpperCase();default:return e}},Rw=/(^|\s|:|-|\(|\))([a-z])/g,Hw=function(e,t,a){return e.length>0?t+a.toUpperCase():e},Wp=function(e){Bs(t,e);function t(a,s){var n=e.call(this,a,s)||this;return n.src=s.currentSrc||s.src,n.intrinsicWidth=s.naturalWidth,n.intrinsicHeight=s.naturalHeight,n.context.cache.addImage(n.src),n}return t}(Os),Xp=function(e){Bs(t,e);function t(a,s){var n=e.call(this,a,s)||this;return n.canvas=s,n.intrinsicWidth=s.width,n.intrinsicHeight=s.height,n}return t}(Os),Jp=function(e){Bs(t,e);function t(a,s){var n=e.call(this,a,s)||this,l=new XMLSerializer,A=Ri(a,s);return s.setAttribute("width",A.width+"px"),s.setAttribute("height",A.height+"px"),n.svg="data:image/svg+xml,"+encodeURIComponent(l.serializeToString(s)),n.intrinsicWidth=s.width.baseVal.value,n.intrinsicHeight=s.height.baseVal.value,n.context.cache.addImage(n.svg),n}return t}(Os),Zp=function(e){Bs(t,e);function t(a,s){var n=e.call(this,a,s)||this;return n.value=s.value,n}return t}(Os),vd=function(e){Bs(t,e);function t(a,s){var n=e.call(this,a,s)||this;return n.start=s.start,n.reversed=typeof s.reversed=="boolean"&&s.reversed===!0,n}return t}(Os),Pw=[{type:15,flags:0,unit:"px",number:3}],Kw=[{type:16,flags:0,number:50}],Nw=function(e){return e.width>e.height?new Ws(e.left+(e.width-e.height)/2,e.top,e.height,e.height):e.width0)a.textNodes.push(new Lw(e,n,a.styles));else if(Ao(n))if(Af(n)&&n.assignedNodes)n.assignedNodes().forEach(function(c){return zl(e,c,a,s)});else{var A=sf(e,n);A.styles.isVisible()&&(Yw(n,A,s)?A.flags|=4:qw(A.styles)&&(A.flags|=2),jw.indexOf(n.tagName)!==-1&&(A.flags|=8),a.elements.push(A),n.slot,n.shadowRoot?zl(e,n.shadowRoot,A,s):!di(n)&&!lf(n)&&!Ai(n)&&zl(e,n,A,s))}},sf=function(e,t){return bd(t)?new Wp(e,t):rf(t)?new Xp(e,t):lf(t)?new Jp(e,t):Ww(t)?new Zp(e,t):Xw(t)?new vd(e,t):Jw(t)?new AA(e,t):Ai(t)?new ef(e,t):di(t)?new tf(e,t):df(t)?new af(e,t):new Os(e,t)},nf=function(e,t){var a=sf(e,t);return a.flags|=4,zl(e,t,a,a),a},Yw=function(e,t,a){return t.styles.isPositionedWithZIndex()||t.styles.opacity<1||t.styles.isTransformed()||cA(e)&&a.styles.isTransparent()},qw=function(e){return e.isPositioned()||e.isFloating()},of=function(e){return e.nodeType===Node.TEXT_NODE},Ao=function(e){return e.nodeType===Node.ELEMENT_NODE},yd=function(e){return Ao(e)&&typeof e.style<"u"&&!jl(e)},jl=function(e){return typeof e.className=="object"},Ww=function(e){return e.tagName==="LI"},Xw=function(e){return e.tagName==="OL"},Jw=function(e){return e.tagName==="INPUT"},Zw=function(e){return e.tagName==="HTML"},lf=function(e){return e.tagName==="svg"},cA=function(e){return e.tagName==="BODY"},rf=function(e){return e.tagName==="CANVAS"},Tc=function(e){return e.tagName==="VIDEO"},bd=function(e){return e.tagName==="IMG"},df=function(e){return e.tagName==="IFRAME"},Vc=function(e){return e.tagName==="STYLE"},eC=function(e){return e.tagName==="SCRIPT"},di=function(e){return e.tagName==="TEXTAREA"},Ai=function(e){return e.tagName==="SELECT"},Af=function(e){return e.tagName==="SLOT"},Mc=function(e){return e.tagName.indexOf("-")>0},tC=function(){function e(){this.counters={}}return e.prototype.getCounterValue=function(t){var a=this.counters[t];return a&&a.length?a[a.length-1]:1},e.prototype.getCounterValues=function(t){var a=this.counters[t];return a||[]},e.prototype.pop=function(t){var a=this;t.forEach(function(s){return a.counters[s].pop()})},e.prototype.parse=function(t){var a=this,s=t.counterIncrement,n=t.counterReset,l=!0;s!==null&&s.forEach(function(c){var p=a.counters[c.counter];p&&c.increment!==0&&(l=!1,p.length||p.push(1),p[Math.max(0,p.length-1)]+=c.increment)});var A=[];return l&&n.forEach(function(c){var p=a.counters[c.counter];A.push(c.counter),p||(p=a.counters[c.counter]=[]),p.push(c.reset)}),A},e}(),Lc={integers:[1e3,900,500,400,100,90,50,40,10,9,5,4,1],values:["M","CM","D","CD","C","XC","L","XL","X","IX","V","IV","I"]},Oc={integers:[9e3,8e3,7e3,6e3,5e3,4e3,3e3,2e3,1e3,900,800,700,600,500,400,300,200,100,90,80,70,60,50,40,30,20,10,9,8,7,6,5,4,3,2,1],values:["Ք","Փ","Ւ","Ց","Ր","Տ","Վ","Ս","Ռ","Ջ","Պ","Չ","Ո","Շ","Ն","Յ","Մ","Ճ","Ղ","Ձ","Հ","Կ","Ծ","Խ","Լ","Ի","Ժ","Թ","Ը","Է","Զ","Ե","Դ","Գ","Բ","Ա"]},aC={integers:[1e4,9e3,8e3,7e3,6e3,5e3,4e3,3e3,2e3,1e3,400,300,200,100,90,80,70,60,50,40,30,20,19,18,17,16,15,10,9,8,7,6,5,4,3,2,1],values:["י׳","ט׳","ח׳","ז׳","ו׳","ה׳","ד׳","ג׳","ב׳","א׳","ת","ש","ר","ק","צ","פ","ע","ס","נ","מ","ל","כ","יט","יח","יז","טז","טו","י","ט","ח","ז","ו","ה","ד","ג","ב","א"]},sC={integers:[1e4,9e3,8e3,7e3,6e3,5e3,4e3,3e3,2e3,1e3,900,800,700,600,500,400,300,200,100,90,80,70,60,50,40,30,20,10,9,8,7,6,5,4,3,2,1],values:["ჵ","ჰ","ჯ","ჴ","ხ","ჭ","წ","ძ","ც","ჩ","შ","ყ","ღ","ქ","ფ","ჳ","ტ","ს","რ","ჟ","პ","ო","ჲ","ნ","მ","ლ","კ","ი","თ","ჱ","ზ","ვ","ე","დ","გ","ბ","ა"]},Wn=function(e,t,a,s,n,l){return ea?tl(e,n,l.length>0):s.integers.reduce(function(A,c,p){for(;e>=c;)e-=c,A+=s.values[p];return A},"")+l},cf=function(e,t,a,s){var n="";do a||e--,n=s(e)+n,e/=t;while(e*t>=t);return n},la=function(e,t,a,s,n){var l=a-t+1;return(e<0?"-":"")+(cf(Math.abs(e),l,s,function(A){return ia(Math.floor(A%l)+t)})+n)},Bn=function(e,t,a){a===void 0&&(a=". ");var s=t.length;return cf(Math.abs(e),s,!1,function(n){return t[Math.floor(n%s)]})+a},so=1,on=2,ln=4,Qo=8,Ns=function(e,t,a,s,n,l){if(e<-9999||e>9999)return tl(e,4,n.length>0);var A=Math.abs(e),c=n;if(A===0)return t[0]+c;for(var p=0;A>0&&p<=4;p++){var m=A%10;m===0&&_a(l,so)&&c!==""?c=t[m]+c:m>1||m===1&&p===0||m===1&&p===1&&_a(l,on)||m===1&&p===1&&_a(l,ln)&&e>100||m===1&&p>1&&_a(l,Qo)?c=t[m]+(p>0?a[p-1]:"")+c:m===1&&p>0&&(c=a[p-1]+c),A=Math.floor(A/10)}return(e<0?s:"")+c},Rc="十百千萬",Hc="拾佰仟萬",Pc="マイナス",kr="마이너스",tl=function(e,t,a){var s=a?". ":"",n=a?"、":"",l=a?", ":"",A=a?" ":"";switch(t){case 0:return"•"+A;case 1:return"◦"+A;case 2:return"◾"+A;case 5:var c=la(e,48,57,!0,s);return c.length<4?"0"+c:c;case 4:return Bn(e,"〇一二三四五六七八九",n);case 6:return Wn(e,1,3999,Lc,3,s).toLowerCase();case 7:return Wn(e,1,3999,Lc,3,s);case 8:return la(e,945,969,!1,s);case 9:return la(e,97,122,!1,s);case 10:return la(e,65,90,!1,s);case 11:return la(e,1632,1641,!0,s);case 12:case 49:return Wn(e,1,9999,Oc,3,s);case 35:return Wn(e,1,9999,Oc,3,s).toLowerCase();case 13:return la(e,2534,2543,!0,s);case 14:case 30:return la(e,6112,6121,!0,s);case 15:return Bn(e,"子丑寅卯辰巳午未申酉戌亥",n);case 16:return Bn(e,"甲乙丙丁戊己庚辛壬癸",n);case 17:case 48:return Ns(e,"零一二三四五六七八九",Rc,"負",n,on|ln|Qo);case 47:return Ns(e,"零壹貳參肆伍陸柒捌玖",Hc,"負",n,so|on|ln|Qo);case 42:return Ns(e,"零一二三四五六七八九",Rc,"负",n,on|ln|Qo);case 41:return Ns(e,"零壹贰叁肆伍陆柒捌玖",Hc,"负",n,so|on|ln|Qo);case 26:return Ns(e,"〇一二三四五六七八九","十百千万",Pc,n,0);case 25:return Ns(e,"零壱弐参四伍六七八九","拾百千万",Pc,n,so|on|ln);case 31:return Ns(e,"영일이삼사오육칠팔구","십백천만",kr,l,so|on|ln);case 33:return Ns(e,"零一二三四五六七八九","十百千萬",kr,l,0);case 32:return Ns(e,"零壹貳參四五六七八九","拾百千",kr,l,so|on|ln);case 18:return la(e,2406,2415,!0,s);case 20:return Wn(e,1,19999,sC,3,s);case 21:return la(e,2790,2799,!0,s);case 22:return la(e,2662,2671,!0,s);case 22:return Wn(e,1,10999,aC,3,s);case 23:return Bn(e,"あいうえおかきくけこさしすせそたちつてとなにぬねのはひふへほまみむめもやゆよらりるれろわゐゑをん");case 24:return Bn(e,"いろはにほへとちりぬるをわかよたれそつねならむうゐのおくやまけふこえてあさきゆめみしゑひもせす");case 27:return la(e,3302,3311,!0,s);case 28:return Bn(e,"アイウエオカキクケコサシスセソタチツテトナニヌネノハヒフヘホマミムメモヤユヨラリルレロワヰヱヲン",n);case 29:return Bn(e,"イロハニホヘトチリヌルヲワカヨタレソツネナラムウヰノオクヤマケフコエテアサキユメミシヱヒモセス",n);case 34:return la(e,3792,3801,!0,s);case 37:return la(e,6160,6169,!0,s);case 38:return la(e,4160,4169,!0,s);case 39:return la(e,2918,2927,!0,s);case 40:return la(e,1776,1785,!0,s);case 43:return la(e,3046,3055,!0,s);case 44:return la(e,3174,3183,!0,s);case 45:return la(e,3664,3673,!0,s);case 46:return la(e,3872,3881,!0,s);case 3:default:return la(e,48,57,!0,s)}},uf="data-html2canvas-ignore",Kc=function(){function e(t,a,s){if(this.context=t,this.options=s,this.scrolledElements=[],this.referenceElement=a,this.counters=new tC,this.quoteDepth=0,!a.ownerDocument)throw new Error("Cloned element does not have an owner document");this.documentElement=this.cloneNode(a.ownerDocument.documentElement,!1)}return e.prototype.toIFrame=function(t,a){var s=this,n=nC(t,a);if(!n.contentWindow)return Promise.reject("Unable to find iframe window");var l=t.defaultView.pageXOffset,A=t.defaultView.pageYOffset,c=n.contentWindow,p=c.document,m=iC(n).then(function(){return La(s,void 0,void 0,function(){var g,y;return Qa(this,function(v){switch(v.label){case 0:return this.scrolledElements.forEach(cC),c&&(c.scrollTo(a.left,a.top),/(iPad|iPhone|iPod)/g.test(navigator.userAgent)&&(c.scrollY!==a.top||c.scrollX!==a.left)&&(this.context.logger.warn("Unable to restore scroll position for cloned document"),this.context.windowBounds=this.context.windowBounds.add(c.scrollX-a.left,c.scrollY-a.top,0,0))),g=this.options.onclone,y=this.clonedReferenceElement,typeof y>"u"?[2,Promise.reject("Error finding the "+this.referenceElement.nodeName+" in the cloned document")]:p.fonts&&p.fonts.ready?[4,p.fonts.ready]:[3,2];case 1:v.sent(),v.label=2;case 2:return/(AppleWebKit)/g.test(navigator.userAgent)?[4,lC(p)]:[3,4];case 3:v.sent(),v.label=4;case 4:return typeof g=="function"?[2,Promise.resolve().then(function(){return g(p,y)}).then(function(){return n})]:[2,n]}})})});return p.open(),p.write(dC(document.doctype)+""),AC(this.referenceElement.ownerDocument,l,A),p.replaceChild(p.adoptNode(this.documentElement),p.documentElement),p.close(),m},e.prototype.createElementClone=function(t){if(_d(t,2))debugger;if(rf(t))return this.createCanvasClone(t);if(Tc(t))return this.createVideoClone(t);if(Vc(t))return this.createStyleClone(t);var a=t.cloneNode(!1);return bd(a)&&(bd(t)&&t.currentSrc&&t.currentSrc!==t.src&&(a.src=t.currentSrc,a.srcset=""),a.loading==="lazy"&&(a.loading="eager")),Mc(a)?this.createCustomElementClone(a):a},e.prototype.createCustomElementClone=function(t){var a=document.createElement("html2canvascustomelement");return xr(t.style,a),a},e.prototype.createStyleClone=function(t){try{var a=t.sheet;if(a&&a.cssRules){var s=[].slice.call(a.cssRules,0).reduce(function(l,A){return A&&typeof A.cssText=="string"?l+A.cssText:l},""),n=t.cloneNode(!1);return n.textContent=s,n}}catch(l){if(this.context.logger.error("Unable to access cssRules property",l),l.name!=="SecurityError")throw l}return t.cloneNode(!1)},e.prototype.createCanvasClone=function(t){var a;if(this.options.inlineImages&&t.ownerDocument){var s=t.ownerDocument.createElement("img");try{return s.src=t.toDataURL(),s}catch{this.context.logger.info("Unable to inline canvas contents, canvas is tainted",t)}}var n=t.cloneNode(!1);try{n.width=t.width,n.height=t.height;var l=t.getContext("2d"),A=n.getContext("2d");if(A)if(!this.options.allowTaint&&l)A.putImageData(l.getImageData(0,0,t.width,t.height),0,0);else{var c=(a=t.getContext("webgl2"))!==null&&a!==void 0?a:t.getContext("webgl");if(c){var p=c.getContextAttributes();(p==null?void 0:p.preserveDrawingBuffer)===!1&&this.context.logger.warn("Unable to clone WebGL context as it has preserveDrawingBuffer=false",t)}A.drawImage(t,0,0)}return n}catch{this.context.logger.info("Unable to clone canvas as it is tainted",t)}return n},e.prototype.createVideoClone=function(t){var a=t.ownerDocument.createElement("canvas");a.width=t.offsetWidth,a.height=t.offsetHeight;var s=a.getContext("2d");try{return s&&(s.drawImage(t,0,0,a.width,a.height),this.options.allowTaint||s.getImageData(0,0,a.width,a.height)),a}catch{this.context.logger.info("Unable to clone video as it is tainted",t)}var n=t.ownerDocument.createElement("canvas");return n.width=t.offsetWidth,n.height=t.offsetHeight,n},e.prototype.appendChildNode=function(t,a,s){(!Ao(a)||!eC(a)&&!a.hasAttribute(uf)&&(typeof this.options.ignoreElements!="function"||!this.options.ignoreElements(a)))&&(!this.options.copyStyles||!Ao(a)||!Vc(a))&&t.appendChild(this.cloneNode(a,s))},e.prototype.cloneChildNodes=function(t,a,s){for(var n=this,l=t.shadowRoot?t.shadowRoot.firstChild:t.firstChild;l;l=l.nextSibling)if(Ao(l)&&Af(l)&&typeof l.assignedNodes=="function"){var A=l.assignedNodes();A.length&&A.forEach(function(c){return n.appendChildNode(a,c,s)})}else this.appendChildNode(a,l,s)},e.prototype.cloneNode=function(t,a){if(of(t))return document.createTextNode(t.data);if(!t.ownerDocument)return t.cloneNode(!1);var s=t.ownerDocument.defaultView;if(s&&Ao(t)&&(yd(t)||jl(t))){var n=this.createElementClone(t);n.style.transitionProperty="none";var l=s.getComputedStyle(t),A=s.getComputedStyle(t,":before"),c=s.getComputedStyle(t,":after");this.referenceElement===t&&yd(n)&&(this.clonedReferenceElement=n),cA(n)&&fC(n);var p=this.counters.parse(new yc(this.context,l)),m=this.resolvePseudoContent(t,n,A,Po.BEFORE);Mc(t)&&(a=!0),Tc(t)||this.cloneChildNodes(t,n,a),m&&n.insertBefore(m,n.firstChild);var g=this.resolvePseudoContent(t,n,c,Po.AFTER);return g&&n.appendChild(g),this.counters.pop(p),(l&&(this.options.copyStyles||jl(t))&&!df(t)||a)&&xr(l,n),(t.scrollTop!==0||t.scrollLeft!==0)&&this.scrolledElements.push([n,t.scrollLeft,t.scrollTop]),(di(t)||Ai(t))&&(di(n)||Ai(n))&&(n.value=t.value),n}return t.cloneNode(!1)},e.prototype.resolvePseudoContent=function(t,a,s,n){var l=this;if(s){var A=s.content,c=a.ownerDocument;if(!(!c||!A||A==="none"||A==="-moz-alt-content"||s.display==="none")){this.counters.parse(new yc(this.context,s));var p=new W0(this.context,s),m=c.createElement("html2canvaspseudoelement");xr(s,m),p.content.forEach(function(y){if(y.type===0)m.appendChild(c.createTextNode(y.value));else if(y.type===22){var v=c.createElement("img");v.src=y.value,v.style.opacity="1",m.appendChild(v)}else if(y.type===18){if(y.name==="attr"){var C=y.values.filter(Tt);C.length&&m.appendChild(c.createTextNode(t.getAttribute(C[0].value)||""))}else if(y.name==="counter"){var b=y.values.filter(fo),B=b[0],k=b[1];if(B&&Tt(B)){var U=l.counters.getCounterValue(B.value),T=k&&Tt(k)?hd.parse(l.context,k.value):3;m.appendChild(c.createTextNode(tl(U,T,!1)))}}else if(y.name==="counters"){var S=y.values.filter(fo),B=S[0],E=S[1],k=S[2];if(B&&Tt(B)){var Q=l.counters.getCounterValues(B.value),D=k&&Tt(k)?hd.parse(l.context,k.value):3,L=E&&E.type===0?E.value:"",I=Q.map(function(R){return tl(R,D,!1)}).join(L);m.appendChild(c.createTextNode(I))}}}else if(y.type===20)switch(y.value){case"open-quote":m.appendChild(c.createTextNode(vc(p.quotes,l.quoteDepth++,!0)));break;case"close-quote":m.appendChild(c.createTextNode(vc(p.quotes,--l.quoteDepth,!1)));break;default:m.appendChild(c.createTextNode(y.value))}}),m.className=wd+" "+Cd;var g=n===Po.BEFORE?" "+wd:" "+Cd;return jl(a)?a.className.baseValue+=g:a.className+=g,m}}},e.destroy=function(t){return t.parentNode?(t.parentNode.removeChild(t),!0):!1},e}(),Po;(function(e){e[e.BEFORE=0]="BEFORE",e[e.AFTER=1]="AFTER"})(Po||(Po={}));var nC=function(e,t){var a=e.createElement("iframe");return a.className="html2canvas-container",a.style.visibility="hidden",a.style.position="fixed",a.style.left="-10000px",a.style.top="0px",a.style.border="0",a.width=t.width.toString(),a.height=t.height.toString(),a.scrolling="no",a.setAttribute(uf,"true"),e.body.appendChild(a),a},oC=function(e){return new Promise(function(t){if(e.complete){t();return}if(!e.src){t();return}e.onload=t,e.onerror=t})},lC=function(e){return Promise.all([].slice.call(e.images,0).map(oC))},iC=function(e){return new Promise(function(t,a){var s=e.contentWindow;if(!s)return a("No window assigned for iframe");var n=s.document;s.onload=e.onload=function(){s.onload=e.onload=null;var l=setInterval(function(){n.body.childNodes.length>0&&n.readyState==="complete"&&(clearInterval(l),t(e))},50)}})},rC=["all","d","content"],xr=function(e,t){for(var a=e.length-1;a>=0;a--){var s=e.item(a);rC.indexOf(s)===-1&&t.style.setProperty(s,e.getPropertyValue(s))}return t},dC=function(e){var t="";return e&&(t+=""),t},AC=function(e,t,a){e&&e.defaultView&&(t!==e.defaultView.pageXOffset||a!==e.defaultView.pageYOffset)&&e.defaultView.scrollTo(t,a)},cC=function(e){var t=e[0],a=e[1],s=e[2];t.scrollLeft=a,t.scrollTop=s},uC=":before",pC=":after",wd="___html2canvas___pseudoelement_before",Cd="___html2canvas___pseudoelement_after",Nc=`{ content: "" !important; display: none !important; }`,fC=function(e){mC(e,"."+wd+uC+Nc+` .`+Cd+pC+Nc)},mC=function(e,t){var a=e.ownerDocument;if(a){var s=a.createElement("style");s.textContent=t,e.appendChild(s)}},pf=function(){function e(){}return e.getOrigin=function(t){var a=e._link;return a?(a.href=t,a.href=a.href,a.protocol+a.hostname+a.port):"about:blank"},e.isSameOrigin=function(t){return e.getOrigin(t)===e._origin},e.setContext=function(t){e._link=t.document.createElement("a"),e._origin=e.getOrigin(t.location.href)},e._origin="about:blank",e}(),hC=function(){function e(t,a){this.context=t,this._options=a,this._cache={}}return e.prototype.addImage=function(t){var a=Promise.resolve();return this.has(t)||(Fr(t)||yC(t))&&(this._cache[t]=this.loadImage(t)).catch(function(){}),a},e.prototype.match=function(t){return this._cache[t]},e.prototype.loadImage=function(t){return La(this,void 0,void 0,function(){var a,s,n,l,A=this;return Qa(this,function(c){switch(c.label){case 0:return a=pf.isSameOrigin(t),s=!Sr(t)&&this._options.useCORS===!0&&Fa.SUPPORT_CORS_IMAGES&&!a,n=!Sr(t)&&!a&&!Fr(t)&&typeof this._options.proxy=="string"&&Fa.SUPPORT_CORS_XHR&&!s,!a&&this._options.allowTaint===!1&&!Sr(t)&&!Fr(t)&&!n&&!s?[2]:(l=t,n?[4,this.proxy(l)]:[3,2]);case 1:l=c.sent(),c.label=2;case 2:return this.context.logger.debug("Added image "+t.substring(0,256)),[4,new Promise(function(p,m){var g=new Image;g.onload=function(){return p(g)},g.onerror=m,(bC(l)||s)&&(g.crossOrigin="anonymous"),g.src=l,g.complete===!0&&setTimeout(function(){return p(g)},500),A._options.imageTimeout>0&&setTimeout(function(){return m("Timed out ("+A._options.imageTimeout+"ms) loading image")},A._options.imageTimeout)})];case 3:return[2,c.sent()]}})})},e.prototype.has=function(t){return typeof this._cache[t]<"u"},e.prototype.keys=function(){return Promise.resolve(Object.keys(this._cache))},e.prototype.proxy=function(t){var a=this,s=this._options.proxy;if(!s)throw new Error("No proxy defined");var n=t.substring(0,256);return new Promise(function(l,A){var c=Fa.SUPPORT_RESPONSE_TYPE?"blob":"text",p=new XMLHttpRequest;p.onload=function(){if(p.status===200)if(c==="text")l(p.response);else{var y=new FileReader;y.addEventListener("load",function(){return l(y.result)},!1),y.addEventListener("error",function(v){return A(v)},!1),y.readAsDataURL(p.response)}else A("Failed to proxy resource "+n+" with status code "+p.status)},p.onerror=A;var m=s.indexOf("?")>-1?"&":"?";if(p.open("GET",""+s+m+"url="+encodeURIComponent(t)+"&responseType="+c),c!=="text"&&p instanceof XMLHttpRequest&&(p.responseType=c),a._options.imageTimeout){var g=a._options.imageTimeout;p.timeout=g,p.ontimeout=function(){return A("Timed out ("+g+"ms) proxying "+n)}}p.send()})},e}(),_C=/^data:image\/svg\+xml/i,gC=/^data:image\/.*;base64,/i,vC=/^data:image\/.*/i,yC=function(e){return Fa.SUPPORT_SVG_DRAWING||!wC(e)},Sr=function(e){return vC.test(e)},bC=function(e){return gC.test(e)},Fr=function(e){return e.substr(0,4)==="blob"},wC=function(e){return e.substr(-3).toLowerCase()==="svg"||_C.test(e)},Re=function(){function e(t,a){this.type=0,this.x=t,this.y=a}return e.prototype.add=function(t,a){return new e(this.x+t,this.y+a)},e}(),Xn=function(e,t,a){return new Re(e.x+(t.x-e.x)*a,e.y+(t.y-e.y)*a)},Dl=function(){function e(t,a,s,n){this.type=1,this.start=t,this.startControl=a,this.endControl=s,this.end=n}return e.prototype.subdivide=function(t,a){var s=Xn(this.start,this.startControl,t),n=Xn(this.startControl,this.endControl,t),l=Xn(this.endControl,this.end,t),A=Xn(s,n,t),c=Xn(n,l,t),p=Xn(A,c,t);return a?new e(this.start,s,A,p):new e(p,c,l,this.end)},e.prototype.add=function(t,a){return new e(this.start.add(t,a),this.startControl.add(t,a),this.endControl.add(t,a),this.end.add(t,a))},e.prototype.reverse=function(){return new e(this.end,this.endControl,this.startControl,this.start)},e}(),cs=function(e){return e.type===1},CC=function(){function e(t){var a=t.styles,s=t.bounds,n=$o(a.borderTopLeftRadius,s.width,s.height),l=n[0],A=n[1],c=$o(a.borderTopRightRadius,s.width,s.height),p=c[0],m=c[1],g=$o(a.borderBottomRightRadius,s.width,s.height),y=g[0],v=g[1],C=$o(a.borderBottomLeftRadius,s.width,s.height),b=C[0],B=C[1],k=[];k.push((l+p)/s.width),k.push((b+y)/s.width),k.push((A+B)/s.height),k.push((m+v)/s.height);var U=Math.max.apply(Math,k);U>1&&(l/=U,A/=U,p/=U,m/=U,y/=U,v/=U,b/=U,B/=U);var T=s.width-p,S=s.height-v,E=s.width-y,Q=s.height-B,D=a.borderTopWidth,L=a.borderRightWidth,I=a.borderBottomWidth,$=a.borderLeftWidth,V=Nt(a.paddingTop,t.bounds.width),R=Nt(a.paddingRight,t.bounds.width),P=Nt(a.paddingBottom,t.bounds.width),W=Nt(a.paddingLeft,t.bounds.width);this.topLeftBorderDoubleOuterBox=l>0||A>0?Yt(s.left+$/3,s.top+D/3,l-$/3,A-D/3,Et.TOP_LEFT):new Re(s.left+$/3,s.top+D/3),this.topRightBorderDoubleOuterBox=l>0||A>0?Yt(s.left+T,s.top+D/3,p-L/3,m-D/3,Et.TOP_RIGHT):new Re(s.left+s.width-L/3,s.top+D/3),this.bottomRightBorderDoubleOuterBox=y>0||v>0?Yt(s.left+E,s.top+S,y-L/3,v-I/3,Et.BOTTOM_RIGHT):new Re(s.left+s.width-L/3,s.top+s.height-I/3),this.bottomLeftBorderDoubleOuterBox=b>0||B>0?Yt(s.left+$/3,s.top+Q,b-$/3,B-I/3,Et.BOTTOM_LEFT):new Re(s.left+$/3,s.top+s.height-I/3),this.topLeftBorderDoubleInnerBox=l>0||A>0?Yt(s.left+$*2/3,s.top+D*2/3,l-$*2/3,A-D*2/3,Et.TOP_LEFT):new Re(s.left+$*2/3,s.top+D*2/3),this.topRightBorderDoubleInnerBox=l>0||A>0?Yt(s.left+T,s.top+D*2/3,p-L*2/3,m-D*2/3,Et.TOP_RIGHT):new Re(s.left+s.width-L*2/3,s.top+D*2/3),this.bottomRightBorderDoubleInnerBox=y>0||v>0?Yt(s.left+E,s.top+S,y-L*2/3,v-I*2/3,Et.BOTTOM_RIGHT):new Re(s.left+s.width-L*2/3,s.top+s.height-I*2/3),this.bottomLeftBorderDoubleInnerBox=b>0||B>0?Yt(s.left+$*2/3,s.top+Q,b-$*2/3,B-I*2/3,Et.BOTTOM_LEFT):new Re(s.left+$*2/3,s.top+s.height-I*2/3),this.topLeftBorderStroke=l>0||A>0?Yt(s.left+$/2,s.top+D/2,l-$/2,A-D/2,Et.TOP_LEFT):new Re(s.left+$/2,s.top+D/2),this.topRightBorderStroke=l>0||A>0?Yt(s.left+T,s.top+D/2,p-L/2,m-D/2,Et.TOP_RIGHT):new Re(s.left+s.width-L/2,s.top+D/2),this.bottomRightBorderStroke=y>0||v>0?Yt(s.left+E,s.top+S,y-L/2,v-I/2,Et.BOTTOM_RIGHT):new Re(s.left+s.width-L/2,s.top+s.height-I/2),this.bottomLeftBorderStroke=b>0||B>0?Yt(s.left+$/2,s.top+Q,b-$/2,B-I/2,Et.BOTTOM_LEFT):new Re(s.left+$/2,s.top+s.height-I/2),this.topLeftBorderBox=l>0||A>0?Yt(s.left,s.top,l,A,Et.TOP_LEFT):new Re(s.left,s.top),this.topRightBorderBox=p>0||m>0?Yt(s.left+T,s.top,p,m,Et.TOP_RIGHT):new Re(s.left+s.width,s.top),this.bottomRightBorderBox=y>0||v>0?Yt(s.left+E,s.top+S,y,v,Et.BOTTOM_RIGHT):new Re(s.left+s.width,s.top+s.height),this.bottomLeftBorderBox=b>0||B>0?Yt(s.left,s.top+Q,b,B,Et.BOTTOM_LEFT):new Re(s.left,s.top+s.height),this.topLeftPaddingBox=l>0||A>0?Yt(s.left+$,s.top+D,Math.max(0,l-$),Math.max(0,A-D),Et.TOP_LEFT):new Re(s.left+$,s.top+D),this.topRightPaddingBox=p>0||m>0?Yt(s.left+Math.min(T,s.width-L),s.top+D,T>s.width+L?0:Math.max(0,p-L),Math.max(0,m-D),Et.TOP_RIGHT):new Re(s.left+s.width-L,s.top+D),this.bottomRightPaddingBox=y>0||v>0?Yt(s.left+Math.min(E,s.width-$),s.top+Math.min(S,s.height-I),Math.max(0,y-L),Math.max(0,v-I),Et.BOTTOM_RIGHT):new Re(s.left+s.width-L,s.top+s.height-I),this.bottomLeftPaddingBox=b>0||B>0?Yt(s.left+$,s.top+Math.min(Q,s.height-I),Math.max(0,b-$),Math.max(0,B-I),Et.BOTTOM_LEFT):new Re(s.left+$,s.top+s.height-I),this.topLeftContentBox=l>0||A>0?Yt(s.left+$+W,s.top+D+V,Math.max(0,l-($+W)),Math.max(0,A-(D+V)),Et.TOP_LEFT):new Re(s.left+$+W,s.top+D+V),this.topRightContentBox=p>0||m>0?Yt(s.left+Math.min(T,s.width+$+W),s.top+D+V,T>s.width+$+W?0:p-$+W,m-(D+V),Et.TOP_RIGHT):new Re(s.left+s.width-(L+R),s.top+D+V),this.bottomRightContentBox=y>0||v>0?Yt(s.left+Math.min(E,s.width-($+W)),s.top+Math.min(S,s.height+D+V),Math.max(0,y-(L+R)),v-(I+P),Et.BOTTOM_RIGHT):new Re(s.left+s.width-(L+R),s.top+s.height-(I+P)),this.bottomLeftContentBox=b>0||B>0?Yt(s.left+$+W,s.top+Q,Math.max(0,b-($+W)),B-(I+P),Et.BOTTOM_LEFT):new Re(s.left+$+W,s.top+s.height-(I+P))}return e}(),Et;(function(e){e[e.TOP_LEFT=0]="TOP_LEFT",e[e.TOP_RIGHT=1]="TOP_RIGHT",e[e.BOTTOM_RIGHT=2]="BOTTOM_RIGHT",e[e.BOTTOM_LEFT=3]="BOTTOM_LEFT"})(Et||(Et={}));var Yt=function(e,t,a,s,n){var l=4*((Math.sqrt(2)-1)/3),A=a*l,c=s*l,p=e+a,m=t+s;switch(n){case Et.TOP_LEFT:return new Dl(new Re(e,m),new Re(e,m-c),new Re(p-A,t),new Re(p,t));case Et.TOP_RIGHT:return new Dl(new Re(e,t),new Re(e+A,t),new Re(p,m-c),new Re(p,m));case Et.BOTTOM_RIGHT:return new Dl(new Re(p,t),new Re(p,t+c),new Re(e+A,m),new Re(e,m));case Et.BOTTOM_LEFT:default:return new Dl(new Re(p,m),new Re(p-A,m),new Re(e,t+c),new Re(e,t))}},ci=function(e){return[e.topLeftBorderBox,e.topRightBorderBox,e.bottomRightBorderBox,e.bottomLeftBorderBox]},BC=function(e){return[e.topLeftContentBox,e.topRightContentBox,e.bottomRightContentBox,e.bottomLeftContentBox]},ui=function(e){return[e.topLeftPaddingBox,e.topRightPaddingBox,e.bottomRightPaddingBox,e.bottomLeftPaddingBox]},kC=function(){function e(t,a,s){this.offsetX=t,this.offsetY=a,this.matrix=s,this.type=0,this.target=6}return e}(),Ql=function(){function e(t,a){this.path=t,this.target=a,this.type=1}return e}(),xC=function(){function e(t){this.opacity=t,this.type=2,this.target=6}return e}(),SC=function(e){return e.type===0},ff=function(e){return e.type===1},FC=function(e){return e.type===2},Gc=function(e,t){return e.length===t.length?e.some(function(a,s){return a===t[s]}):!1},EC=function(e,t,a,s,n){return e.map(function(l,A){switch(A){case 0:return l.add(t,a);case 1:return l.add(t+s,a);case 2:return l.add(t+s,a+n);case 3:return l.add(t,a+n)}return l})},mf=function(){function e(t){this.element=t,this.inlineLevel=[],this.nonInlineLevel=[],this.negativeZIndex=[],this.zeroOrAutoZIndexOrTransformedOrOpacity=[],this.positiveZIndex=[],this.nonPositionedFloats=[],this.nonPositionedInlineLevel=[]}return e}(),hf=function(){function e(t,a){if(this.container=t,this.parent=a,this.effects=[],this.curves=new CC(this.container),this.container.styles.opacity<1&&this.effects.push(new xC(this.container.styles.opacity)),this.container.styles.transform!==null){var s=this.container.bounds.left+this.container.styles.transformOrigin[0].number,n=this.container.bounds.top+this.container.styles.transformOrigin[1].number,l=this.container.styles.transform;this.effects.push(new kC(s,n,l))}if(this.container.styles.overflowX!==0){var A=ci(this.curves),c=ui(this.curves);Gc(A,c)?this.effects.push(new Ql(A,6)):(this.effects.push(new Ql(A,2)),this.effects.push(new Ql(c,4)))}}return e.prototype.getEffects=function(t){for(var a=[2,3].indexOf(this.container.styles.position)===-1,s=this.parent,n=this.effects.slice(0);s;){var l=s.effects.filter(function(p){return!ff(p)});if(a||s.container.styles.position!==0||!s.parent){if(n.unshift.apply(n,l),a=[2,3].indexOf(s.container.styles.position)===-1,s.container.styles.overflowX!==0){var A=ci(s.curves),c=ui(s.curves);Gc(A,c)||n.unshift(new Ql(c,6))}}else n.unshift.apply(n,l);s=s.parent}return n.filter(function(p){return _a(p.target,t)})},e}(),Bd=function(e,t,a,s){e.container.elements.forEach(function(n){var l=_a(n.flags,4),A=_a(n.flags,2),c=new hf(n,e);_a(n.styles.display,2048)&&s.push(c);var p=_a(n.flags,8)?[]:s;if(l||A){var m=l||n.styles.isPositioned()?a:t,g=new mf(c);if(n.styles.isPositioned()||n.styles.opacity<1||n.styles.isTransformed()){var y=n.styles.zIndex.order;if(y<0){var v=0;m.negativeZIndex.some(function(b,B){return y>b.element.container.styles.zIndex.order?(v=B,!1):v>0}),m.negativeZIndex.splice(v,0,g)}else if(y>0){var C=0;m.positiveZIndex.some(function(b,B){return y>=b.element.container.styles.zIndex.order?(C=B+1,!1):C>0}),m.positiveZIndex.splice(C,0,g)}else m.zeroOrAutoZIndexOrTransformedOrOpacity.push(g)}else n.styles.isFloating()?m.nonPositionedFloats.push(g):m.nonPositionedInlineLevel.push(g);Bd(c,g,l?g:a,p)}else n.styles.isInlineLevel()?t.inlineLevel.push(c):t.nonInlineLevel.push(c),Bd(c,t,a,p);_a(n.flags,8)&&_f(n,p)})},_f=function(e,t){for(var a=e instanceof vd?e.start:1,s=e instanceof vd?e.reversed:!1,n=0;n"u"?e[0]:a},MC=function(e,t,a,s,n){var l=t[0],A=t[1],c=a[0],p=a[1];switch(e){case 2:return[new Re(Math.round(s.left),Math.round(s.top+A)),new Re(Math.round(s.left+s.width),Math.round(s.top+A)),new Re(Math.round(s.left+s.width),Math.round(p+s.top+A)),new Re(Math.round(s.left),Math.round(p+s.top+A))];case 3:return[new Re(Math.round(s.left+l),Math.round(s.top)),new Re(Math.round(s.left+l+c),Math.round(s.top)),new Re(Math.round(s.left+l+c),Math.round(s.height+s.top)),new Re(Math.round(s.left+l),Math.round(s.height+s.top))];case 1:return[new Re(Math.round(s.left+l),Math.round(s.top+A)),new Re(Math.round(s.left+l+c),Math.round(s.top+A)),new Re(Math.round(s.left+l+c),Math.round(s.top+A+p)),new Re(Math.round(s.left+l),Math.round(s.top+A+p))];default:return[new Re(Math.round(n.left),Math.round(n.top)),new Re(Math.round(n.left+n.width),Math.round(n.top)),new Re(Math.round(n.left+n.width),Math.round(n.height+n.top)),new Re(Math.round(n.left),Math.round(n.height+n.top))]}},LC="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7",jc="Hidden Text",OC=function(){function e(t){this._data={},this._document=t}return e.prototype.parseMetrics=function(t,a){var s=this._document.createElement("div"),n=this._document.createElement("img"),l=this._document.createElement("span"),A=this._document.body;s.style.visibility="hidden",s.style.fontFamily=t,s.style.fontSize=a,s.style.margin="0",s.style.padding="0",s.style.whiteSpace="nowrap",A.appendChild(s),n.src=LC,n.width=1,n.height=1,n.style.margin="0",n.style.padding="0",n.style.verticalAlign="baseline",l.style.fontFamily=t,l.style.fontSize=a,l.style.margin="0",l.style.padding="0",l.appendChild(this._document.createTextNode(jc)),s.appendChild(l),s.appendChild(n);var c=n.offsetTop-l.offsetTop+2;s.removeChild(l),s.appendChild(this._document.createTextNode(jc)),s.style.lineHeight="normal",n.style.verticalAlign="super";var p=n.offsetTop-s.offsetTop+2;return A.removeChild(s),{baseline:c,middle:p}},e.prototype.getMetrics=function(t,a){var s=t+" "+a;return typeof this._data[s]>"u"&&(this._data[s]=this.parseMetrics(t,a)),this._data[s]},e}(),vf=function(){function e(t,a){this.context=t,this.options=a}return e}(),RC=1e4,HC=function(e){Bs(t,e);function t(a,s){var n=e.call(this,a,s)||this;return n._activeEffects=[],n.canvas=s.canvas?s.canvas:document.createElement("canvas"),n.ctx=n.canvas.getContext("2d"),s.canvas||(n.canvas.width=Math.floor(s.width*s.scale),n.canvas.height=Math.floor(s.height*s.scale),n.canvas.style.width=s.width+"px",n.canvas.style.height=s.height+"px"),n.fontMetrics=new OC(document),n.ctx.scale(n.options.scale,n.options.scale),n.ctx.translate(-s.x,-s.y),n.ctx.textBaseline="bottom",n._activeEffects=[],n.context.logger.debug("Canvas renderer initialized ("+s.width+"x"+s.height+") with scale "+s.scale),n}return t.prototype.applyEffects=function(a){for(var s=this;this._activeEffects.length;)this.popEffect();a.forEach(function(n){return s.applyEffect(n)})},t.prototype.applyEffect=function(a){this.ctx.save(),FC(a)&&(this.ctx.globalAlpha=a.opacity),SC(a)&&(this.ctx.translate(a.offsetX,a.offsetY),this.ctx.transform(a.matrix[0],a.matrix[1],a.matrix[2],a.matrix[3],a.matrix[4],a.matrix[5]),this.ctx.translate(-a.offsetX,-a.offsetY)),ff(a)&&(this.path(a.path),this.ctx.clip()),this._activeEffects.push(a)},t.prototype.popEffect=function(){this._activeEffects.pop(),this.ctx.restore()},t.prototype.renderStack=function(a){return La(this,void 0,void 0,function(){var s;return Qa(this,function(n){switch(n.label){case 0:return s=a.element.container.styles,s.isVisible()?[4,this.renderStackContent(a)]:[3,2];case 1:n.sent(),n.label=2;case 2:return[2]}})})},t.prototype.renderNode=function(a){return La(this,void 0,void 0,function(){return Qa(this,function(s){switch(s.label){case 0:if(_a(a.container.flags,16))debugger;return a.container.styles.isVisible()?[4,this.renderNodeBackgroundAndBorders(a)]:[3,3];case 1:return s.sent(),[4,this.renderNodeContent(a)];case 2:s.sent(),s.label=3;case 3:return[2]}})})},t.prototype.renderTextWithLetterSpacing=function(a,s,n){var l=this;if(s===0)this.ctx.fillText(a.text,a.bounds.left,a.bounds.top+n);else{var A=dA(a.text);A.reduce(function(c,p){return l.ctx.fillText(p,c,a.bounds.top+n),c+l.ctx.measureText(p).width},a.bounds.left)}},t.prototype.createFontStyle=function(a){var s=a.fontVariant.filter(function(A){return A==="normal"||A==="small-caps"}).join(""),n=zC(a.fontFamily).join(", "),l=ol(a.fontSize)?""+a.fontSize.number+a.fontSize.unit:a.fontSize.number+"px";return[[a.fontStyle,s,a.fontWeight,l,n].join(" "),n,l]},t.prototype.renderTextNode=function(a,s){return La(this,void 0,void 0,function(){var n,l,A,c,p,m,g,y,v=this;return Qa(this,function(C){return n=this.createFontStyle(s),l=n[0],A=n[1],c=n[2],this.ctx.font=l,this.ctx.direction=s.direction===1?"rtl":"ltr",this.ctx.textAlign="left",this.ctx.textBaseline="alphabetic",p=this.fontMetrics.getMetrics(A,c),m=p.baseline,g=p.middle,y=s.paintOrder,a.textBounds.forEach(function(b){y.forEach(function(B){switch(B){case 0:v.ctx.fillStyle=ya(s.color),v.renderTextWithLetterSpacing(b,s.letterSpacing,m);var k=s.textShadow;k.length&&b.text.trim().length&&(k.slice(0).reverse().forEach(function(U){v.ctx.shadowColor=ya(U.color),v.ctx.shadowOffsetX=U.offsetX.number*v.options.scale,v.ctx.shadowOffsetY=U.offsetY.number*v.options.scale,v.ctx.shadowBlur=U.blur.number,v.renderTextWithLetterSpacing(b,s.letterSpacing,m)}),v.ctx.shadowColor="",v.ctx.shadowOffsetX=0,v.ctx.shadowOffsetY=0,v.ctx.shadowBlur=0),s.textDecorationLine.length&&(v.ctx.fillStyle=ya(s.textDecorationColor||s.color),s.textDecorationLine.forEach(function(U){switch(U){case 1:v.ctx.fillRect(b.bounds.left,Math.round(b.bounds.top+m),b.bounds.width,1);break;case 2:v.ctx.fillRect(b.bounds.left,Math.round(b.bounds.top),b.bounds.width,1);break;case 3:v.ctx.fillRect(b.bounds.left,Math.ceil(b.bounds.top+g),b.bounds.width,1);break}}));break;case 1:s.webkitTextStrokeWidth&&b.text.trim().length&&(v.ctx.strokeStyle=ya(s.webkitTextStrokeColor),v.ctx.lineWidth=s.webkitTextStrokeWidth,v.ctx.lineJoin=window.chrome?"miter":"round",v.ctx.strokeText(b.text,b.bounds.left,b.bounds.top+m)),v.ctx.strokeStyle="",v.ctx.lineWidth=0,v.ctx.lineJoin="miter";break}})}),[2]})})},t.prototype.renderReplacedElement=function(a,s,n){if(n&&a.intrinsicWidth>0&&a.intrinsicHeight>0){var l=pi(a),A=ui(s);this.path(A),this.ctx.save(),this.ctx.clip(),this.ctx.drawImage(n,0,0,a.intrinsicWidth,a.intrinsicHeight,l.left,l.top,l.width,l.height),this.ctx.restore()}},t.prototype.renderNodeContent=function(a){return La(this,void 0,void 0,function(){var s,n,l,A,c,p,T,T,m,g,y,v,E,C,b,Q,B,k,U,T,S,E,Q;return Qa(this,function(D){switch(D.label){case 0:this.applyEffects(a.getEffects(4)),s=a.container,n=a.curves,l=s.styles,A=0,c=s.textNodes,D.label=1;case 1:return A0&&N>0&&(I=l.ctx.createPattern(Q,"repeat"),l.renderRepeat(V,I,ae,q))):Fb(g)&&($=Er(a,s,[null,null,null]),V=$[0],R=$[1],P=$[2],W=$[3],N=$[4],te=g.position.length===0?[lA]:g.position,ae=Nt(te[0],W),q=Nt(te[te.length-1],N),re=Cb(g,ae,q,W,N),K=re[0],G=re[1],K>0&&G>0&&(J=l.ctx.createRadialGradient(R+ae,P+q,0,R+ae,P+q,K),mc(g.stops,K*2).forEach(function(ue){return J.addColorStop(ue.stop,ya(ue.color))}),l.path(V),l.ctx.fillStyle=J,K!==G?(X=a.bounds.left+.5*a.bounds.width,ne=a.bounds.top+.5*a.bounds.height,ye=G/K,se=1/ye,l.ctx.save(),l.ctx.translate(X,ne),l.ctx.transform(1,0,0,ye,0,0),l.ctx.translate(-X,-ne),l.ctx.fillRect(R,se*(P-ne)+ne,W,N*se),l.ctx.restore()):l.ctx.fill())),fe.label=6;case 6:return s--,[2]}})},l=this,A=0,c=a.styles.backgroundImage.slice(0).reverse(),m.label=1;case 1:return A0?g.style!==2?[3,5]:[4,this.renderDashedDottedBorder(g.color,g.width,c,a.curves,2)]:[3,11]):[3,13];case 4:return v.sent(),[3,11];case 5:return g.style!==3?[3,7]:[4,this.renderDashedDottedBorder(g.color,g.width,c,a.curves,3)];case 6:return v.sent(),[3,11];case 7:return g.style!==4?[3,9]:[4,this.renderDoubleBorder(g.color,g.width,c,a.curves)];case 8:return v.sent(),[3,11];case 9:return[4,this.renderSolidBorder(g.color,c,a.curves)];case 10:v.sent(),v.label=11;case 11:c++,v.label=12;case 12:return p++,[3,3];case 13:return[2]}})})},t.prototype.renderDashedDottedBorder=function(a,s,n,l,A){return La(this,void 0,void 0,function(){var c,p,m,g,y,v,C,b,B,k,U,T,S,E,Q,D,Q,D;return Qa(this,function(L){return this.ctx.save(),c=QC(l,n),p=zc(l,n),A===2&&(this.path(p),this.ctx.clip()),cs(p[0])?(m=p[0].start.x,g=p[0].start.y):(m=p[0].x,g=p[0].y),cs(p[1])?(y=p[1].end.x,v=p[1].end.y):(y=p[1].x,v=p[1].y),n===0||n===2?C=Math.abs(m-y):C=Math.abs(g-v),this.ctx.beginPath(),A===3?this.formatPath(c):this.formatPath(p.slice(0,2)),b=s<3?s*3:s*2,B=s<3?s*2:s,A===3&&(b=s,B=s),k=!0,C<=b*2?k=!1:C<=b*2+B?(U=C/(2*b+B),b*=U,B*=U):(T=Math.floor((C+B)/(b+B)),S=(C-T*b)/(T-1),E=(C-(T+1)*b)/T,B=E<=0||Math.abs(B-S){a.targetRef?XC(a.targetRef,{useCORS:!0,scale:2,backgroundColor:null,scrollY:-window.scrollY}).then(n=>{const l=document.createElement("a");l.download="chart-screenshot.png",l.href=n.toDataURL(),l.click()}):console.error("Target element for screenshot not found.")},a=e;return(s,n)=>(d(),F(Ee,{tag:"button",onClick:t,size:e.size,title:s.$t("Screenshot")},{default:r(()=>[o(j,{name:"Screenshot"})]),_:1},8,["size","title"]))}};var Ur={exports:{}};/** @license * * Colour Palette Generator script. * Copyright (c) 2014 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); you may * not use this file except in compliance with the License. You may * obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or * implied. See the License for the specific language governing * permissions and limitations under the License. * * Furthermore, ColorBrewer colour schemes are covered by the following: * * Copyright (c) 2002 Cynthia Brewer, Mark Harrower, and * The Pennsylvania State University. * * Licensed under the Apache License, Version 2.0 (the "License"); you may * not use this file except in compliance with the License. You may obtain * a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or * implied. See the License for the specific language governing * permissions and limitations under the License. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are * met: * * 1. Redistributions as source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * 2. The end-user documentation included with the redistribution, if any, * must include the following acknowledgment: "This product includes color * specifications and designs developed by Cynthia Brewer * (http://colorbrewer.org/)." Alternately, this acknowledgment may appear * in the software itself, if and wherever such third-party * acknowledgments normally appear. * * 4. The name "ColorBrewer" must not be used to endorse or promote products * derived from this software without prior written permission. For written * permission, please contact Cynthia Brewer at cbrewer@psu.edu. * * 5. Products derived from this software may not be called "ColorBrewer", * nor may "ColorBrewer" appear in their name, without prior written * permission of Cynthia Brewer. * * Furthermore, Solarized colour schemes are covered by the following: * * Copyright (c) 2011 Ethan Schoonover * * Permission is hereby granted, free of charge, to any person obtaining * a copy of this software and associated documentation files (the * "Software"), to deal in the Software without restriction, including * without limitation the rights to use, copy, modify, merge, publish, * distribute, sublicense, and/or sell copies of the Software, and to * permit persons to whom the Software is furnished to do so, subject to * the following conditions: * * The above copyright notice and this permission notice shall be included * in all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */var Yc;function e2(){return Yc||(Yc=1,function(e){var t=function(){var a=Array.prototype,s=function(m,g,y){return a.slice.apply(m,a.slice.call(arguments,1))},n="function",l=1e9,A=function(m,g,y,v){if(g|=0,g==0)return[];if(typeof m!==n){var C=A.listSchemes(m,g);if(!C.length)return null;m=C[(y||0)%C.length]}var b=s(arguments,2);return b[0]=g,m.apply(m,b)};A.Scheme=function(m,g){var y={},v=0,C=l,b=function(){if(arguments.length<=1)return B.color_func.bind(B);var k=s(arguments);return function(U){return k[0]=U,B.color_func.apply(B,k)}},B=function(k,U){if(k|=0,!k)return[];var T=k;if(k=Math.abs(k),k<=v){for(var S=Math.max(k,C);!(S in y);++S);var E=y[S];if(S>k){var Q="shrinking_takes_head"in E?E.shrinking_takes_head:B.shrinking_takes_head;if(Q)E=E.slice(0,k),S=k;else return A.generate(function(D){return E[Math.round(D)]},T,0,E.length-1)}return E=E.slice(),T<0&&E.reverse(),E}else return B.color_func?A.generate(b.apply(B,arguments),T,0,1,B.color_func_cyclic):null};return B.scheme_name=m,B.groups=g?typeof g=="string"?[g]:g:[],B.max=0,B.cbf_max=l,B.addPalette=function(k,U){var T=k.length;T&&(y[T]=k,C=Math.min(C,T),v=Math.max(v,T),B.max=Math.max(B.max,T),!U&&T!=1&&(B.cbf_max=Math.min(B.cbf_max,T-1)))},B.addPalettes=function(k,U,T){U=U||k.length;for(var S=0;S=g&&y.push(k)}),y.sort(function(v,C){return v.scheme_name>=C.scheme_name?v.scheme_name>C.scheme_name?1:0:-1}),y},A.generate=function(m,g,y,v,C){if(Math.abs(g)<1)return[];if(y=y===void 0?0:y,v=v===void 0?1:v,Math.abs(g)<2)return[m(y)];for(var b=Math.abs(g),B=y,k=[],U=(v-y)/(C?b:b-1);--b>=0;B+=U)k.push(m(B));return g<0&&k.reverse(),k};var p=function(m){return m>0?m<1?m:1:0};return A.rgbColor=function(m,g,y){return[m,g,y].map(function(v){return v=Number(Math.round(p(v)*255)).toString(16),v.length==1?"0"+v:v}).join("")},A.linearRgbColor=function(m,g,y){return[m,g,y].map(function(v){return v=p(v),v<=.0031308?v=12.92*v:v=1.055*Math.pow(v,.4166666666666667)-.055,v=Number(Math.round(v*255)).toString(16),v.length==1?"0"+v:v}).join("")},A.hsvColor=function(m,g,y){m*=6;var v=g===void 0?1:p(g),C=y===void 0?1:p(y),b=C*(1-v*Math.abs(m%2-1)),B=C*(1-v);switch(Math.floor(m)%6){case 0:return A.rgbColor(C,b,B);case 1:return A.rgbColor(b,C,B);case 2:return A.rgbColor(B,C,b);case 3:return A.rgbColor(B,b,C);case 4:return A.rgbColor(b,B,C);default:return A.rgbColor(C,B,b)}},A.register(A.Scheme.withColorFunction("rainbow","qualitative",A.hsvColor,!1,!0)),A}();t.ColorFunction,t.Palette,t.PalettesList,t.SchemeType,function(){var a=t.Scheme.fromPalettes("mpn65","qualitative",[["ff0029","377eb8","66a61e","984ea3","00d2d5","ff7f00","af8d00","7f80cd","b3e900","c42e60","a65628","f781bf","8dd3c7","bebada","fb8072","80b1d3","fdb462","fccde5","bc80bd","ffed6f","c4eaff","cf8c00","1b9e77","d95f02","e7298a","e6ab02","a6761d","0097ff","00d067","000000","252525","525252","737373","969696","bdbdbd","f43600","4ba93b","5779bb","927acc","97ee3f","bf3947","9f5b00","f48758","8caed6","f2b94f","eff26e","e43872","d9b100","9d7a00","698cff","d9d9d9","00d27e","d06800","009f82","c49200","cbe8ff","fecddf","c27eb6","8cd2ce","c4b8d9","f883b0","a49100","f48800","27d0df","a04a9b"]]);a.shrinkByTakingHead(!0),t.register(a)}(),function(){var a=t.rgbColor,s=function(l,A){for(var c=arguments.length-1,p=arguments[c];c>1;)p=p*l+arguments[--c];return p},n=function(l){var A=s(Math.abs(l),1,.278393,.230389,972e-6,.078108);return A*=A,A*=A,A=1-1/A,l<0?-A:A};t.register(t.Scheme.fromPalettes("tol","qualitative",[["4477aa"],["4477aa","cc6677"],["4477aa","ddcc77","cc6677"],["4477aa","117733","ddcc77","cc6677"],["332288","88ccee","117733","ddcc77","cc6677"],["332288","88ccee","117733","ddcc77","cc6677","aa4499"],["332288","88ccee","44aa99","117733","ddcc77","cc6677","aa4499"],["332288","88ccee","44aa99","117733","999933","ddcc77","cc6677","aa4499"],["332288","88ccee","44aa99","117733","999933","ddcc77","cc6677","882255","aa4499"],["332288","88ccee","44aa99","117733","999933","ddcc77","661100","cc6677","882255","aa4499"],["332288","6699cc","88ccee","44aa99","117733","999933","ddcc77","661100","cc6677","882255","aa4499"],["332288","6699cc","88ccee","44aa99","117733","999933","ddcc77","661100","cc6677","aa4466","882255","aa4499"]],12,12)),t.tolSequentialColor=function(l){return a(1-.392*(1+n((l-.869)/.255)),1.021-.456*(1+n((l-.527)/.376)),1-.493*(1+n((l-.272)/.309)))},t.register(t.Scheme.withColorFunction("tol-sq","sequential",t.tolSequentialColor,!0)),t.tolDivergingColor=function(l){var A=s(l,.572,1.524,-1.811)/s(l,1,-.291,.1574);return a(s(l,.235,-2.13,26.92,-65.5,63.5,-22.36),A*A,1/s(l,1.579,-4.03,12.92,-31.4,48.6,-23.36))},t.register(t.Scheme.withColorFunction("tol-dv","diverging",t.tolDivergingColor,!0)),t.tolRainbowColor=function(l){return a(s(l,.472,-.567,4.05)/s(l,1,8.72,-19.17,14.1),s(l,.108932,-1.22635,27.284,-98.577,163.3,-131.395,40.634),1/s(l,1.97,3.54,-68.5,243,-297,125))},t.register(t.Scheme.withColorFunction("tol-rainbow","qualitative",t.tolRainbowColor,!0))}(),function(){t.register(t.Scheme.fromPalettes("sol-base","sequential",[["002b36","073642","586e75","657b83","839496","93a1a1","eee8d5","fdf6e3"]],1,8)),t.register(t.Scheme.fromPalettes("sol-accent","qualitative",[["b58900","cb4b16","dc322f","d33682","6c71c4","268bd2","2aa198","859900"]]))}(),function(){var a={YlGn:{type:"sequential",cbf:42,3:["f7fcb9","addd8e","31a354"],4:["ffffcc","c2e699","78c679","238443"],5:["ffffcc","c2e699","78c679","31a354","006837"],6:["ffffcc","d9f0a3","addd8e","78c679","31a354","006837"],7:["ffffcc","d9f0a3","addd8e","78c679","41ab5d","238443","005a32"],8:["ffffe5","f7fcb9","d9f0a3","addd8e","78c679","41ab5d","238443","005a32"],9:["ffffe5","f7fcb9","d9f0a3","addd8e","78c679","41ab5d","238443","006837","004529"]},YlGnBu:{type:"sequential",cbf:42,3:["edf8b1","7fcdbb","2c7fb8"],4:["ffffcc","a1dab4","41b6c4","225ea8"],5:["ffffcc","a1dab4","41b6c4","2c7fb8","253494"],6:["ffffcc","c7e9b4","7fcdbb","41b6c4","2c7fb8","253494"],7:["ffffcc","c7e9b4","7fcdbb","41b6c4","1d91c0","225ea8","0c2c84"],8:["ffffd9","edf8b1","c7e9b4","7fcdbb","41b6c4","1d91c0","225ea8","0c2c84"],9:["ffffd9","edf8b1","c7e9b4","7fcdbb","41b6c4","1d91c0","225ea8","253494","081d58"]},GnBu:{type:"sequential",cbf:42,3:["e0f3db","a8ddb5","43a2ca"],4:["f0f9e8","bae4bc","7bccc4","2b8cbe"],5:["f0f9e8","bae4bc","7bccc4","43a2ca","0868ac"],6:["f0f9e8","ccebc5","a8ddb5","7bccc4","43a2ca","0868ac"],7:["f0f9e8","ccebc5","a8ddb5","7bccc4","4eb3d3","2b8cbe","08589e"],8:["f7fcf0","e0f3db","ccebc5","a8ddb5","7bccc4","4eb3d3","2b8cbe","08589e"],9:["f7fcf0","e0f3db","ccebc5","a8ddb5","7bccc4","4eb3d3","2b8cbe","0868ac","084081"]},BuGn:{type:"sequential",cbf:42,3:["e5f5f9","99d8c9","2ca25f"],4:["edf8fb","b2e2e2","66c2a4","238b45"],5:["edf8fb","b2e2e2","66c2a4","2ca25f","006d2c"],6:["edf8fb","ccece6","99d8c9","66c2a4","2ca25f","006d2c"],7:["edf8fb","ccece6","99d8c9","66c2a4","41ae76","238b45","005824"],8:["f7fcfd","e5f5f9","ccece6","99d8c9","66c2a4","41ae76","238b45","005824"],9:["f7fcfd","e5f5f9","ccece6","99d8c9","66c2a4","41ae76","238b45","006d2c","00441b"]},PuBuGn:{type:"sequential",cbf:42,3:["ece2f0","a6bddb","1c9099"],4:["f6eff7","bdc9e1","67a9cf","02818a"],5:["f6eff7","bdc9e1","67a9cf","1c9099","016c59"],6:["f6eff7","d0d1e6","a6bddb","67a9cf","1c9099","016c59"],7:["f6eff7","d0d1e6","a6bddb","67a9cf","3690c0","02818a","016450"],8:["fff7fb","ece2f0","d0d1e6","a6bddb","67a9cf","3690c0","02818a","016450"],9:["fff7fb","ece2f0","d0d1e6","a6bddb","67a9cf","3690c0","02818a","016c59","014636"]},PuBu:{type:"sequential",cbf:42,3:["ece7f2","a6bddb","2b8cbe"],4:["f1eef6","bdc9e1","74a9cf","0570b0"],5:["f1eef6","bdc9e1","74a9cf","2b8cbe","045a8d"],6:["f1eef6","d0d1e6","a6bddb","74a9cf","2b8cbe","045a8d"],7:["f1eef6","d0d1e6","a6bddb","74a9cf","3690c0","0570b0","034e7b"],8:["fff7fb","ece7f2","d0d1e6","a6bddb","74a9cf","3690c0","0570b0","034e7b"],9:["fff7fb","ece7f2","d0d1e6","a6bddb","74a9cf","3690c0","0570b0","045a8d","023858"]},BuPu:{type:"sequential",cbf:42,3:["e0ecf4","9ebcda","8856a7"],4:["edf8fb","b3cde3","8c96c6","88419d"],5:["edf8fb","b3cde3","8c96c6","8856a7","810f7c"],6:["edf8fb","bfd3e6","9ebcda","8c96c6","8856a7","810f7c"],7:["edf8fb","bfd3e6","9ebcda","8c96c6","8c6bb1","88419d","6e016b"],8:["f7fcfd","e0ecf4","bfd3e6","9ebcda","8c96c6","8c6bb1","88419d","6e016b"],9:["f7fcfd","e0ecf4","bfd3e6","9ebcda","8c96c6","8c6bb1","88419d","810f7c","4d004b"]},RdPu:{type:"sequential",cbf:42,3:["fde0dd","fa9fb5","c51b8a"],4:["feebe2","fbb4b9","f768a1","ae017e"],5:["feebe2","fbb4b9","f768a1","c51b8a","7a0177"],6:["feebe2","fcc5c0","fa9fb5","f768a1","c51b8a","7a0177"],7:["feebe2","fcc5c0","fa9fb5","f768a1","dd3497","ae017e","7a0177"],8:["fff7f3","fde0dd","fcc5c0","fa9fb5","f768a1","dd3497","ae017e","7a0177"],9:["fff7f3","fde0dd","fcc5c0","fa9fb5","f768a1","dd3497","ae017e","7a0177","49006a"]},PuRd:{type:"sequential",cbf:42,3:["e7e1ef","c994c7","dd1c77"],4:["f1eef6","d7b5d8","df65b0","ce1256"],5:["f1eef6","d7b5d8","df65b0","dd1c77","980043"],6:["f1eef6","d4b9da","c994c7","df65b0","dd1c77","980043"],7:["f1eef6","d4b9da","c994c7","df65b0","e7298a","ce1256","91003f"],8:["f7f4f9","e7e1ef","d4b9da","c994c7","df65b0","e7298a","ce1256","91003f"],9:["f7f4f9","e7e1ef","d4b9da","c994c7","df65b0","e7298a","ce1256","980043","67001f"]},OrRd:{type:"sequential",cbf:42,3:["fee8c8","fdbb84","e34a33"],4:["fef0d9","fdcc8a","fc8d59","d7301f"],5:["fef0d9","fdcc8a","fc8d59","e34a33","b30000"],6:["fef0d9","fdd49e","fdbb84","fc8d59","e34a33","b30000"],7:["fef0d9","fdd49e","fdbb84","fc8d59","ef6548","d7301f","990000"],8:["fff7ec","fee8c8","fdd49e","fdbb84","fc8d59","ef6548","d7301f","990000"],9:["fff7ec","fee8c8","fdd49e","fdbb84","fc8d59","ef6548","d7301f","b30000","7f0000"]},YlOrRd:{type:"sequential",cbf:42,3:["ffeda0","feb24c","f03b20"],4:["ffffb2","fecc5c","fd8d3c","e31a1c"],5:["ffffb2","fecc5c","fd8d3c","f03b20","bd0026"],6:["ffffb2","fed976","feb24c","fd8d3c","f03b20","bd0026"],7:["ffffb2","fed976","feb24c","fd8d3c","fc4e2a","e31a1c","b10026"],8:["ffffcc","ffeda0","fed976","feb24c","fd8d3c","fc4e2a","e31a1c","b10026"],9:["ffffcc","ffeda0","fed976","feb24c","fd8d3c","fc4e2a","e31a1c","bd0026","800026"]},YlOrBr:{type:"sequential",cbf:42,3:["fff7bc","fec44f","d95f0e"],4:["ffffd4","fed98e","fe9929","cc4c02"],5:["ffffd4","fed98e","fe9929","d95f0e","993404"],6:["ffffd4","fee391","fec44f","fe9929","d95f0e","993404"],7:["ffffd4","fee391","fec44f","fe9929","ec7014","cc4c02","8c2d04"],8:["ffffe5","fff7bc","fee391","fec44f","fe9929","ec7014","cc4c02","8c2d04"],9:["ffffe5","fff7bc","fee391","fec44f","fe9929","ec7014","cc4c02","993404","662506"]},Purples:{type:"sequential",cbf:42,3:["efedf5","bcbddc","756bb1"],4:["f2f0f7","cbc9e2","9e9ac8","6a51a3"],5:["f2f0f7","cbc9e2","9e9ac8","756bb1","54278f"],6:["f2f0f7","dadaeb","bcbddc","9e9ac8","756bb1","54278f"],7:["f2f0f7","dadaeb","bcbddc","9e9ac8","807dba","6a51a3","4a1486"],8:["fcfbfd","efedf5","dadaeb","bcbddc","9e9ac8","807dba","6a51a3","4a1486"],9:["fcfbfd","efedf5","dadaeb","bcbddc","9e9ac8","807dba","6a51a3","54278f","3f007d"]},Blues:{type:"sequential",cbf:42,3:["deebf7","9ecae1","3182bd"],4:["eff3ff","bdd7e7","6baed6","2171b5"],5:["eff3ff","bdd7e7","6baed6","3182bd","08519c"],6:["eff3ff","c6dbef","9ecae1","6baed6","3182bd","08519c"],7:["eff3ff","c6dbef","9ecae1","6baed6","4292c6","2171b5","084594"],8:["f7fbff","deebf7","c6dbef","9ecae1","6baed6","4292c6","2171b5","084594"],9:["f7fbff","deebf7","c6dbef","9ecae1","6baed6","4292c6","2171b5","08519c","08306b"]},Greens:{type:"sequential",cbf:42,3:["e5f5e0","a1d99b","31a354"],4:["edf8e9","bae4b3","74c476","238b45"],5:["edf8e9","bae4b3","74c476","31a354","006d2c"],6:["edf8e9","c7e9c0","a1d99b","74c476","31a354","006d2c"],7:["edf8e9","c7e9c0","a1d99b","74c476","41ab5d","238b45","005a32"],8:["f7fcf5","e5f5e0","c7e9c0","a1d99b","74c476","41ab5d","238b45","005a32"],9:["f7fcf5","e5f5e0","c7e9c0","a1d99b","74c476","41ab5d","238b45","006d2c","00441b"]},Oranges:{type:"sequential",cbf:42,3:["fee6ce","fdae6b","e6550d"],4:["feedde","fdbe85","fd8d3c","d94701"],5:["feedde","fdbe85","fd8d3c","e6550d","a63603"],6:["feedde","fdd0a2","fdae6b","fd8d3c","e6550d","a63603"],7:["feedde","fdd0a2","fdae6b","fd8d3c","f16913","d94801","8c2d04"],8:["fff5eb","fee6ce","fdd0a2","fdae6b","fd8d3c","f16913","d94801","8c2d04"],9:["fff5eb","fee6ce","fdd0a2","fdae6b","fd8d3c","f16913","d94801","a63603","7f2704"]},Reds:{type:"sequential",cbf:42,3:["fee0d2","fc9272","de2d26"],4:["fee5d9","fcae91","fb6a4a","cb181d"],5:["fee5d9","fcae91","fb6a4a","de2d26","a50f15"],6:["fee5d9","fcbba1","fc9272","fb6a4a","de2d26","a50f15"],7:["fee5d9","fcbba1","fc9272","fb6a4a","ef3b2c","cb181d","99000d"],8:["fff5f0","fee0d2","fcbba1","fc9272","fb6a4a","ef3b2c","cb181d","99000d"],9:["fff5f0","fee0d2","fcbba1","fc9272","fb6a4a","ef3b2c","cb181d","a50f15","67000d"]},Greys:{type:"sequential",cbf:42,3:["f0f0f0","bdbdbd","636363"],4:["f7f7f7","cccccc","969696","525252"],5:["f7f7f7","cccccc","969696","636363","252525"],6:["f7f7f7","d9d9d9","bdbdbd","969696","636363","252525"],7:["f7f7f7","d9d9d9","bdbdbd","969696","737373","525252","252525"],8:["ffffff","f0f0f0","d9d9d9","bdbdbd","969696","737373","525252","252525"],9:["ffffff","f0f0f0","d9d9d9","bdbdbd","969696","737373","525252","252525","000000"]},PuOr:{type:"diverging",cbf:42,3:["f1a340","f7f7f7","998ec3"],4:["e66101","fdb863","b2abd2","5e3c99"],5:["e66101","fdb863","f7f7f7","b2abd2","5e3c99"],6:["b35806","f1a340","fee0b6","d8daeb","998ec3","542788"],7:["b35806","f1a340","fee0b6","f7f7f7","d8daeb","998ec3","542788"],8:["b35806","e08214","fdb863","fee0b6","d8daeb","b2abd2","8073ac","542788"],9:["b35806","e08214","fdb863","fee0b6","f7f7f7","d8daeb","b2abd2","8073ac","542788"],10:["7f3b08","b35806","e08214","fdb863","fee0b6","d8daeb","b2abd2","8073ac","542788","2d004b"],11:["7f3b08","b35806","e08214","fdb863","fee0b6","f7f7f7","d8daeb","b2abd2","8073ac","542788","2d004b"]},BrBG:{type:"diverging",cbf:42,3:["d8b365","f5f5f5","5ab4ac"],4:["a6611a","dfc27d","80cdc1","018571"],5:["a6611a","dfc27d","f5f5f5","80cdc1","018571"],6:["8c510a","d8b365","f6e8c3","c7eae5","5ab4ac","01665e"],7:["8c510a","d8b365","f6e8c3","f5f5f5","c7eae5","5ab4ac","01665e"],8:["8c510a","bf812d","dfc27d","f6e8c3","c7eae5","80cdc1","35978f","01665e"],9:["8c510a","bf812d","dfc27d","f6e8c3","f5f5f5","c7eae5","80cdc1","35978f","01665e"],10:["543005","8c510a","bf812d","dfc27d","f6e8c3","c7eae5","80cdc1","35978f","01665e","003c30"],11:["543005","8c510a","bf812d","dfc27d","f6e8c3","f5f5f5","c7eae5","80cdc1","35978f","01665e","003c30"]},PRGn:{type:"diverging",cbf:42,3:["af8dc3","f7f7f7","7fbf7b"],4:["7b3294","c2a5cf","a6dba0","008837"],5:["7b3294","c2a5cf","f7f7f7","a6dba0","008837"],6:["762a83","af8dc3","e7d4e8","d9f0d3","7fbf7b","1b7837"],7:["762a83","af8dc3","e7d4e8","f7f7f7","d9f0d3","7fbf7b","1b7837"],8:["762a83","9970ab","c2a5cf","e7d4e8","d9f0d3","a6dba0","5aae61","1b7837"],9:["762a83","9970ab","c2a5cf","e7d4e8","f7f7f7","d9f0d3","a6dba0","5aae61","1b7837"],10:["40004b","762a83","9970ab","c2a5cf","e7d4e8","d9f0d3","a6dba0","5aae61","1b7837","00441b"],11:["40004b","762a83","9970ab","c2a5cf","e7d4e8","f7f7f7","d9f0d3","a6dba0","5aae61","1b7837","00441b"]},PiYG:{type:"diverging",cbf:42,3:["e9a3c9","f7f7f7","a1d76a"],4:["d01c8b","f1b6da","b8e186","4dac26"],5:["d01c8b","f1b6da","f7f7f7","b8e186","4dac26"],6:["c51b7d","e9a3c9","fde0ef","e6f5d0","a1d76a","4d9221"],7:["c51b7d","e9a3c9","fde0ef","f7f7f7","e6f5d0","a1d76a","4d9221"],8:["c51b7d","de77ae","f1b6da","fde0ef","e6f5d0","b8e186","7fbc41","4d9221"],9:["c51b7d","de77ae","f1b6da","fde0ef","f7f7f7","e6f5d0","b8e186","7fbc41","4d9221"],10:["8e0152","c51b7d","de77ae","f1b6da","fde0ef","e6f5d0","b8e186","7fbc41","4d9221","276419"],11:["8e0152","c51b7d","de77ae","f1b6da","fde0ef","f7f7f7","e6f5d0","b8e186","7fbc41","4d9221","276419"]},RdBu:{type:"diverging",cbf:42,3:["ef8a62","f7f7f7","67a9cf"],4:["ca0020","f4a582","92c5de","0571b0"],5:["ca0020","f4a582","f7f7f7","92c5de","0571b0"],6:["b2182b","ef8a62","fddbc7","d1e5f0","67a9cf","2166ac"],7:["b2182b","ef8a62","fddbc7","f7f7f7","d1e5f0","67a9cf","2166ac"],8:["b2182b","d6604d","f4a582","fddbc7","d1e5f0","92c5de","4393c3","2166ac"],9:["b2182b","d6604d","f4a582","fddbc7","f7f7f7","d1e5f0","92c5de","4393c3","2166ac"],10:["67001f","b2182b","d6604d","f4a582","fddbc7","d1e5f0","92c5de","4393c3","2166ac","053061"],11:["67001f","b2182b","d6604d","f4a582","fddbc7","f7f7f7","d1e5f0","92c5de","4393c3","2166ac","053061"]},RdGy:{type:"diverging",cbf:42,3:["ef8a62","ffffff","999999"],4:["ca0020","f4a582","bababa","404040"],5:["ca0020","f4a582","ffffff","bababa","404040"],6:["b2182b","ef8a62","fddbc7","e0e0e0","999999","4d4d4d"],7:["b2182b","ef8a62","fddbc7","ffffff","e0e0e0","999999","4d4d4d"],8:["b2182b","d6604d","f4a582","fddbc7","e0e0e0","bababa","878787","4d4d4d"],9:["b2182b","d6604d","f4a582","fddbc7","ffffff","e0e0e0","bababa","878787","4d4d4d"],10:["67001f","b2182b","d6604d","f4a582","fddbc7","e0e0e0","bababa","878787","4d4d4d","1a1a1a"],11:["67001f","b2182b","d6604d","f4a582","fddbc7","ffffff","e0e0e0","bababa","878787","4d4d4d","1a1a1a"]},RdYlBu:{type:"diverging",cbf:42,3:["fc8d59","ffffbf","91bfdb"],4:["d7191c","fdae61","abd9e9","2c7bb6"],5:["d7191c","fdae61","ffffbf","abd9e9","2c7bb6"],6:["d73027","fc8d59","fee090","e0f3f8","91bfdb","4575b4"],7:["d73027","fc8d59","fee090","ffffbf","e0f3f8","91bfdb","4575b4"],8:["d73027","f46d43","fdae61","fee090","e0f3f8","abd9e9","74add1","4575b4"],9:["d73027","f46d43","fdae61","fee090","ffffbf","e0f3f8","abd9e9","74add1","4575b4"],10:["a50026","d73027","f46d43","fdae61","fee090","e0f3f8","abd9e9","74add1","4575b4","313695"],11:["a50026","d73027","f46d43","fdae61","fee090","ffffbf","e0f3f8","abd9e9","74add1","4575b4","313695"]},Spectral:{type:"diverging",cbf:0,3:["fc8d59","ffffbf","99d594"],4:["d7191c","fdae61","abdda4","2b83ba"],5:["d7191c","fdae61","ffffbf","abdda4","2b83ba"],6:["d53e4f","fc8d59","fee08b","e6f598","99d594","3288bd"],7:["d53e4f","fc8d59","fee08b","ffffbf","e6f598","99d594","3288bd"],8:["d53e4f","f46d43","fdae61","fee08b","e6f598","abdda4","66c2a5","3288bd"],9:["d53e4f","f46d43","fdae61","fee08b","ffffbf","e6f598","abdda4","66c2a5","3288bd"],10:["9e0142","d53e4f","f46d43","fdae61","fee08b","e6f598","abdda4","66c2a5","3288bd","5e4fa2"],11:["9e0142","d53e4f","f46d43","fdae61","fee08b","ffffbf","e6f598","abdda4","66c2a5","3288bd","5e4fa2"]},RdYlGn:{type:"diverging",cbf:0,3:["fc8d59","ffffbf","91cf60"],4:["d7191c","fdae61","a6d96a","1a9641"],5:["d7191c","fdae61","ffffbf","a6d96a","1a9641"],6:["d73027","fc8d59","fee08b","d9ef8b","91cf60","1a9850"],7:["d73027","fc8d59","fee08b","ffffbf","d9ef8b","91cf60","1a9850"],8:["d73027","f46d43","fdae61","fee08b","d9ef8b","a6d96a","66bd63","1a9850"],9:["d73027","f46d43","fdae61","fee08b","ffffbf","d9ef8b","a6d96a","66bd63","1a9850"],10:["a50026","d73027","f46d43","fdae61","fee08b","d9ef8b","a6d96a","66bd63","1a9850","006837"],11:["a50026","d73027","f46d43","fdae61","fee08b","ffffbf","d9ef8b","a6d96a","66bd63","1a9850","006837"]},Accent:{type:"qualitative",cbf:0,3:["7fc97f","beaed4","fdc086"],4:["7fc97f","beaed4","fdc086","ffff99"],5:["7fc97f","beaed4","fdc086","ffff99","386cb0"],6:["7fc97f","beaed4","fdc086","ffff99","386cb0","f0027f"],7:["7fc97f","beaed4","fdc086","ffff99","386cb0","f0027f","bf5b17"],8:["7fc97f","beaed4","fdc086","ffff99","386cb0","f0027f","bf5b17","666666"]},Dark2:{type:"qualitative",cbf:3,3:["1b9e77","d95f02","7570b3"],4:["1b9e77","d95f02","7570b3","e7298a"],5:["1b9e77","d95f02","7570b3","e7298a","66a61e"],6:["1b9e77","d95f02","7570b3","e7298a","66a61e","e6ab02"],7:["1b9e77","d95f02","7570b3","e7298a","66a61e","e6ab02","a6761d"],8:["1b9e77","d95f02","7570b3","e7298a","66a61e","e6ab02","a6761d","666666"]},Paired:{type:"qualitative",cbf:4,3:["a6cee3","1f78b4","b2df8a"],4:["a6cee3","1f78b4","b2df8a","33a02c"],5:["a6cee3","1f78b4","b2df8a","33a02c","fb9a99"],6:["a6cee3","1f78b4","b2df8a","33a02c","fb9a99","e31a1c"],7:["a6cee3","1f78b4","b2df8a","33a02c","fb9a99","e31a1c","fdbf6f"],8:["a6cee3","1f78b4","b2df8a","33a02c","fb9a99","e31a1c","fdbf6f","ff7f00"],9:["a6cee3","1f78b4","b2df8a","33a02c","fb9a99","e31a1c","fdbf6f","ff7f00","cab2d6"],10:["a6cee3","1f78b4","b2df8a","33a02c","fb9a99","e31a1c","fdbf6f","ff7f00","cab2d6","6a3d9a"],11:["a6cee3","1f78b4","b2df8a","33a02c","fb9a99","e31a1c","fdbf6f","ff7f00","cab2d6","6a3d9a","ffff99"],12:["a6cee3","1f78b4","b2df8a","33a02c","fb9a99","e31a1c","fdbf6f","ff7f00","cab2d6","6a3d9a","ffff99","b15928"]},Pastel1:{type:"qualitative",cbf:0,3:["fbb4ae","b3cde3","ccebc5"],4:["fbb4ae","b3cde3","ccebc5","decbe4"],5:["fbb4ae","b3cde3","ccebc5","decbe4","fed9a6"],6:["fbb4ae","b3cde3","ccebc5","decbe4","fed9a6","ffffcc"],7:["fbb4ae","b3cde3","ccebc5","decbe4","fed9a6","ffffcc","e5d8bd"],8:["fbb4ae","b3cde3","ccebc5","decbe4","fed9a6","ffffcc","e5d8bd","fddaec"],9:["fbb4ae","b3cde3","ccebc5","decbe4","fed9a6","ffffcc","e5d8bd","fddaec","f2f2f2"]},Pastel2:{type:"qualitative",cbf:0,3:["b3e2cd","fdcdac","cbd5e8"],4:["b3e2cd","fdcdac","cbd5e8","f4cae4"],5:["b3e2cd","fdcdac","cbd5e8","f4cae4","e6f5c9"],6:["b3e2cd","fdcdac","cbd5e8","f4cae4","e6f5c9","fff2ae"],7:["b3e2cd","fdcdac","cbd5e8","f4cae4","e6f5c9","fff2ae","f1e2cc"],8:["b3e2cd","fdcdac","cbd5e8","f4cae4","e6f5c9","fff2ae","f1e2cc","cccccc"]},Set1:{type:"qualitative",cbf:0,3:["e41a1c","377eb8","4daf4a"],4:["e41a1c","377eb8","4daf4a","984ea3"],5:["e41a1c","377eb8","4daf4a","984ea3","ff7f00"],6:["e41a1c","377eb8","4daf4a","984ea3","ff7f00","ffff33"],7:["e41a1c","377eb8","4daf4a","984ea3","ff7f00","ffff33","a65628"],8:["e41a1c","377eb8","4daf4a","984ea3","ff7f00","ffff33","a65628","f781bf"],9:["e41a1c","377eb8","4daf4a","984ea3","ff7f00","ffff33","a65628","f781bf","999999"]},Set2:{type:"qualitative",cbf:3,3:["66c2a5","fc8d62","8da0cb"],4:["66c2a5","fc8d62","8da0cb","e78ac3"],5:["66c2a5","fc8d62","8da0cb","e78ac3","a6d854"],6:["66c2a5","fc8d62","8da0cb","e78ac3","a6d854","ffd92f"],7:["66c2a5","fc8d62","8da0cb","e78ac3","a6d854","ffd92f","e5c494"],8:["66c2a5","fc8d62","8da0cb","e78ac3","a6d854","ffd92f","e5c494","b3b3b3"]},Set3:{type:"qualitative",cbf:0,3:["8dd3c7","ffffb3","bebada"],4:["8dd3c7","ffffb3","bebada","fb8072"],5:["8dd3c7","ffffb3","bebada","fb8072","80b1d3"],6:["8dd3c7","ffffb3","bebada","fb8072","80b1d3","fdb462"],7:["8dd3c7","ffffb3","bebada","fb8072","80b1d3","fdb462","b3de69"],8:["8dd3c7","ffffb3","bebada","fb8072","80b1d3","fdb462","b3de69","fccde5"],9:["8dd3c7","ffffb3","bebada","fb8072","80b1d3","fdb462","b3de69","fccde5","d9d9d9"],10:["8dd3c7","ffffb3","bebada","fb8072","80b1d3","fdb462","b3de69","fccde5","d9d9d9","bc80bd"],11:["8dd3c7","ffffb3","bebada","fb8072","80b1d3","fdb462","b3de69","fccde5","d9d9d9","bc80bd","ccebc5"],12:["8dd3c7","ffffb3","bebada","fb8072","80b1d3","fdb462","b3de69","fccde5","d9d9d9","bc80bd","ccebc5","ffed6f"]}};for(var s in a){var n=a[s];n=t.Scheme.fromPalettes("cb-"+s,[n.type,"cb-"+n.type],n,12,n.cbf),t.register(n)}}(),e.exports&&(e.exports=t)}(Ur)),Ur.exports}e2();class t2 extends Pa{constructor(){super(...arguments);Se(this,"data",{dashboard:[{name:"sales_growth_chart",type:"line"}],order:[{name:"gross_sale_by_day_chart",type:""},{name:"order_completion_time_chart",type:""},{name:"item_count_distribution_chart",type:""},{name:"gross_sale_by_hour_chart",type:""},{name:"order_value_distribution_chart",type:""},{name:"avg_order_gross_chart",type:""},{name:"avg_order_items_chart",type:""},{name:"order_chart",type:""}],revenue:[{name:"revenue_chart",type:"line"}],refund:[{name:"refund_chart",type:"line"}],subscription:[{name:"subscription_chart",type:"line"},{name:"retention_chart",type:"line"},{name:"daily_signups_chart",type:"line"}],product:[{name:"product_chart",type:"bar"}]});Se(this,"storageKey","chart-type");Se(this,"listeners",{})}beforeInit(){this.mergeWithStorage()}mergeWithStorage(){const a=pt.get(this.storageKey);this.data.dashboard=a.dashboard??this.data.dashboard,this.data.order=a.order??this.data.order,this.data.revenue=a.revenue??this.data.revenue,this.data.refund=a.refund??this.data.refund,this.data.subscription=a.subscription??this.data.subscription}addListener(a,s){this.listeners[a]=s}async onChange(a,s,n){const A=this.data[a].findIndex(c=>c.name===s);A!==-1?this.data[a][A].type=n:this.data[a].push({name:s,type:n}),this.syncStorage();for(let c in this.listeners)this.listeners[c](this.applicableFilters)}getChartType(a,s){const l=this.data[a].find(A=>A.name===s);return l?l.type:null}syncStorage(){pt.set(this.storageKey,this.applicableFilters.chartType)}removeListener(a){delete this.listeners[a]}get applicableFilters(){return{chartType:{dashboard:this.data.dashboard,order:this.data.order,revenue:this.data.revenue,refund:this.data.refund,subscription:this.data.subscription}}}}const zt=t2.init();function Kn(e){const t=Me(e[0]).format("MMMM D, YYYY"),a=Me(e[1]).format("MMMM D, YYYY");return t===a?`on ${t}.`:`between ${t} and ${a}.`}function Nn(e){const t=e.split("-");if(t.length===3){const[a,s,n]=t;return`${wa[parseInt(s)-1]} ${n}`}else if(t.length===2){const[a,s]=t;return`${wa[parseInt(s)-1]} ${a}`}else if(t.length===1){const[a]=t;return`${a}`}}function ks(e){return e.map(t=>Nn(t.group))}const va=ke.colors.report,a2={[va.light_gray]:va.cyan_blue,[va.light_gray_cyan_blue]:va.cyan_blue_dark,[va.blue]:va.royal_blue,[va.royal_blue]:va.dark_blue,[va.medium_slate_blue]:va.dark_purple,[va.dark_cyan_blue_16]:va.dark_cyan_blue_40,[va.dark_cyan_blue_24]:va.dark_cyan_blue_40,[va.blue]:va.blue_dark_mode,[va.purple]:va.purple_dark_mode};function $a(e){return a2[e]}function Ya(e){const t=e<=31?6:7,a=Math.floor(e/t);return{splitNumber:t,interval:a}}const s2={class:"fct-gross-sale-vs-net-revenue-wrap"},n2={class:"fct-btn-group sm"},o2={__name:"SalesGrowthChart",props:{chartData:{type:Array,required:!0},reportFilter:{type:Object},loading:{type:Boolean,default:!0}},emits:["fetch-chart-data"],setup(e,{emit:t}){const a=e,s=M(null),n=M(null);M("daily");const l=M(zt.getChartType("order","sales_growth_chart")||"line"),A=ke.colors.report,c=M(ke.isDark()),p=z(()=>a.chartData.every(S=>S.orders===0)),m=z(()=>c.value?A.dark_cyan_blue_16:A.light_gray),g=z(()=>c.value?A.dark_cyan_blue_36:A.light_gray_cyan_blue),y=z(()=>[{title:u("Orders"),key:"orders",color:m.value,yAxisIndex:1},{title:u("Revenue"),key:"net_revenue",color:g.value,yAxisIndex:0}].map(({title:S,key:E,color:Q,yAxisIndex:D})=>U(S,l.value,a.chartData.map(L=>L[E]),Q,D)));wa.map(S=>S.slice(0,3));const v=z(()=>ks(a.chartData));let C=null;const b=()=>{C&&(C.dispose(),C=null),be(()=>{s.value&&(C=Ut(s.value),k())})},B=z(()=>Ya(a.chartData.length)),k=()=>{if(!C)return;c.value=ke.isDark();const S={title:{text:a.chartTitle??"",left:"center"},legend:{show:!0,top:"5%",icon:"circle",itemWidth:8,itemHeight:8,itemGap:30,textStyle:{color:c.value?"#ffffff":"#000000"}},tooltip:{trigger:"axis",backgroundColor:c.value?"#253241":"#ffffff",borderColor:c.value?"#2C3C4E":"#c0c4ca",borderWidth:1,textStyle:{color:c.value?"#ffffff":"#565865"},axisPointer:{type:"line",lineStyle:{type:"solid",width:2,color:c.value?A.dark_cyan_blue_16:A.light_gray_blue}},formatter:E=>{let Q=E[0].name;return E.forEach(D=>{const L=D.seriesIndex===1?`${Le.scaled(D.value)}`:D.value,I=c.value?"#ffffff":"#565865";Q+=`
${D.marker} ${D.seriesName} ${L}
`}),Q}},xAxis:{type:"category",data:v.value,axisLabel:{color:c.value?"#ffffff":"#696778",fontSize:12,interval:B.value.interval},axisLine:{lineStyle:{type:"dashed",color:c.value?"#253241":"#D6DAE1"}}},yAxis:[{name:u("Revenue"),type:"value",position:"left",axisLabel:{color:c.value?"#ffffff":"#696778",fontSize:12,formatter:E=>`${Le.scaledChart(E)}`},splitLine:{show:!0,lineStyle:{color:c.value?"#253241":"#D6DAE1",type:"dashed"}}},{name:u("Orders"),type:"value",position:"right",axisLabel:{color:c.value?"#ffffff":"#696778",fontSize:12},splitLine:{show:!1,lineStyle:{color:c.value?"#253241":"#D6DAE1",type:"dashed"}}}],series:y.value};C.setOption(S,{notMerge:!0,replaceMerge:["series"]})},U=(S,E,Q,D,L)=>({name:S,type:E,barMaxWidth:30,data:Q,smooth:!1,color:D,lineStyle:{width:3},areaStyle:{opacity:.3,color:D},symbol:"circle",showSymbol:!0,symbolSize:8,itemStyle:{color:D,borderRadius:[4,4,0,0]},yAxisIndex:L,emphasis:{scale:2,itemStyle:{color:$a(D)},lineStyle:{color:D},areaStyle:{opacity:.3,color:D}},animation:!0,animationEasing:"cubicOut",animationDuration:800,animationDelay:0,barGap:"-100%",legendHoverLink:!1}),T=S=>{l.value!==S&&(l.value=S,zt.onChange("order","sales_growth_chart",S),k())};return Ce([()=>a.chartData,l],()=>{be(k)},{deep:!0}),Ce(p,S=>{S||b()}),Ce(()=>a.loading,S=>{S||b()}),it(()=>{window.removeEventListener("onFluentCartThemeChange",k,!1)}),Be(()=>{window.addEventListener("onFluentCartThemeChange",k),be(b)}),(S,E)=>{const Q=w("el-skeleton");return d(),h("div",s2,[o(he,{id:"chartContainer",ref_key:"cardRef",ref:n},{default:r(()=>[o(we,{title:S.$t("Sales Growth"),border_bottom:""},Qt({_:2},[!p.value&&!e.loading?{name:"action",fn:r(()=>[i("div",n2,[o(Ms,{activeType:l.value,types:{bar:"BarChart",line:"LineChart"},onChange:T},null,8,["activeType"]),o(oa,{targetRef:s.value},null,8,["targetRef"])])]),key:"0"}:void 0]),1032,["title"]),o(me,{class:"p-0"},{default:r(()=>[e.loading?(d(),F(Q,{key:0,animated:"",rows:5,class:"p-4"})):(d(),h(H,{key:1},[p.value?(d(),F(Xe,{key:1,icon:"Empty/ListView","has-dark":!0,text:f(u)("Currently there is no data!"),class:"fct-report-empty-state"},null,8,["text"])):(d(),h("div",{key:0,class:"fct-chart-wrap fct-gross-sale-vs-net-revenue-chart",ref_key:"chartRef",ref:s},null,512))],64))]),_:1})]),_:1},512)])}}},l2={class:"fct-gross-sale-vs-net-revenue-wrap"},i2={class:"fct-btn-group sm"},r2={key:0,class:"fct-world-map-action-btns absolute top-5 right-5 flex flex-col gap-1 z-10"},d2={key:1,class:"fct-world-map-action-btns absolute top-[10px] right-[40px] flex flex-col gap-1 z-10"},qc=.5,$r=6,Vl=1.2,A2={__name:"HeatMap",props:{data:{type:Array,required:!0}},setup(e){const t=e,a=ke.colors,s=M(null),n=M(null),l=M(!1),A=M("world"),c=M(92),p=M(100);M(!1);let m=null,g=null,y=50;const v=M(1.2),C=M(),b=a.blue,B=z(()=>{const G=p.value-c.value,J=t.data?t.data.length:0;return G<60||J<15}),k=G=>{G=G.replace(/^#/,"");const J=parseInt(G.substring(0,2),16),X=parseInt(G.substring(2,4),16),ne=parseInt(G.substring(4,6),16);return[J,X,ne]},U=()=>ke.isDark()?a.gray[50]:a.gray[600],T=k(b[500]),S=async()=>{const G=Vn.getUrl("world.geo.json"),X=await(await fetch(G)).json();Fh("world",X)},E=G=>{if(!G||isNaN(G))return`rgba(${T.join(",")}, 0)`;const J=Math.log(G+1)/Math.log(y+1);return`rgba(${T.join(",")}, ${J})`},Q=G=>{A.value=G,N(),m&&(m.clear(),m.setOption(P()),G==="bar"&&D()),g&&l.value&&(g.clear(),g.setOption(P()),G==="bar"&&L())},D=()=>{m&&(m.off("dataZoom"),m.on("dataZoom",function(G){G.batch&&G.batch[0]?(c.value=G.batch[0].start||0,p.value=G.batch[0].end||100):(c.value=G.start||0,p.value=G.end||100),setTimeout(()=>{N()},100)}))},L=()=>{g&&(g.off("dataZoom"),g.on("dataZoom",function(G){G.batch&&G.batch[0]?(c.value=G.batch[0].start||0,p.value=G.batch[0].end||100):(c.value=G.start||0,p.value=G.end||100),setTimeout(()=>{g&&g.setOption(P())},100)}))},I=z(()=>(t.data||[]).map(G=>({...G,value:G.value||0,itemStyle:{color:E(G.value||0)},emphasis:{itemStyle:{shadowBlur:10,shadowColor:"rgba(0, 0, 0, 0.5)"}}}))),$=()=>({backgroundColor:ke.isDark()?a.dark[700]:a.gray[25],tooltip:{trigger:"item",formatter:G=>u("%1$s%2$s Orders: %3$s",G.name,"
",G.value||0),borderRadius:8,backgroundColor:ke.isDark()?"#38485a":"#ffffff",borderColor:ke.isDark()?"#4a5a6b":"#c0c4ca",borderWidth:1,textStyle:{color:ke.isDark()?"#ffffff":"#565865"}},visualMap:{min:0,max:y,left:l.value?"5%":"center",bottom:l.value?"center":"4%",text:[u("High"),u("Low")],orient:l.value?"vertical":"horizontal",calculable:!0,inRange:{color:[b[100],b[500]]},textStyle:{color:a.gray[800]}},series:[{name:"Orders",type:"map",map:"world",roam:C.value,zoom:v.value,label:{show:!1,emphasis:{show:!0,color:a.gray[1e3],fontWeight:"bold",textShadowColor:a.gray[50],textShadowBlur:3,textShadowOffsetX:0,textShadowOffsetY:0}},emphasis:{itemStyle:{areaColor:b[300],shadowBlur:10,shadowColor:a.gray[400]}},itemStyle:{borderColor:a.gray[200],borderWidth:.5},data:I.value}]}),V=z(()=>{const G=t.data.length,J=p.value-c.value,X=Math.ceil(G*J/100);let ne=0;return X>100?ne=9:X>50?ne=4:X>30?ne=2:X>20&&(ne=1),ne}),R=()=>{const G=B.value;return{backgroundColor:ke.isDark()?a.dark[700]:a.gray[25],tooltip:{trigger:"axis",axisPointer:{type:"shadow"},formatter:function(J){const X=J[0];return`${X.name}
${u("Orders")}: ${X.value||0}`},backgroundColor:ke.isDark()?"#38485a":"#ffffff",textStyle:{color:ke.isDark()?a.gray[25]:a.system.mid},borderColor:ke.isDark()?"#4a5a6b":"#c0c4ca",borderWidth:1},dataZoom:[{type:"inside",yAxisIndex:0,start:c.value,end:p.value},{type:"slider",yAxisIndex:0,start:c.value,end:p.value,width:25,top:10,right:10,textStyle:{color:U()},brushSelect:!1,showDetail:!1,disabled:!0}],grid:{left:G?"10px":"0%",right:"15%",top:"10%",bottom:"15%",containLabel:!0},yAxis:{type:"category",axisTick:{show:G},splitLine:{show:!1},axisLine:{show:G,lineStyle:{color:U()}},axisLabel:{show:G,interval:V.value,color:U(),fontSize:11},data:t.data.map(J=>J.name)},xAxis:{type:"value",axisLabel:{show:!0,color:U(),formatter:function(J){return J.toLocaleString()}},splitLine:{show:!0,lineStyle:{color:ke.isDark()?a.gray[600]:a.gray[200]}}},series:[{type:"bar",large:!0,itemStyle:{color:new Zr(0,0,1,0,[{offset:0,color:b[400]},{offset:1,color:b[600]}]),borderRadius:[0,4,4,0]},emphasis:{itemStyle:{color:new Zr(0,0,1,0,[{offset:0,color:b[500]},{offset:1,color:b[700]}])}},data:t.data.map(J=>J.value),label:{show:G,formatter:"{c}",position:"right",color:U(),fontSize:10}}]}},P=()=>A.value==="bar"?R():$(),W=async()=>{await S(),s.value&&(m=Ut(s.value),m.setOption(P()),A.value==="bar"&&D(),m.on("georoam",()=>{const J=m.getOption().series[0].zoom;if(J!==v.value)if(J$r){const X=Math.max(Vl,Math.min($r,J));m.setOption({series:[{zoom:X}]},!1),v.value=X}else v.value=J}))},N=()=>{t.data&&t.data.length>0?y=Math.max(...t.data.map(G=>G.value||0)):y=1,m&&m.setOption(P(),{notMerge:!0})},te=()=>{v.value=Math.min(v.value+qc,$r),C.value=!0,m.setOption({series:[{zoom:v.value,roam:C.value}]})},ae=()=>{v.value=Math.max(v.value-qc,Vl),C.value=!0,m.setOption({series:[{zoom:v.value,roam:C.value}]})},q=()=>{A.value==="bar"?(c.value=92,p.value=100,m&&m.dispatchAction({type:"dataZoom",start:92,end:100})):(v.value=Vl,C.value="move",m&&(m.clear(),m.setOption(P())))},re=async()=>{l.value=!0,await be(),g?g.clear():g=Ut(n.value),g.setOption(P()),A.value==="bar"&&L()},K=G=>{U(),m&&m.setOption(P())};return Be(()=>{window.addEventListener("onFluentCartThemeChange",K),C.value="move",be(W)}),it(()=>{window.removeEventListener("onFluentCartThemeChange",K),m&&(m.dispose(),m=null),g&&(g.dispose(),g=null)}),Ce(()=>t.data,()=>N(),{deep:!0}),Ce(B,()=>{A.value==="bar"&&be(()=>{N()})}),(G,J)=>(d(),h("div",l2,[o(he,{id:"chartContainer"},{default:r(()=>[o(we,{title:G.$t("Order Heat Map"),border_bottom:""},{action:r(()=>[i("div",i2,[o(Ms,{activeType:A.value,types:{world:"Globe",bar:"BarChart"},onChange:Q},null,8,["activeType"]),o(oa,{targetRef:s.value,size:"small"},null,8,["targetRef"])])]),_:1},8,["title"]),o(me,{class:"p-0 pt-0 relative"},{default:r(()=>[A.value==="world"?(d(),h("div",r2,[o(Ee,{tag:"button",size:"small",onClick:te},{default:r(()=>[o(j,{name:"Plus"})]),_:1}),o(Ee,{tag:"button",size:"small",onClick:ae},{default:r(()=>[o(j,{name:"Minus"})]),_:1}),o(Ee,{tag:"button",size:"small",onClick:q},{default:r(()=>[o(j,{name:"Reload"})]),_:1}),o(Ee,{tag:"button",size:"small lg:hidden",onClick:re},{default:r(()=>[o(j,{name:"Eye"})]),_:1})])):x("",!0),A.value==="bar"?(d(),h("div",d2,[o(Ee,{tag:"button",size:"small",onClick:q},{default:r(()=>[o(j,{name:"Reload"})]),_:1})])):x("",!0),i("div",{class:"fct-chart-wrap rounded-[0px] bg-transparent",ref_key:"chartRef",ref:s},null,512)]),_:1})]),_:1}),o(f(Dh),{modelValue:l.value,"onUpdate:modelValue":J[0]||(J[0]=X=>l.value=X),title:G.$t("Order Heat Map"),class:"country-heat-map-dialog"},{default:r(()=>[i("div",{class:"fct-chart-wrap",ref_key:"modalChartRef",ref:n},null,512)]),_:1},8,["modelValue","title"])]))}},c2=Ue(A2,[["__scopeId","data-v-342ab7be"]]),u2={class:"fct-report-card"},p2={key:0,class:"fct-report-card-header"},f2={key:0,class:"flex items-center gap-2"},m2={class:"title"},h2={class:"actions"},_2={class:"fct-report-card-body flex h-full"},g2={class:"w-full"},ll={__name:"ReportCard",props:{cardOptions:{type:Object,default:()=>({heading:"",linkButtonText:"",linkButtonUrl:"",headingIcon:{type:Boolean,default:!1}})}},setup(e){return(t,a)=>{const s=w("router-link");return d(),h("div",u2,[e.cardOptions.heading||e.cardOptions.linkButtonText?(d(),h("div",p2,[e.cardOptions.heading?(d(),h("div",f2,[e.cardOptions.headingIcon?(d(),F(Ee,{key:0,size:"x-small",bg:"danger",soft:""},{default:r(()=>[o(j,{name:"FailedCircle"})]),_:1})):x("",!0),i("h4",m2,_(e.cardOptions.heading),1)])):x("",!0),i("div",h2,[e.cardOptions.linkButtonText?(d(),F(s,{key:0,to:`/${e.cardOptions.linkButtonUrl}`,class:"link"},{default:r(()=>[O(_(t.$t(e.cardOptions.linkButtonText)),1)]),_:1},8,["to"])):x("",!0),Jt(t.$slots,"action")])])):x("",!0),i("div",_2,[i("div",g2,[Jt(t.$slots,"default")])])])}}},v2={key:0,class:"fct-report-sold-product-list has-scroll"},y2={class:"list-left-content"},b2={class:"list-title"},w2={class:"list-title-inner"},C2={class:"list-id"},B2={class:"list-right-content"},k2=["innerHTML"],x2={class:"list-price"},S2={__name:"RecentOrders",setup(e){const t=Sa.data;return(a,s)=>{const n=w("router-link");return d(),F(ll,{class:"top-sold-products","card-options":{heading:f(u)("Recent Orders"),linkButtonText:f(u)("View All"),linkButtonUrl:"orders"}},{default:r(()=>{var l,A;return[((A=(l=f(t))==null?void 0:l.recentOrders)==null?void 0:A.length)>0?(d(),h("ul",v2,[(d(!0),h(H,null,Z(f(t).recentOrders,c=>(d(),h("li",{key:c.id},[o(n,{class:"no-underline",to:{name:"view_order",params:{order_id:c.id}}},{default:r(()=>[i("div",y2,[i("div",b2,[i("div",w2,_(c.customer_name)+" #"+_(f(Dt)(c.id)),1),i("div",C2,[o(Ca,{"date-time":c.created_at},null,8,["date-time"])])])]),i("div",B2,[i("div",{class:"list-value",innerHTML:f(Le).scaled(c.total_amount)},null,8,k2),i("div",x2,_(f(Dt)(c.order_items_count))+" "+_(f(u)("Items")),1)])]),_:2},1032,["to"])]))),128))])):(d(),F(Xe,{key:1,icon:"Empty/ListView","has-dark":!0,text:f(u)("Currently there is no item!")},null,8,["text"]))]}),_:1},8,["card-options"])}}},F2={key:0},E2={key:1,class:"fc_dashboard_onboarding_wrap"},U2={class:"fc_dashboard_onboarding_title"},$2={class:"fc_dashboard_onboarding_lists"},D2=["href"],Q2={class:"circle-shape"},I2={class:"fc_dashboard_onboarding_item__title"},T2={__name:"Onboarding",setup(e){const t=M(0),a=M(!1);vt().ctx;const s=M([]),n=M(!0);M(localStorage.getItem("started_content_collapse")==="true"||!1),z(()=>{const A=Object.keys(s.value).length;return A?Math.round(t.value/A*100):0});const l=Di("dashboardTogglePageNotification");return Be(async()=>{a.value=!0,ie.get("dashboard").then(A=>{var p;s.value=A.data.steps,t.value=A.data.completed,n.value=Object.keys(s.value).length!==t.value,a.value=!1;let c=((p=s.value.page_setup)==null?void 0:p.completed)||!1;l&&l(!c)}).catch(A=>{a.value=!1})}),(A,c)=>{const p=w("el-skeleton"),m=w("Check"),g=w("el-icon");return n.value?(d(),h("div",F2,[a.value?(d(),F(p,{key:0,rows:3,animated:""})):(d(),h("div",E2,[i("h3",U2,_(A.$t("Onboarding Checklist")),1),i("div",$2,[(d(!0),h(H,null,Z(s.value,(y,v)=>(d(),h("a",{key:v,href:y.url,class:le([y.completed===!0?"active":"","fc_dashboard_onboarding_item"])},[i("span",Q2,[y.completed===!0?(d(),F(g,{key:0},{default:r(()=>[o(m)]),_:1})):x("",!0)]),i("div",I2,_(y.title),1)],10,D2))),128))])]))])):x("",!0)}}},V2={class:"fct-dashboard-recent-activities-wrap"},M2={class:"fct-dashboard-recent-activities__header"},L2={class:"fct-dashboard-recent-activities__header_title"},O2={class:"fct-dashboard-recent-activities__header_desc"},R2={key:0,class:"fct-dashboard-recent-activities__body"},H2={key:0,class:"fct-dashboard-recent-activities__item has-icon"},P2={class:"content"},K2={class:"title"},N2=["onClick"],G2={class:"date"},z2=["innerHTML"],j2={class:"created_by"},Y2={key:1,class:"fct-dashboard-recent-activities__empty"},q2={class:"fct-dashboard-recent-activities__empty_text"},W2={__name:"RecentActivity",props:{activities:{type:Array,default:()=>[]},showManageActivity:{type:Boolean,default:!1}},emits:["reload"],setup(e,{emit:t}){const a=Oa(),s=M([{label:u("All"),value:"all"},{label:u("Today"),value:"today"},{label:u("Yesterday"),value:"yesterday"},{label:u("This Week"),value:"this_week"}]),n=M("all"),l=()=>{switch(n.value){case"all":return u("all");case"today":return u("today");case"yesterday":return u("yesterday");case"this_week":return u("this week");default:return n.value}},A=()=>{l(),Sa.getRecentActivities({groupKey:n.value})},c={Order:"orders/view",Payment:"orders/view",Product:"products/view",Customer:"customers/view",Coupon:"coupons/view"},p=g=>{var b;const y={order:{name:"view_order",param:"order_id",permission:"orders/view"},payment:{name:"view_order",param:"order_id",permission:"orders/view"},product:{name:"view_product",param:"product_id",permission:"products/view"},customer:{name:"view_customer",param:"customer_id",permission:"customers/view"},coupon:{name:"view_coupon",param:"coupon_id",permission:"coupons/view"}};let v=(b=g==null?void 0:g.module_name)==null?void 0:b.toLowerCase();const C=y[v];C&&g.module_id&&m(g)?a.push({name:C.name,params:{[C.param]:g.module_id}}):console.warn("Invalid activity or module not supported:",g)},m=g=>{if(!g.module_name)return!0;const y=Pe.get(c,Mt.capitalize(g.module_name));return y?Wo.has(y):!1};return Be(()=>{A()}),(g,y)=>{const v=w("el-radio-button"),C=w("el-radio-group");return d(),h("div",V2,[i("div",M2,[i("h4",L2,_(f(u)("Recent Activities")),1),i("p",O2,[n.value==="all"?(d(),h(H,{key:0},[O(_(f(u)("%s new activities",f(Dt)(f(Sa).data.recentActivities.length))),1)],64)):(d(),h(H,{key:1},[O(_(f(u)("%1$s new activities %2$s",f(Dt)(f(Sa).data.recentActivities.length),l())),1)],64))]),o(C,{class:"fct-dashboard-recent-activities__header_filter",modelValue:n.value,"onUpdate:modelValue":y[0]||(y[0]=b=>n.value=b),onChange:A,size:"large"},{default:r(()=>[(d(!0),h(H,null,Z(s.value,(b,B)=>(d(),F(v,{key:B,label:b.label,value:b.value},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])]),f(Sa).data.recentActivities.length?(d(),h("div",R2,[(d(!0),h(H,null,Z(f(Sa).data.recentActivities,(b,B)=>(d(),h(H,{key:B},[m(b)?(d(),h("div",H2,[y[1]||(y[1]=i("span",{class:"icon"},[i("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[i("path",{d:"M12.8499 9.92029L13.5711 10.3529C13.6156 10.3795 13.6524 10.4172 13.678 10.4623C13.7036 10.5075 13.717 10.5584 13.717 10.6103C13.717 10.6621 13.7036 10.7131 13.678 10.7582C13.6524 10.8033 13.6156 10.841 13.5711 10.8677L8.30911 14.0249C8.21579 14.081 8.10897 14.1106 8.00011 14.1106C7.89124 14.1106 7.78443 14.081 7.69111 14.0249L2.42911 10.8677C2.38462 10.841 2.34779 10.8033 2.32222 10.7582C2.29664 10.7131 2.2832 10.6621 2.2832 10.6103C2.2832 10.5584 2.29664 10.5075 2.32222 10.4623C2.34779 10.4172 2.38462 10.3795 2.42911 10.3529L3.15031 9.92029L8.00011 12.8303L12.8499 9.92029ZM12.8499 7.10029L13.5711 7.53289C13.6156 7.55952 13.6524 7.59723 13.678 7.64235C13.7036 7.68746 13.717 7.73843 13.717 7.79029C13.717 7.84214 13.7036 7.89311 13.678 7.93822C13.6524 7.98334 13.6156 8.02105 13.5711 8.04769L8.00011 11.3903L2.42911 8.04769C2.38462 8.02105 2.34779 7.98334 2.32222 7.93822C2.29664 7.89311 2.2832 7.84214 2.2832 7.79029C2.2832 7.73843 2.29664 7.68746 2.32222 7.64235C2.34779 7.59723 2.38462 7.55952 2.42911 7.53289L3.15031 7.10029L8.00011 10.0103L12.8499 7.10029ZM8.30851 1.58569L13.5711 4.74289C13.6156 4.76952 13.6524 4.80724 13.678 4.85235C13.7036 4.89746 13.717 4.94843 13.717 5.00029C13.717 5.05214 13.7036 5.10311 13.678 5.14822C13.6524 5.19334 13.6156 5.23105 13.5711 5.25769L8.00011 8.60029L2.42911 5.25769C2.38462 5.23105 2.34779 5.19334 2.32222 5.14822C2.29664 5.10311 2.2832 5.05214 2.2832 5.00029C2.2832 4.94843 2.29664 4.89746 2.32222 4.85235C2.34779 4.80724 2.38462 4.76952 2.42911 4.74289L7.69111 1.58569C7.78443 1.52962 7.89124 1.5 8.00011 1.5C8.10897 1.5 8.21579 1.52962 8.30911 1.58569H8.30851ZM8.00011 2.79949L4.33231 5.00029L8.00011 7.20109L11.6679 5.00029L8.00011 2.79949Z",fill:"#335CFF"})])],-1)),i("div",P2,[i("h3",K2,[b.module_name!==""?(d(),h("span",{key:0,onClick:k=>p(b),class:"cursor-pointer"},_(b.title||"--"),9,N2)):(d(),h(H,{key:1},[O(_(b.title),1)],64)),i("span",G2,[o(Ca,{"date-time":b.created_at},null,8,["date-time"])])]),i("p",{innerHTML:b.content,class:"description"},null,8,z2),i("span",j2,_(f(u)("By %s",b.created_by)),1)])])):x("",!0)],64))),128))])):(d(),h("div",Y2,[i("div",q2,_(f(u)("No activity found.")),1)]))])}}},X2={class:"fc_dashboard_sidebar bg-white dark:bg-dark-700 p-5 rounded"},J2={__name:"SideBar",setup(e){return(t,a)=>(d(),h("div",X2,[o(gt,{permission:"is_super_admin"},{default:r(()=>[o(T2)]),_:1}),o(W2,{onReload:a[0]||(a[0]=()=>{})})]))}},Z2={class:"fct-product-create"},eB={class:"fct-product-step"},tB={class:"fct-product-item-selector"},aB=["onClick"],sB={class:"fct-product-item-selector-content"},nB={class:"fct-bundle-product-condition"},oB={class:"condition-text"},lB={class:"dialog-footer"},Wi={__name:"AddProductModal",props:{customModal:String},emits:["process_custom","update:createProductModal"],setup(e,{emit:t}){const a=e,s=t,n=Oa(),l=M({post_title:"",post_content:"",post_excerpt:"",post_date:new Date,post_status:"draft",detail:{fulfillment_type:"digital",variation_type:"simple",manage_stock:"0",manage_downloadable:"0",other_info:{use_pricing_table:"yes",group_pricing_by:"repeat_interval",active_editor:"wp-editor",sold_individually:"no"}}}),A=[{type:"physical",title:u("Physical Product"),icon:"Gift"},{type:"digital",title:u("Digital Product"),icon:"Code"}],c=M(!1),p=M(null),m=v=>{l.value.detail.fulfillment_type=v},g=()=>{c.value=!0,ie.post("products",{...l.value}).then(v=>{if(Y.success(v.message),a.customModal==="order_modal"){const C={id:v.data.product_variants.id,object_id:v.data.product_variants.post_id,variation_id:v.data.product_variants.id,item_name:v.data.product_variants.variation_title,item_price:v.data.product_variants.item_price,quantity:1,stock:100,object_type:v.data.product_details.fulfillment_type,item_total:v.data.product_variants.item_price,line_total:v.data.product_variants.item_price,tax_amount:0,discount_total:0};s("process_custom",C),s("update:createProductModal",!1)}else n.push({name:"product_edit",params:{product_id:v.data.ID}})}).catch(v=>{var C;v.status_code=="422"?Y.validationErrors(v):Y.error((C=v.data)==null?void 0:C.message)}).finally(()=>{c.value=!1})},y=v=>{v.stopPropagation(),v.preventDefault(),g()};return Be(()=>{be(()=>{setTimeout(()=>{var v;(v=p.value)==null||v.focus()},10)})}),(v,C)=>{const b=w("el-input"),B=w("el-form-item"),k=w("el-checkbox"),U=w("el-form"),T=w("el-button");return d(),h("div",Z2,[i("div",eB,[o(U,{"label-position":"top",model:l.value,"require-asterisk-position":"right"},{default:r(()=>[o(B,{label:l.value.detail.other_info.is_bundle_product==="yes"?f(u)("Bundle Title"):f(u)("Product Title"),required:""},{default:r(()=>[o(b,{type:"text",modelValue:l.value.post_title,"onUpdate:modelValue":C[0]||(C[0]=S=>l.value.post_title=S),placeholder:l.value.detail.other_info.is_bundle_product==="yes"?f(u)("Bundle Title"):f(u)("Product Title"),minlength:"3",maxlength:"200","show-word-limit":"",autofocus:"",ref_key:"fcProductTitle",ref:p,onKeydown:ja(y,["enter"])},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),o(B,null,{default:r(()=>[i("ul",tB,[(d(),h(H,null,Z(A,S=>i("li",{key:S.type,class:le({active:S.type===l.value.detail.fulfillment_type}),onClick:E=>m(S.type)},[i("div",sB,[o(j,{name:S.icon},null,8,["name"]),O(" "+_(S.title),1)]),C[2]||(C[2]=i("div",{class:"fct-product-item-selector-dot-wrap"},[i("span",{class:"fct-product-item-selector-dot"})],-1))],10,aB)),64))])]),_:1}),o(B,null,{default:r(()=>[i("div",nB,[o(k,{modelValue:l.value.detail.other_info.is_bundle_product,"onUpdate:modelValue":C[1]||(C[1]=S=>l.value.detail.other_info.is_bundle_product=S),"true-value":"yes","false-value":"no"},{default:r(()=>[O(_(f(u)("Add as a Bundle")),1)]),_:1},8,["modelValue"]),i("span",oB,_(f(u)("Combine multiple items into one package")),1)])]),_:1})]),_:1},8,["model"])]),i("div",lB,[o(T,{disabled:!l.value.post_title||c.value,loading:c.value,onClick:g,type:"primary"},{default:r(()=>[O(_(c.value?f(u)("Creating"):f(u)("Add Product")),1)]),_:1},8,["disabled","loading"])])])}}};class uA{constructor(t=new Date){this.date=t}getHours(){return this.date.getHours()}static greeting(){const t=new uA().getHours();if(t>=5&&t<12)return u("Good morning");if(t>=12&&t<17)return u("Good afternoon");if(t>=17&&t<21)return u("Good evening");{const a=[u("Step into the moonlight!"),u("Evening vibes!"),u("The night's still young!")];return a[Math.floor(Math.random()*a.length)]}}}const iB={class:"fct-current-user-info-wrap"},rB={class:"fct-current-user-info-content"},dB={class:"image"},AB=["src","alt"],cB={class:"content"},uB={key:0,class:"fct-current-user-info-action"},pB={__name:"CurrentUserInfo",setup(e){const t=M(!1),a=M(He.get("me")),s=()=>He.get("shop.store_name"),n=He.get("total_products_count");return(l,A)=>{const c=w("el-button"),p=w("el-dialog");return d(),h("div",iB,[i("div",rB,[i("div",dB,[i("img",{src:a.value.avatar,alt:a.value.full_name},null,8,AB)]),i("div",cB,[i("h4",null,_(f(uA).greeting())+" "+_(a.value.full_name)+" 👋🏻",1),i("p",null,_(f(u)("Welcome to %1$s",s())),1)])]),o(gt,{permission:"products/create"},{default:r(()=>[f(n)==0?(d(),h("div",uB,[o(c,{onClick:A[0]||(A[0]=m=>t.value=!0),type:"primary"},{default:r(()=>[O(_(f(u)("Add Product")),1)]),_:1})])):x("",!0)]),_:1}),o(p,{"append-to-body":!0,modelValue:t.value,"onUpdate:modelValue":A[1]||(A[1]=m=>t.value=m),onClose:A[2]||(A[2]=m=>t.value=!1),title:f(u)("Add New Product")},{default:r(()=>[o(Wi)]),_:1},8,["modelValue","title"])])}}};class fB{constructor(){Se(this,"operatorMap",{"!==":"matchNotEqual","!=":"matchNotEqual"});Se(this,"defaultMatcherMethod",null)}getMatchingMethod(t){return t==="=="||t==="==="?"matchEqual":this.operatorMap.hasOwnProperty(t)?this.operatorMap[t]:this.defaultMatcherMethod}defaultMatcher(t,a,s){}matchEqual(t,a,s){return s==="==="?t===a:t==a}matchNotEqual(t,a,s){return s==="!=="?t!==a:t!=a}matchContains(t,a,s){return a instanceof String||Array.isArray(a)?a.includes(t):typeof a=="object"?a.hasOwnProperty(t):!1}matchIn(t,a,s){return this.matchContains(t,a,s)}matchNotIn(t,a,s){return!this.matchContains(t,a,s)}}class mB{constructor(){Se(this,"modifierMap",{"+":"applyAddition","-":"applySubstruction"});Se(this,"defaultModifierMethod",null)}getModificationMethod(t){return t==="=="||t==="==="?"matchEqual":this.modifierMap.hasOwnProperty(t)?this.modifierMap[t]:this.defaultModifierMethod}applyAddition(t,a,s,n,l){return t+a}}class hB{constructor(t,a){Se(this,"value");Se(this,"operator");this.value=t,this.operator=a}setOperator(t){return this.operator=t,this}setValue(t){return this.value=t,this}static make(t,a){return new this(t,a)}build(){return{operator:this.operator,value:this.value instanceof kd?this.value.setModifiers([]).build():this.value}}}class kd{constructor(t,a){Se(this,"accessor");Se(this,"modifiers");this.accessor=t,this.modifiers=[],this.setModifiers(a)}setAccessor(t){return this.accessor=t,this}addModifier(t){return this.modifiers.push(t),this}setModifiers(t){return this.modifiers=Array.isArray(t)?t:this.modifiers,this}static make(t,a){return new this(t,a)}build(){let t=[];return Array.isArray(this.modifiers)&&this.modifiers.length>0&&(t=this.modifiers.map(a=>a instanceof hB?a.build():a)),t.length>0?{accessor:this.accessor,modifiers:t}:{accessor:this.accessor}}}class Ln{constructor(t,a,s,n,l){Se(this,"conditionType");Se(this,"conditions");Se(this,"key");Se(this,"operator");Se(this,"value");this.key=t,this.value=a,this.operator=s,this.conditions=[],this.conditionType=this.buildConditionType(n),this.setConditions(l)}static make(t,a,s,n){return new this(t,a,s,n)}setConditionType(t){return this.conditionType=this.buildConditionType(t),this}buildConditionType(t){return t==="or"||t==="|"?"or":"and"}setOperator(t){return this.operator=t,this}setKey(t){return this.key=t,this}setValue(t){return this.value=t,this}addCondition(t){return this.conditions.push(t),this}setConditions(t){return this.conditions=Array.isArray(t)||t instanceof Ln||typeof t=="function"?t:this.conditions,this}build(){if(Array.isArray(this.conditions)&&this.conditions.length>0){let s=[];return s=this.conditions.map(n=>n instanceof Ln?n.build.bind(n)():n),{condition_type:this.conditionType,conditions:s}}const t=this.key instanceof kd?this.key.build():this.key,a=this.value instanceof kd?this.value.build():this.value;return{key:t,operator:this.operator,value:a}}}class _B{constructor(t,a){Se(this,"data");Se(this,"conditions");Se(this,"stateKey");Se(this,"matcher");Se(this,"modifier");this.data=a,this.stateKey=t,this.matcher=new fB,this.modifier=new mB}match(t,a,s,n=!0){let l="",A=this.matcher.getMatchingMethod(a);return A!=null?l=A:l=Mt.camel("match"+a),l in this.matcher&&typeof this.matcher[l]=="function"?this.matcher[l](t,s,a,n):(console.error(`Method ${l} does not exist in Matcher Class`),n)}evaluate(t,a="and"){if(t instanceof Ln){const n=t.build.bind(t)();n.hasOwnProperty("conditions")?(t=n.conditions,a=n.condition_type):t=[n]}a=a==="or"?"or":"and";let s=a==="and";if(typeof t=="function")return t(this.stateKey,this.data);if(!Array.isArray(t))return!0;for(let n of t){let l=null;if(Array.isArray(Pe.get(n,"conditions")))l=this.evaluate(n.conditions,Pe.get(n,"condition_type","and"));else{if(n.key===null||n.key===void 0){s=!0;continue}l=this.applyCondition(n)}s=a==="and"?s&&l:s||l}return s}applyCondition(t){let a="",s=null;typeof t.key=="object"?a=Pe.resolvePath(this.stateKey,Pe.get(t,"key.accessor")):a=Pe.resolvePath(this.stateKey,t.key);let n=Pe.get(this.data,a);if(typeof t.value=="object"){const l=Pe.resolvePath(this.stateKey,Pe.get(t,"value.accessor"));s=Pe.get(this.data,l)}else s=t.value;return n=this.applyModification(n,t.key.modifiers,this.stateKey),s=this.applyModification(s,t.value.modifiers,this.stateKey),this.match(n,t.operator,s)}applyModification(t,a,s){return Array.isArray(a)&&a.forEach(n=>{let l=n.operator,A="",c=this.modifier.getModificationMethod(l);if(c!=null?A=c:A=Mt.camel("apply"+l),A in this.modifier&&typeof this.modifier[A]=="function"){let p=n.value;typeof p=="object"&&p!==null&&(p=Pe.getByPath(this.data,s,Pe.get(p,"accessor"))),t=this.modifier[A](t,p,l,s,this.data)}else console.error(`Method ${A} does not exist in Modifier Class`)}),t}}class yf{constructor(){Se(this,"_conditionType","and");Se(this,"_conditions",null)}conditionType(t){return this._conditionType=t,this}conditions(t){return this._conditions=Array.isArray(t)||t instanceof Ln||typeof t=="function"?t:this._conditions,this}visibleIf(t){return this._conditions=t,this}buildConditions(t){return Array.isArray(t)&&t.length>0?t.map(a=>a instanceof Ln?a.build.bind(a)():a):t}}class bf{constructor(){Se(this,"_events",{})}event(t,a){return this._events[t]=a,this}}class fi{constructor(t=""){this._component="",this._affix=t}static component(t){const a=new fi;return a._component="Affix/"+t,a}static make(t=""){return new this(t)}build(){return this._component.length>0?{component:this._component}:this._affix}}class xd{constructor(t,a="input"){if(typeof t!="string"||t.length<1)throw new Error("Key is Required");this._key=t,this._type=a,this._class="",this._id="",this._name="",this._label="",this._value="",this._placeholder="",this._min="",this._max="",this._prefix="",this._hasPrefix=!1,this._hasSuffix=!1,this._suffix="",_n.install(this,fp),_n.install(this,bf),_n.install(this,yf),this._wrapperClass=""}static make(t,a="input"){return new this(t,a)}wrapperClass(t){return this._wrapperClass=t,this}type(t){return this._type=t,this}class(t){return this._class=t,this}id(t){return this._id=t,this}name(t){return this._name=t,this}label(t){return this._label=t,this}value(t){return this._value=t,this}placeholder(t){return this._placeholder=t,this}min(t){return this._min=t,this}max(t){return this._max=t,this}prefix(t){return this._hasPrefix=!0,this._prefix=t,this}suffix(t){this._hasSuffix=!0,this._suffix=t}onChange(t){return this._onChangeCallback=t,this}onKeyPress(t){return this._onKeyPressCallback=t,this}onKeyUp(t){return this._onKeyUpCallback=t,this}onKeyDown(t){return this._onKeyDownCallback=t,this}build(){return this._conditions,Array.isArray(this._conditions)&&this._conditions.length>0&&this._conditions.map(t=>t instanceof Ln?t.build.bind(t)():t),this._attributes=typeof this._attributes=="object"?this._attributes:{},this._attributes.min=this._min,this._attributes.max=this._max,this._attributes.placeholder=this._placeholder,this._attributes.type=this._type,{key:this._key,type:this._type,class:this._class,id:this._id,name:this._name??u(Mt.headline(this._key)),label:this._label??u(Mt.headline(this._key)),value:this._value,condition_type:this._conditionType,conditions:this.buildConditions(this._conditions),hasSuffix:this._hasSuffix,hasPrefix:this._hasPrefix,suffix:this._suffix instanceof fi?this._suffix.build():this._suffix,prefix:this._prefix instanceof fi?this._prefix.build():this._prefix,min:this._min,max:this._max,placeholder:this._placeholder,attributes:this._attributes,events:this._events,wrapperClass:this._wrapperClass}}}class Sd{constructor(t){if(typeof t!="string"||t.length<1)throw new Error("Key is Required");this._type="section",this._key=t,this._schema=[],this._class="",this.disable_nesting=!0,_n.install(this,fp),_n.install(this,bf),_n.install(this,yf)}static make(t){return new this(t)}enableNesting(){return this.disable_nesting=!1,this}disableNesting(){return this.disable_nesting=!0,this}class(t){return this._class=t,this}get type(){return this._type}set type(t){if(typeof t=="string")this._type=t;else throw new TypeError("Type must be a string.")}get schema(){return this._schema}setSchema(t){return this._schema=t,this}build(){const t=mo.build(this.schema);return{key:this._key,type:this._type,class:this._class,schema:t,disable_nesting:this.disable_nesting,condition_type:this._conditionType,conditions:this.buildConditions(this._conditions),attributes:this._attributes}}}class Wc{constructor(t,a){if(typeof t!="string"||t.length<1)throw new Error("Key is Required");_n.install(this,xd,{key:t}),_n.install(this,Sd,{key:t}),this._component=a,this._key=t}static make(t,a=""){return new this(t,a)}component(t){return this._component=t,this}value(t){return this._value=t,this}build(){const t=mo.build(this.schema??{});return{type:this._type,class:this._class,id:this._id,name:this._name??u(Mt.headline(this._key)),label:this._label??u(Mt.headline(this._key)),value:this._value,condition_type:this._conditionType,conditions:this.buildConditions(this._conditions),hasSuffix:this._hasSuffix,hasPrefix:this._hasPrefix,suffix:this._suffix,prefix:this._prefix,placeholder:this._placeholder,attributes:this._attributes,onChange:this._onChangeCallback,onKeyUp:this._onKeyUpCallback,onKeyDown:this._onKeyDownCallback,type:this._type,class:this._class,schema:t,disable_nesting:this.disable_nesting,condition_type:this._conditionType,conditions:this.buildConditions(this._conditions),type:"custom",component:this._component,key:this._key}}}class mo{static build(t){return Array.isArray(t)?mo.buildFromArray(t):typeof t=="object"?mo.buildFromObject(t):t}static buildFromObject(t){let a={};return Object.keys(t).forEach((s,n)=>{const l=t[s];l instanceof xd||l instanceof Sd||l instanceof Wc?a[s]=l.build.bind(l)():a[s]=t[s]}),a}static buildFromArray(t){let a={};return Array.isArray(t)&&t.forEach(s=>{if(s instanceof xd||s instanceof Sd||s instanceof Wc){let n=s.build.bind(s)();a[n.key]=n}else a[s.key]=s}),a}}class gB extends Pa{constructor(){super(...arguments);Se(this,"data",{schema:{},defaults:{},_originalDefaults:{},values:{},initialized:!1,hasChange:!1,validationErrors:{},onChangeCallback:[]});Se(this,"nestedFormLayouts",["section","tab","tab-pane","grid"]);Se(this,"ignorableFormLayouts",["grid"])}get hasChange(){return this.data.hasChange}setSchema(a){return this.data.schema=mo.build(a??{}),this.initForm(),this}setDefaults(a){return this.data.defaults=a||{},this.data._originalDefaults=JSON.parse(JSON.stringify(this.data.defaults)),this.initForm(),this}get schema(){return this.data.schema}get values(){return this.data.values}get isReady(){return this.data.initialized}initForm(){if(typeof this.data.schema!="object"||typeof this.data.defaults!="object")throw new Error("You need to set Schema and Defaults First");this.setValues(),this.data.initialized=!0}setValues(){this.data.values=this.ensureNestedDataProperties(this.data.schema,this.data.defaults)}getState(){return this.data.values}setValidationErrors(a){this.data.validationErrors=a||{}}hasValidationError(a){return(this.data.validationErrors??{}).hasOwnProperty(a)}getValidationError(a){return this.data.validationErrors[a]}ensureNestedDataProperties(a,s={}){return Object.keys(a).reduce((n,l)=>{const A=a[l];if(A.type==="html")return n;if(this.nestedFormLayouts.includes(A.type??""))if(A.disable_nesting===!0){const c=this.ensureNestedDataProperties(A.schema??{},s??{});n={...n,...c}}else n[l]=this.ensureNestedDataProperties(A.schema??{},s[l]??{});else n[l]=s[l]??A.value??"";return n},{})}isVisible(a,s){return a.hasOwnProperty("conditions")?new _B(s,this.values).evaluate(Pe.get(a,"conditions"),Pe.get(a,"condition_type","and")):!0}triggerChange(a){for(let s of this.data.onChangeCallback)s(a)}onDataChanged(a){this.data.onChangeCallback.push(a)}setValue(a,s){Pe.set(this.data.values,a,s),this.data.hasChange=!0,this.triggerChange(this.data.values)}reset(a=!0){if(!this.data.schema||!this.data._originalDefaults)throw new Error("Form is not initialized");const s=a?this.data._originalDefaults:this.data.defaults;return this.data.values=this.ensureNestedDataProperties(this.data.schema,JSON.parse(JSON.stringify(s))),this.data.validationErrors={},this.data.hasChange=!1,this.data.initialized=!0,this}}function pA(){return gB.init()}const vB=["innerHTML"],Fd={__name:"FieldNote",props:{note:String},setup(e){return(t,a)=>(d(),h("div",{class:"form-note",innerHTML:e.note},null,8,vB))}},yB=Object.freeze(Object.defineProperty({__proto__:null,default:Fd},Symbol.toStringTag,{value:"Module"})),Xc=Object.assign({name:"ValidationError"},{__name:"ValidationErrorNew",props:{errorKey:String,form:{type:Object,required:!0}},setup(e){return(t,a)=>e.form.hasValidationError(e.errorKey)?(d(),h("div",{key:0,class:le(`fluent-cart-admin-validation-error-wrapper ${e.errorKey}`)},[(d(!0),h(H,null,Z(e.form.getValidationError(e.errorKey),(s,n)=>(d(),h("span",{class:"fluent-cart-admin-validation-error",key:s.toLowerCase().replace(/\s/g,"")},_(s),1))),128))],2)):x("",!0)}}),wf={__name:"Resolver",props:os({name:{type:String,required:!0},field:{type:Object},fieldKey:{type:String},value:{required:!0},variant:{type:String},nesting:{type:Boolean,default:!1},statePath:{type:String},form:{type:Object,required:!0},label:{type:String},attribute:{type:Object},callback:{type:Function}},{modelValue:{},modelModifiers:{}}),emits:["update:modelValue"],setup(e){const t=ms(e,"modelValue"),a=Object.assign({"./Affix/Test.vue":()=>Ft(()=>import("./chunks/Test.js?ver=1.3.25"),[],import.meta.url),"./Base/Inputs/Checkbox.vue":()=>Ft(()=>Promise.resolve().then(()=>$B),void 0,import.meta.url),"./Base/Inputs/ColorPicker.vue":()=>Ft(()=>Promise.resolve().then(()=>RB),void 0,import.meta.url),"./Base/Inputs/Date.vue":()=>Ft(()=>Promise.resolve().then(()=>HB),void 0,import.meta.url),"./Base/Inputs/FieldNote.vue":()=>Ft(()=>Promise.resolve().then(()=>yB),void 0,import.meta.url),"./Base/Inputs/Input.vue":()=>Ft(()=>Promise.resolve().then(()=>TB),void 0,import.meta.url),"./Base/Inputs/Media.vue":()=>Ft(()=>Promise.resolve().then(()=>pk),void 0,import.meta.url),"./Base/Inputs/RadioGroup.vue":()=>Ft(()=>Promise.resolve().then(()=>QB),void 0,import.meta.url),"./Base/Inputs/RemoteSearchableSelect.vue":()=>Ft(()=>Promise.resolve().then(()=>GB),void 0,import.meta.url),"./Base/Inputs/Select.vue":()=>Ft(()=>Promise.resolve().then(()=>NB),void 0,import.meta.url),"./Base/Inputs/Switch.vue":()=>Ft(()=>Promise.resolve().then(()=>UB),void 0,import.meta.url),"./Base/Inputs/Time.vue":()=>Ft(()=>Promise.resolve().then(()=>PB),void 0,import.meta.url),"./Base/Layouts/FormGrid.vue":()=>Ft(()=>Promise.resolve().then(()=>bB),void 0,import.meta.url),"./Base/Layouts/FormSection.vue":()=>Ft(()=>Promise.resolve().then(()=>xB),void 0,import.meta.url),"./Base/Layouts/FormTab.vue":()=>Ft(()=>Promise.resolve().then(()=>SB),void 0,import.meta.url),"./Base/Layouts/FormTabPane.vue":()=>Ft(()=>Promise.resolve().then(()=>FB),void 0,import.meta.url),"./Coupon/BuyProducts.vue":()=>Ft(()=>import("./chunks/BuyProducts.js?ver=1.3.25"),[],import.meta.url),"./Coupon/Categories.vue":()=>Ft(()=>import("./chunks/Categories.js?ver=1.3.25"),[],import.meta.url),"./Coupon/Code.vue":()=>Ft(()=>import("./chunks/Code.js?ver=1.3.25"),[],import.meta.url),"./Coupon/GetProducts.vue":()=>Ft(()=>import("./chunks/GetProducts.js?ver=1.3.25"),[],import.meta.url),"./Coupon/IncludeExclude/Categories.vue":()=>Ft(()=>import("./chunks/Categories2.js?ver=1.3.25"),[],import.meta.url),"./Coupon/IncludeExclude/Product.vue":()=>Ft(()=>import("./chunks/Product.js?ver=1.3.25"),[],import.meta.url),"./Coupon/Products.vue":()=>Ft(()=>import("./chunks/Products.js?ver=1.3.25"),[],import.meta.url),"./ModuleSettings.vue":()=>Ft(()=>import("./chunks/ModuleSettings.js?ver=1.3.25"),[],import.meta.url),"./PaymentView.vue":()=>Ft(()=>import("./chunks/PaymentView.js?ver=1.3.25"),[],import.meta.url),"./StoreSettings/AddressComponent.vue":()=>Ft(()=>import("./chunks/AddressComponent.js?ver=1.3.25"),[],import.meta.url),"./StoreSettings/CreatePageButton.vue":()=>Ft(()=>import("./chunks/CreatePageButton.js?ver=1.3.25"),[],import.meta.url),"./StoreSettings/PageSelector.vue":()=>Ft(()=>import("./chunks/PageSelector.js?ver=1.3.25"),[],import.meta.url),"./TurnstileSettings.vue":()=>Ft(()=>import("./chunks/TurnstileSettings.js?ver=1.3.25"),[],import.meta.url)}),s=Pm(null);Be(()=>{n(l.name)});const n=async A=>{const c=`./${A}.vue`;a[c]?s.value=(await a[c]()).default:console.error(`Form Component ${c} not found`)},l=e;return(A,c)=>(d(),h(H,null,[(d(),F(ws(s.value),Xt({name:e.name,field:e.field,fieldKey:e.fieldKey,value:e.value,variant:e.variant,nesting:e.nesting,statePath:e.statePath,form:e.form,attribute:e.attribute,label:e.label,callback:e.callback},{modelValue:t.value,"onUpdate:modelValue":c[0]||(c[0]=p=>t.value=p)}),null,16,["modelValue"])),Jt(A.$slots,"fieldNote"),Jt(A.$slots,"validationError")],64))}},fA={__name:"FormGrid",props:{field:{type:Object},value:{type:Object},statePath:{type:String},form:{type:Object,required:!0}},setup(e){return(t,a)=>{var s,n,l,A,c,p,m,g,y,v;return d(),h("div",{class:"gap-2 grid grid-cols-dynamic sm:grid-cols-sm-dynamic md:grid-cols-md-dynamic lg:grid-cols-lg--dynamic",style:Zt({"--grid-columns":((s=e.field.columns)==null?void 0:s.default)??2,"--sm-grid-columns":((n=e.field.columns)==null?void 0:n.sm)??((l=e.field.columns)==null?void 0:l.default)??2,"--md-grid-columns":((A=e.field.columns)==null?void 0:A.sm)??((c=e.field.columns)==null?void 0:c.md)??((p=e.field.columns)==null?void 0:p.default)??2,"--lg-grid-columns":((m=e.field.columns)==null?void 0:m.lg)??((g=e.field.columns)==null?void 0:g.md)??((y=e.field.columns)==null?void 0:y.sm)??((v=e.field.columns)==null?void 0:v.default)??2})},[o(Zi,{form:e.form,schema:e.field.schema,value:e.value,statePath:e.statePath},null,8,["form","schema","value","statePath"])],4)}}},bB=Object.freeze(Object.defineProperty({__proto__:null,default:fA},Symbol.toStringTag,{value:"Module"})),wB={key:0,class:"fct-content-card-header"},CB={key:0,class:"title"},BB={key:1,class:"fct-content-card-action"},Cf={__name:"ContentCard",props:["title","show_heading"],setup(e){return(t,a)=>(d(),h("div",{class:le({"fct-content-card":e.show_heading!==!1})},[e.show_heading!==!1?(d(),h("div",wB,[e.title||t.$slots.title?(d(),h("div",CB,[Jt(t.$slots,"title",{},()=>[O(_(e.title),1)])])):x("",!0),t.$slots.action?(d(),h("div",BB,[Jt(t.$slots,"action")])):x("",!0)])):x("",!0),i("div",{class:le({"fct-content-card-body":e.show_heading!==!1})},[Jt(t.$slots,"default")],2)],2))}},kB={class:"form-section"},Bf={__name:"FormSection",props:{field:{type:Object},fieldKey:{type:String},value:{type:Object},variant:{type:String},nesting:{type:Boolean,default:!1},statePath:{type:String},form:{type:Object,required:!0}},setup(e){return(t,a)=>(d(),h("div",kB,[o(he,null,{default:r(()=>[e.field.show_title!==!1?(d(),F(we,{key:0,title:e.field.title,border_bottom:""},null,8,["title"])):x("",!0),o(me,null,{default:r(()=>[o(fA,{form:e.form,field:e.field,statePath:e.statePath,value:e.value},null,8,["form","field","statePath","value"])]),_:1})]),_:1})]))}},xB=Object.freeze(Object.defineProperty({__proto__:null,default:Bf},Symbol.toStringTag,{value:"Module"})),kf={__name:"FormTab",props:{field:{type:Object},value:{type:Object},statePath:{type:String},form:{type:Object,required:!0}},setup(e){const t=e,a=M(""),s=M([]),n=Oa(),l=m=>{const g=m.props.name;A(g)},A=m=>{const g=new URL(window.location.href);g.hash=`#/settings/${m}`,window.history.replaceState(null,"",g.toString())},c=()=>{const g=window.location.hash.split("/").pop();s.value=Object.keys(t.field.schema);const y=s.value.find(v=>v===g);y?a.value=y:a.value=t.field.default_tab};let p;return Be(()=>{p=n.beforeEach((m,g,y)=>{y(),setTimeout(()=>{c()},200)}),c()}),it(()=>{p&&p()}),(m,g)=>{const y=w("el-tabs");return d(),F(y,{modelValue:a.value,"onUpdate:modelValue":g[0]||(g[0]=v=>a.value=v),class:le(["fct-tabs-button",{"hidden-switch":e.field.hide_tab_switch}]),onTabClick:l,type:"card"},{default:r(()=>[o(Zi,{form:e.form,schema:e.field.schema,value:e.value,"state-path":e.statePath},null,8,["form","schema","value","state-path"])]),_:1},8,["modelValue","class"])}}},SB=Object.freeze(Object.defineProperty({__proto__:null,default:kf},Symbol.toStringTag,{value:"Module"})),xf={__name:"FormTabPane",props:{fieldKey:{type:String},field:{type:Object},value:{type:Object},statePath:{type:String},form:{type:Object,required:!0}},setup(e){return(t,a)=>{const s=w("el-tab-pane");return d(),F(s,{label:e.field.title,name:e.fieldKey},{default:r(()=>[o(Zi,{form:e.form,schema:e.field.schema,value:e.value,statePath:e.statePath},null,8,["form","schema","value","statePath"])]),_:1},8,["label","name"])}}},FB=Object.freeze(Object.defineProperty({__proto__:null,default:xf},Symbol.toStringTag,{value:"Module"}));class mA{}Se(mA,"attributesBuilders",async(t,a,s)=>{if(t.attributes||(t.attributes={}),t.class&&(t.attributes.class=t.class),t.placeholder&&(t.attributes.placeholder=t.placeholder),typeof a!="function")return t.attributes??{};let n={};typeof t.events!="object"&&(n={}),n.hasOwnProperty("onChange")&&typeof n.onChange=="function"?n.onChange=(...l)=>{s.data.hasChange=!0,n.onChange(l)}:n.onChange=()=>{s.data.hasChange=!0};for(let l in t.events)n[l]=(...A)=>{a(t.events[l],A)};for(let l in t.attributes??{}){let A=t.attributes[l];typeof A=="function"&&await a(A,{})}return{...t.attributes??{},...n}});const EB={__name:"LayoutRenderer",props:{form:{type:Object,required:!0},field:{type:Object,required:!0},value:{type:Object,required:!0},statePath:{type:String,required:!0},fieldKey:{type:String,required:!0},fullStatePath:{type:String,required:!0}},setup(e){const t=e;vt().ctx;const a=(l,A)=>{if(typeof l=="function")return l({data:t.value,form:t.form,statePath:t.statePath,field:t.field,event:Array.isArray(A)&&A.length===1?A[0]:A})},s=M(!1),n=M({});return Be(async()=>{n.value=await mA.attributesBuilders(t.field,a,t.form),s.value=!0}),(l,A)=>(d(),h(H,null,[e.field.type==="grid"&&typeof e.field.schema<"u"?(d(),F(fA,Xt({key:0,class:e.field.wrapperClass,form:e.form,field:e.field,value:e.value,statePath:e.fullStatePath},n.value),null,16,["class","form","field","value","statePath"])):x("",!0),e.field.type==="tab"&&typeof e.field.schema<"u"?(d(),F(kf,Xt({key:1,form:e.form,field:e.field,value:e.value,statePath:e.fullStatePath},n.value),null,16,["form","field","value","statePath"])):x("",!0),e.field.type==="tab-pane"&&typeof e.field.schema<"u"&&typeof e.field.title<"u"?(d(),F(xf,Xt({key:2,form:e.form,field:e.field,value:e.value,fieldKey:e.fieldKey,statePath:e.fullStatePath},n.value),null,16,["form","field","value","fieldKey","statePath"])):x("",!0),e.field.type==="section"?(d(),F(Bf,Xt({key:3,form:e.form,statePath:e.field.disable_nesting===!0?e.fullStatePath:e.fieldKey+".",field:e.field,"field-key":e.fieldKey,value:e.field.disable_nesting===!0?e.value:e.value[e.fieldKey],nesting:e.field.disable_nesting===!0},n.value),null,16,["form","statePath","field","field-key","value","nesting"])):x("",!0)],64))}},Sf={__name:"Switch",props:os({name:{type:String,required:!0},field:{type:Object},fieldKey:{type:String},value:{required:!0},variant:{type:String},nesting:{type:Boolean,default:!1},statePath:{type:String},form:{type:Object,required:!0},callback:{type:Function,required:!0},label:{type:String},attribute:{required:!0}},{modelValue:{},modelModifiers:{}}),emits:["update:modelValue"],setup(e){const t=ms(e,"modelValue");return(a,s)=>{const n=w("el-switch");return d(),F(n,Xt({modelValue:t.value,"onUpdate:modelValue":s[0]||(s[0]=l=>t.value=l),disabled:e.field.disabled},e.attribute),null,16,["modelValue","disabled"])}}},UB=Object.freeze(Object.defineProperty({__proto__:null,default:Sf},Symbol.toStringTag,{value:"Module"})),Ff={__name:"Checkbox",props:os({name:{type:String,required:!0},field:{type:Object},fieldKey:{type:String},value:{required:!0},variant:{type:String},nesting:{type:Boolean,default:!1},statePath:{type:String},form:{type:Object,required:!0},callback:{type:Function,required:!0},label:{type:String},attribute:{required:!0}},{modelValue:{},modelModifiers:{}}),emits:["update:modelValue"],setup(e){const t=ms(e,"modelValue");return(a,s)=>{const n=w("el-checkbox");return d(),F(n,Xt({modelValue:t.value,"onUpdate:modelValue":s[0]||(s[0]=l=>t.value=l)},e.attribute,{"true-value":"yes","false-value":"no",disabled:e.field.disabled}),{default:r(()=>[O(_(e.label),1)]),_:1},16,["modelValue","disabled"])}}},$B=Object.freeze(Object.defineProperty({__proto__:null,default:Ff},Symbol.toStringTag,{value:"Module"})),DB=["innerHTML"],Ef={__name:"RadioGroup",props:os({field:{type:Object},statePath:{type:String},value:{required:!0},form:{type:Object},callback:{type:Function,required:!0},label:{type:String},attribute:{required:!0}},{modelValue:{},modelModifiers:{}}),emits:["update:modelValue"],setup(e){const t=ms(e,"modelValue"),a=e,s=M([]),n=async(l="")=>{if(typeof a.field.options=="function")return s.value=await a.field.options({data:a.value,form:a.form,statePath:a.statePath,search:l});if(Array.isArray(a.field.options))return s.value=[...a.field.options]};return Be(async()=>{await n()}),(l,A)=>{const c=w("el-radio"),p=w("el-radio-group");return d(),F(p,Xt({modelValue:t.value,"onUpdate:modelValue":A[0]||(A[0]=m=>t.value=m)},e.attribute),{default:r(()=>[(d(!0),h(H,null,Z(e.field.options,(m,g)=>(d(),F(c,{key:g,value:m.value,class:le(m.option_class)},{default:r(()=>[i("div",null,_(m.label),1),i("div",{innerHTML:m.note},null,8,DB)]),_:2},1032,["value","class"]))),128))]),_:1},16,["modelValue"])}}},QB=Object.freeze(Object.defineProperty({__proto__:null,default:Ef},Symbol.toStringTag,{value:"Module"})),IB=["innerHTML"],oo={__name:"Input",props:os({name:{type:String,required:!0},field:{type:Object},fieldKey:{type:String},value:{required:!0},variant:{type:String},nesting:{type:Boolean,default:!1},statePath:{type:String},form:{type:Object,required:!0},callback:{type:Function,required:!0},label:{type:String},attribute:{required:!0}},{modelValue:{},modelModifiers:{}}),emits:["update:modelValue"],setup(e){const t=vt().ctx,a=ms(e,"modelValue"),s=e,n=M(),l=async()=>{typeof s.field.prefix=="function"?n.value=await s.callback(s.field.prefix):n.value=s.field.prefix};return Be(()=>{l()}),Km(()=>{l()}),z(()=>s.fieldKey==="amount"?s.form.data.values.type==="fixed"?He.shop.get("currency_sign"):"%":t.appVars.shop.currency_sign),(A,c)=>{var m;const p=w("el-input");return d(),F(p,Xt({modelValue:a.value,"onUpdate:modelValue":c[0]||(c[0]=g=>a.value=g)},e.attribute,{disabled:e.field.disabled}),Qt({_:2},[(m=e.field.prefix)!=null&&m.component?{name:"prefix",fn:r(()=>[o(wf,{form:e.form,name:e.field.prefix.component,field:e.field,value:e.value},null,8,["form","name","field","value"])]),key:"0"}:e.field.prefix?{name:"prefix",fn:r(()=>[i("div",{innerHTML:n.value},null,8,IB)]),key:"1"}:void 0]),1040,["modelValue","disabled"])}}},TB=Object.freeze(Object.defineProperty({__proto__:null,default:oo},Symbol.toStringTag,{value:"Module"})),VB={class:"fct-color-picker-box"},MB={class:"fct-color-picker-trigger-wrap"},LB={key:0,class:"text-xs text-system-light"},OB={key:1,class:"fct-color-picker-action-wrap"},hA={__name:"ColorPicker",props:os({field:{type:Object},statePath:{type:String},value:{required:!0},form:{type:Object},callback:{type:Function,required:!0},label:{type:String},attribute:{required:!0}},{modelValue:{},modelModifiers:{}}),emits:["update:modelValue"],setup(e){const t=ms(e,"modelValue"),a=s=>{t.value=""};return(s,n)=>{const l=w("el-color-picker");return d(),h("div",VB,[i("div",MB,[o(l,Xt({modelValue:t.value,"onUpdate:modelValue":n[0]||(n[0]=A=>t.value=A)},e.attribute,{disabled:e.field.disabled,"popper-class":"fct-color-picker-popover"}),null,16,["modelValue","disabled"]),t.value?x("",!0):(d(),F(j,{key:0,name:"ColorPicker",class:"fct-color-picker-icon w-4 h-4"}))]),t.value?x("",!0):(d(),h("span",LB,_(f(u)("Add...")),1)),t.value?(d(),h("div",OB,[i("span",null,_(t.value),1),o(j,{name:"Cross",class:"fct-color-picker-action w-5 h-5",onClick:n[1]||(n[1]=A=>a(s.fieldKey))})])):x("",!0)])}}},RB=Object.freeze(Object.defineProperty({__proto__:null,default:hA},Symbol.toStringTag,{value:"Module"})),Uf={__name:"Date",props:os({name:{type:String,required:!0},field:{type:Object},fieldKey:{type:String},value:{required:!0},variant:{type:String},nesting:{type:Boolean,default:!1},statePath:{type:String},form:{type:Object,required:!0},callback:{type:Function,required:!0},label:{type:String},attribute:{required:!0}},{modelValue:{},modelModifiers:{}}),emits:["update:modelValue"],setup(e){const t=ms(e,"modelValue");return(a,s)=>{const n=w("el-date-picker");return d(),F(n,Xt({modelValue:t.value,"onUpdate:modelValue":s[0]||(s[0]=l=>t.value=l)},e.attribute,{disabled:e.field.disabled}),null,16,["modelValue","disabled"])}}},HB=Object.freeze(Object.defineProperty({__proto__:null,default:Uf},Symbol.toStringTag,{value:"Module"})),$f={__name:"Time",props:os({name:{type:String,required:!0},field:{type:Object},fieldKey:{type:String},value:{required:!0},variant:{type:String},nesting:{type:Boolean,default:!1},statePath:{type:String},form:{type:Object,required:!0},callback:{type:Function,required:!0},label:{type:String},attribute:{required:!0}},{modelValue:{},modelModifiers:{}}),emits:["update:modelValue"],setup(e){const t=ms(e,"modelValue");return(a,s)=>{const n=w("el-time-select");return d(),F(n,Xt({modelValue:t.value,"onUpdate:modelValue":s[0]||(s[0]=l=>t.value=l)},e.attribute,{disabled:e.field.disabled}),null,16,["modelValue","disabled"])}}},PB=Object.freeze(Object.defineProperty({__proto__:null,default:$f},Symbol.toStringTag,{value:"Module"})),KB={key:0},Df={__name:"Select",props:os({name:{type:String,required:!0},field:{type:Object},fieldKey:{type:String},value:{required:!0},variant:{type:String},nesting:{type:Boolean,default:!1},statePath:{type:String},form:{type:Object,required:!0},callback:{type:Function,required:!0},label:{type:String},attribute:{required:!0}},{modelValue:{},modelModifiers:{}}),emits:["update:modelValue"],setup(e){const t=ms(e,"modelValue"),a=e,s=M([]),n=M(!1),l=async(c="")=>{n.value=!0,typeof a.field.options=="function"&&(s.value=await a.field.options({data:a.value,form:a.form,statePath:a.statePath,search:c})),Array.isArray(a.field.options)&&(s.value=[...a.field.options]),n.value=!1};Be(async()=>{await l()});const A=c=>typeof c.disabled=="function"?a.callback(c.disabled,{}):c.disabled;return(c,p)=>{const m=w("el-option"),g=w("el-select");return d(),F(g,Xt({modelValue:t.value,"onUpdate:modelValue":p[0]||(p[0]=y=>t.value=y)},e.attribute,{"remote-method":l,loading:n.value,filterable:e.field.filterable===!0,clearable:e.field.clearable===!0,disabled:e.field.disabled}),{default:r(()=>[(d(!0),h(H,null,Z(s.value,(y,v)=>(d(),F(m,{key:v,value:y.value,label:y.label,disabled:A(y)},{default:r(()=>[y.slot?(d(),h("span",KB,_(y.slot),1)):x("",!0)]),_:2},1032,["value","label","disabled"]))),128))]),_:1},16,["modelValue","loading","filterable","clearable","disabled"])}}},NB=Object.freeze(Object.defineProperty({__proto__:null,default:Df},Symbol.toStringTag,{value:"Module"})),Qf={__name:"RemoteSearchableSelect",props:os({field:{type:Object},key:{type:String}},{modelValue:{},modelModifiers:{}}),emits:["update:modelValue"],setup(e){const t=ms(e,"modelValue"),a=e,s=M(!1),n=M(a.field.options||[]),l=A=>{if(a.field.search_only_on_type===!0){if(A.query.length===0)return}else if(A.query.length<1&&n.value.length>0)return;s.value=!0,ie.get("forms/search_options",{search_by:A.query,search_for:A.key}).then(c=>{n.value=c.options,s.value=!1})};return(A,c)=>{const p=w("el-option"),m=w("el-select");return d(),F(m,{modelValue:t.value,"onUpdate:modelValue":c[0]||(c[0]=g=>t.value=g),filterable:"",remote:"",placeholder:e.field.placeholder??f(u)("Please enter a keyword"),"remote-method":g=>{l({query:g,key:e.field.remote_key})},loading:s.value,multiple:e.field.multiple},{default:r(()=>[(d(!0),h(H,null,Z(n.value,g=>(d(),F(p,{key:g.value,label:g.label,value:g.value},null,8,["label","value"]))),128))]),_:1},8,["modelValue","placeholder","remote-method","loading","multiple"])}}},GB=Object.freeze(Object.defineProperty({__proto__:null,default:Qf},Symbol.toStringTag,{value:"Module"}));function vo(e,t){t===void 0&&(t={});var a=t.insertAt;if(e&&typeof document<"u"){var s=document.head||document.getElementsByTagName("head")[0],n=document.createElement("style");n.type="text/css",a==="top"&&s.firstChild?s.insertBefore(n,s.firstChild):s.appendChild(n),n.styleSheet?n.styleSheet.cssText=e:n.appendChild(document.createTextNode(e))}}vo(".vel-fade-enter-active,.vel-fade-leave-active{-webkit-transition:all .3s ease;transition:all .3s ease}.vel-fade-enter-from,.vel-fade-leave-to{opacity:0}.vel-img-swiper{display:block;position:relative}.vel-modal{background:rgba(0,0,0,.5);bottom:0;left:0;margin:0;position:fixed;right:0;top:0;z-index:9998}.vel-img-wrapper{left:50%;margin:0;position:absolute;top:50%;-webkit-transform:translate(-50% -50%);transform:translate(-50% -50%);-webkit-transition:.3s linear;transition:.3s linear;will-change:transform opacity}.vel-img,.vel-img-wrapper{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.vel-img{background-color:rgba(0,0,0,.7);-webkit-box-shadow:0 5px 20px 2px rgba(0,0,0,.7);box-shadow:0 5px 20px 2px rgba(0,0,0,.7);display:block;max-height:80vh;max-width:80vw;position:relative;-webkit-transition:-webkit-transform .3s ease-in-out;transition:-webkit-transform .3s ease-in-out;transition:transform .3s ease-in-out;transition:transform .3s ease-in-out,-webkit-transform .3s ease-in-out}@media (max-width:750px){.vel-img{max-height:95vh;max-width:85vw}}.vel-btns-wrapper{position:static}.vel-btns-wrapper .btn__close,.vel-btns-wrapper .btn__next,.vel-btns-wrapper .btn__prev{-webkit-tap-highlight-color:transparent;color:#fff;cursor:pointer;font-size:32px;opacity:.6;outline:none;position:absolute;top:50%;-webkit-transform:translateY(-50%);transform:translateY(-50%);-webkit-transition:.15s linear;transition:.15s linear;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.vel-btns-wrapper .btn__close:hover,.vel-btns-wrapper .btn__next:hover,.vel-btns-wrapper .btn__prev:hover{opacity:1}.vel-btns-wrapper .btn__close.disable,.vel-btns-wrapper .btn__close.disable:hover,.vel-btns-wrapper .btn__next.disable,.vel-btns-wrapper .btn__next.disable:hover,.vel-btns-wrapper .btn__prev.disable,.vel-btns-wrapper .btn__prev.disable:hover{cursor:default;opacity:.2}.vel-btns-wrapper .btn__next{right:12px}.vel-btns-wrapper .btn__prev{left:12px}.vel-btns-wrapper .btn__close{right:10px;top:24px}@media (max-width:750px){.vel-btns-wrapper .btn__next,.vel-btns-wrapper .btn__prev{font-size:20px}.vel-btns-wrapper .btn__close{font-size:24px}.vel-btns-wrapper .btn__next{right:4px}.vel-btns-wrapper .btn__prev{left:4px}}.vel-modal.is-rtl .vel-btns-wrapper .btn__next{left:12px;right:auto}.vel-modal.is-rtl .vel-btns-wrapper .btn__prev{left:auto;right:12px}@media (max-width:750px){.vel-modal.is-rtl .vel-btns-wrapper .btn__next{left:4px;right:auto}.vel-modal.is-rtl .vel-btns-wrapper .btn__prev{left:auto;right:4px}}.vel-modal.is-rtl .vel-img-title{direction:rtl}");vo('.vel-loading{left:50%;position:absolute;top:50%;-webkit-transform:translate(-50%,-50%);transform:translate(-50%,-50%)}.vel-loading .ring{display:inline-block;height:64px;width:64px}.vel-loading .ring:after{-webkit-animation:ring 1.2s linear infinite;animation:ring 1.2s linear infinite;border-color:hsla(0,0%,100%,.7) transparent;border-radius:50%;border-style:solid;border-width:5px;content:" ";display:block;height:46px;margin:1px;width:46px}@-webkit-keyframes ring{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}to{-webkit-transform:rotate(1turn);transform:rotate(1turn)}}@keyframes ring{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}to{-webkit-transform:rotate(1turn);transform:rotate(1turn)}}');vo(".vel-on-error{left:50%;position:absolute;top:50%;-webkit-transform:translate(-50%,-50%);transform:translate(-50%,-50%)}.vel-on-error .icon{color:#aaa;font-size:80px}");vo(".vel-img-title{bottom:60px;color:#ccc;cursor:default;font-size:12px;left:50%;line-height:1;max-width:80%;opacity:.8;overflow:hidden;position:absolute;text-align:center;text-overflow:ellipsis;-webkit-transform:translate(-50%);transform:translate(-50%);-webkit-transition:opacity .15s;transition:opacity .15s;white-space:nowrap}.vel-img-title:hover{opacity:1}");vo(".vel-icon{fill:currentColor;height:1em;overflow:hidden;vertical-align:-.15em;width:1em}");vo(".vel-toolbar{border-radius:4px;bottom:8px;display:-webkit-box;display:-ms-flexbox;display:flex;left:50%;opacity:.9;overflow:hidden;padding:0;position:absolute;-webkit-transform:translate(-50%);transform:translate(-50%)}.vel-toolbar,.vel-toolbar .toolbar-btn{background-color:#2d2d2d;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.vel-toolbar .toolbar-btn{-ms-flex-negative:0;-webkit-tap-highlight-color:transparent;color:#fff;cursor:pointer;flex-shrink:0;font-size:20px;outline:none;padding:6px 10px}.vel-toolbar .toolbar-btn:active,.vel-toolbar .toolbar-btn:hover{background-color:#3d3d3d}");const As="vel",bs=$s({name:"SvgIcon",props:{type:{type:String,default:""}},setup:e=>()=>o("svg",{class:`${As}-icon icon`,"aria-hidden":"true"},[o("use",{"xlink:href":`#icon-${e.type}`},null)])}),Xi=typeof window<"u",lo=()=>{};let If=!1;if(Xi)try{const e={};Object.defineProperty(e,"passive",{get(){If=!0}}),window.addEventListener("test-passive",lo,e)}catch{}const Jc=function(e,t,a){let s=arguments.length>3&&arguments[3]!==void 0&&arguments[3];Xi&&e.addEventListener(t,a,!!If&&{capture:!1,passive:s})},Zc=(e,t,a)=>{Xi&&e.removeEventListener(t,a)},zB=e=>{e.preventDefault()},jB=Object.prototype.toString,_A=e=>t=>jB.call(t).slice(8,-1)===e,YB=e=>!!e&&_A("Object")(e),eu=e=>!!e&&_A("String")(e);function qB(e){return e!=null}const WB=$s({name:"Toolbar",props:{zoomIn:{type:Function,default:lo},zoomOut:{type:Function,default:lo},rotateLeft:{type:Function,default:lo},rotateRight:{type:Function,default:lo},resize:{type:Function,default:lo},rotateDisabled:{type:Boolean,default:!1},zoomDisabled:{type:Boolean,default:!1}},setup:e=>()=>o("div",{class:`${As}-toolbar`},[!e.zoomDisabled&&o(H,null,[o("div",{role:"button","aria-label":"zoom in button",class:"toolbar-btn toolbar-btn__zoomin",onClick:e.zoomIn},[o(bs,{type:"zoomin"},null)]),o("div",{role:"button","aria-label":"zoom out button",class:"toolbar-btn toolbar-btn__zoomout",onClick:e.zoomOut},[o(bs,{type:"zoomout"},null)])]),o("div",{role:"button","aria-label":"resize image button",class:"toolbar-btn toolbar-btn__resize",onClick:e.resize},[o(bs,{type:"resize"},null)]),!e.rotateDisabled&&o(H,null,[o("div",{role:"button","aria-label":"image rotate left button",class:"toolbar-btn toolbar-btn__rotate",onClick:e.rotateLeft},[o(bs,{type:"rotate-left"},null)]),o("div",{role:"button","aria-label":"image rotate right button",class:"toolbar-btn toolbar-btn__rotate",onClick:e.rotateRight},[o(bs,{type:"rotate-right"},null)])])])}),XB=()=>o("div",{class:`${As}-loading`},[o("div",{class:"ring"},null)]),JB=()=>o("div",{class:`${As}-on-error`},[o("div",{class:"ring"},null),o(bs,{type:"img-broken"},null)]),ZB=(e,t)=>{let{slots:a}=t;return o("div",{class:`${As}-img-title`},[a.default?a.default():""])},ek=$s({name:"DefaultIcons",setup:()=>()=>o("svg",{"aria-hidden":!0,style:"position: absolute; width: 0; height: 0; overflow: hidden; visibility: hidden;"},[o("symbol",{id:"icon-rotate-right",viewBox:"0 0 1024 1024"},[o("path",{d:"M275.199914 450.496179v20.031994c0.384-38.079988 12.543996-67.423979 36.479989-87.967973 22.431993-20.351994 49.215985-30.55999 80.319975-30.55999 32.06399 0 59.295981 10.175997 81.759974 30.55999 22.815993 20.543994 34.591989 49.887984 35.359989 87.967973v123.935961c-0.768 37.887988-12.543996 67.135979-35.359989 87.679973-22.431993 20.351994-49.695984 30.75199-81.759974 31.10399a120.255962 120.255962 0 0 1-72.991978-24.895992c-21.503993-15.839995-35.359989-38.751988-41.567987-68.735979h60.831981c9.247997 23.007993 27.167992 34.495989 53.759983 34.49599 37.535988-0.384 56.863982-21.407993 57.983982-63.071981v-38.751988c-28.095991 8.863997-54.303983 13.119996-78.623975 12.735996a91.263971 91.263971 0 0 1-68.447979-27.711991c-18.847994-18.303994-28.095991-47.231985-27.711991-86.847973z m62.55998 24.863992c7.103998 24.799992 25.215992 37.343988 54.271983 37.663989 27.103992-0.288 44.703986-11.327996 52.831984-33.11999 3.135999-8.383997 2.655999-29.599991-1.28-38.559988-8.607997-19.615994-25.791992-29.695991-51.551984-30.20799-28.383991 0.576-46.303986 12.639996-53.759983 36.159988a58.719982 58.719982 0 0 0-0.512 28.063991z m390.335878 115.711964v-116.895963c-1.12-41.311987-20.447994-62.335981-57.983981-63.07198-37.727988 0.768-56.959982 21.791993-57.695982 63.07198v116.895963c0.768 41.663987 19.999994 62.68798 57.695982 63.071981 37.535988-0.384 56.863982-21.407993 57.983981-63.071981z m-174.815945 3.391999v-123.935961c0.384-38.079988 12.543996-67.423979 36.479989-87.967973 22.431993-20.351994 49.215985-30.55999 80.319975-30.55999 32.06399 0 59.295981 10.175997 81.759974 30.55999 22.815993 20.543994 34.591989 49.887984 35.359989 87.967973v123.935961c-0.768 37.887988-12.543996 67.135979-35.359989 87.679973-22.431993 20.351994-49.695984 30.75199-81.759974 31.10399-31.10399-0.384-57.887982-10.751997-80.319975-31.10399-23.935993-20.543994-36.127989-49.791984-36.479989-87.679973z m282.559912-479.07185A509.887841 509.887841 0 0 0 511.99984 0.00032C229.215928 0.00032 0 229.216248 0 512.00016s229.215928 511.99984 511.99984 511.99984 511.99984-229.215928 511.99984-511.99984c0-3.743999-0.032-7.455998-0.128-11.167997-1.631999-11.295996-8.159997-27.103992-31.87199-27.103991-27.487991 0-31.67999 21.247993-32.03199 32.06399l0.032 4.127999a30.62399 30.62399 0 0 0 0.16 2.079999H959.9997c0 247.423923-200.575937 447.99986-447.99986 447.99986S63.99998 759.424083 63.99998 512.00016 264.575917 64.0003 511.99984 64.0003a446.079861 446.079861 0 0 1 277.439913 96.22397l-94.91197 91.679971c-25.439992 24.607992-17.439995 44.991986 17.887994 45.599986l188.031942 3.295999a64.31998 64.31998 0 0 0 65.055979-62.84798l3.295999-188.127942C969.407697 15.040315 949.311703 5.792318 923.871711 30.368311l-87.999972 85.023973z",fill:""},null)]),o("symbol",{id:"icon-rotate-left",viewBox:"0 0 1024 1024"},[o("path",{d:"M275.199914 450.496179v20.031994c0.384-38.079988 12.543996-67.423979 36.479989-87.967973 22.431993-20.351994 49.215985-30.55999 80.319975-30.55999 32.06399 0 59.295981 10.175997 81.759974 30.55999 22.815993 20.543994 34.591989 49.887984 35.359989 87.967973v123.935961c-0.768 37.887988-12.543996 67.135979-35.359989 87.679973-22.431993 20.351994-49.695984 30.75199-81.759974 31.10399a120.255962 120.255962 0 0 1-72.991978-24.895992c-21.503993-15.839995-35.359989-38.751988-41.567987-68.735979h60.831981c9.247997 23.007993 27.167992 34.495989 53.759983 34.49599 37.535988-0.384 56.863982-21.407993 57.983982-63.071981v-38.751988c-28.095991 8.863997-54.303983 13.119996-78.623975 12.735996a91.263971 91.263971 0 0 1-68.447979-27.711991c-18.847994-18.303994-28.095991-47.231985-27.711991-86.847973z m62.55998 24.863992c7.103998 24.799992 25.215992 37.343988 54.271983 37.663989 27.103992-0.288 44.703986-11.327996 52.831984-33.11999 3.135999-8.383997 2.655999-29.599991-1.28-38.559988-8.607997-19.615994-25.791992-29.695991-51.551984-30.20799-28.383991 0.576-46.303986 12.639996-53.759983 36.159988a58.719982 58.719982 0 0 0-0.512 28.063991z m390.335878 115.711964v-116.895963c-1.12-41.311987-20.447994-62.335981-57.983981-63.07198-37.727988 0.768-56.959982 21.791993-57.695982 63.07198v116.895963c0.768 41.663987 19.999994 62.68798 57.695982 63.071981 37.535988-0.384 56.863982-21.407993 57.983981-63.071981z m-174.815945 3.391999v-123.935961c0.384-38.079988 12.543996-67.423979 36.479989-87.967973 22.431993-20.351994 49.215985-30.55999 80.319975-30.55999 32.06399 0 59.295981 10.175997 81.759974 30.55999 22.815993 20.543994 34.591989 49.887984 35.359989 87.967973v123.935961c-0.768 37.887988-12.543996 67.135979-35.359989 87.679973-22.431993 20.351994-49.695984 30.75199-81.759974 31.10399-31.10399-0.384-57.887982-10.751997-80.319975-31.10399-23.935993-20.543994-36.127989-49.791984-36.479989-87.679973zM188.159941 115.392284A509.887841 509.887841 0 0 1 511.99984 0.00032c282.783912 0 511.99984 229.215928 511.99984 511.99984s-229.215928 511.99984-511.99984 511.99984S0 794.784072 0 512.00016c0-3.743999 0.032-7.455998 0.128-11.167997 1.631999-11.295996 8.159997-27.103992 31.87199-27.103991 27.487991 0 31.67999 21.247993 32.03199 32.06399L63.99998 509.920161a30.62399 30.62399 0 0 1-0.16 2.079999H63.99998c0 247.423923 200.575937 447.99986 447.99986 447.99986s447.99986-200.575937 447.99986-447.99986S759.423763 64.0003 511.99984 64.0003a446.079861 446.079861 0 0 0-277.439913 96.22397l94.91197 91.679971c25.439992 24.607992 17.439995 44.991986-17.887994 45.599986L123.551961 300.800226a64.31998 64.31998 0 0 1-65.055979-62.84798l-3.295999-188.127942C54.591983 15.040315 74.687977 5.792318 100.127969 30.368311l87.999972 85.023973z",fill:""},null)]),o("symbol",{id:"icon-resize",viewBox:"0 0 1024 1024"},[o("path",{d:"M456.036919 791.8108 270.553461 791.8108 460.818829 601.572038l-39.593763-39.567157L231.314785 751.915162l0.873903-183.953615c0-15.465227-12.515035-27.981285-27.981285-27.981285s-27.981285 12.515035-27.981285 27.981285l0 251.829516c0 8.3072 3.415796 14.975063 8.826016 19.564591 5.082762 5.192256 12.132318 8.416693 19.947308 8.416693l251.036453 0c15.46625 0 27.981285-12.514012 27.981285-27.981285C484.018204 804.325835 471.504192 791.8108 456.036919 791.8108zM838.945819 184.644347c-5.082762-5.191232-12.132318-8.416693-19.947308-8.416693L567.961034 176.227654c-15.46625 0-27.981285 12.515035-27.981285 27.981285 0 15.46625 12.514012 27.981285 27.981285 27.981285l185.483458 0L563.206754 422.427962l39.567157 39.567157 189.910281-189.910281-0.873903 183.953615c0 15.46625 12.514012 27.981285 27.981285 27.981285s27.981285-12.514012 27.981285-27.981285L847.772858 204.208938C847.771835 195.902762 844.356039 189.234899 838.945819 184.644347zM847.771835 64.303538 176.227142 64.303538c-61.809741 0-111.924115 50.115398-111.924115 111.924115l0 671.544693c0 61.809741 50.114374 111.924115 111.924115 111.924115l671.544693 0c61.809741 0 111.924115-50.114374 111.924115-111.924115l0-671.544693C959.69595 114.418936 909.581576 64.303538 847.771835 64.303538zM903.733381 847.772346c0 30.878265-25.056676 55.962569-55.962569 55.962569L176.227142 903.734916c-30.90487 0-55.962569-25.084305-55.962569-55.962569l0-671.544693c0-30.9325 25.056676-55.962569 55.962569-55.962569l671.544693 0c30.90487 0 55.962569 25.03007 55.962569 55.962569L903.734404 847.772346z"},null)]),o("symbol",{id:"icon-img-broken",viewBox:"0 0 1024 1024"},[o("path",{d:"M810.666667 128H213.333333c-46.933333 0-85.333333 38.4-85.333333 85.333333v597.333334c0 46.933333 38.4 85.333333 85.333333 85.333333h597.333334c46.933333 0 85.333333-38.4 85.333333-85.333333V213.333333c0-46.933333-38.4-85.333333-85.333333-85.333333z m0 682.666667H213.333333v-195.413334l42.24 42.24 170.666667-170.666666 170.666667 170.666666 170.666666-170.24L810.666667 530.346667V810.666667z m0-401.493334l-43.093334-43.093333-170.666666 171.093333-170.666667-170.666666-170.666667 170.666666-42.24-42.666666V213.333333h597.333334v195.84z"},null)]),o("symbol",{id:"icon-prev",viewBox:"0 0 1024 1024"},[o("path",{d:"M784.652701 955.6957 346.601985 517.644983c-2.822492-2.822492-2.822492-7.902977 0-11.289967l439.179713-439.179713c6.77398-6.77398 10.725469-16.370452 10.725469-25.966924L796.507166 36.692393c0-20.32194-16.370452-36.692393-36.692393-36.692393l-4.515987 0c-9.596472 0-19.192944 3.951488-25.966924 10.725469L250.072767 489.420066c-12.418964 12.418964-12.418964 32.740904 0 45.159868l477.565601 477.565601c7.338479 7.338479 17.499449 11.854465 28.224917 11.854465l0 0c22.015436 0 40.079383-18.063947 40.079383-40.079383l0 0C796.507166 973.759647 791.99118 963.598677 784.652701 955.6957z"},null)]),o("symbol",{id:"icon-next",viewBox:"0 0 1024 1024"},[o("path",{d:"M246.121279 955.6957l438.050717-438.050717c2.822492-2.822492 2.822492-7.902977 0-11.289967L244.992282 67.175303c-6.77398-6.77398-10.725469-16.370452-10.725469-25.966924L234.266814 36.692393C234.266814 16.370452 250.637266 0 270.959206 0l4.515987 0c9.596472 0 19.192944 3.951488 25.966924 10.725469l478.694598 478.694598c12.418964 12.418964 12.418964 32.740904 0 45.159868l-477.565601 477.565601c-7.338479 7.338479-17.499449 11.854465-28.224917 11.854465l0 0c-22.015436 0-40.079383-18.063947-40.079383-40.079383l0 0C234.266814 973.759647 238.7828 963.598677 246.121279 955.6957z"},null)]),o("symbol",{id:"icon-zoomin",viewBox:"0 0 1024 1024"},[o("path",{d:"M725.504 652.864c46.4-61.44 71.744-136.448 71.744-218.752C797.248 230.464 632.768 64 430.656 64S64 230.464 64 434.112C64 639.36 228.48 805.76 430.656 805.76c86.656 0 164.48-30.144 227.52-81.088L889.984 960 960 891.264l-234.496-238.4z m-294.848 67.456c-155.776 0-282.624-128.896-282.624-286.208s126.848-286.208 282.624-286.208 282.624 128.896 282.624 286.208-126.912 286.208-282.624 286.208z"},null),o("path",{d:"M235.712 369.92h390.72v127.104H235.712z"},null),o("path",{d:"M367.488 238.144h127.104v390.72H367.488z"},null)]),o("symbol",{id:"icon-close",viewBox:"0 0 1024 1024"},[o("path",{d:"M570.24 512l259.2 259.2-58.88 58.24L512 570.24l-261.12 261.12-58.24-58.24L453.76 512 194.56 252.8l58.24-58.24L512 453.76l261.12-261.12 58.24 58.24z"},null)]),o("symbol",{id:"icon-zoomout",viewBox:"0 0 1024 1024"},[o("path",{d:"M725.504 652.864c46.4-61.44 71.744-136.448 71.744-218.752C797.248 230.464 632.768 64 430.656 64S64 230.464 64 434.112C64 639.36 228.48 805.76 430.656 805.76c86.656 0 164.48-30.144 227.52-81.088L889.984 960 960 891.264l-234.496-238.4z m-294.848 67.456c-155.776 0-282.624-128.896-282.624-286.208s126.848-286.208 282.624-286.208 282.624 128.896 282.624 286.208-126.912 286.208-282.624 286.208z"},null),o("path",{d:"M235.712 369.92h390.72v127.104H235.712z"},null)])])}),Ko=Xi?window:global;let tu=Date.now();function tk(e){const t=Date.now(),a=Math.max(0,16-(t-tu)),s=setTimeout(e,a);return tu=t+a,s}function Dr(e){return(Ko.requestAnimationFrame||tk).call(Ko,e)}function au(e){(Ko.cancelAnimationFrame||Ko.clearTimeout).call(Ko,e)}function su(e,t){const a=e.clientX-t.clientX,s=e.clientY-t.clientY;return Math.sqrt(a*a+s*s)}function Qr(e){return typeof e=="function"||Object.prototype.toString.call(e)==="[object Object]"&&!Nm(e)}var Ir=$s({name:"VueEasyLightbox",props:{imgs:{type:[Array,String],default:()=>""},visible:{type:Boolean,default:!1},index:{type:Number,default:0},scrollDisabled:{type:Boolean,default:!0},escDisabled:{type:Boolean,default:!1},moveDisabled:{type:Boolean,default:!1},titleDisabled:{type:Boolean,default:!1},maskClosable:{type:Boolean,default:!0},teleport:{type:[String,Object],default:null},swipeTolerance:{type:Number,default:50},loop:{type:Boolean,default:!1},rtl:{type:Boolean,default:!1},zoomScale:{type:Number,default:.12},maxZoom:{type:Number,default:3},minZoom:{type:Number,default:.1},rotateDisabled:{type:Boolean,default:!1},zoomDisabled:{type:Boolean,default:!1},pinchDisabled:{type:Boolean,default:!1},dblclickDisabled:{type:Boolean,default:!1}},emits:{hide:()=>!0,"on-error":e=>!0,"on-prev":(e,t)=>!0,"on-next":(e,t)=>!0,"on-prev-click":(e,t)=>!0,"on-next-click":(e,t)=>!0,"on-index-change":(e,t)=>!0,"on-rotate":e=>!0},setup(e,t){let{emit:a,slots:s}=t;const{imgRef:n,imgState:l,setImgSize:A}=(()=>{const _e=M(),xe=Mo({width:0,height:0,maxScale:1});return{imgRef:_e,imgState:xe,setImgSize:()=>{if(_e.value){const{width:Ie,height:ce,naturalWidth:Ve}=_e.value;xe.maxScale=Ve/Ie,xe.width=Ie,xe.height=ce}}}})(),c=M(e.index),p=M(""),m=Mo({scale:1,lastScale:1,rotateDeg:0,top:0,left:0,initX:0,initY:0,lastX:0,lastY:0,touches:[]}),g=Mo({loadError:!1,loading:!1,dragging:!1,gesturing:!1,wheeling:!1}),y=z(()=>{return _e=e.imgs,_A("Array")(_e)?e.imgs.map(xe=>typeof xe=="string"?{src:xe}:function(Ie){return YB(Ie)&&eu(Ie.src)}(xe)?xe:void 0).filter(qB):eu(e.imgs)?[{src:e.imgs}]:[];var _e}),v=z(()=>y.value[c.value]),C=z(()=>{var _e;return(_e=y.value[c.value])==null?void 0:_e.src}),b=z(()=>{var _e;return(_e=y.value[c.value])==null?void 0:_e.title}),B=z(()=>{var _e;return(_e=y.value[c.value])==null?void 0:_e.alt}),k=z(()=>({cursor:g.loadError?"default":e.moveDisabled?g.dragging?"grabbing":"grab":"move",top:`calc(50% + ${m.top}px)`,left:`calc(50% + ${m.left}px)`,transition:g.dragging||g.gesturing?"none":"",transform:`translate(-50%, -50%) scale(${m.scale}) rotate(${m.rotateDeg}deg)`})),U=()=>{a("hide")},T=()=>{m.scale=1,m.lastScale=1,m.rotateDeg=0,m.top=0,m.left=0,g.loadError=!1,g.dragging=!1,g.loading=!0},S=(_e,xe)=>{const Ie=c.value;T(),c.value=_e,y.value[c.value]===y.value[_e]&&be(()=>{g.loading=!1}),e.visible&&Ie!==_e&&(xe&&xe(Ie,_e),a("on-index-change",Ie,_e))},E=()=>{const _e=c.value,xe=e.loop?(_e+1)%y.value.length:_e+1;!e.loop&&xe>y.value.length-1||S(xe,(Ie,ce)=>{a("on-next",Ie,ce),a("on-next-click",Ie,ce)})},Q=()=>{const _e=c.value;let xe=_e-1;if(_e===0){if(!e.loop)return;xe=y.value.length-1}S(xe,(Ie,ce)=>{a("on-prev",Ie,ce),a("on-prev-click",Ie,ce)})},D=_e=>{Math.abs(1-_e)<.05?_e=1:Math.abs(l.maxScale-_e)<.05&&(_e=l.maxScale),m.lastScale=m.scale,m.scale=_e},L=()=>{const _e=m.scale+e.zoomScale;_e{const _e=m.scale-e.zoomScale;_e>e.minZoom&&D(_e)},$=()=>{const _e=m.rotateDeg%360;a("on-rotate",Math.abs(_e<0?_e+360:_e))},V=()=>{m.rotateDeg-=90,$()},R=()=>{m.rotateDeg+=90,$()},P=()=>{m.scale=1,m.top=0,m.left=0},W=function(){let _e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0;return!e.moveDisabled&&_e===0},{onMouseDown:N,onMouseMove:te,onMouseUp:ae}=((_e,xe,Ie)=>{let ce,Ve=!1;return{onMouseDown:We=>{_e.initX=_e.lastX=We.clientX,_e.initY=_e.lastY=We.clientY,xe.dragging=!0,Ve=!1,We.stopPropagation()},onMouseUp:We=>{Ie(We.button)&&au(ce),xe.dragging=!1,Ve=!1},onMouseMove:We=>{if(xe.dragging)if(Ie(We.button)){if(Ve)return;Ve=!0,ce=Dr(()=>{const{top:Pt,left:Ct,lastY:ht,lastX:je}=_e;_e.top=Pt-ht+We.clientY,_e.left=Ct-je+We.clientX,_e.lastX=We.clientX,_e.lastY=We.clientY,Ve=!1})}else _e.lastX=We.clientX,_e.lastY=We.clientY;We.stopPropagation()}}})(m,g,W),{onTouchStart:q,onTouchMove:re,onTouchEnd:K}=((_e,xe,Ie,ce,Ve)=>{let We,Pt=!1;return{onTouchStart:Ct=>{const{touches:ht}=Ct;ht.length>1&&Ve()?(Ie.gesturing=!0,xe.touches=ht):(xe.initX=xe.lastX=ht[0].clientX,xe.initY=xe.lastY=ht[0].clientY,Ie.dragging=!0),Ct.stopPropagation()},onTouchMove:Ct=>{if(Pt)return;const{touches:ht}=Ct,{lastX:je,lastY:yt,left:st,top:kt,scale:Kt}=xe;if(!Ie.gesturing&&Ie.dragging){if(!ht[0])return;const{clientX:jt,clientY:ea}=ht[0];ce()?We=Dr(()=>{xe.lastX=jt,xe.lastY=ea,xe.top=kt-yt+ea,xe.left=st-je+jt,Pt=!1}):(xe.lastX=jt,xe.lastY=ea)}else Ie.gesturing&&xe.touches.length>1&&ht.length>1&&Ve()&&(We=Dr(()=>{const jt=(su(xe.touches[0],xe.touches[1])-su(ht[0],ht[1]))/_e.width;xe.touches=ht;const ea=Kt-1.3*jt;ea>.5&&ea<1.5*_e.maxScale&&(xe.scale=ea),Pt=!1}))},onTouchEnd:()=>{au(We),Ie.dragging=!1,Ie.gesturing=!1,Pt=!1}}})(l,m,g,W,()=>!e.pinchDisabled),G=()=>{e.dblclickDisabled||(m.scale!==l.maxScale?(m.lastScale=m.scale,m.scale=l.maxScale):m.scale=m.lastScale)},J=_e=>{g.loadError||g.gesturing||g.loading||g.dragging||g.wheeling||!e.scrollDisabled||e.zoomDisabled||(g.wheeling=!0,setTimeout(()=>{g.wheeling=!1},80),_e.deltaY<0?L():I())},X=_e=>{const xe=_e;e.visible&&(!e.escDisabled&&xe.key==="Escape"&&e.visible&&U(),xe.key==="ArrowLeft"&&(e.rtl?E():Q()),xe.key==="ArrowRight"&&(e.rtl?Q():E()))},ne=()=>{e.maskClosable&&U()},ye=()=>{A()},se=()=>{g.loading=!1},fe=_e=>{g.loading=!1,g.loadError=!0,a("on-error",_e)},ue=()=>{e.visible&&A()};Ce(()=>e.index,_e=>{_e<0||_e>=y.value.length||S(_e)}),Ce(()=>g.dragging,(_e,xe)=>{const Ie=!_e&&xe;if(!W()&&Ie){const ce=m.lastX-m.initX,Ve=m.lastY-m.initY,We=e.swipeTolerance;Math.abs(ce)>Math.abs(Ve)&&(ce<-1*We?E():ce>We&&Q())}}),Ce(()=>e.visible,_e=>{if(_e){T();const xe=y.value.length;if(xe===0)return c.value=0,g.loading=!1,void be(()=>g.loadError=!0);c.value=e.index>=xe?xe-1:e.index<0?0:e.index,e.scrollDisabled&&$e()}else e.scrollDisabled&&Fe()});const $e=()=>{document&&(p.value=document.body.style.overflowY,document.body.style.overflowY="hidden")},Fe=()=>{document&&(document.body.style.overflowY=p.value)};Be(()=>{Jc(document,"keydown",X),Jc(window,"resize",ue)}),Cs(()=>{Zc(document,"keydown",X),Zc(window,"resize",ue),e.scrollDisabled&&Fe()});const Te=()=>g.loading?s.loading?s.loading({key:"loading"}):o(XB,{key:"img-loading"},null):g.loadError?s.onerror?s.onerror({key:"onerror"}):o(JB,{key:"img-on-error"},null):o("div",{class:`${As}-img-wrapper`,style:k.value,key:"img-wrapper"},[o("img",{alt:B.value,ref:n,draggable:"false",class:`${As}-img`,src:C.value,onMousedown:N,onMouseup:ae,onMousemove:te,onTouchstart:q,onTouchmove:re,onTouchend:K,onLoad:ye,onDblclick:G,onDragstart:_e=>{_e.preventDefault()}},null)]),ve=()=>{if(s["prev-btn"])return s["prev-btn"]({prev:Q});if(y.value.length<=1)return;const _e=!e.loop&&c.value<=0;return o("div",{role:"button","aria-label":"previous image button",class:"btn__prev "+(_e?"disable":""),onClick:Q},[e.rtl?o(bs,{type:"next"},null):o(bs,{type:"prev"},null)])},Ke=()=>{if(s["next-btn"])return s["next-btn"]({next:E});if(y.value.length<=1)return;const _e=!e.loop&&c.value>=y.value.length-1;return o("div",{role:"button","aria-label":"next image button",class:"btn__next "+(_e?"disable":""),onClick:E},[e.rtl?o(bs,{type:"prev"},null):o(bs,{type:"next"},null)])},rt=()=>{if(!(e.titleDisabled||g.loading||g.loadError))return s.title?s.title({currentImg:v.value}):b.value?o(ZB,null,{default:()=>[b.value]}):void 0},Ne=()=>{let _e;if(e.visible)return o("div",{onTouchmove:zB,class:[`${As}-modal`,e.rtl?"is-rtl":""],onClick:qe(ne,["self"]),onWheel:J},[o(ek,null,null),o(Dn,{name:`${As}-fade`,mode:"out-in"},Qr(_e=Te())?_e:{default:()=>[_e]}),o("img",{style:"display:none;",src:C.value,onError:fe,onLoad:se},null),o("div",{class:`${As}-btns-wrapper`},[ve(),Ke(),rt(),s["close-btn"]?s["close-btn"]({close:U}):o("div",{role:"button","aria-label":"close image preview button",class:"btn__close",onClick:U},[o(bs,{type:"close"},null)]),s.toolbar?s.toolbar({toolbarMethods:{zoomIn:L,zoomOut:I,rotate:V,rotateLeft:V,rotateRight:R,resize:P},zoomIn:L,zoomOut:I,rotate:V,rotateLeft:V,rotateRight:R,resize:P}):o(WB,{zoomIn:L,zoomOut:I,resize:P,rotateLeft:V,rotateRight:R,rotateDisabled:e.rotateDisabled,zoomDisabled:e.zoomDisabled},null)])])};return()=>{let _e;if(e.teleport){let xe;return o(Qi,{to:e.teleport},{default:()=>[o(Dn,{name:`${As}-fade`},Qr(xe=Ne())?xe:{default:()=>[xe]})]})}return o(Dn,{name:`${As}-fade`},Qr(_e=Ne())?_e:{default:()=>[_e]})}}});const ak=Object.assign(Ir,{install:e=>{e.component(Ir.name,Ir)}}),sk={name:"Attachments",props:{multiple:Boolean,attachments:{type:[Array,Object],default:()=>[]},empty_text:String,isSingle:Boolean,title:String,type:String,icon:String,showList:{type:Boolean,default:!0},showDeleteButton:{type:Boolean,default:!0},previewImage:{type:Boolean,default:!0},mediaInputSize:{type:String},mediaInputBg:{type:String}},emits:["removeImage","mediaUploaded"],data(){return{visible:!1,imageIndex:0,lightboxData:[],images:M([])}},components:{MediaButton:lp,VueEasyLightbox:ak,IconButton:Ee,Delete:Fn},computed:{showMediaButtonAsIcon:function(){return!this.multiple&&this.attachments.length===1}},mounted:function(){Array.isArray(this.attachments)&&this.attachments.length>0&&this.attachments.forEach(e=>{this.lightboxData.push(e.url),this.images.push({id:e.id,url:e.url,title:e.title})})},methods:{translate:u,removeImageEvent(e){this.$emit("removeImage",e)},onMediaSelected(e){this.images=e.map(t=>({id:t.id,title:t.title,url:t.url})),this.$emit("mediaUploaded",this.images)}},watch:{attachments:{handler:function(e,t){return this.lightboxData=[],Array.isArray(e)&&e.length>0&&e.map((a,s)=>{this.lightboxData.push(a.url)}),e},deep:!0}}},nk={class:"fct-attachments-wrap",style:{position:"relative"}},ok={class:"fct-attachment-img-wrap"},lk=["src","alt","onClick"],ik={class:"fct-attachments-button"};function rk(e,t,a,s,n,l){const A=w("VueEasyLightbox"),c=w("MediaButton"),p=w("IconButton"),m=w("Delete");return d(),h(H,null,[o(A,{visible:n.visible,imgs:n.lightboxData,index:n.imageIndex,onHide:t[0]||(t[0]=()=>{this.visible=!1})},null,8,["visible","imgs","index"]),i("div",nk,[a.attachments?(d(),h("ul",{key:0,class:le(`fct-attachments-list ${a.multiple?"is-multiple":"fct-single-attachment"} ${a.attachments.length>0?"is-single":""}`)},[a.showList===!0?(d(!0),h(H,{key:0},Z(a.attachments,(g,y)=>(d(),h("li",{key:y,class:le([[a.mediaInputSize,a.mediaInputBg],"fct-attachment-item"])},[i("div",ok,[a.previewImage?(d(),h("img",{key:0,src:g.url,alt:g.title,onClick:()=>{this.imageIndex=y,this.visible=!0}},null,8,lk)):x("",!0),l.showMediaButtonAsIcon&&!a.multiple?(d(),F(p,{key:1,size:"x-small"},{default:r(()=>[o(c,{"icon-mode":!0,attachments:a.attachments,title:a.multiple?"":a.title,onOnMediaSelected:l.onMediaSelected,multiple:a.multiple,icon:a.icon},null,8,["attachments","title","onOnMediaSelected","multiple","icon"])]),_:1})):x("",!0)]),i("div",ik,[a.showDeleteButton?(d(),F(p,{key:0,tag:"button",bg:"danger",outline:"",size:"x-small",onClick:qe(v=>l.removeImageEvent(y),["prevent"]),title:l.translate("Delete media")},{default:r(()=>[a.multiple?(d(),F(m,{key:0})):(d(),h(H,{key:1},[O(_(l.translate("Remove")),1)],64))]),_:2},1032,["onClick","title"])):x("",!0),l.showMediaButtonAsIcon&&a.multiple?(d(),F(p,{key:1,size:"x-small"},{default:r(()=>[o(c,{"icon-mode":!0,attachments:a.attachments,title:a.multiple?"":a.title,onOnMediaSelected:l.onMediaSelected,multiple:a.multiple,icon:a.icon},null,8,["attachments","title","onOnMediaSelected","multiple","icon"])]),_:1})):x("",!0)])],2))),128)):x("",!0),l.showMediaButtonAsIcon?x("",!0):(d(),h("li",{key:1,class:le([a.mediaInputSize,a.mediaInputBg])},[o(c,{"icon-mode":!1,attachments:a.attachments,title:a.multiple?"":a.title,onOnMediaSelected:l.onMediaSelected,multiple:a.multiple,icon:a.icon},null,8,["attachments","title","onOnMediaSelected","multiple","icon"])],2))],2)):x("",!0),Jt(e.$slots,"default")])],64)}const dk=Ue(sk,[["render",rk]]),Ak={key:0},ck={key:0,class:"setting-label"},Ji={__name:"MediaInput",props:{modelValue:{default:""},showSupported:{type:Boolean,default:!1},multiple:{type:Boolean,default:!1},fullWidth:{type:Boolean,default:!1},icon:{type:String},title:{type:String},mediaInputSize:{type:String},mediaInputBg:{type:String},field:{type:Object}},emits:["update:modelValue"],setup(e,{emit:t}){const a=e,s=t,n=M();let l=M([]);const A=()=>{a.multiple?n.value=[]:n.value="",l=[],s("update:modelValue",n.value)},c=m=>{if(m.length)if(a.multiple){n.value=[],l=[];for(const g of m)n.value.push(g),l.push(g)}else n.value=m,l=m;s("update:modelValue",n.value)};Ce(()=>a.modelValue,m=>{Array.isArray(m)&&m.length>0?n.value=m:m&&typeof m=="string"&&m!==""?n.value=[m]:m&&typeof m=="object"?n.value=[m]:n.value=[],p()});const p=()=>{l.value=[],Object.values(n.value).forEach((m,g)=>{m!==void 0&&m!==""&&l.value.push(m)})};return Be(()=>{Array.isArray(a.modelValue)&&a.modelValue.length>0?n.value=a.modelValue:a.modelValue&&typeof a.modelValue=="string"&&a.modelValue!==""?n.value=[a.modelValue]:a.modelValue&&typeof a.modelValue=="object"?n.value=[a.modelValue]:n.value=[],p()}),(m,g)=>(d(),h(H,null,[o(dk,{attachments:f(l),onMediaUploaded:c,onRemoveImage:A,icon:e.icon,title:e.title,mediaInputSize:e.mediaInputSize,mediaInputBg:e.mediaInputBg},null,8,["attachments","icon","title","mediaInputSize","mediaInputBg"]),e.showSupported?(d(),h("div",Ak,[e.field&&e.field.label?(d(),h("label",ck,_(e.field.label),1)):x("",!0),i("span",null,_(f(u)("%1$s Recommended width: %2$s pixels minimum.","HEIC, WEBP, SVG, PNG, or JPG.","512")),1)])):x("",!0)],64))}},uk={class:"setting-media-wrap"},Tf={__name:"Media",props:os({name:{type:String,required:!0},field:{type:Object},fieldKey:{type:String},value:{required:!0},variant:{type:String},nesting:{type:Boolean,default:!1},statePath:{type:String},form:{type:Object,required:!0},callback:{type:Function,required:!0},label:{type:String},attribute:{required:!0}},{modelValue:{},modelModifiers:{}}),emits:["update:modelValue"],setup(e){const t=ms(e,"modelValue");return(a,s)=>(d(),h("div",uk,[o(Ji,Xt({modelValue:t.value,"onUpdate:modelValue":s[0]||(s[0]=n=>t.value=n),field:e.field,icon:"Upload"},e.attribute),null,16,["modelValue","field"])]))}},pk=Object.freeze(Object.defineProperty({__proto__:null,default:Tf},Symbol.toStringTag,{value:"Module"})),fk={__name:"InputRenderer",props:{form:{type:Object,required:!0},field:{type:Object,required:!0},value:{type:Object,required:!0},statePath:{type:String,required:!0},fieldKey:{type:String,required:!0},fullStatePath:{type:String,required:!0}},setup(e){const t=e;M(!1),vt().ctx;const a=m=>typeof m.label=="function"?m.label(t.value,t.statePath,t.form):m.label,s=(m,g)=>{if(typeof m=="function")return m({data:t.value,form:t.form,statePath:t.statePath,field:t.field,event:Array.isArray(g)&&g.length===1?g[0]:g})},n=M(!1);let l={};Be(async()=>{l=await mA.attributesBuilders(t.field,s,t.form),n.value=!0});const A={switch:Sf,checkbox:Ff,radio:Ef,input:oo,text:oo,email:oo,number:oo,textarea:oo,color:hA,date:Uf,time:$f,select:Df,media:Tf,remote_select:Qf},c=z(()=>A[t.field.type]||null),p=z(()=>({modelValue:t.value[t.fieldKey],form:t.form,statePath:t.statePath,field:t.field,fieldKey:t.fieldKey,value:t.value[t.fieldKey],nesting:!1,label:a(t.field),attribute:l,callback:s}));return(m,g)=>e.field.type==="wp-editor"?(d(),F(qs,{key:0,shortCodes:e.field.shortcodes.data,modelValue:t.value[t.fieldKey],onUpdate:g[0]||(g[0]=y=>{t.value[t.fieldKey]=y})},null,8,["shortCodes","modelValue"])):c.value&&n.value?(d(),F(ws(c.value),Xt({key:1,onChange:g[1]||(g[1]=y=>{e.form.triggerChange(y)}),onInput:g[2]||(g[2]=y=>{e.form.triggerChange(e.value[e.fieldKey])}),modelValue:e.value[e.fieldKey],"onUpdate:modelValue":g[3]||(g[3]=y=>e.value[e.fieldKey]=y)},p.value),null,16,["modelValue"])):x("",!0)}},mk=["innerHTML"],hk={key:0},_k={key:0},Zi={__name:"FormRenderer",props:{form:{type:Object,required:!0},schema:{type:Object},value:{type:Object},statePath:{type:String}},setup(e){const t=e,a=t.statePath??"",s=["grid","section","tab","tab-pane"];M(!1),vt().ctx;const n=(A,c)=>{if(typeof A.label=="function"){let p=l(A)?a:c+".",m=l(A)?t.value:t.value[c];return A.label(m,p,t.form)}return A.label},l=A=>A.disable_nesting!==!1;return(A,c)=>(d(!0),h(H,null,Z(e.schema,(p,m)=>(d(),h(H,{key:m},[e.form.isVisible(p,e.statePath+m)?(d(),h(H,{key:0},[p.type==="html"?(d(),h("div",{key:0,class:le(`setting-html-wrapper ${p.wrapperClass??""}`),innerHTML:p.value},null,10,mk)):(d(),h(H,{key:1},[p.component?(d(),h("div",{key:0,class:le(p.wrapperClass??"")},[p.component&&p.label?(d(),F(Bt,{key:0,title:n(p,m),content:p.tooltip,class:"setting-label",placement:p.tooltip_placement},{default:r(()=>[p.labelOptional?(d(),h("span",hk,"("+_(p.labelOptional)+")",1)):x("",!0)]),_:2},1032,["title","content","placement"])):x("",!0),o(wf,{modelValue:e.value[m],"onUpdate:modelValue":g=>e.value[m]=g,name:p.component,form:e.form,statePath:l(p)?f(a):m+".",field:p,"field-key":m,value:l(p)?e.value:e.value[m],nesting:l(p)},{fieldNote:r(()=>[p.note&&p.hide_note!==!0?(d(),F(Fd,{key:0,note:p.note},null,8,["note"])):x("",!0)]),validationError:r(()=>[o(Xc,{form:e.form,"error-key":f(a)+m},null,8,["form","error-key"])]),_:2},1032,["modelValue","onUpdate:modelValue","name","form","statePath","field","field-key","value","nesting"])],2)):x("",!0),s.includes(p.type)?(d(),F(EB,{key:1,form:e.form,field:p,value:e.value,"full-state-path":f(a),statePath:l(p)?f(a):m+".","field-key":m},null,8,["form","field","value","full-state-path","statePath","field-key"])):x("",!0),typeof p.type<"u"&&!s.includes(p.type)&&!["custom","component","html","hidden"].includes(p.type)?(d(),h("div",{key:2,class:le(`setting-fields-inner ${p.wrapperClass??""}`)},[p.type!=="checkbox"&&!p.component&&p.label!==!1?(d(),F(Bt,{key:0,class:"setting-label",title:n(p,m),content:p.tooltip,placement:p.tooltip_placement},{default:r(()=>[p.labelOptional?(d(),h("span",_k,"("+_(p.labelOptional)+")",1)):x("",!0)]),_:2},1032,["title","content","placement"])):x("",!0),o(fk,{form:e.form,field:p,value:e.value,"full-state-path":f(a),"state-path":e.statePath,"field-key":m},null,8,["form","field","value","full-state-path","state-path","field-key"]),p.note&&!p.component?(d(),F(Fd,{key:1,note:p.note},null,8,["note"])):x("",!0),p.component?x("",!0):(d(),F(Xc,{key:2,form:e.form,"error-key":f(a)+m},null,8,["form","error-key"]))],2)):x("",!0)],64))],64)):x("",!0)],64))),128))}},gk={key:0,class:"vue-form-wrap"},vk={key:0,class:"form-section-save-action"},yk={key:0,class:"cmd block leading-none"},er={__name:"VueForm",props:{form:{type:Object,required:!0},schema:{type:Object},value:{type:Object},showSubmitButton:{type:Boolean,default:!1},submitButtonText:{type:String,default:"Save"},loading:{type:Boolean,default:!1}},emits:["onSubmit","onChange","onSubmitButtonClick"],setup(e,{expose:t,emit:a}){const s=e,n=a;Be(()=>{be(()=>{l.registerCopyAction()})}),M({});const l=vt().ctx,A=()=>{n("onSubmitButtonClick")};return t({getState:()=>s.form.values}),(p,m)=>{const g=w("el-button");return e.form.isReady?(d(),h("div",gk,[o(Zi,{form:e.form,ref:"formRenderer",schema:e.form.schema,value:e.form.values},null,8,["form","schema","value"]),e.showSubmitButton?(d(),h("div",vk,[o(g,{onClick:A,type:"primary",loading:e.loading},{default:r(()=>[e.loading?x("",!0):(d(),h("span",yk,"⌘s")),O(" "+_(e.loading?f(u)("Saving"):e.submitButtonText),1)]),_:1},8,["loading"])])):x("",!0)])):x("",!0)}}},bk={key:0},wk={__name:"DynamicFormLoader",props:["schema","values","submit_button_text","form_name","widget"],emits:["change"],setup(e,{expose:t,emit:a}){let s=pA();const n=a,l=e,A=()=>{const g=l.form_name,y={};return y[g]={...s.values},y},c=()=>{s.reset()},p=()=>{var g;return((g=l.widget)==null?void 0:g.reset_on_save)==!0},m=Di("triggerChange");return Be(()=>{s.setSchema(l.schema).setDefaults(l.values).initForm(),s.onDataChanged(g=>{m==null||m(),n("change")})}),t({getState:A,resetForm:c,resetOnSave:p}),(g,y)=>f(s).isReady?(d(),h("div",bk,[o(er,{showSubmitButton:!1,submitButtonText:e.submit_button_text,form:f(s),onOnSubmitButtonClick:y[0]||(y[0]=()=>{f(s).values}),onOnChange:y[1]||(y[1]=v=>{}),"validation-errors":{}},null,8,["submitButtonText","form"])])):x("",!0)}},Ck={__name:"EChart",props:{option:{type:Object,required:!0},height:{type:String,default:"400px"},width:{type:String,default:"100%"}},setup(e){const t=e,a=M(null);let s=null;const n=()=>{a.value&&(s=Ut(a.value),console.log(t.option),s.setOption(t.option))};Ce(()=>t.option,p=>{s&&p&&s.setOption(p,!0)},{deep:!0});const l=(p,m)=>{if(p==null||p==="")return m;const g=Number(p);return isNaN(g)?p:`${g}px`},A=z(()=>l(t.height,"400px")),c=z(()=>l(t.width,"100%"));return Be(()=>{n(),window.addEventListener("resize",()=>s==null?void 0:s.resize())}),Cs(()=>{window.removeEventListener("resize",()=>s==null?void 0:s.resize()),s==null||s.dispose()}),(p,m)=>(d(),h("div",{ref_key:"chartRef",ref:a,style:Zt({width:c.value,height:A.value})},null,4))}},Bk={class:"fct-step-indicator"},kk={class:"indicator-title"},xk={class:"indicator-steps"},Sk={class:"indicator-progress"},Fk={class:"indicator-steps-bar"},Ek=["onClick"],Uk={__name:"StepIndicator",props:{steps:{type:Array,required:!0},currentStep:{type:Number,default:1}},emits:["step-click"],setup(e,{emit:t}){const a=t;return(s,n)=>(d(),h("div",Bk,[i("div",kk,_(e.steps[e.currentStep-1].label),1),i("div",xk,[i("div",Sk,_(e.currentStep)+"/"+_(e.steps.length)+" "+_(s.$t("Completed")),1),i("div",Fk,[(d(!0),h(H,null,Z(e.steps,(l,A)=>(d(),h("div",{key:A,class:"indicator-step",onClick:c=>a("step-click",A+1)},[i("div",{class:le(["indicator-step-bar",Aa.disabled||a.loading),l=()=>`width ${a.duration}ms ease, opacity ${a.duration}ms ease, margin-right ${a.duration}ms ease`,A=y=>{y.style.width="0",y.style.opacity="0",y.style.overflow="hidden",y.style.marginRight="6px"},c=(y,v)=>{const C=y.scrollWidth+"px";y.style.transition=l(),requestAnimationFrame(()=>{y.style.width=C,y.style.opacity="1",y.style.marginRight=""}),setTimeout(()=>v(),a.duration)},p=y=>{y.style.width="auto",y.style.overflow="",y.style.marginRight=""},m=y=>{y.style.width=y.scrollWidth+"px",y.style.opacity="1",y.style.overflow="hidden",y.style.marginRight=Qk},g=(y,v)=>{y.offsetHeight,y.style.transition=l(),y.style.width="0",y.style.opacity="0",y.style.marginRight="0";const C=b=>{b.propertyName==="width"&&(y.removeEventListener("transitionend",C),v())};y.addEventListener("transitionend",C)};return(y,v)=>(d(),h("button",{type:e.nativeType,class:le(["el-button",e.type&&`el-button--${e.type}`,e.size&&`el-button--${e.size}`,{"is-plain":e.plain,"is-loading":e.loading,"is-disabled":n.value}]),disabled:n.value,"aria-disabled":n.value,onClick:v[0]||(v[0]=C=>s("click",C))},[o(Dn,{onBeforeEnter:A,onEnter:c,onAfterEnter:p,onBeforeLeave:m,onLeave:g},{default:r(()=>[e.loading?(d(),h("span",Dk,v[1]||(v[1]=[i("i",{class:"el-icon is-loading"},[i("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[i("path",{fill:"currentColor",d:"M512 64a32 32 0 0 1 32 32v192a32 32 0 0 1-64 0V96a32 32 0 0 1 32-32m0 640a32 32 0 0 1 32 32v192a32 32 0 1 1-64 0V736a32 32 0 0 1 32-32m448-192a32 32 0 0 1-32 32H736a32 32 0 1 1 0-64h192a32 32 0 0 1 32 32m-640 0a32 32 0 0 1-32 32H96a32 32 0 0 1 0-64h192a32 32 0 0 1 32 32M195.2 195.2a32 32 0 0 1 45.248 0L376.32 331.008a32 32 0 0 1-45.248 45.248L195.2 240.448a32 32 0 0 1 0-45.248zm452.544 452.544a32 32 0 0 1 45.248 0L828.8 783.552a32 32 0 0 1-45.248 45.248L647.744 692.992a32 32 0 0 1 0-45.248zM828.8 195.264a32 32 0 0 1 0 45.184L692.992 376.32a32 32 0 0 1-45.248-45.248l135.808-135.808a32 32 0 0 1 45.248 0m-452.544 452.48a32 32 0 0 1 0 45.248L240.448 828.8a32 32 0 0 1-45.248-45.248l135.808-135.808a32 32 0 0 1 45.248 0z"})])],-1)]))):x("",!0)]),_:1}),i("span",null,[Jt(y.$slots,"default",{},void 0,!0)])],10,$k))}},Tk=Ue(Ik,[["__scopeId","data-v-fa8794a2"]]),Vf={__name:"VueTemplateLoader",props:{widget:{type:Object,required:!0},data:{required:!1}},setup(e){var m,g,y,v,C,b;const t=Gu(zu),a=Object.freeze({get:(...B)=>ie.get(...B),post:(...B)=>ie.post(...B),put:(...B)=>ie.put(...B),delete:(...B)=>ie.delete(...B),patch:(...B)=>ie.patch(...B),upload:(...B)=>ie.upload(...B),getNonce:()=>ie.getNonce()}),s=Object.freeze({success:(...B)=>Y.success(...B),error:(...B)=>Y.error(...B),info:(...B)=>Y.info(...B),validationErrors:(...B)=>Y.validationErrors(...B)}),n=Object.freeze({clipboard:(m=window==null?void 0:window.navigator)==null?void 0:m.clipboard,userAgent:(g=window==null?void 0:window.navigator)==null?void 0:g.userAgent,language:(y=window==null?void 0:window.navigator)==null?void 0:y.language,languages:(v=window==null?void 0:window.navigator)==null?void 0:v.languages,onLine:(C=window==null?void 0:window.navigator)==null?void 0:C.onLine,platform:(b=window==null?void 0:window.navigator)==null?void 0:b.platform}),l=[{pattern:/\balert\s*\(/,label:"alert()"},{pattern:/\bconfirm\s*\(/,label:"confirm()"},{pattern:/\bprompt\s*\(/,label:"prompt()"},{pattern:/\bsetTimeout\s*\(/,label:"setTimeout()"},{pattern:/\bsetInterval\s*\(/,label:"setInterval()"},{pattern:/\brequestAnimationFrame\s*\(/,label:"requestAnimationFrame()"},{pattern:/\bcancelAnimationFrame\s*\(/,label:"cancelAnimationFrame()"},{pattern:/\bqueueMicrotask\s*\(/,label:"queueMicrotask()"},{pattern:/\bfetch\s*\(/,label:"fetch()"},{pattern:/\bXMLHttpRequest\b/,label:"XMLHttpRequest"},{pattern:/\bWebSocket\b/,label:"WebSocket"},{pattern:/\bWorker\b/,label:"Worker"},{pattern:/\bSharedWorker\b/,label:"SharedWorker"},{pattern:/\bEventSource\b/,label:"EventSource"},{pattern:/\bMessageChannel\b/,label:"MessageChannel"},{pattern:/\bBroadcastChannel\b/,label:"BroadcastChannel"},{pattern:/\bwindow\b/,label:"window"},{pattern:/\bdocument\b/,label:"document"},{pattern:/\bnavigator\.(?:serviceWorker|sendBeacon|geolocation|mediaDevices|bluetooth|usb|serial|hid|credentials|locks|wakeLock)\b/,label:"navigator privileged API"},{pattern:/\bglobalThis\b/,label:"globalThis"},{pattern:/\bself\b/,label:"self"},{pattern:/\bparent\b/,label:"parent"},{pattern:/\btop\b/,label:"top"},{pattern:/\bframes\b/,label:"frames"},{pattern:/\blocalStorage\b/,label:"localStorage"},{pattern:/\bsessionStorage\b/,label:"sessionStorage"},{pattern:/\bindexedDB\b/,label:"indexedDB"},{pattern:/\bpostMessage\s*\(/,label:"postMessage()"},{pattern:/\bopen\s*\(/,label:"open()"},{pattern:/\bFileReader\b/,label:"FileReader"},{pattern:/\bBlob\b/,label:"Blob"},{pattern:/\bURL\.createObjectURL\b/,label:"URL.createObjectURL"},{pattern:/\bMutationObserver\b/,label:"MutationObserver"},{pattern:/\bResizeObserver\b/,label:"ResizeObserver"},{pattern:/\bIntersectionObserver\b/,label:"IntersectionObserver"},{pattern:/\bhistory\.(?:pushState|replaceState|go|back|forward)\s*\(/,label:"history navigation"},{pattern:/\blocation\.(?:assign|replace|reload)\s*\(/,label:"location navigation"},{pattern:/\blocation\.href\s*=/,label:"location.href assignment"},{pattern:/\bFunction\b/,label:"Function"},{pattern:/\beval\s*\(/,label:"eval()"},{pattern:/\bnew\s+Function\b/,label:"new Function"},{pattern:/\brequire\s*\(/,label:"require()"},{pattern:/\bimport\s*\(/,label:"import()"},{pattern:/\bReflect\b/,label:"Reflect"},{pattern:/\bProxy\b/,label:"Proxy"},{pattern:/\bprocess\b/,label:"process"},{pattern:/\bmodule\b/,label:"module"},{pattern:/\bexports\b/,label:"exports"},{pattern:/\b__proto__\b/,label:"__proto__"},{pattern:/\b__defineGetter__\b/,label:"__defineGetter__"},{pattern:/\b__defineSetter__\b/,label:"__defineSetter__"}],A=B=>{for(const k of l)if(k.pattern.test(B))return console.error(`Dynamic component script rejected due to blocked token: ${k.label}`),!1;return!0},c=B=>{var k,U;try{if(typeof B!="string")return null;const T=B.match(/]*)?>|