var rf=Object.defineProperty;var df=(e,t,a)=>t in e?rf(e,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[t]=a;var Oe=(e,t,a)=>df(e,typeof t!="symbol"?t+"":t,a);import{r as B,c as $,o as r,w as d,a as n,u as A,b as k,d as o,e as h,f as R,t as f,F as O,g as ae,h as V,i as Qe,j as Ct,k as zt,l as K,m as Ca,n as de,p as ta,q as Ne,s as xn,T as Gl,v as Ce,x as Se,y as Pr,z as $a,A as _l,B as Sl,C as uf,D as ga,E as Cl,G as na,H as cf,I as jl,J as gn,K as vl,L as Xo,M as Af,N as Cc,V as Bc,O as Ss,P as pf,Q as Nr,R as Va,S as jt,U as Vl,W as ff,X as mf,Y as hf,Z as Gs,_ as _f,$ as vf,a0 as gf,a1 as Kr,a2 as yf}from"./chunks/vue.esm-bundler.js?ver=1.5.1";import{u as tl,a as al,o as kc,c as bf,b as wf}from"./chunks/vue-router.js?ver=1.5.1";import{_ as ee,a as qt}from"./chunks/DynamicIcon.js?ver=1.5.1";import{T as Fs,_ as $s,a as Gr,F as Co,b as Za,B as Aa,P as Vn,c as xc,d as Cf,e as Bf,m as kf}from"./chunks/Badge.js?ver=1.5.1";import{t as u,a as Xt,A as ze,p as Bo}from"./chunks/Translator.js?ver=1.5.1";import{_ as _t,P as ll}from"./chunks/Empty.js?ver=1.5.1";import{_ as jr,a as Fa,b as Sc,c as Fc,L as zr,d as Jo,O as $c,e as Zo,P as qr,C as Yl}from"./chunks/OrderCustomerInformation.js?ver=1.5.1";import{_ as Pt,p as Sn}from"./chunks/UserCan.js?ver=1.5.1";import{C as Je}from"./chunks/CurrencyFormatter.js?ver=1.5.1";import{_ as Pa,a as Yr,b as Wr,c as xf,S as Ec,d as Uc,e as Sf,A as Ic,f as Qc}from"./chunks/CancelSubscription.js?ver=1.5.1";import{_ as wa,C as Ve,a as ke,b as xe}from"./chunks/CardBody.js?ver=1.5.1";import{_ as lt}from"./chunks/_plugin-vue_export-helper.js?ver=1.5.1";import{S as Lt}from"./chunks/Storage.js?ver=1.5.1";import{c as Ff,h as Xs,a as ar,g as Dc,f as $f,b as ks,$ as il,d as Ef}from"./chunks/common.js?ver=1.5.1";import{I as Xe}from"./chunks/IconButton.js?ver=1.5.1";import{M as sl}from"./chunks/Model.js?ver=1.5.1";import{R as ce}from"./chunks/Rest.js?ver=1.5.1";import{d as at,g as Uf}from"./chunks/dayjs.min.js?ver=1.5.1";import{a as ei,E as Ja,m as If,b as rl,d as gs,i as nl,c as Qf,s as Vc,e as ko,f as Xr,r as Jr,g as Tc,p as $d,w as Df,h as ti,l as Vf,j as qs,k as Tf,n as Mf,o as xo,t as Lf,q as Rf,u as Of,v as Hf,x as Pf,y as Nf,z as Kf,A as Gf}from"./chunks/index.js?ver=1.5.1";import{n as z}from"./chunks/Notify.js?ver=1.5.1";import{_ as _a}from"./chunks/Animation.js?ver=1.5.1";import{_ as Wl,T as Te,m as Ha,a as Rl,i as Jt,r as jf,L as lr,b as Mc,d as Lc,c as Rc}from"./chunks/dateShortCuts.js?ver=1.5.1";import{S as Ea,_ as Ua,u as ps,a as zf,b as qf,c as Yf}from"./chunks/countries.js?ver=1.5.1";import{u as fs,L as ca,_ as ai}from"./chunks/NotFound.js?ver=1.5.1";import{A as cs}from"./chunks/Asset.js?ver=1.5.1";import{E as Wf}from"./chunks/index2.js?ver=1.5.1";import{S as oa}from"./chunks/Str.js?ver=1.5.1";import{A as rt}from"./chunks/Arr.js?ver=1.5.1";import{C as hs,V as Js,_ as la,c as Fn,a as ho,b as Xf,d as Jf}from"./chunks/AttrGroups.js?ver=1.5.1";import{U as Zs}from"./chunks/Url.js?ver=1.5.1";import{u as li,t as Oc}from"./chunks/timezone.js?ver=1.5.1";import{e as $n,i as Zr,U as ed,p as Zf}from"./chunks/Utils.js?ver=1.5.1";import{_ as an,P as Hc}from"./chunks/ProductVariationSelector.js?ver=1.5.1";import{f as ha,a as em,p as tm,b as am,g as lm,c as sm,d as nm}from"./chunks/productService.js?ver=1.5.1";import{B as So}from"./chunks/BundleProducts.js?ver=1.5.1";import{E as Ed}from"./chunks/index3.js?ver=1.5.1";import{T as Ud}from"./chunks/TransitionAccordion.js?ver=1.5.1";import{_ as Pc}from"./chunks/FileUploaderDialog.js?ver=1.5.1";import{E as Qs,v as om,i as im}from"./chunks/defaults.js?ver=1.5.1";import rm from"./chunks/Screenshot.js?ver=1.5.1";import{u as dm}from"./chunks/useElementPlusComponents.js?ver=1.5.1";import"./chunks/AddressComponent2.js?ver=1.5.1";import"./chunks/index4.js?ver=1.5.1";class um extends Fs{getTabs(){return{}}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"}}function Nc(e){return um.init(e)}const cm={class:"table-cell"},Am={class:"fct-product-info-card w-full"},pm={class:"fct-product-info-media"},fm={class:"fct-product-info-details grow-0 shrink-0 basis-[calc(100%-52px)]",style:{overflow:"hidden"}},mm={class:"fct-product-info-name flex flex-col items-start gap-3"},hm={class:"table-cell"},_m={class:"table-cell"},vm={class:"table-cell"},gm={class:"table-cell"};const ym={__name:"CustomersLoader",props:{nextPageCount:{type:Number,default:0},customerTable:{type:Object,default:()=>({})}},setup(e){const t=e,a=Array.from({length:t.nextPageCount},(l,s)=>s+1);return(l,s)=>{const i=B("el-table-column"),c=B("el-skeleton-item"),p=B("el-table"),m=B("el-skeleton");return r(),$(m,{animated:""},{template:d(()=>[n(p,{data:A(a),class:"w-full compact-table responsive"},{empty:d(()=>s[0]||(s[0]=[])),default:d(()=>[k("",!0),n(i,{label:l.$t("Customer"),width:"300"},{default:d(()=>[o("div",cm,[o("div",Am,[o("div",pm,[n(c,{varient:"image",class:"w-10 h-10.5 rounded-full flex-none"})]),o("div",fm,[o("div",mm,[n(c,{varient:"p",class:"max-w-[190px]"}),n(c,{varient:"p",class:"max-w-[100px]"})])])])])]),_:1},8,["label"]),n(i,{label:l.$t("Address"),width:"300"},{default:d(()=>[o("div",hm,[n(c,{varient:"p",class:"w-4/5"})])]),_:1},8,["label"]),n(i,{label:l.$t("Purchases"),width:"150"},{default:d(()=>[o("div",_m,[n(c,{varient:"p",class:"w-3/5"})])]),_:1},8,["label"]),e.customerTable.isColumnVisible("last_purchase_date")?(r(),$(i,{key:1,label:l.$t("Last Purchase Date"),width:"200"},{default:d(()=>[o("div",vm,[n(c,{varient:"p",class:"w-4/5"})])]),_:1},8,["label"])):k("",!0),e.customerTable.isColumnVisible("customer_since")?(r(),$(i,{key:2,label:l.$t("Customer Since"),width:"150"},{default:d(()=>[o("div",gm,[n(c,{varient:"p",class:"w-4/5"})])]),_:1},8,["label"])):k("",!0),(e.customerTable.isColumnVisible("actions"),k("",!0))]),_:1},8,["data"])]),_:1})}}},bm={key:0,class:"fct-customer-card"},wm={class:"fct-customer-avatar"},Cm=["src"],Bm={class:"fct-customer-details"},km={class:"fct-customer-name"},xm={class:"fct-customer-id"},Sm={class:"fct-customer-email"},Fm=["innerHTML"],$m={key:1},Em={__name:"CustomersTable",props:{table:{type:Object,required:!0}},setup(e){return(t,a)=>{const l=B("el-table-column"),s=B("el-table");return r(),$(s,{data:e.table.getTableData(),class:"w-full compact-table"},{empty:d(()=>[n(_t,{icon:"Empty/ListView","has-dark":!0,text:A(u)("No customer found!")},null,8,["text"])]),default:d(()=>[k("",!0),n(l,{label:A(u)("Customer"),width:"300"},{default:d(i=>{var c;return[n(wa,{class:"hover:no-underline",to:{name:"view_customer",params:{customer_id:(c=i.row)==null?void 0:c.id}}},{default:d(()=>{var p,m,_,g,y;return[(p=i.row)!=null&&p.id?(r(),h("div",bm,[o("div",wm,[o("span",null,[o("img",{src:(m=i.row)==null?void 0:m.photo,alt:"avatar"},null,8,Cm)])]),o("div",Bm,[o("div",km,[R(f(((_=i.row)==null?void 0:_.full_name)||A(u)("No Name"))+" ",1),o("span",xm,"#"+f(A(Xt)((g=i.row)==null?void 0:g.id)),1)]),o("div",Sm,f((y=i.row)==null?void 0:y.email),1)])])):k("",!0)]}),_:2},1032,["to"])]}),_:1},8,["label"]),n(l,{label:A(u)("Address"),width:"300"},{default:d(i=>{var c;return[n(wa,{class:"hover:no-underline",to:{name:"view_customer",params:{customer_id:(c=i.row)==null?void 0:c.id}}},{default:d(()=>[R(f(t.getOrderAddress(i.row)),1)]),_:2},1032,["to"])]}),_:1},8,["label"]),n(l,{label:A(u)("Purchases"),width:90},{default:d(i=>{var c;return[n(wa,{class:"hover:no-underline",to:{name:"view_customer",params:{customer_id:(c=i.row)==null?void 0:c.id}}},{default:d(()=>[R(f(A(Xt)(i.row.purchase_count)),1)]),_:2},1032,["to"])]}),_:1},8,["label"]),e.table.isColumnVisible("ltv")?(r(),$(l,{key:1,label:A(u)("LTV"),width:100},{default:d(i=>{var c;return[n(wa,{class:"hover:no-underline",to:{name:"view_customer",params:{customer_id:(c=i.row)==null?void 0:c.id}}},{default:d(()=>[o("span",{innerHTML:A(Je).formatNumber(i.row.ltv,!0,!1)},null,8,Fm)]),_:2},1032,["to"])]}),_:1},8,["label"])):k("",!0),e.table.isColumnVisible("last_purchase_date")?(r(),$(l,{key:2,label:A(u)("Last Purchase Date"),width:"200"},{default:d(i=>{var c;return[n(wa,{class:"hover:no-underline",to:{name:"view_customer",params:{customer_id:(c=i.row)==null?void 0:c.id}}},{default:d(()=>[i.row.last_purchase_date?(r(),$(Pa,{key:0,"date-time":i.row.last_purchase_date},null,8,["date-time"])):(r(),h("span",$m,"---"))]),_:2},1032,["to"])]}),_:1},8,["label"])):k("",!0),e.table.isColumnVisible("customer_since")?(r(),$(l,{key:3,label:A(u)("Customer Since"),width:"150"},{default:d(i=>{var c;return[n(wa,{class:"hover:no-underline",to:{name:"view_customer",params:{customer_id:(c=i.row)==null?void 0:c.id}}},{default:d(()=>[n(Pa,{"date-time":i.row.created_at},null,8,["date-time"])]),_:2},1032,["to"])]}),_:1},8,["label"])):k("",!0)]),_:1},8,["data"])}}},Um={class:"fct-customer-table-mobile-wrap"},Im=["onClick"],Qm={class:"fct-customer-table-mobile-header"},Dm={key:0,class:"fct-customer-table-customer-col fct-customer-card"},Vm={class:"fct-customer-avatar"},Tm=["src"],Mm={class:"fct-customer-details"},Lm={class:"fct-customer-name"},Rm={class:"fct-customer-id"},Om={class:"fct-customer-email"},Hm={class:"fct-customer-table-purchases-col"},Pm={class:"fct-customer-table-mobile-body"},Nm={class:"fct-customer-table-mobile-body-list"},Km={key:0,class:"fct-customer-table-ltv-col"},Gm={class:"label"},jm=["innerHTML"],zm={key:1,class:"fct-customer-table-last-purchase-date-col"},qm={class:"label"},Ym={class:"value"},Wm={key:2,class:"fct-customer-table-customer-since-col"},Xm={class:"label"},Jm={class:"value"},Zm={class:"fct-customer-table-mobile-footer"},eh={class:"fct-customer-table-address-col"},th={key:0,class:"py-6 text-center"},ah={__name:"CustomersTableMobile",props:{table:{type:Object,required:!0},emptyText:{type:String,default:u("No customers found.")}},setup(e){return(t,a)=>(r(),h("div",Um,[(r(!0),h(O,null,ae(e.table.getTableData(),(l,s)=>(r(),h("div",{key:l.id,class:"fct-customer-table-mobile-row",onClick:i=>t.$router.push({name:"view_customer",params:{customer_id:l.id}})},[o("div",Qm,[l!=null&&l.id?(r(),h("div",Dm,[o("div",Vm,[o("img",{src:l==null?void 0:l.photo,alt:"avatar"},null,8,Tm)]),o("div",Mm,[o("div",Lm,[R(f((l==null?void 0:l.full_name)||A(u)("No Name"))+" ",1),o("span",Rm,"#"+f(l==null?void 0:l.id),1)]),o("div",Om,f(l==null?void 0:l.email),1)])])):k("",!0),o("div",Hm,f(l.purchase_count)+" "+f(l.purchase_count>1?A(u)("Purchases"):A(u)("Purchase")),1)]),o("div",Pm,[o("ul",Nm,[e.table.isColumnVisible("ltv")?(r(),h("li",Km,[o("div",Gm,f(A(u)("LTV:")),1),o("div",{class:"value",innerHTML:A(Je).formatNumber(l.ltv,!0,!1)},null,8,jm)])):k("",!0),e.table.isColumnVisible("last_purchase_date")?(r(),h("li",zm,[o("div",qm,f(A(u)("Last Purchase Date:")),1),o("div",Ym,[n(Pa,{"date-time":l.last_purchase_date},null,8,["date-time"])])])):k("",!0),e.table.isColumnVisible("customer_since")?(r(),h("li",Wm,[o("div",Xm,f(A(u)("Customer Since:")),1),o("div",Jm,[n(Pa,{"date-time":l.created_at},null,8,["date-time"])])])):k("",!0)])]),o("div",Zm,[o("div",eh,[n(ee,{name:"LocationPin"}),R(" "+f(t.getOrderAddress(l)),1)])])],8,Im))),128)),e.table.getTableData().length===0?(r(),h("div",th,[n(_t,{icon:"Empty/Order","has-dark":"",text:e.emptyText},null,8,["text"])])):k("",!0)]))}},lh={},sh={class:"px-4 py-3"},nh={class:"flex items-center justify-between mb-3"},oh={class:"flex items-center justify-between mb-3"},ih={class:"flex items-center justify-between mb-3"},rh={class:"flex items-center justify-between mb-3"};function dh(e,t){const a=B("el-skeleton-item"),l=B("el-skeleton");return r(),$(l,{animated:""},{template:d(()=>[o("div",sh,[o("div",nh,[n(a,{varient:"p",class:"w-1/2"}),n(a,{varient:"p",class:"w-[100px]"})]),o("div",oh,[n(a,{varient:"p",class:"w-[50px]"}),n(a,{varient:"p",class:"w-[80px]"})]),o("div",ih,[n(a,{varient:"p",class:"w-[120px]"}),n(a,{varient:"p",class:"w-[100px]"})]),o("div",rh,[n(a,{varient:"p",class:"w-[100px]"}),n(a,{varient:"p",class:"w-[100px]"})]),n(a,{varient:"p",class:"w-[230px]"})])]),_:1})}const uh=lt(lh,[["render",dh]]),ch={class:"fct-all-customers-page fct-layout-width"},Ah={class:"fct-all-customers-wrap"},ph={key:1},fh={__name:"AllCustomers",setup(e){const t=Nc(),a=V({showModal:!1,action:"create",title:u("Create New Customer"),customer:{}}),l=V(!1),s=()=>{l.value=window.innerWidth<768};return Qe(()=>{s(),window.addEventListener("resize",s)}),Ct(()=>{window.removeEventListener("resize",s)}),(i,c)=>{const p=B("el-button");return r(),h("div",ch,[n(Pt,{permission:"customers/manage"},{default:d(()=>[n(ll,{title:A(u)("Customers")},{action:d(()=>[n(p,{type:"primary",onClick:c[0]||(c[0]=m=>a.value.showModal=!0)},{default:d(()=>[R(f(A(u)("Add Customer")),1)]),_:1})]),_:1},8,["title"])]),_:1}),n(Pt,{permission:"customers/view"},{default:d(()=>[o("div",Ah,[n($s,{table:A(t),"has-mobile-slot":!0},{mobile:d(()=>[A(t).isLoading()?(r(),$(uh,{key:0})):k("",!0),n(ah,{table:A(t)},null,8,["table"])]),default:d(()=>[A(t).isLoading()?(r(),$(ym,{key:0,customerTable:A(t),"next-page-count":A(t).nextPageCount},null,8,["customerTable","next-page-count"])):(r(),h("div",ph,[n(Em,{table:A(t)},null,8,["table"])]))]),_:1},8,["table"])])]),_:1}),n(Pt,{permission:"customers/manage"},{default:d(()=>[n(jr,{"onUpdate:customerModal":c[1]||(c[1]=()=>{a.value.showModal=!1,a.value.customer={},A(t).fetch()}),customerModalInfos:a.value,customer_id:a.value.customer_id,customer:a.value.customer,onCloseModal:c[2]||(c[2]=m=>a.value.showModal=!1)},null,8,["customerModalInfos","customer_id","customer"])]),_:1})])}}};class mh extends Fs{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 Kc(e){return mh.init(e)}const hh={class:"fct-order-stats-card"},_h={class:"fct-order-stats-card-head"},vh={class:"fct-order-stats-card-head-content"},gh={class:"text"},yh={key:0,class:"value"},bh={class:"fct-order-stats-card-body"},wh={key:0,class:"change-wrap"},Ch={key:0,class:"change-title"},Bh={key:1,class:"change-title"},kh={key:1,class:"change-wrap"},xh={class:"change-title"},Sh={__name:"StatCard",props:{direction:String,stat:Object,statRanges:Object,currentRange:String|Number,statKey:String|Number,loading:Boolean},setup(e){const t=zt().ctx,a=e,l=K(()=>{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"}}),s=K(()=>c.value===0?"":c.value>0?"success":"danger"),i=m=>m.is_cents?t.formatNumber(m.current_count):Xt(m.current_count),c=K(()=>{let m=Ff(a.stat.current_count,a.stat.compare_count)??0;return m===""?0:m}),p=K(()=>a.statRanges[a.currentRange].label);return(m,_)=>{const g=B("el-skeleton"),y=B("el-skeleton-item");return r(),h("div",hh,[o("div",_h,[n(Xe,{size:"large",bg:l.value,soft:""},{default:d(()=>[Ca(m.$slots,"icon")]),_:3},8,["bg"]),o("div",vh,[n(g,{loading:e.loading,animated:"",rows:0},null,8,["loading"]),o("span",gh,f(e.stat.title),1),e.loading?k("",!0):(r(),h("div",yh,f(i(e.stat)),1))])]),o("div",bh,[n(g,{loading:e.loading,animated:""},{template:d(()=>[n(y,{variant:"p",class:"w-1/2 h-4"})]),_:1},8,["loading"]),!e.loading&&e.currentRange!=="all_time"?(r(),h("div",wh,[o("span",{class:de("change "+s.value)},[c.value!==0?(r(),$(ee,{key:0,name:c.value>0?"CaretUp":"CaretDown"},null,8,["name"])):k("",!0),R(" "+f(c.value===0?m.$t("Same as previous"):Math.abs(c.value)+"%"),1)],2),c.value>0?(r(),h("span",Ch,f(A(u)("More than %s",p.value==="Today"?m.$t("Yesterday"):m.$t(p.value))),1)):c.value<0?(r(),h("span",Bh,f(A(u)("Less than %s",p.value==="Today"?m.$t("Yesterday"):m.$t(p.value))),1)):k("",!0)])):k("",!0),!e.loading&&e.currentRange==="all_time"?(r(),h("div",kh,[o("span",xh,f(m.$t("All Time")),1)])):k("",!0)])])}}},Fh={name:"CardFooter"},$h={class:"fct-card-footer"};function Eh(e,t,a,l,s,i){return r(),h("div",$h,[Ca(e.$slots,"default")])}const td=lt(Fh,[["render",Eh]]);class Gc{constructor(){Oe(this,"_attributes",{})}attribute(t,a){return this._attributes[t]=a,this}setAttribute(t){return this._attributes=typeof t=="object"?t:this._attributes,this}}class rs{static install(t,a,l={},s=!1){const i=new a(...Object.values(l));Object.keys(i).forEach(c=>{(s||!t.hasOwnProperty(c))&&(t[c]=i[c])}),Object.getOwnPropertyNames(a.prototype).forEach(c=>{c!=="constructor"&&typeof i[c]=="function"&&(s||typeof t[c]!="function")&&(t[c]=i[c].bind(t))})}}class Uh extends sl{constructor(){super(...arguments);Oe(this,"data",{salesGrowthChart:[],countryHeatMap:[],fluctuations:[],dashBoardStats:[],recentOrders:[],recentActivities:[],topSoldProducts:[],currencySign:ze.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,l,s,i){this.data.isBusy[i]=!0,typeof l!="object"&&(l={});const c=ce.get(`reports/${a}`,l);return this.resolvePromiseResponse(c,s,i),c}resolvePromiseResponse(a,l=null,s=null){a.then(i=>{s==null||l==null||(this.data[s]=i[l])}).catch(i=>{}).finally(()=>{this.data.isBusy[s]=!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 Ka=Uh.init(),Ih={},Qh={class:"fct-order-stats-row"},Dh={class:"p-4 bg-gray-25 rounded dark:bg-primary-500"},Vh={class:"flex items-center gap-2 mb-3"},Th={class:"right flex flex-col flex-1 gap-2"};function Mh(e,t){const a=B("el-skeleton-item"),l=B("el-skeleton");return r(),h("div",Qh,[(r(),h(O,null,ae(4,s=>n(l,{animated:"",key:s},{template:d(()=>[o("div",Dh,[o("div",Vh,[n(a,{variant:"p",class:"rounded w-10 h-10 block"}),o("div",Th,[n(a,{variant:"p",class:"rounded w-4/5 block"}),n(a,{variant:"p",class:"rounded w-1/2 block"})])]),o("div",null,[n(a,{variant:"p",class:"rounded w-2/3 block"})])])]),_:2},1024)),64))])}const Lh=lt(Ih,[["render",Mh]]),Rh={class:"fct-order-stats-wrap"},Oh={class:"fct-order-stats-actions flex items-center gap-2.5"},Hh={class:"fct-order-stats-body"},Ph={key:1,class:"fct-order-stats-row"},Nh={class:"flex justify-end mt-2"},Kh=Object.assign({name:"OrderStatBar"},{__name:"OrderStatBar",setup(e){const t=V(Lt.get("order_stat_collapse",!1)),a=V(""),l=zt().ctx,s=V(!1),i=V(!0),c=V(!1),p=V("-7 days"),m=tl(),_=V({"-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(p.value!==v)try{p.value=v,a.value="collapse",t.value===!0&&(t.value=!1,Lt.set("order_stat_collapse",t.value)),await Promise.all([l.Storage().set("order_quick_stat_bar_range",p.value),y()])}catch{}},y=()=>{c.value=!1,i.value=!0;const v={"-0 days":[at().startOf("day").format("YYYY-MM-DD"),at().endOf("day").format("YYYY-MM-DD")],"-7 days":[at().subtract(7,"days").startOf("day").format("YYYY-MM-DD"),at().endOf("day").format("YYYY-MM-DD")],"-30 days":[at().subtract(30,"days").startOf("day").format("YYYY-MM-DD"),at().endOf("day").format("YYYY-MM-DD")],this_month:[at().startOf("month").format("YYYY-MM-DD"),at().endOf("day").format("YYYY-MM-DD")],all_time:[null,null]},[C,b]=v[p.value]||[at().startOf("month"),at().endOf("day")],w={startDate:C,endDate:b,paymentStatus:"all"};Ka.getDashboardStats({params:{...w}}).then(()=>{s.value=Ka.data.dashBoardStats}).catch(x=>{}).finally(()=>{i.value=!1})};return Qe(()=>{p.value=Lt.get("order_quick_stat_bar_range","-0 days");let v=Lt.get("order_quick_stat_bar_collapse_item");a.value=v===null?"collapse":v,y()}),(v,C)=>{const b=B("el-button");return r(),h("div",Rh,[n(xe,null,{default:d(()=>[n(Ve,{title:A(u)("Order Stats Overview"),border_bottom:""},{action:d(()=>[o("div",Oh,[n(Gr,{class:"hide-animation-on-mobile"},{default:d(()=>[(r(!0),h(O,null,ae(_.value,(w,x)=>(r(),$(Co,{title:`${A(u)("Order Stats Overview of")} ${w.label}`,tabindex:"0",key:x,onClick:F=>g(x),class:de(x===p.value?"active":"")},{default:d(()=>[R(f(w.label),1)]),_:2},1032,["title","onClick","class"]))),128))]),_:1})])]),_:1},8,["title"]),n(ke,null,{default:d(()=>[o("div",Hh,[i.value?(r(),$(Lh,{key:0})):(r(),h("div",Ph,[(r(!0),h(O,null,ae(s.value,(w,x)=>(r(),h("div",{key:x,class:"fct-order-stats-col cursor-pointer",onClick:C[0]||(C[0]=F=>A(m).push({name:"reports_orders"}))},[(r(),$(Sh,{key:x,stat:w,"current-range":p.value,"stat-ranges":_.value,loading:i.value,"stat-key":x},{icon:d(()=>[n(ee,{name:w.icon},null,8,["name"])]),_:2},1032,["stat","current-range","stat-ranges","loading","stat-key"]))]))),128))])),o("div",Nh,[n(b,{text:"",class:"underline-link-button",onClick:C[1]||(C[1]=w=>A(m).push({name:"reports_orders"}))},{default:d(()=>[R(f(A(u)("See Full Report")),1)]),_:1})])])]),_:1})]),_:1})])}}}),Gh={class:"table-cell"},jh={class:"table-cell"},zh={class:"table-cell"},qh={class:"table-cell"},Yh={class:"table-cell items-center gap-1"},Wh={class:"table-cell"},Xh={class:"table-cell"},Jh={class:"table-cell"},Zh={__name:"OrdersLoader",props:{nextPageCount:{type:Number,default:0},orderTable:{type:Object,default:()=>({})}},setup(e){const t=e,a=s=>t.orderTable.columns.includes(s),l=Array.from({length:t.nextPageCount},(s,i)=>i+1);return(s,i)=>{const c=B("el-table-column"),p=B("el-skeleton-item"),m=B("el-table"),_=B("el-skeleton");return r(),$(_,{animated:""},{template:d(()=>[n(m,{data:A(l),class:"w-full compact-table responsive"},{empty:d(()=>i[0]||(i[0]=[])),default:d(()=>[k("",!0),n(c,{label:s.$t("# Date"),width:140},{default:d(()=>[o("div",Gh,[n(p,{varient:"p",class:"w-4/5"})])]),_:1},8,["label"]),a("customer")?(r(),$(c,{key:1,width:"100",label:s.$t("Customer")},{default:d(()=>[o("div",jh,[n(p,{varient:"p",class:"w-4/5"})])]),_:1},8,["label"])):k("",!0),a("order_items")?(r(),$(c,{key:2,label:s.$t("Items"),width:"250"},{default:d(()=>[o("div",zh,[n(p,{varient:"p",class:"w-4/5"})])]),_:1},8,["label"])):k("",!0),n(c,{width:"100",label:s.$t("Total")},{default:d(()=>[o("div",qh,[n(p,{varient:"p",class:"w-4/5"})])]),_:1},8,["label"]),n(c,{width:"150",label:s.$t("Payment Status")},{default:d(()=>[o("div",Yh,[n(p,{varient:"p",class:"w-4/5"}),n(p,{varient:"p",class:"w-3/5"})])]),_:1},8,["label"]),a("status")?(r(),$(c,{key:3,width:"150",label:s.$t("Status")},{default:d(()=>[o("div",Wh,[n(p,{varient:"p",class:"w-4/5"})])]),_:1},8,["label"])):k("",!0),a("type")?(r(),$(c,{key:4,width:"110",label:s.$t("Order Type")},{default:d(()=>[o("div",Xh,[n(p,{varient:"p",class:"w-4/5"})])]),_:1},8,["label"])):k("",!0),a("actions")?(r(),$(c,{key:5,width:"60",label:""},{default:d(()=>[o("div",Jh,[n(p,{varient:"p",class:"w-3/5"})])]),_:1})):k("",!0)]),_:1},8,["data"])]),_:1})}}},e_={},t_={class:"px-4 py-3"},a_={class:"grid grid-cols-3 gap-5 mt-5"};function l_(e,t){const a=B("el-skeleton-item"),l=B("el-skeleton");return r(),$(l,{animated:""},{template:d(()=>[o("div",t_,[(r(),h(O,null,ae(2,s=>o("div",{key:s,class:"flex items-center justify-between mb-3"},[n(a,{varient:"p",class:"w-1/2"}),n(a,{varient:"p",class:"w-[100px]"})])),64)),o("div",a_,[(r(),h(O,null,ae(3,s=>o("div",{key:s},[n(a,{varient:"p",class:"w-1/2"}),n(a,{varient:"p",class:"w-[100px]"})])),64))])])]),_:1})}const s_=lt(e_,[["render",l_]]),n_={class:"fct-all-orders-page fct-layout-width"},o_={class:"fct-delete-test-orders-content"},i_={if:"deleteTestOrdersProgressTitle",class:"fct-delete-test-orders-title"},r_={class:"fct-delete-test-orders-meta"},d_={class:"fct-delete-test-orders-text"},u_={key:0,class:"fct-delete-test-orders-loading"},c_={class:"fct-test-orders-loading-content"},A_={class:"fct-loading-bars"},p_=["id"],f_={class:"fct-delete-test-orders-percentage"},m_={class:"fct-delete-test-orders-stats"},h_={class:"fct-delete-test-orders-stat-row"},__={class:"fct-delete-test-orders-stat-label"},v_={class:"fct-delete-test-orders-stat-value"},g_={class:"fct-delete-test-orders-stat-row"},y_={class:"fct-delete-test-orders-stat-label"},b_={class:"fct-delete-test-orders-stat-value is-success"},w_={class:"fct-delete-test-orders-stat-row"},C_={class:"fct-delete-test-orders-stat-label"},B_={class:"fct-delete-test-orders-stat-value is-danger"},k_={key:1,class:"fct-delete-test-orders-message"},x_={key:0,class:"dialog-footer"},S_={class:"fct-all-orders-wrap"},F_={__name:"AllOrders",setup(e){const t=Kc({instance:zt()}),a=V(!1),l=V(!1),s=V(!1),i=V(!1),c=V({total:0,processed:0,deleted:0,failed:0}),p=V(""),m=K(()=>c.value.total?Math.min(100,Math.round(c.value.processed/c.value.total*100)):0),_=K(()=>{if(!c.value.total)return"";const F=Math.min(c.value.processed,c.value.total);return s.value?u("Deleting %1$s of %2$s Test Orders",F,c.value.total):u("Deleted %1$s of %2$s Test Orders",F,c.value.total)}),g=K(()=>c.value.total?s.value?u("Deleting... %s%",m.value):u("Completed"):""),y=()=>{l.value=window.innerWidth<768},v=()=>{c.value={total:0,processed:0,deleted:0,failed:0},p.value=""},C=F=>{F==="show_order_stats"&&(Lt.set("show_order_stats",!a.value),a.value=!a.value),F==="show_delete_bulk_action"&&t.showBulkDeleteAction(!0),F==="hide_delete_bulk_action"&&t.showBulkDeleteAction(!1),F==="delete_test_orders"&&b()},b=async()=>{var F,L;if(!s.value){try{await Ja.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}s.value=!0,i.value=!0,v();try{let U=0,S=0,M=0;for(;;){const T=await ce.post("orders/do-bulk-action",{action:"delete_test_orders",last_order_id:U}),Q=T||{};if(S=S||Number(Q.total_count||0),M+=Number(Q.batch_count||0),c.value={total:S,processed:M,deleted:c.value.deleted+Number(Q.deleted_count||0),failed:c.value.failed+Number(Q.failed_count||0)},p.value=Q.has_more?u("Processed %1$s of %2$s test orders...",Math.min(M,S),S):(T==null?void 0:T.message)||"",!Q.has_more)break;U=Number(Q.last_attempted_order_id||0),await new Promise(E=>setTimeout(E,100))}if(!c.value.total){i.value=!1,z.info(u("No test orders found to delete"));return}const I=c.value.failed?u("Deleted %1$s test orders. %2$s test orders could not be deleted.",c.value.deleted,c.value.failed):u("Deleted %s test orders successfully",c.value.deleted);p.value=I,z.success(I),t.fetch()}catch(U){p.value=((F=U==null?void 0:U.data)==null?void 0:F.message)||u("Failed to delete test orders"),z.error(((L=U==null?void 0:U.data)==null?void 0:L.message)||u("Failed to delete test orders"))}finally{s.value=!1}}},w=()=>{i.value=!1},x=()=>{const F=Lt.get("show_order_stats");F&&(a.value=F)};return Qe(()=>{x(),y(),window.addEventListener("resize",y)}),Ct(()=>{window.removeEventListener("resize",y)}),(F,L)=>{const U=B("el-icon"),S=B("el-button"),M=B("el-dropdown-item"),I=B("el-dropdown-menu"),T=B("el-dropdown"),Q=B("el-tag"),E=B("el-progress"),D=B("el-dialog");return r(),h("div",n_,[n(ll,{title:A(u)("Orders")},{action:d(()=>[n(Pt,{permission:["reports/view","orders/manage"]},{default:d(()=>[n(T,{trigger:"click","popper-class":"fct-dropdown",onCommand:C,placement:"bottom-end"},{dropdown:d(()=>[n(I,null,{default:d(()=>[n(Pt,{permission:"reports/view"},{default:d(()=>[n(M,{command:"show_order_stats"},{default:d(()=>[a.value?(r(),h(O,{key:1},[n(ee,{name:"EyeOff"}),R(" "+f(A(u)("Hide Order Stats")),1)],64)):(r(),h(O,{key:0},[n(ee,{name:"Eye"}),R(" "+f(A(u)("Show Order Stats")),1)],64))]),_:1}),A(t).data.showDeleteBulkAction?k("",!0):(r(),$(M,{key:0,command:"show_delete_bulk_action"},{default:d(()=>[n(ee,{name:"Eye"}),R(" "+f(A(u)("Show Bulk Actions")),1)]),_:1})),A(t).data.showDeleteBulkAction?(r(),$(M,{key:1,command:"hide_delete_bulk_action"},{default:d(()=>[n(ee,{name:"EyeOff"}),R(" "+f(A(u)("Hide Bulk Actions")),1)]),_:1})):k("",!0)]),_:1}),n(Pt,{permission:"orders/manage"},{default:d(()=>[n(M,{command:"delete_test_orders",disabled:s.value,class:"item-destructive"},{default:d(()=>[n(ee,{name:"Delete"}),R(" "+f(s.value?A(u)("Deleting Test Orders..."):A(u)("Delete Test Orders")),1)]),_:1},8,["disabled"])]),_:1})]),_:1})]),default:d(()=>[n(S,null,{default:d(()=>[R(f(A(u)("More actions"))+" ",1),n(U,null,{default:d(()=>[n(A(ei))]),_:1})]),_:1})]),_:1})]),_:1}),n(Pt,{permission:"orders/create"},{default:d(()=>[n(S,{tag:"router-link",type:"primary",to:{name:"add_order"}},{default:d(()=>[R(f(A(u)("Create Order")),1)]),_:1})]),_:1})]),_:1},8,["title"]),n(D,{modelValue:i.value,"onUpdate:modelValue":L[0]||(L[0]=H=>i.value=H),title:A(u)("Delete Test Orders"),"append-to-body":!0,"close-on-click-modal":!1,"show-close":!0,"close-on-press-escape":!0,onClose:w,class:"fct-delete-test-orders-modal"},{footer:d(()=>[s.value?k("",!0):(r(),h("div",x_,[n(S,{type:"primary",onClick:w},{default:d(()=>[R(f(A(u)("Done")),1)]),_:1})]))]),default:d(()=>[o("div",o_,[o("div",i_,f(_.value),1),o("div",r_,[o("div",d_,f(s.value?A(u)("You can close this — deletion will continue in the background"):A(u)("Test order deletion completed.")),1),g.value?(r(),$(Q,{key:0,type:"success",class:de(["fct-delete-test-orders-status",{"is-complete":!s.value}])},{default:d(()=>[R(f(g.value),1)]),_:1},8,["class"])):k("",!0)]),s.value?(r(),h("div",u_,[o("div",c_,[o("div",A_,[(r(),h(O,null,ae(8,H=>o("div",{key:H,class:"bar-block",id:`bar-block-${H+1}`},null,8,p_)),64))]),R(" "+f(A(u)("Deleting...")),1)]),o("span",f_,f(m.value)+"% ",1)])):k("",!0),n(_a,{visible:s.value,fade:"",duration:300},{default:d(()=>[n(E,{percentage:m.value,"stroke-width":6,striped:"","striped-flow":"","show-text":!1,status:s.value?void 0:"success",class:"fct-delete-test-orders-progress"},null,8,["percentage","status"])]),_:1},8,["visible"]),o("div",m_,[o("div",h_,[L[1]||(L[1]=o("span",{class:"fct-delete-test-orders-stat-icon"},[o("svg",{width:"24",height:"24",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[o("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"}),o("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)),o("span",__,f(A(u)("Processed")),1),o("span",v_,f(c.value.processed)+" / "+f(c.value.total),1)]),o("div",g_,[L[2]||(L[2]=o("span",{class:"fct-delete-test-orders-stat-icon"},[o("svg",{width:"24",height:"24",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[o("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"}),o("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)),o("span",y_,f(A(u)("Deleted")),1),o("span",b_,f(c.value.deleted),1)]),o("div",w_,[L[3]||(L[3]=o("span",{class:"fct-delete-test-orders-stat-icon"},[o("svg",{width:"24",height:"24",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[o("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"}),o("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)),o("span",C_,f(A(u)("Failed")),1),o("span",B_,f(c.value.failed),1)])]),p.value&&!s.value?(r(),h("p",k_,f(p.value),1)):k("",!0)])]),_:1},8,["modelValue","title"]),n(Pt,{permission:"reports/view"},{default:d(()=>[a.value?(r(),$(Kh,{key:0})):k("",!0)]),_:1}),n(Pt,{permission:"orders/view"},{default:d(()=>[o("div",S_,[n($s,{table:A(t),classicTabStyle:!0,hasMobileSlot:!0},{mobile:d(()=>[A(t).isLoading()?(r(),$(s_,{key:0})):k("",!0),A(t).isLoading()?k("",!0):(r(),$(Wr,{key:1,table:A(t),orders:A(t).getTableData(),columns:A(t).data.columns,"empty-text":A(t).emptyMessage},null,8,["table","orders","columns","empty-text"]))]),default:d(()=>[A(t).isLoading()?(r(),$(Zh,{key:0,orderTable:A(t),"next-page-count":A(t).nextPageCount},null,8,["orderTable","next-page-count"])):(r(),$(Yr,{key:1,table:A(t),orders:A(t).getTableData(),columns:A(t).data.columns,"empty-text":A(t).emptyMessage},null,8,["table","orders","columns","empty-text"]))]),_:1},8,["table"])])]),_:1})])}}},$_={class:"setting-wrap"},E_={class:"setting-wrap-inner"},U_={class:"setting-confirmation-content"},I_={class:"custom-wp-editor-wrapper"},Q_={class:"setting-save-action"},D_={__name:"InvoicePacking",setup(e){const t=V([]),a=V([]),l=V(!1),s=V(!1);fs().onSave(()=>{_()});const c=V([u("Invoice Template"),u("Packing Slip Template"),u("Delivery Slip Template"),u("Shipping Slip Template"),u("Dispatch Slip Template")]),p=()=>{l.value=!0,ce.get("templates/print-templates").then(g=>{t.value=g.templates,l.value=!1}).catch(g=>{z.error(g)}).finally(()=>{l.value=!1})},m=()=>{l.value=!0,ce.get("settings/confirmation/shortcode",{}).then(g=>{a.value=g.data}).catch(g=>{z.error(g)}).finally(()=>{l.value=!1})},_=()=>{s.value=!0,ce.put("templates/print-templates",{templates:t.value}).then(g=>{z.success(g.message)}).catch(g=>{z.error(g)}).finally(()=>{s.value=!1})};return Qe(()=>{p(),m()}),(g,y)=>{const v=B("el-skeleton");return B("el-button"),r(),h("div",$_,[n(Ea,{heading:A(u)("Invoice & Packing"),"show-save-button":!1},null,8,["heading"]),o("div",E_,[n(Ua),n(Za,{class:"mb-5",type:"information",content:A(u)("It will be available soon!")},null,8,["content"]),l.value?(r(!0),h(O,{key:0},ae(c.value,(C,b)=>(r(),$(xe,{key:b},{default:d(()=>[n(Ve,{title:C,border_bottom:""},null,8,["title"]),n(ke,null,{default:d(()=>[n(v,{animated:"",rows:6})]),_:1})]),_:2},1024))),128)):k("",!0),!l.value&&t.value.length>0?(r(),h(O,{key:1},[(r(!0),h(O,null,ae(t.value,(C,b)=>(r(),$(xe,{key:b},{default:d(()=>[n(Ve,{title:C.title+" (Under Development)",border_bottom:""},null,8,["title"]),n(ke,null,{default:d(()=>[o("div",U_,[o("div",I_,[n(Wl,{"short-codes":a.value,modelValue:C.content,"onUpdate:modelValue":w=>C.content=w,onUpdate:w=>{C.content=w}},null,8,["short-codes","modelValue","onUpdate:modelValue","onUpdate"])])])]),_:2},1024)]),_:2},1024))),128)),o("div",Q_,[k("",!0)])],64)):k("",!0)])])}}},V_={class:"fct-pdf-pro-gate"},T_={class:"fct-pdf-pro-gate-inner"},M_={class:"fct-pdf-pro-heading"},L_={class:"fct-pdf-pro-icon"},R_={class:"fct-pdf-pro-label"},O_={class:"fct-pdf-pro-badge"},H_={class:"fct-pdf-pro-desc"},P_={__name:"PdfTemplateProGate",setup(e){return(t,a)=>{const l=B("el-button");return r(),h("div",V_,[o("div",T_,[o("div",M_,[o("div",L_,[n(ee,{name:"Crown"})]),o("span",R_,f(A(u)("PDF Templates")),1),o("span",O_,f(A(u)("Pro")),1)]),o("p",H_,f(A(u)("Customizable PDF receipts, invoices, and e-invoices with ZUGFeRD support.")),1),n(l,{type:"primary",size:"small",tag:"a",href:"https://fluentcart.com/pricing/",target:"_blank"},{default:d(()=>[n(ee,{name:"Crown"}),R(" "+f(A(u)("Upgrade to Pro")),1)]),_:1})])])}}},N_=lt(P_,[["__scopeId","data-v-83e6a503"]]),K_={__name:"PdfTemplateRoute",setup(e){const t=ze.get("app_config.isProActive");return(a,l)=>{const s=B("router-view");return A(t)?(r(),$(s,{key:1})):(r(),$(N_,{key:0}))}}},G_={class:"setting-wrap"},j_={class:"setting-wrap-inner"},z_={class:"flex gap-5"},q_={class:"flex flex-col items-center justify-center py-12 text-center"},Y_={class:"text-lg font-semibold mb-2 text-system-dark dark:text-gray-200"},W_={class:"text-sm text-system-mid dark:text-gray-400 mb-6 max-w-md"},X_={class:"fct-pdf-template-desc"},J_={class:"fct-pdf-template-grid"},Z_={class:"fct-pdf-template-preview"},ev={class:"fct-pdf-template-preview-placeholder"},tv={class:"fct-pdf-placeholder-text"},av={class:"fct-pdf-template-overlay"},lv={class:"fct-pdf-template-footer"},sv={class:"fct-pdf-template-name-row"},nv={class:"fct-pdf-template-title"},ov={key:0,class:"fct-pdf-badge fct-pdf-badge--default"},iv={__name:"PdfTemplateIndex",setup(e){const t=tl(),a=V(!0),l=V(!1),s=V({}),i=V(!1),c=V(""),p=V(!1),m=V(""),_=V(null),g=V(!1),y=V(!1),v=ze.get("app_config.isProActive"),C=()=>{a.value=!0,ce.get("settings/pdf-templates/receipt").then(U=>{s.value=U.templates||{},l.value=U.has_fluent_pdf||!1,_.value=U.addon_info||null}).catch(U=>{var S;z.error(((S=U.data)==null?void 0:S.message)||u("Failed to load templates"))}).finally(()=>{a.value=!1})},b=()=>{if(_.value){if(!v&&_.value.repo_link){window.open(_.value.repo_link,"_blank","noopener,noreferrer");return}g.value=!0,ce.post("settings/modules/plugin-addons/install",{plugin_slug:_.value.plugin_slug,source_type:_.value.source_type||"wordpress",source_link:_.value.source_link||"",asset_path:_.value.asset_path||""}).then(U=>{z.success(U.message||u("Plugin installed successfully")),setTimeout(()=>{window.location.reload()},500)}).catch(U=>{var S;z.error(((S=U.data)==null?void 0:S.message)||u("Failed to install plugin"))}).finally(()=>{g.value=!1})}},w=()=>{_.value&&(y.value=!0,ce.post("settings/modules/plugin-addons/activate",{plugin_file:_.value.plugin_file}).then(U=>{z.success(U.message||u("Plugin activated successfully")),setTimeout(()=>{window.location.reload()},500)}).catch(U=>{var S;z.error(((S=U.data)==null?void 0:S.message)||u("Failed to activate plugin"))}).finally(()=>{y.value=!1}))},x=()=>{c.value="",i.value=!0},F=()=>{if(!c.value.trim()){z.error(u("Please enter a template name"));return}p.value=!0,ce.post("settings/pdf-templates/create",{title:c.value.trim()}).then(U=>{i.value=!1,z.success(U.message||u("Template created")),U.slug?t.push({name:"edit-pdf-template",params:{template:U.slug}}):C()}).catch(U=>{var S;z.error(((S=U.data)==null?void 0:S.message)||u("Failed to create template"))}).finally(()=>{p.value=!1})},L=U=>{m.value=U,ce.delete("settings/pdf-templates/delete/"+U).then(S=>{z.success(S.message||u("Template deleted")),C()}).catch(S=>{var M;z.error(((M=S.data)==null?void 0:M.message)||u("Failed to delete template"))}).finally(()=>{m.value=""})};return Qe(()=>{C()}),(U,S)=>{const M=B("el-button"),I=B("el-skeleton-item"),T=B("el-skeleton"),Q=B("el-popconfirm"),E=B("el-input"),D=B("el-form-item"),H=B("el-form"),P=B("el-dialog");return r(),h("div",G_,[n(Ea,{heading:A(u)("PDF Templates"),"show-save-button":!1},ta({_:2},[l.value?{name:"action",fn:d(()=>[n(M,{type:"primary",size:"small",onClick:x},{default:d(()=>[R(f(A(u)("Add Template")),1)]),_:1})]),key:"0"}:void 0]),1032,["heading"]),o("div",j_,[n(Ua),a.value?(r(),$(xe,{key:0},{default:d(()=>[n(ke,null,{default:d(()=>[n(T,{animated:""},{template:d(()=>[n(I,{variant:"text",class:"w-[300px] mb-4"}),o("div",z_,[n(I,{variant:"rect",style:{width:"220px",height:"280px","border-radius":"8px"}}),n(I,{variant:"rect",style:{width:"220px",height:"280px","border-radius":"8px"}})])]),_:1})]),_:1})]),_:1})):k("",!0),!a.value&&!l.value&&_.value?(r(),$(xe,{key:1},{default:d(()=>[n(ke,null,{default:d(()=>[o("div",q_,[S[3]||(S[3]=o("svg",{class:"mb-4",width:"48",height:"48",viewBox:"0 0 32 32",fill:"none",stroke:"currentColor","stroke-width":"1.5"},[o("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"}),o("path",{d:"M18 2v8h8"}),o("path",{d:"M12 18h8M12 22h6"})],-1)),o("h3",Y_,f(A(u)("Fluent PDF Required")),1),o("p",W_,f(A(u)("To use PDF receipt templates, you need to install and activate the Fluent PDF plugin.")),1),_.value.is_installed?_.value.is_installed&&!_.value.is_active?(r(),$(M,{key:1,type:"success",loading:y.value,onClick:w},{default:d(()=>[R(f(A(u)("Activate Plugin")),1)]),_:1},8,["loading"])):k("",!0):(r(),$(M,{key:0,type:"primary",loading:g.value,onClick:b},{default:d(()=>[R(f(A(v)?A(u)("Install & Activate"):A(u)("Download")),1)]),_:1},8,["loading"]))])]),_:1})]),_:1})):k("",!0),!a.value&&l.value?(r(),$(xe,{key:2},{default:d(()=>[n(ke,null,{default:d(()=>[o("p",X_,f(A(u)("Customize PDF templates for email attachments. Select which template to attach in each email notification's settings.")),1),o("div",J_,[(r(!0),h(O,null,ae(s.value,(G,J)=>(r(),h("div",{key:J,class:"fct-pdf-template-card"},[o("div",Z_,[o("div",ev,[S[4]||(S[4]=o("svg",{width:"40",height:"40",viewBox:"0 0 32 32",fill:"none",stroke:"#525866","stroke-width":"1.2"},[o("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"}),o("path",{d:"M18 2v8h8"}),o("path",{d:"M12 18h8M12 22h6"})],-1)),o("span",tv,f(G.title||A(u)("Receipt Template")),1)]),o("div",av,[n(M,{type:"primary",size:"small",tag:"router-link",to:{name:"edit-pdf-template",params:{template:J}}},{default:d(()=>[R(f(A(u)("Edit Template")),1)]),_:2},1032,["to"])])]),o("div",lv,[o("div",sv,[o("span",nv,f(G.title||J),1),G.is_default?(r(),h("span",ov,f(A(u)("Built-in")),1)):k("",!0)]),G.is_default?k("",!0):(r(),$(Q,{key:0,title:A(u)("Delete this template?"),"confirm-button-text":A(u)("Delete"),"cancel-button-text":A(u)("Cancel"),"confirm-button-type":"danger",onConfirm:oe=>L(J)},{reference:d(()=>[n(M,{type:"danger",size:"small",text:"",loading:m.value===J,class:"fct-pdf-delete-btn"},{default:d(()=>S[5]||(S[5]=[o("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},[o("path",{d:"M3 6h18"}),o("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})):k("",!0)]),n(P,{modelValue:i.value,"onUpdate:modelValue":S[2]||(S[2]=G=>i.value=G),title:A(u)("Add Custom Template"),width:"420px","close-on-click-modal":!1,"append-to-body":!0},{footer:d(()=>[n(M,{onClick:S[1]||(S[1]=G=>i.value=!1)},{default:d(()=>[R(f(A(u)("Cancel")),1)]),_:1}),n(M,{type:"primary",onClick:F,loading:p.value},{default:d(()=>[R(f(A(u)("Create")),1)]),_:1},8,["loading"])]),default:d(()=>[n(H,{onSubmit:Ne(F,["prevent"]),"label-position":"top"},{default:d(()=>[n(D,{label:A(u)("Template Name")},{default:d(()=>[n(E,{modelValue:c.value,"onUpdate:modelValue":S[0]||(S[0]=G=>c.value=G),placeholder:A(u)("e.g. Custom Invoice"),autofocus:""},null,8,["modelValue","placeholder"])]),_:1},8,["label"])]),_:1})]),_:1},8,["modelValue","title"])])}}},rv={name:"EmailBodySkeleton",props:{showLoadingBadge:{type:Boolean,default:!1}}},dv={class:"fct-email-body-skeleton"},uv={class:"fct-email-body-skeleton__page"},cv={key:0,class:"fct-ebs__badge"},Av={class:"fct-ebs__badge-text"};function pv(e,t,a,l,s,i){return r(),h("div",dv,[o("div",uv,[t[3]||(t[3]=xn('
',9)),a.showLoadingBadge?(r(),h("div",cv,[t[0]||(t[0]=o("span",{class:"fct-ebs__dot"},null,-1)),t[1]||(t[1]=o("span",{class:"fct-ebs__dot"},null,-1)),t[2]||(t[2]=o("span",{class:"fct-ebs__dot"},null,-1)),o("span",Av,f(e.$t("Loading block editor…")),1)])):k("",!0)])])}const sr=lt(rv,[["render",pv]]),fv={name:"NewEditorFrame",components:{EmailBodySkeleton:sr},props:{editorPath:{type:String,default:"/editor"},modelValue:{type:String,default:""},editorParams:{type:Object,default:()=>({})},frameHeight:{type:String,default:"500px"},documentTitle:{type:String,default:""}},emits:["update:modelValue","titleUpdated","contentUpdated","editorFullscreenToggle","featuredMediaUpdated","previewRequest","autosaveState"],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{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)}}},mv={style:{width:"100%"}},hv={key:0,style:{display:"flex","justify-content":"center","align-items":"center","column-gap":"10px"}},_v={class:"editor-container",style:{position:"relative"}},vv={key:0,class:"fct-editor-skeleton"},gv={ref:"iframeContainer",class:"iframe-container"};function yv(e,t,a,l,s,i){const c=B("EmailBodySkeleton");return r(),h("div",mv,[i.editorFailed?(r(),h("div",hv,[o("p",null,f(e.$t("Problem with loading the editor. Please reload the page.")),1)])):k("",!0),o("div",_v,[n(Gl,{name:"fct-skeleton-fade"},{default:d(()=>[s.editorContentReady?k("",!0):(r(),h("div",vv,[t[0]||(t[0]=o("div",{class:"fct-skel-menubar"},[o("div",{class:"fct-skel fct-skel-logo"}),o("div",{class:"fct-skel-slash"}),o("div",{class:"fct-skel fct-skel-name"}),o("div",{class:"fct-skel-spacer"}),o("div",{class:"fct-skel fct-skel-btn-wide"}),o("div",{class:"fct-skel-dot"}),o("div",{class:"fct-skel-dot"})],-1)),t[1]||(t[1]=o("div",{class:"fct-skel-toolbar"},[o("div",{class:"fct-skel fct-skel-tb-btn"}),o("div",{class:"fct-skel fct-skel-tb-btn"}),o("div",{class:"fct-skel fct-skel-tb-btn"}),o("div",{class:"fct-skel-sep"}),o("div",{class:"fct-skel fct-skel-tb-btn"}),o("div",{class:"fct-skel fct-skel-tb-btn"}),o("div",{class:"fct-skel-sep"}),o("div",{class:"fct-skel fct-skel-tb-wide"}),o("div",{class:"fct-skel fct-skel-tb-wide"}),o("div",{class:"fct-skel-sep"}),o("div",{class:"fct-skel fct-skel-tb-btn"})],-1)),n(c,{"show-loading-badge":!0})]))]),_:1}),o("div",gv,null,512)])])}const jc=lt(fv,[["render",yv],["__scopeId","data-v-e5dae537"]]),bv={class:"setting-wrap fct-pdf-template-edit-wrapper"},wv={class:"capitalize"},Cv={class:"setting-wrap-inner"},Bv={class:"bg-white rounded dark:bg-dark-700 p-6 mb-4"},kv={class:"setting-save-action"},xv={__name:"PdfTemplateEdit",props:{template:{type:String,required:!0}},setup(e){const t=e,a=tl(),l=V(!0),s=V(!1),i=V(!1),c=V(!1),p=V(null),m=V(null),_=V(""),g=S=>{const M=atob(S),I=new Array(M.length);for(let T=0;T{const S=await ce.post("settings/pdf-templates/download",{template_id:t.template});if(!(S!=null&&S.pdf_base64))throw new Error(u("Failed to generate PDF"));return S},v=()=>{l.value=!0,ce.get("settings/pdf-templates/receipt/"+t.template).then(S=>{var I,T,Q;p.value=S.template;const M=(Q=(T=(I=S.template)==null?void 0:I.pdf_settings)==null?void 0:T[0])==null?void 0:Q.pdf_structure;M&&(_.value=M.content||"")}).catch(S=>{var M;z.error(((M=S.data)==null?void 0:M.message)||u("Failed to load template"))}).finally(()=>{l.value=!1})},C=async({showSuccess:S=!0}={})=>{var I,T,Q,E;s.value=!0,m.value&&await m.value.forceAutosave();const M=((Q=(T=(I=p.value)==null?void 0:I.pdf_settings)==null?void 0:T[0])==null?void 0:Q.pdf_structure)||{};M.content=_.value;try{const D=await ce.post("settings/pdf-templates/receipt/"+t.template,{pdf_structure:M});return S&&z.success(D.message||u("Template saved")),!0}catch(D){return z.error(((E=D.data)==null?void 0:E.message)||u("Failed to save template")),!1}finally{s.value=!1}},b=()=>{i.value=!0,y().then(S=>{const M=g(S.pdf_base64),I=URL.createObjectURL(M),T=document.createElement("a");T.href=I,T.download=S.filename||"receipt-test.pdf",document.body.appendChild(T),T.click(),document.body.removeChild(T),URL.revokeObjectURL(I),z.success(u("PDF downloaded"))}).catch(S=>{var M;z.error(((M=S.data)==null?void 0:M.message)||S.message||u("Failed to generate PDF"))}).finally(()=>{i.value=!1})},w=async()=>{var S;c.value=!0;try{const M=await y(),I=g(M.pdf_base64),T=URL.createObjectURL(I),Q=document.createElement("a");Q.href=T,Q.target="_blank",Q.rel="noopener",document.body.appendChild(Q),Q.click(),document.body.removeChild(Q),setTimeout(()=>{URL.revokeObjectURL(T)},1e4)}catch(M){z.error(((S=M.data)==null?void 0:S.message)||M.message||u("Failed to generate PDF"))}finally{c.value=!1}},x=async()=>{s.value||i.value||c.value||!await C({showSuccess:!1})||await w()},F=()=>p.value&&!p.value.is_default,L=()=>{ce.delete("settings/pdf-templates/delete/"+t.template).then(S=>{z.success(S.message||u("Template deleted")),a.push({path:"/settings/pdf-template"})}).catch(S=>{var M;z.error(((M=S.data)==null?void 0:M.message)||u("Failed to delete template"))})},U=()=>{ce.get("settings/pdf-templates/factory-default").then(S=>{var T,Q,E;const M=(T=S.templates)==null?void 0:T[t.template];if(!M)return;const I=((E=(Q=M.pdf_settings)==null?void 0:Q[0])==null?void 0:E.pdf_structure)||{};return ce.post("settings/pdf-templates/receipt/"+t.template,{pdf_structure:I}).then(()=>{z.success(u("Reverted to default template")),v()})}).catch(S=>{var M;z.error(((M=S.data)==null?void 0:M.message)||u("Failed to revert template"))})};return Qe(()=>{v()}),(S,M)=>{const I=B("el-breadcrumb-item"),T=B("el-breadcrumb"),Q=B("el-icon"),E=B("el-button"),D=B("el-dropdown-item"),H=B("el-dropdown-menu"),P=B("el-dropdown"),G=B("el-skeleton-item"),J=B("el-skeleton");return r(),h("div",bv,[n(Ea,{loading:s.value,"loading-text":A(u)("Saving"),"save-button-text":A(u)("Save Template"),onOnSave:C},{heading:d(()=>[n(T,{class:"mb-0","separator-icon":A(rl)},{default:d(()=>[n(I,{to:{path:"/settings/pdf-template"}},{default:d(()=>[R(f(A(u)("PDF Templates")),1)]),_:1}),n(I,null,{default:d(()=>{var oe;return[o("span",wv,f(((oe=p.value)==null?void 0:oe.title)||A(u)("Edit Template")),1)]}),_:1})]),_:1},8,["separator-icon"])]),action:d(()=>[n(P,{trigger:"click",style:{"margin-left":"12px",display:"inline-flex","align-items":"center"},"popper-class":"fct-dropdown"},{dropdown:d(()=>[n(H,null,{default:d(()=>[n(D,{onClick:b,disabled:i.value},{default:d(()=>[R(f(i.value?A(u)("Downloading..."):A(u)("Test Download")),1)]),_:1},8,["disabled"]),n(D,{onClick:U},{default:d(()=>[R(f(A(u)("Revert to Default")),1)]),_:1}),F()?(r(),$(D,{key:0,divided:"",onClick:L,style:{color:"#F56C6C"}},{default:d(()=>[R(f(A(u)("Delete Template")),1)]),_:1})):k("",!0)]),_:1})]),default:d(()=>[n(E,{size:"small",text:"",style:{height:"auto",padding:"4px"}},{default:d(()=>[n(Q,{style:{transform:"rotate(90deg)","font-size":"16px"}},{default:d(()=>[n(A(If))]),_:1})]),_:1})]),_:1})]),_:1},8,["loading","loading-text","save-button-text"]),o("div",Cv,[n(Ua),n(J,{loading:l.value,class:"bg-white rounded p-6 dark:bg-dark-700",animated:""},{template:d(()=>[n(G,{variant:"h3",class:"w-[200px] mb-5"}),n(G,{variant:"rect",style:{width:"100%",height:"500px"}})]),_:1},8,["loading"]),!l.value&&p.value?(r(),h(O,{key:0},[o("div",Bv,[n(jc,{ref_key:"editorFrameRef",ref:m,editorParams:{block_type:"pdf_template",campaign_title:p.value.title,bid:t.template},frameHeight:"calc(100vh - 200px)",documentTitle:p.value.title||A(u)("Receipt Template"),onPreviewRequest:x,modelValue:_.value,"onUpdate:modelValue":M[0]||(M[0]=oe=>_.value=oe)},null,8,["editorParams","documentTitle","modelValue"])]),o("div",kv,[n(E,{onClick:C,type:"primary",disabled:s.value,loading:s.value},{default:d(()=>[R(f(A(u)("Save Template")),1)]),_:1},8,["disabled","loading"]),n(E,{onClick:b,disabled:i.value,loading:i.value},{default:d(()=>[R(f(A(u)("Test Download")),1)]),_:1},8,["disabled","loading"])])],64)):k("",!0)])])}}},Sv={class:"fluent-cart-admin-validation-error-wrapper `${fieldKey}`"},fl=Object.assign({name:"ValidationError"},{__name:"ValidationError",props:{validationErrors:Object,fieldKey:{type:String,default:""}},setup(e){return(t,a)=>(r(),h("div",Sv,[(r(!0),h(O,null,ae(e.validationErrors,(l,s)=>(r(),h("span",{class:"fluent-cart-admin-validation-error",key:l.toLowerCase().replace(/\s/g,"")},f(l),1))),128))]))}}),_o={__name:"Alert",props:{type:String,title:String,description:String,closable:Boolean,showIcon:Boolean},setup(e){return(t,a)=>{const l=B("el-alert");return r(),$(l,{title:e.title,type:e.type,description:e.description,"show-icon":e.showIcon,closable:e.closable,role:"alert"},{default:d(()=>[Ca(t.$slots,"default")]),_:3},8,["title","type","description","show-icon","closable"])}}},Fv={class:"setting-wrap"},$v={class:"setting-wrap-inner"},Ev={class:"grid gap-3 mb-6"},Uv={class:"grid gap-3 mb-6"},Iv={class:"grid gap-3 mb-6"},Qv={class:"grid gap-3"},Dv={key:0,class:"mb-4 p-4 rounded-lg border border-yellow-300 bg-yellow-50 text-yellow-800 text-sm"},Vv=["href"],Tv={class:"form-note"},Mv={class:"form-note"},Lv=["href"],Rv={class:"mb-4"},Ov={class:"mb-4"},Hv={class:"form-note"},Pv={class:"form-note"},Nv={class:"form-note"},Kv={class:"form-note"},Gv={class:"setting-save-action"},jv={__name:"PdfTemplateSettings",setup(e){const t=V(!0),a=V(!1),l=V({}),s=V(!0),i=V(""),c=V({zugferd_enabled:"0",zugferd_profile:"en16931",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:""}),p=[{label:"EN 16931 (ZUGFeRD)",value:"en16931"}],m=[{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"}];fs().onSave(()=>{y()});const g=()=>{t.value=!0,ce.get("settings/pdf-templates/seller-details").then(v=>{v.seller_details&&Object.keys(c.value).forEach(C=>{v.seller_details[C]!==void 0&&(c.value[C]=v.seller_details[C])}),s.value=v.store_country_set!==!1,i.value=v.store_settings_url||""}).catch(v=>{var C;z.error(((C=v.data)==null?void 0:C.message)||u("Failed to load settings"))}).finally(()=>{t.value=!1})},y=()=>{a.value=!0,l.value={},ce.post("settings/pdf-templates/seller-details",c.value).then(v=>{z.success(v.message||u("Settings saved"))}).catch(v=>{var C,b;v.status_code===422&&((C=v.data)!=null&&C.data)&&(l.value=v.data.data),z.error(((b=v.data)==null?void 0:b.message)||u("Failed to save settings"))}).finally(()=>{a.value=!1})};return Qe(()=>{g()}),(v,C)=>{const b=B("el-skeleton-item"),w=B("el-skeleton"),x=B("el-switch"),F=B("el-option"),L=B("el-select"),U=B("el-form-item"),S=B("el-col"),M=B("el-row"),I=B("el-input"),T=B("el-divider"),Q=B("el-button");return r(),h("div",Fv,[n(Ea,{heading:A(u)("E-Invoice Settings"),loading:a.value,onOnSave:y},null,8,["heading","loading"]),o("div",$v,[n(Ua),t.value?(r(),$(xe,{key:0},{default:d(()=>[n(ke,null,{default:d(()=>[n(w,{animated:""},{template:d(()=>[o("div",Ev,[n(b,{variant:"p",class:"w-[20%]"}),n(b,{variant:"p"})]),o("div",Uv,[n(b,{variant:"p",class:"w-[20%]"}),n(b,{variant:"p"})]),o("div",Iv,[n(b,{variant:"p",class:"w-[20%]"}),n(b,{variant:"p"})]),o("div",Qv,[n(b,{variant:"p",class:"w-[20%]"}),n(b,{variant:"p"})])]),_:1})]),_:1})]),_:1})):k("",!0),t.value?k("",!0):(r(),h(O,{key:1},[c.value.zugferd_enabled==="1"&&!s.value?(r(),h("div",Dv,[o("strong",null,f(A(u)("Store country is not configured.")),1),R(" "+f(A(u)("ZUGFeRD XML cannot be embedded in PDFs until your store country is set."))+" ",1),i.value?(r(),h("a",{key:0,href:i.value,class:"underline ml-1"},f(A(u)("Go to Store Settings")),9,Vv)):k("",!0)])):k("",!0),n(xe,null,{default:d(()=>[n(Ve,{title:A(u)("E-Invoice Configuration"),text:A(u)("Configure ZUGFeRD / Factur-X e-invoice encoding and seller details for your PDFs."),border_bottom:""},{action:d(()=>[n(x,{modelValue:c.value.zugferd_enabled,"onUpdate:modelValue":C[0]||(C[0]=E=>c.value.zugferd_enabled=E),"active-value":"1","inactive-value":"0"},null,8,["modelValue"])]),_:1},8,["title","text"]),n(ke,null,{default:d(()=>[n(M,{gutter:15},{default:d(()=>[n(S,{lg:12},{default:d(()=>[n(U,{label:A(u)("ZUGFeRD Profile"),"label-position":"top"},{default:d(()=>[n(L,{modelValue:c.value.zugferd_profile,"onUpdate:modelValue":C[1]||(C[1]=E=>c.value.zugferd_profile=E)},{default:d(()=>[(r(),h(O,null,ae(p,E=>n(F,{key:E.value,label:E.label,value:E.value},null,8,["label","value"])),64))]),_:1},8,["modelValue"]),o("div",Tv,[o("p",null,f(A(u)("Select the e-invoice formatter used when generating the embedded XML.")),1)])]),_:1},8,["label"])]),_:1}),n(S,{lg:12},{default:d(()=>[n(U,{label:A(u)("Legal Registration Scheme"),"label-position":"top"},{default:d(()=>[n(L,{modelValue:c.value.seller_legal_registration_scheme,"onUpdate:modelValue":C[2]||(C[2]=E=>c.value.seller_legal_registration_scheme=E),placeholder:A(u)("Select scheme"),clearable:"",filterable:""},{default:d(()=>[(r(),h(O,null,ae(m,E=>n(F,{key:E.value,label:E.label,value:E.value},null,8,["label","value"])),64))]),_:1},8,["modelValue","placeholder"]),o("div",Mv,[o("p",null,f(A(u)("ISO 6523 ICD code for the legal registration identifier")),1)]),n(fl,{"validation-errors":l.value.seller_legal_registration_scheme||{},"field-key":"seller_legal_registration_scheme"},null,8,["validation-errors"])]),_:1},8,["label"])]),_:1})]),_:1}),n(_o,{type:"info",closable:!1,"show-icon":"",class:"mb-4"},{default:d(()=>[R(f(A(u)("Company Name, VAT ID, Tax ID, and Legal Registration ID are managed in"))+" ",1),i.value?(r(),h("a",{key:0,href:i.value,target:"_blank",class:""},f(A(u)("Store Settings → Business Details")),9,Lv)):k("",!0)]),_:1}),o("h4",Rv,f(A(u)("Seller Contact")),1),n(M,{gutter:15},{default:d(()=>[n(S,{lg:12},{default:d(()=>[n(U,{label:A(u)("Contact Name"),"label-position":"top"},{default:d(()=>[n(I,{modelValue:c.value.seller_contact_name,"onUpdate:modelValue":C[3]||(C[3]=E=>c.value.seller_contact_name=E)},null,8,["modelValue"])]),_:1},8,["label"])]),_:1}),n(S,{lg:12},{default:d(()=>[n(U,{label:A(u)("Contact Email"),"label-position":"top"},{default:d(()=>[n(I,{modelValue:c.value.seller_contact_email,"onUpdate:modelValue":C[4]||(C[4]=E=>c.value.seller_contact_email=E),type:"email"},null,8,["modelValue"]),n(fl,{"validation-errors":l.value.seller_contact_email||{},"field-key":"seller_contact_email"},null,8,["validation-errors"])]),_:1},8,["label"])]),_:1})]),_:1}),n(M,{gutter:15},{default:d(()=>[n(S,{lg:12},{default:d(()=>[n(U,{label:A(u)("Contact Phone"),"label-position":"top"},{default:d(()=>[n(I,{modelValue:c.value.seller_contact_phone,"onUpdate:modelValue":C[5]||(C[5]=E=>c.value.seller_contact_phone=E)},null,8,["modelValue"])]),_:1},8,["label"])]),_:1})]),_:1}),n(T),o("h4",Ov,f(A(u)("Seller Bank Details")),1),n(M,{gutter:15},{default:d(()=>[n(S,{lg:12},{default:d(()=>[n(U,{label:A(u)("Bank IBAN"),"label-position":"top"},{default:d(()=>[n(I,{modelValue:c.value.seller_bank_iban,"onUpdate:modelValue":C[6]||(C[6]=E=>c.value.seller_bank_iban=E)},null,8,["modelValue"]),n(fl,{"validation-errors":l.value.seller_bank_iban||{},"field-key":"seller_bank_iban"},null,8,["validation-errors"]),o("div",Hv,[o("p",null,f(A(u)("International Bank Account Number")),1)])]),_:1},8,["label"])]),_:1}),n(S,{lg:12},{default:d(()=>[n(U,{label:A(u)("Bank BIC"),"label-position":"top"},{default:d(()=>[n(I,{modelValue:c.value.seller_bank_bic,"onUpdate:modelValue":C[7]||(C[7]=E=>c.value.seller_bank_bic=E)},null,8,["modelValue"]),o("div",Pv,[o("p",null,f(A(u)("Bank Identifier Code (SWIFT)")),1)])]),_:1},8,["label"])]),_:1})]),_:1}),n(M,{gutter:15},{default:d(()=>[n(S,{lg:12},{default:d(()=>[n(U,{label:A(u)("Bank Account Name"),"label-position":"top"},{default:d(()=>[n(I,{modelValue:c.value.seller_bank_account_name,"onUpdate:modelValue":C[8]||(C[8]=E=>c.value.seller_bank_account_name=E)},null,8,["modelValue"]),o("div",Nv,[o("p",null,f(A(u)("Name of the bank account holder")),1)])]),_:1},8,["label"])]),_:1}),n(S,{lg:12},{default:d(()=>[n(U,{label:A(u)("Electronic Address"),"label-position":"top"},{default:d(()=>[n(I,{modelValue:c.value.seller_electronic_address,"onUpdate:modelValue":C[9]||(C[9]=E=>c.value.seller_electronic_address=E)},null,8,["modelValue"]),o("div",Kv,[o("p",null,f(A(u)("Electronic address for receiving e-invoices (e.g. PEPPOL ID)")),1)])]),_:1},8,["label"])]),_:1})]),_:1})]),_:1})]),_:1}),o("div",Gv,[n(Q,{type:"primary",onClick:C[10]||(C[10]=E=>y()),loading:a.value},{default:d(()=>[R(f(A(u)("Save Settings")),1)]),_:1},8,["loading"])])],64))])])}}},zv={name:"CustomersRoute"},qv={class:"fca_customers_route"};function Yv(e,t,a,l,s,i){const c=B("router-view");return r(),h("div",qv,[n(c)])}const Wv=lt(zv,[["render",Yv]]);/*! * 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 nr=function(e,t){return nr=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(a,l){a.__proto__=l}||function(a,l){for(var s in l)Object.prototype.hasOwnProperty.call(l,s)&&(a[s]=l[s])},nr(e,t)};function Il(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");nr(e,t);function a(){this.constructor=e}e.prototype=t===null?Object.create(t):(a.prototype=t.prototype,new a)}var or=function(){return or=Object.assign||function(t){for(var a,l=1,s=arguments.length;l0&&i[i.length-1])&&(_[0]===6||_[0]===2)){a=0;continue}if(_[0]===3&&(!i||_[1]>i[0]&&_[1]=55296&&s<=56319&&a>10)+55296,c%1024+56320)),(s+1===a||l.length>16384)&&(i+=String.fromCharCode.apply(String,l),l.length=0)}return i},Id="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Jv=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(var Pn=0;Pn"u"?[]:new Uint8Array(256);for(var Nn=0;Nn>4,g[s++]=(c&15)<<4|p>>2,g[s++]=(p&3)<<6|m&63;return _},eg=function(e){for(var t=e.length,a=[],l=0;l>Cs,lg=1<>Cs,ng=zc+sg,og=ng,ig=32,rg=og+ig,dg=65536>>ad,ug=1<=0){if(t<55296||t>56319&&t<=65535)return a=this.index[t>>Cs],a=(a<>Cs)],a=(a<>ad),a=this.index[a],a+=t>>Cs&cg,a=this.index[a],a=(a<"u"?[]:new Uint8Array(256);for(var Kn=0;KnTd?(s.push(!0),p-=Td):s.push(!1),["normal","auto","loose"].indexOf(t)!==-1&&[8208,8211,12316,12448].indexOf(i)!==-1)return l.push(c),a.push(dr);if(p===vg||p===ir){if(c===0)return l.push(c),a.push(ys);var m=a[c-1];return xg.indexOf(m)===-1?(l.push(l[c-1]),a.push(m)):(l.push(c),a.push(ys))}if(l.push(c),p===Cg)return a.push(t==="strict"?ur:En);if(p===Xc||p===wg)return a.push(ys);if(p===Bg)return i>=131072&&i<=196605||i>=196608&&i<=262141?a.push(En):a.push(ys);a.push(p)}),[l,a,s]},xi=function(e,t,a,l){var s=l[a];if(Array.isArray(e)?e.indexOf(s)!==-1:e===s)for(var i=a;i<=l.length;){i++;var c=l[i];if(c===t)return!0;if(c!==ss)break}if(s===ss)for(var i=a;i>0;){i--;var p=l[i];if(Array.isArray(e)?e.indexOf(p)!==-1:e===p)for(var m=a;m<=l.length;){m++;var c=l[m];if(c===t)return!0;if(c!==ss)break}if(p!==ss)break}return!1},Nd=function(e,t){for(var a=e;a>=0;){var l=t[a];if(l===ss)a--;else return l}return 0},$g=function(e,t,a,l,s){if(a[l]===0)return Ot;var i=l-1;if(Array.isArray(s)&&s[i]===!0)return Ot;var c=i-1,p=i+1,m=t[i],_=c>=0?t[c]:0,g=t[p];if(m===qc&&g===Yc)return Ot;if(hr.indexOf(m)!==-1)return Jc;if(hr.indexOf(g)!==-1||Zc.indexOf(g)!==-1)return Ot;if(Nd(i,t)===Wc)return qn;if(mr.get(e[i])===ir||(m===jn||m===zn)&&mr.get(e[p])===ir||m===Md||g===Md||m===Ld||[ss,rr,pn].indexOf(m)===-1&&g===Ld||[Gn,rn,bg,Ds,Vs].indexOf(g)!==-1||Nd(i,t)===dn||xi(Bi,dn,i,t)||xi([Gn,rn],ur,i,t)||xi(Rd,Rd,i,t))return Ot;if(m===ss)return qn;if(m===Bi||g===Bi)return Ot;if(g===dr||m===dr)return qn;if([rr,pn,ur].indexOf(g)!==-1||m===yg||_===pr&&Sg.indexOf(m)!==-1||m===Vs&&g===pr||g===Od||Nl.indexOf(g)!==-1&&m===cl||Nl.indexOf(m)!==-1&&g===cl||m===mn&&[En,jn,zn].indexOf(g)!==-1||[En,jn,zn].indexOf(m)!==-1&&g===fn||Nl.indexOf(m)!==-1&&Hd.indexOf(g)!==-1||Hd.indexOf(m)!==-1&&Nl.indexOf(g)!==-1||[mn,fn].indexOf(m)!==-1&&(g===cl||[dn,pn].indexOf(g)!==-1&&t[p+1]===cl)||[dn,pn].indexOf(m)!==-1&&g===cl||m===cl&&[cl,Vs,Ds].indexOf(g)!==-1)return Ot;if([cl,Vs,Ds,Gn,rn].indexOf(g)!==-1)for(var y=i;y>=0;){var v=t[y];if(v===cl)return Ot;if([Vs,Ds].indexOf(v)!==-1)y--;else break}if([mn,fn].indexOf(g)!==-1)for(var y=[Gn,rn].indexOf(m)!==-1?c:i;y>=0;){var v=t[y];if(v===cl)return Ot;if([Vs,Ds].indexOf(v)!==-1)y--;else break}if(fr===m&&[fr,vo,cr,Ar].indexOf(g)!==-1||[vo,cr].indexOf(m)!==-1&&[vo,go].indexOf(g)!==-1||[go,Ar].indexOf(m)!==-1&&g===go||Pd.indexOf(m)!==-1&&[Od,fn].indexOf(g)!==-1||Pd.indexOf(g)!==-1&&m===mn||Nl.indexOf(m)!==-1&&Nl.indexOf(g)!==-1||m===Ds&&Nl.indexOf(g)!==-1||Nl.concat(cl).indexOf(m)!==-1&&g===dn&&kg.indexOf(e[p])===-1||Nl.concat(cl).indexOf(g)!==-1&&m===rn)return Ot;if(m===ki&&g===ki){for(var C=a[i],b=1;C>0&&(C--,t[C]===ki);)b++;if(b%2!==0)return Ot}return m===jn&&g===zn?Ot:qn},Eg=function(e,t){t||(t={lineBreak:"normal",wordBreak:"normal"});var a=Fg(e,t.lineBreak),l=a[0],s=a[1],i=a[2];(t.wordBreak==="break-all"||t.wordBreak==="break-word")&&(s=s.map(function(p){return[cl,ys,Xc].indexOf(p)!==-1?En:p}));var c=t.wordBreak==="keep-all"?i.map(function(p,m){return p&&e[m]>=19968&&e[m]<=40959}):void 0;return[l,s,c]},Ug=function(){function e(t,a,l,s){this.codePoints=t,this.required=a===Jc,this.start=l,this.end=s}return e.prototype.slice=function(){return Sa.apply(void 0,this.codePoints.slice(this.start,this.end))},e}(),Ig=function(e,t){var a=ni(e),l=Eg(a,t),s=l[0],i=l[1],c=l[2],p=a.length,m=0,_=0;return{next:function(){if(_>=p)return{done:!0,value:null};for(var g=Ot;_=eA&&e<=57},A1=function(e){return e>=55296&&e<=57343},Ts=function(e){return Xa(e)||e>=lA&&e<=nA||e>=tA&&e<=i1},p1=function(e){return e>=tA&&e<=d1},f1=function(e){return e>=lA&&e<=c1},m1=function(e){return p1(e)||f1(e)},h1=function(e){return e>=Xg},Zn=function(e){return e===Fo||e===Vg||e===Tg},$o=function(e){return m1(e)||h1(e)||e===Og},qd=function(e){return $o(e)||Xa(e)||e===ol},_1=function(e){return e>=t1&&e<=a1||e===l1||e>=s1&&e<=n1||e===o1},ls=function(e,t){return e!==yn?!1:t!==Fo},eo=function(e,t,a){return e===ol?$o(t)||ls(t,a):$o(e)?!0:!!(e===yn&&ls(e,t))},Fi=function(e,t,a){return e===ws||e===ol?Xa(t)?!0:t===Un&&Xa(a):Xa(e===Un?t:e)},v1=function(e){var t=0,a=1;(e[t]===ws||e[t]===ol)&&(e[t]===ol&&(a=-1),t++);for(var l=[];Xa(e[t]);)l.push(e[t++]);var s=l.length?parseInt(Sa.apply(void 0,l),10):0;e[t]===Un&&t++;for(var i=[];Xa(e[t]);)i.push(e[t++]);var c=i.length,p=c?parseInt(Sa.apply(void 0,i),10):0;(e[t]===sA||e[t]===aA)&&t++;var m=1;(e[t]===ws||e[t]===ol)&&(e[t]===ol&&(m=-1),t++);for(var _=[];Xa(e[t]);)_.push(e[t++]);var g=_.length?parseInt(Sa.apply(void 0,_),10):0;return a*(s+p*Math.pow(10,-c))*Math.pow(10,m*g)},g1={type:2},y1={type:3},b1={type:4},w1={type:13},C1={type:8},B1={type:21},k1={type:9},x1={type:10},S1={type:11},F1={type:12},$1={type:14},to={type:23},E1={type:1},U1={type:25},I1={type:24},Q1={type:26},D1={type:27},V1={type:28},T1={type:29},M1={type:31},_r={type:32},oA=function(){function e(){this._value=[]}return e.prototype.write=function(t){this._value=this._value.concat(ni(t))},e.prototype.read=function(){for(var t=[],a=this.consumeToken();a!==_r;)t.push(a),a=this.consumeToken();return t},e.prototype.consumeToken=function(){var t=this.consumeCodePoint();switch(t){case Yn:return this.consumeStringToken(Yn);case Mg:var a=this.peekCodePoint(0),l=this.peekCodePoint(1),s=this.peekCodePoint(2);if(qd(a)||ls(l,s)){var i=eo(a,l,s)?Dg:Qg,c=this.consumeName();return{type:5,value:c,flags:i}}break;case Lg:if(this.peekCodePoint(0)===un)return this.consumeCodePoint(),w1;break;case Wn:return this.consumeStringToken(Wn);case Xn:return g1;case cn:return y1;case Si:if(this.peekCodePoint(0)===un)return this.consumeCodePoint(),$1;break;case ws:if(Fi(t,this.peekCodePoint(0),this.peekCodePoint(1)))return this.reconsumeCodePoint(t),this.consumeNumericToken();break;case Jg:return b1;case ol:var p=t,m=this.peekCodePoint(0),_=this.peekCodePoint(1);if(Fi(p,m,_))return this.reconsumeCodePoint(t),this.consumeNumericToken();if(eo(p,m,_))return this.reconsumeCodePoint(t),this.consumeIdentLikeToken();if(m===ol&&_===Ng)return this.consumeCodePoint(),this.consumeCodePoint(),I1;break;case Un:if(Fi(t,this.peekCodePoint(0),this.peekCodePoint(1)))return this.reconsumeCodePoint(t),this.consumeNumericToken();break;case Gd:if(this.peekCodePoint(0)===Si)for(this.consumeCodePoint();;){var g=this.consumeCodePoint();if(g===Si&&(g=this.consumeCodePoint(),g===Gd))return this.consumeToken();if(g===Dl)return this.consumeToken()}break;case Zg:return Q1;case e1:return D1;case Pg:if(this.peekCodePoint(0)===Hg&&this.peekCodePoint(1)===ol&&this.peekCodePoint(2)===ol)return this.consumeCodePoint(),this.consumeCodePoint(),U1;break;case Kg:var y=this.peekCodePoint(0),v=this.peekCodePoint(1),C=this.peekCodePoint(2);if(eo(y,v,C)){var c=this.consumeName();return{type:7,value:c}}break;case Gg:return V1;case yn:if(ls(t,this.peekCodePoint(0)))return this.reconsumeCodePoint(t),this.consumeIdentLikeToken();break;case jg:return T1;case zg:if(this.peekCodePoint(0)===un)return this.consumeCodePoint(),C1;break;case qg:return S1;case Yg:return F1;case r1:case u1:var b=this.peekCodePoint(0),w=this.peekCodePoint(1);return b===ws&&(Ts(w)||w===Jn)&&(this.consumeCodePoint(),this.consumeUnicodeRangeToken()),this.reconsumeCodePoint(t),this.consumeIdentLikeToken();case jd:if(this.peekCodePoint(0)===un)return this.consumeCodePoint(),k1;if(this.peekCodePoint(0)===jd)return this.consumeCodePoint(),B1;break;case Wg:if(this.peekCodePoint(0)===un)return this.consumeCodePoint(),x1;break;case Dl:return _r}return Zn(t)?(this.consumeWhiteSpace(),M1):Xa(t)?(this.reconsumeCodePoint(t),this.consumeNumericToken()):$o(t)?(this.reconsumeCodePoint(t),this.consumeIdentLikeToken()):{type:6,value:Sa(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();Ts(a)&&t.length<6;)t.push(a),a=this.consumeCodePoint();for(var l=!1;a===Jn&&t.length<6;)t.push(a),a=this.consumeCodePoint(),l=!0;if(l){var s=parseInt(Sa.apply(void 0,t.map(function(m){return m===Jn?eA:m})),16),i=parseInt(Sa.apply(void 0,t.map(function(m){return m===Jn?nA:m})),16);return{type:30,start:s,end:i}}var c=parseInt(Sa.apply(void 0,t),16);if(this.peekCodePoint(0)===ol&&Ts(this.peekCodePoint(1))){this.consumeCodePoint(),a=this.consumeCodePoint();for(var p=[];Ts(a)&&p.length<6;)p.push(a),a=this.consumeCodePoint();var i=parseInt(Sa.apply(void 0,p),16);return{type:30,start:c,end:i}}else return{type:30,start:c,end:c}},e.prototype.consumeIdentLikeToken=function(){var t=this.consumeName();return t.toLowerCase()==="url"&&this.peekCodePoint(0)===Xn?(this.consumeCodePoint(),this.consumeUrlToken()):this.peekCodePoint(0)===Xn?(this.consumeCodePoint(),{type:19,value:t}):{type:20,value:t}},e.prototype.consumeUrlToken=function(){var t=[];if(this.consumeWhiteSpace(),this.peekCodePoint(0)===Dl)return{type:22,value:""};var a=this.peekCodePoint(0);if(a===Wn||a===Yn){var l=this.consumeStringToken(this.consumeCodePoint());return l.type===0&&(this.consumeWhiteSpace(),this.peekCodePoint(0)===Dl||this.peekCodePoint(0)===cn)?(this.consumeCodePoint(),{type:22,value:l.value}):(this.consumeBadUrlRemnants(),to)}for(;;){var s=this.consumeCodePoint();if(s===Dl||s===cn)return{type:22,value:Sa.apply(void 0,t)};if(Zn(s))return this.consumeWhiteSpace(),this.peekCodePoint(0)===Dl||this.peekCodePoint(0)===cn?(this.consumeCodePoint(),{type:22,value:Sa.apply(void 0,t)}):(this.consumeBadUrlRemnants(),to);if(s===Yn||s===Wn||s===Xn||_1(s))return this.consumeBadUrlRemnants(),to;if(s===yn)if(ls(s,this.peekCodePoint(0)))t.push(this.consumeEscapedCodePoint());else return this.consumeBadUrlRemnants(),to;else t.push(s)}},e.prototype.consumeWhiteSpace=function(){for(;Zn(this.peekCodePoint(0));)this.consumeCodePoint()},e.prototype.consumeBadUrlRemnants=function(){for(;;){var t=this.consumeCodePoint();if(t===cn||t===Dl)return;ls(t,this.peekCodePoint(0))&&this.consumeEscapedCodePoint()}},e.prototype.consumeStringSlice=function(t){for(var a=5e4,l="";t>0;){var s=Math.min(a,t);l+=Sa.apply(void 0,this._value.splice(0,s)),t-=s}return this._value.shift(),l},e.prototype.consumeStringToken=function(t){var a="",l=0;do{var s=this._value[l];if(s===Dl||s===void 0||s===t)return a+=this.consumeStringSlice(l),{type:0,value:a};if(s===Fo)return this._value.splice(0,l),E1;if(s===yn){var i=this._value[l+1];i!==Dl&&i!==void 0&&(i===Fo?(a+=this.consumeStringSlice(l),l=-1,this._value.shift()):ls(s,i)&&(a+=this.consumeStringSlice(l),a+=Sa(this.consumeEscapedCodePoint()),l=-1))}l++}while(!0)},e.prototype.consumeNumber=function(){var t=[],a=Tn,l=this.peekCodePoint(0);for((l===ws||l===ol)&&t.push(this.consumeCodePoint());Xa(this.peekCodePoint(0));)t.push(this.consumeCodePoint());l=this.peekCodePoint(0);var s=this.peekCodePoint(1);if(l===Un&&Xa(s))for(t.push(this.consumeCodePoint(),this.consumeCodePoint()),a=Kd;Xa(this.peekCodePoint(0));)t.push(this.consumeCodePoint());l=this.peekCodePoint(0),s=this.peekCodePoint(1);var i=this.peekCodePoint(2);if((l===sA||l===aA)&&((s===ws||s===ol)&&Xa(i)||Xa(s)))for(t.push(this.consumeCodePoint(),this.consumeCodePoint()),a=Kd;Xa(this.peekCodePoint(0));)t.push(this.consumeCodePoint());return[v1(t),a]},e.prototype.consumeNumericToken=function(){var t=this.consumeNumber(),a=t[0],l=t[1],s=this.peekCodePoint(0),i=this.peekCodePoint(1),c=this.peekCodePoint(2);if(eo(s,i,c)){var p=this.consumeName();return{type:15,number:a,flags:l,unit:p}}return s===Rg?(this.consumeCodePoint(),{type:16,number:a,flags:l}):{type:17,number:a,flags:l}},e.prototype.consumeEscapedCodePoint=function(){var t=this.consumeCodePoint();if(Ts(t)){for(var a=Sa(t);Ts(this.peekCodePoint(0))&&a.length<6;)a+=Sa(this.consumeCodePoint());Zn(this.peekCodePoint(0))&&this.consumeCodePoint();var l=parseInt(a,16);return l===0||A1(l)||l>1114111?zd:l}return t===Dl?zd:t},e.prototype.consumeName=function(){for(var t="";;){var a=this.consumeCodePoint();if(qd(a))t+=Sa(a);else if(ls(a,this.peekCodePoint(0)))t+=Sa(this.consumeEscapedCodePoint());else return this.reconsumeCodePoint(a),t}},e}(),iA=function(){function e(t){this._tokens=t}return e.create=function(t){var a=new oA;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:[]},l=this.consumeToken();;){if(l.type===32||R1(l,t))return a;this.reconsumeToken(l),a.values.push(this.consumeComponentValue()),l=this.consumeToken()}},e.prototype.consumeFunction=function(t){for(var a={name:t.value,values:[],type:18};;){var l=this.consumeToken();if(l.type===32||l.type===3)return a;this.reconsumeToken(l),a.values.push(this.consumeComponentValue())}},e.prototype.consumeToken=function(){var t=this._tokens.shift();return typeof t>"u"?_r:t},e.prototype.reconsumeToken=function(t){this._tokens.unshift(t)},e}(),Mn=function(e){return e.type===15},ln=function(e){return e.type===17},sa=function(e){return e.type===20},L1=function(e){return e.type===0},vr=function(e,t){return sa(e)&&e.value===t},rA=function(e){return e.type!==31},en=function(e){return e.type!==31&&e.type!==4},Ol=function(e){var t=[],a=[];return e.forEach(function(l){if(l.type===4){if(a.length===0)throw new Error("Error parsing function args, zero tokens for arg");t.push(a),a=[];return}l.type!==31&&a.push(l)}),a.length&&t.push(a),t},R1=function(e,t){return t===11&&e.type===12||t===28&&e.type===29?!0:t===2&&e.type===3},As=function(e){return e.type===17||e.type===15},Da=function(e){return e.type===16||As(e)},dA=function(e){return e.length>1?[e[0],e[1]]:[e[0]]},ja={type:17,number:0,flags:Tn},ld={type:16,number:50,flags:Tn},ns={type:16,number:100,flags:Tn},hn=function(e,t,a){var l=e[0],s=e[1];return[ma(l,t),ma(typeof s<"u"?s:l,a)]},ma=function(e,t){if(e.type===16)return e.number/100*t;if(Mn(e))switch(e.unit){case"rem":case"em":return 16*e.number;case"px":default:return e.number}return e.number},uA="deg",cA="grad",AA="rad",pA="turn",oi={name:"angle",parse:function(e,t){if(t.type===15)switch(t.unit){case uA:return Math.PI*t.number/180;case cA:return Math.PI/200*t.number;case AA:return t.number;case pA:return Math.PI*2*t.number}throw new Error("Unsupported angle type")}},fA=function(e){return e.type===15&&(e.unit===uA||e.unit===cA||e.unit===AA||e.unit===pA)},mA=function(e){var t=e.filter(sa).map(function(a){return a.value}).join(" ");switch(t){case"to bottom right":case"to right bottom":case"left top":case"top left":return[ja,ja];case"to top":case"bottom":return Bl(0);case"to bottom left":case"to left bottom":case"right top":case"top right":return[ja,ns];case"to right":case"left":return Bl(90);case"to top left":case"to left top":case"right bottom":case"bottom right":return[ns,ns];case"to bottom":case"top":return Bl(180);case"to top right":case"to right top":case"left bottom":case"bottom left":return[ns,ja];case"to left":case"right":return Bl(270)}return 0},Bl=function(e){return Math.PI*e/180},ds={name:"color",parse:function(e,t){if(t.type===18){var a=O1[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 l=t.value.substring(0,1),s=t.value.substring(1,2),i=t.value.substring(2,3);return os(parseInt(l+l,16),parseInt(s+s,16),parseInt(i+i,16),1)}if(t.value.length===4){var l=t.value.substring(0,1),s=t.value.substring(1,2),i=t.value.substring(2,3),c=t.value.substring(3,4);return os(parseInt(l+l,16),parseInt(s+s,16),parseInt(i+i,16),parseInt(c+c,16)/255)}if(t.value.length===6){var l=t.value.substring(0,2),s=t.value.substring(2,4),i=t.value.substring(4,6);return os(parseInt(l,16),parseInt(s,16),parseInt(i,16),1)}if(t.value.length===8){var l=t.value.substring(0,2),s=t.value.substring(2,4),i=t.value.substring(4,6),c=t.value.substring(6,8);return os(parseInt(l,16),parseInt(s,16),parseInt(i,16),parseInt(c,16)/255)}}if(t.type===20){var p=zl[t.value.toUpperCase()];if(typeof p<"u")return p}return zl.TRANSPARENT}},us=function(e){return(255&e)===0},Oa=function(e){var t=255&e,a=255&e>>8,l=255&e>>16,s=255&e>>24;return t<255?"rgba("+s+","+l+","+a+","+t/255+")":"rgb("+s+","+l+","+a+")"},os=function(e,t,a,l){return(e<<24|t<<16|a<<8|Math.round(l*255)<<0)>>>0},Yd=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},Wd=function(e,t){var a=t.filter(en);if(a.length===3){var l=a.map(Yd),s=l[0],i=l[1],c=l[2];return os(s,i,c,1)}if(a.length===4){var p=a.map(Yd),s=p[0],i=p[1],c=p[2],m=p[3];return os(s,i,c,m)}return 0};function $i(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 Xd=function(e,t){var a=t.filter(en),l=a[0],s=a[1],i=a[2],c=a[3],p=(l.type===17?Bl(l.number):oi.parse(e,l))/(Math.PI*2),m=Da(s)?s.number/100:0,_=Da(i)?i.number/100:0,g=typeof c<"u"&&Da(c)?ma(c,1):1;if(m===0)return os(_*255,_*255,_*255,1);var y=_<=.5?_*(m+1):_+m-_*m,v=_*2-y,C=$i(v,y,p+1/3),b=$i(v,y,p),w=$i(v,y,p-1/3);return os(C*255,b*255,w*255,g)},O1={hsl:Xd,hsla:Xd,rgb:Wd,rgba:Wd},bn=function(e,t){return ds.parse(e,iA.create(t).parseComponentValue())},zl={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},H1={name:"background-clip",initialValue:"border-box",prefix:!1,type:1,parse:function(e,t){return t.map(function(a){if(sa(a))switch(a.value){case"padding-box":return 1;case"content-box":return 2}return 0})}},P1={name:"background-color",initialValue:"transparent",prefix:!1,type:3,format:"color"},ii=function(e,t){var a=ds.parse(e,t[0]),l=t[1];return l&&Da(l)?{color:a,stop:l}:{color:a,stop:null}},Jd=function(e,t){var a=e[0],l=e[e.length-1];a.stop===null&&(a.stop=ja),l.stop===null&&(l.stop=ns);for(var s=[],i=0,c=0;ci?s.push(m):s.push(i),i=m}else s.push(null)}for(var _=null,c=0;cc.optimumDistance)?{optimumCorner:p,optimumDistance:g}:c},{optimumDistance:s?1/0:-1/0,optimumCorner:null}).optimumCorner},G1=function(e,t,a,l,s){var i=0,c=0;switch(e.size){case 0:e.shape===0?i=c=Math.min(Math.abs(t),Math.abs(t-l),Math.abs(a),Math.abs(a-s)):e.shape===1&&(i=Math.min(Math.abs(t),Math.abs(t-l)),c=Math.min(Math.abs(a),Math.abs(a-s)));break;case 2:if(e.shape===0)i=c=Math.min($l(t,a),$l(t,a-s),$l(t-l,a),$l(t-l,a-s));else if(e.shape===1){var p=Math.min(Math.abs(a),Math.abs(a-s))/Math.min(Math.abs(t),Math.abs(t-l)),m=Zd(l,s,t,a,!0),_=m[0],g=m[1];i=$l(_-t,(g-a)/p),c=p*i}break;case 1:e.shape===0?i=c=Math.max(Math.abs(t),Math.abs(t-l),Math.abs(a),Math.abs(a-s)):e.shape===1&&(i=Math.max(Math.abs(t),Math.abs(t-l)),c=Math.max(Math.abs(a),Math.abs(a-s)));break;case 3:if(e.shape===0)i=c=Math.max($l(t,a),$l(t,a-s),$l(t-l,a),$l(t-l,a-s));else if(e.shape===1){var p=Math.max(Math.abs(a),Math.abs(a-s))/Math.max(Math.abs(t),Math.abs(t-l)),y=Zd(l,s,t,a,!1),_=y[0],g=y[1];i=$l(_-t,(g-a)/p),c=p*i}break}return Array.isArray(e.size)&&(i=ma(e.size[0],l),c=e.size.length===2?ma(e.size[1],s):i),[i,c]},j1=function(e,t){var a=Bl(180),l=[];return Ol(t).forEach(function(s,i){if(i===0){var c=s[0];if(c.type===20&&c.value==="to"){a=mA(s);return}else if(fA(c)){a=oi.parse(e,c);return}}var p=ii(e,s);l.push(p)}),{angle:a,stops:l,type:1}},ao=function(e,t){var a=Bl(180),l=[];return Ol(t).forEach(function(s,i){if(i===0){var c=s[0];if(c.type===20&&["top","left","right","bottom"].indexOf(c.value)!==-1){a=mA(s);return}else if(fA(c)){a=(oi.parse(e,c)+Bl(270))%Bl(360);return}}var p=ii(e,s);l.push(p)}),{angle:a,stops:l,type:1}},z1=function(e,t){var a=Bl(180),l=[],s=1,i=0,c=3,p=[];return Ol(t).forEach(function(m,_){var g=m[0];if(_===0){if(sa(g)&&g.value==="linear"){s=1;return}else if(sa(g)&&g.value==="radial"){s=2;return}}if(g.type===18){if(g.name==="from"){var y=ds.parse(e,g.values[0]);l.push({stop:ja,color:y})}else if(g.name==="to"){var y=ds.parse(e,g.values[0]);l.push({stop:ns,color:y})}else if(g.name==="color-stop"){var v=g.values.filter(en);if(v.length===2){var y=ds.parse(e,v[1]),C=v[0];ln(C)&&l.push({stop:{type:16,number:C.number*100,flags:C.flags},color:y})}}}}),s===1?{angle:(a+Bl(180))%Bl(360),stops:l,type:s}:{size:c,shape:i,stops:l,position:p,type:s}},hA="closest-side",_A="farthest-side",vA="closest-corner",gA="farthest-corner",yA="circle",bA="ellipse",wA="cover",CA="contain",q1=function(e,t){var a=0,l=3,s=[],i=[];return Ol(t).forEach(function(c,p){var m=!0;if(p===0){var _=!1;m=c.reduce(function(y,v){if(_)if(sa(v))switch(v.value){case"center":return i.push(ld),y;case"top":case"left":return i.push(ja),y;case"right":case"bottom":return i.push(ns),y}else(Da(v)||As(v))&&i.push(v);else if(sa(v))switch(v.value){case yA:return a=0,!1;case bA:return a=1,!1;case"at":return _=!0,!1;case hA:return l=0,!1;case wA:case _A:return l=1,!1;case CA:case vA:return l=2,!1;case gA:return l=3,!1}else if(As(v)||Da(v))return Array.isArray(l)||(l=[]),l.push(v),!1;return y},m)}if(m){var g=ii(e,c);s.push(g)}}),{size:l,shape:a,stops:s,position:i,type:2}},lo=function(e,t){var a=0,l=3,s=[],i=[];return Ol(t).forEach(function(c,p){var m=!0;if(p===0?m=c.reduce(function(g,y){if(sa(y))switch(y.value){case"center":return i.push(ld),!1;case"top":case"left":return i.push(ja),!1;case"right":case"bottom":return i.push(ns),!1}else if(Da(y)||As(y))return i.push(y),!1;return g},m):p===1&&(m=c.reduce(function(g,y){if(sa(y))switch(y.value){case yA:return a=0,!1;case bA:return a=1,!1;case CA:case hA:return l=0,!1;case _A:return l=1,!1;case vA:return l=2,!1;case wA:case gA:return l=3,!1}else if(As(y)||Da(y))return Array.isArray(l)||(l=[]),l.push(y),!1;return g},m)),m){var _=ii(e,c);s.push(_)}}),{size:l,shape:a,stops:s,position:i,type:2}},Y1=function(e){return e.type===1},W1=function(e){return e.type===2},sd={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 l=BA[t.name];if(typeof l>"u")throw new Error('Attempting to parse an unsupported image function "'+t.name+'"');return l(e,t.values)}throw new Error("Unsupported image type "+t.type)}};function X1(e){return!(e.type===20&&e.value==="none")&&(e.type!==18||!!BA[e.name])}var BA={"linear-gradient":j1,"-moz-linear-gradient":ao,"-ms-linear-gradient":ao,"-o-linear-gradient":ao,"-webkit-linear-gradient":ao,"radial-gradient":q1,"-moz-radial-gradient":lo,"-ms-radial-gradient":lo,"-o-radial-gradient":lo,"-webkit-radial-gradient":lo,"-webkit-gradient":z1},J1={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(l){return en(l)&&X1(l)}).map(function(l){return sd.parse(e,l)})}},Z1={name:"background-origin",initialValue:"border-box",prefix:!1,type:1,parse:function(e,t){return t.map(function(a){if(sa(a))switch(a.value){case"padding-box":return 1;case"content-box":return 2}return 0})}},ey={name:"background-position",initialValue:"0% 0%",type:1,prefix:!1,parse:function(e,t){return Ol(t).map(function(a){return a.filter(Da)}).map(dA)}},ty={name:"background-repeat",initialValue:"repeat",prefix:!1,type:1,parse:function(e,t){return Ol(t).map(function(a){return a.filter(sa).map(function(l){return l.value}).join(" ")}).map(ay)}},ay=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}},Ys;(function(e){e.AUTO="auto",e.CONTAIN="contain",e.COVER="cover"})(Ys||(Ys={}));var ly={name:"background-size",initialValue:"0",prefix:!1,type:1,parse:function(e,t){return Ol(t).map(function(a){return a.filter(sy)})}},sy=function(e){return sa(e)||Da(e)},ri=function(e){return{name:"border-"+e+"-color",initialValue:"transparent",prefix:!1,type:3,format:"color"}},ny=ri("top"),oy=ri("right"),iy=ri("bottom"),ry=ri("left"),di=function(e){return{name:"border-radius-"+e,initialValue:"0 0",prefix:!1,type:1,parse:function(t,a){return dA(a.filter(Da))}}},dy=di("top-left"),uy=di("top-right"),cy=di("bottom-right"),Ay=di("bottom-left"),ui=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}}},py=ui("top"),fy=ui("right"),my=ui("bottom"),hy=ui("left"),ci=function(e){return{name:"border-"+e+"-width",initialValue:"0",type:0,prefix:!1,parse:function(t,a){return Mn(a)?a.number:0}}},_y=ci("top"),vy=ci("right"),gy=ci("bottom"),yy=ci("left"),by={name:"color",initialValue:"transparent",prefix:!1,type:3,format:"color"},wy={name:"direction",initialValue:"ltr",prefix:!1,type:2,parse:function(e,t){switch(t){case"rtl":return 1;case"ltr":default:return 0}}},Cy={name:"display",initialValue:"inline-block",prefix:!1,type:1,parse:function(e,t){return t.filter(sa).reduce(function(a,l){return a|By(l.value)},0)}},By=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},ky={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}},xy={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}},Eo;(function(e){e.NORMAL="normal",e.STRICT="strict"})(Eo||(Eo={}));var Sy={name:"line-break",initialValue:"normal",prefix:!1,type:2,parse:function(e,t){switch(t){case"strict":return Eo.STRICT;case"normal":default:return Eo.NORMAL}}},Fy={name:"line-height",initialValue:"normal",prefix:!1,type:4},eu=function(e,t){return sa(e)&&e.value==="normal"?1.2*t:e.type===17?t*e.number:Da(e)?ma(e,t):t},$y={name:"list-style-image",initialValue:"none",type:0,prefix:!1,parse:function(e,t){return t.type===20&&t.value==="none"?null:sd.parse(e,t)}},Ey={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}}},gr={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}}},Ai=function(e){return{name:"margin-"+e,initialValue:"0",prefix:!1,type:4}},Uy=Ai("top"),Iy=Ai("right"),Qy=Ai("bottom"),Dy=Ai("left"),Vy={name:"overflow",initialValue:"visible",prefix:!1,type:1,parse:function(e,t){return t.filter(sa).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}})}},Ty={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"}}},pi=function(e){return{name:"padding-"+e,initialValue:"0",prefix:!1,type:3,format:"length-percentage"}},My=pi("top"),Ly=pi("right"),Ry=pi("bottom"),Oy=pi("left"),Hy={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}}},Py={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}},Ny={name:"text-shadow",initialValue:"none",type:1,prefix:!1,parse:function(e,t){return t.length===1&&vr(t[0],"none")?[]:Ol(t).map(function(a){for(var l={color:zl.TRANSPARENT,offsetX:ja,offsetY:ja,blur:ja},s=0,i=0;i"u")throw new Error('Attempting to parse an unsupported transform function "'+t.name+'"');return a(t.values)}return null}},jy=function(e){var t=e.filter(function(a){return a.type===17}).map(function(a){return a.number});return t.length===6?t:null},zy=function(e){var t=e.filter(function(m){return m.type===17}).map(function(m){return m.number}),a=t[0],l=t[1];t[2],t[3];var s=t[4],i=t[5];t[6],t[7],t[8],t[9],t[10],t[11];var c=t[12],p=t[13];return t[14],t[15],t.length===16?[a,l,s,i,c,p]:null},qy={matrix:jy,matrix3d:zy},tu={type:16,number:50,flags:Tn},Yy=[tu,tu],Wy={name:"transform-origin",initialValue:"50% 50%",prefix:!0,type:1,parse:function(e,t){var a=t.filter(Da);return a.length!==2?Yy:[a[0],a[1]]}},Xy={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}}},wn;(function(e){e.NORMAL="normal",e.BREAK_ALL="break-all",e.KEEP_ALL="keep-all"})(wn||(wn={}));var Jy={name:"word-break",initialValue:"normal",prefix:!1,type:2,parse:function(e,t){switch(t){case"break-all":return wn.BREAK_ALL;case"keep-all":return wn.KEEP_ALL;case"normal":default:return wn.NORMAL}}},Zy={name:"z-index",initialValue:"auto",prefix:!1,type:0,parse:function(e,t){if(t.type===20)return{auto:!0,order:0};if(ln(t))return{auto:!1,order:t.number};throw new Error("Invalid z-index number parsed")}},kA={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")}},eb={name:"opacity",initialValue:"1",type:0,prefix:!1,parse:function(e,t){return ln(t)?t.number:1}},tb={name:"text-decoration-color",initialValue:"transparent",prefix:!1,type:3,format:"color"},ab={name:"text-decoration-line",initialValue:"none",prefix:!1,type:1,parse:function(e,t){return t.filter(sa).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})}},lb={name:"font-family",initialValue:"",prefix:!1,type:1,parse:function(e,t){var a=[],l=[];return t.forEach(function(s){switch(s.type){case 20:case 0:a.push(s.value);break;case 17:a.push(s.number.toString());break;case 4:l.push(a.join(" ")),a.length=0;break}}),a.length&&l.push(a.join(" ")),l.map(function(s){return s.indexOf(" ")===-1?s:"'"+s+"'"})}},sb={name:"font-size",initialValue:"0",prefix:!1,type:3,format:"length"},nb={name:"font-weight",initialValue:"normal",type:0,prefix:!1,parse:function(e,t){if(ln(t))return t.number;if(sa(t))switch(t.value){case"bold":return 700;case"normal":default:return 400}return 400}},ob={name:"font-variant",initialValue:"none",type:1,prefix:!1,parse:function(e,t){return t.filter(sa).map(function(a){return a.value})}},ib={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"}}},Ta=function(e,t){return(e&t)!==0},rb={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}},db={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 l=[],s=t.filter(rA),i=0;i1?1:0],this.overflowWrap=ut(t,Ty,a.overflowWrap),this.paddingTop=ut(t,My,a.paddingTop),this.paddingRight=ut(t,Ly,a.paddingRight),this.paddingBottom=ut(t,Ry,a.paddingBottom),this.paddingLeft=ut(t,Oy,a.paddingLeft),this.paintOrder=ut(t,fb,a.paintOrder),this.position=ut(t,Py,a.position),this.textAlign=ut(t,Hy,a.textAlign),this.textDecorationColor=ut(t,tb,(l=a.textDecorationColor)!==null&&l!==void 0?l:a.color),this.textDecorationLine=ut(t,ab,(s=a.textDecorationLine)!==null&&s!==void 0?s:a.textDecoration),this.textShadow=ut(t,Ny,a.textShadow),this.textTransform=ut(t,Ky,a.textTransform),this.transform=ut(t,Gy,a.transform),this.transformOrigin=ut(t,Wy,a.transformOrigin),this.visibility=ut(t,Xy,a.visibility),this.webkitTextStrokeColor=ut(t,mb,a.webkitTextStrokeColor),this.webkitTextStrokeWidth=ut(t,hb,a.webkitTextStrokeWidth),this.wordBreak=ut(t,Jy,a.wordBreak),this.zIndex=ut(t,Zy,a.zIndex)}return e.prototype.isVisible=function(){return this.display>0&&this.opacity>0&&this.visibility===0},e.prototype.isTransparent=function(){return us(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 Ta(this.display,4)||Ta(this.display,33554432)||Ta(this.display,268435456)||Ta(this.display,536870912)||Ta(this.display,67108864)||Ta(this.display,134217728)},e}(),vb=function(){function e(t,a){this.content=ut(t,rb,a.content),this.quotes=ut(t,Ab,a.quotes)}return e}(),lu=function(){function e(t,a){this.counterIncrement=ut(t,db,a.counterIncrement),this.counterReset=ut(t,ub,a.counterReset)}return e}(),ut=function(e,t,a){var l=new oA,s=a!==null&&typeof a<"u"?a.toString():t.initialValue;l.write(s);var i=new iA(l.read());switch(t.type){case 2:var c=i.parseComponentValue();return t.parse(e,sa(c)?c.value:t.initialValue);case 0:return t.parse(e,i.parseComponentValue());case 1:return t.parse(e,i.parseComponentValues());case 4:return i.parseComponentValue();case 3:switch(t.format){case"angle":return oi.parse(e,i.parseComponentValue());case"color":return ds.parse(e,i.parseComponentValue());case"image":return sd.parse(e,i.parseComponentValue());case"length":var p=i.parseComponentValue();return As(p)?p:ja;case"length-percentage":var m=i.parseComponentValue();return Da(m)?m:ja;case"time":return kA.parse(e,i.parseComponentValue())}break}},gb="data-html2canvas-debug",yb=function(e){var t=e.getAttribute(gb);switch(t){case"all":return 1;case"clone":return 2;case"parse":return 3;case"render":return 4;default:return 0}},yr=function(e,t){var a=yb(e);return a===1||t===a},Hl=function(){function e(t,a){if(this.context=t,this.textNodes=[],this.elements=[],this.flags=0,yr(a,3))debugger;this.styles=new _b(t,window.getComputedStyle(a,null)),Cr(a)&&(this.styles.animationDuration.some(function(l){return l>0})&&(a.style.animationDuration="0s"),this.styles.transform!==null&&(a.style.transform="none")),this.bounds=si(this.context,a),yr(a,4)&&(this.flags|=16)}return e}(),bb="AAAAAAAAAAAAEA4AGBkAAFAaAAACAAAAAAAIABAAGAAwADgACAAQAAgAEAAIABAACAAQAAgAEAAIABAACAAQAAgAEAAIABAAQABIAEQATAAIABAACAAQAAgAEAAIABAAVABcAAgAEAAIABAACAAQAGAAaABwAHgAgACIAI4AlgAIABAAmwCjAKgAsAC2AL4AvQDFAMoA0gBPAVYBWgEIAAgACACMANoAYgFkAWwBdAF8AX0BhQGNAZUBlgGeAaMBlQGWAasBswF8AbsBwwF0AcsBYwHTAQgA2wG/AOMBdAF8AekB8QF0AfkB+wHiAHQBfAEIAAMC5gQIAAsCEgIIAAgAFgIeAggAIgIpAggAMQI5AkACygEIAAgASAJQAlgCYAIIAAgACAAKBQoFCgUTBRMFGQUrBSsFCAAIAAgACAAIAAgACAAIAAgACABdAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACABoAmgCrwGvAQgAbgJ2AggAHgEIAAgACADnAXsCCAAIAAgAgwIIAAgACAAIAAgACACKAggAkQKZAggAPADJAAgAoQKkAqwCsgK6AsICCADJAggA0AIIAAgACAAIANYC3gIIAAgACAAIAAgACABAAOYCCAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAkASoB+QIEAAgACAA8AEMCCABCBQgACABJBVAFCAAIAAgACAAIAAgACAAIAAgACABTBVoFCAAIAFoFCABfBWUFCAAIAAgACAAIAAgAbQUIAAgACAAIAAgACABzBXsFfQWFBYoFigWKBZEFigWKBYoFmAWfBaYFrgWxBbkFCAAIAAgACAAIAAgACAAIAAgACAAIAMEFCAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAMgFCADQBQgACAAIAAgACAAIAAgACAAIAAgACAAIAO4CCAAIAAgAiQAIAAgACABAAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAD0AggACAD8AggACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIANYFCAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAMDvwAIAAgAJAIIAAgACAAIAAgACAAIAAgACwMTAwgACAB9BOsEGwMjAwgAKwMyAwsFYgE3A/MEPwMIAEUDTQNRAwgAWQOsAGEDCAAIAAgACAAIAAgACABpAzQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFIQUoBSwFCAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACABtAwgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACABMAEwACAAIAAgACAAIABgACAAIAAgACAC/AAgACAAyAQgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACACAAIAAwAAgACAAIAAgACAAIAAgACAAIAAAARABIAAgACAAIABQASAAIAAgAIABwAEAAjgCIABsAqAC2AL0AigDQAtwC+IJIQqVAZUBWQqVAZUBlQGVAZUBlQGrC5UBlQGVAZUBlQGVAZUBlQGVAXsKlQGVAbAK6wsrDGUMpQzlDJUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAfAKAAuZA64AtwCJALoC6ADwAAgAuACgA/oEpgO6AqsD+AAIAAgAswMIAAgACAAIAIkAuwP5AfsBwwPLAwgACAAIAAgACADRA9kDCAAIAOED6QMIAAgACAAIAAgACADuA/YDCAAIAP4DyQAIAAgABgQIAAgAXQAOBAgACAAIAAgACAAIABMECAAIAAgACAAIAAgACAD8AAQBCAAIAAgAGgQiBCoECAExBAgAEAEIAAgACAAIAAgACAAIAAgACAAIAAgACAA4BAgACABABEYECAAIAAgATAQYAQgAVAQIAAgACAAIAAgACAAIAAgACAAIAFoECAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgAOQEIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAB+BAcACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAEABhgSMBAgACAAIAAgAlAQIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAwAEAAQABAADAAMAAwADAAQABAAEAAQABAAEAAQABHATAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgAdQMIAAgACAAIAAgACAAIAMkACAAIAAgAfQMIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACACFA4kDCAAIAAgACAAIAOcBCAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAIcDCAAIAAgACAAIAAgACAAIAAgACAAIAJEDCAAIAAgACADFAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACABgBAgAZgQIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgAbAQCBXIECAAIAHkECAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACABAAJwEQACjBKoEsgQIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAC6BMIECAAIAAgACAAIAAgACABmBAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgAxwQIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAGYECAAIAAgAzgQIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgAigWKBYoFigWKBYoFigWKBd0FXwUIAOIF6gXxBYoF3gT5BQAGCAaKBYoFigWKBYoFigWKBYoFigWKBYoFigXWBIoFigWKBYoFigWKBYoFigWKBYsFEAaKBYoFigWKBYoFigWKBRQGCACKBYoFigWKBQgACAAIANEECAAIABgGigUgBggAJgYIAC4GMwaKBYoF0wQ3Bj4GigWKBYoFigWKBYoFigWKBYoFigWKBYoFigUIAAgACAAIAAgACAAIAAgAigWKBYoFigWKBYoFigWKBYoFigWKBYoFigWKBYoFigWKBYoFigWKBYoFigWKBYoFigWKBYoFigWKBYoFigWLBf///////wQABAAEAAQABAAEAAQABAAEAAQAAwAEAAQAAgAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAAAAAAAAAAAAAAAAAAAAAAAAAOAAAAAAAAAAQADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAAAUAAAAFAAUAAAAFAAUAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAEAAQABAAEAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUABQAFAAUABQAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUAAQAAAAUABQAFAAUABQAFAAAAAAAFAAUAAAAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAUABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAFAAAAAAAFAAUAAQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABwAFAAUABQAFAAAABwAHAAcAAAAHAAcABwAFAAEAAAAAAAAAAAAAAAAAAAAAAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAcABwAFAAUABQAFAAcABwAFAAUAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAAAAQABAAAAAAAAAAAAAAAFAAUABQAFAAAABwAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAHAAcABwAHAAcAAAAHAAcAAAAAAAUABQAHAAUAAQAHAAEABwAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUABwABAAUABQAFAAUAAAAAAAAAAAAAAAEAAQABAAEAAQABAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABwAFAAUAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUAAQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQABQANAAQABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQABAAEAAQABAAEAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAEAAQABAAEAAQABAAEAAQABAAEAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAQABAAEAAQABAAEAAQABAAAAAAAAAAAAAAAAAAAAAAABQAHAAUABQAFAAAAAAAAAAcABQAFAAUABQAFAAQABAAEAAQABAAEAAQABAAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUAAAAFAAUABQAFAAUAAAAFAAUABQAAAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAAAAAAAAAAAAUABQAFAAcAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAHAAUAAAAHAAcABwAFAAUABQAFAAUABQAFAAUABwAHAAcABwAFAAcABwAAAAUABQAFAAUABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABwAHAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAUABwAHAAUABQAFAAUAAAAAAAcABwAAAAAABwAHAAUAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAABQAFAAcAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAAABwAHAAcABQAFAAAAAAAAAAAABQAFAAAAAAAFAAUABQAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAABwAFAAUABQAFAAUAAAAFAAUABwAAAAcABwAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUAAAAFAAUABwAFAAUABQAFAAAAAAAHAAcAAAAAAAcABwAFAAAAAAAAAAAAAAAAAAAABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAcABwAAAAAAAAAHAAcABwAAAAcABwAHAAUAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAABQAHAAcABwAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABwAHAAcABwAAAAUABQAFAAAABQAFAAUABQAAAAAAAAAAAAAAAAAAAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAcABQAHAAcABQAHAAcAAAAFAAcABwAAAAcABwAFAAUAAAAAAAAAAAAAAAAAAAAFAAUAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAcABwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAAAAUABwAAAAAAAAAAAAAAAAAAAAAAAAAAAAUAAAAAAAAAAAAFAAcABwAFAAUABQAAAAUAAAAHAAcABwAHAAcABwAHAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUAAAAHAAUABQAFAAUABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAAABwAFAAUABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAUAAAAFAAAAAAAAAAAABwAHAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABwAFAAUABQAFAAUAAAAFAAUAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUABQAFAAUABQAAAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABwAFAAUABQAFAAUABQAAAAUABQAHAAcABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAcABQAFAAAAAAAAAAAABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAcABQAFAAAAAAAAAAAAAAAAAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAHAAUABQAFAAUABQAFAAUABwAHAAcABwAHAAcABwAHAAUABwAHAAUABQAFAAUABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABwAHAAcABwAFAAUABwAHAAcAAAAAAAAAAAAHAAcABQAHAAcABwAHAAcABwAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAcABwAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABQAHAAUABQAFAAUABQAFAAUAAAAFAAAABQAAAAAABQAFAAUABQAFAAUABQAFAAcABwAHAAcABwAHAAUABQAFAAUABQAFAAUABQAFAAUAAAAAAAUABQAFAAUABQAHAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUABwAFAAcABwAHAAcABwAFAAcABwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAUABQAFAAUABwAHAAUABQAHAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAcABQAFAAcABwAHAAUABwAFAAUABQAHAAcAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABwAHAAcABwAHAAcABwAHAAUABQAFAAUABQAFAAUABQAHAAcABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUAAAAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAcABQAFAAUABQAFAAUABQAAAAAAAAAAAAUAAAAAAAAAAAAAAAAABQAAAAAABwAFAAUAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAAABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUAAAAFAAUABQAFAAUABQAFAAUABQAFAAAAAAAAAAAABQAAAAAAAAAFAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABwAHAAUABQAHAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABwAHAAcABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUABQAFAAUABQAHAAcAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAcABwAFAAUABQAFAAcABwAFAAUABwAHAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAcABwAFAAUABwAHAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAFAAcAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUAAAAFAAUABQAAAAAABQAFAAAAAAAAAAAAAAAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABQAFAAcABwAAAAAAAAAAAAAABwAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABwAFAAcABwAFAAcABwAAAAcABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAAAAAAAAAAAAAAAAAFAAUABQAAAAUABQAAAAAAAAAAAAAABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAAAAAAAAAAAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABQAHAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABwAFAAUABQAFAAUABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABwAHAAcABQAFAAUABQAFAAUABQAFAAUABwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAcABwAFAAUABQAHAAcABQAHAAUABQAAAAAAAAAAAAAAAAAFAAAABwAHAAcABQAFAAUABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABwAHAAcABwAAAAAABwAHAAAAAAAHAAcABwAAAAAAAAAAAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAABwAHAAAAAAAFAAUABQAFAAUABQAFAAAAAAAAAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAcABwAFAAUABQAFAAUABQAFAAUABwAHAAUABQAFAAcABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAHAAcABQAFAAUABQAFAAUABwAFAAcABwAFAAcABQAFAAcABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAHAAcABQAFAAUABQAAAAAABwAHAAcABwAFAAUABwAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABwAHAAUABQAFAAUABQAFAAUABQAHAAcABQAHAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABwAFAAcABwAFAAUABQAFAAUABQAHAAUAAAAAAAAAAAAAAAAAAAAAAAcABwAFAAUABQAFAAcABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAcABwAFAAUABQAFAAUABQAFAAUABQAHAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAcABwAFAAUABQAFAAAAAAAFAAUABwAHAAcABwAFAAAAAAAAAAcAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUABwAHAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABQAFAAUABQAFAAUABQAAAAUABQAFAAUABQAFAAcABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAAAHAAUABQAFAAUABQAFAAUABwAFAAUABwAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUAAAAAAAAABQAAAAUABQAAAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAcABwAHAAcAAAAFAAUAAAAHAAcABQAHAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABwAHAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAAAAAAAAAAAAAAAAAAABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAAAAUABQAFAAAAAAAFAAUABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAAAAAAAAAAABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAAAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUABQAAAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAAAAABQAFAAUABQAFAAUABQAAAAUABQAAAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAFAAUABQAFAAUADgAOAA4ADgAOAA4ADwAPAA8ADwAPAA8ADwAPAA8ADwAPAA8ADwAPAA8ADwAPAA8ADwAPAA8ADwAPAA8ADwAPAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABwAHAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAAAAAAAAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAMAAwADAAMAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkAAAAAAAAAAAAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAAAAAAAAAAAAsADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwACwAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAAAAAADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA4AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAA4ADgAOAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA4ADgAAAAAAAAAAAAAAAAAAAAAADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAA4ADgAOAA4ADgAOAA4ADgAOAAAAAAAAAAAADgAOAA4AAAAAAAAAAAAAAAAAAAAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAAAAAAAAAAAAAAAAAAAAAAAAAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAA4ADgAAAA4ADgAOAA4ADgAOAAAADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4AAAAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4AAAAAAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAAAA4AAAAOAAAAAAAAAAAAAAAAAA4AAAAAAAAAAAAAAAAADgAAAAAAAAAAAAAAAAAAAAAAAAAAAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAAAAAADgAAAAAAAAAAAA4AAAAOAAAAAAAAAAAADgAOAA4AAAAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAA4ADgAOAA4AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAA4AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA4ADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAAAAAAAAAAAA4AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAAAADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA4ADgAOAA4ADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAAAAAADgAOAA4ADgAOAA4ADgAOAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAAAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA4AAAAAAA4ADgAOAA4ADgAOAA4ADgAOAAAADgAOAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4AAAAAAAAAAAAAAAAADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAA4ADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAA4ADgAOAA4ADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAA4ADgAOAA4AAAAAAAAAAAAAAAAAAAAAAA4ADgAOAA4ADgAOAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4AAAAOAA4ADgAOAA4ADgAAAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4AAAAAAAAAAAA=",su="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",_n=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(var so=0;so>4,g[s++]=(c&15)<<4|p>>2,g[s++]=(p&3)<<6|m&63;return _},Cb=function(e){for(var t=e.length,a=[],l=0;l>Bs,xb=1<>Bs,Fb=xA+Sb,$b=Fb,Eb=32,Ub=$b+Eb,Ib=65536>>nd,Qb=1<=0){if(t<55296||t>56319&&t<=65535)return a=this.index[t>>Bs],a=(a<>Bs)],a=(a<>nd),a=this.index[a],a+=t>>Bs&Db,a=this.index[a],a=(a<"u"?[]:new Uint8Array(256);for(var no=0;no=55296&&s<=56319&&a>10)+55296,c%1024+56320)),(s+1===a||l.length>16384)&&(i+=String.fromCharCode.apply(String,l),l.length=0)}return i},Nb=Tb(bb),gl="×",Mi="÷",Kb=function(e){return Nb.get(e)},Gb=function(e,t,a){var l=a-2,s=t[l],i=t[a-1],c=t[a];if(i===Ii&&c===Qi)return gl;if(i===Ii||i===Qi||i===iu||c===Ii||c===Qi||c===iu)return Mi;if(i===du&&[du,Di,uu,cu].indexOf(c)!==-1||(i===uu||i===Di)&&(c===Di||c===Vi)||(i===cu||i===Vi)&&c===Vi||c===Au||c===ru||c===Ob||i===Rb)return gl;if(i===Au&&c===pu){for(;s===ru;)s=t[--l];if(s===pu)return gl}if(i===Ti&&c===Ti){for(var p=0;s===Ti;)p++,s=t[--l];if(p%2===0)return gl}return Mi},jb=function(e){var t=Hb(e),a=t.length,l=0,s=0,i=t.map(Kb);return{next:function(){if(l>=a)return{done:!0,value:null};for(var c=gl;lc.x||g.y>c.y;return c=g,_===0?!0:y});return e.body.removeChild(t),p},Wb=function(){return typeof new Image().crossOrigin<"u"},Xb=function(){return typeof new XMLHttpRequest().responseType=="string"},Jb=function(e){var t=new Image,a=e.createElement("canvas"),l=a.getContext("2d");if(!l)return!1;t.src="data:image/svg+xml,";try{l.drawImage(t,0,0),a.toDataURL()}catch{return!1}return!0},fu=function(e){return e[0]===0&&e[1]===255&&e[2]===0&&e[3]===255},Zb=function(e){var t=e.createElement("canvas"),a=100;t.width=a,t.height=a;var l=t.getContext("2d");if(!l)return Promise.reject(!1);l.fillStyle="rgb(0, 255, 0)",l.fillRect(0,0,a,a);var s=new Image,i=t.toDataURL();s.src=i;var c=br(a,a,0,0,s);return l.fillStyle="red",l.fillRect(0,0,a,a),mu(c).then(function(p){l.drawImage(p,0,0);var m=l.getImageData(0,0,a,a).data;l.fillStyle="red",l.fillRect(0,0,a,a);var _=e.createElement("div");return _.style.backgroundImage="url("+i+")",_.style.height=a+"px",fu(m)?mu(br(a,a,0,0,_)):Promise.reject(!1)}).then(function(p){return l.drawImage(p,0,0),fu(l.getImageData(0,0,a,a).data)}).catch(function(){return!1})},br=function(e,t,a,l,s){var i="http://www.w3.org/2000/svg",c=document.createElementNS(i,"svg"),p=document.createElementNS(i,"foreignObject");return c.setAttributeNS(null,"width",e.toString()),c.setAttributeNS(null,"height",t.toString()),p.setAttributeNS(null,"width","100%"),p.setAttributeNS(null,"height","100%"),p.setAttributeNS(null,"x",a.toString()),p.setAttributeNS(null,"y",l.toString()),p.setAttributeNS(null,"externalResourcesRequired","true"),c.appendChild(p),p.appendChild(s),c},mu=function(e){return new Promise(function(t,a){var l=new Image;l.onload=function(){return t(l)},l.onerror=a,l.src="data:image/svg+xml;charset=utf-8,"+encodeURIComponent(new XMLSerializer().serializeToString(e))})},Ga={get SUPPORT_RANGE_BOUNDS(){var e=qb(document);return Object.defineProperty(Ga,"SUPPORT_RANGE_BOUNDS",{value:e}),e},get SUPPORT_WORD_BREAKING(){var e=Ga.SUPPORT_RANGE_BOUNDS&&Yb(document);return Object.defineProperty(Ga,"SUPPORT_WORD_BREAKING",{value:e}),e},get SUPPORT_SVG_DRAWING(){var e=Jb(document);return Object.defineProperty(Ga,"SUPPORT_SVG_DRAWING",{value:e}),e},get SUPPORT_FOREIGNOBJECT_DRAWING(){var e=typeof Array.from=="function"&&typeof window.fetch=="function"?Zb(document):Promise.resolve(!1);return Object.defineProperty(Ga,"SUPPORT_FOREIGNOBJECT_DRAWING",{value:e}),e},get SUPPORT_CORS_IMAGES(){var e=Wb();return Object.defineProperty(Ga,"SUPPORT_CORS_IMAGES",{value:e}),e},get SUPPORT_RESPONSE_TYPE(){var e=Xb();return Object.defineProperty(Ga,"SUPPORT_RESPONSE_TYPE",{value:e}),e},get SUPPORT_CORS_XHR(){var e="withCredentials"in new XMLHttpRequest;return Object.defineProperty(Ga,"SUPPORT_CORS_XHR",{value:e}),e},get SUPPORT_NATIVE_TEXT_SEGMENTATION(){var e=!!(typeof Intl<"u"&&Intl.Segmenter);return Object.defineProperty(Ga,"SUPPORT_NATIVE_TEXT_SEGMENTATION",{value:e}),e}},Cn=function(){function e(t,a){this.text=t,this.bounds=a}return e}(),e0=function(e,t,a,l){var s=l0(t,a),i=[],c=0;return s.forEach(function(p){if(a.textDecorationLine.length||p.trim().length>0)if(Ga.SUPPORT_RANGE_BOUNDS){var m=hu(l,c,p.length).getClientRects();if(m.length>1){var _=od(p),g=0;_.forEach(function(v){i.push(new Cn(v,Xl.fromDOMRectList(e,hu(l,g+c,v.length).getClientRects()))),g+=v.length})}else i.push(new Cn(p,Xl.fromDOMRectList(e,m)))}else{var y=l.splitText(p.length);i.push(new Cn(p,t0(e,l))),l=y}else Ga.SUPPORT_RANGE_BOUNDS||(l=l.splitText(p.length));c+=p.length}),i},t0=function(e,t){var a=t.ownerDocument;if(a){var l=a.createElement("html2canvaswrapper");l.appendChild(t.cloneNode(!0));var s=t.parentNode;if(s){s.replaceChild(l,t);var i=si(e,l);return l.firstChild&&s.replaceChild(l.firstChild,l),i}}return Xl.EMPTY},hu=function(e,t,a){var l=e.ownerDocument;if(!l)throw new Error("Node has no owner document");var s=l.createRange();return s.setStart(e,t),s.setEnd(e,t+a),s},od=function(e){if(Ga.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 zb(e)},a0=function(e,t){if(Ga.SUPPORT_NATIVE_TEXT_SEGMENTATION){var a=new Intl.Segmenter(void 0,{granularity:"word"});return Array.from(a.segment(e)).map(function(l){return l.segment})}return n0(e,t)},l0=function(e,t){return t.letterSpacing!==0?od(e):a0(e,t)},s0=[32,160,4961,65792,65793,4153,4241],n0=function(e,t){for(var a=Ig(e,{lineBreak:t.lineBreak,wordBreak:t.overflowWrap==="break-word"?"break-word":t.wordBreak}),l=[],s,i=function(){if(s.value){var c=s.value.slice(),p=ni(c),m="";p.forEach(function(_){s0.indexOf(_)===-1?m+=Sa(_):(m.length&&l.push(m),l.push(Sa(_)),m="")}),m.length&&l.push(m)}};!(s=a.next()).done;)i();return l},o0=function(){function e(t,a,l){this.text=i0(a.data,l.textTransform),this.textBounds=e0(t,this.text,l,a)}return e}(),i0=function(e,t){switch(t){case 1:return e.toLowerCase();case 3:return e.replace(r0,d0);case 2:return e.toUpperCase();default:return e}},r0=/(^|\s|:|-|\(|\))([a-z])/g,d0=function(e,t,a){return e.length>0?t+a.toUpperCase():e},SA=function(e){Il(t,e);function t(a,l){var s=e.call(this,a,l)||this;return s.src=l.currentSrc||l.src,s.intrinsicWidth=l.naturalWidth,s.intrinsicHeight=l.naturalHeight,s.context.cache.addImage(s.src),s}return t}(Hl),FA=function(e){Il(t,e);function t(a,l){var s=e.call(this,a,l)||this;return s.canvas=l,s.intrinsicWidth=l.width,s.intrinsicHeight=l.height,s}return t}(Hl),$A=function(e){Il(t,e);function t(a,l){var s=e.call(this,a,l)||this,i=new XMLSerializer,c=si(a,l);return l.setAttribute("width",c.width+"px"),l.setAttribute("height",c.height+"px"),s.svg="data:image/svg+xml,"+encodeURIComponent(i.serializeToString(l)),s.intrinsicWidth=l.width.baseVal.value,s.intrinsicHeight=l.height.baseVal.value,s.context.cache.addImage(s.svg),s}return t}(Hl),EA=function(e){Il(t,e);function t(a,l){var s=e.call(this,a,l)||this;return s.value=l.value,s}return t}(Hl),wr=function(e){Il(t,e);function t(a,l){var s=e.call(this,a,l)||this;return s.start=l.start,s.reversed=typeof l.reversed=="boolean"&&l.reversed===!0,s}return t}(Hl),u0=[{type:15,flags:0,unit:"px",number:3}],c0=[{type:16,flags:0,number:50}],A0=function(e){return e.width>e.height?new Xl(e.left+(e.width-e.height)/2,e.top,e.height,e.height):e.width0)a.textNodes.push(new o0(e,s,a.styles));else if(js(s))if(OA(s)&&s.assignedNodes)s.assignedNodes().forEach(function(p){return yo(e,p,a,l)});else{var c=DA(e,s);c.styles.isVisible()&&(h0(s,c,l)?c.flags|=4:_0(c.styles)&&(c.flags|=2),m0.indexOf(s.tagName)!==-1&&(c.flags|=8),a.elements.push(c),s.slot,s.shadowRoot?yo(e,s.shadowRoot,c,l):!Qo(s)&&!MA(s)&&!Do(s)&&yo(e,s,c,l))}},DA=function(e,t){return Br(t)?new SA(e,t):LA(t)?new FA(e,t):MA(t)?new $A(e,t):v0(t)?new EA(e,t):g0(t)?new wr(e,t):y0(t)?new id(e,t):Do(t)?new UA(e,t):Qo(t)?new IA(e,t):RA(t)?new QA(e,t):new Hl(e,t)},VA=function(e,t){var a=DA(e,t);return a.flags|=4,yo(e,t,a,a),a},h0=function(e,t,a){return t.styles.isPositionedWithZIndex()||t.styles.opacity<1||t.styles.isTransformed()||rd(e)&&a.styles.isTransparent()},_0=function(e){return e.isPositioned()||e.isFloating()},TA=function(e){return e.nodeType===Node.TEXT_NODE},js=function(e){return e.nodeType===Node.ELEMENT_NODE},Cr=function(e){return js(e)&&typeof e.style<"u"&&!bo(e)},bo=function(e){return typeof e.className=="object"},v0=function(e){return e.tagName==="LI"},g0=function(e){return e.tagName==="OL"},y0=function(e){return e.tagName==="INPUT"},b0=function(e){return e.tagName==="HTML"},MA=function(e){return e.tagName==="svg"},rd=function(e){return e.tagName==="BODY"},LA=function(e){return e.tagName==="CANVAS"},vu=function(e){return e.tagName==="VIDEO"},Br=function(e){return e.tagName==="IMG"},RA=function(e){return e.tagName==="IFRAME"},gu=function(e){return e.tagName==="STYLE"},w0=function(e){return e.tagName==="SCRIPT"},Qo=function(e){return e.tagName==="TEXTAREA"},Do=function(e){return e.tagName==="SELECT"},OA=function(e){return e.tagName==="SLOT"},yu=function(e){return e.tagName.indexOf("-")>0},C0=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(l){return a.counters[l].pop()})},e.prototype.parse=function(t){var a=this,l=t.counterIncrement,s=t.counterReset,i=!0;l!==null&&l.forEach(function(p){var m=a.counters[p.counter];m&&p.increment!==0&&(i=!1,m.length||m.push(1),m[Math.max(0,m.length-1)]+=p.increment)});var c=[];return i&&s.forEach(function(p){var m=a.counters[p.counter];c.push(p.counter),m||(m=a.counters[p.counter]=[]),m.push(p.reset)}),c},e}(),bu={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"]},wu={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:["Ք","Փ","Ւ","Ց","Ր","Տ","Վ","Ս","Ռ","Ջ","Պ","Չ","Ո","Շ","Ն","Յ","Մ","Ճ","Ղ","Ձ","Հ","Կ","Ծ","Խ","Լ","Ի","Ժ","Թ","Ը","Է","Զ","Ե","Դ","Գ","Բ","Ա"]},B0={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:["י׳","ט׳","ח׳","ז׳","ו׳","ה׳","ד׳","ג׳","ב׳","א׳","ת","ש","ר","ק","צ","פ","ע","ס","נ","מ","ל","כ","יט","יח","יז","טז","טו","י","ט","ח","ז","ו","ה","ד","ג","ב","א"]},k0={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:["ჵ","ჰ","ჯ","ჴ","ხ","ჭ","წ","ძ","ც","ჩ","შ","ყ","ღ","ქ","ფ","ჳ","ტ","ს","რ","ჟ","პ","ო","ჲ","ნ","მ","ლ","კ","ი","თ","ჱ","ზ","ვ","ე","დ","გ","ბ","ა"]},Ms=function(e,t,a,l,s,i){return ea?In(e,s,i.length>0):l.integers.reduce(function(c,p,m){for(;e>=p;)e-=p,c+=l.values[m];return c},"")+i},HA=function(e,t,a,l){var s="";do a||e--,s=l(e)+s,e/=t;while(e*t>=t);return s},xa=function(e,t,a,l,s){var i=a-t+1;return(e<0?"-":"")+(HA(Math.abs(e),i,l,function(c){return Sa(Math.floor(c%i)+t)})+s)},_s=function(e,t,a){a===void 0&&(a=". ");var l=t.length;return HA(Math.abs(e),l,!1,function(s){return t[Math.floor(s%l)]})+a},Hs=1,ts=2,as=4,vn=8,Kl=function(e,t,a,l,s,i){if(e<-9999||e>9999)return In(e,4,s.length>0);var c=Math.abs(e),p=s;if(c===0)return t[0]+p;for(var m=0;c>0&&m<=4;m++){var _=c%10;_===0&&Ta(i,Hs)&&p!==""?p=t[_]+p:_>1||_===1&&m===0||_===1&&m===1&&Ta(i,ts)||_===1&&m===1&&Ta(i,as)&&e>100||_===1&&m>1&&Ta(i,vn)?p=t[_]+(m>0?a[m-1]:"")+p:_===1&&m>0&&(p=a[m-1]+p),c=Math.floor(c/10)}return(e<0?l:"")+p},Cu="十百千萬",Bu="拾佰仟萬",ku="マイナス",Li="마이너스",In=function(e,t,a){var l=a?". ":"",s=a?"、":"",i=a?", ":"",c=a?" ":"";switch(t){case 0:return"•"+c;case 1:return"◦"+c;case 2:return"◾"+c;case 5:var p=xa(e,48,57,!0,l);return p.length<4?"0"+p:p;case 4:return _s(e,"〇一二三四五六七八九",s);case 6:return Ms(e,1,3999,bu,3,l).toLowerCase();case 7:return Ms(e,1,3999,bu,3,l);case 8:return xa(e,945,969,!1,l);case 9:return xa(e,97,122,!1,l);case 10:return xa(e,65,90,!1,l);case 11:return xa(e,1632,1641,!0,l);case 12:case 49:return Ms(e,1,9999,wu,3,l);case 35:return Ms(e,1,9999,wu,3,l).toLowerCase();case 13:return xa(e,2534,2543,!0,l);case 14:case 30:return xa(e,6112,6121,!0,l);case 15:return _s(e,"子丑寅卯辰巳午未申酉戌亥",s);case 16:return _s(e,"甲乙丙丁戊己庚辛壬癸",s);case 17:case 48:return Kl(e,"零一二三四五六七八九",Cu,"負",s,ts|as|vn);case 47:return Kl(e,"零壹貳參肆伍陸柒捌玖",Bu,"負",s,Hs|ts|as|vn);case 42:return Kl(e,"零一二三四五六七八九",Cu,"负",s,ts|as|vn);case 41:return Kl(e,"零壹贰叁肆伍陆柒捌玖",Bu,"负",s,Hs|ts|as|vn);case 26:return Kl(e,"〇一二三四五六七八九","十百千万",ku,s,0);case 25:return Kl(e,"零壱弐参四伍六七八九","拾百千万",ku,s,Hs|ts|as);case 31:return Kl(e,"영일이삼사오육칠팔구","십백천만",Li,i,Hs|ts|as);case 33:return Kl(e,"零一二三四五六七八九","十百千萬",Li,i,0);case 32:return Kl(e,"零壹貳參四五六七八九","拾百千",Li,i,Hs|ts|as);case 18:return xa(e,2406,2415,!0,l);case 20:return Ms(e,1,19999,k0,3,l);case 21:return xa(e,2790,2799,!0,l);case 22:return xa(e,2662,2671,!0,l);case 22:return Ms(e,1,10999,B0,3,l);case 23:return _s(e,"あいうえおかきくけこさしすせそたちつてとなにぬねのはひふへほまみむめもやゆよらりるれろわゐゑをん");case 24:return _s(e,"いろはにほへとちりぬるをわかよたれそつねならむうゐのおくやまけふこえてあさきゆめみしゑひもせす");case 27:return xa(e,3302,3311,!0,l);case 28:return _s(e,"アイウエオカキクケコサシスセソタチツテトナニヌネノハヒフヘホマミムメモヤユヨラリルレロワヰヱヲン",s);case 29:return _s(e,"イロハニホヘトチリヌルヲワカヨタレソツネナラムウヰノオクヤマケフコエテアサキユメミシヱヒモセス",s);case 34:return xa(e,3792,3801,!0,l);case 37:return xa(e,6160,6169,!0,l);case 38:return xa(e,4160,4169,!0,l);case 39:return xa(e,2918,2927,!0,l);case 40:return xa(e,1776,1785,!0,l);case 43:return xa(e,3046,3055,!0,l);case 44:return xa(e,3174,3183,!0,l);case 45:return xa(e,3664,3673,!0,l);case 46:return xa(e,3872,3881,!0,l);case 3:default:return xa(e,48,57,!0,l)}},PA="data-html2canvas-ignore",xu=function(){function e(t,a,l){if(this.context=t,this.options=l,this.scrolledElements=[],this.referenceElement=a,this.counters=new C0,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 l=this,s=x0(t,a);if(!s.contentWindow)return Promise.reject("Unable to find iframe window");var i=t.defaultView.pageXOffset,c=t.defaultView.pageYOffset,p=s.contentWindow,m=p.document,_=$0(s).then(function(){return el(l,void 0,void 0,function(){var g,y;return Ya(this,function(v){switch(v.label){case 0:return this.scrolledElements.forEach(Q0),p&&(p.scrollTo(a.left,a.top),/(iPad|iPhone|iPod)/g.test(navigator.userAgent)&&(p.scrollY!==a.top||p.scrollX!==a.left)&&(this.context.logger.warn("Unable to restore scroll position for cloned document"),this.context.windowBounds=this.context.windowBounds.add(p.scrollX-a.left,p.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")]:m.fonts&&m.fonts.ready?[4,m.fonts.ready]:[3,2];case 1:v.sent(),v.label=2;case 2:return/(AppleWebKit)/g.test(navigator.userAgent)?[4,F0(m)]:[3,4];case 3:v.sent(),v.label=4;case 4:return typeof g=="function"?[2,Promise.resolve().then(function(){return g(m,y)}).then(function(){return s})]:[2,s]}})})});return m.open(),m.write(U0(document.doctype)+""),I0(this.referenceElement.ownerDocument,i,c),m.replaceChild(m.adoptNode(this.documentElement),m.documentElement),m.close(),_},e.prototype.createElementClone=function(t){if(yr(t,2))debugger;if(LA(t))return this.createCanvasClone(t);if(vu(t))return this.createVideoClone(t);if(gu(t))return this.createStyleClone(t);var a=t.cloneNode(!1);return Br(a)&&(Br(t)&&t.currentSrc&&t.currentSrc!==t.src&&(a.src=t.currentSrc,a.srcset=""),a.loading==="lazy"&&(a.loading="eager")),yu(a)?this.createCustomElementClone(a):a},e.prototype.createCustomElementClone=function(t){var a=document.createElement("html2canvascustomelement");return Ri(t.style,a),a},e.prototype.createStyleClone=function(t){try{var a=t.sheet;if(a&&a.cssRules){var l=[].slice.call(a.cssRules,0).reduce(function(i,c){return c&&typeof c.cssText=="string"?i+c.cssText:i},""),s=t.cloneNode(!1);return s.textContent=l,s}}catch(i){if(this.context.logger.error("Unable to access cssRules property",i),i.name!=="SecurityError")throw i}return t.cloneNode(!1)},e.prototype.createCanvasClone=function(t){var a;if(this.options.inlineImages&&t.ownerDocument){var l=t.ownerDocument.createElement("img");try{return l.src=t.toDataURL(),l}catch{this.context.logger.info("Unable to inline canvas contents, canvas is tainted",t)}}var s=t.cloneNode(!1);try{s.width=t.width,s.height=t.height;var i=t.getContext("2d"),c=s.getContext("2d");if(c)if(!this.options.allowTaint&&i)c.putImageData(i.getImageData(0,0,t.width,t.height),0,0);else{var p=(a=t.getContext("webgl2"))!==null&&a!==void 0?a:t.getContext("webgl");if(p){var m=p.getContextAttributes();(m==null?void 0:m.preserveDrawingBuffer)===!1&&this.context.logger.warn("Unable to clone WebGL context as it has preserveDrawingBuffer=false",t)}c.drawImage(t,0,0)}return s}catch{this.context.logger.info("Unable to clone canvas as it is tainted",t)}return s},e.prototype.createVideoClone=function(t){var a=t.ownerDocument.createElement("canvas");a.width=t.offsetWidth,a.height=t.offsetHeight;var l=a.getContext("2d");try{return l&&(l.drawImage(t,0,0,a.width,a.height),this.options.allowTaint||l.getImageData(0,0,a.width,a.height)),a}catch{this.context.logger.info("Unable to clone video as it is tainted",t)}var s=t.ownerDocument.createElement("canvas");return s.width=t.offsetWidth,s.height=t.offsetHeight,s},e.prototype.appendChildNode=function(t,a,l){(!js(a)||!w0(a)&&!a.hasAttribute(PA)&&(typeof this.options.ignoreElements!="function"||!this.options.ignoreElements(a)))&&(!this.options.copyStyles||!js(a)||!gu(a))&&t.appendChild(this.cloneNode(a,l))},e.prototype.cloneChildNodes=function(t,a,l){for(var s=this,i=t.shadowRoot?t.shadowRoot.firstChild:t.firstChild;i;i=i.nextSibling)if(js(i)&&OA(i)&&typeof i.assignedNodes=="function"){var c=i.assignedNodes();c.length&&c.forEach(function(p){return s.appendChildNode(a,p,l)})}else this.appendChildNode(a,i,l)},e.prototype.cloneNode=function(t,a){if(TA(t))return document.createTextNode(t.data);if(!t.ownerDocument)return t.cloneNode(!1);var l=t.ownerDocument.defaultView;if(l&&js(t)&&(Cr(t)||bo(t))){var s=this.createElementClone(t);s.style.transitionProperty="none";var i=l.getComputedStyle(t),c=l.getComputedStyle(t,":before"),p=l.getComputedStyle(t,":after");this.referenceElement===t&&Cr(s)&&(this.clonedReferenceElement=s),rd(s)&&T0(s);var m=this.counters.parse(new lu(this.context,i)),_=this.resolvePseudoContent(t,s,c,Bn.BEFORE);yu(t)&&(a=!0),vu(t)||this.cloneChildNodes(t,s,a),_&&s.insertBefore(_,s.firstChild);var g=this.resolvePseudoContent(t,s,p,Bn.AFTER);return g&&s.appendChild(g),this.counters.pop(m),(i&&(this.options.copyStyles||bo(t))&&!RA(t)||a)&&Ri(i,s),(t.scrollTop!==0||t.scrollLeft!==0)&&this.scrolledElements.push([s,t.scrollLeft,t.scrollTop]),(Qo(t)||Do(t))&&(Qo(s)||Do(s))&&(s.value=t.value),s}return t.cloneNode(!1)},e.prototype.resolvePseudoContent=function(t,a,l,s){var i=this;if(l){var c=l.content,p=a.ownerDocument;if(!(!p||!c||c==="none"||c==="-moz-alt-content"||l.display==="none")){this.counters.parse(new lu(this.context,l));var m=new vb(this.context,l),_=p.createElement("html2canvaspseudoelement");Ri(l,_),m.content.forEach(function(y){if(y.type===0)_.appendChild(p.createTextNode(y.value));else if(y.type===22){var v=p.createElement("img");v.src=y.value,v.style.opacity="1",_.appendChild(v)}else if(y.type===18){if(y.name==="attr"){var C=y.values.filter(sa);C.length&&_.appendChild(p.createTextNode(t.getAttribute(C[0].value)||""))}else if(y.name==="counter"){var b=y.values.filter(en),w=b[0],x=b[1];if(w&&sa(w)){var F=i.counters.getCounterValue(w.value),L=x&&sa(x)?gr.parse(i.context,x.value):3;_.appendChild(p.createTextNode(In(F,L,!1)))}}else if(y.name==="counters"){var U=y.values.filter(en),w=U[0],S=U[1],x=U[2];if(w&&sa(w)){var M=i.counters.getCounterValues(w.value),I=x&&sa(x)?gr.parse(i.context,x.value):3,T=S&&S.type===0?S.value:"",Q=M.map(function(H){return In(H,I,!1)}).join(T);_.appendChild(p.createTextNode(Q))}}}else if(y.type===20)switch(y.value){case"open-quote":_.appendChild(p.createTextNode(au(m.quotes,i.quoteDepth++,!0)));break;case"close-quote":_.appendChild(p.createTextNode(au(m.quotes,--i.quoteDepth,!1)));break;default:_.appendChild(p.createTextNode(y.value))}}),_.className=kr+" "+xr;var g=s===Bn.BEFORE?" "+kr:" "+xr;return bo(a)?a.className.baseValue+=g:a.className+=g,_}}},e.destroy=function(t){return t.parentNode?(t.parentNode.removeChild(t),!0):!1},e}(),Bn;(function(e){e[e.BEFORE=0]="BEFORE",e[e.AFTER=1]="AFTER"})(Bn||(Bn={}));var x0=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(PA,"true"),e.body.appendChild(a),a},S0=function(e){return new Promise(function(t){if(e.complete){t();return}if(!e.src){t();return}e.onload=t,e.onerror=t})},F0=function(e){return Promise.all([].slice.call(e.images,0).map(S0))},$0=function(e){return new Promise(function(t,a){var l=e.contentWindow;if(!l)return a("No window assigned for iframe");var s=l.document;l.onload=e.onload=function(){l.onload=e.onload=null;var i=setInterval(function(){s.body.childNodes.length>0&&s.readyState==="complete"&&(clearInterval(i),t(e))},50)}})},E0=["all","d","content"],Ri=function(e,t){for(var a=e.length-1;a>=0;a--){var l=e.item(a);E0.indexOf(l)===-1&&t.style.setProperty(l,e.getPropertyValue(l))}return t},U0=function(e){var t="";return e&&(t+=""),t},I0=function(e,t,a){e&&e.defaultView&&(t!==e.defaultView.pageXOffset||a!==e.defaultView.pageYOffset)&&e.defaultView.scrollTo(t,a)},Q0=function(e){var t=e[0],a=e[1],l=e[2];t.scrollLeft=a,t.scrollTop=l},D0=":before",V0=":after",kr="___html2canvas___pseudoelement_before",xr="___html2canvas___pseudoelement_after",Su=`{ content: "" !important; display: none !important; }`,T0=function(e){M0(e,"."+kr+D0+Su+` .`+xr+V0+Su)},M0=function(e,t){var a=e.ownerDocument;if(a){var l=a.createElement("style");l.textContent=t,e.appendChild(l)}},NA=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}(),L0=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)||(Hi(t)||P0(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 el(this,void 0,void 0,function(){var a,l,s,i,c=this;return Ya(this,function(p){switch(p.label){case 0:return a=NA.isSameOrigin(t),l=!Oi(t)&&this._options.useCORS===!0&&Ga.SUPPORT_CORS_IMAGES&&!a,s=!Oi(t)&&!a&&!Hi(t)&&typeof this._options.proxy=="string"&&Ga.SUPPORT_CORS_XHR&&!l,!a&&this._options.allowTaint===!1&&!Oi(t)&&!Hi(t)&&!s&&!l?[2]:(i=t,s?[4,this.proxy(i)]:[3,2]);case 1:i=p.sent(),p.label=2;case 2:return this.context.logger.debug("Added image "+t.substring(0,256)),[4,new Promise(function(m,_){var g=new Image;g.onload=function(){return m(g)},g.onerror=_,(N0(i)||l)&&(g.crossOrigin="anonymous"),g.src=i,g.complete===!0&&setTimeout(function(){return m(g)},500),c._options.imageTimeout>0&&setTimeout(function(){return _("Timed out ("+c._options.imageTimeout+"ms) loading image")},c._options.imageTimeout)})];case 3:return[2,p.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,l=this._options.proxy;if(!l)throw new Error("No proxy defined");var s=t.substring(0,256);return new Promise(function(i,c){var p=Ga.SUPPORT_RESPONSE_TYPE?"blob":"text",m=new XMLHttpRequest;m.onload=function(){if(m.status===200)if(p==="text")i(m.response);else{var y=new FileReader;y.addEventListener("load",function(){return i(y.result)},!1),y.addEventListener("error",function(v){return c(v)},!1),y.readAsDataURL(m.response)}else c("Failed to proxy resource "+s+" with status code "+m.status)},m.onerror=c;var _=l.indexOf("?")>-1?"&":"?";if(m.open("GET",""+l+_+"url="+encodeURIComponent(t)+"&responseType="+p),p!=="text"&&m instanceof XMLHttpRequest&&(m.responseType=p),a._options.imageTimeout){var g=a._options.imageTimeout;m.timeout=g,m.ontimeout=function(){return c("Timed out ("+g+"ms) proxying "+s)}}m.send()})},e}(),R0=/^data:image\/svg\+xml/i,O0=/^data:image\/.*;base64,/i,H0=/^data:image\/.*/i,P0=function(e){return Ga.SUPPORT_SVG_DRAWING||!K0(e)},Oi=function(e){return H0.test(e)},N0=function(e){return O0.test(e)},Hi=function(e){return e.substr(0,4)==="blob"},K0=function(e){return e.substr(-3).toLowerCase()==="svg"||R0.test(e)},it=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}(),Ls=function(e,t,a){return new it(e.x+(t.x-e.x)*a,e.y+(t.y-e.y)*a)},oo=function(){function e(t,a,l,s){this.type=1,this.start=t,this.startControl=a,this.endControl=l,this.end=s}return e.prototype.subdivide=function(t,a){var l=Ls(this.start,this.startControl,t),s=Ls(this.startControl,this.endControl,t),i=Ls(this.endControl,this.end,t),c=Ls(l,s,t),p=Ls(s,i,t),m=Ls(c,p,t);return a?new e(this.start,l,c,m):new e(m,p,i,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}(),wl=function(e){return e.type===1},G0=function(){function e(t){var a=t.styles,l=t.bounds,s=hn(a.borderTopLeftRadius,l.width,l.height),i=s[0],c=s[1],p=hn(a.borderTopRightRadius,l.width,l.height),m=p[0],_=p[1],g=hn(a.borderBottomRightRadius,l.width,l.height),y=g[0],v=g[1],C=hn(a.borderBottomLeftRadius,l.width,l.height),b=C[0],w=C[1],x=[];x.push((i+m)/l.width),x.push((b+y)/l.width),x.push((c+w)/l.height),x.push((_+v)/l.height);var F=Math.max.apply(Math,x);F>1&&(i/=F,c/=F,m/=F,_/=F,y/=F,v/=F,b/=F,w/=F);var L=l.width-m,U=l.height-v,S=l.width-y,M=l.height-w,I=a.borderTopWidth,T=a.borderRightWidth,Q=a.borderBottomWidth,E=a.borderLeftWidth,D=ma(a.paddingTop,t.bounds.width),H=ma(a.paddingRight,t.bounds.width),P=ma(a.paddingBottom,t.bounds.width),G=ma(a.paddingLeft,t.bounds.width);this.topLeftBorderDoubleOuterBox=i>0||c>0?ya(l.left+E/3,l.top+I/3,i-E/3,c-I/3,Wt.TOP_LEFT):new it(l.left+E/3,l.top+I/3),this.topRightBorderDoubleOuterBox=i>0||c>0?ya(l.left+L,l.top+I/3,m-T/3,_-I/3,Wt.TOP_RIGHT):new it(l.left+l.width-T/3,l.top+I/3),this.bottomRightBorderDoubleOuterBox=y>0||v>0?ya(l.left+S,l.top+U,y-T/3,v-Q/3,Wt.BOTTOM_RIGHT):new it(l.left+l.width-T/3,l.top+l.height-Q/3),this.bottomLeftBorderDoubleOuterBox=b>0||w>0?ya(l.left+E/3,l.top+M,b-E/3,w-Q/3,Wt.BOTTOM_LEFT):new it(l.left+E/3,l.top+l.height-Q/3),this.topLeftBorderDoubleInnerBox=i>0||c>0?ya(l.left+E*2/3,l.top+I*2/3,i-E*2/3,c-I*2/3,Wt.TOP_LEFT):new it(l.left+E*2/3,l.top+I*2/3),this.topRightBorderDoubleInnerBox=i>0||c>0?ya(l.left+L,l.top+I*2/3,m-T*2/3,_-I*2/3,Wt.TOP_RIGHT):new it(l.left+l.width-T*2/3,l.top+I*2/3),this.bottomRightBorderDoubleInnerBox=y>0||v>0?ya(l.left+S,l.top+U,y-T*2/3,v-Q*2/3,Wt.BOTTOM_RIGHT):new it(l.left+l.width-T*2/3,l.top+l.height-Q*2/3),this.bottomLeftBorderDoubleInnerBox=b>0||w>0?ya(l.left+E*2/3,l.top+M,b-E*2/3,w-Q*2/3,Wt.BOTTOM_LEFT):new it(l.left+E*2/3,l.top+l.height-Q*2/3),this.topLeftBorderStroke=i>0||c>0?ya(l.left+E/2,l.top+I/2,i-E/2,c-I/2,Wt.TOP_LEFT):new it(l.left+E/2,l.top+I/2),this.topRightBorderStroke=i>0||c>0?ya(l.left+L,l.top+I/2,m-T/2,_-I/2,Wt.TOP_RIGHT):new it(l.left+l.width-T/2,l.top+I/2),this.bottomRightBorderStroke=y>0||v>0?ya(l.left+S,l.top+U,y-T/2,v-Q/2,Wt.BOTTOM_RIGHT):new it(l.left+l.width-T/2,l.top+l.height-Q/2),this.bottomLeftBorderStroke=b>0||w>0?ya(l.left+E/2,l.top+M,b-E/2,w-Q/2,Wt.BOTTOM_LEFT):new it(l.left+E/2,l.top+l.height-Q/2),this.topLeftBorderBox=i>0||c>0?ya(l.left,l.top,i,c,Wt.TOP_LEFT):new it(l.left,l.top),this.topRightBorderBox=m>0||_>0?ya(l.left+L,l.top,m,_,Wt.TOP_RIGHT):new it(l.left+l.width,l.top),this.bottomRightBorderBox=y>0||v>0?ya(l.left+S,l.top+U,y,v,Wt.BOTTOM_RIGHT):new it(l.left+l.width,l.top+l.height),this.bottomLeftBorderBox=b>0||w>0?ya(l.left,l.top+M,b,w,Wt.BOTTOM_LEFT):new it(l.left,l.top+l.height),this.topLeftPaddingBox=i>0||c>0?ya(l.left+E,l.top+I,Math.max(0,i-E),Math.max(0,c-I),Wt.TOP_LEFT):new it(l.left+E,l.top+I),this.topRightPaddingBox=m>0||_>0?ya(l.left+Math.min(L,l.width-T),l.top+I,L>l.width+T?0:Math.max(0,m-T),Math.max(0,_-I),Wt.TOP_RIGHT):new it(l.left+l.width-T,l.top+I),this.bottomRightPaddingBox=y>0||v>0?ya(l.left+Math.min(S,l.width-E),l.top+Math.min(U,l.height-Q),Math.max(0,y-T),Math.max(0,v-Q),Wt.BOTTOM_RIGHT):new it(l.left+l.width-T,l.top+l.height-Q),this.bottomLeftPaddingBox=b>0||w>0?ya(l.left+E,l.top+Math.min(M,l.height-Q),Math.max(0,b-E),Math.max(0,w-Q),Wt.BOTTOM_LEFT):new it(l.left+E,l.top+l.height-Q),this.topLeftContentBox=i>0||c>0?ya(l.left+E+G,l.top+I+D,Math.max(0,i-(E+G)),Math.max(0,c-(I+D)),Wt.TOP_LEFT):new it(l.left+E+G,l.top+I+D),this.topRightContentBox=m>0||_>0?ya(l.left+Math.min(L,l.width+E+G),l.top+I+D,L>l.width+E+G?0:m-E+G,_-(I+D),Wt.TOP_RIGHT):new it(l.left+l.width-(T+H),l.top+I+D),this.bottomRightContentBox=y>0||v>0?ya(l.left+Math.min(S,l.width-(E+G)),l.top+Math.min(U,l.height+I+D),Math.max(0,y-(T+H)),v-(Q+P),Wt.BOTTOM_RIGHT):new it(l.left+l.width-(T+H),l.top+l.height-(Q+P)),this.bottomLeftContentBox=b>0||w>0?ya(l.left+E+G,l.top+M,Math.max(0,b-(E+G)),w-(Q+P),Wt.BOTTOM_LEFT):new it(l.left+E+G,l.top+l.height-(Q+P))}return e}(),Wt;(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"})(Wt||(Wt={}));var ya=function(e,t,a,l,s){var i=4*((Math.sqrt(2)-1)/3),c=a*i,p=l*i,m=e+a,_=t+l;switch(s){case Wt.TOP_LEFT:return new oo(new it(e,_),new it(e,_-p),new it(m-c,t),new it(m,t));case Wt.TOP_RIGHT:return new oo(new it(e,t),new it(e+c,t),new it(m,_-p),new it(m,_));case Wt.BOTTOM_RIGHT:return new oo(new it(m,t),new it(m,t+p),new it(e+c,_),new it(e,_));case Wt.BOTTOM_LEFT:default:return new oo(new it(m,_),new it(m-c,_),new it(e,t+p),new it(e,t))}},Vo=function(e){return[e.topLeftBorderBox,e.topRightBorderBox,e.bottomRightBorderBox,e.bottomLeftBorderBox]},j0=function(e){return[e.topLeftContentBox,e.topRightContentBox,e.bottomRightContentBox,e.bottomLeftContentBox]},To=function(e){return[e.topLeftPaddingBox,e.topRightPaddingBox,e.bottomRightPaddingBox,e.bottomLeftPaddingBox]},z0=function(){function e(t,a,l){this.offsetX=t,this.offsetY=a,this.matrix=l,this.type=0,this.target=6}return e}(),io=function(){function e(t,a){this.path=t,this.target=a,this.type=1}return e}(),q0=function(){function e(t){this.opacity=t,this.type=2,this.target=6}return e}(),Y0=function(e){return e.type===0},KA=function(e){return e.type===1},W0=function(e){return e.type===2},Fu=function(e,t){return e.length===t.length?e.some(function(a,l){return a===t[l]}):!1},X0=function(e,t,a,l,s){return e.map(function(i,c){switch(c){case 0:return i.add(t,a);case 1:return i.add(t+l,a);case 2:return i.add(t+l,a+s);case 3:return i.add(t,a+s)}return i})},GA=function(){function e(t){this.element=t,this.inlineLevel=[],this.nonInlineLevel=[],this.negativeZIndex=[],this.zeroOrAutoZIndexOrTransformedOrOpacity=[],this.positiveZIndex=[],this.nonPositionedFloats=[],this.nonPositionedInlineLevel=[]}return e}(),jA=function(){function e(t,a){if(this.container=t,this.parent=a,this.effects=[],this.curves=new G0(this.container),this.container.styles.opacity<1&&this.effects.push(new q0(this.container.styles.opacity)),this.container.styles.transform!==null){var l=this.container.bounds.left+this.container.styles.transformOrigin[0].number,s=this.container.bounds.top+this.container.styles.transformOrigin[1].number,i=this.container.styles.transform;this.effects.push(new z0(l,s,i))}if(this.container.styles.overflowX!==0){var c=Vo(this.curves),p=To(this.curves);Fu(c,p)?this.effects.push(new io(c,6)):(this.effects.push(new io(c,2)),this.effects.push(new io(p,4)))}}return e.prototype.getEffects=function(t){for(var a=[2,3].indexOf(this.container.styles.position)===-1,l=this.parent,s=this.effects.slice(0);l;){var i=l.effects.filter(function(m){return!KA(m)});if(a||l.container.styles.position!==0||!l.parent){if(s.unshift.apply(s,i),a=[2,3].indexOf(l.container.styles.position)===-1,l.container.styles.overflowX!==0){var c=Vo(l.curves),p=To(l.curves);Fu(c,p)||s.unshift(new io(p,6))}}else s.unshift.apply(s,i);l=l.parent}return s.filter(function(m){return Ta(m.target,t)})},e}(),Sr=function(e,t,a,l){e.container.elements.forEach(function(s){var i=Ta(s.flags,4),c=Ta(s.flags,2),p=new jA(s,e);Ta(s.styles.display,2048)&&l.push(p);var m=Ta(s.flags,8)?[]:l;if(i||c){var _=i||s.styles.isPositioned()?a:t,g=new GA(p);if(s.styles.isPositioned()||s.styles.opacity<1||s.styles.isTransformed()){var y=s.styles.zIndex.order;if(y<0){var v=0;_.negativeZIndex.some(function(b,w){return y>b.element.container.styles.zIndex.order?(v=w,!1):v>0}),_.negativeZIndex.splice(v,0,g)}else if(y>0){var C=0;_.positiveZIndex.some(function(b,w){return y>=b.element.container.styles.zIndex.order?(C=w+1,!1):C>0}),_.positiveZIndex.splice(C,0,g)}else _.zeroOrAutoZIndexOrTransformedOrOpacity.push(g)}else s.styles.isFloating()?_.nonPositionedFloats.push(g):_.nonPositionedInlineLevel.push(g);Sr(p,g,i?g:a,m)}else s.styles.isInlineLevel()?t.inlineLevel.push(p):t.nonInlineLevel.push(p),Sr(p,t,a,m);Ta(s.flags,8)&&zA(s,m)})},zA=function(e,t){for(var a=e instanceof wr?e.start:1,l=e instanceof wr?e.reversed:!1,s=0;s"u"?e[0]:a},nw=function(e,t,a,l,s){var i=t[0],c=t[1],p=a[0],m=a[1];switch(e){case 2:return[new it(Math.round(l.left),Math.round(l.top+c)),new it(Math.round(l.left+l.width),Math.round(l.top+c)),new it(Math.round(l.left+l.width),Math.round(m+l.top+c)),new it(Math.round(l.left),Math.round(m+l.top+c))];case 3:return[new it(Math.round(l.left+i),Math.round(l.top)),new it(Math.round(l.left+i+p),Math.round(l.top)),new it(Math.round(l.left+i+p),Math.round(l.height+l.top)),new it(Math.round(l.left+i),Math.round(l.height+l.top))];case 1:return[new it(Math.round(l.left+i),Math.round(l.top+c)),new it(Math.round(l.left+i+p),Math.round(l.top+c)),new it(Math.round(l.left+i+p),Math.round(l.top+c+m)),new it(Math.round(l.left+i),Math.round(l.top+c+m))];default:return[new it(Math.round(s.left),Math.round(s.top)),new it(Math.round(s.left+s.width),Math.round(s.top)),new it(Math.round(s.left+s.width),Math.round(s.height+s.top)),new it(Math.round(s.left),Math.round(s.height+s.top))]}},ow="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7",Eu="Hidden Text",iw=function(){function e(t){this._data={},this._document=t}return e.prototype.parseMetrics=function(t,a){var l=this._document.createElement("div"),s=this._document.createElement("img"),i=this._document.createElement("span"),c=this._document.body;l.style.visibility="hidden",l.style.fontFamily=t,l.style.fontSize=a,l.style.margin="0",l.style.padding="0",l.style.whiteSpace="nowrap",c.appendChild(l),s.src=ow,s.width=1,s.height=1,s.style.margin="0",s.style.padding="0",s.style.verticalAlign="baseline",i.style.fontFamily=t,i.style.fontSize=a,i.style.margin="0",i.style.padding="0",i.appendChild(this._document.createTextNode(Eu)),l.appendChild(i),l.appendChild(s);var p=s.offsetTop-i.offsetTop+2;l.removeChild(i),l.appendChild(this._document.createTextNode(Eu)),l.style.lineHeight="normal",s.style.verticalAlign="super";var m=s.offsetTop-l.offsetTop+2;return c.removeChild(l),{baseline:p,middle:m}},e.prototype.getMetrics=function(t,a){var l=t+" "+a;return typeof this._data[l]>"u"&&(this._data[l]=this.parseMetrics(t,a)),this._data[l]},e}(),YA=function(){function e(t,a){this.context=t,this.options=a}return e}(),rw=1e4,dw=function(e){Il(t,e);function t(a,l){var s=e.call(this,a,l)||this;return s._activeEffects=[],s.canvas=l.canvas?l.canvas:document.createElement("canvas"),s.ctx=s.canvas.getContext("2d"),l.canvas||(s.canvas.width=Math.floor(l.width*l.scale),s.canvas.height=Math.floor(l.height*l.scale),s.canvas.style.width=l.width+"px",s.canvas.style.height=l.height+"px"),s.fontMetrics=new iw(document),s.ctx.scale(s.options.scale,s.options.scale),s.ctx.translate(-l.x,-l.y),s.ctx.textBaseline="bottom",s._activeEffects=[],s.context.logger.debug("Canvas renderer initialized ("+l.width+"x"+l.height+") with scale "+l.scale),s}return t.prototype.applyEffects=function(a){for(var l=this;this._activeEffects.length;)this.popEffect();a.forEach(function(s){return l.applyEffect(s)})},t.prototype.applyEffect=function(a){this.ctx.save(),W0(a)&&(this.ctx.globalAlpha=a.opacity),Y0(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)),KA(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 el(this,void 0,void 0,function(){var l;return Ya(this,function(s){switch(s.label){case 0:return l=a.element.container.styles,l.isVisible()?[4,this.renderStackContent(a)]:[3,2];case 1:s.sent(),s.label=2;case 2:return[2]}})})},t.prototype.renderNode=function(a){return el(this,void 0,void 0,function(){return Ya(this,function(l){switch(l.label){case 0:if(Ta(a.container.flags,16))debugger;return a.container.styles.isVisible()?[4,this.renderNodeBackgroundAndBorders(a)]:[3,3];case 1:return l.sent(),[4,this.renderNodeContent(a)];case 2:l.sent(),l.label=3;case 3:return[2]}})})},t.prototype.renderTextWithLetterSpacing=function(a,l,s){var i=this;if(l===0)this.ctx.fillText(a.text,a.bounds.left,a.bounds.top+s);else{var c=od(a.text);c.reduce(function(p,m){return i.ctx.fillText(m,p,a.bounds.top+s),p+i.ctx.measureText(m).width},a.bounds.left)}},t.prototype.createFontStyle=function(a){var l=a.fontVariant.filter(function(c){return c==="normal"||c==="small-caps"}).join(""),s=fw(a.fontFamily).join(", "),i=Mn(a.fontSize)?""+a.fontSize.number+a.fontSize.unit:a.fontSize.number+"px";return[[a.fontStyle,l,a.fontWeight,i,s].join(" "),s,i]},t.prototype.renderTextNode=function(a,l){return el(this,void 0,void 0,function(){var s,i,c,p,m,_,g,y,v=this;return Ya(this,function(C){return s=this.createFontStyle(l),i=s[0],c=s[1],p=s[2],this.ctx.font=i,this.ctx.direction=l.direction===1?"rtl":"ltr",this.ctx.textAlign="left",this.ctx.textBaseline="alphabetic",m=this.fontMetrics.getMetrics(c,p),_=m.baseline,g=m.middle,y=l.paintOrder,a.textBounds.forEach(function(b){y.forEach(function(w){switch(w){case 0:v.ctx.fillStyle=Oa(l.color),v.renderTextWithLetterSpacing(b,l.letterSpacing,_);var x=l.textShadow;x.length&&b.text.trim().length&&(x.slice(0).reverse().forEach(function(F){v.ctx.shadowColor=Oa(F.color),v.ctx.shadowOffsetX=F.offsetX.number*v.options.scale,v.ctx.shadowOffsetY=F.offsetY.number*v.options.scale,v.ctx.shadowBlur=F.blur.number,v.renderTextWithLetterSpacing(b,l.letterSpacing,_)}),v.ctx.shadowColor="",v.ctx.shadowOffsetX=0,v.ctx.shadowOffsetY=0,v.ctx.shadowBlur=0),l.textDecorationLine.length&&(v.ctx.fillStyle=Oa(l.textDecorationColor||l.color),l.textDecorationLine.forEach(function(F){switch(F){case 1:v.ctx.fillRect(b.bounds.left,Math.round(b.bounds.top+_),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:l.webkitTextStrokeWidth&&b.text.trim().length&&(v.ctx.strokeStyle=Oa(l.webkitTextStrokeColor),v.ctx.lineWidth=l.webkitTextStrokeWidth,v.ctx.lineJoin=window.chrome?"miter":"round",v.ctx.strokeText(b.text,b.bounds.left,b.bounds.top+_)),v.ctx.strokeStyle="",v.ctx.lineWidth=0,v.ctx.lineJoin="miter";break}})}),[2]})})},t.prototype.renderReplacedElement=function(a,l,s){if(s&&a.intrinsicWidth>0&&a.intrinsicHeight>0){var i=Mo(a),c=To(l);this.path(c),this.ctx.save(),this.ctx.clip(),this.ctx.drawImage(s,0,0,a.intrinsicWidth,a.intrinsicHeight,i.left,i.top,i.width,i.height),this.ctx.restore()}},t.prototype.renderNodeContent=function(a){return el(this,void 0,void 0,function(){var l,s,i,c,p,m,L,L,_,g,y,v,S,C,b,M,w,x,F,L,U,S,M;return Ya(this,function(I){switch(I.label){case 0:this.applyEffects(a.getEffects(4)),l=a.container,s=a.curves,i=l.styles,c=0,p=l.textNodes,I.label=1;case 1:return c0&&J>0&&(Q=i.ctx.createPattern(M,"repeat"),i.renderRepeat(D,Q,Z,W))):W1(g)&&(E=Pi(a,l,[null,null,null]),D=E[0],H=E[1],P=E[2],G=E[3],J=E[4],oe=g.position.length===0?[ld]:g.position,Z=ma(oe[0],G),W=ma(oe[oe.length-1],J),pe=G1(g,Z,W,G,J),N=pe[0],j=pe[1],N>0&&j>0&&(q=i.ctx.createRadialGradient(H+Z,P+W,0,H+Z,P+W,N),Jd(g.stops,N*2).forEach(function(le){return q.addColorStop(le.stop,Oa(le.color))}),i.path(D),i.ctx.fillStyle=q,N!==j?(X=a.bounds.left+.5*a.bounds.width,ie=a.bounds.top+.5*a.bounds.height,ge=j/N,fe=1/ge,i.ctx.save(),i.ctx.translate(X,ie),i.ctx.transform(1,0,0,ge,0,0),i.ctx.translate(-X,-ie),i.ctx.fillRect(H,fe*(P-ie)+ie,G,J*fe),i.ctx.restore()):i.ctx.fill())),he.label=6;case 6:return l--,[2]}})},i=this,c=0,p=a.styles.backgroundImage.slice(0).reverse(),_.label=1;case 1:return c0?g.style!==2?[3,5]:[4,this.renderDashedDottedBorder(g.color,g.width,p,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,p,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,p,a.curves)];case 8:return v.sent(),[3,11];case 9:return[4,this.renderSolidBorder(g.color,p,a.curves)];case 10:v.sent(),v.label=11;case 11:p++,v.label=12;case 12:return m++,[3,3];case 13:return[2]}})})},t.prototype.renderDashedDottedBorder=function(a,l,s,i,c){return el(this,void 0,void 0,function(){var p,m,_,g,y,v,C,b,w,x,F,L,U,S,M,I,M,I;return Ya(this,function(T){return this.ctx.save(),p=tw(i,s),m=$u(i,s),c===2&&(this.path(m),this.ctx.clip()),wl(m[0])?(_=m[0].start.x,g=m[0].start.y):(_=m[0].x,g=m[0].y),wl(m[1])?(y=m[1].end.x,v=m[1].end.y):(y=m[1].x,v=m[1].y),s===0||s===2?C=Math.abs(_-y):C=Math.abs(g-v),this.ctx.beginPath(),c===3?this.formatPath(p):this.formatPath(m.slice(0,2)),b=l<3?l*3:l*2,w=l<3?l*2:l,c===3&&(b=l,w=l),x=!0,C<=b*2?x=!1:C<=b*2+w?(F=C/(2*b+w),b*=F,w*=F):(L=Math.floor((C+w)/(b+w)),U=(C-L*b)/(L-1),S=(C-(L+1)*b)/L,w=S<=0||Math.abs(w-U){a.targetRef&&gw(a.targetRef,{useCORS:!0,scale:2,backgroundColor:null,scrollY:-window.scrollY}).then(s=>{const i=document.createElement("a");i.download="chart-screenshot.png",i.href=s.toDataURL(),i.click()})},a=e;return(l,s)=>(r(),$(Xe,{tag:"button",onClick:t,size:e.size,title:l.$t("Screenshot")},{default:d(()=>[n(ee,{name:"Screenshot"})]),_:1},8,["size","title"]))}};var Ni={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 Uu;function ww(){return Uu||(Uu=1,function(e){var t=function(){var a=Array.prototype,l=function(_,g,y){return a.slice.apply(_,a.slice.call(arguments,1))},s="function",i=1e9,c=function(_,g,y,v){if(g|=0,g==0)return[];if(typeof _!==s){var C=c.listSchemes(_,g);if(!C.length)return null;_=C[(y||0)%C.length]}var b=l(arguments,2);return b[0]=g,_.apply(_,b)};c.Scheme=function(_,g){var y={},v=0,C=i,b=function(){if(arguments.length<=1)return w.color_func.bind(w);var x=l(arguments);return function(F){return x[0]=F,w.color_func.apply(w,x)}},w=function(x,F){if(x|=0,!x)return[];var L=x;if(x=Math.abs(x),x<=v){for(var U=Math.max(x,C);!(U in y);++U);var S=y[U];if(U>x){var M="shrinking_takes_head"in S?S.shrinking_takes_head:w.shrinking_takes_head;if(M)S=S.slice(0,x),U=x;else return c.generate(function(I){return S[Math.round(I)]},L,0,S.length-1)}return S=S.slice(),L<0&&S.reverse(),S}else return w.color_func?c.generate(b.apply(w,arguments),L,0,1,w.color_func_cyclic):null};return w.scheme_name=_,w.groups=g?typeof g=="string"?[g]:g:[],w.max=0,w.cbf_max=i,w.addPalette=function(x,F){var L=x.length;L&&(y[L]=x,C=Math.min(C,L),v=Math.max(v,L),w.max=Math.max(w.max,L),!F&&L!=1&&(w.cbf_max=Math.min(w.cbf_max,L-1)))},w.addPalettes=function(x,F,L){F=F||x.length;for(var U=0;U=g&&y.push(x)}),y.sort(function(v,C){return v.scheme_name>=C.scheme_name?v.scheme_name>C.scheme_name?1:0:-1}),y},c.generate=function(_,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[_(y)];for(var b=Math.abs(g),w=y,x=[],F=(v-y)/(C?b:b-1);--b>=0;w+=F)x.push(_(w));return g<0&&x.reverse(),x};var m=function(_){return _>0?_<1?_:1:0};return c.rgbColor=function(_,g,y){return[_,g,y].map(function(v){return v=Number(Math.round(m(v)*255)).toString(16),v.length==1?"0"+v:v}).join("")},c.linearRgbColor=function(_,g,y){return[_,g,y].map(function(v){return v=m(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("")},c.hsvColor=function(_,g,y){_*=6;var v=g===void 0?1:m(g),C=y===void 0?1:m(y),b=C*(1-v*Math.abs(_%2-1)),w=C*(1-v);switch(Math.floor(_)%6){case 0:return c.rgbColor(C,b,w);case 1:return c.rgbColor(b,C,w);case 2:return c.rgbColor(w,C,b);case 3:return c.rgbColor(w,b,C);case 4:return c.rgbColor(b,w,C);default:return c.rgbColor(C,w,b)}},c.register(c.Scheme.withColorFunction("rainbow","qualitative",c.hsvColor,!1,!0)),c}();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,l=function(i,c){for(var p=arguments.length-1,m=arguments[p];p>1;)m=m*i+arguments[--p];return m},s=function(i){var c=l(Math.abs(i),1,.278393,.230389,972e-6,.078108);return c*=c,c*=c,c=1-1/c,i<0?-c:c};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(i){return a(1-.392*(1+s((i-.869)/.255)),1.021-.456*(1+s((i-.527)/.376)),1-.493*(1+s((i-.272)/.309)))},t.register(t.Scheme.withColorFunction("tol-sq","sequential",t.tolSequentialColor,!0)),t.tolDivergingColor=function(i){var c=l(i,.572,1.524,-1.811)/l(i,1,-.291,.1574);return a(l(i,.235,-2.13,26.92,-65.5,63.5,-22.36),c*c,1/l(i,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(i){return a(l(i,.472,-.567,4.05)/l(i,1,8.72,-19.17,14.1),l(i,.108932,-1.22635,27.284,-98.577,163.3,-131.395,40.634),1/l(i,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 l in a){var s=a[l];s=t.Scheme.fromPalettes("cb-"+l,[s.type,"cb-"+s.type],s,12,s.cbf),t.register(s)}}(),e.exports&&(e.exports=t)}(Ni)),Ni.exports}ww();class Cw extends sl{constructor(){super(...arguments);Oe(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"}]});Oe(this,"storageKey","chart-type");Oe(this,"listeners",{})}beforeInit(){this.mergeWithStorage()}mergeWithStorage(){const a=Lt.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,l){this.listeners[a]=l}async onChange(a,l,s){const c=this.data[a].findIndex(p=>p.name===l);c!==-1?this.data[a][c].type=s:this.data[a].push({name:l,type:s}),this.syncStorage();for(let p in this.listeners)this.listeners[p](this.applicableFilters)}getChartType(a,l){const i=this.data[a].find(c=>c.name===l);return i?i.type:null}syncStorage(){Lt.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 va=Cw.init();function Es(e){const t=at(e[0]).format("MMMM D, YYYY"),a=at(e[1]).format("MMMM D, YYYY");return t===a?`on ${t}.`:`between ${t} and ${a}.`}function Us(e){const t=e.split("-");if(t.length===3){const[a,l,s]=t;return`${Ha[parseInt(l)-1]} ${s}`}else if(t.length===2){const[a,l]=t;return`${Ha[parseInt(l)-1]} ${a}`}else if(t.length===1){const[a]=t;return`${a}`}}function Ql(e){return e.map(t=>Us(t.group))}const Ra=Te.colors.report,Bw={[Ra.light_gray]:Ra.cyan_blue,[Ra.light_gray_cyan_blue]:Ra.cyan_blue_dark,[Ra.blue]:Ra.royal_blue,[Ra.royal_blue]:Ra.dark_blue,[Ra.medium_slate_blue]:Ra.dark_purple,[Ra.dark_cyan_blue_16]:Ra.dark_cyan_blue_40,[Ra.dark_cyan_blue_24]:Ra.dark_cyan_blue_40,[Ra.blue]:Ra.blue_dark_mode,[Ra.purple]:Ra.purple_dark_mode};function za(e){return Bw[e]}function dl(e){const t=e<=31?6:7,a=Math.floor(e/t);return{splitNumber:t,interval:a}}const kw={class:"fct-gross-sale-vs-net-revenue-wrap"},xw={class:"fct-btn-group sm"},Sw={__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,l=V(null),s=V(null);V("daily");const i=V(va.getChartType("order","sales_growth_chart")||"line"),c=Te.colors.report,p=V(Te.isDark()),m=K(()=>a.chartData.every(U=>U.orders===0)),_=K(()=>p.value?c.dark_cyan_blue_16:c.light_gray),g=K(()=>p.value?c.dark_cyan_blue_36:c.light_gray_cyan_blue),y=K(()=>[{title:u("Orders"),key:"orders",color:_.value,yAxisIndex:1},{title:u("Revenue"),key:"net_revenue",color:g.value,yAxisIndex:0}].map(({title:U,key:S,color:M,yAxisIndex:I})=>F(U,i.value,a.chartData.map(T=>T[S]),M,I)));Ha.map(U=>U.slice(0,3));const v=K(()=>Ql(a.chartData));let C=null;const b=()=>{C&&(C.dispose(),C=null),Se(()=>{l.value&&(C=Jt(l.value),x())})},w=K(()=>dl(a.chartData.length)),x=()=>{if(!C)return;p.value=Te.isDark();const U={title:{text:a.chartTitle??"",left:"center"},legend:{show:!0,top:"5%",icon:"circle",itemWidth:8,itemHeight:8,itemGap:30,textStyle:{color:p.value?"#ffffff":"#000000"}},tooltip:{trigger:"axis",backgroundColor:p.value?"#253241":"#ffffff",borderColor:p.value?"#2C3C4E":"#c0c4ca",borderWidth:1,textStyle:{color:p.value?"#ffffff":"#565865"},axisPointer:{type:"line",lineStyle:{type:"solid",width:2,color:p.value?c.dark_cyan_blue_16:c.light_gray_blue}},formatter:S=>{let M=S[0].name;return S.forEach(I=>{const T=I.seriesIndex===1?`${Je.scaled(I.value)}`:I.value,Q=p.value?"#ffffff":"#565865";M+=`
${I.marker} ${I.seriesName} ${T}
`}),M}},xAxis:{type:"category",data:v.value,axisLabel:{color:p.value?"#ffffff":"#696778",fontSize:12,interval:w.value.interval},axisLine:{lineStyle:{type:"dashed",color:p.value?"#253241":"#D6DAE1"}}},yAxis:[{name:u("Revenue"),type:"value",position:"left",axisLabel:{color:p.value?"#ffffff":"#696778",fontSize:12,formatter:S=>`${Je.scaledChart(S)}`},splitLine:{show:!0,lineStyle:{color:p.value?"#253241":"#D6DAE1",type:"dashed"}}},{name:u("Orders"),type:"value",position:"right",axisLabel:{color:p.value?"#ffffff":"#696778",fontSize:12},splitLine:{show:!1,lineStyle:{color:p.value?"#253241":"#D6DAE1",type:"dashed"}}}],series:y.value};C.setOption(U,{notMerge:!0,replaceMerge:["series"]})},F=(U,S,M,I,T)=>({name:U,type:S,barMaxWidth:30,data:M,smooth:!1,color:I,lineStyle:{width:3},areaStyle:{opacity:.3,color:I},symbol:"circle",showSymbol:!0,symbolSize:8,itemStyle:{color:I,borderRadius:[4,4,0,0]},yAxisIndex:T,emphasis:{scale:2,itemStyle:{color:za(I)},lineStyle:{color:I},areaStyle:{opacity:.3,color:I}},animation:!0,animationEasing:"cubicOut",animationDuration:800,animationDelay:0,barGap:"-100%",legendHoverLink:!1}),L=U=>{i.value!==U&&(i.value=U,va.onChange("order","sales_growth_chart",U),x())};return Ce([()=>a.chartData,i],()=>{Se(x)},{deep:!0}),Ce(m,U=>{U||b()}),Ce(()=>a.loading,U=>{U||b()}),Ct(()=>{window.removeEventListener("onFluentCartThemeChange",x,!1),window.removeEventListener("fluentCartCurrencyChange",x,!1)}),Qe(()=>{window.addEventListener("onFluentCartThemeChange",x),window.addEventListener("fluentCartCurrencyChange",x),Se(b)}),(U,S)=>{const M=B("el-skeleton");return r(),h("div",kw,[n(xe,{id:"chartContainer",ref_key:"cardRef",ref:s},{default:d(()=>[n(Ve,{title:U.$t("Sales Growth"),border_bottom:""},ta({_:2},[!m.value&&!e.loading?{name:"action",fn:d(()=>[o("div",xw,[n(Rl,{activeType:i.value,types:{bar:"BarChart",line:"LineChart"},onChange:L},null,8,["activeType"]),n(ka,{targetRef:l.value},null,8,["targetRef"])])]),key:"0"}:void 0]),1032,["title"]),n(ke,{class:"p-0"},{default:d(()=>[e.loading?(r(),$(M,{key:0,animated:"",rows:5,class:"p-4"})):(r(),h(O,{key:1},[m.value?(r(),$(_t,{key:1,icon:"Empty/ListView","has-dark":!0,text:A(u)("Currently there is no data!"),class:"fct-report-empty-state"},null,8,["text"])):(r(),h("div",{key:0,class:"fct-chart-wrap fct-gross-sale-vs-net-revenue-chart",ref_key:"chartRef",ref:l},null,512))],64))]),_:1})]),_:1},512)])}}},Fw={class:"fct-gross-sale-vs-net-revenue-wrap"},$w={class:"fct-btn-group sm"},Ew={key:0,class:"fct-world-map-action-btns absolute top-5 right-5 flex flex-col gap-1 z-10"},Uw={key:1,class:"fct-world-map-action-btns absolute top-[10px] right-[40px] flex flex-col gap-1 z-10"},Iu=.5,Ki=6,co=1.2,Iw={__name:"HeatMap",props:{data:{type:Array,required:!0}},setup(e){const t=e,a=Te.colors,l=V(null),s=V(null),i=V(!1),c=V("world"),p=V(92),m=V(100);V(!1);let _=null,g=null,y=50;const v=V(1.2),C=V(),b=a.blue,w=K(()=>{const j=m.value-p.value,q=t.data?t.data.length:0;return j<60||q<15}),x=j=>{j=j.replace(/^#/,"");const q=parseInt(j.substring(0,2),16),X=parseInt(j.substring(2,4),16),ie=parseInt(j.substring(4,6),16);return[q,X,ie]},F=()=>Te.isDark()?a.gray[50]:a.gray[600],L=x(b[500]),U=async()=>{const j=cs.getUrl("world.geo.json"),X=await(await fetch(j)).json();jf("world",X)},S=j=>{if(!j||isNaN(j))return`rgba(${L.join(",")}, 0)`;const q=Math.log(j+1)/Math.log(y+1);return`rgba(${L.join(",")}, ${q})`},M=j=>{c.value=j,J(),_&&(_.clear(),_.setOption(P()),j==="bar"&&I()),g&&i.value&&(g.clear(),g.setOption(P()),j==="bar"&&T())},I=()=>{_&&(_.off("dataZoom"),_.on("dataZoom",function(j){j.batch&&j.batch[0]?(p.value=j.batch[0].start||0,m.value=j.batch[0].end||100):(p.value=j.start||0,m.value=j.end||100),setTimeout(()=>{J()},100)}))},T=()=>{g&&(g.off("dataZoom"),g.on("dataZoom",function(j){j.batch&&j.batch[0]?(p.value=j.batch[0].start||0,m.value=j.batch[0].end||100):(p.value=j.start||0,m.value=j.end||100),setTimeout(()=>{g&&g.setOption(P())},100)}))},Q=K(()=>(t.data||[]).map(j=>({...j,value:j.value||0,itemStyle:{color:S(j.value||0)},emphasis:{itemStyle:{shadowBlur:10,shadowColor:"rgba(0, 0, 0, 0.5)"}}}))),E=()=>({backgroundColor:Te.isDark()?a.dark[700]:a.gray[25],tooltip:{trigger:"item",formatter:j=>u("%1$s%2$s Orders: %3$s",j.name,"
",j.value||0),borderRadius:8,backgroundColor:Te.isDark()?"#38485a":"#ffffff",borderColor:Te.isDark()?"#4a5a6b":"#c0c4ca",borderWidth:1,textStyle:{color:Te.isDark()?"#ffffff":"#565865"}},visualMap:{min:0,max:y,left:i.value?"5%":"center",bottom:i.value?"center":"4%",text:[u("High"),u("Low")],orient:i.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:Q.value}]}),D=K(()=>{const j=t.data.length,q=m.value-p.value,X=Math.ceil(j*q/100);let ie=0;return X>100?ie=9:X>50?ie=4:X>30?ie=2:X>20&&(ie=1),ie}),H=()=>{const j=w.value;return{backgroundColor:Te.isDark()?a.dark[700]:a.gray[25],tooltip:{trigger:"axis",axisPointer:{type:"shadow"},formatter:function(q){const X=q[0];return`${X.name}
${u("Orders")}: ${X.value||0}`},backgroundColor:Te.isDark()?"#38485a":"#ffffff",textStyle:{color:Te.isDark()?a.gray[25]:a.system.mid},borderColor:Te.isDark()?"#4a5a6b":"#c0c4ca",borderWidth:1},dataZoom:[{type:"inside",yAxisIndex:0,start:p.value,end:m.value},{type:"slider",yAxisIndex:0,start:p.value,end:m.value,width:25,top:10,right:10,textStyle:{color:F()},brushSelect:!1,showDetail:!1,disabled:!0}],grid:{left:j?"10px":"0%",right:"15%",top:"10%",bottom:"15%",containLabel:!0},yAxis:{type:"category",axisTick:{show:j},splitLine:{show:!1},axisLine:{show:j,lineStyle:{color:F()}},axisLabel:{show:j,interval:D.value,color:F(),fontSize:11},data:t.data.map(q=>q.name)},xAxis:{type:"value",axisLabel:{show:!0,color:F(),formatter:function(q){return q.toLocaleString()}},splitLine:{show:!0,lineStyle:{color:Te.isDark()?a.gray[600]:a.gray[200]}}},series:[{type:"bar",large:!0,itemStyle:{color:new lr(0,0,1,0,[{offset:0,color:b[400]},{offset:1,color:b[600]}]),borderRadius:[0,4,4,0]},emphasis:{itemStyle:{color:new lr(0,0,1,0,[{offset:0,color:b[500]},{offset:1,color:b[700]}])}},data:t.data.map(q=>q.value),label:{show:j,formatter:"{c}",position:"right",color:F(),fontSize:10}}]}},P=()=>c.value==="bar"?H():E(),G=async()=>{await U(),l.value&&(_=Jt(l.value),_.setOption(P()),c.value==="bar"&&I(),_.on("georoam",()=>{const q=_.getOption().series[0].zoom;if(q!==v.value)if(qKi){const X=Math.max(co,Math.min(Ki,q));_.setOption({series:[{zoom:X}]},!1),v.value=X}else v.value=q}))},J=()=>{t.data&&t.data.length>0?y=Math.max(...t.data.map(j=>j.value||0)):y=1,_&&_.setOption(P(),{notMerge:!0})},oe=()=>{v.value=Math.min(v.value+Iu,Ki),C.value=!0,_.setOption({series:[{zoom:v.value,roam:C.value}]})},Z=()=>{v.value=Math.max(v.value-Iu,co),C.value=!0,_.setOption({series:[{zoom:v.value,roam:C.value}]})},W=()=>{c.value==="bar"?(p.value=92,m.value=100,_&&_.dispatchAction({type:"dataZoom",start:92,end:100})):(v.value=co,C.value="move",_&&(_.clear(),_.setOption(P())))},pe=async()=>{i.value=!0,await Se(),g?g.clear():g=Jt(s.value),g.setOption(P()),c.value==="bar"&&T()},N=j=>{F(),_&&_.setOption(P())};return Qe(()=>{window.addEventListener("onFluentCartThemeChange",N),C.value="move",Se(G)}),Ct(()=>{window.removeEventListener("onFluentCartThemeChange",N),_&&(_.dispose(),_=null),g&&(g.dispose(),g=null)}),Ce(()=>t.data,()=>J(),{deep:!0}),Ce(w,()=>{c.value==="bar"&&Se(()=>{J()})}),(j,q)=>(r(),h("div",Fw,[n(xe,{id:"chartContainer",class:"mb-0"},{default:d(()=>[n(Ve,{title:j.$t("Order Heat Map"),border_bottom:""},{action:d(()=>[o("div",$w,[n(Rl,{activeType:c.value,types:{world:"Globe",bar:"BarChart"},onChange:M},null,8,["activeType"]),n(ka,{targetRef:l.value,size:"small"},null,8,["targetRef"])])]),_:1},8,["title"]),n(ke,{class:"p-0 pt-0 relative"},{default:d(()=>[c.value==="world"?(r(),h("div",Ew,[n(Xe,{tag:"button",size:"small",onClick:oe},{default:d(()=>[n(ee,{name:"Plus"})]),_:1}),n(Xe,{tag:"button",size:"small",onClick:Z},{default:d(()=>[n(ee,{name:"Minus"})]),_:1}),n(Xe,{tag:"button",size:"small",onClick:W},{default:d(()=>[n(ee,{name:"Reload"})]),_:1}),n(Xe,{tag:"button",size:"small lg:hidden",onClick:pe},{default:d(()=>[n(ee,{name:"Eye"})]),_:1})])):k("",!0),c.value==="bar"?(r(),h("div",Uw,[n(Xe,{tag:"button",size:"small",onClick:W},{default:d(()=>[n(ee,{name:"Reload"})]),_:1})])):k("",!0),o("div",{class:"fct-chart-wrap rounded-[0px] bg-transparent",ref_key:"chartRef",ref:l},null,512)]),_:1})]),_:1}),n(A(Wf),{modelValue:i.value,"onUpdate:modelValue":q[0]||(q[0]=X=>i.value=X),title:j.$t("Order Heat Map"),class:"country-heat-map-dialog"},{default:d(()=>[o("div",{class:"fct-chart-wrap",ref_key:"modalChartRef",ref:s},null,512)]),_:1},8,["modelValue","title"])]))}},Qw=lt(Iw,[["__scopeId","data-v-36a900c8"]]),Dw={class:"fct-report-card"},Vw={key:0,class:"fct-report-card-header"},Tw={key:0,class:"flex items-center gap-2"},Mw={class:"title"},Lw={class:"actions"},Rw={class:"fct-report-card-body flex h-full"},Ow={class:"w-full"},Ln={__name:"ReportCard",props:{cardOptions:{type:Object,default:()=>({heading:"",linkButtonText:"",linkButtonUrl:"",headingIcon:{type:Boolean,default:!1}})}},setup(e){return(t,a)=>{const l=B("router-link");return r(),h("div",Dw,[e.cardOptions.heading||e.cardOptions.linkButtonText?(r(),h("div",Vw,[e.cardOptions.heading?(r(),h("div",Tw,[e.cardOptions.headingIcon?(r(),$(Xe,{key:0,size:"x-small",bg:"danger",soft:""},{default:d(()=>[n(ee,{name:"FailedCircle"})]),_:1})):k("",!0),o("h4",Mw,f(e.cardOptions.heading),1)])):k("",!0),o("div",Lw,[e.cardOptions.linkButtonText?(r(),$(l,{key:0,to:`/${e.cardOptions.linkButtonUrl}`,class:"link"},{default:d(()=>[R(f(t.$t(e.cardOptions.linkButtonText)),1)]),_:1},8,["to"])):k("",!0),Ca(t.$slots,"action")])])):k("",!0),o("div",Rw,[o("div",Ow,[Ca(t.$slots,"default")])])])}}},Hw={key:0,class:"fct-report-sold-product-list has-scroll"},Pw={class:"list-left-content"},Nw={class:"list-title"},Kw={class:"list-title-inner"},Gw={class:"list-id"},jw={class:"list-right-content"},zw=["innerHTML"],qw={class:"list-price"},Yw={__name:"RecentOrders",setup(e){const t=Ka.data;return(a,l)=>{const s=B("router-link");return r(),$(Ln,{class:"top-sold-products","card-options":{heading:A(u)("Recent Orders"),linkButtonText:A(u)("View All"),linkButtonUrl:"orders"}},{default:d(()=>{var i,c;return[((c=(i=A(t))==null?void 0:i.recentOrders)==null?void 0:c.length)>0?(r(),h("ul",Hw,[(r(!0),h(O,null,ae(A(t).recentOrders,p=>(r(),h("li",{key:p.id},[n(s,{class:"no-underline",to:{name:"view_order",params:{order_id:p.id}}},{default:d(()=>[o("div",Pw,[o("div",Nw,[o("div",Kw,f(p.customer_name)+" #"+f(A(Xt)(p.id)),1),o("div",Gw,[n(Pa,{"date-time":p.created_at},null,8,["date-time"])])])]),o("div",jw,[o("div",{class:"list-value",innerHTML:A(Je).scaled(p.total_amount)},null,8,zw),o("div",qw,f(A(Xt)(p.order_items_count))+" "+f(A(u)("Items")),1)])]),_:2},1032,["to"])]))),128))])):(r(),$(_t,{key:1,icon:"Empty/ListView","has-dark":!0,text:A(u)("Currently there is no item!")},null,8,["text"]))]}),_:1},8,["card-options"])}}},Ww={key:0},Xw={key:1,class:"fc_dashboard_onboarding_wrap"},Jw={class:"fc_dashboard_onboarding_title"},Zw={class:"fc_dashboard_onboarding_lists"},eC=["href"],tC={class:"circle-shape"},aC={class:"fc_dashboard_onboarding_item__title"},lC={__name:"Onboarding",setup(e){const t=V(0),a=V(!1);zt().ctx;const l=V([]),s=V(!0);V(localStorage.getItem("started_content_collapse")==="true"||!1),K(()=>{const c=Object.keys(l.value).length;return c?Math.round(t.value/c*100):0});const i=Pr("dashboardTogglePageNotification");return Qe(async()=>{a.value=!0,ce.get("dashboard").then(c=>{var m;l.value=c.data.steps,t.value=c.data.completed,s.value=Object.keys(l.value).length!==t.value,a.value=!1;let p=((m=l.value.page_setup)==null?void 0:m.completed)||!1;i&&i(!p)}).catch(c=>{a.value=!1})}),(c,p)=>{const m=B("el-skeleton"),_=B("Check"),g=B("el-icon");return s.value?(r(),h("div",Ww,[a.value?(r(),$(m,{key:0,rows:3,animated:""})):(r(),h("div",Xw,[o("h3",Jw,f(c.$t("Onboarding Checklist")),1),o("div",Zw,[(r(!0),h(O,null,ae(l.value,(y,v)=>(r(),h("a",{key:v,href:y.url,class:de([y.completed===!0?"active":"","fc_dashboard_onboarding_item"])},[o("span",tC,[y.completed===!0?(r(),$(g,{key:0},{default:d(()=>[n(_)]),_:1})):k("",!0)]),o("div",aC,f(y.title),1)],10,eC))),128))])]))])):k("",!0)}}},sC={class:"fct-dashboard-recent-activities-wrap"},nC={class:"fct-dashboard-recent-activities__header"},oC={class:"fct-dashboard-recent-activities__header_title"},iC={class:"fct-dashboard-recent-activities__header_desc"},rC={key:0,class:"fct-dashboard-recent-activities__body"},dC={key:0,class:"fct-dashboard-recent-activities__item has-icon"},uC={class:"content"},cC={class:"title"},AC=["onClick"],pC={class:"date"},fC=["innerHTML"],mC={class:"created_by"},hC={key:1,class:"fct-dashboard-recent-activities__empty"},_C={class:"fct-dashboard-recent-activities__empty_text"},vC={__name:"RecentActivity",props:{activities:{type:Array,default:()=>[]},showManageActivity:{type:Boolean,default:!1}},emits:["reload"],setup(e,{emit:t}){const a=tl(),l=V([{label:u("All"),value:"all"},{label:u("Today"),value:"today"},{label:u("Yesterday"),value:"yesterday"},{label:u("This Week"),value:"this_week"}]),s=V("all"),i=()=>{switch(s.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 s.value}},c=()=>{i(),Ka.getRecentActivities({groupKey:s.value})},p={Order:"orders/view",Payment:"orders/view",Product:"products/view",Customer:"customers/view",Coupon:"coupons/view"},m=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&&_(g)&&a.push({name:C.name,params:{[C.param]:g.module_id}})},_=g=>{if(!g.module_name)return!0;const y=rt.get(p,oa.capitalize(g.module_name));return y?Sn.has(y):!1};return Qe(()=>{c()}),(g,y)=>{const v=B("el-radio-button"),C=B("el-radio-group");return r(),h("div",sC,[o("div",nC,[o("h4",oC,f(A(u)("Recent Activities")),1),o("p",iC,[s.value==="all"?(r(),h(O,{key:0},[R(f(A(u)("%s new activities",A(Xt)(A(Ka).data.recentActivities.length))),1)],64)):(r(),h(O,{key:1},[R(f(A(u)("%1$s new activities %2$s",A(Xt)(A(Ka).data.recentActivities.length),i())),1)],64))]),n(C,{class:"fct-dashboard-recent-activities__header_filter",modelValue:s.value,"onUpdate:modelValue":y[0]||(y[0]=b=>s.value=b),onChange:c,size:"large"},{default:d(()=>[(r(!0),h(O,null,ae(l.value,(b,w)=>(r(),$(v,{key:w,label:b.label,value:b.value},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])]),A(Ka).data.recentActivities.length?(r(),h("div",rC,[(r(!0),h(O,null,ae(A(Ka).data.recentActivities,(b,w)=>(r(),h(O,{key:w},[_(b)?(r(),h("div",dC,[y[1]||(y[1]=o("span",{class:"icon"},[o("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[o("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)),o("div",uC,[o("h3",cC,[b.module_name!==""?(r(),h("span",{key:0,onClick:x=>m(b),class:"cursor-pointer"},f(b.title||"--"),9,AC)):(r(),h(O,{key:1},[R(f(b.title),1)],64)),o("span",pC,[n(Pa,{"date-time":b.created_at},null,8,["date-time"])])]),o("p",{innerHTML:b.content,class:"description"},null,8,fC),o("span",mC,f(A(u)("By %s",b.created_by)),1)])])):k("",!0)],64))),128))])):(r(),h("div",hC,[o("div",_C,f(A(u)("No activity found.")),1)]))])}}},gC={class:"fc_dashboard_sidebar bg-white dark:bg-dark-700 p-5 rounded"},yC={__name:"SideBar",setup(e){return(t,a)=>(r(),h("div",gC,[n(Pt,{permission:"is_super_admin"},{default:d(()=>[n(lC)]),_:1}),n(vC,{onReload:a[0]||(a[0]=()=>{})})]))}},bC={class:"fct-product-create"},wC={class:"fct-product-step"},CC={class:"fct-product-item-selector"},BC=["onClick"],kC={class:"fct-product-item-selector-content"},xC={class:"fct-bundle-product-condition"},SC={class:"condition-text"},FC={class:"dialog-footer"},fi={__name:"AddProductModal",props:{customModal:String},emits:["process_custom","update:createProductModal"],setup(e,{emit:t}){const a=e,l=t,s=tl(),i=ze.get("variation_types",{}),c=V({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"}}}),p=[{type:"physical",title:u("Physical Product"),icon:"Gift"},{type:"digital",title:u("Digital Product"),icon:"Code"}],m=V(!1),_=V(null),g=C=>{c.value.detail.fulfillment_type=C},y=()=>{m.value=!0,ce.post("products",{...c.value}).then(C=>{if(z.success(C.message),a.customModal==="order_modal"){const b={id:C.data.product_variants.id,object_id:C.data.product_variants.post_id,variation_id:C.data.product_variants.id,item_name:C.data.product_variants.variation_title,item_price:C.data.product_variants.item_price,quantity:1,stock:100,object_type:C.data.product_details.fulfillment_type,item_total:C.data.product_variants.item_price,line_total:C.data.product_variants.item_price,tax_amount:0,discount_total:0};l("process_custom",b),l("update:createProductModal",!1)}else s.push({name:"product_edit",params:{product_id:C.data.ID}})}).catch(C=>{var b;C.status_code=="422"?z.validationErrors(C):z.error((b=C.data)==null?void 0:b.message)}).finally(()=>{m.value=!1})},v=C=>{C.stopPropagation(),C.preventDefault(),y()};return Qe(()=>{Se(()=>{setTimeout(()=>{var C;(C=_.value)==null||C.focus()},10)})}),(C,b)=>{const w=B("el-input"),x=B("el-form-item"),F=B("el-option"),L=B("el-select"),U=B("el-checkbox"),S=B("el-form"),M=B("el-button");return r(),h("div",bC,[o("div",wC,[n(S,{"label-position":"top",model:c.value,"require-asterisk-position":"right"},{default:d(()=>[n(x,{label:c.value.detail.other_info.is_bundle_product==="yes"?A(u)("Bundle Title"):A(u)("Product Title"),required:""},{default:d(()=>[n(w,{type:"text",modelValue:c.value.post_title,"onUpdate:modelValue":b[0]||(b[0]=I=>c.value.post_title=I),placeholder:c.value.detail.other_info.is_bundle_product==="yes"?A(u)("Bundle Title"):A(u)("Product Title"),minlength:"3",maxlength:"200","show-word-limit":"",autofocus:"",ref_key:"fcProductTitle",ref:_,onKeydown:$a(v,["enter"])},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),e.customModal!=="order_modal"?(r(),$(x,{key:0,label:A(u)("Variation Type")},{default:d(()=>[n(L,{modelValue:c.value.detail.variation_type,"onUpdate:modelValue":b[1]||(b[1]=I=>c.value.detail.variation_type=I),placeholder:A(u)("Select Variation Type"),class:"w-full"},{default:d(()=>[(r(!0),h(O,null,ae(A(i),(I,T)=>(r(),$(F,{key:T,label:I,value:T},null,8,["label","value"]))),128))]),_:1},8,["modelValue","placeholder"])]),_:1},8,["label"])):k("",!0),n(x,null,{default:d(()=>[o("ul",CC,[(r(),h(O,null,ae(p,I=>o("li",{key:I.type,class:de({active:I.type===c.value.detail.fulfillment_type}),onClick:T=>g(I.type)},[o("div",kC,[n(ee,{name:I.icon},null,8,["name"]),R(" "+f(I.title),1)]),b[3]||(b[3]=o("div",{class:"fct-product-item-selector-dot-wrap"},[o("span",{class:"fct-product-item-selector-dot"})],-1))],10,BC)),64))])]),_:1}),n(x,null,{default:d(()=>[o("div",xC,[n(U,{modelValue:c.value.detail.other_info.is_bundle_product,"onUpdate:modelValue":b[2]||(b[2]=I=>c.value.detail.other_info.is_bundle_product=I),"true-value":"yes","false-value":"no"},{default:d(()=>[R(f(A(u)("Add as a Bundle")),1)]),_:1},8,["modelValue"]),o("span",SC,f(A(u)("Combine multiple items into one package")),1)])]),_:1})]),_:1},8,["model"])]),o("div",FC,[n(M,{disabled:!c.value.post_title||m.value,loading:m.value,onClick:y,type:"primary"},{default:d(()=>[R(f(m.value?A(u)("Creating"):A(u)("Add Product")),1)]),_:1},8,["disabled","loading"])])])}}};class dd{constructor(t=new Date){this.date=t}getHours(){return this.date.getHours()}static greeting(){const t=new dd().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 $C={class:"fct-current-user-info-wrap"},EC={class:"fct-current-user-info-content"},UC={class:"image"},IC=["src","alt"],QC={class:"content"},DC={key:0,class:"fct-current-user-info-action"},VC={__name:"CurrentUserInfo",setup(e){const t=V(!1),a=V(ze.get("me")),l=()=>ze.get("shop.store_name"),s=ze.get("total_products_count");return(i,c)=>{const p=B("el-button"),m=B("el-dialog");return r(),h("div",$C,[o("div",EC,[o("div",UC,[o("img",{src:a.value.avatar,alt:a.value.full_name},null,8,IC)]),o("div",QC,[o("h4",null,f(A(dd).greeting())+" "+f(a.value.full_name)+" 👋🏻",1),o("p",null,f(A(u)("Welcome to %1$s",l())),1)])]),n(Pt,{permission:"products/create"},{default:d(()=>[A(s)==0?(r(),h("div",DC,[n(p,{onClick:c[0]||(c[0]=_=>t.value=!0),type:"primary"},{default:d(()=>[R(f(A(u)("Add Product")),1)]),_:1})])):k("",!0)]),_:1}),n(m,{"append-to-body":!0,modelValue:t.value,"onUpdate:modelValue":c[1]||(c[1]=_=>t.value=_),onClose:c[2]||(c[2]=_=>t.value=!1),title:A(u)("Add New Product")},{default:d(()=>[n(fi)]),_:1},8,["modelValue","title"])])}}};class TC{constructor(){Oe(this,"operatorMap",{"!==":"matchNotEqual","!=":"matchNotEqual"});Oe(this,"defaultMatcherMethod",null)}getMatchingMethod(t){return t==="=="||t==="==="?"matchEqual":this.operatorMap.hasOwnProperty(t)?this.operatorMap[t]:this.defaultMatcherMethod}defaultMatcher(t,a,l){}matchEqual(t,a,l){return l==="==="?t===a:t==a}matchNotEqual(t,a,l){return l==="!=="?t!==a:t!=a}matchContains(t,a,l){return a instanceof String||Array.isArray(a)?a.includes(t):typeof a=="object"?a.hasOwnProperty(t):!1}matchIn(t,a,l){return this.matchContains(t,a,l)}matchNotIn(t,a,l){return!this.matchContains(t,a,l)}}class MC{constructor(){Oe(this,"modifierMap",{"+":"applyAddition","-":"applySubstruction"});Oe(this,"defaultModifierMethod",null)}getModificationMethod(t){return t==="=="||t==="==="?"matchEqual":this.modifierMap.hasOwnProperty(t)?this.modifierMap[t]:this.defaultModifierMethod}applyAddition(t,a,l,s,i){return t+a}}class LC{constructor(t,a){Oe(this,"value");Oe(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 Fr?this.value.setModifiers([]).build():this.value}}}class Fr{constructor(t,a){Oe(this,"accessor");Oe(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 LC?a.build():a)),t.length>0?{accessor:this.accessor,modifiers:t}:{accessor:this.accessor}}}class xs{constructor(t,a,l,s,i){Oe(this,"conditionType");Oe(this,"conditions");Oe(this,"key");Oe(this,"operator");Oe(this,"value");this.key=t,this.value=a,this.operator=l,this.conditions=[],this.conditionType=this.buildConditionType(s),this.setConditions(i)}static make(t,a,l,s){return new this(t,a,l,s)}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 xs||typeof t=="function"?t:this.conditions,this}build(){if(Array.isArray(this.conditions)&&this.conditions.length>0){let l=[];return l=this.conditions.map(s=>s instanceof xs?s.build.bind(s)():s),{condition_type:this.conditionType,conditions:l}}const t=this.key instanceof Fr?this.key.build():this.key,a=this.value instanceof Fr?this.value.build():this.value;return{key:t,operator:this.operator,value:a}}}class RC{constructor(t,a){Oe(this,"data");Oe(this,"conditions");Oe(this,"stateKey");Oe(this,"matcher");Oe(this,"modifier");this.data=a,this.stateKey=t,this.matcher=new TC,this.modifier=new MC}match(t,a,l,s=!0){let i="",c=this.matcher.getMatchingMethod(a);return c!=null?i=c:i=oa.camel("match"+a),i in this.matcher&&typeof this.matcher[i]=="function"?this.matcher[i](t,l,a,s):s}evaluate(t,a="and"){if(t instanceof xs){const s=t.build.bind(t)();s.hasOwnProperty("conditions")?(t=s.conditions,a=s.condition_type):t=[s]}a=a==="or"?"or":"and";let l=a==="and";if(typeof t=="function")return t(this.stateKey,this.data);if(!Array.isArray(t))return!0;for(let s of t){let i=null;if(Array.isArray(rt.get(s,"conditions")))i=this.evaluate(s.conditions,rt.get(s,"condition_type","and"));else{if(s.key===null||s.key===void 0){l=!0;continue}i=this.applyCondition(s)}l=a==="and"?l&&i:l||i}return l}applyCondition(t){let a="",l=null;typeof t.key=="object"?a=rt.resolvePath(this.stateKey,rt.get(t,"key.accessor")):a=rt.resolvePath(this.stateKey,t.key);let s=rt.get(this.data,a);if(typeof t.value=="object"){const i=rt.resolvePath(this.stateKey,rt.get(t,"value.accessor"));l=rt.get(this.data,i)}else l=t.value;return s=this.applyModification(s,t.key.modifiers,this.stateKey),l=this.applyModification(l,t.value.modifiers,this.stateKey),this.match(s,t.operator,l)}applyModification(t,a,l){return Array.isArray(a)&&a.forEach(s=>{let i=s.operator,c="",p=this.modifier.getModificationMethod(i);if(p!=null?c=p:c=oa.camel("apply"+i),c in this.modifier&&typeof this.modifier[c]=="function"){let m=s.value;typeof m=="object"&&m!==null&&(m=rt.getByPath(this.data,l,rt.get(m,"accessor"))),t=this.modifier[c](t,m,i,l,this.data)}}),t}}class WA{constructor(){Oe(this,"_conditionType","and");Oe(this,"_conditions",null)}conditionType(t){return this._conditionType=t,this}conditions(t){return this._conditions=Array.isArray(t)||t instanceof xs||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 xs?a.build.bind(a)():a):t}}class XA{constructor(){Oe(this,"_events",{})}event(t,a){return this._events[t]=a,this}}class Lo{constructor(t=""){this._component="",this._affix=t}static component(t){const a=new Lo;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 $r{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="",rs.install(this,Gc),rs.install(this,XA),rs.install(this,WA),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 xs?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(oa.headline(this._key)),label:this._label??u(oa.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 Lo?this._suffix.build():this._suffix,prefix:this._prefix instanceof Lo?this._prefix.build():this._prefix,min:this._min,max:this._max,placeholder:this._placeholder,attributes:this._attributes,events:this._events,wrapperClass:this._wrapperClass}}}class Er{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,rs.install(this,Gc),rs.install(this,XA),rs.install(this,WA)}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=tn.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 Qu{constructor(t,a){if(typeof t!="string"||t.length<1)throw new Error("Key is Required");rs.install(this,$r,{key:t}),rs.install(this,Er,{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=tn.build(this.schema??{});return{type:this._type,class:this._class,id:this._id,name:this._name??u(oa.headline(this._key)),label:this._label??u(oa.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 tn{static build(t){return Array.isArray(t)?tn.buildFromArray(t):typeof t=="object"?tn.buildFromObject(t):t}static buildFromObject(t){let a={};return Object.keys(t).forEach((l,s)=>{const i=t[l];i instanceof $r||i instanceof Er||i instanceof Qu?a[l]=i.build.bind(i)():a[l]=t[l]}),a}static buildFromArray(t){let a={};return Array.isArray(t)&&t.forEach(l=>{if(l instanceof $r||l instanceof Er||l instanceof Qu){let s=l.build.bind(l)();a[s.key]=s}else a[l.key]=l}),a}}class OC extends sl{constructor(){super(...arguments);Oe(this,"data",{schema:{},defaults:{},_originalDefaults:{},values:{},initialized:!1,hasChange:!1,validationErrors:{},onChangeCallback:[]});Oe(this,"nestedFormLayouts",["section","tab","tab-pane","grid"]);Oe(this,"ignorableFormLayouts",["grid"])}get hasChange(){return this.data.hasChange}setSchema(a){return this.data.schema=tn.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,l={}){return Object.keys(a).reduce((s,i)=>{const c=a[i];if(c.type==="html")return s;if(this.nestedFormLayouts.includes(c.type??""))if(c.disable_nesting===!0){const p=this.ensureNestedDataProperties(c.schema??{},l??{});s={...s,...p}}else s[i]=this.ensureNestedDataProperties(c.schema??{},l[i]??{});else s[i]=l[i]??c.value??"";return s},{})}isVisible(a,l){return a.hasOwnProperty("conditions")?new RC(l,this.values).evaluate(rt.get(a,"conditions"),rt.get(a,"condition_type","and")):!0}triggerChange(a){for(let l of this.data.onChangeCallback)l(a)}onDataChanged(a){this.data.onChangeCallback.push(a)}setValue(a,l){rt.set(this.data.values,a,l),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 l=a?this.data._originalDefaults:this.data.defaults;return this.data.values=this.ensureNestedDataProperties(this.data.schema,JSON.parse(JSON.stringify(l))),this.data.validationErrors={},this.data.hasChange=!1,this.data.initialized=!0,this}}function ud(){return OC.init()}const HC=["innerHTML"],Ur={__name:"FieldNote",props:{note:String},setup(e){return(t,a)=>(r(),h("div",{class:"form-note",innerHTML:e.note},null,8,HC))}},PC=Object.freeze(Object.defineProperty({__proto__:null,default:Ur},Symbol.toStringTag,{value:"Module"})),Du=Object.assign({name:"ValidationError"},{__name:"ValidationErrorNew",props:{errorKey:String,form:{type:Object,required:!0}},setup(e){return(t,a)=>e.form.hasValidationError(e.errorKey)?(r(),h("div",{key:0,class:de(`fluent-cart-admin-validation-error-wrapper ${e.errorKey}`)},[(r(!0),h(O,null,ae(e.form.getValidationError(e.errorKey),(l,s)=>(r(),h("span",{class:"fluent-cart-admin-validation-error",key:l.toLowerCase().replace(/\s/g,"")},f(l),1))),128))],2)):k("",!0)}}),JA={__name:"Resolver",props:_l({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=Sl(e,"modelValue"),a=Object.assign({"./Affix/Test.vue":()=>qt(()=>import("./chunks/Test.js?ver=1.5.1"),[],import.meta.url),"./Base/Inputs/Checkbox.vue":()=>qt(()=>Promise.resolve().then(()=>t2),void 0,import.meta.url),"./Base/Inputs/ColorPicker.vue":()=>qt(()=>Promise.resolve().then(()=>m2),void 0,import.meta.url),"./Base/Inputs/Date.vue":()=>qt(()=>Promise.resolve().then(()=>h2),void 0,import.meta.url),"./Base/Inputs/FieldNote.vue":()=>qt(()=>Promise.resolve().then(()=>PC),void 0,import.meta.url),"./Base/Inputs/Input.vue":()=>qt(()=>Promise.resolve().then(()=>n2),void 0,import.meta.url),"./Base/Inputs/Media.vue":()=>qt(()=>Promise.resolve().then(()=>H2),void 0,import.meta.url),"./Base/Inputs/RadioGroup.vue":()=>qt(()=>Promise.resolve().then(()=>l2),void 0,import.meta.url),"./Base/Inputs/RemoteSearchableSelect.vue":()=>qt(()=>Promise.resolve().then(()=>y2),void 0,import.meta.url),"./Base/Inputs/Select.vue":()=>qt(()=>Promise.resolve().then(()=>g2),void 0,import.meta.url),"./Base/Inputs/Switch.vue":()=>qt(()=>Promise.resolve().then(()=>e2),void 0,import.meta.url),"./Base/Inputs/Time.vue":()=>qt(()=>Promise.resolve().then(()=>_2),void 0,import.meta.url),"./Base/Layouts/FormGrid.vue":()=>qt(()=>Promise.resolve().then(()=>KC),void 0,import.meta.url),"./Base/Layouts/FormSection.vue":()=>qt(()=>Promise.resolve().then(()=>WC),void 0,import.meta.url),"./Base/Layouts/FormTab.vue":()=>qt(()=>Promise.resolve().then(()=>XC),void 0,import.meta.url),"./Base/Layouts/FormTabPane.vue":()=>qt(()=>Promise.resolve().then(()=>JC),void 0,import.meta.url),"./Coupon/BuyProducts.vue":()=>qt(()=>import("./chunks/BuyProducts.js?ver=1.5.1"),[],import.meta.url),"./Coupon/Categories.vue":()=>qt(()=>import("./chunks/Categories.js?ver=1.5.1"),[],import.meta.url),"./Coupon/Code.vue":()=>qt(()=>import("./chunks/Code.js?ver=1.5.1"),[],import.meta.url),"./Coupon/GetProducts.vue":()=>qt(()=>import("./chunks/GetProducts.js?ver=1.5.1"),[],import.meta.url),"./Coupon/IncludeExclude/Categories.vue":()=>qt(()=>import("./chunks/Categories2.js?ver=1.5.1"),[],import.meta.url),"./Coupon/IncludeExclude/Product.vue":()=>qt(()=>import("./chunks/Product.js?ver=1.5.1"),[],import.meta.url),"./Coupon/Products.vue":()=>qt(()=>import("./chunks/Products.js?ver=1.5.1"),[],import.meta.url),"./McpSettings.vue":()=>qt(()=>import("./chunks/McpSettings.js?ver=1.5.1"),[],import.meta.url),"./ModuleSettings.vue":()=>qt(()=>import("./chunks/ModuleSettings.js?ver=1.5.1"),[],import.meta.url),"./PaymentView.vue":()=>qt(()=>import("./chunks/PaymentView.js?ver=1.5.1"),[],import.meta.url),"./StoreSettings/AddressComponent.vue":()=>qt(()=>import("./chunks/AddressComponent.js?ver=1.5.1"),[],import.meta.url),"./StoreSettings/CreatePageButton.vue":()=>qt(()=>import("./chunks/CreatePageButton.js?ver=1.5.1"),[],import.meta.url),"./StoreSettings/PageSelector.vue":()=>qt(()=>import("./chunks/PageSelector.js?ver=1.5.1"),[],import.meta.url),"./TurnstileSettings.vue":()=>qt(()=>import("./chunks/TurnstileSettings.js?ver=1.5.1"),[],import.meta.url)}),l=uf(null);Qe(()=>{s(i.name)});const s=async c=>{const p=`./${c}.vue`;a[p]&&(l.value=(await a[p]()).default)},i=e;return(c,p)=>(r(),h(O,null,[(r(),$(Cl(l.value),ga({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":p[0]||(p[0]=m=>t.value=m)}),null,16,["modelValue"])),Ca(c.$slots,"fieldNote"),Ca(c.$slots,"validationError")],64))}},NC=["id"],cd={__name:"FormGrid",props:{field:{type:Object},fieldKey:{type:String},value:{type:Object},statePath:{type:String},form:{type:Object,required:!0}},setup(e){return(t,a)=>{var l,s,i,c,p,m,_,g,y,v;return r(),h("div",{class:"gap-2 grid grid-cols-dynamic sm:grid-cols-sm-dynamic md:grid-cols-md-dynamic lg:grid-cols-lg--dynamic",id:e.field.id||"",style:na({"--grid-columns":((l=e.field.columns)==null?void 0:l.default)??2,"--sm-grid-columns":((s=e.field.columns)==null?void 0:s.sm)??((i=e.field.columns)==null?void 0:i.default)??2,"--md-grid-columns":((c=e.field.columns)==null?void 0:c.sm)??((p=e.field.columns)==null?void 0:p.md)??((m=e.field.columns)==null?void 0:m.default)??2,"--lg-grid-columns":((_=e.field.columns)==null?void 0:_.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})},[n(_i,{form:e.form,schema:e.field.schema,value:e.value,statePath:e.statePath},null,8,["form","schema","value","statePath"])],12,NC)}}},KC=Object.freeze(Object.defineProperty({__proto__:null,default:cd},Symbol.toStringTag,{value:"Module"})),GC={key:0,class:"fct-content-card-header"},jC={key:0,class:"title"},zC={key:1,class:"fct-content-card-action"},qC={__name:"ContentCard",props:["title","show_heading"],setup(e){return(t,a)=>(r(),h("div",{class:de({"fct-content-card":e.show_heading!==!1})},[e.show_heading!==!1?(r(),h("div",GC,[e.title||t.$slots.title?(r(),h("div",jC,[Ca(t.$slots,"title",{},()=>[R(f(e.title),1)])])):k("",!0),t.$slots.action?(r(),h("div",zC,[Ca(t.$slots,"action")])):k("",!0)])):k("",!0),o("div",{class:de({"fct-content-card-body":e.show_heading!==!1})},[Ca(t.$slots,"default")],2)],2))}},YC=["id"],ZA={__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)=>(r(),h("div",{class:"form-section",id:e.field.id||""},[n(xe,null,{default:d(()=>[e.field.show_title!==!1?(r(),$(Ve,{key:0,title:e.field.title,border_bottom:""},null,8,["title"])):k("",!0),n(ke,null,{default:d(()=>[n(cd,{form:e.form,field:e.field,statePath:e.statePath,value:e.value},null,8,["form","field","statePath","value"])]),_:1})]),_:1})],8,YC))}},WC=Object.freeze(Object.defineProperty({__proto__:null,default:ZA},Symbol.toStringTag,{value:"Module"})),ep={__name:"FormTab",props:{field:{type:Object},value:{type:Object},statePath:{type:String},form:{type:Object,required:!0}},setup(e){const t=e,a=V(""),l=V([]),s=tl(),i=_=>{const g=_.props.name;c(g)},c=_=>{const g=new URL(window.location.href);g.hash=`#/settings/${_}`,window.history.replaceState(null,"",g.toString())},p=()=>{const g=window.location.hash.split("/").pop().split("#")[0];l.value=Object.keys(t.field.schema);const y=l.value.find(v=>v===g);y?a.value=y:a.value=t.field.default_tab};let m;return Qe(()=>{m=s.beforeEach((_,g,y)=>{y(),setTimeout(()=>{p()},200)}),p()}),Ct(()=>{m&&m()}),(_,g)=>{const y=B("el-tabs");return r(),$(y,{modelValue:a.value,"onUpdate:modelValue":g[0]||(g[0]=v=>a.value=v),class:de(["fct-tabs-button",{"hidden-switch":e.field.hide_tab_switch}]),onTabClick:i,type:"card"},{default:d(()=>[n(_i,{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"])}}},XC=Object.freeze(Object.defineProperty({__proto__:null,default:ep},Symbol.toStringTag,{value:"Module"})),tp={__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 l=B("el-tab-pane");return r(),$(l,{label:e.field.title,name:e.fieldKey},{default:d(()=>[n(_i,{form:e.form,schema:e.field.schema,value:e.value,statePath:e.statePath},null,8,["form","schema","value","statePath"])]),_:1},8,["label","name"])}}},JC=Object.freeze(Object.defineProperty({__proto__:null,default:tp},Symbol.toStringTag,{value:"Module"}));class Ad{}Oe(Ad,"attributesBuilders",async(t,a,l)=>{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 s={};typeof t.events!="object"&&(s={}),s.hasOwnProperty("onChange")&&typeof s.onChange=="function"?s.onChange=(...i)=>{l.data.hasChange=!0,s.onChange(i)}:s.onChange=()=>{l.data.hasChange=!0};for(let i in t.events)s[i]=(...c)=>{a(t.events[i],c)};for(let i in t.attributes??{}){let c=t.attributes[i];typeof c=="function"&&await a(c,{})}return{...t.attributes??{},...s}});const ZC={__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;zt().ctx;const a=(i,c)=>{if(typeof i=="function")return i({data:t.value,form:t.form,statePath:t.statePath,field:t.field,event:Array.isArray(c)&&c.length===1?c[0]:c})},l=V(!1),s=V({});return Qe(async()=>{s.value=await Ad.attributesBuilders(t.field,a,t.form),l.value=!0}),(i,c)=>(r(),h(O,null,[e.field.type==="grid"&&typeof e.field.schema<"u"?(r(),$(cd,ga({key:0,class:e.field.wrapperClass,form:e.form,field:e.field,value:e.value,fieldKey:e.fieldKey,statePath:e.fullStatePath},s.value),null,16,["class","form","field","value","fieldKey","statePath"])):k("",!0),e.field.type==="tab"&&typeof e.field.schema<"u"?(r(),$(ep,ga({key:1,form:e.form,field:e.field,value:e.value,statePath:e.fullStatePath},s.value),null,16,["form","field","value","statePath"])):k("",!0),e.field.type==="tab-pane"&&typeof e.field.schema<"u"&&typeof e.field.title<"u"?(r(),$(tp,ga({key:2,form:e.form,field:e.field,value:e.value,fieldKey:e.fieldKey,statePath:e.fullStatePath},s.value),null,16,["form","field","value","fieldKey","statePath"])):k("",!0),e.field.type==="section"?(r(),$(ZA,ga({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},s.value),null,16,["form","statePath","field","field-key","value","nesting"])):k("",!0)],64))}},ap={__name:"Switch",props:_l({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=Sl(e,"modelValue");return(a,l)=>{const s=B("el-switch");return r(),$(s,ga({modelValue:t.value,"onUpdate:modelValue":l[0]||(l[0]=i=>t.value=i),disabled:e.field.disabled},e.attribute),null,16,["modelValue","disabled"])}}},e2=Object.freeze(Object.defineProperty({__proto__:null,default:ap},Symbol.toStringTag,{value:"Module"})),lp={__name:"Checkbox",props:_l({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=Sl(e,"modelValue");return(a,l)=>{const s=B("el-checkbox");return r(),$(s,ga({modelValue:t.value,"onUpdate:modelValue":l[0]||(l[0]=i=>t.value=i)},e.attribute,{"true-value":"yes","false-value":"no",disabled:e.field.disabled}),{default:d(()=>[R(f(e.label),1)]),_:1},16,["modelValue","disabled"])}}},t2=Object.freeze(Object.defineProperty({__proto__:null,default:lp},Symbol.toStringTag,{value:"Module"})),a2=["innerHTML"],sp={__name:"RadioGroup",props:_l({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=Sl(e,"modelValue"),a=e,l=V([]),s=async(i="")=>{if(typeof a.field.options=="function")return l.value=await a.field.options({data:a.value,form:a.form,statePath:a.statePath,search:i});if(Array.isArray(a.field.options))return l.value=[...a.field.options]};return Qe(async()=>{await s()}),(i,c)=>{const p=B("el-radio"),m=B("el-radio-group");return r(),$(m,ga({modelValue:t.value,"onUpdate:modelValue":c[0]||(c[0]=_=>t.value=_)},e.attribute),{default:d(()=>[(r(!0),h(O,null,ae(e.field.options,(_,g)=>(r(),$(p,{key:g,value:_.value,class:de(_.option_class)},{default:d(()=>[o("div",null,f(_.label),1),o("div",{innerHTML:_.note},null,8,a2)]),_:2},1032,["value","class"]))),128))]),_:1},16,["modelValue"])}}},l2=Object.freeze(Object.defineProperty({__proto__:null,default:sp},Symbol.toStringTag,{value:"Module"})),s2=["innerHTML"],Ns={__name:"Input",props:_l({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=zt().ctx,a=Sl(e,"modelValue"),l=e,s=V(),i=async()=>{typeof l.field.prefix=="function"?s.value=await l.callback(l.field.prefix):s.value=l.field.prefix};return Qe(()=>{i()}),cf(()=>{i()}),K(()=>l.fieldKey==="amount"?l.form.data.values.type==="fixed"?ze.shop.get("currency_sign"):"%":t.appVars.shop.currency_sign),(c,p)=>{var _;const m=B("el-input");return r(),$(m,ga({modelValue:a.value,"onUpdate:modelValue":p[0]||(p[0]=g=>a.value=g)},e.attribute,{disabled:e.field.disabled}),ta({_:2},[(_=e.field.prefix)!=null&&_.component?{name:"prefix",fn:d(()=>[n(JA,{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:d(()=>[o("div",{innerHTML:s.value},null,8,s2)]),key:"1"}:void 0]),1040,["modelValue","disabled"])}}},n2=Object.freeze(Object.defineProperty({__proto__:null,default:Ns},Symbol.toStringTag,{value:"Module"})),o2={key:0,class:"fct-color-presets-section"},i2=["aria-label"],r2=["aria-label","aria-pressed","tabindex","onClick","onKeydown"],d2={class:"fct-color-custom-row"},u2={class:"fct-term-color-picker-wrap fct-term-color-picker-wrap--lg"},c2={key:1,class:"fct-color-picker-box"},A2={class:"fct-color-picker-trigger-wrap"},p2={key:0,class:"text-xs text-system-light"},f2={key:1,class:"fct-color-picker-action-wrap"},pd={__name:"ColorPicker",props:_l({field:{type:Object},statePath:{type:String},value:{default:null},form:{type:Object},callback:{type:Function},label:{type:String},attribute:{default:()=>({})},withPresets:{type:Boolean,default:!1}},{modelValue:{},modelModifiers:{}}),emits:["update:modelValue"],setup(e){const t=Sl(e,"modelValue"),a=()=>{t.value=""},l=m=>m?hs.findIndex(_=>_.toLowerCase()===m.toLowerCase()):-1,s=V(Math.max(0,l(t.value)));Ce(t,m=>{const _=l(m);_>=0&&(s.value=_)});const i=V([]),c=(m,_)=>{t.value=m,s.value=_},p=(m,_)=>{let g=_;if(m.key==="ArrowRight"||m.key==="ArrowDown")g=(_+1)%hs.length;else if(m.key==="ArrowLeft"||m.key==="ArrowUp")g=(_-1+hs.length)%hs.length;else if(m.key==="Home")g=0;else if(m.key==="End")g=hs.length-1;else return;m.preventDefault(),c(hs[g],g),Se(()=>{i.value[g]&&i.value[g].focus()})};return(m,_)=>{const g=B("el-color-picker"),y=B("el-input");return e.withPresets?(r(),h("div",o2,[o("div",{class:"fct-color-swatch-grid",role:"group","aria-label":A(u)("Color presets")},[(r(!0),h(O,null,ae(A(hs),(v,C)=>(r(),h("button",{key:v,ref_for:!0,ref:b=>i.value[C]=b,type:"button",class:de(["fct-color-swatch",{"is-active":t.value&&t.value.toLowerCase()===v.toLowerCase()}]),style:na({background:v,"--swatch-color":v}),"aria-label":A(u)("Select color %1$s",v),"aria-pressed":!!(t.value&&t.value.toLowerCase()===v.toLowerCase()),tabindex:C===s.value?0:-1,onClick:b=>c(v,C),onKeydown:b=>p(b,C)},null,46,r2))),128))],8,i2),o("div",d2,[o("div",u2,[n(g,ga({modelValue:t.value,"onUpdate:modelValue":_[0]||(_[0]=v=>t.value=v),"color-format":"hex"},e.attribute,{disabled:e.field&&e.field.disabled}),null,16,["modelValue","disabled"])]),n(y,{modelValue:t.value,"onUpdate:modelValue":_[1]||(_[1]=v=>t.value=v),placeholder:A(u)("#000000"),"aria-label":A(u)("Hex color code")},null,8,["modelValue","placeholder","aria-label"])])])):(r(),h("div",c2,[o("div",A2,[n(g,ga({modelValue:t.value,"onUpdate:modelValue":_[2]||(_[2]=v=>t.value=v)},e.attribute,{disabled:e.field&&e.field.disabled,"popper-class":"fct-color-picker-popover"}),null,16,["modelValue","disabled"]),t.value?k("",!0):(r(),$(ee,{key:0,name:"ColorPicker",class:"fct-color-picker-icon w-4 h-4"}))]),t.value?k("",!0):(r(),h("span",p2,f(A(u)("Add...")),1)),t.value?(r(),h("div",f2,[o("span",null,f(t.value),1),n(ee,{name:"Cross",class:"fct-color-picker-action w-5 h-5",onClick:a})])):k("",!0)]))}}},m2=Object.freeze(Object.defineProperty({__proto__:null,default:pd},Symbol.toStringTag,{value:"Module"})),np={__name:"Date",props:_l({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=Sl(e,"modelValue");return(a,l)=>{const s=B("el-date-picker");return r(),$(s,ga({modelValue:t.value,"onUpdate:modelValue":l[0]||(l[0]=i=>t.value=i)},e.attribute,{disabled:e.field.disabled}),null,16,["modelValue","disabled"])}}},h2=Object.freeze(Object.defineProperty({__proto__:null,default:np},Symbol.toStringTag,{value:"Module"})),op={__name:"Time",props:_l({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=Sl(e,"modelValue");return(a,l)=>{const s=B("el-time-select");return r(),$(s,ga({modelValue:t.value,"onUpdate:modelValue":l[0]||(l[0]=i=>t.value=i)},e.attribute,{disabled:e.field.disabled}),null,16,["modelValue","disabled"])}}},_2=Object.freeze(Object.defineProperty({__proto__:null,default:op},Symbol.toStringTag,{value:"Module"})),v2={key:0},ip={__name:"Select",props:_l({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=Sl(e,"modelValue"),a=e,l=V([]),s=V(!1),i=async(p="")=>{s.value=!0,typeof a.field.options=="function"&&(l.value=await a.field.options({data:a.value,form:a.form,statePath:a.statePath,search:p})),Array.isArray(a.field.options)&&(l.value=[...a.field.options]),s.value=!1};Qe(async()=>{await i()});const c=p=>typeof p.disabled=="function"?a.callback(p.disabled,{}):p.disabled;return(p,m)=>{const _=B("el-option"),g=B("el-select");return r(),$(g,ga({modelValue:t.value,"onUpdate:modelValue":m[0]||(m[0]=y=>t.value=y)},e.attribute,{"remote-method":i,loading:s.value,filterable:e.field.filterable===!0,clearable:e.field.clearable===!0,disabled:e.field.disabled}),{default:d(()=>[(r(!0),h(O,null,ae(l.value,(y,v)=>(r(),$(_,{key:v,value:y.value,label:y.label,disabled:c(y)},{default:d(()=>[y.slot?(r(),h("span",v2,f(y.slot),1)):k("",!0)]),_:2},1032,["value","label","disabled"]))),128))]),_:1},16,["modelValue","loading","filterable","clearable","disabled"])}}},g2=Object.freeze(Object.defineProperty({__proto__:null,default:ip},Symbol.toStringTag,{value:"Module"})),rp={__name:"RemoteSearchableSelect",props:_l({field:{type:Object},key:{type:String}},{modelValue:{},modelModifiers:{}}),emits:["update:modelValue"],setup(e){const t=Sl(e,"modelValue"),a=e,l=V(!1),s=V(a.field.options||[]),i=c=>{if(a.field.search_only_on_type===!0){if(c.query.length===0)return}else if(c.query.length<1&&s.value.length>0)return;l.value=!0,ce.get("forms/search_options",{search_by:c.query,search_for:c.key}).then(p=>{s.value=p.options,l.value=!1})};return(c,p)=>{const m=B("el-option"),_=B("el-select");return r(),$(_,{modelValue:t.value,"onUpdate:modelValue":p[0]||(p[0]=g=>t.value=g),filterable:"",remote:"",placeholder:e.field.placeholder??A(u)("Please enter a keyword"),"remote-method":g=>{i({query:g,key:e.field.remote_key})},loading:l.value,multiple:e.field.multiple},{default:d(()=>[(r(!0),h(O,null,ae(s.value,g=>(r(),$(m,{key:g.value,label:g.label,value:g.value},null,8,["label","value"]))),128))]),_:1},8,["modelValue","placeholder","remote-method","loading","multiple"])}}},y2=Object.freeze(Object.defineProperty({__proto__:null,default:rp},Symbol.toStringTag,{value:"Module"}));function sn(e,t){t===void 0&&(t={});var a=t.insertAt;if(e&&typeof document<"u"){var l=document.head||document.getElementsByTagName("head")[0],s=document.createElement("style");s.type="text/css",a==="top"&&l.firstChild?l.insertBefore(s,l.firstChild):l.appendChild(s),s.styleSheet?s.styleSheet.cssText=e:s.appendChild(document.createTextNode(e))}}sn(".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}");sn('.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)}}');sn(".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}");sn(".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}");sn(".vel-icon{fill:currentColor;height:1em;overflow:hidden;vertical-align:-.15em;width:1em}");sn(".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 bl="vel",Ul=jl({name:"SvgIcon",props:{type:{type:String,default:""}},setup:e=>()=>n("svg",{class:`${bl}-icon icon`,"aria-hidden":"true"},[n("use",{"xlink:href":`#icon-${e.type}`},null)])}),mi=typeof window<"u",Ks=()=>{};let dp=!1;if(mi)try{const e={};Object.defineProperty(e,"passive",{get(){dp=!0}}),window.addEventListener("test-passive",Ks,e)}catch{}const Vu=function(e,t,a){let l=arguments.length>3&&arguments[3]!==void 0&&arguments[3];mi&&e.addEventListener(t,a,!!dp&&{capture:!1,passive:l})},Tu=(e,t,a)=>{mi&&e.removeEventListener(t,a)},b2=e=>{e.preventDefault()},w2=Object.prototype.toString,fd=e=>t=>w2.call(t).slice(8,-1)===e,C2=e=>!!e&&fd("Object")(e),Mu=e=>!!e&&fd("String")(e);function B2(e){return e!=null}const k2=jl({name:"Toolbar",props:{zoomIn:{type:Function,default:Ks},zoomOut:{type:Function,default:Ks},rotateLeft:{type:Function,default:Ks},rotateRight:{type:Function,default:Ks},resize:{type:Function,default:Ks},rotateDisabled:{type:Boolean,default:!1},zoomDisabled:{type:Boolean,default:!1}},setup:e=>()=>n("div",{class:`${bl}-toolbar`},[!e.zoomDisabled&&n(O,null,[n("div",{role:"button","aria-label":"zoom in button",class:"toolbar-btn toolbar-btn__zoomin",onClick:e.zoomIn},[n(Ul,{type:"zoomin"},null)]),n("div",{role:"button","aria-label":"zoom out button",class:"toolbar-btn toolbar-btn__zoomout",onClick:e.zoomOut},[n(Ul,{type:"zoomout"},null)])]),n("div",{role:"button","aria-label":"resize image button",class:"toolbar-btn toolbar-btn__resize",onClick:e.resize},[n(Ul,{type:"resize"},null)]),!e.rotateDisabled&&n(O,null,[n("div",{role:"button","aria-label":"image rotate left button",class:"toolbar-btn toolbar-btn__rotate",onClick:e.rotateLeft},[n(Ul,{type:"rotate-left"},null)]),n("div",{role:"button","aria-label":"image rotate right button",class:"toolbar-btn toolbar-btn__rotate",onClick:e.rotateRight},[n(Ul,{type:"rotate-right"},null)])])])}),x2=()=>n("div",{class:`${bl}-loading`},[n("div",{class:"ring"},null)]),S2=()=>n("div",{class:`${bl}-on-error`},[n("div",{class:"ring"},null),n(Ul,{type:"img-broken"},null)]),F2=(e,t)=>{let{slots:a}=t;return n("div",{class:`${bl}-img-title`},[a.default?a.default():""])},$2=jl({name:"DefaultIcons",setup:()=>()=>n("svg",{"aria-hidden":!0,style:"position: absolute; width: 0; height: 0; overflow: hidden; visibility: hidden;"},[n("symbol",{id:"icon-rotate-right",viewBox:"0 0 1024 1024"},[n("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)]),n("symbol",{id:"icon-rotate-left",viewBox:"0 0 1024 1024"},[n("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)]),n("symbol",{id:"icon-resize",viewBox:"0 0 1024 1024"},[n("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)]),n("symbol",{id:"icon-img-broken",viewBox:"0 0 1024 1024"},[n("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)]),n("symbol",{id:"icon-prev",viewBox:"0 0 1024 1024"},[n("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)]),n("symbol",{id:"icon-next",viewBox:"0 0 1024 1024"},[n("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)]),n("symbol",{id:"icon-zoomin",viewBox:"0 0 1024 1024"},[n("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),n("path",{d:"M235.712 369.92h390.72v127.104H235.712z"},null),n("path",{d:"M367.488 238.144h127.104v390.72H367.488z"},null)]),n("symbol",{id:"icon-close",viewBox:"0 0 1024 1024"},[n("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)]),n("symbol",{id:"icon-zoomout",viewBox:"0 0 1024 1024"},[n("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),n("path",{d:"M235.712 369.92h390.72v127.104H235.712z"},null)])])}),kn=mi?window:global;let Lu=Date.now();function E2(e){const t=Date.now(),a=Math.max(0,16-(t-Lu)),l=setTimeout(e,a);return Lu=t+a,l}function Gi(e){return(kn.requestAnimationFrame||E2).call(kn,e)}function Ru(e){(kn.cancelAnimationFrame||kn.clearTimeout).call(kn,e)}function Ou(e,t){const a=e.clientX-t.clientX,l=e.clientY-t.clientY;return Math.sqrt(a*a+l*l)}function ji(e){return typeof e=="function"||Object.prototype.toString.call(e)==="[object Object]"&&!Af(e)}var zi=jl({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:l}=t;const{imgRef:s,imgState:i,setImgSize:c}=(()=>{const Fe=V(),Ee=gn({width:0,height:0,maxScale:1});return{imgRef:Fe,imgState:Ee,setImgSize:()=>{if(Fe.value){const{width:Pe,height:Me,naturalWidth:ht}=Fe.value;Ee.maxScale=ht/Pe,Ee.width=Pe,Ee.height=Me}}}})(),p=V(e.index),m=V(""),_=gn({scale:1,lastScale:1,rotateDeg:0,top:0,left:0,initX:0,initY:0,lastX:0,lastY:0,touches:[]}),g=gn({loadError:!1,loading:!1,dragging:!1,gesturing:!1,wheeling:!1}),y=K(()=>{return Fe=e.imgs,fd("Array")(Fe)?e.imgs.map(Ee=>typeof Ee=="string"?{src:Ee}:function(Pe){return C2(Pe)&&Mu(Pe.src)}(Ee)?Ee:void 0).filter(B2):Mu(e.imgs)?[{src:e.imgs}]:[];var Fe}),v=K(()=>y.value[p.value]),C=K(()=>{var Fe;return(Fe=y.value[p.value])==null?void 0:Fe.src}),b=K(()=>{var Fe;return(Fe=y.value[p.value])==null?void 0:Fe.title}),w=K(()=>{var Fe;return(Fe=y.value[p.value])==null?void 0:Fe.alt}),x=K(()=>({cursor:g.loadError?"default":e.moveDisabled?g.dragging?"grabbing":"grab":"move",top:`calc(50% + ${_.top}px)`,left:`calc(50% + ${_.left}px)`,transition:g.dragging||g.gesturing?"none":"",transform:`translate(-50%, -50%) scale(${_.scale}) rotate(${_.rotateDeg}deg)`})),F=()=>{a("hide")},L=()=>{_.scale=1,_.lastScale=1,_.rotateDeg=0,_.top=0,_.left=0,g.loadError=!1,g.dragging=!1,g.loading=!0},U=(Fe,Ee)=>{const Pe=p.value;L(),p.value=Fe,y.value[p.value]===y.value[Fe]&&Se(()=>{g.loading=!1}),e.visible&&Pe!==Fe&&(Ee&&Ee(Pe,Fe),a("on-index-change",Pe,Fe))},S=()=>{const Fe=p.value,Ee=e.loop?(Fe+1)%y.value.length:Fe+1;!e.loop&&Ee>y.value.length-1||U(Ee,(Pe,Me)=>{a("on-next",Pe,Me),a("on-next-click",Pe,Me)})},M=()=>{const Fe=p.value;let Ee=Fe-1;if(Fe===0){if(!e.loop)return;Ee=y.value.length-1}U(Ee,(Pe,Me)=>{a("on-prev",Pe,Me),a("on-prev-click",Pe,Me)})},I=Fe=>{Math.abs(1-Fe)<.05?Fe=1:Math.abs(i.maxScale-Fe)<.05&&(Fe=i.maxScale),_.lastScale=_.scale,_.scale=Fe},T=()=>{const Fe=_.scale+e.zoomScale;Fe{const Fe=_.scale-e.zoomScale;Fe>e.minZoom&&I(Fe)},E=()=>{const Fe=_.rotateDeg%360;a("on-rotate",Math.abs(Fe<0?Fe+360:Fe))},D=()=>{_.rotateDeg-=90,E()},H=()=>{_.rotateDeg+=90,E()},P=()=>{_.scale=1,_.top=0,_.left=0},G=function(){let Fe=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0;return!e.moveDisabled&&Fe===0},{onMouseDown:J,onMouseMove:oe,onMouseUp:Z}=((Fe,Ee,Pe)=>{let Me,ht=!1;return{onMouseDown:At=>{Fe.initX=Fe.lastX=At.clientX,Fe.initY=Fe.lastY=At.clientY,Ee.dragging=!0,ht=!1,At.stopPropagation()},onMouseUp:At=>{Pe(At.button)&&Ru(Me),Ee.dragging=!1,ht=!1},onMouseMove:At=>{if(Ee.dragging)if(Pe(At.button)){if(ht)return;ht=!0,Me=Gi(()=>{const{top:Mt,left:Ft,lastY:$t,lastX:ct}=Fe;Fe.top=Mt-$t+At.clientY,Fe.left=Ft-ct+At.clientX,Fe.lastX=At.clientX,Fe.lastY=At.clientY,ht=!1})}else Fe.lastX=At.clientX,Fe.lastY=At.clientY;At.stopPropagation()}}})(_,g,G),{onTouchStart:W,onTouchMove:pe,onTouchEnd:N}=((Fe,Ee,Pe,Me,ht)=>{let At,Mt=!1;return{onTouchStart:Ft=>{const{touches:$t}=Ft;$t.length>1&&ht()?(Pe.gesturing=!0,Ee.touches=$t):(Ee.initX=Ee.lastX=$t[0].clientX,Ee.initY=Ee.lastY=$t[0].clientY,Pe.dragging=!0),Ft.stopPropagation()},onTouchMove:Ft=>{if(Mt)return;const{touches:$t}=Ft,{lastX:ct,lastY:Ut,left:St,top:Dt,scale:Et}=Ee;if(!Pe.gesturing&&Pe.dragging){if(!$t[0])return;const{clientX:It,clientY:Ht}=$t[0];Me()?At=Gi(()=>{Ee.lastX=It,Ee.lastY=Ht,Ee.top=Dt-Ut+Ht,Ee.left=St-ct+It,Mt=!1}):(Ee.lastX=It,Ee.lastY=Ht)}else Pe.gesturing&&Ee.touches.length>1&&$t.length>1&&ht()&&(At=Gi(()=>{const It=(Ou(Ee.touches[0],Ee.touches[1])-Ou($t[0],$t[1]))/Fe.width;Ee.touches=$t;const Ht=Et-1.3*It;Ht>.5&&Ht<1.5*Fe.maxScale&&(Ee.scale=Ht),Mt=!1}))},onTouchEnd:()=>{Ru(At),Pe.dragging=!1,Pe.gesturing=!1,Mt=!1}}})(i,_,g,G,()=>!e.pinchDisabled),j=()=>{e.dblclickDisabled||(_.scale!==i.maxScale?(_.lastScale=_.scale,_.scale=i.maxScale):_.scale=_.lastScale)},q=Fe=>{g.loadError||g.gesturing||g.loading||g.dragging||g.wheeling||!e.scrollDisabled||e.zoomDisabled||(g.wheeling=!0,setTimeout(()=>{g.wheeling=!1},80),Fe.deltaY<0?T():Q())},X=Fe=>{const Ee=Fe;e.visible&&(!e.escDisabled&&Ee.key==="Escape"&&e.visible&&F(),Ee.key==="ArrowLeft"&&(e.rtl?S():M()),Ee.key==="ArrowRight"&&(e.rtl?M():S()))},ie=()=>{e.maskClosable&&F()},ge=()=>{c()},fe=()=>{g.loading=!1},he=Fe=>{g.loading=!1,g.loadError=!0,a("on-error",Fe)},le=()=>{e.visible&&c()};Ce(()=>e.index,Fe=>{Fe<0||Fe>=y.value.length||U(Fe)}),Ce(()=>g.dragging,(Fe,Ee)=>{const Pe=!Fe&&Ee;if(!G()&&Pe){const Me=_.lastX-_.initX,ht=_.lastY-_.initY,At=e.swipeTolerance;Math.abs(Me)>Math.abs(ht)&&(Me<-1*At?S():Me>At&&M())}}),Ce(()=>e.visible,Fe=>{if(Fe){L();const Ee=y.value.length;if(Ee===0)return p.value=0,g.loading=!1,void Se(()=>g.loadError=!0);p.value=e.index>=Ee?Ee-1:e.index<0?0:e.index,e.scrollDisabled&&me()}else e.scrollDisabled&&Ue()});const me=()=>{document&&(m.value=document.body.style.overflowY,document.body.style.overflowY="hidden")},Ue=()=>{document&&(document.body.style.overflowY=m.value)};Qe(()=>{Vu(document,"keydown",X),Vu(window,"resize",le)}),vl(()=>{Tu(document,"keydown",X),Tu(window,"resize",le),e.scrollDisabled&&Ue()});const et=()=>g.loading?l.loading?l.loading({key:"loading"}):n(x2,{key:"img-loading"},null):g.loadError?l.onerror?l.onerror({key:"onerror"}):n(S2,{key:"img-on-error"},null):n("div",{class:`${bl}-img-wrapper`,style:x.value,key:"img-wrapper"},[n("img",{alt:w.value,ref:s,draggable:"false",class:`${bl}-img`,src:C.value,onMousedown:J,onMouseup:Z,onMousemove:oe,onTouchstart:W,onTouchmove:pe,onTouchend:N,onLoad:ge,onDblclick:j,onDragstart:Fe=>{Fe.preventDefault()}},null)]),be=()=>{if(l["prev-btn"])return l["prev-btn"]({prev:M});if(y.value.length<=1)return;const Fe=!e.loop&&p.value<=0;return n("div",{role:"button","aria-label":"previous image button",class:"btn__prev "+(Fe?"disable":""),onClick:M},[e.rtl?n(Ul,{type:"next"},null):n(Ul,{type:"prev"},null)])},qe=()=>{if(l["next-btn"])return l["next-btn"]({next:S});if(y.value.length<=1)return;const Fe=!e.loop&&p.value>=y.value.length-1;return n("div",{role:"button","aria-label":"next image button",class:"btn__next "+(Fe?"disable":""),onClick:S},[e.rtl?n(Ul,{type:"prev"},null):n(Ul,{type:"next"},null)])},gt=()=>{if(!(e.titleDisabled||g.loading||g.loadError))return l.title?l.title({currentImg:v.value}):b.value?n(F2,null,{default:()=>[b.value]}):void 0},Ze=()=>{let Fe;if(e.visible)return n("div",{onTouchmove:b2,class:[`${bl}-modal`,e.rtl?"is-rtl":""],onClick:Ne(ie,["self"]),onWheel:q},[n($2,null,null),n(Gl,{name:`${bl}-fade`,mode:"out-in"},ji(Fe=et())?Fe:{default:()=>[Fe]}),n("img",{style:"display:none;",src:C.value,onError:he,onLoad:fe},null),n("div",{class:`${bl}-btns-wrapper`},[be(),qe(),gt(),l["close-btn"]?l["close-btn"]({close:F}):n("div",{role:"button","aria-label":"close image preview button",class:"btn__close",onClick:F},[n(Ul,{type:"close"},null)]),l.toolbar?l.toolbar({toolbarMethods:{zoomIn:T,zoomOut:Q,rotate:D,rotateLeft:D,rotateRight:H,resize:P},zoomIn:T,zoomOut:Q,rotate:D,rotateLeft:D,rotateRight:H,resize:P}):n(k2,{zoomIn:T,zoomOut:Q,resize:P,rotateLeft:D,rotateRight:H,rotateDisabled:e.rotateDisabled,zoomDisabled:e.zoomDisabled},null)])])};return()=>{let Fe;if(e.teleport){let Ee;return n(Xo,{to:e.teleport},{default:()=>[n(Gl,{name:`${bl}-fade`},ji(Ee=Ze())?Ee:{default:()=>[Ee]})]})}return n(Gl,{name:`${bl}-fade`},ji(Fe=Ze())?Fe:{default:()=>[Fe]})}}});const U2=Object.assign(zi,{install:e=>{e.component(zi.name,zi)}}),I2={name:"Attachments",components:{MediaButton:Mc,VueEasyLightbox:U2,IconButton:Xe,Delete:gs},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:V([])}},computed:{showMediaButtonAsIcon:function(){return!this.multiple&&this.attachments.length===1}},watch:{attachments:{handler:function(e,t){return this.lightboxData=[],Array.isArray(e)&&e.length>0&&e.map((a,l)=>{this.lightboxData.push(a.url)}),e},deep:!0}},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)}}},Q2={class:"fct-attachments-wrap",style:{position:"relative"}},D2={class:"fct-attachment-img-wrap"},V2=["src","alt","onClick"],T2={class:"fct-attachments-button"};function M2(e,t,a,l,s,i){const c=B("VueEasyLightbox"),p=B("MediaButton"),m=B("IconButton"),_=B("Delete");return r(),h(O,null,[n(c,{visible:s.visible,imgs:s.lightboxData,index:s.imageIndex,onHide:t[0]||(t[0]=()=>{s.visible=!1})},null,8,["visible","imgs","index"]),o("div",Q2,[a.attachments?(r(),h("ul",{key:0,class:de(`fct-attachments-list ${a.multiple?"is-multiple":"fct-single-attachment"} ${a.attachments.length>0?"is-single":""}`)},[a.showList===!0?(r(!0),h(O,{key:0},ae(a.attachments,(g,y)=>(r(),h("li",{key:y,class:de([[a.mediaInputSize,a.mediaInputBg],"fct-attachment-item"])},[o("div",D2,[a.previewImage?(r(),h("img",{key:0,src:g.url,alt:g.title,onClick:()=>{s.imageIndex=y,s.visible=!0}},null,8,V2)):k("",!0),i.showMediaButtonAsIcon&&!a.multiple?(r(),$(m,{key:1,size:"x-small"},{default:d(()=>[n(p,{"icon-mode":!0,attachments:a.attachments,title:a.multiple?"":a.title,onOnMediaSelected:i.onMediaSelected,multiple:a.multiple,icon:a.icon},null,8,["attachments","title","onOnMediaSelected","multiple","icon"])]),_:1})):k("",!0)]),o("div",T2,[a.showDeleteButton?(r(),$(m,{key:0,tag:"button",bg:"danger",outline:"",size:"x-small",onClick:Ne(v=>i.removeImageEvent(y),["prevent"]),title:i.translate("Delete media")},{default:d(()=>[a.multiple?(r(),$(_,{key:0})):(r(),h(O,{key:1},[R(f(i.translate("Remove")),1)],64))]),_:2},1032,["onClick","title"])):k("",!0),i.showMediaButtonAsIcon&&a.multiple?(r(),$(m,{key:1,size:"x-small"},{default:d(()=>[n(p,{"icon-mode":!0,attachments:a.attachments,title:a.multiple?"":a.title,onOnMediaSelected:i.onMediaSelected,multiple:a.multiple,icon:a.icon},null,8,["attachments","title","onOnMediaSelected","multiple","icon"])]),_:1})):k("",!0)])],2))),128)):k("",!0),i.showMediaButtonAsIcon?k("",!0):(r(),h("li",{key:1,class:de([a.mediaInputSize,a.mediaInputBg])},[n(p,{"icon-mode":!1,attachments:a.attachments,title:a.multiple?"":a.title,onOnMediaSelected:i.onMediaSelected,multiple:a.multiple,icon:a.icon},null,8,["attachments","title","onOnMediaSelected","multiple","icon"])],2))],2)):k("",!0),Ca(e.$slots,"default")])],64)}const up=lt(I2,[["render",M2]]),L2={key:0},R2={key:0,class:"setting-label"},hi={__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,l=t,s=V();let i=V([]);const c=()=>{a.multiple?s.value=[]:s.value="",i.value=[],l("update:modelValue",s.value)},p=_=>{if(_.length)if(a.multiple){s.value=[],i.value=[];for(const g of _)s.value.push(g),i.value.push(g)}else s.value=_,i.value=_;l("update:modelValue",s.value)};Ce(()=>a.modelValue,_=>{Array.isArray(_)&&_.length>0?s.value=_:_&&typeof _=="string"&&_!==""?s.value=[_]:_&&typeof _=="object"?s.value=[_]:s.value=[],m()});const m=()=>{i.value=[],Object.values(s.value).forEach((_,g)=>{_!==void 0&&_!==""&&i.value.push(_)})};return Qe(()=>{Array.isArray(a.modelValue)&&a.modelValue.length>0?s.value=a.modelValue:a.modelValue&&typeof a.modelValue=="string"&&a.modelValue!==""?s.value=[a.modelValue]:a.modelValue&&typeof a.modelValue=="object"?s.value=[a.modelValue]:s.value=[],m()}),(_,g)=>(r(),h(O,null,[n(up,{attachments:A(i),onMediaUploaded:p,onRemoveImage:c,icon:e.icon,title:e.title,mediaInputSize:e.mediaInputSize,mediaInputBg:e.mediaInputBg},null,8,["attachments","icon","title","mediaInputSize","mediaInputBg"]),e.showSupported?(r(),h("div",L2,[e.field&&e.field.label?(r(),h("label",R2,f(e.field.label),1)):k("",!0),o("span",null,f(A(u)("%1$s Recommended width: %2$s pixels minimum.","HEIC, WEBP, SVG, PNG, or JPG.","512")),1)])):k("",!0)],64))}},O2={class:"setting-media-wrap"},cp={__name:"Media",props:_l({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=Sl(e,"modelValue");return(a,l)=>(r(),h("div",O2,[n(hi,ga({modelValue:t.value,"onUpdate:modelValue":l[0]||(l[0]=s=>t.value=s),field:e.field,icon:"Upload"},e.attribute),null,16,["modelValue","field"])]))}},H2=Object.freeze(Object.defineProperty({__proto__:null,default:cp},Symbol.toStringTag,{value:"Module"})),P2={__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;V(!1),zt().ctx;const a=_=>typeof _.label=="function"?_.label(t.value,t.statePath,t.form):_.label,l=(_,g)=>{if(typeof _=="function")return _({data:t.value,form:t.form,statePath:t.statePath,field:t.field,event:Array.isArray(g)&&g.length===1?g[0]:g})},s=V(!1);let i={};Qe(async()=>{i=await Ad.attributesBuilders(t.field,l,t.form),s.value=!0});const c={switch:ap,checkbox:lp,radio:sp,input:Ns,text:Ns,email:Ns,number:Ns,textarea:Ns,color:pd,date:np,time:op,select:ip,media:cp,remote_select:rp},p=K(()=>c[t.field.type]||null),m=K(()=>({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:i,callback:l}));return(_,g)=>e.field.type==="wp-editor"?(r(),$(Wl,{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"])):p.value&&s.value?(r(),$(Cl(p.value),ga({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)},m.value),null,16,["modelValue"])):k("",!0)}},N2=["innerHTML"],K2={key:0},G2={key:0},_i={__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??"",l=["grid","section","tab","tab-pane"];V(!1),zt().ctx;const s=(c,p)=>{if(typeof c.label=="function"){let m=i(c)?a:p+".",_=i(c)?t.value:t.value[p];return c.label(_,m,t.form)}return c.label},i=c=>c.disable_nesting!==!1;return(c,p)=>(r(!0),h(O,null,ae(e.schema,(m,_)=>(r(),h(O,{key:_},[e.form.isVisible(m,e.statePath+_)?(r(),h(O,{key:0},[m.type==="html"?(r(),h("div",{key:0,class:de(`setting-html-wrapper ${m.wrapperClass??""}`),innerHTML:m.value},null,10,N2)):(r(),h(O,{key:1},[m.component?(r(),h("div",{key:0,class:de(m.wrapperClass??"")},[m.component&&m.label?(r(),$(ca,{key:0,title:s(m,_),content:m.tooltip,class:"setting-label",placement:m.tooltip_placement},{default:d(()=>[m.labelOptional?(r(),h("span",K2,"("+f(m.labelOptional)+")",1)):k("",!0)]),_:2},1032,["title","content","placement"])):k("",!0),n(JA,{modelValue:e.value[_],"onUpdate:modelValue":g=>e.value[_]=g,name:m.component,form:e.form,statePath:i(m)?A(a):_+".",field:m,"field-key":_,value:i(m)?e.value:e.value[_],nesting:i(m)},{fieldNote:d(()=>[m.note&&m.hide_note!==!0?(r(),$(Ur,{key:0,note:m.note},null,8,["note"])):k("",!0)]),validationError:d(()=>[n(Du,{form:e.form,"error-key":A(a)+_},null,8,["form","error-key"])]),_:2},1032,["modelValue","onUpdate:modelValue","name","form","statePath","field","field-key","value","nesting"])],2)):k("",!0),l.includes(m.type)?(r(),$(ZC,{key:1,form:e.form,field:m,value:e.value,"full-state-path":A(a),statePath:i(m)?A(a):_+".","field-key":_},null,8,["form","field","value","full-state-path","statePath","field-key"])):k("",!0),typeof m.type<"u"&&!l.includes(m.type)&&!["custom","component","html","hidden"].includes(m.type)?(r(),h("div",{key:2,class:de(`setting-fields-inner ${m.wrapperClass??""}`)},[m.type!=="checkbox"&&!m.component&&m.label!==!1?(r(),$(ca,{key:0,class:"setting-label",title:s(m,_),content:m.tooltip,placement:m.tooltip_placement},{default:d(()=>[m.labelOptional?(r(),h("span",G2,"("+f(m.labelOptional)+")",1)):k("",!0)]),_:2},1032,["title","content","placement"])):k("",!0),n(P2,{form:e.form,field:m,value:e.value,"full-state-path":A(a),"state-path":e.statePath,"field-key":_},null,8,["form","field","value","full-state-path","state-path","field-key"]),m.note&&!m.component?(r(),$(Ur,{key:1,note:m.note},null,8,["note"])):k("",!0),m.component?k("",!0):(r(),$(Du,{key:2,form:e.form,"error-key":A(a)+_},null,8,["form","error-key"]))],2)):k("",!0)],64))],64)):k("",!0)],64))),128))}},j2={key:0,class:"vue-form-wrap"},z2={key:0,class:"form-section-save-action"},q2={key:0,class:"cmd block leading-none"},vi={__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 l=al(),s=e,i=a;Ce(()=>s.form.isReady,()=>{Se(()=>Zs.scrollToHashSection(l.hash))},{once:!0}),Qe(()=>{Se(()=>{c.registerCopyAction(),s.form.isReady&&Zs.scrollToHashSection(l.hash)})}),V({});const c=zt().ctx,p=()=>{i("onSubmitButtonClick")};return t({getState:()=>s.form.values}),(_,g)=>{const y=B("el-button");return e.form.isReady?(r(),h("div",j2,[n(_i,{form:e.form,ref:"formRenderer",schema:e.form.schema,value:e.form.values},null,8,["form","schema","value"]),e.showSubmitButton?(r(),h("div",z2,[n(y,{onClick:p,type:"primary",loading:e.loading},{default:d(()=>[e.loading?k("",!0):(r(),h("span",q2,"⌘s")),R(" "+f(e.submitButtonText),1)]),_:1},8,["loading"])])):k("",!0)])):k("",!0)}}},Y2={key:0},W2={__name:"DynamicFormLoader",props:["schema","values","submit_button_text","form_name","widget"],emits:["change"],setup(e,{expose:t,emit:a}){let l=ud();const s=a,i=e,c=()=>{const g=i.form_name,y={};return y[g]={...l.values},y},p=()=>{l.reset()},m=()=>{var g;return((g=i.widget)==null?void 0:g.reset_on_save)==!0},_=Pr("triggerChange");return Qe(()=>{l.setSchema(i.schema).setDefaults(i.values).initForm(),l.onDataChanged(g=>{_==null||_(),s("change")})}),t({getState:c,resetForm:p,resetOnSave:m}),(g,y)=>A(l).isReady?(r(),h("div",Y2,[n(vi,{showSubmitButton:!1,submitButtonText:e.submit_button_text,form:A(l),onOnSubmitButtonClick:y[0]||(y[0]=()=>{A(l).values}),onOnChange:y[1]||(y[1]=v=>{}),"validation-errors":{}},null,8,["submitButtonText","form"])])):k("",!0)}},X2={__name:"EChart",props:{option:{type:Object,required:!0},height:{type:String,default:"400px"},width:{type:String,default:"100%"}},setup(e){const t=e,a=V(null);let l=null;const s=()=>{a.value&&(l=Jt(a.value),l.setOption(t.option))};Ce(()=>t.option,m=>{l&&m&&l.setOption(m,!0)},{deep:!0});const i=(m,_)=>{if(m==null||m==="")return _;const g=Number(m);return isNaN(g)?m:`${g}px`},c=K(()=>i(t.height,"400px")),p=K(()=>i(t.width,"100%"));return Qe(()=>{s(),window.addEventListener("resize",()=>l==null?void 0:l.resize())}),vl(()=>{window.removeEventListener("resize",()=>l==null?void 0:l.resize()),l==null||l.dispose()}),(m,_)=>(r(),h("div",{ref_key:"chartRef",ref:a,style:na({width:p.value,height:c.value})},null,4))}},J2={class:"fct-step-indicator"},Z2={class:"indicator-title"},eB={class:"indicator-steps"},tB={class:"indicator-progress"},aB={class:"indicator-steps-bar"},lB=["onClick"],sB={__name:"StepIndicator",props:{steps:{type:Array,required:!0},currentStep:{type:Number,default:1}},emits:["step-click"],setup(e,{emit:t}){const a=t;return(l,s)=>(r(),h("div",J2,[o("div",Z2,f(e.steps[e.currentStep-1].label),1),o("div",eB,[o("div",tB,f(e.currentStep)+"/"+f(e.steps.length)+" "+f(l.$t("Completed")),1),o("div",aB,[(r(!0),h(O,null,ae(e.steps,(i,c)=>(r(),h("div",{key:c,class:"indicator-step",onClick:p=>a("step-click",c+1)},[o("div",{class:de(["indicator-step-bar",ca.disabled||a.loading),i=()=>`width ${a.duration}ms ease, opacity ${a.duration}ms ease, margin-right ${a.duration}ms ease`,c=y=>{y.style.width="0",y.style.opacity="0",y.style.overflow="hidden",y.style.marginRight="6px"},p=(y,v)=>{const C=y.scrollWidth+"px";y.style.transition=i(),requestAnimationFrame(()=>{y.style.width=C,y.style.opacity="1",y.style.marginRight=""}),setTimeout(()=>v(),a.duration)},m=y=>{y.style.width="auto",y.style.overflow="",y.style.marginRight=""},_=y=>{y.style.width=y.scrollWidth+"px",y.style.opacity="1",y.style.overflow="hidden",y.style.marginRight=iB},g=(y,v)=>{y.offsetHeight,y.style.transition=i(),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)=>(r(),h("button",{type:e.nativeType,class:de(["el-button",e.type&&`el-button--${e.type}`,e.size&&`el-button--${e.size}`,{"is-plain":e.plain,"is-loading":e.loading,"is-disabled":s.value}]),disabled:s.value,"aria-disabled":s.value,onClick:v[0]||(v[0]=C=>l("click",C))},[n(Gl,{onBeforeEnter:c,onEnter:p,onAfterEnter:m,onBeforeLeave:_,onLeave:g},{default:d(()=>[e.loading?(r(),h("span",oB,v[1]||(v[1]=[o("i",{class:"el-icon is-loading"},[o("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[o("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)]))):k("",!0)]),_:1}),o("span",null,[Ca(y.$slots,"default",{},void 0,!0)])],10,nB))}},dB=lt(rB,[["__scopeId","data-v-fa8794a2"]]),Ap={__name:"VueTemplateLoader",props:{widget:{type:Object,required:!0},data:{required:!1}},setup(e){var _,g,y,v,C,b;const t=Cc(Bc),a=Object.freeze({get:(...w)=>ce.get(...w),post:(...w)=>ce.post(...w),put:(...w)=>ce.put(...w),delete:(...w)=>ce.delete(...w),patch:(...w)=>ce.patch(...w),upload:(...w)=>ce.upload(...w),getNonce:()=>ce.getNonce()}),l=Object.freeze({success:(...w)=>z.success(...w),error:(...w)=>z.error(...w),info:(...w)=>z.info(...w),validationErrors:(...w)=>z.validationErrors(...w)}),s=Object.freeze({clipboard:(_=window==null?void 0:window.navigator)==null?void 0:_.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}),i=[{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__"}],c=w=>{for(const x of i)if(x.pattern.test(w))return!1;return!0},p=w=>{var x,F;try{if(typeof w!="string")return null;const L=w.match(/]*)?>|