(()=>{"use strict";const t=function(t){return"string"!=typeof t||""===t?(console.error("The namespace must be a non-empty string."),!1):!!/^[a-zA-Z][a-zA-Z0-9_.\-\/]*$/.test(t)||(console.error("The namespace can only contain numbers, letters, dashes, periods, underscores and slashes."),!1)},n=function(t){return"string"!=typeof t||""===t?(console.error("The hook name must be a non-empty string."),!1):/^__/.test(t)?(console.error("The hook name cannot begin with `__`."),!1):!!/^[a-zA-Z][a-zA-Z0-9_.-]*$/.test(t)||(console.error("The hook name can only contain numbers, letters, dashes, periods and underscores."),!1)},e=function(e,o){return function(i,r,s,c=10){const l=e[o];if(!n(i))return;if(!t(r))return;if("function"!=typeof s)return void console.error("The hook callback must be a function.");if("number"!=typeof c)return void console.error("If specified, the hook priority must be a number.");const a={callback:s,priority:c,namespace:r};if(l[i]){const t=l[i].handlers;let n;for(n=t.length;n>0&&!(c>=t[n-1].priority);n--);n===t.length?t[n]=a:t.splice(n,0,a),l.__current.forEach((t=>{t.name===i&&t.currentIndex>=n&&t.currentIndex++}))}else l[i]={handlers:[a],runs:0};"hookAdded"!==i&&e.doAction("hookAdded",i,r,s,c)}},o=function(e,o,i=!1){return function(r,s){const c=e[o];if(!n(r))return;if(!i&&!t(s))return;if(!c[r])return 0;let l=0;if(i)l=c[r].handlers.length,c[r]={runs:c[r].runs,handlers:[]};else{const t=c[r].handlers;for(let n=t.length-1;n>=0;n--)t[n].namespace===s&&(t.splice(n,1),l++,c.__current.forEach((t=>{t.name===r&&t.currentIndex>=n&&t.currentIndex--})))}return"hookRemoved"!==r&&e.doAction("hookRemoved",r,s),l}},i=function(t,n){return function(e,o){const i=t[n];return void 0!==o?e in i&&i[e].handlers.some((t=>t.namespace===o)):e in i}},r=function(t,n,e=!1){return function(o,...i){const r=t[n];r[o]||(r[o]={handlers:[],runs:0}),r[o].runs++;const s=r[o].handlers;if(!s||!s.length)return e?i[0]:void 0;const c={name:o,currentIndex:0};for(r.__current.push(c);c.currentIndex{this.initBlock(n)}))}}isBlockRequiresInit(t){let n=void 0===t.dataset.jetInited;const e=this.getBlockName(t);return n&&this.blocksConditions[e]&&(n=this.blocksConditions[e](t)),n}initBlock(t,n){n=n||!1;const e=this.hookNameFromBlock(t);if(e&&this.hasHandlers(e)){let o=n;o||(o=this.isBlockRequiresInit(t)),o&&(this.hooks.doAction(e,jQuery(t)),t.dataset.jetInited=!0)}}hasHandlers(t){return!!this.hooks.actions[t]&&!(!this.hooks.actions[t].handlers||!this.hooks.actions[t].handlers.length)}registerBlockHandlers(t){const n=this.getBlockName(t.block);this.hooks.addAction(this.hookNameFromBlock(n),`${this.globalNamespace}/${t.block}`,t.callback),t.condition&&"function"==typeof t.condition&&(this.blocksConditions[n]=t.condition)}bulkBlocksInit(t){for(var n=0;n