Current File : /home/kelaby89/onlycnc.com.au/wp-content/themes/ondustry/assets/js/essential/profrontend.js |
(()=>{"use strict";var t={d:(e,r)=>{for(var o in r)t.o(r,o)&&!t.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,get:r[o]})},o:(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r:t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})}},e={};t.r(e),t.d(e,{DeviceLoop:()=>d,deviceStyleValue:()=>l,directionStartEndPoint:()=>s,getColor:()=>n,getDevice:()=>m,getDimension:()=>o,getFilter:()=>c,getRgbaValue:()=>g,getUnitPoint:()=>r,gradientDefault:()=>v,handleAdanimDividerColor:()=>C,handleAdanimDividerSize:()=>F,handleAdanimDividerWidth:()=>M,handleAdanimImageFilter:()=>k,handleAdanimImageRadius:()=>D,handleBgScrollHeight:()=>w,handleBgScrollWidth:()=>j});var r=function(t){var e=t.unit,r=t.point;return e&&r?"".concat(r).concat(e):""},o=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,r=t.dimension,o=t.unit,n=[];if(r&&o){var i=!0;["top","right","bottom","left"].map((function(t){r[t]?(i=!1,n.push("".concat(r[t]).concat(o))):(i=i&&!0,n.push("".concat(e).concat(o)))}));var c=n.join(" ");return i?"":"".concat(c)}return""},n=function(t){var e=t.r,r=t.g,o=t.b,n=t.a,i=t.type,c=t.id,a="";if(!e&&0!==e||!r&&0!==r||!r&&0!==r||(a="rgba(".concat(e,", ").concat(r,", ").concat(o,", ").concat(n,")")),"variable"===i){var u=function(t){return"--wp--preset--color--".concat(t)}(c);a="var(".concat(u,")")}return a},i=function(t){return!t||""===t},c=function(t){var e=t.brightness,r=t.contrast,o=t.blur,n=t.saturation,c=t.hue;return"\n brightness( ".concat(i(e)?100:e,"% )\n contrast( ").concat(i(r)?100:r,"% )\n saturate( ").concat(i(n)?100:n,"% )\n blur( ").concat(i(o)?0:o,"px )\n hue-rotate( ").concat(i(c)?0:c,"deg )")};function a(t){return a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},a(t)}var u=function(t){var e=!0;if("object"===a(t)){for(var r in t)e&&(e=u(t[r]));return e}return"number"!=typeof t&&!t},d=function(t){["Desktop","Tablet","Mobile"].forEach((function(e){return t(e)}))},l=function(t,e){var r,o=[];switch(t){case"Desktop":o.push("Desktop");break;case"Tablet":o.push("Tablet","Desktop");break;case"Mobile":o.push("Mobile","Tablet","Desktop")}for(var n=0,i=o;n<i.length;n++){var c=i[n];if("object"===a(r=e[c])?!u(r):!1===r||r)return e[c]}return!1};const f=gutenverseCoreFrontend;var b=function(t){return{x:Math.cos(t),y:Math.sin(t)}},p=function(t){return t*Math.PI/180},s=function(t){var e=Math.pow(2,-52),r=t%360,o=b(p(180-r)),n=b(p(360-r));return Math.abs(o.x)<=e&&(o.x=0),Math.abs(o.y)<=e&&(o.y=0),Math.abs(n.x)<=e&&(n.x=0),Math.abs(n.y)<=e&&(n.y=0),{startPoint:o,endPoint:n}},v=function(){return[{color:"rgb(49, 207, 180)",id:1,offset:"0.000",active:!0},{color:"rgb(126, 32, 207)",id:2,offset:"1.000",active:!1}]},m=function(){var t=window.screen.width,e=(0,f.responsiveBreakpoint)(),r=e.tabletBreakpoint,o=e.mobileBreakpoint;return t>r?"Desktop":t<=r&&t>o?"Tablet":"Mobile"},g=function(t){var e="var(--wp--preset--color--".concat(t,")"),r=document.createElement("div");document.body.appendChild(r),r.style.color=e;var o=window.getComputedStyle(r).getPropertyValue("color").match(/\d+/g),n={r:Number(o[0]),g:Number(o[1]),b:Number(o[2]),a:1};return document.body.removeChild(r),n};function h(t,e,r){return(e=function(t){var e=function(t){if("object"!=a(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=a(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==a(e)?e:e+""}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function y(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);e&&(o=o.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,o)}return r}function O(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?y(Object(r),!0).forEach((function(e){h(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):y(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}var j=function(t){var e=t.action,o=t.from,n=t.to,i=t.device,c=t.elementId,a=e.bgScrollWidthFrom,u=void 0===a?{}:a,f=e.bgScrollWidthTo,b=void 0===f?{}:f,p=c?c.split("-")[1]:"",s={},v={},m=O({},n);return i?(o.width=r(l(i,u)),n.width=r(l(i,b)),s[i]={from:o,to:n}):d((function(t){v={},m=O({},n),v.width=r(l(t,u)),m.width=r(l(t,b)),s[t]={from:v,to:m}})),[O({selector:".guten-section .animated-layer.animated-".concat(p)},s)]},w=function(t){var e=t.action,o=t.from,n=t.to,i=t.device,c=t.elementId,a=e.bgScrollHeightFrom,u=void 0===a?{}:a,f=e.bgScrollHeightTo,b=void 0===f?{}:f,p=c?c.split("-")[1]:"",s={},v={},m=O({},n);return i?(o.height=r(l(i,u)),n.height=r(l(i,b)),s[i]={from:o,to:n}):d((function(t){v={},m=O({},n),v.height=r(l(t,u)),m.height=r(l(t,b)),s[t]={from:v,to:m}})),[O({selector:".guten-section .animated-layer.animated-".concat(p)},s)]};function P(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);e&&(o=o.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,o)}return r}function S(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?P(Object(r),!0).forEach((function(e){h(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):P(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}var D=function(t){var e=t.action,r=t.from,n=t.to,i=t.device,c=t.elementId,a=e.imageBorderRadiusFrom,u=void 0===a?{}:a,f=e.imageBorderRadiusTo,b=void 0===f?{}:f,p={},s={},v=S({},n);return i?(r.borderRadius=o(l(i,u)),n.borderRadius=o(l(i,b)),p[i]={from:r,to:n}):d((function(t){s={},v=S({},n),s.borderRadius=o(l(t,u)),v.borderRadius=o(l(t,b)),p[t]={from:s,to:v}})),[S({selector:".".concat(c," img")},p)]},k=function(t){var e=t.action,r=t.from,o=t.to,n=t.elementId,i=e.imageFilterFrom,a=void 0===i?{}:i,u=e.imageFilterTo,d=void 0===u?{}:u;return r.filter=c(a),o.filter=c(d),[{selector:".".concat(n," img"),from:r,to:o}]};function T(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);e&&(o=o.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,o)}return r}function x(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?T(Object(r),!0).forEach((function(e){h(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):T(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}var M=function(t){var e=t.action,r=t.from,o=t.to,n=t.device,i=t.elementId,c=e.dividerWidthFrom,a=void 0===c?{}:c,u=e.dividerWidthTo,f=void 0===u?{}:u,b={},p={},s=x({},o);return n?(r.width="".concat(l(n,a),"%"),o.width="".concat(l(n,f),"%"),b[n]={from:r,to:o}):d((function(t){p={},s=x({},o),p.width="".concat(l(t,a),"%"),s.width="".concat(l(t,f),"%"),b[t]={from:p,to:s}})),[x({selector:".".concat(i," .guten-divider-wrapper")},b)]},F=function(t){var e,r,o=t.action,n=t.to,i=t.device,c=t.elementId,a=o.dividerSizeFrom,u=void 0===a?{}:a,f=o.dividerSizeTo,b=void 0===f?{}:f,p={},s={};return i?(e=l(i,u),r=l(i,b),p[i]={from:{borderWidth:"".concat(e,"px")},to:x(x({},n),{},{borderWidth:"".concat(r,"px")})},s[i]={from:h({},"--divider-pattern-height","".concat(e,"px")),to:x(x({},n),{},h({},"--divider-pattern-height","".concat(r,"px")))}):d((function(t){e=l(t,u),r=l(t,b),p[t]={from:{borderWidth:"".concat(e,"px")},to:x(x({},n),{},{borderWidth:"".concat(r,"px")})},s[t]={from:h({},"--divider-pattern-height","".concat(e,"px")),to:x(x({},n),{},h({},"--divider-pattern-height","".concat(r,"px")))}})),[x({selector:".".concat(c," .guten-divider-line")},p),x({selector:".".concat(c," .guten-divider-style")},s)]},C=function(t){var e=t.action,r=t.to,o=t.elementId,i=e.dividerColorFrom,c=void 0===i?{}:i,a=e.dividerColorTo,u=void 0===a?{}:a,d=n(c),l=n(u);return[{selector:".".concat(o," .guten-divider-line"),from:{borderColor:d},to:x(x({},r),{},{borderColor:l})},{selector:".".concat(o," .guten-divider-style"),from:{backgroundColor:d},to:x(x({},r),{},{backgroundColor:l})}]};window.gutenverseProFrontend=e})();