1import{u as Q,d as W,r as b,f as It,h as Bt,i as Gt,w as I,p as Zt,a as J,n as C,j as zt,k as Qt,l as ut,c as y,b as tt,m as j,q as L,s as st,t as Dt,v as Jt,x as te,y as Pt}from"./vue-core-BwTpBCjw.js";function _t(){}const ee=Object.assign,kt=typeof window<"u",lt=e=>e!==null&&typeof e=="object",M=e=>e!=null,ne=e=>typeof e=="function",Ft=e=>typeof e=="number"||/^\d+(\.\d+)?$/.test(e),ie=()=>kt?/ios|iphone|ipad|ipod/.test(navigator.userAgent.toLowerCase()):!1;function mt(e,t){const n=t.split(".");let i=e;return n.forEach(r=>{var s;i=lt(i)&&(s=i[r])!=null?s:""}),i}const x=[Number,String],D={type:Boolean,default:!0},nt=e=>({type:x,default:e}),Y=e=>({type:String,default:e});var T=typeof window<"u";function wt(e){return T?requestAnimationFrame(e):-1}function U(e){wt(()=>wt(e))}var re=e=>e===window,bt=(e,t)=>({top:0,left:0,right:e,bottom:t,width:e,height:t}),ct=e=>{const t=Q(e);if(re(t)){const n=t.innerWidth,i=t.innerHeight;return bt(n,i)}return t!=null&&t.getBoundingClientRect?t.getBoundingClientRect():bt(0,0)};function se(e){const t=ut(e,null);if(t){const n=tt(),{link:i,unlink:r,internalChildren:s}=t;i(n),It(()=>r(n));const l=y(()=>s.indexOf(n));return{parent:t,index:l}}return{parent:null,index:b(-1)}}function oe(e){const t=[],n=i=>{Array.isArray(i)&&i.forEach(r=>{var s;Qt(r)&&(t.push(r),(s=r.component)!=null&&s.subTree&&(t.push(r.component.subTree),n(r.component.subTree.children)),r.children&&n(r.children))})};return n(e),t}var Et=(e,t)=>{const n=e.indexOf(t);return n===-1?e.findIndex(i=>t.key!==void 0&&t.key!==null&&i.type===t.type&&i.key===t.key):n};function ae(e,t,n){const i=oe(e.subTree.children);n.sort((s,l)=>Et(i,s.vnode)-Et(i,l.vnode));const r=n.map(s=>s.proxy);t.sort((s,l)=>{const a=r.indexOf(s),d=r.indexOf(l);return a-d})}function ue(e){const t=W([]),n=W([]),i=tt();return{children:t,linkChildren:s=>{Zt(e,Object.assign({link:d=>{d.proxy&&(n.push(d),t.push(d.proxy),ae(i,t,n))},unlink:d=>{const h=n.indexOf(d);t.splice(h,1),n.splice(h,1)},children:t,internalChildren:n},s))}}}function le(e){let t;J(()=>{e(),C(()=>{t=!0})}),zt(()=>{t&&e()})}function ce(e,t,n={}){if(!T)return;const{target:i=window,passive:r=!1,capture:s=!1}=n;let l=!1,a;const d=o=>{if(l)return;const c=Q(o);c&&!a&&(c.addEventListener(e,t,{capture:s,passive:r}),a=!0)},h=o=>{if(l)return;const c=Q(o);c&&a&&(c.removeEventListener(e,t,s),a=!1)};It(()=>h(i)),Bt(()=>h(i)),le(()=>d(i));let u;return Gt(i)&&(u=I(i,(o,c)=>{h(c),d(o)})),()=>{u==null||u(),h(i),l=!0}}var q,it;function de(){if(!q&&(q=b(0),it=b(0),T)){const e=()=>{q.value=window.innerWidth,it.value=window.innerHeight};e(),window.addEventListener("resize",e,{passive:!0}),window.addEventListener("orientationchange",e,{passive:!0})}return{width:q,height:it}}var he=/scroll|auto|overlay/i,fe=T?window:void 0;function ve(e){return e.tagName!=="HTML"&&e.tagName!=="BODY"&&e.nodeType===1}function ge(e,t=fe){let n=e;for(;n&&n!==t&&ve(n);){const{overflowY:i}=window.getComputedStyle(n);if(he.test(i))return n;n=n.parentNode}return t}var G;function pe(){if(!G&&(G=b("visible"),T)){const e=()=>{G.value=document.hidden?"hidden":"visible"};e(),window.addEventListener("visibilitychange",e)}return G}ie();const me=e=>e.stopPropagation();function we(e,t){(typeof e.cancelable!="boolean"||e.cancelable)&&e.preventDefault(),t&&me(e)}function yt(e){const t=Q(e);if(!t)return!1;const n=window.getComputedStyle(t),i=n.display==="none",r=t.offsetParent===null&&n.position!=="fixed";return i||r}const{width:be,height:Ee}=de();function S(e){if(M(e))return Ft(e)?"".concat(e,"px"):String(e)}const ye=/-(\w)/g,Rt=e=>e.replace(ye,(t,n)=>n.toUpperCase()),rt=(e,t,n)=>Math.min(Math.max(e,t),n),{hasOwnProperty:Le}=Object.prototype;function Ae(e,t,n){const i=t[n];M(i)&&(!Le.call(e,n)||!lt(i)?e[n]=i:e[n]=Ht(Object(e[n]),i))}function Ht(e,t){return Object.keys(t).forEach(n=>{Ae(e,t,n)}),e}var $e={name:"å§å",tel:"çµè¯",save:"ä¿å",clear:"æ¸
空",cancel:"åæ¶",confirm:"确认",delete:"å é¤",loading:"å è½½ä¸...",noCoupon:"ææ ä¼æ å¸",nameEmpty:"请填åå§å",addContact:"æ·»å è系人",telInvalid:"è¯·å¡«åæ£ç¡®ççµè¯",vanCalendar:{end:"ç»æ",start:"å¼å§",title:"æ¥æéæ©",weekdays:["æ¥","ä¸","äº","ä¸","å","äº","å
"],monthTitle:(e,t)=>
1"".concat(e,"å¹´").concat(t,"æ"),rangePrompt:e=>"æå¤éæ© ".concat(e," 天")},vanCascader:{select:"è¯·éæ©"},vanPagination:{prev:"ä¸ä¸é¡µ",next:"ä¸ä¸é¡µ"},vanPullRefresh:{pulling:"䏿å³å¯å·æ°...",loosing:"éæ¾å³å¯å·æ°..."},vanSubmitBar:{label:"å计:"},vanCoupon:{unlimited:"æ 鍿§",discount:e=>"".concat(e,"æ"),condition:e=>"满".concat(e,"å
å¯ç¨")},vanCouponCell:{title:"伿 å¸",count:e=>"".concat(e,"å¼ å¯ç¨")},vanCouponList:{exchange:"å
æ¢",close:"ä¸ä½¿ç¨",enable:"å¯ç¨",disabled:"ä¸å¯ç¨",placeholder:"è¾å
¥ä¼æ ç "},vanAddressEdit:{area:"å°åº",areaEmpty:"è¯·éæ©å°åº",addressEmpty:"请填å详ç»å°å",addressDetail:"详ç»å°å",defaultAddress:"设为é»è®¤æ¶è´§å°å"},vanAddressList:{add:"æ°å¢å°å"}};const Lt=b("zh-CN"),At=W({"zh-CN":$e}),xe={messages(){return At[Lt.value]},use(e,t){Lt.value=e,this.add({[e]:t})},add(e={}){Ht(At,e)}};var Te=xe;function Se(e){const t=Rt(e)+".";return(n,...i)=>{const r=Te.messages(),s=mt(r,t+n)||mt(r,n);return ne(s)?s(...i):s}}function ot(e,t){return t?typeof t=="string"?" ".concat(e,"--").concat(t):Array.isArray(t)?t.reduce((n,i)=>n+ot(e,i),""):Object.keys(t).reduce((n,i)=>n+(t[i]?ot(e,i):""),""):""}function Ce(e){return(t,n)=>(t&&typeof t!="string"&&(n=t,t=""),t=t?"".concat(e,"__").concat(t):e,"".concat(t).concat(ot(t,n)))}function k(e){const t="van-".concat(e);return[t,Ce(t),Se(t)]}const $t=5;function X(e){return e.install=t=>{const{name:n}=e;n&&(t.component(n,e),t.component(Rt("-".concat(n)),e))},e}const Oe=Symbol();function Ie(e){const t=ut(Oe,null);t&&I(t,n=>{n&&e()})}function Nt(e){const t=tt();t&&ee(t.proxy,e)}const[Be,xt]=k("badge"),ze={dot:Boolean,max:x,tag:Y("div"),color:String,offset:Array,content:x,showZero:D,position:Y("top-right")};var De=j({name:Be,props:ze,setup(e,{slots:t}){const n=()=>
1{if(t.content)return!0;const{content:a,showZero:d}=e;return M(a)&&a!==""&&(d||a!==0&&a!=="0")},i=()=>{const{dot:a,max:d,content:h}=e;if(!a&&n())return t.content?t.content():M(d)&&Ft(h)&&+h>+d?"".concat(d,"+"):h},r=a=>a.startsWith("-")?a.replace("-",""):"-".concat(a),s=y(()=>{const a={background:e.color};if(e.offset){const[d,h]=e.offset,{position:u}=e,[o,c]=u.split("-");t.default?(typeof h=="number"?a[o]=S(o==="top"?h:-h):a[o]=o==="top"?S(h):r(h),typeof d=="number"?a[c]=S(c==="left"?d:-d):a[c]=c==="left"?S(d):r(d)):(a.marginTop=S(h),a.marginLeft=S(d))}return a}),l=()=>{if(n()||e.dot)return L("div",{class:xt([e.position,{dot:e.dot,fixed:!!t.default}]),style:s.value},[i()])};return()=>{if(t.default){const{tag:a}=e;return L(a,{class:xt("wrapper")},{default:()=>[t.default(),l()]})}return l()}}});const Pe=X(De),[_e]=k("config-provider"),ke=Symbol(_e),[Fe,Tt]=k("icon"),Re=e=>e==null?void 0:e.includes("/"),He={dot:Boolean,tag:Y("i"),name:String,size:x,badge:x,color:String,badgeProps:Object,classPrefix:String};var Ne=j({name:Fe,props:He,setup(e,{slots:t}){const n=ut(ke,null),i=y(()=>e.classPrefix||(n==null?void 0:n.iconPrefix)||Tt());return()=>{const{tag:r,dot:s,name:l,size:a,badge:d,color:h}=e,u=Re(l);return L(Pe,st({dot:s,tag:r,class:[i.value,u?"":"".concat(i.value,"-").concat(l)],style:{color:h,fontSize:S(a)},content:d},e.badgeProps),{default:()=>{var o;return[(o=t.default)==null?void 0:o.call(t),u&&L("img",{class:Tt("image"),src:l},null)]}})}}});const We=X(Ne);function Me(e,t){return e>t?"horizontal":t>e?"vertical":""}function Ye(){const e=b(0),t=b(0),n=b(0),i=b(0),r=b(0),s=b(0),l=b(""),a=b(!0),d=()=>l.value==="vertical",h=()=>l.value==="horizontal",u=()=>{n.value=0,i.value=0,r.value=0,s.value=0,l.value="",a.value=!0};return{move:g=>{const p=g.touches[0];n.value=(p.clientX<0?0:p.clientX)-e.value,i.value=p.clientY-t.value,r.value=Math.abs(n.value),s.value=Math.abs(i.value);const E=10;(!l.value||r.value<E&&s.value<E)&&(l.value=Me(r.value,s.value)),a.value&&(r.value>$t||s.value>$t)&&(a.value=!1)},start:g=>{u(),e.value=g.touches[0].clientX,t.value=g.touches[0].clientY},reset:u,startX:e,startY:t,deltaX:n,deltaY:i,offsetX:r,offsetY:s,direction:l,isVertical:d,isHorizontal:h,isTap:a}}const[Wt,Z]=k("swipe"),je={loop:D,width:x,height:x,vertical:Boolean,autoplay:nt(0),duration:nt(500),touchable:D,lazyRender:Boolean,initialSwipe:nt(0),indicatorColor:String,showIndicators:D,stopPropagation:D},Mt=Symbol(Wt);var Xe=j({name:Wt,props:je,emits:["change","dragStart","dragEnd"],setup(e,{emit:t,slots:n}){const i=b(),r=b(),s=W({rect:null,width:0,height:0,offset:0,active:0,swiping:!1});let l=!1;const a=Ye(),{children:d,linkChildren:h}=ue(Mt),u=y(()=>d.length),o=y(()=>s[e.vertical?"height":"width"]),c=y(()=>e.vertical?a.deltaY.value:a.deltaX.value),g=y(()=>s.rect?(e.vertical?s.rect.height:s.rect.width)-o.value*u.value:0),p=y(()=>o.value?Math.ceil(Math.abs(g.value)/o.value):u.value),E=y(()=>u.value*o.value),v=y(()=>(s.active+u.value)%u.value),B=y(()=>{const f=e.vertical?"vertical":"horizontal";return a.direction.value===f}),K=y(()=>{const f={transitionDuration:"".concat(s.swiping?0:e.duration,"ms"),transform:"translate".concat(e.vertical?"Y":"X","(").concat(+s.offset.toFixed(2),"px)")};if(o.value){const w=e.vertical?"height":"width",m=e.vertical?"width":"height";f[w]="".concat(E.value,"px"),f[m]=e[m]?"".concat(e[m],"px"):""}return f}),Yt=f=>{const{active:w}=s;return f?e.loop?rt(w+f,-1,u.value):rt(w+f,0,p.value):w},dt=(f,w=0)=>{let m=f*o.value;e.loop||(m=Math.min(m,-g.value));let $=w-m;return e.loop||($=rt($,g.value,0)),$},O=({pace:f=0,offset:w=0,emitChange:m})=>{if(u.value<=1)return;const{active:$}=s,A=Yt(f),H=dt(A,w);if(e.loop){if(d[0]&&H!==g.value){const et=H<g.value;d[0].setOffset(et?E.value:0)}if(d[u.value-1]&&H!==0){const et=H>0;d[u.value-1].setOffset(et?-E.value:0)}}s.active=A,s.offset=H,m&&A!==$&&t("change",v.value)},V=()=>{s.swiping=!0,s.active<=-1?O({pace:u.value}):s.active>=u.value&&O({pace:-u.value})},jt=()=>{V(),a.reset(),U(()=>{s.swiping=!1,O({pace:-1,emitChange:!0})})},ht=()=>{V(),a.reset(),U(()=>{s.swiping=!1,O({pace:1,emitChange:!0})})};let ft;const F=()=>clearTimeout(ft),R=()=>{F(),+e.autoplay>0&&u.value>1&&(ft=setTimeout(()=>{ht(),R()},+e.autoplay))},P=(f=+e.initialSwipe)=>{if(!i.value)return;const w=()=>{var m,$;if(!yt(i)){const A={width:i.value.offsetWidth,height:i.value.offsetHeight};s.rect=A,s.width=+((m=e.width)!=null?m:A.width),s.height=+(($=e.height)!=null?$:A.height)}u.value&&(f=Math.min(u.value-1,f),f===-1&&(f=u.value-1)),s.active=f,s.swiping=!0,s.offset=dt(f),d.forEach(A=>{A.setOffset(0)}),R()};yt(i)?C().then(w):w()},vt=()=>P(s.active);let gt;const Xt=f=>{!e.touchable||f.touches.length>1||(a.start(f),l=!1,gt=Date.now(),F(),V())},Kt=f=>{e.touchable&&s.swiping&&(a.move(f),B.value&&(!e.loop&&(s.active===0&&c.value>0||s.active===u.value-1&&c.value<0)||(we(f,e.stopPropagation),O({offset:c.value}),l||(t("dragStart",{index:v.value}),l=!0))))},pt=()=>{if(!e.touchable||!s.swiping)return;const f=Date.now()-gt,w=c.value/f;if((Math.abs(w)>.25||Math.abs(c.value)>o.value/2)&&B.value){const $=e.vertical?a.offsetY.value:a.offsetX.value;let A=0;e.loop?A=$>0?c.value>0?-1:1:0:A=-Math[c.value>0?"ceil":"floor"](c.value/o.value),O({pace:A,emitChange:!0})}else c.value&&O({pace:0});l=!1,s.swiping=!1,t("dragEnd",{index:v.value}),R()},Vt=(f,w={})=>{V(),a.reset(),U(()=>{let m;e.loop&&f===u.value?m=s.active===0?0:f:m=f%u.value,w.immediate?U(()=>{s.swiping=!1}):s.swiping=!1,O({pace:m-s.active,emitChange:!0})})},Ut=(f,w)=>{const m=w===v.value,$=m?{backgroundColor:e.indicatorColor}:void 0;return L("i",{style:$,class:Z("indicator",{active:m})},null)},qt=()=>{if(n.indicator)return n.indicator({active:v.value,total:u.value});if(e.showIndicators&&u.value>1)return L("div",{class:Z("indicators",{vertical:e.vertical})},[Array(u.value).fill("").map(Ut)])};return Nt({prev:jt,next:ht,state:s,resize:vt,swipeTo:Vt}),h({size:o,props:e,count:u,activeIndicator:v}),I(()=>e.initialSwipe,f=>P(+f)),I(u,()=>P(s.active)),I(()=>e.autoplay,R),I([be,Ee,()=>
1e.width,()=>e.height],vt),I(pe(),f=>{f==="visible"?R():F()}),J(P),zt(()=>P(s.active)),Ie(()=>P(s.active)),Bt(F),Dt(F),ce("touchmove",Kt,{target:r}),()=>{var f;return L("div",{ref:i,class:Z()},[L("div",{ref:r,style:K.value,class:Z("track",{vertical:e.vertical}),onTouchstartPassive:Xt,onTouchend:pt,onTouchcancel:pt},[(f=n.default)==null?void 0:f.call(n)]),qt()])}}});const gn=X(Xe),[Ke,Ve]=k("swipe-item");var Ue=j({name:Ke,setup(e,{slots:t}){let n;const i=W({offset:0,inited:!1,mounted:!1}),{parent:r,index:s}=se(Mt);if(!r)return;const l=y(()=>{const h={},{vertical:u}=r.props;return r.size.value&&(h[u?"height":"width"]="".concat(r.size.value,"px")),i.offset&&(h.transform="translate".concat(u?"Y":"X","(").concat(i.offset,"px)")),h}),a=y(()=>{const{loop:h,lazyRender:u}=r.props;if(!u||n)return!0;if(!i.mounted)return!1;const o=r.activeIndicator.value,c=r.count.value-1,g=o===0&&h?c:o-1,p=o===c&&h?0:o+1;return n=s.value===o||s.value===g||s.value===p,n}),d=h=>{i.offset=h};return J(()=>{C(()=>{i.mounted=!0})}),Nt({setOffset:d}),()=>{var h;return L("div",{class:Ve(),style:l.value},[a.value?(h=t.default)==null?void 0:h.call(t):null])}}});const pn=X(Ue),St=T&&"IntersectionObserver"in window&&"IntersectionObserverEntry"in window&&"intersectionRatio"in window.IntersectionObserverEntry.prototype,z={event:"event",observer:"observer"};function N(e,t){if(!e.length)return;const n=e.indexOf(t);if(n>-1)return e.splice(n,1)}function Ct(e,t){if(e.tagName!=="IMG"||!e.getAttribute("data-srcset"))return;let n=e.getAttribute("data-srcset");const r=e.parentNode.offsetWidth*t;let s,l,a;n=n.trim().split(",");const d=n.map(o=>(o=o.trim(),s=o.lastIndexOf(" "),s===-1?(l=o,a=999998):(l=o.substr(0,s),a=parseInt(o.substr(s+1,o.length-s-2),10)),[a,l]));d.sort((o,c)=>{if(o[0]<c[0])return 1;if(o[0]>c[0])return-1;if(o[0]===c[0]){if(c[1].indexOf(".webp",c[1].length-5)!==-1)return 1;if(o[1].indexOf(".webp",o[1].length-5)!==-1)return-1}return 0});let h="",u;for(let o=0;o<d.length;o++){u=d[o],h=u[1];const c=d[o+1];if(c&&c[0]<r){h=u[1];break}else if(!c){h=u[1];break}}return h}const qe=(e=1)=>T&&window.devicePixelRatio||e;function Ge(){if(!T)return!1;let e=!0;try{const t=document.createElement("canvas");t.getContext&&t.getContext("2d")&&(e=t.toDataURL("image/webp").indexOf("data:image/webp")===0)}catch(t){e=!1}return e}function Ze(e,t){let n=null,i=0;return function(...r){if(n)return;const s=Date.now()-i,l=()=>{i=Date.now(),n=!1,e.apply(this,r)};s>=t?l():n=setTimeout(l,t)}}function Qe(e,t,n){e.addEventListener(t,n,{capture:!1,passive:!0})}function Je(e,t,n){e.removeEventListener(t,n,!1)}const at=(e,t,n)=>{const i=new Image;if(!e||!e.src)return n(new Error("image src is required"));i.src=e.src,e.cors&&(i.crossOrigin=e.cors),i.onload=()=>t({naturalHeight:i.naturalHeight,naturalWidth:i.naturalWidth,src:i.src}),i.onerror=r=>n(r)};class tn{constructor({max:t}){this.options={max:t||100},this.caches=[]}has(t){return this.caches.indexOf(t)>-1}add(t){this.has(t)||(this.caches.push(t),this.caches.length>this.options.max&&this.free())}free(){this.caches.shift()}}const[en,_]=k("image"),nn={src:String,alt:String,fit:String,position:String,round:Boolean,block:Boolean,width:x,height:x,radius:x,lazyLoad:Boolean,iconSize:x,showError:D,errorIcon:Y("photo-fail"),iconPrefix:String,showLoading:D,loadingIcon:Y("photo"),crossorigin:String,referrerpolicy:String};var rn=j({name:en,props:nn,emits:["load","error"],setup(e,{emit:t,slots:n}){const i=b(!1),r=b(!0),s=b(),{$Lazyload:l}=tt().proxy,a=y(()=>{const v={width:S(e.width),height:S(e.height)};return M(e.radius)&&(v.overflow="hidden",v.borderRadius=S(e.radius)),v});I(()=>e.src,()=>{i.value=!1,r.value=!0});const d=v=>{r.value&&(r.value=!1,t("load",v))},h=()=>{const v=new Event("load");Object.defineProperty(v,"target",{value:s.value,enumerable:!0}),d(v)},u=v=>{i.value=!0,r.value=!1,t("error",v)},o=(v,B,K)=>K?K():L(We,{name:v,size:e.iconSize,class:B,classPrefix:e.iconPrefix},null),c=()=>{if(r.value&&e.showLoading)return L("div",{class:_("loading")},[o(e.loadingIcon,_("loading-icon"),n.loading)]);if(i.value&&e.showError)return L("div",{class:_("error")},[o(e.errorIcon,_("error-icon"),n.error)])},g=()=>{if(i.value||!e.src)return;const v={alt:e.alt,class:_("img"),style:{objectFit:e.fit,objectPosition:e.position},crossorigin:e.crossorigin,referrerpolicy:e.referrerpolicy};return e.lazyLoad?Jt(L("img",st({ref:s},v),null),[[te("lazy"),e.src]]):L("img",st({ref:s,src:e.src,onLoad:d,onError:u},v),null)},p=({el:v})=>{const B=()=>{v===s.value&&r.value&&h()};s.value?B():C(B)},E=({el:v})=>{v===s.value&&!i.value&&u()};
1return l&&kt&&(l.$on("loaded",p),l.$on("error",E),Dt(()=>{l.$off("loaded",p),l.$off("error",E)})),J(()=>{C(()=>{var v;(v=s.value)!=null&&v.complete&&!e.lazyLoad&&h()})}),()=>{var v;return L("div",{class:_({round:e.round,block:e.block}),style:a.value},[g(),c(),(v=n.default)==null?void 0:v.call(n)])}}});const mn=X(rn);class sn{constructor({el:t,src:n,error:i,loading:r,bindType:s,$parent:l,options:a,cors:d,elRenderer:h,imageCache:u}){this.el=t,this.src=n,this.error=i,this.loading=r,this.bindType=s,this.attempt=0,this.cors=d,this.naturalHeight=0,this.naturalWidth=0,this.options=a,this.$parent=l,this.elRenderer=h,this.imageCache=u,this.performanceData={loadStart:0,loadEnd:0},this.filter(),this.initState(),this.render("loading",!1)}initState(){"dataset"in this.el?this.el.dataset.src=this.src:this.el.setAttribute("data-src",this.src),this.state={loading:!1,error:!1,loaded:!1,rendered:!1}}record(t){this.performanceData[t]=Date.now()}update({src:t,loading:n,error:i}){const r=this.src;this.src=t,this.loading=n,this.error=i,this.filter(),r!==this.src&&(this.attempt=0,this.initState())}checkInView(){const t=ct(this.el);return t.top<window.innerHeight*this.options.preLoad&&t.bottom>this.options.preLoadTop&&t.left<window.innerWidth*this.options.preLoad&&t.right>0}filter(){Object.keys(this.options.filter).forEach(t=>{this.options.filter[t](this,this.options)})}renderLoading(t){this.state.loading=!0,at({src:this.loading,cors:this.cors},()=>{this.render("loading",!1),this.state.loading=!1,t()},()=>{t(),this.state.loading=!1})}load(t=_t){if(this.attempt>this.options.attempt-1&&this.state.error){t();return}if(!(this.state.rendered&&this.state.loaded)){if(this.imageCache.has(this.src))return this.state.loaded=!0,this.render("loaded",!0),this.state.rendered=!0,t();this.renderLoading(()=>{var n,i;this.attempt++,(i=(n=this.options.adapter).beforeLoad)==null||i.call(n,this,this.options),this.record("loadStart"),at({src:this.src,c
1ors:this.cors},r=>{this.naturalHeight=r.naturalHeight,this.naturalWidth=r.naturalWidth,this.state.loaded=!0,this.state.error=!1,this.record("loadEnd"),this.render("loaded",!1),this.state.rendered=!0,this.imageCache.add(this.src),t()},r=>{!this.options.silent&&console.error(r),this.state.error=!0,this.state.loaded=!1,this.render("error",!1)})})}}render(t,n){this.elRenderer(this,t,n)}performance(){let t="loading",n=0;return this.state.loaded&&(t="loaded",n=(this.performanceData.loadEnd-this.performanceData.loadStart)/1e3),this.state.error&&(t="error"),{src:this.src,state:t,time:n}}$destroy(){this.el=null,this.src=null,this.error=null,this.loading=null,this.bindType=null,this.attempt=0}}const Ot="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7",on=["scroll","wheel","mousewheel","resize","animationend","transitionend","touchmove"],an={rootMargin:"0px",threshold:0};function un(){return class{constructor({preLoad:t,error:n,throttleWait:i,preLoadTop:r,dispatchEvent:s,loading:l,attempt:a,silent:d=!0,scale:h,listenEvents:u,filter:o,adapter:c,observer:g,observerOptions:p}){this.mode=z.event,this.listeners=[],this.targetIndex=0,this.targets=[],this.options={silent:d,dispatchEvent:!!s,throttleWait:i||200,preLoad:t||1.3,preLoadTop:r||0,error:n||Ot,loading:l||Ot,attempt:a||3,scale:h||qe(h),ListenEvents:u||on,supportWebp:Ge(),filter:o||{},adapter:c||{},observer:!!g,observerOptions:p||an},this.initEvent(),this.imageCache=new tn({max:200}),this.lazyLoadHandler=Ze(this.lazyLoadHandler.bind(this),this.options.throttleWait),this.setMode(this.options.observer?z.observer:z.event)}config(t={}){Object.assign(this.options,t)}performance(){return this.listeners.map(t=>t.performance())}addLazyBox(t){this.listeners.push(t),T&&(this.addListenerTarget(window),this.observer&&this.observer.observe(t.el),t.$el&&t.$el.parentNode&&this.addListenerTarget(t.$el.parentNode))}add(t,n,i){if(this.listeners.some(l=>l.el===t))return this.update(t,n),C(this.lazyLoadHandler);const r=this.valueFormatter(n.value);let{src:s}=r;C(()=>{s=Ct(t,this.options.scale)||s,this.observer&&this.observer.observe(t);const l=Object.keys(n.modifiers)[0];let a;l&&(a=i.context.$refs[l],a=a?a.$el||a:document.getElementById(l)),a||(a=ge(t));const d=new sn({bindType:n.arg,$parent:a,el:t,src:s,loading:r.loading,error:r.error,cors:r.cors,elRenderer:this.elRenderer.bind(this),options:this.options,imageCache:this.imageCache});this.listeners.push(d),T&&(this.addListenerTarget(window),this.addListenerTarget(a)),this.lazyLoadHandler(),C(()=>this.lazyLoadHandler())})}update(t,n,i){const r=this.valueFormatter(n.value);let{src:s}=r;s=Ct(t,this.options.scale)||s;const l=this.listeners.find(a=>a.el===t);l?l.update({src:s,error:r.error,loading:r.loading}):this.add(t,n,i),this.observer&&(this.observer.unobserve(t),this.observer.observe(t)),this.lazyLoadHandler(),C(()=>this.lazyLoadHandler())}remove(t){if(!t)return;this.observer&&this.observer.unobserve(t);const n=this.listeners.find(i=>i.el===t);n&&(this.removeListenerTarget(n.$parent),this.removeListenerTarget(window),N(this.listeners,n),n.$destroy())}removeComponent(t){t&&(N(this.listeners,t),this.observer&&this.observer.unobserve(t.el),t.$parent&&t.$el.parentNode&&this.removeListenerTarget(t.$el.parentNode),this.removeListenerTarget(window))}setMode(t){!St&&t===z.observer&&(t=z.event),this.mode=t,t===z.event?(this.observer&&(this.listeners.forEach(n=>{this.observer.unobserve(n.el)}),this.observer=null),this.targets.forEach(n=>{this.initListen(n.el,!0)})):(this.targets.forEach(n=>{this.initListen(n.el,!1)}),this.initIntersectionObserver())}addListenerTarget(t){if(!t)return;let n=this.targets.find(i=>i.el===t);return n?n.childrenCount++:(n={el:t,id:++this.targetIndex,childrenCount:1,listened:!0},this.mode===z.event&&this.initListen(n.el,!0),this.targets.push(n)),this.targetIndex}removeListenerTarget(t){this.targets.forEach((n,i)=>{n.el===t&&(n.childrenCount--,n.childrenCount||(this.initListen(n.el,!1),this.targets.splice(i,1),n=null))})}initListen(t,n){this.options.ListenEvents.forEach(i=>(n?Qe:Je)(t,i,this.lazyLoadHandler))}initEvent(){this.Event={listeners:{loading:[],loaded:[],error:[]}},this.$on=(t,n)=>{this.Event.listeners[t]||(this.Event.listeners[t]=[]),this.Event.listeners[t].push(n)},this.$once=(t,n)=>{const i=(...r)=>{this.$off(t,i),n.apply(this,r)};this.$on(t,i)},this.$off=(t,n)=>
1{if(!n){if(!this.Event.listeners[t])return;this.Event.listeners[t].length=0;return}N(this.Event.listeners[t],n)},this.$emit=(t,n,i)=>{this.Event.listeners[t]&&this.Event.listeners[t].forEach(r=>r(n,i))}}lazyLoadHandler(){const t=[];this.listeners.forEach(n=>{(!n.el||!n.el.parentNode)&&t.push(n),n.checkInView()&&n.load()}),t.forEach(n=>{N(this.listeners,n),n.$destroy()})}initIntersectionObserver(){St&&(this.observer=new IntersectionObserver(this.observerHandler.bind(this),this.options.observerOptions),this.listeners.length&&this.listeners.forEach(t=>{this.observer.observe(t.el)}))}observerHandler(t){t.forEach(n=>{n.isIntersecting&&this.listeners.forEach(i=>{if(i.el===n.target){if(i.state.loaded)return this.observer.unobserve(i.el);i.load()}})})}elRenderer(t,n,i){if(!t.el)return;const{el:r,bindType:s}=t;let l;switch(n){case"loading":l=t.loading;break;case"error":l=t.error;break;default:({src:l}=t);break}if(s?r.style[s]='url("'+l+'")':r.getAttribute("src")!==l&&r.setAttribute("src",l),r.setAttribute("lazy",n),this.$emit(n,t,i),this.options.adapter[n]&&this.options.adapter[n](t,this.options),this.options.dispatchEvent){const a=new CustomEvent(n,{detail:t});r.dispatchEvent(a)}}valueFormatter(t){let n=t,{loading:i,error:r}=this.options;return lt(t)&&({src:n}=t,i=t.loading||this.options.loading,r=t.error||this.options.error),{src:n,loading:i,error:r}}}}var ln=e=>({props:{tag:{type:String,default:"div"}},emits:["show"],render(){return Pt(this.tag,this.show&&this.$slots.default?this.$slots.default():null)},data(){return{el:null,state:{loaded:!1},show:!1}},mounted(){this.el=this.$el,e.addLazyBox(this),e.lazyLoadHandler()},beforeUnmount(){e.removeComponent(this)},methods:{checkInView(){const t=ct(this.$el);return T&&t.top<window.innerHeight*e.options.preLoad&&t.bottom>0&&t.left<window.innerWidth*e.options.preLoad&&t.right>0},load(){this.show=!0,this.state.loaded=!0,this.$emit("show",this)},destroy(){return this.$destroy}}});const cn={selector:"img"};class dn{constructor({el:t,binding:n,vnode:i,lazy:r}){this.el=null,this.vnode=i,this.binding=n,this.options={},this.lazy=r,this.queue=[],this.update({el:t,binding:n})}update({el:t,binding:n}){this.el=t,this.options=Object.assign({},cn,n.value),this.getImgs().forEach(r=>{this.lazy.add(r,Object.assign({},this.binding,{value:{src:"dataset"in r?r.dataset.src:r.getAttribute("data-src"),error:("dataset"in r?r.dataset.error:r.getAttribute("data-error"))||this.options.error,loading:("dataset"in r?r.dataset.loading:r.getAttribute("data-loading"))||this.options.loading}}),this.vnode)})}getImgs(){return Array.from(this.el.querySelectorAll(this.options.selector))}clear(){this.getImgs().forEach(n=>this.lazy.remove(n)),this.vnode=null,this.binding=null,this.lazy=null}}class hn{constructor({lazy:t}){this.lazy=t,this.queue=[]}bind(t,n,i){const r=new dn({el:t,binding:n,vnode:i,lazy:this.lazy});this.queue.push(r)}update(t,n,i){const r=this.queue.find(s=>s.el===t);r&&r.update({el:t,binding:n,vnode:i})}unbind(t){const n=this.queue.find(i=>i.el===t);n&&(n.clear(),N(this.queue,n))}}var fn=e=>({props:{src:[String,Object],tag:{type:String,default:"img"}},render(){var t,n;return Pt(this.tag,{src:this.renderSrc},(n=(t=this.$slots).default)==null?void 0:n.call(t))},data(){return{el:null,options:{src:"",error:"",loading:"",attempt:e.options.attempt},state:{loaded:!1,error:!1,attempt:0},renderSrc:""}},watch:{src(){this.init(),e.addLazyBox(this),e.lazyLoadHandler()}},created(){this.init()},mounted(){this.el=this.$el,e.addLazyBox(this),e.lazyLoadHandler()},beforeUnmount(){e.removeComponent(this)},methods:{init(){const{src:t,loading:n,error:i}=e.valueFormatter(this.src);this.state.loaded=!1,this.options.src=t,this.options.error=i,this.options.loading=n,this.renderSrc=this.options.loading},checkInView(){const t=ct(this.$el);return t.top<window.innerHeight*e.options.preLoad&&t.bottom>0&&t.left<window.innerWidth*e.options.preLoad&&t.right>0},load(t=_t){if(this.state.attempt>this.options.attempt-1&&this.state.error){t();return}const{src:n}=this.options;at({src:n},({src:i})=>{this.renderSrc=i,this.state.loaded=!0},()=>{this.state.attempt++,this.renderSrc=this.options.error,this.state.error=!0})}}});const bn={install(e,t={}){const n=un(),i=new n(t),r=new hn({lazy:i});e.config.globalProperties.$Lazyload=i,t.lazyComponent&&e.component("LazyComponent",ln(i)),t.lazyImage&&e.component("LazyImage",fn(i)),e.directive("lazy",{beforeMount:i.add.bind(i),updated:i.update.bind(i),unmounted:i.remove.bind(i)}),e.directive("lazy-container",{beforeMount:r.bind.bind(r),updated:r.update.bind(r),unmounted:r.unbind.bind(r)})}};(function(){if(typeof window>"u")return;var e,t="ontouchstart"in window;document.createTouch||(document.createTouch=function(u,o,c,g,p,E,v){return new n(o,c,{pageX:g,pageY:p,screenX:E,screenY:v,clientX:g-window.pageXOffset,clientY:p-window.pageYOffset},0,0)}),document.createTouchList||(document.createTouchList=function(){for(var u=i(),o=0;o<arguments.length;o++)u[o]=arguments[o];return u.length=arguments.length,u}),Element.prototype.matches||(Element.prototype.matches=Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector),Element.prototype.closest||(Element.prototype.closest=function(u){var o=this;do{if(o.matches(u))return o;o=o.parentElement||o.parentNode}while(o!==null&&o.nodeType===1);return null});var n=function(o,c,g,p,E){p=p||0,E=E||0,this.identifier=c,this.target=o,this.clientX=g.clientX+p,this.clientY=g.clientY+E,this.screenX=g.screenX+p,this.screenY=g.screenY+E,this.pageX=g.pageX+p,this.pageY=g.pageY+E};function i(){var u=[];return u.item=function(o){return this[o]||null},u.identifiedTouch=function(o){return this[o+1]||null},u}var r=!1;function s(u){return function(o){o.type==="mousedown"&&(r=!0),o.type==="mouseup"&&(r=!1),!(o.type==="mousemove"&&!r)&&((o.type==="mousedown"||!e||e&&!e.dis
1patchEvent)&&(e=o.target),e.closest("[data-no-touch-simulate]")==null&&l(u,o),o.type==="mouseup"&&(e=null))}}function l(u,o){var c=document.createEvent("Event");c.initEvent(u,!0,!0),c.altKey=o.altKey,c.ctrlKey=o.ctrlKey,c.metaKey=o.metaKey,c.shiftKey=o.shiftKey,c.touches=d(o),c.targetTouches=d(o),c.changedTouches=a(o),e.dispatchEvent(c)}function a(u){var o=i();return o.push(new n(e,1,u,0,0)),o}function d(u){return u.type==="mouseup"?i():a(u)}function h(){window.addEventListener("mousedown",s("touchstart"),!0),window.addEventListener("mousemove",s("touchmove"),!0),window.addEventListener("mouseup",s("touchend"),!0)}h.multiTouchOffset=75,t||new h})();export{mn as I,bn as L,pn as S,gn as a};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.