// source --> https://liqueurs-granier.fr/assets/plugins/chronopost/public/js/chronoprecise.plugin.js?ver=1.2.1 
;(function($) {

	$.chronoprecise = function(el, options) {

		var defaults = {
			navHtml: '<header class="rdvCarouselheader" id="rdvCarouselheader"><nav><a href="#" class="carousel-control prev" rel="prev">%prev_week_txt%</a><a href="#" class="carousel-control next" rel="next">%next_week_txt%</a></nav></header>'
		}

		var plugin = this;

		plugin.settings = {}

		var init = function() {
			plugin.firstLoaded = false;
			plugin.selectRdv = false;
			plugin.settings = $.extend({}, defaults, options);
			plugin.el = el;
			plugin.currentScreen = 1;
			plugin.totalScreen = $(plugin.el).find('#rdvCarouselContent .slide').length;
			plugin.initNavigation();
			plugin.initEvents();
			plugin.initMobileEvents();
			plugin.firstLoaded = true;
		}

		plugin.reload = function() {
			plugin.el = el;
			plugin.firstLoaded = true;
			plugin.currentScreen = 1;
			plugin.totalScreen = $(plugin.el).find('#rdvCarouselContent .slide').length;
			plugin.initNavigation();
			plugin.resetEvents();
			plugin.initEvents();
			plugin.initMobileEvents();
		}

		plugin.initEvents = function() {
			$(document.body).on('updated_checkout', function () {
				plugin.current_shipping_method = $('input[name="shipping_method[0]"]:checked').val();
				plugin.isActive = $('.appointment-link').length ? true : false;

				if (plugin.getShipAddress() != plugin.currentAddress && !plugin.loadingRdv && plugin.isActive && ! plugin.selectRdv) {
					plugin.loadingRdv = true,
						shipping_method = $('.appointment-link').closest('li').find('input[name="shipping_method[0]"]').val();
					$.ajax({
						type: 'POST',
						dataType: 'json',
						url: Chronoprecise.ajaxurl,
						cache: false,
						data: {
							'action': 'load_chronoprecise_appointment',
							'method_id' : shipping_method,
							'chrono_nonce' : Chronoprecise.chrono_nonce
						}
					})
						.done(function(output) {
							$('#outer-container-method-chronoprecise').html($(output.data).filter('#outer-container-method-chronoprecise').html());
							plugin.loadingRdv = false;
							$('#outer-container-method-chronoprecise').data('chronoprecise').reload();
							$(document).trigger('chronoprecise:slot_loaded');
							plugin.getScreen(plugin.currentScreen);
						});
				}
				setTimeout(function () {
					plugin.selectRdv = false;
				}, 200);
			});

			if (plugin.firstLoaded == false) {
				$(document.body).on('click', '.appointment-link a', function() {
					if (typeof plugin.loadingRdv != 'undefined' && plugin.loadingRdv) {
						$(document).on('chronoprecise:slot_loaded', function() {
							plugin.showFancybox();
							$(document).off('chronoprecise:slot_loaded');
						});
					} else {
						plugin.showFancybox();
					}
				});
			}

			$(document.body).on('click', '.shipping_method_chronopostprecise', function() {
				plugin.selectRdv = true;
				plugin.selectChronopostSrdvSlot(this);
			});

			$(document.body).on('click', '#container-method-chronoprecise .carousel-control', function(event) {
				event.preventDefault();
				if (!$(this).is('.inactive')) {
					plugin.currentScreen = $(this).is('.next') ? plugin.currentScreen + 1 : plugin.currentScreen - 1;
					plugin.getScreen(plugin.currentScreen);
				}
			});
		}

		plugin.showFancybox = function() {
			$.fancybox.open({
				src  : '#container-method-chronoprecise',
				type : 'inline',
				// Clicked on the slide
				clickSlide : false,
				// Clicked on the background (backdrop) element
				touch: false
			});
		}

		plugin.resetEvents = function() {
			//$( document.body ).off( 'updated_checkout');
			$(plugin.el).off('click', '.shipping_method_chronopostprecise');
			$(plugin.el).off('click', '#rdvCarouselheader .carousel-control');
			$('#global-mobile').off('click', 'th');
		}


		plugin.initMobileEvents = function() {
			$('#global-mobile').on('click', 'th', function(event){
				event.preventDefault();
				var $this = $(this);

				$('#global-mobile th').removeClass('active');
				$this.addClass('active');

				$('#time-list ul').hide();
				var idUlHoraireDay = $this.attr('id').replace("th","ul");
				$('#'+idUlHoraireDay).show();
			});
			$('#global-mobile th').eq(0).click();
		}

		var dateLeadingZero = function(date){
			return ('0' + date).slice(-2);
		}

		plugin.initNavigation = function() {
			plugin.settings.navHtml = plugin.settings.navHtml.replace('%prev_week_txt%', Chronoprecise.prev_week_txt).replace('%next_week_txt%', Chronoprecise.next_week_txt);
			if (plugin.totalScreen > 1) {
				$(plugin.el).find('#rdvCarousel').before(plugin.settings.navHtml);
			}
			plugin.getScreen(plugin.currentScreen);
		}

		plugin.getScreen = function(nb) {

			$('#rdvCarouselContent .slide')
				.removeClass('slide-active')
				.eq(nb - 1)
				.addClass('slide-active');
			$('#rdvCarouselheader .carousel-control')
				.removeClass('inactive')
			if (nb == 1) {
				$('#rdvCarouselheader .carousel-control.prev')
					.addClass('inactive');
			} else if (nb == plugin.totalScreen) {
				$('#rdvCarouselheader .carousel-control.next')
					.addClass('inactive');
			}
		}

		plugin.selectChronopostSrdvSlot = function(element) {

			$('#container-method-chronoprecise').addClass('slot-selected');

			var slotValue = $(element).data('slotvaluejson');

			var d = new Date(slotValue.deliveryDate);

			var thID = '#th_'+dateLeadingZero(d.getDate());
			thID += '-'+dateLeadingZero((d.getMonth() + 1));
			thID += '-'+d.getFullYear();

			$("#rdvCarousel .active").removeClass("active");

			var td = $(element).closest("td");
			var tr = td.closest("tr");
			var th = tr.find('th');

			th.addClass("active");
			$(thID).addClass("active");


			$("#global-mobile ul li.active").removeClass("active");

			var li = $(element).closest("li");
			li.addClass("active");

			$('#chronopostprecise_creneaux_info').val(JSON.stringify(slotValue)).trigger('chronoprecise:appointment_changed');
			setTimeout(function() {
				jQuery( document.body ).trigger( 'update_checkout', { update_shipping_method: true });
			}, 5);
		}

		plugin.getShipAddress = function() {
			var address_1			 = $( 'input#billing_address_1' ).val(),
				address_2		 = $( 'input#billing_address_2' ).val(),
				postcode		 = $( 'input#billing_postcode' ).val(),
				city		 = $( 'input#billing_city' ).val(),
				country      = $( '#billing_country' ).val();

			if ( $( '#ship-to-different-address' ).find( 'input' ).is( ':checked' ) ) {
				address_1		 = $( 'input#shipping_address_1' ).val();
				address_2		 = $( 'input#shipping_address_2' ).val();
				postcode		 = $( 'input#shipping_postcode' ).val();
				city		 = $( 'input#shipping_city' ).val();
				country      = $( '#shipping_country' ).val();
			}

			var ship_address = address_1;
			if (address_2 != '') {
				ship_address += ' ' + address_2;
			}

			return ship_address + ' ' + postcode + ' ' + city + ' ' + country;
		}

		init();
	}

	$.fn.chronoprecise = function (options) {
		return this.each(function() {
			if (undefined == $(this).data('chronoprecise')) {
				var plugin = new $.chronoprecise(this, options);
				$(this).data('chronoprecise', plugin);
				if(options && options.openRdv){
					plugin.showFancybox();
				}

			}
		});
	}

})(jQuery);
// source --> https://liqueurs-granier.fr/assets/plugins/chronopost/public/js/chronopost-public.js?ver=1.2.1 
(function( $ ) {
	'use strict';

	$(document).ready(function() {

		var loadingMap = false,
			loadingRdv = false,
			shipping_method;

		if ($('.chronorelaismap').length) {
			$('.chronorelaismap').chronomap();
		}
		if ($('#outer-container-method-chronoprecise').length) {
			$('#outer-container-method-chronoprecise').chronoprecise();
		}

		$(document.body).on('click', '.appointment-link', function () {
			if (!$('#outer-container-method-chronoprecise').length && !loadingRdv) {
				loadingRdv = true;
				shipping_method = $('.appointment-link').closest('li').find('input[name="shipping_method[0]"]').val();
				$.ajax({
					type: 'POST',
					dataType: 'json',
					url: Chronomap.ajaxurl,
					cache: false,
					data: {
						'action': 'load_chronoprecise_appointment',
						'method_id': shipping_method,
						'chrono_nonce': Chronomap.chrono_nonce
					}
				})
					.done(function(output) {
						if (output.status == 'success') {
							$(output.data).insertBefore('#payment');
							if ($('#outer-container-method-chronoprecise').length) {
								$('#outer-container-method-chronoprecise').chronoprecise({openRdv: true});
							}
						} else {
							$( 'form.checkout' ).prepend( '<div class="pickup-relay-error woocommerce-error">' + output.data + '</div>' );
							$( 'html, body' ).animate({
								scrollTop: ( $( 'form.checkout' ).offset().top - 100 )
							}, 1000 );
							$( document.body ).trigger( 'checkout_error' );
						}
						loadingRdv = false;
					});
			}
		});

		$( document.body ).on('click', '.pickup-relay-link', function(event) {
			if (!$('#container-method-chronorelay').length && !loadingMap) {
				$( '.pickup-relay-error' ).remove();
				loadingMap = true,
					shipping_method = $('.pickup-relay-link').closest('li').find('input[name="shipping_method[0]"]').val();
				$.ajax({
					type: 'POST',
					dataType: 'json',
					url: Chronomap.ajaxurl,
					cache: false,
					data: {
						'action': 'load_chronorelais_picker',
						'method_id' : shipping_method,
						'chrono_nonce' : Chronomap.chrono_nonce
					}
				})
					.done(function(output) {
						if (output.status == 'success') {
							$(output.data).insertBefore('#payment');
							if ($('#container-method-chronorelay').length) {
								$("html, body").animate({ scrollTop: $('#container-method-chronorelay').offset().top }, 1000);
								$('.chronorelaismap').chronomap({openMap: true});
							}
						} else {
							$( 'form.checkout' ).prepend( '<div class="pickup-relay-error woocommerce-error">' + output.data + '</div>' );
							$( 'html, body' ).animate({
								scrollTop: ( $( 'form.checkout' ).offset().top - 100 )
							}, 1000 );
							$( document.body ).trigger( 'checkout_error' );
						}
						loadingMap = false;
					});
			}
			event.preventDefault();
		});

	});

})( jQuery );
// source --> https://liqueurs-granier.fr/wp-includes/js/dist/hooks.min.js?ver=dd5603f07f9220ed27f1 
/*! This file is auto-generated */
(()=>{var t={507:(t,e,r)=>{"use strict";r.d(e,{A:()=>A});var n=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)};var i=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)};var o=function(t,e){return function(r,o,s,c=10){const l=t[e];if(!i(r))return;if(!n(o))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:o};if(l[r]){const t=l[r].handlers;let e;for(e=t.length;e>0&&!(c>=t[e-1].priority);e--);e===t.length?t[e]=a:t.splice(e,0,a),l.__current.forEach((t=>{t.name===r&&t.currentIndex>=e&&t.currentIndex++}))}else l[r]={handlers:[a],runs:0};"hookAdded"!==r&&t.doAction("hookAdded",r,o,s,c)}};var s=function(t,e,r=!1){return function(o,s){const c=t[e];if(!i(o))return;if(!r&&!n(s))return;if(!c[o])return 0;let l=0;if(r)l=c[o].handlers.length,c[o]={runs:c[o].runs,handlers:[]};else{const t=c[o].handlers;for(let e=t.length-1;e>=0;e--)t[e].namespace===s&&(t.splice(e,1),l++,c.__current.forEach((t=>{t.name===o&&t.currentIndex>=e&&t.currentIndex--})))}return"hookRemoved"!==o&&t.doAction("hookRemoved",o,s),l}};var c=function(t,e){return function(r,n){const i=t[e];return void 0!==n?r in i&&i[r].handlers.some((t=>t.namespace===n)):r in i}};var l=function(t,e,r,n){return function(i,...o){const s=t[e];s[i]||(s[i]={handlers:[],runs:0}),s[i].runs++;const c=s[i].handlers;if(!c||!c.length)return r?o[0]:void 0;const l={name:i,currentIndex:0};return(n?async function(){try{s.__current.add(l);let t=r?o[0]:void 0;for(;l.currentIndex<c.length;){const e=c[l.currentIndex];t=await e.callback.apply(null,o),r&&(o[0]=t),l.currentIndex++}return r?t:void 0}finally{s.__current.delete(l)}}:function(){try{s.__current.add(l);let t=r?o[0]:void 0;for(;l.currentIndex<c.length;){t=c[l.currentIndex].callback.apply(null,o),r&&(o[0]=t),l.currentIndex++}return r?t:void 0}finally{s.__current.delete(l)}})()}};var a=function(t,e){return function(){const r=t[e],n=Array.from(r.__current);return n.at(-1)?.name??null}};var d=function(t,e){return function(r){const n=t[e];return void 0===r?n.__current.size>0:Array.from(n.__current).some((t=>t.name===r))}};var u=function(t,e){return function(r){const n=t[e];if(i(r))return n[r]&&n[r].runs?n[r].runs:0}};class h{actions;filters;addAction;addFilter;removeAction;removeFilter;hasAction;hasFilter;removeAllActions;removeAllFilters;doAction;doActionAsync;applyFilters;applyFiltersAsync;currentAction;currentFilter;doingAction;doingFilter;didAction;didFilter;constructor(){this.actions=Object.create(null),this.actions.__current=new Set,this.filters=Object.create(null),this.filters.__current=new Set,this.addAction=o(this,"actions"),this.addFilter=o(this,"filters"),this.removeAction=s(this,"actions"),this.removeFilter=s(this,"filters"),this.hasAction=c(this,"actions"),this.hasFilter=c(this,"filters"),this.removeAllActions=s(this,"actions",!0),this.removeAllFilters=s(this,"filters",!0),this.doAction=l(this,"actions",!1,!1),this.doActionAsync=l(this,"actions",!1,!0),this.applyFilters=l(this,"filters",!0,!1),this.applyFiltersAsync=l(this,"filters",!0,!0),this.currentAction=a(this,"actions"),this.currentFilter=a(this,"filters"),this.doingAction=d(this,"actions"),this.doingFilter=d(this,"filters"),this.didAction=u(this,"actions"),this.didFilter=u(this,"filters")}}var A=function(){return new h}},8770:()=>{}},e={};function r(n){var i=e[n];if(void 0!==i)return i.exports;var o=e[n]={exports:{}};return t[n](o,o.exports,r),o.exports}r.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return r.d(e,{a:e}),e},r.d=(t,e)=>{for(var n in e)r.o(e,n)&&!r.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},r.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var n={};(()=>{"use strict";r.r(n),r.d(n,{actions:()=>x,addAction:()=>s,addFilter:()=>c,applyFilters:()=>m,applyFiltersAsync:()=>v,createHooks:()=>t.A,currentAction:()=>y,currentFilter:()=>F,defaultHooks:()=>o,didAction:()=>b,didFilter:()=>k,doAction:()=>f,doActionAsync:()=>p,doingAction:()=>_,doingFilter:()=>g,filters:()=>w,hasAction:()=>d,hasFilter:()=>u,removeAction:()=>l,removeAllActions:()=>h,removeAllFilters:()=>A,removeFilter:()=>a});var t=r(507),e=r(8770),i={};for(const t in e)["default","actions","addAction","addFilter","applyFilters","applyFiltersAsync","createHooks","currentAction","currentFilter","defaultHooks","didAction","didFilter","doAction","doActionAsync","doingAction","doingFilter","filters","hasAction","hasFilter","removeAction","removeAllActions","removeAllFilters","removeFilter"].indexOf(t)<0&&(i[t]=()=>e[t]);r.d(n,i);const o=(0,t.A)(),{addAction:s,addFilter:c,removeAction:l,removeFilter:a,hasAction:d,hasFilter:u,removeAllActions:h,removeAllFilters:A,doAction:f,doActionAsync:p,applyFilters:m,applyFiltersAsync:v,currentAction:y,currentFilter:F,doingAction:_,doingFilter:g,didAction:b,didFilter:k,actions:x,filters:w}=o})(),(window.wp=window.wp||{}).hooks=n})();
// source --> https://liqueurs-granier.fr/wp-includes/js/dist/i18n.min.js?ver=c26c3dc7bed366793375 
/*! This file is auto-generated */
(()=>{"use strict";var t={d:(n,e)=>{for(var r in e)t.o(e,r)&&!t.o(n,r)&&Object.defineProperty(n,r,{enumerable:!0,get:e[r]})},o:(t,n)=>Object.prototype.hasOwnProperty.call(t,n),r:t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})}},n={};t.r(n),t.d(n,{__:()=>F,_n:()=>L,_nx:()=>D,_x:()=>w,createI18n:()=>h,defaultI18n:()=>b,getLocaleData:()=>g,hasTranslation:()=>O,isRTL:()=>P,resetLocaleData:()=>x,setLocaleData:()=>v,sprintf:()=>l,subscribe:()=>m});var e,r,a,i,o=/%(((\d+)\$)|(\(([$_a-zA-Z][$_a-zA-Z0-9]*)\)))?[ +0#-]*\d*(\.(\d+|\*))?(ll|[lhqL])?([cduxXefgsp%])/g;function l(t,...n){return function(t,...n){var e=0;return Array.isArray(n[0])&&(n=n[0]),t.replace(o,(function(){var t,r,a,i,o;return t=arguments[3],r=arguments[5],"%"===(i=arguments[9])?"%":("*"===(a=arguments[7])&&(a=n[e],e++),void 0===r?(void 0===t&&(t=e+1),e++,o=n[t-1]):n[0]&&"object"==typeof n[0]&&n[0].hasOwnProperty(r)&&(o=n[0][r]),"f"===i?o=parseFloat(o)||0:"d"===i&&(o=parseInt(o)||0),void 0!==a&&("f"===i?o=o.toFixed(a):"s"===i&&(o=o.substr(0,a))),null!=o?o:"")}))}(t,...n)}e={"(":9,"!":8,"*":7,"/":7,"%":7,"+":6,"-":6,"<":5,"<=":5,">":5,">=":5,"==":4,"!=":4,"&&":3,"||":2,"?":1,"?:":1},r=["(","?"],a={")":["("],":":["?","?:"]},i=/<=|>=|==|!=|&&|\|\||\?:|\(|!|\*|\/|%|\+|-|<|>|\?|\)|:/;var s={"!":function(t){return!t},"*":function(t,n){return t*n},"/":function(t,n){return t/n},"%":function(t,n){return t%n},"+":function(t,n){return t+n},"-":function(t,n){return t-n},"<":function(t,n){return t<n},"<=":function(t,n){return t<=n},">":function(t,n){return t>n},">=":function(t,n){return t>=n},"==":function(t,n){return t===n},"!=":function(t,n){return t!==n},"&&":function(t,n){return t&&n},"||":function(t,n){return t||n},"?:":function(t,n,e){if(t)throw n;return e}};function u(t){var n=function(t){for(var n,o,l,s,u=[],d=[];n=t.match(i);){for(o=n[0],(l=t.substr(0,n.index).trim())&&u.push(l);s=d.pop();){if(a[o]){if(a[o][0]===s){o=a[o][1]||o;break}}else if(r.indexOf(s)>=0||e[s]<e[o]){d.push(s);break}u.push(s)}a[o]||d.push(o),t=t.substr(n.index+o.length)}return(t=t.trim())&&u.push(t),u.concat(d.reverse())}(t);return function(t){return function(t,n){var e,r,a,i,o,l,u=[];for(e=0;e<t.length;e++){if(o=t[e],i=s[o]){for(r=i.length,a=Array(r);r--;)a[r]=u.pop();try{l=i.apply(null,a)}catch(t){return t}}else l=n.hasOwnProperty(o)?n[o]:+o;u.push(l)}return u[0]}(n,t)}}var d={contextDelimiter:"",onMissingKey:null};function c(t,n){var e;for(e in this.data=t,this.pluralForms={},this.options={},d)this.options[e]=void 0!==n&&e in n?n[e]:d[e]}c.prototype.getPluralForm=function(t,n){var e,r,a,i=this.pluralForms[t];return i||("function"!=typeof(a=(e=this.data[t][""])["Plural-Forms"]||e["plural-forms"]||e.plural_forms)&&(r=function(t){var n,e,r;for(n=t.split(";"),e=0;e<n.length;e++)if(0===(r=n[e].trim()).indexOf("plural="))return r.substr(7)}(e["Plural-Forms"]||e["plural-forms"]||e.plural_forms),a=function(t){var n=u(t);return function(t){return+n({n:t})}}(r)),i=this.pluralForms[t]=a),i(n)},c.prototype.dcnpgettext=function(t,n,e,r,a){var i,o,l;return i=void 0===a?0:this.getPluralForm(t,a),o=e,n&&(o=n+this.options.contextDelimiter+e),(l=this.data[t][o])&&l[i]?l[i]:(this.options.onMissingKey&&this.options.onMissingKey(e,t),0===i?e:r)};const p={plural_forms:t=>1===t?0:1},f=/^i18n\.(n?gettext|has_translation)(_|$)/,h=(t,n,e)=>{const r=new c({}),a=new Set,i=()=>{a.forEach((t=>t()))},o=(t,n="default")=>{r.data[n]={...r.data[n],...t},r.data[n][""]={...p,...r.data[n]?.[""]},delete r.pluralForms[n]},l=(t,n)=>{o(t,n),i()},s=(t="default",n,e,a,i)=>(r.data[t]||o(void 0,t),r.dcnpgettext(t,n,e,a,i)),u=t=>t||"default",d=(t,n,r)=>{let a=s(r,n,t);return e?(a=e.applyFilters("i18n.gettext_with_context",a,t,n,r),e.applyFilters("i18n.gettext_with_context_"+u(r),a,t,n,r)):a};if(t&&l(t,n),e){const t=t=>{f.test(t)&&i()};e.addAction("hookAdded","core/i18n",t),e.addAction("hookRemoved","core/i18n",t)}return{getLocaleData:(t="default")=>r.data[t],setLocaleData:l,addLocaleData:(t,n="default")=>{r.data[n]={...r.data[n],...t,"":{...p,...r.data[n]?.[""],...t?.[""]}},delete r.pluralForms[n],i()},resetLocaleData:(t,n)=>{r.data={},r.pluralForms={},l(t,n)},subscribe:t=>(a.add(t),()=>a.delete(t)),__:(t,n)=>{let r=s(n,void 0,t);return e?(r=e.applyFilters("i18n.gettext",r,t,n),e.applyFilters("i18n.gettext_"+u(n),r,t,n)):r},_x:d,_n:(t,n,r,a)=>{let i=s(a,void 0,t,n,r);return e?(i=e.applyFilters("i18n.ngettext",i,t,n,r,a),e.applyFilters("i18n.ngettext_"+u(a),i,t,n,r,a)):i},_nx:(t,n,r,a,i)=>{let o=s(i,a,t,n,r);return e?(o=e.applyFilters("i18n.ngettext_with_context",o,t,n,r,a,i),e.applyFilters("i18n.ngettext_with_context_"+u(i),o,t,n,r,a,i)):o},isRTL:()=>"rtl"===d("ltr","text direction"),hasTranslation:(t,n,a)=>{const i=n?n+""+t:t;let o=!!r.data?.[a??"default"]?.[i];return e&&(o=e.applyFilters("i18n.has_translation",o,t,n,a),o=e.applyFilters("i18n.has_translation_"+u(a),o,t,n,a)),o}}},_=window.wp.hooks,y=h(void 0,void 0,_.defaultHooks);var b=y;const g=y.getLocaleData.bind(y),v=y.setLocaleData.bind(y),x=y.resetLocaleData.bind(y),m=y.subscribe.bind(y),F=y.__.bind(y),w=y._x.bind(y),L=y._n.bind(y),D=y._nx.bind(y),P=y.isRTL.bind(y),O=y.hasTranslation.bind(y);(window.wp=window.wp||{}).i18n=n})();