2023-08-11 12:04:29 -04:00
|
|
|
*/a=[e,t],n=function(e,t){"use strict";var n,a,r="function"==typeof Map?new Map:(n=[],a=[],{has:function(e){return n.indexOf(e)>-1},get:function(e){return a[n.indexOf(e)]},set:function(e,t){-1===n.indexOf(e)&&(n.push(e),a.push(t))},delete:function(e){var t=n.indexOf(e);t>-1&&(n.splice(t,1),a.splice(t,1))}}),o=function(e){return new Event(e,{bubbles:!0})};try{new Event("test")}catch(e){o=function(e){var t=document.createEvent("Event");return t.initEvent(e,!0,!1),t}}function s(e){if(e&&e.nodeName&&"TEXTAREA"===e.nodeName&&!r.has(e)){var t=null,n=null,a=null,s=function(){e.clientWidth!==n&&m()},i=function(t){window.removeEventListener("resize",s,!1),e.removeEventListener("input",m,!1),e.removeEventListener("keyup",m,!1),e.removeEventListener("autosize:destroy",i,!1),e.removeEventListener("autosize:update",m,!1),Object.keys(t).forEach((function(n){e.style[n]=t[n]})),r.delete(e)}.bind(e,{height:e.style.height,resize:e.style.resize,overflowY:e.style.overflowY,overflowX:e.style.overflowX,wordWrap:e.style.wordWrap});e.addEventListener("autosize:destroy",i,!1),"onpropertychange"in e&&"oninput"in e&&e.addEventListener("keyup",m,!1),window.addEventListener("resize",s,!1),e.addEventListener("input",m,!1),e.addEventListener("autosize:update",m,!1),e.style.overflowX="hidden",e.style.wordWrap="break-word",r.set(e,{destroy:i,update:m}),l()}function l(){var n=window.getComputedStyle(e,null);"vertical"===n.resize?e.style.resize="none":"both"===n.resize&&(e.style.resize="horizontal"),t="content-box"===n.boxSizing?-(parseFloat(n.paddingTop)+parseFloat(n.paddingBottom)):parseFloat(n.borderTopWidth)+parseFloat(n.borderBottomWidth),isNaN(t)&&(t=0),m()}function c(t){var n=e.style.width;e.style.width="0px",e.offsetWidth,e.style.width=n,e.style.overflowY=t}function d(e){for(var t=[];e&&e.parentNode&&e.parentNode instanceof Element;)e.parentNode.scrollTop&&t.push({node:e.parentNode,scrollTop:e.parentNode.scrollTop}),e=e.parentNode;return t}function u(){if(0!==e.scrollHeight){var a=d(e),r=document.documentElement&&document.documentElement.scrollTop;e.style.height="",e.style.height=e.scrollHeight+t+"px",n=e.clientWidth,a.forEach((function(e){e.node.scrollTop=e.scrollTop})),r&&(document.documentElement.scrollTop=r)}}function m(){u();var t=Math.round(parseFloat(e.style.height)),n=window.getComputedStyle(e,null),r="content-box"===n.boxSizing?Math.round(parseFloat(n.height)):e.offsetHeight;if(r<t?"hidden"===n.overflowY&&(c("scroll"),u(),r="content-box"===n.boxSizing?Math.round(parseFloat(window.getComputedStyle(e,null).height)):e.offsetHeight):"hidden"!==n.overflowY&&(c("hidden"),u(),r="content-box"===n.boxSizing?Math.round(parseFloat(window.getComputedStyle(e,null).height)):e.offsetHeight),a!==r){a=r;var s=o("autosize:resized");try{e.dispatchEvent(s)}catch(e){}}}}function i(e){var t=r.get(e);t&&t.destroy()}function l(e){var t=r.get(e);t&&t.update()}var c=null;"undefined"==typeof window||"function"!=typeof window.getComputedStyle?((c=function(e){return e}).destroy=function(e){return e},c.update=function(e){return e}):((c=function(e,t){return e&&Array.prototype.forEach.call(e.length?e:[e],(function(e){return s(e,t)})),e}).destroy=function(e){return e&&Array.prototype.forEach.call(e.length?e:[e],i),e},c.update=function(e){return e&&Array.prototype.forEach.call(e.length?e:[e],l),e}),t.default=c,e.exports=t.default},void 0===(r="function"==typeof n?n.apply(t,a):n)||(e.exports=r)},4403:(e,t)=>{var n;
|
2023-08-11 12:04:29 -04:00
|
|
|
*/!function(){"use strict";var a={}.hasOwnProperty;function r(){for(var e=[],t=0;t<arguments.length;t++){var n=arguments[t];if(n){var o=typeof n;if("string"===o||"number"===o)e.push(n);else if(Array.isArray(n)){if(n.length){var s=r.apply(null,n);s&&e.push(s)}}else if("object"===o){if(n.toString!==Object.prototype.toString&&!n.toString.toString().includes("[native code]")){e.push(n.toString());continue}for(var i in n)a.call(n,i)&&n[i]&&e.push(i)}}}return e.join(" ")}e.exports?(r.default=r,e.exports=r):void 0===(n=function(){return r}.apply(t,[]))||(e.exports=n)}()},4827:e=>{e.exports=function(e,t,n){return((n=window.getComputedStyle)?n(e):e.currentStyle)[t.replace(/-(\w)/gi,(function(e,t){return t.toUpperCase()}))]}},1919:e=>{"use strict";var t=function(e){return function(e){return!!e&&"object"==typeof e}(e)&&!function(e){var t=Object.prototype.toString.call(e);return"[object RegExp]"===t||"[object Date]"===t||function(e){return e.$$typeof===n}(e)}(e)};var n="function"==typeof Symbol&&Symbol.for?Symbol.for("react.element"):60103;function a(e,t){return!1!==t.clone&&t.isMergeableObject(e)?l((n=e,Array.isArray(n)?[]:{}),e,t):e;var n}function r(e,t,n){return e.concat(t).map((function(e){return a(e,n)}))}function o(e){return Object.keys(e).concat(function(e){return Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(e).filter((function(t){return Object.propertyIsEnumerable.call(e,t)})):[]}(e))}function s(e,t){try{return t in e}catch(e){return!1}}function i(e,t,n){var r={};return n.isMergeableObject(e)&&o(e).forEach((function(t){r[t]=a(e[t],n)})),o(t).forEach((function(o){(function(e,t){return s(e,t)&&!(Object.hasOwnProperty.call(e,t)&&Object.propertyIsEnumerable.call(e,t))})(e,o)||(s(e,o)&&n.isMergeableObject(t[o])?r[o]=function(e,t){if(!t.customMerge)return l;var n=t.customMerge(e);return"function"==typeof n?n:l}(o,n)(e[o],t[o],n):r[o]=a(t[o],n))})),r}function l(e,n,o){(o=o||{}).arrayMerge=o.arrayMerge||r,o.isMergeableObject=o.isMergeableObject||t,o.cloneUnlessOtherwiseSpecified=a;var s=Array.isArray(n);return s===Array.isArray(e)?s?o.arrayMerge(e,n,o):i(e,n,o):a(n,o)}l.all=function(e,t){if(!Array.isArray(e))throw new Error("first argument should be an array");return e.reduce((function(e,n){return l(e,n,t)}),{})};var c=l;e.exports=c},8981:function(e,t){var n,a,r;a=[],void 0===(r="function"==typeof(n=function(){return function e(t,n,a){var r,o,s=window,i="application/octet-stream",l=a||i,c=t,d=!n&&!a&&c,u=document.createElement("a"),m=function(e){return String(e)},p=s.Blob||s.MozBlob||s.WebKitBlob||m,_=n||"download";if(p=p.call?p.bind(s):Blob,"true"===String(this)&&(l=(c=[c,l])[0],c=c[1]),d&&d.length<2048&&(_=d.split("/").pop().split("?")[0],u.href=d,-1!==u.href.indexOf(d))){var g=new XMLHttpRequest;return g.open("GET",d,!0),g.responseType="blob",g.onload=function(t){e(t.target.response,_,i)},setTimeout((function(){g.send()}),0),g}if(/^data:([\w+-]+\/[\w+.-]+)?[,;]/.test(c)){if(!(c.length>2096103.424&&p!==m))return navigator.msSaveBlob?navigator.msSaveBlob(v(c),_):f(c);l=(c=v(c)).type||i}else if(/([\x80-\xff])/.test(c)){for(var h=0,y=new Uint8Array(c.length),E=y.length;h<E;++h)y[h]=c.charCodeAt(h);c=new p([y],{type:l})}function v(e){for(var t=e.split(/[:;,]/),n=t[1],a=("base64"==t[2]?atob:decodeURIComponent)(t.pop()),r=a.length,o=0,s=new Uint8Array(r);o<r;++o)s[o]=a.charCodeAt(o);return new p([s],{type:n})}function f(e,t){if("download"in u)return u.href=e,u.setAttribute("download",_),u.className="download-js-link",u.innerHTML="downloading...",u.style.display="none",document.body.appendChild(u),setTimeout((function(){u.click(),document.body.removeChild(u),!0===t&&setTimeout((function(){s.URL.revokeObjectURL(u.href)}),250)}),66),!0;if(/(Version)\/(\d+)\.(\d+)(?:\.(\d+))?.*Safari\//.test(navigator.userAgent))return/^data:/.test(e)&&(e="data:"+e.replace(/^data:([\w\/\-\+]+)/,i)),window.open(e)||confirm("Displaying New Document\n\nUse Save As... to download, then click back to return to this page.")&&(location.href=e),!0;var n=document.createElement("iframe");document.body.appendChild(n),!t&&/^data:/.test(e)&&(e="data:"+e.re
|
2023-08-11 12:04:29 -04:00
|
|
|
function sa(e){return"[object Object]"===Object.prototype.toString.call(e)}function ia(e){var t,n;return!1!==sa(e)&&(void 0===(t=e.constructor)||!1!==sa(n=t.prototype)&&!1!==n.hasOwnProperty("isPrototypeOf"))}const{GlobalStylesContext:la,cleanEmptyObject:ca}=nt(we.privateApis);function da(e,t){return oa()(e,t,{isMergeableObject:ia})}function ua(){const[e,t,n]=function(){const{globalStylesId:e,isReady:t,settings:n,styles:a}=(0,u.useSelect)((e=>{const{getEditedEntityRecord:t,hasFinishedResolution:n}=e(_.store),a=e(_.store).__experimentalGetCurrentGlobalStylesId(),r=a?t("root","globalStyles",a):void 0;let o=!1;return n("__experimentalGetCurrentGlobalStylesId")&&(o=!a||n("getEditedEntityRecord",["root","globalStyles",a])),{globalStylesId:a,isReady:o,settings:r?.settings,styles:r?.styles}}),[]),{getEditedEntityRecord:r}=(0,u.useSelect)(_.store),{editEntityRecord:o}=(0,u.useDispatch)(_.store);return[t,(0,l.useMemo)((()=>({settings:null!=n?n:{},styles:null!=a?a:{}})),[n,a]),(0,l.useCallback)(((t,n={})=>{var a,s;const i=r("root","globalStyles",e),l=t({styles:null!==(a=i?.styles)&&void 0!==a?a:{},settings:null!==(s=i?.settings)&&void 0!==s?s:{}});o("root","globalStyles",e,{styles:ca(l.styles)||{},settings:ca(l.settings)||{}},n)}),[e])]}(),[a,r]=function(){const e=(0,u.useSelect)((e=>e(_.store).__experimentalGetCurrentThemeBaseGlobalStyles()),[]);return[!!e,e]}(),o=(0,l.useMemo)((()=>r&&t?da(r,t):{}),[t,r]);return(0,l.useMemo)((()=>({isReady:e&&a,user:t,base:r,merged:o,setUserConfig:n})),[o,t,r,n,e,a])}function ma({children:e}){const t=ua();return t.isReady?(0,l.createElement)(la.Provider,{value:t},e):null}const{useGlobalSetting:pa,useGlobalStyle:_a,useGlobalStylesOutput:ga}=nt(we.privateApis),ha={start:{scale:1,opacity:1},hover:{scale:0,opacity:0}},ya={hover:{opacity:1},start:{opacity:.5}},Ea={hover:{scale:1,opacity:1},start:{scale:0,opacity:0}},va=({label:e,isFocused:t,withHoverView:n})=>{const[a]=_a("typography.fontWeight"),[r="serif"]=_a("typography.fontFamily"),[o=r]=_a("elements.h1.typography.fontFamily"),[s=a]=_a("elements.h1.typography.fontWeight"),[i="black"]=_a("color.text"),[c=i]=_a("elements.h1.color.text"),[d="white"]=_a("color.background"),[u]=_a("color.gradient"),[m]=ga(),p=(0,re.useReducedMotion)(),[_]=pa("color.palette.core"),[g]=pa("color.palette.theme"),[h]=pa("color.palette.custom"),[y,v]=(0,l.useState)(!1),[f,{width:b}]=(0,re.useResizeObserver)(),w=b?b/248:1,S=(null!=g?g:[]).concat(null!=h?h:[]).concat(null!=_?_:[]),k=S.filter((({color:e})=>e!==d&&e!==c)).slice(0,2),C=(0,l.useMemo)((()=>m?[...m,{css:"html{overflow:hidden}body{min-width: 0;padding: 0;border: none;}",isGlobalStyles:!0}]:m),[m]),x=!!b;return(0,l.createElement)(l.Fragment,null,(0,l.createElement)("div",{style:{position:"relative"}},f),x&&(0,l.createElement)(we.__unstableIframe,{className:"edit-site-global-styles-preview__iframe",style:{height:152*w},onMouseEnter:()=>v(!0),onMouseLeave:()=>v(!1),tabIndex:-1},(0,l.createElement)(we.__unstableEditorStyles,{styles:C}),(0,l.createElement)(E.__unstableMotion.div,{style:{height:152*w,width:"100%",background:null!=u?u:d,cursor:n?"pointer":void 0},initial:"start",animate:(y||t)&&!p&&e?"hover":"start"},(0,l.createElement)(E.__unstableMotion.div,{variants:ha,style:{height:"100%",overflow:"hidden"}},(0,l.createElement)(E.__experimentalHStack,{spacing:10*w,justify:"center",style:{height:"100%",overflow:"hidden"}},(0,l.createElement)(E.__unstableMotion.div,{style:{fontFamily:o,fontSize:65*w,color:c,fontWeight:s},animate:{scale:1,opacity:1},initial:{scale:.1,opacity:0},transition:{delay:.3,type:"tween"}},"Aa"),(0,l.createElement)(E.__experimentalVStack,{spacing:4*w},k.map((({slug:e,color:t},n)=>(0,l.createElement)(E.__unstableMotion.div,{key:e,style:{height:32*w,width:32*w,background:t,borderRadius:32*w/2},animate:{scale:1,opacity:1},initial:{scale:.1,opacity:0},transition:{delay:1===n?.2:.1}})))))),(0,l.createElement)(E.__unstableMotion.div,{variants:n&&ya,style:{height:"100%",width:"100%",position:"absolute",top:0,overflow:"hidden",filter:"blur(60px)",opacity:.1}},(0,l.createElement)(E.__experimentalHStack,{s
|