!function(){function t(t){if(Array.isArray(t))return t}function n(t){if(Symbol.iterator in Object(t)||"[object Arguments]"===Object.prototype.toString.call(t))return Array.from(t)}function e(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}function r(r,i){return t(r)||n(r)||e()}var i={version:"5.8.0",init:function(r){var a,o=(r instanceof Element?r:document).querySelectorAll("[data-pagy]"),c=!0,u=!1,l=void 0;try{for(var f,p=o[Symbol.iterator]();!(c=(f=p.next()).done);c=!0){var s=f.value;try{var v=t(a=JSON.parse(atob(s.getAttribute("data-pagy"))))||n(a)||e(),g=v[0],y=v.slice(1);"nav"===g?i.initNav(s,y):"combo"===g?i.initCombo(s,y):"selector"===g?i.initSelector(s,y):i.initWarn(s,'Illegal PagyJSON keyword: expected "nav"|"combo"|"selector", got "'.concat(g,'"'))}catch(t){i.initWarn(s,t)}}}catch(t){u=!0,l=t}finally{try{c||null==p.return||p.return()}finally{if(u)throw l}}},initWarn:function(t,n){console.warn("Pagy.init() skipped element: %o\n%s",t,n)},initNav:function(t,n){var e,a=r(n),o=a[0],c=a[1],u=a[2],l=a[3],f=null!==(e=t.parentElement)&&void 0!==e?e:t,p=Object.keys(c).map((function(t){return parseInt(t)})).sort((function(t,n){return n-t})),s=-1,v=function(t,n,e){return t.replace(/__pagy_page__/g,n).replace(/__pagy_label__/g,e)};(t.pagyRender=function(){var n=p.find((function(t){return tf)return a.value=o,void a.select();var p=r(n(a.value)),s=p[0],v=p[1];"string"==typeof e&&"1"===s&&(v=i.trim(v,e)),t.insertAdjacentHTML("afterbegin",v),t.querySelector("a").click()}};["change","focus"].forEach((function(t){return a.addEventListener(t,a.select)})),a.addEventListener("focusout",c),a.addEventListener("keypress",(function(t){"Enter"===t.key&&c()}))},trim:function(t,n){return t.replace(new RegExp("[?&]".concat(n,"=1\\b(?!&)|\\b").concat(n,"=1&")),"")}},a=i;window.Pagy=a}();