PageSourceSearch

https://www.rnz.co.nz/packs/js/application-e4ca497bc03044d0caa5.js

js rnz.co.nz collected 2026-09-24 07:58:10 UTC 93,384 bytes, 2 lines download raw bytes

1!function(t){var e={};function n(r){if(e[r])return e[r].exports;var o=e[r]={i:r,l:!1,exports:{}};return t[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}n.m=t,n.c=e,n.d=function(t,e,r){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:r})},n.r=function(t){"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"===typeof t&&t&&t.__esModule)return t;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var o in t)n.d(r,o,function(e){return t[e]}.bind(null,o));return r},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="/packs/",n(n.s=511)}({26:function(t,e,n){t.exports=n(71)},511:function(t,e,n){"use strict";n.r(e);var r=["once"];function o(t){return o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},o(t)}function i(t,e){if(null==t)return{};var n,r,o=function(t,e){if(null==t)return{};var n,r,o={},i=Object.keys(t);for(r=0;r<i.length;r++)n=i[r],e.indexOf(n)>=0||(o[n]=t[n]);return o}(t,e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);for(r=0;r<i.length;r++)n=i[r],e.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(t,n)&&(o[n]=t[n])}return o}var a=new WeakMap;function s(t,e,n,r){var o,i;if(!t&&!a.has(e))return!1;var s=null!==(o=a.get(e))&&void 0!==o?o:new WeakMap;a.set(e,s);var c=null!==(i=s.get(n))&&void 0!==i?i:new Set;s.set(n,c);var u=c.has(r);return t?c.add(r):c.delete(r),u&&t}var c=function(t,e,n){var a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},c=a.signal,u=a.base,l=void 0===u?document:u;if(null===c||void 0===c||!c.aborted){var f=a.once,h=i(a,r),p=l instanceof Document?l.documentElement:l,m=Boolean("object"===o(a)?a.capture:a),d=JSON.stringify({selector:t,type:e,capture:m});s(!0,p,n,d)||p.addEventListener(e,(function r(o){var i=function(t,e){var n=t.target;if(n instanceof Text&&(n=n.parentElement),n instanceof Element&&t.currentTarget instanceof Element){var r=n.closest(e);if(r&&t.currentTarget.contains(r))return r}}(o,String(t));if(i){var a=Object.assign(o,{delegateTarget:i});n.call(p,a),f&&(p.removeEventListener(e,r,h),s(!1,p,n,d))}}),h),null===c||void 0===c||c.addEventListener("abort",(function(){s(!1,p,n,d)}))}};n(26);function u(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var r,o,i,a,s=[],c=!0,u=!1;try{if(i=(n=n.call(t)).next,0===e){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=i.call(n)).done)&&(s.push(r.value),s.length!==e);c=!0);}catch(l){u=!0,o=l}finally{try{if(!c&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(u)throw o}}return s}}(t,e)||f(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function l(t){return function(t){if(Array.isArray(t))return h(t)}(t)||function(t){if("undefined"!==typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||f(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function f(t,e){if(t){if("string"===typeof t)return h(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?h(t,e):void 0}}function h(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function p(t){return p="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},p(t)}function m(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function d(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,T(r.key),r)}}function v(t,e,n){return e&&d(t.prototype,e),n&&d(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t}function y(t,e){if("function"!==typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&O(t,e)}function g(t){var e=k();return function(){var n,r=S(t);if(e){var o=S(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return function(t,e){if(e&&("object"===p(e)||"function"===typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return w(t)}(this,n)}}function w(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function b(t){var e="function"===typeof Map?new Map:void 0;return b=function(t){if(null===t||(n=t,-1===Function.toString.call(n).indexOf("[native code]")))return t;var n;if("function"!==typeof t)throw new TypeError("Super expression must either be null or a function");if("undefined"!==typeof e){if(e.has(t))return e.get(t);e.set(t,r)}function r(){return P(t,arguments,S(this).constructor)}return r.prototype=Object.create(t.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}}),O(r,t)},b(t)}function P(t,e,n){return P=k()?Reflect.construct.bind():function(t,e,n){var r=[null];r.push.apply(r,e);var o=new(Function.bind.apply(t,r));return n&&O(o,n.prototype),o},P.apply(null,arguments)}function k(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}function O(t,e){return O=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},O(t,e)}
1function S(t){return S=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},S(t)}function j(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function E(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?j(Object(n),!0).forEach((function(e){_(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):j(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function _(t,e,n){return(e=T(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function T(t){var e=function(t,e){if("object"!==p(t)||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,e||"default");if("object"!==p(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"===p(e)?e:String(e)}var A=function(t,e){return String(t).toLowerCase().replace(/[\s/_.]+/g,"-").replace(/[^\w-]+/g,"").replace(/--+/g,"-").replace(/^-+|-+$/g,"")||e||""},x=function(){var t=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).hash;return window.location.pathname+window.location.search+(t?window.location.hash:"")},C=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=E({url:t=t||x({hash:!0}),random:Math.random(),source:"swup"},e);window.history.pushState(n,"",t)},L=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};t=t||x({hash:!0});var n=E(E({},window.history.state||{}),{},{url:t,random:Math.random(),source:"swup"},e);window.history.replaceState(n,"",t)},I=function(t,e,n,r){var o=new AbortController;return r=E(E({},r),{},{signal:o.signal}),c(t,e,n,r),{destroy:function(){return o.abort()}}},B=function(t){y(n,t);var e=g(n);function n(t){var r,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:document.baseURI;return m(this,n),r=e.call(this,t.toString(),o),Object.setPrototypeOf(w(r),n.prototype),r}return v(n,[{key:"url",get:function(){return this.pathname+this.search}}],[{key:"fromElement",value:function(t){return new n(t.getAttribute("href")||t.getAttribute("xlink:href")||"")}},{key:"fromUrl",value:function(t){return new n(t)}}]),n}(b(URL)),D=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};try{var n,r=function(n){var r=f,i=r.status,s=r.url;return Promise.resolve(f.text()).then((function(n){if(500===i)throw o.hooks.call("fetch:error",a,{status:i,response:f,url:s}),new R("Server error: ".concat(s),{status:i,url:s});if(!n)throw new R("Empty response: ".concat(s),{status:i,url:s});var r=B.fromUrl(s).url,c={url:r,html:n};return!a.cache.write||e.method&&"GET"!==e.method||t!==r||o.cache.set(c.url,c),c}))},o=this;t=B.fromUrl(t).url;var i=e.visit,a=void 0===i?o.visit:i,s=E(E({},o.options.requestHeaders),e.headers),c=null!==(n=e.timeout)&&void 0!==n?n:o.options.timeout,u=new AbortController,l=u.signal;e=E(E({},e),{},{headers:s,signal:l});var f,h=!1,p=null;c&&c>0&&(p=setTimeout((function(){h=!0,u.abort("timeout")}),c));var m=function(n,r){try{var i=Promise.resolve(o.hooks.call("fetch:request",a,{url:t,options:e},(function(t,e){var n=e.url,r=e.options;return fetch(n,r)}))).then((function(t){f=t,p&&clearTimeout(p)}))}catch(t){return r(t)}return i&&i.then?i.then(void 0,r):i}(0,(function(e){if(h)throw o.hooks.call("fetch:timeout",a,{url:t}),new R("Request timed out: ".concat(t),{url:t,timedOut:h});if("AbortError"===(null===e||void 0===e?void 0:e.name)||l.aborted)throw new R("Request aborted: ".concat(t),{url:t,aborted:!0});throw e}));return Promise.resolve(m&&m.then?m.then(r):r())}catch(d){return Promise.reject(d)}},R=function(t){y(n,t);var e=g(n);function n(t,r){var o;return m(this,n),(o=e.call(this,t)).url=void 0,o.status=void 0,o.aborted=void 0,o.timedOut=void 0,o.name="FetchError",o.url=r.url,o.status=r.status,o.aborted=r.aborted||!1,o.timedOut=r.timedOut||!1,o}return n}(b(Error)),U=function(){function t(e){m(this,t),this.swup=void 0,this.pages=new Map,this.swup=e}return v(t,[{key:"size",get:function(){return this.pages.size}},{key:"all",get:function(){var t=new Map;
1return this.pages.forEach((function(e,n){t.set(n,E({},e))})),t}},{key:"has",value:function(t){return this.pages.has(this.resolve(t))}},{key:"get",value:function(t){var e=this.pages.get(this.resolve(t));return e?E({},e):e}},{key:"set",value:function(t,e){t=this.resolve(t),e=E(E({},e),{},{url:t}),this.pages.set(t,e),this.swup.hooks.callSync("cache:set",void 0,{page:e})}},{key:"update",value:function(t,e){t=this.resolve(t);var n=E(E(E({},this.get(t)),e),{},{url:t});this.pages.set(t,n)}},{key:"delete",value:function(t){this.pages.delete(this.resolve(t))}},{key:"clear",value:function(){this.pages.clear(),this.swup.hooks.callSync("cache:clear",void 0,void 0)}},{key:"prune",value:function(t){var e=this;this.pages.forEach((function(n,r){t(r,n)&&e.delete(r)}))}},{key:"resolve",value:function(t){var e=B.fromUrl(t).url;return this.swup.resolveUrl(e)}}]),t}(),N=function(t){return(arguments.length>1&&void 0!==arguments[1]?arguments[1]:document).querySelector(t)},V=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:document;return Array.from(e.querySelectorAll(t))},M=function(){return new Promise((function(t){requestAnimationFrame((function(){requestAnimationFrame((function(){t()}))}))}))};function z(t){return!!t&&("object"==p(t)||"function"==typeof t)&&"function"==typeof t.then}function H(t,e){var n=null===t||void 0===t?void 0:t.closest("[".concat(e,"]"));return null!==n&&void 0!==n&&n.hasAttribute(e)?(null===n||void 0===n?void 0:n.getAttribute(e))||!0:void 0}var q=function(){function t(e){m(this,t),this.swup=void 0,this.swupClasses=["to-","is-changing","is-rendering","is-popstate","is-animating","is-leaving"],this.swup=e}return v(t,[{key:"selectors",get:function(){var t=this.swup.visit.animation.scope;return"containers"===t?this.swup.visit.containers:"html"===t?["html"]:Array.isArray(t)?t:[]}},{key:"selector",get:function(){return this.selectors.join(",")}},{key:"targets",get:function(){return this.selector.trim()?V(this.selector):[]}},{key:"add",value:function(){var t=arguments;this.targets.forEach((function(e){var n;return(n=e.classList).add.apply(n,l([].slice.call(t)))}))}},{key:"remove",value:function(){var t=arguments;this.targets.forEach((function(e){var n;return(n=e.classList).remove.apply(n,l([].slice.call(t)))}))}},{key:"clear",value:function(){var t=this;this.targets.forEach((function(e){var n,r=e.className.split(" ").filter((function(e){return t.isSwupClass(e)}));(n=e.classList).remove.apply(n,l(r))}))}},{key:"isSwupClass",value:function(t){return this.swupClasses.some((function(e){return t.startsWith(e)}))}}]),t}(),F=function(){function t(e,n){m(this,t),this.id=void 0,this.state=void 0,this.from=void 0,this.to=void 0,this.containers=void 0,this.animation=void 0,this.trigger=void 0,this.cache=void 0,this.history=void 0,this.scroll=void 0;var r=n.to,o=n.from,i=n.hash,a=n.el,s=n.event;this.id=Math.random(),this.state=1,this.from={url:null!==o&&void 0!==o?o:e.location.url,hash:e.location.hash},this.to={url:r,hash:i},this.containers=e.options.containers,this.animation={animate:!0,wait:!1,name:void 0,native:e.options.native,scope:e.options.animationScope,selector:e.options.animationSelector},this.trigger={el:a,event:s},this.cache={read:e.options.cache,write:e.options.cache},this.history={action:"push",popstate:!1,direction:void 0},this.scroll={reset:!0,target:void 0}}return v(t,[{key:"advance",value:function(t){this.state<t&&(this.state=t)}},{key:"abort",value:function(){this.state=8}},{key:"done",get:function(){return this.state>=7}}]),t}();function W(t){return new F(this,t)}var G="undefined"!=typeof Symbol?Symbol.iterator||(Symbol.iterator=Symbol("Symbol.iterator")):"@@iterator";function $(t,e,n){if(!t.s){if(n instanceof K){if(!n.s)return void(n.o=$.bind(null,t,e));1&e&&(e=n.s),n=n.v}if(n&&n.then)return void n.then($.bind(null,t,e),$.bind(null,t,2));t.s=e,t.v=n;var r=t.o;r&&r(t)}}var K=function(){function t(){}return t.prototype.then=function(e,n){var r=new t,o=this.s;if(o){var i=1&o?e:n;if(i){try{$(r,1,i(this.v))}catch(t){$(r,2,t)}return r}return this}return this.o=function(t){try{var o=t.v;1&t.s?$(r,1,e?e(o):o):n?$(r,1,n(o)):$(r,2,o)}catch(t){$(r,2,t)}},r},t}();function Y(t){return t instanceof K&&1&t.s}var X=function(){function t(e){m(this,t),this.swup=void 0,this.registry=new Map,this.hooks=["animation:out:start","animation:out:await","animation:out:end","animation:in:start","animation:in:await","animation:in:end","animation:skip","cache:clear","cache:set","content:replace","content:scroll","enable","disable","fetch:request","fetch:error","fetch:timeout","history:popstate","link:click","link:self","link:anchor","link:newtab","page:load","page:view","scroll:top","scroll:anchor","visit:start","visit:transition","visit:abort","visit:end"],this.swup=e,this.init()}return v(t,[{key:"init",value:function(){var t=this;this.hooks.forEach((function(e){return t.create(e)}))}},{key:"create",value:function(t){this.registry.has(t)||this.registry.set(t,new Map)}},{key:"exists",value:function(t){return this.registry.has(t)}},{key:"get",value:function(t){var e=this.registry.get(t);if(e)return e;console.error("Unknown hook '".concat(t,"'"))}}
1,{key:"clear",value:function(){this.registry.forEach((function(t){return t.clear()}))}},{key:"on",value:function(t,e){var n=this,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},o=this.get(t);if(!o)return console.warn("Hook '".concat(t,"' not found.")),function(){};var i=E(E({},r),{},{id:o.size+1,hook:t,handler:e});return o.set(e,i),function(){return n.off(t,e)}}},{key:"before",value:function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return this.on(t,e,E(E({},n),{},{before:!0}))}},{key:"replace",value:function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return this.on(t,e,E(E({},n),{},{replace:!0}))}},{key:"once",value:function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return this.on(t,e,E(E({},n),{},{once:!0}))}},{key:"off",value:function(t,e){var n=this.get(t);n&&e?n.delete(e)||console.warn("Handler for hook '".concat(t,"' not found.")):n&&n.clear()}},{key:"call",value:function(t,e,n,r){try{var o=this,i=u(o.parseCallArgs(t,e,n,r),3),a=i[0],s=i[1],c=i[2],l=o.getHandlers(t,c),f=l.before,h=l.handler,p=l.after;return Promise.resolve(o.run(f,a,s)).then((function(){return Promise.resolve(o.run(h,a,s,!0)).then((function(e){var n=u(e,1)[0];return Promise.resolve(o.run(p,a,s)).then((function(){return o.dispatchDomEvent(t,a,s),n}))}))}))}catch(t){return Promise.reject(t)}}},{key:"callSync",value:function(t,e,n,r){var o=u(this.parseCallArgs(t,e,n,r),3),i=o[0],a=o[1],s=o[2],c=this.getHandlers(t,
1s),l=c.before,f=c.handler,h=c.after;this.runSync(l,i,a);var p=u(this.runSync(f,i,a,!0),1)[0];return this.runSync(h,i,a),this.dispatchDomEvent(t,i,a),p}},{key:"parseCallArgs",value:function(t,e,n,r){return e instanceof F||"object"!=p(e)&&"function"!=typeof n?[e,n,r]:[void 0,e,n]}},{key:"run",value:function(t,e,n){var r=arguments.length>3&&void 0!==arguments[3]&&arguments[3];try{var o,i=this;void 0===e&&(e=i.swup.visit);var a=[],s=function(t,e,n){if("function"==typeof t[G]){var r,o,i,a=t[G]();if(function t(s){try{for(;!((r=a.next()).done||n&&n());)if((s=e(r.value))&&s.then){if(!Y(s))return void s.then(t,i||(i=$.bind(null,o=new K,2)));s=s.v}o?$(o,1,s):o=s}catch(t){$(o||(o=new K),2,t)}}(),a.return){var s=function(t){try{r.done||a.return()}catch(t){}return t};if(o&&o.then)return o.then(s,(function(t){throw s(t)}));s()}return o}if(!("length"in t))throw new TypeError("Object is not iterable");for(var c=[],u=0;u<t.length;u++)c.push(t[u]);return function(t,e,n){var r,o,i=-1;return function a(s){try{for(;++i<t.length&&(!n||!n());)if((s=e(i))&&s.then){if(!Y(s))return void s.then(a,o||(o=$.bind(null,r=new K,2)));s=s.v}r?$(r,1,s):r=s}catch(t){$(r||(r=new K),2,t)}}(),r}(c,(function(t){return e(c[t])}),n)}(t,(function(t){var o,s=t.hook,c=t.handler,u=t.defaultHandler,f=t.once;if(null===(o=e)||void 0===o||!o.done)return f&&i.off(s,c),function(t,r){try{var o=Promise.resolve(function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return new Promise((function(n,r){var o=t.apply(void 0,l(e));z(o)?o.then(n,r):n(o)}))}(c,[e,n,u])).then((function(t){a.push(t)}))}catch(t){return r(t)}return o&&o.then?o.then(void 0,r):o}(0,(function(t){if(r)throw t;console.error("Error in hook '".concat(s,"':"),t)}))}),(function(){return o}));return Promise.resolve(s&&s.then?s.then((function(t){return a})):a)}catch(t){return Promise.reject(t)}}},{key:"runSync",value:function(t){var e,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.swup.visit,r=arguments.length>2?arguments[2]:void 0,o=arguments.length>3&&void 0!==arguments[3]&&arguments[3],i=[],a=function(t,e){var n="undefined"!==typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=f(t))||e&&t&&"number"===typeof t.length){n&&(t=n);var r=0,o=function(){};return{s:o,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,s=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return a=t.done,t},e:function(t){s=!0,i=t},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw i}}}}(t);try{for(a.s();!(e=a.n()).done;){var s=e.value,c=s.hook,u=s.handler,l=s.defaultHandler,h=s.once;if(null===n||void 0===n||!n.done){h&&this.off(c,u);try{var p=u(n,r,l);i.push(p),z(p)&&console.warn("Swup will not await Promises in handler for synchronous hook '".concat(c,"'."))}catch(t){if(o)throw t;console.error("Error in hook '".concat(c,"':"),t)}}}}catch(m){a.e(m)}finally{a.f()}return i}},{key:"getHandlers",value:function(t,e){var n=this.get(t);if(!n)return{found:!1,before:[],handler:[],after:[],replaced:!1};var r=Array.from(n.values()),o=this.sortRegistrations,i=r.filter((function(t){var e=t.before,n=t.replace;return e&&!n})).sort(o),a=r.filter((function(t){return t.replace})).filter((function(t){return!0})).sort(o),s=r.filter((function(t){var e=t.before,n=t.replace;return!e&&!n})).sort(o),c=a.length>0,u=[];if(e&&(u=[{id:0,hook:t,handler:e}],c)){var l=a.length-1;u=[{id:0,hook:t,handler:a[l].handler,defaultHandler:function t(n){var r=a[n-1];return r?function(e,o){return r.handler(e,o,t(n-1))}:e}(l)}]}return{found:!0,before:i,handler:u,after:s,replaced:c}}},{key:"sortRegistrations",value:function(t,e){var n,r;return(null!==(n=t.priority)&&void 0!==n?n:0)-(null!==(r=e.priority)&&void 0!==r?r:0)||t.id-e.id||0}},{key:"dispatchDomEvent",value:function(t,e,n){if(null===e||void 0===e||!e.done){var r={hook:t,args:n,visit:e||this.swup.visit};document.dispatchEvent(new CustomEvent("swup:any",{detail:r,bubbles:!0})),document.dispatchEvent(new CustomEvent("swup:".concat(t),{detail:r,bubbles:!0}))}}}]),t}(),J=function(t){if(t&&"#"===t.charAt(0)&&(t=t.substring(1)),!t)return null;var e=decodeURIComponent(t),n=document.getElementById(t)||document.getElementById(e)||N("a[name='".concat(CSS.escape(t),"']"))||N("a[name='".concat(CSS.escape(e),"']"));return n||"top"!==t||(n=document.body),n},Q=function(t){var e=t.selector,n=t.elements;try{if(!1===e&&!n)return Promise.resolve();var r=[];if(n)r=Array.from(n);else if(e&&!(r=V(e,document.body)).length)return console.warn("[swup] No elements found matching animationSelector `".concat(e,"`")),Promise.resolve();var o=r.map((function(t){return function(t){var e=function(t){var e=window.getComputedStyle(t),n=et(e,"".concat(Z,"Delay")),r=et(e,"".concat(Z,"Duration")),o=nt(n,r),i=et(e,"".concat(tt,"Delay")),a=et(e,"".concat(tt,"Duration")),s=nt(i,a),c=Math.max(o,s),u=c>0?o>s?Z:tt:null;return{type:u,timeout:c,propCount:u?u===Z?r.length:a.length:0}}(t),n=e.type,r=e.timeout,o=e.propCount;return!(!n||!r)&&new Promise((function(e){var i="".concat(n,"end"),a=performance.now(),s=0,c=function(){t.removeEventListener(i,u),e()},u=function(e){e.target===t&&((performance.now()-a)/1e3<e.elapsedTime||++s>=o&&c())};setTimeout((function(){s<o&&c()}),r+1),t.addEventListener(i,u)}))}(t)}));
1return o.filter(Boolean).length>0?Promise.resolve(Promise.all(o)).then((function(){})):(e&&console.warn("[swup] No CSS animation duration defined on elements matching `".concat(e,"`")),Promise.resolve())}catch(e){return Promise.reject(e)}},Z="transition",tt="animation";function et(t,e){return(t[e]||"").split(", ")}function nt(t,e){for(;t.length<e.length;)t=t.concat(t);return Math.max.apply(Math,l(e.map((function(e,n){return rt(e)+rt(t[n])}))))}function rt(t){return 1e3*parseFloat(t)}var ot=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};try{var n,r=function(r){var i,a;if(n)return r;o.navigating=!0,o.visit=t;var s=t.trigger.el;e.referrer=e.referrer||o.location.url,!1===e.animate&&(t.animation.animate=!1),t.animation.animate||o.classes.clear();var c=e.history||H(s,"data-swup-history");"string"==typeof c&&["push","replace"].includes(c)&&(t.history.action=c);var u=e.animation||H(s,"data-swup-animation");return"string"==typeof u&&(t.animation.name=u),"object"==p(e.cache)?(t.cache.read=null!==(i=e.cache.read)&&void 0!==i?i:t.cache.read,t.cache.write=null!==(a=e.cache.write)&&void 0!==a?a:t.cache.write):void 0!==e.cache&&(t.cache={read:!!e.cache,write:!!e.cache}),delete e.cache,function(n,r){try{var i=function(n,r){try{var i=Promise.resolve(o.hooks.call("visit:start",t,void 0)).then((function(){function n(){if(!t.done)return Promise.resolve(o.hooks.call("visit:transition",t,void 0,(function(){try{var e,n=function(n){return e?n:(t.advance(4),Promise.resolve(o.animatePageOut(t)).then((function(){function e(){return Promise.resolve(o.animatePageIn(t)).then((function(){}))}var n=function(){if(t.animation.native&&document.startViewTransition)return Promise.resolve(document.startViewTransition((function(){try{var e=o.renderPage;return Promise.resolve(r).then((function(n){return Promise.resolve(e.call(o,t,n))}))}catch(t){return Promise.reject(t)}})).finished).then((function(){}));var e=o.renderPage;return Promise.resolve(r).then((function(n){return Promise.resolve(e.call(o,t,n)).then((function(){}))}))}();return n&&n.then?n.then(e):e()})))},i=function(){if(!t.animation.animate)return Promise.resolve(o.hooks.call("animation:skip",void 0)).then((function(){var n=o.renderPage;return Promise.resolve(r).then((function(r){return Promise.resolve(n.call(o,t,r)).then((function(){e=1}))}))}))}();return Promise.resolve(i&&i.then?i.then(n):n(i))}catch(a){return Promise.reject(a)}}))).then((function(){if(!t.done)return Promise.resolve(o.hooks.call("visit:end",t,void 0,(function(){return o.classes.clear()}))).then((function(){t.state=7,o.navigating=!1,o.onVisitEnd&&(o.onVisitEnd(),o.onVisitEnd=void 0)}))}))}t.state=3;var r=o.hooks.call("page:load",t,{options:e},(function(t,e){try{var n,r=function(t){return e.page=t,e.cache=!!n,e.page};return t.cache.read&&(n=o.cache.get(t.to.url)),Promise.resolve(n?r(n):Promise.resolve(o.fetchPage(t.to.url,e.options)).then(r))}catch(i){return Promise.reject(i)}}));r.then((function(e){var n=e.html;t.advance(5),t.to.html=n,t.to.document=(new DOMParser).parseFromString(n,"text/html")}));var i=t.to.url+t.to.hash;t.history.popstate||("replace"===t.history.action||t.to.url===o.location.url?L(i):(o.currentHistoryIndex++,C(i,{index:o.currentHistoryIndex}))),o.location=B.fromUrl(i),t.history.popstate&&o.classes.add("is-popstate"),t.animation.name&&o.classes.add("to-".concat(A(t.animation.name)));var a=function(){if(t.animation.wait)return Promise.resolve(r).then((function(){}))}();return a&&a.then?a.then(n):n()}))}catch(t){return r(t)}return i&&i.then?i.then(void 0,r):i}(0,(function(e){!e||null!==e&&void 0!==e&&e.aborted?t.state=8:(t.state=9,console.error(e),o.options.skipPopStateHandling=function(){return window.location.assign(t.to.url+t.to.hash),!0},window.history.back())}))}catch(t){return r(!0,t)}return i&&i.then?i.then(r.bind(null,!1),r.bind(null,!0)):r(!1,i)}(0,(function(e,n){if(delete t.to.document,e)throw n;return n}))},o=this,i=function(){if(o.navigating)return function(){if(!(o.visit.state>=6))return Promise.resolve(o.hooks.call("visit:abort",o.visit,void 0)).then((function(){delete o.visit.to.document,o.visit.state=8}));t.state=2,o.onVisitEnd=function(){return o.performNavigation(t,e)},n=1}()}();return Promise.resolve(i&&i.then?i.then(r):r(i))}catch(a){return Promise.reject(a)}};function it(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if("string"!=typeof t)throw new Error("swup.navigate() requires a URL parameter");if(this.shouldIgnoreVisit(t,{el:n.el,event:n.event}))window.location.assign(t);else{var r=B.fromUrl(t),o=r.url,i=r.hash,a=this.createVisit(E(E({},n),{},{to:o,hash:i}));this.performNavigation(a,e)}}var at=function(t){try{var e=this;return Promise.resolve(e.hooks.call("animation:out:start",t,void 0,(function(){e.classes.add("is-changing","is-animating","is-leaving")}))).then((function(){return Promise.resolve(e.hooks.call("animation:out:await",t,{skip:!1},(function(t,n){if(!n.skip)return e.awaitAnimations({selector:t.animation.selector})}))).then((function(){return Promise.resolve(e.hooks.call("animation:out:end",t,void 0)).then((function(){}))}))}))}catch(t){return Promise.reject(t)}},st=function(t){var e,n=t.to.document;if(!n)return!1;var r=(null===(e=n.querySelector("title"))||void 0===e?void 0:e.innerText)||"";document.title=r;var o=V('[data-swup-persist]:not([data-swup-persist=""])'),i=t.containers.map((function(t){var e=document.querySelector(t),r=n.querySelector(t);return e&&r?(e.replaceWith(r.cloneNode(!0)),!0):(e||console.warn("[swup] Container missing in current document: ".concat(t)),r||console.warn("[swup] Container missing in incoming document: ".concat(t)),!1)}
1)).filter(Boolean);return o.forEach((function(t){var e=t.getAttribute("data-swup-persist"),n=N('[data-swup-persist="'.concat(e,'"]'));n&&n!==t&&n.replaceWith(t)})),i.length===t.containers.length},ct=function(t){var e=this,n={behavior:"auto"},r=t.scroll,o=r.target,i=r.reset,a=null!==o&&void 0!==o?o:t.to.hash,s=!1;return a&&(s=this.hooks.callSync("scroll:anchor",t,{hash:a,options:n},(function(t,n){var r=n.hash,o=n.options,i=e.getAnchorElement(r);return i&&i.scrollIntoView(o),!!i}))),i&&!s&&(s=this.hooks.callSync("scroll:top",t,{options:n},(function(t,e){var n=e.options;return window.scrollTo(E({top:0,left:0},n)),!0}))),s},ut=function(t){try{var e=this;if(t.done)return Promise.resolve();var n=e.hooks.call("animation:in:await",t,{skip:!1},(function(t,n){if(!n.skip)return e.awaitAnimations({selector:t.animation.selector})}));return Promise.resolve(M()).then((function(){return Promise.resolve(e.hooks.call("animation:in:start",t,void 0,(function(){e.classes.remove("is-animating")}))).then((function(){return Promise.resolve(n).then((function(){return Promise.resolve(e.hooks.call("animation:in:end",t,void 0)).then((function(){}))}))}))}))}catch(t){return Promise.reject(t)}},lt=function(t,e){try{var n=this;if(t.done)return Promise.resolve();t.advance(6);var r=e.url;return n.isSameResolvedUrl(x(),r)||(L(r),n.location=B.fromUrl(r),t.to.url=n.location.url,t.to.hash=n.location.hash),Promise.resolve(n.hooks.call("content:replace",t,{page:e},(function(t,e){if(function(t){if(null==t)throw new TypeError("Cannot destructure "+t)}(e),n.classes.remove("is-leaving"),t.animation.animate&&n.classes.add("is-rendering"),!n.replaceContent(t))throw new Error("[swup] Container mismatch, aborting");t.animation.animate&&(n.classes.add("is-changing","is-animating","is-rendering"),t.animation.name&&n.classes.add("to-".concat(A(t.animation.name))))}))).then((function(){return Promise.resolve(n.hooks.call("content:scroll",t,void 0,(function(){return n.scrollToContent(t)}))).then((function(){return Promise.resolve(n.hooks.call("page:view",t,{url:n.location.url,title:document.title})).then((function(){}))}))}))}catch(t){return Promise.reject(t)}},ft=function(t){var e;if(Boolean(null===(e=t)||void 0===e?void 0:e.isSwupPlugin)){if(t.swup=this,!t._checkRequirements||t._checkRequirements())return t._beforeMount&&t._beforeMount(),t.mount(),this.plugins.push(t),this.plugins}else console.error("Not a swup plugin instance",t)};function ht(t){var e=this.findPlugin(t);if(e)return e.unmount(),e._afterUnmount&&e._afterUnmount(),this.plugins=this.plugins.filter((function(t){return t!==e})),this.plugins;console.error("No such plugin",e)}function pt(t){return this.plugins.find((function(e){return e===t||e.name===t||e.name==="Swup".concat(String(t))}))}function mt(t){if("function"!=typeof this.options.resolveUrl)return console.warn("[swup] options.resolveUrl expects a callback function."),t;var e=this.options.resolveUrl(t);return e&&"string"==typeof e?e.startsWith("//")||e.startsWith("http")?(console.warn("[swup] options.resolveUrl needs to return a relative url"),t):e:(console.warn("[swup] options.resolveUrl needs to return a url"),t)}function dt(t,e){return this.resolveUrl(t)===this.resolveUrl(e)}var vt={animateHistoryBrowsing:!1,animationSelector:'[class*="transition-"]',animationScope:"html",cache:!0,containers:["#swup"],ignoreVisit:function(t){var e=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).el;return!(null===e||void 0===e||!e.closest("[data-no-swup]"))},linkSelector:"a[href]",linkToSelf:"scroll",native:!1,plugins:[],resolveUrl:function(t){return t},requestHeaders:{"X-Requested-With":"swup",Accept:"text/html, application/xhtml+xml"},skipPopStateHandling:function(t){var e;return"swup"!==(null===(e=t.state)||void 0===e?void 0:e.source)},timeout:0},yt=function(){function t(){var e,n,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};m(this,t),this.version="4.7.0",this.options=void 0,this.defaults=vt,this.plugins=[],this.visit=void 0,this.cache=void 0,this.hooks=void 0,this.classes=void 0,this.location=B.fromUrl(window.location.href),this.currentHistoryIndex=void 0,this.clickDelegate=void 0,this.navigating=!1,this.onVisitEnd=void 0,this.use=ft,this.unuse=ht,this.findPlugin=pt,this.log=function(){},this.navigate=it,this.performNavigation=ot,this.createVisit=W,this.delegateEvent=I,this.fetchPage=D,this.awaitAnimations=Q,this.renderPage=lt,this.replaceContent=st,this.animatePageIn=ut,this.animatePageOut=at,this.scrollToContent=ct,this.getAnchorElement=J,this.getCurrentUrl=x,this.resolveUrl=mt,this.isSameResolvedUrl=dt,this.options=E(E({},this.defaults),r),this.handleLinkClick=this.handleLinkClick.bind(this),this.handlePopState=this.handlePopState.bind(this),this.cache=new U(this),this.classes=new q(this),this.hooks=new X(this),this.visit=this.createVisit({to:""}),this.currentHistoryIndex=null!==(e=null===(n=window.history.state)||void 0===n?void 0:n.index)&&void 0!==e?e:1,this.enable()}return v(t,[{key:"currentPageUrl",get:function(){return this.location.url}},{key:"enable",value:function(){try{var t,e=this,n=e.options.linkSelector;return e.clickDelegate=e.delegateEvent(n,"click",e.handleLinkClick),window.addEventListener("popstate",e.handlePopState),e.options.animateHistoryBrowsing&&(window.history.scrollRestoration="manual"),e.options.native=e.options.native&&!!document.startViewTransition,e.options.plugins.forEach((function(t){return e.use(t)})),"swup"!==(null===(t=window.history.state)||void 0===t?void 0:t.source)&&L(null,{index:e.currentHistoryIndex}),Promise.resolve(M()).then((function(){return Promise.resolve(e.hooks.call("enable",void 0,void 0,(function(){var t=document.documentElement;t.classList.add("swup-enabled"),t.classList.toggle("swup-native",e.options.native)}))).then((function(){}))}))}catch(r){return Promise.reject(r)}}},{key:"destroy",value:function(){try{var t=this;return t.clickDelegate.destroy(),window.removeEventListener("popstate",t.handlePopState),t.cache.clear(),t.options.plugins.forEach((function(e){return t.unuse(e)})),Promise.resolve(t.hooks.call("disable",void 0,void 0,(function(){var t=document.documentElement;t.classList.remove("swup-enabled"),t.classList.remove("swup-native")}
1))).then((function(){t.hooks.clear()}))}catch(e){return Promise.reject(e)}}},{key:"shouldIgnoreVisit",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=e.el,r=e.event,o=B.fromUrl(t),i=o.origin,a=o.url,s=o.hash;return i!==window.location.origin||!(!n||!this.triggerWillOpenNewWindow(n))||!!this.options.ignoreVisit(a+s,{el:n,event:r})}},{key:"handleLinkClick",value:function(t){var e=this,n=t.delegateTarget,r=B.fromElement(n),o=r.href,i=r.url,a=r.hash;if(!this.shouldIgnoreVisit(o,{el:n,event:t}))if(this.navigating&&i===this.visit.to.url)t.preventDefault();else{var s=this.createVisit({to:i,hash:a,el:n,event:t});t.metaKey||t.ctrlKey||t.shiftKey||t.altKey?this.hooks.callSync("link:newtab",s,{href:o}):0===t.button&&this.hooks.callSync("link:click",s,{el:n,event:t},(function(){var n,r=null!==(n=s.from.url)&&void 0!==n?n:"";t.preventDefault(),i&&i!==r?e.isSameResolvedUrl(i,r)||e.performNavigation(s):a?e.hooks.callSync("link:anchor",s,{hash:a},(function(){L(i+a),e.scrollToContent(s)})):e.hooks.callSync("link:self",s,void 0,(function(){"navigate"===e.options.linkToSelf?e.performNavigation(s):(L(i),e.scrollToContent(s))}))}))}}},{key:"handlePopState",value:function(t){var e,n,r,o,i=this,a=null!==(e=null===(n=t.state)||void 0===n?void 0:n.url)&&void 0!==e?e:window.location.href;if(!this.options.skipPopStateHandling(t)&&!this.isSameResolvedUrl(x(),this.location.url)){var s=B.fromUrl(a),c=s.url,u=s.hash,l=this.createVisit({to:c,hash:u,event:t});l.history.popstate=!0;var f=null!==(r=null===(o=t.state)||void 0===o?void 0:o.index)&&void 0!==r?r:0;f&&f!==this.currentHistoryIndex&&(l.history.direction=f-this.currentHistoryIndex>0?"forwards":"backwards",this.currentHistoryIndex=f),l.animation.animate=!1,l.scroll.reset=!1,l.scroll.target=!1,this.options.animateHistoryBrowsing&&(l.animation.animate=!0,l.scroll.reset=!0),this.hooks.callSync("history:popstate",l,{event:t},(function(){i.performNavigation(l)}))}}},{key:"triggerWillOpenNewWindow",value:function(t){return!!t.matches('[download], [target="_blank"]')}}]),t}();function gt(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function wt(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?gt(Object(n),!0).forEach((function(e){bt(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):gt(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function bt(t,e,n){return(e=jt(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function Pt(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var r,o,i,a,s=[],c=!0,u=!1;try{if(i=(n=n.call(t)).next,0===e){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=i.call(n)).done)&&(s.push(r.value),s.length!==e);c=!0);}catch(l){u=!0,o=l}finally{try{if(!c&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(u)throw o}}return s}}(t,e)||function(t,e){if(!t)return;if("string"===typeof t)return kt(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return kt(t,e)}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function kt(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function Ot(t){return Ot="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ot(t)}function St(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,jt(r.key),r)}}function jt(t){var e=function(t,e){if("object"!==Ot(t)||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,e||"default");if("object"!==Ot(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}
1(t,"string");return"symbol"===Ot(e)?e:String(e)}var Et=function(t){return String(t).split(".").map((function(t){return String(parseInt(t||"0",10))})).concat(["0","0"]).slice(0,3).join(".")},_t=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.isSwupPlugin=!0,this.swup=void 0,this.version=void 0,this.requires={},this.handlersToUnregister=[]}var e,n,r;return e=t,n=[{key:"mount",value:function(){}},{key:"unmount",value:function(){this.handlersToUnregister.forEach((function(t){return t()})),this.handlersToUnregister=[]}},{key:"_beforeMount",value:function(){if(!this.name)throw new Error("You must define a name of plugin when creating a class.")}},{key:"_afterUnmount",value:function(){}},{key:"_checkRequirements",value:function(){var t=this;return"object"!=Ot(this.requires)||Object.entries(this.requires).forEach((function(e){var n=Pt(e,2),r=n[0],o=n[1];if(!function(t,e,n){var r=function(t,e){var n;if("swup"===t)return null!==(n=e.version)&&void 0!==n?n:"";var r,o=e.findPlugin(t);return null!==(r=null===o||void 0===o?void 0:o.version)&&void 0!==r?r:""}(t,n);return!!r&&function(t,e){return e.every((function(e){var n,r,o=Pt(e.match(/^([\D]+)?(.*)$/)||[],3),i=o[1];return function(t,e){var n={"":function(t){return 0===t},">":function(t){return t>0},">=":function(t){return t>=0},"<":function(t){return t<0},"<=":function(t){return t<=0}};return(n[e]||n[""])(t)}((r=o[2],n=Et(n=t),r=Et(r),n.localeCompare(r,void 0,{numeric:!0})),i||">=")}))}(r,e)}(r,o=Array.isArray(o)?o:[o],t.swup)){var i="".concat(r," ").concat(o.join(", "));throw new Error("Plugin version mismatch: ".concat(t.name," requires ").concat(i))}})),!0}},{key:"on",value:function(t,e,n){var r;void 0===n&&(n={}),e=!(r=e).name.startsWith("bound ")||r.hasOwnProperty("prototype")?e.bind(this):e;var o=this.swup.hooks.on(t,e,n);return this.handlersToUnregister.push(o),o}},{key:"once",value:function(t,e,n){return void 0===n&&(n={}),this.on(t,e,wt(wt({},n),{},{once:!0}))}},{key:"before",value:function(t,e,n){return void 0===n&&(n={}),this.on(t,e,wt(wt({},n),{},{before:!0}))}},{key:"replace",value:function(t,e,n){return void 0===n&&(n={}),this.on(t,e,wt(wt({},n),{},{replace:!0}))}},{key:"off",value:function(t,e){return this.swup.hooks.off(t,e)}}],n&&St(e.prototype,n),r&&St(e,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();function Tt(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function At(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?Tt(Object(n),!0).forEach((function(e){xt(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Tt(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function xt(t,e,n){return(e=Nt(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function Ct(t,e){return Ct=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Ct(t,e)}function Lt(t){var e=function(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=It(t);if(e){var o=It(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return function(t,e){if(e&&("object"===Bt(e)||"function"===typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(this,n)}}function It(t){return It=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},It(t)}function Bt(t){return Bt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Bt(t)}function Dt(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Rt(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,Nt(r.key),r)}}function Ut(t,e,n){return e&&Rt(t.prototype,e),n&&Rt(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t}function Nt(t){var e=function(t,e){if("object"!==Bt(t)||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,e||"default");if("object"!==Bt(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}
1(t,"string");return"symbol"===Bt(e)?e:String(e)}var Vt=function(){function t(){var e=this,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=n.className,o=n.styleAttr,i=n.animationDuration,a=n.minValue,s=n.initialValue,c=n.trickleValue;Dt(this,t),this.value=0,this.visible=!1,this.hiding=!1,this.className="progress-bar",this.styleAttr="data-progressbar-styles data-swup-theme",this.animationDuration=300,this.minValue=.1,this.initialValue=.25,this.trickleValue=.03,this.trickleInterval=void 0,this.styleElement=void 0,this.progressElement=void 0,this.trickle=function(){var t=Math.random()*e.trickleValue;e.setValue(e.value+t)},void 0!==r&&(this.className=String(r)),void 0!==o&&(this.styleAttr=String(o)),void 0!==i&&(this.animationDuration=Number(i)),void 0!==a&&(this.minValue=Number(a)),void 0!==s&&(this.initialValue=Number(s)),void 0!==c&&(this.trickleValue=Number(c)),this.styleElement=this.createStyleElement(),this.progressElement=this.createProgressElement()}return Ut(t,[{key:"defaultStyles",get:function(){return"\n\t\t.".concat(this.className," {\n\t\t\tposition: fixed;\n\t\t\tdisplay: block;\n\t\t\ttop: 0;\n\t\t\tleft: 0;\n      width: 100%;\n\t\t\theight: 3px;\n\t\t\tbackground-color: black;\n\t\t\tz-index: 9999;\n\t\t\ttransition:\n\t\t\t\ttransform ").concat(this.animationDuration,"ms ease-out,\n\t\t\t\topacity ").concat(this.animationDuration/2,"ms ").concat(this.animationDuration/2,"ms ease-in;\n\t  transform: translate3d(0, 0, 0) scaleX(var(--progress, 0));\n      transform-origin: 0;\n\t\t}\n\t")}},{key:"show",value:function(){this.visible||(this.visible=!0,this.installStyleElement(),this.installProgressElement(),this.startTrickling())}},{key:"hide",value:function(){var t=this;this.visible&&!this.hiding&&(this.hiding=!0,this.fadeProgressElement((function(){t.uninstallProgressElement(),t.stopTrickling(),t.visible=!1,t.hiding=!1})))}},{key:"setValue",value:function(t){this.value=Math.min(1,Math.max(this.minValue,t)),this.refresh()}},{key:"installStyleElement",value:function(){document.head.prepend(this.styleElement)}},{key:"installProgressElement",value:function(){this.progressElement.style.setProperty("--progress",String(0)),this.progressElement.style.opacity="1",document.body.prepend(this.progressElement),this.progressElement.scrollTop=0,this.setValue(Math.random()*this.initialValue)}},{key:"fadeProgressElement",value:function(t){this.progressElement.style.opacity="0",setTimeout(t,1.5*this.animationDuration)}},{key:"uninstallProgressElement",value:function(){this.progressElement.remove()}},{key:"startTrickling",value:function(){this.trickleInterval||(this.trickleInterval=window.setInterval(this.trickle,this.animationDuration))}},{key:"stopTrickling",value:function(){window.clearInterval(this.trickleInterval),delete this.trickleInterval}},{key:"refresh",value:function(){var t=this;requestAnimationFrame((function(){t.progressElement.style.setProperty("--progress",String(t.value))}))}},{key:"createStyleElement",value:function(){var t=document.createElement("style");return this.styleAttr.split(" ").forEach((function(e){return t.setAttribute(e,"")})),t.textContent=this.defaultStyles,t}},{key:"createProgressElement",value:function(){var t=document.createElement("div");return t.className=this.className,t.setAttribute("aria-hidden","true"),t}}]),t}(),Mt=function(t){!function(t,e){if("function"!==typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Ct(t,e)}(n,t);var e=Lt(n);function n(){var t,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};Dt(this,n),(t=e.call(this)).name="SwupProgressPlugin",t.defaults={className:"swup-progress-bar",delay:300,transition:300,minValue:.1,initialValue:.25,finishAnimation:!0},t.options=void 0,t.progressBar=void 0,t.showProgressBarTimeout=void 0,t.hideProgressBarTimeout=void 0,t.options=At(At({},t.defaults),r);var o=t.options,i=o.className,a=o.minValue,s=o.initialValue,c=o.transition;return t.progressBar=new Vt({className:i,minValue:a,initialValue:s,animationDuration:c}),t}return Ut(n,[{key:"mount",value:function(){this.on("visit:start",this.startShowingProgress),this.on("page:view",this.stopShowingProgress)}},{key:"startShowingProgress",value:function(){this.progressBar.setValue(0),this.showProgressBarAfterDelay()}},{key:"stopShowingProgress",value:function(){this.progressBar.setValue(1),this.options.finishAnimation?this.finishAnimationAndHideProgressBar():this.hideProgressBar()}},{key:"showProgressBar",value:function(){this.cancelHideProgressBarTimeout(),this.progressBar.show()}},{key:"showProgressBarAfterDelay",value:function(){this.cancelShowProgressBarTimeout(),this.cancelHideProgressBarTimeout(),this.showProgressBarTimeout=window.setTimeout(this.showProgressBar.bind(this),this.options.delay)}},{key:"hideProgressBar",value:function(){this.cancelShowProgressBarTimeout(),this.progressBar.hide()}},{key:"finishAnimationAndHideProgressBar",value:function(){this.cancelShowProgressBarTimeout(),this.hideProgressBarTimeout=window.setTimeout(this.hideProgressBar.bind(this),this.options.transition)}},{key:"cancelShowProgressBarTimeout",value:function(){window.clearTimeout(this.showProgressBarTimeout),delete this.showProgressBarTimeout}},{key:"cancelHideProgressBarTimeout",value:function(){window.clearTimeout(this.hideProgressBarTimeout),delete this.hideProgressBarTimeout}}]),n}(_t);function zt(t){return zt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},zt(t)}function Ht(t){return function(t){if(Array.isArray(t))return qt(t)}(t)||function(t){if("undefined"!==typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(!t)return;if("string"===typeof t)return qt(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return qt(t,e)}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function qt(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function Ft(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function Wt(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};
1e%2?Ft(Object(n),!0).forEach((function(e){Gt(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Ft(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function Gt(t,e,n){return(e=Kt(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function $t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,Kt(r.key),r)}}function Kt(t){var e=function(t,e){if("object"!==zt(t)||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,e||"default");if("object"!==zt(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"===zt(e)?e:String(e)}function Yt(t,e){return Yt=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Yt(t,e)}function Xt(t){var e=function(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=Jt(t);if(e){var o=Jt(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return function(t,e){if(e&&("object"===zt(e)||"function"===typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(this,n)}}function Jt(t){return Jt=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Jt(t)}var Qt=function(t){!function(t,e){if("function"!==typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Yt(t,e)}(i,t);var e,n,r,o=Xt(i);function i(){var t,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,i),(t=o.call(this)).name="SwupBodyClassPlugin",t.requires={swup:">=4.6"},t.defaults={prefix:""},t.options=void 0,t.updateBodyClass=function(e){t.updateClassNames(document.body,e.to.document.body)},t.options=Wt(Wt({},t.defaults),e),t}return e=i,(n=[{key:"mount",value:function(){this.on("content:replace",this.updateBodyClass)}},{key:"updateClassNames",value:function(t,e){var n,r,o=this,i=Ht(t.classList).filter((function(t){return o.isValidClassName(t)})),a=Ht(e.classList).filter((function(t){return o.isValidClassName(t)}));(n=t.classList).remove.apply(n,Ht(i)),(r=t.classList).add.apply(r,Ht(a))}},{key:"isValidClassName",value:function(t){return t&&t.startsWith(this.options.prefix)}}])&&$t(e.prototype,n),r&&$t(e,r),Object.defineProperty(e,"prototype",{writable:!1}),i}(_t);function Zt(t){return Zt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Zt(t)}function te(t,e){var n="undefined"!==typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=function(t,e){if(!t)return;if("string"===typeof t)return ee(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return ee(t,e)}(t))||e&&t&&"number"===typeof t.length){n&&(t=n);var r=0,o=function(){};return{s:o,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,s=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return a=t.done,t},e:function(t){s=!0,i=t},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw i}}}}function ee(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function ne(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function re(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};
1e%2?ne(Object(n),!0).forEach((function(e){oe(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):ne(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function oe(t,e,n){return(e=ae(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function ie(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,ae(r.key),r)}}function ae(t){var e=function(t,e){if("object"!==Zt(t)||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,e||"default");if("object"!==Zt(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"===Zt(e)?e:String(e)}function se(t,e){return se=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},se(t,e)}function ce(t){var e=function(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=ue(t);if(e){var o=ue(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return function(t,e){if(e&&("object"===Zt(e)||"function"===typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(this,n)}}function ue(t){return ue=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},ue(t)}var le=function(t){!function(t,e){if("function"!==typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&se(t,e)}(i,t);var e,n,r,o=ce(i);function i(t){var e;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,i),void 0===t&&(t={}),(e=o.call(this)).name="SwupScriptsPlugin",e.requires={swup:">=4"},e.defaults={head:!0,body:!0,optin:!1},e.options=void 0,e.options=re(re({},e.defaults),t),e}return e=i,(n=[{key:"mount",value:function(){this.on("content:replace",this.runScripts)}},{key:"runScripts",value:function(){var t=this,e=this.options,n=e.head,r=e.body,o=e.optin,i=this.getScope({head:n,body:r});if(i){var a=Array.from(i.querySelectorAll(o?"script[data-swup-reload-script]":"script:not([data-swup-ignore-script])"));a.forEach((function(e){return t.runScript(e)})),this.swup.log("Executed ".concat(a.length," scripts."))}}},{key:"runScript",value:function(t){var e,n=document.createElement("script"),r=te(t.attributes);try{for(r.s();!(e=r.n()).done;){var o=e.value,i=o.name,a=o.value;n.setAttribute(i,a)}}catch(s){r.e(s)}finally{r.f()}return n.textContent=t.textContent,t.replaceWith(n),n}},{key:"getScope",value:function(t){var e=t.head,n=t.body;return e&&n?document:e?document.head:n?document.body:null}}])&&ie(e.prototype,n),r&&ie(e,r),Object.defineProperty(e,"prototype",{writable:!1}),i}(_t);function fe(t){return fe="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},fe(t)}function he(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function pe(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?he(Object(n),!0).forEach((function(e){me(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):he(Object(n)).forEac
1h((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function me(t,e,n){return(e=ve(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function de(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,ve(r.key),r)}}function ve(t){var e=function(t,e){if("object"!==fe(t)||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,e||"default");if("object"!==fe(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"===fe(e)?e:String(e)}function ye(t,e){return ye=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},ye(t,e)}function ge(t){var e=function(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=be(t);if(e){var o=be(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return function(t,e){if(e&&("object"===fe(e)||"function"===typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return we(t)}(this,n)}}function we(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function be(t){return be=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},be(t)}function Pe(t){return"title"!==t.localName&&!t.matches("[data-swup-theme]")}function ke(t,e){return t.outerHTML===e.outerHTML}function Oe(t){return t.matches("link[rel=stylesheet][href]")}var Se=function(t){!function(t,e){if("function"!==typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&ye(t,e)}(i,t);var e,n,r,o=ge(i);function i(){var t,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,i);var n=we(t=o.call(this));return t.name="SwupHeadPlugin",t.requires={swup:">=4.6"},t.defaults={persistTags:!1,persistAssets:!1,awaitAssets:!1,timeout:3e3},t.options=void 0,t.updateHead=function(t,e){!function(t){if(null==t)throw new TypeError("Cannot destructure "+t)}(e.page);try{var r=t.to.document,o=function(t,e){var n,r=(arguments.length>2&&void 0!==arguments[2]?arguments[2]:{}).shouldPersist,o=void 0===r?function(){return!1}:r,i=Array.from(t.children),a=Array.from(e.children),s=(n=i,a.reduce((function(t,e,r){return n.some((function(t){return ke(e,t)}))||t.push({el:e,index:r}),t}),[])),c=function(t,e){return t.reduce((function(t,n){return e.some((function(t){return ke(n,t)}))||t.push({el:n}),t}),[])}(i,a);return c.reverse().filter((function(t){return Pe(t.el)})).filter((function(t){var e=t.el;return!o(e)})).forEach((function(e){var n=e.el;return t.removeChild(n)})),s.filter((function(t){return Pe(t.el)})).forEach((function(e){var n=e.el,r=e.index,o=void 0===r?0:r;t.insertBefore(n.cloneNode(!0),t.children[o+1]||null)})),{removed:c.map((function(t){return t.el})),added:s.map((function(t){return t.el}))}}(document.head,r.head,{shouldPersist:function(t){return n.isPersistentTag(t)}}),i=o.removed,a=o.added;n.swup.log("Removed ".concat(i.length," / added ").concat(a.length," tags in head"));var s=(u=document.documentElement).lang!==(l=r.documentElement).lang?(u.lang=l.lang,u.lang):null;s&&n.swup.log("Updated lang attribute: ".concat(s));var c=function(){if(n.options.awaitAssets){var t=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return t.filter(Oe).map((function(t){return function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=function e(n){!function(t){var e=t.href;return Array.from(document.styleSheets).map((function(t){return t.href})).includes(e)}(t)?setTimeout((function(){return e(n)}),10):n()};return new Promise((function(t){n(t),e>0&&setTimeout(t,e)}))}(t,e)}))}(a,n.options.timeout),e=function(){if(t.length)return n.swup.log("Waiting for ".concat(t.length," assets to load")),Promise.resolve(Promise.all(t)).then((function(){}))}();if(e&&e.then)return e.then((function(){}))}}();return Promise.resolve(c&&c.then?c.then((function(){})):void 0)}catch(t){return Promise.reject(t)}var u,l},t.options=pe(pe({},t.defaults),e),t.options.persistAssets&&!t.options.persistTags&&(t.options.persistTags="link[rel=stylesheet], script[src], style"),t}return e=i,(n=[{key:"mount",value:function(){this.before("content:replace",this.updateHead)}},{key:"isPersistentTag",value:function(t){var e=this.options.persistTags;return"function"==typeof e?e(t):"string"==typeof e?t.matches(e):Boolean(e)}}])&&de(e.prototype,n),r&&de(e,r),Object.defineProperty(e,"prototype",{writable:!1}),i}(_t);function je(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function Ee(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};
1e%2?je(Object(n),!0).forEach((function(e){_e(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):je(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function _e(t,e,n){return(e=xe(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function Te(t){return Te="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Te(t)}function Ae(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,xe(r.key),r)}}function xe(t){var e=function(t,e){if("object"!==Te(t)||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,e||"default");if("object"!==Te(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"===Te(e)?e:String(e)}function Ce(t,e){return Ce=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Ce(t,e)}function Le(t){var e=function(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=Be(t);if(e){var o=Be(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return function(t,e){if(e&&("object"===Te(e)||"function"===typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return Ie(t)}(this,n)}}function Ie(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function Be(t){return Be=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Be(t)}function De(t){return function(t){if(Array.isArray(t))return Ne(t)}(t)||function(t){if("undefined"!==typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||Ue(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Re(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var r,o,i,a,s=[],c=!0,u=!1;try{if(i=(n=n.call(t)).next,0===e){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=i.call(n)).done)&&(s.push(r.value),s.length!==e);c=!0);}catch(l){u=!0,o=l}finally{try{if(!c&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(u)throw o}}return s}}(t,e)||Ue(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Ue(t,e){if(t){if("string"===typeof t)return Ne(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Ne(t,e):void 0}}function Ne(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function Ve(t,e){var n,r,o=(arguments.length>2&&void 0!==arguments[2]?arguments[2]:{}).stripEmptyParams,i=void 0!==o&&o,a=Me("method",t,e),s=Me("enctype",t,e),c="multipart/form-data"===s,u=Me("target",t,e,""),l=B.fromUrl(Me("action",t,e)),f=l.origin,h=l.href,p=new FormData(t,e);if("POST"===a&&(n=c?p:new URLSearchParams(p)),"GET"===a){var m=i?function(t){for(var e=new FormData,n=0,r=Array.from(t.entries());n<r.length;n++){var o=Re(r[n],2),i=o[0],a=o[1];""!==a&&e.append(i,a)}return e}(p):p;r=function(t,e){var n=[].concat(De(t.split(/(?=#)/)),[""]),r=n[0],o=n[1],i=r.split("?")[0],a=new URLSearchParams(e).toString();return a?"".concat(i,"?").concat(a).concat(o):i+o}(h,m)}else r=h;var d=B.fromUrl(r);return{origin:f,action:h,href:r,url:d.url,hash:d.hash,method:a,target:u,data:p,body:n,encoding:s}}function Me(t,e,n,r){var o,i;return function(t,e){switch(t){case"action":return null!==e&&void 0!==e?e:x();case"method":return(e||"get").toUpperCase();case"enctype":return(e||"application/x-www-form-urlencoded").toLowerCase();default:return null!==e&&void 0!==e?e:null}}(t,null!==(o=null!==(i=null===n||void 0===n?void 0:n.getAttribute("form".concat(t)))&&void 0!==i?i:e.getAttribute(t))&&void 0!==o?o:r)}var ze=function(t){!function(t,e){if("function"!==typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Ce(t,e)}(i,t);var e,n,r,o=Le(i);function i(){var t,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,i),(t=o.call(this)).name="SwupFormsPlugin",t.requires={swup:">=4"},t.defaults={formSelector:"form[data-swup-form]",inlineFormSelector:"form[data-swup-inline-form]",stripEmptyParams:!1},t.options=void 0,t.specialKeys=void 0,t.formSubmitDelegate=void 0,t.prepareInlineForms=function(e){var n=e.trigger.el;if(null!==n&&void 0!==n&&n.matches(t.options.inlineFormSelector))if(n.id){var r="#".concat(n.id);e.containers=[r],e.animation.scope="containers",e.animation.selector=r,e.scroll.target=r;var o=e.a11y;"object"==Te(o)&&(o.focus=r)}else console.error("[@swup/forms-plugin] inline forms must have an id attribute:",n)},t.options=Ee(Ee({},t.defaults),e),t.specialKeys=function(t){var e={};function n(){e={}}function r(n){var r=n.key;t.includes(r)&&(e[r]=!0)}function o(n){var r=n.key;t.includes(r)&&(e[r]=!1)}function i(){n()}
1return{watch:function(){document.addEventListener("keydown",r),document.addEventListener("keyup",o),window.addEventListener("blur",i)},unwatch:function(){document.removeEventListener("keydown",r),document.removeEventListener("keyup",o),document.removeEventListener("blur",i),n()},get pressed(){return Object.values(e).filter(Boolean).length>0}}}(["Meta","Control","Shift"]),t.beforeFormSubmit=t.beforeFormSubmit.bind(Ie(t)),t}return e=i,(n=[{key:"mount",value:function(){this.swup.hooks.create("form:submit"),this.swup.hooks.create("form:submit:newtab"),this.specialKeys.watch(),this.formSubmitDelegate=this.swup.delegateEvent(this.options.formSelector,"submit",this.beforeFormSubmit,{capture:!0}),this.on("visit:start",this.prepareInlineForms,{priority:1})}},{key:"unmount",value:function(){var t;null!==(t=this.formSubmitDelegate)&&void 0!==t&&t.destroy(),this.specialKeys.unwatch()}},{key:"beforeFormSubmit",value:function(t){var e=this,n=this.swup,r=t.delegateTarget,o=Ve(r,t.submitter),i=o.href,a=o.url,s=o.hash,c=o.target,u=this.specialKeys.pressed,l="_blank"===c,f=u||l,h=n.createVisit({to:a,hash:s,el:r,event:t});if(f||!n.shouldIgnoreVisit(i,{el:r,event:t}))if(l)n.hooks.callSync("form:submit:newtab",h,{el:r,event:t});else if(u){n.hooks.callSync("form:submit:newtab",h,{el:r,event:t});var p=function(t){var e=t.getAttribute("target")||"";return t.setAttribute("target","_blank"),function(){e?t.setAttribute("target",e):t.removeAttribute("target")}}(r);r.addEventListener("submit",(function(){return setTimeout(p)}),{once:!0})}else n.hooks.callSync("form:submit",h,{el:r,event:t},(function(){e.submitForm(t)}))}},{key:"submitForm",value:function(t){var e=t.delegateTarget,n=Ve(e,t.submitter,{stripEmptyParams:this.options.stripEmptyParams}),r=n.href,o=n.method,i=n.body;["GET","POST"].includes(o)?(t.preventDefault(),this.swup.navigate(r,{method:o,body:i,cache:{read:!1,write:!0}},{el:e,event:t})):console.warn("Unsupported form method: ".concat(o))}}])&&Ae(e.prototype,n),r&&Ae(e,r),Object.defineProperty(e,"prototype",{writable:!1}),i}(_t);function He(t){return He="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},He(t)}!function(){var t=window.BroadcastChannel;if(t&&!t.prototype.postMessage.__rnzGuarded){var e=t.prototype.postMessage;t.prototype.postMessage=function(){if(!this||!this.closed)try{for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return e.apply(this,n)}catch(o){if(o&&"object"===He(o)&&"InvalidStateError"===o.name)return;throw o}},t.prototype.postMessage.__rnzGuarded=!0}}();var qe=["[download]",'[target="_blank"]',"[data-no-swup]",'[href$=".pdf"]','[href*=".pdf?"]','[href$=".rss"]','[href$=".xml"]','[href^="/podcasts"]','[href^="/podcast"]','[href^="/life"]','[href^="/video"]','[href^="'.concat(window.location.origin,'/podcasts"]'),'[href^="'.concat(window.location.origin,'/podcast"]'),'[href^="'.concat(window.location.origin,'/life"]'),'[href^="'.concat(window.location.origin,'/video"]'),'[href="/"]','[href^="/news/political/"]','[href^="/news/politics/"]','[href^="/news/world/"]','[href^="/news/crime-and-justice/"]','[href^="/news/business/"]','[href^="/news/health/"]','[href^="/news/education/"]','[href^="/news/environment/"]','[href^="/news/community/"]','[href^="/news/country/"]','[href^="/news/weather/"]','[href^="/news/te-ao-maori/"]','[href^="/news/te-manu-korihi/"]','[href^="/news/pacific/"]','[href^="/news/indonz/"]','[href^="/news/chinese/"]','[href^="/news/personal-finance/"]','[href^="/news/sport/"]','[href^="/news/science-and-technology/"]','[href^="/news/emergencies/"]','[href^="/news/emergency/"]','[href^="/news/regional/"]','[href^="/news/national/"]','[href^="/news/thedetail/"]','[href^="/news/in-depth/"]','[href^="/international/pacific-news/"]','[href^="/news/environment_climate/"]','[href^="/news/emergencies_national/"]','[href^="/news/business_media/"]','[href^="/news/regions_wellington/"]','[href^="/news/pacific_federated-states-of-micronesia/"]','[href^="/news/pacific_hawaii/"]','[href^="/news/regions_northland/"]','[href^="/news/indonz_featured/"]','[href^="/news/indonz-featured/"]','[href^="/news/pacific_northern-marianas/"]','[href^="/news/pacific_french-polynesia/"]','[href^="/news/regions_taranaki/"]','[href^="/news/pacific_solomon-islands/"]','[href^="/news/chinese_english/"]','[href^="/news/chinese-english/"]','[href^="/news/chinese_featured/"]','[href^="/news/chinese-featured/"]','[href^="/news/pacific_pitcairn/"]','[href^="/news/regions_southland/"]','[href^="/news/regions_waikato/"]','[href^="/news/pacific_samoa/"]','[href^="/news/pacific_vanuatu/"]','[href^="/news/regions_otago/"]','[href^="/news/pacific_west-papua/"]','[href^="/news/pacific_guam/"]','[href^="/news/pacific_fiji/"]','[href^="/news/regions_gisborne/"]','[href^="/news/pacific_tuvalu/"]','[href^="/news/regions_canterbury/"]','[href^="/news/regions_manawatu-whanganui/"]','[href^="/news/pacific_bougainville/"]','[href^="/news/regions_bay-of-plenty/"]','[href^="/news/pacific_kiribati/"]','[href^="/news/pacific_marshall-islands/"]','[href^="/news/pacific_wallis-and-futuna/"]','[href^="/news/regions_auckland/"]','[href^="/news/emergencie
1s_local/"]','[href^="/news/pacific_niue/"]','[href^="/news/pacific_palau/"]','[href^="/news/regions_local-democracy-reporting/"]','[href^="/news/regions_marlborough/"]','[href^="/news/pacific_american-samoa/"]','[href^="/news/pacific_new-caledonia/"]','[href^="/news/pacific_easter-island/"]','[href^="/news/pacific_nauru/"]','[href^="/news/pacific_papua-new-guinea/"]','[href^="/news/pacific_norfolk-island/"]','[href^="/news/regions_west-coast/"]','[href^="/news/pacific_tonga/"]','[href^="/news/chinese_feature/"]','[href^="/news/regions_nelson/"]','[href^="/news/pacific_tokelau/"]','[href^="/news/regions_hawkes-bay/"]','[href^="/news/pacific_cook-islands/"]','[href^="/news/regions_tasman/"]','[href^="/news/politics_election-2026/"]'].map((function(t){return":not(".concat(t,")")})).join("")+["/national/programmes/atthemovies","/international/programmes/datelinepacific","/programmes/black-sheep","/national/programmes/countrylife","/national/programmes/focusonpolitics","/national/programmes/mediawatch","/national/programmes/musicalchairs","/national/programmes/ourchangingworld","/national/programmes/spectrum","/national/programmes/thesampler","/national/programmes/enzology","/national/programmes/flyingnunrecords","/national/programmes/blerta","/national/programmes/smart_talk","/national/programmes/introducing","/national/programmes/secretlife","/national/programmes/essentialnzalbums","/international/programmes/tagata-o-te-moana","/national/programmes/the-mixtape","/national/programmes/voices","/national/programmes/eyewitness","/national/programmes/a-history-of-student-radio","/programmes/a-wrinkle-in-time","/programmes/my-heels-are-killing-me","/programmes/monday-politics","/programmes/oldest-profession","/programmes/from-zero","/programmes/go-ahead-caller","/programmes/the-science-of","/programmes/public-enemy","/programmes/great-ideas","/national/programmes/the-house","/programmes/iceberg","/programmes/the-9th-floor","/programmes/healthy-or-hoax","/programmes/slice-of-heaven","/programmes/flying-solo","/programmes/caucus","/programmes/are-we-there-yet","/programmes/bang","/national/programmes/crowded-house","/programmes/the-long-walk","/programmes/the-lost","/programmes/nz-wars","/programmes/pants-on-fire","/programmes/your-money","/programmes/it-takes-a-village","/programmes/gone-fishing","/programmes/kiwaha","/programmes/beyond-kate","/programmes/eating-fried-chicken","/programmes/sportsman-of-the-year","/programmes/kakapo-files","/programmes/elemental","/programmes/the-worst-sitcom-ever-made","/programmes/nanogirls-great-science-adventures","/programmes/the-detail","/programmes/conversations-with-my-immigrant-parents","/programmes/matangireia","/programmes/killjoy","/programmes/nzwars-waitara","/programmes/hekakanoahau","/programmes/white-silence","/programmes/the-aotearoa-history-show","/programmes/best-of-storytime-rnz","/programmes/getting-better","/programmes/widows-of-shuhada","/programmes/coastwatchers","/programmes/the-guest-house","/programmes/the-citizens-handbook","/programmes/post-covid-podcast","/programmes/the-service","/programmes/sa-ili-malo","/programmes/crimes-nz","/programmes/the-unthinkable","/programmes/only-human","/
1programmes/party-people","/programmes/fragments-firsthand-accounts-of-the-february-2011-earthquake","/programmes/nzwars-tainui","/programmes/short-story-stack","/programmes/inside-the-bubble","/programmes/fight-for-the-wild","/programmes/generation-covid","/programmes/untold-pacific-history","/programmes/bob-dylan-nz","/programmes/sci-fi-sci-fact","/programmes/red-line","/programmes/re_covering","/programmes/hair-and-loathing","/programmes/the-elephant-in-the-bedroom","/programmes/let-s-be-transparent","/programmes/news-to-me","/programmes/whakamaori","/programmes/mr-lyttle-meetsmr-big","/programmes/deer-wars","/programmes/fair-game","/programmes/did-titanic-sink","/programmes/the-art-of-entertaining","/programmes/nau-mai-town","/programmes/conviction-the-christchurch-civic-creche-case","/programmes/nz-wars-stories-of-wairau","/programmes/mata-with-mihingarangi-forbes","/programmes/mapuna-podcast","/programmes/the-tahi","/programmes/undercurrent-podcast","/programmes/uncle-bertie","/programmes/the-river","/programmes/kim-hill-collection","/programmes/its-personal-with-anika-moa","/programmes/voice-of-tangaroa","/programmes/nellies-baby","/programmes/suzy-and-friends","/programmes/30-with-guyon-espiner","/programmes/nz-sporting-history","/programmes/music-101-interviews","/programmes/nz-wars-stories-of-tauranga-moana","/programmes/thrift"].map((function(t){return':not([href^="'.concat(t,'"])')})).join(""),Fe=new yt({linkSelector:["a[href]"].map((function(t){return"".concat(t).concat(qe)})).join(","),animationSelector:!1,plugins:[new Mt,new Qt,new Se,new le,new ze]});Fe.cache.set(Fe.getCurrentUrl(),{url:Fe.getCurrentUrl(),html:document.documentElement.outerHTML});var We=["".concat(window.location.origin),"".concat(window.location.origin,"/podcasts"),"".concat(window.location.origin,"/video"),"".concat(window.location.origin,"/life"),"".concat(window.location.origin,"/life/screens"),"".concat(window.location.origin,"/life/books"),"".concat(window.location.origin,"/life/culture"),"".concat(window.location.origin,"/life/food"),"".concat(window.location.origin,"/life/music"),"".concat(window.location.origin,"/life/wellbeing"),"".concat(window.location.origin,"/life/lifestyle"),"".concat(window.location.origin,"/life/relationships"),"".concat(window.location.origin,"/life/people")],Ge=function(t){document.querySelector(t).shadowRoot.addEventListener("click",(function(t){var e=t.target.closest("a");e&&(We.includes(e.href)||e.href!=="".concat(window.location.origin,"/")&&(t.preventDefault(),Fe.navigate(e.href)))}))};function $e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:10;window.nSdkInstance&&1==window.nSdkInstance.initialized?Ke():t>0?setTimeout((function(){return $e(t-1)}),500):console.warn("nSdkInstance did not initialize after waiting.")}var Ke=function(){if(window.nSdkInstance&&1==window.nSdkInstance.initialized){var t=window.staticMetadataObject;window.nSdkInstance.ggPM("staticend",t),t.referrerURL=t.pageURL||window.location,t.pageURL="page_"+window.location,t.assetid="".concat(window.location.pathname),window.nSdkInstance.ggPM("staticstart",t),window.staticMetadataObject=t}},Ye=function(){var t,e,n=window._sf_async_config||{},r=window.location.pathname.replace(/^\//,"").split("/");r=["national","international","concert"].includes(r[0].toLowerCase())?r.slice(0,3):r.slice(0,2),n.sections=r.join(","),n.authors=(null===(t=document.getElementById("page-authors"))||void 0===t?void 0:t.value)||"",n.title=(null===(e=document.getElementsByTagName("title")[0])||void 0===e?void 0:e.innerHTML)||"",window._sf_async_config=n},Xe=function(t){var e=document.createElement("script"),n=document.getElementsByTagName("script")[0];e.type="text/javascript",e.async=!0,e.src=t,n.parentNode.insertBefore(e,n)},Je=function(t){t&&(t.disconnectedCallback(),t.connectedCallback())},Qe=function(){var t;(t=window._sf_async_config||{}).uid=65651,t.domain=window.location.hostname.includes("staging")?"www.staging.rnz.co.nz":"www.radionz.co.nz",t.flickerControl=!1,t.useCanonical=!0,window._sf_async_config=t,window._sf_startpt=(new Date).getTime(),Ye(),Xe("//static.chartbeat.com/js/chartbeat_mab.js"),Xe("//static.chartbeat.com/js/chartbeat.js"),new ds07o6pcmkorn({openElementId:"#shielded-logo",modalID:"shielded-site-modal"}).init(),Ge("rnz-site-header"),Ge("rnz-sub-navigation"),Ge("rnz-site-footer"),function(t,e){if(document.querySelector('script[src$="'.concat(t,'"]')))e();else{new MutationObserver((function(n,r){var o=document.querySelector('script[src$="'.concat(t,'"]'));o&&(r.disconnect(),o.addEventListener("load",(function(){e()})))})).observe(document,{childList:!0,subtree:!0})}}("nlsSDK600.bundle.min.js",(function(){!function(){Je(document.getElementById("rnz-site-header")),Je(document.getElementById("rnz-sub-navigation")),Je(document.getElementById("rnz-site-footer")),Je(document.getElementById("rnz-queue-player")),Je(document.getElementById("rnz-lifestyle-promo")),Je(document.getElementById("rnz-podcasts-promo"));for(var t=document.getElementsByTagName("rnz-queue-media"),e=0;e<t.length;e++)Je(t[e])}(),$e()}))};document.addEventListener("DOMContentLoaded",(function(){Qe()})),Fe.hooks.on("page:view",(function(t){Fe&&Fe.cache&&"function"===typeof Fe.cache.clear&&Fe.cache.clear(),Ke(),function(t){if(window.pSUPERFLY){Ye();var e=window._sf_async_config||{};window.pSUPERFLY.virtualPage({section:e.sections,authors:e.authors,path:t.to.url,title:e.title,referrerURL:"".concat(window.location.host).concat(t.from.url)})}}
1(t),US24CreatePollingChart(),window.FlourishLoaded=!1})),Fe.hooks.on("content:replace",(function(t){!function(t){var e=document.getElementById("swup"),n=document.getElementById("rnz-site-header"),r=document.getElementById("rnz-sub-navigation");if(e&&t&&t.from){var o=t.from.url,i=e.getAttribute("data-route");n&&"function"===typeof n.attributeChangedCallback&&n.attributeChangedCallback("route",o,i),r&&"function"===typeof r.attributeChangedCallback&&r.attributeChangedCallback("route",o,i)}}(t)}))},55:function(t,e){t.exports=function(t){return t.webpackPolyfill||(t.deprecate=function(){},t.paths=[],t.children||(t.children=[]),Object.defineProperty(t,"loaded",{enumerable:!0,get:function(){return t.l}}),Object.defineProperty(t,"id",{enumerable:!0,get:function(){return t.i}}),t.webpackPolyfill=1),t}},71:function(t,e,n){(function(t){function e(t){return e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},e(t)}var n=function(t){"use strict";var n,r=Object.prototype,o=r.hasOwnProperty,i="function"===typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",s=i.asyncIterator||"@@asyncIterator",c=i.toStringTag||"@@toStringTag";function u(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{u({},"")}catch(L){u=function(t,e,n){return t[e]=n}}function l(t,e,n,r){var o=e&&e.prototype instanceof y?e:y,i=Object.create(o.prototype),a=new A(r||[]);return i._invoke=function(t,e,n){var r=h;return function(o,i){if(r===m)throw new Error("Generator is already running");if(r===d){if("throw"===o)throw i;return C()}for(n.method=o,n.arg=i;;){var a=n.delegate;if(a){var s=E(a,n);if(s){if(s===v)continue;return s}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(r===h)throw r=d,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r=m;var c=f(t,e,n);if("normal"===c.type){if(r=n.done?d:p,c.arg===v)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(r=d,n.method="throw",n.arg=c.arg)}}}(t,n,a),i}function f(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(L){return{type:"throw",arg:L}}}t.wrap=l;var h="suspendedStart",p="suspendedYield",m="executing",d="completed",v={};function y(){}function g(){}function w(){}var b={};u(b,a,(function(){return this}));var P=Object.getPrototypeOf,k=P&&P(P(x([])));k&&k!==r&&o.call(k,a)&&(b=k);var O=w.prototype=y.prototype=Object.create(b);function S(t){["next","throw","return"].forEach((function(e){u(t,e,(function(t){return this._invoke(e,t)}))}))}function j(t,n){function r(i,a,s,c){var u=f(t[i],t,a);if("throw"!==u.type){var l=u.arg,h=l.value;return h&&"object"===e(h)&&o.call(h,"__await")?n.resolve(h.__await).then((function(t){r("next",t,s,c)}),(function(t){r("throw",t,s,c)})):n.resolve(h).then((function(t){l.value=t,s(l)}),(function(t){return r("throw",t,s,c)}))}c(u.arg)}var i;this._invoke=function(t,e){function o(){return new n((function(n,o){r(t,e,n,o)}))}return i=i?i.then(o,o):o()}}function E(t,e){var r=t.iterator[e.method];if(r===n){if(e.delegate=null,"throw"===e.method){if(t.iterator.return&&(e.method="return",e.arg=n,E(t,e),"throw"===e.method))return v;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return v}var o=f(r,t.iterator,e.arg);if("throw"===o.type)return e.method="throw",e.arg=o.arg,e.delegate=null,v;var i=o.arg;return i?i.done?(e[t.resultName]=i.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=n),e.delegate=null,v):i:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,v)}function _(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function T(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function A(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(_,this),this.reset(!0)}function x(t){if(t){var e=t[a];if(e)return e.call(t);if("function"===typeof t.next)return t;if(!isNaN(t.length)){var r=-1,i=function e(){for(;++r<t.length;)if(o.call(t,r))return e.value=t[r],e.done=!1,e;return e.value=n,e.done=!0,e};return i.next=i}}return{next:C}}function C(){return{value:n,done:!0}}return g.prototype=w,u(O,"constructor",w),u(w,"constructor",g),g.displayName=u(w,c,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"===typeof t&&t.constructor;return!!e&&(e===g||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,w):(t.__proto__=w,u(t,c,"GeneratorFunction")),t.prototype=Object.create(O),t},t.awrap=function(t){return{__await:t}},S(j.prototype),u(j.prototype,s,(function(){return this})),t.AsyncIterator=j,t.async=function(e,n,r,o,i){void 0===i&&(i=Prom
vendor: 2,858 bytes, lines 1-2
1ise);var a=new j(l(e,n,r,o),i);return t.isGeneratorFunction(n)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},S(O),u(O,c,"Generator"),u(O,a,(function(){return this})),u(O,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e=[];for(var n in t)e.push(n);return e.reverse(),function n(){for(;e.length;){var r=e.pop();if(r in t)return n.value=r,n.done=!1,n}return n.done=!0,n}},t.values=x,A.prototype={constructor:A,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=n,this.done=!1,this.delegate=null,this.method="next",this.arg=n,this.tryEntries.forEach(T),!t)for(var e in this)"t"===e.charAt(0)&&o.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=n)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function r(r,o){return s.type="throw",s.arg=t,e.next=r,o&&(e.method="next",e.arg=n),!!o}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],s=a.completion;if("root"===a.tryLoc)return r("end");if(a.tryLoc<=this.prev){var c=o.call(a,"catchLoc"),u=o.call(a,"finallyLoc");if(c&&u){if(this.prev<a.catchLoc)return r(a.catchLoc,!0);if(this.prev<a.finallyLoc)return r(a.finallyLoc)}else if(c){if(this.prev<a.catchLoc)return r(a.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return r(a.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;n>=0;--n){var r=this.tryEntries[n];if(r.tryLoc<=this.prev&&o.call(r,"finallyLoc")&&this.prev<r.finallyLoc){var i=r;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,v):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),v},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),T(n),v}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var o=r.arg;T(n)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:x(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=n),v}},t}("object"===e(t)?t.exports:{});try{regeneratorRuntime=n}catch(r){"object"===("undefined"===typeof globalThis?"undefined":e(globalThis))?globalThis.regeneratorRuntime=n:Function("r","regeneratorRuntime = r")(n)}}).call(this,n(55)(t))}});
2//# sourceMappingURL=application-e4ca497bc03044d0caa5.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.