2023-07-18 03:20:48 -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 u(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 d(){if(0!==e.scrollHeight){var a=u(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(){d();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"),d(),r="content-box"===n.boxSizing?Math.round(parseFloat(window.getComputedStyle(e,null).height)):e.offsetHeight):"hidden"!==n.overflowY&&(c("hidden"),d(),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:function(e,t){var n;
|
2023-07-18 03:20:48 -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:function(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:function(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,u=!n&&!a&&c,d=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]),u&&u.length<2048&&(_=u.split("/").pop().split("?")[0],d.href=u,-1!==d.href.indexOf(u))){var g=new XMLHttpRequest;return g.open("GET",u,!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(E(c),_):f(c);l=(c=E(c)).type||i}else if(/([\x80-\xff])/.test(c)){for(var h=0,y=new Uint8Array(c.length),v=y.length;h<v;++h)y[h]=c.charCodeAt(h);c=new p([y],{type:l})}function E(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 d)return d.href=e,d.setAttribute("download",_),d.className="download-js-link",d.innerHTML="downloading...",d.style.display="none",document.body.appendChild(d),setTimeout((function(){d.click(),document.body.removeChild(d),!0===t&&setTimeout((function(){s.URL.revokeObjectURL(d.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)&
|
2023-07-18 03:20:48 -04:00
|
|
|
function oa(e){return"[object Object]"===Object.prototype.toString.call(e)}function sa(e){var t,n;return!1!==oa(e)&&(void 0===(t=e.constructor)||!1!==oa(n=t.prototype)&&!1!==n.hasOwnProperty("isPrototypeOf"))}const{GlobalStylesContext:ia,cleanEmptyObject:la}=nt(we.privateApis);function ca(e,t){return ra()(e,t,{isMergeableObject:sa})}function ua(){const[e,t,n]=function(){const{globalStylesId:e,isReady:t,settings:n,styles:a}=(0,d.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,d.useSelect)(_.store),{editEntityRecord:o}=(0,d.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:la(l.styles)||{},settings:la(l.settings)||{}},n)}),[e])]}(),[a,r]=function(){const e=(0,d.useSelect)((e=>e(_.store).__experimentalGetCurrentThemeBaseGlobalStyles()),[]);return[!!e,e]}(),o=(0,l.useMemo)((()=>r&&t?ca(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 da({children:e}){const t=ua();return t.isReady?(0,l.createElement)(ia.Provider,{value:t},e):null}const{useGlobalSetting:ma,useGlobalStyle:pa,useGlobalStylesOutput:_a}=nt(we.privateApis),ga={start:{scale:1,opacity:1},hover:{scale:0,opacity:0}},ha={hover:{opacity:1},start:{opacity:.5}},ya={hover:{scale:1,opacity:1},start:{scale:0,opacity:0}};var va=({label:e,isFocused:t,withHoverView:n})=>{const[a]=pa("typography.fontWeight"),[r="serif"]=pa("typography.fontFamily"),[o=r]=pa("elements.h1.typography.fontFamily"),[s=a]=pa("elements.h1.typography.fontWeight"),[i="black"]=pa("color.text"),[c=i]=pa("elements.h1.color.text"),[u="white"]=pa("color.background"),[d]=pa("color.gradient"),[m]=_a(),p=(0,re.useReducedMotion)(),[_]=ma("color.palette.core"),[g]=ma("color.palette.theme"),[h]=ma("color.palette.custom"),[y,E]=(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!==u&&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:()=>E(!0),onMouseLeave:()=>E(!1),tabIndex:-1},(0,l.createElement)(we.__unstableEditorStyles,{styles:C}),(0,l.createElement)(v.__unstableMotion.div,{style:{height:152*w,width:"100%",background:null!=d?d:u,cursor:n?"pointer":void 0},initial:"start",animate:(y||t)&&!p&&e?"hover":"start"},(0,l.createElement)(v.__unstableMotion.div,{variants:ga,style:{height:"100%",overflow:"hidden"}},(0,l.createElement)(v.__experimentalHStack,{spacing:10*w,justify:"center",style:{height:"100%",overflow:"hidden"}},(0,l.createElement)(v.__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)(v.__experimentalVStack,{spacing:4*w},k.map((({slug:e,color:t},n)=>(0,l.createElement)(v.__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)(v.__unstableMotion.div,{variants:n&&ha,style:{height:"100%",width:"100%",position:"absolute",top:0,overflow:"hidden",filter:"blur(60px)",opacity:.1}},(0,l.createElement)(v.__experimentalHStac
|