!function(){"use strict";var t={d:function(e,r){for(var n in r)t.o(r,n)&&!t.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:r[n]})},o:function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},r:function(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,{escapeAttribute:function(){return c},getNumber:function(){return i},getUnit:function(){return n},isAcceptableCSSStringValue:function(){return s},percentToPx:function(){return l},pxToPercent:function(){return p},sanitizeAttributeName:function(){return a},sanitizeCSSSelector:function(){return o},sanitizeInputUnit:function(){return u},vhToPx:function(){return b}});const r=new RegExp(["::-webkit-input-placeholder","::-moz-placeholder",":-ms-input-placeholder"].join("|")),n=(t,e="px")=>{let r=null==t?"":String(t),n=r.length;const i="!important",s=i.length;return""===r||"number"==typeof r?e:(r.substr(0-s,s)===i&&(n-=s,r=r.substr(0,n).trim()),["vmin","vmax"].includes(r.substr(-4,4))?r.substr(-4,4):["deg","rem"].includes(r.substr(-3,3))?r.substr(-3,3):["em","px","cm","mm","in","pt","pc","ex","vh","vw","ms"].includes(r.substr(-2,2))?r.substr(-2,2):["%"].includes(r.substr(-1,1))?"%":e)},i=(t,e)=>((t,e)=>{const r=parseFloat(t);return Number.isNaN(r)?e:r})(t,e),s=(t,e)=>(DiviSettingsData?.styles?.acceptableCSSStringValues?.[t]??[]).includes(e),u=(t,e,r,n)=>{t=String(t),e=!!e;const i="!important",u=i.length;let o,a,c=!1,l=t.length;return""===t?"":(t.substr(0-u,u)===i&&(c=!0,l-=u,t=t.substr(0,l).trim()),void 0!==n&&s(n,t)?(o=t,c&&!e&&(o=`${o} !important`),o):["%"].includes(t.substr(-1,1))?(o=parseFloat(t)+t.substr(-1,1),c&&!e&&(o=`${o} !important`),o):["deg","rem"].includes(t.substr(-3,3))?(o=parseFloat(t)+t.substr(-3,3),c&&!e&&(o=`${o} !important`),o):["em","px","cm","mm","in","pt","pc","ex","vh","vw","ms"].includes(t.substr(-2,2))?(o=parseFloat(t)+t.substr(-2,2),c&&!e&&(o=`${o} !important`),o):isNaN(parseFloat(t))?"":(a=parseFloat(t),void 0!==r?a+r:(void 0!==r&&"no_default_unit"===r||(a+="px"),a)))},o=t=>String(t).split(",").map((t=>t.trim())).reduce((([t,...e],n)=>n.match(r)?[t,...e,n]:[t?`${t}, ${n}`:n,...e]),[]),a=t=>{if("string"!=typeof t||!t.trim())return"";let e=t.toLowerCase().replace(/[^a-z0-9\-_:]/g,"").trim();return e.length>200&&(e=e.substring(0,200)),e&&!/^[a-z_:]/.test(e)&&(e=`data-${e}`),e.trim()?e:""},c=t=>"string"!=typeof t?"":t.replace(/"/g,"&quot;"),l=(t,e)=>e*t/100,p=(t,e)=>100*e/t,b=(t,e)=>t/100*e;e.default={getUnit:n,isAcceptableCSSStringValue:s,sanitizeInputUnit:u,sanitizeCSSSelector:o,sanitizeAttributeName:a,escapeAttribute:c},((window.divi=window.divi||{}).scriptLibrary=window.divi.scriptLibrary||{}).scriptLibraryUtilsEtBuilderSanitize=e}();