From 741540b767cd16192708fe158917dfc2dd08ea32 Mon Sep 17 00:00:00 2001 From: proelements Date: Mon, 4 May 2026 15:07:06 +0300 Subject: [PATCH] v4.0.4.1 --- ...ndle.js => 38a015cfd4402fcba18c.bundle.js} | 292 +- ...ination.505018eb312c83998279.bundle.min.js | 2 + ...pagination.dfa3a82618d618a6a6bf.bundle.js} | 10 +- ...d-headline.248bbeadaf74dd446e7d.bundle.js} | 10 +- ...eadline.bc08854fb1e1a80434b2.bundle.min.js | 2 + ...e-posts.0b71f7023819e3872142.bundle.min.js | 2 + ...hive-posts.d82fc1f6376a91acb912.bundle.js} | 40 +- ...ndle.js => b07282a36331e8a0c35e.bundle.js} | 10 +- assets/js/b24baa04ab276a4dc8a2.bundle.min.js | 2 + assets/js/bd4b7d0b3467c3b749da.bundle.min.js | 3 + ...7d0b3467c3b749da.bundle.min.js.LICENSE.txt | 1 + ...arousel.e2af910b095554625156.bundle.min.js | 2 + ...> carousel.f93681c60a8355c99044.bundle.js} | 16 +- ...ghlight.38ec4828db8d33cccbe9.bundle.min.js | 2 + ...-highlight.872070dcb83100cdc6a7.bundle.js} | 10 +- ...-var-10.11bf4233106e1245bd61.bundle.min.js | 2 + ...ons-var-10.6caef1cb29200dd63f5a.bundle.js} | 420 +- ...ct-buttons.0f9a28de84eecdb341e1.bundle.js} | 416 +- ...buttons.e1605c5cfaccbff3c14b.bundle.min.js | 2 + ...untdown.05b148ca20af32fc8e9f.bundle.min.js | 2 + ... countdown.7bd51efbed8eaac97b16.bundle.js} | 10 +- ...ndle.js => e8fec410b4ec8b8ad5e5.bundle.js} | 113 +- ...s-var-2.5287acd8570f1ce2dde3.bundle.min.js | 2 + ...bars-var-2.a7a076850ecbe78bb8c7.bundle.js} | 10 +- ...bars-var-3.c5d9c759b0475977fd76.bundle.js} | 16 +- ...s-var-3.e9e9c0ea3c6fb0e51c58.bundle.min.js | 2 + ...js => form.333cc493ca6159f7ee0e.bundle.js} | 46 +- .../form.cfd61a9174be80f835c6.bundle.min.js | 2 + ...=> gallery.1f2d6260aa05f94aca68.bundle.js} | 10 +- ...gallery.cca2358f59857ce6f62f.bundle.min.js | 2 + ...=> hotspot.1555f80c1d14215e6b69.bundle.js} | 10 +- ...hotspot.737497535441dc0bc037.bundle.min.js | 2 + ...szip.vendor.4627e880b5d487f49e7a.bundle.js | 28 + ....vendor.ee0ba61191fa34e6bbe2.bundle.min.js | 3 + ...61191fa34e6bbe2.bundle.min.js.LICENSE.txt} | 0 ...ad-more.7c4417f8a727b79f546f.bundle.min.js | 2 + ... load-more.862f17c31e360ff1934e.bundle.js} | 16 +- ...p-carousel.5eddbaa4e0c79c44c5c1.bundle.js} | 10 +- ...arousel.881847b13e8fe1f8bfc2.bundle.min.js | 2 + ...-editor.66aa1bfab17d9f314834.bundle.min.js | 2 + ...ter-editor.e5be4d8fdcb9e22b57f7.bundle.js} | 17 +- .../loop.1594a1df76e87a11eda2.bundle.min.js | 2 + ...js => loop.8f668e18a5d491cc01b7.bundle.js} | 25 +- ... => lottie.4cf7a751c39c2d5e59f3.bundle.js} | 10 +- .../lottie.55ad84218daed1323133.bundle.min.js | 2 + ...a-carousel.1eb08e97c13152575144.bundle.js} | 16 +- ...arousel.87c2cf115553a2c4f709.bundle.min.js | 2 + ...-editor.2c998fb188047136dde3.bundle.min.js | 2 + ...enu-editor.7a18763e360ce7e0eacc.bundle.js} | 38 +- ...ch-content.65ac3ff61cbda73d513e.bundle.js} | 10 +- ...content.7ed04741ba7d5a80c556.bundle.min.js | 2 + ...ga-menu.857df1cf3198ae47b617.bundle.min.js | 2 + ... mega-menu.9c175c27b10a1a51ffad.bundle.js} | 28 +- ...rd-handler.000fb4658b703c6ebe56.bundle.js} | 10 +- ...handler.b3891112675eb0b0c4d5.bundle.min.js | 2 + ...> nav-menu.393f7e8d1eb984d695bc.bundle.js} | 16 +- ...av-menu.3afa8f5eb1fef7c22561.bundle.min.js | 2 + ...-editor.30f07a4ca0162c2af3fb.bundle.min.js | 2 + ...sel-editor.d0c65ae2ec3f418e3b3f.bundle.js} | 16 +- ...arousel.659b0373371215e60dab.bundle.min.js | 2 + ...d-carousel.925fbc1c35869d1767d5.bundle.js} | 10 +- assets/js/notes/599.min.js | 2 + ....js.LICENSE.txt => 599.min.js.LICENSE.txt} | 4 +- ...vas-editor.9a4eb354fc664c85a496.bundle.js} | 22 +- ...-editor.ff99e117444b8e4b9d09.bundle.min.js | 2 + ...-canvas.82d118980fb5aa03c82b.bundle.min.js | 2 + ...off-canvas.c6c9ad84eff54adcd9f3.bundle.js} | 10 +- .../editor-components-extended.asset.php | 37 + .../editor-components-extended.js | 7045 +++++++++++++++++ .../editor-components-extended.min.js | 67 + .../editor-components-extended.strings.js | 122 + .../license-api/license-api.asset.php | 14 + assets/js/packages/license-api/license-api.js | 228 + .../packages/license-api/license-api.min.js | 1 + .../license-api/license-api.strings.js | 0 ...pal-button.557bf338d556d8411f0e.bundle.js} | 10 +- ...-button.5c63e4c8f36fb06aff31.bundle.min.js | 2 + ...s => popup.467433314d83de8c86ec.bundle.js} | 10 +- .../popup.61d4fcab8891b2e07802.bundle.min.js | 2 + ...rtfolio.3d0e387cc28c07bae511.bundle.min.js | 2 + ... portfolio.d389311c484631ccbb99.bundle.js} | 16 +- .../posts.844727d8428792223d2f.bundle.min.js | 2 + ...s => posts.b01cefd7be5b5933ef48.bundle.js} | 16 +- ...dd-to-cart.7dd001c520feddf0ce5a.bundle.js} | 16 +- ...to-cart.a4f88a0c19e95b3912b6.bundle.min.js | 2 + ...ss-tracker.26b12b208974a26b52d0.bundle.js} | 22 +- ...tracker.7b160888e308c5f64701.bundle.min.js | 2 + ...earch-form.2fe57bcace4909ad8f6a.bundle.js} | 10 +- ...ch-form.9abeafeecde90cf7e0f4.bundle.min.js | 2 + ... => search.eb99cbb2b336e50a443a.bundle.js} | 16 +- .../search.f239247b514b4d0e8743.bundle.min.js | 2 + ...buttons.b99b5ff11c944a3a8ea9.bundle.min.js | 2 + ...re-buttons.c76474949213ab8d37c0.bundle.js} | 16 +- .../slides.8e9b74f1b31471377df8.bundle.min.js | 2 + ... => slides.aefbc8effd03bc1b7881.bundle.js} | 10 +- ... => social.b8ce24160d1e761ca0a6.bundle.js} | 10 +- .../social.de5cec83bf689b2f1f01.bundle.min.js | 2 + ...-button.b7e32b5d713d60752c7e.bundle.min.js | 2 + ...ipe-button.ff670b274b64f1097386.bundle.js} | 10 +- ...ontents.485ffc086d8923139868.bundle.min.js | 2 + ...f-contents.8496840ef16d1ad4138f.bundle.js} | 10 +- ...-filter.6526351a1205655def47.bundle.min.js | 2 + ...omy-filter.77f346809c2657dd250a.bundle.js} | 16 +- ...laylist.d48e1a11007fe8c248f8.bundle.min.js | 2 + ...o-playlist.d7d184236c3e54fc0c27.bundle.js} | 70 +- ...ce-cart.9131ef5e40333f8066dd.bundle.min.js | 2 + ...merce-cart.b85d04bc7b7a472432cf.bundle.js} | 16 +- ...ckout-page.1e854a92527f7870a712.bundle.js} | 16 +- ...ut-page.8391e03a51a57a42528a.bundle.min.js | 2 + ...nu-cart.33fbf47b819947e7a2a7.bundle.min.js | 2 + ...-menu-cart.d64f5409c5ae5e079f89.bundle.js} | 10 +- ...my-account.9a2312ed0688c67a0cb5.bundle.js} | 16 +- ...account.ab469f426496c628ac6c.bundle.min.js | 2 + ...notices.181b8701c45ec5374829.bundle.min.js | 2 + ...ce-notices.a2feb6e26254257dbe93.bundle.js} | 10 +- ...summary.118e54b95a68f0ad8c09.bundle.min.js | 2 + ...se-summary.f27e4afffb08961d9bd6.bundle.js} | 16 +- .../components/classes-variables-section.js | 287 + .../override-confirmation-dialog.js | 120 + .../js/hooks/use-classes-variables-limits.js | 95 + .../assets/js/hooks/use-tab-focus.js | 13 + .../import-export-customization/utils.php | 20 + modules/atomic-form/actions/action-base.php | 75 + modules/atomic-form/actions/action-runner.php | 136 + modules/atomic-form/actions/action-type.php | 35 + .../actions/collect-submissions-action.php | 151 + modules/atomic-form/actions/email-action.php | 152 + .../atomic-form/actions/email-settings.php | 56 + .../atomic-form/actions/webhook-action.php | 128 + .../atomic-form/atomic-form-controller.php | 292 + .../atomic-form/checkbox/checkbox.html.twig | 22 + modules/atomic-form/checkbox/checkbox.php | 121 + modules/atomic-form/classes/akismet.php | 192 + .../{templates => input}/input.html.twig | 4 +- .../atomic-form/{widgets => input}/input.php | 70 +- .../{templates => label}/label.html.twig | 2 +- .../atomic-form/{widgets => label}/label.php | 44 +- .../submit-button/submit-button.html.twig | 11 + .../submit-button/submit-button.php | 155 + .../textarea.html.twig | 4 +- .../{widgets => textarea}/textarea.php | 54 +- modules/atomic-widgets/settings-resolver.php | 30 + .../acf/tags/base-acf-rendered-tag.php | 19 + .../dynamic-tags/acf/tags/base-acf-tag.php | 19 + .../tags/base/license-meta-trait.php | 33 + .../dynamic-tags/tags/base/pro-data-tag.php | 17 + modules/dynamic-tags/tags/base/pro-tag.php | 17 + turbo.json | 15 + 148 files changed, 11063 insertions(+), 1016 deletions(-) rename assets/js/{e8eba20060a4b0fa29dc.bundle.js => 38a015cfd4402fcba18c.bundle.js} (96%) create mode 100644 assets/js/ajax-pagination.505018eb312c83998279.bundle.min.js rename assets/js/{ajax-pagination.2390838f542f1a8d5ed4.bundle.js => ajax-pagination.dfa3a82618d618a6a6bf.bundle.js} (96%) rename assets/js/{animated-headline.32baaa2ad2ea939224d5.bundle.js => animated-headline.248bbeadaf74dd446e7d.bundle.js} (98%) create mode 100644 assets/js/animated-headline.bc08854fb1e1a80434b2.bundle.min.js create mode 100644 assets/js/archive-posts.0b71f7023819e3872142.bundle.min.js rename assets/js/{archive-posts.6e398ddd4a81a78bcea3.bundle.js => archive-posts.d82fc1f6376a91acb912.bundle.js} (95%) rename assets/js/{36c2990924ec9596ffad.bundle.js => b07282a36331e8a0c35e.bundle.js} (96%) create mode 100644 assets/js/b24baa04ab276a4dc8a2.bundle.min.js create mode 100644 assets/js/bd4b7d0b3467c3b749da.bundle.min.js create mode 100644 assets/js/bd4b7d0b3467c3b749da.bundle.min.js.LICENSE.txt create mode 100644 assets/js/carousel.e2af910b095554625156.bundle.min.js rename assets/js/{carousel.298f1fc9c115422aad0e.bundle.js => carousel.f93681c60a8355c99044.bundle.js} (96%) create mode 100644 assets/js/code-highlight.38ec4828db8d33cccbe9.bundle.min.js rename assets/js/{code-highlight.7121ad6fca6bf899bbb5.bundle.js => code-highlight.872070dcb83100cdc6a7.bundle.js} (77%) create mode 100644 assets/js/contact-buttons-var-10.11bf4233106e1245bd61.bundle.min.js rename assets/js/{contact-buttons-var-10.44dafff87cd10dfffc68.bundle.js => contact-buttons-var-10.6caef1cb29200dd63f5a.bundle.js} (97%) rename assets/js/{contact-buttons.23b3f042ed41cf9221f4.bundle.js => contact-buttons.0f9a28de84eecdb341e1.bundle.js} (98%) create mode 100644 assets/js/contact-buttons.e1605c5cfaccbff3c14b.bundle.min.js create mode 100644 assets/js/countdown.05b148ca20af32fc8e9f.bundle.min.js rename assets/js/{countdown.6e87ca40d36793d92aea.bundle.js => countdown.7bd51efbed8eaac97b16.bundle.js} (96%) rename assets/js/{8b11be0d97d58e135d30.bundle.js => e8fec410b4ec8b8ad5e5.bundle.js} (90%) create mode 100644 assets/js/floating-bars-var-2.5287acd8570f1ce2dde3.bundle.min.js rename assets/js/{floating-bars-var-2.fa9c6b6e6aaeb43504f2.bundle.js => floating-bars-var-2.a7a076850ecbe78bb8c7.bundle.js} (98%) rename assets/js/{floating-bars-var-3.ce31fbd73759a9439cbf.bundle.js => floating-bars-var-3.c5d9c759b0475977fd76.bundle.js} (97%) create mode 100644 assets/js/floating-bars-var-3.e9e9c0ea3c6fb0e51c58.bundle.min.js rename assets/js/{form.151b991a4cbdda620c22.bundle.js => form.333cc493ca6159f7ee0e.bundle.js} (98%) create mode 100644 assets/js/form.cfd61a9174be80f835c6.bundle.min.js rename assets/js/{gallery.ac8ddd9e62465c5cdb2d.bundle.js => gallery.1f2d6260aa05f94aca68.bundle.js} (97%) create mode 100644 assets/js/gallery.cca2358f59857ce6f62f.bundle.min.js rename assets/js/{hotspot.5e711b7707a884acf3f1.bundle.js => hotspot.1555f80c1d14215e6b69.bundle.js} (96%) create mode 100644 assets/js/hotspot.737497535441dc0bc037.bundle.min.js create mode 100644 assets/js/jszip.vendor.4627e880b5d487f49e7a.bundle.js create mode 100644 assets/js/jszip.vendor.ee0ba61191fa34e6bbe2.bundle.min.js rename assets/js/{jszip.vendor.eba4ace24dcc63eadac0.bundle.min.js.LICENSE.txt => jszip.vendor.ee0ba61191fa34e6bbe2.bundle.min.js.LICENSE.txt} (100%) create mode 100644 assets/js/load-more.7c4417f8a727b79f546f.bundle.min.js rename assets/js/{load-more.f5ecc1c66872d0bd2d17.bundle.js => load-more.862f17c31e360ff1934e.bundle.js} (97%) rename assets/js/{loop-carousel.122d0b9321a9edad91b0.bundle.js => loop-carousel.5eddbaa4e0c79c44c5c1.bundle.js} (92%) create mode 100644 assets/js/loop-carousel.881847b13e8fe1f8bfc2.bundle.min.js create mode 100644 assets/js/loop-filter-editor.66aa1bfab17d9f314834.bundle.min.js rename assets/js/{loop-filter-editor.46a4c013b80a381a50c9.bundle.js => loop-filter-editor.e5be4d8fdcb9e22b57f7.bundle.js} (94%) create mode 100644 assets/js/loop.1594a1df76e87a11eda2.bundle.min.js rename assets/js/{loop.43307e757bd5a39f14cd.bundle.js => loop.8f668e18a5d491cc01b7.bundle.js} (92%) rename assets/js/{lottie.824e2adeeca89f4297c7.bundle.js => lottie.4cf7a751c39c2d5e59f3.bundle.js} (99%) create mode 100644 assets/js/lottie.55ad84218daed1323133.bundle.min.js rename assets/js/{media-carousel.8f7b71d582be9d9410fe.bundle.js => media-carousel.1eb08e97c13152575144.bundle.js} (97%) create mode 100644 assets/js/media-carousel.87c2cf115553a2c4f709.bundle.min.js create mode 100644 assets/js/mega-menu-editor.2c998fb188047136dde3.bundle.min.js rename assets/js/{mega-menu-editor.be91c0f96af4174d83d0.bundle.js => mega-menu-editor.7a18763e360ce7e0eacc.bundle.js} (93%) rename assets/js/{mega-menu-stretch-content.0d76e4a3b7bf65ff6f9b.bundle.js => mega-menu-stretch-content.65ac3ff61cbda73d513e.bundle.js} (89%) create mode 100644 assets/js/mega-menu-stretch-content.7ed04741ba7d5a80c556.bundle.min.js create mode 100644 assets/js/mega-menu.857df1cf3198ae47b617.bundle.min.js rename assets/js/{mega-menu.595ee0dffef2bd038c6b.bundle.js => mega-menu.9c175c27b10a1a51ffad.bundle.js} (99%) rename assets/js/{menu-title-keyboard-handler.efa6d39b4096f1de6f4d.bundle.js => menu-title-keyboard-handler.000fb4658b703c6ebe56.bundle.js} (98%) create mode 100644 assets/js/menu-title-keyboard-handler.b3891112675eb0b0c4d5.bundle.min.js rename assets/js/{nav-menu.fd37f05286fae9cd6d0c.bundle.js => nav-menu.393f7e8d1eb984d695bc.bundle.js} (96%) create mode 100644 assets/js/nav-menu.3afa8f5eb1fef7c22561.bundle.min.js create mode 100644 assets/js/nested-carousel-editor.30f07a4ca0162c2af3fb.bundle.min.js rename assets/js/{nested-carousel-editor.0df35e0e1a284d4bd18b.bundle.js => nested-carousel-editor.d0c65ae2ec3f418e3b3f.bundle.js} (82%) create mode 100644 assets/js/nested-carousel.659b0373371215e60dab.bundle.min.js rename assets/js/{nested-carousel.ce414a51f188ccf670ee.bundle.js => nested-carousel.925fbc1c35869d1767d5.bundle.js} (96%) create mode 100644 assets/js/notes/599.min.js rename assets/js/notes/{363.min.js.LICENSE.txt => 599.min.js.LICENSE.txt} (88%) rename assets/js/{off-canvas-editor.d30e3b4fb19101e5ff36.bundle.js => off-canvas-editor.9a4eb354fc664c85a496.bundle.js} (92%) create mode 100644 assets/js/off-canvas-editor.ff99e117444b8e4b9d09.bundle.min.js create mode 100644 assets/js/off-canvas.82d118980fb5aa03c82b.bundle.min.js rename assets/js/{off-canvas.ff4d0ebaaec46fc178b2.bundle.js => off-canvas.c6c9ad84eff54adcd9f3.bundle.js} (98%) create mode 100644 assets/js/packages/editor-components-extended/editor-components-extended.asset.php create mode 100644 assets/js/packages/editor-components-extended/editor-components-extended.js create mode 100644 assets/js/packages/editor-components-extended/editor-components-extended.min.js create mode 100644 assets/js/packages/editor-components-extended/editor-components-extended.strings.js create mode 100644 assets/js/packages/license-api/license-api.asset.php create mode 100644 assets/js/packages/license-api/license-api.js create mode 100644 assets/js/packages/license-api/license-api.min.js create mode 100644 assets/js/packages/license-api/license-api.strings.js rename assets/js/{paypal-button.55ffb013a3fe565f55a5.bundle.js => paypal-button.557bf338d556d8411f0e.bundle.js} (88%) create mode 100644 assets/js/paypal-button.5c63e4c8f36fb06aff31.bundle.min.js rename assets/js/{popup.996738ad83c089bcc0b9.bundle.js => popup.467433314d83de8c86ec.bundle.js} (89%) create mode 100644 assets/js/popup.61d4fcab8891b2e07802.bundle.min.js create mode 100644 assets/js/portfolio.3d0e387cc28c07bae511.bundle.min.js rename assets/js/{portfolio.5727b56368be256d0893.bundle.js => portfolio.d389311c484631ccbb99.bundle.js} (97%) create mode 100644 assets/js/posts.844727d8428792223d2f.bundle.min.js rename assets/js/{posts.e99f84b83c36d4568ffe.bundle.js => posts.b01cefd7be5b5933ef48.bundle.js} (93%) rename assets/js/{product-add-to-cart.0c33bb82cd57e51665f9.bundle.js => product-add-to-cart.7dd001c520feddf0ce5a.bundle.js} (96%) create mode 100644 assets/js/product-add-to-cart.a4f88a0c19e95b3912b6.bundle.min.js rename assets/js/{progress-tracker.fd1d31a26340ed74e10a.bundle.js => progress-tracker.26b12b208974a26b52d0.bundle.js} (96%) create mode 100644 assets/js/progress-tracker.7b160888e308c5f64701.bundle.min.js rename assets/js/{search-form.8941aba5c12cdb05fb7c.bundle.js => search-form.2fe57bcace4909ad8f6a.bundle.js} (96%) create mode 100644 assets/js/search-form.9abeafeecde90cf7e0f4.bundle.min.js rename assets/js/{search.1a4ea982239b5f5db501.bundle.js => search.eb99cbb2b336e50a443a.bundle.js} (98%) create mode 100644 assets/js/search.f239247b514b4d0e8743.bundle.min.js create mode 100644 assets/js/share-buttons.b99b5ff11c944a3a8ea9.bundle.min.js rename assets/js/{share-buttons.fda49c1691f4a352c7ef.bundle.js => share-buttons.c76474949213ab8d37c0.bundle.js} (93%) create mode 100644 assets/js/slides.8e9b74f1b31471377df8.bundle.min.js rename assets/js/{slides.bcd16bbde90338846bd7.bundle.js => slides.aefbc8effd03bc1b7881.bundle.js} (97%) rename assets/js/{social.83aec5578e50a413de57.bundle.js => social.b8ce24160d1e761ca0a6.bundle.js} (91%) create mode 100644 assets/js/social.de5cec83bf689b2f1f01.bundle.min.js create mode 100644 assets/js/stripe-button.b7e32b5d713d60752c7e.bundle.min.js rename assets/js/{stripe-button.cb4b1cf19f1c46430f76.bundle.js => stripe-button.ff670b274b64f1097386.bundle.js} (95%) create mode 100644 assets/js/table-of-contents.485ffc086d8923139868.bundle.min.js rename assets/js/{table-of-contents.6ac58abccb098fb35213.bundle.js => table-of-contents.8496840ef16d1ad4138f.bundle.js} (98%) create mode 100644 assets/js/taxonomy-filter.6526351a1205655def47.bundle.min.js rename assets/js/{taxonomy-filter.f3f2746a00fed7447ff5.bundle.js => taxonomy-filter.77f346809c2657dd250a.bundle.js} (98%) create mode 100644 assets/js/video-playlist.d48e1a11007fe8c248f8.bundle.min.js rename assets/js/{video-playlist.7140c18aeaebfda82118.bundle.js => video-playlist.d7d184236c3e54fc0c27.bundle.js} (98%) create mode 100644 assets/js/woocommerce-cart.9131ef5e40333f8066dd.bundle.min.js rename assets/js/{woocommerce-cart.3e38c78b18f28be95e9d.bundle.js => woocommerce-cart.b85d04bc7b7a472432cf.bundle.js} (97%) rename assets/js/{woocommerce-checkout-page.48b0561b8ee895da5af5.bundle.js => woocommerce-checkout-page.1e854a92527f7870a712.bundle.js} (97%) create mode 100644 assets/js/woocommerce-checkout-page.8391e03a51a57a42528a.bundle.min.js create mode 100644 assets/js/woocommerce-menu-cart.33fbf47b819947e7a2a7.bundle.min.js rename assets/js/{woocommerce-menu-cart.a0d098b5b49cb56bf258.bundle.js => woocommerce-menu-cart.d64f5409c5ae5e079f89.bundle.js} (97%) rename assets/js/{woocommerce-my-account.7c01b4a03ae07847db06.bundle.js => woocommerce-my-account.9a2312ed0688c67a0cb5.bundle.js} (97%) create mode 100644 assets/js/woocommerce-my-account.ab469f426496c628ac6c.bundle.min.js create mode 100644 assets/js/woocommerce-notices.181b8701c45ec5374829.bundle.min.js rename assets/js/{woocommerce-notices.c1b466cde2ea03db7d6e.bundle.js => woocommerce-notices.a2feb6e26254257dbe93.bundle.js} (94%) create mode 100644 assets/js/woocommerce-purchase-summary.118e54b95a68f0ad8c09.bundle.min.js rename assets/js/{woocommerce-purchase-summary.2ebf26dca7d446fdd128.bundle.js => woocommerce-purchase-summary.f27e4afffb08961d9bd6.bundle.js} (96%) create mode 100644 core/app/modules/import-export-customization/assets/js/components/classes-variables-section.js create mode 100644 core/app/modules/import-export-customization/assets/js/components/override-confirmation-dialog.js create mode 100644 core/app/modules/import-export-customization/assets/js/hooks/use-classes-variables-limits.js create mode 100644 core/app/modules/import-export-customization/assets/js/hooks/use-tab-focus.js create mode 100644 core/app/modules/import-export-customization/utils.php create mode 100644 modules/atomic-form/actions/action-base.php create mode 100644 modules/atomic-form/actions/action-runner.php create mode 100644 modules/atomic-form/actions/action-type.php create mode 100644 modules/atomic-form/actions/collect-submissions-action.php create mode 100644 modules/atomic-form/actions/email-action.php create mode 100644 modules/atomic-form/actions/email-settings.php create mode 100644 modules/atomic-form/actions/webhook-action.php create mode 100644 modules/atomic-form/atomic-form-controller.php create mode 100644 modules/atomic-form/checkbox/checkbox.html.twig create mode 100644 modules/atomic-form/checkbox/checkbox.php create mode 100644 modules/atomic-form/classes/akismet.php rename modules/atomic-form/{templates => input}/input.html.twig (91%) rename modules/atomic-form/{widgets => input}/input.php (60%) rename modules/atomic-form/{templates => label}/label.html.twig (92%) rename modules/atomic-form/{widgets => label}/label.php (66%) create mode 100644 modules/atomic-form/submit-button/submit-button.html.twig create mode 100644 modules/atomic-form/submit-button/submit-button.php rename modules/atomic-form/{templates => textarea}/textarea.html.twig (94%) rename modules/atomic-form/{widgets => textarea}/textarea.php (67%) create mode 100644 modules/atomic-widgets/settings-resolver.php create mode 100644 modules/dynamic-tags/acf/tags/base-acf-rendered-tag.php create mode 100644 modules/dynamic-tags/acf/tags/base-acf-tag.php create mode 100644 modules/dynamic-tags/tags/base/license-meta-trait.php create mode 100644 modules/dynamic-tags/tags/base/pro-data-tag.php create mode 100644 modules/dynamic-tags/tags/base/pro-tag.php create mode 100644 turbo.json diff --git a/assets/js/e8eba20060a4b0fa29dc.bundle.js b/assets/js/38a015cfd4402fcba18c.bundle.js similarity index 96% rename from assets/js/e8eba20060a4b0fa29dc.bundle.js rename to assets/js/38a015cfd4402fcba18c.bundle.js index 92569c0e..c7d992a2 100644 --- a/assets/js/e8eba20060a4b0fa29dc.bundle.js +++ b/assets/js/38a015cfd4402fcba18c.bundle.js @@ -1,153 +1,12 @@ -/*! pro-elements - v3.35.0 - 02-02-2026 */ +/*! pro-elements - v4.0.0 - 28-04-2026 */ "use strict"; (self["webpackChunkelementor_pro"] = self["webpackChunkelementor_pro"] || []).push([["modules_floating-buttons_assets_js_frontend_classes_floatin-bar-dom_js-modules_floating-butto-2c1e90"],{ -/***/ "../modules/floating-buttons/assets/js/frontend/classes/floatin-bar-dom.js": -/*!*********************************************************************************!*\ - !*** ../modules/floating-buttons/assets/js/frontend/classes/floatin-bar-dom.js ***! - \*********************************************************************************/ -/***/ ((__unused_webpack_module, exports) => { - - - -Object.defineProperty(exports, "__esModule", ({ - value: true -})); -exports["default"] = void 0; -class FloatingBarDomHelper { - constructor($element) { - this.$element = $element; - } - maybeMoveToTop() { - const el = this.$element[0]; - const widget = el.querySelector('.e-floating-bars'); - if (elementorFrontend.isEditMode()) { - widget.classList.add('is-sticky'); - return; - } - if (el.dataset.widget_type.startsWith('floating-bars') && widget.classList.contains('has-vertical-position-top') && !widget.classList.contains('is-sticky')) { - const wpAdminBar = document.getElementById('wpadminbar'); - const elementToInsert = el.closest('.elementor'); - if (wpAdminBar) { - wpAdminBar.after(elementToInsert); - } else { - document.body.prepend(elementToInsert); - } - } - } -} -exports["default"] = FloatingBarDomHelper; - -/***/ }), - -/***/ "../modules/floating-buttons/assets/js/shared/frontend/handlers/click-tracking.js": -/*!****************************************************************************************!*\ - !*** ../modules/floating-buttons/assets/js/shared/frontend/handlers/click-tracking.js ***! - \****************************************************************************************/ -/***/ ((__unused_webpack_module, exports, __webpack_require__) => { - - - -var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js"); -Object.defineProperty(exports, "__esModule", ({ - value: true -})); -exports["default"] = void 0; -var _base = _interopRequireDefault(__webpack_require__(/*! elementor-frontend/handlers/base */ "../../elementor/assets/dev/js/frontend/handlers/base.js")); -class ClickTrackingHandler extends _base.default { - clicks = []; - getDefaultSettings() { - return { - selectors: { - contentWrapper: '.e-contact-buttons__content-wrapper', - contentWrapperFloatingBars: '.e-floating-bars', - floatingBarCouponButton: '.e-floating-bars__coupon-button', - floatingBarsHeadline: '.e-floating-bars__headline', - contactButtonsVar4: '.e-contact-buttons__contact-icon-link', - contactButtonsVar5: '.e-contact-buttons__chat-button', - contactButtonsVar6: '.e-contact-buttons-var-6', - contactButtonsVar8: '.e-contact-buttons-var-8', - elementorWrapper: '[data-elementor-type="floating-buttons"]', - contactButtonCore: '.e-contact-buttons__send-button' - } - }; - } - getDefaultElements() { - const selectors = this.getSettings('selectors'); - return { - contentWrapper: this.$element[0].querySelector(selectors.contentWrapper), - contentWrapperFloatingBars: this.$element[0].querySelector(selectors.contentWrapperFloatingBars), - contactButtonsVar5: this.$element[0].querySelector(selectors.contactButtonsVar5), - contactButtonsVar6: this.$element[0].querySelector(selectors.contactButtonsVar6) - }; - } - bindEvents() { - if (this.elements.contentWrapper) { - this.elements.contentWrapper.addEventListener('click', this.onChatButtonTrackClick.bind(this)); - } - if (this.elements.contactButtonsVar5) { - this.elements.contactButtonsVar5.addEventListener('click', this.onChatButtonTrackClick.bind(this)); - } - if (this.elements.contactButtonsVar6) { - this.elements.contactButtonsVar6.addEventListener('click', this.onChatButtonTrackClick.bind(this)); - } - if (this.elements.contentWrapperFloatingBars) { - this.elements.contentWrapperFloatingBars.addEventListener('click', this.onChatButtonTrackClick.bind(this)); - } - window.addEventListener('beforeunload', () => { - if (this.clicks.length > 0) { - this.sendClicks(); - } - }); - } - onChatButtonTrackClick(event) { - const targetElement = event.target || event.srcElement; - const selectors = this.getSettings('selectors'); - const buttonSelectors = [selectors.contactButtonsVar4, selectors.contactButtonsVar6, selectors.floatingBarCouponButton, selectors.floatingBarsHeadline, selectors.contactButtonCore]; - for (const selector of buttonSelectors) { - if (targetElement.matches(selector) || targetElement.closest(selector)) { - this.getDocumentIdAndTrack(targetElement, selectors); - } - } - if ((targetElement.matches(selectors.contactButtonsVar5) || targetElement.closest(selectors.contactButtonsVar5)) && targetElement.closest('.e-contact-buttons-var-5')) { - this.getDocumentIdAndTrack(targetElement, selectors); - } - } - getDocumentIdAndTrack(targetElement, selectors) { - const documentId = targetElement.closest(selectors.elementorWrapper).dataset.elementorId; - this.trackClick(documentId); - } - trackClick(documentId) { - if (!documentId) { - return; - } - this.clicks.push(documentId); - if (this.clicks.length >= 10) { - this.sendClicks(); - } - } - sendClicks() { - const formData = new FormData(); - formData.append('action', 'elementor_send_clicks'); - formData.append('_nonce', elementorFrontendConfig?.nonces?.floatingButtonsClickTracking); - this.clicks.forEach(documentId => formData.append('clicks[]', documentId)); - fetch(elementorFrontendConfig?.urls?.ajaxurl, { - method: 'POST', - body: formData - }).then(() => { - this.clicks = []; - }); - } -} -exports["default"] = ClickTrackingHandler; - -/***/ }), - -/***/ "../../elementor/assets/dev/js/frontend/handlers/base.js": +/***/ "../../elementor/assets/dev/js/frontend/handlers/base.js" /*!***************************************************************!*\ !*** ../../elementor/assets/dev/js/frontend/handlers/base.js ***! \***************************************************************/ -/***/ ((module) => { +(module) { @@ -341,7 +200,148 @@ module.exports = elementorModules.ViewModule.extend({ } }); -/***/ }) +/***/ }, + +/***/ "../modules/floating-buttons/assets/js/frontend/classes/floatin-bar-dom.js" +/*!*********************************************************************************!*\ + !*** ../modules/floating-buttons/assets/js/frontend/classes/floatin-bar-dom.js ***! + \*********************************************************************************/ +(__unused_webpack_module, exports) { + + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports["default"] = void 0; +class FloatingBarDomHelper { + constructor($element) { + this.$element = $element; + } + maybeMoveToTop() { + const el = this.$element[0]; + const widget = el.querySelector('.e-floating-bars'); + if (elementorFrontend.isEditMode()) { + widget.classList.add('is-sticky'); + return; + } + if (el.dataset.widget_type.startsWith('floating-bars') && widget.classList.contains('has-vertical-position-top') && !widget.classList.contains('is-sticky')) { + const wpAdminBar = document.getElementById('wpadminbar'); + const elementToInsert = el.closest('.elementor'); + if (wpAdminBar) { + wpAdminBar.after(elementToInsert); + } else { + document.body.prepend(elementToInsert); + } + } + } +} +exports["default"] = FloatingBarDomHelper; + +/***/ }, + +/***/ "../modules/floating-buttons/assets/js/shared/frontend/handlers/click-tracking.js" +/*!****************************************************************************************!*\ + !*** ../modules/floating-buttons/assets/js/shared/frontend/handlers/click-tracking.js ***! + \****************************************************************************************/ +(__unused_webpack_module, exports, __webpack_require__) { + + + +var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js"); +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports["default"] = void 0; +var _base = _interopRequireDefault(__webpack_require__(/*! elementor-frontend/handlers/base */ "../../elementor/assets/dev/js/frontend/handlers/base.js")); +class ClickTrackingHandler extends _base.default { + clicks = []; + getDefaultSettings() { + return { + selectors: { + contentWrapper: '.e-contact-buttons__content-wrapper', + contentWrapperFloatingBars: '.e-floating-bars', + floatingBarCouponButton: '.e-floating-bars__coupon-button', + floatingBarsHeadline: '.e-floating-bars__headline', + contactButtonsVar4: '.e-contact-buttons__contact-icon-link', + contactButtonsVar5: '.e-contact-buttons__chat-button', + contactButtonsVar6: '.e-contact-buttons-var-6', + contactButtonsVar8: '.e-contact-buttons-var-8', + elementorWrapper: '[data-elementor-type="floating-buttons"]', + contactButtonCore: '.e-contact-buttons__send-button' + } + }; + } + getDefaultElements() { + const selectors = this.getSettings('selectors'); + return { + contentWrapper: this.$element[0].querySelector(selectors.contentWrapper), + contentWrapperFloatingBars: this.$element[0].querySelector(selectors.contentWrapperFloatingBars), + contactButtonsVar5: this.$element[0].querySelector(selectors.contactButtonsVar5), + contactButtonsVar6: this.$element[0].querySelector(selectors.contactButtonsVar6) + }; + } + bindEvents() { + if (this.elements.contentWrapper) { + this.elements.contentWrapper.addEventListener('click', this.onChatButtonTrackClick.bind(this)); + } + if (this.elements.contactButtonsVar5) { + this.elements.contactButtonsVar5.addEventListener('click', this.onChatButtonTrackClick.bind(this)); + } + if (this.elements.contactButtonsVar6) { + this.elements.contactButtonsVar6.addEventListener('click', this.onChatButtonTrackClick.bind(this)); + } + if (this.elements.contentWrapperFloatingBars) { + this.elements.contentWrapperFloatingBars.addEventListener('click', this.onChatButtonTrackClick.bind(this)); + } + window.addEventListener('beforeunload', () => { + if (this.clicks.length > 0) { + this.sendClicks(); + } + }); + } + onChatButtonTrackClick(event) { + const targetElement = event.target || event.srcElement; + const selectors = this.getSettings('selectors'); + const buttonSelectors = [selectors.contactButtonsVar4, selectors.contactButtonsVar6, selectors.floatingBarCouponButton, selectors.floatingBarsHeadline, selectors.contactButtonCore]; + for (const selector of buttonSelectors) { + if (targetElement.matches(selector) || targetElement.closest(selector)) { + this.getDocumentIdAndTrack(targetElement, selectors); + } + } + if ((targetElement.matches(selectors.contactButtonsVar5) || targetElement.closest(selectors.contactButtonsVar5)) && targetElement.closest('.e-contact-buttons-var-5')) { + this.getDocumentIdAndTrack(targetElement, selectors); + } + } + getDocumentIdAndTrack(targetElement, selectors) { + const documentId = targetElement.closest(selectors.elementorWrapper).dataset.elementorId; + this.trackClick(documentId); + } + trackClick(documentId) { + if (!documentId) { + return; + } + this.clicks.push(documentId); + if (this.clicks.length >= 10) { + this.sendClicks(); + } + } + sendClicks() { + const formData = new FormData(); + formData.append('action', 'elementor_send_clicks'); + formData.append('_nonce', elementorFrontendConfig?.nonces?.floatingButtonsClickTracking); + this.clicks.forEach(documentId => formData.append('clicks[]', documentId)); + fetch(elementorFrontendConfig?.urls?.ajaxurl, { + method: 'POST', + body: formData + }).then(() => { + this.clicks = []; + }); + } +} +exports["default"] = ClickTrackingHandler; + +/***/ } }]); -//# sourceMappingURL=e8eba20060a4b0fa29dc.bundle.js.map \ No newline at end of file +//# sourceMappingURL=38a015cfd4402fcba18c.bundle.js.map diff --git a/assets/js/ajax-pagination.505018eb312c83998279.bundle.min.js b/assets/js/ajax-pagination.505018eb312c83998279.bundle.min.js new file mode 100644 index 00000000..9e5e36ba --- /dev/null +++ b/assets/js/ajax-pagination.505018eb312c83998279.bundle.min.js @@ -0,0 +1,2 @@ +/*! pro-elements - v4.0.0 - 28-04-2026 */ +"use strict";(self.webpackChunkelementor_pro=self.webpackChunkelementor_pro||[]).push([[550],{4734(e,t,n){var s=n(6784);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=s(n(4921)),r=s(n(5012));class AjaxPagination extends elementorModules.frontend.handlers.Base{getDefaultSettings(){return{selectors:{links:"a.page-numbers:not(.current)",widgetContainer:".elementor-widget-container",postWrapperTag:".e-loop-item"}}}getDefaultElements(){const e=this.getSettings("selectors");return{links:this.$element[0].querySelectorAll(e.links),widgetContainer:this.$element[0].querySelector(e.widgetContainer)}}bindEvents(){super.bindEvents(),this.linksEventListeners()}linksEventListeners(){this.elements.links.length&&"ajax"===this.getElementSettings("pagination_load_type")&&this.elements.links.forEach(e=>{e.addEventListener("click",e=>{this.handleLinkClick(e)})})}handleLinkClick(e){if(e.preventDefault(),this.isLoading)return;this.removeLinksListeners(),this.handleUiBeforeLoading();const t=e?.target.getAttribute("href");return this.updateURLQueryString(t),fetch(t).then(e=>e.text()).then(e=>{const t=(new DOMParser).parseFromString(e,"text/html");this.handleSuccessFetch(t)})}removeLinksListeners(){this.elements.links.length&&this.elements.links.forEach(e=>{e.removeEventListener("click",this.handleLinkClick)})}updateURLQueryString(e){const t=new URL(window.location.href),n=t.searchParams,s=new URL(e).searchParams;s.forEach((e,t)=>{n.set(t,e)}),s.has("e-page-"+this.elementId)||n.delete("e-page-"+this.elementId),history.pushState(null,"",t.href)}handleUiBeforeLoading(){this.setLoading(!0),this.ajaxHelper.addLoadingAnimationOverlay(this.elementId),this.maybeScrollToTop()}setLoading(e){this.isLoading=e}maybeScrollToTop(){if("yes"!==this.getElementSettings("auto_scroll"))return;const e=document.querySelector(`.elementor-element-${this.elementId}`);e&&e.scrollIntoView({behavior:"smooth"})}handleUiAfterLoading(){this.setLoading(!1),this.ajaxHelper.removeLoadingAnimationOverlay(this.elementId)}handleSuccessFetch(e){this.handleUiAfterLoading();const t=this.getSettings("selectors"),n=e.querySelector(`[data-id="${this.elementId}"] ${t.widgetContainer}`),s=this.elements.widgetContainer;this.$element[0].replaceChild(n,s),this.afterInsertPosts()}afterInsertPosts(){const e=this.getSettings("selectors"),t=document.querySelectorAll(`[data-id="${this.elementId}"] ${e.postWrapperTag}`);elementorFrontend.elementsHandler.runReadyTrigger(this.$element[0]),(0,r.default)(t),ElementorProFrontendConfig.settings.lazy_load_background_images&&document.dispatchEvent(new Event("elementor/lazyload/observe"))}onInit(){super.onInit(),this.setLoading(!1),this.elementId=this.getID(),this.ajaxHelper=new i.default}}t.default=AjaxPagination}}]); diff --git a/assets/js/ajax-pagination.2390838f542f1a8d5ed4.bundle.js b/assets/js/ajax-pagination.dfa3a82618d618a6a6bf.bundle.js similarity index 96% rename from assets/js/ajax-pagination.2390838f542f1a8d5ed4.bundle.js rename to assets/js/ajax-pagination.dfa3a82618d618a6a6bf.bundle.js index fbcfd64e..605c633e 100644 --- a/assets/js/ajax-pagination.2390838f542f1a8d5ed4.bundle.js +++ b/assets/js/ajax-pagination.dfa3a82618d618a6a6bf.bundle.js @@ -1,12 +1,12 @@ -/*! pro-elements - v3.35.0 - 02-02-2026 */ +/*! pro-elements - v4.0.0 - 28-04-2026 */ "use strict"; (self["webpackChunkelementor_pro"] = self["webpackChunkelementor_pro"] || []).push([["ajax-pagination"],{ -/***/ "../modules/loop-builder/assets/js/frontend/handlers/ajax-pagination.js": +/***/ "../modules/loop-builder/assets/js/frontend/handlers/ajax-pagination.js" /*!******************************************************************************!*\ !*** ../modules/loop-builder/assets/js/frontend/handlers/ajax-pagination.js ***! \******************************************************************************/ -/***/ ((__unused_webpack_module, exports, __webpack_require__) => { +(__unused_webpack_module, exports, __webpack_require__) { @@ -140,7 +140,7 @@ class AjaxPagination extends elementorModules.frontend.handlers.Base { } exports["default"] = AjaxPagination; -/***/ }) +/***/ } }]); -//# sourceMappingURL=ajax-pagination.2390838f542f1a8d5ed4.bundle.js.map \ No newline at end of file +//# sourceMappingURL=ajax-pagination.dfa3a82618d618a6a6bf.bundle.js.map diff --git a/assets/js/animated-headline.32baaa2ad2ea939224d5.bundle.js b/assets/js/animated-headline.248bbeadaf74dd446e7d.bundle.js similarity index 98% rename from assets/js/animated-headline.32baaa2ad2ea939224d5.bundle.js rename to assets/js/animated-headline.248bbeadaf74dd446e7d.bundle.js index 68fd0782..7714bcd6 100644 --- a/assets/js/animated-headline.32baaa2ad2ea939224d5.bundle.js +++ b/assets/js/animated-headline.248bbeadaf74dd446e7d.bundle.js @@ -1,12 +1,12 @@ -/*! pro-elements - v3.35.0 - 02-02-2026 */ +/*! pro-elements - v4.0.0 - 28-04-2026 */ "use strict"; (self["webpackChunkelementor_pro"] = self["webpackChunkelementor_pro"] || []).push([["animated-headline"],{ -/***/ "../modules/animated-headline/assets/js/frontend/handlers/animated-headlines.js": +/***/ "../modules/animated-headline/assets/js/frontend/handlers/animated-headlines.js" /*!**************************************************************************************!*\ !*** ../modules/animated-headline/assets/js/frontend/handlers/animated-headlines.js ***! \**************************************************************************************/ -/***/ ((__unused_webpack_module, exports) => { +(__unused_webpack_module, exports) { @@ -293,7 +293,7 @@ var _default = exports["default"] = elementorModules.frontend.handlers.Base.exte } }); -/***/ }) +/***/ } }]); -//# sourceMappingURL=animated-headline.32baaa2ad2ea939224d5.bundle.js.map \ No newline at end of file +//# sourceMappingURL=animated-headline.248bbeadaf74dd446e7d.bundle.js.map diff --git a/assets/js/animated-headline.bc08854fb1e1a80434b2.bundle.min.js b/assets/js/animated-headline.bc08854fb1e1a80434b2.bundle.min.js new file mode 100644 index 00000000..e511580e --- /dev/null +++ b/assets/js/animated-headline.bc08854fb1e1a80434b2.bundle.min.js @@ -0,0 +1,2 @@ +/*! pro-elements - v4.0.0 - 28-04-2026 */ +"use strict";(self.webpackChunkelementor_pro=self.webpackChunkelementor_pro||[]).push([[961],{2590(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;t.default=elementorModules.frontend.handlers.Base.extend({svgPaths:{circle:["M325,18C228.7-8.3,118.5,8.3,78,21C22.4,38.4,4.6,54.6,5.6,77.6c1.4,32.4,52.2,54,142.6,63.7 c66.2,7.1,212.2,7.5,273.5-8.3c64.4-16.6,104.3-57.6,33.8-98.2C386.7-4.9,179.4-1.4,126.3,20.7"],underline_zigzag:["M9.3,127.3c49.3-3,150.7-7.6,199.7-7.4c121.9,0.4,189.9,0.4,282.3,7.2C380.1,129.6,181.2,130.6,70,139 c82.6-2.9,254.2-1,335.9,1.3c-56,1.4-137.2-0.3-197.1,9"],x:["M497.4,23.9C301.6,40,155.9,80.6,4,144.4","M14.1,27.6c204.5,20.3,393.8,74,467.3,111.7"],strikethrough:["M3,75h493.5"],curly:["M3,146.1c17.1-8.8,33.5-17.8,51.4-17.8c15.6,0,17.1,18.1,30.2,18.1c22.9,0,36-18.6,53.9-18.6 c17.1,0,21.3,18.5,37.5,18.5c21.3,0,31.8-18.6,49-18.6c22.1,0,18.8,18.8,36.8,18.8c18.8,0,37.5-18.6,49-18.6c20.4,0,17.1,19,36.8,19 c22.9,0,36.8-20.6,54.7-18.6c17.7,1.4,7.1,19.5,33.5,18.8c17.1,0,47.2-6.5,61.1-15.6"],diagonal:["M13.5,15.5c131,13.7,289.3,55.5,475,125.5"],double:["M8.4,143.1c14.2-8,97.6-8.8,200.6-9.2c122.3-0.4,287.5,7.2,287.5,7.2","M8,19.4c72.3-5.3,162-7.8,216-7.8c54,0,136.2,0,267,7.8"],double_underline:["M5,125.4c30.5-3.8,137.9-7.6,177.3-7.6c117.2,0,252.2,4.7,312.7,7.6","M26.9,143.8c55.1-6.1,126-6.3,162.2-6.1c46.5,0.2,203.9,3.2,268.9,6.4"],underline:["M7.7,145.6C109,125,299.9,116.2,401,121.3c42.1,2.2,87.6,11.8,87.3,25.7"]},getDefaultSettings(){const e=this.getElementSettings("rotate_iteration_delay"),t={animationDelay:e||2500,lettersDelay:.02*e||50,typeLettersDelay:.06*e||150,selectionDuration:.2*e||500,revealDuration:.24*e||600,revealAnimationDelay:.6*e||1500,highlightAnimationDuration:this.getElementSettings("highlight_animation_duration")||1200,highlightAnimationDelay:this.getElementSettings("highlight_iteration_delay")||8e3};return t.typeAnimationDelay=t.selectionDuration+800,t.selectors={headline:".elementor-headline",dynamicWrapper:".elementor-headline-dynamic-wrapper",dynamicText:".elementor-headline-dynamic-text"},t.classes={dynamicText:"elementor-headline-dynamic-text",dynamicLetter:"elementor-headline-dynamic-letter",textActive:"elementor-headline-text-active",textInactive:"elementor-headline-text-inactive",letters:"elementor-headline-letters",animationIn:"elementor-headline-animation-in",typeSelected:"elementor-headline-typing-selected",activateHighlight:"e-animated",hideHighlight:"e-hide-highlight"},t},getDefaultElements(){var e=this.getSettings("selectors");return{$headline:this.$element.find(e.headline),$dynamicWrapper:this.$element.find(e.dynamicWrapper),$dynamicText:this.$element.find(e.dynamicText)}},getNextWord:e=>e.is(":last-child")?e.parent().children().eq(0):e.next(),switchWord(e,t){e.removeClass("elementor-headline-text-active").addClass("elementor-headline-text-inactive"),t.removeClass("elementor-headline-text-inactive").addClass("elementor-headline-text-active"),this.setDynamicWrapperWidth(t)},singleLetters(){var e=this.getSettings("classes");this.elements.$dynamicText.each(function(){var t=jQuery(this),i=t.text().split(""),n=t.hasClass(e.textActive);t.empty(),i.forEach(function(i){var s=jQuery("",{class:e.dynamicLetter}).text(i);n&&s.addClass(e.animationIn),t.append(s)}),t.css("opacity",1)})},showLetter(e,t,i,n){var s=this,a=this.getSettings("classes");e.addClass(a.animationIn),e.is(":last-child")?i||setTimeout(function(){s.hideWord(t)},s.getSettings("animationDelay")):setTimeout(function(){s.showLetter(e.next(),t,i,n)},n)},hideLetter(e,t,i,n){var s=this,a=this.getSettings();e.removeClass(a.classes.animationIn),e.is(":last-child")?i&&setTimeout(function(){s.hideWord(s.getNextWord(t))},s.getSettings("animationDelay")):setTimeout(function(){s.hideLetter(e.next(),t,i,n)},n)},showWord(e,t){var i=this,n=i.getSettings(),s=i.getElementSettings("animation_type");"typing"===s?(i.showLetter(e.find("."+n.classes.dynamicLetter).eq(0),e,!1,t),e.addClass(n.classes.textActive).removeClass(n.classes.textInactive)):"clip"===s&&i.elements.$dynamicWrapper.animate({width:e.width()+10},n.revealDuration,function(){setTimeout(function(){i.hideWord(e)},n.revealAnimationDelay)})},hideWord(e){var t=this,i=t.getSettings(),n=i.classes,s="."+n.dynamicLetter;if(this.isLoopMode||!e.is(":last-child")){var a=t.getElementSettings("animation_type"),l=t.getNextWord(e);if("typing"===a)t.elements.$dynamicWrapper.addClass(n.typeSelected),setTimeout(function(){t.elements.$dynamicWrapper.removeClass(n.typeSelected),e.addClass(i.classes.textInactive).removeClass(n.textActive).children(s).removeClass(n.animationIn)},i.selectionDuration),setTimeout(function(){t.showWord(l,i.typeLettersDelay)},i.typeAnimationDelay);else if(t.elements.$headline.hasClass(n.letters)){var r=e.children(s).length>=l.children(s).length;t.hideLetter(e.find(s).eq(0),e,r,i.lettersDelay),t.showLetter(l.find(s).eq(0),l,r,i.lettersDelay),t.setDynamicWrapperWidth(l)}else"clip"===a?t.elements.$dynamicWrapper.animate({width:"2px"},i.revealDuration,function(){t.switchWord(e,l),t.showWord(l)}):(t.switchWord(e,l),setTimeout(function(){t.hideWord(l)},i.animationDelay))}},setDynamicWrapperWidth(e){const t=this.getElementSettings("animation_type");"clip"!==t&&"typing"!==t&&this.elements.$dynamicWrapper.css("width",e.width())},animateHeadline(){var e=this,t=e.getElementSettings("animation_type"),i=e.elements.$dynamicWrapper;"clip"===t?i.width(i.width()+10):"typing"!==t&&e.setDynamicWrapperWidth(e.elements.$dynamicText),setTimeout(function(){e.hideWord(e.elements.$dynamicText.eq(0))},e.getSettings("animationDelay"))},getSvgPaths(e){var t=this.svgPaths[e],i=jQuery();return t.forEach(function(e){i=i.add(jQuery("",{d:e}))}),i},addHighlight(){const e=this.getElementSettings(),t=jQuery("",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 500 150",preserveAspectRatio:"none","aria-hidden":"true"}).html(this.getSvgPaths(e.marker));this.elements.$dynamicWrapper.append(t[0].outerHTML)},rotateHeadline(){var e=this.getSettings();this.elements.$headline.hasClass(e.classes.letters)&&this.singleLetters(),this.animateHeadline()},initHeadline(){const e=this.getElementSettings("headline_style");"rotate"===e?this.rotateHeadline():"highlight"===e&&(this.addHighlight(),this.activateHighlightAnimation()),this.deactivateScrollListener()},activateHighlightAnimation(){const e=this.getSettings(),t=e.classes,i=this.elements.$headline;this.prefersReducedMotion||(this.prefersReducedMotion=window.matchMedia("(prefers-reduced-motion: reduce)"));this.prefersReducedMotion.matches?i.addClass(t.activateHighlight):(i.removeClass(t.hideHighlight).addClass(t.activateHighlight),this.isLoopMode&&(setTimeout(()=>{i.removeClass(t.activateHighligh).addClass(t.hideHighlight)},e.highlightAnimationDuration+.8*e.highlightAnimationDelay),setTimeout(()=>{this.activateHighlightAnimation(!1)},e.highlightAnimationDuration+e.highlightAnimationDelay)))},activateScrollListener(){this.intersectionObservers.startAnimation.observer=elementorModules.utils.Scroll.scrollObserver({offset:"0px 0px -100px",callback:e=>{e.isInViewport&&this.initHeadline()}}),this.intersectionObservers.startAnimation.element=this.elements.$headline[0],this.intersectionObservers.startAnimation.observer.observe(this.intersectionObservers.startAnimation.element)},deactivateScrollListener(){this.intersectionObservers.startAnimation.observer.unobserve(this.intersectionObservers.startAnimation.element)},onInit(){elementorModules.frontend.handlers.Base.prototype.onInit.apply(this,arguments),this.intersectionObservers={startAnimation:{observer:null,element:null}},this.isLoopMode="yes"===this.getElementSettings("loop"),this.activateScrollListener()}})}}]); diff --git a/assets/js/archive-posts.0b71f7023819e3872142.bundle.min.js b/assets/js/archive-posts.0b71f7023819e3872142.bundle.min.js new file mode 100644 index 00000000..90c9e7db --- /dev/null +++ b/assets/js/archive-posts.0b71f7023819e3872142.bundle.min.js @@ -0,0 +1,2 @@ +/*! pro-elements - v4.0.0 - 28-04-2026 */ +"use strict";(self.webpackChunkelementor_pro=self.webpackChunkelementor_pro||[]).push([[345,396],{7907(e,t,s){var n=s(6784);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=n(s(2195));t.default=o.default.extend({getSkinPrefix:()=>"cards_"})},2078(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;class LoadMore extends elementorModules.frontend.handlers.Base{getDefaultSettings(){return{selectors:{postsContainer:".elementor-posts-container",postWrapperTag:"article",loadMoreButton:".elementor-button",loadMoreSpinnerWrapper:".e-load-more-spinner",loadMoreSpinner:".e-load-more-spinner i, .e-load-more-spinner svg",loadMoreAnchor:".e-load-more-anchor"},classes:{loadMoreSpin:"eicon-animation-spin",loadMoreIsLoading:"e-load-more-pagination-loading",loadMorePaginationEnd:"e-load-more-pagination-end",loadMoreNoSpinner:"e-load-more-no-spinner"}}}getDefaultElements(){const e=this.getSettings("selectors");return{postsWidgetWrapper:this.$element[0],postsContainer:this.$element[0].querySelector(e.postsContainer),loadMoreButton:this.$element[0].querySelector(e.loadMoreButton),loadMoreSpinnerWrapper:this.$element[0].querySelector(e.loadMoreSpinnerWrapper),loadMoreSpinner:this.$element[0].querySelector(e.loadMoreSpinner),loadMoreAnchor:this.$element[0].querySelector(e.loadMoreAnchor)}}bindEvents(){super.bindEvents(),this.elements.loadMoreButton&&this.elements.loadMoreButton.addEventListener("click",e=>{this.isLoading||(e.preventDefault(),this.handlePostsQuery())})}onInit(){super.onInit(),this.classes=this.getSettings("classes"),this.isLoading=!1;const e=this.getElementSettings("pagination_type");"load_more_on_click"!==e&&"load_more_infinite_scroll"!==e||(this.isInfinteScroll="load_more_infinite_scroll"===e,this.isSpinnerAvailable=this.getElementSettings("load_more_spinner").value,this.isSpinnerAvailable||this.elements.postsWidgetWrapper.classList.add(this.classes.loadMoreNoSpinner),this.isInfinteScroll?this.handleInfiniteScroll():this.elements.loadMoreSpinnerWrapper&&this.elements.loadMoreButton&&this.elements.loadMoreButton.insertAdjacentElement("beforeEnd",this.elements.loadMoreSpinnerWrapper),this.elementId=this.getID(),this.postId=elementorFrontendConfig.post.id,this.elements.loadMoreAnchor&&(this.currentPage=parseInt(this.elements.loadMoreAnchor.getAttribute("data-page")),this.maxPage=parseInt(this.elements.loadMoreAnchor.getAttribute("data-max-page")),this.currentPage!==this.maxPage&&this.currentPage||this.handleUiWhenNoPosts()))}handleInfiniteScroll(){this.isEdit||(this.observer=elementorModules.utils.Scroll.scrollObserver({callback:e=>{e.isInViewport&&!this.isLoading&&(this.observer.unobserve(this.elements.loadMoreAnchor),this.handlePostsQuery().then(()=>{this.currentPage!==this.maxPage&&this.observer.observe(this.elements.loadMoreAnchor)}))}}),this.observer.observe(this.elements.loadMoreAnchor))}handleUiBeforeLoading(){this.isLoading=!0,this.elements.loadMoreSpinner&&this.elements.loadMoreSpinner.classList.add(this.classes.loadMoreSpin),this.elements.postsWidgetWrapper.classList.add(this.classes.loadMoreIsLoading)}handleUiAfterLoading(){this.isLoading=!1,this.elements.loadMoreSpinner&&this.elements.loadMoreSpinner.classList.remove(this.classes.loadMoreSpin),this.isInfinteScroll&&this.elements.loadMoreSpinnerWrapper&&this.elements.loadMoreAnchor&&this.elements.loadMoreAnchor.insertAdjacentElement("afterend",this.elements.loadMoreSpinnerWrapper),this.elements.postsWidgetWrapper.classList.remove(this.classes.loadMoreIsLoading)}handleUiWhenNoPosts(){this.elements.postsWidgetWrapper.classList.add(this.classes.loadMorePaginationEnd)}afterInsertPosts(){}handleSuccessFetch(e){this.handleUiAfterLoading();const t=this.getSettings("selectors"),s=e.querySelectorAll(`[data-id="${this.elementId}"] ${t.postsContainer} > ${t.postWrapperTag}`),n=e.querySelector(`[data-id="${this.elementId}"] .e-load-more-anchor`).getAttribute("data-next-page");s.forEach(e=>this.elements.postsContainer.append(e)),this.elements.loadMoreAnchor.setAttribute("data-page",this.currentPage),this.elements.loadMoreAnchor.setAttribute("data-next-page",n),this.currentPage===this.maxPage&&this.handleUiWhenNoPosts(),this.afterInsertPosts(s,e)}handlePostsQuery(){this.handleUiBeforeLoading(),this.currentPage++;const e=this.elements.loadMoreAnchor.getAttribute("data-next-page");return fetch(e).then(e=>e.text()).then(e=>{const t=(new DOMParser).parseFromString(e,"text/html");this.handleSuccessFetch(t)})}}t.default=LoadMore},2195(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;t.default=elementorModules.frontend.handlers.Base.extend({getSkinPrefix:()=>"classic_",bindEvents(){elementorFrontend.addListenerOnce(this.getModelCID(),"resize",this.onWindowResize)},unbindEvents(){elementorFrontend.removeListeners(this.getModelCID(),"resize",this.onWindowResize)},getClosureMethodsNames(){return elementorModules.frontend.handlers.Base.prototype.getClosureMethodsNames.apply(this,arguments).concat(["fitImages","onWindowResize","runMasonry"])},getDefaultSettings:()=>({classes:{fitHeight:"elementor-fit-height",hasItemRatio:"elementor-has-item-ratio"},selectors:{postsContainer:".elementor-posts-container",post:".elementor-post",postThumbnail:".elementor-post__thumbnail",postThumbnailImage:".elementor-post__thumbnail img"}}),getDefaultElements(){var e=this.getSettings("selectors");return{$postsContainer:this.$element.find(e.postsContainer),$posts:this.$element.find(e.post)}},fitImage(e){var t=this.getSettings(),s=e.find(t.selectors.postThumbnail),n=s.find("img")[0];if(n){var o=s.outerHeight()/s.outerWidth(),i=n.naturalHeight/n.naturalWidth;s.toggleClass(t.classes.fitHeight,i=2;if(e.$postsContainer.toggleClass("elementor-posts-masonry",s),!s)return void e.$postsContainer.height("");const n=this.getVerticalSpaceBetween();new elementorModules.utils.Masonry({container:e.$postsContainer,items:e.$posts.filter(":visible"),columnsCount:this.getSettings("colsCount"),verticalSpaceBetween:n||0}).run()},run(){setTimeout(this.fitImages,0),this.initMasonry()},onInit(){elementorModules.frontend.handlers.Base.prototype.onInit.apply(this,arguments),this.bindEvents(),this.run()},onWindowResize(){this.fitImages(),this.runMasonry()},onElementChange(){this.fitImages(),setTimeout(this.runMasonry)}})},439(e,t,s){var n=s(6784);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=n(s(2078));class ArchivePostsLoadMore extends o.default{}t.default=ArchivePostsLoadMore},2718(e,t,s){var n=s(6784);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=n(s(7907));t.default=o.default.extend({getSkinPrefix:()=>"archive_cards_"})},6629(e,t,s){var n=s(6784);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=n(s(2195));t.default=o.default.extend({getSkinPrefix:()=>"archive_classic_"})}}]); diff --git a/assets/js/archive-posts.6e398ddd4a81a78bcea3.bundle.js b/assets/js/archive-posts.d82fc1f6376a91acb912.bundle.js similarity index 95% rename from assets/js/archive-posts.6e398ddd4a81a78bcea3.bundle.js rename to assets/js/archive-posts.d82fc1f6376a91acb912.bundle.js index 8b1fee0b..b7391aae 100644 --- a/assets/js/archive-posts.6e398ddd4a81a78bcea3.bundle.js +++ b/assets/js/archive-posts.d82fc1f6376a91acb912.bundle.js @@ -1,12 +1,12 @@ -/*! pro-elements - v3.35.0 - 02-02-2026 */ +/*! pro-elements - v4.0.0 - 28-04-2026 */ "use strict"; (self["webpackChunkelementor_pro"] = self["webpackChunkelementor_pro"] || []).push([["archive-posts"],{ -/***/ "../modules/posts/assets/js/frontend/handlers/cards.js": +/***/ "../modules/posts/assets/js/frontend/handlers/cards.js" /*!*************************************************************!*\ !*** ../modules/posts/assets/js/frontend/handlers/cards.js ***! \*************************************************************/ -/***/ ((__unused_webpack_module, exports, __webpack_require__) => { +(__unused_webpack_module, exports, __webpack_require__) { @@ -22,13 +22,13 @@ var _default = exports["default"] = _posts.default.extend({ } }); -/***/ }), +/***/ }, -/***/ "../modules/posts/assets/js/frontend/handlers/load-more.js": +/***/ "../modules/posts/assets/js/frontend/handlers/load-more.js" /*!*****************************************************************!*\ !*** ../modules/posts/assets/js/frontend/handlers/load-more.js ***! \*****************************************************************/ -/***/ ((__unused_webpack_module, exports) => { +(__unused_webpack_module, exports) { @@ -190,13 +190,13 @@ class LoadMore extends elementorModules.frontend.handlers.Base { } exports["default"] = LoadMore; -/***/ }), +/***/ }, -/***/ "../modules/posts/assets/js/frontend/handlers/posts.js": +/***/ "../modules/posts/assets/js/frontend/handlers/posts.js" /*!*************************************************************!*\ !*** ../modules/posts/assets/js/frontend/handlers/posts.js ***! \*************************************************************/ -/***/ ((__unused_webpack_module, exports) => { +(__unused_webpack_module, exports) { @@ -332,13 +332,13 @@ var _default = exports["default"] = elementorModules.frontend.handlers.Base.exte } }); -/***/ }), +/***/ }, -/***/ "../modules/theme-builder/assets/js/frontend/handlers/archive-posts-load-more.js": +/***/ "../modules/theme-builder/assets/js/frontend/handlers/archive-posts-load-more.js" /*!***************************************************************************************!*\ !*** ../modules/theme-builder/assets/js/frontend/handlers/archive-posts-load-more.js ***! \***************************************************************************************/ -/***/ ((__unused_webpack_module, exports, __webpack_require__) => { +(__unused_webpack_module, exports, __webpack_require__) { @@ -351,13 +351,13 @@ var _loadMore = _interopRequireDefault(__webpack_require__(/*! ../../../../../po class ArchivePostsLoadMore extends _loadMore.default {} exports["default"] = ArchivePostsLoadMore; -/***/ }), +/***/ }, -/***/ "../modules/theme-builder/assets/js/frontend/handlers/archive-posts-skin-cards.js": +/***/ "../modules/theme-builder/assets/js/frontend/handlers/archive-posts-skin-cards.js" /*!****************************************************************************************!*\ !*** ../modules/theme-builder/assets/js/frontend/handlers/archive-posts-skin-cards.js ***! \****************************************************************************************/ -/***/ ((__unused_webpack_module, exports, __webpack_require__) => { +(__unused_webpack_module, exports, __webpack_require__) { @@ -373,13 +373,13 @@ var _default = exports["default"] = _cards.default.extend({ } }); -/***/ }), +/***/ }, -/***/ "../modules/theme-builder/assets/js/frontend/handlers/archive-posts-skin-classic.js": +/***/ "../modules/theme-builder/assets/js/frontend/handlers/archive-posts-skin-classic.js" /*!******************************************************************************************!*\ !*** ../modules/theme-builder/assets/js/frontend/handlers/archive-posts-skin-classic.js ***! \******************************************************************************************/ -/***/ ((__unused_webpack_module, exports, __webpack_require__) => { +(__unused_webpack_module, exports, __webpack_require__) { @@ -395,7 +395,7 @@ var _default = exports["default"] = _posts.default.extend({ } }); -/***/ }) +/***/ } }]); -//# sourceMappingURL=archive-posts.6e398ddd4a81a78bcea3.bundle.js.map \ No newline at end of file +//# sourceMappingURL=archive-posts.d82fc1f6376a91acb912.bundle.js.map diff --git a/assets/js/36c2990924ec9596ffad.bundle.js b/assets/js/b07282a36331e8a0c35e.bundle.js similarity index 96% rename from assets/js/36c2990924ec9596ffad.bundle.js rename to assets/js/b07282a36331e8a0c35e.bundle.js index 85e29b3f..bfaa8351 100644 --- a/assets/js/36c2990924ec9596ffad.bundle.js +++ b/assets/js/b07282a36331e8a0c35e.bundle.js @@ -1,12 +1,12 @@ -/*! pro-elements - v3.35.0 - 02-02-2026 */ +/*! pro-elements - v4.0.0 - 28-04-2026 */ "use strict"; (self["webpackChunkelementor_pro"] = self["webpackChunkelementor_pro"] || []).push([["modules_query-control_assets_js_editor_template-query-control_js"],{ -/***/ "../modules/query-control/assets/js/editor/template-query-control.js": +/***/ "../modules/query-control/assets/js/editor/template-query-control.js" /*!***************************************************************************!*\ !*** ../modules/query-control/assets/js/editor/template-query-control.js ***! \***************************************************************************/ -/***/ ((__unused_webpack_module, exports, __webpack_require__) => { +(__unused_webpack_module, exports, __webpack_require__) { /* provided dependency */ var __ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n")["__"]; @@ -172,7 +172,7 @@ class TemplateQueryControl extends _queryControl.default { } exports["default"] = TemplateQueryControl; -/***/ }) +/***/ } }]); -//# sourceMappingURL=36c2990924ec9596ffad.bundle.js.map \ No newline at end of file +//# sourceMappingURL=b07282a36331e8a0c35e.bundle.js.map diff --git a/assets/js/b24baa04ab276a4dc8a2.bundle.min.js b/assets/js/b24baa04ab276a4dc8a2.bundle.min.js new file mode 100644 index 00000000..cab600d0 --- /dev/null +++ b/assets/js/b24baa04ab276a4dc8a2.bundle.min.js @@ -0,0 +1,2 @@ +/*! pro-elements - v4.0.0 - 28-04-2026 */ +"use strict";(self.webpackChunkelementor_pro=self.webpackChunkelementor_pro||[]).push([[93],{73093(e,t,n){var o=n(12470).__,a=n(96784);t.default=void 0;var i=a(n(8300));class TemplateQueryControl extends i.default{ui(){return{...super.ui(),newButton:'button[data-action="new"]',editButton:'button[data-action="edit"]'}}events(){return{...super.events(),"click @ui.newButton":"onNewButtonClicked","click @ui.editButton":"onEditButtonClicked"}}onRender(...e){super.onRender(...e),this.toggleButtons(this.getControlValue())}onBaseInputChange(...e){super.onBaseInputChange(...e),this.toggleButtons(this.getInputValue(e[0].currentTarget))}toggleButtons(e){e?this.showEditTemplateButton():this.showNewTemplateButton()}showNewTemplateButton(){const e=this.ui?.newButton?.get(0),t=this.ui?.editButton?.get(0);e&&(e.style.display="block"),t&&(t.style.display="none")}showEditTemplateButton(){const e=this.ui.newButton.get(0),t=this.ui.editButton.get(0);e&&(e.style.display="none"),t&&(t.style.display="block")}async onNewButtonClicked(){this.createTemplate()}createTemplate(){this.confirmSaveBeforeTemplateCreateDialog||(this.confirmSaveBeforeTemplateCreateDialog=elementorCommon.dialogsManager.createWidget("confirm",{id:"e-confirm-save-before-template-create",headerMessage:o("Save Changes","elementor-pro"),message:o("Would you like to save the changes you've made?","elementor-pro"),position:{my:"center center",at:"center center"},strings:{confirm:o("Save","elementor-pro"),cancel:o("Discard","elementor-pro")},onConfirm:async()=>{await this.onConfirmCreateTemplate()}})),this.confirmSaveBeforeTemplateCreateDialog.show()}async onConfirmCreateTemplate(){$e.internal("panel/state-loading");const e=await this.createAndSetTemplate();this.afterAction("new",e),$e.internal("panel/state-ready")}async createAndSetTemplate(){const e=this.model.get("name"),t=this.options.container.controls[e].actions.new.document_config.type,n=this.getTemplateSourceTypeValue(),o=await $e.data.create("library/templates",{type:t,page_settings:{source:n}}),a=parseInt(o.data.template_id);return this.setValue(a),a}getTemplateSourceTypeValue(){return"repeater"===this.options?.container?.args?.type?this.options.container.renderer.args.settings.attributes._skin||void 0:this.options.container.controls._skin?this.options.container.panel.getControlView("_skin").getControlValue():void 0}async switchDocument(e){await $e.run("editor/documents/switch",{id:parseInt(e),mode:"save"});const t=elementor.documents.getCurrent();t.config.container_attributes&&t.config.container_attributes.class&&t.$element.addClass(t.config.container_attributes.class)}async onEditButtonClicked(){this.afterAction("edit",this.getControlValue())}getSelect2Placeholder(){return{id:"",text:o("Start typing its name","elementor-pro")}}async afterAction(e,t){"switch_document"===("new"===e?this.ui.newButton[0].getAttribute("data-after-action"):this.ui.editButton[0].getAttribute("data-after-action"))?await this.switchDocument(t):window.open(this.getThemeBuilderURL(t),"_blank")}getThemeBuilderURL(e){return`${elementor.config.admin_url}post.php?post=${e}&action=elementor`}}t.default=TemplateQueryControl}}]); diff --git a/assets/js/bd4b7d0b3467c3b749da.bundle.min.js b/assets/js/bd4b7d0b3467c3b749da.bundle.min.js new file mode 100644 index 00000000..e71d63b6 --- /dev/null +++ b/assets/js/bd4b7d0b3467c3b749da.bundle.min.js @@ -0,0 +1,3 @@ +/*! pro-elements - v4.0.0 - 28-04-2026 */ +/*! For license information please see bd4b7d0b3467c3b749da.bundle.min.js.LICENSE.txt */ +"use strict";(self.webpackChunkelementor_pro=self.webpackChunkelementor_pro||[]).push([[786],{4786(e){const{entries:t,setPrototypeOf:n,isFrozen:o,getPrototypeOf:a,getOwnPropertyDescriptor:r}=Object;let{freeze:i,seal:l,create:c}=Object,{apply:s,construct:u}="undefined"!=typeof Reflect&&Reflect;i||(i=function freeze(e){return e}),l||(l=function seal(e){return e}),s||(s=function apply(e,t){for(var n=arguments.length,o=new Array(n>2?n-2:0),a=2;a1?t-1:0),o=1;o1?n-1:0),a=1;a2&&void 0!==arguments[2]?arguments[2]:T;n&&n(e,null);let r=t.length;for(;r--;){let n=t[r];if("string"==typeof n){const e=a(n);e!==n&&(o(t)||(t[r]=e),n=e)}e[n]=!0}return e}function cleanArray(e){for(let t=0;t/gm),U=l(/\$\{[\w\W]*/gm),H=l(/^data-[\-\w.\u00B7-\uFFFF]+$/),F=l(/^aria-[\-\w]+$/),G=l(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),B=l(/^(?:\w+script|data):/i),W=l(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),Y=l(/^html$/i),j=l(/^[a-z][.\w]*(-[.\w]+)+$/i);var X=Object.freeze({__proto__:null,ARIA_ATTR:F,ATTR_WHITESPACE:W,CUSTOM_ELEMENT:j,DATA_ATTR:H,DOCTYPE_NAME:Y,ERB_EXPR:P,IS_ALLOWED_URI:G,IS_SCRIPT_OR_DATA:B,MUSTACHE_EXPR:z,TMPLIT_EXPR:U});const q=1,V=3,$=7,K=8,Z=9,J=function getGlobal(){return"undefined"==typeof window?null:window};var Q=function createDOMPurify(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:J();const DOMPurify=e=>createDOMPurify(e);if(DOMPurify.version="3.3.2",DOMPurify.removed=[],!e||!e.document||e.document.nodeType!==Z||!e.Element)return DOMPurify.isSupported=!1,DOMPurify;let{document:n}=e;const o=n,a=o.currentScript,{DocumentFragment:r,HTMLTemplateElement:l,Node:s,Element:u,NodeFilter:z,NamedNodeMap:P=e.NamedNodeMap||e.MozNamedAttrMap,HTMLFormElement:U,DOMParser:H,trustedTypes:F}=e,B=u.prototype,W=lookupGetter(B,"cloneNode"),j=lookupGetter(B,"remove"),Q=lookupGetter(B,"nextSibling"),ee=lookupGetter(B,"childNodes"),te=lookupGetter(B,"parentNode");if("function"==typeof l){const e=n.createElement("template");e.content&&e.content.ownerDocument&&(n=e.content.ownerDocument)}let ne,oe="";const{implementation:ae,createNodeIterator:re,createDocumentFragment:ie,getElementsByTagName:le}=n,{importNode:ce}=o;let se={afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]};DOMPurify.isSupported="function"==typeof t&&"function"==typeof te&&ae&&void 0!==ae.createHTMLDocument;const{MUSTACHE_EXPR:ue,ERB_EXPR:pe,TMPLIT_EXPR:de,DATA_ATTR:me,ARIA_ATTR:fe,IS_SCRIPT_OR_DATA:he,ATTR_WHITESPACE:Te,CUSTOM_ELEMENT:ge}=X;let{IS_ALLOWED_URI:ye}=X,Se=null;const _e=addToSet({},[...k,...D,...R,...C,...x]);let Ae=null;const Ee=addToSet({},[...v,...L,...I,...M]);let be=Object.seal(c(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),Ne=null,ke=null;const De=Object.seal(c(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}}));let Re=!0,we=!0,Ce=!1,Oe=!0,xe=!1,ve=!0,Le=!1,Ie=!1,Me=!1,ze=!1,Pe=!1,Ue=!1,He=!0,Fe=!1,Ge=!0,Be=!1,We={},Ye=null;const je=addToSet({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]);let Xe=null;const qe=addToSet({},["audio","video","img","source","image","track"]);let Ve=null;const $e=addToSet({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),Ke="http://www.w3.org/1998/Math/MathML",Ze="http://www.w3.org/2000/svg",Je="http://www.w3.org/1999/xhtml";let Qe=Je,et=!1,tt=null;const nt=addToSet({},[Ke,Ze,Je],g);let ot=addToSet({},["mi","mo","mn","ms","mtext"]),at=addToSet({},["annotation-xml"]);const rt=addToSet({},["title","style","font","a","script"]);let it=null;const lt=["application/xhtml+xml","text/html"];let ct=null,st=null;const ut=n.createElement("form"),pt=function isRegexOrFunction(e){return e instanceof RegExp||e instanceof Function},dt=function _parseConfig(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!st||st!==e){if(e&&"object"==typeof e||(e={}),e=clone(e),it=-1===lt.indexOf(e.PARSER_MEDIA_TYPE)?"text/html":e.PARSER_MEDIA_TYPE,ct="application/xhtml+xml"===it?g:T,Se=E(e,"ALLOWED_TAGS")?addToSet({},e.ALLOWED_TAGS,ct):_e,Ae=E(e,"ALLOWED_ATTR")?addToSet({},e.ALLOWED_ATTR,ct):Ee,tt=E(e,"ALLOWED_NAMESPACES")?addToSet({},e.ALLOWED_NAMESPACES,g):nt,Ve=E(e,"ADD_URI_SAFE_ATTR")?addToSet(clone($e),e.ADD_URI_SAFE_ATTR,ct):$e,Xe=E(e,"ADD_DATA_URI_TAGS")?addToSet(clone(qe),e.ADD_DATA_URI_TAGS,ct):qe,Ye=E(e,"FORBID_CONTENTS")?addToSet({},e.FORBID_CONTENTS,ct):je,Ne=E(e,"FORBID_TAGS")?addToSet({},e.FORBID_TAGS,ct):clone({}),ke=E(e,"FORBID_ATTR")?addToSet({},e.FORBID_ATTR,ct):clone({}),We=!!E(e,"USE_PROFILES")&&e.USE_PROFILES,Re=!1!==e.ALLOW_ARIA_ATTR,we=!1!==e.ALLOW_DATA_ATTR,Ce=e.ALLOW_UNKNOWN_PROTOCOLS||!1,Oe=!1!==e.ALLOW_SELF_CLOSE_IN_ATTR,xe=e.SAFE_FOR_TEMPLATES||!1,ve=!1!==e.SAFE_FOR_XML,Le=e.WHOLE_DOCUMENT||!1,ze=e.RETURN_DOM||!1,Pe=e.RETURN_DOM_FRAGMENT||!1,Ue=e.RETURN_TRUSTED_TYPE||!1,Me=e.FORCE_BODY||!1,He=!1!==e.SANITIZE_DOM,Fe=e.SANITIZE_NAMED_PROPS||!1,Ge=!1!==e.KEEP_CONTENT,Be=e.IN_PLACE||!1,ye=e.ALLOWED_URI_REGEXP||G,Qe=e.NAMESPACE||Je,ot=e.MATHML_TEXT_INTEGRATION_POINTS||ot,at=e.HTML_INTEGRATION_POINTS||at,be=e.CUSTOM_ELEMENT_HANDLING||{},e.CUSTOM_ELEMENT_HANDLING&&pt(e.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(be.tagNameCheck=e.CUSTOM_ELEMENT_HANDLING.tagNameCheck),e.CUSTOM_ELEMENT_HANDLING&&pt(e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(be.attributeNameCheck=e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),e.CUSTOM_ELEMENT_HANDLING&&"boolean"==typeof e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements&&(be.allowCustomizedBuiltInElements=e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),xe&&(we=!1),Pe&&(ze=!0),We&&(Se=addToSet({},x),Ae=c(null),!0===We.html&&(addToSet(Se,k),addToSet(Ae,v)),!0===We.svg&&(addToSet(Se,D),addToSet(Ae,L),addToSet(Ae,M)),!0===We.svgFilters&&(addToSet(Se,R),addToSet(Ae,L),addToSet(Ae,M)),!0===We.mathMl&&(addToSet(Se,C),addToSet(Ae,I),addToSet(Ae,M))),E(e,"ADD_TAGS")||(De.tagCheck=null),E(e,"ADD_ATTR")||(De.attributeCheck=null),e.ADD_TAGS&&("function"==typeof e.ADD_TAGS?De.tagCheck=e.ADD_TAGS:(Se===_e&&(Se=clone(Se)),addToSet(Se,e.ADD_TAGS,ct))),e.ADD_ATTR&&("function"==typeof e.ADD_ATTR?De.attributeCheck=e.ADD_ATTR:(Ae===Ee&&(Ae=clone(Ae)),addToSet(Ae,e.ADD_ATTR,ct))),e.ADD_URI_SAFE_ATTR&&addToSet(Ve,e.ADD_URI_SAFE_ATTR,ct),e.FORBID_CONTENTS&&(Ye===je&&(Ye=clone(Ye)),addToSet(Ye,e.FORBID_CONTENTS,ct)),e.ADD_FORBID_CONTENTS&&(Ye===je&&(Ye=clone(Ye)),addToSet(Ye,e.ADD_FORBID_CONTENTS,ct)),Ge&&(Se["#text"]=!0),Le&&addToSet(Se,["html","head","body"]),Se.table&&(addToSet(Se,["tbody"]),delete Ne.tbody),e.TRUSTED_TYPES_POLICY){if("function"!=typeof e.TRUSTED_TYPES_POLICY.createHTML)throw N('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if("function"!=typeof e.TRUSTED_TYPES_POLICY.createScriptURL)throw N('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');ne=e.TRUSTED_TYPES_POLICY,oe=ne.createHTML("")}else void 0===ne&&(ne=function _createTrustedTypesPolicy(e,t){if("object"!=typeof e||"function"!=typeof e.createPolicy)return null;let n=null;const o="data-tt-policy-suffix";t&&t.hasAttribute(o)&&(n=t.getAttribute(o));const a="dompurify"+(n?"#"+n:"");try{return e.createPolicy(a,{createHTML:e=>e,createScriptURL:e=>e})}catch(e){return console.warn("TrustedTypes policy "+a+" could not be created."),null}}(F,a)),null!==ne&&"string"==typeof oe&&(oe=ne.createHTML(""));i&&i(e),st=e}},mt=addToSet({},[...D,...R,...w]),ft=addToSet({},[...C,...O]),ht=function _forceRemove(e){f(DOMPurify.removed,{element:e});try{te(e).removeChild(e)}catch(t){j(e)}},Tt=function _removeAttribute(e,t){try{f(DOMPurify.removed,{attribute:t.getAttributeNode(e),from:t})}catch(e){f(DOMPurify.removed,{attribute:null,from:t})}if(t.removeAttribute(e),"is"===e)if(ze||Pe)try{ht(t)}catch(e){}else try{t.setAttribute(e,"")}catch(e){}},gt=function _initDocument(e){let t=null,o=null;if(Me)e=""+e;else{const t=y(e,/^[\r\n\t ]+/);o=t&&t[0]}"application/xhtml+xml"===it&&Qe===Je&&(e=''+e+"");const a=ne?ne.createHTML(e):e;if(Qe===Je)try{t=(new H).parseFromString(a,it)}catch(e){}if(!t||!t.documentElement){t=ae.createDocument(Qe,"template",null);try{t.documentElement.innerHTML=et?oe:a}catch(e){}}const r=t.body||t.documentElement;return e&&o&&r.insertBefore(n.createTextNode(o),r.childNodes[0]||null),Qe===Je?le.call(t,Le?"html":"body")[0]:Le?t.documentElement:r},yt=function _createNodeIterator(e){return re.call(e.ownerDocument||e,e,z.SHOW_ELEMENT|z.SHOW_COMMENT|z.SHOW_TEXT|z.SHOW_PROCESSING_INSTRUCTION|z.SHOW_CDATA_SECTION,null)},St=function _isClobbered(e){return e instanceof U&&("string"!=typeof e.nodeName||"string"!=typeof e.textContent||"function"!=typeof e.removeChild||!(e.attributes instanceof P)||"function"!=typeof e.removeAttribute||"function"!=typeof e.setAttribute||"string"!=typeof e.namespaceURI||"function"!=typeof e.insertBefore||"function"!=typeof e.hasChildNodes)},_t=function _isNode(e){return"function"==typeof s&&e instanceof s};function _executeHooks(e,t,n){p(e,e=>{e.call(DOMPurify,t,n,st)})}const At=function _sanitizeElements(e){let t=null;if(_executeHooks(se.beforeSanitizeElements,e,null),St(e))return ht(e),!0;const n=ct(e.nodeName);if(_executeHooks(se.uponSanitizeElement,e,{tagName:n,allowedTags:Se}),ve&&e.hasChildNodes()&&!_t(e.firstElementChild)&&b(/<[/\w!]/g,e.innerHTML)&&b(/<[/\w!]/g,e.textContent))return ht(e),!0;if(e.nodeType===$)return ht(e),!0;if(ve&&e.nodeType===K&&b(/<[/\w]/g,e.data))return ht(e),!0;if(!(De.tagCheck instanceof Function&&De.tagCheck(n))&&(!Se[n]||Ne[n])){if(!Ne[n]&&bt(n)){if(be.tagNameCheck instanceof RegExp&&b(be.tagNameCheck,n))return!1;if(be.tagNameCheck instanceof Function&&be.tagNameCheck(n))return!1}if(Ge&&!Ye[n]){const t=te(e)||e.parentNode,n=ee(e)||e.childNodes;if(n&&t){for(let o=n.length-1;o>=0;--o){const a=W(n[o],!0);a.__removalCount=(e.__removalCount||0)+1,t.insertBefore(a,Q(e))}}}return ht(e),!0}return e instanceof u&&!function _checkValidNamespace(e){let t=te(e);t&&t.tagName||(t={namespaceURI:Qe,tagName:"template"});const n=T(e.tagName),o=T(t.tagName);return!!tt[e.namespaceURI]&&(e.namespaceURI===Ze?t.namespaceURI===Je?"svg"===n:t.namespaceURI===Ke?"svg"===n&&("annotation-xml"===o||ot[o]):Boolean(mt[n]):e.namespaceURI===Ke?t.namespaceURI===Je?"math"===n:t.namespaceURI===Ze?"math"===n&&at[o]:Boolean(ft[n]):e.namespaceURI===Je?!(t.namespaceURI===Ze&&!at[o])&&!(t.namespaceURI===Ke&&!ot[o])&&!ft[n]&&(rt[n]||!mt[n]):!("application/xhtml+xml"!==it||!tt[e.namespaceURI]))}(e)?(ht(e),!0):"noscript"!==n&&"noembed"!==n&&"noframes"!==n||!b(/<\/no(script|embed|frames)/i,e.innerHTML)?(xe&&e.nodeType===V&&(t=e.textContent,p([ue,pe,de],e=>{t=S(t,e," ")}),e.textContent!==t&&(f(DOMPurify.removed,{element:e.cloneNode()}),e.textContent=t)),_executeHooks(se.afterSanitizeElements,e,null),!1):(ht(e),!0)},Et=function _isValidAttribute(e,t,o){if(ke[t])return!1;if(He&&("id"===t||"name"===t)&&(o in n||o in ut))return!1;if(we&&!ke[t]&&b(me,t));else if(Re&&b(fe,t));else if(De.attributeCheck instanceof Function&&De.attributeCheck(t,e));else if(!Ae[t]||ke[t]){if(!(bt(e)&&(be.tagNameCheck instanceof RegExp&&b(be.tagNameCheck,e)||be.tagNameCheck instanceof Function&&be.tagNameCheck(e))&&(be.attributeNameCheck instanceof RegExp&&b(be.attributeNameCheck,t)||be.attributeNameCheck instanceof Function&&be.attributeNameCheck(t,e))||"is"===t&&be.allowCustomizedBuiltInElements&&(be.tagNameCheck instanceof RegExp&&b(be.tagNameCheck,o)||be.tagNameCheck instanceof Function&&be.tagNameCheck(o))))return!1}else if(Ve[t]);else if(b(ye,S(o,Te,"")));else if("src"!==t&&"xlink:href"!==t&&"href"!==t||"script"===e||0!==_(o,"data:")||!Xe[e]){if(Ce&&!b(he,S(o,Te,"")));else if(o)return!1}else;return!0},bt=function _isBasicCustomElement(e){return"annotation-xml"!==e&&y(e,ge)},Nt=function _sanitizeAttributes(e){_executeHooks(se.beforeSanitizeAttributes,e,null);const{attributes:t}=e;if(!t||St(e))return;const n={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:Ae,forceKeepAttr:void 0};let o=t.length;for(;o--;){const a=t[o],{name:r,namespaceURI:i,value:l}=a,c=ct(r),s=l;let u="value"===r?s:A(s);if(n.attrName=c,n.attrValue=u,n.keepAttr=!0,n.forceKeepAttr=void 0,_executeHooks(se.uponSanitizeAttribute,e,n),u=n.attrValue,!Fe||"id"!==c&&"name"!==c||(Tt(r,e),u="user-content-"+u),ve&&b(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i,u)){Tt(r,e);continue}if("attributename"===c&&y(u,"href")){Tt(r,e);continue}if(n.forceKeepAttr)continue;if(!n.keepAttr){Tt(r,e);continue}if(!Oe&&b(/\/>/i,u)){Tt(r,e);continue}xe&&p([ue,pe,de],e=>{u=S(u,e," ")});const d=ct(e.nodeName);if(Et(d,c,u)){if(ne&&"object"==typeof F&&"function"==typeof F.getAttributeType)if(i);else switch(F.getAttributeType(d,c)){case"TrustedHTML":u=ne.createHTML(u);break;case"TrustedScriptURL":u=ne.createScriptURL(u)}if(u!==s)try{i?e.setAttributeNS(i,r,u):e.setAttribute(r,u),St(e)?ht(e):m(DOMPurify.removed)}catch(t){Tt(r,e)}}else Tt(r,e)}_executeHooks(se.afterSanitizeAttributes,e,null)},kt=function _sanitizeShadowDOM(e){let t=null;const n=yt(e);for(_executeHooks(se.beforeSanitizeShadowDOM,e,null);t=n.nextNode();)_executeHooks(se.uponSanitizeShadowNode,t,null),At(t),Nt(t),t.content instanceof r&&_sanitizeShadowDOM(t.content);_executeHooks(se.afterSanitizeShadowDOM,e,null)};return DOMPurify.sanitize=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=null,a=null,i=null,l=null;if(et=!e,et&&(e="\x3c!--\x3e"),"string"!=typeof e&&!_t(e)){if("function"!=typeof e.toString)throw N("toString is not a function");if("string"!=typeof(e=e.toString()))throw N("dirty is not a string, aborting")}if(!DOMPurify.isSupported)return e;if(Ie||dt(t),DOMPurify.removed=[],"string"==typeof e&&(Be=!1),Be){if(e.nodeName){const t=ct(e.nodeName);if(!Se[t]||Ne[t])throw N("root node is forbidden and cannot be sanitized in-place")}}else if(e instanceof s)n=gt("\x3c!----\x3e"),a=n.ownerDocument.importNode(e,!0),a.nodeType===q&&"BODY"===a.nodeName||"HTML"===a.nodeName?n=a:n.appendChild(a);else{if(!ze&&!xe&&!Le&&-1===e.indexOf("<"))return ne&&Ue?ne.createHTML(e):e;if(n=gt(e),!n)return ze?null:Ue?oe:""}n&&Me&&ht(n.firstChild);const c=yt(Be?e:n);for(;i=c.nextNode();)At(i),Nt(i),i.content instanceof r&&kt(i.content);if(Be)return e;if(ze){if(Pe)for(l=ie.call(n.ownerDocument);n.firstChild;)l.appendChild(n.firstChild);else l=n;return(Ae.shadowroot||Ae.shadowrootmode)&&(l=ce.call(o,l,!0)),l}let u=Le?n.outerHTML:n.innerHTML;return Le&&Se["!doctype"]&&n.ownerDocument&&n.ownerDocument.doctype&&n.ownerDocument.doctype.name&&b(Y,n.ownerDocument.doctype.name)&&(u="\n"+u),xe&&p([ue,pe,de],e=>{u=S(u,e," ")}),ne&&Ue?ne.createHTML(u):u},DOMPurify.setConfig=function(){dt(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}),Ie=!0},DOMPurify.clearConfig=function(){st=null,Ie=!1},DOMPurify.isValidAttribute=function(e,t,n){st||dt({});const o=ct(e),a=ct(t);return Et(o,a,n)},DOMPurify.addHook=function(e,t){"function"==typeof t&&f(se[e],t)},DOMPurify.removeHook=function(e,t){if(void 0!==t){const n=d(se[e],t);return-1===n?void 0:h(se[e],n,1)[0]}return m(se[e])},DOMPurify.removeHooks=function(e){se[e]=[]},DOMPurify.removeAllHooks=function(){se={afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}},DOMPurify}();e.exports=Q}}]); diff --git a/assets/js/bd4b7d0b3467c3b749da.bundle.min.js.LICENSE.txt b/assets/js/bd4b7d0b3467c3b749da.bundle.min.js.LICENSE.txt new file mode 100644 index 00000000..6bb2ae82 --- /dev/null +++ b/assets/js/bd4b7d0b3467c3b749da.bundle.min.js.LICENSE.txt @@ -0,0 +1 @@ +/*! @license DOMPurify 3.3.2 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.3.2/LICENSE */ diff --git a/assets/js/carousel.e2af910b095554625156.bundle.min.js b/assets/js/carousel.e2af910b095554625156.bundle.min.js new file mode 100644 index 00000000..f4b0f3f9 --- /dev/null +++ b/assets/js/carousel.e2af910b095554625156.bundle.min.js @@ -0,0 +1,2 @@ +/*! pro-elements - v4.0.0 - 28-04-2026 */ +"use strict";(self.webpackChunkelementor_pro=self.webpackChunkelementor_pro||[]).push([[897],{5456(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;class CarouselBase extends elementorModules.frontend.handlers.SwiperBase{getDefaultSettings(){return{selectors:{swiperContainer:".elementor-main-swiper",swiperSlide:".swiper-slide"},slidesPerView:{widescreen:3,desktop:3,laptop:3,tablet_extra:3,tablet:2,mobile_extra:2,mobile:1}}}getDefaultElements(){const e=this.getSettings("selectors"),t={$swiperContainer:this.$element.find(e.swiperContainer)};return t.$slides=t.$swiperContainer.find(e.swiperSlide),t}getEffect(){return this.getElementSettings("effect")}getDeviceSlidesPerView(e){const t="slides_per_view"+("desktop"===e?"":"_"+e);return Math.min(this.getSlidesCount(),+this.getElementSettings(t)||this.getSettings("slidesPerView")[e])}getSlidesPerView(e){return"slide"===this.getEffect()?this.getDeviceSlidesPerView(e):1}getDeviceSlidesToScroll(e){const t="slides_to_scroll"+("desktop"===e?"":"_"+e);return Math.min(this.getSlidesCount(),+this.getElementSettings(t)||1)}getSlidesToScroll(e){return"slide"===this.getEffect()?this.getDeviceSlidesToScroll(e):1}getSpaceBetween(e){let t="space_between";return e&&"desktop"!==e&&(t+="_"+e),this.getElementSettings(t).size||0}getSwiperOptions(){const e=this.getElementSettings(),t={grabCursor:!0,initialSlide:this.getInitialSlide(),slidesPerView:this.getSlidesPerView("desktop"),slidesPerGroup:this.getSlidesToScroll("desktop"),spaceBetween:this.getSpaceBetween(),loop:"yes"===e.loop,speed:e.speed,effect:this.getEffect(),preventClicksPropagation:!1,slideToClickedSlide:!0,handleElementorBreakpoints:!0};if("yes"===e.lazyload&&(t.lazy={loadPrevNext:!0,loadPrevNextAmount:1}),e.show_arrows&&(t.navigation={prevEl:".elementor-swiper-button-prev",nextEl:".elementor-swiper-button-next"}),e.pagination&&(t.pagination={el:".swiper-pagination",type:e.pagination,clickable:!0}),"cube"!==this.getEffect()){const e={},i=elementorFrontend.config.responsive.activeBreakpoints;Object.keys(i).forEach(t=>{e[i[t].value]={slidesPerView:this.getSlidesPerView(t),slidesPerGroup:this.getSlidesToScroll(t),spaceBetween:this.getSpaceBetween(t)}}),t.breakpoints=e}return!this.isEdit&&e.autoplay&&(t.autoplay={delay:e.autoplay_speed,disableOnInteraction:!!e.pause_on_interaction}),t}getDeviceBreakpointValue(e){if(!this.breakpointsDictionary){const e=elementorFrontend.config.responsive.activeBreakpoints;this.breakpointsDictionary={},Object.keys(e).forEach(t=>{this.breakpointsDictionary[t]=e[t].value})}return this.breakpointsDictionary[e]}updateSpaceBetween(e){const t=e.match("space_between_(.*)"),i=t?t[1]:"desktop",s=this.getSpaceBetween(i);"desktop"!==i?this.swiper.params.breakpoints[this.getDeviceBreakpointValue(i)].spaceBetween=s:this.swiper.params.spaceBetween=s,this.swiper.params.spaceBetween=s,this.swiper.update()}async onInit(){if(elementorModules.frontend.handlers.Base.prototype.onInit.apply(this,arguments),1>=this.getSlidesCount())return;const e=elementorFrontend.utils.swiper;this.swiper=await new e(this.elements.$swiperContainer,this.getSwiperOptions());"yes"===this.getElementSettings().pause_on_hover&&this.togglePauseOnHover(!0),this.elements.$swiperContainer.data("swiper",this.swiper)}getChangeableProperties(){return{autoplay:"autoplay",pause_on_hover:"pauseOnHover",pause_on_interaction:"disableOnInteraction",autoplay_speed:"delay",speed:"speed",width:"width"}}updateSwiperOption(e){if(0===e.indexOf("width"))return void this.swiper.update();const t=this.getElementSettings(),i=t[e];let s=this.getChangeableProperties()[e],n=i;switch(e){case"autoplay":n=!!i&&{delay:t.autoplay_speed,disableOnInteraction:"yes"===t.pause_on_interaction};break;case"autoplay_speed":s="autoplay",n={delay:i,disableOnInteraction:"yes"===t.pause_on_interaction};break;case"pause_on_hover":this.togglePauseOnHover("yes"===i);break;case"pause_on_interaction":n="yes"===i}"pause_on_hover"!==e&&(this.swiper.params[s]=n),this.swiper.update()}onElementChange(e){if(1>=this.getSlidesCount())return;if(0===e.indexOf("width"))return this.swiper.update(),void(this.thumbsSwiper&&this.thumbsSwiper.update());if(0===e.indexOf("space_between"))return void this.updateSpaceBetween(e);const t=this.getChangeableProperties();Object.prototype.hasOwnProperty.call(t,e)&&this.updateSwiperOption(e)}onEditSettingsChange(e){1>=this.getSlidesCount()||"activeItemIndex"===e&&this.swiper.slideToLoop(this.getEditSettings("activeItemIndex")-1)}}t.default=CarouselBase},7181(e,t,i){var s=i(6784);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=s(i(5456));class TestimonialCarousel extends n.default{getDefaultSettings(){const e=super.getDefaultSettings();return e.slidesPerView={desktop:1},Object.keys(elementorFrontend.config.responsive.activeBreakpoints).forEach(t=>{e.slidesPerView[t]=1}),e.loop&&(e.loopedSlides=this.getSlidesCount()),e}getEffect(){return"slide"}}t.default=TestimonialCarousel}}]); diff --git a/assets/js/carousel.298f1fc9c115422aad0e.bundle.js b/assets/js/carousel.f93681c60a8355c99044.bundle.js similarity index 96% rename from assets/js/carousel.298f1fc9c115422aad0e.bundle.js rename to assets/js/carousel.f93681c60a8355c99044.bundle.js index 93fca3d9..aebd0006 100644 --- a/assets/js/carousel.298f1fc9c115422aad0e.bundle.js +++ b/assets/js/carousel.f93681c60a8355c99044.bundle.js @@ -1,12 +1,12 @@ -/*! pro-elements - v3.35.0 - 02-02-2026 */ +/*! pro-elements - v4.0.0 - 28-04-2026 */ "use strict"; (self["webpackChunkelementor_pro"] = self["webpackChunkelementor_pro"] || []).push([["carousel"],{ -/***/ "../modules/carousel/assets/js/frontend/handlers/base.js": +/***/ "../modules/carousel/assets/js/frontend/handlers/base.js" /*!***************************************************************!*\ !*** ../modules/carousel/assets/js/frontend/handlers/base.js ***! \***************************************************************/ -/***/ ((__unused_webpack_module, exports) => { +(__unused_webpack_module, exports) { @@ -252,13 +252,13 @@ class CarouselBase extends elementorModules.frontend.handlers.SwiperBase { } exports["default"] = CarouselBase; -/***/ }), +/***/ }, -/***/ "../modules/carousel/assets/js/frontend/handlers/testimonial-carousel.js": +/***/ "../modules/carousel/assets/js/frontend/handlers/testimonial-carousel.js" /*!*******************************************************************************!*\ !*** ../modules/carousel/assets/js/frontend/handlers/testimonial-carousel.js ***! \*******************************************************************************/ -/***/ ((__unused_webpack_module, exports, __webpack_require__) => { +(__unused_webpack_module, exports, __webpack_require__) { @@ -288,7 +288,7 @@ class TestimonialCarousel extends _base.default { } exports["default"] = TestimonialCarousel; -/***/ }) +/***/ } }]); -//# sourceMappingURL=carousel.298f1fc9c115422aad0e.bundle.js.map \ No newline at end of file +//# sourceMappingURL=carousel.f93681c60a8355c99044.bundle.js.map diff --git a/assets/js/code-highlight.38ec4828db8d33cccbe9.bundle.min.js b/assets/js/code-highlight.38ec4828db8d33cccbe9.bundle.min.js new file mode 100644 index 00000000..2d66b852 --- /dev/null +++ b/assets/js/code-highlight.38ec4828db8d33cccbe9.bundle.min.js @@ -0,0 +1,2 @@ +/*! pro-elements - v4.0.0 - 28-04-2026 */ +"use strict";(self.webpackChunkelementor_pro=self.webpackChunkelementor_pro||[]).push([[635],{7193(e,l){Object.defineProperty(l,"__esModule",{value:!0}),l.default=void 0;class codeHighlightHandler extends elementorModules.frontend.handlers.Base{onInit(...e){super.onInit(...e),Prism.highlightAllUnder(this.$element[0],!1)}onElementChange(){Prism.highlightAllUnder(this.$element[0],!1)}}l.default=codeHighlightHandler}}]); diff --git a/assets/js/code-highlight.7121ad6fca6bf899bbb5.bundle.js b/assets/js/code-highlight.872070dcb83100cdc6a7.bundle.js similarity index 77% rename from assets/js/code-highlight.7121ad6fca6bf899bbb5.bundle.js rename to assets/js/code-highlight.872070dcb83100cdc6a7.bundle.js index 19e67092..dfab8915 100644 --- a/assets/js/code-highlight.7121ad6fca6bf899bbb5.bundle.js +++ b/assets/js/code-highlight.872070dcb83100cdc6a7.bundle.js @@ -1,12 +1,12 @@ -/*! pro-elements - v3.35.0 - 02-02-2026 */ +/*! pro-elements - v4.0.0 - 28-04-2026 */ "use strict"; (self["webpackChunkelementor_pro"] = self["webpackChunkelementor_pro"] || []).push([["code-highlight"],{ -/***/ "../modules/code-highlight/assets/js/frontend/handler.js": +/***/ "../modules/code-highlight/assets/js/frontend/handler.js" /*!***************************************************************!*\ !*** ../modules/code-highlight/assets/js/frontend/handler.js ***! \***************************************************************/ -/***/ ((__unused_webpack_module, exports) => { +(__unused_webpack_module, exports) { @@ -26,7 +26,7 @@ class codeHighlightHandler extends elementorModules.frontend.handlers.Base { } exports["default"] = codeHighlightHandler; -/***/ }) +/***/ } }]); -//# sourceMappingURL=code-highlight.7121ad6fca6bf899bbb5.bundle.js.map \ No newline at end of file +//# sourceMappingURL=code-highlight.872070dcb83100cdc6a7.bundle.js.map diff --git a/assets/js/contact-buttons-var-10.11bf4233106e1245bd61.bundle.min.js b/assets/js/contact-buttons-var-10.11bf4233106e1245bd61.bundle.min.js new file mode 100644 index 00000000..436a16f1 --- /dev/null +++ b/assets/js/contact-buttons-var-10.11bf4233106e1245bd61.bundle.min.js @@ -0,0 +1,2 @@ +/*! pro-elements - v4.0.0 - 28-04-2026 */ +"use strict";(self.webpackChunkelementor_pro=self.webpackChunkelementor_pro||[]).push([[61],{8562(t){t.exports=elementorModules.ViewModule.extend({$element:null,editorListeners:null,onElementChange:null,onEditSettingsChange:null,onPageSettingsChange:null,isEdit:null,__construct(t){this.isActive(t)&&(this.$element=t.$element,this.isEdit=this.$element.hasClass("elementor-element-edit-mode"),this.isEdit&&this.addEditorListeners())},isActive:()=>!0,isElementInTheCurrentDocument(){return!!elementorFrontend.isEditMode()&&elementor.documents.currentDocument.id.toString()===this.$element[0].closest(".elementor").dataset.elementorId},findElement(t){var e=this.$element;return e.find(t).filter(function(){return jQuery(this).parent().closest(".elementor-element").is(e)})},getUniqueHandlerID(t,e){return t||(t=this.getModelCID()),e||(e=this.$element),t+e.attr("data-element_type")+this.getConstructorID()},initEditorListeners(){var t=this;if(t.editorListeners=[{event:"element:destroy",to:elementor.channels.data,callback(e){e.cid===t.getModelCID()&&t.onDestroy()}}],t.onElementChange){const e=t.getWidgetType()||t.getElementType();let n="change";"global"!==e&&(n+=":"+e),t.editorListeners.push({event:n,to:elementor.channels.editor,callback(e,n){t.getUniqueHandlerID(n.model.cid,n.$el)===t.getUniqueHandlerID()&&t.onElementChange(e.model.get("name"),e,n)}})}t.onEditSettingsChange&&t.editorListeners.push({event:"change:editSettings",to:elementor.channels.editor,callback(e,n){if(n.model.cid!==t.getModelCID())return;const s=Object.keys(e.changed)[0];t.onEditSettingsChange(s,e.changed[s])}}),["page"].forEach(function(e){var n="on"+e[0].toUpperCase()+e.slice(1)+"SettingsChange";t[n]&&t.editorListeners.push({event:"change",to:elementor.settings[e].model,callback(e){t[n](e.changed)}})})},getEditorListeners(){return this.editorListeners||this.initEditorListeners(),this.editorListeners},addEditorListeners(){var t=this.getUniqueHandlerID();this.getEditorListeners().forEach(function(e){elementorFrontend.addListenerOnce(t,e.event,e.callback,e.to)})},removeEditorListeners(){var t=this.getUniqueHandlerID();this.getEditorListeners().forEach(function(e){elementorFrontend.removeListeners(t,e.event,null,e.to)})},getElementType(){return this.$element.data("element_type")},getWidgetType(){const t=this.$element.data("widget_type");if(t)return t.split(".")[0]},getID(){return this.$element.data("id")},getModelCID(){return this.$element.data("model-cid")},getElementSettings(t){let e={};const n=this.getModelCID();if(this.isEdit&&n){const t=elementorFrontend.config.elements.data[n],s=t.attributes;let i=s.widgetType||s.elType;s.isInner&&(i="inner-"+i);let o=elementorFrontend.config.elements.keys[i];o||(o=elementorFrontend.config.elements.keys[i]=[],jQuery.each(t.controls,(t,e)=>{(e.frontend_available||e.editor_available)&&o.push(t)})),jQuery.each(t.getActiveControls(),function(t){if(-1!==o.indexOf(t)){let n=s[t];n.toJSON&&(n=n.toJSON()),e[t]=n}})}else e=this.$element.data("settings")||{};return this.getItems(e,t)},getEditSettings(t){var e={};return this.isEdit&&(e=elementorFrontend.config.elements.editSettings[this.getModelCID()].attributes),this.getItems(e,t)},getCurrentDeviceSetting(t){return elementorFrontend.getCurrentDeviceSetting(this.getElementSettings(),t)},onInit(){this.isActive(this.getSettings())&&elementorModules.ViewModule.prototype.onInit.apply(this,arguments)},onDestroy(){this.isEdit&&this.removeEditorListeners(),this.unbindEvents&&this.unbindEvents()}})},7263(t,e,n){var s=n(6784);Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var i=s(n(8562)),o=s(n(8243));class ContactButtonsv10Handler extends i.default{getDefaultSettings(){return{selectors:{main:".e-contact-buttons-var-10",links:".e-contact-buttons__contact-icon-link"},constants:{active:"active"}}}getDefaultElements(){const t=this.getSettings("selectors");return{main:this.$element[0].querySelector(t.main),links:this.$element[0].querySelectorAll(t.links)}}isMobileDevice(){return["mobile","mobile_extra"].includes(elementorFrontend.getCurrentDeviceMode())}handleLinkClick(t){t.preventDefault();const{active:e}=this.getSettings("constants");if(t.currentTarget.classList.contains(e)){const n=t.currentTarget.getAttribute("href"),s=t.currentTarget.getAttribute("target");s?window.open(n,s):n&&(window.location.href=n),t.currentTarget.classList.remove(e)}else this.closeAllLinks(),t.currentTarget.classList.add(e)}closeAllLinks(){const{active:t}=this.getSettings("constants");this.elements.links.forEach(e=>e.classList.remove(t))}linksEventListeners(){this.elements.links.length&&this.isMobileDevice()&&(this.elements.links.forEach(t=>{t.addEventListener("click",t=>{this.handleLinkClick(t)})}),document.addEventListener("click",t=>{this.elements.main.contains(t.target)||this.closeAllLinks()}))}bindEvents(){this.linksEventListeners()}setupInnerContainer(){this.elements.main.closest(".e-con-inner").classList.add("e-con-inner--floating-buttons")}onInit(...t){super.onInit(...t),this.clickTrackingHandler=new o.default({$element:this.$element}),this.setupInnerContainer()}}e.default=ContactButtonsv10Handler},8243(t,e,n){var s=n(6784);Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var i=s(n(8562));class ClickTrackingHandler extends i.default{clicks=[];getDefaultSettings(){return{selectors:{contentWrapper:".e-contact-buttons__content-wrapper",contentWrapperFloatingBars:".e-floating-bars",floatingBarCouponButton:".e-floating-bars__coupon-button",floatingBarsHeadline:".e-floating-bars__headline",contactButtonsVar4:".e-contact-buttons__contact-icon-link",contactButtonsVar5:".e-contact-buttons__chat-button",contactButtonsVar6:".e-contact-buttons-var-6",contactButtonsVar8:".e-contact-buttons-var-8",elementorWrapper:'[data-elementor-type="floating-buttons"]',contactButtonCore:".e-contact-buttons__send-button"}}}getDefaultElements(){const t=this.getSettings("selectors");return{contentWrapper:this.$element[0].querySelector(t.contentWrapper),contentWrapperFloatingBars:this.$element[0].querySelector(t.contentWrapperFloatingBars),contactButtonsVar5:this.$element[0].querySelector(t.contactButtonsVar5),contactButtonsVar6:this.$element[0].querySelector(t.contactButtonsVar6)}}bindEvents(){this.elements.contentWrapper&&this.elements.contentWrapper.addEventListener("click",this.onChatButtonTrackClick.bind(this)),this.elements.contactButtonsVar5&&this.elements.contactButtonsVar5.addEventListener("click",this.onChatButtonTrackClick.bind(this)),this.elements.contactButtonsVar6&&this.elements.contactButtonsVar6.addEventListener("click",this.onChatButtonTrackClick.bind(this)),this.elements.contentWrapperFloatingBars&&this.elements.contentWrapperFloatingBars.addEventListener("click",this.onChatButtonTrackClick.bind(this)),window.addEventListener("beforeunload",()=>{this.clicks.length>0&&this.sendClicks()})}onChatButtonTrackClick(t){const e=t.target||t.srcElement,n=this.getSettings("selectors"),s=[n.contactButtonsVar4,n.contactButtonsVar6,n.floatingBarCouponButton,n.floatingBarsHeadline,n.contactButtonCore];for(const t of s)(e.matches(t)||e.closest(t))&&this.getDocumentIdAndTrack(e,n);(e.matches(n.contactButtonsVar5)||e.closest(n.contactButtonsVar5))&&e.closest(".e-contact-buttons-var-5")&&this.getDocumentIdAndTrack(e,n)}getDocumentIdAndTrack(t,e){const n=t.closest(e.elementorWrapper).dataset.elementorId;this.trackClick(n)}trackClick(t){t&&(this.clicks.push(t),this.clicks.length>=10&&this.sendClicks())}sendClicks(){const t=new FormData;t.append("action","elementor_send_clicks"),t.append("_nonce",elementorFrontendConfig?.nonces?.floatingButtonsClickTracking),this.clicks.forEach(e=>t.append("clicks[]",e)),fetch(elementorFrontendConfig?.urls?.ajaxurl,{method:"POST",body:t}).then(()=>{this.clicks=[]})}}e.default=ClickTrackingHandler}}]); diff --git a/assets/js/contact-buttons-var-10.44dafff87cd10dfffc68.bundle.js b/assets/js/contact-buttons-var-10.6caef1cb29200dd63f5a.bundle.js similarity index 97% rename from assets/js/contact-buttons-var-10.44dafff87cd10dfffc68.bundle.js rename to assets/js/contact-buttons-var-10.6caef1cb29200dd63f5a.bundle.js index 48142da9..a4d2a94c 100644 --- a/assets/js/contact-buttons-var-10.44dafff87cd10dfffc68.bundle.js +++ b/assets/js/contact-buttons-var-10.6caef1cb29200dd63f5a.bundle.js @@ -1,217 +1,12 @@ -/*! pro-elements - v3.35.0 - 02-02-2026 */ +/*! pro-elements - v4.0.0 - 28-04-2026 */ "use strict"; (self["webpackChunkelementor_pro"] = self["webpackChunkelementor_pro"] || []).push([["contact-buttons-var-10"],{ -/***/ "../modules/floating-buttons/assets/js/frontend/handlers/contact-buttons-v10.js": -/*!**************************************************************************************!*\ - !*** ../modules/floating-buttons/assets/js/frontend/handlers/contact-buttons-v10.js ***! - \**************************************************************************************/ -/***/ ((__unused_webpack_module, exports, __webpack_require__) => { - - - -var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js"); -Object.defineProperty(exports, "__esModule", ({ - value: true -})); -exports["default"] = void 0; -var _base = _interopRequireDefault(__webpack_require__(/*! elementor-frontend/handlers/base */ "../../elementor/assets/dev/js/frontend/handlers/base.js")); -var _clickTracking = _interopRequireDefault(__webpack_require__(/*! ../../shared/frontend/handlers/click-tracking */ "../modules/floating-buttons/assets/js/shared/frontend/handlers/click-tracking.js")); -class ContactButtonsv10Handler extends _base.default { - getDefaultSettings() { - return { - selectors: { - main: '.e-contact-buttons-var-10', - links: '.e-contact-buttons__contact-icon-link' - }, - constants: { - active: 'active' - } - }; - } - getDefaultElements() { - const selectors = this.getSettings('selectors'); - return { - main: this.$element[0].querySelector(selectors.main), - links: this.$element[0].querySelectorAll(selectors.links) - }; - } - isMobileDevice() { - const mobileDevices = ['mobile', 'mobile_extra']; - return mobileDevices.includes(elementorFrontend.getCurrentDeviceMode()); - } - handleLinkClick(event) { - event.preventDefault(); - const { - active - } = this.getSettings('constants'); - if (event.currentTarget.classList.contains(active)) { - const href = event.currentTarget.getAttribute('href'); - const target = event.currentTarget.getAttribute('target'); - - // If the target is set, open in a new window, otherwise just change location - if (target) { - window.open(href, target); - } else if (href) { - window.location.href = href; - } - event.currentTarget.classList.remove(active); - } else { - this.closeAllLinks(); - event.currentTarget.classList.add(active); - } - } - closeAllLinks() { - const { - active - } = this.getSettings('constants'); - this.elements.links.forEach(link => link.classList.remove(active)); - } - linksEventListeners() { - if (!this.elements.links.length) { - return; - } - if (this.isMobileDevice()) { - this.elements.links.forEach(link => { - link.addEventListener('click', event => { - this.handleLinkClick(event); - }); - }); - - // Click outside will close all the links - document.addEventListener('click', event => { - if (!this.elements.main.contains(event.target)) { - this.closeAllLinks(); - } - }); - } - } - bindEvents() { - this.linksEventListeners(); - } - setupInnerContainer() { - this.elements.main.closest('.e-con-inner').classList.add('e-con-inner--floating-buttons'); - } - onInit(...args) { - super.onInit(...args); - this.clickTrackingHandler = new _clickTracking.default({ - $element: this.$element - }); - this.setupInnerContainer(); - } -} -exports["default"] = ContactButtonsv10Handler; - -/***/ }), - -/***/ "../modules/floating-buttons/assets/js/shared/frontend/handlers/click-tracking.js": -/*!****************************************************************************************!*\ - !*** ../modules/floating-buttons/assets/js/shared/frontend/handlers/click-tracking.js ***! - \****************************************************************************************/ -/***/ ((__unused_webpack_module, exports, __webpack_require__) => { - - - -var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js"); -Object.defineProperty(exports, "__esModule", ({ - value: true -})); -exports["default"] = void 0; -var _base = _interopRequireDefault(__webpack_require__(/*! elementor-frontend/handlers/base */ "../../elementor/assets/dev/js/frontend/handlers/base.js")); -class ClickTrackingHandler extends _base.default { - clicks = []; - getDefaultSettings() { - return { - selectors: { - contentWrapper: '.e-contact-buttons__content-wrapper', - contentWrapperFloatingBars: '.e-floating-bars', - floatingBarCouponButton: '.e-floating-bars__coupon-button', - floatingBarsHeadline: '.e-floating-bars__headline', - contactButtonsVar4: '.e-contact-buttons__contact-icon-link', - contactButtonsVar5: '.e-contact-buttons__chat-button', - contactButtonsVar6: '.e-contact-buttons-var-6', - contactButtonsVar8: '.e-contact-buttons-var-8', - elementorWrapper: '[data-elementor-type="floating-buttons"]', - contactButtonCore: '.e-contact-buttons__send-button' - } - }; - } - getDefaultElements() { - const selectors = this.getSettings('selectors'); - return { - contentWrapper: this.$element[0].querySelector(selectors.contentWrapper), - contentWrapperFloatingBars: this.$element[0].querySelector(selectors.contentWrapperFloatingBars), - contactButtonsVar5: this.$element[0].querySelector(selectors.contactButtonsVar5), - contactButtonsVar6: this.$element[0].querySelector(selectors.contactButtonsVar6) - }; - } - bindEvents() { - if (this.elements.contentWrapper) { - this.elements.contentWrapper.addEventListener('click', this.onChatButtonTrackClick.bind(this)); - } - if (this.elements.contactButtonsVar5) { - this.elements.contactButtonsVar5.addEventListener('click', this.onChatButtonTrackClick.bind(this)); - } - if (this.elements.contactButtonsVar6) { - this.elements.contactButtonsVar6.addEventListener('click', this.onChatButtonTrackClick.bind(this)); - } - if (this.elements.contentWrapperFloatingBars) { - this.elements.contentWrapperFloatingBars.addEventListener('click', this.onChatButtonTrackClick.bind(this)); - } - window.addEventListener('beforeunload', () => { - if (this.clicks.length > 0) { - this.sendClicks(); - } - }); - } - onChatButtonTrackClick(event) { - const targetElement = event.target || event.srcElement; - const selectors = this.getSettings('selectors'); - const buttonSelectors = [selectors.contactButtonsVar4, selectors.contactButtonsVar6, selectors.floatingBarCouponButton, selectors.floatingBarsHeadline, selectors.contactButtonCore]; - for (const selector of buttonSelectors) { - if (targetElement.matches(selector) || targetElement.closest(selector)) { - this.getDocumentIdAndTrack(targetElement, selectors); - } - } - if ((targetElement.matches(selectors.contactButtonsVar5) || targetElement.closest(selectors.contactButtonsVar5)) && targetElement.closest('.e-contact-buttons-var-5')) { - this.getDocumentIdAndTrack(targetElement, selectors); - } - } - getDocumentIdAndTrack(targetElement, selectors) { - const documentId = targetElement.closest(selectors.elementorWrapper).dataset.elementorId; - this.trackClick(documentId); - } - trackClick(documentId) { - if (!documentId) { - return; - } - this.clicks.push(documentId); - if (this.clicks.length >= 10) { - this.sendClicks(); - } - } - sendClicks() { - const formData = new FormData(); - formData.append('action', 'elementor_send_clicks'); - formData.append('_nonce', elementorFrontendConfig?.nonces?.floatingButtonsClickTracking); - this.clicks.forEach(documentId => formData.append('clicks[]', documentId)); - fetch(elementorFrontendConfig?.urls?.ajaxurl, { - method: 'POST', - body: formData - }).then(() => { - this.clicks = []; - }); - } -} -exports["default"] = ClickTrackingHandler; - -/***/ }), - -/***/ "../../elementor/assets/dev/js/frontend/handlers/base.js": +/***/ "../../elementor/assets/dev/js/frontend/handlers/base.js" /*!***************************************************************!*\ !*** ../../elementor/assets/dev/js/frontend/handlers/base.js ***! \***************************************************************/ -/***/ ((module) => { +(module) { @@ -405,7 +200,212 @@ module.exports = elementorModules.ViewModule.extend({ } }); -/***/ }) +/***/ }, + +/***/ "../modules/floating-buttons/assets/js/frontend/handlers/contact-buttons-v10.js" +/*!**************************************************************************************!*\ + !*** ../modules/floating-buttons/assets/js/frontend/handlers/contact-buttons-v10.js ***! + \**************************************************************************************/ +(__unused_webpack_module, exports, __webpack_require__) { + + + +var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js"); +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports["default"] = void 0; +var _base = _interopRequireDefault(__webpack_require__(/*! elementor-frontend/handlers/base */ "../../elementor/assets/dev/js/frontend/handlers/base.js")); +var _clickTracking = _interopRequireDefault(__webpack_require__(/*! ../../shared/frontend/handlers/click-tracking */ "../modules/floating-buttons/assets/js/shared/frontend/handlers/click-tracking.js")); +class ContactButtonsv10Handler extends _base.default { + getDefaultSettings() { + return { + selectors: { + main: '.e-contact-buttons-var-10', + links: '.e-contact-buttons__contact-icon-link' + }, + constants: { + active: 'active' + } + }; + } + getDefaultElements() { + const selectors = this.getSettings('selectors'); + return { + main: this.$element[0].querySelector(selectors.main), + links: this.$element[0].querySelectorAll(selectors.links) + }; + } + isMobileDevice() { + const mobileDevices = ['mobile', 'mobile_extra']; + return mobileDevices.includes(elementorFrontend.getCurrentDeviceMode()); + } + handleLinkClick(event) { + event.preventDefault(); + const { + active + } = this.getSettings('constants'); + if (event.currentTarget.classList.contains(active)) { + const href = event.currentTarget.getAttribute('href'); + const target = event.currentTarget.getAttribute('target'); + + // If the target is set, open in a new window, otherwise just change location + if (target) { + window.open(href, target); + } else if (href) { + window.location.href = href; + } + event.currentTarget.classList.remove(active); + } else { + this.closeAllLinks(); + event.currentTarget.classList.add(active); + } + } + closeAllLinks() { + const { + active + } = this.getSettings('constants'); + this.elements.links.forEach(link => link.classList.remove(active)); + } + linksEventListeners() { + if (!this.elements.links.length) { + return; + } + if (this.isMobileDevice()) { + this.elements.links.forEach(link => { + link.addEventListener('click', event => { + this.handleLinkClick(event); + }); + }); + + // Click outside will close all the links + document.addEventListener('click', event => { + if (!this.elements.main.contains(event.target)) { + this.closeAllLinks(); + } + }); + } + } + bindEvents() { + this.linksEventListeners(); + } + setupInnerContainer() { + this.elements.main.closest('.e-con-inner').classList.add('e-con-inner--floating-buttons'); + } + onInit(...args) { + super.onInit(...args); + this.clickTrackingHandler = new _clickTracking.default({ + $element: this.$element + }); + this.setupInnerContainer(); + } +} +exports["default"] = ContactButtonsv10Handler; + +/***/ }, + +/***/ "../modules/floating-buttons/assets/js/shared/frontend/handlers/click-tracking.js" +/*!****************************************************************************************!*\ + !*** ../modules/floating-buttons/assets/js/shared/frontend/handlers/click-tracking.js ***! + \****************************************************************************************/ +(__unused_webpack_module, exports, __webpack_require__) { + + + +var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js"); +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports["default"] = void 0; +var _base = _interopRequireDefault(__webpack_require__(/*! elementor-frontend/handlers/base */ "../../elementor/assets/dev/js/frontend/handlers/base.js")); +class ClickTrackingHandler extends _base.default { + clicks = []; + getDefaultSettings() { + return { + selectors: { + contentWrapper: '.e-contact-buttons__content-wrapper', + contentWrapperFloatingBars: '.e-floating-bars', + floatingBarCouponButton: '.e-floating-bars__coupon-button', + floatingBarsHeadline: '.e-floating-bars__headline', + contactButtonsVar4: '.e-contact-buttons__contact-icon-link', + contactButtonsVar5: '.e-contact-buttons__chat-button', + contactButtonsVar6: '.e-contact-buttons-var-6', + contactButtonsVar8: '.e-contact-buttons-var-8', + elementorWrapper: '[data-elementor-type="floating-buttons"]', + contactButtonCore: '.e-contact-buttons__send-button' + } + }; + } + getDefaultElements() { + const selectors = this.getSettings('selectors'); + return { + contentWrapper: this.$element[0].querySelector(selectors.contentWrapper), + contentWrapperFloatingBars: this.$element[0].querySelector(selectors.contentWrapperFloatingBars), + contactButtonsVar5: this.$element[0].querySelector(selectors.contactButtonsVar5), + contactButtonsVar6: this.$element[0].querySelector(selectors.contactButtonsVar6) + }; + } + bindEvents() { + if (this.elements.contentWrapper) { + this.elements.contentWrapper.addEventListener('click', this.onChatButtonTrackClick.bind(this)); + } + if (this.elements.contactButtonsVar5) { + this.elements.contactButtonsVar5.addEventListener('click', this.onChatButtonTrackClick.bind(this)); + } + if (this.elements.contactButtonsVar6) { + this.elements.contactButtonsVar6.addEventListener('click', this.onChatButtonTrackClick.bind(this)); + } + if (this.elements.contentWrapperFloatingBars) { + this.elements.contentWrapperFloatingBars.addEventListener('click', this.onChatButtonTrackClick.bind(this)); + } + window.addEventListener('beforeunload', () => { + if (this.clicks.length > 0) { + this.sendClicks(); + } + }); + } + onChatButtonTrackClick(event) { + const targetElement = event.target || event.srcElement; + const selectors = this.getSettings('selectors'); + const buttonSelectors = [selectors.contactButtonsVar4, selectors.contactButtonsVar6, selectors.floatingBarCouponButton, selectors.floatingBarsHeadline, selectors.contactButtonCore]; + for (const selector of buttonSelectors) { + if (targetElement.matches(selector) || targetElement.closest(selector)) { + this.getDocumentIdAndTrack(targetElement, selectors); + } + } + if ((targetElement.matches(selectors.contactButtonsVar5) || targetElement.closest(selectors.contactButtonsVar5)) && targetElement.closest('.e-contact-buttons-var-5')) { + this.getDocumentIdAndTrack(targetElement, selectors); + } + } + getDocumentIdAndTrack(targetElement, selectors) { + const documentId = targetElement.closest(selectors.elementorWrapper).dataset.elementorId; + this.trackClick(documentId); + } + trackClick(documentId) { + if (!documentId) { + return; + } + this.clicks.push(documentId); + if (this.clicks.length >= 10) { + this.sendClicks(); + } + } + sendClicks() { + const formData = new FormData(); + formData.append('action', 'elementor_send_clicks'); + formData.append('_nonce', elementorFrontendConfig?.nonces?.floatingButtonsClickTracking); + this.clicks.forEach(documentId => formData.append('clicks[]', documentId)); + fetch(elementorFrontendConfig?.urls?.ajaxurl, { + method: 'POST', + body: formData + }).then(() => { + this.clicks = []; + }); + } +} +exports["default"] = ClickTrackingHandler; + +/***/ } }]); -//# sourceMappingURL=contact-buttons-var-10.44dafff87cd10dfffc68.bundle.js.map \ No newline at end of file +//# sourceMappingURL=contact-buttons-var-10.6caef1cb29200dd63f5a.bundle.js.map diff --git a/assets/js/contact-buttons.23b3f042ed41cf9221f4.bundle.js b/assets/js/contact-buttons.0f9a28de84eecdb341e1.bundle.js similarity index 98% rename from assets/js/contact-buttons.23b3f042ed41cf9221f4.bundle.js rename to assets/js/contact-buttons.0f9a28de84eecdb341e1.bundle.js index b4f85815..caa8539f 100644 --- a/assets/js/contact-buttons.23b3f042ed41cf9221f4.bundle.js +++ b/assets/js/contact-buttons.0f9a28de84eecdb341e1.bundle.js @@ -1,12 +1,212 @@ -/*! pro-elements - v3.35.0 - 02-02-2026 */ +/*! pro-elements - v4.0.0 - 28-04-2026 */ "use strict"; (self["webpackChunkelementor_pro"] = self["webpackChunkelementor_pro"] || []).push([["contact-buttons"],{ -/***/ "../modules/floating-buttons/assets/js/frontend/handlers/contact-buttons.js": +/***/ "../../elementor/assets/dev/js/frontend/handlers/base.js" +/*!***************************************************************!*\ + !*** ../../elementor/assets/dev/js/frontend/handlers/base.js ***! + \***************************************************************/ +(module) { + + + +module.exports = elementorModules.ViewModule.extend({ + $element: null, + editorListeners: null, + onElementChange: null, + onEditSettingsChange: null, + onPageSettingsChange: null, + isEdit: null, + __construct(settings) { + if (!this.isActive(settings)) { + return; + } + this.$element = settings.$element; + this.isEdit = this.$element.hasClass('elementor-element-edit-mode'); + if (this.isEdit) { + this.addEditorListeners(); + } + }, + isActive() { + return true; + }, + isElementInTheCurrentDocument() { + if (!elementorFrontend.isEditMode()) { + return false; + } + return elementor.documents.currentDocument.id.toString() === this.$element[0].closest('.elementor').dataset.elementorId; + }, + findElement(selector) { + var $mainElement = this.$element; + return $mainElement.find(selector).filter(function () { + // Start `closest` from parent since self can be `.elementor-element`. + return jQuery(this).parent().closest('.elementor-element').is($mainElement); + }); + }, + getUniqueHandlerID(cid, $element) { + if (!cid) { + cid = this.getModelCID(); + } + if (!$element) { + $element = this.$element; + } + return cid + $element.attr('data-element_type') + this.getConstructorID(); + }, + initEditorListeners() { + var self = this; + self.editorListeners = [{ + event: 'element:destroy', + to: elementor.channels.data, + callback(removedModel) { + if (removedModel.cid !== self.getModelCID()) { + return; + } + self.onDestroy(); + } + }]; + if (self.onElementChange) { + const elementType = self.getWidgetType() || self.getElementType(); + let eventName = 'change'; + if ('global' !== elementType) { + eventName += ':' + elementType; + } + self.editorListeners.push({ + event: eventName, + to: elementor.channels.editor, + callback(controlView, elementView) { + var elementViewHandlerID = self.getUniqueHandlerID(elementView.model.cid, elementView.$el); + if (elementViewHandlerID !== self.getUniqueHandlerID()) { + return; + } + self.onElementChange(controlView.model.get('name'), controlView, elementView); + } + }); + } + if (self.onEditSettingsChange) { + self.editorListeners.push({ + event: 'change:editSettings', + to: elementor.channels.editor, + callback(changedModel, view) { + if (view.model.cid !== self.getModelCID()) { + return; + } + const propName = Object.keys(changedModel.changed)[0]; + self.onEditSettingsChange(propName, changedModel.changed[propName]); + } + }); + } + ['page'].forEach(function (settingsType) { + var listenerMethodName = 'on' + settingsType[0].toUpperCase() + settingsType.slice(1) + 'SettingsChange'; + if (self[listenerMethodName]) { + self.editorListeners.push({ + event: 'change', + to: elementor.settings[settingsType].model, + callback(model) { + self[listenerMethodName](model.changed); + } + }); + } + }); + }, + getEditorListeners() { + if (!this.editorListeners) { + this.initEditorListeners(); + } + return this.editorListeners; + }, + addEditorListeners() { + var uniqueHandlerID = this.getUniqueHandlerID(); + this.getEditorListeners().forEach(function (listener) { + elementorFrontend.addListenerOnce(uniqueHandlerID, listener.event, listener.callback, listener.to); + }); + }, + removeEditorListeners() { + var uniqueHandlerID = this.getUniqueHandlerID(); + this.getEditorListeners().forEach(function (listener) { + elementorFrontend.removeListeners(uniqueHandlerID, listener.event, null, listener.to); + }); + }, + getElementType() { + return this.$element.data('element_type'); + }, + getWidgetType() { + const widgetType = this.$element.data('widget_type'); + if (!widgetType) { + return; + } + return widgetType.split('.')[0]; + }, + getID() { + return this.$element.data('id'); + }, + getModelCID() { + return this.$element.data('model-cid'); + }, + getElementSettings(setting) { + let elementSettings = {}; + const modelCID = this.getModelCID(); + if (this.isEdit && modelCID) { + const settings = elementorFrontend.config.elements.data[modelCID], + attributes = settings.attributes; + let type = attributes.widgetType || attributes.elType; + if (attributes.isInner) { + type = 'inner-' + type; + } + let settingsKeys = elementorFrontend.config.elements.keys[type]; + if (!settingsKeys) { + settingsKeys = elementorFrontend.config.elements.keys[type] = []; + jQuery.each(settings.controls, (name, control) => { + if (control.frontend_available || control.editor_available) { + settingsKeys.push(name); + } + }); + } + jQuery.each(settings.getActiveControls(), function (controlKey) { + if (-1 !== settingsKeys.indexOf(controlKey)) { + let value = attributes[controlKey]; + if (value.toJSON) { + value = value.toJSON(); + } + elementSettings[controlKey] = value; + } + }); + } else { + elementSettings = this.$element.data('settings') || {}; + } + return this.getItems(elementSettings, setting); + }, + getEditSettings(setting) { + var attributes = {}; + if (this.isEdit) { + attributes = elementorFrontend.config.elements.editSettings[this.getModelCID()].attributes; + } + return this.getItems(attributes, setting); + }, + getCurrentDeviceSetting(settingKey) { + return elementorFrontend.getCurrentDeviceSetting(this.getElementSettings(), settingKey); + }, + onInit() { + if (this.isActive(this.getSettings())) { + elementorModules.ViewModule.prototype.onInit.apply(this, arguments); + } + }, + onDestroy() { + if (this.isEdit) { + this.removeEditorListeners(); + } + if (this.unbindEvents) { + this.unbindEvents(); + } + } +}); + +/***/ }, + +/***/ "../modules/floating-buttons/assets/js/frontend/handlers/contact-buttons.js" /*!**********************************************************************************!*\ !*** ../modules/floating-buttons/assets/js/frontend/handlers/contact-buttons.js ***! \**********************************************************************************/ -/***/ ((__unused_webpack_module, exports, __webpack_require__) => { +(__unused_webpack_module, exports, __webpack_require__) { @@ -350,13 +550,13 @@ class ContactButtonsHandler extends _base.default { } exports["default"] = ContactButtonsHandler; -/***/ }), +/***/ }, -/***/ "../modules/floating-buttons/assets/js/shared/frontend/handlers/click-tracking.js": +/***/ "../modules/floating-buttons/assets/js/shared/frontend/handlers/click-tracking.js" /*!****************************************************************************************!*\ !*** ../modules/floating-buttons/assets/js/shared/frontend/handlers/click-tracking.js ***! \****************************************************************************************/ -/***/ ((__unused_webpack_module, exports, __webpack_require__) => { +(__unused_webpack_module, exports, __webpack_require__) { @@ -453,207 +653,7 @@ class ClickTrackingHandler extends _base.default { } exports["default"] = ClickTrackingHandler; -/***/ }), - -/***/ "../../elementor/assets/dev/js/frontend/handlers/base.js": -/*!***************************************************************!*\ - !*** ../../elementor/assets/dev/js/frontend/handlers/base.js ***! - \***************************************************************/ -/***/ ((module) => { - - - -module.exports = elementorModules.ViewModule.extend({ - $element: null, - editorListeners: null, - onElementChange: null, - onEditSettingsChange: null, - onPageSettingsChange: null, - isEdit: null, - __construct(settings) { - if (!this.isActive(settings)) { - return; - } - this.$element = settings.$element; - this.isEdit = this.$element.hasClass('elementor-element-edit-mode'); - if (this.isEdit) { - this.addEditorListeners(); - } - }, - isActive() { - return true; - }, - isElementInTheCurrentDocument() { - if (!elementorFrontend.isEditMode()) { - return false; - } - return elementor.documents.currentDocument.id.toString() === this.$element[0].closest('.elementor').dataset.elementorId; - }, - findElement(selector) { - var $mainElement = this.$element; - return $mainElement.find(selector).filter(function () { - // Start `closest` from parent since self can be `.elementor-element`. - return jQuery(this).parent().closest('.elementor-element').is($mainElement); - }); - }, - getUniqueHandlerID(cid, $element) { - if (!cid) { - cid = this.getModelCID(); - } - if (!$element) { - $element = this.$element; - } - return cid + $element.attr('data-element_type') + this.getConstructorID(); - }, - initEditorListeners() { - var self = this; - self.editorListeners = [{ - event: 'element:destroy', - to: elementor.channels.data, - callback(removedModel) { - if (removedModel.cid !== self.getModelCID()) { - return; - } - self.onDestroy(); - } - }]; - if (self.onElementChange) { - const elementType = self.getWidgetType() || self.getElementType(); - let eventName = 'change'; - if ('global' !== elementType) { - eventName += ':' + elementType; - } - self.editorListeners.push({ - event: eventName, - to: elementor.channels.editor, - callback(controlView, elementView) { - var elementViewHandlerID = self.getUniqueHandlerID(elementView.model.cid, elementView.$el); - if (elementViewHandlerID !== self.getUniqueHandlerID()) { - return; - } - self.onElementChange(controlView.model.get('name'), controlView, elementView); - } - }); - } - if (self.onEditSettingsChange) { - self.editorListeners.push({ - event: 'change:editSettings', - to: elementor.channels.editor, - callback(changedModel, view) { - if (view.model.cid !== self.getModelCID()) { - return; - } - const propName = Object.keys(changedModel.changed)[0]; - self.onEditSettingsChange(propName, changedModel.changed[propName]); - } - }); - } - ['page'].forEach(function (settingsType) { - var listenerMethodName = 'on' + settingsType[0].toUpperCase() + settingsType.slice(1) + 'SettingsChange'; - if (self[listenerMethodName]) { - self.editorListeners.push({ - event: 'change', - to: elementor.settings[settingsType].model, - callback(model) { - self[listenerMethodName](model.changed); - } - }); - } - }); - }, - getEditorListeners() { - if (!this.editorListeners) { - this.initEditorListeners(); - } - return this.editorListeners; - }, - addEditorListeners() { - var uniqueHandlerID = this.getUniqueHandlerID(); - this.getEditorListeners().forEach(function (listener) { - elementorFrontend.addListenerOnce(uniqueHandlerID, listener.event, listener.callback, listener.to); - }); - }, - removeEditorListeners() { - var uniqueHandlerID = this.getUniqueHandlerID(); - this.getEditorListeners().forEach(function (listener) { - elementorFrontend.removeListeners(uniqueHandlerID, listener.event, null, listener.to); - }); - }, - getElementType() { - return this.$element.data('element_type'); - }, - getWidgetType() { - const widgetType = this.$element.data('widget_type'); - if (!widgetType) { - return; - } - return widgetType.split('.')[0]; - }, - getID() { - return this.$element.data('id'); - }, - getModelCID() { - return this.$element.data('model-cid'); - }, - getElementSettings(setting) { - let elementSettings = {}; - const modelCID = this.getModelCID(); - if (this.isEdit && modelCID) { - const settings = elementorFrontend.config.elements.data[modelCID], - attributes = settings.attributes; - let type = attributes.widgetType || attributes.elType; - if (attributes.isInner) { - type = 'inner-' + type; - } - let settingsKeys = elementorFrontend.config.elements.keys[type]; - if (!settingsKeys) { - settingsKeys = elementorFrontend.config.elements.keys[type] = []; - jQuery.each(settings.controls, (name, control) => { - if (control.frontend_available || control.editor_available) { - settingsKeys.push(name); - } - }); - } - jQuery.each(settings.getActiveControls(), function (controlKey) { - if (-1 !== settingsKeys.indexOf(controlKey)) { - let value = attributes[controlKey]; - if (value.toJSON) { - value = value.toJSON(); - } - elementSettings[controlKey] = value; - } - }); - } else { - elementSettings = this.$element.data('settings') || {}; - } - return this.getItems(elementSettings, setting); - }, - getEditSettings(setting) { - var attributes = {}; - if (this.isEdit) { - attributes = elementorFrontend.config.elements.editSettings[this.getModelCID()].attributes; - } - return this.getItems(attributes, setting); - }, - getCurrentDeviceSetting(settingKey) { - return elementorFrontend.getCurrentDeviceSetting(this.getElementSettings(), settingKey); - }, - onInit() { - if (this.isActive(this.getSettings())) { - elementorModules.ViewModule.prototype.onInit.apply(this, arguments); - } - }, - onDestroy() { - if (this.isEdit) { - this.removeEditorListeners(); - } - if (this.unbindEvents) { - this.unbindEvents(); - } - } -}); - -/***/ }) +/***/ } }]); -//# sourceMappingURL=contact-buttons.23b3f042ed41cf9221f4.bundle.js.map \ No newline at end of file +//# sourceMappingURL=contact-buttons.0f9a28de84eecdb341e1.bundle.js.map diff --git a/assets/js/contact-buttons.e1605c5cfaccbff3c14b.bundle.min.js b/assets/js/contact-buttons.e1605c5cfaccbff3c14b.bundle.min.js new file mode 100644 index 00000000..9527bdd0 --- /dev/null +++ b/assets/js/contact-buttons.e1605c5cfaccbff3c14b.bundle.min.js @@ -0,0 +1,2 @@ +/*! pro-elements - v4.0.0 - 28-04-2026 */ +"use strict";(self.webpackChunkelementor_pro=self.webpackChunkelementor_pro||[]).push([[1],{8562(t){t.exports=elementorModules.ViewModule.extend({$element:null,editorListeners:null,onElementChange:null,onEditSettingsChange:null,onPageSettingsChange:null,isEdit:null,__construct(t){this.isActive(t)&&(this.$element=t.$element,this.isEdit=this.$element.hasClass("elementor-element-edit-mode"),this.isEdit&&this.addEditorListeners())},isActive:()=>!0,isElementInTheCurrentDocument(){return!!elementorFrontend.isEditMode()&&elementor.documents.currentDocument.id.toString()===this.$element[0].closest(".elementor").dataset.elementorId},findElement(t){var e=this.$element;return e.find(t).filter(function(){return jQuery(this).parent().closest(".elementor-element").is(e)})},getUniqueHandlerID(t,e){return t||(t=this.getModelCID()),e||(e=this.$element),t+e.attr("data-element_type")+this.getConstructorID()},initEditorListeners(){var t=this;if(t.editorListeners=[{event:"element:destroy",to:elementor.channels.data,callback(e){e.cid===t.getModelCID()&&t.onDestroy()}}],t.onElementChange){const e=t.getWidgetType()||t.getElementType();let n="change";"global"!==e&&(n+=":"+e),t.editorListeners.push({event:n,to:elementor.channels.editor,callback(e,n){t.getUniqueHandlerID(n.model.cid,n.$el)===t.getUniqueHandlerID()&&t.onElementChange(e.model.get("name"),e,n)}})}t.onEditSettingsChange&&t.editorListeners.push({event:"change:editSettings",to:elementor.channels.editor,callback(e,n){if(n.model.cid!==t.getModelCID())return;const s=Object.keys(e.changed)[0];t.onEditSettingsChange(s,e.changed[s])}}),["page"].forEach(function(e){var n="on"+e[0].toUpperCase()+e.slice(1)+"SettingsChange";t[n]&&t.editorListeners.push({event:"change",to:elementor.settings[e].model,callback(e){t[n](e.changed)}})})},getEditorListeners(){return this.editorListeners||this.initEditorListeners(),this.editorListeners},addEditorListeners(){var t=this.getUniqueHandlerID();this.getEditorListeners().forEach(function(e){elementorFrontend.addListenerOnce(t,e.event,e.callback,e.to)})},removeEditorListeners(){var t=this.getUniqueHandlerID();this.getEditorListeners().forEach(function(e){elementorFrontend.removeListeners(t,e.event,null,e.to)})},getElementType(){return this.$element.data("element_type")},getWidgetType(){const t=this.$element.data("widget_type");if(t)return t.split(".")[0]},getID(){return this.$element.data("id")},getModelCID(){return this.$element.data("model-cid")},getElementSettings(t){let e={};const n=this.getModelCID();if(this.isEdit&&n){const t=elementorFrontend.config.elements.data[n],s=t.attributes;let i=s.widgetType||s.elType;s.isInner&&(i="inner-"+i);let o=elementorFrontend.config.elements.keys[i];o||(o=elementorFrontend.config.elements.keys[i]=[],jQuery.each(t.controls,(t,e)=>{(e.frontend_available||e.editor_available)&&o.push(t)})),jQuery.each(t.getActiveControls(),function(t){if(-1!==o.indexOf(t)){let n=s[t];n.toJSON&&(n=n.toJSON()),e[t]=n}})}else e=this.$element.data("settings")||{};return this.getItems(e,t)},getEditSettings(t){var e={};return this.isEdit&&(e=elementorFrontend.config.elements.editSettings[this.getModelCID()].attributes),this.getItems(e,t)},getCurrentDeviceSetting(t){return elementorFrontend.getCurrentDeviceSetting(this.getElementSettings(),t)},onInit(){this.isActive(this.getSettings())&&elementorModules.ViewModule.prototype.onInit.apply(this,arguments)},onDestroy(){this.isEdit&&this.removeEditorListeners(),this.unbindEvents&&this.unbindEvents()}})},197(t,e,n){var s=n(6784);Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var i=s(n(8562)),o=s(n(8243));class ContactButtonsHandler extends i.default{clicks=[];getDefaultSettings(){return{selectors:{main:".e-contact-buttons",content:".e-contact-buttons__content",contentWrapper:".e-contact-buttons__content-wrapper",chatButton:".e-contact-buttons__chat-button",closeButton:".e-contact-buttons__close-button",messageBubbleTime:".e-contact-buttons__message-bubble-time"},constants:{entranceAnimation:"style_chat_box_entrance_animation",exitAnimation:"style_chat_box_exit_animation",chatButtonAnimation:"style_chat_button_animation",animated:"animated",animatedWrapper:"animated-wrapper",visible:"visible",reverse:"reverse",hidden:"hidden",hasAnimations:"has-animations",hasEntranceAnimation:"has-entrance-animation",none:"none"}}}getDefaultElements(){const t=this.getSettings("selectors");return{main:this.$element[0].querySelector(t.main),content:this.$element[0].querySelector(t.content),contentWrapper:this.$element[0].querySelector(t.contentWrapper),chatButton:this.$element[0].querySelector(t.chatButton),closeButton:this.$element[0].querySelector(t.closeButton),messageBubbleTime:this.$element[0].querySelector(t.messageBubbleTime)}}getResponsiveSetting(t){const e=elementorFrontend.getCurrentDeviceMode();return elementorFrontend.utils.controls.getResponsiveControlValue(this.getElementSettings(),t,"",e)}bindEvents(){this.elements.closeButton&&this.elements.closeButton.addEventListener("click",this.closeChatBox.bind(this)),this.elements.chatButton&&(this.elements.chatButton.addEventListener("click",this.onChatButtonClick.bind(this)),this.elements.chatButton.addEventListener("animationend",this.removeChatButtonAnimationClasses.bind(this))),this.elements.content&&this.elements.content.addEventListener("animationend",this.removeAnimationClasses.bind(this)),this.elements.contentWrapper&&window.addEventListener("keyup",this.onDocumentKeyup.bind(this))}contentWrapperIsHidden(t){if(!this.elements.contentWrapper)return!1;const{hidden:e}=this.getSettings("constants");return!0===t?(this.elements.contentWrapper.classList.add(e),void this.elements.contentWrapper.setAttribute("aria-hidden","true")):!1===t?(this.elements.contentWrapper.classList.remove(e),void this.elements.contentWrapper.setAttribute("aria-hidden","false")):this.elements.contentWrapper.classList.contains(e)}onDocumentKeyup(t){27===t.keyCode&&this.elements.main&&!this.contentWrapperIsHidden()&&this.elements.main.contains(document.activeElement)&&this.closeChatBox()}onChatButtonTrackClick(t){const e=t.target||t.srcElement,n=this.getSettings("selectors"),s=[n.contactButtonsVar4,n.contactButtonsVar6,n.contactButtonCore];for(const t of s)(e.matches(t)||e.closest(t))&&this.getDocumentIdAndTrack(e,n);(e.matches(n.contactButtonsVar5)||e.closest(n.contactButtonsVar5))&&e.closest(".e-contact-buttons-var-5")&&this.getDocumentIdAndTrack(e,n)}getDocumentIdAndTrack(t,e){let n=t.closest(e.main).dataset.documentId;n||(n=t.closest(e.elementorWrapper).dataset.elementorId),this.trackClick(n)}trackClick(t){t&&(this.clicks.push(t),this.clicks.length>=10&&this.sendClicks())}sendClicks(){const t=new FormData;t.append("action","elementor_send_clicks"),t.append("_nonce",elementorFrontendConfig?.nonces?.floatingButtonsClickTracking),this.clicks.forEach(e=>t.append("clicks[]",e)),fetch(elementorFrontendConfig?.urls?.ajaxurl,{method:"POST",body:t}).then(()=>{this.clicks=[]})}removeAnimationClasses(){if(!this.elements.content)return;const{reverse:t,entranceAnimation:e,exitAnimation:n,animated:s,visible:i}=this.getSettings("constants"),o=this.elements.content.classList.contains(t),a=this.getResponsiveSetting(e),c=this.getResponsiveSetting(n);o?(this.elements.content.classList.remove(s),this.elements.content.classList.remove(t),c&&this.elements.content.classList.remove(c),this.elements.content.classList.remove(i)):(this.elements.content.classList.remove(s),a&&this.elements.content.classList.remove(a),this.elements.content.classList.add(i))}chatBoxEntranceAnimation(){const{entranceAnimation:t,animated:e,animatedWrapper:n,none:s}=this.getSettings("constants"),i=this.getResponsiveSetting(t);i&&s!==i&&(this.elements.content&&(this.elements.content.classList.add(e),this.elements.content.classList.add(i)),this.elements.contentWrapper&&this.elements.contentWrapper.classList.remove(n))}chatBoxExitAnimation(){const{reverse:t,exitAnimation:e,animated:n,animatedWrapper:s,none:i}=this.getSettings("constants"),o=this.getResponsiveSetting(e);o&&i!==o&&(this.elements.content&&(this.elements.content.classList.add(n),this.elements.content.classList.add(t),this.elements.content.classList.add(o)),this.elements.contentWrapper&&this.elements.contentWrapper.classList.add(s))}openChatBox(){const{hasAnimations:t,visible:e}=this.getSettings("constants");this.elements.main&&this.elements.main.classList.contains(t)?this.chatBoxEntranceAnimation():this.elements.content&&this.elements.content.classList.add(e),this.elements.contentWrapper&&(this.contentWrapperIsHidden(!1),elementorFrontend.isEditMode()||(this.elements.contentWrapper.setAttribute("tabindex","0"),this.elements.contentWrapper.focus({focusVisible:!0}))),this.elements.chatButton&&this.elements.chatButton.setAttribute("aria-expanded","true"),this.elements.closeButton&&this.elements.closeButton.setAttribute("aria-expanded","true")}closeChatBox(){const{hasAnimations:t,visible:e}=this.getSettings("constants");this.elements.main&&this.elements.main.classList.contains(t)?this.chatBoxExitAnimation():this.elements.content&&this.elements.content.classList.remove(e),this.elements.contentWrapper&&this.contentWrapperIsHidden(!0),this.elements.chatButton&&(this.elements.chatButton.setAttribute("aria-expanded","false"),this.elements.chatButton.focus({focusVisible:!0})),this.elements.closeButton&&this.elements.closeButton.setAttribute("aria-expanded","false")}onChatButtonClick(){this.elements.contentWrapper&&this.contentWrapperIsHidden()?this.openChatBox():this.closeChatBox()}initMessageBubbleTime(){if(!this.elements.messageBubbleTime)return;const t="12h"===this.elements.messageBubbleTime.dataset.timeFormat,e=new Intl.DateTimeFormat("default",{hour12:t,hour:"numeric",minute:"numeric"}).format(new Date);this.elements.messageBubbleTime.innerHTML=e}removeChatButtonAnimationClasses(){if(!this.elements.chatButton)return;const{chatButtonAnimation:t,visible:e}=this.getSettings("constants");this.elements.chatButton.classList.remove(t),this.elements.chatButton.classList.add(e)}initChatButtonEntranceAnimation(){const{none:t,chatButtonAnimation:e}=this.getSettings("constants"),n=this.getResponsiveSetting(e);n&&t!==n&&this.elements.chatButton.classList.add(n)}initDefaultState(){if(this.elements.contentWrapper){const t=this.contentWrapperIsHidden();this.elements.chatButton&&this.elements.chatButton.setAttribute("aria-expanded",!t),this.elements.closeButton&&this.elements.closeButton.setAttribute("aria-expanded",!t)}elementorFrontend.isEditMode()&&"floating-buttons"===elementor?.config?.document?.type&&this.openChatBox()}setupInnerContainer(){this.elements.main.closest(".e-con-inner").classList.add("e-con-inner--floating-buttons")}onInit(...t){const{hasEntranceAnimation:e}=this.getSettings("constants");super.onInit(...t),this.clickTrackingHandler=new o.default({$element:this.$element}),this.elements.messageBubbleTime&&this.initMessageBubbleTime(),this.initDefaultState(),this.elements.chatButton&&this.elements.chatButton.classList.contains(e)&&this.initChatButtonEntranceAnimation(),this.setupInnerContainer()}}e.default=ContactButtonsHandler},8243(t,e,n){var s=n(6784);Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var i=s(n(8562));class ClickTrackingHandler extends i.default{clicks=[];getDefaultSettings(){return{selectors:{contentWrapper:".e-contact-buttons__content-wrapper",contentWrapperFloatingBars:".e-floating-bars",floatingBarCouponButton:".e-floating-bars__coupon-button",floatingBarsHeadline:".e-floating-bars__headline",contactButtonsVar4:".e-contact-buttons__contact-icon-link",contactButtonsVar5:".e-contact-buttons__chat-button",contactButtonsVar6:".e-contact-buttons-var-6",contactButtonsVar8:".e-contact-buttons-var-8",elementorWrapper:'[data-elementor-type="floating-buttons"]',contactButtonCore:".e-contact-buttons__send-button"}}}getDefaultElements(){const t=this.getSettings("selectors");return{contentWrapper:this.$element[0].querySelector(t.contentWrapper),contentWrapperFloatingBars:this.$element[0].querySelector(t.contentWrapperFloatingBars),contactButtonsVar5:this.$element[0].querySelector(t.contactButtonsVar5),contactButtonsVar6:this.$element[0].querySelector(t.contactButtonsVar6)}}bindEvents(){this.elements.contentWrapper&&this.elements.contentWrapper.addEventListener("click",this.onChatButtonTrackClick.bind(this)),this.elements.contactButtonsVar5&&this.elements.contactButtonsVar5.addEventListener("click",this.onChatButtonTrackClick.bind(this)),this.elements.contactButtonsVar6&&this.elements.contactButtonsVar6.addEventListener("click",this.onChatButtonTrackClick.bind(this)),this.elements.contentWrapperFloatingBars&&this.elements.contentWrapperFloatingBars.addEventListener("click",this.onChatButtonTrackClick.bind(this)),window.addEventListener("beforeunload",()=>{this.clicks.length>0&&this.sendClicks()})}onChatButtonTrackClick(t){const e=t.target||t.srcElement,n=this.getSettings("selectors"),s=[n.contactButtonsVar4,n.contactButtonsVar6,n.floatingBarCouponButton,n.floatingBarsHeadline,n.contactButtonCore];for(const t of s)(e.matches(t)||e.closest(t))&&this.getDocumentIdAndTrack(e,n);(e.matches(n.contactButtonsVar5)||e.closest(n.contactButtonsVar5))&&e.closest(".e-contact-buttons-var-5")&&this.getDocumentIdAndTrack(e,n)}getDocumentIdAndTrack(t,e){const n=t.closest(e.elementorWrapper).dataset.elementorId;this.trackClick(n)}trackClick(t){t&&(this.clicks.push(t),this.clicks.length>=10&&this.sendClicks())}sendClicks(){const t=new FormData;t.append("action","elementor_send_clicks"),t.append("_nonce",elementorFrontendConfig?.nonces?.floatingButtonsClickTracking),this.clicks.forEach(e=>t.append("clicks[]",e)),fetch(elementorFrontendConfig?.urls?.ajaxurl,{method:"POST",body:t}).then(()=>{this.clicks=[]})}}e.default=ClickTrackingHandler}}]); diff --git a/assets/js/countdown.05b148ca20af32fc8e9f.bundle.min.js b/assets/js/countdown.05b148ca20af32fc8e9f.bundle.min.js new file mode 100644 index 00000000..8aa9ead6 --- /dev/null +++ b/assets/js/countdown.05b148ca20af32fc8e9f.bundle.min.js @@ -0,0 +1,2 @@ +/*! pro-elements - v4.0.0 - 28-04-2026 */ +"use strict";(self.webpackChunkelementor_pro=self.webpackChunkelementor_pro||[]).push([[416],{475(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;t.default=elementorModules.frontend.handlers.Base.extend({cache:null,cacheElements(){const e=this.$element.find(".elementor-countdown-wrapper");this.cache={$countDown:e,timeInterval:null,elements:{$countdown:e.find(".elementor-countdown-wrapper"),$daysSpan:e.find(".elementor-countdown-days"),$hoursSpan:e.find(".elementor-countdown-hours"),$minutesSpan:e.find(".elementor-countdown-minutes"),$secondsSpan:e.find(".elementor-countdown-seconds"),$expireMessage:e.parent().find(".elementor-countdown-expire--message")},data:{id:this.$element.data("id"),endTime:new Date(1e3*e.data("date")),actions:e.data("expire-actions"),evergreenInterval:e.data("evergreen-interval")}}},onInit(){elementorModules.frontend.handlers.Base.prototype.onInit.apply(this,arguments),this.cacheElements(),00&&parseInt(o.interval,10)===n?o.dueDate:void 0}})}}]); diff --git a/assets/js/countdown.6e87ca40d36793d92aea.bundle.js b/assets/js/countdown.7bd51efbed8eaac97b16.bundle.js similarity index 96% rename from assets/js/countdown.6e87ca40d36793d92aea.bundle.js rename to assets/js/countdown.7bd51efbed8eaac97b16.bundle.js index 9e9ce266..52380bd2 100644 --- a/assets/js/countdown.6e87ca40d36793d92aea.bundle.js +++ b/assets/js/countdown.7bd51efbed8eaac97b16.bundle.js @@ -1,12 +1,12 @@ -/*! pro-elements - v3.35.0 - 02-02-2026 */ +/*! pro-elements - v4.0.0 - 28-04-2026 */ "use strict"; (self["webpackChunkelementor_pro"] = self["webpackChunkelementor_pro"] || []).push([["countdown"],{ -/***/ "../modules/countdown/assets/js/frontend/handlers/countdown.js": +/***/ "../modules/countdown/assets/js/frontend/handlers/countdown.js" /*!*********************************************************************!*\ !*** ../modules/countdown/assets/js/frontend/handlers/countdown.js ***! \*********************************************************************/ -/***/ ((__unused_webpack_module, exports) => { +(__unused_webpack_module, exports) { @@ -142,7 +142,7 @@ var _default = exports["default"] = elementorModules.frontend.handlers.Base.exte } }); -/***/ }) +/***/ } }]); -//# sourceMappingURL=countdown.6e87ca40d36793d92aea.bundle.js.map \ No newline at end of file +//# sourceMappingURL=countdown.7bd51efbed8eaac97b16.bundle.js.map diff --git a/assets/js/8b11be0d97d58e135d30.bundle.js b/assets/js/e8fec410b4ec8b8ad5e5.bundle.js similarity index 90% rename from assets/js/8b11be0d97d58e135d30.bundle.js rename to assets/js/e8fec410b4ec8b8ad5e5.bundle.js index ddd2a762..12100f9c 100644 --- a/assets/js/8b11be0d97d58e135d30.bundle.js +++ b/assets/js/e8fec410b4ec8b8ad5e5.bundle.js @@ -1,14 +1,14 @@ -/*! pro-elements - v3.35.0 - 02-02-2026 */ +/*! pro-elements - v4.0.0 - 28-04-2026 */ "use strict"; (self["webpackChunkelementor_pro"] = self["webpackChunkelementor_pro"] || []).push([["vendors-node_modules_dompurify_dist_purify_cjs_js"],{ -/***/ "../node_modules/dompurify/dist/purify.cjs.js": +/***/ "../node_modules/dompurify/dist/purify.cjs.js" /*!****************************************************!*\ !*** ../node_modules/dompurify/dist/purify.cjs.js ***! \****************************************************/ -/***/ ((module) => { +(module) { -/*! @license DOMPurify 3.2.6 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.2.6/LICENSE */ +/*! @license DOMPurify 3.3.2 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.3.2/LICENSE */ @@ -39,12 +39,18 @@ if (!seal) { }; } if (!apply) { - apply = function apply(fun, thisValue, args) { - return fun.apply(thisValue, args); + apply = function apply(func, thisArg) { + for (var _len = arguments.length, args = new Array(_len > 2 ? _len - 2 : 0), _key = 2; _key < _len; _key++) { + args[_key - 2] = arguments[_key]; + } + return func.apply(thisArg, args); }; } if (!construct) { - construct = function construct(Func, args) { + construct = function construct(Func) { + for (var _len2 = arguments.length, args = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) { + args[_key2 - 1] = arguments[_key2]; + } return new Func(...args); }; } @@ -73,8 +79,8 @@ function unapply(func) { if (thisArg instanceof RegExp) { thisArg.lastIndex = 0; } - for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) { - args[_key - 1] = arguments[_key]; + for (var _len3 = arguments.length, args = new Array(_len3 > 1 ? _len3 - 1 : 0), _key3 = 1; _key3 < _len3; _key3++) { + args[_key3 - 1] = arguments[_key3]; } return apply(func, thisArg, args); }; @@ -85,12 +91,12 @@ function unapply(func) { * @param func - The constructor function to be wrapped and called. * @returns A new function that constructs an instance of the given constructor function with the provided arguments. */ -function unconstruct(func) { +function unconstruct(Func) { return function () { - for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) { - args[_key2] = arguments[_key2]; + for (var _len4 = arguments.length, args = new Array(_len4), _key4 = 0; _key4 < _len4; _key4++) { + args[_key4] = arguments[_key4]; } - return construct(func, args); + return construct(Func, args); }; } /** @@ -189,8 +195,8 @@ function lookupGetter(object, prop) { return fallbackValue; } -const html$1 = freeze(['a', 'abbr', 'acronym', 'address', 'area', 'article', 'aside', 'audio', 'b', 'bdi', 'bdo', 'big', 'blink', 'blockquote', 'body', 'br', 'button', 'canvas', 'caption', 'center', 'cite', 'code', 'col', 'colgroup', 'content', 'data', 'datalist', 'dd', 'decorator', 'del', 'details', 'dfn', 'dialog', 'dir', 'div', 'dl', 'dt', 'element', 'em', 'fieldset', 'figcaption', 'figure', 'font', 'footer', 'form', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'head', 'header', 'hgroup', 'hr', 'html', 'i', 'img', 'input', 'ins', 'kbd', 'label', 'legend', 'li', 'main', 'map', 'mark', 'marquee', 'menu', 'menuitem', 'meter', 'nav', 'nobr', 'ol', 'optgroup', 'option', 'output', 'p', 'picture', 'pre', 'progress', 'q', 'rp', 'rt', 'ruby', 's', 'samp', 'section', 'select', 'shadow', 'small', 'source', 'spacer', 'span', 'strike', 'strong', 'style', 'sub', 'summary', 'sup', 'table', 'tbody', 'td', 'template', 'textarea', 'tfoot', 'th', 'thead', 'time', 'tr', 'track', 'tt', 'u', 'ul', 'var', 'video', 'wbr']); -const svg$1 = freeze(['svg', 'a', 'altglyph', 'altglyphdef', 'altglyphitem', 'animatecolor', 'animatemotion', 'animatetransform', 'circle', 'clippath', 'defs', 'desc', 'ellipse', 'filter', 'font', 'g', 'glyph', 'glyphref', 'hkern', 'image', 'line', 'lineargradient', 'marker', 'mask', 'metadata', 'mpath', 'path', 'pattern', 'polygon', 'polyline', 'radialgradient', 'rect', 'stop', 'style', 'switch', 'symbol', 'text', 'textpath', 'title', 'tref', 'tspan', 'view', 'vkern']); +const html$1 = freeze(['a', 'abbr', 'acronym', 'address', 'area', 'article', 'aside', 'audio', 'b', 'bdi', 'bdo', 'big', 'blink', 'blockquote', 'body', 'br', 'button', 'canvas', 'caption', 'center', 'cite', 'code', 'col', 'colgroup', 'content', 'data', 'datalist', 'dd', 'decorator', 'del', 'details', 'dfn', 'dialog', 'dir', 'div', 'dl', 'dt', 'element', 'em', 'fieldset', 'figcaption', 'figure', 'font', 'footer', 'form', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'head', 'header', 'hgroup', 'hr', 'html', 'i', 'img', 'input', 'ins', 'kbd', 'label', 'legend', 'li', 'main', 'map', 'mark', 'marquee', 'menu', 'menuitem', 'meter', 'nav', 'nobr', 'ol', 'optgroup', 'option', 'output', 'p', 'picture', 'pre', 'progress', 'q', 'rp', 'rt', 'ruby', 's', 'samp', 'search', 'section', 'select', 'shadow', 'slot', 'small', 'source', 'spacer', 'span', 'strike', 'strong', 'style', 'sub', 'summary', 'sup', 'table', 'tbody', 'td', 'template', 'textarea', 'tfoot', 'th', 'thead', 'time', 'tr', 'track', 'tt', 'u', 'ul', 'var', 'video', 'wbr']); +const svg$1 = freeze(['svg', 'a', 'altglyph', 'altglyphdef', 'altglyphitem', 'animatecolor', 'animatemotion', 'animatetransform', 'circle', 'clippath', 'defs', 'desc', 'ellipse', 'enterkeyhint', 'exportparts', 'filter', 'font', 'g', 'glyph', 'glyphref', 'hkern', 'image', 'inputmode', 'line', 'lineargradient', 'marker', 'mask', 'metadata', 'mpath', 'part', 'path', 'pattern', 'polygon', 'polyline', 'radialgradient', 'rect', 'stop', 'style', 'switch', 'symbol', 'text', 'textpath', 'title', 'tref', 'tspan', 'view', 'vkern']); const svgFilters = freeze(['feBlend', 'feColorMatrix', 'feComponentTransfer', 'feComposite', 'feConvolveMatrix', 'feDiffuseLighting', 'feDisplacementMap', 'feDistantLight', 'feDropShadow', 'feFlood', 'feFuncA', 'feFuncB', 'feFuncG', 'feFuncR', 'feGaussianBlur', 'feImage', 'feMerge', 'feMergeNode', 'feMorphology', 'feOffset', 'fePointLight', 'feSpecularLighting', 'feSpotLight', 'feTile', 'feTurbulence']); // List of SVG elements that are disallowed by default. // We still need to know them so that we can do namespace @@ -203,8 +209,8 @@ const mathMl$1 = freeze(['math', 'menclose', 'merror', 'mfenced', 'mfrac', 'mgly const mathMlDisallowed = freeze(['maction', 'maligngroup', 'malignmark', 'mlongdiv', 'mscarries', 'mscarry', 'msgroup', 'mstack', 'msline', 'msrow', 'semantics', 'annotation', 'annotation-xml', 'mprescripts', 'none']); const text = freeze(['#text']); -const html = freeze(['accept', 'action', 'align', 'alt', 'autocapitalize', 'autocomplete', 'autopictureinpicture', 'autoplay', 'background', 'bgcolor', 'border', 'capture', 'cellpadding', 'cellspacing', 'checked', 'cite', 'class', 'clear', 'color', 'cols', 'colspan', 'controls', 'controlslist', 'coords', 'crossorigin', 'datetime', 'decoding', 'default', 'dir', 'disabled', 'disablepictureinpicture', 'disableremoteplayback', 'download', 'draggable', 'enctype', 'enterkeyhint', 'face', 'for', 'headers', 'height', 'hidden', 'high', 'href', 'hreflang', 'id', 'inputmode', 'integrity', 'ismap', 'kind', 'label', 'lang', 'list', 'loading', 'loop', 'low', 'max', 'maxlength', 'media', 'method', 'min', 'minlength', 'multiple', 'muted', 'name', 'nonce', 'noshade', 'novalidate', 'nowrap', 'open', 'optimum', 'pattern', 'placeholder', 'playsinline', 'popover', 'popovertarget', 'popovertargetaction', 'poster', 'preload', 'pubdate', 'radiogroup', 'readonly', 'rel', 'required', 'rev', 'reversed', 'role', 'rows', 'rowspan', 'spellcheck', 'scope', 'selected', 'shape', 'size', 'sizes', 'span', 'srclang', 'start', 'src', 'srcset', 'step', 'style', 'summary', 'tabindex', 'title', 'translate', 'type', 'usemap', 'valign', 'value', 'width', 'wrap', 'xmlns', 'slot']); -const svg = freeze(['accent-height', 'accumulate', 'additive', 'alignment-baseline', 'amplitude', 'ascent', 'attributename', 'attributetype', 'azimuth', 'basefrequency', 'baseline-shift', 'begin', 'bias', 'by', 'class', 'clip', 'clippathunits', 'clip-path', 'clip-rule', 'color', 'color-interpolation', 'color-interpolation-filters', 'color-profile', 'color-rendering', 'cx', 'cy', 'd', 'dx', 'dy', 'diffuseconstant', 'direction', 'display', 'divisor', 'dur', 'edgemode', 'elevation', 'end', 'exponent', 'fill', 'fill-opacity', 'fill-rule', 'filter', 'filterunits', 'flood-color', 'flood-opacity', 'font-family', 'font-size', 'font-size-adjust', 'font-stretch', 'font-style', 'font-variant', 'font-weight', 'fx', 'fy', 'g1', 'g2', 'glyph-name', 'glyphref', 'gradientunits', 'gradienttransform', 'height', 'href', 'id', 'image-rendering', 'in', 'in2', 'intercept', 'k', 'k1', 'k2', 'k3', 'k4', 'kerning', 'keypoints', 'keysplines', 'keytimes', 'lang', 'lengthadjust', 'letter-spacing', 'kernelmatrix', 'kernelunitlength', 'lighting-color', 'local', 'marker-end', 'marker-mid', 'marker-start', 'markerheight', 'markerunits', 'markerwidth', 'maskcontentunits', 'maskunits', 'max', 'mask', 'media', 'method', 'mode', 'min', 'name', 'numoctaves', 'offset', 'operator', 'opacity', 'order', 'orient', 'orientation', 'origin', 'overflow', 'paint-order', 'path', 'pathlength', 'patterncontentunits', 'patterntransform', 'patternunits', 'points', 'preservealpha', 'preserveaspectratio', 'primitiveunits', 'r', 'rx', 'ry', 'radius', 'refx', 'refy', 'repeatcount', 'repeatdur', 'restart', 'result', 'rotate', 'scale', 'seed', 'shape-rendering', 'slope', 'specularconstant', 'specularexponent', 'spreadmethod', 'startoffset', 'stddeviation', 'stitchtiles', 'stop-color', 'stop-opacity', 'stroke-dasharray', 'stroke-dashoffset', 'stroke-linecap', 'stroke-linejoin', 'stroke-miterlimit', 'stroke-opacity', 'stroke', 'stroke-width', 'style', 'surfacescale', 'systemlanguage', 'tabindex', 'tablevalues', 'targetx', 'targety', 'transform', 'transform-origin', 'text-anchor', 'text-decoration', 'text-rendering', 'textlength', 'type', 'u1', 'u2', 'unicode', 'values', 'viewbox', 'visibility', 'version', 'vert-adv-y', 'vert-origin-x', 'vert-origin-y', 'width', 'word-spacing', 'wrap', 'writing-mode', 'xchannelselector', 'ychannelselector', 'x', 'x1', 'x2', 'xmlns', 'y', 'y1', 'y2', 'z', 'zoomandpan']); +const html = freeze(['accept', 'action', 'align', 'alt', 'autocapitalize', 'autocomplete', 'autopictureinpicture', 'autoplay', 'background', 'bgcolor', 'border', 'capture', 'cellpadding', 'cellspacing', 'checked', 'cite', 'class', 'clear', 'color', 'cols', 'colspan', 'controls', 'controlslist', 'coords', 'crossorigin', 'datetime', 'decoding', 'default', 'dir', 'disabled', 'disablepictureinpicture', 'disableremoteplayback', 'download', 'draggable', 'enctype', 'enterkeyhint', 'exportparts', 'face', 'for', 'headers', 'height', 'hidden', 'high', 'href', 'hreflang', 'id', 'inert', 'inputmode', 'integrity', 'ismap', 'kind', 'label', 'lang', 'list', 'loading', 'loop', 'low', 'max', 'maxlength', 'media', 'method', 'min', 'minlength', 'multiple', 'muted', 'name', 'nonce', 'noshade', 'novalidate', 'nowrap', 'open', 'optimum', 'part', 'pattern', 'placeholder', 'playsinline', 'popover', 'popovertarget', 'popovertargetaction', 'poster', 'preload', 'pubdate', 'radiogroup', 'readonly', 'rel', 'required', 'rev', 'reversed', 'role', 'rows', 'rowspan', 'spellcheck', 'scope', 'selected', 'shape', 'size', 'sizes', 'slot', 'span', 'srclang', 'start', 'src', 'srcset', 'step', 'style', 'summary', 'tabindex', 'title', 'translate', 'type', 'usemap', 'valign', 'value', 'width', 'wrap', 'xmlns', 'slot']); +const svg = freeze(['accent-height', 'accumulate', 'additive', 'alignment-baseline', 'amplitude', 'ascent', 'attributename', 'attributetype', 'azimuth', 'basefrequency', 'baseline-shift', 'begin', 'bias', 'by', 'class', 'clip', 'clippathunits', 'clip-path', 'clip-rule', 'color', 'color-interpolation', 'color-interpolation-filters', 'color-profile', 'color-rendering', 'cx', 'cy', 'd', 'dx', 'dy', 'diffuseconstant', 'direction', 'display', 'divisor', 'dur', 'edgemode', 'elevation', 'end', 'exponent', 'fill', 'fill-opacity', 'fill-rule', 'filter', 'filterunits', 'flood-color', 'flood-opacity', 'font-family', 'font-size', 'font-size-adjust', 'font-stretch', 'font-style', 'font-variant', 'font-weight', 'fx', 'fy', 'g1', 'g2', 'glyph-name', 'glyphref', 'gradientunits', 'gradienttransform', 'height', 'href', 'id', 'image-rendering', 'in', 'in2', 'intercept', 'k', 'k1', 'k2', 'k3', 'k4', 'kerning', 'keypoints', 'keysplines', 'keytimes', 'lang', 'lengthadjust', 'letter-spacing', 'kernelmatrix', 'kernelunitlength', 'lighting-color', 'local', 'marker-end', 'marker-mid', 'marker-start', 'markerheight', 'markerunits', 'markerwidth', 'maskcontentunits', 'maskunits', 'max', 'mask', 'mask-type', 'media', 'method', 'mode', 'min', 'name', 'numoctaves', 'offset', 'operator', 'opacity', 'order', 'orient', 'orientation', 'origin', 'overflow', 'paint-order', 'path', 'pathlength', 'patterncontentunits', 'patterntransform', 'patternunits', 'points', 'preservealpha', 'preserveaspectratio', 'primitiveunits', 'r', 'rx', 'ry', 'radius', 'refx', 'refy', 'repeatcount', 'repeatdur', 'restart', 'result', 'rotate', 'scale', 'seed', 'shape-rendering', 'slope', 'specularconstant', 'specularexponent', 'spreadmethod', 'startoffset', 'stddeviation', 'stitchtiles', 'stop-color', 'stop-opacity', 'stroke-dasharray', 'stroke-dashoffset', 'stroke-linecap', 'stroke-linejoin', 'stroke-miterlimit', 'stroke-opacity', 'stroke', 'stroke-width', 'style', 'surfacescale', 'systemlanguage', 'tabindex', 'tablevalues', 'targetx', 'targety', 'transform', 'transform-origin', 'text-anchor', 'text-decoration', 'text-rendering', 'textlength', 'type', 'u1', 'u2', 'unicode', 'values', 'viewbox', 'visibility', 'version', 'vert-adv-y', 'vert-origin-x', 'vert-origin-y', 'width', 'word-spacing', 'wrap', 'writing-mode', 'xchannelselector', 'ychannelselector', 'x', 'x1', 'x2', 'xmlns', 'y', 'y1', 'y2', 'z', 'zoomandpan']); const mathMl = freeze(['accent', 'accentunder', 'align', 'bevelled', 'close', 'columnsalign', 'columnlines', 'columnspan', 'denomalign', 'depth', 'dir', 'display', 'displaystyle', 'encoding', 'fence', 'frame', 'height', 'href', 'id', 'largeop', 'length', 'linethickness', 'lspace', 'lquote', 'mathbackground', 'mathcolor', 'mathsize', 'mathvariant', 'maxsize', 'minsize', 'movablelimits', 'notation', 'numalign', 'open', 'rowalign', 'rowlines', 'rowspacing', 'rowspan', 'rspace', 'rquote', 'scriptlevel', 'scriptminsize', 'scriptsizemultiplier', 'selection', 'separator', 'separators', 'stretchy', 'subscriptshift', 'supscriptshift', 'symmetric', 'voffset', 'width', 'xmlns']); const xml = freeze(['xlink:href', 'xml:id', 'xlink:title', 'xml:space', 'xmlns:xlink']); @@ -311,7 +317,7 @@ const _createHooksMap = function _createHooksMap() { function createDOMPurify() { let window = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : getGlobal(); const DOMPurify = root => createDOMPurify(root); - DOMPurify.version = '3.2.6'; + DOMPurify.version = '3.3.2'; DOMPurify.removed = []; if (!window || !window.document || window.document.nodeType !== NODE_TYPE.document || !window.Element) { // Not running in a browser, provide a factory function @@ -422,6 +428,21 @@ function createDOMPurify() { let FORBID_TAGS = null; /* Explicitly forbidden attributes (overrides ALLOWED_ATTR/ADD_ATTR) */ let FORBID_ATTR = null; + /* Config object to store ADD_TAGS/ADD_ATTR functions (when used as functions) */ + const EXTRA_ELEMENT_HANDLING = Object.seal(create(null, { + tagCheck: { + writable: true, + configurable: false, + enumerable: true, + value: null + }, + attributeCheck: { + writable: true, + configurable: false, + enumerable: true, + value: null + } + })); /* Decide if ARIA attributes are okay */ let ALLOW_ARIA_ATTR = true; /* Decide if custom data attributes are okay */ @@ -591,7 +612,7 @@ function createDOMPurify() { /* Parse profile info */ if (USE_PROFILES) { ALLOWED_TAGS = addToSet({}, text); - ALLOWED_ATTR = []; + ALLOWED_ATTR = create(null); if (USE_PROFILES.html === true) { addToSet(ALLOWED_TAGS, html$1); addToSet(ALLOWED_ATTR, html); @@ -612,18 +633,33 @@ function createDOMPurify() { addToSet(ALLOWED_ATTR, xml); } } + /* Prevent function-based ADD_ATTR / ADD_TAGS from leaking across calls */ + if (!objectHasOwnProperty(cfg, 'ADD_TAGS')) { + EXTRA_ELEMENT_HANDLING.tagCheck = null; + } + if (!objectHasOwnProperty(cfg, 'ADD_ATTR')) { + EXTRA_ELEMENT_HANDLING.attributeCheck = null; + } /* Merge configuration parameters */ if (cfg.ADD_TAGS) { - if (ALLOWED_TAGS === DEFAULT_ALLOWED_TAGS) { - ALLOWED_TAGS = clone(ALLOWED_TAGS); + if (typeof cfg.ADD_TAGS === 'function') { + EXTRA_ELEMENT_HANDLING.tagCheck = cfg.ADD_TAGS; + } else { + if (ALLOWED_TAGS === DEFAULT_ALLOWED_TAGS) { + ALLOWED_TAGS = clone(ALLOWED_TAGS); + } + addToSet(ALLOWED_TAGS, cfg.ADD_TAGS, transformCaseFunc); } - addToSet(ALLOWED_TAGS, cfg.ADD_TAGS, transformCaseFunc); } if (cfg.ADD_ATTR) { - if (ALLOWED_ATTR === DEFAULT_ALLOWED_ATTR) { - ALLOWED_ATTR = clone(ALLOWED_ATTR); + if (typeof cfg.ADD_ATTR === 'function') { + EXTRA_ELEMENT_HANDLING.attributeCheck = cfg.ADD_ATTR; + } else { + if (ALLOWED_ATTR === DEFAULT_ALLOWED_ATTR) { + ALLOWED_ATTR = clone(ALLOWED_ATTR); + } + addToSet(ALLOWED_ATTR, cfg.ADD_ATTR, transformCaseFunc); } - addToSet(ALLOWED_ATTR, cfg.ADD_ATTR, transformCaseFunc); } if (cfg.ADD_URI_SAFE_ATTR) { addToSet(URI_SAFE_ATTRIBUTES, cfg.ADD_URI_SAFE_ATTR, transformCaseFunc); @@ -634,6 +670,12 @@ function createDOMPurify() { } addToSet(FORBID_CONTENTS, cfg.FORBID_CONTENTS, transformCaseFunc); } + if (cfg.ADD_FORBID_CONTENTS) { + if (FORBID_CONTENTS === DEFAULT_FORBID_CONTENTS) { + FORBID_CONTENTS = clone(FORBID_CONTENTS); + } + addToSet(FORBID_CONTENTS, cfg.ADD_FORBID_CONTENTS, transformCaseFunc); + } /* Add #text in case KEEP_CONTENT is set to true */ if (KEEP_CONTENT) { ALLOWED_TAGS['#text'] = true; @@ -931,7 +973,7 @@ function createDOMPurify() { return true; } /* Remove element if anything forbids its presence */ - if (!ALLOWED_TAGS[tagName] || FORBID_TAGS[tagName]) { + if (!(EXTRA_ELEMENT_HANDLING.tagCheck instanceof Function && EXTRA_ELEMENT_HANDLING.tagCheck(tagName)) && (!ALLOWED_TAGS[tagName] || FORBID_TAGS[tagName])) { /* Check if we have a custom element to handle */ if (!FORBID_TAGS[tagName] && _isBasicCustomElement(tagName)) { if (CUSTOM_ELEMENT_HANDLING.tagNameCheck instanceof RegExp && regExpTest(CUSTOM_ELEMENT_HANDLING.tagNameCheck, tagName)) { @@ -995,6 +1037,10 @@ function createDOMPurify() { */ // eslint-disable-next-line complexity const _isValidAttribute = function _isValidAttribute(lcTag, lcName, value) { + /* FORBID_ATTR must always win, even if ADD_ATTR predicate would allow it */ + if (FORBID_ATTR[lcName]) { + return false; + } /* Make sure attribute cannot clobber */ if (SANITIZE_DOM && (lcName === 'id' || lcName === 'name') && (value in document || value in formElement)) { return false; @@ -1003,12 +1049,12 @@ function createDOMPurify() { (https://html.spec.whatwg.org/multipage/dom.html#embedding-custom-non-visible-data-with-the-data-*-attributes) XML-compatible (https://html.spec.whatwg.org/multipage/infrastructure.html#xml-compatible and http://www.w3.org/TR/xml/#d0e804) We don't need to check the value; it's always URI safe. */ - if (ALLOW_DATA_ATTR && !FORBID_ATTR[lcName] && regExpTest(DATA_ATTR, lcName)) ; else if (ALLOW_ARIA_ATTR && regExpTest(ARIA_ATTR, lcName)) ; else if (!ALLOWED_ATTR[lcName] || FORBID_ATTR[lcName]) { + if (ALLOW_DATA_ATTR && !FORBID_ATTR[lcName] && regExpTest(DATA_ATTR, lcName)) ; else if (ALLOW_ARIA_ATTR && regExpTest(ARIA_ATTR, lcName)) ; else if (EXTRA_ELEMENT_HANDLING.attributeCheck instanceof Function && EXTRA_ELEMENT_HANDLING.attributeCheck(lcName, lcTag)) ; else if (!ALLOWED_ATTR[lcName] || FORBID_ATTR[lcName]) { if ( // First condition does a very basic check if a) it's basically a valid custom element tagname AND // b) if the tagName passes whatever the user has configured for CUSTOM_ELEMENT_HANDLING.tagNameCheck // and c) if the attribute name passes whatever the user has configured for CUSTOM_ELEMENT_HANDLING.attributeNameCheck - _isBasicCustomElement(lcTag) && (CUSTOM_ELEMENT_HANDLING.tagNameCheck instanceof RegExp && regExpTest(CUSTOM_ELEMENT_HANDLING.tagNameCheck, lcTag) || CUSTOM_ELEMENT_HANDLING.tagNameCheck instanceof Function && CUSTOM_ELEMENT_HANDLING.tagNameCheck(lcTag)) && (CUSTOM_ELEMENT_HANDLING.attributeNameCheck instanceof RegExp && regExpTest(CUSTOM_ELEMENT_HANDLING.attributeNameCheck, lcName) || CUSTOM_ELEMENT_HANDLING.attributeNameCheck instanceof Function && CUSTOM_ELEMENT_HANDLING.attributeNameCheck(lcName)) || + _isBasicCustomElement(lcTag) && (CUSTOM_ELEMENT_HANDLING.tagNameCheck instanceof RegExp && regExpTest(CUSTOM_ELEMENT_HANDLING.tagNameCheck, lcTag) || CUSTOM_ELEMENT_HANDLING.tagNameCheck instanceof Function && CUSTOM_ELEMENT_HANDLING.tagNameCheck(lcTag)) && (CUSTOM_ELEMENT_HANDLING.attributeNameCheck instanceof RegExp && regExpTest(CUSTOM_ELEMENT_HANDLING.attributeNameCheck, lcName) || CUSTOM_ELEMENT_HANDLING.attributeNameCheck instanceof Function && CUSTOM_ELEMENT_HANDLING.attributeNameCheck(lcName, lcTag)) || // Alternative, second condition checks if it's an `is`-attribute, AND // the value passes whatever the user has configured for CUSTOM_ELEMENT_HANDLING.tagNameCheck lcName === 'is' && CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements && (CUSTOM_ELEMENT_HANDLING.tagNameCheck instanceof RegExp && regExpTest(CUSTOM_ELEMENT_HANDLING.tagNameCheck, value) || CUSTOM_ELEMENT_HANDLING.tagNameCheck instanceof Function && CUSTOM_ELEMENT_HANDLING.tagNameCheck(value))) ; else { @@ -1087,7 +1133,12 @@ function createDOMPurify() { value = SANITIZE_NAMED_PROPS_PREFIX + value; } /* Work around a security issue with comments inside attributes */ - if (SAFE_FOR_XML && regExpTest(/((--!?|])>)|<\/(style|title)/i, value)) { + if (SAFE_FOR_XML && regExpTest(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i, value)) { + _removeAttribute(name, currentNode); + continue; + } + /* Make sure we cannot easily use animated hrefs, even if animations are allowed */ + if (lcName === 'attributename' && stringMatch(value, 'href')) { _removeAttribute(name, currentNode); continue; } @@ -1358,7 +1409,7 @@ module.exports = purify; //# sourceMappingURL=purify.cjs.js.map -/***/ }) +/***/ } }]); -//# sourceMappingURL=8b11be0d97d58e135d30.bundle.js.map \ No newline at end of file +//# sourceMappingURL=e8fec410b4ec8b8ad5e5.bundle.js.map diff --git a/assets/js/floating-bars-var-2.5287acd8570f1ce2dde3.bundle.min.js b/assets/js/floating-bars-var-2.5287acd8570f1ce2dde3.bundle.min.js new file mode 100644 index 00000000..cb41766f --- /dev/null +++ b/assets/js/floating-bars-var-2.5287acd8570f1ce2dde3.bundle.min.js @@ -0,0 +1,2 @@ +/*! pro-elements - v4.0.0 - 28-04-2026 */ +"use strict";(self.webpackChunkelementor_pro=self.webpackChunkelementor_pro||[]).push([[249],{8562(e){e.exports=elementorModules.ViewModule.extend({$element:null,editorListeners:null,onElementChange:null,onEditSettingsChange:null,onPageSettingsChange:null,isEdit:null,__construct(e){this.isActive(e)&&(this.$element=e.$element,this.isEdit=this.$element.hasClass("elementor-element-edit-mode"),this.isEdit&&this.addEditorListeners())},isActive:()=>!0,isElementInTheCurrentDocument(){return!!elementorFrontend.isEditMode()&&elementor.documents.currentDocument.id.toString()===this.$element[0].closest(".elementor").dataset.elementorId},findElement(e){var t=this.$element;return t.find(e).filter(function(){return jQuery(this).parent().closest(".elementor-element").is(t)})},getUniqueHandlerID(e,t){return e||(e=this.getModelCID()),t||(t=this.$element),e+t.attr("data-element_type")+this.getConstructorID()},initEditorListeners(){var e=this;if(e.editorListeners=[{event:"element:destroy",to:elementor.channels.data,callback(t){t.cid===e.getModelCID()&&e.onDestroy()}}],e.onElementChange){const t=e.getWidgetType()||e.getElementType();let n="change";"global"!==t&&(n+=":"+t),e.editorListeners.push({event:n,to:elementor.channels.editor,callback(t,n){e.getUniqueHandlerID(n.model.cid,n.$el)===e.getUniqueHandlerID()&&e.onElementChange(t.model.get("name"),t,n)}})}e.onEditSettingsChange&&e.editorListeners.push({event:"change:editSettings",to:elementor.channels.editor,callback(t,n){if(n.model.cid!==e.getModelCID())return;const s=Object.keys(t.changed)[0];e.onEditSettingsChange(s,t.changed[s])}}),["page"].forEach(function(t){var n="on"+t[0].toUpperCase()+t.slice(1)+"SettingsChange";e[n]&&e.editorListeners.push({event:"change",to:elementor.settings[t].model,callback(t){e[n](t.changed)}})})},getEditorListeners(){return this.editorListeners||this.initEditorListeners(),this.editorListeners},addEditorListeners(){var e=this.getUniqueHandlerID();this.getEditorListeners().forEach(function(t){elementorFrontend.addListenerOnce(e,t.event,t.callback,t.to)})},removeEditorListeners(){var e=this.getUniqueHandlerID();this.getEditorListeners().forEach(function(t){elementorFrontend.removeListeners(e,t.event,null,t.to)})},getElementType(){return this.$element.data("element_type")},getWidgetType(){const e=this.$element.data("widget_type");if(e)return e.split(".")[0]},getID(){return this.$element.data("id")},getModelCID(){return this.$element.data("model-cid")},getElementSettings(e){let t={};const n=this.getModelCID();if(this.isEdit&&n){const e=elementorFrontend.config.elements.data[n],s=e.attributes;let i=s.widgetType||s.elType;s.isInner&&(i="inner-"+i);let o=elementorFrontend.config.elements.keys[i];o||(o=elementorFrontend.config.elements.keys[i]=[],jQuery.each(e.controls,(e,t)=>{(t.frontend_available||t.editor_available)&&o.push(e)})),jQuery.each(e.getActiveControls(),function(e){if(-1!==o.indexOf(e)){let n=s[e];n.toJSON&&(n=n.toJSON()),t[e]=n}})}else t=this.$element.data("settings")||{};return this.getItems(t,e)},getEditSettings(e){var t={};return this.isEdit&&(t=elementorFrontend.config.elements.editSettings[this.getModelCID()].attributes),this.getItems(t,e)},getCurrentDeviceSetting(e){return elementorFrontend.getCurrentDeviceSetting(this.getElementSettings(),e)},onInit(){this.isActive(this.getSettings())&&elementorModules.ViewModule.prototype.onInit.apply(this,arguments)},onDestroy(){this.isEdit&&this.removeEditorListeners(),this.unbindEvents&&this.unbindEvents()}})},9744(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;t.default=class FloatingBarDomHelper{constructor(e){this.$element=e}maybeMoveToTop(){const e=this.$element[0],t=e.querySelector(".e-floating-bars");if(elementorFrontend.isEditMode())t.classList.add("is-sticky");else if(e.dataset.widget_type.startsWith("floating-bars")&&t.classList.contains("has-vertical-position-top")&&!t.classList.contains("is-sticky")){const t=document.getElementById("wpadminbar"),n=e.closest(".elementor");t?t.after(n):document.body.prepend(n)}}}},2319(e,t,n){var s=n(6784);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=s(n(8562)),o=s(n(9744)),l=s(n(8243));class FloatingBarsHandler extends i.default{getDefaultSettings(){return{selectors:{main:".e-floating-bars",closeButton:".e-floating-bars__close-button",playButton:".e-floating-bars__play-button",pauseButton:".e-floating-bars__pause-button",headline:".e-floating-bars__headline",headlines:".e-floating-bars__headlines",headlinesInner:".e-floating-bars__headlines-inner",overlay:".e-floating-bars__overlay"},constants:{isHidden:"is-hidden",isSticky:"is-sticky",hasVerticalPositionTop:"has-vertical-position-top",hasVerticalPositionBottom:"has-vertical-position-bottom",isPaused:"is-paused",animationTypeControl:"style_ticker_animation_type",autoplay:"autoplay"}}}onElementChange(e){["style_headline_text_typography_font_size","style_headlines_icon_size","style_floating_bar_padding","style_floating_bar_controls_size","style_floating_bar_element_spacing"].includes(e)&&this.initDefaultState()}getDefaultElements(){const e=this.getSettings("selectors");return{main:this.$element[0].querySelector(e.main),closeButton:this.$element[0].querySelector(e.closeButton),pauseButton:this.$element[0].querySelector(e.pauseButton),playButton:this.$element[0].querySelector(e.playButton),headlineAll:this.$element[0].querySelectorAll(e.headline),headlines:this.$element[0].querySelector(e.headlines),headlinesInner:this.$element[0].querySelector(e.headlinesInner),overlay:this.$element[0].querySelector(e.overlay)}}getResponsiveSetting(e){const t=elementorFrontend.getCurrentDeviceMode();return elementorFrontend.utils.controls.getResponsiveControlValue(this.getElementSettings(),e,"",t)}bindEvents(){this.elements.closeButton&&this.elements.closeButton.addEventListener("click",this.closeFloatingBar.bind(this)),this.elements.pauseButton&&this.elements.pauseButton.addEventListener("click",this.pauseCarousel.bind(this)),this.elements.playButton&&this.elements.playButton.addEventListener("click",this.playCarousel.bind(this)),this.hasStickyElements()&&window.addEventListener("resize",this.handleStickyElements.bind(this))}isMobileDevice(){return["mobile","mobile_extra"].includes(elementorFrontend.getCurrentDeviceMode())}isStickyTop(){const{isSticky:e,hasVerticalPositionTop:t}=this.getSettings("constants");return this.elements.main.classList.contains(e)&&this.elements.main.classList.contains(t)}isStickyBottom(){const{isSticky:e,hasVerticalPositionBottom:t}=this.getSettings("constants");return this.elements.main.classList.contains(e)&&this.elements.main.classList.contains(t)}hasStickyElements(){return document.querySelectorAll(".elementor-sticky").length>0}pauseCarousel(){const{isPaused:e}=this.getSettings("constants");this.elements.headlines.classList.add(e),this.elements.playButton&&this.elements.pauseButton&&(this.elements.playButton.setAttribute("aria-hidden","false"),this.elements.pauseButton.setAttribute("aria-hidden","true"))}playCarousel(){const{isPaused:e}=this.getSettings("constants");this.elements.headlines.classList.remove(e),this.elements.playButton&&this.elements.pauseButton&&(this.elements.pauseButton.setAttribute("aria-hidden","false"),this.elements.playButton.setAttribute("aria-hidden","true"))}closeFloatingBar(){const{isHidden:e}=this.getSettings("constants");elementorFrontend.isEditMode()||(this.elements.main.classList.add(e),this.hasStickyElements()?this.handleStickyElements():this.isStickyTop()&&this.removeBodyPadding())}focusOnLoad(){this.elements.main.setAttribute("tabindex","0"),this.elements.main.focus({focusVisible:!0})}applyBodyPadding(){const e=this.elements.main.offsetHeight;document.body.style.paddingTop=`${e}px`}removeBodyPadding(){document.body.style.paddingTop="0"}cloneScrollerContent(){Array.from(this.elements.headlinesInner.children).forEach(e=>{const t=e.cloneNode(!0);t.setAttribute("aria-hidden","true"),t.classList.add("e-floating-bars__headline--clone"),this.elements.headlinesInner.appendChild(t)})}cloneHeadlinesToFillContainer(){let e=this.elements.headlinesInner.offsetWidth;const t=this.elements.headlines.offsetWidth;for(;e{const e=window.scrollY,t=this.elements.headlinesInner.lastElementChild;if(elementorFrontend.config.is_rtl){this.elements.headlinesInner.style.transform=`translateX(${e}px)`;t.lastElementChild.getBoundingClientRect().left>=this.elements.headlines.getBoundingClientRect().left&&this.cloneScrollerContent()}else{this.elements.headlinesInner.style.transform=`translateX(-${e}px)`;t.lastElementChild.getBoundingClientRect().right<=this.elements.headlines.getBoundingClientRect().right&&this.cloneScrollerContent()}})}handleTickerClick(e){e.preventDefault();const{isPlaying:t}=this.getSettings("constants");if(this.elements.headlines.classList.contains(t))this.pauseCarousel();else{const t=e.currentTarget.getAttribute("href"),n=e.currentTarget.getAttribute("target");!!n?window.open(t,n):t&&(window.location.href=t),this.playCarousel()}}handleWPAdminBar(){const e=elementorFrontend.elements.$wpAdminBar;e.length&&(this.elements.main.style.top=`${e.height()}px`)}handleStickyElements(){const e=this.elements.main.offsetHeight,t=elementorFrontend.elements.$wpAdminBar,n=document.querySelectorAll(".elementor-sticky:not(.elementor-sticky__spacer)");0!==n.length&&(n.forEach(n=>{const s=n.getAttribute("data-settings"),i=JSON.parse(s)?.sticky,o="0px"===n.style.top||"top"===i,l="0px"===n.style.bottom||"bottom"===i;this.isStickyTop()&&o?t.length?n.style.top=`${e+t.height()}px`:n.style.top=`${e}px`:this.isStickyBottom()&&l&&(n.style.bottom=`${e}px`),elementorFrontend.isEditMode()&&(o?n.style.top=this.isStickyTop()?`${e}px`:"0px":l&&(n.style.bottom=this.isStickyBottom()?`${e}px`:"0px"))}),document.querySelectorAll(".elementor-sticky__spacer").forEach(t=>{const n=t.getAttribute("data-settings"),s=JSON.parse(n)?.sticky,i="0px"===t.style.top||"top"===s;this.isStickyTop()&&i&&(t.style.marginBottom=`${e}px`)}))}handleClickOutside(){const{isPlaying:e}=this.getSettings("constants");document.addEventListener("click",t=>{this.elements.headlines.classList.contains(e)||this.elements.main.contains(t.target)||this.playCarousel()})}initScrollingAnimation(){const{autoplay:e,animationTypeControl:t}=this.getSettings("constants");e===this.getResponsiveSetting(t)?(this.cloneHeadlinesInner(),this.elements.headlines.setAttribute("data-animated","true"),this.playCarousel(),this.isMobileDevice()&&(this.elements.headlineAll.forEach(e=>{e.addEventListener("click",this.handleTickerClick.bind(this))}),this.handleClickOutside())):this.handleBrowserScrollAnimation()}initDefaultState(){this.isStickyTop()&&this.handleWPAdminBar(),this.hasStickyElements()?this.handleStickyElements():this.isStickyTop()&&this.applyBodyPadding(),this.elements.main&&!elementorFrontend.isEditMode()&&this.focusOnLoad(),this.elements.headlinesInner&&this.cloneHeadlinesToFillContainer(),window.matchMedia("(prefers-reduced-motion: reduce)").matches||this.initScrollingAnimation()}setupInnerContainer(){this.elements.main.closest(".e-con-inner").classList.add("e-con-inner--floating-bars"),this.elements.main.closest(".e-con").classList.add("e-con--floating-bars")}onInit(...e){super.onInit(...e),this.clickTrackingHandler=new l.default({$element:this.$element});new o.default(this.$element).maybeMoveToTop(),this.initDefaultState(),this.setupInnerContainer()}}t.default=FloatingBarsHandler},8243(e,t,n){var s=n(6784);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=s(n(8562));class ClickTrackingHandler extends i.default{clicks=[];getDefaultSettings(){return{selectors:{contentWrapper:".e-contact-buttons__content-wrapper",contentWrapperFloatingBars:".e-floating-bars",floatingBarCouponButton:".e-floating-bars__coupon-button",floatingBarsHeadline:".e-floating-bars__headline",contactButtonsVar4:".e-contact-buttons__contact-icon-link",contactButtonsVar5:".e-contact-buttons__chat-button",contactButtonsVar6:".e-contact-buttons-var-6",contactButtonsVar8:".e-contact-buttons-var-8",elementorWrapper:'[data-elementor-type="floating-buttons"]',contactButtonCore:".e-contact-buttons__send-button"}}}getDefaultElements(){const e=this.getSettings("selectors");return{contentWrapper:this.$element[0].querySelector(e.contentWrapper),contentWrapperFloatingBars:this.$element[0].querySelector(e.contentWrapperFloatingBars),contactButtonsVar5:this.$element[0].querySelector(e.contactButtonsVar5),contactButtonsVar6:this.$element[0].querySelector(e.contactButtonsVar6)}}bindEvents(){this.elements.contentWrapper&&this.elements.contentWrapper.addEventListener("click",this.onChatButtonTrackClick.bind(this)),this.elements.contactButtonsVar5&&this.elements.contactButtonsVar5.addEventListener("click",this.onChatButtonTrackClick.bind(this)),this.elements.contactButtonsVar6&&this.elements.contactButtonsVar6.addEventListener("click",this.onChatButtonTrackClick.bind(this)),this.elements.contentWrapperFloatingBars&&this.elements.contentWrapperFloatingBars.addEventListener("click",this.onChatButtonTrackClick.bind(this)),window.addEventListener("beforeunload",()=>{this.clicks.length>0&&this.sendClicks()})}onChatButtonTrackClick(e){const t=e.target||e.srcElement,n=this.getSettings("selectors"),s=[n.contactButtonsVar4,n.contactButtonsVar6,n.floatingBarCouponButton,n.floatingBarsHeadline,n.contactButtonCore];for(const e of s)(t.matches(e)||t.closest(e))&&this.getDocumentIdAndTrack(t,n);(t.matches(n.contactButtonsVar5)||t.closest(n.contactButtonsVar5))&&t.closest(".e-contact-buttons-var-5")&&this.getDocumentIdAndTrack(t,n)}getDocumentIdAndTrack(e,t){const n=e.closest(t.elementorWrapper).dataset.elementorId;this.trackClick(n)}trackClick(e){e&&(this.clicks.push(e),this.clicks.length>=10&&this.sendClicks())}sendClicks(){const e=new FormData;e.append("action","elementor_send_clicks"),e.append("_nonce",elementorFrontendConfig?.nonces?.floatingButtonsClickTracking),this.clicks.forEach(t=>e.append("clicks[]",t)),fetch(elementorFrontendConfig?.urls?.ajaxurl,{method:"POST",body:e}).then(()=>{this.clicks=[]})}}t.default=ClickTrackingHandler}}]); diff --git a/assets/js/floating-bars-var-2.fa9c6b6e6aaeb43504f2.bundle.js b/assets/js/floating-bars-var-2.a7a076850ecbe78bb8c7.bundle.js similarity index 98% rename from assets/js/floating-bars-var-2.fa9c6b6e6aaeb43504f2.bundle.js rename to assets/js/floating-bars-var-2.a7a076850ecbe78bb8c7.bundle.js index fc0955e5..b5622969 100644 --- a/assets/js/floating-bars-var-2.fa9c6b6e6aaeb43504f2.bundle.js +++ b/assets/js/floating-bars-var-2.a7a076850ecbe78bb8c7.bundle.js @@ -1,12 +1,12 @@ -/*! pro-elements - v3.35.0 - 02-02-2026 */ +/*! pro-elements - v4.0.0 - 28-04-2026 */ "use strict"; (self["webpackChunkelementor_pro"] = self["webpackChunkelementor_pro"] || []).push([["floating-bars-var-2"],{ -/***/ "../modules/floating-buttons/assets/js/frontend/handlers/floating-bars-v2.js": +/***/ "../modules/floating-buttons/assets/js/frontend/handlers/floating-bars-v2.js" /*!***********************************************************************************!*\ !*** ../modules/floating-buttons/assets/js/frontend/handlers/floating-bars-v2.js ***! \***********************************************************************************/ -/***/ ((__unused_webpack_module, exports, __webpack_require__) => { +(__unused_webpack_module, exports, __webpack_require__) { @@ -322,7 +322,7 @@ class FloatingBarsHandler extends _base.default { } exports["default"] = FloatingBarsHandler; -/***/ }) +/***/ } }]); -//# sourceMappingURL=floating-bars-var-2.fa9c6b6e6aaeb43504f2.bundle.js.map \ No newline at end of file +//# sourceMappingURL=floating-bars-var-2.a7a076850ecbe78bb8c7.bundle.js.map diff --git a/assets/js/floating-bars-var-3.ce31fbd73759a9439cbf.bundle.js b/assets/js/floating-bars-var-3.c5d9c759b0475977fd76.bundle.js similarity index 97% rename from assets/js/floating-bars-var-3.ce31fbd73759a9439cbf.bundle.js rename to assets/js/floating-bars-var-3.c5d9c759b0475977fd76.bundle.js index 6b39feed..cb7456c9 100644 --- a/assets/js/floating-bars-var-3.ce31fbd73759a9439cbf.bundle.js +++ b/assets/js/floating-bars-var-3.c5d9c759b0475977fd76.bundle.js @@ -1,12 +1,12 @@ -/*! pro-elements - v3.35.0 - 02-02-2026 */ +/*! pro-elements - v4.0.0 - 28-04-2026 */ "use strict"; (self["webpackChunkelementor_pro"] = self["webpackChunkelementor_pro"] || []).push([["floating-bars-var-3"],{ -/***/ "../modules/floating-buttons/assets/js/frontend/handlers/floating-bars-v3.js": +/***/ "../modules/floating-buttons/assets/js/frontend/handlers/floating-bars-v3.js" /*!***********************************************************************************!*\ !*** ../modules/floating-buttons/assets/js/frontend/handlers/floating-bars-v3.js ***! \***********************************************************************************/ -/***/ ((__unused_webpack_module, exports, __webpack_require__) => { +(__unused_webpack_module, exports, __webpack_require__) { @@ -280,13 +280,13 @@ class FloatingBarsHandler extends _base.default { } exports["default"] = FloatingBarsHandler; -/***/ }), +/***/ }, -/***/ "../modules/notes/assets/js/services/copy-to-clipboard/index.js": +/***/ "../modules/notes/assets/js/services/copy-to-clipboard/index.js" /*!**********************************************************************!*\ !*** ../modules/notes/assets/js/services/copy-to-clipboard/index.js ***! \**********************************************************************/ -/***/ ((__unused_webpack_module, exports) => { +(__unused_webpack_module, exports) { @@ -317,7 +317,7 @@ function copyToClipboard(value) { navigator.clipboard.writeText(value); } -/***/ }) +/***/ } }]); -//# sourceMappingURL=floating-bars-var-3.ce31fbd73759a9439cbf.bundle.js.map \ No newline at end of file +//# sourceMappingURL=floating-bars-var-3.c5d9c759b0475977fd76.bundle.js.map diff --git a/assets/js/floating-bars-var-3.e9e9c0ea3c6fb0e51c58.bundle.min.js b/assets/js/floating-bars-var-3.e9e9c0ea3c6fb0e51c58.bundle.min.js new file mode 100644 index 00000000..47c55110 --- /dev/null +++ b/assets/js/floating-bars-var-3.e9e9c0ea3c6fb0e51c58.bundle.min.js @@ -0,0 +1,2 @@ +/*! pro-elements - v4.0.0 - 28-04-2026 */ +"use strict";(self.webpackChunkelementor_pro=self.webpackChunkelementor_pro||[]).push([[440],{8562(t){t.exports=elementorModules.ViewModule.extend({$element:null,editorListeners:null,onElementChange:null,onEditSettingsChange:null,onPageSettingsChange:null,isEdit:null,__construct(t){this.isActive(t)&&(this.$element=t.$element,this.isEdit=this.$element.hasClass("elementor-element-edit-mode"),this.isEdit&&this.addEditorListeners())},isActive:()=>!0,isElementInTheCurrentDocument(){return!!elementorFrontend.isEditMode()&&elementor.documents.currentDocument.id.toString()===this.$element[0].closest(".elementor").dataset.elementorId},findElement(t){var e=this.$element;return e.find(t).filter(function(){return jQuery(this).parent().closest(".elementor-element").is(e)})},getUniqueHandlerID(t,e){return t||(t=this.getModelCID()),e||(e=this.$element),t+e.attr("data-element_type")+this.getConstructorID()},initEditorListeners(){var t=this;if(t.editorListeners=[{event:"element:destroy",to:elementor.channels.data,callback(e){e.cid===t.getModelCID()&&t.onDestroy()}}],t.onElementChange){const e=t.getWidgetType()||t.getElementType();let n="change";"global"!==e&&(n+=":"+e),t.editorListeners.push({event:n,to:elementor.channels.editor,callback(e,n){t.getUniqueHandlerID(n.model.cid,n.$el)===t.getUniqueHandlerID()&&t.onElementChange(e.model.get("name"),e,n)}})}t.onEditSettingsChange&&t.editorListeners.push({event:"change:editSettings",to:elementor.channels.editor,callback(e,n){if(n.model.cid!==t.getModelCID())return;const s=Object.keys(e.changed)[0];t.onEditSettingsChange(s,e.changed[s])}}),["page"].forEach(function(e){var n="on"+e[0].toUpperCase()+e.slice(1)+"SettingsChange";t[n]&&t.editorListeners.push({event:"change",to:elementor.settings[e].model,callback(e){t[n](e.changed)}})})},getEditorListeners(){return this.editorListeners||this.initEditorListeners(),this.editorListeners},addEditorListeners(){var t=this.getUniqueHandlerID();this.getEditorListeners().forEach(function(e){elementorFrontend.addListenerOnce(t,e.event,e.callback,e.to)})},removeEditorListeners(){var t=this.getUniqueHandlerID();this.getEditorListeners().forEach(function(e){elementorFrontend.removeListeners(t,e.event,null,e.to)})},getElementType(){return this.$element.data("element_type")},getWidgetType(){const t=this.$element.data("widget_type");if(t)return t.split(".")[0]},getID(){return this.$element.data("id")},getModelCID(){return this.$element.data("model-cid")},getElementSettings(t){let e={};const n=this.getModelCID();if(this.isEdit&&n){const t=elementorFrontend.config.elements.data[n],s=t.attributes;let i=s.widgetType||s.elType;s.isInner&&(i="inner-"+i);let o=elementorFrontend.config.elements.keys[i];o||(o=elementorFrontend.config.elements.keys[i]=[],jQuery.each(t.controls,(t,e)=>{(e.frontend_available||e.editor_available)&&o.push(t)})),jQuery.each(t.getActiveControls(),function(t){if(-1!==o.indexOf(t)){let n=s[t];n.toJSON&&(n=n.toJSON()),e[t]=n}})}else e=this.$element.data("settings")||{};return this.getItems(e,t)},getEditSettings(t){var e={};return this.isEdit&&(e=elementorFrontend.config.elements.editSettings[this.getModelCID()].attributes),this.getItems(e,t)},getCurrentDeviceSetting(t){return elementorFrontend.getCurrentDeviceSetting(this.getElementSettings(),t)},onInit(){this.isActive(this.getSettings())&&elementorModules.ViewModule.prototype.onInit.apply(this,arguments)},onDestroy(){this.isEdit&&this.removeEditorListeners(),this.unbindEvents&&this.unbindEvents()}})},9744(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;e.default=class FloatingBarDomHelper{constructor(t){this.$element=t}maybeMoveToTop(){const t=this.$element[0],e=t.querySelector(".e-floating-bars");if(elementorFrontend.isEditMode())e.classList.add("is-sticky");else if(t.dataset.widget_type.startsWith("floating-bars")&&e.classList.contains("has-vertical-position-top")&&!e.classList.contains("is-sticky")){const e=document.getElementById("wpadminbar"),n=t.closest(".elementor");e?e.after(n):document.body.prepend(n)}}}},7704(t,e,n){var s=n(6784);Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var i=s(n(8562)),o=n(6367),a=s(n(9744)),r=s(n(8243));class FloatingBarsHandler extends i.default{getDefaultSettings(){return{selectors:{main:".e-floating-bars",mainV3:".e-floating-bars-var-3",closeButton:".e-floating-bars__close-button",couponButton:".e-floating-bars__coupon-button",couponCode:".e-floating-bars__coupon-code",codeTextGroup:".e-floating-bars__coupon-code",successTextGroup:".e-floating-bars__coupon-success"},constants:{couponEntranceAnimation:"style_coupon_animation",couponEntranceAnimationDelay:"style_coupon_animation_delay",hasEntranceAnimation:"has-entrance-animation",visible:"visible",isSticky:"is-sticky",hasVerticalPositionTop:"has-vertical-position-top",hasVerticalPositionBottom:"has-vertical-position-bottom",isHidden:"is-hidden",successMessageDurationControl:"style_coupon_success_message_duration",animated:"animated"}}}getDefaultElements(){const t=this.getSettings("selectors");return{main:this.$element[0].querySelector(t.main),mainV3:this.$element[0].querySelector(t.mainV3),mainAll:this.$element[0].querySelectorAll(t.main),closeButton:this.$element[0].querySelector(t.closeButton),couponButton:this.$element[0].querySelector(t.couponButton),couponCode:this.$element[0].querySelector(t.couponCode),codeTextGroup:this.$element[0].querySelector(t.codeTextGroup),successTextGroup:this.$element[0].querySelector(t.successTextGroup)}}getResponsiveSetting(t){const e=elementorFrontend.getCurrentDeviceMode();return elementorFrontend.utils.controls.getResponsiveControlValue(this.getElementSettings(),t,"",e)}bindEvents(){this.elements.closeButton&&this.elements.closeButton.addEventListener("click",this.closeFloatingBar.bind(this)),this.elements.couponButton&&this.elements.couponButton.addEventListener("animationend",this.handleAnimationEnd.bind(this)),this.elements.main&&window.addEventListener("keyup",this.onDocumentKeyup.bind(this)),this.elements.couponButton&&this.elements.couponButton.addEventListener("click",this.handleCouponButtonClick.bind(this)),this.hasStickyElements()&&window.addEventListener("resize",this.handleStickyElements.bind(this))}isStickyTop(){const{isSticky:t,hasVerticalPositionTop:e}=this.getSettings("constants");return this.elements.main.classList.contains(t)&&this.elements.main.classList.contains(e)}isStickyBottom(){const{isSticky:t,hasVerticalPositionBottom:e}=this.getSettings("constants");return this.elements.main.classList.contains(t)&&this.elements.main.classList.contains(e)}hasStickyElements(){return document.querySelectorAll(".elementor-sticky").length>0}focusOnLoad(){this.elements.main.setAttribute("tabindex","0"),this.elements.main.focus({focusVisible:!0})}applyBodyPadding(){const t=this.elements.main.offsetHeight;document.body.style.paddingTop=`${t}px`}removeBodyPadding(){document.body.style.paddingTop="0"}handleWPAdminBar(){const t=elementorFrontend.elements.$wpAdminBar;t.length&&(this.elements.main.style.top=`${t.height()}px`)}handleStickyElements(){const t=this.elements.main.offsetHeight,e=elementorFrontend.elements.$wpAdminBar,n=document.querySelectorAll(".elementor-sticky:not(.elementor-sticky__spacer)");0!==n.length&&(n.forEach(n=>{const s=n.getAttribute("data-settings"),i=JSON.parse(s)?.sticky,o="0px"===n.style.top||"top"===i,a="0px"===n.style.bottom||"bottom"===i;this.isStickyTop()&&o?e.length?n.style.top=`${t+e.height()}px`:n.style.top=`${t}px`:this.isStickyBottom()&&a&&(n.style.bottom=`${t}px`),elementorFrontend.isEditMode()&&(o?n.style.top=this.isStickyTop()?`${t}px`:"0px":a&&(n.style.bottom=this.isStickyBottom()?`${t}px`:"0px"))}),document.querySelectorAll(".elementor-sticky__spacer").forEach(e=>{const n=e.getAttribute("data-settings"),s=JSON.parse(n)?.sticky,i="0px"===e.style.top||"top"===s;this.isStickyTop()&&i&&(e.style.marginBottom=`${t}px`)}))}closeFloatingBar(){const{isHidden:t}=this.getSettings("constants");elementorFrontend.isEditMode()||(this.elements.main.classList.add(t),this.hasStickyElements()?this.handleStickyElements():this.isStickyTop()&&this.removeBodyPadding())}initEntranceAnimation(){const{animated:t,couponEntranceAnimation:e,couponEntranceAnimationDelay:n,hasEntranceAnimation:s}=this.getSettings("constants"),i=this.getResponsiveSetting(e),o=(this.getResponsiveSetting(n)||0)+500;this.elements.couponButton.classList.add(t),this.elements.couponButton.classList.add(i),setTimeout(()=>{this.elements.couponButton.classList.remove(s)},o)}handleAnimationEnd(){this.removeEntranceAnimationClasses(),this.focusOnLoad()}removeEntranceAnimationClasses(){if(!this.elements.couponButton)return;const{animated:t,couponEntranceAnimation:e,visible:n}=this.getSettings("constants"),s=this.getResponsiveSetting(e);this.elements.couponButton.classList.remove(t),this.elements.couponButton.classList.remove(s),this.elements.couponButton.classList.add(n)}onDocumentKeyup(t){27===t.keyCode&&this.elements.main&&this.elements.main.contains(document.activeElement)&&this.closeFloatingBar()}getDuration(t){const e="s"===t.unit,n=e?"1.5":"1500",s=""!==t.size?t.size:n;return e?1e3*s:s}handleCouponButtonClick(t){const{successMessageDurationControl:e,isHidden:n}=this.getSettings("constants"),s=this.elements.couponCode.innerText,i=this.getResponsiveSetting(e),a=this.getDuration(i),r=t.currentTarget.getBoundingClientRect().width,l=t.currentTarget.getBoundingClientRect().height;this.elements.mainV3.style.setProperty("--e-floating-bars-coupon-width",`${r}px`),this.elements.mainV3.style.setProperty("--e-floating-bars-coupon-height",`${l}px`),(0,o.copyToClipboard)(s),this.elements.codeTextGroup.classList.add(n),this.elements.successTextGroup.classList.remove(n),setTimeout(()=>{this.elements.codeTextGroup.classList.remove(n),this.elements.successTextGroup.classList.add(n),this.elements.mainV3.style.setProperty("--e-floating-bars-coupon-width","initial"),this.elements.mainV3.style.setProperty("--e-floating-bars-coupon-height","initial")},a)}initDefaultState(){const{hasEntranceAnimation:t}=this.getSettings("constants");this.isStickyTop()&&this.handleWPAdminBar(),this.hasStickyElements()?this.handleStickyElements():this.isStickyTop()&&this.applyBodyPadding(),!this.elements.main||this.elements.couponButton.classList.contains(t)||elementorFrontend.isEditMode()||this.focusOnLoad()}setupInnerContainer(){this.elements.main.closest(".e-con-inner").classList.add("e-con-inner--floating-bars"),this.elements.main.closest(".e-con").classList.add("e-con--floating-bars")}onInit(...t){const{hasEntranceAnimation:e}=this.getSettings("constants");super.onInit(...t),this.clickTrackingHandler=new r.default({$element:this.$element});new a.default(this.$element).maybeMoveToTop(),this.elements.couponButton&&this.elements.couponButton.classList.contains(e)&&this.initEntranceAnimation(),this.initDefaultState(),this.setupInnerContainer()}}e.default=FloatingBarsHandler},8243(t,e,n){var s=n(6784);Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var i=s(n(8562));class ClickTrackingHandler extends i.default{clicks=[];getDefaultSettings(){return{selectors:{contentWrapper:".e-contact-buttons__content-wrapper",contentWrapperFloatingBars:".e-floating-bars",floatingBarCouponButton:".e-floating-bars__coupon-button",floatingBarsHeadline:".e-floating-bars__headline",contactButtonsVar4:".e-contact-buttons__contact-icon-link",contactButtonsVar5:".e-contact-buttons__chat-button",contactButtonsVar6:".e-contact-buttons-var-6",contactButtonsVar8:".e-contact-buttons-var-8",elementorWrapper:'[data-elementor-type="floating-buttons"]',contactButtonCore:".e-contact-buttons__send-button"}}}getDefaultElements(){const t=this.getSettings("selectors");return{contentWrapper:this.$element[0].querySelector(t.contentWrapper),contentWrapperFloatingBars:this.$element[0].querySelector(t.contentWrapperFloatingBars),contactButtonsVar5:this.$element[0].querySelector(t.contactButtonsVar5),contactButtonsVar6:this.$element[0].querySelector(t.contactButtonsVar6)}}bindEvents(){this.elements.contentWrapper&&this.elements.contentWrapper.addEventListener("click",this.onChatButtonTrackClick.bind(this)),this.elements.contactButtonsVar5&&this.elements.contactButtonsVar5.addEventListener("click",this.onChatButtonTrackClick.bind(this)),this.elements.contactButtonsVar6&&this.elements.contactButtonsVar6.addEventListener("click",this.onChatButtonTrackClick.bind(this)),this.elements.contentWrapperFloatingBars&&this.elements.contentWrapperFloatingBars.addEventListener("click",this.onChatButtonTrackClick.bind(this)),window.addEventListener("beforeunload",()=>{this.clicks.length>0&&this.sendClicks()})}onChatButtonTrackClick(t){const e=t.target||t.srcElement,n=this.getSettings("selectors"),s=[n.contactButtonsVar4,n.contactButtonsVar6,n.floatingBarCouponButton,n.floatingBarsHeadline,n.contactButtonCore];for(const t of s)(e.matches(t)||e.closest(t))&&this.getDocumentIdAndTrack(e,n);(e.matches(n.contactButtonsVar5)||e.closest(n.contactButtonsVar5))&&e.closest(".e-contact-buttons-var-5")&&this.getDocumentIdAndTrack(e,n)}getDocumentIdAndTrack(t,e){const n=t.closest(e.elementorWrapper).dataset.elementorId;this.trackClick(n)}trackClick(t){t&&(this.clicks.push(t),this.clicks.length>=10&&this.sendClicks())}sendClicks(){const t=new FormData;t.append("action","elementor_send_clicks"),t.append("_nonce",elementorFrontendConfig?.nonces?.floatingButtonsClickTracking),this.clicks.forEach(e=>t.append("clicks[]",e)),fetch(elementorFrontendConfig?.urls?.ajaxurl,{method:"POST",body:t}).then(()=>{this.clicks=[]})}}e.default=ClickTrackingHandler},6367(t,e){function canCopyToClipboard(){return!!navigator?.clipboard}Object.defineProperty(e,"__esModule",{value:!0}),e.canCopyToClipboard=canCopyToClipboard,e.copyToClipboard=function copyToClipboard(t){if(!canCopyToClipboard())throw new Error("Cannot copy to clipboard, please make sure you are using SSL in your website.");navigator.clipboard.writeText(t)}}}]); diff --git a/assets/js/form.151b991a4cbdda620c22.bundle.js b/assets/js/form.333cc493ca6159f7ee0e.bundle.js similarity index 98% rename from assets/js/form.151b991a4cbdda620c22.bundle.js rename to assets/js/form.333cc493ca6159f7ee0e.bundle.js index 2f50955b..b72e4a0e 100644 --- a/assets/js/form.151b991a4cbdda620c22.bundle.js +++ b/assets/js/form.333cc493ca6159f7ee0e.bundle.js @@ -1,12 +1,12 @@ -/*! pro-elements - v3.35.0 - 02-02-2026 */ +/*! pro-elements - v4.0.0 - 28-04-2026 */ "use strict"; (self["webpackChunkelementor_pro"] = self["webpackChunkelementor_pro"] || []).push([["form"],{ -/***/ "../modules/forms/assets/js/frontend/handlers/fields/data-time-field-base.js": +/***/ "../modules/forms/assets/js/frontend/handlers/fields/data-time-field-base.js" /*!***********************************************************************************!*\ !*** ../modules/forms/assets/js/frontend/handlers/fields/data-time-field-base.js ***! \***********************************************************************************/ -/***/ ((__unused_webpack_module, exports) => { +(__unused_webpack_module, exports) { @@ -50,13 +50,13 @@ class DataTimeFieldBase extends elementorModules.frontend.handlers.Base { } exports["default"] = DataTimeFieldBase; -/***/ }), +/***/ }, -/***/ "../modules/forms/assets/js/frontend/handlers/fields/date.js": +/***/ "../modules/forms/assets/js/frontend/handlers/fields/date.js" /*!*******************************************************************!*\ !*** ../modules/forms/assets/js/frontend/handlers/fields/date.js ***! \*******************************************************************/ -/***/ ((__unused_webpack_module, exports, __webpack_require__) => { +(__unused_webpack_module, exports, __webpack_require__) { @@ -81,13 +81,13 @@ class DateField extends _dataTimeFieldBase.default { } exports["default"] = DateField; -/***/ }), +/***/ }, -/***/ "../modules/forms/assets/js/frontend/handlers/fields/time.js": +/***/ "../modules/forms/assets/js/frontend/handlers/fields/time.js" /*!*******************************************************************!*\ !*** ../modules/forms/assets/js/frontend/handlers/fields/time.js ***! \*******************************************************************/ -/***/ ((__unused_webpack_module, exports, __webpack_require__) => { +(__unused_webpack_module, exports, __webpack_require__) { @@ -111,13 +111,13 @@ class TimeField extends _dataTimeFieldBase.default { } exports["default"] = TimeField; -/***/ }), +/***/ }, -/***/ "../modules/forms/assets/js/frontend/handlers/form-redirect.js": +/***/ "../modules/forms/assets/js/frontend/handlers/form-redirect.js" /*!*********************************************************************!*\ !*** ../modules/forms/assets/js/frontend/handlers/form-redirect.js ***! \*********************************************************************/ -/***/ ((__unused_webpack_module, exports) => { +(__unused_webpack_module, exports) { @@ -149,13 +149,13 @@ var _default = exports["default"] = elementorModules.frontend.handlers.Base.exte } }); -/***/ }), +/***/ }, -/***/ "../modules/forms/assets/js/frontend/handlers/form-sender.js": +/***/ "../modules/forms/assets/js/frontend/handlers/form-sender.js" /*!*******************************************************************!*\ !*** ../modules/forms/assets/js/frontend/handlers/form-sender.js ***! \*******************************************************************/ -/***/ ((__unused_webpack_module, exports) => { +(__unused_webpack_module, exports) { @@ -279,13 +279,13 @@ var _default = exports["default"] = elementorModules.frontend.handlers.Base.exte } }); -/***/ }), +/***/ }, -/***/ "../modules/forms/assets/js/frontend/handlers/form-steps.js": +/***/ "../modules/forms/assets/js/frontend/handlers/form-steps.js" /*!******************************************************************!*\ !*** ../modules/forms/assets/js/frontend/handlers/form-steps.js ***! \******************************************************************/ -/***/ ((__unused_webpack_module, exports) => { +(__unused_webpack_module, exports) { @@ -881,13 +881,13 @@ class FormSteps extends elementorModules.frontend.handlers.Base { } exports["default"] = FormSteps; -/***/ }), +/***/ }, -/***/ "../modules/forms/assets/js/frontend/handlers/recaptcha.js": +/***/ "../modules/forms/assets/js/frontend/handlers/recaptcha.js" /*!*****************************************************************!*\ !*** ../modules/forms/assets/js/frontend/handlers/recaptcha.js ***! \*****************************************************************/ -/***/ ((__unused_webpack_module, exports) => { +(__unused_webpack_module, exports) { @@ -978,7 +978,7 @@ class Recaptcha extends elementorModules.frontend.handlers.Base { } exports["default"] = Recaptcha; -/***/ }) +/***/ } }]); -//# sourceMappingURL=form.151b991a4cbdda620c22.bundle.js.map \ No newline at end of file +//# sourceMappingURL=form.333cc493ca6159f7ee0e.bundle.js.map diff --git a/assets/js/form.cfd61a9174be80f835c6.bundle.min.js b/assets/js/form.cfd61a9174be80f835c6.bundle.min.js new file mode 100644 index 00000000..c9b06acc --- /dev/null +++ b/assets/js/form.cfd61a9174be80f835c6.bundle.min.js @@ -0,0 +1,2 @@ +/*! pro-elements - v4.0.0 - 28-04-2026 */ +"use strict";(self.webpackChunkelementor_pro=self.webpackChunkelementor_pro||[]).push([[325],{1553(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;class DataTimeFieldBase extends elementorModules.frontend.handlers.Base{getDefaultSettings(){return{selectors:{fields:this.getFieldsSelector()},classes:{useNative:"elementor-use-native"}}}getDefaultElements(){const{selectors:e}=this.getDefaultSettings();return{$fields:this.$element.find(e.fields)}}addPicker(e){const{classes:t}=this.getDefaultSettings();jQuery(e).hasClass(t.useNative)||e.flatpickr(this.getPickerOptions(e))}onInit(...e){super.onInit(...e),this.elements.$fields.each((e,t)=>this.addPicker(t))}}t.default=DataTimeFieldBase},2478(e,t,s){var r=s(6784);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=r(s(1553));class DateField extends i.default{getFieldsSelector(){return".elementor-date-field"}getPickerOptions(e){const t=jQuery(e);return{minDate:t.attr("min")||null,maxDate:t.attr("max")||null,allowInput:!0}}}t.default=DateField},6935(e,t,s){var r=s(6784);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=r(s(1553));class TimeField extends i.default{getFieldsSelector(){return".elementor-time-field"}getPickerOptions(){return{noCalendar:!0,enableTime:!0,allowInput:!0}}}t.default=TimeField},9613(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;t.default=elementorModules.frontend.handlers.Base.extend({getDefaultSettings:()=>({selectors:{form:".elementor-form"}}),getDefaultElements(){var e=this.getSettings("selectors"),t={};return t.$form=this.$element.find(e.form),t},bindEvents(){this.elements.$form.on("form_destruct",this.handleSubmit)},handleSubmit(e,t){void 0!==t.data.redirect_url&&(location.href=t.data.redirect_url)}})},2176(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;t.default=elementorModules.frontend.handlers.Base.extend({getDefaultSettings:()=>({selectors:{form:".elementor-form",submitButton:'[type="submit"]'},action:"elementor_pro_forms_send_form",ajaxUrl:elementorProFrontend.config.ajaxurl}),getDefaultElements(){const e=this.getSettings("selectors"),t={};return t.$form=this.$element.find(e.form),t.$submitButton=t.$form.find(e.submitButton),t},bindEvents(){this.elements.$form.on("submit",this.handleSubmit);const e=this.elements.$form.find("input[type=file]");e.length&&e.on("change",this.validateFileSize)},validateFileSize(e){const t=jQuery(e.currentTarget),s=t[0].files;if(!s.length)return;const r=1024*parseInt(t.attr("data-maxsize"))*1024,i=t.attr("data-maxsize-message");Array.prototype.slice.call(s).forEach(e=>{r'+i+"").find(":input").attr("aria-invalid","true"),this.elements.$form.trigger("error"))})},beforeSend(){const e=this.elements.$form;e.animate({opacity:"0.45"},500).addClass("elementor-form-waiting"),e.find(".elementor-message").remove(),e.find(".elementor-error").removeClass("elementor-error"),e.find("div.elementor-field-group").removeClass("error").find("span.elementor-form-help-inline").remove().end().find(":input").attr("aria-invalid","false"),this.elements.$submitButton.attr("disabled","disabled").find("> span").prepend(' ')},getFormData(){const e=new FormData(this.elements.$form[0]);return e.append("action",this.getSettings("action")),e.append("referrer",location.toString()),e},onSuccess(e){const t=this.elements.$form;if(this.elements.$submitButton.removeAttr("disabled").find(".elementor-form-spinner").remove(),t.animate({opacity:"1"},100).removeClass("elementor-form-waiting"),e.success){t.trigger("submit_success",e.data),t.trigger("form_destruct",e.data),t.trigger("reset");let s="elementor-message elementor-message-success";elementorFrontendConfig.experimentalFeatures.e_font_icon_svg&&(s+=" elementor-message-svg"),void 0!==e.data.message&&""!==e.data.message&&t.append('")}else e.data.errors&&(jQuery.each(e.data.errors,function(e,s){t.find("#form-field-"+e).parent().addClass("elementor-error").append(''+s+"").find(":input").attr("aria-invalid","true")}),t.trigger("error")),t.append('")},onError(e,t){const s=this.elements.$form;s.append('"),this.elements.$submitButton.html(this.elements.$submitButton.text()).removeAttr("disabled"),s.animate({opacity:"1"},100).removeClass("elementor-form-waiting"),s.trigger("error")},handleSubmit(e){const t=this,s=this.elements.$form;if(e.preventDefault(),s.hasClass("elementor-form-waiting"))return!1;this.beforeSend(),jQuery.ajax({url:t.getSettings("ajaxUrl"),type:"POST",dataType:"json",data:t.getFormData(),processData:!1,contentType:!1,success:t.onSuccess,error:t.onError})}})},9230(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;class FormSteps extends elementorModules.frontend.handlers.Base{getDefaultSettings(){return{selectors:{form:".elementor-form",fieldsWrapper:".elementor-form-fields-wrapper",fieldGroup:".elementor-field-group",stepWrapper:".elementor-field-type-step",stepField:".e-field-step",submitWrapper:".elementor-field-type-submit",submitButton:'[type="submit"]',buttons:".e-form__buttons",buttonWrapper:".e-form__buttons__wrapper",button:".e-form__buttons__wrapper__button",indicator:".e-form__indicators__indicator",indicatorProgress:".e-form__indicators__indicator__progress",indicatorProgressMeter:".e-form__indicators__indicator__progress__meter",formHelpInline:".elementor-form-help-inline"},classes:{hidden:"elementor-hidden",column:"elementor-column",fieldGroup:"elementor-field-group",elementorButton:"elementor-button",step:"e-form__step",buttons:"e-form__buttons",buttonWrapper:"e-form__buttons__wrapper",button:"e-form__buttons__wrapper__button",indicators:"e-form__indicators",indicator:"e-form__indicators__indicator",indicatorIcon:"e-form__indicators__indicator__icon",indicatorNumber:"e-form__indicators__indicator__number",indicatorLabel:"e-form__indicators__indicator__label",indicatorProgress:"e-form__indicators__indicator__progress",indicatorProgressMeter:"e-form__indicators__indicator__progress__meter",indicatorSeparator:"e-form__indicators__indicator__separator",indicatorInactive:"e-form__indicators__indicator--state-inactive",indicatorActive:"e-form__indicators__indicator--state-active",indicatorCompleted:"e-form__indicators__indicator--state-completed",indicatorShapeCircle:"e-form__indicators__indicator--shape-circle",indicatorShapeSquare:"e-form__indicators__indicator--shape-square",indicatorShapeRounded:"e-form__indicators__indicator--shape-rounded",indicatorShapeNone:"e-form__indicators__indicator--shape-none"}}}getDefaultElements(){const{selectors:e}=this.getSettings(),t={$form:this.$element.find(e.form)};return t.$fieldsWrapper=t.$form.children(e.fieldsWrapper),t.$stepWrapper=t.$fieldsWrapper.children(e.stepWrapper),t.$stepField=t.$stepWrapper.children(e.stepField),t.$fieldGroup=t.$fieldsWrapper.children(e.fieldGroup),t.$submitWrapper=t.$fieldsWrapper.children(e.submitWrapper),t.$submitButton=t.$submitWrapper.children(e.submitButton),t}onInit(...e){super.onInit(...e),this.isStepsExist()&&(this.data={steps:[],indicatorsWithObjectTags:[]},this.state={currentStep:0,stepsType:"",stepsShape:""},this.buildSteps(),this.elements={...this.elements,...this.createStepsIndicators(),...this.createStepsButtons()},this.initProgressBar(),this.extractResponsiveSizeFromSubmitWrapper())}bindEvents(){if(!this.isStepsExist())return;const{selectors:e}=this.getSettings();this.elements.$form.on({submit:()=>this.resetForm(),keydown:t=>{if(13===t.keyCode&&!this.isLastStep()&&"textarea"!==t.target.localName){t.preventDefault();const s=t.target.closest(e.button)?.dataset?.direction||"next";this.applyStep(s)}},error:()=>this.onFormError()})}isStepsExist(){return this.elements.$stepWrapper.length}initProgressBar(){"progress_bar"===this.getElementSettings().step_type&&this.setProgressBar()}buildSteps(){this.elements.$stepWrapper.each((e,t)=>{const{selectors:s,classes:r}=this.getSettings(),i=jQuery(t);i.addClass(r.step).removeClass(r.fieldGroup,r.column),e&&i.addClass(r.hidden),this.setStepData(i.children(s.stepField)),i.append(i.nextUntil(this.elements.$stepWrapper).not(this.elements.$submitWrapper))})}setStepData(e){const t={};["label","previousButton","nextButton","iconUrl","iconLibrary","icon"].forEach(s=>{const r=e.attr("data-"+s);r&&(t[s]=r)}),this.data.steps.push(t)}createStepsIndicators(){const e=this.getElementSettings(),t={};if("none"!==e.step_type){const{selectors:s,classes:r}=this.getSettings(),i=r.indicators+"--type-"+e.step_type,n=[r.indicators,i];t.$indicatorsWrapper=jQuery("
",{class:n.join(" ")}),t.$indicatorsWrapper.append(this.buildIndicators()),this.elements.$fieldsWrapper.before(t.$indicatorsWrapper),"progress_bar"===e.step_type?(t.$progressBar=t.$indicatorsWrapper.find(s.indicatorProgress),t.$progressBarMeter=t.$indicatorsWrapper.find(s.indicatorProgressMeter)):(t.$indicators=t.$indicatorsWrapper.find(s.indicator),t.$currentIndicator=t.$indicators.eq(this.state.currentStep))}return this.saveIndicatorsState(),t}buildIndicators(){return"progress_bar"===this.getElementSettings().step_type?this.buildProgressBar():this.buildIndicatorsFromStepsData()}buildProgressBar(){const{classes:e}=this.getSettings(),t=jQuery("
",{class:e.indicatorProgress}),s=jQuery("
",{class:e.indicatorProgressMeter});return t.append(s),t}getProgressBarValue(){const e=this.data.steps.length,t=this.state.currentStep,s=t?(t+1)/e*100:100/e;return Math.floor(s)+"%"}setProgressBar(){const e=this.getProgressBarValue();this.updateProgressMeterCSSVariable(e),this.elements.$progressBarMeter.text(e)}updateProgressMeterCSSVariable(e){this.$element[0].style.setProperty("--e-form-steps-indicator-progress-meter-width",e)}saveIndicatorsState(){const e=this.getElementSettings();this.state.stepsType=e.step_type,["none","text","progress_bar"].includes(e.step_type)||(this.state.stepsShape=e.step_icon_shape)}buildIndicatorsFromStepsData(){const e=[];return this.data.steps.forEach((t,s)=>{s&&e.push(this.getStepSeparator()),e.push(this.getStepIndicatorElement(t,s))}),e}getStepIndicatorElement(e,t){const{classes:s}=this.getSettings(),r=this.getElementSettings(),i=this.getIndicatorStateClass(t),n=[s.indicator,i],a=jQuery("
",{class:n.join(" ")});return r.step_type.includes("icon")&&a.append(this.getStepIconElement(e)),r.step_type.includes("number")&&a.append(this.getStepNumberElement(t)),r.step_type.includes("text")&&a.append(this.getStepLabelElement(e.label)),a}getIndicatorStateClass(e){const{classes:t}=this.getSettings();return ethis.state.currentStep?t.indicatorInactive:t.indicatorActive}getIndicatorShapeClass(){const e=this.getElementSettings(),{classes:t}=this.getSettings();return t["indicatorShape"+this.firstLetterToUppercase(e.step_icon_shape)]}firstLetterToUppercase(e){return e.charAt(0).toUpperCase()+e.slice(1)}getStepNumberElement(e){const{classes:t}=this.getSettings(),s=[t.indicatorNumber,this.getIndicatorShapeClass()];return jQuery("
",{class:s.join(" "),text:e+1})}getStepIconElement(e){const{classes:t}=this.getSettings(),s=[t.indicatorIcon,this.getIndicatorShapeClass()],r=jQuery("
",{class:s.join(" ")});if(e.icon)r.html(e.icon);else{let t;e.iconLibrary?t=jQuery("",{class:e.iconLibrary}):(t=jQuery(``),t.on("load",e=>{e.target.contentDocument.querySelector("svg").style.fill=t.css("fill")}),this.data.indicatorsWithObjectTags.push(t)),r.append(t)}return r}getStepLabelElement(e){const{classes:t}=this.getSettings();return jQuery("
",{class:e.indicatorSeparator})}createStepsButtons(){const{selectors:e}=this.getSettings(),t={};return this.injectButtonsToSteps(t),t.$buttonsContainer=this.elements.$stepWrapper.find(e.buttons),t.$buttonsWrappers=t.$buttonsContainer.children(e.buttonWrapper),t}injectButtonsToSteps(){const e=this.elements.$stepWrapper.length;this.elements.$stepWrapper.each((t,s)=>{const r=jQuery(s),i=this.getButtonsContainer();let n;t?(i.append(this.getStepButton("previous",t)),n=t===e-1?this.getSubmitButton():this.getStepButton("next",t)):n=this.getStepButton("next",t),i.append(n),r.append(i)})}getButtonsContainer(){const{classes:e}=this.getSettings(),t=this.getElementSettings(),s=[e.buttons,e.column,"elementor-col-"+t.button_width];return jQuery("
",{class:s.join(" ")})}extractResponsiveSizeFromSubmitWrapper(){let e=[];this.elements.$submitWrapper.removeClass((t,s)=>(e=s.match(/elementor-(sm|md)-[0-9]+/g)?.join(" "),e)),this.elements.$buttonsContainer.addClass(e)}getStepButton(e,t){const{classes:s}=this.getSettings(),r=this.getButton(e,t).on("click",()=>this.applyStep(e)),i=[s.fieldGroup,s.buttonWrapper,"elementor-field-type-"+e];return jQuery("
",{class:i.join(" ")}).append(r)}getSubmitButton(){const{classes:e}=this.getSettings();return this.elements.$submitButton.addClass(e.button),this.elements.$submitWrapper.attr("class",(e,t)=>this.replaceClassNameColSize(t,"")).removeClass(e.column).removeClass(e.buttons).addClass(e.buttonWrapper)}replaceClassNameColSize(e,t){return e.replace(/elementor-col-([0-9]+)/g,t)}getButton(e,t){const{classes:s}=this.getSettings(),r=this.elements.$submitButton.attr("class").match(/elementor-size-([^\W\d]+)/g),i=[s.elementorButton,r,s.button,s.button+"-"+e];return jQuery(" + + + + { description } + + + + + + + + + + ); +} + +OverrideConfirmationDialog.propTypes = { + open: PropTypes.bool.isRequired, + onClose: PropTypes.func.isRequired, + onConfirm: PropTypes.func.isRequired, + type: PropTypes.oneOf( [ 'classes', 'variables', 'both' ] ), +}; diff --git a/core/app/modules/import-export-customization/assets/js/hooks/use-classes-variables-limits.js b/core/app/modules/import-export-customization/assets/js/hooks/use-classes-variables-limits.js new file mode 100644 index 00000000..cffe951d --- /dev/null +++ b/core/app/modules/import-export-customization/assets/js/hooks/use-classes-variables-limits.js @@ -0,0 +1,95 @@ +import { useState, useEffect, useCallback, useMemo } from 'react'; +import { useTabFocus } from './use-tab-focus'; + +const DEFAULT_CLASSES_LIMIT = 100; +const DEFAULT_VARIABLES_LIMIT = 100; + +function getLimitsFromConfig() { + const config = window.elementorAppConfig?.[ 'import-export-customization' ]; + + return { + classes: config?.limits?.classes ?? DEFAULT_CLASSES_LIMIT, + variables: config?.limits?.variables ?? DEFAULT_VARIABLES_LIMIT, + }; +} + +export function useClassesVariablesLimits( { open, isImport } ) { + const [ existingClassesCount, setExistingClassesCount ] = useState( 0 ); + const [ existingVariablesCount, setExistingVariablesCount ] = useState( 0 ); + const [ isLoading, setIsLoading ] = useState( false ); + const [ error, setError ] = useState( null ); + + const limits = useMemo( () => getLimitsFromConfig(), [] ); + + const fetchCounts = useCallback( async () => { + if ( ! open || ! isImport ) { + return; + } + + setIsLoading( true ); + setError( null ); + + try { + const baseUrl = window.wpApiSettings?.root || '/wp-json/'; + const nonce = window.wpApiSettings?.nonce || ''; + + const [ classesResponse, variablesResponse ] = await Promise.all( [ + fetch( `${ baseUrl }elementor/v1/global-classes`, { + headers: { + 'X-WP-Nonce': nonce, + }, + } ), + fetch( `${ baseUrl }elementor/v1/variables/list`, { + headers: { + 'X-WP-Nonce': nonce, + }, + } ), + ] ); + + if ( classesResponse.ok ) { + const classesData = await classesResponse.json(); + const classesCount = Object.keys( classesData?.data || {} ).length; + setExistingClassesCount( classesCount ); + } + + if ( variablesResponse.ok ) { + const variablesData = await variablesResponse.json(); + const variablesCount = variablesData?.data?.total || 0; + setExistingVariablesCount( variablesCount ); + } + } catch ( err ) { + setError( err ); + } finally { + setIsLoading( false ); + } + }, [ open, isImport ] ); + + useEffect( () => { + fetchCounts(); + }, [ fetchCounts ] ); + + useTabFocus( fetchCounts ); + + const calculateLimitInfo = useCallback( ( existingCount, importedCount, limit ) => { + const totalAfterImport = existingCount + importedCount; + const isExceeded = totalAfterImport > limit; + const overLimitCount = isExceeded ? totalAfterImport - limit : 0; + + return { + isExceeded, + overLimitCount, + totalAfterImport, + }; + }, [] ); + + return { + existingClassesCount, + existingVariablesCount, + classesLimit: limits.classes, + variablesLimit: limits.variables, + isLoading, + error, + calculateLimitInfo, + refetch: fetchCounts, + }; +} diff --git a/core/app/modules/import-export-customization/assets/js/hooks/use-tab-focus.js b/core/app/modules/import-export-customization/assets/js/hooks/use-tab-focus.js new file mode 100644 index 00000000..11773f09 --- /dev/null +++ b/core/app/modules/import-export-customization/assets/js/hooks/use-tab-focus.js @@ -0,0 +1,13 @@ +import { useEffect } from 'react'; + +export function useTabFocus( callback ) { + useEffect( () => { + const handleVisibilityChange = () => { + if ( 'visible' === document.visibilityState ) { + callback(); + } + }; + document.addEventListener( 'visibilitychange', handleVisibilityChange ); + return () => document.removeEventListener( 'visibilitychange', handleVisibilityChange ); + }, [ callback ] ); +} diff --git a/core/app/modules/import-export-customization/utils.php b/core/app/modules/import-export-customization/utils.php new file mode 100644 index 00000000..ffe278fb --- /dev/null +++ b/core/app/modules/import-export-customization/utils.php @@ -0,0 +1,20 @@ + 'John', 'email' => 'john@example.com'] + * @param array $widget_settings Full widget settings - action extracts what it needs. + * Example: ['email_to' => 'admin@site.com', 'email_subject' => 'New form', ...] + * @param array $context Additional context (post_id, form_id, form_name). + * Example: ['post_id' => 123, 'form_id' => 'contact', 'form_name' => 'Contact Form'] + * @return array Result array with 'status' and optional data. + * Success: ['status' => 'success', 'message' => '...', ...] + * Failure: ['status' => 'failed', 'error' => '...', ...] + */ + abstract public function execute( array $form_data, array $widget_settings, array $context ): array; + + /** + * Validate widget settings for this action. + * + * @param array $widget_settings Widget settings to validate. + * @return bool|\WP_Error True if valid, WP_Error otherwise. + */ + protected function validate_settings( array $widget_settings ) { + return true; + } + + /** + * Format a success result. + * + * @param string $message Success message. + * @param array $additional_data Additional data to include. + * @return array + */ + protected function success( string $message, array $additional_data = [] ): array { + return array_merge( + [ + 'status' => 'success', + 'message' => $message, + ], + $additional_data + ); + } + + /** + * Format a failure result. + * + * @param string $error Error message. + * @param array $additional_data Additional data to include. + * @return array + */ + protected function failure( string $error, array $additional_data = [] ): array { + return array_merge( + [ + 'status' => 'failed', + 'error' => $error, + ], + $additional_data + ); + } +} diff --git a/modules/atomic-form/actions/action-runner.php b/modules/atomic-form/actions/action-runner.php new file mode 100644 index 00000000..5b75cd89 --- /dev/null +++ b/modules/atomic-form/actions/action-runner.php @@ -0,0 +1,136 @@ +get_type() ] = $action; + } + + /** + * Create an action instance by type. + * + * @param string $type Action type. + * @return Action_Base|null Action instance or null if not found. + */ + public static function create_action( string $type ): ?Action_Base { + if ( ! isset( self::$actions[ $type ] ) ) { + return null; + } + + return self::$actions[ $type ]; + } + + /** + * Get all registered actions. + * + * @return Action_Base[] Array of registered actions. + */ + public static function get_registered_actions(): array { + return self::$actions; + } + + /** + * Check if an action type is registered. + * + * @param string $type Action type. + * @return bool + */ + public static function has_action( string $type ): bool { + return isset( self::$actions[ $type ] ); + } + + /** + * Execute multiple actions and gather results. + * + * @param string[] $actions Array of action type strings. + * @param array $form_data Sanitized form data. + * @param array $widget_settings Full widget settings for actions to extract what they need. + * @param array $context Form context (post_id, form_id, form_name). + * @return array Results containing actionResults, allActionsSucceeded, failedActions, and optional submissionId. + */ + public static function execute_actions( array $actions, array $form_data, array $widget_settings, array $context ): array { + $action_results = []; + $failed_actions = []; + + foreach ( $actions as $action_type ) { + + if ( ! Action_Type::is_valid( $action_type ) ) { + $action_results[] = [ + 'type' => $action_type, + 'status' => 'failed', + 'error' => sprintf( __( 'Invalid action type: %s', 'elementor-pro' ), $action_type ), + ]; + $failed_actions[] = $action_type; + continue; + } + + try { + $action = self::create_action( $action_type ); + + if ( ! $action ) { + throw new \Exception( sprintf( __( 'Could not create action: %s', 'elementor-pro' ), $action_type ) ); + } + + $result = $action->execute( $form_data, $widget_settings, $context ); + + $action_results[] = array_merge( + [ 'type' => $action_type ], + $result + ); + } catch ( \Exception $e ) { + $action_results[] = [ + 'type' => $action_type, + 'status' => 'failed', + 'error' => $e->getMessage(), + ]; + $failed_actions[] = $action_type; + } + } + + $all_actions_succeeded = empty( $failed_actions ); + + $response = [ + 'actionResults' => $action_results, + 'allActionsSucceeded' => $all_actions_succeeded, + 'failedActions' => $failed_actions, + ]; + + return $response; + } + + /** + * Initialize default actions. + * + * @return void + */ + public static function init(): void { + self::register_action( new Email_Action() ); + self::register_action( new Collect_Submissions_Action() ); + self::register_action( new Webhook_Action() ); + + /** + * Allow registering custom actions. + * + * @param Action_Factory $factory The action factory instance. + */ + do_action( 'elementor_pro/atomic_forms/actions/register', __CLASS__ ); + } +} diff --git a/modules/atomic-form/actions/action-type.php b/modules/atomic-form/actions/action-type.php new file mode 100644 index 00000000..85fec269 --- /dev/null +++ b/modules/atomic-form/actions/action-type.php @@ -0,0 +1,35 @@ +normalize_metadata_keys( $widget_settings['submissions_metadata'] ?? [] ); + + $field_metadata = $context['field_metadata'] ?? []; + $fields = $this->prepare_fields( $form_data, $field_metadata ); + + $submission_id = Query::get_instance()->add_submission( + [ + 'main_meta_id' => 0, + 'post_id' => $context['post_id'], + 'referer' => $this->get_referer(), + 'referer_title' => $this->get_referer_title(), + 'element_id' => $context['form_id'], + 'form_name' => $context['form_name'], + 'campaign_id' => 0, + 'user_id' => get_current_user_id(), + 'user_ip' => in_array( 'remote_ip', $metadata_keys, true ) ? Utils::get_client_ip() : '', + 'user_agent' => in_array( 'user_agent', $metadata_keys, true ) ? $this->get_user_agent() : '', + 'actions_count' => 0, + 'actions_succeeded_count' => 0, + 'meta' => wp_json_encode( [] ), + ], + $fields + ); + + if ( ! $submission_id ) { + return $this->failure( __( 'Failed to save submission to database', 'elementor-pro' ) ); + } + + $this->store_form_snapshot( $context, $fields ); + + return $this->success( + __( 'Submission saved successfully', 'elementor-pro' ), + [ 'submissionId' => $submission_id ] + ); + } + + private function normalize_metadata_keys( array $raw ): array { + $allowed = [ 'remote_ip', 'user_agent' ]; + + return array_values( array_intersect( $raw, $allowed ) ); + } + + private function prepare_fields( array $form_data, array $field_metadata = [] ): array { + $fields = []; + + foreach ( $form_data as $key => $value ) { + $meta = $field_metadata[ $key ] ?? []; + $label = ! empty( $meta['label'] ) ? $meta['label'] : ucwords( str_replace( [ '_', '-' ], ' ', $key ) ); + $type = ! empty( $meta['type'] ) ? $meta['type'] : $this->guess_field_type( $key, $value ); + + $fields[] = [ + 'id' => $key, + 'type' => $type, + 'label' => $label, + 'value' => is_array( $value ) ? implode( ', ', $value ) : $value, + ]; + } + + return $fields; + } + + private function guess_field_type( string $key, $value ): string { + $key_lower = strtolower( $key ); + + if ( strpos( $key_lower, 'email' ) !== false ) { + return 'email'; + } + + if ( strpos( $key_lower, 'phone' ) !== false || strpos( $key_lower, 'tel' ) !== false ) { + return 'tel'; + } + + if ( is_array( $value ) ) { + return 'checkbox'; + } + + if ( strpos( $key_lower, 'message' ) !== false || ( is_string( $value ) && strlen( $value ) > 100 ) ) { + return 'textarea'; + } + + if ( strpos( $key_lower, 'url' ) !== false || strpos( $key_lower, 'website' ) !== false ) { + return 'url'; + } + + return 'text'; + } + + private function store_form_snapshot( array $context, array $fields ): void { + $snapshot_fields = array_map( + function ( $field ) { + return [ + 'id' => $field['id'], + 'type' => $field['type'], + 'label' => $field['label'], + ]; + }, + $fields + ); + + Form_Snapshot_Repository::instance()->create_or_update( + $context['post_id'], + $context['form_id'], + [ + 'name' => $context['form_name'], + 'fields' => $snapshot_fields, + ] + ); + } + + private function get_referer(): string { + $referer = ElementorUtils::get_super_global_value( $_SERVER, 'HTTP_REFERER' ); + if ( $referer ) { + return esc_url_raw( wp_unslash( $referer ) ); + } + + return ''; + } + + private function get_referer_title(): string { + // For now, return empty as we don't have access to the frontend page title + return ''; + } + + private function get_user_agent(): string { + $user_agent = ElementorUtils::get_super_global_value( $_SERVER, 'HTTP_USER_AGENT' ); + if ( $user_agent ) { + return sanitize_textarea_field( wp_unslash( $user_agent ) ); + } + + return ''; + } +} diff --git a/modules/atomic-form/actions/email-action.php b/modules/atomic-form/actions/email-action.php new file mode 100644 index 00000000..07ad3f8b --- /dev/null +++ b/modules/atomic-form/actions/email-action.php @@ -0,0 +1,152 @@ +validate_settings( $widget_settings ); + + if ( is_wp_error( $validation ) ) { + return $this->failure( $validation->get_error_message() ); + } + + $email_settings = new Email_Settings( $widget_settings ); + + $to = $email_settings->to(); + $from = $email_settings->from(); + $from_name = $email_settings->from_name(); + $message = $email_settings->message(); + $subject = $email_settings->subject(); + $reply_to = $email_settings->reply_to(); + $cc = $email_settings->cc(); + $bcc = $email_settings->bcc(); + $content_type = $email_settings->content_type(); + + $field_metadata = $context['field_metadata'] ?? []; + $message = $this->replace_shortcodes( $message, $form_data, 'html' === $content_type, $field_metadata ); + + $headers = []; + $headers[] = sprintf( 'From: %s <%s>', $from_name, $from ); + $headers[] = sprintf( 'Reply-To: %s', $reply_to ); + + if ( 'html' === $content_type ) { + $headers[] = 'Content-Type: text/html; charset=UTF-8'; + } + + if ( ! empty( $cc ) ) { + $headers[] = sprintf( 'Cc: %s', $cc ); + } + + if ( ! empty( $bcc ) ) { + $headers[] = sprintf( 'Bcc: %s', $bcc ); + } + + /** + * Filter email headers for atomic forms. + * + * @param array $headers Email headers. + * @param array $form_data Form data. + * @param array $widget_settings Widget settings. + */ + $headers = apply_filters( 'elementor_pro/atomic_forms/email_headers', $headers, $form_data, $widget_settings ); + + /** + * Filter email message for atomic forms. + * + * @param string $message Email message. + * @param array $form_data Form data. + * @param array $widget_settings Widget settings. + */ + $message = apply_filters( 'elementor_pro/atomic_forms/email_message', $message, $form_data, $widget_settings ); + + $email_sent = wp_mail( $to, $subject, $message, $headers ); + + if ( ! $email_sent ) { + return $this->failure( __( 'Failed to send email', 'elementor-pro' ) ); + } + + return $this->success( __( 'Email sent successfully', 'elementor-pro' ) ); + } + + protected function validate_settings( array $widget_settings ) { + $email_settings = new Email_Settings( $widget_settings ); + $email_to = $email_settings->to(); + + if ( ! empty( $email_to ) && ! is_email( $email_to ) ) { + $emails = array_map( 'trim', explode( ',', $email_to ) ); + foreach ( $emails as $email ) { + if ( ! is_email( $email ) ) { + return new \WP_Error( + 'invalid_email', + sprintf( + /* translators: %s: Invalid email address. */ + __( 'Invalid email address: %s', 'elementor-pro' ), + $email + ) + ); + } + } + } + + return true; + } + + private function replace_shortcodes( string $message, array $form_data, bool $is_html, array $field_metadata = [] ): string { + $line_break = $is_html ? '
' : "\n"; + + if ( strpos( $message, '[all-fields]' ) !== false ) { + $all_fields_text = ''; + + foreach ( $form_data as $key => $value ) { + $meta = $field_metadata[ $key ] ?? []; + $formatted_key = ! empty( $meta['label'] ) ? $meta['label'] : ucwords( str_replace( [ '_', '-' ], ' ', $key ) ); + $formatted_value = is_array( $value ) ? implode( ', ', $value ) : $value; + + if ( $is_html ) { + $formatted_key = esc_html( $formatted_key ); + + if ( is_string( $formatted_value ) ) { + $formatted_value = nl2br( esc_html( $formatted_value ) ); + } + } + + $all_fields_text .= sprintf( + '%s: %s%s', + $formatted_key, + $formatted_value, + $line_break + ); + } + + $message = str_replace( '[all-fields]', $all_fields_text, $message ); + } + + $message = preg_replace_callback( + '/\[field[^\]]*id=["\']([^"\']+)["\'][^\]]*\]/', + function ( $matches ) use ( $form_data ) { + $field_id = $matches[1]; + + if ( isset( $form_data[ $field_id ] ) ) { + $value = $form_data[ $field_id ]; + + return is_array( $value ) ? implode( ', ', $value ) : $value; + } + + return ''; + }, + $message + ); + + return $message; + } +} diff --git a/modules/atomic-form/actions/email-settings.php b/modules/atomic-form/actions/email-settings.php new file mode 100644 index 00000000..ea531317 --- /dev/null +++ b/modules/atomic-form/actions/email-settings.php @@ -0,0 +1,56 @@ +email_settings = $widget_settings['email'] ?? []; + } + + public function to() { + return $this->email_settings['to'] ?? get_option( 'admin_email' ); + } + + public function from() { + return $this->email_settings['from'] ?? 'noreply@' . Utils::get_site_domain(); + } + + public function from_name() { + return $this->email_settings['from-name'] ?? get_bloginfo( 'name' ); + } + + public function subject() { + return $this->email_settings['subject'] ?? sprintf( + /* translators: %s: Site title. */ + __( 'New message from "%s"', 'elementor-pro' ), + get_bloginfo( 'name' ) + ); + } + + public function message() { + return $this->email_settings['message'] ?? '[all-fields]'; + } + + public function reply_to() { + return $this->email_settings['reply-to'] ?? $this->from(); + } + + public function cc() { + return $this->email_settings['cc'] ?? ''; + } + + public function bcc() { + return $this->email_settings['bcc'] ?? ''; + } + + public function content_type() { + return $this->email_settings['send-as'] ?? 'html'; + } +} diff --git a/modules/atomic-form/actions/webhook-action.php b/modules/atomic-form/actions/webhook-action.php new file mode 100644 index 00000000..56750288 --- /dev/null +++ b/modules/atomic-form/actions/webhook-action.php @@ -0,0 +1,128 @@ +validate_settings( $widget_settings ); + if ( is_wp_error( $validation ) ) { + return $this->failure( $validation->get_error_message() ); + } + + $url = $widget_settings['webhook_url']; + $method = strtoupper( $widget_settings['webhook_method'] ?? 'POST' ); + $timeout = isset( $widget_settings['webhook_timeout'] ) ? absint( $widget_settings['webhook_timeout'] ) : 30; + + $payload = [ + 'formData' => $form_data, + 'postId' => $context['post_id'], + 'formId' => $context['form_id'], + 'formName' => $context['form_name'], + 'timestamp' => current_time( 'mysql' ), + 'siteUrl' => get_site_url(), + ]; + + /** + * Filter webhook payload for atomic forms. + * + * @param array $payload Webhook payload. + * @param array $form_data Form data. + * @param array $widget_settings Widget settings. + * @param array $context Form context. + */ + $payload = apply_filters( + 'elementor_pro/atomic_forms/webhook_payload', + $payload, + $form_data, + $widget_settings, + $context + ); + + $args = [ + 'method' => $method, + 'timeout' => $timeout, + 'headers' => [ + 'Content-Type' => 'application/json', + 'User-Agent' => 'Elementor Pro Atomic Forms/' . ELEMENTOR_PRO_VERSION, + ], + 'body' => wp_json_encode( $payload ), + ]; + + if ( ! empty( $widget_settings['webhook_headers'] ) && is_array( $widget_settings['webhook_headers'] ) ) { + $args['headers'] = array_merge( $args['headers'], $widget_settings['webhook_headers'] ); + } + + $response = wp_remote_request( $url, $args ); + + if ( is_wp_error( $response ) ) { + return $this->failure( + sprintf( + /* translators: %s: Error message. */ + __( 'Webhook request failed: %s', 'elementor-pro' ), + $response->get_error_message() + ) + ); + } + + $response_code = wp_remote_retrieve_response_code( $response ); + $response_body = wp_remote_retrieve_body( $response ); + + if ( $response_code >= 200 && $response_code < 300 ) { + return $this->success( + __( 'Webhook delivered successfully', 'elementor-pro' ), + [ + 'responseCode' => $response_code, + 'responseBody' => $response_body, + ] + ); + } + + return $this->failure( + sprintf( + /* translators: %d: HTTP status code. */ + __( 'Webhook returned error status code: %d', 'elementor-pro' ), + $response_code + ), + [ + 'responseCode' => $response_code, + 'responseBody' => $response_body, + ] + ); + } + + protected function validate_settings( array $widget_settings ) { + if ( empty( $widget_settings['webhook_url'] ) ) { + return new \WP_Error( + 'missing_url', + __( 'Webhook URL is required', 'elementor-pro' ) + ); + } + + if ( ! filter_var( $widget_settings['webhook_url'], FILTER_VALIDATE_URL ) ) { + return new \WP_Error( + 'invalid_url', + __( 'Invalid webhook URL', 'elementor-pro' ) + ); + } + + if ( isset( $widget_settings['webhook_method'] ) ) { + $allowed_methods = [ 'GET', 'POST', 'PUT', 'PATCH', 'DELETE' ]; + if ( ! in_array( strtoupper( $widget_settings['webhook_method'] ), $allowed_methods, true ) ) { + return new \WP_Error( + 'invalid_method', + __( 'Invalid HTTP method', 'elementor-pro' ) + ); + } + } + + return true; + } +} diff --git a/modules/atomic-form/atomic-form-controller.php b/modules/atomic-form/atomic-form-controller.php new file mode 100644 index 00000000..d3860cfc --- /dev/null +++ b/modules/atomic-form/atomic-form-controller.php @@ -0,0 +1,292 @@ + ElementorUtils::get_super_global_value( $_POST, '_nonce' ), + 'post_id' => ElementorUtils::get_super_global_value( $_POST, 'post_id' ), + 'form_id' => ElementorUtils::get_super_global_value( $_POST, 'form_id' ), + 'form_name' => ElementorUtils::get_super_global_value( $_POST, 'form_name' ), + 'form_fields' => ElementorUtils::get_super_global_value( $_POST, 'form_fields' ) ?? [], + ]; + // phpcs:enable WordPress.Security.NonceVerification.Missing + + if ( ! $this->is_nonce_valid( $post_data ) ) { + $this->send_invalid_form_response(); + } + + $post_id = absint( $post_data['post_id'] ?? 0 ); + $form_id = sanitize_text_field( $post_data['form_id'] ?? '' ); + $form_fields = $post_data['form_fields'] ?? []; + + if ( ! $post_id || ! $form_id || empty( $form_fields ) ) { + $this->send_invalid_form_response(); + } + + $form_data = $this->convert_form_fields_to_data( $form_fields ); + + if ( empty( $form_data ) ) { + $this->send_invalid_form_response(); + } + + $field_metadata = $this->extract_field_metadata( $form_fields ); + + $widget_settings = $this->get_widget_settings( $post_id, $form_id ); + + if ( is_wp_error( $widget_settings ) ) { + $this->send_error_response( $widget_settings->get_error_message() ); + } + + $posted_form_name = sanitize_text_field( $post_data['form_name'] ?? '' ); + $form_name = $this->resolve_form_name( $posted_form_name, $form_id ); + + $spam_check = apply_filters( + 'elementor_pro/atomic_forms/spam_check', + false, + $form_fields, + $widget_settings, + $post_id + ); + + if ( $spam_check ) { + $this->send_error_response( + __( 'Your submission was flagged as spam. Please try again or contact the site administrator.', 'elementor-pro' ) + ); + } + + $actions = $widget_settings['actions-after-submit'] ?? []; + + if ( empty( $actions ) ) { + $this->send_error_response( __( 'No actions configured for this form', 'elementor-pro' ) ); + } + + $results = Action_Runner::execute_actions( + $actions, + $form_data, + $widget_settings, + [ + 'post_id' => $post_id, + 'form_id' => $form_id, + 'form_name' => $form_name, + 'field_metadata' => $field_metadata, + ] + ); + + $this->send_response( + $results['actionResults'], + $results['allActionsSucceeded'], + $results['failedActions'] + ); + } + + private function is_nonce_valid( array $post_data ): bool { + $nonce = $post_data['_nonce'] ?? ''; + + if ( ! $nonce ) { + return false; + } + + return wp_verify_nonce( $nonce, self::NONCE_ACTION ); + } + + private function convert_form_fields_to_data( array $form_fields ): array { + $form_data = []; + + foreach ( $form_fields as $field ) { + if ( ! is_array( $field ) ) { + continue; + } + + $id = sanitize_text_field( $field['id'] ?? '' ); + $value = $field['value'] ?? ''; + + if ( ! $id ) { + continue; + } + + if ( is_array( $value ) ) { + $form_data[ $id ] = array_map( 'sanitize_text_field', $value ); + } else { + $type = sanitize_text_field( $field['type'] ?? 'text' ); + + if ( 'textarea' === $type ) { + $form_data[ $id ] = sanitize_textarea_field( $value ); + } else { + $form_data[ $id ] = sanitize_text_field( $value ); + } + } + } + + return $form_data; + } + + private function resolve_form_name( string $posted_form_name, string $form_id ): string { + return ! empty( $posted_form_name ) ? $posted_form_name : $form_id; + } + + private function extract_field_metadata( array $form_fields ): array { + $metadata = []; + + foreach ( $form_fields as $field ) { + if ( ! is_array( $field ) ) { + continue; + } + + $id = sanitize_text_field( $field['id'] ?? '' ); + + if ( ! $id ) { + continue; + } + + $metadata[ $id ] = [ + 'label' => sanitize_text_field( $field['label'] ?? '' ), + 'type' => sanitize_text_field( $field['type'] ?? '' ), + ]; + } + + return $metadata; + } + + private function get_widget_settings( int $post_id, string $form_id ) { + $document = Plugin::elementor()->documents->get( $post_id ); + + if ( ! $document ) { + return new \WP_Error( + 'document_not_found', + __( 'Document not found', 'elementor-pro' ) + ); + } + + $element_data = $document->get_elements_data(); + $form_element = ElementorUtils::find_element_recursive( $element_data, $form_id ); + + if ( empty( $form_element ) ) { + return new \WP_Error( + 'form_not_found', + __( 'Form element not found', 'elementor-pro' ) + ); + } + + $settings = $form_element['settings'] ?? []; + + $settings = $this->resolve_dynamic_tags_in_settings( $settings, $post_id ); + + $resolved = Settings_Resolver::resolve( $settings ); + + if ( ! isset( $resolved['actions-after-submit'] ) && isset( $resolved['email'] ) ) { + $resolved['actions-after-submit'] = [ 'email' ]; + } + + return $resolved; + } + + /** + * @param array|string $value + * @param int $post_id + * @return array|string|null + */ + private function resolve_dynamic_tags_in_settings( $value, int $post_id ) { + if ( ! is_array( $value ) ) { + return $value; + } + + if ( Dynamic_Prop_Type::is_dynamic_prop_value( $value ) ) { + if ( ! empty( $value['disabled'] ) ) { + return null; + } + + $tag_data = $value['value'] ?? []; + $tag_name = $tag_data['name'] ?? ''; + $tag_settings = $tag_data['settings'] ?? []; + + if ( empty( $tag_name ) ) { + return null; + } + + Plugin::elementor()->db->switch_to_post( $post_id ); + + try { + return Plugin::elementor()->dynamic_tags->get_tag_data_content( + null, + $tag_name, + $tag_settings + ); + } finally { + Plugin::elementor()->db->restore_current_post(); + } + } + + return array_map( function ( $item ) use ( $post_id ) { + return $this->resolve_dynamic_tags_in_settings( $item, $post_id ); + }, $value ); + } + + private function send_invalid_form_response(): void { + wp_send_json_error( [ + 'message' => Ajax_Handler::get_default_message( Ajax_Handler::INVALID_FORM, [] ), + ] ); + } + + private function send_error_response( string $message = '' ): void { + wp_send_json_error( [ + 'message' => $message ?? Ajax_Handler::get_default_message( Ajax_Handler::ERROR, [] ), + ] ); + } + + private function send_response( array $action_results, bool $all_actions_succeeded, array $failed_actions ): void { + $response_data = [ + 'actionResults' => $action_results, + 'allActionsSucceeded' => $all_actions_succeeded, + 'failedActions' => $failed_actions, + ]; + + if ( $all_actions_succeeded ) { + wp_send_json_success( [ + 'message' => Ajax_Handler::get_default_message( Ajax_Handler::SUCCESS, [] ), + 'data' => $response_data, + ] ); + } else { + $has_success = ! empty( $action_results ) && count( $failed_actions ) < count( $action_results ); + + if ( $has_success ) { + wp_send_json_success( [ + 'message' => Ajax_Handler::get_default_message( Ajax_Handler::SUCCESS, [] ), + 'data' => $response_data, + ] ); + } else { + wp_send_json_error( [ + 'message' => Ajax_Handler::get_default_message( Ajax_Handler::ERROR, [] ), + 'data' => $response_data, + ] ); + } + } + } + + public function __construct() { + add_action( 'wp_ajax_elementor_pro_atomic_forms_send_form', [ $this, 'ajax_send_form' ] ); + add_action( 'wp_ajax_nopriv_elementor_pro_atomic_forms_send_form', [ $this, 'ajax_send_form' ] ); + } +} diff --git a/modules/atomic-form/checkbox/checkbox.html.twig b/modules/atomic-form/checkbox/checkbox.html.twig new file mode 100644 index 00000000..0e78a4de --- /dev/null +++ b/modules/atomic-form/checkbox/checkbox.html.twig @@ -0,0 +1,22 @@ +{% set classes = settings.classes | merge( [ base_styles.base ] ) | join(' ') | trim %} +{% set id_attribute = settings._cssid is not empty ? 'id=' ~ settings._cssid | e('html_attr') : '' %} +{% set interactions_attribute = interactions is not empty ? 'data-interactions=' ~ interactions | json_encode | e('html_attr') : '' %} +{% set placeholder_attribute = settings.placeholder is not empty ? 'placeholder=' ~ settings.placeholder | e('html_attr') : '' %} +{% set required_attribute = settings.required ? 'required' : '' %} +{% set checked_attribute = settings.checked ? 'checked' : '' %} +{% set name = settings.name is not empty ? settings.name : settings._cssid is not empty ? 'checkbox_' ~ settings._cssid : 'checkbox_' ~ id %} +{% set name_attribute = 'name=' ~ name | e('html_attr') %} +{% set value_attribute = settings.value is not empty ? 'value=' ~ settings.value | e('html_attr') : '' %} + diff --git a/modules/atomic-form/checkbox/checkbox.php b/modules/atomic-form/checkbox/checkbox.php new file mode 100644 index 00000000..d26f5cfa --- /dev/null +++ b/modules/atomic-form/checkbox/checkbox.php @@ -0,0 +1,121 @@ + Classes_Prop_Type::make() + ->default( [] ), + 'name' => String_Prop_Type::make() + ->default( '' ), + 'value' => String_Prop_Type::make() + ->default( '' ), + 'required' => Boolean_Prop_Type::make() + ->default( false ), + 'checked' => Boolean_Prop_Type::make() + ->default( false ), + 'attributes' => Attributes_Prop_Type::make()->meta( Overridable_Prop_Type::ignore() ), + ]; + } + + protected function define_atomic_controls(): array { + return [ + Section::make() + ->set_label( __( 'Content', 'elementor-pro' ) ) + ->set_items( [ + Text_Control::bind_to( 'name' ) + ->set_label( __( 'Group name', 'elementor-pro' ) ) + ->set_placeholder( __( 'Enter checkbox group name', 'elementor-pro' ) ) + ->set_meta( [ + 'layout' => 'two-columns', + ] ), + Text_Control::bind_to( 'value' ) + ->set_label( __( 'Choice value', 'elementor-pro' ) ) + ->set_placeholder( __( 'Enter choice value', 'elementor-pro' ) ) + ->set_meta( [ + 'layout' => 'two-columns', + ] ), + Switch_Control::bind_to( 'required' ) + ->set_label( __( 'Required', 'elementor-pro' ) ), + Switch_Control::bind_to( 'checked' ) + ->set_label( __( 'Checked', 'elementor-pro' ) ), + ] ), + Section::make() + ->set_label( __( 'Settings', 'elementor-pro' ) ) + ->set_id( 'settings' ) + ->set_items( $this->get_settings_controls() ), + ]; + } + + protected function get_settings_controls(): array { + return [ + Text_Control::bind_to( '_cssid' ) + ->set_label( __( 'ID', 'elementor-pro' ) ) + ->set_meta( $this->get_css_id_control_meta() ), + ]; + } + + protected function get_templates(): array { + return [ + 'checkbox' => __DIR__ . '/checkbox.html.twig', + ]; + } + + protected function define_base_styles(): array { + return []; + } + + protected function get_css_id_control_meta(): array { + return [ + 'layout' => 'two-columns', + 'topDivider' => false, + ]; + } + + protected function define_atomic_pseudo_states(): array { + return [ + Style_States::get_pseudo_states_map()['checked'], + ]; + } + +} diff --git a/modules/atomic-form/classes/akismet.php b/modules/atomic-form/classes/akismet.php new file mode 100644 index 00000000..6e4d29d0 --- /dev/null +++ b/modules/atomic-form/classes/akismet.php @@ -0,0 +1,192 @@ +is_akismet_active() ) { + return $schema; + } + + $schema['akismet-enabled'] = Boolean_Prop_Type::make()->default( false ); + + return $schema; + } + + public function register_controls( array $controls, $element ): array { + if ( ! ( $element instanceof Atomic_Form ) ) { + return $controls; + } + + if ( ! $this->is_akismet_active() ) { + return $controls; + } + + $controls[] = Section::make() + ->set_label( __( 'Akismet', 'elementor-pro' ) ) + ->set_items( [ + Switch_Control::bind_to( 'akismet-enabled' ) + ->set_label( __( 'Akismet spam protection', 'elementor-pro' ) ), + ] ); + + return $controls; + } + + public function is_akismet_active(): bool { + if ( ! class_exists( '\Akismet' ) ) { + return false; + } + + $akismet_key = \Akismet::get_api_key(); + + return ! empty( $akismet_key ); + } + + public function is_spam( bool $is_spam, array $form_fields, array $widget_settings, int $post_id = 0 ): bool { + if ( $is_spam ) { + return true; + } + + if ( empty( $widget_settings['akismet-enabled'] ) ) { + return false; + } + + if ( ! $this->is_akismet_active() ) { + return false; + } + + $mapped = $this->map_fields( $form_fields ); + $params = $this->build_params( $mapped, $post_id ); + + return $this->remote_check_is_spam( $params ); + } + + private function map_fields( array $form_fields ): array { + $mapped = [ + 'comment_author' => '', + 'comment_author_email' => '', + 'comment_author_url' => '', + 'comment_content' => '', + ]; + + $text_fields = []; + $textarea_fields = []; + + foreach ( $form_fields as $field ) { + if ( ! is_array( $field ) ) { + continue; + } + + $type = sanitize_text_field( $field['type'] ?? 'text' ); + $value = sanitize_text_field( $field['value'] ?? '' ); + $label = sanitize_text_field( $field['label'] ?? '' ); + + switch ( $type ) { + case 'email': + if ( empty( $mapped['comment_author_email'] ) ) { + $mapped['comment_author_email'] = $value; + } + break; + + case 'url': + if ( empty( $mapped['comment_author_url'] ) ) { + $mapped['comment_author_url'] = $value; + } + break; + + case 'textarea': + $textarea_fields[] = [ + 'label' => $label, + 'value' => sanitize_textarea_field( $field['value'] ?? '' ), + ]; + break; + + case 'text': + $text_fields[] = [ + 'label' => $label, + 'value' => $value, + ]; + break; + } + } + + $mapped['comment_author'] = $this->concatenate_fields( $text_fields ); + $mapped['comment_content'] = $this->concatenate_fields( $textarea_fields ); + + return $mapped; + } + + private function concatenate_fields( array $fields ): string { + if ( empty( $fields ) ) { + return ''; + } + + if ( 1 === count( $fields ) ) { + return $fields[0]['value']; + } + + $parts = []; + foreach ( $fields as $field ) { + $label = ! empty( $field['label'] ) ? $field['label'] : 'Field'; + $parts[] = $label . ': ' . $field['value']; + } + + return implode( ' | ', $parts ); + } + + private function build_params( array $mapped, int $post_id = 0 ): array { + $params = $mapped; + + $params['blog'] = get_option( 'home' ); + $params['blog_lang'] = get_locale(); + $params['blog_charset'] = get_option( 'blog_charset' ); + + if ( $post_id ) { + $params['permalink'] = get_permalink( $post_id ); + } + + $params['user_ip'] = Utils::get_client_ip(); + $params['referrer'] = wp_get_referer(); + + if ( ! empty( $_SERVER['HTTP_USER_AGENT'] ) ) { + $params['user_agent'] = sanitize_textarea_field( wp_unslash( $_SERVER['HTTP_USER_AGENT'] ) ); + } + + $params['comment_type'] = 'contact-form'; + + $ignore = [ 'HTTP_COOKIE', 'HTTP_COOKIE2', 'PHP_AUTH_PW' ]; + foreach ( $_SERVER as $key => $value ) { + if ( ! in_array( $key, $ignore, true ) && is_string( $value ) ) { + $params[ $key ] = sanitize_text_field( wp_unslash( $value ) ); + } + } + + return $params; + } + + private function remote_check_is_spam( array $params ): bool { + $response = \Akismet::http_post( _http_build_query( $params, '', '&' ), 'comment-check' ); + + return 'true' === $response[1]; + } +} diff --git a/modules/atomic-form/templates/input.html.twig b/modules/atomic-form/input/input.html.twig similarity index 91% rename from modules/atomic-form/templates/input.html.twig rename to modules/atomic-form/input/input.html.twig index bbbc91f5..324603d9 100644 --- a/modules/atomic-form/templates/input.html.twig +++ b/modules/atomic-form/input/input.html.twig @@ -11,10 +11,10 @@ {{ name_attribute }} class="{{ classes }}" type="{{ settings.type }}" - data-interaction-id="{{ id }}" + data-interaction-id="{{ interaction_id | default(id) }}" {{ settings.attributes | raw }} {{ interactions_attribute }} - {{ placeholder_attribute }} + {{ placeholder_attribute | raw }} {{ required_attribute }} {{ readonly_attribute }} /> diff --git a/modules/atomic-form/widgets/input.php b/modules/atomic-form/input/input.php similarity index 60% rename from modules/atomic-form/widgets/input.php rename to modules/atomic-form/input/input.php index acfe532f..0065a2f2 100644 --- a/modules/atomic-form/widgets/input.php +++ b/modules/atomic-form/input/input.php @@ -1,5 +1,5 @@ default( '' ), 'type' => String_Prop_Type::make() ->default( 'text' ) - ->enum( [ 'text', 'email' ] ), + ->enum( [ 'text', 'email', 'number', 'tel', 'password' ] ), 'required' => Boolean_Prop_Type::make() ->default( false ), 'readonly' => Boolean_Prop_Type::make() ->default( false ), - 'attributes' => Attributes_Prop_Type::make(), + 'attributes' => Attributes_Prop_Type::make()->meta( Overridable_Prop_Type::ignore() ), ]; } @@ -79,6 +83,18 @@ class Input extends Atomic_Widget_Base { 'label' => __( 'Email', 'elementor-pro' ), 'value' => 'email', ], + [ + 'label' => __( 'Number', 'elementor-pro' ), + 'value' => 'number', + ], + [ + 'label' => __( 'Tel', 'elementor-pro' ), + 'value' => 'tel', + ], + [ + 'label' => __( 'Password', 'elementor-pro' ), + 'value' => 'password', + ], ] ), Switch_Control::bind_to( 'required' ) ->set_label( __( 'Required', 'elementor-pro' ) ), @@ -102,13 +118,52 @@ class Input extends Atomic_Widget_Base { protected function get_templates(): array { return [ - 'input' => __DIR__ . '/../templates/input.html.twig', + 'input' => __DIR__ . '/input.html.twig', ]; } protected function define_base_styles(): array { + $border_radius_value = Size_Prop_Type::generate( [ + 'size' => 0, + 'unit' => 'px', + ] ); + + $height_value = Size_Prop_Type::generate( [ + 'size' => 36, + 'unit' => 'px', + ] ); + + $border_color_value = Color_Prop_Type::generate( '#D6D5D5' ); + return [ - 'base' => Style_Definition::make(), + 'base' => Style_Definition::make() + ->add_variant( + Style_Variant::make() + ->add_props( [ + 'border-radius' => $border_radius_value, + 'height' => $height_value, + 'border-color' => $border_color_value, + 'font-size' => Size_Prop_Type::generate( [ + 'size' => 12, + 'unit' => 'px', + ] ), + ] ), + ) + ->add_variant( + Style_Variant::make() + ->set_state( Style_States::FOCUS ) + ->add_props( [ + 'border-color' => Color_Prop_Type::generate( '#706F6F' ), + 'outline-style' => String_Prop_Type::generate( 'none' ), + ] ), + ), + 'base::placeholder' => Style_Definition::make() // this should be changed once we support placeholder/pseudo-elements styles in the styles system. + ->add_variant( + Style_Variant::make() + ->add_props( [ + 'color' => Color_Prop_Type::generate( '#9DA5AE' ), + ] ), + ), ]; } @@ -118,4 +173,5 @@ class Input extends Atomic_Widget_Base { 'topDivider' => false, ]; } + } diff --git a/modules/atomic-form/templates/label.html.twig b/modules/atomic-form/label/label.html.twig similarity index 92% rename from modules/atomic-form/templates/label.html.twig rename to modules/atomic-form/label/label.html.twig index 4ae144dd..001051a7 100644 --- a/modules/atomic-form/templates/label.html.twig +++ b/modules/atomic-form/label/label.html.twig @@ -7,7 +7,7 @@ {{ id_attribute }} class="{{ classes }}" {{ for_attribute }} - data-interaction-id="{{ id }}" + data-interaction-id="{{ interaction_id | default(id) }}" {{ settings.attributes | raw }} {{ interactions_attribute }} >{{ settings.text | striptags(allowed_tags) | raw }} diff --git a/modules/atomic-form/widgets/label.php b/modules/atomic-form/label/label.php similarity index 66% rename from modules/atomic-form/widgets/label.php rename to modules/atomic-form/label/label.php index 458abd2d..b3aa8b1c 100644 --- a/modules/atomic-form/widgets/label.php +++ b/modules/atomic-form/label/label.php @@ -1,5 +1,5 @@ String_Prop_Type::make() + ->default( 'label' ), 'classes' => Classes_Prop_Type::make() ->default( [] ), - 'text' => Html_Prop_Type::make() - ->default( 'Form label' ), + 'text' => Html_V3_Prop_Type::make() + ->default( [ + 'content' => String_Prop_Type::generate( 'Form label' ), + 'children' => [], + ] ), 'input-id' => String_Prop_Type::make() ->default( '' ), - 'attributes' => Attributes_Prop_Type::make(), + 'attributes' => Attributes_Prop_Type::make()->meta( Overridable_Prop_Type::ignore() ), ]; } @@ -84,7 +92,7 @@ class Label extends Atomic_Widget_Base { protected function get_templates(): array { return [ - 'label' => __DIR__ . '/../templates/label.html.twig', + 'label' => __DIR__ . '/label.html.twig', ]; } @@ -94,4 +102,24 @@ class Label extends Atomic_Widget_Base { 'topDivider' => false, ]; } + + protected function define_base_styles(): array { + + $text_color_value = Color_Prop_Type::generate( '#0c0d0e' ); + $font_size_value = Size_Prop_Type::generate( [ + 'size' => 14, + 'unit' => 'px', + ] ); + + return [ + 'base' => Style_Definition::make() + ->add_variant( + Style_Variant::make() + ->add_props( [ + 'color' => $text_color_value, + 'font-size' => $font_size_value, + ] ), + ), + ]; + } } diff --git a/modules/atomic-form/submit-button/submit-button.html.twig b/modules/atomic-form/submit-button/submit-button.html.twig new file mode 100644 index 00000000..0fba9724 --- /dev/null +++ b/modules/atomic-form/submit-button/submit-button.html.twig @@ -0,0 +1,11 @@ +{% set classes = settings.classes | merge( [ base_styles.base ] ) | join(' ') | trim %} +{% set id_attribute = settings._cssid is not empty ? 'id=' ~ settings._cssid | e('html_attr') : '' %} +{% set interactions_attribute = interactions is not empty ? 'data-interactions=' ~ interactions | json_encode | e('html_attr') : '' %} + diff --git a/modules/atomic-form/submit-button/submit-button.php b/modules/atomic-form/submit-button/submit-button.php new file mode 100644 index 00000000..57cb8e5b --- /dev/null +++ b/modules/atomic-form/submit-button/submit-button.php @@ -0,0 +1,155 @@ + Classes_Prop_Type::make() + ->default( [] ), + 'label' => String_Prop_Type::make() + ->default( 'Submit' ), + 'attributes' => Attributes_Prop_Type::make()->meta( Overridable_Prop_Type::ignore() ), + ]; + } + + protected function define_atomic_controls(): array { + return [ + Section::make() + ->set_label( __( 'Content', 'elementor-pro' ) ) + ->set_items( [ + Text_Control::bind_to( 'label' ) + ->set_label( __( 'Button Text', 'elementor-pro' ) ) + ->set_placeholder( 'Submit' ), + ] ), + Section::make() + ->set_label( __( 'Settings', 'elementor-pro' ) ) + ->set_id( 'settings' ) + ->set_items( $this->get_settings_controls() ), + ]; + } + + protected function get_settings_controls(): array { + return [ + Text_Control::bind_to( '_cssid' ) + ->set_label( __( 'ID', 'elementor-pro' ) ) + ->set_meta( $this->get_css_id_control_meta() ), + ]; + } + + protected function get_templates(): array { + return [ + 'submit_button' => __DIR__ . '/submit-button.html.twig', + ]; + } + + protected function define_base_styles(): array { + $background_color_value = Background_Prop_Type::generate( [ + 'color' => Color_Prop_Type::generate( '#000' ), + ] ); + $text_color_value = Color_Prop_Type::generate( '#fff' ); + $display_value = String_Prop_Type::generate( 'flex' ); + $padding_value = Dimensions_Prop_Type::generate( [ + 'block-start' => Size_Prop_Type::generate( [ + 'size' => 10, + 'unit' => 'px', + ]), + 'inline-end' => Size_Prop_Type::generate( [ + 'size' => 30, + 'unit' => 'px', + ]), + 'block-end' => Size_Prop_Type::generate( [ + 'size' => 10, + 'unit' => 'px', + ]), + 'inline-start' => Size_Prop_Type::generate( [ + 'size' => 28, + 'unit' => 'px', + ]), + ]); + $justify_content_value = String_Prop_Type::generate( 'center' ); + $align_items_value = String_Prop_Type::generate( 'center' ); + $background_color_hover_value = Background_Prop_Type::generate( [ + 'color' => Color_Prop_Type::generate( self::$button_background_color_hover ), + ] ); + $border_base_size = Size_Prop_Type::generate( [ + 'size' => 0, + 'unit' => 'px', + ] ); + return [ + 'base' => Style_Definition::make() + ->add_variant( + Style_Variant::make() + ->add_prop( 'background', $background_color_value ) + ->add_prop( 'color', $text_color_value ) + ->add_prop( 'display', $display_value ) + ->add_prop( 'padding', $padding_value ) + ->add_prop( 'justify-content', $justify_content_value ) + ->add_prop( 'align-items', $align_items_value ) + ->add_prop( 'border-radius', $border_base_size ) + ->add_prop( 'border-width', $border_base_size ) + ) + ->add_variant( + Style_Variant::make() + ->set_state( Style_States::HOVER ) + ->add_prop( 'background', $background_color_hover_value ) + ), + ]; + } + + protected function get_css_id_control_meta(): array { + return [ + 'layout' => 'two-columns', + 'topDivider' => false, + ]; + } + + public static function get_inline_styles(): string { + $base_class = self::get_element_type() . '-base'; + return ".{$base_class} { cursor: pointer; box-sizing: border-box; }"; + } +} diff --git a/modules/atomic-form/templates/textarea.html.twig b/modules/atomic-form/textarea/textarea.html.twig similarity index 94% rename from modules/atomic-form/templates/textarea.html.twig rename to modules/atomic-form/textarea/textarea.html.twig index c202a9a3..ac34afdc 100644 --- a/modules/atomic-form/templates/textarea.html.twig +++ b/modules/atomic-form/textarea/textarea.html.twig @@ -14,10 +14,10 @@ {{ id_attribute }} {{ name_attribute }} class="{{ classes }}" - data-interaction-id="{{ id }}" + data-interaction-id="{{ interaction_id | default(id) }}" {{ settings.attributes | raw }} {{ interactions_attribute }} - {{ placeholder_attribute }} + {{ placeholder_attribute | raw }} {{ required_attribute }} {{ readonly_attribute }} {{ rows_attribute }} diff --git a/modules/atomic-form/widgets/textarea.php b/modules/atomic-form/textarea/textarea.php similarity index 67% rename from modules/atomic-form/widgets/textarea.php rename to modules/atomic-form/textarea/textarea.php index 12503ce3..cb32c932 100644 --- a/modules/atomic-form/widgets/textarea.php +++ b/modules/atomic-form/textarea/textarea.php @@ -1,5 +1,5 @@ default( true ), 'minlength' => Number_Prop_Type::make(), 'maxlength' => Number_Prop_Type::make(), - 'attributes' => Attributes_Prop_Type::make(), + 'attributes' => Attributes_Prop_Type::make()->meta( Overridable_Prop_Type::ignore() ), ]; } @@ -107,13 +112,46 @@ class Textarea extends Atomic_Widget_Base { protected function get_templates(): array { return [ - 'textarea' => __DIR__ . '/../templates/textarea.html.twig', + 'textarea' => __DIR__ . '/textarea.html.twig', ]; } protected function define_base_styles(): array { + $border_radius_value = Size_Prop_Type::generate( [ + 'size' => 0, + 'unit' => 'px', + ] ); + + $border_color_value = Color_Prop_Type::generate( '#D6D5D5' ); + return [ - 'base' => Style_Definition::make(), + 'base' => Style_Definition::make() + ->add_variant( + Style_Variant::make() + ->add_props( [ + 'border-radius' => $border_radius_value, + 'border-color' => $border_color_value, + 'font-size' => Size_Prop_Type::generate( [ + 'size' => 12, + 'unit' => 'px', + ] ), + ] ), + ) + ->add_variant( + Style_Variant::make() + ->set_state( Style_States::FOCUS ) + ->add_props( [ + 'border-color' => Color_Prop_Type::generate( '#706F6F' ), + 'outline-style' => String_Prop_Type::generate( 'none' ), + ] ), + ), + 'base::placeholder' => Style_Definition::make() // this should be changed once we support placeholder/pseudo-elements styles in the styles system. + ->add_variant( + Style_Variant::make() + ->add_props( [ + 'color' => Color_Prop_Type::generate( '#9DA5AE' ), + ] ), + ), ]; } @@ -123,4 +161,12 @@ class Textarea extends Atomic_Widget_Base { 'topDivider' => false, ]; } + + public static function get_inline_styles(): string { + $base_class = self::get_element_type() . '-base'; + // Default html textarea is resizable, but we want control over it from settings. + $inline_css = ".{$base_class}:not([data-resizable]) { resize: none; }"; + + return $inline_css; + } } diff --git a/modules/atomic-widgets/settings-resolver.php b/modules/atomic-widgets/settings-resolver.php new file mode 100644 index 00000000..8c825b34 --- /dev/null +++ b/modules/atomic-widgets/settings-resolver.php @@ -0,0 +1,30 @@ + $value ) { + $resolved[ $key ] = static::resolve_value( $value ); + } + + return $resolved; + } + + private static function resolve_value( $value ) { + if ( ! is_array( $value ) ) { + return $value; + } + + if ( ! empty( $value['$$type'] ) && array_key_exists( 'value', $value ) ) { + return static::resolve_value( $value['value'] ); + } + + return array_map( [ static::class, 'resolve_value' ], $value ); + } +} diff --git a/modules/dynamic-tags/acf/tags/base-acf-rendered-tag.php b/modules/dynamic-tags/acf/tags/base-acf-rendered-tag.php new file mode 100644 index 00000000..ff716ab3 --- /dev/null +++ b/modules/dynamic-tags/acf/tags/base-acf-rendered-tag.php @@ -0,0 +1,19 @@ + 'elementor', + 'required_license' => $this->get_required_license_feature(), + ]; + + return $config; + } +} + diff --git a/modules/dynamic-tags/tags/base/pro-data-tag.php b/modules/dynamic-tags/tags/base/pro-data-tag.php new file mode 100644 index 00000000..59091893 --- /dev/null +++ b/modules/dynamic-tags/tags/base/pro-data-tag.php @@ -0,0 +1,17 @@ +