PageSourceSearch

https://www.mojnovisad.com/wp-content/themes/mns/assets/dist/js/category-pagination.js?ver=1.0.0

js mojnovisad.com collected 2026-10-02 10:05:24 UTC 5,172 bytes, 1 lines download raw bytes

1function _regenerator(){var d,e="function"==typeof Symbol?Symbol:{},t=e.iterator||"@@iterator",r=e.toStringTag||"@@toStringTag";function n(e,t,r,n){var a,o,i,c,s,u,l,g,f,t=t&&t.prototype instanceof v?t:v,t=Object.create(t.prototype);return _regeneratorDefine2(t,"_invoke",(a=e,o=r,l=n||[],g=!1,f={p:u=0,n:0,v:d,a:p,f:p.bind(d,4),d:function(e,t){return i=e,c=0,s=d,f.n=t,y}},function(e,t,r){if(1<u)throw TypeError("Generator is already running");for(g&&1===t&&p(t,r),c=t,s=r;(h=c<2?d:s)||!g;){i||(c?c<3?(1<c&&(f.n=-1),p(c,s)):f.n=s:f.v=s);try{if(u=2,i){if(h=i[e=c?e:"next"]){if(!(h=h.call(i,s)))throw TypeError("iterator result is not an object");if(!h.done)return h;s=h.value,c<2&&(c=0)}else 1===c&&(h=i.return)&&h.call(i),c<2&&(s=TypeError("The iterator does not provide a '"+e+"' method"),c=1);i=d}else if((h=(g=f.n<0)?s:a.call(o,f))!==y)break}catch(e){i=d,c=1,s=e}finally{u=1}}return{value:h,done:g}}),!0),t;function p(e,t){for(c=e,s=t,h=0;!g&&u&&!r&&h<l.length;h++){var r,n=l[h],a=f.p,o=n[2];3<e?(r=o===t)&&(s=n[(c=n[4])?5:c=3],n[4]=n[5]=d):n[0]<=a&&((r=e<2&&a<n[1])?(c=0,f.v=t,f.n=n[1]):a<o&&(r=e<3||n[0]>t||o<t)&&(n[4]=e,n[5]=t,f.n=o,c=0))}if(r||1<e)return y;throw g=!0,t}}var y={};function v(){}function a(){}function o(){}var h=Object.getPrototypeOf,e=[][t]?h(h([][t]())):(_regeneratorDefine2(h={},t,function(){return this}),h),i=o.prototype=v.prototype=Object.create(e);function c(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,o):(e.__proto__=o,_regeneratorDefine2(e,r,"GeneratorFunction")),e.prototype=Object.create(i),e}return _regeneratorDefine2(i,"constructor",a.prototype=o),_regeneratorDefine2(o,"constructor",a),_regeneratorDefine2(o,r,a.displayName="GeneratorFunction"),_regeneratorDefine2(i),_regeneratorDefine2(i,r,"Generator"),_regeneratorDefine2(i,t,function(){return this}),_regeneratorDefine2(i,"toString",function(){return"[object Generator]"}),(_regenerator=function(){return{w:n,m:c}})()}function _regeneratorDefine2(e,t,r,n){var o=Object.defineProperty;try{o({},"",{})}catch(e){o=0}(_regeneratorDefine2=function(e,t,r,n){function a(t,r){_regeneratorDefine2(e,t,function(e){return this._invoke(t,r,e)})}t?o?o(e,t,{value:r,enumerable:!n,configurable:!n,writable:!n}):e[t]=r:(a("next",0),a("throw",1),a("return",2))})(e,t,r,n)}function asyncGeneratorStep(e,t,r,n,a,o,i){try{var c=e[o](i),s=c.value}catch(e){return void r(e)}c.done?t(s):Promise.resolve(s).then(n,a)}function _asyncToGenerator(c){return function(){var e=this,i=arguments;return new Promise(function(t,r){var n=c.apply(e,i);function a(e){asyncGeneratorStep(n,t,r,a,o,"next",e)}function o(e){asyncGeneratorStep(n,t,r,a,o,"throw",e)}a(void 0)})}}(()=>{var l,g,f,p,d,y=new IntersectionObserver(function(e,t){e.forEach(function(e){var t;e.isIntersecting&&""!=(e=e.target).dataset.lazybg&&(t=e.dataset.lazybg.replace(/ /g,"%20"),e.style.backgroundImage="url("+t+")",e.classList.remove("lazybg"),e.dataset.lazybg="",y.unobserve(e))})},{rootMargin:"0px 0px 0px 0px"}),v=document.getElementById("js-category-posts"),h=document.getElementById("js-category-pagination");function b(e){d=e,v.classList.toggle("is-loading",e),h.classList.toggle("is-loading",e)}function r(){e.apply(this,arguments)}function e(){return(e=_asyncToGenerator(_regenerator().m(function e(n){var a,o,i,c,s,u=arguments;return _regenerator().w(function(e){for(;;)switch(e.p=e.n){case 0:if(a=(1<u.length&&void 0!==u[1]?u[1]:{}).push,a=void 0===a||a,d)return e.a(2);e.n=1;break;case 1:return b(!0),e.p=2,(o=new URLSearchParams).set("action","load_category_page"),o.set("nonce",CategoryPagination.nonce),o.set("cat_id",String(l)),o.set("page",String(n)),o.set("per_page",String(g)),o.set("exclude",p),e.n=3,fetch(CategoryPagination.ajaxUrl,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded; charset=UTF-8"},body:o.toString(),credentials:"same-origin"});case 3:return o=e.v,e.n=4,o.json();case 4:if((i=e.v)&&i.success){e.n=5;break}throw new Error((null==i||null==(c=i.data)?void 0:c.message)||"AJAX failed");case 5:v.innerHTML=i.data.html||"",h.innerHTML=i.data.paginationHtml||"",a&&(t=n,r=void 0,r=new URL(f,window.location.origin),1<t?r.searchParams.set("pg",String(t)):r.searchParams.delete("pg"),c=r.pathname+r.search,window.history.pushState({pg:n},"",c)),[].slice.call(document.querySelectorAll(".lazybg")).forEac
1h(function(e){y.observe(e)}),v.scrollIntoView({behavior:"smooth",block:"start"}),e.n=7;break;case 6:e.p=6,s=e.v,console.error(s);case 7:return b(!(e.p=7)),e.f(7);case 8:return e.a(2)}var t,r},e,null,[[2,6,7,8]])}))).apply(this,arguments)}v&&h&&window.CategoryPagination&&CategoryPagination.ajaxUrl&&(l=parseInt(v.dataset.catId||"0",10),g=parseInt(v.dataset.perPage||"10",10),f=h.dataset.baseUrl||window.location.pathname,l)&&(p=(v.dataset.exclude||"").trim(),d=!1,document.addEventListener("click",function(e){var t=e.target.closest(".js-cat-page");t&&(t.classList.contains("is-disabled")||"true"===t.getAttribute("aria-disabled")?e.preventDefault():(t=parseInt(t.dataset.page||"1",10))&&(e.preventDefault(),r(t,{push:!0})))}),window.addEventListener("popstate",function(){var e=new URL(window.location.href);r(parseInt(e.searchParams.get("pg")||"1",10),{push:!1})}))})();

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.