Why Gemfury? Push, build, and install  RubyGems npm packages Python packages Maven artifacts PHP packages Go Modules Bower components Debian packages RPM packages NuGet packages

jsarnowski / jsarnowski/blocksy-companion-pro   php

Repository URL to install this package:

Version: 1.8.76 

/ bundle / sync.js

!function(){"use strict";var e={n:function(o){var t=o&&o.__esModule?function(){return o.default}:function(){return o};return e.d(t,{a:t}),t},d:function(o,t){for(var r in t)e.o(t,r)&&!e.o(o,r)&&Object.defineProperty(o,r,{enumerable:!0,get:t[r]})},o:function(e,o){return Object.prototype.hasOwnProperty.call(e,o)}},o=window.ctEvents,t=e.n(o),r=window.blocksyCustomizerSync;function a(e){return function(e){if(Array.isArray(e))return c(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||function(e,o){if(e){if("string"==typeof e)return c(e,o);var t=Object.prototype.toString.call(e).slice(8,-1);return"Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t?Array.from(e):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?c(e,o):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function c(e,o){(null==o||o>e.length)&&(o=e.length);for(var t=0,r=new Array(o);t<o;t++)r[t]=e[t];return r}function l(e,o){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);o&&(r=r.filter((function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable}))),t.push.apply(t,r)}return t}function n(e){for(var o=1;o<arguments.length;o++){var t=null!=arguments[o]?arguments[o]:{};o%2?l(Object(t),!0).forEach((function(o){i(e,o,t[o])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):l(Object(t)).forEach((function(o){Object.defineProperty(e,o,Object.getOwnPropertyDescriptor(t,o))}))}return e}function i(e,o,t){return o in e?Object.defineProperty(e,o,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[o]=t,e}t().on("ct:header:sync:collect-variable-descriptors",(function(e){e.account=function(e){var o=e.itemId;return n(n(n(n({accountHeaderIconSize:{selector:(0,r.assembleSelector)((0,r.mutateSelector)({selector:(0,r.getRootSelectorFor)({itemId:o}),operation:"el-suffix",to_add:'[data-state="out"]'})),variable:"icon-size",responsive:!0,unit:"px"},account_loggedin_icon_size:{selector:(0,r.assembleSelector)((0,r.mutateSelector)({selector:(0,r.getRootSelectorFor)({itemId:o}),operation:"el-suffix",to_add:'[data-state="in"]'})),variable:"icon-size",responsive:!0,unit:"px"},accountHeaderAvatarSize:{selector:(0,r.assembleSelector)((0,r.getRootSelectorFor)({itemId:o})),variable:"avatar-size",responsive:!0,unit:"px"}},(0,r.handleBackgroundOptionFor)({id:"accountHeaderFormBackground",selector:(0,r.assembleSelector)((0,r.mutateSelector)({selector:[(0,r.getRootSelectorFor)({itemId:o})[0]],operation:"suffix",to_add:"#account-modal .ct-account-form"}))})),(0,r.handleBackgroundOptionFor)({id:"accountHeaderBackground",selector:(0,r.assembleSelector)((0,r.mutateSelector)({selector:[(0,r.getRootSelectorFor)({itemId:o})[0]],operation:"suffix",to_add:"#account-modal"}))})),{},{account_form_shadow:{selector:(0,r.assembleSelector)((0,r.mutateSelector)({selector:[(0,r.getRootSelectorFor)({itemId:o})[0]],operation:"suffix",to_add:"#account-modal .ct-account-form"})),type:"box-shadow",variable:"box-shadow"},account_modal_font_color:[{selector:"#account-modal .ct-account-form",variable:"color",type:"color:default"},{selector:"#account-modal .ct-account-form",variable:"linkHoverColor",type:"color:hover"}],account_modal_form_text_color:[{selector:"#account-modal form",variable:"form-text-initial-color",type:"color:default"},{selector:"#account-modal form",variable:"form-text-focus-color",type:"color:focus"}],account_modal_form_border_color:[{selector:"#account-modal form",variable:"form-field-border-initial-color",type:"color:default"},{selector:"#account-modal form",variable:"form-field-border-focus-color",type:"color:focus"}],account_modal_form_background_color:[{selector:"#account-modal form",variable:"form-field-initial-background",type:"color:default"},{selector:"#account-modal form",variable:"form-field-focus-background",type:"color:focus"}],account_close_button_color:[{selector:"#account-modal .ct-toggle-close",variable:"icon-color",type:"color:default"},{selector:"#account-modal .ct-toggle-close:hover",variable:"icon-color",type:"color:hover"}],account_close_button_border_color:[{selector:'#account-modal .ct-toggle-close[data-type="type-2"]',variable:"toggle-button-border-color",type:"color:default"},{selector:'#account-modal .ct-toggle-close[data-type="type-2"]:hover',variable:"toggle-button-border-color",type:"color:hover"}],account_close_button_shape_color:[{selector:'#account-modal .ct-toggle-close[data-type="type-3"]',variable:"toggle-button-background",type:"color:default"},{selector:'#account-modal .ct-toggle-close[data-type="type-3"]:hover',variable:"toggle-button-background",type:"color:hover"}],accountHeaderMargin:{selector:(0,r.assembleSelector)((0,r.getRootSelectorFor)({itemId:o})),type:"spacing",variable:"margin",responsive:!0,important:!0}},(0,r.typographyOption)({id:"account_label_font",selector:(0,r.assembleSelector)((0,r.mutateSelector)({selector:(0,r.getRootSelectorFor)({itemId:o}),operation:"suffix",to_add:".ct-label"}))})),{},{accountHeaderColor:[{selector:(0,r.assembleSelector)((0,r.getRootSelectorFor)({itemId:o})),variable:"linkInitialColor",type:"color:default",responsive:!0},{selector:(0,r.assembleSelector)((0,r.getRootSelectorFor)({itemId:o})),variable:"linkHoverColor",type:"color:hover",responsive:!0}],header_account_icon_color:[{selector:(0,r.assembleSelector)((0,r.getRootSelectorFor)({itemId:o})),variable:"icon-color",type:"color:default",responsive:!0},{selector:(0,r.assembleSelector)((0,r.getRootSelectorFor)({itemId:o})),variable:"icon-hover-color",type:"color:hover",responsive:!0}],transparentAccountHeaderColor:[{selector:(0,r.assembleSelector)((0,r.mutateSelector)({selector:(0,r.getRootSelectorFor)({itemId:o}),operation:"between",to_add:'[data-transparent-row="yes"]'})),variable:"linkInitialColor",type:"color:default",responsive:!0},{selector:(0,r.assembleSelector)((0,r.mutateSelector)({selector:(0,r.getRootSelectorFor)({itemId:o}),operation:"between",to_add:'[data-transparent-row="yes"]'})),variable:"linkHoverColor",type:"color:hover",responsive:!0}],transparent_header_account_icon_color:[{selector:(0,r.assembleSelector)((0,r.mutateSelector)({selector:(0,r.getRootSelectorFor)({itemId:o}),operation:"between",to_add:'[data-transparent-row="yes"]'})),variable:"icon-color",type:"color:default",responsive:!0},{selector:(0,r.assembleSelector)((0,r.mutateSelector)({selector:(0,r.getRootSelectorFor)({itemId:o}),operation:"between",to_add:'[data-transparent-row="yes"]'})),variable:"icon-hover-color",type:"color:hover",responsive:!0}],stickyAccountHeaderColor:[{selector:(0,r.assembleSelector)((0,r.mutateSelector)({selector:(0,r.getRootSelectorFor)({itemId:o}),operation:"between",to_add:'[data-sticky*="yes"]'})),variable:"linkInitialColor",type:"color:default",responsive:!0},{selector:(0,r.assembleSelector)((0,r.mutateSelector)({selector:(0,r.getRootSelectorFor)({itemId:o}),operation:"between",to_add:'[data-sticky*="yes"]'})),variable:"linkHoverColor",type:"color:hover",responsive:!0}],sticky_header_account_icon_color:[{selector:(0,r.assembleSelector)((0,r.mutateSelector)({selector:(0,r.getRootSelectorFor)({itemId:o}),operation:"between",to_add:'[data-sticky*="yes"]'})),variable:"icon-color",type:"color:default",responsive:!0},{selector:(0,r.assembleSelector)((0,r.mutateSelector)({selector:(0,r.getRootSelectorFor)({itemId:o}),operation:"between",to_add:'[data-sticky*="yes"]'})),variable:"icon-hover-color",type:"color:hover",responsive:!0}]})}})),t().on("ct:header:sync:item:account",(function(e){var o=e.optionId,t=e.optionValue,c='[data-id="account"]';if("header_account_visibility"===o&&(0,r.updateAndSaveEl)(c,(function(e){return(0,r.responsiveClassesFor)(n(n({},t),{},{desktop:!0}),e)})),"loggedin_account_label_visibility"!==o&&"loggedout_account_label_visibility"!==o||(0,r.updateAndSaveEl)(c,(function(e){a(e.querySelectorAll(".ct-label")).map((function(e){(0,r.responsiveClassesFor)(t,e)}))})),"loggedin_label"===o&&(0,r.updateAndSaveEl)(c,(function(e){a(e.querySelectorAll(".ct-label")).map((function(e){e.innerHTML=t}))})),"login_label"===o&&(0,r.updateAndSaveEl)(c,(function(e){a(e.querySelectorAll(".ct-label")).map((function(e){e.innerHTML=t}))})),"loggedout_label_position"!==o&&"loggedin_label_position"!==o||((0,r.updateAndSaveEl)(c,(function(e){t.desktop||(t={desktop:t,mobile:t}),e.dataset.label=t.desktop}),{onlyView:"desktop"}),(0,r.updateAndSaveEl)(c,(function(e){t.desktop||(t={desktop:t,mobile:t}),e.dataset.label=t.mobile}),{onlyView:"mobile"})),"account_close_button_type"===o){var l=document.querySelector("#account-modal .ct-toggle-close");setTimeout((function(){l.classList.add("ct-disable-transitions"),requestAnimationFrame((function(){l&&(l.dataset.type=t),setTimeout((function(){l.classList.remove("ct-disable-transitions")}))}))}),300)}})),t().on("ct:header:sync:collect-variable-descriptors",(function(e){e.global=function(e){return e.itemId,{transparent_behaviour:{selector:'[data-header*="'.concat(document.body.dataset.header,'"]'),variable:"has-transparent-header",responsive:!0,extractValue:function(e){return{desktop:e.desktop?"var(--true)":"var(--false)",tablet:e.mobile?"var(--true)":"var(--false)",mobile:e.mobile?"var(--true)":"var(--false)"}},unit:""}}}})),t().on("ct:header:sync:item:global",(function(e){var o=e.optionId,r=e.optionValue,a=e.values;if("has_sticky_header"===o||"sticky_rows"===o||"sticky_behaviour"===o){var c=a.has_sticky_header,l=a.sticky_rows,n=a.sticky_behaviour;Array.from(document.querySelectorAll("[data-sticky]")).map((function(e){e.removeAttribute("data-sticky")})),"yes"===c&&Array.from(document.querySelectorAll("[data-row]")).map((function(e){var o=e.dataset.row;if(l[o]){var t=[];n.desktop&&t.push("desktop"),n.mobile&&t.push("mobile"),e.dataset.sticky=t.join(":")}})),t().trigger("blocksy:frontend:init")}if("transparent_behaviour"===o){if(!document.querySelector("[data-transparent]"))return;Array.from(document.querySelectorAll("[data-device]")).map((function(e){e.removeAttribute("data-transparent"),Array.from(e.querySelectorAll("[data-row]")).map((function(e){return e.removeAttribute("data-transparent-row")})),r[e.dataset.device]&&(e.dataset.transparent="",Array.from(e.querySelectorAll("[data-row]")).map((function(e){return e.dataset.transparentRow="yes"}))),t().trigger("blocksy:frontend:init")}))}}))}();