var mod_pagespeed_Q6DgZ0sTqg = "/**\n * @file\n * Global utilities.\n *\n */\n(function($, Drupal) {\n\n 'use strict';\n\n\n// $('#mdb-preloader').show();\n\n $(document).ready(function() {\n // Material Select Initialization\n $('.mdb-select').materialSelect();\n });\n\n $( \"input\" )\n .focusout(function() {\n\n if($(this).val()) return;\n $( this).parent().children('label').removeClass('active');\n })\n\n /*carousel*/\n $('.carousel.carousel-multi-item.v-2 .carousel-item').each(function(){\n var next = $(this).next();\n if (!next.length) {\n next = $(this).siblings(':first');\n }\n next.children(':first-child').clone().appendTo($(this));\n\n for (var i=0;i<3;i++) {\n next=next.next();\n if (!next.length) {\n next = $(this).siblings(':first');\n }\n next.children(':first-child').clone().appendTo($(this));\n }\n });\n \n Drupal.behaviors.bootstrap_barrio_subtheme = {\n attach: function(context, settings) {\n\n // Preloader hotfix\n // https://mdbootstrap.com/support/jquery/preloader-keeps-spinning-even-when-page-is-fully-loaded/\n $(function(){ // this replaces document.ready\n setTimeout(function(){\n $('#mdb-preloader').fadeOut('slow');\n }, 500);\n \n }); \n\n $(window).scroll(function() {\n if ($(this).scrollTop() > 50) {\n $('body').addClass(\"scrolled\");\n } else {\n $('body').removeClass(\"scrolled\");\n }\n });\n\n // Tooltips Initialization\n $(function () {\n $('[data-toggle=\"tooltip\"]').tooltip()\n });\n $(function () {\n $('.material-tooltip-main').tooltip({\n template: '
'\n });\n });\n\n /* init Jarallax */\n// objectFitImages();\n jarallax(document.querySelectorAll('.jarallax'));\n\n jarallax(document.querySelectorAll('.jarallax-keep-img'), {\n keepImg: true,\n });\n\n /* init Hamburger */\n $('.first-button').on('click', function () {\n $('.animated-icon1').toggleClass('open');\n $('.animated-icon2').toggleClass('open');\n $('.animated-icon3').toggleClass('open');\n });\n \n /*\n wow = new WOW({\n boxClass: 'wow', // default\n animateClass: 'animated', // default\n offset: 0, // default\n mobile: true, // default\n live: true, // default\n });\n wow.init();\n */\n new WOW().init();\n \n // Init Map card\n $('.map-card').click(function() {\n $('.card-body').toggleClass('closed');\n });\n\n // Fix MDBForms textarea focus bug\n $( \"textarea\" ).focus(function() {\n $(this).parent().next(\"label\").addClass( \"active\" );\n });\n $( \"textarea\" ).focusout(function() {\n $(this).parent().next(\"label\").removeClass( \"active\" );\n });\n // $(\".form-file\").addClass( \"btn btn-primary btn-sm\" );\n\n\n \n // Init 2nd level dropdown nav\n /*\n https://mdbootstrap.com/snippets/jquery/adamjakubowski/656393\n */\n $('.dropdown-menu .menu-item--expanded > a').on(\"mouseenter\", function(e) {\n var submenu = $(this);\n $('.multi-level-dropdown .dropdown-submenu .dropdown-menu').removeClass('show');\n submenu.next('.dropdown-menu').addClass('show');\n e.stopPropagation();\n });\n \n $('.dropdown-menu .dropdown').on(\"hidden.bs.dropdown\", function() {\n // hide any open menus when parent closes\n $('.dropdown-menu .dropdown-menu.show').removeClass('show');\n });\n\n\n // Init modal\n // not needed? $(\"#centralModal\").modal('show');\n // Modal Closure \n $('.close').on('click', function () { \n $(this).parents('.modal').fadeOut();\n });\n \n $('.modal.status-message').modal('toggle');\n }\n };\n\n\n})(jQuery, Drupal);\n";
var mod_pagespeed_tVEEdoUb$V = "/**\n* DO NOT EDIT THIS FILE.\n* See the following change record for more information,\n* https://www.drupal.org/node/2815083\n* @preserve\n**/\n\nif (window.jQuery) {\n jQuery.noConflict();\n}\n\ndocument.documentElement.className += ' js';\n\n(function (Drupal, drupalSettings) {\n var domReady = function domReady(callback) {\n var listener = function listener() {\n callback();\n document.removeEventListener('DOMContentLoaded', listener);\n };\n\n if (document.readyState !== 'loading') {\n setTimeout(callback, 0);\n } else {\n document.addEventListener('DOMContentLoaded', listener);\n }\n };\n\n domReady(function () {\n Drupal.attachBehaviors(document, drupalSettings);\n });\n})(Drupal, window.drupalSettings);";
var mod_pagespeed_eMvYdfGYnk = "/**\n* DO NOT EDIT THIS FILE.\n* See the following change record for more information,\n* https://www.drupal.org/node/2815083\n* @preserve\n**/\n\n(function ($, once) {\n var deprecatedMessageSuffix = \"is deprecated in Drupal 9.3.0 and will be removed in Drupal 10.0.0. Use the core/once library instead. See https://www.drupal.org/node/3158256\";\n var originalJQOnce = $.fn.once;\n var originalJQRemoveOnce = $.fn.removeOnce;\n\n $.fn.once = function jQueryOnce(id) {\n Drupal.deprecationError({\n message: \"jQuery.once() \".concat(deprecatedMessageSuffix)\n });\n return originalJQOnce.apply(this, [id]);\n };\n\n $.fn.removeOnce = function jQueryRemoveOnce(id) {\n Drupal.deprecationError({\n message: \"jQuery.removeOnce() \".concat(deprecatedMessageSuffix)\n });\n return originalJQRemoveOnce.apply(this, [id]);\n };\n\n var drupalOnce = once;\n\n function augmentedOnce(id, selector, context) {\n originalJQOnce.apply($(selector, context), [id]);\n return drupalOnce(id, selector, context);\n }\n\n function remove(id, selector, context) {\n originalJQRemoveOnce.apply($(selector, context), [id]);\n return drupalOnce.remove(id, selector, context);\n }\n\n window.once = Object.assign(augmentedOnce, drupalOnce, {\n remove: remove\n });\n})(jQuery, once);";
var mod_pagespeed_CJ0jjFt38F = "(function ($, Drupal) {\n\n 'use strict'\n\n Drupal.behaviors.simplePopupBlocks = {\n attach: function (context, settings) {\n // Global variables\n var popup_settings = drupalSettings.simple_popup_blocks.settings,\n _html = document.documentElement, windowWidth = $(window).width();\n\n $.each(popup_settings, function (index, values) {\n\n // No popup when the window width is less than the trigger width.\n if (windowWidth < values.trigger_width) {return null;};\n\n // Declaring variable inside foreach - so it will not global.\n var modal_class = '',\n block_id = values.identifier,\n visit_counts_arr = values.visit_counts.split(','),\n allow_cookie = true,\n read_cookie = '',\n cookie_val = 1,\n cookie_days = values.cookie_expiry || 100,\n match = 0,\n css_identity = '',\n spb_popup_id = '',\n modal_close_class = '',\n modal_minimize_class = '',\n modal_minimized_class = '',\n layout_class = '',\n class_exists = false,\n delays = '',\n browser_close_trigger = true,\n use_time_frequency = values.use_time_frequency,\n time_frequency = values.time_frequency,\n time_frequency_cookie = 0,\n next_popup = 0,\n current_timestamp = 0,\n show_minimized_button = values.show_minimized_button,\n show_model = true\n // Always show popup, so prevent from creating cookie\n if (visit_counts_arr.length == 1 && visit_counts_arr[0] == 0 && use_time_frequency == 0) {\n allow_cookie = false\n }\n // Check to see if the block exists in the current page.\n var element = document.getElementById(block_id);\n if (typeof(element) != 'undefined' && element != null) {\n // Creating cookie\n if (allow_cookie == true) {\n if (use_time_frequency == 0) {\n read_cookie = readCookie('spb_' + block_id)\n if (read_cookie) {\n cookie_val = + read_cookie + 1\n createCookie('spb_' + block_id, cookie_val, 100)\n }\n else {\n createCookie('spb_' + block_id, cookie_val, 100)\n }\n // Match cookie\n cookie_val = cookie_val.toString()\n match = $.inArray(cookie_val, visit_counts_arr)\n\n if (match === -1) {\n show_model = false\n }\n }\n else {\n time_frequency_cookie = readCookie('spb_time' + block_id)\n current_timestamp = Math.floor(Date.now() / 1000)\n next_popup = current_timestamp + parseInt(time_frequency, 10)\n\n if (time_frequency_cookie) {\n // If current_timestamp is greater than cookie time show the popup.\n if (current_timestamp >= time_frequency_cookie) {\n match = 1\n }\n // This should allow the time frequency to be adjusted down after\n // the cookie has been set.\n else if (next_popup <= time_frequency_cookie) {\n match = 1\n }\n else {\n match = -1\n show_model = false\n }\n\n // Create new cookie for popup.\n if (match === 1) {\n createCookie('spb_time' + block_id, next_popup, 100)\n }\n }\n else {\n createCookie('spb_time' + block_id, next_popup, 100)\n }\n }\n }\n\n }\n // Set css selector\n css_identity = '.'\n if (values.css_selector == 1) {\n css_identity = '#'\n }\n\n // Assign dynamic css classes\n spb_popup_id = 'spb-' + block_id\n modal_class = block_id + '-modal'\n modal_close_class = block_id + '-modal-close'\n modal_minimize_class = block_id + '-modal-minimize'\n modal_minimized_class = block_id + '-modal-minimized'\n layout_class = '.' + modal_class + ' .spb-popup-main-wrapper'\n // Wrap arround elements\n $(css_identity + block_id).once().\n wrap($(''))\n // Hide the popup initially\n $('.' + modal_class).once().hide()\n\n // Wrap remaining elements\n if ($(css_identity + block_id).closest('.spb-popup-main-wrapper').length) {\n return;\n }\n $(css_identity + block_id).\n wrap($(''))\n $('.' + modal_class).\n wrap('')\n $(css_identity + block_id).\n before($(''))\n\n // Skip code for non popup pages.\n class_exists = $('#' + spb_popup_id).\n hasClass('simple-popup-blocks-global')\n if (!class_exists) {\n return true\n }\n // Minimize button wrap\n if (values.minimize === \"1\") {\n $(\"#\"+spb_popup_id + \" .spb-controls\").\n prepend($('-'))\n $('.' + modal_class).\n before($(''))\n }\n // Close button wrap\n if (values.close == 1) {\n $(\"#\"+spb_popup_id + \" .spb-controls\").\n prepend($('×'))\n }\n // Overlay\n if (values.overlay == 1) {\n $('.' + modal_class).addClass('spb_overlay')\n }\n // Inject layout class.\n switch (values.layout) {\n // Top left.\n case '0':\n $(layout_class).addClass('spb_top_left')\n $(layout_class).css({\n 'width': values.width,\n })\n break\n // Top right.\n case '1':\n $(layout_class).addClass('spb_top_right')\n $(layout_class).css({\n 'width': values.width,\n })\n break\n // Bottom left.\n case '2':\n $(layout_class).addClass('spb_bottom_left')\n $(layout_class).css({\n 'width': values.width,\n })\n break\n // Bottom right.\n case '3':\n $(layout_class).addClass('spb_bottom_right')\n $(layout_class).css({\n 'width': values.width,\n })\n break\n // Center.\n case '4':\n $(layout_class).addClass('spb_center')\n $(layout_class).css({\n 'width': values.width,\n 'margin-left': -values.width / 2\n })\n break\n // Top Center.\n case '5':\n $(layout_class).addClass('spb_top_center')\n $(layout_class).css({\n 'width': values.width,\n })\n break\n // Top bar.\n case '6':\n $(layout_class).addClass('spb_top_bar')\n $(layout_class).css({})\n break\n // Right bar.\n case '7':\n $(layout_class).addClass('spb_bottom_bar')\n $(layout_class).css({})\n break\n // Bottom bar.\n case '8':\n $(layout_class).addClass('spb_left_bar')\n $(layout_class).css({\n 'width': values.width,\n })\n break\n // Right bar.\n case '9':\n $(layout_class).addClass('spb_right_bar')\n $(layout_class).css({\n 'width': values.width,\n })\n break\n }\n if (show_model === true) {\n // Automatic trigger with delay\n if (values.trigger_method == 0 && values.delay > 0) {\n delays = values.delay * 1000\n $('.' + modal_class).delay(delays).fadeIn('slow')\n if (values.overlay == 1) {\n setTimeout(stopTheScroll, delays)\n }\n }\n // Automatic trigger without delay\n else if (values.trigger_method == 0) {\n $('.' + modal_class).show()\n $(css_identity + block_id).show()\n if (values.overlay == 1) {\n stopTheScroll()\n }\n }\n // Manual trigger\n else if (values.trigger_method == 1) {\n $(document).on('click', values.trigger_selector, function (e) {\n $('.' + modal_class).show()\n $(css_identity + block_id).show()\n if (values.overlay == 1) {\n stopTheScroll()\n }\n return false;\n })\n }\n // Browser close trigger\n else if (values.trigger_method == 2) {\n $(_html).mouseleave(function (e) {\n // Trigger only when mouse leave on top view port\n if (e.clientY > 20) { return }\n // Trigger only once per page\n if (!browser_close_trigger) { return }\n browser_close_trigger = false\n $('.' + modal_class).show()\n $(css_identity + block_id).show()\n if (values.overlay == 1) {\n stopTheScroll()\n }\n })\n }\n }\n\n // Trigger for close button click\n $('.' + modal_close_class).click(function () {\n $('.' + modal_class).hide()\n startTheScroll()\n })\n // Trigger for minimize button click\n $('.' + modal_minimize_class).click(function () {\n $('.' + modal_class).hide()\n startTheScroll()\n $('.' + modal_minimized_class).show()\n })\n // Trigger for minimized button click\n $('.' + modal_minimized_class).click(function () {\n $('.' + modal_class).show()\n $(css_identity + block_id).show()\n if (values.overlay == 1) {\n stopTheScroll()\n }\n\n // Hide the minimized button.\n if (show_minimized_button == 0) {\n $('.' + modal_minimized_class).hide()\n }\n\n })\n // Trigger for ESC button click\n if (values.enable_escape == 1) {\n $(document).keyup(function (e) {\n if (e.keyCode == 27) { // Escape key maps to keycode `27`.\n $('.' + modal_class).hide()\n startTheScroll()\n $('.' + modal_minimized_class).show()\n }\n })\n }\n\n // Hide the minimized button.\n if (show_minimized_button == 0) {\n $('.' + modal_minimized_class).hide()\n }\n\n }) // Foreach end.\n }\n } // document.ready end.\n\n // Remove the scrolling while overlay active\n function stopTheScroll () {\n $('body').css({\n 'overflow': 'hidden',\n });\n\n $('input:text').focus();\n }\n\n // Enable the scrolling while overlay inactive\n function startTheScroll () {\n $('body').css({\n 'overflow': '',\n })\n }\n\n // Creating cookie\n function createCookie (name, value, days) {\n if (days > 0) {\n var date = new Date()\n date.setTime(date.getTime() + (days * 24 * 60 * 60 * 1000))\n var expires = '; expires=' + date.toGMTString()\n }\n else {\n var expires = ''\n }\n document.cookie = name + '=' + value + expires + '; path=/'\n }\n\n // Reading cookie\n function readCookie (name) {\n var nameEQ = name + '='\n var ca = document.cookie.split(';')\n for (var i = 0; i < ca.length; i++) {\n var c = ca[i]\n while (c.charAt(0) == ' ') {\n c = c.substring(1, c.length)\n }\n if (c.indexOf(nameEQ) == 0) {\n return c.substring(nameEQ.length, c.length)\n }\n }\n return null\n }\n\n})(jQuery, Drupal)\n";
var mod_pagespeed_NPiP2aGgG1 = "!function(t,e){\"object\"==typeof exports&&\"undefined\"!=typeof module?e(exports):\"function\"==typeof define&&define.amd?define([\"exports\"],e):e((t=\"undefined\"!=typeof globalThis?globalThis:t||self).TORUS={})}(this,(function(t){\"use strict\";var e=e||{};Object.entries||(NodeList.prototype[Symbol.iterator]=Array.prototype[Symbol.iterator],Object.entries=function(t){for(var e=Object.keys(t),s=e.length,i=new Array(s);s--;)i[s]=[e[s],t[e[s]]];return i});const s=(t,e)=>window.getComputedStyle(t,null).getPropertyValue(e).trim(),i=()=>s(document.body,\"--resolution\"),r=t=>{switch(t.method){case\"<\":if(Number(i())=t.number)return!0}},o={height:window.innerHeight||document.documentElement.clientHeight,width:window.innerWidth||document.documentElement.clientWidth,resolution:i(),currentTrigger:null,resizing:!1},n={top:window.scrollY,left:window.scrollX},a={x:0,y:0},l={x:0,y:0},h={fx:!1,position:!1,push:!1,slider:!1,alert:!1};window.addEventListener(\"resize\",(function(){let t=0;o.resizing||(requestAnimationFrame((function s(){t>=50?(o.resizing=!1,cancelAnimationFrame(s),o.height=document.documentElement.clientHeight,o.width=window.innerWidth||document.documentElement.clientWidth,o.resolution=i(),h.fx&&e.Fx.refresh(),h.loop&&e.Loop.refresh(),h.position&&e.Position.refresh(),h.slider&&e.Slider.refresh()):(t+=1,requestAnimationFrame(s))})),o.resizing=!0)})),String.prototype.toCamelCase=function(){return this.replace(/[-_]+/g,\" \").replace(/ (.)/g,(function(t){return t.toUpperCase()})).replace(/ /g,\"\")};const d=(t,e)=>{let s=null,i=null,r=null,o=null,n=null,a={};if(/:/.test(t)){r=/(sm:)|(md:)|(lg:)|(xl:)|(xxl:)+/g.exec(t)[0],t=t.replace(r,\"\")}if(!/^@/.test(t)&&/^(-|\\+|\\/\\+|\\/-|\\/~|)\\d/g.test(t)){let e=/(?!\\d)(px|deg|%|cm|mm|in|pt|pc|em|ex|ch|rem|vw|vh|vmin|vmax|ms|s)+/g.exec(t.replace(/\\/+/g,\"\"));e&&(i=e[1],t=t.replace(i,\"\"))}if(t&&(s=e||/#/.test(t)||/\\.\\.\\.\\b/.test(t)||!/\\d+/g.test(t)?t:function(t){t=/(^(\\d.*?)|^())\\.(\\d)+/g.test(t)?parseFloat(/((-|\\+|)[0-9]*[.])?[0-9]+/g.exec(t)[0]):/^[-+]?\\d+$/.test(t)?parseInt(/[+-]?(\\d)+/g.exec(t)[0]):t;return t}(t)),/\\/(.*?)\\/+/g.exec(t)){if(!/-|\\+|~/.test(/\\/(.*?)\\/+/g.exec(t)[1]))return void console.error('No counting sign found in parenthesis. Add \"+\", \"-\" or \"~\" to your counting value');let e;if(e=t.match(/(?!(~|-|\\+)(([0-9]*[.])?[0-9]+)(-|\\+))(~|-|\\+)(@|(([0-9]*[.])?[0-9]+))+|(([0-9]*[.])?[0-9]+)(\\+|-|~)(@|)(([0-9]*[.])?[0-9]+)/g),1===e.length){let t=l(e[0]);s=t.value,o=t.counting,n=t.random}else{for(let[t,s]of Object.entries(e)){let e=l(s);a[t]={},a[t].value=e.value,a[t].counting=e.counting,a[t].random=e.random}s=a}function l(t){let e,s,i,r,o,n;return e=t.match(/(~|~.|\\+|\\+.|-|-.)*(([0-9]*[.])?[0-9]+)/g),s=e[0],i=e[1],n=/~/g.test(i||s)&&!0,i?(i=i.replace(/@|~/g,\"\"),r=/\\.\\d/g.test(i)?parseFloat(i):parseInt(i),o=Number(s)):(s=s.replace(/@|~/g,\"\"),r=/\\.\\d/g.test(s)?parseFloat(s):parseInt(s),o=0),{value:o,counting:r,random:n}}}return(\"string\"==typeof s||s instanceof String)&&(s=s.replace(/░/g,\" \")),{value:s,unit:i,resolution:r,counting:o,random:n}},c=t=>{if(!t)return\"\";return u(t.replace(/\\s\\s+/g,\" \").replace(/ $/g,\"\").replace(/ xs::| sm::| md::| lg::| xl::| xxl::/g,t=>t.replace(\" \",\"⠀\")).replace(/::+/g,\":\"),\"\\\\[ | \\\\]|{ | }| { | : |: | :| ; |; | ;| ,|, | , |\\\\( | \\\\)|\\\\(\\\\( | \\\\(\\\\(| \\\\(\\\\( | \\\\)\\\\)| =>|=> | => | \\\\+| \\\\+ |\\\\+ | ~| ~ |~ | \\\\(\").replace(/\\((.*?)\\)+/g,t=>t.replace(/ +/g,\"░\")).replace(/\\\\/g,\"\").trim()},u=(t,e)=>{let s,i,r,o=t;for(const t of e.split(\"|\"))r=t.replace(/ /g,\"\"),i=new RegExp(t,\"g\"),s=o.replace(i,r),o=s.replace(/\\\\+/g,\"\");return s},p=(t,e,s)=>{if(t instanceof Node&&(t=[t]),e instanceof Object){let i=document.createElement(\"div\");for(const e of t)i.appendChild(e);e.appendChild(i),s&&i.classList.add(s)}else for(let i of t){let t,r,o;o=i.nextElementSibling,\"svg\"===e?(t=document.createElementNS(\"http://www.w3.org/2000/svg\",\"svg\"),t.setAttribute(\"xmlns\",\"http://www.w3.org/2000/svg\")):t=document.createElement(e),r=i.parentElement,t.appendChild(i),s&&t.classList.add(s),r.insertBefore(t,o)}},m=(t,e)=>{let s=null,i=null,r=null,o=null,n=null,a=null,l=null,h=null,c=null,u=null,p=null,f=null,g=null,b={},x=t;if(b.enabled=null,b.cssFunction=null,/^(\\!)/.test(t)&&(f=!0,t=t.replace(\"!\",\"\")),/(.+\\:)(?!\\:)+/g.test(t)&&(r=/[^\\(\\:]*/.exec(t)[0],t=/\\:(.*)/.exec(t)[1]),/^(<|=|)(xs|sm|md|lg|xl|xxl):/.test(t)){switch(i={},i.method=null,/^(<|=)/.test(t)&&(i.method=/^(<|=)/.exec(t)[0],t=t.replace(i.method,\"\")),i.name=/^(xs|sm|md|lg|xl|xxl):/.exec(t)[0],i.name){case\"xxl:\":i.number=5;break;case\"xl:\":i.number=4;break;case\"lg:\":i.number=3;break;case\"md:\":i.number=2;break;case\"sm:\":i.number=1}t=t.replace(i.name,\"\")}if(o=/(\\b\\()+/g.test(t)?t.substring(0,t.indexOf(/(\\b\\()+/g.exec(t)[0])).replace(/^ +/g,\"\"):t,/@transform\\.|@filter\\./.exec(o)?(g=/@(.*)\\./.exec(o)[1],o=o.replace(g,\"\").replace(\".\",\"\").replace(\"@\",\"\")):(o=o.replace(\"@\",\"\"),g=o),/\\.+/g.test(o)){let t=/\\.(.*?)\\(|\\.(.*?)$/g.exec(o);if(n=t[2],o=o.replace(t[0],\"\"),/X$|Y$/.test(o)){let t=/X$|Y$/.exec(o)[0];o=o.replace(t,\"\"),l=t}/left|right/.test(n)&&(/push|pull/.test(o)&&(l=\"X\"),/shadow-offset/.test(o)&&(l=\"-\"+n)),/up|down/.test(n)&&(/push|pull/.test(o)&&(l=\"Y\"),/shadow-offset/.test(o)&&(l=\"-\"+n))}if(h=r?`${r}:${o}${l?\"-\"+l:\"\"}`.replace(/(\\:)+/g,\"-\"):o,s=s||{},/__/.test(t)){let e=t.match(/__(.*?)\\)+/g);if(e)for(let i of e){t=t.replace(i,\"\"),i=i.replace(\"__\",\"\");let e=m(i),r=e.name;s[r]={},e.value.start&&e.value.end?(e.unit&&(s[r].unit=e.unit),Number(e.value.start)||\"0\"===e.value.start||\"-0\"===e.value.start?s[r].start=Number(e.value.start):s[r].start=e.value.start,Number(e.value.end)||\"0\"===e.value.end||\"-0\"===e.value.end?s[r].end=Number(e.value.end):s[r].end=e.value.end):Number(e.value)?e.unit?(s[r].end=Number(e.value),e.unit&&(s[r].unit=e.unit)):s[r]=Number(e.value):(s[r]=e.value,e.unit&&(s[r].unit=e.unit),\"target\"===r&&(s[r]=document.querySelectorAll(e.value)))}}if(/\\((.*?)\\)+/g.exec(t)){let s,i={};if(!/\\((.*?)\\)+$/g.exec(t))return void console.error(\"Cannot execute the property: \"+t);s=/\\((.*?)\\)+$/g.exec(t)[0].replace(/\\)$|^\\(/g,\"\"),p=d(s,e).unit,/;/.test(s)?(i.start=i.start||{},i.end=i.end||{},i.start=v({property:s.split(\";\")[0],object:i.start,name:\"start\",isString:e}),i.end=v({property:s.split(\";\")[1],object:i.end,name:\"end\",isString:e}),/\\.\\.\\.\\b/g.test(t)&&(i.start=w(i.start),i.end=w(i.end))):(i=v({property:s,object:i,name:\"end\",isString:e}),/\\.\\.\\.\\b/g.test(t)&&(i=w(i))),a=i}else a=!1;function w(t){let e,s=[];b.enabled=!0,e=/\\.\\.\\.(.*)\\D/g.exec(t)[1].replace(/\\.\\.\\.\\b/g,\"\").split(\",\"),/^(.*)\\(/.exec(t)?b.cssFunction=/^(.*)\\(/.exec(t)[1]:b.cssFunction=null;for(let t of Object.values(e))isNaN(t)?s.push(t):s.push(Number(t));return s}return\"parallax\"===s.behavior&&(s.is_parallax=!0),/scroll+/g.test(r)&&(s.behavior=s.behavior||\"regular\",void 0===s.offset?s.offset=\"middle\":s.offset=s.offset,s.is_scroll=!0,s.event_type=\"scroll\",u=\"scroll\"),/mouse+/g.test(r)&&(s.origin=s.origin||\"middle\",s.event_type=\"mouse\",u=\"mouse\"),/sensor+/g.test(r)&&(s.event_type=\"sensor\",u=\"sensor\"),c=/_ct_+/g.test(h)?\"customTransform\":/inview_+/g.test(h)?\"inview\":/(hover)|(active)+/g.test(h)?\"static\":null,{action:r,actionType:u,activeName:h,attribute:x,cssPropertyType:g,name:o,direction:l,modifier:n,multiValues:b,options:s,priority:f,propertyType:c,resolution:i,unit:p,value:a}},f=t=>{let e,s,i,r,o,n,a,l,h=null,d=null,c=m(t),u=c.multiValues;return e=c.action,l=c.value,u.enabled||(h=c.unit?c.unit:\"\"),s=`--${e.replace(/(_x)|(_y)+/g,\"\")}-${c.name}`,name=c.name,i=c.cssPropertyType,r=`${e}_ct_${name}`,o=c.options||{},n=c.propertyType,a=c.actionType,e.split(\"_\").length>1&&(d=e.split(\"_\")[1]),{action:e,actionType:a,activeName:r,direction:d,value:l,unit:h,cssVariable:s,cssPropertyType:i,name:name,multiValues:u,options:o,propertyType:n}},g=t=>{let e=null,s=null,i=null,r=o.resolution;function n(t,e){let s;return s=t[e+\"_xxl\"]&&r>=5?t[e+\"_xxl\"]:t[e+\"_xl\"]&&r>=4?t[e+\"_xl\"]:t[e+\"_lg\"]&&r>=3?t[e+\"_lg\"]:t[e+\"_md\"]&&r>=2?t[e+\"_md\"]:t[e+\"_sm\"]&&r>=1?t[e+\"_sm\"]:t[e],s}return\"object\"==typeof t&&(e=\"object\"!=typeof t.start||Array.isArray(t.start)?n(t,\"start\"):n(t.start,\"start\"),s=\"object\"!=typeof t.end||Array.isArray(t.end)?n(t,\"end\"):n(t.end,\"end\"),i=\"object\"!=typeof t.value||Array.isArray(t.value)?n(t,\"value\"):n(t.value,\"value\")),\"number\"==typeof t&&(s=t),\"string\"==typeof t&&(s=t),\"boolean\"==typeof t&&(s=t),{start:e,end:s,value:i}},v=t=>{let e=t.property,s=t.object,i=t.name,r=t.isString;if(/:/.test(e))for(let t of e.split(\"⠀\"))if(/:/.test(t)){let e=t.split(\":\")[0],o=t.split(\":\")[1];s[`${i}_${e}`]=d(o,r).value,s[\"\"+i]=s[\"\"+i]||0}else s[\"\"+i]=d(t,r).value;else s=\"true\"===e||\"false\"===e?JSON.parse(e):d(e,r).value;return s},b=t=>{if(\"string\"==typeof t&&(t=[...document.querySelectorAll(t)]),t instanceof Node&&(t=[t]),t instanceof NodeList&&(t=[].slice.call(t)),t.length)return!!t.length&&t},x=(t,s)=>{window.addEventListener(s,()=>{e[t].init()})},w=t=>{if(t.elements)for(const e of b(t.elements))e.TORUS&&e.TORUS[t.object][t.fn](t.argument)},y=t=>{if(t.elements)for(const s of t.elements)s.TORUS||(s.TORUS=s.TORUS||{}),s.TORUS[t.name]=new e[t.name](s,t.options)},S=t=>{const e=t.parentNode;return(t.scrollTop||e.scrollTop)/(e.scrollHeight-e.clientHeight)*100},T=t=>{let e=t.match(/\\b([^\\s]+).({(.*?)})(__(.*?))(?=( |$))|\\b([^\\s]+).({(.*?)})/g);if(e)for(let s of e){let e=[],i=/^(.*?)\\:/.exec(s)[1],r=/{(.*?)}+/g.exec(s)[1].split(\" \"),o=/__.*?(?= |$)/.exec(s);for(let t of r)/^!/.test(t)?e.push(`!${i}:${t.replace(\"!\",\"\")}${o||\"\"}`):e.push(`${i}:${t}${o||\"\"}`);t=t.replace(s,e.join(\" \"))}return t};String.prototype.replaceAll=function(t){var e=this;for(let s in t)e=e.replace(new RegExp(s,\"g\"),t[s]);return e};const A=t=>t.split(\" \").filter(t=>/(\\((.*?)\\))|(__\\()+/g.test(t)),L=t=>{let e,s=t.element.getBoundingClientRect();e=t.properties.inview&&t.properties.inview.inview_offset?t.properties.inview.inview_offset:t.properties.customTransform&&t.properties.customTransform.inview?t.properties.customTransform.inview.inview_offset:0;let i=o.height/100*e+(s.top||t.bounds.offsetTop-n.top),r=s.bottom||t.bounds.offsetTop+t.bounds.height-n.top,a=s.left||t.bounds.offsetLeft,l=s.right||t.bounds.offsetLeft+t.bounds.width;return i0&&a0},E=t=>({middle:{mx:1-Math.abs((o.width/2-a.x)/(o.width/2)),my:Math.round(1e3*(1-Math.abs((o.height/2-a.y)/(o.height/2))))/1e3,m:Math.round(1e3*(1-Math.sqrt(Math.pow(o.width/2-a.x,2)+Math.pow(o.height/2-a.y,2))/Math.sqrt(Math.pow(o.width/2,2)+Math.pow(o.height/2,2))))/1e3},start:{mx:Math.round(1e3*(1-(o.width-a.x)/o.width))/1e3,my:Math.round(1e3*(1-(o.height-a.y)/o.height))/1e3,m:Math.sqrt(Math.pow(a.x,2)+Math.pow(a.y,2))/Math.sqrt(Math.pow(o.width,2)+Math.pow(o.height,2))},continuous:{mx:Math.round(1e3*(1-(o.width/2-a.x)/(o.width/2)))/1e3,my:Math.round(1e3*(1-(o.height/2-a.y)/(o.height/2)))/1e3},self:{mx:t&&1-Math.abs((a.x-t.bounds.centerX)/t.bounds.maxXSide),my:t&&1-Math.abs((a.y-t.bounds.centerY)/t.bounds.maxYSide),m:t&&$(t,t.bounds.centerX,t.bounds.centerY)},\"self-continuous\":{mx:t&&1+(a.x-t.bounds.centerX)/t.bounds.maxXSide,my:t&&1+(a.y-t.bounds.centerY)/t.bounds.maxYSide},parallax:{mx:(a.x-o.width/2)/(o.width/2),my:(a.y-o.height/2)/(o.height/2)}}),$=(t,e,s)=>1-Math.abs(Math.sqrt(Math.pow(Math.abs(e-a.x),2)+Math.pow(Math.abs(s-a.y),2))/t.bounds.maxDiagonal),_=(t,e,s,i,r)=>{let a,l,h,d,c,u,p=!(!e&&!s),m=!(!i&&!r);return p&&(s?(a=o.height/100*s,l=\"middle\"===e?s*((50+s)/100):s):(a=0,l=0)),m&&(u=i||r,i&&r&&(c=r-i)),h=1-(o.height/2-(o.height-(t.bounds.offsetTop-n.top+t.bounds.height/2)))/(o.height/2),p&&(d=(-1e-4+o.height-(t.bounds.offsetTop-n.top+a))/((o.height+(\"middle\"===e?t.bounds.height:0))/100*((\"middle\"===e?50:e)-l))),m&&(d=(n.top-u)/(c||o.height/2)),{regular:{sy:t&&d},parallax:{sy:t&&h}}},V=t=>{let e=(t=>{let e=Math.round(t.element.getBoundingClientRect().top),s=Math.round(t.element.getBoundingClientRect().bottom),i=Math.round(t.element.getBoundingClientRect().left),r=Math.round(t.element.getBoundingClientRect().right),o=P(t.element).offsetTop,a=P(t.element).offsetLeft,l=t.element.clientHeight,h=t.element.clientWidth;return{top:e,bottom:s,left:i,right:r,offsetTop:o,offsetLeft:a,width:h,height:l,centerX:a+h/2-n.left,centerY:o+l/2-n.top}})(t);t.bounds=t.bounds||{},t.bounds.top=e.top,t.bounds.bottom=e.bottom,t.bounds.left=e.left,t.bounds.right=e.right,t.bounds.offsetTop=e.offsetTop,t.bounds.offsetLeft=e.offsetLeft,t.bounds.width=e.width,t.bounds.height=e.height,t.bounds.centerX=e.centerX,t.bounds.centerY=e.centerY,t.bounds.maxDiagonal=Math.round(O(t).corner),t.bounds.maxXSide=O(t).xSide,t.bounds.maxYSide=O(t).ySide},P=t=>{let e=0,s=0,i=t,r={};if(\"svg\"!==t.nodeName||t.ownerSVGElement||(i=t),\"svg\"===t.nodeName&&t.ownerSVGElement&&(i=t.closest(\".tk-svg\")||t.ownerSVGElement),t.ownerSVGElement&&(r.element=t.closest(\".tk-svg\")||t.ownerSVGElement,r.heightRatio=t.ownerSVGElement.clientHeight/t.ownerSVGElement.height.baseVal.value,r.widthRatio=t.ownerSVGElement.clientWidth/t.ownerSVGElement.width.baseVal.value),t.ownerSVGElement&&\"defs\"!==t.nodeName)if(0===t.ownerSVGElement.clientHeight&&0===t.ownerSVGElement.clientHeight)t.classList.add(\"hidden-svg-child\");else if(\"g\"===t.nodeName){let i=t,o=0,n=0,a=0,l=0;do{o=i.getBBox().y*r.heightRatio,n=i.getBBox().x*r.widthRatio,i=i.firstElementChild}while((!o||!n)&&i);i=r.element;do{a+=i.offsetTop||0,l+=i.offsetLeft||0,i=i.offsetParent}while(i);e=a+o,s=l+n}else{let o=0,n=0;do{o+=i.offsetTop||0,n+=i.offsetLeft||0,i=i.offsetParent}while(i);e=o+t.getBBox().y*r.heightRatio,s=n+t.getBBox().x*r.widthRatio}else do{e+=i.offsetTop||0,s+=i.offsetLeft||0,i=i.offsetParent}while(i);return{offsetTop:e,offsetLeft:s,heightRatio:r.heightRatio||null,widthRatio:r.widthRatio||null}},O=t=>{let e=Math.sqrt(Math.pow(t.bounds.centerX,2)+Math.pow(t.bounds.centerY,2)),s=Math.sqrt(Math.pow(t.bounds.centerX,2)+Math.pow(o.height-t.bounds.centerY,2)),i=Math.sqrt(Math.pow(o.width-t.bounds.centerX,2)+Math.pow(t.bounds.centerY,2)),r=Math.sqrt(Math.pow(o.width-t.bounds.centerX,2)+Math.pow(o.height-t.bounds.centerY,2)),n=t.bounds.centerX,a=o.width-t.bounds.centerX,l=t.bounds.centerY,h=o.height-t.bounds.centerY;return{corner:Math.max(e,s,i,r),xSide:Math.max(n,a),ySide:Math.max(l,h)}},R=t=>{let e=t.properties.customTransform,s=[],i=[],r=[],o=[];for(const s of[\"mouse\",\"scroll\",\"sensor\"])if(e[s])for(const[i,n]of Object.entries(e[s])){let e=n.currentValues.live;if(n.options.target||t.element,e)switch(n.cssPropertyType){case\"transform\":r.push(n);break;case\"filter\":o.push(n);break;default:t.element.style.setProperty(n.name,n.multiValues.cssFunction?`${n.multiValues.cssFunction}(${e})`:e,\"important\")}}o.length&&t.element.style.setProperty(\"filter\",function(t){let e=[];for(const s of t)e.push(`${s.name}(${s.currentValues.live})`);return{live:e.join(\" \")}}(o).live,\"important\"),r.length&&t.element.style.setProperty(\"transform\",function(e){let r={};for(const t of e)r[t.name]=t.currentValues.live,\"translateY\"===t.name&&s.push(t.currentValues.live),\"translateX\"===t.name&&i.push(t.currentValues.live);r.translateY=s.length&&`calc(${s.join(\" + \")})`,r.translateX=i.length&&`calc(${i.join(\" + \")})`,t.properties.static[\"perspective-self\"]&&(r.perspective=`${t.properties.static[\"perspective-self\"].value}${t.properties.static[\"perspective-self\"].unit||\"px\"}`);return{live:`\\n perspective(${r.perspective||\"1000px\"})\\n translate3d(${r.translateX||\"0px\"}, ${r.translateY||\"0px\"}, ${r.translateZ||\"0px\"})\\n rotateX(${r.rotateX||\"0deg\"})\\n rotateY(${r.rotateY||\"0deg\"})\\n rotateZ(${r.rotate?r.rotate:r.rotateZ||\"0deg\"})\\n scale(${r.scaleX?r.scaleX:r.scale||1}, ${r.scaleY?r.scaleY:r.scale||1})\\n skew(${r.skew?r.skew:r.skewX||\"0deg\"}, ${r.skewY&&r.skewY||\"0deg\"})\\n `}}(r).live,\"important\")};let M,B,I,C,j=0,N=0,X=0,F=0,k=0,Y=0,q=0,D=\"IntersectionObserver\"in window;const H=s(document.body,\"--tor-predefined-values\").split(\",\");let W=new Set,G=new Set,U=new Set,z=new Set,Z=new Set,J=new Set,Q=new Set;const K=(t,e)=>{switch(t){case\"INTERSECTION\":D?C.observe(e):st(e);break;case\"INVIEW\":D?I.observe(e):et(e)}},tt=t=>{for(let e of t){let t=e.target.TORUS;e.isIntersecting?(e.target.isVisible=!0,t&&(t.Fx.properties.inview.isInview=!0,t.Fx.visible=!0)):(e.target.isVisible=!1,t&&(t.Fx.properties.inview.isInview=!1,t.Fx.visible=!1))}},et=t=>{t=t.TORUS.Fx,L(t)?setTimeout(()=>{t.element.classList.add(\"inview\")},50):t.properties.inview.inviewReset&&t.element.classList.remove(\"inview\")},st=t=>{t=t.TORUS.Fx,L(t)?setTimeout(()=>{t.properties.inview.isInview=!0},50):t.properties.inview.isInview=!1};function it(t){a.x=t.clientX,a.y=t.clientY,requestAnimationFrame(nt)}function rt(){M||(M=window.scrollY),n.top=window.scrollY,requestAnimationFrame(nt)}function ot(t){let e=Math.round(5*t.beta)/5,s=Math.round(5*t.gamma)/5;l.x=Math.round(1e3*t.beta)/1e3,l.y=Math.round(1e3*t.gamma)/1e3,q=X-e+(F-s),X=e,F=s,q?requestAnimationFrame(nt):(o.currentTrigger=null,cancelAnimationFrame(nt),q=!1)}function nt(){k=j-a.x+(N-a.y),Y=M-n.top;for(const t of Z)K(\"INTERSECTION\",t.element);if(k){for(const t of G)lt(t);j=a.x,N=a.y}if(Y){for(const t of W)at(t);for(const t of G)lt(t);for(const t of U)K(\"INVIEW\",t.element);M=n.top,B=!1}else if(!B){for(const t of[...Q]);B=!0}if(q)for(const t of z)ht(t);k||Y||q?window.requestAnimationFrame(nt):(o.currentTrigger=null,window.cancelAnimationFrame(nt))}function at(t){let e;if(t.properties.customTransform.scroll&&t.visible){for(let s in t.properties.customTransform.scroll){let i=t.properties.customTransform.scroll,r=i[s].currentValues;if(e=_(t,r.offsetEnd,r.offsetStart,r.afterScrolledStart,r.afterScrolledEnd)[i[s].options.behavior].sy,e<0&&!i[s].options.is_parallax&&e<0&&i[s].options.is_scroll&&(e=0),e>1&&!i[s].options.is_parallax&&e>1&&i[s].options.is_scroll&&(e=1),i[s].multiValues.enabled){let i=[];for(let t=0;t{for(let e of t){let t=e.target,s=e.target.TORUS.Fx;e.isIntersecting?s.properties.inview.inviewElement&&setTimeout(()=>{t.classList.add(\"inview\")},10):s.properties.inview.inviewReset&&t.classList.remove(\"inview\")}},{root:null}),C=new IntersectionObserver(tt,{root:null,rootMargin:\"25%\"})),e.Fx=class{constructor(t){this.element=t,this.properties=this.properties||{},this.element.hasAttribute(\"data-tor-fx\")&&(this.setAttributes(),this.shortcuts(),this.setProperties(),this.createCSSVariables(),this.addToSet(),this.listenersActions()),this.element.hasAttribute(\"data-tor-fx-trigger\")&&/inview/.test(this.element.getAttribute(\"data-tor-fx-trigger\"))&&(this.properties=this.properties||{},this.properties.inview=this.properties.inview||{},this.properties.inview.inviewElement=!0,this.isParentInview=!0,/inview:revert/.test(this.element.getAttribute(\"data-tor-fx-trigger\"))&&(this.properties.inview.inviewReset=!0),this.addToSet())}setAttributes(){this.attributesAll=T(c(this.element.getAttribute(\"data-tor-fx\"))),this.attributesWithValues=A(this.attributesAll),this.element.setAttribute(\"data-tor-fx\",this.attributesAll),this.element.ownerSVGElement}setSVGProperties(){this.svg=this.svg||{},this.svg.parent=this.element.ownerSVGElement,this.svg.parentTop=this.svg.parent.getBoundingClientRect().top+n.top,this.svg.top=this.element.getBoundingClientRect().top}checkHidden(){this.element.ownerSVGElement?0===this.element.ownerSVGElement.clientHeight&&0===this.element.ownerSVGElement.clientHeight&&this.element.classList.add(\"hidden-svg-child\"):0===this.element.clientHeight&&0===this.element.clientHeight&&this.element.classList.add(\"hidden-element\")}checkParent(){/(scroll)|(mouse)|(sensor)+/g.test(this.attributesAll)&&J.add(this.element.parentElement)}additions(){/reset-svg-origin+/g.test(this.attributesAll)&&this.resetSVGOrigin()}shortcuts(){if(!/\\:@parallax|\\:@tilt+/g.test(this.attributesAll))return;let t=[];for(const s of this.attributesWithValues.filter(t=>/(@parallax)|(@tilt)+/g.test(t))){let i,r,o=f(s);r=/:/.test(s)?/\\((.*?)\\)/.exec(s)[1]:o.value,i=\"self-continuous\";let n={\"scroll:@parallax\":{action:\"scroll\",css:\"transform.translateY\",value:e(r)+\"px;0px\",option:\"behavior\",optionValue:\"parallax\"},\"mouseX:@parallax\":{action:\"mouseX\",css:\"transform.translateX\",value:`0px;${r}px`,option:\"origin\",optionValue:\"parallax\"},\"mouseY:@parallax\":{action:\"mouseY\",css:\"transform.translateY\",value:`0px;${r}px`,option:\"origin\",optionValue:\"parallax\"},\"mouse:@parallax\":{a:{action:\"mouseX\",css:\"transform.translateX\",value:`0px;${r}px`,option:\"origin\",optionValue:\"parallax\"},b:{action:\"mouseY\",css:\"transform.translateY\",value:`0px;${r}px`,option:\"origin\",optionValue:\"parallax\"}},\"mouseX:@tilt\":{action:\"mouseX\",css:\"transform.rotateY\",value:e(r)+\"deg;0deg\",option:\"origin\",optionValue:i},\"mouseY:@tilt\":{action:\"mouseY\",css:\"transform.rotateX\",value:r+\"deg;0deg\",option:\"origin\",optionValue:i},\"mouse:@tilt\":{a:{action:\"mouseX\",css:\"transform.rotateY\",value:e(r)+\"deg;0deg\",option:\"origin\",optionValue:i},b:{action:\"mouseY\",css:\"transform.rotateX\",value:r+\"deg;0deg\",option:\"origin\",optionValue:i}}};for(let[e,i]of Object.entries(n)){new RegExp(e).test(s)&&(i.a?(this.add({attribute:`${i.a.action}:@${i.a.css}(${i.a.value})__${i.a.option}(${i.a.optionValue})`,isInternal:!0}),this.add({attribute:`${i.b.action}:@${i.b.css}(${i.b.value})__${i.b.option}(${i.b.optionValue})`,isInternal:!0})):this.add({attribute:`${i.action}:@${i.css}(${i.value})__${i.option}(${i.optionValue})`,isInternal:!0}),t.push(s))}}function e(t){return\"number\"==typeof t?-t:\"string\"==typeof t?t.replace(/\\d+/g,t=>\"-\"+t):void 0}this.setAttributes(),t.length&&t.map(t=>{this.remove({attribute:t,isInternal:!0})}),this.setProperties()}setProperties(){this.properties=this.properties||{},this.properties.inview=this.properties.inview||{},this.properties.static=this.properties.static||{},this.properties.customTransform=this.properties.customTransform||{},this.bounds=this.bounds||{};for(const t of this.attributesAll.split(\" \"))if(!/(:@parallax)|(:@tilt)+/g.test(t))if(/__origin\\(self+/g.test(t)&&Q.add(this),/scroll:|mouse:|mouseX:|mouseY:|sensor:|sensorX:|sensorY:+/g.test(t)){let e,s=f(t);this.properties.customTransform[s.actionType]=this.properties.customTransform[s.actionType]||{};for(const[t,e]of Object.entries(s))this.properties.customTransform[s.actionType][s.activeName]=this.properties.customTransform[s.actionType][s.activeName]||{},this.properties.customTransform[s.actionType][s.activeName][t]=e;e=this.properties.customTransform[s.actionType][s.activeName],e.currentValues=e.currentValues||{},e.currentValues.start=g(s.value).start,e.currentValues.end=g(s.value).end,\"scroll\"===s.actionType&&(e.currentValues.offsetStart=g(s.options.offset).start||null,e.currentValues.offsetEnd=g(s.options.offset).end,e.currentValues.afterScrolledStart=g(s.options.after).start||null,e.currentValues.afterScrolledEnd=g(s.options.after).end),\"inview\"===s.actionType&&(this.properties.customTransform.inview.inview_offset=s.options.offset||0)}else if(/inview:+/g.test(t)){let e=m(t);for(const[t,s]of Object.entries(e))this.properties.inview[e.activeName]=this.properties.inview[e.activeName]||{},this.properties.inview[e.activeName][t]=s;this.properties.inview.inviewElement=!0,/inview:reset]+/g.test(this.attributesAll)&&(this.properties.inview.inviewReset=!0),\"inview\"===e.actionType&&(this.properties.inview.inview_offset=e.options.offset||0)}else{let e=m(t);if(!e)return void console.error(\"Unknown property: \"+t);for(const[t,s]of Object.entries(e))this.properties.static[e.activeName]=this.properties.static[e.activeName]||{},this.properties.static[e.activeName][t]=s;\"hover-fix\"===e.name&&setTimeout(()=>{this.element.classList.add(\"torus-enabled\")},100)}if(/hover:(push|pull|rotate)/.test(this.attributesAll)&&!this.element.querySelector(\".tor-hit-area\")){const t=document.createElement(\"span\");t.classList.add(\"tor-hit-area\"),this.element.appendChild(t)}}createCSSVariables(){this.cssVar={};for(const t of Object.keys(this.properties))if(Object.entries(this.properties[t]).length)for(const e of Object.values(this.properties[t])){if(e.resolution){let t=`${e.resolution.method?e.resolution.method:\"\"}${e.resolution.name}`,s=e.attribute.replace(t,\"\");r(e.resolution)?this.element.setAttribute(\"data-tor-fx\",this.attributesAll.replace(e.attribute,s)):this.element.setAttribute(\"data-tor-fx\",this.attributesAll.replace(s,e.attribute))}if(e.value||0===e.value){let s=e,i=g(s.value).end;if(s.value instanceof Object&&s.value.start&&g(s.value).start,\"customTransform\"!==t){let t,e=s.action?s.action+\"-\":\"\",r=s.name,o=s.options,n=s.direction?\"\"+s.direction:\"\",a=s.modifier?s.modifier:\"\",l=s.unit?s.unit:\"\";if(t=H.includes(`${i}${l}`)?`var(--tor-${r}-${i}${l})`:`${i}${l}`,e&&(this.cssVar[`--tor-${e}${r.replace(/__.*/g,\"\")}${n}`]=t),i&&!e&&(this.cssVar[`--tor-${r}${a}`]=t),o)for(const[t,e]of Object.entries(o)){let s=g(o[t]).end||e,i=e.unit||\"\";s=/^--/.test(s)?`var(${s})`:s,this.cssVar[`--tor-${r}-${t}`]=`${s}${i}`}}}}}addToSet(){(/inview+/g.test(this.attributesAll)||this.isParentInview)&&U.add(this),/scroll+/g.test(this.attributesAll)&&W.add(this),/mouse+/g.test(this.attributesAll)&&G.add(this),/sensor+/g.test(this.attributesAll)&&z.add(this),/(mouse)|(scroll)|(sensor)|(inview)+/g.test(this.attributesAll)&&Z.add(this),this.isContainer&&Z.add(this)}listenersActions(){/scroll/.test(this.attributesAll)&&window.requestAnimationFrame(()=>{this.visible=!0,setTimeout(()=>{this.visible&&(this.element.classList.add(\"tr-none\"),at(this),setTimeout(()=>{this.element.classList.remove(\"tr-none\")},10))},100)}),/mouse/.test(this.attributesAll)&&(this.visible=!0,setTimeout(()=>{this.visible&&(this.element.classList.add(\"tr-none\"),lt(this),setTimeout(()=>{this.element.classList.remove(\"tr-none\")},10))},10)),this.isContainer&&setTimeout(()=>{at(this)},10)}setElementBounds(){V(this)}resetSVGOrigin(){this.element.ownerSVGElement&&(this.element.style.setProperty(\"--svg-x\",this.element.getBBox().x+\"px\"),this.element.style.setProperty(\"--svg-y\",this.element.getBBox().y+\"px\"),this.element.style.setProperty(\"--svg-w\",this.element.getBBox().width+\"px\"),this.element.style.setProperty(\"--svg-h\",this.element.getBBox().height+\"px\"))}add(t){this.element.hasAttribute(\"data-tor-fx\")?this.element.setAttribute(\"data-tor-fx\",[...new Set([...t.attribute.split(\" \"),...this.element.getAttribute(\"data-tor-fx\").split(\" \")])].join(\" \")):this.element.setAttribute(\"data-tor-fx\",t.attribute),t.isInternal||this.setAttributes(),t.isExternal||this.setProperties(),t.isExternal&&this.shortcuts()}remove(t){let e=m(t.attribute);t.attribute&&(this.attributesAll=this.attributesAll.split(\" \").filter(e=>e!==t.attribute).join(\" \"),this.attributesWithValues=A(this.attributesAll),this.element.setAttribute(\"data-tor-fx\",this.attributesAll),this.setProperties(),0===this.element.getAttribute(\"data-tor-fx\").length&&this.element.removeAttribute(\"data-tor-fx\"),t.isInternal||delete this.properties[e.propertyType][e.actionType][e.activeName],/__origin\\(self+/g.test(t.attribute)&&Q.delete(this))}checkInview(){K(\"INVIEW\",this.element)}refresh(){this.setProperties(),this.setElementBounds(),this.createCSSVariables(),this.addCSSVariables(),this.addToSet(),this.listenersActions()}addCSSVariables(){if(this.cssVar&&!this.async)for(const[t,e]of Object.entries(this.cssVar))this.element.style.setProperty(t,e)}static add(t,e){if(2!=arguments.length)throw Error(\"Wrong numbers of parameters! Required: 2\");y({name:\"Fx\",elements:b(t)}),w({elements:b(t),argument:{attribute:e,isExternal:!0},object:\"Fx\",fn:\"add\"})}static remove(t,e){if(2!=arguments.length)throw Error(\"Wrong numbers of parameters! Required: 2\");w({elements:b(t),argument:{attribute:c(e)},object:\"Fx\",fn:\"remove\"})}static refresh(t){w({elements:b(t||\"[data-tor-fx]\"),object:\"Fx\",fn:\"refresh\"}),this.addEventListeners(t)}static addEventListeners(){document.addEventListener(\"mousemove\",it,!0),document.addEventListener(\"scroll\",rt,!0),window.addEventListener(\"deviceorientation\",ot,!0)}static checkInview(){for(const t of U)K(\"INVIEW\",t.element)}static setProperties(t){w({elements:b(t||\"[data-tor-fx]\"),object:\"Fx\",fn:\"checkInview\"})}static addCSSVariables(t){w({elements:b(t||\"[data-tor-fx]\"),object:\"Fx\",fn:\"addCSSVariables\"})}static setElementBounds(t){w({elements:b(t||\"[data-tor-fx]\"),object:\"Fx\",fn:\"setElementBounds\"})}static init(t){t=b(t||\"[data-tor-fx], [data-tor-fx-trigger~='inview']\"),y({name:\"Fx\",elements:t}),h.fx=!0,setTimeout(()=>{this.addCSSVariables(),this.checkInview(),this.setElementBounds()},10),this.addEventListeners(t);for(const t of document.querySelectorAll(\"[data-tor-fx-trigger~='hover-fix']\"))setTimeout(()=>{t.classList.add(\"torus-enabled\")},100)}};var dt=e.Fx;e.FxGroup=class{constructor(t){this.element=t,this.element.hasAttribute(\"data-tor-fx-group\")&&this.setAttributes()}setAttributes(){if(this.attributes_all=c(this.element.getAttribute(\"data-tor-fx-group\")),this.attributes_props=A(this.attributes_all),this.attributes_all=this.attributes_all.replace(/ +/g,\"⠀\"),/;/.test(this.attributes_all))for(const t of this.attributes_all.match(/\\((.*?)\\)+/g))this.attributes_all=this.attributes_all.replace(t,t.replace(/;/,\"|\"));this.element.setAttribute(\"data-tor-fx-group\",this.attributes_all),this.setProperties()}setProperties(){this.properties={};for(const[t,s]of Object.entries(this.attributes_all.split(\";\")))if(s){let i=0;this.properties[t]=this.properties[t]||{};let r=s.split(\"=>\")[0].replace(\"⠀\",\" \"),o=s.split(\"=>\")[1].split(\"⠀\");this.properties[t].target=r,this.properties[t].attributes=o;for(const s of this.element.querySelectorAll(this.properties[t].target)){let r=[];for(let e of this.properties[t].attributes){let t=e.match(/\\((.*?)\\)+/g);if(t)for(let[s,r]of Object.entries(t)){let t,o,n=[],a=[];if(r=/(?!\\w|\\()((.*?)(?=\\)))*/.exec(r)[0],r.split(\"|\")[1]?(t=r.split(\"|\")[0],o=r.split(\"|\")[1],e=e.replace(t,\"$startValues\"+s).replace(o,\"$endValues\"+s)):(o=r,e=e.replace(o,\"$endValues\"+s)),t)for(let e of t.split(\"⠀\"))if(/\\+|\\-|~+/g.test(e)){let t=d(e);t.random?n.push(`${t.resolution||\"\"}${(t.value||0)+Math.round(Math.random()*(t.counting-0)+0)||0}${t.unit||\"\"}`):n.push(`${t.resolution||\"\"}${(t.value||0)+i*(t.counting||0)}${t.unit||\"\"}`)}else n.push(e);for(let t of o.split(\"⠀\")){let e=d(t);/\\+|\\-|~+/g.test(t)?e.random?a.push(`${e.resolution||\"\"}${(e.value||0)+Math.round(Math.random()*(e.counting-0)+0)||0}${e.unit||\"\"}`):a.push(`${e.resolution||\"\"}${(e.value||0)+i*(e.counting||0)}${e.unit||\"\"}`):a.push(t)}e=e.replace(\"$endValues\"+s,a.join(\"⠀\")).replace(\"$startValues\"+s,n.join(\"⠀\")).replace(/\\|+/g,\";\")}r.push(e)}i+=1,s.classList.add(\"tr-none\"),e.Fx.add(s,r.join(\" \")),setTimeout(()=>{s.classList.remove(\"tr-none\")},100)}}}add(t){this.element.hasAttribute(\"data-tor-fx-group\")?this.element.setAttribute(\"data-tor-fx-group\",[...new Set([...t.split(\" \"),...this.element.getAttribute(\"data-tor-fx-group\").split(\" \")])].join(\" \")):this.element.setAttribute(\"data-tor-fx-group\",t),this.setAttributes()}remove(t){if(t){for(const s of t.split(\" \")){let t,i;/\\(\\(+/g.test(s)?(i=/\\(([^())]+)\\)+/g.exec(s.split(\"->\")[1]).pop(),t=this.element.querySelectorAll(`[data-tor-fx~=\"${i}\"]`),e.Fx.remove(t,i)):(i=s,t=this.element.querySelectorAll(`[data-tor-fx~=\"${i}\"]`),e.Fx.remove(t,i)),this.attributes_all=this.attributes_all.split(\" \").filter(t=>t!==s).join(\" \")}this.element.setAttribute(\"data-tor-fx-group\",this.attributes_all),0===this.element.getAttribute(\"data-tor-fx-group\").length&&this.element.removeAttribute(\"data-tor-fx-group\"),this.setAttributes(),e.Fx.refresh()}}refresh(){this.setProperties()}static add(t,e){y({name:\"FxGroup\",elements:b(t)}),w({elements:b(t),argument:c(e),object:\"FxGroup\",fn:\"add\"})}static remove(t,e){w({elements:b(t),argument:c(e),object:\"FxGroup\",fn:\"remove\"})}static init(t){t=b(t||\"[data-tor-fx-group]\"),y({name:\"FxGroup\",elements:t}),e.Fx.init()}},x(\"FxGroup\",\"DOMContentLoaded\");var ct=e.FxGroup;e.BgImage=class{constructor(t,e){this.element=t,this.bgImageElement=t.querySelector(\".bg-img\"),this.bgImageElement&&this.element.style.setProperty(\"background-image\",`url('${this.bgImageElement.getAttribute(\"src\")}')`),e&&this.element.style.setProperty(\"background-image\",`url('${e}')`)}static init(t,e){t=b(t||\".has-bg-img, .has-bg-pattern\"),y({name:\"BgImage\",elements:t,options:e})}},x(\"BgImage\",\"load\");var ut=e.BgImage;e.Loop=class{constructor(t){this.element=t,this.attributes=c(this.element.getAttribute(\"data-tor-loop\")),this.setLoop()}setLoop(){let t,e=[];for(const s of this.attributes.split(\" \")){let i=m(s);if(/(\\()*(\\))/g.test(s)){let t,r,o={};if(!/(.*?)\\(/.exec(s))return void console.error(\"Unknown loop attribute: \"+s);if(t=/(.*?)\\(/.exec(s)[1],r=i.unit?i.unit:\"\",o=g(v({property:/\\((.*?)\\)+/gm.exec(s)[1],object:o,name:\"end\"})).end,!H.includes(i.value))switch(t){case\"duration\":o?this.element.style.setProperty(\"--tor-loop-duration\",`${o}${r}`):this.element.style.removeProperty(\"--tor-loop-duration\");break;default:o?this.element.style.setProperty(`--tor-loop-${i.name}-value`,`${o}${r}`):this.element.style.removeProperty(`--tor-loop-${i.name}-value`)}\"duration\"!==i.cssPropertyType&&e.push(\"loop-\"+i.cssPropertyType.replace(\".\",\"-\"))}t||(t=i.action)}t||(this.element.style.setProperty(\"animation-name\",\"none\"),setTimeout(()=>{this.element.style.setProperty(\"animation-name\",e.join(\",\"))},10))}refresh(){this.setLoop()}static refresh(t){w({elements:b(t||\"[data-tor-loop]\"),object:\"Loop\",fn:\"refresh\"})}static init(t){t=b(t||\"[data-tor-loop]\"),y({name:\"Loop\",elements:t}),h.loop=!0}},x(\"Loop\",\"DOMContentLoaded\");var pt=e.Loop;e.NumberInput=class{constructor(t){this.element=t,this.isUp=this.element.classList.contains(\"btn-custom-number-up\"),this.isDown=this.element.classList.contains(\"btn-custom-number-down\"),this.input=document.querySelector(this.element.getAttribute(\"target\")),this.addEventListeners()}addEventListeners(){this.element.addEventListener(\"click\",function(){this.isUp&&this.input.stepUp(),this.isDown&&this.input.stepDown()}.bind(this))}static init(t){t=b(t||\".btn-custom-number-up, .btn-custom-number-down\"),y({name:\"NumberInput\",elements:t})}},x(\"NumberInput\",\"DOMContentLoaded\");var mt=e.NumberInput;e.Position=class{constructor(t){this.element=t,this.element.getAttribute(\"data-tor-position\")&&(this.positions=c(this.element.getAttribute(\"data-tor-position\")).split(\" \"),this.positions&&this.setPositionPush(this.positions,\"position\")),this.element.getAttribute(\"data-tor-push\")&&(this.pushes=c(this.element.getAttribute(\"data-tor-push\")).split(\" \"),this.pushes&&this.setPositionPush(this.pushes,\"push\"))}setPositionPush(t,e){for(const s of t)if(/(\\()*(\\))/g.test(s)){let t=m(s),i=g(t.value).end;switch(e){case\"position\":this.element.style.setProperty(\"--tor-position-\"+t.name,`${i}${t.unit?t.unit:\"\"}`);break;case\"push\":let e=t.name.replaceAll({up:\"y\",down:\"y\",left:\"x\",right:\"x\"});this.element.style.setProperty(\"--tor-push-\"+e,`${i}${t.unit?t.unit:\"%\"}`)}}}refresh(){this.positions&&this.setPositionPush(this.positions,\"position\"),this.pushes&&this.setPositionPush(this.pushes,\"push\")}static refresh(t){w({elements:b(t||\"[data-tor-position*='('], [data-tor-push]\"),object:\"Position\",fn:\"refresh\"})}static init(t){t=b(t||\"[data-tor-position*='('], [data-tor-push]\"),y({name:\"Position\",elements:t}),h.position=!0}},x(\"Position\",\"DOMContentLoaded\");var ft=e.Position;e.ClassAction=class{constructor(t,e){this.element=t,this.attributes=T(c(this.element.getAttribute(\"data-tor-class-action\"))),this.element.setAttribute(\"data-tor-class-action\",this.attributes),this.triggers=this.triggers||{},this.raf,this.createTriggers(),this.addListeners()}createTriggers(){const t={};for(const e of[\"click\",\"scroll\",\"timeout\",\"hover\"]){t[e]={};for(const s of[\"add\",\"remove\",\"toggle\"])t[e][s]=[]}for(const e of this.attributes.split(\" \")){const s=m(e.split(\":\")[0],!0),i=m(e,!0);for(const r of[\"click\",\"scroll\",\"timeout\",\"hover\"])s.name===r&&t[r][i.name].push(e)}for(const e of[\"click\",\"scroll\",\"timeout\",\"hover\"])if(this.attributes.includes(e)){this.triggers[e]=this.triggers[e]||{};for(const[s,i]of Object.entries(t[e]))if(i.length){this.triggers[e][s]=this.triggers[e][s]||{};for(const[i,r]of t[e][s].entries()){const t=m(r.replace(\"|\",\";\").split(\":\")[0],!0),o=m(r.split(\":\")[1],!0);switch(this.triggers[e][s][i]=this.triggers[e][s][i]||{},this.triggers[e][s][i].class=o.value.split(\",\"),this.triggers[e][s][i].priority=t.priority,this.triggers[e][s][i].target=o.options.target?o.options.target:[this.element],e){case\"scroll\":this.triggers.scroll[s][i].unit=t.unit,this.triggers.scroll[s][i].revert=o.options.revert||null,\"%\"===t.unit?(this.triggers.scroll[s][i].offsetStart=document.body.clientHeight*(t.value.start/100)||document.body.clientHeight*(t.value/100),this.triggers.scroll[s][i].offsetEnd=document.body.clientHeight*(t.value.end/100)||null):(this.triggers.scroll[s][i].offsetStart=t.value.start||t.value,this.triggers.scroll[s][i].offsetEnd=t.value.end||null);break;case\"timeout\":this.triggers.timeout[s][i].start=t.value.start||t.value,this.triggers.timeout[s][i].end=t.value.end||null}}}}}addListeners(){/click/.test(this.attributes)&&this.element.addEventListener(\"click\",this.onClick.bind(this)),/hover/.test(this.attributes)&&(this.element.addEventListener(\"mouseenter\",this.onMouseEnter.bind(this)),this.element.addEventListener(\"mouseleave\",this.onMouseLeave.bind(this))),/scroll/.test(this.attributes)&&(window.addEventListener(\"scroll\",this.onScroll.bind(this),{passive:!0}),this.onScroll()),/timeout/.test(this.attributes)&&this.onTimeout()}onTimeout(){for(const[t,e]of Object.entries(this.triggers.timeout))for(const s of Object.values(e))s.time=setTimeout(()=>{this.triggerNewState(s,t),s.end?s.time=setTimeout(()=>{this.triggerOldState(s,t),clearTimeout(s.time)},s.end):clearTimeout(s.time)},s.start)}onScroll(){this.raf&&window.cancelAnimationFrame(this.raf),this.raf=window.requestAnimationFrame(function(){for(const[t,e]of Object.entries(this.triggers.scroll))for(const[s,i]of Object.entries(e)){let e,r;if(e=\"%\"===this.triggers.scroll[t][s].unit?S(document.body)/100*document.body.clientHeight:n.top,r=i.offsetEnd?e>=i.offsetStart&&e=i.offsetStart,r){if(!i.scrolled){for(const[t,e]of Object.entries(this.triggers.scroll))for(const s of Object.values(e))this.triggerNewState(s,t);i.scrolled=!0}}else i.scrolled&&((i.offsetEnd||i.revert)&&this.triggerOldState(i,t),i.scrolled=!1)}}.bind(this))}onClick(){for(const[t,e]of Object.entries(this.triggers.click))for(const s of Object.values(e))this.triggerNewState(s,t)}onMouseEnter(){for(const[t,e]of Object.entries(this.triggers.hover))for(const s of Object.values(e))this.triggerNewState(s,t)}onMouseLeave(){for(const[t,e]of Object.entries(this.triggers.hover))for(const s of Object.values(e))this.triggerOldState(s,t)}triggerNewState(t,e){if(!this.disabled)for(const s of t.target)t.priority?setTimeout(()=>{[...t.class].map(t=>s.classList[e](t))},10):[...t.class].map(t=>s.classList[e](t))}triggerOldState(t,e){if(this.disabled)return;let s;switch(e){case\"add\":s=\"remove\";break;case\"remove\":s=\"add\";break;default:s=\"toggle\"}for(const e of t.target)e.classList[s](...t.class)}static init(t,e){t=b(t||\"[data-tor-class-action]\"),y({name:\"ClassAction\",elements:t,options:e})}},x(\"ClassAction\",\"DOMContentLoaded\");var gt=e.ClassAction;e.Slider=class{constructor(t,e){this.parent=t,this.setOptions(e),this.setDimensions(),this.wrapItems(),this.slider&&this.itemsElements&&(this.activeSlide=0,this.isDown=!1,this.dragging=!1,this.scrolling=!1,this.differenceX=0,this.distanceX=0,this.startX=0,this.slider.translateLeft=0,this.lastTranslateLeft=0,this.slider.translateTop=0,this.lastTranslateTop=0,this.offsetLeft=this.parent.offsetLeft,this.offsetTop=this.parent.offsetTop,this.leftBoundsReached=!0,this.rightBoundsReached=!1,this.topBoundsReached=!0,this.bottomBoundsReached=!1,this.allItemsCount=this.itemsElements.length,setTimeout(()=>{this.setProperties(),this.setNavigation(),this.addEventListeners(),this.setActiveItems(!1,!0),this.setShowItems()},10))}setDimensions(){this.options.autoHeight||this.parent.style.setProperty(\"--tor-slider-height\",this.parent.clientHeight+\"px\"),this.parent.style.setProperty(\"--tor-slider-width\",this.parent.clientWidth+\"px\")}wrapItems(){for(const t of this.parent.children)t.classList.value.includes(\"slider-item\")||p(t,\"div\",\"slider-item\");this.itemsElements=this.parent.querySelectorAll(\".slider-item\"),p(this.itemsElements,this.parent,\"slider-items\"),this.slider=this.parent.querySelector(\".slider-items\"),p(this.slider,\"div\",\"slider-inner\"),this.sliderInner=this.parent.querySelector(\".slider-inner\")}setOptions(t){this.dataOptions=c(this.parent.getAttribute(\"data-tor-slider\")).split(\" \"),this.defaults={count:1,margin:0,pullArea:10,stretchOnDrag:!0,stretchOnClick:!1,addTrigger:!1,slide:!0,vertical:!1,drag:!0},this.options=Object.assign(this.defaults,t);for(const t of this.dataOptions)if(/(\\()*(\\))/g.test(t)){let e=m(t),s=g(e.value).end;this.options[e.activeName.toCamelCase()]=s}}setProperties(){let t=0;this.parent.style.setProperty(\"--tor-slides-margin\",this.options.margin+\"px\"),this.parent.style.setProperty(\"--tor-slides-count\",this.options.count),this.parent.classList.add(\"tor-done\"),this.sliderFullWidth=0,this.items=this.items||{};for(let[e,s]of Object.entries(this.itemsElements))this.items[e]=this.items[e]||{},this.items[e].element=s,this.items[e].id=Number(e),this.items[e].positionLeft=Number(e)+1,this.items[e].positionRight=this.allItemsCount-Number(e),this.sliderFullWidth+=this.items[e].element.clientWidth,this.items[e].offsetLeft=Number(e*(this.items[e].element.clientWidth+this.options.margin)),this.items[e].offsetTop=t,t=t+this.items[e].element.clientHeight+this.options.margin,this.items[e].element.setAttribute(\"data-tor-slider-item-id\",this.items[e].id),this.options.addTrigger&&this.items[e].element.setAttribute(\"data-tor-fx-trigger\",this.options.addTrigger.replace(/,+/g,\" \")),s.previousElementSibling?(this.items[e].pullAreaLeft_Start=this.items[e].offsetLeft-s.previousElementSibling.clientWidth-this.options.margin+this.options.pullArea,this.items[e].pullAreaLeft_End=this.items[e].offsetLeft+this.options.pullArea,this.items[e].pullAreaTop_Start=this.items[e].offsetTop-s.previousElementSibling.clientHeight-this.options.margin+this.options.pullArea,this.items[e].pullAreaTop_End=this.items[e].offsetTop+this.options.pullArea):(this.items[e].pullAreaLeft_Start=0,this.items[e].pullAreaLeft_End=this.options.pullArea,this.items[e].pullAreaTop_Start=0,this.items[e].pullAreaTop_End=this.options.pullArea),this.items[e].pullAreaRight_Start=this.items[e].offsetLeft+this.items[e].element.clientWidth+this.options.margin-this.options.pullArea,this.items[e].pullAreaRight_End=this.items[e].offsetLeft-this.options.pullArea,this.items[e].pullAreaBottom_Start=this.items[e].offsetTop+this.items[e].element.clientHeight+this.options.margin-this.options.pullArea,this.items[e].pullAreaBottom_End=this.items[e].offsetTop-this.options.pullArea,this.items[e].height=this.items[e].element.clientHeight;this.sliderClientWidth=this.slider.clientWidth,this.sliderClientHeight=this.slider.clientHeight,this.sliderScrollWidth=this.slider.scrollWidth,this.sliderScrollHeight=this.slider.scrollHeight,this.maxScrollX=this.options.slide?this.slider.scrollWidth-this.slider.clientWidth:0,this.maxScrollY=this.options.slide?this.slider.scrollHeight-this.slider.clientHeight:0,this.options.vertical||this.parent.style.setProperty(\"--tor-slider-area-width\",this.sliderFullWidth+\"px\"),this.options.addTrigger&&e.Fx.refresh()}setNavigation(){this.navigation=this.navigation||{},this.createControls(),this.createIndicators()}addEventListeners(){document.addEventListener(\"mouseup\",this._onUp.bind(this)),document.addEventListener(\"touchend\",this._onUp.bind(this),{passive:!0}),document.addEventListener(\"mousemove\",this._onMove.bind(this)),document.addEventListener(\"touchmove\",this._onMove.bind(this),{passive:!0}),this.options.drag&&(this.slider.addEventListener(\"mousedown\",this._onDown.bind(this)),this.slider.addEventListener(\"touchstart\",this._onDown.bind(this),{passive:!0})),this.slider.addEventListener(\"dragstart\",this._onDragStart.bind(this)),this.slider.addEventListener(\"click\",this._onClickSlider.bind(this)),this.slider.addEventListener(\"transitionend\",this._onTransitionEnd.bind(this),{passive:!0})}_onDown(t){this.options.slide&&this.options.drag&&window.requestAnimationFrame(()=>{this.isDown=!0,t.pageX&&(this.pointerDevice=\"pointer\"),t.touches&&(this.pointerDevice=\"touch\"),this.startX=this._page(t).x+this.slider.translateLeft,this.startY=this._page(t).y+this.slider.translateTop,this.distanceX=0,this.distanceY=0;let e=function(){this.isDown&&(this.differenceX=this.slider.translateLeft-this.lastTranslateLeft,this.lastTranslateLeft=this.slider.translateLeft,this.differenceY=this.slider.translateTop-this.lastTranslateTop,this.lastTranslateTop=this.slider.translateTop,this.parent.classList.add(\"dragging\"),window.requestAnimationFrame(e))}.bind(this);e()})}_onMove(t){this.options.slide&&this.options.drag&&window.requestAnimationFrame(()=>{this.isDown&&(this.dragging=!0,this.dragMove=!0,this.distanceX=(this.startX-(this._page(t).x+this.slider.translateLeft))/2,this.distanceY=(this.startY-(this._page(t).y+this.slider.translateTop))/2,this.distanceX>0&&this.rightBoundsReached&&(this.distanceX=0),this.distanceX<0&&this.leftBoundsReached&&(this.distanceX=0),this.distanceY>0&&this.bottomBoundsReached&&(this.distanceY=0),this.distanceY<0&&this.topBoundsReached&&(this.distanceY=0),this.slider.translateLeft+=this.distanceX,this.slider.translateTop+=this.distanceY,this.options.vertical?this.slider.style.setProperty(\"transform\",`translate3d(0px, ${-this.slider.translateTop}px, 0px)`):this.slider.style.setProperty(\"transform\",`translate3d(${-this.slider.translateLeft}px, 0px, 0px)`),this.checkBounds(),this.dragging&&(this.options.vertical?(this.topBoundsReached&&(this.slider.translateTop=0,this.slider.style.setProperty(\"transform\",`translate3d(0px, ${this.slider.translateTop}px, 0px)`)),this.bottomBoundsReached&&(this.maxScrollY=this.slider.scrollHeight-this.slider.clientHeight,this.slider.translateTop=this.maxScrollY,this.slider.style.setProperty(\"transform\",`translate3d(0px, ${-this.slider.translateTop}px, 0px)`))):(this.leftBoundsReached&&(this.slider.translateLeft=0,this.slider.style.setProperty(\"transform\",`translate3d(${this.slider.translateLeft}px, 0px, 0px)`),this.options.stretchOnDrag&&this.stretchOnBounds(\"positionLeft\",(this.startX-this._page(t).x)/500,!1)),this.rightBoundsReached&&(this.slider.translateLeft=this.maxScrollX,this.slider.style.setProperty(\"transform\",`translate3d(${-this.slider.translateLeft}px, 0px, 0px)`),this.options.stretchOnDrag&&this.stretchOnBounds(\"positionRight\",(this.startX-(this._page(t).x+this.slider.translateLeft))/500,!1)))))})}_onUp(){this.options.slide&&this.options.drag&&window.requestAnimationFrame(()=>{if(this.isDown=!1,this.dragging){if(this.options.vertical){if(this.distanceY>=0)for(let t in this.items)this.slider.translateTop>=this.items[t].pullAreaTop_Start&&this.slider.translateTop<=this.items[t].pullAreaTop_End&&this.translate(this.items[this.items[t].id].offsetTop);if(this.distanceY<0)for(let t in this.items)this.slider.translateTop<=this.items[t].pullAreaBottom_Start&&this.slider.translateTop>=this.items[t].pullAreaBottom_End&&this.translate(this.items[this.items[t].id].offsetTop)}else{if(this.distanceX>=0)for(let t in this.items)this.slider.translateLeft>=this.items[t].pullAreaLeft_Start&&this.slider.translateLeft<=this.items[t].pullAreaLeft_End&&this.translate(this.items[this.items[t].id].offsetLeft);if(this.distanceX<0)for(let t in this.items)this.slider.translateLeft<=this.items[t].pullAreaRight_Start&&this.slider.translateLeft>=this.items[t].pullAreaRight_End&&this.translate(this.items[this.items[t].id].offsetLeft)}if(this.setActiveItems(),this.options.vertical){if(this.topBoundsReached||this.bottomBoundsReached)for(let t in this.items)this.items[t].element.style.setProperty(\"transform\",\"translate3d(0px, 0px, 0px)\")}else if(this.leftBoundsReached||this.rightBoundsReached)for(let t in this.items)this.items[t].element.style.setProperty(\"transform\",\"translate3d(0px, 0px, 0px)\")}setTimeout(()=>{this.dragMove=!1},50),this.parent.classList.remove(\"dragging\"),this.dragging=!1})}_onClickPrev(t){t.preventDefault(),this.scrolling||this.slideTo(\"prev\")}_onClickNext(t){t.preventDefault(),this.scrolling||this.slideTo(\"next\")}_onClickIndicators(t){t.preventDefault(),t.target.matches(\"[data-tor-slide-to]\")&&this.slideTo(Number(t.target.getAttribute(\"data-tor-slide-to\")))}_onClickSlider(t){this.dragMove&&(t.preventDefault(),t.stopPropagation())}_onDragStart(t){t.preventDefault(),t.stopPropagation()}_onTransitionEnd(t){window.requestAnimationFrame(()=>{t.target.classList.contains(\"slider-items\")&&t.propertyName.match(\"transform\")&&(this.sliding=!1,this.parent.classList.remove(\"sliding\"),this.parent.classList.remove(\"translating\"),this.setShowItems())})}checkBounds(){this.leftBoundsReached=this.slider.translateLeft<=0,this.rightBoundsReached=this.sliderClientWidth+this.slider.translateLeft>=this.sliderScrollWidth-1,this.topBoundsReached=this.slider.translateTop<=0,this.bottomBoundsReached=this.sliderClientHeight+this.slider.translateTop>=this.sliderScrollHeight-1}createControls(){if(!this.options.controls)return;this.navigation.controlsElement&&this.navigation.controlsElement.remove();let t={prev:\"Prev\",next:\"Next\"};this.navigation.controlsElement=document.createElement(\"nav\"),this.navigation.controlsElement.classList.add(\"slider-controls\"),this.sliderInner.appendChild(this.navigation.controlsElement);for(let[e,s]of Object.entries(t)){let t;t=document.createElement(\"a\"),t.addEventListener(\"click\",this[\"_onClick\"+s].bind(this)),t.classList.add(\"slider-\"+e,\"tor-slider-internal\"),t.setAttribute(\"role\",\"button\"),t.setAttribute(\"aria-label\",`Slider ${e} button`),t.setAttribute(\"href\",\"#\"),t.setAttribute(\"data-tor-slide-to\",e),this.navigation.controlsElement.appendChild(t)}}createIndicators(){if(this.options.indicators){this.navigation.indicatorsElement&&this.navigation.indicatorsElement.remove(),this.navigation.indicatorsElement=document.createElement(\"nav\"),this.navigation.indicatorsElement.classList.add(\"slider-indicators\"),this.parent.appendChild(this.navigation.indicatorsElement),this.navigation.indicatorsElement.addEventListener(\"click\",this._onClickIndicators.bind(this)),this.navigation.indicatorsCount=this.allItemsCount/this.options.count;for(let t=0;t{let e=this.activeSlide;\"next\"===t&&(this.distanceX=0,this.distanceY=0,this.activeSlide0?(this.parent.classList.add(\"sliding\"),this.activeSlide--,this.options.slide&&(this.options.vertical?this.translate(this.items[this.activeSlide].offsetTop):this.translate(this.items[this.activeSlide].offsetLeft))):this.options.stretchOnClick&&this.stretchOnBounds(\"positionLeft\",-3,!0)),(Number(t)||0===t||\"0\"===t)&&(t=Number(t),this.distanceX=0,this.activeSlide=t,e!==this.activeSlide&&(this.parent.classList.add(\"sliding\"),this.items[this.activeSlide]?this.options.vertical?this.items[this.activeSlide].offsetTop>=this.maxScrollY?this.translate(this.maxScrollY):this.translate(this.items[this.activeSlide].offsetTop):this.items[this.activeSlide].offsetLeft>=this.maxScrollX?this.translate(this.maxScrollX):this.translate(this.items[this.activeSlide].offsetLeft):console.warn(\"It looks like you are pointing to non-existing slide in this slider:\",this.parent))),e!==this.activeSlide&&this.setActiveItems(!0)})}translate(t){this.options.vertical?(this.slider.translateTop=t,this.slider.style.setProperty(\"transform\",`translate3d(0px, ${-this.slider.translateTop}px, 0px)`)):(this.slider.translateLeft=t,this.slider.style.setProperty(\"transform\",`translate3d(${-this.slider.translateLeft}px, 0px, 0px)`)),this.options.vertical?(this.topBoundsReached&&this.bottomBoundsReached||this.parent.classList.add(\"translating\"),(this.topBoundsReached||this.bottomBoundsReached)&&this.parent.classList.remove(\"translating\")):(this.leftBoundsReached&&this.rightBoundsReached||this.parent.classList.add(\"translating\"),(this.leftBoundsReached||this.rightBoundsReached)&&this.parent.classList.remove(\"translating\"))}setShowItems(){for(let t in this.items)this.items[t].element.classList.remove(\"show\");for(let t=0;t=this.items[t].pullAreaTop_Start&&this.slider.translateTop<=this.items[t].pullAreaTop_End||this.slider.translateTop<=this.items[t].pullAreaBottom_Start&&this.slider.translateTop>=this.items[t].pullAreaBottom_End)&&(this.activeSlide=this.items[t].id):(this.slider.translateLeft>=this.items[t].pullAreaLeft_Start&&this.slider.translateLeft<=this.items[t].pullAreaLeft_End||this.slider.translateLeft<=this.items[t].pullAreaRight_Start&&this.slider.translateLeft>=this.items[t].pullAreaRight_End)&&(this.activeSlide=this.items[t].id)}e&&(this.slider.translateLeft=this.items[this.activeSlide].offsetLeft,this.slider.style.setProperty(\"transform\",`translate3d(${-this.slider.translateLeft}px, 0px, 0px)`));for(let t=0;t{this.items[this.activeSlide+t].element.classList.add(\"active\")},10),this.options.slide||setTimeout(()=>{this.items[this.activeSlide+t].element.classList.add(\"show\")},10));if(this.options.autoHeight){let t=0,e=(this.options.count-1)*this.options.margin;for(let e of s)t=e+t;this.parent.style.setProperty(\"--tor-slider-height\",(this.options.vertical?t+e:Math.max(...s))+\"px\")}if(this.options.indicators){for(let t of this.navigation.indicatorsElement.querySelectorAll(\"[data-tor-slide-to]\"))t.classList.remove(\"active\");this.activeSlide+this.options.count{for(let t in this.items)this.items[t].element.style.setProperty(\"transform\",\"translate3d(0px, 0px, 0px)\")},200)}stretchOnBounds(t,e,s){for(let s in this.items)this.items[s].element.style.setProperty(\"transform\",`translate3d(${-e*(this.items[s][t]*this.items[s][t])}px, 0px, 0px)`);if(s)for(let t in this.items)setTimeout(()=>{this.items[t].element.style.setProperty(\"transform\",\"translate3d(0px, 0px, 0px)\")},200)}refresh(){this.setOptions(),this.setDimensions(),this.setProperties(),this.setNavigation(),this.setShowItems()}_update(t){this.setOptions(t),this.setProperties(),this.setNavigation(),this.setActiveItems(!1,!0),this.setShowItems()}static refresh(t){w({elements:b(t||\".tor-slider\"),object:\"Slider\",fn:\"refresh\"})}static update(t,e){w({elements:b(t||\".tor-slider\"),object:\"Slider\",fn:\"_update\",argument:e})}static slideTo(t,e){w({elements:b(t||\".tor-slider\"),object:\"Slider\",fn:\"slideTo\",argument:e})}static createExternalControls(){for(const t of document.querySelectorAll(\"[data-tor-slide-to]:not(.tor-slider-internal)\")){let s;s=t.hasAttribute(\"data-tor-slide-target\")?document.querySelectorAll(t.getAttribute(\"data-tor-slide-target\")):document.querySelectorAll(/[^\\/]+$/.exec(t.href)[0]);let i=t.getAttribute(\"data-tor-slide-to\");t.addEventListener(\"click\",t=>{t.preventDefault();for(const t of s)e.Slider.slideTo(t,i)})}}static init(t,e){t=b(t||\".tor-slider\"),y({name:\"Slider\",elements:t,options:e}),this.createExternalControls(),h.slider=!0}},x(\"Slider\",\"load\");var vt=e.Slider;e.Range=class{constructor(t){this.element=t,this.countRange(),this.addEventListeners()}countRange(){let t=this.element.min||0,e=this.element.max||100,s=this.element.step||1,i=e-t,r=`calc((${100/i*s} * 1%) - (${s/i} * 1em))`;this.currentValue=(this.element.value-t)/(e-t)*100,this.element.style.setProperty(\"--range-bg\",r),this.element.style.setProperty(\"--range\",this.currentValue+\"%\")}addEventListeners(){this.element.addEventListener(\"input\",function(){this.countRange()}.bind(this),!1)}static init(t){t=b(t||\".form-range-tick-marks\"),y({name:\"Range\",elements:t})}},x(\"Range\",\"DOMContentLoaded\");var bt=e.Range;t.BgImage=ut,t.ClassActions=gt,t.Fx=dt,t.GroupFx=ct,t.Loop=pt,t.NumberInput=mt,t.Position=ft,t.Range=bt,t.Slider=vt,Object.defineProperty(t,\"__esModule\",{value:!0})}));";