From 92314d08e7478614edfc8c52025350473a4e79b1 Mon Sep 17 00:00:00 2001 From: Himadree Shekhar Halder Date: Sun, 28 Apr 2024 15:57:16 +0600 Subject: [PATCH 1/2] Sticky Video with Blocksy theme conflict --- assets/front-end/css/view/sticky-video.min.css | 2 +- src/css/view/sticky-video.scss | 8 ++++++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/assets/front-end/css/view/sticky-video.min.css b/assets/front-end/css/view/sticky-video.min.css index 75f54dd9c..4a950fd56 100644 --- a/assets/front-end/css/view/sticky-video.min.css +++ b/assets/front-end/css/view/sticky-video.min.css @@ -1 +1 @@ -.eaelsv-overlay{position:absolute;display:block;width:100%;height:100%;top:0;left:0;right:0;bottom:0;background-color:rgba(0,0,0,.5);z-index:4;cursor:pointer;background-size:cover;background-position:50%;text-align:center;overflow:hidden}.eaelsv-overlay-icon{position:absolute;top:50%;left:50%;font-size:90px;color:#fff;-webkit-transform:translate(-50%, -50%);transform:translate(-50%, -50%);-ms-transform:translate(-50%, -50%)}.eael-sticky-video-wrapper{position:relative;width:100%;margin:0px;padding:0px;-webkit-transition:.5s;transition:.5s;text-align:left;overflow:hidden;height:auto !important}.eael-sticky-video-wrapper .plyr__controls button{-webkit-box-shadow:none !important;box-shadow:none !important}.eael-sticky-video-wrapper .plyr__controls button:hover{-webkit-box-shadow:none !important;box-shadow:none !important}.eael-sticky-video-wrapper .plyr__controls{display:none !important}.eael-sticky-video-player2{min-height:20px;overflow:visible}.eael-sticky-video-player2.out{position:fixed;z-index:999;border:0 !important;border-radius:0px !important;height:200px;width:300px}.eael-sticky-video-wrapper.out .eael-sticky-video-player2,.eael-sticky-video-wrapper.out .eael-sticky-video-player{border-radius:0px !important}.eael-sticky-video-player2.in{position:relative;margin:0px;padding:0px;height:100%;border:0;line-height:1}.owp-play{position:absolute;top:50%;left:50%;-webkit-transform:translateX(-50%) translateY(-50%);-ms-transform:translateX(-50%) translateY(-50%);transform:translateX(-50%) translateY(-50%)}.owp-play i{font-size:100px;color:#fff;opacity:.8;text-shadow:1px 0 6px rgba(0,0,0,.3);-webkit-transition:all .5s;transition:all .5s}.eael-sticky-video-player:hover .owp-play i{opacity:1}.eaelsv-sticky-player-close{position:absolute;right:-25px;top:-36px;display:none;padding:7px;font-size:24px;z-index:9999;cursor:pointer;-webkit-box-sizing:content-box;box-sizing:content-box;overflow:visible}.eaelsv-sticky-player-close:hover{color:#090}.eaelsv-sticky-player-close:before,.eaelsv-sticky-player-close:after{position:absolute;left:15px;background-color:#333}.eaelsv-sticky-player-close:before{-webkit-transform:rotate(45deg);-ms-transform:rotate(45deg);transform:rotate(45deg)}.eaelsv-sticky-player-close:after{-webkit-transform:rotate(-45deg);-ms-transform:rotate(-45deg);transform:rotate(-45deg)}.plyr__progress input[type=range]::-webkit-slider-runnable-track,.plyr__volume input[type=range]::-webkit-slider-runnable-track{-webkit-box-shadow:1px 1px 1px #000,0px 0px 1px #0d0d0d;box-shadow:1px 1px 1px #000,0px 0px 1px #0d0d0d}.plyr__progress input[type=range]::-moz-range-track,.plyr__volume input[type=range]::-moz-range-track{box-shadow:1px 1px 1px #000,0px 0px 1px #0d0d0d}.eaelsv-overlay-visibility-transparent .plyr--stopped.plyr__poster-enabled .plyr__poster,.eaelsv-overlay-visibility-transparent .plyr--youtube.plyr--full-ui.plyr--video .plyr__control--overlaid{opacity:0} +.eaelsv-overlay{position:absolute;display:block;width:100%;height:100%;top:0;left:0;right:0;bottom:0;background-color:rgba(0,0,0,.5);z-index:4;cursor:pointer;background-size:cover;background-position:50%;text-align:center;overflow:hidden}.eaelsv-overlay-icon{position:absolute;top:50%;left:50%;font-size:90px;color:#fff;-webkit-transform:translate(-50%, -50%);transform:translate(-50%, -50%);-ms-transform:translate(-50%, -50%)}.eael-sticky-video-wrapper{position:relative;width:100%;margin:0px;padding:0px;-webkit-transition:.5s;transition:.5s;text-align:left;overflow:hidden;height:auto !important}.eael-sticky-video-wrapper .plyr__controls button{-webkit-box-shadow:none !important;box-shadow:none !important}.eael-sticky-video-wrapper .plyr__controls button:hover{-webkit-box-shadow:none !important;box-shadow:none !important}.eael-sticky-video-wrapper .plyr__controls{display:none !important}.eael-sticky-video-player2{min-height:20px;overflow:visible}.eael-sticky-video-player2.out{position:fixed;z-index:999;border:0 !important;border-radius:0px !important;height:200px;width:300px}.eael-sticky-video-wrapper.out .eael-sticky-video-player2,.eael-sticky-video-wrapper.out .eael-sticky-video-player{border-radius:0px !important}.eael-sticky-video-player2.in{position:relative;margin:0px;padding:0px;height:100%;border:0;line-height:1}.owp-play{position:absolute;top:50%;left:50%;-webkit-transform:translateX(-50%) translateY(-50%);-ms-transform:translateX(-50%) translateY(-50%);transform:translateX(-50%) translateY(-50%)}.owp-play i{font-size:100px;color:#fff;opacity:.8;text-shadow:1px 0 6px rgba(0,0,0,.3);-webkit-transition:all .5s;transition:all .5s}.eael-sticky-video-player:hover .owp-play i{opacity:1}.eaelsv-sticky-player-close{position:absolute;right:-25px;top:-36px;display:none;padding:7px;font-size:24px;z-index:9999;cursor:pointer;-webkit-box-sizing:content-box;box-sizing:content-box;overflow:visible}.eaelsv-sticky-player-close:hover{color:#090}.eaelsv-sticky-player-close:before,.eaelsv-sticky-player-close:after{position:absolute;left:15px;background-color:#333}.eaelsv-sticky-player-close:before{-webkit-transform:rotate(45deg);-ms-transform:rotate(45deg);transform:rotate(45deg)}.eaelsv-sticky-player-close:after{-webkit-transform:rotate(-45deg);-ms-transform:rotate(-45deg);transform:rotate(-45deg)}.plyr__progress input[type=range]::-webkit-slider-runnable-track,.plyr__volume input[type=range]::-webkit-slider-runnable-track{-webkit-box-shadow:1px 1px 1px #000,0px 0px 1px #0d0d0d;box-shadow:1px 1px 1px #000,0px 0px 1px #0d0d0d}.plyr__progress input[type=range]::-moz-range-track,.plyr__volume input[type=range]::-moz-range-track{box-shadow:1px 1px 1px #000,0px 0px 1px #0d0d0d}.eaelsv-overlay-visibility-transparent .plyr--stopped.plyr__poster-enabled .plyr__poster,.eaelsv-overlay-visibility-transparent .plyr--youtube.plyr--full-ui.plyr--video .plyr__control--overlaid{opacity:0}.theme-blocksy .eael-sticky-video-player2[data-sticky*=yes]:not(.in,.out),.theme-blocksy .eael-sticky-video-player2[data-sticky*=fixed]:not(.in,.out){position:initial !important} diff --git a/src/css/view/sticky-video.scss b/src/css/view/sticky-video.scss index 76e8c1138..07ce5f4d6 100755 --- a/src/css/view/sticky-video.scss +++ b/src/css/view/sticky-video.scss @@ -149,3 +149,11 @@ } } +/******************* + Theme Support +********************/ +//Blocksy Theme +.theme-blocksy .eael-sticky-video-player2[data-sticky*=yes]:not(.in, .out), +.theme-blocksy .eael-sticky-video-player2[data-sticky*=fixed]:not(.in, .out) { + position: initial !important; +} From e87119612097e2b1dfa6452dee67c56f9a290144 Mon Sep 17 00:00:00 2001 From: Robin <86726198+robinwpdeveloper@users.noreply.github.com> Date: Mon, 29 Apr 2024 12:28:58 +0600 Subject: [PATCH 2/2] Asset --- assets/front-end/css/view/general.css | 1 - assets/front-end/css/view/general.min.css | 2 +- assets/front-end/css/view/progress-bar.css | 18 +- .../front-end/css/view/progress-bar.min.css | 2 +- assets/front-end/css/view/sticky-video.css | 9 + .../front-end/js/edit/advanced-data-table.js | 2 +- .../js/edit/advanced-data-table.min.js | 2 +- .../front-end/js/view/advanced-data-table.js | 2 +- .../js/view/advanced-data-table.min.js | 2 +- assets/front-end/js/view/general.js | 182 +++++++++--------- assets/front-end/js/view/general.min.js | 2 +- assets/front-end/js/view/quick-view.js | 2 +- assets/front-end/js/view/quick-view.min.js | 2 +- 13 files changed, 115 insertions(+), 113 deletions(-) diff --git a/assets/front-end/css/view/general.css b/assets/front-end/css/view/general.css index 05b27ea1a..469217a0f 100644 --- a/assets/front-end/css/view/general.css +++ b/assets/front-end/css/view/general.css @@ -165,7 +165,6 @@ .sr-only { border: 0 !important; clip: rect(1px, 1px, 1px, 1px) !important; /* 1 */ - -webkit-clip-path: inset(50%) !important; clip-path: inset(50%) !important; /* 2 */ height: 1px !important; margin: -1px !important; diff --git a/assets/front-end/css/view/general.min.css b/assets/front-end/css/view/general.min.css index 0bfef5e32..8fc480f61 100644 --- a/assets/front-end/css/view/general.min.css +++ b/assets/front-end/css/view/general.min.css @@ -1 +1 @@ -.clearfix::before,.clearfix::after{content:" ";display:table;clear:both}.eael-testimonial-slider.nav-top-left,.eael-testimonial-slider.nav-top-right,.eael-team-slider.nav-top-left,.eael-team-slider.nav-top-right,.eael-logo-carousel.nav-top-left,.eael-logo-carousel.nav-top-right,.eael-post-carousel.nav-top-left,.eael-post-carousel.nav-top-right,.eael-product-carousel.nav-top-left,.eael-product-carousel.nav-top-right{padding-top:40px}.eael-contact-form input[type=text],.eael-contact-form input[type=email],.eael-contact-form input[type=url],.eael-contact-form input[type=tel],.eael-contact-form input[type=date],.eael-contact-form input[type=number],.eael-contact-form textarea{background:#fff;box-shadow:none;-webkit-box-shadow:none;float:none;height:auto;margin:0;outline:0;width:100%}.eael-contact-form input[type=submit]{border:0;float:none;height:auto;margin:0;padding:10px 20px;width:auto;-webkit-transition:all .25s linear 0s;transition:all .25s linear 0s}.eael-contact-form.placeholder-hide input::-webkit-input-placeholder,.eael-contact-form.placeholder-hide textarea::-webkit-input-placeholder{opacity:0;visibility:hidden}.eael-contact-form.placeholder-hide input::-moz-placeholder,.eael-contact-form.placeholder-hide textarea::-moz-placeholder{opacity:0;visibility:hidden}.eael-contact-form.placeholder-hide input:-ms-input-placeholder,.eael-contact-form.placeholder-hide textarea:-ms-input-placeholder{opacity:0;visibility:hidden}.eael-contact-form.placeholder-hide input:-moz-placeholder,.eael-contact-form.placeholder-hide textarea:-moz-placeholder{opacity:0;visibility:hidden}.eael-custom-radio-checkbox input[type=checkbox],.eael-custom-radio-checkbox input[type=radio]{-webkit-appearance:none;-moz-appearance:none;border-style:solid;border-width:0;outline:none;min-width:1px;width:15px;height:15px;background:#ddd;padding:3px}.eael-custom-radio-checkbox input[type=checkbox]:before,.eael-custom-radio-checkbox input[type=radio]:before{content:"";width:100%;height:100%;padding:0;margin:0;display:block}.eael-custom-radio-checkbox input[type=checkbox]:checked:before,.eael-custom-radio-checkbox input[type=radio]:checked:before{background:#999;-webkit-transition:all .25s linear 0s;transition:all .25s linear 0s}.eael-custom-radio-checkbox input[type=radio]{border-radius:50%}.eael-custom-radio-checkbox input[type=radio]:before{border-radius:50%}.eael-post-elements-readmore-btn{font-size:12px;font-weight:500;-webkit-transition:all 300ms ease-in-out;transition:all 300ms ease-in-out;display:inline-block}.elementor-lightbox .dialog-widget-content{width:100%;height:100%}.eael-contact-form-align-left,.elementor-widget-eael-weform.eael-contact-form-align-left .eael-weform-container{margin:0 auto 0 0}.eael-contact-form-align-center,.elementor-widget-eael-weform.eael-contact-form-align-center .eael-weform-container{float:none;margin:0 auto}.eael-contact-form-align-right,.elementor-widget-eael-weform.eael-contact-form-align-right .eael-weform-container{margin:0 0 0 auto}.eael-force-hide{display:none !important}.eael-d-none{display:none !important}.eael-d-block{display:block !important}.eael-h-auto{height:auto !important}.theme-martfury .elementor-wc-products .woocommerce ul.products li.product .product-inner .mf-rating .eael-star-rating.star-rating{display:none}.theme-martfury .elementor-wc-products .woocommerce ul.products li.product .product-inner .mf-rating .eael-star-rating.star-rating~.count{display:none}.sr-only{border:0 !important;clip:rect(1px, 1px, 1px, 1px) !important;-webkit-clip-path:inset(50%) !important;clip-path:inset(50%) !important;height:1px !important;margin:-1px !important;overflow:hidden !important;padding:0 !important;position:absolute !important;width:1px !important;white-space:nowrap !important} +.clearfix::before,.clearfix::after{content:" ";display:table;clear:both}.eael-testimonial-slider.nav-top-left,.eael-testimonial-slider.nav-top-right,.eael-team-slider.nav-top-left,.eael-team-slider.nav-top-right,.eael-logo-carousel.nav-top-left,.eael-logo-carousel.nav-top-right,.eael-post-carousel.nav-top-left,.eael-post-carousel.nav-top-right,.eael-product-carousel.nav-top-left,.eael-product-carousel.nav-top-right{padding-top:40px}.eael-contact-form input[type=text],.eael-contact-form input[type=email],.eael-contact-form input[type=url],.eael-contact-form input[type=tel],.eael-contact-form input[type=date],.eael-contact-form input[type=number],.eael-contact-form textarea{background:#fff;box-shadow:none;-webkit-box-shadow:none;float:none;height:auto;margin:0;outline:0;width:100%}.eael-contact-form input[type=submit]{border:0;float:none;height:auto;margin:0;padding:10px 20px;width:auto;-webkit-transition:all .25s linear 0s;transition:all .25s linear 0s}.eael-contact-form.placeholder-hide input::-webkit-input-placeholder,.eael-contact-form.placeholder-hide textarea::-webkit-input-placeholder{opacity:0;visibility:hidden}.eael-contact-form.placeholder-hide input::-moz-placeholder,.eael-contact-form.placeholder-hide textarea::-moz-placeholder{opacity:0;visibility:hidden}.eael-contact-form.placeholder-hide input:-ms-input-placeholder,.eael-contact-form.placeholder-hide textarea:-ms-input-placeholder{opacity:0;visibility:hidden}.eael-contact-form.placeholder-hide input:-moz-placeholder,.eael-contact-form.placeholder-hide textarea:-moz-placeholder{opacity:0;visibility:hidden}.eael-custom-radio-checkbox input[type=checkbox],.eael-custom-radio-checkbox input[type=radio]{-webkit-appearance:none;-moz-appearance:none;border-style:solid;border-width:0;outline:none;min-width:1px;width:15px;height:15px;background:#ddd;padding:3px}.eael-custom-radio-checkbox input[type=checkbox]:before,.eael-custom-radio-checkbox input[type=radio]:before{content:"";width:100%;height:100%;padding:0;margin:0;display:block}.eael-custom-radio-checkbox input[type=checkbox]:checked:before,.eael-custom-radio-checkbox input[type=radio]:checked:before{background:#999;-webkit-transition:all .25s linear 0s;transition:all .25s linear 0s}.eael-custom-radio-checkbox input[type=radio]{border-radius:50%}.eael-custom-radio-checkbox input[type=radio]:before{border-radius:50%}.eael-post-elements-readmore-btn{font-size:12px;font-weight:500;-webkit-transition:all 300ms ease-in-out;transition:all 300ms ease-in-out;display:inline-block}.elementor-lightbox .dialog-widget-content{width:100%;height:100%}.eael-contact-form-align-left,.elementor-widget-eael-weform.eael-contact-form-align-left .eael-weform-container{margin:0 auto 0 0}.eael-contact-form-align-center,.elementor-widget-eael-weform.eael-contact-form-align-center .eael-weform-container{float:none;margin:0 auto}.eael-contact-form-align-right,.elementor-widget-eael-weform.eael-contact-form-align-right .eael-weform-container{margin:0 0 0 auto}.eael-force-hide{display:none !important}.eael-d-none{display:none !important}.eael-d-block{display:block !important}.eael-h-auto{height:auto !important}.theme-martfury .elementor-wc-products .woocommerce ul.products li.product .product-inner .mf-rating .eael-star-rating.star-rating{display:none}.theme-martfury .elementor-wc-products .woocommerce ul.products li.product .product-inner .mf-rating .eael-star-rating.star-rating~.count{display:none}.sr-only{border:0 !important;clip:rect(1px, 1px, 1px, 1px) !important;clip-path:inset(50%) !important;height:1px !important;margin:-1px !important;overflow:hidden !important;padding:0 !important;position:absolute !important;width:1px !important;white-space:nowrap !important} diff --git a/assets/front-end/css/view/progress-bar.css b/assets/front-end/css/view/progress-bar.css index 12307dded..4b4e4812a 100644 --- a/assets/front-end/css/view/progress-bar.css +++ b/assets/front-end/css/view/progress-bar.css @@ -100,8 +100,7 @@ left: 0; width: 100%; height: 100%; - -webkit-clip-path: inset(0 0 0 50%); - clip-path: inset(0 0 0 50%); + clip-path: inset(0 0 0 50%); } .eael-progressbar-circle-inner { height: 100%; @@ -121,8 +120,7 @@ border-style: solid; border-color: #000000; border-radius: 50%; - -webkit-clip-path: inset(0 50% 0 0); - clip-path: inset(0 50% 0 0); + clip-path: inset(0 50% 0 0); } .eael-progressbar-circle-half-left { -webkit-transform: rotate(0deg); @@ -151,12 +149,10 @@ overflow: hidden; } .eael-progressbar-half-circle .eael-progressbar-circle-pie { - -webkit-clip-path: inset(0 0 50% 0); - clip-path: inset(0 0 50% 0); + clip-path: inset(0 0 50% 0); } .eael-progressbar-half-circle .eael-progressbar-circle-half { - -webkit-clip-path: inset(50% 0 0 0); - clip-path: inset(50% 0 0 0); + clip-path: inset(50% 0 0 0); -webkit-transform: rotate(0deg); -ms-transform: rotate(0deg); transform: rotate(0deg); @@ -238,12 +234,10 @@ right: 0; } .rtl .eael-progressbar.eael-progressbar-circle .eael-progressbar-circle-pie { - -webkit-clip-path: inset(0 50% 0 0); - clip-path: inset(0 50% 0 0); + clip-path: inset(0 50% 0 0); } .rtl .eael-progressbar.eael-progressbar-circle .eael-progressbar-circle-half { - -webkit-clip-path: inset(0 0 0 50%); - clip-path: inset(0 0 0 50%); + clip-path: inset(0 0 0 50%); } .rtl .eael-progressbar-circle-container .eael-progressbar-half-circle-after .eael-progressbar-prefix-label { float: left; diff --git a/assets/front-end/css/view/progress-bar.min.css b/assets/front-end/css/view/progress-bar.min.css index d7103c79f..611a98e79 100644 --- a/assets/front-end/css/view/progress-bar.min.css +++ b/assets/front-end/css/view/progress-bar.min.css @@ -1 +1 @@ -@-webkit-keyframes animateStripe{0%{-webkit-transform:translate(0, 0);transform:translate(0, 0)}100%{-webkit-transform:translate(35px, 0);transform:translate(35px, 0)}}@keyframes animateStripe{0%{-webkit-transform:translate(0, 0);transform:translate(0, 0)}100%{-webkit-transform:translate(35px, 0);transform:translate(35px, 0)}}@-webkit-keyframes animateStripeRTL{0%{-webkit-transform:translate(0, 0);transform:translate(0, 0)}100%{-webkit-transform:translate(-35px, 0);transform:translate(-35px, 0)}}@keyframes animateStripeRTL{0%{-webkit-transform:translate(0, 0);transform:translate(0, 0)}100%{-webkit-transform:translate(-35px, 0);transform:translate(-35px, 0)}}.eael-progressbar{position:relative}.eael-progressbar-title{font-size:20px;font-weight:400}.eael-progressbar-line{position:relative;display:block;width:100%;height:12px;background-color:#eee}.eael-progressbar-line .eael-progressbar-count-wrap{position:absolute;right:0;bottom:calc(100% + 5px);font-size:16px;font-weight:400;line-height:1}.eael-progressbar-line-fill{display:inline-block;position:absolute;top:50%;left:0;width:0;height:12px;background-color:#000;-webkit-transform:translateY(-50%);-ms-transform:translateY(-50%);transform:translateY(-50%);-webkit-transition:width 1500ms linear;transition:width 1500ms linear;overflow:hidden}.eael-progressbar-circle{position:relative;width:200px;height:200px}.eael-progressbar-circle .eael-progressbar-title{font-size:16px;font-weight:400}.eael-progressbar-circle .eael-progressbar-count-wrap{font-size:28px;font-weight:700}.eael-progressbar-circle-shadow{width:220px;height:220px;padding:10px;border-radius:50%}.eael-progressbar-circle-pie{position:absolute;top:0;left:0;width:100%;height:100%;-webkit-clip-path:inset(0 0 0 50%);clip-path:inset(0 0 0 50%)}.eael-progressbar-circle-inner{height:100%;width:100%;border-width:12px;border-style:solid;border-color:#eee;border-radius:50%}.eael-progressbar-circle-half{position:absolute;left:0;top:0;height:100%;width:100%;border-width:12px;border-style:solid;border-color:#000;border-radius:50%;-webkit-clip-path:inset(0 50% 0 0);clip-path:inset(0 50% 0 0)}.eael-progressbar-circle-half-left{-webkit-transform:rotate(0deg);-ms-transform:rotate(0deg);transform:rotate(0deg)}.eael-progressbar-circle-half-right{-webkit-transform:rotate(180deg);-ms-transform:rotate(180deg);transform:rotate(180deg);visibility:hidden}.eael-progressbar-circle-inner-content{position:absolute;top:50%;width:100%;-webkit-transform:translateY(-50%);-ms-transform:translateY(-50%);transform:translateY(-50%);text-align:center}.eael-progressbar-half-circle{position:relative;width:200px;height:100px;overflow:hidden}.eael-progressbar-half-circle .eael-progressbar-circle-pie{-webkit-clip-path:inset(0 0 50% 0);clip-path:inset(0 0 50% 0)}.eael-progressbar-half-circle .eael-progressbar-circle-half{-webkit-clip-path:inset(50% 0 0 0);clip-path:inset(50% 0 0 0);-webkit-transform:rotate(0deg);-ms-transform:rotate(0deg);transform:rotate(0deg);-webkit-transition:-webkit-transform 1500ms linear;transition:-webkit-transform 1500ms linear;transition:transform 1500ms linear;transition:transform 1500ms linear, -webkit-transform 1500ms linear}.eael-progressbar-half-circle .eael-progressbar-circle-inner-content{top:initial;bottom:0;-webkit-transform:translateY(0);-ms-transform:translateY(0);transform:translateY(0)}.eael-progressbar-half-circle .eael-progressbar-title{font-size:16px;font-weight:400}.eael-progressbar-half-circle .eael-progressbar-count-wrap{font-size:28px;font-weight:700}.eael-progressbar-half-circle-after{position:relative;font-size:12px;font-weight:400;clear:both}.eael-progressbar-postfix-label{float:right}.eael-progressbar-line-stripe .eael-progressbar-line-fill:after{content:"";position:absolute;top:0;left:-35px;width:calc(100% + 70px);height:100%;background-image:linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);background-size:35px 35px}.eael-progressbar-line-animate .eael-progressbar-line-fill:after{-webkit-animation:animateStripe 2s linear infinite;animation:animateStripe 2s linear infinite}.eael-progressbar-line-animate-rtl .eael-progressbar-line-fill:after{-webkit-animation:animateStripeRTL 2s linear infinite;animation:animateStripeRTL 2s linear infinite}.eael-progressbar-circle-wrap>div{margin:0 auto}.eael-progressbar-line-container.left,.eael-progressbar-circle-container.left>div,.eael-progressbar-box-container.left>div{margin:0 auto 0 0}.eael-progressbar-line-container.center,.eael-progressbar-circle-container.center>div,.eael-progressbar-box-container.center>div{margin:0 auto}.eael-progressbar-line-container.right,.eael-progressbar-circle-container.right>div,.eael-progressbar-box-container.right>div{margin:0 0 0 auto}.rtl .eael-progressbar-line-container{text-align:right}.rtl .eael-progressbar-line-container .eael-progressbar-count-wrap{left:0;right:auto}.rtl .eael-progressbar-line-container .eael-progressbar-line-fill{left:auto;right:0}.rtl .eael-progressbar.eael-progressbar-circle .eael-progressbar-circle-pie{-webkit-clip-path:inset(0 50% 0 0);clip-path:inset(0 50% 0 0)}.rtl .eael-progressbar.eael-progressbar-circle .eael-progressbar-circle-half{-webkit-clip-path:inset(0 0 0 50%);clip-path:inset(0 0 0 50%)}.rtl .eael-progressbar-circle-container .eael-progressbar-half-circle-after .eael-progressbar-prefix-label{float:left} +@-webkit-keyframes animateStripe{0%{-webkit-transform:translate(0, 0);transform:translate(0, 0)}100%{-webkit-transform:translate(35px, 0);transform:translate(35px, 0)}}@keyframes animateStripe{0%{-webkit-transform:translate(0, 0);transform:translate(0, 0)}100%{-webkit-transform:translate(35px, 0);transform:translate(35px, 0)}}@-webkit-keyframes animateStripeRTL{0%{-webkit-transform:translate(0, 0);transform:translate(0, 0)}100%{-webkit-transform:translate(-35px, 0);transform:translate(-35px, 0)}}@keyframes animateStripeRTL{0%{-webkit-transform:translate(0, 0);transform:translate(0, 0)}100%{-webkit-transform:translate(-35px, 0);transform:translate(-35px, 0)}}.eael-progressbar{position:relative}.eael-progressbar-title{font-size:20px;font-weight:400}.eael-progressbar-line{position:relative;display:block;width:100%;height:12px;background-color:#eee}.eael-progressbar-line .eael-progressbar-count-wrap{position:absolute;right:0;bottom:calc(100% + 5px);font-size:16px;font-weight:400;line-height:1}.eael-progressbar-line-fill{display:inline-block;position:absolute;top:50%;left:0;width:0;height:12px;background-color:#000;-webkit-transform:translateY(-50%);-ms-transform:translateY(-50%);transform:translateY(-50%);-webkit-transition:width 1500ms linear;transition:width 1500ms linear;overflow:hidden}.eael-progressbar-circle{position:relative;width:200px;height:200px}.eael-progressbar-circle .eael-progressbar-title{font-size:16px;font-weight:400}.eael-progressbar-circle .eael-progressbar-count-wrap{font-size:28px;font-weight:700}.eael-progressbar-circle-shadow{width:220px;height:220px;padding:10px;border-radius:50%}.eael-progressbar-circle-pie{position:absolute;top:0;left:0;width:100%;height:100%;clip-path:inset(0 0 0 50%)}.eael-progressbar-circle-inner{height:100%;width:100%;border-width:12px;border-style:solid;border-color:#eee;border-radius:50%}.eael-progressbar-circle-half{position:absolute;left:0;top:0;height:100%;width:100%;border-width:12px;border-style:solid;border-color:#000;border-radius:50%;clip-path:inset(0 50% 0 0)}.eael-progressbar-circle-half-left{-webkit-transform:rotate(0deg);-ms-transform:rotate(0deg);transform:rotate(0deg)}.eael-progressbar-circle-half-right{-webkit-transform:rotate(180deg);-ms-transform:rotate(180deg);transform:rotate(180deg);visibility:hidden}.eael-progressbar-circle-inner-content{position:absolute;top:50%;width:100%;-webkit-transform:translateY(-50%);-ms-transform:translateY(-50%);transform:translateY(-50%);text-align:center}.eael-progressbar-half-circle{position:relative;width:200px;height:100px;overflow:hidden}.eael-progressbar-half-circle .eael-progressbar-circle-pie{clip-path:inset(0 0 50% 0)}.eael-progressbar-half-circle .eael-progressbar-circle-half{clip-path:inset(50% 0 0 0);-webkit-transform:rotate(0deg);-ms-transform:rotate(0deg);transform:rotate(0deg);-webkit-transition:-webkit-transform 1500ms linear;transition:-webkit-transform 1500ms linear;transition:transform 1500ms linear;transition:transform 1500ms linear, -webkit-transform 1500ms linear}.eael-progressbar-half-circle .eael-progressbar-circle-inner-content{top:initial;bottom:0;-webkit-transform:translateY(0);-ms-transform:translateY(0);transform:translateY(0)}.eael-progressbar-half-circle .eael-progressbar-title{font-size:16px;font-weight:400}.eael-progressbar-half-circle .eael-progressbar-count-wrap{font-size:28px;font-weight:700}.eael-progressbar-half-circle-after{position:relative;font-size:12px;font-weight:400;clear:both}.eael-progressbar-postfix-label{float:right}.eael-progressbar-line-stripe .eael-progressbar-line-fill:after{content:"";position:absolute;top:0;left:-35px;width:calc(100% + 70px);height:100%;background-image:linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);background-size:35px 35px}.eael-progressbar-line-animate .eael-progressbar-line-fill:after{-webkit-animation:animateStripe 2s linear infinite;animation:animateStripe 2s linear infinite}.eael-progressbar-line-animate-rtl .eael-progressbar-line-fill:after{-webkit-animation:animateStripeRTL 2s linear infinite;animation:animateStripeRTL 2s linear infinite}.eael-progressbar-circle-wrap>div{margin:0 auto}.eael-progressbar-line-container.left,.eael-progressbar-circle-container.left>div,.eael-progressbar-box-container.left>div{margin:0 auto 0 0}.eael-progressbar-line-container.center,.eael-progressbar-circle-container.center>div,.eael-progressbar-box-container.center>div{margin:0 auto}.eael-progressbar-line-container.right,.eael-progressbar-circle-container.right>div,.eael-progressbar-box-container.right>div{margin:0 0 0 auto}.rtl .eael-progressbar-line-container{text-align:right}.rtl .eael-progressbar-line-container .eael-progressbar-count-wrap{left:0;right:auto}.rtl .eael-progressbar-line-container .eael-progressbar-line-fill{left:auto;right:0}.rtl .eael-progressbar.eael-progressbar-circle .eael-progressbar-circle-pie{clip-path:inset(0 50% 0 0)}.rtl .eael-progressbar.eael-progressbar-circle .eael-progressbar-circle-half{clip-path:inset(0 0 0 50%)}.rtl .eael-progressbar-circle-container .eael-progressbar-half-circle-after .eael-progressbar-prefix-label{float:left} diff --git a/assets/front-end/css/view/sticky-video.css b/assets/front-end/css/view/sticky-video.css index d1242ed3a..fc3c49eeb 100644 --- a/assets/front-end/css/view/sticky-video.css +++ b/assets/front-end/css/view/sticky-video.css @@ -161,3 +161,12 @@ .eaelsv-overlay-visibility-transparent .plyr--youtube.plyr--full-ui.plyr--video .plyr__control--overlaid { opacity: 0; } + +/******************* + Theme Support +********************/ + +.theme-blocksy .eael-sticky-video-player2[data-sticky*=yes]:not(.in, .out), +.theme-blocksy .eael-sticky-video-player2[data-sticky*=fixed]:not(.in, .out) { + position: initial !important; +} diff --git a/assets/front-end/js/edit/advanced-data-table.js b/assets/front-end/js/edit/advanced-data-table.js index 81edfc714..e2651f17b 100644 --- a/assets/front-end/js/edit/advanced-data-table.js +++ b/assets/front-end/js/edit/advanced-data-table.js @@ -93,7 +93,7 @@ /*! no static exports found */ /***/ (function(module, exports) { -eval("function _typeof(o) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && \"function\" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? \"symbol\" : typeof o; }, _typeof(o); }\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, \"prototype\", { writable: false }); return Constructor; }\nfunction _toPropertyKey(t) { var i = _toPrimitive(t, \"string\"); return \"symbol\" == _typeof(i) ? i : String(i); }\nfunction _toPrimitive(t, r) { if (\"object\" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || \"default\"); if (\"object\" != _typeof(i)) return i; throw new TypeError(\"@@toPrimitive must return a primitive value.\"); } return (\"string\" === r ? String : Number)(t); }\nvar advancedDataTableEdit = /*#__PURE__*/function () {\n function advancedDataTableEdit() {\n _classCallCheck(this, advancedDataTableEdit);\n // class props\n this.panel = null;\n this.model = null;\n this.view = null;\n this.table = null;\n this.tableInnerHTML = null;\n this.timeout = null;\n this.activeCell = null;\n this.dragStartX = null;\n this.dragStartWidth = null;\n this.dragEl = null;\n this.dragging = false;\n\n // register hooks\n ea.hooks.addFilter(\"advancedDataTable.getClassProps\", \"ea\", this.getClassProps.bind(this));\n ea.hooks.addFilter(\"advancedDataTable.setClassProps\", \"ea\", this.setClassProps.bind(this));\n ea.hooks.addFilter(\"advancedDataTable.parseHTML\", \"ea\", this.parseHTML);\n ea.hooks.addAction(\"advancedDataTable.initEditor\", \"ea\", this.initEditor.bind(this));\n ea.hooks.addAction(\"advancedDataTable.updateFromView\", \"ea\", this.updateFromView.bind(this));\n ea.hooks.addAction(\"advancedDataTable.initInlineEdit\", \"ea\", this.initInlineEdit.bind(this));\n ea.hooks.addAction(\"advancedDataTable.initPanelAction\", \"ea\", this.initPanelAction.bind(this));\n ea.hooks.addAction(\"advancedDataTable.triggerTextChange\", \"ea\", this.triggerTextChange.bind(this));\n elementor.hooks.addFilter(\"elements/widget/contextMenuGroups\", this.initContextMenu);\n elementor.hooks.addAction(\"panel/open_editor/widget/eael-advanced-data-table\", this.initPanel.bind(this));\n }\n\n // update model from view\n _createClass(advancedDataTableEdit, [{\n key: \"updateFromView\",\n value: function updateFromView(view, value) {\n var refresh = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;\n var model = view.model;\n\n // disable elementor remote server render\n model.remoteRender = refresh;\n if (elementor.config.version > \"2.7.6\") {\n var container = view.getContainer();\n var settings = view.getContainer().settings.attributes;\n Object.keys(value).forEach(function (key) {\n settings[key] = value[key];\n });\n parent.window.$e.run(\"document/elements/settings\", {\n container: container,\n settings: settings,\n options: {\n external: refresh\n }\n });\n } else {\n // update backbone model\n Object.keys(value).forEach(function (key) {\n model.setSetting(key, value[key]);\n });\n }\n\n // enable elementor remote server render just after elementor throttle\n // ignore multiple assign\n this.timeout = setTimeout(function () {\n model.remoteRender = true;\n }, 1001);\n }\n\n // get class properties\n }, {\n key: \"getClassProps\",\n value: function getClassProps() {\n return {\n view: this.view,\n model: this.model,\n table: this.table,\n activeCell: this.activeCell\n };\n }\n\n // get class properties\n }, {\n key: \"setClassProps\",\n value: function setClassProps(props) {\n var _this = this;\n Object.keys(props).forEach(function (key) {\n _this[key] = props[key];\n });\n }\n\n // parse table html\n }, {\n key: \"parseHTML\",\n value: function parseHTML(tableHTML) {\n tableHTML.querySelectorAll(\"th, td\").forEach(function (el) {\n if (el.querySelector(\".inline-editor\") !== null) {\n el.innerHTML = decodeURI(el.dataset.quill || \"\");\n delete el.dataset.quill;\n }\n });\n return tableHTML;\n }\n\n // init editor\n }, {\n key: \"initEditor\",\n value: function initEditor(cell) {\n var _this2 = this;\n // init value\n cell.dataset.quill = encodeURI(cell.innerHTML);\n\n // insert editor dom\n cell.innerHTML = \"
\".concat(cell.innerHTML, \"
\");\n\n // init quill\n var quill = new Quill(cell.querySelector(\".inline-editor\"), {\n theme: \"bubble\",\n modules: {\n toolbar: [\"bold\", \"italic\", \"underline\", \"strike\", \"link\", {\n list: \"ordered\"\n }, {\n list: \"bullet\"\n }]\n }\n });\n\n // bind change\n quill.on(\"text-change\", function (delta, oldDelta, source) {\n clearTimeout(_this2.timeout);\n\n // update data\n cell.dataset.quill = encodeURI(quill.root.innerHTML);\n\n // parse table html\n var origTable = _this2.parseHTML(_this2.table.cloneNode(true));\n _this2.tableInnerHTML = origTable.innerHTML;\n // update table\n _this2.updateFromView(_this2.view, {\n ea_adv_data_table_static_html: origTable.innerHTML\n });\n });\n }\n\n // init inline editing features\n }, {\n key: \"initInlineEdit\",\n value: function initInlineEdit() {\n var _this3 = this;\n var interval = setInterval(function () {\n if (_this3.view.el.querySelector(\".ea-advanced-data-table\")) {\n // init table\n if (_this3.table !== _this3.view.el.querySelector(\".ea-advanced-data-table\")) {\n _this3.table = _this3.view.el.querySelector(\".ea-advanced-data-table\");\n\n // iniline editor\n if (_this3.table.classList.contains(\"ea-advanced-data-table-static\")) {\n _this3.table.querySelectorAll(\"th, td\").forEach(function (cell) {\n _this3.initEditor(cell);\n });\n }\n\n // mousedown\n _this3.table.addEventListener(\"mousedown\", function (e) {\n e.stopPropagation();\n if (e.target.tagName.toLowerCase() === \"th\") {\n _this3.dragging = true;\n _this3.dragEl = e.target;\n _this3.dragStartX = e.pageX;\n _this3.dragStartWidth = e.target.offsetWidth;\n }\n if (e.target.tagName.toLowerCase() === \"th\" || e.target.tagName.toLowerCase() === \"td\") {\n _this3.activeCell = e.target;\n } else if (e.target.parentNode.tagName.toLowerCase() === \"th\" || e.target.parentNode.tagName.toLowerCase() === \"td\") {\n _this3.activeCell = e.target.parentNode;\n } else if (e.target.parentNode.parentNode.tagName.toLowerCase() === \"th\" || e.target.parentNode.parentNode.tagName.toLowerCase() === \"td\") {\n _this3.activeCell = e.target.parentNode.parentNode;\n } else if (e.target.parentNode.parentNode.parentNode.tagName.toLowerCase() === \"th\" || e.target.parentNode.parentNode.parentNode.tagName.toLowerCase() === \"td\") {\n _this3.activeCell = e.target.parentNode.parentNode.parentNode;\n }\n });\n\n // mousemove\n _this3.table.addEventListener(\"mousemove\", function (e) {\n if (_this3.dragging) {\n _this3.dragEl.style.width = \"\".concat(_this3.dragStartWidth + (event.pageX - _this3.dragStartX), \"px\");\n }\n });\n\n // mouseup\n _this3.table.addEventListener(\"mouseup\", function (e) {\n if (_this3.dragging) {\n _this3.dragging = false;\n clearTimeout(_this3.timeout);\n if (_this3.table.classList.contains(\"ea-advanced-data-table-static\")) {\n // parse table html\n var origTable = _this3.parseHTML(_this3.table.cloneNode(true));\n\n // update table\n _this3.updateFromView(_this3.view, {\n ea_adv_data_table_static_html: origTable.innerHTML\n });\n } else {\n // th width store\n var widths = [];\n\n // collect width of th\n _this3.table.querySelectorAll(\"th\").forEach(function (el, index) {\n widths[index] = el.style.width;\n });\n\n // update table\n _this3.updateFromView(_this3.view, {\n ea_adv_data_table_dynamic_th_width: widths\n });\n }\n }\n });\n\n // clear style\n _this3.table.addEventListener(\"dblclick\", function (e) {\n if (e.target.tagName.toLowerCase() === \"th\") {\n e.stopPropagation();\n clearTimeout(_this3.timeout);\n if (_this3.table.classList.contains(\"ea-advanced-data-table-static\")) {\n // parse table html\n var origTable = _this3.parseHTML(_this3.table.cloneNode(true));\n\n // update table\n _this3.updateFromView(_this3.view, {\n ea_adv_data_table_static_html: origTable.innerHTML\n });\n } else {\n // th width store\n var widths = [];\n\n // collect width of th\n _this3.table.querySelectorAll(\"th\").forEach(function (el, index) {\n widths[index] = el.style.width;\n });\n\n // update table\n _this3.updateFromView(_this3.view, {\n ea_adv_data_table_dynamic_th_width: widths\n });\n }\n }\n });\n }\n clearInterval(interval);\n }\n }, 500);\n }\n\n // panel action\n }, {\n key: \"initPanelAction\",\n value: function initPanelAction() {\n var _this4 = this;\n this.panel.content.el.onclick = function (event) {\n if (event.target.dataset.event == \"ea:advTable:export\") {\n // export\n var rows = _this4.table.querySelectorAll(\"table tr\");\n var csv = [];\n\n // generate csv\n for (var i = 0; i < rows.length; i++) {\n var row = [];\n var _cols = rows[i].querySelectorAll(\"th, td\");\n if (_this4.table.classList.contains(\"ea-advanced-data-table-static\")) {\n for (var j = 0; j < _cols.length; j++) {\n row.push(decodeURI(_cols[j].dataset.quill));\n }\n } else {\n for (var _j = 0; _j < _cols.length; _j++) {\n row.push(JSON.stringify(_cols[_j].innerHTML.replace(/,\"\"\"([^\"]+)\"\"\",/g, ',\"$1\",').trim()));\n }\n }\n csv.push(row.join(\",\"));\n }\n\n // download\n var csv_file = new Blob([csv.join(\"\\n\")], {\n type: \"text/csv\"\n });\n var downloadLink = parent.document.createElement(\"a\");\n downloadLink.classList.add(\"ea-adv-data-table-download-\".concat(_this4.model.attributes.id));\n downloadLink.download = \"ea-adv-data-table-\".concat(_this4.model.attributes.id, \".csv\");\n downloadLink.href = window.URL.createObjectURL(csv_file);\n downloadLink.style.display = \"none\";\n parent.document.body.appendChild(downloadLink);\n downloadLink.click();\n parent.document.querySelector(\".ea-adv-data-table-download-\".concat(_this4.model.attributes.id)).remove();\n } else if (event.target.dataset.event == \"ea:advTable:import\") {\n // import\n var textarea = _this4.panel.content.el.querySelector(\".ea_adv_table_csv_string\");\n var enableHeader = _this4.panel.content.el.querySelector(\".ea_adv_table_csv_string_table\").checked;\n var csletr = textarea.value.split(\"\\n\");\n var header = \"\";\n var body = \"\";\n if (textarea.value.length > 0) {\n body += \"\";\n csletr.forEach(function (row, index) {\n if (row.length > 0) {\n var colReplace = row.replace(/,\"\"\"([^\"]+)\"\"\",/g, ',\"$1\",');\n cols = colReplace.match(/(\"(?:[^\"\\\\]|\\\\.)*\"|[^\",\"]+)/gm);\n if (cols.length > 0) {\n if (enableHeader && index == 0) {\n header += \"\";\n cols.forEach(function (col) {\n if (col.match(/(^\"\")|(^\")|(\"$)|(\"\"$)/g)) {\n header += \"\".concat(JSON.parse(col), \"\");\n } else {\n header += \"\".concat(col, \"\");\n }\n });\n header += \"\";\n } else {\n body += \"\";\n cols.forEach(function (col) {\n if (col.match(/(^\"\")|(^\")|(\"$)|(\"\"$)/g)) {\n body += \"\".concat(JSON.parse(col), \"\");\n } else {\n body += \"\".concat(col, \"\");\n }\n });\n body += \"\";\n }\n }\n }\n });\n body += \"\";\n if (header.length > 0 || body.length > 0) {\n _this4.tableInnerHTML = header + body;\n _this4.updateFromView(_this4.view, {\n ea_adv_data_table_static_html: header + body\n }, true);\n\n // init inline edit\n var interval = setInterval(function () {\n if (_this4.view.el.querySelector(\".ea-advanced-data-table\").innerHTML == header + body) {\n clearInterval(interval);\n ea.hooks.doAction(\"advancedDataTable.initInlineEdit\");\n }\n }, 500);\n }\n }\n textarea.value = \"\";\n }\n ea.hooks.doAction(\"advancedDataTable.panelAction\", _this4.panel, _this4.model, _this4.view, event);\n };\n }\n\n // init panel\n }, {\n key: \"initPanel\",\n value: function initPanel(panel, model, view) {\n var _this5 = this;\n this.panel = panel;\n this.model = model;\n this.view = view;\n var elClass = \".ea-advanced-data-table-\".concat(this.view.container.args.id);\n var eaTable = this.view.el.querySelector(\".ea-advanced-data-table\" + elClass);\n // init inline edit\n ea.hooks.doAction(\"advancedDataTable.initInlineEdit\");\n\n // init panel action\n ea.hooks.doAction(\"advancedDataTable.initPanelAction\");\n\n // after panel init hook\n ea.hooks.doAction(\"advancedDataTable.afterInitPanel\", panel, model, view);\n model.once(\"editor:close\", function () {\n if (!eaTable) {\n return false;\n }\n // parse table html\n var origTable = _this5.parseHTML(eaTable.cloneNode(true));\n _this5.tableInnerHTML = origTable.innerHTML;\n\n // update table\n // this.updateFromView(\n // \tthis.view,\n // \t{\n // \t\tea_adv_data_table_static_html: this.tableInnerHTML,\n // \t},\n // \ttrue\n // );\n });\n }\n\n // context menu\n }, {\n key: \"initContextMenu\",\n value: function initContextMenu(groups, element) {\n if (element.options.model.attributes.widgetType == \"eael-advanced-data-table\" && element.options.model.attributes.settings.attributes.ea_adv_data_table_source == \"static\") {\n groups.push({\n name: \"ea_advanced_data_table\",\n actions: [{\n name: \"add_row_above\",\n title: \"Add Row Above\",\n callback: function callback() {\n var _ea$hooks$applyFilter = ea.hooks.applyFilters(\"advancedDataTable.getClassProps\"),\n view = _ea$hooks$applyFilter.view,\n table = _ea$hooks$applyFilter.table,\n activeCell = _ea$hooks$applyFilter.activeCell;\n // remove blank tr if any\n jQuery(table).find('tr:empty').each(function () {\n if (jQuery(this).find('td').length == 0) {\n this.remove();\n }\n });\n if (activeCell !== null && activeCell.tagName.toLowerCase() != \"th\" && activeCell.parentNode.rowIndex) {\n var index = activeCell.parentNode.rowIndex;\n var row = table.insertRow(index);\n // insert cells in row\n for (var i = 0; i < table.rows[0].cells.length; i++) {\n var cell = row.insertCell(i);\n\n // init inline editor\n ea.hooks.doAction(\"advancedDataTable.initEditor\", cell);\n }\n\n // remove active cell\n ea.hooks.applyFilters(\"advancedDataTable.setClassProps\", {\n activeCell: null\n });\n\n // parse table html\n var origTable = ea.hooks.applyFilters(\"advancedDataTable.parseHTML\", table.cloneNode(true));\n\n // update model\n ea.hooks.doAction(\"advancedDataTable.updateFromView\", view, {\n ea_adv_data_table_static_html: origTable.innerHTML\n });\n\n // trigger text-change event\n ea.hooks.doAction(\"advancedDataTable.triggerTextChange\", table);\n }\n }\n }, {\n name: \"add_row_below\",\n title: \"Add Row Below\",\n callback: function callback() {\n var _ea$hooks$applyFilter2 = ea.hooks.applyFilters(\"advancedDataTable.getClassProps\"),\n view = _ea$hooks$applyFilter2.view,\n table = _ea$hooks$applyFilter2.table,\n activeCell = _ea$hooks$applyFilter2.activeCell;\n if (activeCell !== null) {\n var index = activeCell.parentNode.rowIndex + 1;\n var row = table.insertRow(index);\n for (var i = 0; i < table.rows[0].cells.length; i++) {\n var cell = row.insertCell(i);\n\n // init inline editor\n ea.hooks.doAction(\"advancedDataTable.initEditor\", cell);\n }\n\n // remove active cell\n ea.hooks.applyFilters(\"advancedDataTable.setClassProps\", {\n activeCell: null\n });\n\n // parse table html\n var origTable = ea.hooks.applyFilters(\"advancedDataTable.parseHTML\", table.cloneNode(true));\n\n // update model\n ea.hooks.doAction(\"advancedDataTable.updateFromView\", view, {\n ea_adv_data_table_static_html: origTable.innerHTML\n });\n\n // trigger text-change event\n ea.hooks.doAction(\"advancedDataTable.triggerTextChange\", table);\n }\n }\n }, {\n name: \"add_column_left\",\n title: \"Add Column Left\",\n callback: function callback() {\n var _ea$hooks$applyFilter3 = ea.hooks.applyFilters(\"advancedDataTable.getClassProps\"),\n view = _ea$hooks$applyFilter3.view,\n table = _ea$hooks$applyFilter3.table,\n activeCell = _ea$hooks$applyFilter3.activeCell;\n if (activeCell !== null) {\n var index = activeCell.cellIndex;\n for (var i = 0; i < table.rows.length; i++) {\n if (table.rows[i].cells[0].tagName.toLowerCase() == \"th\") {\n var cell = table.rows[i].insertBefore(document.createElement(\"th\"), table.rows[i].cells[index]);\n\n // init inline editor\n ea.hooks.doAction(\"advancedDataTable.initEditor\", cell);\n } else {\n var _cell = table.rows[i].insertCell(index);\n\n // init inline editor\n ea.hooks.doAction(\"advancedDataTable.initEditor\", _cell);\n }\n }\n\n // remove active cell\n ea.hooks.applyFilters(\"advancedDataTable.setClassProps\", {\n activeCell: null\n });\n\n // parse table html\n var origTable = ea.hooks.applyFilters(\"advancedDataTable.parseHTML\", table.cloneNode(true));\n\n // update model\n ea.hooks.doAction(\"advancedDataTable.updateFromView\", view, {\n ea_adv_data_table_static_html: origTable.innerHTML\n });\n\n // trigger text-change event\n ea.hooks.doAction(\"advancedDataTable.triggerTextChange\", table);\n }\n }\n }, {\n name: \"add_column_right\",\n title: \"Add Column Right\",\n callback: function callback() {\n var _ea$hooks$applyFilter4 = ea.hooks.applyFilters(\"advancedDataTable.getClassProps\"),\n view = _ea$hooks$applyFilter4.view,\n table = _ea$hooks$applyFilter4.table,\n activeCell = _ea$hooks$applyFilter4.activeCell;\n if (activeCell !== null) {\n var index = activeCell.cellIndex + 1;\n for (var i = 0; i < table.rows.length; i++) {\n if (table.rows[i].cells[0].tagName.toLowerCase() == \"th\") {\n var cell = table.rows[i].insertBefore(document.createElement(\"th\"), table.rows[i].cells[index]);\n\n // init inline editor\n ea.hooks.doAction(\"advancedDataTable.initEditor\", cell);\n } else {\n var _cell2 = table.rows[i].insertCell(index);\n\n // init inline editor\n ea.hooks.doAction(\"advancedDataTable.initEditor\", _cell2);\n }\n }\n\n // remove active cell\n ea.hooks.applyFilters(\"advancedDataTable.setClassProps\", {\n activeCell: null\n });\n\n // parse table html\n var origTable = ea.hooks.applyFilters(\"advancedDataTable.parseHTML\", table.cloneNode(true));\n\n // update model\n ea.hooks.doAction(\"advancedDataTable.updateFromView\", view, {\n ea_adv_data_table_static_html: origTable.innerHTML\n });\n\n // trigger text-change event\n ea.hooks.doAction(\"advancedDataTable.triggerTextChange\", table);\n }\n }\n }, {\n name: \"delete_row\",\n title: \"Delete Row\",\n callback: function callback() {\n var _ea$hooks$applyFilter5 = ea.hooks.applyFilters(\"advancedDataTable.getClassProps\"),\n view = _ea$hooks$applyFilter5.view,\n table = _ea$hooks$applyFilter5.table,\n activeCell = _ea$hooks$applyFilter5.activeCell;\n if (activeCell !== null) {\n var index = activeCell.parentNode.rowIndex;\n\n // delete row\n table.deleteRow(index);\n\n // remove active cell\n ea.hooks.applyFilters(\"advancedDataTable.setClassProps\", {\n activeCell: null\n });\n\n // parse table html\n var origTable = ea.hooks.applyFilters(\"advancedDataTable.parseHTML\", table.cloneNode(true));\n\n // update model\n ea.hooks.doAction(\"advancedDataTable.updateFromView\", view, {\n ea_adv_data_table_static_html: origTable.innerHTML\n });\n\n // trigger text-change event\n ea.hooks.doAction(\"advancedDataTable.triggerTextChange\", table);\n }\n }\n }, {\n name: \"delete_column\",\n title: \"Delete Column\",\n callback: function callback() {\n var _ea$hooks$applyFilter6 = ea.hooks.applyFilters(\"advancedDataTable.getClassProps\"),\n view = _ea$hooks$applyFilter6.view,\n table = _ea$hooks$applyFilter6.table,\n activeCell = _ea$hooks$applyFilter6.activeCell;\n if (activeCell !== null) {\n var index = activeCell.cellIndex;\n\n // delete columns\n for (var i = 0; i < table.rows.length; i++) {\n table.rows[i].deleteCell(index);\n }\n\n // remove active cell\n ea.hooks.applyFilters(\"advancedDataTable.setClassProps\", {\n activeCell: null\n });\n\n // parse table html\n var origTable = ea.hooks.applyFilters(\"advancedDataTable.parseHTML\", table.cloneNode(true));\n\n // update model\n ea.hooks.doAction(\"advancedDataTable.updateFromView\", view, {\n ea_adv_data_table_static_html: origTable.innerHTML\n });\n\n // trigger text-change event\n ea.hooks.doAction(\"advancedDataTable.triggerTextChange\", table);\n }\n }\n }]\n });\n }\n return groups;\n }\n }, {\n key: \"triggerTextChange\",\n value: function triggerTextChange(table) {\n if (table.classList.contains(\"ea-advanced-data-table-static\")) {\n var cellSelector = jQuery('thead tr:first-child th:first-child .ql-editor p', table),\n cellSelector = cellSelector.length ? cellSelector : jQuery('tbody tr:first-child td:first-child .ql-editor p', table),\n cellData = cellSelector.html();\n cellSelector.html(cellData + ' ');\n setTimeout(function () {\n cellSelector.html(cellData);\n }, 1100);\n }\n }\n }]);\n return advancedDataTableEdit;\n}();\nea.hooks.addAction(\"editMode.init\", \"ea\", function () {\n new advancedDataTableEdit();\n});\n\n//# sourceURL=webpack:///./src/js/edit/advanced-data-table.js?"); +eval("function _typeof(o) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && \"function\" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? \"symbol\" : typeof o; }, _typeof(o); }\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, \"prototype\", { writable: false }); return Constructor; }\nfunction _toPropertyKey(t) { var i = _toPrimitive(t, \"string\"); return \"symbol\" == _typeof(i) ? i : i + \"\"; }\nfunction _toPrimitive(t, r) { if (\"object\" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || \"default\"); if (\"object\" != _typeof(i)) return i; throw new TypeError(\"@@toPrimitive must return a primitive value.\"); } return (\"string\" === r ? String : Number)(t); }\nvar advancedDataTableEdit = /*#__PURE__*/function () {\n function advancedDataTableEdit() {\n _classCallCheck(this, advancedDataTableEdit);\n // class props\n this.panel = null;\n this.model = null;\n this.view = null;\n this.table = null;\n this.tableInnerHTML = null;\n this.timeout = null;\n this.activeCell = null;\n this.dragStartX = null;\n this.dragStartWidth = null;\n this.dragEl = null;\n this.dragging = false;\n\n // register hooks\n ea.hooks.addFilter(\"advancedDataTable.getClassProps\", \"ea\", this.getClassProps.bind(this));\n ea.hooks.addFilter(\"advancedDataTable.setClassProps\", \"ea\", this.setClassProps.bind(this));\n ea.hooks.addFilter(\"advancedDataTable.parseHTML\", \"ea\", this.parseHTML);\n ea.hooks.addAction(\"advancedDataTable.initEditor\", \"ea\", this.initEditor.bind(this));\n ea.hooks.addAction(\"advancedDataTable.updateFromView\", \"ea\", this.updateFromView.bind(this));\n ea.hooks.addAction(\"advancedDataTable.initInlineEdit\", \"ea\", this.initInlineEdit.bind(this));\n ea.hooks.addAction(\"advancedDataTable.initPanelAction\", \"ea\", this.initPanelAction.bind(this));\n ea.hooks.addAction(\"advancedDataTable.triggerTextChange\", \"ea\", this.triggerTextChange.bind(this));\n elementor.hooks.addFilter(\"elements/widget/contextMenuGroups\", this.initContextMenu);\n elementor.hooks.addAction(\"panel/open_editor/widget/eael-advanced-data-table\", this.initPanel.bind(this));\n }\n\n // update model from view\n return _createClass(advancedDataTableEdit, [{\n key: \"updateFromView\",\n value: function updateFromView(view, value) {\n var refresh = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;\n var model = view.model;\n\n // disable elementor remote server render\n model.remoteRender = refresh;\n if (elementor.config.version > \"2.7.6\") {\n var container = view.getContainer();\n var settings = view.getContainer().settings.attributes;\n Object.keys(value).forEach(function (key) {\n settings[key] = value[key];\n });\n parent.window.$e.run(\"document/elements/settings\", {\n container: container,\n settings: settings,\n options: {\n external: refresh\n }\n });\n } else {\n // update backbone model\n Object.keys(value).forEach(function (key) {\n model.setSetting(key, value[key]);\n });\n }\n\n // enable elementor remote server render just after elementor throttle\n // ignore multiple assign\n this.timeout = setTimeout(function () {\n model.remoteRender = true;\n }, 1001);\n }\n\n // get class properties\n }, {\n key: \"getClassProps\",\n value: function getClassProps() {\n return {\n view: this.view,\n model: this.model,\n table: this.table,\n activeCell: this.activeCell\n };\n }\n\n // get class properties\n }, {\n key: \"setClassProps\",\n value: function setClassProps(props) {\n var _this = this;\n Object.keys(props).forEach(function (key) {\n _this[key] = props[key];\n });\n }\n\n // parse table html\n }, {\n key: \"parseHTML\",\n value: function parseHTML(tableHTML) {\n tableHTML.querySelectorAll(\"th, td\").forEach(function (el) {\n if (el.querySelector(\".inline-editor\") !== null) {\n el.innerHTML = decodeURI(el.dataset.quill || \"\");\n delete el.dataset.quill;\n }\n });\n return tableHTML;\n }\n\n // init editor\n }, {\n key: \"initEditor\",\n value: function initEditor(cell) {\n var _this2 = this;\n // init value\n cell.dataset.quill = encodeURI(cell.innerHTML);\n\n // insert editor dom\n cell.innerHTML = \"
\".concat(cell.innerHTML, \"
\");\n\n // init quill\n var quill = new Quill(cell.querySelector(\".inline-editor\"), {\n theme: \"bubble\",\n modules: {\n toolbar: [\"bold\", \"italic\", \"underline\", \"strike\", \"link\", {\n list: \"ordered\"\n }, {\n list: \"bullet\"\n }]\n }\n });\n\n // bind change\n quill.on(\"text-change\", function (delta, oldDelta, source) {\n clearTimeout(_this2.timeout);\n\n // update data\n cell.dataset.quill = encodeURI(quill.root.innerHTML);\n\n // parse table html\n var origTable = _this2.parseHTML(_this2.table.cloneNode(true));\n _this2.tableInnerHTML = origTable.innerHTML;\n // update table\n _this2.updateFromView(_this2.view, {\n ea_adv_data_table_static_html: origTable.innerHTML\n });\n });\n }\n\n // init inline editing features\n }, {\n key: \"initInlineEdit\",\n value: function initInlineEdit() {\n var _this3 = this;\n var interval = setInterval(function () {\n if (_this3.view.el.querySelector(\".ea-advanced-data-table\")) {\n // init table\n if (_this3.table !== _this3.view.el.querySelector(\".ea-advanced-data-table\")) {\n _this3.table = _this3.view.el.querySelector(\".ea-advanced-data-table\");\n\n // iniline editor\n if (_this3.table.classList.contains(\"ea-advanced-data-table-static\")) {\n _this3.table.querySelectorAll(\"th, td\").forEach(function (cell) {\n _this3.initEditor(cell);\n });\n }\n\n // mousedown\n _this3.table.addEventListener(\"mousedown\", function (e) {\n e.stopPropagation();\n if (e.target.tagName.toLowerCase() === \"th\") {\n _this3.dragging = true;\n _this3.dragEl = e.target;\n _this3.dragStartX = e.pageX;\n _this3.dragStartWidth = e.target.offsetWidth;\n }\n if (e.target.tagName.toLowerCase() === \"th\" || e.target.tagName.toLowerCase() === \"td\") {\n _this3.activeCell = e.target;\n } else if (e.target.parentNode.tagName.toLowerCase() === \"th\" || e.target.parentNode.tagName.toLowerCase() === \"td\") {\n _this3.activeCell = e.target.parentNode;\n } else if (e.target.parentNode.parentNode.tagName.toLowerCase() === \"th\" || e.target.parentNode.parentNode.tagName.toLowerCase() === \"td\") {\n _this3.activeCell = e.target.parentNode.parentNode;\n } else if (e.target.parentNode.parentNode.parentNode.tagName.toLowerCase() === \"th\" || e.target.parentNode.parentNode.parentNode.tagName.toLowerCase() === \"td\") {\n _this3.activeCell = e.target.parentNode.parentNode.parentNode;\n }\n });\n\n // mousemove\n _this3.table.addEventListener(\"mousemove\", function (e) {\n if (_this3.dragging) {\n _this3.dragEl.style.width = \"\".concat(_this3.dragStartWidth + (event.pageX - _this3.dragStartX), \"px\");\n }\n });\n\n // mouseup\n _this3.table.addEventListener(\"mouseup\", function (e) {\n if (_this3.dragging) {\n _this3.dragging = false;\n clearTimeout(_this3.timeout);\n if (_this3.table.classList.contains(\"ea-advanced-data-table-static\")) {\n // parse table html\n var origTable = _this3.parseHTML(_this3.table.cloneNode(true));\n\n // update table\n _this3.updateFromView(_this3.view, {\n ea_adv_data_table_static_html: origTable.innerHTML\n });\n } else {\n // th width store\n var widths = [];\n\n // collect width of th\n _this3.table.querySelectorAll(\"th\").forEach(function (el, index) {\n widths[index] = el.style.width;\n });\n\n // update table\n _this3.updateFromView(_this3.view, {\n ea_adv_data_table_dynamic_th_width: widths\n });\n }\n }\n });\n\n // clear style\n _this3.table.addEventListener(\"dblclick\", function (e) {\n if (e.target.tagName.toLowerCase() === \"th\") {\n e.stopPropagation();\n clearTimeout(_this3.timeout);\n if (_this3.table.classList.contains(\"ea-advanced-data-table-static\")) {\n // parse table html\n var origTable = _this3.parseHTML(_this3.table.cloneNode(true));\n\n // update table\n _this3.updateFromView(_this3.view, {\n ea_adv_data_table_static_html: origTable.innerHTML\n });\n } else {\n // th width store\n var widths = [];\n\n // collect width of th\n _this3.table.querySelectorAll(\"th\").forEach(function (el, index) {\n widths[index] = el.style.width;\n });\n\n // update table\n _this3.updateFromView(_this3.view, {\n ea_adv_data_table_dynamic_th_width: widths\n });\n }\n }\n });\n }\n clearInterval(interval);\n }\n }, 500);\n }\n\n // panel action\n }, {\n key: \"initPanelAction\",\n value: function initPanelAction() {\n var _this4 = this;\n this.panel.content.el.onclick = function (event) {\n if (event.target.dataset.event == \"ea:advTable:export\") {\n // export\n var rows = _this4.table.querySelectorAll(\"table tr\");\n var csv = [];\n\n // generate csv\n for (var i = 0; i < rows.length; i++) {\n var row = [];\n var _cols = rows[i].querySelectorAll(\"th, td\");\n if (_this4.table.classList.contains(\"ea-advanced-data-table-static\")) {\n for (var j = 0; j < _cols.length; j++) {\n row.push(decodeURI(_cols[j].dataset.quill));\n }\n } else {\n for (var _j = 0; _j < _cols.length; _j++) {\n row.push(JSON.stringify(_cols[_j].innerHTML.replace(/,\"\"\"([^\"]+)\"\"\",/g, ',\"$1\",').trim()));\n }\n }\n csv.push(row.join(\",\"));\n }\n\n // download\n var csv_file = new Blob([csv.join(\"\\n\")], {\n type: \"text/csv\"\n });\n var downloadLink = parent.document.createElement(\"a\");\n downloadLink.classList.add(\"ea-adv-data-table-download-\".concat(_this4.model.attributes.id));\n downloadLink.download = \"ea-adv-data-table-\".concat(_this4.model.attributes.id, \".csv\");\n downloadLink.href = window.URL.createObjectURL(csv_file);\n downloadLink.style.display = \"none\";\n parent.document.body.appendChild(downloadLink);\n downloadLink.click();\n parent.document.querySelector(\".ea-adv-data-table-download-\".concat(_this4.model.attributes.id)).remove();\n } else if (event.target.dataset.event == \"ea:advTable:import\") {\n // import\n var textarea = _this4.panel.content.el.querySelector(\".ea_adv_table_csv_string\");\n var enableHeader = _this4.panel.content.el.querySelector(\".ea_adv_table_csv_string_table\").checked;\n var csletr = textarea.value.split(\"\\n\");\n var header = \"\";\n var body = \"\";\n if (textarea.value.length > 0) {\n body += \"\";\n csletr.forEach(function (row, index) {\n if (row.length > 0) {\n var colReplace = row.replace(/,\"\"\"([^\"]+)\"\"\",/g, ',\"$1\",');\n cols = colReplace.match(/(\"(?:[^\"\\\\]|\\\\.)*\"|[^\",\"]+)/gm);\n if (cols.length > 0) {\n if (enableHeader && index == 0) {\n header += \"\";\n cols.forEach(function (col) {\n if (col.match(/(^\"\")|(^\")|(\"$)|(\"\"$)/g)) {\n header += \"\".concat(JSON.parse(col), \"\");\n } else {\n header += \"\".concat(col, \"\");\n }\n });\n header += \"\";\n } else {\n body += \"\";\n cols.forEach(function (col) {\n if (col.match(/(^\"\")|(^\")|(\"$)|(\"\"$)/g)) {\n body += \"\".concat(JSON.parse(col), \"\");\n } else {\n body += \"\".concat(col, \"\");\n }\n });\n body += \"\";\n }\n }\n }\n });\n body += \"\";\n if (header.length > 0 || body.length > 0) {\n _this4.tableInnerHTML = header + body;\n _this4.updateFromView(_this4.view, {\n ea_adv_data_table_static_html: header + body\n }, true);\n\n // init inline edit\n var interval = setInterval(function () {\n if (_this4.view.el.querySelector(\".ea-advanced-data-table\").innerHTML == header + body) {\n clearInterval(interval);\n ea.hooks.doAction(\"advancedDataTable.initInlineEdit\");\n }\n }, 500);\n }\n }\n textarea.value = \"\";\n }\n ea.hooks.doAction(\"advancedDataTable.panelAction\", _this4.panel, _this4.model, _this4.view, event);\n };\n }\n\n // init panel\n }, {\n key: \"initPanel\",\n value: function initPanel(panel, model, view) {\n var _this5 = this;\n this.panel = panel;\n this.model = model;\n this.view = view;\n var elClass = \".ea-advanced-data-table-\".concat(this.view.container.args.id);\n var eaTable = this.view.el.querySelector(\".ea-advanced-data-table\" + elClass);\n // init inline edit\n ea.hooks.doAction(\"advancedDataTable.initInlineEdit\");\n\n // init panel action\n ea.hooks.doAction(\"advancedDataTable.initPanelAction\");\n\n // after panel init hook\n ea.hooks.doAction(\"advancedDataTable.afterInitPanel\", panel, model, view);\n model.once(\"editor:close\", function () {\n if (!eaTable) {\n return false;\n }\n // parse table html\n var origTable = _this5.parseHTML(eaTable.cloneNode(true));\n _this5.tableInnerHTML = origTable.innerHTML;\n\n // update table\n // this.updateFromView(\n // \tthis.view,\n // \t{\n // \t\tea_adv_data_table_static_html: this.tableInnerHTML,\n // \t},\n // \ttrue\n // );\n });\n }\n\n // context menu\n }, {\n key: \"initContextMenu\",\n value: function initContextMenu(groups, element) {\n if (element.options.model.attributes.widgetType == \"eael-advanced-data-table\" && element.options.model.attributes.settings.attributes.ea_adv_data_table_source == \"static\") {\n groups.push({\n name: \"ea_advanced_data_table\",\n actions: [{\n name: \"add_row_above\",\n title: \"Add Row Above\",\n callback: function callback() {\n var _ea$hooks$applyFilter = ea.hooks.applyFilters(\"advancedDataTable.getClassProps\"),\n view = _ea$hooks$applyFilter.view,\n table = _ea$hooks$applyFilter.table,\n activeCell = _ea$hooks$applyFilter.activeCell;\n // remove blank tr if any\n jQuery(table).find('tr:empty').each(function () {\n if (jQuery(this).find('td').length == 0) {\n this.remove();\n }\n });\n if (activeCell !== null && activeCell.tagName.toLowerCase() != \"th\" && activeCell.parentNode.rowIndex) {\n var index = activeCell.parentNode.rowIndex;\n var row = table.insertRow(index);\n // insert cells in row\n for (var i = 0; i < table.rows[0].cells.length; i++) {\n var cell = row.insertCell(i);\n\n // init inline editor\n ea.hooks.doAction(\"advancedDataTable.initEditor\", cell);\n }\n\n // remove active cell\n ea.hooks.applyFilters(\"advancedDataTable.setClassProps\", {\n activeCell: null\n });\n\n // parse table html\n var origTable = ea.hooks.applyFilters(\"advancedDataTable.parseHTML\", table.cloneNode(true));\n\n // update model\n ea.hooks.doAction(\"advancedDataTable.updateFromView\", view, {\n ea_adv_data_table_static_html: origTable.innerHTML\n });\n\n // trigger text-change event\n ea.hooks.doAction(\"advancedDataTable.triggerTextChange\", table);\n }\n }\n }, {\n name: \"add_row_below\",\n title: \"Add Row Below\",\n callback: function callback() {\n var _ea$hooks$applyFilter2 = ea.hooks.applyFilters(\"advancedDataTable.getClassProps\"),\n view = _ea$hooks$applyFilter2.view,\n table = _ea$hooks$applyFilter2.table,\n activeCell = _ea$hooks$applyFilter2.activeCell;\n if (activeCell !== null) {\n var index = activeCell.parentNode.rowIndex + 1;\n var row = table.insertRow(index);\n for (var i = 0; i < table.rows[0].cells.length; i++) {\n var cell = row.insertCell(i);\n\n // init inline editor\n ea.hooks.doAction(\"advancedDataTable.initEditor\", cell);\n }\n\n // remove active cell\n ea.hooks.applyFilters(\"advancedDataTable.setClassProps\", {\n activeCell: null\n });\n\n // parse table html\n var origTable = ea.hooks.applyFilters(\"advancedDataTable.parseHTML\", table.cloneNode(true));\n\n // update model\n ea.hooks.doAction(\"advancedDataTable.updateFromView\", view, {\n ea_adv_data_table_static_html: origTable.innerHTML\n });\n\n // trigger text-change event\n ea.hooks.doAction(\"advancedDataTable.triggerTextChange\", table);\n }\n }\n }, {\n name: \"add_column_left\",\n title: \"Add Column Left\",\n callback: function callback() {\n var _ea$hooks$applyFilter3 = ea.hooks.applyFilters(\"advancedDataTable.getClassProps\"),\n view = _ea$hooks$applyFilter3.view,\n table = _ea$hooks$applyFilter3.table,\n activeCell = _ea$hooks$applyFilter3.activeCell;\n if (activeCell !== null) {\n var index = activeCell.cellIndex;\n for (var i = 0; i < table.rows.length; i++) {\n if (table.rows[i].cells[0].tagName.toLowerCase() == \"th\") {\n var cell = table.rows[i].insertBefore(document.createElement(\"th\"), table.rows[i].cells[index]);\n\n // init inline editor\n ea.hooks.doAction(\"advancedDataTable.initEditor\", cell);\n } else {\n var _cell = table.rows[i].insertCell(index);\n\n // init inline editor\n ea.hooks.doAction(\"advancedDataTable.initEditor\", _cell);\n }\n }\n\n // remove active cell\n ea.hooks.applyFilters(\"advancedDataTable.setClassProps\", {\n activeCell: null\n });\n\n // parse table html\n var origTable = ea.hooks.applyFilters(\"advancedDataTable.parseHTML\", table.cloneNode(true));\n\n // update model\n ea.hooks.doAction(\"advancedDataTable.updateFromView\", view, {\n ea_adv_data_table_static_html: origTable.innerHTML\n });\n\n // trigger text-change event\n ea.hooks.doAction(\"advancedDataTable.triggerTextChange\", table);\n }\n }\n }, {\n name: \"add_column_right\",\n title: \"Add Column Right\",\n callback: function callback() {\n var _ea$hooks$applyFilter4 = ea.hooks.applyFilters(\"advancedDataTable.getClassProps\"),\n view = _ea$hooks$applyFilter4.view,\n table = _ea$hooks$applyFilter4.table,\n activeCell = _ea$hooks$applyFilter4.activeCell;\n if (activeCell !== null) {\n var index = activeCell.cellIndex + 1;\n for (var i = 0; i < table.rows.length; i++) {\n if (table.rows[i].cells[0].tagName.toLowerCase() == \"th\") {\n var cell = table.rows[i].insertBefore(document.createElement(\"th\"), table.rows[i].cells[index]);\n\n // init inline editor\n ea.hooks.doAction(\"advancedDataTable.initEditor\", cell);\n } else {\n var _cell2 = table.rows[i].insertCell(index);\n\n // init inline editor\n ea.hooks.doAction(\"advancedDataTable.initEditor\", _cell2);\n }\n }\n\n // remove active cell\n ea.hooks.applyFilters(\"advancedDataTable.setClassProps\", {\n activeCell: null\n });\n\n // parse table html\n var origTable = ea.hooks.applyFilters(\"advancedDataTable.parseHTML\", table.cloneNode(true));\n\n // update model\n ea.hooks.doAction(\"advancedDataTable.updateFromView\", view, {\n ea_adv_data_table_static_html: origTable.innerHTML\n });\n\n // trigger text-change event\n ea.hooks.doAction(\"advancedDataTable.triggerTextChange\", table);\n }\n }\n }, {\n name: \"delete_row\",\n title: \"Delete Row\",\n callback: function callback() {\n var _ea$hooks$applyFilter5 = ea.hooks.applyFilters(\"advancedDataTable.getClassProps\"),\n view = _ea$hooks$applyFilter5.view,\n table = _ea$hooks$applyFilter5.table,\n activeCell = _ea$hooks$applyFilter5.activeCell;\n if (activeCell !== null) {\n var index = activeCell.parentNode.rowIndex;\n\n // delete row\n table.deleteRow(index);\n\n // remove active cell\n ea.hooks.applyFilters(\"advancedDataTable.setClassProps\", {\n activeCell: null\n });\n\n // parse table html\n var origTable = ea.hooks.applyFilters(\"advancedDataTable.parseHTML\", table.cloneNode(true));\n\n // update model\n ea.hooks.doAction(\"advancedDataTable.updateFromView\", view, {\n ea_adv_data_table_static_html: origTable.innerHTML\n });\n\n // trigger text-change event\n ea.hooks.doAction(\"advancedDataTable.triggerTextChange\", table);\n }\n }\n }, {\n name: \"delete_column\",\n title: \"Delete Column\",\n callback: function callback() {\n var _ea$hooks$applyFilter6 = ea.hooks.applyFilters(\"advancedDataTable.getClassProps\"),\n view = _ea$hooks$applyFilter6.view,\n table = _ea$hooks$applyFilter6.table,\n activeCell = _ea$hooks$applyFilter6.activeCell;\n if (activeCell !== null) {\n var index = activeCell.cellIndex;\n\n // delete columns\n for (var i = 0; i < table.rows.length; i++) {\n table.rows[i].deleteCell(index);\n }\n\n // remove active cell\n ea.hooks.applyFilters(\"advancedDataTable.setClassProps\", {\n activeCell: null\n });\n\n // parse table html\n var origTable = ea.hooks.applyFilters(\"advancedDataTable.parseHTML\", table.cloneNode(true));\n\n // update model\n ea.hooks.doAction(\"advancedDataTable.updateFromView\", view, {\n ea_adv_data_table_static_html: origTable.innerHTML\n });\n\n // trigger text-change event\n ea.hooks.doAction(\"advancedDataTable.triggerTextChange\", table);\n }\n }\n }]\n });\n }\n return groups;\n }\n }, {\n key: \"triggerTextChange\",\n value: function triggerTextChange(table) {\n if (table.classList.contains(\"ea-advanced-data-table-static\")) {\n var cellSelector = jQuery('thead tr:first-child th:first-child .ql-editor p', table),\n cellSelector = cellSelector.length ? cellSelector : jQuery('tbody tr:first-child td:first-child .ql-editor p', table),\n cellData = cellSelector.html();\n cellSelector.html(cellData + ' ');\n setTimeout(function () {\n cellSelector.html(cellData);\n }, 1100);\n }\n }\n }]);\n}();\nea.hooks.addAction(\"editMode.init\", \"ea\", function () {\n new advancedDataTableEdit();\n});\n\n//# sourceURL=webpack:///./src/js/edit/advanced-data-table.js?"); /***/ }) diff --git a/assets/front-end/js/edit/advanced-data-table.min.js b/assets/front-end/js/edit/advanced-data-table.min.js index 07344664d..8bf4fb604 100644 --- a/assets/front-end/js/edit/advanced-data-table.min.js +++ b/assets/front-end/js/edit/advanced-data-table.min.js @@ -1 +1 @@ -!function(e){var a={};function t(n){if(a[n])return a[n].exports;var o=a[n]={i:n,l:!1,exports:{}};return e[n].call(o.exports,o,o.exports,t),o.l=!0,o.exports}t.m=e,t.c=a,t.d=function(e,a,n){t.o(e,a)||Object.defineProperty(e,a,{enumerable:!0,get:n})},t.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},t.t=function(e,a){if(1&a&&(e=t(e)),8&a)return e;if(4&a&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(t.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&a&&"string"!=typeof e)for(var o in e)t.d(n,o,function(a){return e[a]}.bind(null,o));return n},t.n=function(e){var a=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(a,"a",a),a},t.o=function(e,a){return Object.prototype.hasOwnProperty.call(e,a)},t.p="",t(t.s=37)}({37:function(e,a){function t(e){return(t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function n(e,a){for(var t=0;t2&&void 0!==arguments[2]&&arguments[2],n=e.model;if(n.remoteRender=t,elementor.config.version>"2.7.6"){var o=e.getContainer(),l=e.getContainer().settings.attributes;Object.keys(a).forEach((function(e){l[e]=a[e]})),parent.window.$e.run("document/elements/settings",{container:o,settings:l,options:{external:t}})}else Object.keys(a).forEach((function(e){n.setSetting(e,a[e])}));this.timeout=setTimeout((function(){n.remoteRender=!0}),1001)}},{key:"getClassProps",value:function(){return{view:this.view,model:this.model,table:this.table,activeCell:this.activeCell}}},{key:"setClassProps",value:function(e){var a=this;Object.keys(e).forEach((function(t){a[t]=e[t]}))}},{key:"parseHTML",value:function(e){return e.querySelectorAll("th, td").forEach((function(e){null!==e.querySelector(".inline-editor")&&(e.innerHTML=decodeURI(e.dataset.quill||""),delete e.dataset.quill)})),e}},{key:"initEditor",value:function(e){var a=this;e.dataset.quill=encodeURI(e.innerHTML),e.innerHTML='
'.concat(e.innerHTML,"
");var t=new Quill(e.querySelector(".inline-editor"),{theme:"bubble",modules:{toolbar:["bold","italic","underline","strike","link",{list:"ordered"},{list:"bullet"}]}});t.on("text-change",(function(n,o,l){clearTimeout(a.timeout),e.dataset.quill=encodeURI(t.root.innerHTML);var i=a.parseHTML(a.table.cloneNode(!0));a.tableInnerHTML=i.innerHTML,a.updateFromView(a.view,{ea_adv_data_table_static_html:i.innerHTML})}))}},{key:"initInlineEdit",value:function(){var e=this,a=setInterval((function(){e.view.el.querySelector(".ea-advanced-data-table")&&(e.table!==e.view.el.querySelector(".ea-advanced-data-table")&&(e.table=e.view.el.querySelector(".ea-advanced-data-table"),e.table.classList.contains("ea-advanced-data-table-static")&&e.table.querySelectorAll("th, td").forEach((function(a){e.initEditor(a)})),e.table.addEventListener("mousedown",(function(a){a.stopPropagation(),"th"===a.target.tagName.toLowerCase()&&(e.dragging=!0,e.dragEl=a.target,e.dragStartX=a.pageX,e.dragStartWidth=a.target.offsetWidth),"th"===a.target.tagName.toLowerCase()||"td"===a.target.tagName.toLowerCase()?e.activeCell=a.target:"th"===a.target.parentNode.tagName.toLowerCase()||"td"===a.target.parentNode.tagName.toLowerCase()?e.activeCell=a.target.parentNode:"th"===a.target.parentNode.parentNode.tagName.toLowerCase()||"td"===a.target.parentNode.parentNode.tagName.toLowerCase()?e.activeCell=a.target.parentNode.parentNode:"th"!==a.target.parentNode.parentNode.parentNode.tagName.toLowerCase()&&"td"!==a.target.parentNode.parentNode.parentNode.tagName.toLowerCase()||(e.activeCell=a.target.parentNode.parentNode.parentNode)})),e.table.addEventListener("mousemove",(function(a){e.dragging&&(e.dragEl.style.width="".concat(e.dragStartWidth+(event.pageX-e.dragStartX),"px"))})),e.table.addEventListener("mouseup",(function(a){if(e.dragging)if(e.dragging=!1,clearTimeout(e.timeout),e.table.classList.contains("ea-advanced-data-table-static")){var t=e.parseHTML(e.table.cloneNode(!0));e.updateFromView(e.view,{ea_adv_data_table_static_html:t.innerHTML})}else{var n=[];e.table.querySelectorAll("th").forEach((function(e,a){n[a]=e.style.width})),e.updateFromView(e.view,{ea_adv_data_table_dynamic_th_width:n})}})),e.table.addEventListener("dblclick",(function(a){if("th"===a.target.tagName.toLowerCase())if(a.stopPropagation(),clearTimeout(e.timeout),e.table.classList.contains("ea-advanced-data-table-static")){var t=e.parseHTML(e.table.cloneNode(!0));e.updateFromView(e.view,{ea_adv_data_table_static_html:t.innerHTML})}else{var n=[];e.table.querySelectorAll("th").forEach((function(e,a){n[a]=e.style.width})),e.updateFromView(e.view,{ea_adv_data_table_dynamic_th_width:n})}}))),clearInterval(a))}),500)}},{key:"initPanelAction",value:function(){var e=this;this.panel.content.el.onclick=function(a){if("ea:advTable:export"==a.target.dataset.event){for(var t=e.table.querySelectorAll("table tr"),n=[],o=0;o0&&(p+="",h.forEach((function(e,a){if(e.length>0){var t=e.replace(/,"""([^"]+)""",/g,',"$1",');cols=t.match(/("(?:[^"\\]|\\.)*"|[^","]+)/gm),cols.length>0&&(v&&0==a?(b+="",cols.forEach((function(e){e.match(/(^"")|(^")|("$)|(""$)/g)?b+="".concat(JSON.parse(e),""):b+="".concat(e,"")})),b+=""):(p+="",cols.forEach((function(e){e.match(/(^"")|(^")|("$)|(""$)/g)?p+="".concat(JSON.parse(e),""):p+="".concat(e,"")})),p+=""))}})),p+="",b.length>0||p.length>0)){e.tableInnerHTML=b+p,e.updateFromView(e.view,{ea_adv_data_table_static_html:b+p},!0);var f=setInterval((function(){e.view.el.querySelector(".ea-advanced-data-table").innerHTML==b+p&&(clearInterval(f),ea.hooks.doAction("advancedDataTable.initInlineEdit"))}),500)}u.value=""}ea.hooks.doAction("advancedDataTable.panelAction",e.panel,e.model,e.view,a)}}},{key:"initPanel",value:function(e,a,t){var n=this;this.panel=e,this.model=a,this.view=t;var o=".ea-advanced-data-table-".concat(this.view.container.args.id),l=this.view.el.querySelector(".ea-advanced-data-table"+o);ea.hooks.doAction("advancedDataTable.initInlineEdit"),ea.hooks.doAction("advancedDataTable.initPanelAction"),ea.hooks.doAction("advancedDataTable.afterInitPanel",e,a,t),a.once("editor:close",(function(){if(!l)return!1;var e=n.parseHTML(l.cloneNode(!0));n.tableInnerHTML=e.innerHTML}))}},{key:"initContextMenu",value:function(e,a){return"eael-advanced-data-table"==a.options.model.attributes.widgetType&&"static"==a.options.model.attributes.settings.attributes.ea_adv_data_table_source&&e.push({name:"ea_advanced_data_table",actions:[{name:"add_row_above",title:"Add Row Above",callback:function(){var e=ea.hooks.applyFilters("advancedDataTable.getClassProps"),a=e.view,t=e.table,n=e.activeCell;if(jQuery(t).find("tr:empty").each((function(){0==jQuery(this).find("td").length&&this.remove()})),null!==n&&"th"!=n.tagName.toLowerCase()&&n.parentNode.rowIndex){for(var o=n.parentNode.rowIndex,l=t.insertRow(o),i=0;i2&&void 0!==arguments[2]&&arguments[2],n=e.model;if(n.remoteRender=t,elementor.config.version>"2.7.6"){var o=e.getContainer(),l=e.getContainer().settings.attributes;Object.keys(a).forEach((function(e){l[e]=a[e]})),parent.window.$e.run("document/elements/settings",{container:o,settings:l,options:{external:t}})}else Object.keys(a).forEach((function(e){n.setSetting(e,a[e])}));this.timeout=setTimeout((function(){n.remoteRender=!0}),1001)}},{key:"getClassProps",value:function(){return{view:this.view,model:this.model,table:this.table,activeCell:this.activeCell}}},{key:"setClassProps",value:function(e){var a=this;Object.keys(e).forEach((function(t){a[t]=e[t]}))}},{key:"parseHTML",value:function(e){return e.querySelectorAll("th, td").forEach((function(e){null!==e.querySelector(".inline-editor")&&(e.innerHTML=decodeURI(e.dataset.quill||""),delete e.dataset.quill)})),e}},{key:"initEditor",value:function(e){var a=this;e.dataset.quill=encodeURI(e.innerHTML),e.innerHTML='
'.concat(e.innerHTML,"
");var t=new Quill(e.querySelector(".inline-editor"),{theme:"bubble",modules:{toolbar:["bold","italic","underline","strike","link",{list:"ordered"},{list:"bullet"}]}});t.on("text-change",(function(n,o,l){clearTimeout(a.timeout),e.dataset.quill=encodeURI(t.root.innerHTML);var i=a.parseHTML(a.table.cloneNode(!0));a.tableInnerHTML=i.innerHTML,a.updateFromView(a.view,{ea_adv_data_table_static_html:i.innerHTML})}))}},{key:"initInlineEdit",value:function(){var e=this,a=setInterval((function(){e.view.el.querySelector(".ea-advanced-data-table")&&(e.table!==e.view.el.querySelector(".ea-advanced-data-table")&&(e.table=e.view.el.querySelector(".ea-advanced-data-table"),e.table.classList.contains("ea-advanced-data-table-static")&&e.table.querySelectorAll("th, td").forEach((function(a){e.initEditor(a)})),e.table.addEventListener("mousedown",(function(a){a.stopPropagation(),"th"===a.target.tagName.toLowerCase()&&(e.dragging=!0,e.dragEl=a.target,e.dragStartX=a.pageX,e.dragStartWidth=a.target.offsetWidth),"th"===a.target.tagName.toLowerCase()||"td"===a.target.tagName.toLowerCase()?e.activeCell=a.target:"th"===a.target.parentNode.tagName.toLowerCase()||"td"===a.target.parentNode.tagName.toLowerCase()?e.activeCell=a.target.parentNode:"th"===a.target.parentNode.parentNode.tagName.toLowerCase()||"td"===a.target.parentNode.parentNode.tagName.toLowerCase()?e.activeCell=a.target.parentNode.parentNode:"th"!==a.target.parentNode.parentNode.parentNode.tagName.toLowerCase()&&"td"!==a.target.parentNode.parentNode.parentNode.tagName.toLowerCase()||(e.activeCell=a.target.parentNode.parentNode.parentNode)})),e.table.addEventListener("mousemove",(function(a){e.dragging&&(e.dragEl.style.width="".concat(e.dragStartWidth+(event.pageX-e.dragStartX),"px"))})),e.table.addEventListener("mouseup",(function(a){if(e.dragging)if(e.dragging=!1,clearTimeout(e.timeout),e.table.classList.contains("ea-advanced-data-table-static")){var t=e.parseHTML(e.table.cloneNode(!0));e.updateFromView(e.view,{ea_adv_data_table_static_html:t.innerHTML})}else{var n=[];e.table.querySelectorAll("th").forEach((function(e,a){n[a]=e.style.width})),e.updateFromView(e.view,{ea_adv_data_table_dynamic_th_width:n})}})),e.table.addEventListener("dblclick",(function(a){if("th"===a.target.tagName.toLowerCase())if(a.stopPropagation(),clearTimeout(e.timeout),e.table.classList.contains("ea-advanced-data-table-static")){var t=e.parseHTML(e.table.cloneNode(!0));e.updateFromView(e.view,{ea_adv_data_table_static_html:t.innerHTML})}else{var n=[];e.table.querySelectorAll("th").forEach((function(e,a){n[a]=e.style.width})),e.updateFromView(e.view,{ea_adv_data_table_dynamic_th_width:n})}}))),clearInterval(a))}),500)}},{key:"initPanelAction",value:function(){var e=this;this.panel.content.el.onclick=function(a){if("ea:advTable:export"==a.target.dataset.event){for(var t=e.table.querySelectorAll("table tr"),n=[],o=0;o0&&(p+="",h.forEach((function(e,a){if(e.length>0){var t=e.replace(/,"""([^"]+)""",/g,',"$1",');cols=t.match(/("(?:[^"\\]|\\.)*"|[^","]+)/gm),cols.length>0&&(v&&0==a?(b+="",cols.forEach((function(e){e.match(/(^"")|(^")|("$)|(""$)/g)?b+="".concat(JSON.parse(e),""):b+="".concat(e,"")})),b+=""):(p+="",cols.forEach((function(e){e.match(/(^"")|(^")|("$)|(""$)/g)?p+="".concat(JSON.parse(e),""):p+="".concat(e,"")})),p+=""))}})),p+="",b.length>0||p.length>0)){e.tableInnerHTML=b+p,e.updateFromView(e.view,{ea_adv_data_table_static_html:b+p},!0);var f=setInterval((function(){e.view.el.querySelector(".ea-advanced-data-table").innerHTML==b+p&&(clearInterval(f),ea.hooks.doAction("advancedDataTable.initInlineEdit"))}),500)}u.value=""}ea.hooks.doAction("advancedDataTable.panelAction",e.panel,e.model,e.view,a)}}},{key:"initPanel",value:function(e,a,t){var n=this;this.panel=e,this.model=a,this.view=t;var o=".ea-advanced-data-table-".concat(this.view.container.args.id),l=this.view.el.querySelector(".ea-advanced-data-table"+o);ea.hooks.doAction("advancedDataTable.initInlineEdit"),ea.hooks.doAction("advancedDataTable.initPanelAction"),ea.hooks.doAction("advancedDataTable.afterInitPanel",e,a,t),a.once("editor:close",(function(){if(!l)return!1;var e=n.parseHTML(l.cloneNode(!0));n.tableInnerHTML=e.innerHTML}))}},{key:"initContextMenu",value:function(e,a){return"eael-advanced-data-table"==a.options.model.attributes.widgetType&&"static"==a.options.model.attributes.settings.attributes.ea_adv_data_table_source&&e.push({name:"ea_advanced_data_table",actions:[{name:"add_row_above",title:"Add Row Above",callback:function(){var e=ea.hooks.applyFilters("advancedDataTable.getClassProps"),a=e.view,t=e.table,n=e.activeCell;if(jQuery(t).find("tr:empty").each((function(){0==jQuery(this).find("td").length&&this.remove()})),null!==n&&"th"!=n.tagName.toLowerCase()&&n.parentNode.rowIndex){for(var o=n.parentNode.rowIndex,l=t.insertRow(o),i=0;i\", \"\").replace(\"\", \"\").replace(\" 1) {\n if (input.length > 0) {\n if (hasSort) {\n table.classList.add(\"ea-advanced-data-table-unsortable\");\n }\n if (pagination && pagination.innerHTML.length > 0) {\n pagination.style.display = \"none\";\n }\n for (var i = offset; i < table.rows.length; i++) {\n var matchFound = false;\n if (table.rows[i].cells.length > 0) {\n for (var j = 0; j < table.rows[i].cells.length; j++) {\n if (table.rows[i].cells[j].textContent.toLowerCase().indexOf(input) > -1) {\n matchFound = true;\n break;\n }\n }\n }\n if (matchFound) {\n table.rows[i].style.display = \"table-row\";\n } else {\n table.rows[i].style.display = \"none\";\n }\n }\n } else {\n if (hasSort) {\n table.classList.remove(\"ea-advanced-data-table-unsortable\");\n }\n if (pagination && pagination.innerHTML.length > 0) {\n pagination.style.display = \"\";\n var paginationType = pagination.classList.contains(\"ea-advanced-data-table-pagination-button\") ? \"button\" : \"select\";\n var currentPage = paginationType == \"button\" ? pagination.querySelector(\".ea-adtp-current\").dataset.page : pagination.querySelector(\"select\").value;\n var startIndex = (currentPage - 1) * table.dataset.itemsPerPage + 1;\n var endIndex = currentPage * table.dataset.itemsPerPage;\n for (var _i = 1; _i <= table.rows.length - 1; _i++) {\n if (_i >= startIndex && _i <= endIndex) {\n table.rows[_i].style.display = \"table-row\";\n } else {\n table.rows[_i].style.display = \"none\";\n }\n }\n } else {\n for (var _i2 = 1; _i2 <= table.rows.length - 1; _i2++) {\n table.rows[_i2].style.display = \"table-row\";\n }\n }\n }\n }\n });\n }\n }\n\n // frontend - sort\n }, {\n key: \"initTableSort\",\n value: function initTableSort(table, pagination, classCollection) {\n if (table.classList.contains(\"ea-advanced-data-table-sortable\")) {\n table.addEventListener(\"click\", function (e) {\n var target = null;\n if (e.target.tagName.toLowerCase() === \"th\") {\n target = e.target;\n }\n if (e.target.parentNode.tagName.toLowerCase() === \"th\") {\n target = e.target.parentNode;\n }\n if (e.target.parentNode.parentNode.tagName.toLowerCase() === \"th\") {\n target = e.target.parentNode.parentNode;\n }\n if (target === null) {\n return;\n }\n var index = target.cellIndex;\n var currentPage = 1;\n var startIndex = 1;\n var endIndex = table.rows.length - 1;\n var sort = \"\";\n var classList = target.classList;\n var collection = [];\n var origTable = table.cloneNode(true);\n if (classList.contains(\"asc\")) {\n target.classList.remove(\"asc\");\n target.classList.add(\"desc\");\n sort = \"desc\";\n } else if (classList.contains(\"desc\")) {\n target.classList.remove(\"desc\");\n target.classList.add(\"asc\");\n sort = \"asc\";\n } else {\n target.classList.add(\"asc\");\n sort = \"asc\";\n }\n if (pagination && pagination.innerHTML.length > 0) {\n var paginationType = pagination.classList.contains(\"ea-advanced-data-table-pagination-button\") ? \"button\" : \"select\";\n currentPage = paginationType == \"button\" ? pagination.querySelector(\".ea-adtp-current\").dataset.page : pagination.querySelector(\"select\").value;\n startIndex = (currentPage - 1) * table.dataset.itemsPerPage + 1;\n endIndex = endIndex - (currentPage - 1) * table.dataset.itemsPerPage >= table.dataset.itemsPerPage ? currentPage * table.dataset.itemsPerPage : endIndex;\n }\n\n // collect header class\n classCollection[currentPage] = [];\n table.querySelectorAll(\"th\").forEach(function (el) {\n if (el.cellIndex != index) {\n el.classList.remove(\"asc\", \"desc\");\n }\n classCollection[currentPage].push(el.classList.contains(\"asc\") ? \"asc\" : el.classList.contains(\"desc\") ? \"desc\" : \"\");\n });\n\n // collect table cells value\n for (var i = 1; i <= table.rows.length - 1; i++) {\n var value = void 0;\n var cell = table.rows[i].cells[index];\n var data = cell.innerText;\n var regex = new RegExp(\"([0-9]{4}[-./*](0[1-9]|1[0-2])[-./*]([0-2]{1}[0-9]{1}|3[0-1]{1})|([0-2]{1}[0-9]{1}|3[0-1]{1})[-./*](0[1-9]|1[0-2])[-./*][0-9]{4})\");\n if (data.match(regex)) {\n var dataString = data.split(/[\\.\\-\\/\\*]/),\n date = '';\n if (dataString[0].length == 4) {\n date = dataString[0] + \"-\" + dataString[1] + \"-\" + dataString[2];\n } else {\n date = dataString[2] + \"-\" + dataString[1] + \"-\" + dataString[0];\n }\n value = Date.parse(date);\n } else if (isNaN(parseInt(data))) {\n value = data.toLowerCase();\n } else {\n value = parseFloat(data);\n }\n collection.push({\n index: i,\n value: value\n });\n }\n\n // sort collection array\n if (sort == \"asc\") {\n collection.sort(function (x, y) {\n return x.value > y.value ? 1 : -1;\n });\n } else if (sort == \"desc\") {\n collection.sort(function (x, y) {\n return x.value < y.value ? 1 : -1;\n });\n }\n\n // sort table\n collection.forEach(function (row, index) {\n table.rows[1 + index].innerHTML = origTable.rows[row.index].innerHTML;\n });\n });\n }\n }\n\n // frontend - pagination\n }, {\n key: \"initTablePagination\",\n value: function initTablePagination(table, pagination, classCollection) {\n if (table.classList.contains(\"ea-advanced-data-table-paginated\")) {\n var paginationHTML = \"\";\n var paginationType = pagination.classList.contains(\"ea-advanced-data-table-pagination-button\") ? \"button\" : \"select\";\n var currentPage = 1;\n var startIndex = table.rows[0].parentNode.tagName.toLowerCase() === \"thead\" ? 1 : 0;\n var endIndex = currentPage * table.dataset.itemsPerPage;\n var maxPages = Math.ceil((table.rows.length - 1) / table.dataset.itemsPerPage);\n if (!startIndex) {\n endIndex -= 1;\n }\n pagination.insertAdjacentHTML(\"beforeend\", ''); // insert pagination\n if (maxPages > 1) {\n if (paginationType === \"button\") {\n paginationHTML += \"1...\";\n for (var i = 2; i < maxPages; i++) {\n var _cssClass = i <= 6 || i === maxPages ? 'ea-adtp-show' : 'ea-adtp-hide';\n paginationHTML += \"\").concat(i, \"\");\n }\n var dots2 = '',\n cssClass = 'ea-adtp-show';\n if (maxPages > 7) {\n dots2 = \"...\";\n cssClass = 'ea-adtp-hide';\n }\n paginationHTML += dots2 + \"\").concat(maxPages, \"\");\n pagination.insertAdjacentHTML(\"beforeend\", \"«\".concat(paginationHTML, \"»\"));\n } else {\n for (var _i3 = 1; _i3 <= maxPages; _i3++) {\n paginationHTML += \"\");\n }\n pagination.insertAdjacentHTML(\"beforeend\", \"\"));\n }\n }\n\n // make initial item visible\n for (var _i4 = 0; _i4 <= endIndex; _i4++) {\n if (_i4 >= table.rows.length) {\n break;\n }\n table.rows[_i4].style.display = \"table-row\";\n }\n\n // paginate on click\n if (paginationType === \"button\") {\n var _$ = jQuery;\n _$('a:not(.dots-1st, .dots-last)', pagination).on(\"click\", function (e) {\n e.preventDefault();\n if (e.target.tagName.toLowerCase() === \"a\") {\n currentPage = e.target.dataset.page;\n var _offset = table.rows[0].parentNode.tagName.toLowerCase() === \"thead\" ? 1 : 0;\n startIndex = (currentPage - 1) * table.dataset.itemsPerPage + _offset;\n endIndex = currentPage * table.dataset.itemsPerPage;\n if (!_offset) {\n endIndex -= 1;\n }\n if (maxPages > 7) {\n var countFrom = 1,\n countTo = 6;\n _$('a.ea-adtp-current', pagination).removeClass('ea-adtp-current');\n if (currentPage > maxPages - 5) {\n countFrom = maxPages - 5;\n countTo = maxPages;\n } else if (currentPage > 5) {\n countFrom = currentPage - 2;\n countTo = parseInt(currentPage) + 2;\n }\n _$('a.ea-adtp-show', pagination).removeClass('ea-adtp-show').addClass('ea-adtp-hide');\n for (var page = countFrom; page <= countTo; page++) {\n _$(\"a[data-page=\\\"\".concat(page, \"\\\"]:not(.ea-adtp-1st,.ea-adtp-last)\"), pagination).removeClass('ea-adtp-hide').addClass('ea-adtp-show');\n }\n _$(\"a[data-page=\\\"\".concat(currentPage, \"\\\"]\"), pagination).addClass('ea-adtp-current');\n if (_$(\"a[data-page=\\\"2\\\"]\", pagination).hasClass('ea-adtp-hide')) {\n _$(\"a.dots-1st\", pagination).removeClass('ea-adtp-hide').addClass('ea-adtp-show');\n } else {\n _$(\"a.dots-1st\", pagination).removeClass('ea-adtp-show').addClass('ea-adtp-hide');\n }\n if (_$(\"a[data-page=\\\"\".concat(maxPages - 1, \"\\\"]\"), pagination).hasClass('ea-adtp-hide')) {\n _$(\"a.dots-last\", pagination).removeClass('ea-adtp-hide').addClass('ea-adtp-show');\n } else {\n _$(\"a.dots-last\", pagination).removeClass('ea-adtp-show').addClass('ea-adtp-hide');\n }\n } else {\n _$('a.ea-adtp-current', pagination).removeClass('ea-adtp-current');\n _$(\"a[data-page=\\\"\".concat(currentPage, \"\\\"]\"), pagination).addClass('ea-adtp-current');\n }\n for (var _i5 = _offset; _i5 <= table.rows.length - 1; _i5++) {\n if (_i5 >= startIndex && _i5 <= endIndex) {\n table.rows[_i5].style.display = \"table-row\";\n } else {\n table.rows[_i5].style.display = \"none\";\n }\n }\n table.querySelectorAll(\"th\").forEach(function (el, index) {\n el.classList.remove(\"asc\", \"desc\");\n if (typeof classCollection[currentPage] != \"undefined\") {\n if (classCollection[currentPage][index]) {\n el.classList.add(classCollection[currentPage][index]);\n }\n }\n });\n }\n });\n } else {\n if (pagination.hasChildNodes()) {\n pagination.querySelector(\"select\").addEventListener(\"input\", function (e) {\n e.preventDefault();\n currentPage = e.target.value;\n offset = table.rows[0].parentNode.tagName.toLowerCase() == \"thead\" ? 1 : 0;\n startIndex = (currentPage - 1) * table.dataset.itemsPerPage + offset;\n endIndex = currentPage * table.dataset.itemsPerPage;\n for (var _i6 = offset; _i6 <= table.rows.length - 1; _i6++) {\n if (_i6 >= startIndex && _i6 <= endIndex) {\n table.rows[_i6].style.display = \"table-row\";\n } else {\n table.rows[_i6].style.display = \"none\";\n }\n }\n table.querySelectorAll(\"th\").forEach(function (el, index) {\n el.classList.remove(\"asc\", \"desc\");\n if (typeof classCollection[currentPage] != \"undefined\") {\n if (classCollection[currentPage][index]) {\n el.classList.add(classCollection[currentPage][index]);\n }\n }\n });\n });\n }\n }\n }\n }\n\n // woocommerce features\n }, {\n key: \"initWooFeatures\",\n value: function initWooFeatures(table) {\n table.querySelectorAll(\".nt_button_woo\").forEach(function (el) {\n el.classList.add(\"add_to_cart_button\", \"ajax_add_to_cart\");\n });\n table.querySelectorAll(\".nt_woo_quantity\").forEach(function (el) {\n el.addEventListener(\"input\", function (e) {\n var product_id = e.target.dataset.product_id;\n var quantity = e.target.value;\n $(\".nt_add_to_cart_\".concat(product_id), $(table)).data(\"quantity\", quantity);\n });\n });\n }\n }]);\n return advancedDataTable;\n}();\nea.hooks.addAction(\"init\", \"ea\", function () {\n if (ea.elementStatusCheck('eaelAdvancedDataTable')) {\n return false;\n }\n new advancedDataTable();\n});\n\n//# sourceURL=webpack:///./src/js/view/advanced-data-table.js?"); +eval("function _typeof(o) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && \"function\" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? \"symbol\" : typeof o; }, _typeof(o); }\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, \"prototype\", { writable: false }); return Constructor; }\nfunction _toPropertyKey(t) { var i = _toPrimitive(t, \"string\"); return \"symbol\" == _typeof(i) ? i : i + \"\"; }\nfunction _toPrimitive(t, r) { if (\"object\" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || \"default\"); if (\"object\" != _typeof(i)) return i; throw new TypeError(\"@@toPrimitive must return a primitive value.\"); } return (\"string\" === r ? String : Number)(t); }\nvar advancedDataTable = /*#__PURE__*/function () {\n function advancedDataTable() {\n _classCallCheck(this, advancedDataTable);\n // register hooks\n elementorFrontend.hooks.addAction(\"frontend/element_ready/eael-advanced-data-table.default\", this.initFrontend.bind(this));\n }\n\n // init frontend features\n return _createClass(advancedDataTable, [{\n key: \"initFrontend\",\n value: function initFrontend($scope, $) {\n var table = $scope[0].querySelector(\".ea-advanced-data-table\");\n var search = $scope[0].querySelector(\".ea-advanced-data-table-search\");\n var pagination = $scope[0].querySelector(\".ea-advanced-data-table-pagination\");\n var classCollection = {};\n if (!ea.isEditMode && table !== null) {\n // search\n this.initTableSearch(table, search, pagination);\n\n // sort\n this.initTableSort(table, pagination, classCollection);\n\n // paginated table\n this.initTablePagination(table, pagination, classCollection);\n\n // woocommerce\n this.initWooFeatures(table);\n var isEscapedHtmlString = function isEscapedHtmlString(str) {\n return /&[a-zA-Z]+;/.test(str);\n },\n decodeEscapedHtmlString = function decodeEscapedHtmlString(str) {\n var textarea = document.createElement('textarea');\n textarea.innerHTML = str;\n return textarea.value;\n };\n if ($(table).hasClass('ea-advanced-data-table-static')) {\n $(table).find('th, td').each(function () {\n var text = $(this)[0].innerHTML;\n if (isEscapedHtmlString(text)) {\n text = decodeEscapedHtmlString(text);\n $(this).html(text.replace(\"\", \"\").replace(\" 1) {\n if (input.length > 0) {\n if (hasSort) {\n table.classList.add(\"ea-advanced-data-table-unsortable\");\n }\n if (pagination && pagination.innerHTML.length > 0) {\n pagination.style.display = \"none\";\n }\n for (var i = offset; i < table.rows.length; i++) {\n var matchFound = false;\n if (table.rows[i].cells.length > 0) {\n for (var j = 0; j < table.rows[i].cells.length; j++) {\n if (table.rows[i].cells[j].textContent.toLowerCase().indexOf(input) > -1) {\n matchFound = true;\n break;\n }\n }\n }\n if (matchFound) {\n table.rows[i].style.display = \"table-row\";\n } else {\n table.rows[i].style.display = \"none\";\n }\n }\n } else {\n if (hasSort) {\n table.classList.remove(\"ea-advanced-data-table-unsortable\");\n }\n if (pagination && pagination.innerHTML.length > 0) {\n pagination.style.display = \"\";\n var paginationType = pagination.classList.contains(\"ea-advanced-data-table-pagination-button\") ? \"button\" : \"select\";\n var currentPage = paginationType == \"button\" ? pagination.querySelector(\".ea-adtp-current\").dataset.page : pagination.querySelector(\"select\").value;\n var startIndex = (currentPage - 1) * table.dataset.itemsPerPage + 1;\n var endIndex = currentPage * table.dataset.itemsPerPage;\n for (var _i = 1; _i <= table.rows.length - 1; _i++) {\n if (_i >= startIndex && _i <= endIndex) {\n table.rows[_i].style.display = \"table-row\";\n } else {\n table.rows[_i].style.display = \"none\";\n }\n }\n } else {\n for (var _i2 = 1; _i2 <= table.rows.length - 1; _i2++) {\n table.rows[_i2].style.display = \"table-row\";\n }\n }\n }\n }\n });\n }\n }\n\n // frontend - sort\n }, {\n key: \"initTableSort\",\n value: function initTableSort(table, pagination, classCollection) {\n if (table.classList.contains(\"ea-advanced-data-table-sortable\")) {\n table.addEventListener(\"click\", function (e) {\n var target = null;\n if (e.target.tagName.toLowerCase() === \"th\") {\n target = e.target;\n }\n if (e.target.parentNode.tagName.toLowerCase() === \"th\") {\n target = e.target.parentNode;\n }\n if (e.target.parentNode.parentNode.tagName.toLowerCase() === \"th\") {\n target = e.target.parentNode.parentNode;\n }\n if (target === null) {\n return;\n }\n var index = target.cellIndex;\n var currentPage = 1;\n var startIndex = 1;\n var endIndex = table.rows.length - 1;\n var sort = \"\";\n var classList = target.classList;\n var collection = [];\n var origTable = table.cloneNode(true);\n if (classList.contains(\"asc\")) {\n target.classList.remove(\"asc\");\n target.classList.add(\"desc\");\n sort = \"desc\";\n } else if (classList.contains(\"desc\")) {\n target.classList.remove(\"desc\");\n target.classList.add(\"asc\");\n sort = \"asc\";\n } else {\n target.classList.add(\"asc\");\n sort = \"asc\";\n }\n if (pagination && pagination.innerHTML.length > 0) {\n var paginationType = pagination.classList.contains(\"ea-advanced-data-table-pagination-button\") ? \"button\" : \"select\";\n currentPage = paginationType == \"button\" ? pagination.querySelector(\".ea-adtp-current\").dataset.page : pagination.querySelector(\"select\").value;\n startIndex = (currentPage - 1) * table.dataset.itemsPerPage + 1;\n endIndex = endIndex - (currentPage - 1) * table.dataset.itemsPerPage >= table.dataset.itemsPerPage ? currentPage * table.dataset.itemsPerPage : endIndex;\n }\n\n // collect header class\n classCollection[currentPage] = [];\n table.querySelectorAll(\"th\").forEach(function (el) {\n if (el.cellIndex != index) {\n el.classList.remove(\"asc\", \"desc\");\n }\n classCollection[currentPage].push(el.classList.contains(\"asc\") ? \"asc\" : el.classList.contains(\"desc\") ? \"desc\" : \"\");\n });\n\n // collect table cells value\n for (var i = 1; i <= table.rows.length - 1; i++) {\n var value = void 0;\n var cell = table.rows[i].cells[index];\n var data = cell.innerText;\n var regex = new RegExp(\"([0-9]{4}[-./*](0[1-9]|1[0-2])[-./*]([0-2]{1}[0-9]{1}|3[0-1]{1})|([0-2]{1}[0-9]{1}|3[0-1]{1})[-./*](0[1-9]|1[0-2])[-./*][0-9]{4})\");\n if (data.match(regex)) {\n var dataString = data.split(/[\\.\\-\\/\\*]/),\n date = '';\n if (dataString[0].length == 4) {\n date = dataString[0] + \"-\" + dataString[1] + \"-\" + dataString[2];\n } else {\n date = dataString[2] + \"-\" + dataString[1] + \"-\" + dataString[0];\n }\n value = Date.parse(date);\n } else if (isNaN(parseInt(data))) {\n value = data.toLowerCase();\n } else {\n value = parseFloat(data);\n }\n collection.push({\n index: i,\n value: value\n });\n }\n\n // sort collection array\n if (sort == \"asc\") {\n collection.sort(function (x, y) {\n return x.value > y.value ? 1 : -1;\n });\n } else if (sort == \"desc\") {\n collection.sort(function (x, y) {\n return x.value < y.value ? 1 : -1;\n });\n }\n\n // sort table\n collection.forEach(function (row, index) {\n table.rows[1 + index].innerHTML = origTable.rows[row.index].innerHTML;\n });\n });\n }\n }\n\n // frontend - pagination\n }, {\n key: \"initTablePagination\",\n value: function initTablePagination(table, pagination, classCollection) {\n if (table.classList.contains(\"ea-advanced-data-table-paginated\")) {\n var paginationHTML = \"\";\n var paginationType = pagination.classList.contains(\"ea-advanced-data-table-pagination-button\") ? \"button\" : \"select\";\n var currentPage = 1;\n var startIndex = table.rows[0].parentNode.tagName.toLowerCase() === \"thead\" ? 1 : 0;\n var endIndex = currentPage * table.dataset.itemsPerPage;\n var maxPages = Math.ceil((table.rows.length - 1) / table.dataset.itemsPerPage);\n if (!startIndex) {\n endIndex -= 1;\n }\n pagination.insertAdjacentHTML(\"beforeend\", ''); // insert pagination\n if (maxPages > 1) {\n if (paginationType === \"button\") {\n paginationHTML += \"1...\";\n for (var i = 2; i < maxPages; i++) {\n var _cssClass = i <= 6 || i === maxPages ? 'ea-adtp-show' : 'ea-adtp-hide';\n paginationHTML += \"\").concat(i, \"\");\n }\n var dots2 = '',\n cssClass = 'ea-adtp-show';\n if (maxPages > 7) {\n dots2 = \"...\";\n cssClass = 'ea-adtp-hide';\n }\n paginationHTML += dots2 + \"\").concat(maxPages, \"\");\n pagination.insertAdjacentHTML(\"beforeend\", \"«\".concat(paginationHTML, \"»\"));\n } else {\n for (var _i3 = 1; _i3 <= maxPages; _i3++) {\n paginationHTML += \"\");\n }\n pagination.insertAdjacentHTML(\"beforeend\", \"\"));\n }\n }\n\n // make initial item visible\n for (var _i4 = 0; _i4 <= endIndex; _i4++) {\n if (_i4 >= table.rows.length) {\n break;\n }\n table.rows[_i4].style.display = \"table-row\";\n }\n\n // paginate on click\n if (paginationType === \"button\") {\n var _$ = jQuery;\n _$('a:not(.dots-1st, .dots-last)', pagination).on(\"click\", function (e) {\n e.preventDefault();\n if (e.target.tagName.toLowerCase() === \"a\") {\n currentPage = e.target.dataset.page;\n var _offset = table.rows[0].parentNode.tagName.toLowerCase() === \"thead\" ? 1 : 0;\n startIndex = (currentPage - 1) * table.dataset.itemsPerPage + _offset;\n endIndex = currentPage * table.dataset.itemsPerPage;\n if (!_offset) {\n endIndex -= 1;\n }\n if (maxPages > 7) {\n var countFrom = 1,\n countTo = 6;\n _$('a.ea-adtp-current', pagination).removeClass('ea-adtp-current');\n if (currentPage > maxPages - 5) {\n countFrom = maxPages - 5;\n countTo = maxPages;\n } else if (currentPage > 5) {\n countFrom = currentPage - 2;\n countTo = parseInt(currentPage) + 2;\n }\n _$('a.ea-adtp-show', pagination).removeClass('ea-adtp-show').addClass('ea-adtp-hide');\n for (var page = countFrom; page <= countTo; page++) {\n _$(\"a[data-page=\\\"\".concat(page, \"\\\"]:not(.ea-adtp-1st,.ea-adtp-last)\"), pagination).removeClass('ea-adtp-hide').addClass('ea-adtp-show');\n }\n _$(\"a[data-page=\\\"\".concat(currentPage, \"\\\"]\"), pagination).addClass('ea-adtp-current');\n if (_$(\"a[data-page=\\\"2\\\"]\", pagination).hasClass('ea-adtp-hide')) {\n _$(\"a.dots-1st\", pagination).removeClass('ea-adtp-hide').addClass('ea-adtp-show');\n } else {\n _$(\"a.dots-1st\", pagination).removeClass('ea-adtp-show').addClass('ea-adtp-hide');\n }\n if (_$(\"a[data-page=\\\"\".concat(maxPages - 1, \"\\\"]\"), pagination).hasClass('ea-adtp-hide')) {\n _$(\"a.dots-last\", pagination).removeClass('ea-adtp-hide').addClass('ea-adtp-show');\n } else {\n _$(\"a.dots-last\", pagination).removeClass('ea-adtp-show').addClass('ea-adtp-hide');\n }\n } else {\n _$('a.ea-adtp-current', pagination).removeClass('ea-adtp-current');\n _$(\"a[data-page=\\\"\".concat(currentPage, \"\\\"]\"), pagination).addClass('ea-adtp-current');\n }\n for (var _i5 = _offset; _i5 <= table.rows.length - 1; _i5++) {\n if (_i5 >= startIndex && _i5 <= endIndex) {\n table.rows[_i5].style.display = \"table-row\";\n } else {\n table.rows[_i5].style.display = \"none\";\n }\n }\n table.querySelectorAll(\"th\").forEach(function (el, index) {\n el.classList.remove(\"asc\", \"desc\");\n if (typeof classCollection[currentPage] != \"undefined\") {\n if (classCollection[currentPage][index]) {\n el.classList.add(classCollection[currentPage][index]);\n }\n }\n });\n }\n });\n } else {\n if (pagination.hasChildNodes()) {\n pagination.querySelector(\"select\").addEventListener(\"input\", function (e) {\n e.preventDefault();\n currentPage = e.target.value;\n offset = table.rows[0].parentNode.tagName.toLowerCase() == \"thead\" ? 1 : 0;\n startIndex = (currentPage - 1) * table.dataset.itemsPerPage + offset;\n endIndex = currentPage * table.dataset.itemsPerPage;\n for (var _i6 = offset; _i6 <= table.rows.length - 1; _i6++) {\n if (_i6 >= startIndex && _i6 <= endIndex) {\n table.rows[_i6].style.display = \"table-row\";\n } else {\n table.rows[_i6].style.display = \"none\";\n }\n }\n table.querySelectorAll(\"th\").forEach(function (el, index) {\n el.classList.remove(\"asc\", \"desc\");\n if (typeof classCollection[currentPage] != \"undefined\") {\n if (classCollection[currentPage][index]) {\n el.classList.add(classCollection[currentPage][index]);\n }\n }\n });\n });\n }\n }\n }\n }\n\n // woocommerce features\n }, {\n key: \"initWooFeatures\",\n value: function initWooFeatures(table) {\n table.querySelectorAll(\".nt_button_woo\").forEach(function (el) {\n el.classList.add(\"add_to_cart_button\", \"ajax_add_to_cart\");\n });\n table.querySelectorAll(\".nt_woo_quantity\").forEach(function (el) {\n el.addEventListener(\"input\", function (e) {\n var product_id = e.target.dataset.product_id;\n var quantity = e.target.value;\n $(\".nt_add_to_cart_\".concat(product_id), $(table)).data(\"quantity\", quantity);\n });\n });\n }\n }]);\n}();\nea.hooks.addAction(\"init\", \"ea\", function () {\n if (ea.elementStatusCheck('eaelAdvancedDataTable')) {\n return false;\n }\n new advancedDataTable();\n});\n\n//# sourceURL=webpack:///./src/js/view/advanced-data-table.js?"); /***/ }) diff --git a/assets/front-end/js/view/advanced-data-table.min.js b/assets/front-end/js/view/advanced-data-table.min.js index 9eedb5b4c..d35b3c92b 100644 --- a/assets/front-end/js/view/advanced-data-table.min.js +++ b/assets/front-end/js/view/advanced-data-table.min.js @@ -1 +1 @@ -!function(e){var a={};function t(n){if(a[n])return a[n].exports;var r=a[n]={i:n,l:!1,exports:{}};return e[n].call(r.exports,r,r.exports,t),r.l=!0,r.exports}t.m=e,t.c=a,t.d=function(e,a,n){t.o(e,a)||Object.defineProperty(e,a,{enumerable:!0,get:n})},t.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},t.t=function(e,a){if(1&a&&(e=t(e)),8&a)return e;if(4&a&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(t.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&a&&"string"!=typeof e)for(var r in e)t.d(n,r,function(a){return e[a]}.bind(null,r));return n},t.n=function(e){var a=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(a,"a",a),a},t.o=function(e,a){return Object.prototype.hasOwnProperty.call(e,a)},t.p="",t(t.s=1)}([,function(e,a){function t(e){return(t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function n(e,a){for(var t=0;t","").replace("<\/script>","").replace("1)if(n.length>0){r&&e.classList.add("ea-advanced-data-table-unsortable"),t&&t.innerHTML.length>0&&(t.style.display="none");for(var o=s;o0)for(var d=0;d-1){l=!0;break}e.rows[o].style.display=l?"table-row":"none"}}else if(r&&e.classList.remove("ea-advanced-data-table-unsortable"),t&&t.innerHTML.length>0){t.style.display="";for(var i="button"==(t.classList.contains("ea-advanced-data-table-pagination-button")?"button":"select")?t.querySelector(".ea-adtp-current").dataset.page:t.querySelector("select").value,c=(i-1)*e.dataset.itemsPerPage+1,u=i*e.dataset.itemsPerPage,f=1;f<=e.rows.length-1;f++)e.rows[f].style.display=f>=c&&f<=u?"table-row":"none"}else for(var p=1;p<=e.rows.length-1;p++)e.rows[p].style.display="table-row"}))}},{key:"initTableSort",value:function(e,a,t){e.classList.contains("ea-advanced-data-table-sortable")&&e.addEventListener("click",(function(n){var r=null;if("th"===n.target.tagName.toLowerCase()&&(r=n.target),"th"===n.target.parentNode.tagName.toLowerCase()&&(r=n.target.parentNode),"th"===n.target.parentNode.parentNode.tagName.toLowerCase()&&(r=n.target.parentNode.parentNode),null!==r){var s=r.cellIndex,o=1,l=e.rows.length-1,d="",i=r.classList,c=[],u=e.cloneNode(!0);if(i.contains("asc")?(r.classList.remove("asc"),r.classList.add("desc"),d="desc"):i.contains("desc")?(r.classList.remove("desc"),r.classList.add("asc"),d="asc"):(r.classList.add("asc"),d="asc"),a&&a.innerHTML.length>0){var f=a.classList.contains("ea-advanced-data-table-pagination-button")?"button":"select";o="button"==f?a.querySelector(".ea-adtp-current").dataset.page:a.querySelector("select").value,e.dataset.itemsPerPage,l=l-(o-1)*e.dataset.itemsPerPage>=e.dataset.itemsPerPage?o*e.dataset.itemsPerPage:l}t[o]=[],e.querySelectorAll("th").forEach((function(e){e.cellIndex!=s&&e.classList.remove("asc","desc"),t[o].push(e.classList.contains("asc")?"asc":e.classList.contains("desc")?"desc":"")}));for(var p=1;p<=e.rows.length-1;p++){var v=void 0,h=e.rows[p].cells[s].innerText,g=new RegExp("([0-9]{4}[-./*](0[1-9]|1[0-2])[-./*]([0-2]{1}[0-9]{1}|3[0-1]{1})|([0-2]{1}[0-9]{1}|3[0-1]{1})[-./*](0[1-9]|1[0-2])[-./*][0-9]{4})");if(h.match(g)){var b=h.split(/[\.\-\/\*]/),y="";y=4==b[0].length?b[0]+"-"+b[1]+"-"+b[2]:b[2]+"-"+b[1]+"-"+b[0],v=Date.parse(y)}else v=isNaN(parseInt(h))?h.toLowerCase():parseFloat(h);c.push({index:p,value:v})}"asc"==d?c.sort((function(e,a){return e.value>a.value?1:-1})):"desc"==d&&c.sort((function(e,a){return e.value1)if("button"===r){n+='1...';for(var i=2;i').concat(i,"")}var u="",f="ea-adtp-show";d>7&&(u='...',f="ea-adtp-hide"),n+=u+'').concat(d,""),a.insertAdjacentHTML("beforeend",'«'.concat(n,'»'))}else{for(var p=1;p<=d;p++)n+='");a.insertAdjacentHTML("beforeend",""))}for(var v=0;v<=l&&!(v>=e.rows.length);v++)e.rows[v].style.display="table-row";if("button"===r){var h=jQuery;h("a:not(.dots-1st, .dots-last)",a).on("click",(function(n){if(n.preventDefault(),"a"===n.target.tagName.toLowerCase()){s=n.target.dataset.page;var r="thead"===e.rows[0].parentNode.tagName.toLowerCase()?1:0;if(o=(s-1)*e.dataset.itemsPerPage+r,l=s*e.dataset.itemsPerPage,r||(l-=1),d>7){var i=1,c=6;h("a.ea-adtp-current",a).removeClass("ea-adtp-current"),s>d-5?(i=d-5,c=d):s>5&&(i=s-2,c=parseInt(s)+2),h("a.ea-adtp-show",a).removeClass("ea-adtp-show").addClass("ea-adtp-hide");for(var u=i;u<=c;u++)h('a[data-page="'.concat(u,'"]:not(.ea-adtp-1st,.ea-adtp-last)'),a).removeClass("ea-adtp-hide").addClass("ea-adtp-show");h('a[data-page="'.concat(s,'"]'),a).addClass("ea-adtp-current"),h('a[data-page="2"]',a).hasClass("ea-adtp-hide")?h("a.dots-1st",a).removeClass("ea-adtp-hide").addClass("ea-adtp-show"):h("a.dots-1st",a).removeClass("ea-adtp-show").addClass("ea-adtp-hide"),h('a[data-page="'.concat(d-1,'"]'),a).hasClass("ea-adtp-hide")?h("a.dots-last",a).removeClass("ea-adtp-hide").addClass("ea-adtp-show"):h("a.dots-last",a).removeClass("ea-adtp-show").addClass("ea-adtp-hide")}else h("a.ea-adtp-current",a).removeClass("ea-adtp-current"),h('a[data-page="'.concat(s,'"]'),a).addClass("ea-adtp-current");for(var f=r;f<=e.rows.length-1;f++)e.rows[f].style.display=f>=o&&f<=l?"table-row":"none";e.querySelectorAll("th").forEach((function(e,a){e.classList.remove("asc","desc"),void 0!==t[s]&&t[s][a]&&e.classList.add(t[s][a])}))}}))}else a.hasChildNodes()&&a.querySelector("select").addEventListener("input",(function(a){a.preventDefault(),s=a.target.value,offset="thead"==e.rows[0].parentNode.tagName.toLowerCase()?1:0,o=(s-1)*e.dataset.itemsPerPage+offset,l=s*e.dataset.itemsPerPage;for(var n=offset;n<=e.rows.length-1;n++)e.rows[n].style.display=n>=o&&n<=l?"table-row":"none";e.querySelectorAll("th").forEach((function(e,a){e.classList.remove("asc","desc"),void 0!==t[s]&&t[s][a]&&e.classList.add(t[s][a])}))}))}}},{key:"initWooFeatures",value:function(e){e.querySelectorAll(".nt_button_woo").forEach((function(e){e.classList.add("add_to_cart_button","ajax_add_to_cart")})),e.querySelectorAll(".nt_woo_quantity").forEach((function(a){a.addEventListener("input",(function(a){var t=a.target.dataset.product_id,n=a.target.value;$(".nt_add_to_cart_".concat(t),$(e)).data("quantity",n)}))}))}}])&&n(a.prototype,t),r&&n(a,r),Object.defineProperty(a,"prototype",{writable:!1}),e}();ea.hooks.addAction("init","ea",(function(){if(ea.elementStatusCheck("eaelAdvancedDataTable"))return!1;new s}))}]); \ No newline at end of file +!function(e){var a={};function t(n){if(a[n])return a[n].exports;var r=a[n]={i:n,l:!1,exports:{}};return e[n].call(r.exports,r,r.exports,t),r.l=!0,r.exports}t.m=e,t.c=a,t.d=function(e,a,n){t.o(e,a)||Object.defineProperty(e,a,{enumerable:!0,get:n})},t.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},t.t=function(e,a){if(1&a&&(e=t(e)),8&a)return e;if(4&a&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(t.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&a&&"string"!=typeof e)for(var r in e)t.d(n,r,function(a){return e[a]}.bind(null,r));return n},t.n=function(e){var a=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(a,"a",a),a},t.o=function(e,a){return Object.prototype.hasOwnProperty.call(e,a)},t.p="",t(t.s=1)}([,function(e,a){function t(e){return(t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function n(e,a){for(var t=0;t","").replace("<\/script>","").replace("1)if(n.length>0){r&&e.classList.add("ea-advanced-data-table-unsortable"),t&&t.innerHTML.length>0&&(t.style.display="none");for(var o=s;o0)for(var d=0;d-1){l=!0;break}e.rows[o].style.display=l?"table-row":"none"}}else if(r&&e.classList.remove("ea-advanced-data-table-unsortable"),t&&t.innerHTML.length>0){t.style.display="";for(var i="button"==(t.classList.contains("ea-advanced-data-table-pagination-button")?"button":"select")?t.querySelector(".ea-adtp-current").dataset.page:t.querySelector("select").value,c=(i-1)*e.dataset.itemsPerPage+1,u=i*e.dataset.itemsPerPage,f=1;f<=e.rows.length-1;f++)e.rows[f].style.display=f>=c&&f<=u?"table-row":"none"}else for(var p=1;p<=e.rows.length-1;p++)e.rows[p].style.display="table-row"}))}},{key:"initTableSort",value:function(e,a,t){e.classList.contains("ea-advanced-data-table-sortable")&&e.addEventListener("click",(function(n){var r=null;if("th"===n.target.tagName.toLowerCase()&&(r=n.target),"th"===n.target.parentNode.tagName.toLowerCase()&&(r=n.target.parentNode),"th"===n.target.parentNode.parentNode.tagName.toLowerCase()&&(r=n.target.parentNode.parentNode),null!==r){var s=r.cellIndex,o=1,l=e.rows.length-1,d="",i=r.classList,c=[],u=e.cloneNode(!0);if(i.contains("asc")?(r.classList.remove("asc"),r.classList.add("desc"),d="desc"):i.contains("desc")?(r.classList.remove("desc"),r.classList.add("asc"),d="asc"):(r.classList.add("asc"),d="asc"),a&&a.innerHTML.length>0){var f=a.classList.contains("ea-advanced-data-table-pagination-button")?"button":"select";o="button"==f?a.querySelector(".ea-adtp-current").dataset.page:a.querySelector("select").value,e.dataset.itemsPerPage,l=l-(o-1)*e.dataset.itemsPerPage>=e.dataset.itemsPerPage?o*e.dataset.itemsPerPage:l}t[o]=[],e.querySelectorAll("th").forEach((function(e){e.cellIndex!=s&&e.classList.remove("asc","desc"),t[o].push(e.classList.contains("asc")?"asc":e.classList.contains("desc")?"desc":"")}));for(var p=1;p<=e.rows.length-1;p++){var v=void 0,h=e.rows[p].cells[s].innerText,g=new RegExp("([0-9]{4}[-./*](0[1-9]|1[0-2])[-./*]([0-2]{1}[0-9]{1}|3[0-1]{1})|([0-2]{1}[0-9]{1}|3[0-1]{1})[-./*](0[1-9]|1[0-2])[-./*][0-9]{4})");if(h.match(g)){var b=h.split(/[\.\-\/\*]/),y="";y=4==b[0].length?b[0]+"-"+b[1]+"-"+b[2]:b[2]+"-"+b[1]+"-"+b[0],v=Date.parse(y)}else v=isNaN(parseInt(h))?h.toLowerCase():parseFloat(h);c.push({index:p,value:v})}"asc"==d?c.sort((function(e,a){return e.value>a.value?1:-1})):"desc"==d&&c.sort((function(e,a){return e.value1)if("button"===r){n+='1...';for(var i=2;i').concat(i,"")}var u="",f="ea-adtp-show";d>7&&(u='...',f="ea-adtp-hide"),n+=u+'').concat(d,""),a.insertAdjacentHTML("beforeend",'«'.concat(n,'»'))}else{for(var p=1;p<=d;p++)n+='");a.insertAdjacentHTML("beforeend",""))}for(var v=0;v<=l&&!(v>=e.rows.length);v++)e.rows[v].style.display="table-row";if("button"===r){var h=jQuery;h("a:not(.dots-1st, .dots-last)",a).on("click",(function(n){if(n.preventDefault(),"a"===n.target.tagName.toLowerCase()){s=n.target.dataset.page;var r="thead"===e.rows[0].parentNode.tagName.toLowerCase()?1:0;if(o=(s-1)*e.dataset.itemsPerPage+r,l=s*e.dataset.itemsPerPage,r||(l-=1),d>7){var i=1,c=6;h("a.ea-adtp-current",a).removeClass("ea-adtp-current"),s>d-5?(i=d-5,c=d):s>5&&(i=s-2,c=parseInt(s)+2),h("a.ea-adtp-show",a).removeClass("ea-adtp-show").addClass("ea-adtp-hide");for(var u=i;u<=c;u++)h('a[data-page="'.concat(u,'"]:not(.ea-adtp-1st,.ea-adtp-last)'),a).removeClass("ea-adtp-hide").addClass("ea-adtp-show");h('a[data-page="'.concat(s,'"]'),a).addClass("ea-adtp-current"),h('a[data-page="2"]',a).hasClass("ea-adtp-hide")?h("a.dots-1st",a).removeClass("ea-adtp-hide").addClass("ea-adtp-show"):h("a.dots-1st",a).removeClass("ea-adtp-show").addClass("ea-adtp-hide"),h('a[data-page="'.concat(d-1,'"]'),a).hasClass("ea-adtp-hide")?h("a.dots-last",a).removeClass("ea-adtp-hide").addClass("ea-adtp-show"):h("a.dots-last",a).removeClass("ea-adtp-show").addClass("ea-adtp-hide")}else h("a.ea-adtp-current",a).removeClass("ea-adtp-current"),h('a[data-page="'.concat(s,'"]'),a).addClass("ea-adtp-current");for(var f=r;f<=e.rows.length-1;f++)e.rows[f].style.display=f>=o&&f<=l?"table-row":"none";e.querySelectorAll("th").forEach((function(e,a){e.classList.remove("asc","desc"),void 0!==t[s]&&t[s][a]&&e.classList.add(t[s][a])}))}}))}else a.hasChildNodes()&&a.querySelector("select").addEventListener("input",(function(a){a.preventDefault(),s=a.target.value,offset="thead"==e.rows[0].parentNode.tagName.toLowerCase()?1:0,o=(s-1)*e.dataset.itemsPerPage+offset,l=s*e.dataset.itemsPerPage;for(var n=offset;n<=e.rows.length-1;n++)e.rows[n].style.display=n>=o&&n<=l?"table-row":"none";e.querySelectorAll("th").forEach((function(e,a){e.classList.remove("asc","desc"),void 0!==t[s]&&t[s][a]&&e.classList.add(t[s][a])}))}))}}},{key:"initWooFeatures",value:function(e){e.querySelectorAll(".nt_button_woo").forEach((function(e){e.classList.add("add_to_cart_button","ajax_add_to_cart")})),e.querySelectorAll(".nt_woo_quantity").forEach((function(a){a.addEventListener("input",(function(a){var t=a.target.dataset.product_id,n=a.target.value;$(".nt_add_to_cart_".concat(t),$(e)).data("quantity",n)}))}))}}])&&n(e.prototype,a),t&&n(e,t),Object.defineProperty(e,"prototype",{writable:!1}),e;var e,a,t}();ea.hooks.addAction("init","ea",(function(){if(ea.elementStatusCheck("eaelAdvancedDataTable"))return!1;new s}))}]); \ No newline at end of file diff --git a/assets/front-end/js/view/general.js b/assets/front-end/js/view/general.js index 8bf7eada2..b9e2cdfd2 100644 --- a/assets/front-end/js/view/general.js +++ b/assets/front-end/js/view/general.js @@ -86,219 +86,219 @@ /************************************************************************/ /******/ ({ -/***/ "./node_modules/.pnpm/@babel+runtime@7.23.8/node_modules/@babel/runtime/helpers/esm/arrayLikeToArray.js": -/*!**************************************************************************************************************!*\ - !*** ./node_modules/.pnpm/@babel+runtime@7.23.8/node_modules/@babel/runtime/helpers/esm/arrayLikeToArray.js ***! - \**************************************************************************************************************/ +/***/ "./node_modules/@babel/runtime/helpers/esm/arrayLikeToArray.js": +/*!*********************************************************************!*\ + !*** ./node_modules/@babel/runtime/helpers/esm/arrayLikeToArray.js ***! + \*********************************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return _arrayLikeToArray; });\nfunction _arrayLikeToArray(arr, len) {\n if (len == null || len > arr.length) len = arr.length;\n for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];\n return arr2;\n}\n\n//# sourceURL=webpack:///./node_modules/.pnpm/@babel+runtime@7.23.8/node_modules/@babel/runtime/helpers/esm/arrayLikeToArray.js?"); +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return _arrayLikeToArray; });\nfunction _arrayLikeToArray(arr, len) {\n if (len == null || len > arr.length) len = arr.length;\n for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];\n return arr2;\n}\n\n//# sourceURL=webpack:///./node_modules/@babel/runtime/helpers/esm/arrayLikeToArray.js?"); /***/ }), -/***/ "./node_modules/.pnpm/@babel+runtime@7.23.8/node_modules/@babel/runtime/helpers/esm/arrayWithoutHoles.js": -/*!***************************************************************************************************************!*\ - !*** ./node_modules/.pnpm/@babel+runtime@7.23.8/node_modules/@babel/runtime/helpers/esm/arrayWithoutHoles.js ***! - \***************************************************************************************************************/ +/***/ "./node_modules/@babel/runtime/helpers/esm/arrayWithoutHoles.js": +/*!**********************************************************************!*\ + !*** ./node_modules/@babel/runtime/helpers/esm/arrayWithoutHoles.js ***! + \**********************************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return _arrayWithoutHoles; });\n/* harmony import */ var _arrayLikeToArray_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./arrayLikeToArray.js */ \"./node_modules/.pnpm/@babel+runtime@7.23.8/node_modules/@babel/runtime/helpers/esm/arrayLikeToArray.js\");\n\nfunction _arrayWithoutHoles(arr) {\n if (Array.isArray(arr)) return Object(_arrayLikeToArray_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(arr);\n}\n\n//# sourceURL=webpack:///./node_modules/.pnpm/@babel+runtime@7.23.8/node_modules/@babel/runtime/helpers/esm/arrayWithoutHoles.js?"); +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return _arrayWithoutHoles; });\n/* harmony import */ var _arrayLikeToArray_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./arrayLikeToArray.js */ \"./node_modules/@babel/runtime/helpers/esm/arrayLikeToArray.js\");\n\nfunction _arrayWithoutHoles(arr) {\n if (Array.isArray(arr)) return Object(_arrayLikeToArray_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(arr);\n}\n\n//# sourceURL=webpack:///./node_modules/@babel/runtime/helpers/esm/arrayWithoutHoles.js?"); /***/ }), -/***/ "./node_modules/.pnpm/@babel+runtime@7.23.8/node_modules/@babel/runtime/helpers/esm/classCallCheck.js": -/*!************************************************************************************************************!*\ - !*** ./node_modules/.pnpm/@babel+runtime@7.23.8/node_modules/@babel/runtime/helpers/esm/classCallCheck.js ***! - \************************************************************************************************************/ +/***/ "./node_modules/@babel/runtime/helpers/esm/classCallCheck.js": +/*!*******************************************************************!*\ + !*** ./node_modules/@babel/runtime/helpers/esm/classCallCheck.js ***! + \*******************************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return _classCallCheck; });\nfunction _classCallCheck(instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError(\"Cannot call a class as a function\");\n }\n}\n\n//# sourceURL=webpack:///./node_modules/.pnpm/@babel+runtime@7.23.8/node_modules/@babel/runtime/helpers/esm/classCallCheck.js?"); +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return _classCallCheck; });\nfunction _classCallCheck(instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError(\"Cannot call a class as a function\");\n }\n}\n\n//# sourceURL=webpack:///./node_modules/@babel/runtime/helpers/esm/classCallCheck.js?"); /***/ }), -/***/ "./node_modules/.pnpm/@babel+runtime@7.23.8/node_modules/@babel/runtime/helpers/esm/iterableToArray.js": -/*!*************************************************************************************************************!*\ - !*** ./node_modules/.pnpm/@babel+runtime@7.23.8/node_modules/@babel/runtime/helpers/esm/iterableToArray.js ***! - \*************************************************************************************************************/ +/***/ "./node_modules/@babel/runtime/helpers/esm/iterableToArray.js": +/*!********************************************************************!*\ + !*** ./node_modules/@babel/runtime/helpers/esm/iterableToArray.js ***! + \********************************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return _iterableToArray; });\nfunction _iterableToArray(iter) {\n if (typeof Symbol !== \"undefined\" && iter[Symbol.iterator] != null || iter[\"@@iterator\"] != null) return Array.from(iter);\n}\n\n//# sourceURL=webpack:///./node_modules/.pnpm/@babel+runtime@7.23.8/node_modules/@babel/runtime/helpers/esm/iterableToArray.js?"); +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return _iterableToArray; });\nfunction _iterableToArray(iter) {\n if (typeof Symbol !== \"undefined\" && iter[Symbol.iterator] != null || iter[\"@@iterator\"] != null) return Array.from(iter);\n}\n\n//# sourceURL=webpack:///./node_modules/@babel/runtime/helpers/esm/iterableToArray.js?"); /***/ }), -/***/ "./node_modules/.pnpm/@babel+runtime@7.23.8/node_modules/@babel/runtime/helpers/esm/nonIterableSpread.js": -/*!***************************************************************************************************************!*\ - !*** ./node_modules/.pnpm/@babel+runtime@7.23.8/node_modules/@babel/runtime/helpers/esm/nonIterableSpread.js ***! - \***************************************************************************************************************/ +/***/ "./node_modules/@babel/runtime/helpers/esm/nonIterableSpread.js": +/*!**********************************************************************!*\ + !*** ./node_modules/@babel/runtime/helpers/esm/nonIterableSpread.js ***! + \**********************************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return _nonIterableSpread; });\nfunction _nonIterableSpread() {\n throw new TypeError(\"Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\");\n}\n\n//# sourceURL=webpack:///./node_modules/.pnpm/@babel+runtime@7.23.8/node_modules/@babel/runtime/helpers/esm/nonIterableSpread.js?"); +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return _nonIterableSpread; });\nfunction _nonIterableSpread() {\n throw new TypeError(\"Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\");\n}\n\n//# sourceURL=webpack:///./node_modules/@babel/runtime/helpers/esm/nonIterableSpread.js?"); /***/ }), -/***/ "./node_modules/.pnpm/@babel+runtime@7.23.8/node_modules/@babel/runtime/helpers/esm/toConsumableArray.js": -/*!***************************************************************************************************************!*\ - !*** ./node_modules/.pnpm/@babel+runtime@7.23.8/node_modules/@babel/runtime/helpers/esm/toConsumableArray.js ***! - \***************************************************************************************************************/ +/***/ "./node_modules/@babel/runtime/helpers/esm/toConsumableArray.js": +/*!**********************************************************************!*\ + !*** ./node_modules/@babel/runtime/helpers/esm/toConsumableArray.js ***! + \**********************************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return _toConsumableArray; });\n/* harmony import */ var _arrayWithoutHoles_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./arrayWithoutHoles.js */ \"./node_modules/.pnpm/@babel+runtime@7.23.8/node_modules/@babel/runtime/helpers/esm/arrayWithoutHoles.js\");\n/* harmony import */ var _iterableToArray_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./iterableToArray.js */ \"./node_modules/.pnpm/@babel+runtime@7.23.8/node_modules/@babel/runtime/helpers/esm/iterableToArray.js\");\n/* harmony import */ var _unsupportedIterableToArray_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./unsupportedIterableToArray.js */ \"./node_modules/.pnpm/@babel+runtime@7.23.8/node_modules/@babel/runtime/helpers/esm/unsupportedIterableToArray.js\");\n/* harmony import */ var _nonIterableSpread_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./nonIterableSpread.js */ \"./node_modules/.pnpm/@babel+runtime@7.23.8/node_modules/@babel/runtime/helpers/esm/nonIterableSpread.js\");\n\n\n\n\nfunction _toConsumableArray(arr) {\n return Object(_arrayWithoutHoles_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(arr) || Object(_iterableToArray_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(arr) || Object(_unsupportedIterableToArray_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(arr) || Object(_nonIterableSpread_js__WEBPACK_IMPORTED_MODULE_3__[\"default\"])();\n}\n\n//# sourceURL=webpack:///./node_modules/.pnpm/@babel+runtime@7.23.8/node_modules/@babel/runtime/helpers/esm/toConsumableArray.js?"); +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return _toConsumableArray; });\n/* harmony import */ var _arrayWithoutHoles_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./arrayWithoutHoles.js */ \"./node_modules/@babel/runtime/helpers/esm/arrayWithoutHoles.js\");\n/* harmony import */ var _iterableToArray_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./iterableToArray.js */ \"./node_modules/@babel/runtime/helpers/esm/iterableToArray.js\");\n/* harmony import */ var _unsupportedIterableToArray_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./unsupportedIterableToArray.js */ \"./node_modules/@babel/runtime/helpers/esm/unsupportedIterableToArray.js\");\n/* harmony import */ var _nonIterableSpread_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./nonIterableSpread.js */ \"./node_modules/@babel/runtime/helpers/esm/nonIterableSpread.js\");\n\n\n\n\nfunction _toConsumableArray(arr) {\n return Object(_arrayWithoutHoles_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(arr) || Object(_iterableToArray_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(arr) || Object(_unsupportedIterableToArray_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(arr) || Object(_nonIterableSpread_js__WEBPACK_IMPORTED_MODULE_3__[\"default\"])();\n}\n\n//# sourceURL=webpack:///./node_modules/@babel/runtime/helpers/esm/toConsumableArray.js?"); /***/ }), -/***/ "./node_modules/.pnpm/@babel+runtime@7.23.8/node_modules/@babel/runtime/helpers/esm/unsupportedIterableToArray.js": -/*!************************************************************************************************************************!*\ - !*** ./node_modules/.pnpm/@babel+runtime@7.23.8/node_modules/@babel/runtime/helpers/esm/unsupportedIterableToArray.js ***! - \************************************************************************************************************************/ +/***/ "./node_modules/@babel/runtime/helpers/esm/unsupportedIterableToArray.js": +/*!*******************************************************************************!*\ + !*** ./node_modules/@babel/runtime/helpers/esm/unsupportedIterableToArray.js ***! + \*******************************************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return _unsupportedIterableToArray; });\n/* harmony import */ var _arrayLikeToArray_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./arrayLikeToArray.js */ \"./node_modules/.pnpm/@babel+runtime@7.23.8/node_modules/@babel/runtime/helpers/esm/arrayLikeToArray.js\");\n\nfunction _unsupportedIterableToArray(o, minLen) {\n if (!o) return;\n if (typeof o === \"string\") return Object(_arrayLikeToArray_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(o, minLen);\n var n = Object.prototype.toString.call(o).slice(8, -1);\n if (n === \"Object\" && o.constructor) n = o.constructor.name;\n if (n === \"Map\" || n === \"Set\") return Array.from(o);\n if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return Object(_arrayLikeToArray_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(o, minLen);\n}\n\n//# sourceURL=webpack:///./node_modules/.pnpm/@babel+runtime@7.23.8/node_modules/@babel/runtime/helpers/esm/unsupportedIterableToArray.js?"); +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return _unsupportedIterableToArray; });\n/* harmony import */ var _arrayLikeToArray_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./arrayLikeToArray.js */ \"./node_modules/@babel/runtime/helpers/esm/arrayLikeToArray.js\");\n\nfunction _unsupportedIterableToArray(o, minLen) {\n if (!o) return;\n if (typeof o === \"string\") return Object(_arrayLikeToArray_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(o, minLen);\n var n = Object.prototype.toString.call(o).slice(8, -1);\n if (n === \"Object\" && o.constructor) n = o.constructor.name;\n if (n === \"Map\" || n === \"Set\") return Array.from(o);\n if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return Object(_arrayLikeToArray_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(o, minLen);\n}\n\n//# sourceURL=webpack:///./node_modules/@babel/runtime/helpers/esm/unsupportedIterableToArray.js?"); /***/ }), -/***/ "./node_modules/.pnpm/@wordpress+hooks@2.12.3/node_modules/@wordpress/hooks/build-module/createAddHook.js": -/*!****************************************************************************************************************!*\ - !*** ./node_modules/.pnpm/@wordpress+hooks@2.12.3/node_modules/@wordpress/hooks/build-module/createAddHook.js ***! - \****************************************************************************************************************/ +/***/ "./node_modules/@wordpress/hooks/build-module/createAddHook.js": +/*!*********************************************************************!*\ + !*** ./node_modules/@wordpress/hooks/build-module/createAddHook.js ***! + \*********************************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _validateNamespace_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./validateNamespace.js */ \"./node_modules/.pnpm/@wordpress+hooks@2.12.3/node_modules/@wordpress/hooks/build-module/validateNamespace.js\");\n/* harmony import */ var _validateHookName_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./validateHookName.js */ \"./node_modules/.pnpm/@wordpress+hooks@2.12.3/node_modules/@wordpress/hooks/build-module/validateHookName.js\");\n/**\n * Internal dependencies\n */\n\n\n/**\n * @callback AddHook\n *\n * Adds the hook to the appropriate hooks container.\n *\n * @param {string} hookName Name of hook to add\n * @param {string} namespace The unique namespace identifying the callback in the form `vendor/plugin/function`.\n * @param {import('.').Callback} callback Function to call when the hook is run\n * @param {number} [priority=10] Priority of this hook\n */\n\n/**\n * Returns a function which, when invoked, will add a hook.\n *\n * @param {import('.').Hooks} hooks Hooks instance.\n * @param {import('.').StoreKey} storeKey\n *\n * @return {AddHook} Function that adds a new hook.\n */\n\nfunction createAddHook(hooks, storeKey) {\n return function addHook(hookName, namespace, callback) {\n var priority = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 10;\n var hooksStore = hooks[storeKey];\n\n if (!Object(_validateHookName_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(hookName)) {\n return;\n }\n\n if (!Object(_validateNamespace_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(namespace)) {\n return;\n }\n\n if ('function' !== typeof callback) {\n // eslint-disable-next-line no-console\n console.error('The hook callback must be a function.');\n return;\n } // Validate numeric priority\n\n\n if ('number' !== typeof priority) {\n // eslint-disable-next-line no-console\n console.error('If specified, the hook priority must be a number.');\n return;\n }\n\n var handler = {\n callback: callback,\n priority: priority,\n namespace: namespace\n };\n\n if (hooksStore[hookName]) {\n // Find the correct insert index of the new hook.\n var handlers = hooksStore[hookName].handlers;\n /** @type {number} */\n\n var i;\n\n for (i = handlers.length; i > 0; i--) {\n if (priority >= handlers[i - 1].priority) {\n break;\n }\n }\n\n if (i === handlers.length) {\n // If append, operate via direct assignment.\n handlers[i] = handler;\n } else {\n // Otherwise, insert before index via splice.\n handlers.splice(i, 0, handler);\n } // We may also be currently executing this hook. If the callback\n // we're adding would come after the current callback, there's no\n // problem; otherwise we need to increase the execution index of\n // any other runs by 1 to account for the added element.\n\n\n hooksStore.__current.forEach(function (hookInfo) {\n if (hookInfo.name === hookName && hookInfo.currentIndex >= i) {\n hookInfo.currentIndex++;\n }\n });\n } else {\n // This is the first hook of its type.\n hooksStore[hookName] = {\n handlers: [handler],\n runs: 0\n };\n }\n\n if (hookName !== 'hookAdded') {\n hooks.doAction('hookAdded', hookName, namespace, callback, priority);\n }\n };\n}\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (createAddHook);\n//# sourceMappingURL=createAddHook.js.map\n\n//# sourceURL=webpack:///./node_modules/.pnpm/@wordpress+hooks@2.12.3/node_modules/@wordpress/hooks/build-module/createAddHook.js?"); +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _validateNamespace_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./validateNamespace.js */ \"./node_modules/@wordpress/hooks/build-module/validateNamespace.js\");\n/* harmony import */ var _validateHookName_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./validateHookName.js */ \"./node_modules/@wordpress/hooks/build-module/validateHookName.js\");\n/**\n * Internal dependencies\n */\n\n\n/**\n * @callback AddHook\n *\n * Adds the hook to the appropriate hooks container.\n *\n * @param {string} hookName Name of hook to add\n * @param {string} namespace The unique namespace identifying the callback in the form `vendor/plugin/function`.\n * @param {import('.').Callback} callback Function to call when the hook is run\n * @param {number} [priority=10] Priority of this hook\n */\n\n/**\n * Returns a function which, when invoked, will add a hook.\n *\n * @param {import('.').Hooks} hooks Hooks instance.\n * @param {import('.').StoreKey} storeKey\n *\n * @return {AddHook} Function that adds a new hook.\n */\n\nfunction createAddHook(hooks, storeKey) {\n return function addHook(hookName, namespace, callback) {\n var priority = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 10;\n var hooksStore = hooks[storeKey];\n\n if (!Object(_validateHookName_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(hookName)) {\n return;\n }\n\n if (!Object(_validateNamespace_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(namespace)) {\n return;\n }\n\n if ('function' !== typeof callback) {\n // eslint-disable-next-line no-console\n console.error('The hook callback must be a function.');\n return;\n } // Validate numeric priority\n\n\n if ('number' !== typeof priority) {\n // eslint-disable-next-line no-console\n console.error('If specified, the hook priority must be a number.');\n return;\n }\n\n var handler = {\n callback: callback,\n priority: priority,\n namespace: namespace\n };\n\n if (hooksStore[hookName]) {\n // Find the correct insert index of the new hook.\n var handlers = hooksStore[hookName].handlers;\n /** @type {number} */\n\n var i;\n\n for (i = handlers.length; i > 0; i--) {\n if (priority >= handlers[i - 1].priority) {\n break;\n }\n }\n\n if (i === handlers.length) {\n // If append, operate via direct assignment.\n handlers[i] = handler;\n } else {\n // Otherwise, insert before index via splice.\n handlers.splice(i, 0, handler);\n } // We may also be currently executing this hook. If the callback\n // we're adding would come after the current callback, there's no\n // problem; otherwise we need to increase the execution index of\n // any other runs by 1 to account for the added element.\n\n\n hooksStore.__current.forEach(function (hookInfo) {\n if (hookInfo.name === hookName && hookInfo.currentIndex >= i) {\n hookInfo.currentIndex++;\n }\n });\n } else {\n // This is the first hook of its type.\n hooksStore[hookName] = {\n handlers: [handler],\n runs: 0\n };\n }\n\n if (hookName !== 'hookAdded') {\n hooks.doAction('hookAdded', hookName, namespace, callback, priority);\n }\n };\n}\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (createAddHook);\n//# sourceMappingURL=createAddHook.js.map\n\n//# sourceURL=webpack:///./node_modules/@wordpress/hooks/build-module/createAddHook.js?"); /***/ }), -/***/ "./node_modules/.pnpm/@wordpress+hooks@2.12.3/node_modules/@wordpress/hooks/build-module/createCurrentHook.js": -/*!********************************************************************************************************************!*\ - !*** ./node_modules/.pnpm/@wordpress+hooks@2.12.3/node_modules/@wordpress/hooks/build-module/createCurrentHook.js ***! - \********************************************************************************************************************/ +/***/ "./node_modules/@wordpress/hooks/build-module/createCurrentHook.js": +/*!*************************************************************************!*\ + !*** ./node_modules/@wordpress/hooks/build-module/createCurrentHook.js ***! + \*************************************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("__webpack_require__.r(__webpack_exports__);\n/**\n * Returns a function which, when invoked, will return the name of the\n * currently running hook, or `null` if no hook of the given type is currently\n * running.\n *\n * @param {import('.').Hooks} hooks Hooks instance.\n * @param {import('.').StoreKey} storeKey\n *\n * @return {() => string | null} Function that returns the current hook name or null.\n */\nfunction createCurrentHook(hooks, storeKey) {\n return function currentHook() {\n var _hooksStore$__current, _hooksStore$__current2;\n\n var hooksStore = hooks[storeKey];\n return (_hooksStore$__current = (_hooksStore$__current2 = hooksStore.__current[hooksStore.__current.length - 1]) === null || _hooksStore$__current2 === void 0 ? void 0 : _hooksStore$__current2.name) !== null && _hooksStore$__current !== void 0 ? _hooksStore$__current : null;\n };\n}\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (createCurrentHook);\n//# sourceMappingURL=createCurrentHook.js.map\n\n//# sourceURL=webpack:///./node_modules/.pnpm/@wordpress+hooks@2.12.3/node_modules/@wordpress/hooks/build-module/createCurrentHook.js?"); +eval("__webpack_require__.r(__webpack_exports__);\n/**\n * Returns a function which, when invoked, will return the name of the\n * currently running hook, or `null` if no hook of the given type is currently\n * running.\n *\n * @param {import('.').Hooks} hooks Hooks instance.\n * @param {import('.').StoreKey} storeKey\n *\n * @return {() => string | null} Function that returns the current hook name or null.\n */\nfunction createCurrentHook(hooks, storeKey) {\n return function currentHook() {\n var _hooksStore$__current, _hooksStore$__current2;\n\n var hooksStore = hooks[storeKey];\n return (_hooksStore$__current = (_hooksStore$__current2 = hooksStore.__current[hooksStore.__current.length - 1]) === null || _hooksStore$__current2 === void 0 ? void 0 : _hooksStore$__current2.name) !== null && _hooksStore$__current !== void 0 ? _hooksStore$__current : null;\n };\n}\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (createCurrentHook);\n//# sourceMappingURL=createCurrentHook.js.map\n\n//# sourceURL=webpack:///./node_modules/@wordpress/hooks/build-module/createCurrentHook.js?"); /***/ }), -/***/ "./node_modules/.pnpm/@wordpress+hooks@2.12.3/node_modules/@wordpress/hooks/build-module/createDidHook.js": -/*!****************************************************************************************************************!*\ - !*** ./node_modules/.pnpm/@wordpress+hooks@2.12.3/node_modules/@wordpress/hooks/build-module/createDidHook.js ***! - \****************************************************************************************************************/ +/***/ "./node_modules/@wordpress/hooks/build-module/createDidHook.js": +/*!*********************************************************************!*\ + !*** ./node_modules/@wordpress/hooks/build-module/createDidHook.js ***! + \*********************************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _validateHookName_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./validateHookName.js */ \"./node_modules/.pnpm/@wordpress+hooks@2.12.3/node_modules/@wordpress/hooks/build-module/validateHookName.js\");\n/**\n * Internal dependencies\n */\n\n/**\n * @callback DidHook\n *\n * Returns the number of times an action has been fired.\n *\n * @param {string} hookName The hook name to check.\n *\n * @return {number | undefined} The number of times the hook has run.\n */\n\n/**\n * Returns a function which, when invoked, will return the number of times a\n * hook has been called.\n *\n * @param {import('.').Hooks} hooks Hooks instance.\n * @param {import('.').StoreKey} storeKey\n *\n * @return {DidHook} Function that returns a hook's call count.\n */\n\nfunction createDidHook(hooks, storeKey) {\n return function didHook(hookName) {\n var hooksStore = hooks[storeKey];\n\n if (!Object(_validateHookName_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(hookName)) {\n return;\n }\n\n return hooksStore[hookName] && hooksStore[hookName].runs ? hooksStore[hookName].runs : 0;\n };\n}\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (createDidHook);\n//# sourceMappingURL=createDidHook.js.map\n\n//# sourceURL=webpack:///./node_modules/.pnpm/@wordpress+hooks@2.12.3/node_modules/@wordpress/hooks/build-module/createDidHook.js?"); +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _validateHookName_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./validateHookName.js */ \"./node_modules/@wordpress/hooks/build-module/validateHookName.js\");\n/**\n * Internal dependencies\n */\n\n/**\n * @callback DidHook\n *\n * Returns the number of times an action has been fired.\n *\n * @param {string} hookName The hook name to check.\n *\n * @return {number | undefined} The number of times the hook has run.\n */\n\n/**\n * Returns a function which, when invoked, will return the number of times a\n * hook has been called.\n *\n * @param {import('.').Hooks} hooks Hooks instance.\n * @param {import('.').StoreKey} storeKey\n *\n * @return {DidHook} Function that returns a hook's call count.\n */\n\nfunction createDidHook(hooks, storeKey) {\n return function didHook(hookName) {\n var hooksStore = hooks[storeKey];\n\n if (!Object(_validateHookName_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(hookName)) {\n return;\n }\n\n return hooksStore[hookName] && hooksStore[hookName].runs ? hooksStore[hookName].runs : 0;\n };\n}\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (createDidHook);\n//# sourceMappingURL=createDidHook.js.map\n\n//# sourceURL=webpack:///./node_modules/@wordpress/hooks/build-module/createDidHook.js?"); /***/ }), -/***/ "./node_modules/.pnpm/@wordpress+hooks@2.12.3/node_modules/@wordpress/hooks/build-module/createDoingHook.js": -/*!******************************************************************************************************************!*\ - !*** ./node_modules/.pnpm/@wordpress+hooks@2.12.3/node_modules/@wordpress/hooks/build-module/createDoingHook.js ***! - \******************************************************************************************************************/ +/***/ "./node_modules/@wordpress/hooks/build-module/createDoingHook.js": +/*!***********************************************************************!*\ + !*** ./node_modules/@wordpress/hooks/build-module/createDoingHook.js ***! + \***********************************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("__webpack_require__.r(__webpack_exports__);\n/**\n * @callback DoingHook\n * Returns whether a hook is currently being executed.\n *\n * @param {string} [hookName] The name of the hook to check for. If\n * omitted, will check for any hook being executed.\n *\n * @return {boolean} Whether the hook is being executed.\n */\n\n/**\n * Returns a function which, when invoked, will return whether a hook is\n * currently being executed.\n *\n * @param {import('.').Hooks} hooks Hooks instance.\n * @param {import('.').StoreKey} storeKey\n *\n * @return {DoingHook} Function that returns whether a hook is currently\n * being executed.\n */\nfunction createDoingHook(hooks, storeKey) {\n return function doingHook(hookName) {\n var hooksStore = hooks[storeKey]; // If the hookName was not passed, check for any current hook.\n\n if ('undefined' === typeof hookName) {\n return 'undefined' !== typeof hooksStore.__current[0];\n } // Return the __current hook.\n\n\n return hooksStore.__current[0] ? hookName === hooksStore.__current[0].name : false;\n };\n}\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (createDoingHook);\n//# sourceMappingURL=createDoingHook.js.map\n\n//# sourceURL=webpack:///./node_modules/.pnpm/@wordpress+hooks@2.12.3/node_modules/@wordpress/hooks/build-module/createDoingHook.js?"); +eval("__webpack_require__.r(__webpack_exports__);\n/**\n * @callback DoingHook\n * Returns whether a hook is currently being executed.\n *\n * @param {string} [hookName] The name of the hook to check for. If\n * omitted, will check for any hook being executed.\n *\n * @return {boolean} Whether the hook is being executed.\n */\n\n/**\n * Returns a function which, when invoked, will return whether a hook is\n * currently being executed.\n *\n * @param {import('.').Hooks} hooks Hooks instance.\n * @param {import('.').StoreKey} storeKey\n *\n * @return {DoingHook} Function that returns whether a hook is currently\n * being executed.\n */\nfunction createDoingHook(hooks, storeKey) {\n return function doingHook(hookName) {\n var hooksStore = hooks[storeKey]; // If the hookName was not passed, check for any current hook.\n\n if ('undefined' === typeof hookName) {\n return 'undefined' !== typeof hooksStore.__current[0];\n } // Return the __current hook.\n\n\n return hooksStore.__current[0] ? hookName === hooksStore.__current[0].name : false;\n };\n}\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (createDoingHook);\n//# sourceMappingURL=createDoingHook.js.map\n\n//# sourceURL=webpack:///./node_modules/@wordpress/hooks/build-module/createDoingHook.js?"); /***/ }), -/***/ "./node_modules/.pnpm/@wordpress+hooks@2.12.3/node_modules/@wordpress/hooks/build-module/createHasHook.js": -/*!****************************************************************************************************************!*\ - !*** ./node_modules/.pnpm/@wordpress+hooks@2.12.3/node_modules/@wordpress/hooks/build-module/createHasHook.js ***! - \****************************************************************************************************************/ +/***/ "./node_modules/@wordpress/hooks/build-module/createHasHook.js": +/*!*********************************************************************!*\ + !*** ./node_modules/@wordpress/hooks/build-module/createHasHook.js ***! + \*********************************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("__webpack_require__.r(__webpack_exports__);\n/**\n * @callback HasHook\n *\n * Returns whether any handlers are attached for the given hookName and optional namespace.\n *\n * @param {string} hookName The name of the hook to check for.\n * @param {string} [namespace] Optional. The unique namespace identifying the callback\n * in the form `vendor/plugin/function`.\n *\n * @return {boolean} Whether there are handlers that are attached to the given hook.\n */\n\n/**\n * Returns a function which, when invoked, will return whether any handlers are\n * attached to a particular hook.\n *\n * @param {import('.').Hooks} hooks Hooks instance.\n * @param {import('.').StoreKey} storeKey\n *\n * @return {HasHook} Function that returns whether any handlers are\n * attached to a particular hook and optional namespace.\n */\nfunction createHasHook(hooks, storeKey) {\n return function hasHook(hookName, namespace) {\n var hooksStore = hooks[storeKey]; // Use the namespace if provided.\n\n if ('undefined' !== typeof namespace) {\n return hookName in hooksStore && hooksStore[hookName].handlers.some(function (hook) {\n return hook.namespace === namespace;\n });\n }\n\n return hookName in hooksStore;\n };\n}\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (createHasHook);\n//# sourceMappingURL=createHasHook.js.map\n\n//# sourceURL=webpack:///./node_modules/.pnpm/@wordpress+hooks@2.12.3/node_modules/@wordpress/hooks/build-module/createHasHook.js?"); +eval("__webpack_require__.r(__webpack_exports__);\n/**\n * @callback HasHook\n *\n * Returns whether any handlers are attached for the given hookName and optional namespace.\n *\n * @param {string} hookName The name of the hook to check for.\n * @param {string} [namespace] Optional. The unique namespace identifying the callback\n * in the form `vendor/plugin/function`.\n *\n * @return {boolean} Whether there are handlers that are attached to the given hook.\n */\n\n/**\n * Returns a function which, when invoked, will return whether any handlers are\n * attached to a particular hook.\n *\n * @param {import('.').Hooks} hooks Hooks instance.\n * @param {import('.').StoreKey} storeKey\n *\n * @return {HasHook} Function that returns whether any handlers are\n * attached to a particular hook and optional namespace.\n */\nfunction createHasHook(hooks, storeKey) {\n return function hasHook(hookName, namespace) {\n var hooksStore = hooks[storeKey]; // Use the namespace if provided.\n\n if ('undefined' !== typeof namespace) {\n return hookName in hooksStore && hooksStore[hookName].handlers.some(function (hook) {\n return hook.namespace === namespace;\n });\n }\n\n return hookName in hooksStore;\n };\n}\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (createHasHook);\n//# sourceMappingURL=createHasHook.js.map\n\n//# sourceURL=webpack:///./node_modules/@wordpress/hooks/build-module/createHasHook.js?"); /***/ }), -/***/ "./node_modules/.pnpm/@wordpress+hooks@2.12.3/node_modules/@wordpress/hooks/build-module/createHooks.js": -/*!**************************************************************************************************************!*\ - !*** ./node_modules/.pnpm/@wordpress+hooks@2.12.3/node_modules/@wordpress/hooks/build-module/createHooks.js ***! - \**************************************************************************************************************/ +/***/ "./node_modules/@wordpress/hooks/build-module/createHooks.js": +/*!*******************************************************************!*\ + !*** ./node_modules/@wordpress/hooks/build-module/createHooks.js ***! + \*******************************************************************/ /*! exports provided: _Hooks, default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"_Hooks\", function() { return _Hooks; });\n/* harmony import */ var _babel_runtime_helpers_esm_classCallCheck__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/classCallCheck */ \"./node_modules/.pnpm/@babel+runtime@7.23.8/node_modules/@babel/runtime/helpers/esm/classCallCheck.js\");\n/* harmony import */ var _createAddHook__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./createAddHook */ \"./node_modules/.pnpm/@wordpress+hooks@2.12.3/node_modules/@wordpress/hooks/build-module/createAddHook.js\");\n/* harmony import */ var _createRemoveHook__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./createRemoveHook */ \"./node_modules/.pnpm/@wordpress+hooks@2.12.3/node_modules/@wordpress/hooks/build-module/createRemoveHook.js\");\n/* harmony import */ var _createHasHook__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./createHasHook */ \"./node_modules/.pnpm/@wordpress+hooks@2.12.3/node_modules/@wordpress/hooks/build-module/createHasHook.js\");\n/* harmony import */ var _createRunHook__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./createRunHook */ \"./node_modules/.pnpm/@wordpress+hooks@2.12.3/node_modules/@wordpress/hooks/build-module/createRunHook.js\");\n/* harmony import */ var _createCurrentHook__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./createCurrentHook */ \"./node_modules/.pnpm/@wordpress+hooks@2.12.3/node_modules/@wordpress/hooks/build-module/createCurrentHook.js\");\n/* harmony import */ var _createDoingHook__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./createDoingHook */ \"./node_modules/.pnpm/@wordpress+hooks@2.12.3/node_modules/@wordpress/hooks/build-module/createDoingHook.js\");\n/* harmony import */ var _createDidHook__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./createDidHook */ \"./node_modules/.pnpm/@wordpress+hooks@2.12.3/node_modules/@wordpress/hooks/build-module/createDidHook.js\");\n\n\n/**\n * Internal dependencies\n */\n\n\n\n\n\n\n\n/**\n * Internal class for constructing hooks. Use `createHooks()` function\n *\n * Note, it is necessary to expose this class to make its type public.\n *\n * @private\n */\n\nvar _Hooks = function _Hooks() {\n Object(_babel_runtime_helpers_esm_classCallCheck__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(this, _Hooks);\n\n /** @type {import('.').Store} actions */\n this.actions = Object.create(null);\n this.actions.__current = [];\n /** @type {import('.').Store} filters */\n\n this.filters = Object.create(null);\n this.filters.__current = [];\n this.addAction = Object(_createAddHook__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(this, 'actions');\n this.addFilter = Object(_createAddHook__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(this, 'filters');\n this.removeAction = Object(_createRemoveHook__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(this, 'actions');\n this.removeFilter = Object(_createRemoveHook__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(this, 'filters');\n this.hasAction = Object(_createHasHook__WEBPACK_IMPORTED_MODULE_3__[\"default\"])(this, 'actions');\n this.hasFilter = Object(_createHasHook__WEBPACK_IMPORTED_MODULE_3__[\"default\"])(this, 'filters');\n this.removeAllActions = Object(_createRemoveHook__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(this, 'actions', true);\n this.removeAllFilters = Object(_createRemoveHook__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(this, 'filters', true);\n this.doAction = Object(_createRunHook__WEBPACK_IMPORTED_MODULE_4__[\"default\"])(this, 'actions');\n this.applyFilters = Object(_createRunHook__WEBPACK_IMPORTED_MODULE_4__[\"default\"])(this, 'filters', true);\n this.currentAction = Object(_createCurrentHook__WEBPACK_IMPORTED_MODULE_5__[\"default\"])(this, 'actions');\n this.currentFilter = Object(_createCurrentHook__WEBPACK_IMPORTED_MODULE_5__[\"default\"])(this, 'filters');\n this.doingAction = Object(_createDoingHook__WEBPACK_IMPORTED_MODULE_6__[\"default\"])(this, 'actions');\n this.doingFilter = Object(_createDoingHook__WEBPACK_IMPORTED_MODULE_6__[\"default\"])(this, 'filters');\n this.didAction = Object(_createDidHook__WEBPACK_IMPORTED_MODULE_7__[\"default\"])(this, 'actions');\n this.didFilter = Object(_createDidHook__WEBPACK_IMPORTED_MODULE_7__[\"default\"])(this, 'filters');\n};\n/** @typedef {_Hooks} Hooks */\n\n/**\n * Returns an instance of the hooks object.\n *\n * @return {Hooks} A Hooks instance.\n */\n\nfunction createHooks() {\n return new _Hooks();\n}\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (createHooks);\n//# sourceMappingURL=createHooks.js.map\n\n//# sourceURL=webpack:///./node_modules/.pnpm/@wordpress+hooks@2.12.3/node_modules/@wordpress/hooks/build-module/createHooks.js?"); +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"_Hooks\", function() { return _Hooks; });\n/* harmony import */ var _babel_runtime_helpers_esm_classCallCheck__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/classCallCheck */ \"./node_modules/@babel/runtime/helpers/esm/classCallCheck.js\");\n/* harmony import */ var _createAddHook__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./createAddHook */ \"./node_modules/@wordpress/hooks/build-module/createAddHook.js\");\n/* harmony import */ var _createRemoveHook__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./createRemoveHook */ \"./node_modules/@wordpress/hooks/build-module/createRemoveHook.js\");\n/* harmony import */ var _createHasHook__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./createHasHook */ \"./node_modules/@wordpress/hooks/build-module/createHasHook.js\");\n/* harmony import */ var _createRunHook__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./createRunHook */ \"./node_modules/@wordpress/hooks/build-module/createRunHook.js\");\n/* harmony import */ var _createCurrentHook__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./createCurrentHook */ \"./node_modules/@wordpress/hooks/build-module/createCurrentHook.js\");\n/* harmony import */ var _createDoingHook__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./createDoingHook */ \"./node_modules/@wordpress/hooks/build-module/createDoingHook.js\");\n/* harmony import */ var _createDidHook__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./createDidHook */ \"./node_modules/@wordpress/hooks/build-module/createDidHook.js\");\n\n\n/**\n * Internal dependencies\n */\n\n\n\n\n\n\n\n/**\n * Internal class for constructing hooks. Use `createHooks()` function\n *\n * Note, it is necessary to expose this class to make its type public.\n *\n * @private\n */\n\nvar _Hooks = function _Hooks() {\n Object(_babel_runtime_helpers_esm_classCallCheck__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(this, _Hooks);\n\n /** @type {import('.').Store} actions */\n this.actions = Object.create(null);\n this.actions.__current = [];\n /** @type {import('.').Store} filters */\n\n this.filters = Object.create(null);\n this.filters.__current = [];\n this.addAction = Object(_createAddHook__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(this, 'actions');\n this.addFilter = Object(_createAddHook__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(this, 'filters');\n this.removeAction = Object(_createRemoveHook__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(this, 'actions');\n this.removeFilter = Object(_createRemoveHook__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(this, 'filters');\n this.hasAction = Object(_createHasHook__WEBPACK_IMPORTED_MODULE_3__[\"default\"])(this, 'actions');\n this.hasFilter = Object(_createHasHook__WEBPACK_IMPORTED_MODULE_3__[\"default\"])(this, 'filters');\n this.removeAllActions = Object(_createRemoveHook__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(this, 'actions', true);\n this.removeAllFilters = Object(_createRemoveHook__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(this, 'filters', true);\n this.doAction = Object(_createRunHook__WEBPACK_IMPORTED_MODULE_4__[\"default\"])(this, 'actions');\n this.applyFilters = Object(_createRunHook__WEBPACK_IMPORTED_MODULE_4__[\"default\"])(this, 'filters', true);\n this.currentAction = Object(_createCurrentHook__WEBPACK_IMPORTED_MODULE_5__[\"default\"])(this, 'actions');\n this.currentFilter = Object(_createCurrentHook__WEBPACK_IMPORTED_MODULE_5__[\"default\"])(this, 'filters');\n this.doingAction = Object(_createDoingHook__WEBPACK_IMPORTED_MODULE_6__[\"default\"])(this, 'actions');\n this.doingFilter = Object(_createDoingHook__WEBPACK_IMPORTED_MODULE_6__[\"default\"])(this, 'filters');\n this.didAction = Object(_createDidHook__WEBPACK_IMPORTED_MODULE_7__[\"default\"])(this, 'actions');\n this.didFilter = Object(_createDidHook__WEBPACK_IMPORTED_MODULE_7__[\"default\"])(this, 'filters');\n};\n/** @typedef {_Hooks} Hooks */\n\n/**\n * Returns an instance of the hooks object.\n *\n * @return {Hooks} A Hooks instance.\n */\n\nfunction createHooks() {\n return new _Hooks();\n}\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (createHooks);\n//# sourceMappingURL=createHooks.js.map\n\n//# sourceURL=webpack:///./node_modules/@wordpress/hooks/build-module/createHooks.js?"); /***/ }), -/***/ "./node_modules/.pnpm/@wordpress+hooks@2.12.3/node_modules/@wordpress/hooks/build-module/createRemoveHook.js": -/*!*******************************************************************************************************************!*\ - !*** ./node_modules/.pnpm/@wordpress+hooks@2.12.3/node_modules/@wordpress/hooks/build-module/createRemoveHook.js ***! - \*******************************************************************************************************************/ +/***/ "./node_modules/@wordpress/hooks/build-module/createRemoveHook.js": +/*!************************************************************************!*\ + !*** ./node_modules/@wordpress/hooks/build-module/createRemoveHook.js ***! + \************************************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _validateNamespace_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./validateNamespace.js */ \"./node_modules/.pnpm/@wordpress+hooks@2.12.3/node_modules/@wordpress/hooks/build-module/validateNamespace.js\");\n/* harmony import */ var _validateHookName_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./validateHookName.js */ \"./node_modules/.pnpm/@wordpress+hooks@2.12.3/node_modules/@wordpress/hooks/build-module/validateHookName.js\");\n/**\n * Internal dependencies\n */\n\n\n/**\n * @callback RemoveHook\n * Removes the specified callback (or all callbacks) from the hook with a given hookName\n * and namespace.\n *\n * @param {string} hookName The name of the hook to modify.\n * @param {string} namespace The unique namespace identifying the callback in the\n * form `vendor/plugin/function`.\n *\n * @return {number | undefined} The number of callbacks removed.\n */\n\n/**\n * Returns a function which, when invoked, will remove a specified hook or all\n * hooks by the given name.\n *\n * @param {import('.').Hooks} hooks Hooks instance.\n * @param {import('.').StoreKey} storeKey\n * @param {boolean} [removeAll=false] Whether to remove all callbacks for a hookName,\n * without regard to namespace. Used to create\n * `removeAll*` functions.\n *\n * @return {RemoveHook} Function that removes hooks.\n */\n\nfunction createRemoveHook(hooks, storeKey) {\n var removeAll = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;\n return function removeHook(hookName, namespace) {\n var hooksStore = hooks[storeKey];\n\n if (!Object(_validateHookName_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(hookName)) {\n return;\n }\n\n if (!removeAll && !Object(_validateNamespace_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(namespace)) {\n return;\n } // Bail if no hooks exist by this name\n\n\n if (!hooksStore[hookName]) {\n return 0;\n }\n\n var handlersRemoved = 0;\n\n if (removeAll) {\n handlersRemoved = hooksStore[hookName].handlers.length;\n hooksStore[hookName] = {\n runs: hooksStore[hookName].runs,\n handlers: []\n };\n } else {\n // Try to find the specified callback to remove.\n var handlers = hooksStore[hookName].handlers;\n\n var _loop = function _loop(i) {\n if (handlers[i].namespace === namespace) {\n handlers.splice(i, 1);\n handlersRemoved++; // This callback may also be part of a hook that is\n // currently executing. If the callback we're removing\n // comes after the current callback, there's no problem;\n // otherwise we need to decrease the execution index of any\n // other runs by 1 to account for the removed element.\n\n hooksStore.__current.forEach(function (hookInfo) {\n if (hookInfo.name === hookName && hookInfo.currentIndex >= i) {\n hookInfo.currentIndex--;\n }\n });\n }\n };\n\n for (var i = handlers.length - 1; i >= 0; i--) {\n _loop(i);\n }\n }\n\n if (hookName !== 'hookRemoved') {\n hooks.doAction('hookRemoved', hookName, namespace);\n }\n\n return handlersRemoved;\n };\n}\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (createRemoveHook);\n//# sourceMappingURL=createRemoveHook.js.map\n\n//# sourceURL=webpack:///./node_modules/.pnpm/@wordpress+hooks@2.12.3/node_modules/@wordpress/hooks/build-module/createRemoveHook.js?"); +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _validateNamespace_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./validateNamespace.js */ \"./node_modules/@wordpress/hooks/build-module/validateNamespace.js\");\n/* harmony import */ var _validateHookName_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./validateHookName.js */ \"./node_modules/@wordpress/hooks/build-module/validateHookName.js\");\n/**\n * Internal dependencies\n */\n\n\n/**\n * @callback RemoveHook\n * Removes the specified callback (or all callbacks) from the hook with a given hookName\n * and namespace.\n *\n * @param {string} hookName The name of the hook to modify.\n * @param {string} namespace The unique namespace identifying the callback in the\n * form `vendor/plugin/function`.\n *\n * @return {number | undefined} The number of callbacks removed.\n */\n\n/**\n * Returns a function which, when invoked, will remove a specified hook or all\n * hooks by the given name.\n *\n * @param {import('.').Hooks} hooks Hooks instance.\n * @param {import('.').StoreKey} storeKey\n * @param {boolean} [removeAll=false] Whether to remove all callbacks for a hookName,\n * without regard to namespace. Used to create\n * `removeAll*` functions.\n *\n * @return {RemoveHook} Function that removes hooks.\n */\n\nfunction createRemoveHook(hooks, storeKey) {\n var removeAll = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;\n return function removeHook(hookName, namespace) {\n var hooksStore = hooks[storeKey];\n\n if (!Object(_validateHookName_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(hookName)) {\n return;\n }\n\n if (!removeAll && !Object(_validateNamespace_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(namespace)) {\n return;\n } // Bail if no hooks exist by this name\n\n\n if (!hooksStore[hookName]) {\n return 0;\n }\n\n var handlersRemoved = 0;\n\n if (removeAll) {\n handlersRemoved = hooksStore[hookName].handlers.length;\n hooksStore[hookName] = {\n runs: hooksStore[hookName].runs,\n handlers: []\n };\n } else {\n // Try to find the specified callback to remove.\n var handlers = hooksStore[hookName].handlers;\n\n var _loop = function _loop(i) {\n if (handlers[i].namespace === namespace) {\n handlers.splice(i, 1);\n handlersRemoved++; // This callback may also be part of a hook that is\n // currently executing. If the callback we're removing\n // comes after the current callback, there's no problem;\n // otherwise we need to decrease the execution index of any\n // other runs by 1 to account for the removed element.\n\n hooksStore.__current.forEach(function (hookInfo) {\n if (hookInfo.name === hookName && hookInfo.currentIndex >= i) {\n hookInfo.currentIndex--;\n }\n });\n }\n };\n\n for (var i = handlers.length - 1; i >= 0; i--) {\n _loop(i);\n }\n }\n\n if (hookName !== 'hookRemoved') {\n hooks.doAction('hookRemoved', hookName, namespace);\n }\n\n return handlersRemoved;\n };\n}\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (createRemoveHook);\n//# sourceMappingURL=createRemoveHook.js.map\n\n//# sourceURL=webpack:///./node_modules/@wordpress/hooks/build-module/createRemoveHook.js?"); /***/ }), -/***/ "./node_modules/.pnpm/@wordpress+hooks@2.12.3/node_modules/@wordpress/hooks/build-module/createRunHook.js": -/*!****************************************************************************************************************!*\ - !*** ./node_modules/.pnpm/@wordpress+hooks@2.12.3/node_modules/@wordpress/hooks/build-module/createRunHook.js ***! - \****************************************************************************************************************/ +/***/ "./node_modules/@wordpress/hooks/build-module/createRunHook.js": +/*!*********************************************************************!*\ + !*** ./node_modules/@wordpress/hooks/build-module/createRunHook.js ***! + \*********************************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _babel_runtime_helpers_esm_toConsumableArray__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/toConsumableArray */ \"./node_modules/.pnpm/@babel+runtime@7.23.8/node_modules/@babel/runtime/helpers/esm/toConsumableArray.js\");\n\n\n/**\n * Returns a function which, when invoked, will execute all callbacks\n * registered to a hook of the specified type, optionally returning the final\n * value of the call chain.\n *\n * @param {import('.').Hooks} hooks Hooks instance.\n * @param {import('.').StoreKey} storeKey\n * @param {boolean} [returnFirstArg=false] Whether each hook callback is expected to\n * return its first argument.\n *\n * @return {(hookName:string, ...args: unknown[]) => unknown} Function that runs hook callbacks.\n */\nfunction createRunHook(hooks, storeKey) {\n var returnFirstArg = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;\n return function runHooks(hookName) {\n var hooksStore = hooks[storeKey];\n\n if (!hooksStore[hookName]) {\n hooksStore[hookName] = {\n handlers: [],\n runs: 0\n };\n }\n\n hooksStore[hookName].runs++;\n var handlers = hooksStore[hookName].handlers; // The following code is stripped from production builds.\n\n if (true) {\n // Handle any 'all' hooks registered.\n if ('hookAdded' !== hookName && hooksStore.all) {\n handlers.push.apply(handlers, Object(_babel_runtime_helpers_esm_toConsumableArray__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(hooksStore.all.handlers));\n }\n }\n\n for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\n args[_key - 1] = arguments[_key];\n }\n\n if (!handlers || !handlers.length) {\n return returnFirstArg ? args[0] : undefined;\n }\n\n var hookInfo = {\n name: hookName,\n currentIndex: 0\n };\n\n hooksStore.__current.push(hookInfo);\n\n while (hookInfo.currentIndex < handlers.length) {\n var handler = handlers[hookInfo.currentIndex];\n var result = handler.callback.apply(null, args);\n\n if (returnFirstArg) {\n args[0] = result;\n }\n\n hookInfo.currentIndex++;\n }\n\n hooksStore.__current.pop();\n\n if (returnFirstArg) {\n return args[0];\n }\n };\n}\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (createRunHook);\n//# sourceMappingURL=createRunHook.js.map\n\n//# sourceURL=webpack:///./node_modules/.pnpm/@wordpress+hooks@2.12.3/node_modules/@wordpress/hooks/build-module/createRunHook.js?"); +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _babel_runtime_helpers_esm_toConsumableArray__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/toConsumableArray */ \"./node_modules/@babel/runtime/helpers/esm/toConsumableArray.js\");\n\n\n/**\n * Returns a function which, when invoked, will execute all callbacks\n * registered to a hook of the specified type, optionally returning the final\n * value of the call chain.\n *\n * @param {import('.').Hooks} hooks Hooks instance.\n * @param {import('.').StoreKey} storeKey\n * @param {boolean} [returnFirstArg=false] Whether each hook callback is expected to\n * return its first argument.\n *\n * @return {(hookName:string, ...args: unknown[]) => unknown} Function that runs hook callbacks.\n */\nfunction createRunHook(hooks, storeKey) {\n var returnFirstArg = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;\n return function runHooks(hookName) {\n var hooksStore = hooks[storeKey];\n\n if (!hooksStore[hookName]) {\n hooksStore[hookName] = {\n handlers: [],\n runs: 0\n };\n }\n\n hooksStore[hookName].runs++;\n var handlers = hooksStore[hookName].handlers; // The following code is stripped from production builds.\n\n if (true) {\n // Handle any 'all' hooks registered.\n if ('hookAdded' !== hookName && hooksStore.all) {\n handlers.push.apply(handlers, Object(_babel_runtime_helpers_esm_toConsumableArray__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(hooksStore.all.handlers));\n }\n }\n\n for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\n args[_key - 1] = arguments[_key];\n }\n\n if (!handlers || !handlers.length) {\n return returnFirstArg ? args[0] : undefined;\n }\n\n var hookInfo = {\n name: hookName,\n currentIndex: 0\n };\n\n hooksStore.__current.push(hookInfo);\n\n while (hookInfo.currentIndex < handlers.length) {\n var handler = handlers[hookInfo.currentIndex];\n var result = handler.callback.apply(null, args);\n\n if (returnFirstArg) {\n args[0] = result;\n }\n\n hookInfo.currentIndex++;\n }\n\n hooksStore.__current.pop();\n\n if (returnFirstArg) {\n return args[0];\n }\n };\n}\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (createRunHook);\n//# sourceMappingURL=createRunHook.js.map\n\n//# sourceURL=webpack:///./node_modules/@wordpress/hooks/build-module/createRunHook.js?"); /***/ }), -/***/ "./node_modules/.pnpm/@wordpress+hooks@2.12.3/node_modules/@wordpress/hooks/build-module/index.js": -/*!********************************************************************************************************!*\ - !*** ./node_modules/.pnpm/@wordpress+hooks@2.12.3/node_modules/@wordpress/hooks/build-module/index.js ***! - \********************************************************************************************************/ +/***/ "./node_modules/@wordpress/hooks/build-module/index.js": +/*!*************************************************************!*\ + !*** ./node_modules/@wordpress/hooks/build-module/index.js ***! + \*************************************************************/ /*! exports provided: defaultHooks, createHooks, addAction, addFilter, removeAction, removeFilter, hasAction, hasFilter, removeAllActions, removeAllFilters, doAction, applyFilters, currentAction, currentFilter, doingAction, doingFilter, didAction, didFilter, actions, filters */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"defaultHooks\", function() { return defaultHooks; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"addAction\", function() { return addAction; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"addFilter\", function() { return addFilter; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"removeAction\", function() { return removeAction; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"removeFilter\", function() { return removeFilter; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"hasAction\", function() { return hasAction; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"hasFilter\", function() { return hasFilter; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"removeAllActions\", function() { return removeAllActions; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"removeAllFilters\", function() { return removeAllFilters; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"doAction\", function() { return doAction; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"applyFilters\", function() { return applyFilters; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"currentAction\", function() { return currentAction; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"currentFilter\", function() { return currentFilter; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"doingAction\", function() { return doingAction; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"doingFilter\", function() { return doingFilter; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"didAction\", function() { return didAction; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"didFilter\", function() { return didFilter; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"actions\", function() { return actions; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"filters\", function() { return filters; });\n/* harmony import */ var _createHooks__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./createHooks */ \"./node_modules/.pnpm/@wordpress+hooks@2.12.3/node_modules/@wordpress/hooks/build-module/createHooks.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"createHooks\", function() { return _createHooks__WEBPACK_IMPORTED_MODULE_0__[\"default\"]; });\n\n/**\n * Internal dependencies\n */\n\n/** @typedef {(...args: any[])=>any} Callback */\n\n/**\n * @typedef Handler\n * @property {Callback} callback The callback\n * @property {string} namespace The namespace\n * @property {number} priority The namespace\n */\n\n/**\n * @typedef Hook\n * @property {Handler[]} handlers Array of handlers\n * @property {number} runs Run counter\n */\n\n/**\n * @typedef Current\n * @property {string} name Hook name\n * @property {number} currentIndex The index\n */\n\n/**\n * @typedef {Record & {__current: Current[]}} Store\n */\n\n/**\n * @typedef {'actions' | 'filters'} StoreKey\n */\n\n/**\n * @typedef {import('./createHooks').Hooks} Hooks\n */\n\nvar defaultHooks = Object(_createHooks__WEBPACK_IMPORTED_MODULE_0__[\"default\"])();\nvar addAction = defaultHooks.addAction,\n addFilter = defaultHooks.addFilter,\n removeAction = defaultHooks.removeAction,\n removeFilter = defaultHooks.removeFilter,\n hasAction = defaultHooks.hasAction,\n hasFilter = defaultHooks.hasFilter,\n removeAllActions = defaultHooks.removeAllActions,\n removeAllFilters = defaultHooks.removeAllFilters,\n doAction = defaultHooks.doAction,\n applyFilters = defaultHooks.applyFilters,\n currentAction = defaultHooks.currentAction,\n currentFilter = defaultHooks.currentFilter,\n doingAction = defaultHooks.doingAction,\n doingFilter = defaultHooks.doingFilter,\n didAction = defaultHooks.didAction,\n didFilter = defaultHooks.didFilter,\n actions = defaultHooks.actions,\n filters = defaultHooks.filters;\n\n//# sourceMappingURL=index.js.map\n\n//# sourceURL=webpack:///./node_modules/.pnpm/@wordpress+hooks@2.12.3/node_modules/@wordpress/hooks/build-module/index.js?"); +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"defaultHooks\", function() { return defaultHooks; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"addAction\", function() { return addAction; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"addFilter\", function() { return addFilter; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"removeAction\", function() { return removeAction; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"removeFilter\", function() { return removeFilter; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"hasAction\", function() { return hasAction; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"hasFilter\", function() { return hasFilter; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"removeAllActions\", function() { return removeAllActions; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"removeAllFilters\", function() { return removeAllFilters; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"doAction\", function() { return doAction; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"applyFilters\", function() { return applyFilters; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"currentAction\", function() { return currentAction; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"currentFilter\", function() { return currentFilter; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"doingAction\", function() { return doingAction; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"doingFilter\", function() { return doingFilter; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"didAction\", function() { return didAction; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"didFilter\", function() { return didFilter; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"actions\", function() { return actions; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"filters\", function() { return filters; });\n/* harmony import */ var _createHooks__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./createHooks */ \"./node_modules/@wordpress/hooks/build-module/createHooks.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"createHooks\", function() { return _createHooks__WEBPACK_IMPORTED_MODULE_0__[\"default\"]; });\n\n/**\n * Internal dependencies\n */\n\n/** @typedef {(...args: any[])=>any} Callback */\n\n/**\n * @typedef Handler\n * @property {Callback} callback The callback\n * @property {string} namespace The namespace\n * @property {number} priority The namespace\n */\n\n/**\n * @typedef Hook\n * @property {Handler[]} handlers Array of handlers\n * @property {number} runs Run counter\n */\n\n/**\n * @typedef Current\n * @property {string} name Hook name\n * @property {number} currentIndex The index\n */\n\n/**\n * @typedef {Record & {__current: Current[]}} Store\n */\n\n/**\n * @typedef {'actions' | 'filters'} StoreKey\n */\n\n/**\n * @typedef {import('./createHooks').Hooks} Hooks\n */\n\nvar defaultHooks = Object(_createHooks__WEBPACK_IMPORTED_MODULE_0__[\"default\"])();\nvar addAction = defaultHooks.addAction,\n addFilter = defaultHooks.addFilter,\n removeAction = defaultHooks.removeAction,\n removeFilter = defaultHooks.removeFilter,\n hasAction = defaultHooks.hasAction,\n hasFilter = defaultHooks.hasFilter,\n removeAllActions = defaultHooks.removeAllActions,\n removeAllFilters = defaultHooks.removeAllFilters,\n doAction = defaultHooks.doAction,\n applyFilters = defaultHooks.applyFilters,\n currentAction = defaultHooks.currentAction,\n currentFilter = defaultHooks.currentFilter,\n doingAction = defaultHooks.doingAction,\n doingFilter = defaultHooks.doingFilter,\n didAction = defaultHooks.didAction,\n didFilter = defaultHooks.didFilter,\n actions = defaultHooks.actions,\n filters = defaultHooks.filters;\n\n//# sourceMappingURL=index.js.map\n\n//# sourceURL=webpack:///./node_modules/@wordpress/hooks/build-module/index.js?"); /***/ }), -/***/ "./node_modules/.pnpm/@wordpress+hooks@2.12.3/node_modules/@wordpress/hooks/build-module/validateHookName.js": -/*!*******************************************************************************************************************!*\ - !*** ./node_modules/.pnpm/@wordpress+hooks@2.12.3/node_modules/@wordpress/hooks/build-module/validateHookName.js ***! - \*******************************************************************************************************************/ +/***/ "./node_modules/@wordpress/hooks/build-module/validateHookName.js": +/*!************************************************************************!*\ + !*** ./node_modules/@wordpress/hooks/build-module/validateHookName.js ***! + \************************************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("__webpack_require__.r(__webpack_exports__);\n/**\n * Validate a hookName string.\n *\n * @param {string} hookName The hook name to validate. Should be a non empty string containing\n * only numbers, letters, dashes, periods and underscores. Also,\n * the hook name cannot begin with `__`.\n *\n * @return {boolean} Whether the hook name is valid.\n */\nfunction validateHookName(hookName) {\n if ('string' !== typeof hookName || '' === hookName) {\n // eslint-disable-next-line no-console\n console.error('The hook name must be a non-empty string.');\n return false;\n }\n\n if (/^__/.test(hookName)) {\n // eslint-disable-next-line no-console\n console.error('The hook name cannot begin with `__`.');\n return false;\n }\n\n if (!/^[a-zA-Z][a-zA-Z0-9_.-]*$/.test(hookName)) {\n // eslint-disable-next-line no-console\n console.error('The hook name can only contain numbers, letters, dashes, periods and underscores.');\n return false;\n }\n\n return true;\n}\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (validateHookName);\n//# sourceMappingURL=validateHookName.js.map\n\n//# sourceURL=webpack:///./node_modules/.pnpm/@wordpress+hooks@2.12.3/node_modules/@wordpress/hooks/build-module/validateHookName.js?"); +eval("__webpack_require__.r(__webpack_exports__);\n/**\n * Validate a hookName string.\n *\n * @param {string} hookName The hook name to validate. Should be a non empty string containing\n * only numbers, letters, dashes, periods and underscores. Also,\n * the hook name cannot begin with `__`.\n *\n * @return {boolean} Whether the hook name is valid.\n */\nfunction validateHookName(hookName) {\n if ('string' !== typeof hookName || '' === hookName) {\n // eslint-disable-next-line no-console\n console.error('The hook name must be a non-empty string.');\n return false;\n }\n\n if (/^__/.test(hookName)) {\n // eslint-disable-next-line no-console\n console.error('The hook name cannot begin with `__`.');\n return false;\n }\n\n if (!/^[a-zA-Z][a-zA-Z0-9_.-]*$/.test(hookName)) {\n // eslint-disable-next-line no-console\n console.error('The hook name can only contain numbers, letters, dashes, periods and underscores.');\n return false;\n }\n\n return true;\n}\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (validateHookName);\n//# sourceMappingURL=validateHookName.js.map\n\n//# sourceURL=webpack:///./node_modules/@wordpress/hooks/build-module/validateHookName.js?"); /***/ }), -/***/ "./node_modules/.pnpm/@wordpress+hooks@2.12.3/node_modules/@wordpress/hooks/build-module/validateNamespace.js": -/*!********************************************************************************************************************!*\ - !*** ./node_modules/.pnpm/@wordpress+hooks@2.12.3/node_modules/@wordpress/hooks/build-module/validateNamespace.js ***! - \********************************************************************************************************************/ +/***/ "./node_modules/@wordpress/hooks/build-module/validateNamespace.js": +/*!*************************************************************************!*\ + !*** ./node_modules/@wordpress/hooks/build-module/validateNamespace.js ***! + \*************************************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("__webpack_require__.r(__webpack_exports__);\n/**\n * Validate a namespace string.\n *\n * @param {string} namespace The namespace to validate - should take the form\n * `vendor/plugin/function`.\n *\n * @return {boolean} Whether the namespace is valid.\n */\nfunction validateNamespace(namespace) {\n if ('string' !== typeof namespace || '' === namespace) {\n // eslint-disable-next-line no-console\n console.error('The namespace must be a non-empty string.');\n return false;\n }\n\n if (!/^[a-zA-Z][a-zA-Z0-9_.\\-\\/]*$/.test(namespace)) {\n // eslint-disable-next-line no-console\n console.error('The namespace can only contain numbers, letters, dashes, periods, underscores and slashes.');\n return false;\n }\n\n return true;\n}\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (validateNamespace);\n//# sourceMappingURL=validateNamespace.js.map\n\n//# sourceURL=webpack:///./node_modules/.pnpm/@wordpress+hooks@2.12.3/node_modules/@wordpress/hooks/build-module/validateNamespace.js?"); +eval("__webpack_require__.r(__webpack_exports__);\n/**\n * Validate a namespace string.\n *\n * @param {string} namespace The namespace to validate - should take the form\n * `vendor/plugin/function`.\n *\n * @return {boolean} Whether the namespace is valid.\n */\nfunction validateNamespace(namespace) {\n if ('string' !== typeof namespace || '' === namespace) {\n // eslint-disable-next-line no-console\n console.error('The namespace must be a non-empty string.');\n return false;\n }\n\n if (!/^[a-zA-Z][a-zA-Z0-9_.\\-\\/]*$/.test(namespace)) {\n // eslint-disable-next-line no-console\n console.error('The namespace can only contain numbers, letters, dashes, periods, underscores and slashes.');\n return false;\n }\n\n return true;\n}\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (validateNamespace);\n//# sourceMappingURL=validateNamespace.js.map\n\n//# sourceURL=webpack:///./node_modules/@wordpress/hooks/build-module/validateNamespace.js?"); /***/ }), @@ -310,7 +310,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/**\n * Validate a namespace /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _wordpress_hooks__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/hooks */ \"./node_modules/.pnpm/@wordpress+hooks@2.12.3/node_modules/@wordpress/hooks/build-module/index.js\");\nfunction _typeof(o) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && \"function\" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? \"symbol\" : typeof o; }, _typeof(o); }\nfunction ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }\nfunction _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }\nfunction _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\nfunction _toPropertyKey(t) { var i = _toPrimitive(t, \"string\"); return \"symbol\" == _typeof(i) ? i : String(i); }\nfunction _toPrimitive(t, r) { if (\"object\" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || \"default\"); if (\"object\" != _typeof(i)) return i; throw new TypeError(\"@@toPrimitive must return a primitive value.\"); } return (\"string\" === r ? String : Number)(t); }\n\nwindow.isEditMode = false;\nwindow.ea = {\n hooks: Object(_wordpress_hooks__WEBPACK_IMPORTED_MODULE_0__[\"createHooks\"])(),\n isEditMode: false,\n elementStatusCheck: function elementStatusCheck(name) {\n if (window.eaElementList && name in window.eaElementList) {\n return true;\n } else {\n window.eaElementList = _objectSpread(_objectSpread({}, window.eaElementList), {}, _defineProperty({}, name, true));\n }\n return false;\n }\n};\nea.hooks.addAction(\"widgets.reinit\", \"ea\", function ($content) {\n var filterGallery = jQuery(\".eael-filter-gallery-container\", $content);\n var postGridGallery = jQuery(\".eael-post-grid:not(.eael-post-carousel)\", $content);\n var twitterfeedGallery = jQuery(\".eael-twitter-feed-masonry\", $content);\n var instaGallery = jQuery(\".eael-instafeed\", $content);\n var paGallery = jQuery(\".premium-gallery-container\", $content);\n var eventCalendar = jQuery(\".eael-event-calendar-cls\", $content);\n var testimonialSlider = jQuery(\".eael-testimonial-slider\", $content);\n var teamMemberCarousel = jQuery(\".eael-tm-carousel\", $content);\n var postCarousel = jQuery(\".eael-post-carousel:not(.eael-post-grid)\", $content);\n var logoCarousel = jQuery(\".eael-logo-carousel\", $content);\n var twitterCarousel = jQuery(\".eael-twitter-feed-carousel\", $content);\n if (filterGallery.length) {\n filterGallery.isotope(\"layout\");\n }\n if (postGridGallery.length) {\n postGridGallery.isotope(\"layout\");\n }\n if (twitterfeedGallery.length) {\n twitterfeedGallery.isotope(\"layout\");\n }\n if (instaGallery.length) {\n instaGallery.isotope(\"layout\");\n }\n if (paGallery.length) {\n paGallery.isotope(\"layout\");\n }\n if (eventCalendar.length) {\n ea.hooks.doAction(\"eventCalendar.reinit\");\n }\n if (testimonialSlider.length) {\n ea.hooks.doAction(\"testimonialSlider.reinit\");\n }\n if (teamMemberCarousel.length) {\n ea.hooks.doAction(\"teamMemberCarousel.reinit\");\n }\n if (postCarousel.length) {\n ea.hooks.doAction(\"postCarousel.reinit\");\n }\n if (logoCarousel.length) {\n ea.hooks.doAction(\"logoCarousel.reinit\");\n }\n if (twitterCarousel.length) {\n ea.hooks.doAction(\"twitterCarousel.reinit\");\n }\n});\nvar ea_swiper_slider_init_inside_template = function ea_swiper_slider_init_inside_template(content) {\n window.dispatchEvent(new Event('resize'));\n content = _typeof(content) === 'object' ? content : jQuery(content);\n content.find('.swiper-wrapper').each(function () {\n var transform = jQuery(this).css('transform');\n jQuery(this).css('transform', transform);\n });\n};\nea.hooks.addAction(\"ea-advanced-tabs-triggered\", \"ea\", ea_swiper_slider_init_inside_template);\nea.hooks.addAction(\"ea-advanced-accordion-triggered\", \"ea\", ea_swiper_slider_init_inside_template);\njQuery(window).on(\"elementor/frontend/init\", function () {\n window.isEditMode = elementorFrontend.isEditMode();\n window.ea.isEditMode = elementorFrontend.isEditMode();\n\n // hooks\n ea.hooks.doAction(\"init\");\n\n // init edit mode hook\n if (ea.isEditMode) {\n ea.hooks.doAction(\"editMode.init\");\n }\n});\n(function ($) {\n ea.getToken = function () {\n if (localize.nonce && !ea.noncegenerated) {\n $.ajax({\n url: localize.ajaxurl,\n type: \"post\",\n data: {\n action: \"eael_get_token\"\n },\n success: function success(response) {\n if (response.success) {\n localize.nonce = response.data.nonce;\n ea.noncegenerated = true;\n }\n }\n });\n }\n };\n ea.sanitizeURL = function (url) {\n if (url.startsWith('/') || url.startsWith('#')) {\n return url;\n }\n try {\n var urlObject = new URL(url);\n\n // Check if the protocol is valid (allowing only 'http' and 'https')\n if (!['http:', 'https:', 'ftp:', 'ftps:', 'mailto:', 'news:', 'irc:', 'irc6:', 'ircs:', 'gopher:', 'nntp:', 'feed:', 'telnet:', 'mms:', 'rtsp:', 'sms:', 'svn:', 'tel:', 'fax:', 'xmpp:', 'webcal:', 'urn:'].includes(urlObject.protocol)) {\n throw new Error('Invalid protocol');\n }\n\n // If all checks pass, return the sanitized URL\n return urlObject.toString();\n } catch (error) {\n console.error('Error sanitizing URL:', error.message);\n return '#';\n }\n };\n\n //Add hashchange code form advanced-accordion\n var isTriggerOnHashchange = true;\n window.addEventListener('hashchange', function () {\n if (!isTriggerOnHashchange) {\n return;\n }\n var hashTag = window.location.hash.substr(1);\n hashTag = hashTag === 'safari' ? 'eael-safari' : hashTag;\n if (hashTag !== 'undefined' && hashTag) {\n jQuery('#' + hashTag).trigger('click');\n }\n });\n $('a').on('click', function (e) {\n var hashURL = $(this).attr('href'),\n isStartWithHash;\n hashURL = hashURL === undefined ? '' : hashURL;\n isStartWithHash = hashURL.startsWith('#');\n if (!isStartWithHash) {\n hashURL = hashURL.replace(localize.page_permalink, '');\n isStartWithHash = hashURL.startsWith('#');\n }\n if (isStartWithHash) {\n isTriggerOnHashchange = false;\n setTimeout(function () {\n isTriggerOnHashchange = true;\n }, 100);\n }\n\n // we will try and catch the error but not show anything just do it if possible\n try {\n if (isStartWithHash && ($(hashURL).hasClass('eael-tab-item-trigger') || $(hashURL).hasClass('eael-accordion-header'))) {\n $(hashURL).trigger('click');\n if (typeof hashURL !== 'undefined' && hashURL) {\n var tabs = $(hashURL).closest('.eael-advance-tabs');\n if (tabs.length > 0) {\n var idOffset = tab.data('custom-id-offset');\n idOffset = idOffset ? parseFloat(idOffset) : 0;\n $('html, body').animate({\n scrollTop: $(hashURL).offset().top - idOffset\n }, 300);\n }\n }\n }\n } catch (err) {\n // nothing to do\n }\n });\n $(document).on('click', '.e-n-tab-title', function () {\n window.dispatchEvent(new Event('resize'));\n });\n})(jQuery);\n(function ($) {\n $(document).on('click', '.theme-savoy .eael-product-popup .nm-qty-minus, .theme-savoy .eael-product-popup .nm-qty-plus', function (e) {\n // Get elements and values\n var $this = $(this),\n $qty = $this.closest('.quantity').find('.qty'),\n currentVal = parseFloat($qty.val()),\n max = parseFloat($qty.attr('max')),\n min = parseFloat($qty.attr('min')),\n step = $qty.attr('step');\n\n // Format values\n if (!currentVal || currentVal === '' || currentVal === 'NaN') currentVal = 0;\n if (max === '' || max === 'NaN') max = '';\n if (min === '' || min === 'NaN') min = 0;\n if (step === 'any' || step === '' || step === undefined || parseFloat(step) === 'NaN') step = 1;\n\n // Change the value\n if ($this.hasClass('nm-qty-plus')) {\n if (max && (max == currentVal || currentVal > max)) {\n $qty.val(max);\n } else {\n $qty.val(currentVal + parseFloat(step));\n }\n } else {\n if (min && (min == currentVal || currentVal < min)) {\n $qty.val(min);\n } else if (currentVal > 0) {\n $qty.val(currentVal - parseFloat(step));\n }\n }\n });\n})(jQuery);\n(function ($) {\n $.fn.isInViewport = function () {\n if ($(this).length < 1) return false;\n var elementTop = $(this).offset().top;\n var elementBottom = elementTop + $(this).outerHeight() / 2;\n var viewportTop = $(window).scrollTop();\n var viewportHalf = viewportTop + $(window).height() / 2;\n return elementBottom > viewportTop && elementTop < viewportHalf;\n };\n $(document).ready(function () {\n var resetPasswordParams = new URLSearchParams(location.search);\n if (resetPasswordParams.has('popup-selector') && (resetPasswordParams.has('eael-lostpassword') || resetPasswordParams.has('eael-resetpassword'))) {\n var popupSelector = resetPasswordParams.get('popup-selector');\n if (popupSelector.length) {\n popupSelector = popupSelector.replace(/_/g, \" \");\n setTimeout(function () {\n jQuery(popupSelector).trigger('click');\n }, 300);\n }\n }\n });\n})(jQuery);\n\n//# sourceURL=webpack:///./src/js/view/general.js?"); +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _wordpress_hooks__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/hooks */ \"./node_modules/@wordpress/hooks/build-module/index.js\");\nfunction _typeof(o) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && \"function\" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? \"symbol\" : typeof o; }, _typeof(o); }\nfunction ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }\nfunction _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }\nfunction _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\nfunction _toPropertyKey(t) { var i = _toPrimitive(t, \"string\"); return \"symbol\" == _typeof(i) ? i : i + \"\"; }\nfunction _toPrimitive(t, r) { if (\"object\" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || \"default\"); if (\"object\" != _typeof(i)) return i; throw new TypeError(\"@@toPrimitive must return a primitive value.\"); } return (\"string\" === r ? String : Number)(t); }\n\nwindow.isEditMode = false;\nwindow.ea = {\n hooks: Object(_wordpress_hooks__WEBPACK_IMPORTED_MODULE_0__[\"createHooks\"])(),\n isEditMode: false,\n elementStatusCheck: function elementStatusCheck(name) {\n if (window.eaElementList && name in window.eaElementList) {\n return true;\n } else {\n window.eaElementList = _objectSpread(_objectSpread({}, window.eaElementList), {}, _defineProperty({}, name, true));\n }\n return false;\n }\n};\nea.hooks.addAction(\"widgets.reinit\", \"ea\", function ($content) {\n var filterGallery = jQuery(\".eael-filter-gallery-container\", $content);\n var postGridGallery = jQuery(\".eael-post-grid:not(.eael-post-carousel)\", $content);\n var twitterfeedGallery = jQuery(\".eael-twitter-feed-masonry\", $content);\n var instaGallery = jQuery(\".eael-instafeed\", $content);\n var paGallery = jQuery(\".premium-gallery-container\", $content);\n var eventCalendar = jQuery(\".eael-event-calendar-cls\", $content);\n var testimonialSlider = jQuery(\".eael-testimonial-slider\", $content);\n var teamMemberCarousel = jQuery(\".eael-tm-carousel\", $content);\n var postCarousel = jQuery(\".eael-post-carousel:not(.eael-post-grid)\", $content);\n var logoCarousel = jQuery(\".eael-logo-carousel\", $content);\n var twitterCarousel = jQuery(\".eael-twitter-feed-carousel\", $content);\n if (filterGallery.length) {\n filterGallery.isotope(\"layout\");\n }\n if (postGridGallery.length) {\n postGridGallery.isotope(\"layout\");\n }\n if (twitterfeedGallery.length) {\n twitterfeedGallery.isotope(\"layout\");\n }\n if (instaGallery.length) {\n instaGallery.isotope(\"layout\");\n }\n if (paGallery.length) {\n paGallery.isotope(\"layout\");\n }\n if (eventCalendar.length) {\n ea.hooks.doAction(\"eventCalendar.reinit\");\n }\n if (testimonialSlider.length) {\n ea.hooks.doAction(\"testimonialSlider.reinit\");\n }\n if (teamMemberCarousel.length) {\n ea.hooks.doAction(\"teamMemberCarousel.reinit\");\n }\n if (postCarousel.length) {\n ea.hooks.doAction(\"postCarousel.reinit\");\n }\n if (logoCarousel.length) {\n ea.hooks.doAction(\"logoCarousel.reinit\");\n }\n if (twitterCarousel.length) {\n ea.hooks.doAction(\"twitterCarousel.reinit\");\n }\n});\nvar ea_swiper_slider_init_inside_template = function ea_swiper_slider_init_inside_template(content) {\n window.dispatchEvent(new Event('resize'));\n content = _typeof(content) === 'object' ? content : jQuery(content);\n content.find('.swiper-wrapper').each(function () {\n var transform = jQuery(this).css('transform');\n jQuery(this).css('transform', transform);\n });\n};\nea.hooks.addAction(\"ea-advanced-tabs-triggered\", \"ea\", ea_swiper_slider_init_inside_template);\nea.hooks.addAction(\"ea-advanced-accordion-triggered\", \"ea\", ea_swiper_slider_init_inside_template);\njQuery(window).on(\"elementor/frontend/init\", function () {\n window.isEditMode = elementorFrontend.isEditMode();\n window.ea.isEditMode = elementorFrontend.isEditMode();\n\n // hooks\n ea.hooks.doAction(\"init\");\n\n // init edit mode hook\n if (ea.isEditMode) {\n ea.hooks.doAction(\"editMode.init\");\n }\n});\n(function ($) {\n ea.getToken = function () {\n if (localize.nonce && !ea.noncegenerated) {\n $.ajax({\n url: localize.ajaxurl,\n type: \"post\",\n data: {\n action: \"eael_get_token\"\n },\n success: function success(response) {\n if (response.success) {\n localize.nonce = response.data.nonce;\n ea.noncegenerated = true;\n }\n }\n });\n }\n };\n ea.sanitizeURL = function (url) {\n if (url.startsWith('/') || url.startsWith('#')) {\n return url;\n }\n try {\n var urlObject = new URL(url);\n\n // Check if the protocol is valid (allowing only 'http' and 'https')\n if (!['http:', 'https:', 'ftp:', 'ftps:', 'mailto:', 'news:', 'irc:', 'irc6:', 'ircs:', 'gopher:', 'nntp:', 'feed:', 'telnet:', 'mms:', 'rtsp:', 'sms:', 'svn:', 'tel:', 'fax:', 'xmpp:', 'webcal:', 'urn:'].includes(urlObject.protocol)) {\n throw new Error('Invalid protocol');\n }\n\n // If all checks pass, return the sanitized URL\n return urlObject.toString();\n } catch (error) {\n console.error('Error sanitizing URL:', error.message);\n return '#';\n }\n };\n\n //Add hashchange code form advanced-accordion\n var isTriggerOnHashchange = true;\n window.addEventListener('hashchange', function () {\n if (!isTriggerOnHashchange) {\n return;\n }\n var hashTag = window.location.hash.substr(1);\n hashTag = hashTag === 'safari' ? 'eael-safari' : hashTag;\n if (hashTag !== 'undefined' && hashTag) {\n jQuery('#' + hashTag).trigger('click');\n }\n });\n $('a').on('click', function (e) {\n var hashURL = $(this).attr('href'),\n isStartWithHash;\n hashURL = hashURL === undefined ? '' : hashURL;\n isStartWithHash = hashURL.startsWith('#');\n if (!isStartWithHash) {\n hashURL = hashURL.replace(localize.page_permalink, '');\n isStartWithHash = hashURL.startsWith('#');\n }\n if (isStartWithHash) {\n isTriggerOnHashchange = false;\n setTimeout(function () {\n isTriggerOnHashchange = true;\n }, 100);\n }\n\n // we will try and catch the error but not show anything just do it if possible\n try {\n if (isStartWithHash && ($(hashURL).hasClass('eael-tab-item-trigger') || $(hashURL).hasClass('eael-accordion-header'))) {\n $(hashURL).trigger('click');\n if (typeof hashURL !== 'undefined' && hashURL) {\n var tabs = $(hashURL).closest('.eael-advance-tabs');\n if (tabs.length > 0) {\n var idOffset = tab.data('custom-id-offset');\n idOffset = idOffset ? parseFloat(idOffset) : 0;\n $('html, body').animate({\n scrollTop: $(hashURL).offset().top - idOffset\n }, 300);\n }\n }\n }\n } catch (err) {\n // nothing to do\n }\n });\n $(document).on('click', '.e-n-tab-title', function () {\n window.dispatchEvent(new Event('resize'));\n });\n})(jQuery);\n(function ($) {\n $(document).on('click', '.theme-savoy .eael-product-popup .nm-qty-minus, .theme-savoy .eael-product-popup .nm-qty-plus', function (e) {\n // Get elements and values\n var $this = $(this),\n $qty = $this.closest('.quantity').find('.qty'),\n currentVal = parseFloat($qty.val()),\n max = parseFloat($qty.attr('max')),\n min = parseFloat($qty.attr('min')),\n step = $qty.attr('step');\n\n // Format values\n if (!currentVal || currentVal === '' || currentVal === 'NaN') currentVal = 0;\n if (max === '' || max === 'NaN') max = '';\n if (min === '' || min === 'NaN') min = 0;\n if (step === 'any' || step === '' || step === undefined || parseFloat(step) === 'NaN') step = 1;\n\n // Change the value\n if ($this.hasClass('nm-qty-plus')) {\n if (max && (max == currentVal || currentVal > max)) {\n $qty.val(max);\n } else {\n $qty.val(currentVal + parseFloat(step));\n }\n } else {\n if (min && (min == currentVal || currentVal < min)) {\n $qty.val(min);\n } else if (currentVal > 0) {\n $qty.val(currentVal - parseFloat(step));\n }\n }\n });\n})(jQuery);\n(function ($) {\n $.fn.isInViewport = function () {\n if ($(this).length < 1) return false;\n var elementTop = $(this).offset().top;\n var elementBottom = elementTop + $(this).outerHeight() / 2;\n var viewportTop = $(window).scrollTop();\n var viewportHalf = viewportTop + $(window).height() / 2;\n return elementBottom > viewportTop && elementTop < viewportHalf;\n };\n $(document).ready(function () {\n var resetPasswordParams = new URLSearchParams(location.search);\n if (resetPasswordParams.has('popup-selector') && (resetPasswordParams.has('eael-lostpassword') || resetPasswordParams.has('eael-resetpassword'))) {\n var popupSelector = resetPasswordParams.get('popup-selector');\n if (popupSelector.length) {\n popupSelector = popupSelector.replace(/_/g, \" \");\n setTimeout(function () {\n jQuery(popupSelector).trigger('click');\n }, 300);\n }\n }\n });\n})(jQuery);\n\n//# sourceURL=webpack:///./src/js/view/general.js?"); /***/ }) diff --git a/assets/front-end/js/view/general.min.js b/assets/front-end/js/view/general.min.js index 188f6d88a..96dfd3410 100644 --- a/assets/front-end/js/view/general.min.js +++ b/assets/front-end/js/view/general.min.js @@ -1 +1 @@ -!function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=100)}({100:function(e,t,n){"use strict";n.r(t);var r=function(e){return"string"!=typeof e||""===e?(console.error("The namespace must be a non-empty string."),!1):!!/^[a-zA-Z][a-zA-Z0-9_.\-\/]*$/.test(e)||(console.error("The namespace can only contain numbers, letters, dashes, periods, underscores and slashes."),!1)};var o=function(e){return"string"!=typeof e||""===e?(console.error("The hook name must be a non-empty string."),!1):/^__/.test(e)?(console.error("The hook name cannot begin with `__`."),!1):!!/^[a-zA-Z][a-zA-Z0-9_.-]*$/.test(e)||(console.error("The hook name can only contain numbers, letters, dashes, periods and underscores."),!1)};var i=function(e,t){return function(n,i,a){var s=arguments.length>3&&void 0!==arguments[3]?arguments[3]:10,c=e[t];if(o(n)&&r(i))if("function"==typeof a)if("number"==typeof s){var l={callback:a,priority:s,namespace:i};if(c[n]){var u,d=c[n].handlers;for(u=d.length;u>0&&!(s>=d[u-1].priority);u--);u===d.length?d[u]=l:d.splice(u,0,l),c.__current.forEach((function(e){e.name===n&&e.currentIndex>=u&&e.currentIndex++}))}else c[n]={handlers:[l],runs:0};"hookAdded"!==n&&e.doAction("hookAdded",n,i,a,s)}else console.error("If specified, the hook priority must be a number.");else console.error("The hook callback must be a function.")}};var a=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return function(i,a){var s=e[t];if(o(i)&&(n||r(a))){if(!s[i])return 0;var c=0;if(n)c=s[i].handlers.length,s[i]={runs:s[i].runs,handlers:[]};else for(var l=s[i].handlers,u=function(e){l[e].namespace===a&&(l.splice(e,1),c++,s.__current.forEach((function(t){t.name===i&&t.currentIndex>=e&&t.currentIndex--})))},d=l.length-1;d>=0;d--)u(d);return"hookRemoved"!==i&&e.doAction("hookRemoved",i,a),c}}};var s=function(e,t){return function(n,r){var o=e[t];return void 0!==r?n in o&&o[n].handlers.some((function(e){return e.namespace===r})):n in o}};var c=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return function(r){var o=e[t];o[r]||(o[r]={handlers:[],runs:0}),o[r].runs++;var i=o[r].handlers;for(var a=arguments.length,s=new Array(a>1?a-1:0),c=1;c0){var i=tab.data("custom-id-offset");i=i?parseFloat(i):0,e("html, body").animate({scrollTop:e(o).offset().top-i},300)}}catch(e){}})),e(document).on("click",".e-n-tab-title",(function(){window.dispatchEvent(new Event("resize"))}))}(jQuery),(b=jQuery)(document).on("click",".theme-savoy .eael-product-popup .nm-qty-minus, .theme-savoy .eael-product-popup .nm-qty-plus",(function(e){var t=b(this),n=t.closest(".quantity").find(".qty"),r=parseFloat(n.val()),o=parseFloat(n.attr("max")),i=parseFloat(n.attr("min")),a=n.attr("step");r&&""!==r&&"NaN"!==r||(r=0),""!==o&&"NaN"!==o||(o=""),""!==i&&"NaN"!==i||(i=0),"any"!==a&&""!==a&&void 0!==a&&"NaN"!==parseFloat(a)||(a=1),t.hasClass("nm-qty-plus")?o&&(o==r||r>o)?n.val(o):n.val(r+parseFloat(a)):i&&(i==r||r0&&n.val(r-parseFloat(a))})),function(e){e.fn.isInViewport=function(){if(e(this).length<1)return!1;var t=e(this).offset().top,n=t+e(this).outerHeight()/2,r=e(window).scrollTop(),o=r+e(window).height()/2;return n>r&&t3&&void 0!==arguments[3]?arguments[3]:10,c=e[t];if(o(n)&&r(i))if("function"==typeof a)if("number"==typeof s){var l={callback:a,priority:s,namespace:i};if(c[n]){var u,d=c[n].handlers;for(u=d.length;u>0&&!(s>=d[u-1].priority);u--);u===d.length?d[u]=l:d.splice(u,0,l),c.__current.forEach((function(e){e.name===n&&e.currentIndex>=u&&e.currentIndex++}))}else c[n]={handlers:[l],runs:0};"hookAdded"!==n&&e.doAction("hookAdded",n,i,a,s)}else console.error("If specified, the hook priority must be a number.");else console.error("The hook callback must be a function.")}};var a=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return function(i,a){var s=e[t];if(o(i)&&(n||r(a))){if(!s[i])return 0;var c=0;if(n)c=s[i].handlers.length,s[i]={runs:s[i].runs,handlers:[]};else for(var l=s[i].handlers,u=function(e){l[e].namespace===a&&(l.splice(e,1),c++,s.__current.forEach((function(t){t.name===i&&t.currentIndex>=e&&t.currentIndex--})))},d=l.length-1;d>=0;d--)u(d);return"hookRemoved"!==i&&e.doAction("hookRemoved",i,a),c}}};var s=function(e,t){return function(n,r){var o=e[t];return void 0!==r?n in o&&o[n].handlers.some((function(e){return e.namespace===r})):n in o}};var c=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return function(r){var o=e[t];o[r]||(o[r]={handlers:[],runs:0}),o[r].runs++;var i=o[r].handlers;for(var a=arguments.length,s=new Array(a>1?a-1:0),c=1;c0){var i=tab.data("custom-id-offset");i=i?parseFloat(i):0,e("html, body").animate({scrollTop:e(o).offset().top-i},300)}}catch(e){}})),e(document).on("click",".e-n-tab-title",(function(){window.dispatchEvent(new Event("resize"))}))}(jQuery),(b=jQuery)(document).on("click",".theme-savoy .eael-product-popup .nm-qty-minus, .theme-savoy .eael-product-popup .nm-qty-plus",(function(e){var t=b(this),n=t.closest(".quantity").find(".qty"),r=parseFloat(n.val()),o=parseFloat(n.attr("max")),i=parseFloat(n.attr("min")),a=n.attr("step");r&&""!==r&&"NaN"!==r||(r=0),""!==o&&"NaN"!==o||(o=""),""!==i&&"NaN"!==i||(i=0),"any"!==a&&""!==a&&void 0!==a&&"NaN"!==parseFloat(a)||(a=1),t.hasClass("nm-qty-plus")?o&&(o==r||r>o)?n.val(o):n.val(r+parseFloat(a)):i&&(i==r||r0&&n.val(r-parseFloat(a))})),function(e){e.fn.isInViewport=function(){if(e(this).length<1)return!1;var t=e(this).offset().top,n=t+e(this).outerHeight()/2,r=e(window).scrollTop(),o=r+e(window).height()/2;return n>r&&t\\n \\t\\t\\t
\\n \\t\\t\\t
\\n \\t\\t\\t\\t \";\n if (!jq('body > .eael-woocommerce-popup-view').length) {\n jq('body').prepend(popupMarkup);\n }\n },\n openPopup: function openPopup($scope, $) {\n // Quick view\n $scope.on(\"click\", \".open-popup-link\", function (e) {\n e.preventDefault();\n e.stopPropagation();\n var $this = $(this);\n var quickview_setting = $this.data('quickview-setting');\n var popup_view = $(\".eael-woocommerce-popup-view\");\n popup_view.find(\".eael-popup-details-render\").html('
');\n popup_view.addClass(\"eael-product-popup-ready\").removeClass(\"eael-product-modal-removing\");\n popup_view.show();\n $.ajax({\n url: localize.ajaxurl,\n type: \"post\",\n data: _objectSpread(_objectSpread({\n action: \"eael_product_quickview_popup\"\n }, quickview_setting), {}, {\n security: localize.nonce\n }),\n success: function success(response) {\n if (response.success) {\n var product_preview = $(response.data);\n var popup_details = product_preview.children(\".eael-product-popup-details\");\n popup_details.find(\".variations_form\").wc_variation_form();\n var popup_view_render = popup_view.find(\".eael-popup-details-render\");\n popup_view.find(\".eael-popup-details-render\").html(popup_details);\n var product_gallery = popup_view.find(\".woocommerce-product-gallery\");\n popup_view_render.addClass(\"elementor-\" + quickview_setting.page_id);\n popup_view_render.children().addClass(\"elementor-element elementor-element-\" + quickview_setting.widget_id);\n if (popup_details.height() > 400) {\n popup_details.css(\"height\", \"75vh\");\n } else {\n popup_details.css(\"height\", \"auto\");\n }\n setTimeout(function () {\n var setHeight = product_gallery.find('.woocommerce-product-gallery__image').height();\n $('body').prepend('');\n product_gallery.wc_product_gallery();\n product_gallery.closest('.eael-product-image-wrap').css('background', 'none');\n }, 500);\n setTimeout(function () {\n $('.eael-quick-view-dynamic-css').remove();\n }, 1500);\n }\n }\n });\n });\n },\n closePopup: function closePopup($scope, jq) {\n jq(document).on(\"click\", \".eael-product-popup-close\", function (event) {\n event.stopPropagation();\n QuickView.remove_product_popup(jq);\n });\n jq(document).on(\"click\", function (event) {\n if (event.target.closest(\".eael-product-popup-details\")) return;\n QuickView.remove_product_popup(jq);\n });\n },\n singlePageAddToCartButton: function singlePageAddToCartButton($scope, $) {\n $(document).on(\"click\", \".eael-woo-slider-popup .single_add_to_cart_button:not(.wc-variation-selection-needed)\", function (e) {\n e.preventDefault();\n e.stopImmediatePropagation();\n var $this = $(this),\n product_id = $(this).val(),\n variation_id = $this.closest(\"form.cart\").find('input[name=\"variation_id\"]').val() || \"\",\n quantity = $this.closest(\"form.cart\").find('input[name=\"quantity\"]').val(),\n items = $this.closest(\"form.cart.grouped_form\"),\n form = $this.closest(\"form.cart\"),\n product_data = [];\n items = items.serializeArray();\n if (form.hasClass(\"variations_form\")) {\n product_id = form.find('input[name=\"product_id\"]').val();\n }\n if (items.length > 0) {\n items.forEach(function (item, index) {\n var p_id = parseInt(item.name.replace(/[^\\d.]/g, \"\"), 10);\n if (item.name.indexOf(\"quantity[\") >= 0 && item.value != \"\" && p_id > 0) {\n product_data[product_data.length] = {\n product_id: p_id,\n quantity: item.value,\n variation_id: 0\n };\n }\n });\n } else {\n product_data[0] = {\n product_id: product_id,\n quantity: quantity,\n variation_id: variation_id\n };\n }\n $this.removeClass(\"eael-addtocart-added\");\n $this.addClass(\"eael-addtocart-loading\");\n $.ajax({\n url: localize.ajaxurl,\n type: \"post\",\n data: {\n action: \"eael_product_add_to_cart\",\n product_data: product_data,\n eael_add_to_cart_nonce: localize.nonce,\n cart_item_data: form.serializeArray()\n },\n success: function success(response) {\n if (response.success) {\n $(document.body).trigger(\"wc_fragment_refresh\");\n $this.removeClass(\"eael-addtocart-loading\");\n $this.addClass(\"eael-addtocart-added\");\n if (localize.cart_redirectition == 'yes') {\n window.location.href = localize.cart_page_url;\n }\n }\n }\n });\n });\n },\n preventStringInNumberField: function preventStringInNumberField($scope, $) {\n $(document).on(\"keypress\", \".eael-product-details-wrap input[type=number]\", function (e) {\n var keyValue = e.keyCode || e.which;\n var regex = /^[0-9]+$/;\n var isValid = regex.test(String.fromCharCode(keyValue));\n if (!isValid) {\n return false;\n }\n return isValid;\n });\n },\n remove_product_popup: function remove_product_popup(jq) {\n var selector = jq(\".eael-product-popup.eael-product-zoom-in.eael-product-popup-ready\");\n selector.addClass(\"eael-product-modal-removing\").removeClass(\"eael-product-popup-ready\");\n selector.find('.eael-popup-details-render').html('');\n }\n};\nif (!ea.elementStatusCheck('eaelQuickView')) {\n ea.hooks.addAction('quickViewAddMarkup', 'ea', QuickView.quickViewAddMarkup, 10);\n ea.hooks.addAction('quickViewPopupViewInit', 'ea', QuickView.openPopup, 10);\n ea.hooks.addAction('quickViewPopupViewInit', 'ea', QuickView.closePopup, 10);\n ea.hooks.addAction('quickViewPopupViewInit', 'ea', QuickView.singlePageAddToCartButton, 10);\n ea.hooks.addAction('quickViewPopupViewInit', 'ea', QuickView.preventStringInNumberField, 10);\n}\n\n//# sourceURL=webpack:///./src/js/view/quick-view.js?"); +eval("function _typeof(o) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && \"function\" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? \"symbol\" : typeof o; }, _typeof(o); }\nfunction ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }\nfunction _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }\nfunction _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\nfunction _toPropertyKey(t) { var i = _toPrimitive(t, \"string\"); return \"symbol\" == _typeof(i) ? i : i + \"\"; }\nfunction _toPrimitive(t, r) { if (\"object\" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || \"default\"); if (\"object\" != _typeof(i)) return i; throw new TypeError(\"@@toPrimitive must return a primitive value.\"); } return (\"string\" === r ? String : Number)(t); }\nvar QuickView = {\n quickViewAddMarkup: function quickViewAddMarkup($scope, jq) {\n var popupMarkup = \"
\\n \\t\\t\\t
\\n \\t\\t\\t
\\n \\t\\t\\t\\t
\";\n if (!jq('body > .eael-woocommerce-popup-view').length) {\n jq('body').prepend(popupMarkup);\n }\n },\n openPopup: function openPopup($scope, $) {\n // Quick view\n $scope.on(\"click\", \".open-popup-link\", function (e) {\n e.preventDefault();\n e.stopPropagation();\n var $this = $(this);\n var quickview_setting = $this.data('quickview-setting');\n var popup_view = $(\".eael-woocommerce-popup-view\");\n popup_view.find(\".eael-popup-details-render\").html('
');\n popup_view.addClass(\"eael-product-popup-ready\").removeClass(\"eael-product-modal-removing\");\n popup_view.show();\n $.ajax({\n url: localize.ajaxurl,\n type: \"post\",\n data: _objectSpread(_objectSpread({\n action: \"eael_product_quickview_popup\"\n }, quickview_setting), {}, {\n security: localize.nonce\n }),\n success: function success(response) {\n if (response.success) {\n var product_preview = $(response.data);\n var popup_details = product_preview.children(\".eael-product-popup-details\");\n popup_details.find(\".variations_form\").wc_variation_form();\n var popup_view_render = popup_view.find(\".eael-popup-details-render\");\n popup_view.find(\".eael-popup-details-render\").html(popup_details);\n var product_gallery = popup_view.find(\".woocommerce-product-gallery\");\n popup_view_render.addClass(\"elementor-\" + quickview_setting.page_id);\n popup_view_render.children().addClass(\"elementor-element elementor-element-\" + quickview_setting.widget_id);\n if (popup_details.height() > 400) {\n popup_details.css(\"height\", \"75vh\");\n } else {\n popup_details.css(\"height\", \"auto\");\n }\n setTimeout(function () {\n var setHeight = product_gallery.find('.woocommerce-product-gallery__image').height();\n $('body').prepend('');\n product_gallery.wc_product_gallery();\n product_gallery.closest('.eael-product-image-wrap').css('background', 'none');\n }, 500);\n setTimeout(function () {\n $('.eael-quick-view-dynamic-css').remove();\n }, 1500);\n }\n }\n });\n });\n },\n closePopup: function closePopup($scope, jq) {\n jq(document).on(\"click\", \".eael-product-popup-close\", function (event) {\n event.stopPropagation();\n QuickView.remove_product_popup(jq);\n });\n jq(document).on(\"click\", function (event) {\n if (event.target.closest(\".eael-product-popup-details\")) return;\n QuickView.remove_product_popup(jq);\n });\n },\n singlePageAddToCartButton: function singlePageAddToCartButton($scope, $) {\n $(document).on(\"click\", \".eael-woo-slider-popup .single_add_to_cart_button:not(.wc-variation-selection-needed)\", function (e) {\n e.preventDefault();\n e.stopImmediatePropagation();\n var $this = $(this),\n product_id = $(this).val(),\n variation_id = $this.closest(\"form.cart\").find('input[name=\"variation_id\"]').val() || \"\",\n quantity = $this.closest(\"form.cart\").find('input[name=\"quantity\"]').val(),\n items = $this.closest(\"form.cart.grouped_form\"),\n form = $this.closest(\"form.cart\"),\n product_data = [];\n items = items.serializeArray();\n if (form.hasClass(\"variations_form\")) {\n product_id = form.find('input[name=\"product_id\"]').val();\n }\n if (items.length > 0) {\n items.forEach(function (item, index) {\n var p_id = parseInt(item.name.replace(/[^\\d.]/g, \"\"), 10);\n if (item.name.indexOf(\"quantity[\") >= 0 && item.value != \"\" && p_id > 0) {\n product_data[product_data.length] = {\n product_id: p_id,\n quantity: item.value,\n variation_id: 0\n };\n }\n });\n } else {\n product_data[0] = {\n product_id: product_id,\n quantity: quantity,\n variation_id: variation_id\n };\n }\n $this.removeClass(\"eael-addtocart-added\");\n $this.addClass(\"eael-addtocart-loading\");\n $.ajax({\n url: localize.ajaxurl,\n type: \"post\",\n data: {\n action: \"eael_product_add_to_cart\",\n product_data: product_data,\n eael_add_to_cart_nonce: localize.nonce,\n cart_item_data: form.serializeArray()\n },\n success: function success(response) {\n if (response.success) {\n $(document.body).trigger(\"wc_fragment_refresh\");\n $this.removeClass(\"eael-addtocart-loading\");\n $this.addClass(\"eael-addtocart-added\");\n if (localize.cart_redirectition == 'yes') {\n window.location.href = localize.cart_page_url;\n }\n }\n }\n });\n });\n },\n preventStringInNumberField: function preventStringInNumberField($scope, $) {\n $(document).on(\"keypress\", \".eael-product-details-wrap input[type=number]\", function (e) {\n var keyValue = e.keyCode || e.which;\n var regex = /^[0-9]+$/;\n var isValid = regex.test(String.fromCharCode(keyValue));\n if (!isValid) {\n return false;\n }\n return isValid;\n });\n },\n remove_product_popup: function remove_product_popup(jq) {\n var selector = jq(\".eael-product-popup.eael-product-zoom-in.eael-product-popup-ready\");\n selector.addClass(\"eael-product-modal-removing\").removeClass(\"eael-product-popup-ready\");\n selector.find('.eael-popup-details-render').html('');\n }\n};\nif (!ea.elementStatusCheck('eaelQuickView')) {\n ea.hooks.addAction('quickViewAddMarkup', 'ea', QuickView.quickViewAddMarkup, 10);\n ea.hooks.addAction('quickViewPopupViewInit', 'ea', QuickView.openPopup, 10);\n ea.hooks.addAction('quickViewPopupViewInit', 'ea', QuickView.closePopup, 10);\n ea.hooks.addAction('quickViewPopupViewInit', 'ea', QuickView.singlePageAddToCartButton, 10);\n ea.hooks.addAction('quickViewPopupViewInit', 'ea', QuickView.preventStringInNumberField, 10);\n}\n\n//# sourceURL=webpack:///./src/js/view/quick-view.js?"); /***/ }) diff --git a/assets/front-end/js/view/quick-view.min.js b/assets/front-end/js/view/quick-view.min.js index 812fb8c0a..1149474f7 100644 --- a/assets/front-end/js/view/quick-view.min.js +++ b/assets/front-end/js/view/quick-view.min.js @@ -1 +1 @@ -!function(e){var t={};function o(r){if(t[r])return t[r].exports;var a=t[r]={i:r,l:!1,exports:{}};return e[r].call(a.exports,a,a.exports,o),a.l=!0,a.exports}o.m=e,o.c=t,o.d=function(e,t,r){o.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},o.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},o.t=function(e,t){if(1&t&&(e=o(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(o.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var a in e)o.d(r,a,function(t){return e[t]}.bind(null,a));return r},o.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return o.d(t,"a",t),t},o.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},o.p="",o(o.s=22)}({22:function(e,t){function o(e){return(o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function r(e,t){var o=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),o.push.apply(o,r)}return o}function a(e){for(var t=1;t .eael-woocommerce-popup-view").length||t("body").prepend('')},openPopup:function(e,t){e.on("click",".open-popup-link",(function(e){e.preventDefault(),e.stopPropagation();var o=t(this).data("quickview-setting"),r=t(".eael-woocommerce-popup-view");r.find(".eael-popup-details-render").html('
'),r.addClass("eael-product-popup-ready").removeClass("eael-product-modal-removing"),r.show(),t.ajax({url:localize.ajaxurl,type:"post",data:a(a({action:"eael_product_quickview_popup"},o),{},{security:localize.nonce}),success:function(e){if(e.success){var a=t(e.data).children(".eael-product-popup-details");a.find(".variations_form").wc_variation_form();var n=r.find(".eael-popup-details-render");r.find(".eael-popup-details-render").html(a);var i=r.find(".woocommerce-product-gallery");n.addClass("elementor-"+o.page_id),n.children().addClass("elementor-element elementor-element-"+o.widget_id),a.height()>400?a.css("height","75vh"):a.css("height","auto"),setTimeout((function(){var e=i.find(".woocommerce-product-gallery__image").height();t("body").prepend('"),i.wc_product_gallery(),i.closest(".eael-product-image-wrap").css("background","none")}),500),setTimeout((function(){t(".eael-quick-view-dynamic-css").remove()}),1500)}}})}))},closePopup:function(e,t){t(document).on("click",".eael-product-popup-close",(function(e){e.stopPropagation(),i.remove_product_popup(t)})),t(document).on("click",(function(e){e.target.closest(".eael-product-popup-details")||i.remove_product_popup(t)}))},singlePageAddToCartButton:function(e,t){t(document).on("click",".eael-woo-slider-popup .single_add_to_cart_button:not(.wc-variation-selection-needed)",(function(e){e.preventDefault(),e.stopImmediatePropagation();var o=t(this),r=t(this).val(),a=o.closest("form.cart").find('input[name="variation_id"]').val()||"",n=o.closest("form.cart").find('input[name="quantity"]').val(),i=o.closest("form.cart.grouped_form"),c=o.closest("form.cart"),u=[];i=i.serializeArray(),c.hasClass("variations_form")&&(r=c.find('input[name="product_id"]').val()),i.length>0?i.forEach((function(e,t){var o=parseInt(e.name.replace(/[^\d.]/g,""),10);e.name.indexOf("quantity[")>=0&&""!=e.value&&o>0&&(u[u.length]={product_id:o,quantity:e.value,variation_id:0})})):u[0]={product_id:r,quantity:n,variation_id:a},o.removeClass("eael-addtocart-added"),o.addClass("eael-addtocart-loading"),t.ajax({url:localize.ajaxurl,type:"post",data:{action:"eael_product_add_to_cart",product_data:u,eael_add_to_cart_nonce:localize.nonce,cart_item_data:c.serializeArray()},success:function(e){e.success&&(t(document.body).trigger("wc_fragment_refresh"),o.removeClass("eael-addtocart-loading"),o.addClass("eael-addtocart-added"),"yes"==localize.cart_redirectition&&(window.location.href=localize.cart_page_url))}})}))},preventStringInNumberField:function(e,t){t(document).on("keypress",".eael-product-details-wrap input[type=number]",(function(e){var t=e.keyCode||e.which,o=/^[0-9]+$/.test(String.fromCharCode(t));return o||!1}))},remove_product_popup:function(e){var t=e(".eael-product-popup.eael-product-zoom-in.eael-product-popup-ready");t.addClass("eael-product-modal-removing").removeClass("eael-product-popup-ready"),t.find(".eael-popup-details-render").html("")}};ea.elementStatusCheck("eaelQuickView")||(ea.hooks.addAction("quickViewAddMarkup","ea",i.quickViewAddMarkup,10),ea.hooks.addAction("quickViewPopupViewInit","ea",i.openPopup,10),ea.hooks.addAction("quickViewPopupViewInit","ea",i.closePopup,10),ea.hooks.addAction("quickViewPopupViewInit","ea",i.singlePageAddToCartButton,10),ea.hooks.addAction("quickViewPopupViewInit","ea",i.preventStringInNumberField,10))}}); \ No newline at end of file +!function(e){var t={};function o(r){if(t[r])return t[r].exports;var a=t[r]={i:r,l:!1,exports:{}};return e[r].call(a.exports,a,a.exports,o),a.l=!0,a.exports}o.m=e,o.c=t,o.d=function(e,t,r){o.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},o.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},o.t=function(e,t){if(1&t&&(e=o(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(o.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var a in e)o.d(r,a,function(t){return e[t]}.bind(null,a));return r},o.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return o.d(t,"a",t),t},o.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},o.p="",o(o.s=22)}({22:function(e,t){function o(e){return(o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function r(e,t){var o=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),o.push.apply(o,r)}return o}function a(e){for(var t=1;t .eael-woocommerce-popup-view").length||t("body").prepend('')},openPopup:function(e,t){e.on("click",".open-popup-link",(function(e){e.preventDefault(),e.stopPropagation();var o=t(this).data("quickview-setting"),r=t(".eael-woocommerce-popup-view");r.find(".eael-popup-details-render").html('
'),r.addClass("eael-product-popup-ready").removeClass("eael-product-modal-removing"),r.show(),t.ajax({url:localize.ajaxurl,type:"post",data:a(a({action:"eael_product_quickview_popup"},o),{},{security:localize.nonce}),success:function(e){if(e.success){var a=t(e.data).children(".eael-product-popup-details");a.find(".variations_form").wc_variation_form();var n=r.find(".eael-popup-details-render");r.find(".eael-popup-details-render").html(a);var i=r.find(".woocommerce-product-gallery");n.addClass("elementor-"+o.page_id),n.children().addClass("elementor-element elementor-element-"+o.widget_id),a.height()>400?a.css("height","75vh"):a.css("height","auto"),setTimeout((function(){var e=i.find(".woocommerce-product-gallery__image").height();t("body").prepend('"),i.wc_product_gallery(),i.closest(".eael-product-image-wrap").css("background","none")}),500),setTimeout((function(){t(".eael-quick-view-dynamic-css").remove()}),1500)}}})}))},closePopup:function(e,t){t(document).on("click",".eael-product-popup-close",(function(e){e.stopPropagation(),i.remove_product_popup(t)})),t(document).on("click",(function(e){e.target.closest(".eael-product-popup-details")||i.remove_product_popup(t)}))},singlePageAddToCartButton:function(e,t){t(document).on("click",".eael-woo-slider-popup .single_add_to_cart_button:not(.wc-variation-selection-needed)",(function(e){e.preventDefault(),e.stopImmediatePropagation();var o=t(this),r=t(this).val(),a=o.closest("form.cart").find('input[name="variation_id"]').val()||"",n=o.closest("form.cart").find('input[name="quantity"]').val(),i=o.closest("form.cart.grouped_form"),c=o.closest("form.cart"),u=[];i=i.serializeArray(),c.hasClass("variations_form")&&(r=c.find('input[name="product_id"]').val()),i.length>0?i.forEach((function(e,t){var o=parseInt(e.name.replace(/[^\d.]/g,""),10);e.name.indexOf("quantity[")>=0&&""!=e.value&&o>0&&(u[u.length]={product_id:o,quantity:e.value,variation_id:0})})):u[0]={product_id:r,quantity:n,variation_id:a},o.removeClass("eael-addtocart-added"),o.addClass("eael-addtocart-loading"),t.ajax({url:localize.ajaxurl,type:"post",data:{action:"eael_product_add_to_cart",product_data:u,eael_add_to_cart_nonce:localize.nonce,cart_item_data:c.serializeArray()},success:function(e){e.success&&(t(document.body).trigger("wc_fragment_refresh"),o.removeClass("eael-addtocart-loading"),o.addClass("eael-addtocart-added"),"yes"==localize.cart_redirectition&&(window.location.href=localize.cart_page_url))}})}))},preventStringInNumberField:function(e,t){t(document).on("keypress",".eael-product-details-wrap input[type=number]",(function(e){var t=e.keyCode||e.which,o=/^[0-9]+$/.test(String.fromCharCode(t));return o||!1}))},remove_product_popup:function(e){var t=e(".eael-product-popup.eael-product-zoom-in.eael-product-popup-ready");t.addClass("eael-product-modal-removing").removeClass("eael-product-popup-ready"),t.find(".eael-popup-details-render").html("")}};ea.elementStatusCheck("eaelQuickView")||(ea.hooks.addAction("quickViewAddMarkup","ea",i.quickViewAddMarkup,10),ea.hooks.addAction("quickViewPopupViewInit","ea",i.openPopup,10),ea.hooks.addAction("quickViewPopupViewInit","ea",i.closePopup,10),ea.hooks.addAction("quickViewPopupViewInit","ea",i.singlePageAddToCartButton,10),ea.hooks.addAction("quickViewPopupViewInit","ea",i.preventStringInNumberField,10))}}); \ No newline at end of file