PageSourceSearch

https://lifehacker.ru/_nuxt/v7.12-ggPUr9Ky.js

js lifehacker.ru collected 2026-09-24 08:28:02 UTC 4,071 bytes, 2 lines download raw bytes

1import{b1 as b,eA as v,cH as w,aU as r,aV as p,aP as s,aX as h,aO as k,aT as f,aW as g,aY as c,b4 as P,b5 as y,bw as L,bC as N,b0 as $}from"./v7.12-zCVthbrt.js";const B=b({name:"ThePaginator",props:{totalPagesCount:{type:Number,default:null},activePage:{type:Number,required:!0},routeBeginning:{type:String,default:""},pagePrefix:{type:String,default:"?page="},isInternalLink:{type:Boolean,default:!0},isTrailingSlash:{type:Boolean,default:!1},noQueryUpdate:{type:Boolean,default:!1},hasNextPage:{type:Boolean,default:null}},computed:{types:()=>["desktop","mobile"],isFirstPageActive(){return+this.activePage==1},isLastPageActive(){return this.hasNextPage!==null?!this.hasNextPage:this.activePage===this.totalPagesCount},linkComponent(){return this.noQueryUpdate?"button":"a"},isPaginatorVisible(){return this.hasNextPage!==null?!0:this.totalPagesCount?this.totalPagesCount>1:!1}},methods:{getNuxtLink(e){if(this.linkComponent==="button")return;const i=w(this.routeBeginning),{pagePrefix:a,isTrailingSlash:o}=this;return e>1?`${i}${a}${e}${o?"/":""}`:i},handlePageLinkClick(e){this.$emit("page-link-click",e,this.getNuxtLink(e))},createItems(e){const{activePage:i,totalPagesCount:a}=this;if(!a)return[{id:v(),type:"link",number:i,active:!0}];const o=[],n=(t,u,C)=>{const m=v();t==="link"?o.push({number:u,type:t,active:C,id:m}):o.push({id:m,type:t})},d=e==="mobile"?2:5,l=e==="mobile"?3:7;if(a<=l+1){for(let t=1;t<=a;t+=1)n("link",t,t===i);return o}if(i<=d){for(let t=1;t<=l;t+=1)n("link",t,t===i);n("ellipsis"),n("link",a,!1)}else if(i>a-d){n("link",1,!1),n("ellipsis");for(let t=a-l+1;t<=a;t+=1)n("link",t,t===i)}else n("link",1,!1),n("ellipsis"),e==="desktop"?[-2,-1,0,1,2].forEach(t=>{const u=i+t;n("link",u,u===i)}):n("link",i,!0),n("ellipsis"),n("link",a,!1);return o}}},"$kOEiIlXoyI"),T={key:0,class:"lh-the-paginator"},S={class:"lh-the-paginator__row"};function A(e,i,a,o,n,d){return e.isPaginatorVisible?(s(),r("div",T,[h("div",S,[e.isFirstPageActive?p("",!0):(s(),k(c(e.linkComponent),{key:0,class:g(["lh-the-paginator__arrow-icon lh-the-paginator__arrow-icon--left",{"lh-the-paginator__arrow-icon-hidden":e.isFirstPageActive}]),type:e.linkComponent==="button"?"button":void 0,href:e.getNuxtLink(e.activePage-1),onClick:i[0]||(i[0]=l=>e.handlePageLinkClick(+e.activePage-1))},{default:f(()=>[...i[2]||(i[2]=[h("svg",{fill:"none",height:"24",viewBox:"0 0 24 24",width:"24",xmlns:"http://www.w3.org/2000/svg"},[h("path",{d:"m13.9038 6-5.9038 5.9038 5.9038 5.9038",stroke:"#969698","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2"})],-1)])]),_:1},8,["class","type","href"])),(s(!0),r(P,null,y(e.types,l=>(s(),r("div",{class:g(["lh-the-paginator__cells",l]),"data-jest":"link-list"},[(s(!0),r(P,null,y(e.createItems(l),t=>(s(),r(P,null,[t.type==="link"?(s(),k(c(e.linkComponent),{class:g(["lh-the-paginator__cell",{"lh-the-paginator__cell--active":t.active}]),"data-jest":`link-${t.number}`,key:"link-"+t.id,type:e.linkComponent==="button"?"button":void 0,href:e.getNuxtLink(t.number),onClick:u=>e.handlePageLinkClick(+t.number)},{default:f(()=>[L(N(t.number),1)]),_:2},1032,["data-jest","type","class","href","onClick"])):t.type==="ellipsis"?(s(),r("div",{class:"lh-the-paginator__ellipsis","data-jest":"ellipsis",key:"ellipsis-"+t.id},"...")):p("",!0)],64))),256))],2))),256)),e.isLastPageActive?p("",!0):(s(),k(c(e.linkComponent),{key:1,class:g(["lh-the-paginator__arrow-icon lh-the-paginator__arrow-icon--right",{"lh-the-paginator__arrow-icon-hidden":e.isLastPageActive}]),type:e.linkComponent==="button"?"button":void 0,href:e.getNuxtLink(e.activePage+1),onClick:i[1]||(i[1]=l=>e.handlePageLinkClick(+e.activePage+1))},{default:f(()=>[...i[3]||(i[3]=[h("svg",{fill:"none",height:"24",viewBox:"0 0 24 24",width:"24",xmlns:"http://www.w3.org/2000/svg"},[h("path",{d:"m10.0962 18 5.9038-5.9038-5.9038-5.90382",stroke:"#969698","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2"})],-1)])]),_:1},8,["class","type","href"]))])])):p("",!0)}const j=$(B,[["render",A]]);export{j as T};
2//# sourceMappingURL=v7.12-ggPUr9Ky.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.