PageSourceSearch

https://cndukstore.com/assets/TmlInfiniteScrollContainer.b38c0a0b.js

js cndukstore.com collected 2026-10-08 07:22:28 UTC 3,159 bytes, 2 lines download raw bytes

1import{S as d}from"./store.0dea434a.js";import{_ as g,aV as y}from"./index.12fd6615.js";import{N as f,_ as x,$ as V,D as o,E as h,G as s,H as l,Q as r,F as C,a2 as P,f as S,O as _,a5 as I}from"./vue.e6b86939.js";import"./sentry.09480738.js";const K={name:"TmlInfiniteScrollContainer",components:{TmlSpinner:y},mixins:[d],props:{contentStreamMethod:{type:Function,required:!0},contentStreamCallback:{type:Function,required:!1},itemClassList:{type:[String,Object]},code:{type:String,required:!0},cacheKey:{type:String},parentItems:{type:Array},clearStateOnDestroy:{type:Boolean}},data(){return{items:[],hasReachedEnd:!1,page:0,requestInProgress:!1,encounteredError:!1}},watch:{cacheKey(){this.page=this.getVuexProperty(this.getVuexKey("page"),0),this.items=this.getVuexProperty(this.getVuexKey("items"),[]),this.hasReachedEnd=!1,this.items.length||this.getAdditionalContent()},requestInProgress(e){this.$emit("request-in-progress",e)},parentItems(){this.parentItems!==this.items&&(this.items=this.parentItems)}},mounted(){this.registerVuexModule(!1,`infiniScroll:${this.code}`,!1,{unregisterOnDeath:this.clearStateOnDestroy}),this.page=this.getVuexProperty(this.getVuexKey("page"),this.page),this.items=this.getVuexProperty(this.getVuexKey("items"),this.items),this.items.length||this.getAdditionalContent()},beforeUnmount(){this.setVuexProperty("cacheKey",this.cacheKey),this.setVuexProperty(this.getVuexKey("page"),1)},methods:{getVuexKey(e){return this.cacheKey?`${this.cacheKey}/${e}`:e},getAdditionalContent(){!this.hasReachedEnd&&!this.requestInProgress&&(this.requestInProgress=!0,this.contentStreamMethod(this.page).then(e=>{this.page+=1,e.data.length?(this.items=this.items.concat(e.data),this.page===1&&(this.setVuexProperty(this.getVuexKey("page"),this.page),this.setVuexProperty(this.getVuexKey("items"),this.items)),this.$emit("infinite-loaded",{items:this.items,page:this.page})):this.hasReachedEnd=!0,this.contentStreamCallback&&this.contentStreamCallback(e),this.encounteredError=!1}).handle(["4xx","5xx"],e=>{this.encounteredError=!0}).finally(()=>{this.requestInProgress=!1}))},showPrepend(){return this.$slots.prepend},showAppend(){return this.$slots.append},tryAgain(){this.getAdditionalContent()}}},A={key:0,class:"spinner-container"};function E(e,c,n,q,t,i){const m=f("tml-spinner"),u=x("infiniscroll");return V((o(),h("div",{class:"infini-scroller",onInfiniscroll:c[0]||(c[0]=(...a)=>i.getAdditionalContent&&i.getAdditionalContent(...a))},[s(e.$slots,"body",{items:t.items},()=>[i.showPrepend()?s(e.$slots,"prepend",{key:0,class:l(n.itemClassList)}):r("",!0),(o(!0),h(C,null,P(t.items,(a,p)=>s(e.$slots,"default",{item:a,index:p,class:l(n.itemClassList)})),256)),i.showAppend()?s(e.$slots,"append",{key:1,class:l(n.itemClassList)}):r("",!0)]),t.requestInProgress?(o(),h("div",A,[S(m,{"align-center":!t.items.length},null,8,["align-center"])])):r("",!0),t.hasReachedEnd&&!t.items.length?s(e.$slots,"empty",{key:1}):r("",!0),t.encounteredError?s(e.$slots,"error",_(I({key:2},{tryAgain:i.tryAgain}))):r("",!0)],32)),[[u,700]])}const D=g(K,[["render",E]]);export{D as default};
2//# sourceMappingURL=TmlInfiniteScrollContainer.b38c0a0b.js.map

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.